Commit df41994b authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents fbe6db89 26bb3fad
...@@ -241,4 +241,5 @@ public interface IOrgUsrService { ...@@ -241,4 +241,5 @@ public interface IOrgUsrService {
public List<OrgUsr> getPersonListByParentIds(List<String> ids) ; public List<OrgUsr> getPersonListByParentIds(List<String> ids) ;
List<OrgUsrFormDto> getUnSyncOrgCompanyList(List<Long> companyIdList);
} }
...@@ -20,13 +20,17 @@ public enum LatentDangerProcessStateEnum { ...@@ -20,13 +20,17 @@ public enum LatentDangerProcessStateEnum {
*/ */
待整改("待整改", "2"), 待整改("待整改", "2"),
/** /**
* 待整改资料提交
*/
待整改资料提交("待整改资料提交", "3"),
/**
* 待复核 * 待复核
*/ */
待复核("待复核", "3"), 待复核("待复核", "4"),
/** /**
* 治理完毕 * 治理完毕
*/ */
治理完毕("治理完毕", "4"); 治理完毕("治理完毕", "5");
/** /**
* 名称,描述 * 名称,描述
......
...@@ -79,7 +79,7 @@ public interface LatentDangerState { ...@@ -79,7 +79,7 @@ public interface LatentDangerState {
/** /**
* 整改完毕 * 整改完毕
*/ */
整改完毕("整改完毕", "endOfGovernance", "","", "4"); 整改完毕("整改完毕", "endOfGovernance", "","", "5");
/** /**
* 名称,描述 * 名称,描述
......
package com.yeejoin.amos.boot.module.tzs.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 接警记录导出
*/
@Data
@ApiModel(value="AlertCalledRecordDto", description="接警记录导出Dto类")
public class AlertCalledRecordDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "接警时间", index = 0)
@ApiModelProperty(value = "接警时间")
private Date callTime;
@ExcelProperty(value = "报警类型", index = 1)
@ApiModelProperty(value = "报警类型")
private String type;
@ExcelProperty(value = "警情来源", index = 2)
@ApiModelProperty(value = "警情来源")
private String alertSource;
@ExcelProperty(value = "警情类型", index = 3)
@ApiModelProperty(value = "警情类型")
private String alarmType;
@ExcelProperty(value = "警情地址", index = 4)
@ApiModelProperty(value = "警情地址")
private String address;
@ExcelIgnore
@ApiModelProperty(value = "接警开始时间")
private Date callTimeStart;
@ExcelIgnore
@ApiModelProperty(value = "接警结束时间")
private Date callTimeEnd;
}
...@@ -33,4 +33,10 @@ public class WechatMyBusinessListDto { ...@@ -33,4 +33,10 @@ public class WechatMyBusinessListDto {
@ApiModelProperty(value = "业务状态") @ApiModelProperty(value = "业务状态")
private String bussinessStatus; private String bussinessStatus;
@ApiModelProperty(value = "上报时间")
private Date reportTime;
@ApiModelProperty(value = "完成时间")
private Date finishTime;
} }
...@@ -32,4 +32,10 @@ public class WechatMyTaskListDto { ...@@ -32,4 +32,10 @@ public class WechatMyTaskListDto {
@ApiModelProperty(value = "派遣时间") @ApiModelProperty(value = "派遣时间")
private Date dispatchTime; private Date dispatchTime;
@ApiModelProperty(value = "上报时间")
private Date reportTime;
@ApiModelProperty(value = "完成时间")
private Date finishTime;
} }
...@@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto; import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto; import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto; import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -78,4 +81,20 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -78,4 +81,20 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
List<WechatMyBusinessListDto> getBussinessListByPhonePager(@Param("phone") String phone, @Param("bussinessCode") String bussinessCode, @Param("current") Long current); List<WechatMyBusinessListDto> getBussinessListByPhonePager(@Param("phone") String phone, @Param("bussinessCode") String bussinessCode, @Param("current") Long current);
/**
* 根据条件返回接警记录信息
* @param callTimeStart
* @param callTimeEnd
* @param type
* @param alertSource
* @param alarmType
* @return
*/
List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(
String callTimeStart,
String callTimeEnd,
String type,
String alertSource,
String alarmType);
} }
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto; import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto; import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
...@@ -76,4 +77,15 @@ public interface IAlertCalledService { ...@@ -76,4 +77,15 @@ public interface IAlertCalledService {
WechatMyBussinessDto getBussinessInfoById(Long alertId); WechatMyBussinessDto getBussinessInfoById(Long alertId);
List<WechatMyBusinessListDto> getBussinessListByPhonePager(String phone, String bussinessCode, Long current); List<WechatMyBusinessListDto> getBussinessListByPhonePager(String phone, String bussinessCode, Long current);
/**
* 根据条件筛选 接警记录
* @param callTimeStart
* @param callTimeEnd
* @param type
* @param alertSource
* @param alarmType
* @return
*/
List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart,String callTimeEnd, String type, String alertSource, String alarmType);
} }
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
a.device_id AS deviceId, a.device_id AS deviceId,
e.address AS e.address AS
elevatorAddress, elevatorAddress,
a.region_code AS address, a.address AS address,
a.alarm_type AS alertType, a.alarm_type AS alertType,
a.alert_source AS alertSource, a.alert_source AS alertSource,
a.alert_stage AS alertStage, a.alert_stage AS alertStage,
...@@ -227,8 +227,8 @@ ...@@ -227,8 +227,8 @@
#{emergencyTimeEnd} #{emergencyTimeEnd}
</if> </if>
<if test="workOrderNumber != null and workOrderNumber != ''"> <if test="workOrderNumber != null and workOrderNumber != ''">
and call_time <![CDATA[ <= ]]> and a.work_order_number like
#{endDate} CONCAT(CONCAT('%',#{workOrderNumber}),'%')
</if> </if>
<if test="emergencyCall != null and emergencyCall != ''"> <if test="emergencyCall != null and emergencyCall != ''">
AND a.emergency_call like AND a.emergency_call like
...@@ -471,7 +471,9 @@ ...@@ -471,7 +471,9 @@
a.alert_status as taskStatus, a.alert_status as taskStatus,
e.address, e.address,
a.call_time as dispatchTime, a.call_time as dispatchTime,
a.alert_stage as bussinessStatus a.alert_stage as bussinessStatus,
a.call_time as reportTime,
p.feedback_finish_time as finishTime
from tz_alert_called a from tz_alert_called a
LEFT JOIN tcb_elevator e on e.sequence_nbr = a.equipment_id LEFT JOIN tcb_elevator e on e.sequence_nbr = a.equipment_id
LEFT JOIN tz_dispatch_paper p on p.alert_id = a.sequence_nbr LEFT JOIN tz_dispatch_paper p on p.alert_id = a.sequence_nbr
...@@ -482,6 +484,42 @@ ...@@ -482,6 +484,42 @@
ORDER BY a.rec_date desc ORDER BY a.rec_date desc
limit #{current},5 limit #{current},5
</select> </select>
<select id="queryAlertRecordListByQueryDto" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto">
SELECT
a.call_time AS callTime,
a.type ,
a.alert_source AS alertSource,
a.alarm_type AS alarmType,
a.address
FROM
tz_alert_called a
LEFT JOIN tcb_elevator e ON e.sequence_nbr = a.equipment_id
WHERE 1=1
<if test="callTimeStart != null ">
and #{callTimeStart} <![CDATA[ <= ]]>
a.call_time
</if>
<if test="callTimeEnd != null ">
and a.call_time <![CDATA[ <= ]]>
#{callTimeEnd}
</if>
<if test="type != null and type != ''">
and a.type = #{type}
</if>
<if test="alertSource != null and alertSource != ''">
AND a.alert_source = #{alertSource}
</if>
<if test="alarmType != null and alarmType != ''">
AND a.alarm_type = #{alarmType}
</if>
</select>
</mapper> </mapper>
...@@ -78,7 +78,9 @@ ...@@ -78,7 +78,9 @@
a.alarm_type as taskType, a.alarm_type as taskType,
a.alert_status as taskStatus, a.alert_status as taskStatus,
e.address, e.address,
p.dispatch_time as dispatch_time p.dispatch_time as dispatch_time,
a.call_time as reportTime,
p.feedback_finish_time as finishTime
from tz_dispatch_task t from tz_dispatch_task t
LEFT JOIN tz_alert_called a on a.sequence_nbr = t.alert_id LEFT JOIN tz_alert_called a on a.sequence_nbr = t.alert_id
LEFT JOIN tcb_elevator e on e.sequence_nbr = a.equipment_id LEFT JOIN tcb_elevator e on e.sequence_nbr = a.equipment_id
......
...@@ -85,7 +85,12 @@ public class FireExpertsController extends BaseController { ...@@ -85,7 +85,12 @@ public class FireExpertsController extends BaseController {
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<FireExpertsDto> updateBySequenceNbrFireExperts(@RequestBody FireExpertsDto model, public ResponseModel<FireExpertsDto> updateBySequenceNbrFireExperts(@RequestBody FireExpertsDto model,
@PathVariable(value = "sequenceNbr") Long sequenceNbr) { @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
/*bug 3098 联动专家,编辑时领域选择子分类保存,领域数据未修改 chenzhao 2021-10-14 */
model.setSequenceNbr(sequenceNbr); model.setSequenceNbr(sequenceNbr);
String expertCode = model.getExpertCode();
DataDictionary zjly = dataDictionaryService.getByCode(expertCode, "ZJLY");
model.setExpert(zjly.getName());
/*bug 3098 联动专家,编辑时领域选择子分类保存,领域数据未修改 chenzhao 2021-10-14 */
return ResponseHelper.buildResponse(fireExpertsServiceImpl.updateWithModel(model)); return ResponseHelper.buildResponse(fireExpertsServiceImpl.updateWithModel(model));
} }
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.biz.controller; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto; import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireStation; import com.yeejoin.amos.boot.module.common.api.entity.FireStation;
...@@ -139,4 +140,18 @@ public class FireStationController extends BaseController { ...@@ -139,4 +140,18 @@ public class FireStationController extends BaseController {
public ResponseModel<List<FireStationDto>> selectForList() { public ResponseModel<List<FireStationDto>> selectForList() {
return ResponseHelper.buildResponse(fireStationServiceImpl.queryForFireStationList(false)); return ResponseHelper.buildResponse(fireStationServiceImpl.queryForFireStationList(false));
} }
/**
* 查询机场单位
*
* @return
* @throws Exception
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/company/listTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "查询机场单位树", notes = "查询机场单位树")
public ResponseModel<List<MenuFrom>> listCompanyTree() throws Exception {
List<MenuFrom> menus = fireStationServiceImpl.getCompanyTeamTree();
return ResponseHelper.buildResponse(menus);
}
} }
...@@ -159,6 +159,13 @@ public class FirefightersPostController extends BaseController { ...@@ -159,6 +159,13 @@ public class FirefightersPostController extends BaseController {
public ResponseModel<Object> updateByIdFirefightersPost(@RequestBody FirefightersDataDto firefightersDataDto) { public ResponseModel<Object> updateByIdFirefightersPost(@RequestBody FirefightersDataDto firefightersDataDto) {
try { try {
FirefightersPost firefightersPost = firefightersDataDto.getFirefightersPost(); FirefightersPost firefightersPost = firefightersDataDto.getFirefightersPost();
/*bug3101 编辑页面专家领域选择子分类保存成功后,领域未修改 2021-10-15 chenzhao */
if (firefightersDataDto.getFirefightersPost().getAreasExpertiseCode() != null){
String areasExpertiseCode = firefightersDataDto.getFirefightersPost().getAreasExpertiseCode();
DataDictionary zjly = dataDictionaryService.getByCode(areasExpertiseCode, "ZJLY");
firefightersDataDto.getFirefightersPost().setAreasExpertise(zjly.getName());
}
/*bug3101 编辑页面专家领域选择子分类保存成功后,领域未修改 2021-10-15 chenzhao */
iFirefightersPostService.updateById(firefightersPost); iFirefightersPostService.updateById(firefightersPost);
ifirefightersWorkexperienceService.updateById(firefightersDataDto.getFirefightersWorkexperience()); ifirefightersWorkexperienceService.updateById(firefightersDataDto.getFirefightersWorkexperience());
ifirefightersEducationService.updateById(firefightersDataDto.getFirefightersEducation()); ifirefightersEducationService.updateById(firefightersDataDto.getFirefightersEducation());
......
...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import org.apache.commons.beanutils.BeanUtils;
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.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -132,9 +133,11 @@ public class FirefightersThoughtController extends BaseController { ...@@ -132,9 +133,11 @@ public class FirefightersThoughtController extends BaseController {
if(redisUtils.hasKey(RedisKey.THOUGHT_ID+id)){ if(redisUtils.hasKey(RedisKey.THOUGHT_ID+id)){
Object obj= redisUtils.get(RedisKey.THOUGHT_ID+id); Object obj= redisUtils.get(RedisKey.THOUGHT_ID+id);
Map<String, Object> mainMap = Bean.BeantoMap(obj); ((Map<String,Object>) obj).put("attachments", sourceFileService.getAttachments(id));
/*Map<String, Object> mainMap = Bean.BeantoMap(obj);
mainMap.put("attachments", sourceFileService.getAttachments(id)); mainMap.put("attachments", sourceFileService.getAttachments(id));
return ResponseHelper.buildResponse(mainMap); return ResponseHelper.buildResponse(mainMap);*/
return ResponseHelper.buildResponse((Map<String,Object>) obj );
}else{ FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id); }else{ FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id);
redisUtils.set(RedisKey.THOUGHT_ID+id, JSON.toJSON(firefightersThought),time); redisUtils.set(RedisKey.THOUGHT_ID+id, JSON.toJSON(firefightersThought),time);
Map<String, Object> mainMap = Bean.BeantoMap(firefightersThought); Map<String, Object> mainMap = Bean.BeantoMap(firefightersThought);
......
...@@ -30,12 +30,15 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; ...@@ -30,12 +30,15 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -517,4 +520,16 @@ public class OrgUsrController extends BaseController { ...@@ -517,4 +520,16 @@ public class OrgUsrController extends BaseController {
public ResponseModel<AgencyUserModel> getAmosIdByOrgUserId(@PathVariable String orgUserId) throws Exception { public ResponseModel<AgencyUserModel> getAmosIdByOrgUserId(@PathVariable String orgUserId) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.getAmosIdByOrgUserId(orgUserId)); return ResponseHelper.buildResponse(iOrgUsrService.getAmosIdByOrgUserId(orgUserId));
} }
/**
* 根据单位id列表或未同步的机场单位列表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/unSync/orgCompany")
@ApiOperation(httpMethod = "GET", value = "将所有机场单位数据同步到消防监督服务p_point表", notes = "将所有机场单位数据同步到消防监督服务p_point表")
public ResponseModel getUnSyncOrgCompanyList(@RequestParam List<Long> companyIdList) {
return ResponseHelper.buildResponse(iOrgUsrService.getUnSyncOrgCompanyList(companyIdList));
}
} }
\ No newline at end of file
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import com.yeejoin.amos.boot.biz.common.constants.BizConstant; import com.yeejoin.amos.boot.biz.common.constants.BizConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils; import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
...@@ -31,10 +32,12 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourcePoolSer ...@@ -31,10 +32,12 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourcePoolSer
import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -50,9 +53,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -50,9 +53,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -90,8 +91,14 @@ public class WaterResourceController extends BaseController { ...@@ -90,8 +91,14 @@ public class WaterResourceController extends BaseController {
String resourceType = model.getResourceType(); String resourceType = model.getResourceType();
Optional<WaterResourceTypeEnum> resourceTypeEnum = EnumsUtils.getEnumObject(WaterResourceTypeEnum.class, Optional<WaterResourceTypeEnum> resourceTypeEnum = EnumsUtils.getEnumObject(WaterResourceTypeEnum.class,
e -> e.getCode().equals(resourceType)); e -> e.getCode().equals(resourceType));
/*bug 2913 截取名字防止传递文件名太长随机生成文件名保存 chenzhao 2021-09-30 start*/
List<Object> realityImgList = model.getRealityImgList();
realityImgList.forEach(i->{
((Map<String, Object>) i).put("name",QRCodeUtil.generateQRCode()+"."+i.toString().substring(i.toString().lastIndexOf(".") + 1).toLowerCase());
});
/*截取名字防止传递文件名太长随机生成文件名保存 chenzhao 2021-09-30 end*/
model.setResourceTypeName(resourceTypeEnum.get().getName()); model.setResourceTypeName(resourceTypeEnum.get().getName());
model.setRealityImg(JSONArray.toJSONString(model.getRealityImgList())); model.setRealityImg(JSONArray.toJSONString(realityImgList));
model.setOrientationImg(JSONArray.toJSONString(model.getOrientationImgList())); model.setOrientationImg(JSONArray.toJSONString(model.getOrientationImgList()));
/*2021-09-08 前端表示前端传递的address参数已经切割过,后端无需再切割获取 陈召 屏蔽代码 97-102行*/ /*2021-09-08 前端表示前端传递的address参数已经切割过,后端无需再切割获取 陈召 屏蔽代码 97-102行*/
/* if(model.getAddress()!=null){ /* if(model.getAddress()!=null){
......
...@@ -3,8 +3,12 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl; ...@@ -3,8 +3,12 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FireStation; import com.yeejoin.amos.boot.module.common.api.entity.FireStation;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
...@@ -14,6 +18,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireStationService; ...@@ -14,6 +18,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireStationService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition; import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator; import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -36,7 +41,8 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -36,7 +41,8 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
FireStationMapper fireStationMapper; FireStationMapper fireStationMapper;
@Autowired @Autowired
OrgUsrMapper orgUsrMapper; OrgUsrMapper orgUsrMapper;
@Autowired
OrgUsrServiceImpl orgUsrService;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -143,4 +149,28 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -143,4 +149,28 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
wrapper.select(FireStation::getSequenceNbr,FireStation::getName); wrapper.select(FireStation::getSequenceNbr,FireStation::getName);
return this.baseMapper.selectMaps(wrapper); return this.baseMapper.selectMaps(wrapper);
} }
/**
* 获取机场单位树
* chenzhao 2021-10-14
* @return
*/
public List<MenuFrom> getCompanyTeamTree() throws Exception {
MenuFrom root = new MenuFrom("-1", "微型消防站", null, null);
List<OrgUsr> companyDeptList = orgUsrService.selectCompanyList();
List<MenuFrom> companyDeptMenuList = Lists.newArrayList();
companyDeptList.forEach(o -> {
if (ValidationUtil.isEmpty(o.getParentId())) {
o.setParentId("-1");
}
companyDeptMenuList.add(new MenuFrom(o.getSequenceNbr().toString(), o.getBizOrgName(), o.getParentId(),
"1"));
});
List<MenuFrom> menuList = TreeParser.getTreexin("-1", companyDeptMenuList, MenuFrom.class.getName(), "getKey",
1, "getName", "getParentId", "getNodeType");
root.setChildren(menuList);
return Lists.newArrayList(root);
}
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
...@@ -43,6 +44,8 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; ...@@ -43,6 +44,8 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel; import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -77,6 +80,8 @@ import java.util.stream.Collectors; ...@@ -77,6 +80,8 @@ import java.util.stream.Collectors;
@Service @Service
public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapper> implements IOrgUsrService { public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapper> implements IOrgUsrService {
private final Logger logger = LoggerFactory.getLogger(OrgUsrServiceImpl.class);
private static final String TYPE = "PERSON,COMPANY"; private static final String TYPE = "PERSON,COMPANY";
private static final String CODE = "amosAccount"; private static final String CODE = "amosAccount";
...@@ -1709,4 +1714,23 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1709,4 +1714,23 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
return amosUser; return amosUser;
} }
@Override
public List<OrgUsrFormDto> getUnSyncOrgCompanyList(List<Long> companyIdList) {
LambdaQueryWrapper<OrgUsr> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.notIn(OrgUsr::getSequenceNbr, companyIdList).eq(OrgUsr::getIsDelete, false).eq(OrgUsr::getBizOrgType, "COMPANY");
List<OrgUsr> unSyncCompanyList = this.baseMapper.selectList(queryWrapper);
List<OrgUsrFormDto> allUnSyncCompanyList = Lists.newArrayList();
if (!ValidationUtil.isEmpty(unSyncCompanyList)) {
unSyncCompanyList.forEach(company -> {
try {
OrgUsrFormDto orgUsrFormDto = this.selectCompanyById(company.getSequenceNbr());
allUnSyncCompanyList.add(orgUsrFormDto);
} catch (Exception e) {
logger.info(e.getMessage());
}
});
}
return allUnSyncCompanyList;
}
} }
...@@ -147,7 +147,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -147,7 +147,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
private WorkflowFeignService workflowFeignService; private WorkflowFeignService workflowFeignService;
// 有启动后执行现场确认的角色名称 // 有启动后执行现场确认的角色名称
private String onSiteConfirmRole = "Person_charge_unit_fire_protection_supervision_inspection"; @Value("${onSite.confirm.roleName}")
private String onSiteConfirmRole;
@Autowired @Autowired
JcsFeignClient jcsFeignClient; JcsFeignClient jcsFeignClient;
...@@ -1156,7 +1157,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1156,7 +1157,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
RoleBo roleBo = reginParams.getRole(); RoleBo roleBo = reginParams.getRole();
if (!onSiteConfirmRole.equals(roleBo.getRoleName())) { if (!onSiteConfirmRole.equals(roleBo.getRoleName())) {
executeSubmitDto.setIsOk(false); executeSubmitDto.setIsOk(false);
executeSubmitDto.setMsg("没有权限执行"); executeSubmitDto.setMsg("没有执行权限");
return executeSubmitDto; return executeSubmitDto;
} }
// 2、开启工作流 // 2、开启工作流
......
...@@ -823,4 +823,15 @@ public class PointController extends AbstractBaseController { ...@@ -823,4 +823,15 @@ public class PointController extends AbstractBaseController {
return ResponseHelper.buildResponse(iPointService.getPlanExecuteTeams()); return ResponseHelper.buildResponse(iPointService.getPlanExecuteTeams());
} }
/**
* 修复历史数据(将所有机场单位数据同步到消防监督服务p_point表)
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "将所有机场单位数据同步到消防监督服务p_point表", notes = "将所有机场单位数据同步到消防监督服务p_point表")
@PutMapping(value = "/amos/temp/syncCompany")
public ResponseModel syncOrgCompany() {
return ResponseHelper.buildResponse(iPointService.syncOrgCompany());
}
} }
...@@ -171,4 +171,6 @@ public interface PointMapper extends BaseMapper { ...@@ -171,4 +171,6 @@ public interface PointMapper extends BaseMapper {
* @return * @return
*/ */
List<Point> getPointByPlanId(String planId); List<Point> getPointByPlanId(String planId);
List<Long> queryAllPointList();
} }
...@@ -4,6 +4,9 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult; ...@@ -4,6 +4,9 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/** /**
* @author DELL * @author DELL
...@@ -18,4 +21,11 @@ public interface JCSFeignClient { ...@@ -18,4 +21,11 @@ public interface JCSFeignClient {
*/ */
@GetMapping(value = "jcs/org-usr/getLoginUserDetails/{userId}") @GetMapping(value = "jcs/org-usr/getLoginUserDetails/{userId}")
FeignClientResult getUserUnit(@PathVariable String userId); FeignClientResult getUserUnit(@PathVariable String userId);
/**
* 查询所有未同步的机场单位
* @return ResponseModel
*/
@GetMapping(value = "jcs/org-usr/unSync/orgCompany")
FeignClientResult getUnSyncOrgCompanyList(@RequestParam List<Long> companyIdList);
} }
...@@ -20,6 +20,7 @@ import com.yeejoin.amos.supervision.business.dto.PointDto; ...@@ -20,6 +20,7 @@ import com.yeejoin.amos.supervision.business.dto.PointDto;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckPtListBo; import com.yeejoin.amos.supervision.business.entity.mybatis.CheckPtListBo;
import com.yeejoin.amos.supervision.business.feign.DangerFeignClient; import com.yeejoin.amos.supervision.business.feign.DangerFeignClient;
import com.yeejoin.amos.supervision.business.feign.EquipFeign; import com.yeejoin.amos.supervision.business.feign.EquipFeign;
import com.yeejoin.amos.supervision.business.feign.JCSFeignClient;
import com.yeejoin.amos.supervision.business.param.*; import com.yeejoin.amos.supervision.business.param.*;
import com.yeejoin.amos.supervision.business.service.intfc.IPointService; import com.yeejoin.amos.supervision.business.service.intfc.IPointService;
import com.yeejoin.amos.supervision.business.util.DaoCriteria; import com.yeejoin.amos.supervision.business.util.DaoCriteria;
...@@ -47,12 +48,14 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -47,12 +48,14 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root; import javax.persistence.criteria.Root;
import java.beans.Beans;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -111,6 +114,9 @@ public class PointServiceImpl implements IPointService { ...@@ -111,6 +114,9 @@ public class PointServiceImpl implements IPointService {
@Autowired @Autowired
private DangerFeignClient dangerFeignClient; private DangerFeignClient dangerFeignClient;
@Autowired
private JCSFeignClient jcsFeignClient;
private final int HTTP_OK_STATUS = 200; private final int HTTP_OK_STATUS = 200;
@Override @Override
...@@ -1242,4 +1248,17 @@ public class PointServiceImpl implements IPointService { ...@@ -1242,4 +1248,17 @@ public class PointServiceImpl implements IPointService {
return pointMapper.getPlanExecuteTeams(); return pointMapper.getPlanExecuteTeams();
} }
@Override
public Boolean syncOrgCompany() {
FeignClientResult result = jcsFeignClient.getUnSyncOrgCompanyList(pointMapper.queryAllPointList());
List<Object> list = (List<Object>) result.getResult();
if (!ValidationUtil.isEmpty(list)) {
list.forEach(company -> {
OrgUsrFormDto orgUsrFormDto = JSON.parseObject(JSON.toJSON(company).toString(), OrgUsrFormDto.class);
syncSavePoint(orgUsrFormDto);
});
return true;
}
return false;
}
} }
...@@ -331,4 +331,10 @@ public interface IPointService { ...@@ -331,4 +331,10 @@ public interface IPointService {
List<Map<String, Object>> getPlanExecuteTeams(); List<Map<String, Object>> getPlanExecuteTeams();
/**
* 将所有机场单位数据同步到消防监督服务p_point表
*
* @return
*/
Boolean syncOrgCompany();
} }
...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil; import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl;
...@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto; ...@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto; import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto; import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto;
...@@ -410,7 +412,16 @@ public class AlertCalledController extends BaseController { ...@@ -410,7 +412,16 @@ public class AlertCalledController extends BaseController {
String sort) { String sort) {
queryWrapper.eq("is_delete", 0); queryWrapper.eq("is_delete", 0);
if(sort!=null) { // 排序失效
String[] date= sort.split(",");
if(date[1].equals("ascend")) {
queryWrapper.orderByAsc(RedisKey.humpToLine(date[0]));
}else {
queryWrapper.orderByDesc(RedisKey.humpToLine(date[0]));
}
}else {
queryWrapper.orderByDesc("call_time"); queryWrapper.orderByDesc("call_time");
}
if (!ValidationUtil.isEmpty(alertCalled.getIsAuxiliaryScreen())) { if (!ValidationUtil.isEmpty(alertCalled.getIsAuxiliaryScreen())) {
if (!ValidationUtil.isEmpty(alertCalled.getCallTimeStart()) if (!ValidationUtil.isEmpty(alertCalled.getCallTimeStart())
...@@ -469,7 +480,7 @@ public class AlertCalledController extends BaseController { ...@@ -469,7 +480,7 @@ public class AlertCalledController extends BaseController {
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "导出警情事件记录", notes = "导出警情事件记录") @ApiOperation(value = "导出警情事件记录", notes = "导出警情事件记录")
@GetMapping("/exportSelectRecord") @GetMapping("/exportSelectRecord")
public void exportAlertCalled(AlertCalledQueryDto alertCalledQueryDto, HttpServletResponse response) { public void exportAlertCalled(AlertCalledQueryDto alertCalledQueryDto, HttpServletResponse response) {
...@@ -492,6 +503,22 @@ public class AlertCalledController extends BaseController { ...@@ -492,6 +503,22 @@ public class AlertCalledController extends BaseController {
ExcelUtil.createTemplate(response, fileName, "警情事件记录", list, AlertCalledQueryDto.class, null, false); ExcelUtil.createTemplate(response, fileName, "警情事件记录", list, AlertCalledQueryDto.class, null, false);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "导出接警记录信息", notes = "导出接警记录信息")
@GetMapping("/exportAlertRecord")
public void exportAlertRecord(AlertCalledRecordDto alertCalledQueryDto, HttpServletResponse response) {
List<AlertCalledRecordDto> list = iAlertCalledService.queryAlertRecordListByQueryDto(
alertCalledQueryDto.getCallTimeStart() == null ? null
: DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeStart()),
alertCalledQueryDto.getCallTimeEnd() == null ? null
: DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeEnd()),
alertCalledQueryDto.getType(),
alertCalledQueryDto.getAlertSource(),
alertCalledQueryDto.getAlarmType());
String fileName = "接警记录" + System.currentTimeMillis();
ExcelUtil.createTemplate(response, fileName, "接警记录", list, AlertCalledRecordDto.class, null, false);
}
/** /**
* 冻结工单-维修 * 冻结工单-维修
* *
......
...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto; ...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto;
...@@ -300,14 +301,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -300,14 +301,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
String [] str = new String[]{"使用单位","一级响应","二级响应","三级响应","市级监督"}; String [] str = new String[]{"使用单位","一级响应","二级响应","三级响应","市级监督"};
if(null != dispatchPaper) { if(null != dispatchPaper) {
map.put("adNotice",dispatchPaper.getDispatchTime());
map.put("aedArrive",dispatchPaper.getArriveTime());
map.put("afeComplete",dispatchPaper.getSaveTime());
for(String s:str) { for(String s:str) {
AlertHandlerInfoDto alertHandlerInfoDto = new AlertHandlerInfoDto(); AlertHandlerInfoDto alertHandlerInfoDto = new AlertHandlerInfoDto();
if(null != dispatchTask &&dispatchTask.size() > 0 ) { if(null != dispatchTask &&dispatchTask.size() > 0 ) {
List<DispatchTask> taskList = dispatchTask.stream().filter(e->e.getOrgType().equals(s)).collect(Collectors.toList()); List<DispatchTask> taskList = dispatchTask.stream().filter(e->e.getOrgType().equals(s)).collect(Collectors.toList());
if(taskList.size() > 0) { if(taskList.size() > 0) {
map.put("adNotice",called.getRecDate());
map.put("aedArrive",dispatchTask.get(0).getArriveTime());
map.put("afeComplete",dispatchTask.get(0).getSaveTime());
dataInit(alertHandlerInfoDto,s,"", "","已派遣", dataInit(alertHandlerInfoDto,s,"", "","已派遣",
dispatchTask.get(0).getArriveTime() == null ? "" : "已到达" ,dispatchTask.get(0).getSaveTime() == null ? "" : "已完成", dispatchTask.get(0).getArriveTime() == null ? "" : "已到达" ,dispatchTask.get(0).getSaveTime() == null ? "" : "已完成",
dispatchPaper.getFeedbackTime() != null || dispatchPaper.getFeedbackFinishTime() != null ? "已回访" : ""); dispatchPaper.getFeedbackTime() != null || dispatchPaper.getFeedbackFinishTime() != null ? "已回访" : "");
...@@ -354,6 +355,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -354,6 +355,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return baseMapper.getBussinessListByPhonePager(phone, bussinessCode, current*5); return baseMapper.getBussinessListByPhonePager(phone, bussinessCode, current*5);
} }
@Override
public List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType) {
List<AlertCalledRecordDto> list = alertCalledMapper.queryAlertRecordListByQueryDto(callTimeStart,callTimeEnd,type,alertSource,alarmType);
return list;
}
private void dataInit(AlertHandlerInfoDto alertHandlerInfoDto, String process,String answerThePolice, String report, String notice, String arrive, String complete,String returnVisit) { private void dataInit(AlertHandlerInfoDto alertHandlerInfoDto, String process,String answerThePolice, String report, String notice, String arrive, String complete,String returnVisit) {
alertHandlerInfoDto.setAbProcess(process); alertHandlerInfoDto.setAbProcess(process);
alertHandlerInfoDto.setAcAnswerThePolice(answerThePolice); alertHandlerInfoDto.setAcAnswerThePolice(answerThePolice);
......
...@@ -224,7 +224,8 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu ...@@ -224,7 +224,8 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
if(taskId == null) { if(taskId == null) {
throw new BadRequest("派遣任务单信息未找到"); throw new BadRequest("派遣任务单信息未找到");
} }
// 更新派遣到达时间
dispatchTaskServiceImpl.update(new LambdaUpdateWrapper<DispatchTask>().eq(DispatchTask::getSequenceNbr,taskId).set(DispatchTask::getArriveTime,rescueProcessDto.getArriveTime()));
repairConsultServiceImpl.saveRepairConsultByAlertIdType( rescueProcessDto.getAlertId(),"DD",taskId,sendUser); //保存接警日志 repairConsultServiceImpl.saveRepairConsultByAlertIdType( rescueProcessDto.getAlertId(),"DD",taskId,sendUser); //保存接警日志
} }
if(saveByUser) { // 手动救援 if(saveByUser) { // 手动救援
...@@ -243,6 +244,8 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu ...@@ -243,6 +244,8 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
DispatchPaper dispatchPaper = dispatchPaperDto.getDispatchPaper(); DispatchPaper dispatchPaper = dispatchPaperDto.getDispatchPaper();
dispatchPaper.setSaveTime(rescueProcessDto.getRescueTime()); dispatchPaper.setSaveTime(rescueProcessDto.getRescueTime());
// 更新派遣单 // 更新派遣单
// 更新派遣救援时间
dispatchTaskServiceImpl.update(new LambdaUpdateWrapper<DispatchTask>().eq(DispatchTask::getSequenceNbr,taskId).set(DispatchTask::getSaveTime,rescueProcessDto.getRescueTime()));
dispatchPaperServiceImpl.updateById(dispatchPaper); dispatchPaperServiceImpl.updateById(dispatchPaper);
repairConsultServiceImpl.saveRepairConsultByAlertIdType(rescueProcessDto.getAlertId(),"JC",taskId,sendUser); //保存接警日志 repairConsultServiceImpl.saveRepairConsultByAlertIdType(rescueProcessDto.getAlertId(),"JC",taskId,sendUser); //保存接警日志
} }
......
...@@ -1752,6 +1752,18 @@ ...@@ -1752,6 +1752,18 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet id="2021-10-14-1" author="chenzhao">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO cb_data_dictionary (sequence_nbr, code, name, `type`) VALUES(1326, '1326', '消防物联系统', 'LYXT');
INSERT INTO cb_data_dictionary (sequence_nbr, code, name, `type`) VALUES(1327, '1327', '接处警手动上报', 'LYXT');
INSERT INTO cb_data_dictionary (sequence_nbr, code, name, `type`) VALUES(1328, '1328', '融合终端系统', 'LYXT');
</sql>
</changeSet>
<changeSet id="2021-10-14" author="chenhao-1"> <changeSet id="2021-10-14" author="chenhao-1">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
...@@ -1782,5 +1794,15 @@ ...@@ -1782,5 +1794,15 @@
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812076', 'teamName', '单位名称', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL); INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812076', 'teamName', '单位名称', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
</sql> </sql>
</changeSet> </changeSet>
<changeSet id="2021-10-14" author="cz">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_org_usr_safe_report"/>
</preConditions>
<comment>删除责任人非空约束</comment>
<sql>
ALTER TABLE cb_org_usr_safe_report MODIFY COLUMN duty_person VARCHAR(30);
ALTER TABLE cb_org_usr_safe_report MODIFY COLUMN duty_person_id bigint(20);
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -93,3 +93,5 @@ control.fegin.name=JCS-API-CONTROL ...@@ -93,3 +93,5 @@ control.fegin.name=JCS-API-CONTROL
supervision.feign.name=AMOS-SUPERVISION-API supervision.feign.name=AMOS-SUPERVISION-API
jcs.fegin.name=JCS jcs.fegin.name=JCS
onSite.confirm.roleName="Person_charge_unit_fire_protection_supervision_inspection"
\ No newline at end of file
...@@ -1193,4 +1193,7 @@ ...@@ -1193,4 +1193,7 @@
and pl.id = #{planId} and pl.id = #{planId}
and po.id = rp.point_id) and po.id = rp.point_id)
</select> </select>
<select id="queryAllPointList" resultType="java.lang.Long">
select original_id from p_point where is_delete = 0;
</select>
</mapper> </mapper>
\ No newline at end of file
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