Commit be660763 authored by zhangsen's avatar zhangsen

fix- 增加自定义指令表, 增加自定义指令信息:实战指挥需求【1575】

隐患管理页面查询API修改调整
parent d03aa7ec
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
import java.util.Map;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_situation_detail")
@ApiModel(value="AlertCalled对象", description="警情接警记录")
public class JcSituationDetail extends BaseEntity {
@ApiModelProperty(value = "报送内容")
private String info;
@ApiModelProperty(value = "类型")
private String infoType = "指令下发";
@ApiModelProperty(value = "警情ID")
private Long alertCalledId;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.JcSituationDetail;
public interface JcSituationDetailMapper extends BaseMapper<JcSituationDetail> {
}
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Objects;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.entity.JcSituationDetail;
import com.yeejoin.amos.boot.module.jcs.api.mapper.JcSituationDetailMapper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -22,6 +26,8 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferCompanySer ...@@ -22,6 +26,8 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferCompanySer
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
/** /**
...@@ -38,6 +44,12 @@ public class PowerTransferCompanyController extends BaseController { ...@@ -38,6 +44,12 @@ public class PowerTransferCompanyController extends BaseController {
@Autowired @Autowired
PowerTransferCompanyServiceImpl powerTransferCompanyService; PowerTransferCompanyServiceImpl powerTransferCompanyService;
@Autowired
SourceFileServiceImpl sourceFileService;
@Autowired
JcSituationDetailMapper jcSituationDetailMapper;
/** /**
* 新增调派单位 * 新增调派单位
* *
...@@ -139,5 +151,25 @@ public class PowerTransferCompanyController extends BaseController { ...@@ -139,5 +151,25 @@ public class PowerTransferCompanyController extends BaseController {
page = powerTransferCompanyService.page(pageBean, powerTransferCompanyQueryWrapper); page = powerTransferCompanyService.page(pageBean, powerTransferCompanyQueryWrapper);
return page; return page;
} }
/**
* 新增文字信息图片信息
*
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jcSituationDetail/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增文字信息图片信息", notes = "新增文字信息图片信息")
public ResponseModel<Boolean> saveJcSituationDetail(@RequestBody JcSituationDetail jcSituationDetail) {
if (Objects.isNull(jcSituationDetail.getAlertCalledId())) {
}
jcSituationDetailMapper.insert(jcSituationDetail);
// if (ObjectUtils.isNotEmpty(jcSituationDetail.getAttachments())) {
// sourceFileService.saveAttachments(jcSituationDetail.getSequenceNbr(), jcSituationDetail.getAttachments());
// }
return ResponseHelper.buildResponse(Boolean.TRUE);
}
} }
...@@ -32,6 +32,9 @@ import java.util.stream.IntStream; ...@@ -32,6 +32,9 @@ import java.util.stream.IntStream;
import com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto; import com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto;
import com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl; import com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl;
import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import com.yeejoin.amos.boot.module.jcs.api.entity.*;
import com.yeejoin.amos.boot.module.jcs.api.mapper.JcSituationDetailMapper;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.XWPFTable; import org.apache.poi.xwpf.usermodel.XWPFTable;
...@@ -113,10 +116,6 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto; ...@@ -113,10 +116,6 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto; import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto; import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.VoiceRecordFileDto; import com.yeejoin.amos.boot.module.jcs.api.dto.VoiceRecordFileDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmittedObject;
import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums;
...@@ -214,6 +213,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -214,6 +213,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
private FrontlineLiaisonServiceImpl frontlineLiaisonServiceImpl; private FrontlineLiaisonServiceImpl frontlineLiaisonServiceImpl;
@Autowired
JcSituationDetailMapper jcSituationDetailMapper;
@Value("${mqtt.topic.command.alert.noticeJa}") @Value("${mqtt.topic.command.alert.noticeJa}")
private String topicJa; private String topicJa;
...@@ -1434,6 +1436,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -1434,6 +1436,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
listInstructionsZHDto.add(instruct); listInstructionsZHDto.add(instruct);
}); });
//增加自定义指令信息:实战指挥需求【1575】
LambdaQueryWrapper<JcSituationDetail> qw = new LambdaQueryWrapper();
qw.eq(JcSituationDetail::getAlertCalledId, id);
List<JcSituationDetail> jcSituationDetailList = jcSituationDetailMapper.selectList(qw);
jcSituationDetailList.stream().forEach(item -> {
InstructionsZHDto instructionsZHDto = new InstructionsZHDto();
instructionsZHDto.setSequenceNbr(item.getSequenceNbr());
instructionsZHDto.setType(item.getInfoType());
instructionsZHDto.setContent(item.getInfo());
instructionsZHDto.setSubmissionTime(item.getRecDate());
listInstructionsZHDto.add(instructionsZHDto);
});
// ;
//排序时间倒序 //排序时间倒序
/* Bug 2613 修改排序 按照发送时间排序 2021-09-01 陈召 开始*/ /* Bug 2613 修改排序 按照发送时间排序 2021-09-01 陈召 开始*/
Collections.sort(listInstructionsZHDto, new Comparator<InstructionsZHDto>() { Collections.sort(listInstructionsZHDto, new Comparator<InstructionsZHDto>() {
......
...@@ -2899,5 +2899,27 @@ ...@@ -2899,5 +2899,27 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zs" id="2022-05-31-01">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="jc_situation_detail"/>
</not>
</preConditions>
<comment>增加自定义指令表</comment>
<sql>
CREATE TABLE `jc_situation_detail` (
`sequence_nbr` bigint(20) NOT NULL AUTO_INCREMENT,
`info` longtext COMMENT '内容图片信息',
`alert_called_id` bigint(20) DEFAULT NULL COMMENT '警情ID',
`rec_date` datetime DEFAULT NULL COMMENT '时间',
`rec_user_id` varchar(19) DEFAULT NULL COMMENT '发送人',
`rec_user_name` varchar(15) DEFAULT NULL COMMENT '发送人名称',
`is_delete` bit(1) NOT NULL COMMENT '是否删除',
`info_type` varchar(255) DEFAULT NULL COMMENT '消息类型',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -1041,8 +1041,8 @@ ...@@ -1041,8 +1041,8 @@
<if test="key == 'endDeadline' and value != null and value != ''"> <if test="key == 'endDeadline' and value != null and value != ''">
and a.reform_limit_date <![CDATA[ <= ]]> #{value} and a.reform_limit_date <![CDATA[ <= ]]> #{value}
</if> </if>
<if test="key == 'pointName' and value != null and value != ''"> <if test="key == 'pointId' and value != null and value != ''">
and a.biz_info like concat('%"pointName":"', #{value}, '"%') and a.biz_info like concat('%"pointId":"', #{value}, '"%')
</if> </if>
</foreach> </foreach>
</where> </where>
......
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