|
@@ -118,6 +118,8 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
* sysDept.setTaxCode(wmDaAgent.getZjNumber());
|
|
|
*/
|
|
|
public boolean saveAgent(WmDaAgent wmDaAgent) {
|
|
|
+ Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
|
+
|
|
|
wmDaAgent.setCreateTime(LocalDateTime.now());
|
|
|
boolean isSave = super.save(wmDaAgent);
|
|
|
List<SysDept> list = sysDeptMapper.selectByName(wmDaAgent.getGsmc());
|
|
@@ -136,6 +138,10 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
wmDaAgent.setDeptId(String.valueOf(list.get(0).getDeptId()));
|
|
|
wmDaAgentMapper.updateById(wmDaAgent);
|
|
|
}
|
|
|
+
|
|
|
+ // 初始化企业限制信息
|
|
|
+ taskSubmissionRuleService.initDeptTaskSubmissionRule(Collections.singleton(Integer.valueOf(wmDaAgent.getDeptId())), deptId);
|
|
|
+
|
|
|
List<SysDeptRelation> newList = new ArrayList<>();
|
|
|
SysDeptRelation sysDeptRelation = new SysDeptRelation();
|
|
|
sysDeptRelation.setAncestor(SecurityUtils.getUser().getDeptId());
|
|
@@ -160,6 +166,10 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
wmDaAgent.setDeptId(String.valueOf(list.get(0).getDeptId()));
|
|
|
wmDaAgentMapper.updateById(wmDaAgent);
|
|
|
}
|
|
|
+
|
|
|
+ // 初始化企业限制信息
|
|
|
+ taskSubmissionRuleService.initDeptTaskSubmissionRule(Collections.singleton(Integer.valueOf(wmDaAgent.getDeptId())), deptId);
|
|
|
+
|
|
|
List<SysDeptRelation> newList = new ArrayList<>();
|
|
|
SysDeptRelation sysDeptRelation = new SysDeptRelation();
|
|
|
sysDeptRelation.setAncestor(SecurityUtils.getUser().getDeptId());
|
|
@@ -172,8 +182,6 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
return sysDeptRelationService.saveBatch(newList);
|
|
|
}
|
|
|
|
|
|
- // 初始化企业限制信息
|
|
|
- taskSubmissionRuleService.initDeptTaskSubmissionRule(Collections.singleton(Integer.valueOf(wmDaAgent.getDeptId())), SecurityUtils.getUser().getDeptId());
|
|
|
}
|
|
|
return false;
|
|
|
}
|