diff --git a/zc-business/src/main/java/com/zc/business/controller/WordController.java b/zc-business/src/main/java/com/zc/business/controller/WordController.java index 26dfc1cf..d9168051 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WordController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WordController.java @@ -1028,7 +1028,7 @@ public class WordController { if (closeList != null && closeList.size() > UniversalEnum.ZERO.getNumber() && restrictionList != null && restrictionList.size() > UniversalEnum.ZERO.getNumber() ) { - XWPFTable table = doc.createTable(UniversalEnum.THIRTEEN.getNumber(), UniversalEnum.THREE.getNumber()); + XWPFTable table = doc.createTable(15, UniversalEnum.THREE.getNumber()); //列宽自动分割 CTTblWidth infoTableWidth = table.getCTTbl().addNewTblPr().addNewTblW(); infoTableWidth.setType(STTblWidth.DXA); diff --git a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java index b88bf18a..fb54aaed 100644 --- a/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java +++ b/zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java @@ -27,9 +27,8 @@ import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; -import java.text.SimpleDateFormat; import java.util.*; -import java.util.stream.Collectors; +import java.util.concurrent.atomic.AtomicBoolean; @Aspect @Component @@ -144,7 +143,24 @@ public class OperationLogAspect { //SimpleDateFormat df = new SimpleDateFormat(UniversalEnum.TIME_FORMAT_ALL.getValue()); //String date = df.format(new Date()); //String sta = UniversalEnum.EMPTY_STRING.getValue(); - if (Objects.equals(state, UniversalEnum.ZERO.getValue()) && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), UniversalEnum.TWO_HUNDRED.getValue()) && !Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("msg")), UniversalEnum.FIVE_HUNDRED.getValue())) { + AtomicBoolean status = new AtomicBoolean(true); + AjaxResult ajaxResult = (AjaxResult) jsonResult; + try { + JSONArray datas = (JSONArray) JSON.toJSON(ajaxResult.get("data")); + datas.forEach(item -> { + JSONObject json = (JSONObject) JSON.toJSON(item); + if (json.getJSONObject("result").getInteger("code") != UniversalEnum.TWO_HUNDRED.getNumber()) { + status.set(false); + } + }); + } catch (Exception e) { + status.set(false); + } +// List result = datas.stream().filter(item -> { +// JSONObject json = (JSONObject) JSON.toJSON(item); +// return Objects.equals(json.getString("device"), "2"); +// }).collect(Collectors.toList()); + if (Objects.equals(state, UniversalEnum.ZERO.getValue()) && Objects.equals(String.valueOf(ajaxResult.get("code")), UniversalEnum.TWO_HUNDRED.getValue()) && !Objects.equals(String.valueOf(ajaxResult.get("msg")), UniversalEnum.FIVE_HUNDRED.getValue()) && status.get()) { operLog.setStatus(UniversalEnum.ZERO.getNumber()); //sta = UniversalEnum.SUCCESSFUL.getValue(); } else { @@ -498,7 +514,7 @@ public class OperationLogAspect { DcPublishManage dcPublishManage = new DcPublishManage(); - if (Objects.equals(state, UniversalEnum.ZERO.getValue()) && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), UniversalEnum.TWO_HUNDRED.getValue())) { + if (Objects.equals(state, UniversalEnum.ZERO.getValue()) && Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("code")), UniversalEnum.TWO_HUNDRED.getValue()) && !Objects.equals(String.valueOf(((AjaxResult) jsonResult).get("msg")), UniversalEnum.FIVE_HUNDRED.getValue()) && status.get()) { dcPublishManage.setPublishStatus(UniversalEnum.ONE.getNumber());//发布状态1-成功2-失败 } else { dcPublishManage.setPublishStatus(UniversalEnum.TWO.getNumber());//发布状态1-成功2-失败 diff --git a/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml index 7dd11fc8..5d4fdb40 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml @@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" exits_inlets, facility_id, ramp_id, - cause_type, + cause_type, measure, classify, @@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{exitsInlets}, #{facilityId}, #{rampId}, - #{causeType}, + #{causeType}, #{measure}, #{classify}, @@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" exits_inlets = #{exitsInlets}, facility_id = #{facilityId}, ramp_id = #{rampId}, - cause_type = #{causeType}, + cause_type = #{causeType}, measure = #{measure}, classify = #{classify}, vehicle_type = #{vehicleType}, diff --git a/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml index 1cc1f5ea..47dfaaf6 100644 --- a/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml @@ -216,7 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dgsd.period_type = #{periodType} ORDER BY - dgsd.statistical_date DESC + dgsd.statistical_date DESC , i.stake_make asc diff --git a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml index 9073654c..552785d6 100644 --- a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml @@ -226,7 +226,13 @@ UNION ALL select 5 control_cause,'' cause_type,'警备任务' controlCauseName,'' causeTypeName UNION ALL select 6 control_cause,'' cause_type,'其他' controlCauseName,'' causeTypeName) t3 LEFT JOIN - (select t2.control_type,t2.control_cause,ifnull(t2.cause_type,'') cause_type,count(*) num,sum( + (select t2.control_type,t2.control_cause, + case when t2.cause_type = '4-1' then '' + when t2.cause_type = '4-2' then '' + when t2.cause_type = '4-3' then '' + when ISNULL(t2.cause_type) then '' + else cause_type end causeType, + count(*) num,sum( case when date_format(#{startTime},'%Y-%m-%d %H:%i:%s') >= date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') and (DATE_FORMAT(t1.end_time,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time)) then TIMESTAMPDIFF(MINUTE,t1.start_time,now()) @@ -252,8 +258,8 @@ and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s') and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time)) - GROUP BY t2.control_cause,t2.cause_type) t4 - on t3.control_cause = t4.control_cause and t3.cause_type = t4.cause_type + GROUP BY t2.control_cause,causeType) t4 + on t3.control_cause = t4.control_cause and t3.cause_type = t4.causeType ORDER BY t3.control_cause, t3.cause_type @@ -406,7 +412,7 @@