Commit e4d99c34 authored by zhangyingbin's avatar zhangyingbin

项目立项流程修改

parent c9ee68e2
......@@ -64,10 +64,10 @@ public class ProblemInitiationServiceImpl {
@Value("${params.work.flow.problemDefinitionKey}")
private String problemDefinitionKey;
@Value("supervisionRoleId")
@Value("${supervisionRoleId}")
private String supervisionRoleId;
@Value("installationRoleId")
@Value("${installationRoleId}")
private String installationRoleId;
public String start(QualityProblem qualityProblem) {
......@@ -192,15 +192,17 @@ public class ProblemInitiationServiceImpl {
public void sendMessage(Long sequenceNbr,String noticeUnitId,HashMap<String, String> smsParams,String smsCode,String roleId){
//向noticeUnitId的部门发送短信
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,来发短信、存短信日志。
for (AgencyUserModel agencyUserModel : agencyUserModelList) {
boolean bool = false;
List<CompanyModel> companyModelList = agencyUserModel.getCompanys();
for (CompanyModel companyModel : companyModelList) {
bool = companyModel.getSequenceNbr().equals(noticeUnitId);
if(bool){
break;
}
if(!ValidationUtil.isEmpty(map.get(agencyUserModel.getUserId()))){
bool = true;
}
if (bool) {
......@@ -224,8 +226,8 @@ public class ProblemInitiationServiceImpl {
InstallNoticeMsg installNoticeMsg = new InstallNoticeMsg();
installNoticeMsg.setContent(smsRecordModel.getSmsContent());
installNoticeMsg.setInstallNoticeId(smsRecordModel.getSequenceNbr());
installNoticeMsg.setTargetUnitId(Long.valueOf(smsRecordModel.getAgencyCode()));
installNoticeMsg.setTargetPersonId(Long.valueOf(agencyUserModel.getUserId()));
installNoticeMsg.setTargetUnitId(Long.valueOf(noticeUnitId));
installNoticeMsg.setTargetPersonId(orgUsrServiceImpl.getOne(wrapperQueryWrapper).getSequenceNbr());
installNoticeMsg.setSendTime(smsRecordModel.getSendTime());
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