Commit 7caa6436 authored by zhangyingbin's avatar zhangyingbin

优化项目立项流程

parent c54856ab
...@@ -57,6 +57,9 @@ public class ProblemInitiationServiceImpl { ...@@ -57,6 +57,9 @@ public class ProblemInitiationServiceImpl {
@Autowired @Autowired
QualityProblemServiceImpl qualityProblemService; QualityProblemServiceImpl qualityProblemService;
@Autowired
InstallNoticeMsgServiceImpl installNoticeMsgService;
@Value("${params.work.flow.problemDefinitionKey}") @Value("${params.work.flow.problemDefinitionKey}")
private String problemDefinitionKey; private String problemDefinitionKey;
...@@ -200,24 +203,46 @@ public class ProblemInitiationServiceImpl { ...@@ -200,24 +203,46 @@ public class ProblemInitiationServiceImpl {
} }
} }
if (bool) { if (bool) {
LambdaQueryWrapper<OrgUsr> wrapperQueryWrapper = new LambdaQueryWrapper<>();
wrapperQueryWrapper.eq(OrgUsr::getAmosOrgId,agencyUserModel.getSequenceNbr());
SmsRecordModel smsRecordModel = sendSmsMassage(smsCode, agencyUserModel.getMobile(), smsParams); SmsRecordModel smsRecordModel = sendSmsMassage(smsCode, agencyUserModel.getMobile(), smsParams);
RectifyMsg rectifyMsg = new RectifyMsg();
if (ValidationUtil.isEmpty(smsRecordModel)) { if (ValidationUtil.isEmpty(smsRecordModel)) {
continue; continue;
} }
rectifyMsg.setContent(smsRecordModel.getSmsContent()); if(SMSEnum.项目安装告知申请.getCode().equals(smsCode) || SMSEnum.项目立项驳回短信.getCode().equals(smsCode)){
rectifyMsg.setProblemId(sequenceNbr); saveProjectSmsLog(smsRecordModel,sequenceNbr,noticeUnitId,agencyUserModel);
rectifyMsg.setNoticeUnitId(Long.valueOf(noticeUnitId)); }else {
rectifyMsg.setMsgReceiver(orgUsrServiceImpl.getOne(wrapperQueryWrapper).getSequenceNbr()); saveProblemSmsLog(smsRecordModel,sequenceNbr,noticeUnitId,agencyUserModel);
rectifyMsg.setSendTime(smsRecordModel.getSendTime()); }
rectifyMsgServiceImpl.save(rectifyMsg);
} }
} }
} }
public void saveProjectSmsLog(SmsRecordModel smsRecordModel,Long sequenceNbr,String noticeUnitId,AgencyUserModel agencyUserModel){
LambdaQueryWrapper<OrgUsr> wrapperQueryWrapper = new LambdaQueryWrapper<>();
wrapperQueryWrapper.eq(OrgUsr::getAmosOrgId,agencyUserModel.getSequenceNbr());
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.setSendTime(smsRecordModel.getSendTime());
installNoticeMsgService.save(installNoticeMsg);
}
public void saveProblemSmsLog(SmsRecordModel smsRecordModel,Long sequenceNbr,String noticeUnitId,AgencyUserModel agencyUserModel){
LambdaQueryWrapper<OrgUsr> wrapperQueryWrapper = new LambdaQueryWrapper<>();
wrapperQueryWrapper.eq(OrgUsr::getAmosOrgId,agencyUserModel.getSequenceNbr());
RectifyMsg rectifyMsg = new RectifyMsg();
rectifyMsg.setContent(smsRecordModel.getSmsContent());
rectifyMsg.setProblemId(sequenceNbr);
rectifyMsg.setNoticeUnitId(Long.valueOf(noticeUnitId));
rectifyMsg.setMsgReceiver(orgUsrServiceImpl.getOne(wrapperQueryWrapper).getSequenceNbr());
rectifyMsg.setSendTime(smsRecordModel.getSendTime());
rectifyMsgServiceImpl.save(rectifyMsg);
}
public SmsRecordModel sendSmsMassage(String smsCode, String mobile, HashMap<String, String> smsParams){ public SmsRecordModel sendSmsMassage(String smsCode, String mobile, HashMap<String, String> smsParams){
SmsRecordModel smsRecordModel = new SmsRecordModel(); SmsRecordModel smsRecordModel = new SmsRecordModel();
......
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