Commit 9cf458ef authored by 麻笑宇's avatar 麻笑宇

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents d5087126 a3e0c3bf
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.elevator.biz.service.impl; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.elevator.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...@@ -11,25 +10,14 @@ import com.baomidou.mybatisplus.core.toolkit.SystemClock; ...@@ -11,25 +10,14 @@ import com.baomidou.mybatisplus.core.toolkit.SystemClock;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
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.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; 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.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; 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.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService; import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import com.yeejoin.amos.boot.module.elevator.api.dto.*; import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.elevator.api.entity.*;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchPaper;
import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchTask;
import com.yeejoin.amos.boot.module.elevator.api.entity.Elevator;
import com.yeejoin.amos.boot.module.elevator.api.entity.RepairConsult;
import com.yeejoin.amos.boot.module.elevator.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordFile;
import com.yeejoin.amos.boot.module.elevator.api.enums.AlertStageEnums; import com.yeejoin.amos.boot.module.elevator.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums; import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.elevator.api.enums.EquipmentClassifityEnum; import com.yeejoin.amos.boot.module.elevator.api.enums.EquipmentClassifityEnum;
...@@ -38,14 +26,11 @@ import com.yeejoin.amos.boot.module.elevator.api.mapper.AlertCalledMapper; ...@@ -38,14 +26,11 @@ import com.yeejoin.amos.boot.module.elevator.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.elevator.api.service.IAlertCalledService; import com.yeejoin.amos.boot.module.elevator.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.elevator.api.service.IRescueStationService; import com.yeejoin.amos.boot.module.elevator.api.service.IRescueStationService;
import com.yeejoin.amos.boot.module.elevator.api.service.TzsAuthService; import com.yeejoin.amos.boot.module.elevator.api.service.TzsAuthService;
import com.yeejoin.amos.boot.module.elevator.biz.utils.AlertBeanDtoVoUtils;
import com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils; import com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.text.StrBuilder; import org.apache.commons.lang.text.StrBuilder;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.redisson.api.RAtomicLong; import org.redisson.api.RAtomicLong;
...@@ -58,11 +43,10 @@ import org.springframework.core.io.Resource; ...@@ -58,11 +43,10 @@ import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.DateUtil;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
...@@ -1271,23 +1255,33 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1271,23 +1255,33 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
data.put("operater", r.getDescription()); data.put("operater", r.getDescription());
records.add(data); records.add(data);
}); });
// 监管 // 96333
HashMap<String, Object> qrcode = new HashMap<>(); HashMap<String, Object> qrcode = new HashMap<>();
if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) { if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) {
qrcode.put("value", alertCalledFormVo.getAlertCalledDto().getRegistrationCode()); qrcode.put("title", "96333码");
qrcode.put("value", alertCalledFormVo.getAlertCalledDto().getDeviceId());
try {
String problemTime = DateUtil.formatDate(new Date(), DateUtil.Y_M_D_HMS);
qrcode.put("text", DateUtil.formatDate(DateUtil.smartFormat(problemTime), "yyyy-MM-dd"));
qrcode.put("subtext", DateUtil.formatDate(DateUtil.smartFormat(problemTime), "HH:mm:ss"));
String color;
if (alertCalledFormVo.getAlertCalledDto().getAlertStatus()) {
color = "green";
} else {
color = "red";
}
qrcode.put("color", color);
} catch (Exception e) {
e.printStackTrace();
} }
// 96333码
HashMap<String, Object> qrcode2 = new HashMap<>();
if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) {
qrcode2.put("value", alertCalledFormVo.getAlertCalledDto().getDeviceId());
} }
datas.put("datas", records); datas.put("datas", records);
datas.put("title", "处置记录"); datas.put("title", "处置记录");
datas.put("renderType", "timeline"); datas.put("renderType", "timeline");
keyinfoData.put("title", ObjectUtils.isEmpty(useUnitMap.get("useUnitName")) ? null : String.valueOf(useUnitMap.get("useUnitName")));
keyinfoData.put("keyParams", jsonData); keyinfoData.put("keyParams", jsonData);
keyinfoData.put("infoRecords", datas); keyinfoData.put("infoRecords", datas);
keyinfoData.put("qrcode", qrcode); keyinfoData.put("qrcode", qrcode);
keyinfoData.put("qrcode2", qrcode2);
return keyinfoData; return keyinfoData;
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
}, },
{ {
"key": "useUnitName", "key": "useUnitName",
"label": "单位名称", "label": "使用单位",
"type": "text" "type": "text"
}, },
{ {
......
...@@ -648,6 +648,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr ...@@ -648,6 +648,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
map.put("datas", collect); map.put("datas", collect);
map.put("title", "使用登记证流水"); map.put("title", "使用登记证流水");
map.put("renderType", "timeline"); map.put("renderType", "timeline");
result.put("title", objectMap.get("useUnitName"));
result.put("keyParams", jsonData); result.put("keyParams", jsonData);
result.put("infoRecords", map); result.put("infoRecords", map);
return result; return result;
......
...@@ -630,6 +630,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -630,6 +630,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
datas.put("datas", records); datas.put("datas", records);
datas.put("title", "审批进度"); datas.put("title", "审批进度");
datas.put("renderType", "timeline"); datas.put("renderType", "timeline");
resultMap.put("title", map.get("applicationUnitName"));
resultMap.put("infoRecords", datas); resultMap.put("infoRecords", datas);
resultMap.put("keyParams", jsonData); resultMap.put("keyParams", jsonData);
return resultMap; return resultMap;
......
...@@ -10,11 +10,11 @@ import java.util.List; ...@@ -10,11 +10,11 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
public class EquCategoryVo { public class EquCategoryVo {
public String value; public String value;
public String title; public String label;
public List<EquCategoryVo> children; public List<EquCategoryVo> children;
public EquCategoryVo(String title, String value) { public EquCategoryVo(String label, String value) {
this.title = title; this.label = label;
this.value = value; this.value = value;
} }
......
...@@ -387,10 +387,10 @@ ...@@ -387,10 +387,10 @@
and spt.problem_type_code = #{problemModel.problemTypeCode} and spt.problem_type_code = #{problemModel.problemTypeCode}
</if> </if>
<if test="problemModel.problemTimeStart != null and problemModel.problemTimeStart != ''"> <if test="problemModel.problemTimeStart != null and problemModel.problemTimeStart != ''">
and cast(spt.problem_time AS DATE) >= #{problemModel.problemTimeStart} and cast(spt.problem_time AS DATE) >= cast(#{problemModel.problemTimeStart} AS DATE)
</if> </if>
<if test="problemModel.problemTimeEnd != null and problemModel.problemTimeEnd != ''"> <if test="problemModel.problemTimeEnd != null and problemModel.problemTimeEnd != ''">
and cast(spt.problem_time AS DATE) <![CDATA[<=]]> #{problemModel.problemTimeEnd} and cast(spt.problem_time AS DATE) <![CDATA[<=]]> cast(#{problemModel.problemTimeEnd} AS DATE)
</if> </if>
<if test="problemModel.problemDesc != null and problemModel.problemDesc != ''"> <if test="problemModel.problemDesc != null and problemModel.problemDesc != ''">
and spt.problem_desc like CONCAT('%', #{problemModel.problemDesc}, '%') and spt.problem_desc like CONCAT('%', #{problemModel.problemDesc}, '%')
......
...@@ -185,14 +185,12 @@ ...@@ -185,14 +185,12 @@
<if test="dto != null and dto.timeSearchOne != null and dto.timeSearchOne.endDate != null and dto.timeSearchOne.endDate != ''"> <if test="dto != null and dto.timeSearchOne != null and dto.timeSearchOne.endDate != null and dto.timeSearchOne.endDate != ''">
and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate}) and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate})
</if> </if>
<choose> <if test="dto.alertTypeCode !=null and dto.alertTypeCode !='' and dto.alertTypeCode !='yjsj'">
<when test="dto.alertTypeCode != null and dto.alertTypeCode != ''">
and alarm_type_code = #{dto.alertTypeCode} and alarm_type_code = #{dto.alertTypeCode}
</when> </if>
<otherwise> <if test="dto.alertTypeCode == null or dto.alertTypeCode == '' and dto.alertTypeCode =='yjsj'">
and (alarm_type_code = '960' or alarm_type_code = '961' or alarm_type_code = '962') and (alarm_type_code = '960' or alarm_type_code = '961' or alarm_type_code = '962')
</otherwise> </if>
</choose>
<if test="dto.typeCode !=null and dto.typeCode !=''"> <if test="dto.typeCode !=null and dto.typeCode !=''">
and type_code = #{dto.typeCode} and type_code = #{dto.typeCode}
</if> </if>
...@@ -202,7 +200,37 @@ ...@@ -202,7 +200,37 @@
</select> </select>
<select id="alertRecordForPage" resultType="java.util.Map"> <select id="alertRecordForPage" resultType="java.util.Map">
SELECT * SELECT
"contact_phone" as contactPhone ,
"city",
"type" ,
"skill_group" as skillGroup,
"response_level" as responseLevel ,
"emergency_person" as emergencyPerson,
"alert_stage_code" as alertStageCode,
"work_order_number" as workOrderNumber,
"alarm_type" as alarmType,
"alert_source" as alertSource,
"biz_org_code" as bizOrgCode,
"alert_source_code" as alertSourceCode,
"equipment_classification_code" as equipmentClassificationCode,
"address" as address,
"device_id" as deviceId,
"contact_user" as contactUser,
"equipment_classification" as equipmentClassification,
"alarm_type_code" as alarmTypeCode,
"call_time" as callTime,
"sequence_nbr" as sequenceNbr,
"is_delete" as sequenceNbr,
"alert_status" as alertStatus,
"rec_user_id" as recUserId,
"registration_code" as registrationCode,
"district" as district,
"alert_stage" as alertStage,
"emergency_call" as emergencyCall,
"type_code" as typeCode,
"region_code" as regionCode,
"equipment_id" as equipmentId
FROM tz_alert_called FROM tz_alert_called
<where> <where>
is_delete = 0 is_delete = 0
...@@ -216,14 +244,13 @@ ...@@ -216,14 +244,13 @@
and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate}) and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate})
</if> </if>
<choose> <if test="dto.alertTypeCode !=null and dto.alertTypeCode !='' and dto.alertTypeCode !='yjsj'">
<when test="dto.alertTypeCode != null and dto.alertTypeCode != ''">
and alarm_type_code = #{dto.alertTypeCode} and alarm_type_code = #{dto.alertTypeCode}
</when> </if>
<otherwise>
<if test="dto.alertTypeCode == null or dto.alertTypeCode == '' and dto.alertTypeCode =='yjsj'">
and (alarm_type_code = '960' or alarm_type_code = '961' or alarm_type_code = '962') and (alarm_type_code = '960' or alarm_type_code = '961' or alarm_type_code = '962')
</otherwise> </if>
</choose>
<if test="dto.typeCode != null and dto.typeCode != ''"> <if test="dto.typeCode != null and dto.typeCode != ''">
and type_code = #{dto.typeCode} and type_code = #{dto.typeCode}
......
...@@ -115,9 +115,9 @@ public class CylinderDPStatisticsController extends BaseController { ...@@ -115,9 +115,9 @@ public class CylinderDPStatisticsController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "区域安全指数排名下钻树节点") @ApiOperation(httpMethod = "POST", value = "区域安全指数排名下钻树节点")
@GetMapping(value = "/securityIndexSubTree") @PostMapping(value = "/securityIndexSubTree")
public ResponseModel<SubTreeDto> securityIndexSubTree() { public ResponseModel<List<SubTreeDto>> securityIndexSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.securityIndexSubTree()); return ResponseHelper.buildResponse(dpStatisticsService.securityIndexSubTree());
} }
...@@ -129,9 +129,9 @@ public class CylinderDPStatisticsController extends BaseController { ...@@ -129,9 +129,9 @@ public class CylinderDPStatisticsController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "充装量/卸液量下钻树节点") @ApiOperation(httpMethod = "POST", value = "充装量/卸液量下钻树节点")
@GetMapping(value = "/getFillingSubTree") @PostMapping(value = "/getFillingSubTree")
public ResponseModel<SubTreeDto> getFillingSubTree() { public ResponseModel<List<SubTreeDto>> getFillingSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubTree()); return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubTree());
} }
...@@ -151,16 +151,16 @@ public class CylinderDPStatisticsController extends BaseController { ...@@ -151,16 +151,16 @@ public class CylinderDPStatisticsController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "充装量/卸液量下钻气瓶充装异常情况下拉") @ApiOperation(httpMethod = "POST", value = "充装量/卸液量下钻气瓶充装异常情况下拉")
@GetMapping(value = "/getFillingSubAnomalyType") @PostMapping(value = "/getFillingSubAnomalyType")
public ResponseModel<Object> getFillingSubAnomalyType() { public ResponseModel<Object> getFillingSubAnomalyType() {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubAnomalyType()); return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubAnomalyType());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "区域气站对接率下钻树节点") @ApiOperation(httpMethod = "POST", value = "区域气站对接率下钻树节点")
@GetMapping(value = "/getStationRateSubTree") @PostMapping(value = "/getStationRateSubTree")
public ResponseModel<SubTreeDto> getStationRateSubTree() { public ResponseModel<List<SubTreeDto>> getStationRateSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.getStationRateSubTree()); return ResponseHelper.buildResponse(dpStatisticsService.getStationRateSubTree());
} }
......
...@@ -39,6 +39,9 @@ public class DPSubController { ...@@ -39,6 +39,9 @@ public class DPSubController {
public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) { public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) {
if (template.equals("company")) { // 企业 if (template.equals("company")) { // 企业
Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空"); Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空");
if (ValidationUtil.isEmpty(param.get("useUnit"))){
param.put("useUnit", param.get("unitName"));
}
} else if (template.equals("reportEqu")) { // 监督检验 } else if (template.equals("reportEqu")) { // 监督检验
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空"); Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if (template.equals("equip")) { //设备 } else if (template.equals("equip")) { //设备
......
package com.yeejoin.amos.boot.module.statistcs.biz.controller; package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl; import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl;
...@@ -43,8 +44,10 @@ public class StCommonController extends BaseController { ...@@ -43,8 +44,10 @@ public class StCommonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getEquCategoryTree") @PostMapping(value = "/getEquCategoryTree")
@ApiOperation(httpMethod = "POST", value = "获取设备类型", notes = "获取设备类型") @ApiOperation(httpMethod = "POST", value = "获取设备类型", notes = "获取设备类型")
public ResponseModel<EquCategoryVo> getEquCategoryTree(@RequestBody DPFilterParamForDetailDto paramDto){ public ResponseModel<JSONArray> getEquCategoryTree(@RequestBody DPFilterParamForDetailDto paramDto){
return ResponseHelper.buildResponse(commonService.getEquCategoryTree(paramDto)); JSONArray objects = new JSONArray();
objects.add(commonService.getEquCategoryTree(paramDto));
return ResponseHelper.buildResponse(objects);
} }
} }
package com.yeejoin.amos.boot.module.statistcs.biz.controller; package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
...@@ -175,23 +176,41 @@ public class YJDPStatisticsController { ...@@ -175,23 +176,41 @@ public class YJDPStatisticsController {
@ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型") @ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型")
@PostMapping("/alertOperations/dp") @PostMapping("/alertOperations/dp")
public ResponseModel<Object> alertOperations() { public ResponseModel<Object> alertOperations() {
return ResponseHelper.buildResponse(statisticsService.alertOperations()); JSONArray objects = new JSONArray();
objects.add(statisticsService.alertOperations());
return ResponseHelper.buildResponse(objects);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型") @ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型")
@PostMapping("/alertTypeOperations/dp") @PostMapping("/alertTypeOperations/dp")
public ResponseModel<Object> alertTypeOperations() { public ResponseModel<Object> alertTypeOperations() {
HashMap<String, String> map = new HashMap<>(); JSONArray res = new JSONArray();
map.put(AlertStageEnums.JQCB.getId(),AlertStageEnums.JQCB.getValue()); JSONObject jsonObject1 = new JSONObject().fluentPut("label", AlertStageEnums.JQCB.getValue()).fluentPut("value", AlertStageEnums.JQCB.getId());
map.put(AlertStageEnums.JQGB.getId(), AlertStageEnums.JQGB.getValue()); JSONObject jsonObject2 = new JSONObject().fluentPut("label", AlertStageEnums.JQGB.getValue()).fluentPut("value", AlertStageEnums.JQGB.getId());
return ResponseHelper.buildResponse(map); res.add(jsonObject1);
res.add(jsonObject2);
return ResponseHelper.buildResponse(res);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-警情来源", notes = "应急大屏使用-警情来源")
@PostMapping("/alertSourceOperations/dp")
public ResponseModel<Object> alertSourceOperations() {
JSONArray res = new JSONArray();
JSONObject jsonObject1 = new JSONObject().fluentPut("label", AlertStageEnums.DHBJ.getValue()).fluentPut("value", AlertStageEnums.DHBJ.getId());
JSONObject jsonObject2 = new JSONObject().fluentPut("label", AlertStageEnums.WLJR.getValue()).fluentPut("value", AlertStageEnums.WLJR.getId());
JSONObject jsonObject3 = new JSONObject().fluentPut("label", AlertStageEnums.APPJJ.getValue()).fluentPut("value", AlertStageEnums.APPJJ.getId());
res.add(jsonObject1);
res.add(jsonObject2);
res.add(jsonObject3);
return ResponseHelper.buildResponse(res);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格", @ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格",
notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格") notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格")
@PostMapping("/alertRecordTable/dp") @PostMapping("/alertRecordTable/dp")
public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(DPFilterParamForDetailDto recordFilterVo) { public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(@Validated @RequestBody DPFilterParamForDetailDto recordFilterVo) {
return statisticsService.alertRecordTableForDP(recordFilterVo); return statisticsService.alertRecordTableForDP(recordFilterVo);
} }
...@@ -203,12 +222,13 @@ public class YJDPStatisticsController { ...@@ -203,12 +222,13 @@ public class YJDPStatisticsController {
List<JSONObject> subList = Collections.singletonList(new JSONObject() List<JSONObject> subList = Collections.singletonList(new JSONObject()
.fluentPut("value", "use") .fluentPut("value", "use")
.fluentPut("title", "使用单位")); .fluentPut("title", "使用单位"));
JSONArray res = new JSONArray();
JSONObject jsonObject = new JSONObject() JSONObject jsonObject = new JSONObject()
.fluentPut("title", "企业类型") .fluentPut("title", "企业类型")
.fluentPut("value", "all") .fluentPut("value", "all")
.fluentPut("children", subList); .fluentPut("children", subList);
return ResponseHelper.buildResponse(jsonObject); res.add(jsonObject);
return ResponseHelper.buildResponse(res);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -123,13 +123,13 @@ public class ZLDPStatisticsController { ...@@ -123,13 +123,13 @@ public class ZLDPStatisticsController {
/** /**
* 根据设备种类code获取设备类别下拉 * 根据设备种类code获取设备类别下拉
* *
* @param equListCode 设备种类code * @param paramDto 设备种类code
* @return 设备类别列表 * @return 设备类别列表
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getEquCategoryList") @PostMapping(value = "/getEquCategoryList")
@ApiOperation(httpMethod = "GET", value = "根据设备种类code获取设备类别下拉", notes = "根据设备种类code获取设备类别下拉") @ApiOperation(httpMethod = "POST", value = "根据设备种类code获取设备类别下拉", notes = "根据设备种类code获取设备类别下拉")
public ResponseModel<List<EquCategoryVo>> getEquCategoryTree(String equListCode){ public ResponseModel<List<EquCategoryVo>> getEquCategoryTree(@RequestBody DPFilterParamForDetailDto paramDto){
return ResponseHelper.buildResponse(statisticsService.getEquCategoryList(equListCode)); return ResponseHelper.buildResponse(statisticsService.getEquCategoryList(paramDto.getTreeValue()));
} }
} }
...@@ -468,11 +468,13 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -468,11 +468,13 @@ public class CylinderDPStatisticsServiceImpl {
return result; return result;
} }
public SubTreeDto securityIndexSubTree() { public List<SubTreeDto> securityIndexSubTree() {
List<SubTreeDto> list = new ArrayList<>();
SubTreeDto subTreeDto = new SubTreeDto(); SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle(CylinderTypeEnum.CYLINDER.getCode()); subTreeDto.setValue(CylinderTypeEnum.CYLINDER.getCode());
subTreeDto.setValue("气" + CylinderTypeEnum.CYLINDER.getName()); subTreeDto.setTitle("气" + CylinderTypeEnum.CYLINDER.getName());
return subTreeDto; list.add(subTreeDto);
return list;
} }
public Map<String, Object> securityIndexSubChart(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> securityIndexSubChart(DPFilterParamDto dpFilterParamDto) {
...@@ -488,11 +490,19 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -488,11 +490,19 @@ public class CylinderDPStatisticsServiceImpl {
}); });
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("xdata", xdata); result.put("xdata", xdata);
result.put("ydata", yData); result.put("securityIndex", yData);
List<Map<String, Object>> legendData = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
map.put("dataKey", "securityIndex");
map.put("value", "各地市区域安全指数");
map.put("chartType", "bar");
legendData.add(map);
result.put("legendData", legendData);
return result; return result;
} }
public SubTreeDto getFillingSubTree() { public List<SubTreeDto> getFillingSubTree() {
List<SubTreeDto> list = new ArrayList<>();
SubTreeDto subTreeDto = new SubTreeDto(); SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle("气" + CylinderTypeEnum.CYLINDER.getName()); subTreeDto.setTitle("气" + CylinderTypeEnum.CYLINDER.getName());
subTreeDto.setValue(CylinderTypeEnum.CYLINDER.getCode()); subTreeDto.setValue(CylinderTypeEnum.CYLINDER.getCode());
...@@ -506,7 +516,8 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -506,7 +516,8 @@ public class CylinderDPStatisticsServiceImpl {
} }
} }
subTreeDto.setChildren(children); subTreeDto.setChildren(children);
return subTreeDto; list.add(subTreeDto);
return list;
} }
public Map<String, Object> getFillingSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Map<String, Object> getFillingSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
...@@ -516,15 +527,22 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -516,15 +527,22 @@ public class CylinderDPStatisticsServiceImpl {
List<Double> offloadingVolumes = new ArrayList<>(); List<Double> offloadingVolumes = new ArrayList<>();
String fillingStartTime, fillingEndTime; String fillingStartTime, fillingEndTime;
if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) { if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne())) {
fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00"; fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00";
fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59"; fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59";
} else { } else {
fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 00:00:00"; if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) {
fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 23:59:59"; fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate();
} else {
fillingStartTime = null;
}
if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getEndDate())) {
fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getEndDate();
} else {
fillingEndTime = null;
}
} }
List<Map<String,Object>> list = getFillingQuantity(dpFilterParamForDetailDto, fillingStartTime, fillingEndTime); List<Map<String,Object>> list = getFillingQuantity(dpFilterParamForDetailDto, fillingStartTime, fillingEndTime);
regionModels.forEach(r -> { regionModels.forEach(r -> {
//充装量和 //充装量和
List<Map<String, Object>> regionCode = list.stream().filter(e -> e.get("regionCode").toString().contains(r.getRegionCode().toString())).collect(Collectors.toList()); List<Map<String, Object>> regionCode = list.stream().filter(e -> e.get("regionCode").toString().contains(r.getRegionCode().toString())).collect(Collectors.toList());
...@@ -534,8 +552,12 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -534,8 +552,12 @@ public class CylinderDPStatisticsServiceImpl {
} }
//卸液量和 //卸液量和
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString()); String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString());
List<CylinderFillingRecordStatisticsDto> cylinderFillingRecordStatisticsDtos = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, fillingStartTime, fillingEndTime);
Double offloadingVolume = 0.0d;
if(!ObjectUtils.isEmpty(cylinderFillingRecordStatisticsDtos)){
List<String> collect1 = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, fillingStartTime, fillingEndTime).stream().map(e -> e.getOffloadingVolume()).collect(Collectors.toList()); List<String> collect1 = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, fillingStartTime, fillingEndTime).stream().map(e -> e.getOffloadingVolume()).collect(Collectors.toList());
Double offloadingVolume = collect1.stream().mapToDouble(Double::valueOf).sum(); offloadingVolume = collect1.stream().mapToDouble(Double::valueOf).sum();
}
fillingQuantitys.add(fillingQuantity); fillingQuantitys.add(fillingQuantity);
offloadingVolumes.add(offloadingVolume); offloadingVolumes.add(offloadingVolume);
}); });
...@@ -589,10 +611,19 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -589,10 +611,19 @@ public class CylinderDPStatisticsServiceImpl {
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN); SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
//充装时间 //充装时间
if (!ObjectUtils.isEmpty(fillingStartTime) && !ObjectUtils.isEmpty(fillingStartTime) ) { if (!ObjectUtils.isEmpty(fillingStartTime)) {
BoolQueryBuilder query = QueryBuilders.boolQuery(); BoolQueryBuilder query = QueryBuilders.boolQuery();
try { try {
query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime())); query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
boolMust.must(query);
}
if (!ObjectUtils.isEmpty(fillingEndTime) ) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
try {
query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime())); query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime()));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -668,22 +699,36 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -668,22 +699,36 @@ public class CylinderDPStatisticsServiceImpl {
boolMust.must(query); boolMust.must(query);
} }
String fillingStartTime, fillingEndTime; String fillingStartTime = null, fillingEndTime = null;
if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) { if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne())) {
fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00"; fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00";
fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59"; fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59";
} else { } else {
if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getEndDate())) {
fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 00:00:00"; fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 00:00:00";
}
if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) {
fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 23:59:59"; fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 23:59:59";
} }
}
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN); SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
//充装时间 //充装开始时间
if (!ObjectUtils.isEmpty(fillingStartTime) && !ObjectUtils.isEmpty(fillingEndTime) ) { if (!ObjectUtils.isEmpty(fillingStartTime)) {
flag = false; flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery(); BoolQueryBuilder query = QueryBuilders.boolQuery();
try { try {
query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime())); query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
boolMust.must(query);
}
//充装结束时间
if (!ObjectUtils.isEmpty(fillingEndTime) ) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
try {
query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime())); query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime()));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -730,7 +775,8 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -730,7 +775,8 @@ public class CylinderDPStatisticsServiceImpl {
} }
public SubTreeDto getStationRateSubTree() { public List<SubTreeDto> getStationRateSubTree() {
List<SubTreeDto> subTreeDtos = new ArrayList<>();
SubTreeDto subTreeDto = new SubTreeDto(); SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle("企业类型"); subTreeDto.setTitle("企业类型");
subTreeDto.setValue(""); subTreeDto.setValue("");
...@@ -740,7 +786,8 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -740,7 +786,8 @@ public class CylinderDPStatisticsServiceImpl {
subTree.setValue("1231"); subTree.setValue("1231");
children.add(subTree); children.add(subTree);
subTreeDto.setChildren(children); subTreeDto.setChildren(children);
return subTreeDto; subTreeDtos.add(subTreeDto);
return subTreeDtos;
} }
public Map<String, Object> getStationRateSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Map<String, Object> getStationRateSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
......
...@@ -511,7 +511,13 @@ public class DPSubServiceImpl { ...@@ -511,7 +511,13 @@ public class DPSubServiceImpl {
} }
String problemTime = result.getString("problemTime"); String problemTime = result.getString("problemTime");
String problemStatus = result.getString("problemStatus"); String problemStatus = result.getString("problemStatus");
if (ValidationUtil.isEmpty(problemTime)){
try {
problemTime = DateUtil.formatDate(new Date(), DateUtil.Y_M_D_HMS);
} catch (Exception e) {
e.printStackTrace();
}
}
String color = null; String color = null;
if (!ValidationUtil.isEmpty(problemTime)) { if (!ValidationUtil.isEmpty(problemTime)) {
try { try {
...@@ -526,7 +532,7 @@ public class DPSubServiceImpl { ...@@ -526,7 +532,7 @@ public class DPSubServiceImpl {
} else if ("异常".equals(problemStatus)) { } else if ("异常".equals(problemStatus)) {
color = "red"; color = "red";
} }
qrcode.put("value", !ValidationUtil.isEmpty(result.get("useCode")) ? result.get("useCode") : result.get("USE_ORG_CODE")); qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? "https://nav.sspai.top/tzs?code=" + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE"));
qrcode.put("status", problemStatus); qrcode.put("status", problemStatus);
qrcode.put("color", color); qrcode.put("color", color);
return qrcode; return qrcode;
......
...@@ -604,11 +604,11 @@ public class YJDPStatisticsServiceImpl { ...@@ -604,11 +604,11 @@ public class YJDPStatisticsServiceImpl {
// 使用单位 // 使用单位
if (!ValidationUtil.isEmpty(detailDto.getCompanyName())){ if (!ValidationUtil.isEmpty(detailDto.getCompanyName())){
lambda.like(AlertUseUnitStatistics::getUseUnit, detailDto.getCompanyName()); lambda.like(AlertUseUnitStatistics::getUseUnit, detailDto.getCompanyName().trim());
} }
// 维保单位 // 维保单位
if (!ValidationUtil.isEmpty(detailDto.getMaintenanceCompanyName())){ if (!ValidationUtil.isEmpty(detailDto.getMaintenanceCompanyName())){
lambda.like(AlertUseUnitStatistics::getMaintenanceUnit, detailDto.getMaintenanceCompanyName()); lambda.like(AlertUseUnitStatistics::getMaintenanceUnit, detailDto.getMaintenanceCompanyName().trim());
} }
IPage<AlertUseUnitStatistics> alertUseUnitStatistics = alertUseUnitStatisticsMapper.selectPage(page, lambda); IPage<AlertUseUnitStatistics> alertUseUnitStatistics = alertUseUnitStatisticsMapper.selectPage(page, lambda);
return ResponseHelper.buildResponse(alertUseUnitStatistics); return ResponseHelper.buildResponse(alertUseUnitStatistics);
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"title": "{useUnit}", "title": "{useUnit}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "企业二维码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
......
...@@ -367,7 +367,9 @@ ...@@ -367,7 +367,9 @@
tz_base_enterprise_info i tz_base_enterprise_info i
WHERE WHERE
i.app_id = f.app_id i.app_id = f.app_id
<if test="startTime != null and startTime != '' ">
AND f.statistics_sync_date <![CDATA[>=]]> #{startTime} AND f.statistics_sync_date <![CDATA[>=]]> #{startTime}
</if>
<if test="endTime != null and endTime != '' "> <if test="endTime != null and endTime != '' ">
AND f.statistics_sync_date <![CDATA[<=]]> #{endTime} AND f.statistics_sync_date <![CDATA[<=]]> #{endTime}
</if> </if>
......
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