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

警情结案短信模板修改

parent 6ed0e8e5
......@@ -268,15 +268,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Map<String, String> definitions = new HashMap<>();
definitions.put("$type",alertCalled.getAlertType());
definitions.put("$callTime", DateUtils.dateTimeToDateString(alertCalled.getCallTime()));
definitions.put("$callTime", DateUtils.convertDateToString(alertCalled.getCallTime(),DateUtils.DATE_TIME_PATTERN));
definitions.put("$replaceContent",replaceContent);
definitions.put("$address",ValidationUtil.isEmpty(alertCalled.getAddress()) ? "" : alertCalled.getAddress());
definitions.put("$address",ValidationUtil.isEmpty(alertCalled.getAddress()) ? "" : alertCalled.getAddress());
definitions.put("$recDate",DateUtils.dateTimeToDateString(alertCalled.getRecDate()));
definitions.put("$contactUser",ValidationUtil.isEmpty(alertCalled.getContactUser()) ? "" : alertCalled.getContactUser());
definitions.put("$trappedNum",ValidationUtil.isEmpty(alertCalledRo.getTrappedNum()) ? "" : String.valueOf(alertCalled.getTrappedNum()));
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone());
definitions.put("$contactUser",ValidationUtil.isEmpty(alertCalled.getContactUser()) ? "" : alertCalled.getContactUser());
definitions.put("$trappedNum",ValidationUtil.isEmpty(alertCalledRo.getTrappedNum()) ? "" : String.valueOf(alertCalled.getTrappedNum()));
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone());
String companyName = JSONObject.parseObject(alertSubmittedExtDto.getSubmissionContent()).getString("$companyName") ;
......@@ -607,6 +607,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
e -> e.getCode().equals(bussTypeCode));
alertSubmitted.setBusinessType(businessTypeEnum.get().getName());
alertSubmitted.setCallLogId(alertSubmittedDto.getCallLogId());
alertSubmitted.setRecDate(alertSubmittedDto.getRecDate());
alertSubmitted.setSubmissionMethodCode(alertSubmittedDto.getSubmissionMethodCode());
Optional<SubmissionMethodEnum> submissionMethodEnum = EnumsUtils.getEnumObject(SubmissionMethodEnum.class,
e -> e.getCode().equals(alertSubmittedDto.getSubmissionMethodCode()));
......@@ -1180,10 +1181,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions.put("$type",alertCalled.getAlertType());
definitions.put("$callTime", DateUtils.convertDateToString(alertCalled.getCallTime(),DateUtils.DATE_TIME_PATTERN));
definitions.put("$replaceContent",replaceContent);
definitions.put("$address",alertCalled.getAddress());
definitions.put("$contactUser",alertCalled.getContactUser());
definitions.put("$contactPhone",alertCalled.getContactPhone());
definitions.put("$recDate", DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN));
definitions.put("$address",ValidationUtil.isEmpty(alertCalled.getAddress()) ? "" : alertCalled.getAddress() );
definitions.put("$contactUser",ValidationUtil.isEmpty(alertCalled.getContactUser()) ? "" : alertCalled.getContactUser() );
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone() );
// definitions.put("$recDate", DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN));
if(alertCalled.getAlertStatus()) {
map.put("recDate",DateUtils.convertDateToString(alertCalled.getRecDate(), DateUtils.DATE_TIME_PATTERN));
} else {
map.put("recDate",DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN));
}
String content = getTaskInformation( template.getContent(),definitions);
template.setContent(content);
TemplateDto templateDto = new TemplateDto();
......
......@@ -2444,5 +2444,49 @@
</sql>
</changeSet>
<changeSet author="litengwei" id="2021-11-30-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-30-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-30-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