Kaynağa Gözat

今日查获上报数量bug修复

chenshudong 2 hafta önce
ebeveyn
işleme
bd399d1930

+ 13 - 13
airport-admin/src/main/java/com/sundot/airport/web/controller/home/AttendanceIndexStatsController.java

@@ -31,11 +31,10 @@ import com.sundot.airport.common.enums.SourceTypeEnum;
31
 import com.sundot.airport.common.exception.ServiceException;
31
 import com.sundot.airport.common.exception.ServiceException;
32
 import com.sundot.airport.common.utils.SecurityUtils;
32
 import com.sundot.airport.common.utils.SecurityUtils;
33
 import com.sundot.airport.common.utils.StringUtils;
33
 import com.sundot.airport.common.utils.StringUtils;
34
-import com.sundot.airport.item.domain.ItemSeizureRecord;
35
-import com.sundot.airport.item.domain.ItemSeizureRecordDTO;
34
+import com.sundot.airport.item.domain.ItemLargeScreenTotalSomeDto;
36
 import com.sundot.airport.item.domain.SimpleDutySchedule;
35
 import com.sundot.airport.item.domain.SimpleDutySchedule;
37
 import com.sundot.airport.item.mapper.SimpleDutyScheduleMapper;
36
 import com.sundot.airport.item.mapper.SimpleDutyScheduleMapper;
38
-import com.sundot.airport.item.service.IItemSeizureRecordService;
37
+import com.sundot.airport.item.service.ItemLargeScreenService;
39
 import com.sundot.airport.system.domain.vo.PositionInfoVO;
38
 import com.sundot.airport.system.domain.vo.PositionInfoVO;
40
 import com.sundot.airport.system.service.IBasePositionService;
39
 import com.sundot.airport.system.service.IBasePositionService;
41
 import com.sundot.airport.system.service.ISysDeptService;
40
 import com.sundot.airport.system.service.ISysDeptService;
@@ -46,6 +45,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
46
 import org.springframework.web.bind.annotation.RequestMapping;
45
 import org.springframework.web.bind.annotation.RequestMapping;
47
 import org.springframework.web.bind.annotation.RestController;
46
 import org.springframework.web.bind.annotation.RestController;
48
 
47
 
48
+import java.math.BigDecimal;
49
 import java.util.ArrayList;
49
 import java.util.ArrayList;
50
 import java.util.Arrays;
50
 import java.util.Arrays;
51
 import java.util.Calendar;
51
 import java.util.Calendar;
@@ -76,7 +76,7 @@ public class AttendanceIndexStatsController extends BaseController {
76
     private ISysUserService sysUserService;
76
     private ISysUserService sysUserService;
77
 
77
 
78
     @Autowired
78
     @Autowired
79
-    private IItemSeizureRecordService itemSeizureRecordService;
79
+    private ItemLargeScreenService itemLargeScreenService;
80
 
80
 
81
     @Autowired
81
     @Autowired
82
     private IAttendanceCheckRecordService attendanceCheckRecordService;
82
     private IAttendanceCheckRecordService attendanceCheckRecordService;
@@ -296,7 +296,7 @@ public class AttendanceIndexStatsController extends BaseController {
296
         stats.setOnDutyPersonnelCount(onDutyPersonnelCount);
296
         stats.setOnDutyPersonnelCount(onDutyPersonnelCount);
297
 
297
 
298
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
298
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
299
-        int todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "3");
299
+        BigDecimal todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "3");
300
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
300
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
301
 
301
 
302
         // 获取今日巡检问题数
302
         // 获取今日巡检问题数
@@ -334,7 +334,7 @@ public class AttendanceIndexStatsController extends BaseController {
334
         stats.setChannelOpenStats(channelStats);
334
         stats.setChannelOpenStats(channelStats);
335
 
335
 
336
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
336
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
337
-        int todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "1");
337
+        BigDecimal todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "1");
338
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
338
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
339
 
339
 
340
         // 获取今日巡检问题数
340
         // 获取今日巡检问题数
@@ -442,9 +442,9 @@ public class AttendanceIndexStatsController extends BaseController {
442
     /**
442
     /**
443
      * 获取今日查获上报数量
443
      * 获取今日查获上报数量
444
      */
444
      */
445
-    private int getTodaySeizureReportCount(Long deptId, Date startOfDay, Date endOfDay, String type) {
445
+    private BigDecimal getTodaySeizureReportCount(Long deptId, Date startOfDay, Date endOfDay, String type) {
446
         // 查询今日的查获上报记录数量(安检员和班组长上报的数量,不需要完成审核)
446
         // 查询今日的查获上报记录数量(安检员和班组长上报的数量,不需要完成审核)
447
-        ItemSeizureRecordDTO record = new ItemSeizureRecordDTO();
447
+        BaseLargeScreenQueryParamDto record = new BaseLargeScreenQueryParamDto();
448
         switch (type) {
448
         switch (type) {
449
             case "1":
449
             case "1":
450
                 record.setInspectStationId(deptId);
450
                 record.setInspectStationId(deptId);
@@ -458,11 +458,11 @@ public class AttendanceIndexStatsController extends BaseController {
458
             default:
458
             default:
459
                 break;
459
                 break;
460
         }
460
         }
461
-        record.setBeginTime(startOfDay);
462
-        record.setEndTime(endOfDay);
461
+        record.setStartDate(startOfDay);
462
+        record.setEndDate(endOfDay);
463
         // 不限制process_status,即包含所有状态的记录(不需要完成审核)
463
         // 不限制process_status,即包含所有状态的记录(不需要完成审核)
464
-        List<ItemSeizureRecord> seizureRecords = itemSeizureRecordService.selectItemSeizureRecordList(record);
465
-        return seizureRecords.size();
464
+        ItemLargeScreenTotalSomeDto result = itemLargeScreenService.getPcTotalSome(record);
465
+        return ObjectUtil.isNotEmpty(result) ? result.getTotal() : BigDecimal.ZERO;
466
     }
466
     }
467
 
467
 
468
     /**
468
     /**
@@ -537,7 +537,7 @@ public class AttendanceIndexStatsController extends BaseController {
537
         stats.setChannelOpenStats(channelStats);
537
         stats.setChannelOpenStats(channelStats);
538
 
538
 
539
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
539
         // 获取今日查获上报数量(安检员和班组长上报的数量,不需要完成审核)
540
-        int todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "2");
540
+        BigDecimal todaySeizureReportCount = getTodaySeizureReportCount(deptId, startOfDay, endOfDay, "2");
541
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
541
         stats.setTodaySeizureReportCount(todaySeizureReportCount);
542
 
542
 
543
         // 获取今日巡检问题数
543
         // 获取今日巡检问题数

+ 3 - 1
airport-common/src/main/java/com/sundot/airport/common/dto/BrigadeLeaderStats.java

@@ -3,6 +3,8 @@ package com.sundot.airport.common.dto;
3
 import io.swagger.annotations.ApiModelProperty;
3
 import io.swagger.annotations.ApiModelProperty;
4
 import lombok.Data;
4
 import lombok.Data;
5
 
5
 
6
+import java.math.BigDecimal;
7
+
6
 /**
8
 /**
7
  * 经理/大队行政考勤统计数据对象
9
  * 经理/大队行政考勤统计数据对象
8
  *
10
  *
@@ -29,7 +31,7 @@ public class BrigadeLeaderStats {
29
      * 今日查获上报数量
31
      * 今日查获上报数量
30
      */
32
      */
31
     @ApiModelProperty("今日查获上报数量")
33
     @ApiModelProperty("今日查获上报数量")
32
-    private Integer todaySeizureReportCount;
34
+    private BigDecimal todaySeizureReportCount;
33
     /**
35
     /**
34
      * 今日巡检问题数
36
      * 今日巡检问题数
35
      */
37
      */

+ 2 - 1
airport-common/src/main/java/com/sundot/airport/common/dto/SectionLeaderStats.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
4
 import io.swagger.annotations.ApiModelProperty;
4
 import io.swagger.annotations.ApiModelProperty;
5
 import lombok.Data;
5
 import lombok.Data;
6
 
6
 
7
+import java.math.BigDecimal;
7
 import java.util.Date;
8
 import java.util.Date;
8
 
9
 
9
 /**
10
 /**
@@ -38,7 +39,7 @@ public class SectionLeaderStats {
38
      * 今日查获上报数量
39
      * 今日查获上报数量
39
      */
40
      */
40
     @ApiModelProperty("今日查获上报数量")
41
     @ApiModelProperty("今日查获上报数量")
41
-    private Integer todaySeizureReportCount;
42
+    private BigDecimal todaySeizureReportCount;
42
     /**
43
     /**
43
      * 今日巡检问题数
44
      * 今日巡检问题数
44
      */
45
      */

+ 3 - 1
airport-common/src/main/java/com/sundot/airport/common/dto/StationLeaderStats.java

@@ -3,6 +3,8 @@ package com.sundot.airport.common.dto;
3
 import io.swagger.annotations.ApiModelProperty;
3
 import io.swagger.annotations.ApiModelProperty;
4
 import lombok.Data;
4
 import lombok.Data;
5
 
5
 
6
+import java.math.BigDecimal;
7
+
6
 /**
8
 /**
7
  * 站长/质检科考勤统计数据对象
9
  * 站长/质检科考勤统计数据对象
8
  *
10
  *
@@ -29,7 +31,7 @@ public class StationLeaderStats {
29
      * 今日查获上报数量
31
      * 今日查获上报数量
30
      */
32
      */
31
     @ApiModelProperty("今日查获上报数量")
33
     @ApiModelProperty("今日查获上报数量")
32
-    private Integer todaySeizureReportCount;
34
+    private BigDecimal todaySeizureReportCount;
33
     /**
35
     /**
34
      * 今日巡检问题数
36
      * 今日巡检问题数
35
      */
37
      */

+ 1 - 0
airport-item/src/main/resources/mapper/item/ItemLargeScreenMapper.xml

@@ -225,6 +225,7 @@
225
             and (isr.seizure_time >= #{startDate}
225
             and (isr.seizure_time >= #{startDate}
226
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
226
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
227
         </if>
227
         </if>
228
+        <if test="inspectStationId != null">and isr.inspect_station_id = #{inspectStationId}</if>
228
         <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
229
         <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
229
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
230
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
230
         <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
231
         <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>