Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 10 months ago
parent
commit
41097c1a93
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  2. 39
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -377,7 +377,7 @@
LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number
LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id
where ldslNew.is_deleted = 0
AND ldslNew.warehouse_id=#{warehouseId}

39
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java

@ -316,33 +316,58 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
IndicatorsEntity indicatorsEntity = Func.copy(instanceofDTO, IndicatorsEntity.class);
assert indicatorsEntity != null;
indicatorsEntity.setIndicatorsStatus(1);
// indicatorsEntity.setAssessUserId(user.getUserId());
// indicatorsEntity.setAssessDeptName(user.getNickName());
// 增加当前选择部门的负责人
R<List<User>> listR = userClient.userInfoByDept(user.getTenantId(), instanceofDTO.getAssessDept());
log.info(">>>>>>>>>>>>> listR {}",listR);
Long userId=null;
String userName=null;
if(listR.isSuccess()){
Dept dept = deptClient.findEntityById(instanceofDTO.getAssessDept());
List<User> data = listR.getData();
// 获取仓库经理ID
R<String> roleIs = sysClient.getRoleIds(user.getTenantId(), "仓库经理");
R<String> roleIs;
if(dept.getDeptCategory()==4){
// 获取仓库经理ID
roleIs = sysClient.getRoleIds(user.getTenantId(), "仓库经理");
}else if(dept.getDeptCategory()==5){
roleIs = sysClient.getRoleIds(user.getTenantId(), "总部职能");
}else{
roleIs= new R<>();
roleIs.setSuccess(false);
log.error(">>>>>>>>>>>>> 考核部门获取失败");
}
log.info(">>>>>>>>>>>>> roleIs {}",roleIs);
if(roleIs.isSuccess()){
String roleId = roleIs.getData();
for (User datum : data) {
log.info(">>>>>> women datum {}",datum);
log.info(">>>>>> 寻找考核节点负责人 {}",datum);
if(datum.getRoleId().contains(roleId)){
userId=datum.getId();
userName=datum.getRealName();
}
}
}
}
if(ObjectUtil.isEmpty(userId)){
return R.fail(403,"选择节点不存在仓库负责人");
return R.fail(403,"选择节点不存在负责人");
}
indicatorsEntity.setAssessUserId(userId);
indicatorsEntity.setAssessUserName(userName);

Loading…
Cancel
Save