Commit e297e5da authored by 李腾威's avatar 李腾威

融合调度短信模板与详情及短信信息不一致处理

parent 494e3ce4
......@@ -277,7 +277,7 @@ public class AlertSubmittedController extends BaseController {
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "无" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "无" : alertCalled.getContactPhone());
String companyName = JSONObject.parseObject(schedulingContent.getSubmissionContent()).getString("$companyName") ;
String companyName = JSONObject.parseObject(schedulingContent.getSubmissionContent()).getString("companyName") ;
definitions.put("$companyName", null == companyName ? "" : companyName);
......
......@@ -304,9 +304,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Override
public Boolean save(AlertSubmittedDto alertSubmittedDto, String userName) throws Exception {
try {
String company = ValidationUtil.isEmpty(alertSubmittedDto.getSubmitContent().get("companyName")) ? "" : alertSubmittedDto.getSubmitContent().get("companyName").toString() ;
Map<String,String> map = saveAlertSubmitted(alertSubmittedDto, userName);
// 组装规则入参
AlertCalled alertCalled = alertCalledService.getById(alertSubmittedDto.getAlertCalledId());
alertCalled.setCompanyName(company);
// if(AlertBusinessTypeEnum.警情结案.getCode().equals(alertSubmittedDto.getBusinessTypeCode())) {
//// alertCalled.setEndTimeStr()
//// }
AlertCalledObjsDto alertCalledVo = (AlertCalledObjsDto) alertCalledService.selectAlertCalledByIdNoRedisNew(alertCalled.getSequenceNbr());
alertCalledVo.setAlertCalled(alertCalled);
......@@ -519,14 +526,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
smsParams.put("callTimeStr", calledRo.getCallTimeStr());
smsParams.put("address", calledRo.getAddress());
smsParams.put("fireLocation", calledRo.getFireLocation());
smsParams.put("endTimeStr", DateUtils.convertDateToString(alertCalled.getRecDate(),DateUtils.DATE_TIME_PATTERN));
smsParams.put("burningMaterial", calledRo.getBurningMaterial());
smsParams.put("fireSituation", calledRo.getFireSituation());
smsParams.put("trappedNum", calledRo.getTrappedNum());
smsParams.put("casualtiesNum", calledRo.getCasualtiesNum());
smsParams.put("dangerousExplosives", calledRo.getDangerousExplosives());
smsParams.put("companyName", calledRo.getCompanyName());
smsParams.put("contactUser", calledRo.getContactUser());
smsParams.put("contactPhone", calledRo.getContactPhone());
smsParams.put("contactUser", alertCalled.getContactUser());
smsParams.put("contactPhone", alertCalled.getContactPhone());
smsParams.put("replaceContent", calledRo.getReplaceContent());
smsParams.put("alertType", calledRo.getAlertType());
smsParams.put("feedback", calledRo.getFeedback());
......@@ -1169,7 +1177,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions.put("$callTime", DateUtils.dateTimeToDateString(alertCalled.getCallTime()));
definitions.put("$replaceContent",replaceContent);
definitions.put("$address",alertCalled.getAddress());
definitions.put("$recDate", DateUtils.convertDateToString(alertCalled.getRecDate(), DateUtils.DATE_TIME_PATTERN));
definitions.put("$contactUser",alertCalled.getContactUser());
definitions.put("$contactPhone",alertCalled.getContactPhone());
definitions.put("$recDate", DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN));
String content = getTaskInformation( template.getContent(),definitions);
template.setContent(content);
TemplateDto templateDto = new TemplateDto();
......
......@@ -2398,5 +2398,51 @@
ALTER TABLE `cb_contract` MODIFY COLUMN org_code VARCHAR(10) DEFAULT NULL COMMENT '机构代码用于权限过滤';
</sql>
</changeSet>
<changeSet author="litengwei" id="2021-11-29-litengwei-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="jc_template" />
</preConditions>
<comment>update data jc_template</comment>
<sql>
update
`jc_template` jc
set
content = '<![CDATA[<p>【警情续报】<span contenteditable="true" data-name="editContent" data-type="input"></span><p>相关警情:时间:$callTime 地点: $address 发生$type 警情 $replaceContent 被困人数:<span contenteditable="true" data-name="trappedNum" data-type="input"></span>;伤亡人数:<span contenteditable="true" data-name="casualtiesNum" data-type="input"></span>;<p>发送单位:<span contentEditable data-name="companyName" data-type="input"></span></p><p>联系人:$contactUser 联系电话:$contactPhone < /p> ]]>'
where jc.type_code = '313'
</sql>
</changeSet>
<changeSet author="litengwei" id="2021-11-29-litengwei-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="jc_template" />
</preConditions>
<comment>update data jc_template</comment>
<sql>
update
jc_template jc
set
content = '<![CDATA[<p>【非警情确认】根据现场反馈信息、视频监控信息和消防物联监控信息,判断 【时间:$callTime 地点: $address 发生$type 警情 $replaceContent ;被困人数:<span contenteditable="true" data-name="trappedNum" data-type="input"></span>;伤亡人数:<span contenteditable="true" data-name="casualtiesNum" data-type="input"></span>; 】 为非警情,请个单位、部门尽快 进行恢复到日常执勤状态。</p><p>发送单位:<span contenteditable="true" data-name="companyName" data-type="input"></span></p><p>联系人:$contactUser 联系电话:$contactPhone < /p>]]>'
where
jc.type_code = '314'
</sql>
</changeSet>
<changeSet author="litengwei" id="2021-11-29-litengwei-3">
<preConditions onFail="MARK_RAN">
<tableExists tableName="jc_template" />
</preConditions>
<comment>update data jc_template</comment>
<sql>
update
jc_template jc
set
content = '<![CDATA[<p>【警情结案】当前警情已于<span contenteditable="true" data-name="recDate" data-type="input"></span> 当前警情已经结案。</p>相关警情:时间:$callTime 地点: $address 发生$type 警情 $replaceContent;被困人数:<span contenteditable="true" data-name="trappedNum" data-type="input"></span>;伤亡人数:<span contenteditable="true" data-name="casualtiesNum" data-type="input"></span>;<p>发送单位:<span contentEditable data-name="companyName" data-type="input"></span></p><p>联系人:$contactUser 联系电话:$contactPhone < /p>]]>'
where
jc.type_code = '315'
</sql>
</changeSet>
</databaseChangeLog>
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