dev:岗位管理-新增和修改岗位代码修改
parent
d337fa6c5c
commit
08b910630e
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.basic.info.command;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zcloud.basic.info.domain.gateway.PostDepartmentGateway;
|
||||
import com.zcloud.basic.info.domain.gateway.PostGateway;
|
||||
import com.zcloud.basic.info.domain.model.PostDepartmentE;
|
||||
|
|
@ -42,7 +43,9 @@ public class PostAddExe {
|
|||
// 岗位部门关联
|
||||
if(res && cmd.getSupervisionFlag() == 1) {
|
||||
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postId, cmd.getDepartmentIds());
|
||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.basic.info.command;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.basic.info.domain.gateway.PostDepartmentGateway;
|
||||
import com.zcloud.basic.info.domain.gateway.PostGateway;
|
||||
|
|
@ -36,7 +37,9 @@ public class PostUpdateExe {
|
|||
if(res && postUpdateCmd.getSupervisionFlag() == 1){
|
||||
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
||||
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postE.getId(), postUpdateCmd.getDepartmentIds());
|
||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||
}
|
||||
}
|
||||
|
||||
if (!res) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue