Commit 6ca12219 authored by 韩桐桐's avatar 韩桐桐

feat(统计):bug

parent 8859119c
......@@ -185,14 +185,12 @@
<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})
</if>
<choose>
<when test="dto.alertTypeCode != null and dto.alertTypeCode != ''">
<if test="dto.alertTypeCode !=null and dto.alertTypeCode !='' and dto.alertTypeCode !='yjsj'">
and alarm_type_code = #{dto.alertTypeCode}
</when>
<otherwise>
</if>
<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')
</otherwise>
</choose>
</if>
<if test="dto.typeCode !=null and dto.typeCode !=''">
and type_code = #{dto.typeCode}
</if>
......@@ -202,7 +200,37 @@
</select>
<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
<where>
is_delete = 0
......@@ -216,14 +244,13 @@
and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate})
</if>
<choose>
<when test="dto.alertTypeCode != null and dto.alertTypeCode != ''">
<if test="dto.alertTypeCode !=null and dto.alertTypeCode !='' and dto.alertTypeCode !='yjsj'">
and alarm_type_code = #{dto.alertTypeCode}
</when>
<otherwise>
</if>
<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')
</otherwise>
</choose>
</if>
<if test="dto.typeCode != null and dto.typeCode != ''">
and type_code = #{dto.typeCode}
......
......@@ -193,13 +193,13 @@ public class YJDPStatisticsController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型")
@ApiOperation(value = "应急大屏使用-警情来源", notes = "应急大屏使用-警情来源")
@PostMapping("/alertSourceOperations/dp")
public ResponseModel<Object> alertSourceOperations() {
JSONArray res = new JSONArray();
JSONObject jsonObject1 = new JSONObject().fluentPut("label", AlertStageEnums.KRJY.getValue()).fluentPut("value", AlertStageEnums.KRJY.getId());
JSONObject jsonObject2 = new JSONObject().fluentPut("label", AlertStageEnums.GZWX.getValue()).fluentPut("value", AlertStageEnums.GZWX.getId());
JSONObject jsonObject3 = new JSONObject().fluentPut("label", AlertStageEnums.TSZX.getValue()).fluentPut("value", AlertStageEnums.TSZX.getId());
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);
......
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