Commit e4d99c34 authored by zhangyingbin's avatar zhangyingbin

项目立项流程修改

parent c9ee68e2
...@@ -64,10 +64,10 @@ public class ProblemInitiationServiceImpl { ...@@ -64,10 +64,10 @@ public class ProblemInitiationServiceImpl {
@Value("${params.work.flow.problemDefinitionKey}") @Value("${params.work.flow.problemDefinitionKey}")
private String problemDefinitionKey; private String problemDefinitionKey;
@Value("supervisionRoleId") @Value("${supervisionRoleId}")
private String supervisionRoleId; private String supervisionRoleId;
@Value("installationRoleId") @Value("${installationRoleId}")
private String installationRoleId; private String installationRoleId;
public String start(QualityProblem qualityProblem) { public String start(QualityProblem qualityProblem) {
...@@ -192,15 +192,17 @@ public class ProblemInitiationServiceImpl { ...@@ -192,15 +192,17 @@ public class ProblemInitiationServiceImpl {
public void sendMessage(Long sequenceNbr,String noticeUnitId,HashMap<String, String> smsParams,String smsCode,String roleId){ public void sendMessage(Long sequenceNbr,String noticeUnitId,HashMap<String, String> smsParams,String smsCode,String roleId){
//向noticeUnitId的部门发送短信 //向noticeUnitId的部门发送短信
List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId(roleId,null).getResult(); List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId(roleId,null).getResult();
List<AgencyUserModel> companyUserModelList = Privilege.agencyUserClient.queryByCompanyId(Long.valueOf(noticeUnitId),null,null,null).getResult();
Map<String,AgencyUserModel> map = new HashMap<>();
for (AgencyUserModel agencyUserModel : companyUserModelList) {
map.put(agencyUserModel.getUserId(), agencyUserModel);
}
//遍历用户List,拿到用户手机号、userId,来发短信、存短信日志。 //遍历用户List,拿到用户手机号、userId,来发短信、存短信日志。
for (AgencyUserModel agencyUserModel : agencyUserModelList) { for (AgencyUserModel agencyUserModel : agencyUserModelList) {
boolean bool = false; boolean bool = false;
List<CompanyModel> companyModelList = agencyUserModel.getCompanys(); if(!ValidationUtil.isEmpty(map.get(agencyUserModel.getUserId()))){
for (CompanyModel companyModel : companyModelList) { bool = true;
bool = companyModel.getSequenceNbr().equals(noticeUnitId);
if(bool){
break;
}
} }
if (bool) { if (bool) {
...@@ -224,8 +226,8 @@ public class ProblemInitiationServiceImpl { ...@@ -224,8 +226,8 @@ public class ProblemInitiationServiceImpl {
InstallNoticeMsg installNoticeMsg = new InstallNoticeMsg(); InstallNoticeMsg installNoticeMsg = new InstallNoticeMsg();
installNoticeMsg.setContent(smsRecordModel.getSmsContent()); installNoticeMsg.setContent(smsRecordModel.getSmsContent());
installNoticeMsg.setInstallNoticeId(smsRecordModel.getSequenceNbr()); installNoticeMsg.setInstallNoticeId(smsRecordModel.getSequenceNbr());
installNoticeMsg.setTargetUnitId(Long.valueOf(smsRecordModel.getAgencyCode())); installNoticeMsg.setTargetUnitId(Long.valueOf(noticeUnitId));
installNoticeMsg.setTargetPersonId(Long.valueOf(agencyUserModel.getUserId())); installNoticeMsg.setTargetPersonId(orgUsrServiceImpl.getOne(wrapperQueryWrapper).getSequenceNbr());
installNoticeMsg.setSendTime(smsRecordModel.getSendTime()); installNoticeMsg.setSendTime(smsRecordModel.getSendTime());
installNoticeMsgService.save(installNoticeMsg); installNoticeMsgService.save(installNoticeMsg);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment