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

作战指挥处置记录预览

parent e033264c
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author litw
* @date 2021-11-26.
*/
@Data
public class AlertCallCommandDto {
@ApiModelProperty(value = "名称")
String name;
@ApiModelProperty(value = "职务")
String duty;
}
......@@ -113,4 +113,7 @@ public class AlertCalledDto extends BaseDto{
private String systemSource;
@ApiModelProperty(value = "系统来源code")
private String systemSourceCode;
@ApiModelProperty(value = "处置记录url")
private String recordUrl;
}
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author ltw
* @date 2021-11-25.
*/
@Data
public class AlertCalledMobDto {
@ApiModelProperty(value = "力量调派")
List<AlertCalledPowerInfoDto> alertCalledPowerInfoDtoList;
@ApiModelProperty(value = "指挥力量")
List<AlertCallCommandDto> alertCallCommandDtoList;
@ApiModelProperty(value = "年度")
String year;
@ApiModelProperty(value = "灾害单位")
String unit;
@ApiModelProperty(value = "详细地址")
String address;
@ApiModelProperty(value = "警情类型")
String alertType;
@ApiModelProperty(value = "来源类型")
String sourceType;
@ApiModelProperty(value = "报警人姓名")
String reportName;
@ApiModelProperty(value = "联系电话")
String conectPhone;
@ApiModelProperty(value = "接警时间")
String callTime;
@ApiModelProperty(value = "出动时间")
String toTime;
@ApiModelProperty(value = "到场时间")
String arriveTime;
@ApiModelProperty(value = "控制时间")
String controlTime;
@ApiModelProperty(value = "结束时间")
String endTime;
}
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author litw
* @date 2021-11-25.
*/
@Data
public class AlertCalledPowerInfoDto {
@ApiModelProperty(value = "队站")
String station;
@ApiModelProperty(value = "到场时间")
String arriveTime;
@ApiModelProperty(value = "车辆名称")
String carName;
@ApiModelProperty(value = "参战人数")
String personNum;
@ApiModelProperty(value = "水")
String water;
@ApiModelProperty(value = "泡沫")
String foam;
@ApiModelProperty(value = "干粉")
String dryPowder;
@ApiModelProperty(value = "其他")
String other;
@ApiModelProperty(value = "第一次出动调派车辆数量")
String disatchNum;
}
......@@ -104,7 +104,8 @@ public class AlertCalled extends BaseEntity {
@ApiModelProperty(value = "备注信息")
private String remark;
@ApiModelProperty(value = "处置记录url")
private String recordUrl;
......
......@@ -2,10 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedZHDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedExtDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedSMSDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedZHDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -57,4 +57,9 @@ public interface AlertSubmittedMapper extends BaseMapper<AlertSubmitted> {
Map<String, Integer> getUseNum(@Param("id") Long id);
List<Map<String, Object>> getFirst(@Param("alertId") Long alertId);
List<Map<String, Object>> getOther(@Param("alertId") Long alertId);
}
......@@ -131,6 +131,40 @@
a.alert_called_id = ${id}
</select>
<select id="getFirst" resultType="Map">
SELECT distinct
a.rec_date recDate ,
b.company_name companyName,
c.resources_name carName,
c.resources_num carNum,
c.resources_id id
FROM
jc_power_transfer a
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
LEFT JOIN jc_power_transfer_company_resources c ON c.power_transfer_company_id = b.sequence_nbr
where a.sequence_nbr = (select sequence_nbr from jc_power_transfer where alert_called_id
= #{alertId}
order by rec_date asc limit 1)
</select>
<select id="getOther" resultType="Map">
SELECT distinct
a.rec_date recDate ,
b.company_name companyName,
c.resources_name carName,
c.resources_num carNum,
c.resources_id id
FROM
jc_power_transfer a
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
LEFT JOIN jc_power_transfer_company_resources c ON c.power_transfer_company_id = b.sequence_nbr
where a.sequence_nbr = (select sequence_nbr from jc_power_transfer where alert_called_id
= #{alertId}
order by rec_date asc limit 1,100)
</select>
......
......@@ -49,6 +49,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.*;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -689,6 +690,17 @@ public class CommandController extends BaseController {
return ResponseHelper.buildResponse(iAlertCalledService.selectAlertCalledcount(id));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "下载附件", notes = "下载附件")
@PostMapping(value = "/downLoad")
public void downLoad(@RequestBody List<String> path, HttpServletResponse response){
try {
IOUtils.copy(new FileInputStream(readUrl + path.get(0)), response.getOutputStream());
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* * @param null
*
......
......@@ -20,6 +20,31 @@
<artifactId>amos-boot-module-common-biz</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>com.deepoove</groupId>
<artifactId>poi-tl</artifactId>
<version>1.6.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.spire</groupId>-->
<!-- <artifactId>Spire.Doc</artifactId>-->
<!-- <version>1.0.0</version>-->
<!-- </dependency>-->
</dependencies>
</project>
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
......@@ -39,6 +40,9 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -258,6 +262,29 @@ public class AlertSubmittedController extends BaseController {
return ResponseHelper.buildResponse(schedulingContent);
}
/**
* 获取警情续报内容
*
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/alert_submitted/ddd", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取警情续报内容和模板", notes = "获取警情续报内容和模板")
public ResponseModel<Object> getAlertSubmittedContentDD() {
try {
AlertCalledFormDto alertCalledFormDto = (AlertCalledFormDto)alertCalledService.selectAlertCalledByIdNoRedis(1455815417061728258L);
alertSubmittedService.generateMob(alertCalledFormDto.getAlertCalled());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
return ResponseHelper.buildResponse(null);
}
private String getTaskInformation(String content, Map<String, String> definitions) {
int size = definitions.size();
String[] keys = definitions.keySet().toArray(new String[size]);
......
......@@ -57,7 +57,7 @@ public class ESAlertCalledService {
public void init() throws Exception
{
//初始化ES,重建索引
initEs();
//initEs();
}
/**
......
......@@ -2298,5 +2298,17 @@
</sql>
</changeSet> -->
<changeSet author="litw" id="2021-11-29-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="jc_alert_called" columnName="record_url"/>
</not>
</preConditions>
<comment>update data jc_alert_called</comment>
<sql>
ALTER TABLE jc_alert_called ADD record_url varchar(200) null COMMENT '处置记录URL';
</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