Commit 726c119c by dengshichuan

Merge branch 'tzq' into 'develop'

Tzq

See merge request 8timerv2/8timerapiv200!211
parents 81a94c68 7403f169
......@@ -18,7 +18,7 @@ import org.springframework.web.filter.CorsFilter;
import cn.hutool.core.net.NetUtil;
@MapperScan("cn.timer.api.dao") // 扫描的mapper
@MapperScan({"cn.timer.api.dao"}) // 扫描的mapper
@ComponentScan(basePackages = {"cn.timer.api"})
@SpringBootApplication
@EnableScheduling
......
......@@ -726,6 +726,8 @@ public class JxglController {
@PutMapping(value = "/termination_performance_appraisal")
@ApiOperation(value = "8.终止-绩效考核", httpMethod = "PUT", notes = "终止-绩效考核")
@ApiOperationSupport(order = 8)
@Role
@Log(title = "终止-绩效考核")
public Result<Object> terminationPA(@CurrentUser UserBean userBean,@NotNull @RequestParam Integer id) {
JxglPerformanceAppraisal performanceAppraisal = jxglPerformanceAppraisalMapper
......@@ -955,6 +957,7 @@ public class JxglController {
@ApiOperation(value = "13.终止-考核", httpMethod = "PUT", notes = "终止-考核")
@ApiOperationSupport(order = 13)
@Role
@Log(title = "终止-考核")
public Result<Object> terminationAssessment(@CurrentUser UserBean userBean, @NotNull @RequestParam Integer id) {
JxglAppraisal appraisal = jxglAppraisalMapper.selectById(id);
......
......@@ -671,7 +671,7 @@ public class SpmkController {
jSONObject.set("approveId", FromData.builder().value(String.valueOf(asId)));
//审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.getFactory().createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null)
sab.handleApprove(jSONObject);
}
......
......@@ -98,7 +98,7 @@ public class YgglServiceImpl implements YgglService {
return leaderId;
}
private ZzglBmgwM getLeaderEmp(List<ZzglBmgwM> listBM, Integer baseBmgwId) {
public ZzglBmgwM getLeaderEmp(List<ZzglBmgwM> listBM, Integer baseBmgwId) {
ZzglBmgwM zzglBmgwM = baseBmgwId != null ?
CollUtil.getFirst(listBM.stream()
.filter(bM -> bM.getId().equals(baseBmgwId)).collect(Collectors.toList()))
......
......@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.ConvertException;
import cn.hutool.core.lang.Console;
......@@ -125,7 +126,7 @@ public class RouterUtils {
case UNEXECUTED:
listUser.get(i).setExecute(EXECUTING);
// 首次发起申请时,写入 审批人名称 至 obj 中
if (isFirse) {
if (isFirse && obj.getStr("current_approver") != null ) {
obj.set("current_approver", listUser.get(i).getName());
}
......@@ -420,10 +421,14 @@ public class RouterUtils {
for (int i = 0,n = listFlowChildren.size(); i < n; i++) {
// 新增 执行人
List<User> listUser = listFlowChildren.get(i).getRelation().get(0).getUsers();
if (EXECUTED.equals(listFlowChildren.get(i).getExecute())) {
List<User> listUser = CollUtil.toList();
List<Relation> listR = listFlowChildren.get(i).getRelation();
if (CollectionUtil.isNotEmpty(listR)) {
listUser = listR.get(0).getUsers();
}
}else if (EXECUTING.equals(listFlowChildren.get(i).getExecute())) {
if (EXECUTING.equals(listFlowChildren.get(i).getExecute())) {
for (int i_user = 0, n_user = listUser.size(); i_user < n_user; i_user++) {
if (EXECUTED.equals(listUser.get(i_user).getExecute())) {
......
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.YgzzDto;
......@@ -60,7 +63,13 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
.build();
// 调 员工管理 业务
ygglService.applicationRegularization(ygzzDto);
YgglMainEmp.builder()
.jobStatus(2)
.zzTime(ygzzDto.getZzTime())
.sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark())
.build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()));
// ygglService.applicationRegularization(ygzzDto);
}
}
......@@ -9,7 +9,15 @@ import cn.timer.api.utils.router.enums.ApproveEnum;
*/
public class SpmkAssoBusinessFactory {
public static SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) {
static SpmkAssoBusinessFactory factory;
public static SpmkAssoBusinessFactory getFactory() {
return factory == null ? new SpmkAssoBusinessFactory() : factory;
}
public SpmkAssoBusiness createSpmkAssoType(ApproveEnum assotype) {
SpmkAssoBusiness sat = null;
switch (assotype) {
case DEFAULT:
......
......@@ -133,7 +133,11 @@
a.job_status,
a.rz_time,
a.bmgw_id,
a.org_code
a.org_code,
a.zj_type,
a.zj_num,
a.syq
</sql>
<sql id="Base_Column_List_Alias">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment