blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/controller/AlarmController.java
@@ -394,7 +394,7 @@ types = Arrays.asList(type); //获取时间集合数据(今天及今天之前6天的日期) times = DateUtils.pastDay(new SimpleDateFormat("yyyy-MM-dd").format(new Date())); //1.统计7天内一键求助警情数量数据 //1.统计7天内一键求助警情数量数据 3-20 修改展示紧急求助 Map<String,Object> alarmData = alarmService.selectAlarmData(); alarmData.put("name","一键求助"); //2.统计7天内违禁品的数量数据 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
@@ -288,9 +288,7 @@ <select id="selectAlarmCount" resultType="java.lang.Integer"> SELECT count(*) FROM `sys_alarm` where waringType != '系统测试' and waringType!='主机重新上电' waringType = '紧急求救' and to_days(alarmTime) = to_days(curdate()) </select> @@ -317,7 +315,7 @@ left join ( select DATE_FORMAT(alarmTime,'%Y-%m-%d') as datetime, count(*) as count from sys_alarm where alarmType = '一键求助' where waringType = '紧急求救' group by DATE_FORMAT(alarmTime,'%Y-%m-%d') ) b on @@ -349,7 +347,7 @@ <!--查询本日,本周,本月 主动报警的数量--> <select id="selectAlarmSum" resultType="java.util.HashMap"> select '一键求助' name,ifnull(count(*),0 ) value from sys_alarm where alarmType = '一键求助' where waringType = '紧急求救' <if test="conditionVo.status==0"> and to_days(alarmTime) = to_days(now()) </if> @@ -361,7 +359,7 @@ </if> union all select '电话报警' name,ifnull(count(*),0 ) value from sys_alarm where alarmType = '电话报警' where waringType = '电话报警' <if test="conditionVo.status==0"> and to_days(alarmTime) = to_days(now()) </if> blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/parcel/service/impl/ParcelServiceImpl.java
@@ -255,18 +255,20 @@ Map<String, Object> objectMap = (Map<String, Object>) object;//取出list里面的值转为map //对比时间和objCode,危险品,刀具,枪支等 if (time.equals(objectMap.get("dateStr").toString()) ){ //枪支 if (objectMap.get("objCode").toString().equals("gan")) { count += Integer.parseInt(objectMap.get("objCount").toString()); } //刀具 if (objectMap.get("objCode").toString().equals("knife")) { count += Integer.parseInt(objectMap.get("objCount").toString()); } //爆炸物 if (objectMap.get("objCode").toString().equals("boomExplosive")) { count += Integer.parseInt(objectMap.get("objCount").toString()); } // //枪支 // if (objectMap.get("objCode").toString().equals("gan")) { // count += Integer.parseInt(objectMap.get("objCount").toString()); // } // //刀具 // if (objectMap.get("objCode").toString().equals("knife")) { // count += Integer.parseInt(objectMap.get("objCount").toString()); // } // //爆炸物 // if (objectMap.get("objCode").toString().equals("boomExplosive")) { // count += Integer.parseInt(objectMap.get("objCount").toString()); // } //3-20 修改不筛选危险品,由第三方筛选好 count += Integer.parseInt(objectMap.get("objCount").toString()); } } list.add(count);