|
@@ -206,10 +206,12 @@ public class ContractMessageServiceImpl implements ContractMessageService {
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(project.getXsryId())) {
|
|
|
dingApi.sendMessage(new DingMessageDto(project.getXsryId(), content));
|
|
|
- CommonResult<DeptRespDTO> xsDeptRes = deptApi.getDept(project.getXsryId());
|
|
|
- DeptRespDTO xsDept = xsDeptRes.getCheckedData();
|
|
|
- if (xsDept != null && StringUtils.isNotBlank(xsDept.getLeaderUserId())) {
|
|
|
- dingApi.sendMessage(new DingMessageDto(xsDept.getLeaderUserId(), content));
|
|
|
+ CommonResult<List<DeptRespDTO>> deptsRes = deptApi.getDeptByUserId(project.getXsryId());
|
|
|
+ List<DeptRespDTO> depts = deptsRes.getCheckedData();
|
|
|
+ for (DeptRespDTO dept : depts) {
|
|
|
+ if(!dept.getLeaderUserId().equals(project.getXsryId())){
|
|
|
+ dingApi.sendMessage(new DingMessageDto(dept.getLeaderUserId(), content));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|