From e88c5eb5dd16e613791d7887dd7f0a8b23fe3e1b Mon Sep 17 00:00:00 2001 From: ilal <lalqqhy@163.com> Date: Wed, 29 Jul 2020 16:56:47 +0800 Subject: [PATCH] 修复BUG --- src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java b/src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java index 6906574..1fcdef4 100644 --- a/src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java +++ b/src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java @@ -3,9 +3,12 @@ package cn.timer.api.utils.router.business; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + import cn.hutool.core.convert.Convert; import cn.hutool.core.util.ObjectUtil; import cn.hutool.json.JSONObject; +import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.config.exception.CustomException; import cn.timer.api.controller.zzgl.service.ZzglBmgwMService; import cn.timer.api.dto.spmk.FromData; @@ -39,9 +42,10 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { // 调入部门 Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Convert.toInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue()); - if(!("").equals(jsonObj.get("__TransferInPosition",FromData.class).getValue())) { + /* __TransferInPosition */ + if(!("").equals(jsonObj.get("__TransferInDepartment",FromData.class).getValue())) { // 调入岗位 - Integer TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInPosition",FromData.class).getValue()); + Integer TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue()); } if (TransferInDepartment == null) { @@ -60,6 +64,12 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { .build(); System.out.println("调岗:"+upEmpDeptDto); + + ZzglBmgwM bmg = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getLeader, id)); + if(bmg != null) { + ZzglBmgwM.builder().id(bmg.getId()).leader(0).build().updateById(); + } + // 调 员工管理 业务 zzglBmgwMService.applicationTransferPosition(id, orgCode, upEmpDeptDto); } -- libgit2 0.26.0