lin.liu 1 тиждень тому
батько
коміт
3c7b215d29
61 змінених файлів з 436 додано та 466 видалено
  1. 6 0
      secure-producting-business/pom.xml
  2. 2 30
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/CheckRecordController.java
  3. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskErrorPO.java
  4. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskInfoPO.java
  5. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskRecordPO.java
  6. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/StatisticsUserLoginPO.java
  7. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/SysTotalStatisticsPO.java
  8. 30 0
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/bo/GridCheckFormBo.java
  9. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskErrorVO.java
  10. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskInfoVO.java
  11. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskRecordVO.java
  12. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/StatisticsUserLoginVO.java
  13. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/SysTotalStatisticsVO.java
  14. 2 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecord/ReqCreateCheckRecord.java
  15. 2 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecorditem/ReqCreateCheckRecordItem.java
  16. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskerror/ReqCreateQuartzTaskError.java
  17. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskerror/ReqModifyQuartzTaskError.java
  18. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqCreateQuartzTaskInfo.java
  19. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqModifyQuartzTaskInfo.java
  20. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqRunTaskRightNow.java
  21. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskrecord/ReqCreateQuartzTaskRecord.java
  22. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskrecord/ReqModifyQuartzTaskRecord.java
  23. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/statisticsuserlogin/ReqCreateStatisticsUserLogin.java
  24. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/statisticsuserlogin/ReqModifyStatisticsUserLogin.java
  25. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/systotalstatistics/ReqCreateSysTotalStatistics.java
  26. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/systotalstatistics/ReqModifySysTotalStatistics.java
  27. 2 6
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResListGrid4User.java
  28. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/statistics/ResNearMonthUserLogin.java
  29. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskError.java
  30. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskInfo.java
  31. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskRecord.java
  32. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchStatisticsUserCount.java
  33. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchStatisticsUserLogin.java
  34. 1 1
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchSysTotalStatistics.java
  35. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskErrorMapper.java
  36. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskInfoMapper.java
  37. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskRecordMapper.java
  38. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/StatisticsUserLoginMapper.java
  39. 2 2
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/SysTotalStatisticsMapper.java
  40. 29 7
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordMapperImpl.java
  41. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskErrorMapperImpl.java
  42. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskInfoMapperImpl.java
  43. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskRecordMapperImpl.java
  44. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/StatisticsUserLoginMapperImpl.java
  45. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/SysTotalStatisticsMapperImpl.java
  46. 27 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/quartz/QuartzExecutor.java
  47. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/quartz/QuartzMainJobFactory.java
  48. 194 58
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java
  49. 17 17
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/QuartzService.java
  50. 7 7
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/StatisticsService.java
  51. 4 4
      secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/UserStatisticsService.java
  52. 11 4
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ECheckFormStatus.java
  53. 3 0
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ECheckResult.java
  54. 0 69
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EPatrolPlanState.java
  55. 0 71
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EPatrolResult.java
  56. 20 24
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ERectifyStatus.java
  57. 0 67
      secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EVisitingApplyState.java
  58. 3 3
      secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/statistics/StatisticsController.java
  59. 9 9
      secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/system/QuartzController.java
  60. 1 1
      secure-producting-host/src/test/java/com/customs/cq/datacenter/host/UserStatisticsTest.java
  61. 0 6
      secure-producting-system/pom.xml

+ 6 - 0
secure-producting-business/pom.xml

@@ -24,5 +24,11 @@
             <artifactId>secure-producting-system</artifactId>
         </dependency>
         <!--==================================== 项目自身模块 - end ====================================-->
+
+        <!--quartz依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-quartz</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 2 - 30
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/controller/CheckRecordController.java

@@ -22,22 +22,18 @@
 */
 package com.customs.cq.datacenter.business.controller;
 
-import com.customs.cq.datacenter.business.domain.GridPersonPO;
 import com.customs.cq.datacenter.business.domain.vo.CheckRecordVO;
 import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqCreateCheckRecord;
-import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqModifyCheckRecord;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
 import com.customs.cq.datacenter.business.service.CheckRecordService;
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.PagerResult;
 import com.customs.cq.datacenter.common.core.controller.BasicController;
-import com.customs.cq.datacenter.common.core.domain.entity.SysUser;
 import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
 import com.customs.cq.datacenter.common.enums.EResultCode;
 import com.customs.cq.datacenter.common.exception.ServiceException;
 import com.customs.cq.datacenter.common.helper.LoginHelper;
 import com.customs.cq.datacenter.common.model.ReqListId;
-import com.customs.cq.datacenter.common.utils.ParameterUtil;
 import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
 import com.customs.cq.datacenter.common.validator.ParameterValidator;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -63,7 +59,7 @@ public class CheckRecordController extends BasicController {
      * @author lin.liu
      */
     @PostMapping(value = "submit")
-    public ExecutedResult<Long> submit(@RequestBody ReqCreateCheckRecord request) {
+    public ExecutedResult<String> submit(@RequestBody ReqCreateCheckRecord request) {
         //#region 参数验证
         ParameterValidator validator = new ParameterValidator()
                 // 非空
@@ -76,31 +72,7 @@ public class CheckRecordController extends BasicController {
             return failed(result.getErrorMsg());
         }
         //#endregion
-        return this.service.create(request);
-    }
-
-    /**
-     * 编辑[隐患检查记录]
-     * @author lin.liu
-     * @description 编辑[隐患检查记录]
-     */
-    @PostMapping(value = "modify")
-    public ExecutedResult<String> modify(@RequestBody ReqModifyCheckRecord request) {
-        //#region 参数验证
-        ParameterValidator validator = new ParameterValidator()
-                // 必须大于0
-                .addGreater(ParameterUtil.named("[隐患检查记录]id"), request.getId(), 0L)
-                // 非空
-                //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName())
-                // 限制最大长度
-                //.addLengthMax(ParameterUtil.named("名称"), request.getName(), Constants.LENGTH_MAX50)
-                ;
-        ParameterValidateResult result = validator.validate();
-        if (result.getIsFiled()) {
-            return failed(result.getErrorMsg());
-        }
-        //#endregion
-        return this.service.modify(request);
+        return this.service.submit(request);
     }
 
     /**

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/QuartzTaskErrorPO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskErrorPO.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain;
+package com.customs.cq.datacenter.business.domain;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/QuartzTaskInfoPO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskInfoPO.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain;
+package com.customs.cq.datacenter.business.domain;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/QuartzTaskRecordPO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/QuartzTaskRecordPO.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain;
+package com.customs.cq.datacenter.business.domain;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/StatisticsUserLoginPO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/StatisticsUserLoginPO.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain;
+package com.customs.cq.datacenter.business.domain;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/SysTotalStatisticsPO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/SysTotalStatisticsPO.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain;
+package com.customs.cq.datacenter.business.domain;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;

+ 30 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/bo/GridCheckFormBo.java

@@ -0,0 +1,30 @@
+package com.customs.cq.datacenter.business.domain.bo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+@Data
+public class GridCheckFormBo {
+    /**
+     * 主键
+     */
+    @TableId
+    @TableField(value = "ID")
+    private Long id;
+    /**
+     * 所属网格
+     */
+    @TableField(value = "GRID_ID")
+    private Long gridId;
+    /**
+     * 数据创建时间
+     */
+    @TableField(value = "CREATE_TIME")
+    private Long createTime;
+    /**
+     * 状态 ECheckFormStatus
+     */
+    @TableField(value = "STATUS")
+    private Integer status;
+}

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/vo/QuartzTaskErrorVO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskErrorVO.java

@@ -20,12 +20,12 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain.vo;
+package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
-import com.customs.cq.datacenter.system.domain.QuartzTaskErrorPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskErrorPO;
 import lombok.Data;
 
 import java.util.Objects;

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/vo/QuartzTaskInfoVO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskInfoVO.java

@@ -20,12 +20,12 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain.vo;
+package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.system.domain.QuartzTaskInfoPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskInfoPO;
 import lombok.Data;
 
 import java.util.Objects;

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/vo/QuartzTaskRecordVO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/QuartzTaskRecordVO.java

@@ -20,13 +20,13 @@
  * #                  神兽保佑
  * #                  永无BUG!
  */
-package com.customs.cq.datacenter.system.domain.vo;
+package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
 import com.customs.cq.datacenter.common.enums.EHandleStatus;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.system.domain.QuartzTaskRecordPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskRecordPO;
 import lombok.Data;
 
 import java.util.Objects;

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/vo/StatisticsUserLoginVO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/StatisticsUserLoginVO.java

@@ -20,12 +20,12 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain.vo;
+package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.system.domain.StatisticsUserLoginPO;
+import com.customs.cq.datacenter.business.domain.StatisticsUserLoginPO;
 import lombok.Data;
 
 import java.util.Objects;

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/domain/vo/SysTotalStatisticsVO.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/domain/vo/SysTotalStatisticsVO.java

@@ -20,12 +20,12 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.domain.vo;
+package com.customs.cq.datacenter.business.domain.vo;
 
 import com.customs.cq.datacenter.common.core.vo.BasicVO;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
-import com.customs.cq.datacenter.system.domain.SysTotalStatisticsPO;
+import com.customs.cq.datacenter.business.domain.SysTotalStatisticsPO;
 import lombok.Data;
 
 import java.util.Objects;

+ 2 - 6
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecord/ReqCreateCheckRecord.java

@@ -35,13 +35,9 @@ import java.util.List;
 @Data
 public class ReqCreateCheckRecord {
 	/**
-	 * 所属网格
+	 * 检查记录id
 	 */
-	private Long gridId;
-	/**
-	 * 所属检查表
-	 */
-	private Long checkFormId;
+	private Long id;
 	/**
 	 * 关区代码
 	 */

+ 2 - 6
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecorditem/ReqCreateCheckRecordItem.java

@@ -33,13 +33,9 @@ import java.time.LocalDate;
 @Data
 public class ReqCreateCheckRecordItem {
 	/**
-	 * 所属检查表
+	 * 检查项id
 	 */
-	private Long checkFormId;
-	/**
-	 * 检查项
-	 */
-	private String itemName;
+	private Long id;
 	/**
 	 * 检查结果 ECheckResult
 	 */

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskerror/ReqCreateQuartzTaskError.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskerror/ReqCreateQuartzTaskError.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskerror;
+package com.customs.cq.datacenter.business.entity.request.quartztaskerror;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskerror/ReqModifyQuartzTaskError.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskerror/ReqModifyQuartzTaskError.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskerror;
+package com.customs.cq.datacenter.business.entity.request.quartztaskerror;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskinfo/ReqCreateQuartzTaskInfo.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqCreateQuartzTaskInfo.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskinfo;
+package com.customs.cq.datacenter.business.entity.request.quartztaskinfo;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskinfo/ReqModifyQuartzTaskInfo.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqModifyQuartzTaskInfo.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskinfo;
+package com.customs.cq.datacenter.business.entity.request.quartztaskinfo;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskinfo/ReqRunTaskRightNow.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskinfo/ReqRunTaskRightNow.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.request.quartztaskinfo;
+package com.customs.cq.datacenter.business.entity.request.quartztaskinfo;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskrecord/ReqCreateQuartzTaskRecord.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskrecord/ReqCreateQuartzTaskRecord.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskrecord;
+package com.customs.cq.datacenter.business.entity.request.quartztaskrecord;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/quartztaskrecord/ReqModifyQuartzTaskRecord.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/quartztaskrecord/ReqModifyQuartzTaskRecord.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.quartztaskrecord;
+package com.customs.cq.datacenter.business.entity.request.quartztaskrecord;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/statisticsuserlogin/ReqCreateStatisticsUserLogin.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/statisticsuserlogin/ReqCreateStatisticsUserLogin.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.statisticsuserlogin;
+package com.customs.cq.datacenter.business.entity.request.statisticsuserlogin;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/statisticsuserlogin/ReqModifyStatisticsUserLogin.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/statisticsuserlogin/ReqModifyStatisticsUserLogin.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.statisticsuserlogin;
+package com.customs.cq.datacenter.business.entity.request.statisticsuserlogin;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/systotalstatistics/ReqCreateSysTotalStatistics.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/systotalstatistics/ReqCreateSysTotalStatistics.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.systotalstatistics;
+package com.customs.cq.datacenter.business.entity.request.systotalstatistics;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/request/systotalstatistics/ReqModifySysTotalStatistics.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/systotalstatistics/ReqModifySysTotalStatistics.java

@@ -20,7 +20,7 @@
 #                  神兽保佑
 #                  永无BUG!
 */
-package com.customs.cq.datacenter.system.entity.request.systotalstatistics;
+package com.customs.cq.datacenter.business.entity.request.systotalstatistics;
 
 import lombok.Data;
 

+ 2 - 6
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResListGrid4User.java

@@ -1,5 +1,6 @@
 package com.customs.cq.datacenter.business.entity.response.check;
 
+import com.customs.cq.datacenter.common.enums.ECheckFormStatus;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import lombok.Data;
 
@@ -14,11 +15,6 @@ public class ResListGrid4User {
     private Integer checkStatus;
 
     public String getCheckStatusTxt() {
-        EYesOrNo status = EYesOrNo.getByValue(this.getCheckStatus());
-        String txt = "未填报";
-        if (Objects.equals(this.checkStatus, EYesOrNo.YES.getValue())) {
-            txt = "已填报";
-        }
-        return txt;
+        return ECheckFormStatus.getByValue(this.getCheckStatus()).getDesc();
     }
 }

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/response/statistics/ResNearMonthUserLogin.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/statistics/ResNearMonthUserLogin.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.response.statistics;
+package com.customs.cq.datacenter.business.entity.response.statistics;
 
 import lombok.Data;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchQuartzTaskError.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskError.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchQuartzTaskInfo.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskInfo.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchQuartzTaskRecord.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchQuartzTaskRecord.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 import lombok.Data;

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchStatisticsUserCount.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchStatisticsUserCount.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchStatisticsUserLogin.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchStatisticsUserLogin.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 

+ 1 - 1
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/entity/search/SearchSysTotalStatistics.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/search/SearchSysTotalStatistics.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.entity.search;
+package com.customs.cq.datacenter.business.entity.search;
 
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
 

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/QuartzTaskErrorMapper.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskErrorMapper.java

@@ -1,7 +1,7 @@
-package com.customs.cq.datacenter.system.mapper;
+package com.customs.cq.datacenter.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskErrorPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskErrorPO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/QuartzTaskInfoMapper.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskInfoMapper.java

@@ -1,7 +1,7 @@
-package com.customs.cq.datacenter.system.mapper;
+package com.customs.cq.datacenter.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskInfoPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskInfoPO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/QuartzTaskRecordMapper.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/QuartzTaskRecordMapper.java

@@ -1,7 +1,7 @@
-package com.customs.cq.datacenter.system.mapper;
+package com.customs.cq.datacenter.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskRecordPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskRecordPO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/StatisticsUserLoginMapper.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/StatisticsUserLoginMapper.java

@@ -1,7 +1,7 @@
-package com.customs.cq.datacenter.system.mapper;
+package com.customs.cq.datacenter.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.customs.cq.datacenter.system.domain.StatisticsUserLoginPO;
+import com.customs.cq.datacenter.business.domain.StatisticsUserLoginPO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 2 - 2
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/SysTotalStatisticsMapper.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/SysTotalStatisticsMapper.java

@@ -1,7 +1,7 @@
-package com.customs.cq.datacenter.system.mapper;
+package com.customs.cq.datacenter.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.customs.cq.datacenter.system.domain.SysTotalStatisticsPO;
+import com.customs.cq.datacenter.business.domain.SysTotalStatisticsPO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 29 - 7
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/CheckRecordMapperImpl.java

@@ -1,24 +1,29 @@
 package com.customs.cq.datacenter.business.mapper.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.customs.cq.datacenter.business.domain.GridPersonPO;
+import com.customs.cq.datacenter.business.domain.bo.GridCheckFormBo;
+import com.customs.cq.datacenter.common.constant.Constants;
 import com.customs.cq.datacenter.common.enums.EOrderBy;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
-import com.customs.cq.datacenter.common.utils.ListUtil;
-import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
-import com.customs.cq.datacenter.common.utils.NumericUtil;
+import com.customs.cq.datacenter.common.utils.*;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.common.utils.StringUtil;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import org.springframework.boot.json.GsonJsonParser;
 import org.springframework.stereotype.Repository;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
 import com.customs.cq.datacenter.business.domain.CheckRecordPO;
 import com.customs.cq.datacenter.business.mapper.CheckRecordMapper;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -126,13 +131,30 @@ public class CheckRecordMapperImpl extends BasicMapper<CheckRecordPO> {
         return mapper.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper);
     }
 
-    public List<Long> checkToday4Grid(List<Long> listGridId) {
+    public List<GridCheckFormBo> checkToday4Grid(List<Long> listGridId) {
+        List<String> listColumn = new ArrayList<>();
+        listColumn.add("ID");
+        listColumn.add("GRID_ID");
+        listColumn.add("CREATE_TIME");
+        listColumn.add("STATUS");
+
         LambdaQueryWrapper<CheckRecordPO> where = super.getQuery();
-        where.select(CheckRecordPO.class, c -> c.getColumn().equals("GRID_ID"));
+        where.select(CheckRecordPO.class, c -> listColumn.contains(c.getColumn()));
         where.in(CheckRecordPO::getGridId, listGridId);
 
         Long today = LocalDateTimeUtil.getTimeStamp(LocalDateTimeUtil.todayFirst()).getTime();
         where.gt(CheckRecordPO::getCreateTime, today);
-        return mapper.selectMaps(where).stream().map(c -> NumericUtil.tryParseLong(c.get("GRID_ID"))).collect(Collectors.toList());
+        List<Object> list = mapper.selectObjs(where);
+        return BeanUtil.copyToList(list, GridCheckFormBo.class);
+    }
+
+    public Long checkDate4Grid(Long gridId, String dateStr) {
+        LambdaQueryWrapper<CheckRecordPO> where = super.getQuery();
+        where.select(CheckRecordPO.class, c -> c.getColumn().equals("GRID_ID"));
+        where.eq(CheckRecordPO::getGridId, gridId);
+
+        Long date = LocalDateTimeUtil.getTimeStamp(dateStr, Constants.STR_DATE).getTime();
+        where.gt(CheckRecordPO::getCreateTime, date);
+        return mapper.selectCount(where);
     }
 }

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/impl/QuartzTaskErrorMapperImpl.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskErrorMapperImpl.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.mapper.impl;
+package com.customs.cq.datacenter.business.mapper.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -8,11 +8,11 @@ import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskErrorPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskErrorPO;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskError;
-import com.customs.cq.datacenter.system.mapper.QuartzTaskErrorMapper;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskError;
+import com.customs.cq.datacenter.business.mapper.QuartzTaskErrorMapper;
 import org.springframework.stereotype.Repository;
 
 /**

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/impl/QuartzTaskInfoMapperImpl.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskInfoMapperImpl.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.mapper.impl;
+package com.customs.cq.datacenter.business.mapper.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,11 +9,11 @@ import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.utils.StringUtil;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskInfoPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskInfoPO;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskInfo;
-import com.customs.cq.datacenter.system.mapper.QuartzTaskInfoMapper;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskInfo;
+import com.customs.cq.datacenter.business.mapper.QuartzTaskInfoMapper;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/impl/QuartzTaskRecordMapperImpl.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/QuartzTaskRecordMapperImpl.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.mapper.impl;
+package com.customs.cq.datacenter.business.mapper.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -9,11 +9,11 @@ import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.utils.StringUtil;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
-import com.customs.cq.datacenter.system.domain.QuartzTaskRecordPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskRecordPO;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskRecord;
-import com.customs.cq.datacenter.system.mapper.QuartzTaskRecordMapper;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskRecord;
+import com.customs.cq.datacenter.business.mapper.QuartzTaskRecordMapper;
 import org.springframework.stereotype.Repository;
 
 /**

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/impl/StatisticsUserLoginMapperImpl.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/StatisticsUserLoginMapperImpl.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.mapper.impl;
+package com.customs.cq.datacenter.business.mapper.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -8,11 +8,11 @@ import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
-import com.customs.cq.datacenter.system.domain.StatisticsUserLoginPO;
+import com.customs.cq.datacenter.business.domain.StatisticsUserLoginPO;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.system.entity.search.SearchStatisticsUserLogin;
-import com.customs.cq.datacenter.system.mapper.StatisticsUserLoginMapper;
+import com.customs.cq.datacenter.business.entity.search.SearchStatisticsUserLogin;
+import com.customs.cq.datacenter.business.mapper.StatisticsUserLoginMapper;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/mapper/impl/SysTotalStatisticsMapperImpl.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/mapper/impl/SysTotalStatisticsMapperImpl.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.mapper.impl;
+package com.customs.cq.datacenter.business.mapper.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -8,11 +8,11 @@ import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.ListUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.core.mapper.BasicMapper;
-import com.customs.cq.datacenter.system.domain.SysTotalStatisticsPO;
+import com.customs.cq.datacenter.business.domain.SysTotalStatisticsPO;
 import com.customs.cq.datacenter.common.model.OrderByDTO;
 import com.customs.cq.datacenter.common.model.SearchBasicDTO;
-import com.customs.cq.datacenter.system.entity.search.SearchSysTotalStatistics;
-import com.customs.cq.datacenter.system.mapper.SysTotalStatisticsMapper;
+import com.customs.cq.datacenter.business.entity.search.SearchSysTotalStatistics;
+import com.customs.cq.datacenter.business.mapper.SysTotalStatisticsMapper;
 import org.springframework.stereotype.Repository;
 
 /**

+ 27 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/quartz/QuartzExecutor.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/quartz/QuartzExecutor.java

@@ -1,13 +1,14 @@
-package com.customs.cq.datacenter.system.quartz;
+package com.customs.cq.datacenter.business.quartz;
 
+import com.customs.cq.datacenter.business.service.CheckRecordService;
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.constant.Constants;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.utils.StringUtil;
-import com.customs.cq.datacenter.system.mapper.impl.QuartzTaskErrorMapperImpl;
-import com.customs.cq.datacenter.system.mapper.impl.QuartzTaskRecordMapperImpl;
-import com.customs.cq.datacenter.system.service.impl.UserStatisticsService;
+import com.customs.cq.datacenter.business.mapper.impl.QuartzTaskErrorMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.QuartzTaskRecordMapperImpl;
+import com.customs.cq.datacenter.business.service.UserStatisticsService;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
@@ -31,6 +32,8 @@ public class QuartzExecutor {
 
     @Autowired
     private UserStatisticsService userStatisticsService;
+    @Autowired
+    private CheckRecordService checkRecordService;
 
     /**
      * 执行job
@@ -92,4 +95,24 @@ public class QuartzExecutor {
             return ExecutedResult.failed(e.toString());
         }
     }
+
+    /***
+     * job执行器-每日生成待检记录
+     * @param jobParameter 执行参数
+     */
+    public ExecutedResult<String> initCheckRecord(String jobParameter) {
+        try {
+            String today = "";
+            if (StringUtil.isMatch(jobParameter, Constants.REGEX_DATE)) {
+                today = jobParameter;
+            }
+            if (StringUtil.isNullOrEmpty(today)) {
+                today = LocalDateTimeUtil.todayStr();
+            }
+            checkRecordService.initCheckRecord(today);
+            return ExecutedResult.success();
+        } catch (Exception e) {
+            return ExecutedResult.failed(e.toString());
+        }
+    }
 }

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/quartz/QuartzMainJobFactory.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/quartz/QuartzMainJobFactory.java

@@ -1,13 +1,13 @@
-package com.customs.cq.datacenter.system.quartz;
+package com.customs.cq.datacenter.business.quartz;
 
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.enums.EHandleStatus;
 import com.customs.cq.datacenter.common.enums.EState;
 import com.customs.cq.datacenter.common.utils.ExceptionUtil;
 import com.customs.cq.datacenter.common.utils.SerializeUtil;
-import com.customs.cq.datacenter.system.domain.QuartzTaskInfoPO;
-import com.customs.cq.datacenter.system.domain.QuartzTaskRecordPO;
-import com.customs.cq.datacenter.system.service.impl.QuartzService;
+import com.customs.cq.datacenter.business.domain.QuartzTaskInfoPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskRecordPO;
+import com.customs.cq.datacenter.business.service.QuartzService;
 import org.quartz.DisallowConcurrentExecution;
 import org.quartz.Job;
 import org.quartz.JobDataMap;

+ 194 - 58
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/CheckRecordService.java

@@ -24,38 +24,31 @@ package com.customs.cq.datacenter.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Sequence;
-import com.customs.cq.datacenter.business.domain.CheckRecordPO;
-import com.customs.cq.datacenter.business.domain.DangerCheckFormPO;
-import com.customs.cq.datacenter.business.domain.GridInfoPO;
-import com.customs.cq.datacenter.business.domain.GridPersonPO;
+import com.customs.cq.datacenter.business.domain.*;
+import com.customs.cq.datacenter.business.domain.bo.GridCheckFormBo;
 import com.customs.cq.datacenter.business.domain.vo.CheckRecordVO;
 import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqCreateCheckRecord;
-import com.customs.cq.datacenter.business.entity.request.checkrecord.ReqModifyCheckRecord;
 import com.customs.cq.datacenter.business.entity.request.checkrecorditem.ReqCreateCheckRecordItem;
 import com.customs.cq.datacenter.business.entity.response.check.ResListGrid4User;
 import com.customs.cq.datacenter.business.entity.search.SearchCheckRecord;
-import com.customs.cq.datacenter.business.mapper.impl.CheckRecordMapperImpl;
-import com.customs.cq.datacenter.business.mapper.impl.DangerCheckFormMapperImpl;
-import com.customs.cq.datacenter.business.mapper.impl.GridInfoMapperImpl;
-import com.customs.cq.datacenter.business.mapper.impl.GridPersonMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.*;
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.PagerResult;
 import com.customs.cq.datacenter.common.constant.Constants;
 import com.customs.cq.datacenter.common.core.domain.entity.SysUser;
 import com.customs.cq.datacenter.common.core.domain.model.LoginUser;
 import com.customs.cq.datacenter.common.core.service.BasicService;
-import com.customs.cq.datacenter.common.enums.ECheckFormStatus;
-import com.customs.cq.datacenter.common.enums.ECheckResult;
-import com.customs.cq.datacenter.common.enums.EResultCode;
-import com.customs.cq.datacenter.common.enums.EYesOrNo;
+import com.customs.cq.datacenter.common.enums.*;
 import com.customs.cq.datacenter.common.exception.ServiceException;
 import com.customs.cq.datacenter.common.helper.LoginHelper;
 import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
 import com.customs.cq.datacenter.system.mapper.SysDictDataMapper;
 import com.customs.cq.datacenter.system.mapper.SysUserMapper;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.util.ArrayList;
@@ -69,11 +62,14 @@ import java.util.stream.Collectors;
  * @author lin.liu
  * @description 隐患检查记录
  */
+@Slf4j
 @Service
 public class CheckRecordService extends BasicService {
     @Autowired
     private CheckRecordMapperImpl dao;
     @Autowired
+    private CheckRecordItemMapperImpl checkRecordItemMapper;
+    @Autowired
     private SysDictDataMapper dictDataMapper;
     @Autowired
     private GridInfoMapperImpl gridInfoMapper;
@@ -82,6 +78,8 @@ public class CheckRecordService extends BasicService {
     @Autowired
     private DangerCheckFormMapperImpl checkFormMapper;
     @Autowired
+    private DangerCheckItemMapperImpl checkItemMapper;
+    @Autowired
     private SysUserMapper userMapper;
 
     @Autowired
@@ -91,11 +89,12 @@ public class CheckRecordService extends BasicService {
 
 
 
-    public ExecutedResult<Long> create(ReqCreateCheckRecord request) {
-        // 检验网格
-        GridInfoPO grid = gridInfoService.check4IdExc(request.getGridId());
-        // 校验隐患检查单
-        DangerCheckFormPO form = dangerCheckFormService.check4IdExc(request.getCheckFormId());
+    public ExecutedResult<String> submit(ReqCreateCheckRecord request) {
+        // 校验检查记录
+        ExecutedResult<CheckRecordPO> checkRecord = this.check4Id(request.getId());
+        if (checkRecord.isFailed()) {
+            return ExecutedResult.failed(checkRecord.getMsg());
+        }
         // 数据字典 - 关区代码
         Map<String, String> mapDicData = dictDataMapper.map4Type("sys_customs_code");
         if (!mapDicData.containsKey(request.getCustoms())) {
@@ -112,26 +111,12 @@ public class CheckRecordService extends BasicService {
 
         // 转换po
         CheckRecordPO item = CopierUtil.mapTo(request, CheckRecordPO.class);
-        // 设置主键
-        item.setId(new Sequence(null).nextId());
-        // 检查单号
-        item.setCheckFormNo("CK" + LocalDateTimeUtil.toFormatString(LocalDateTime.now(), "yyyyMMddHHmmssSSS") + RandVerifyCode.complexCode(6));
-        // 检查表名称
-        item.setCheckFormName(form.getName());
-        // 所属部门
-        item.setDepartment(loginUser.getDeptId().toString());
-        // 部门名称
-        item.setDepartmentName(loginUser.getDeptName());
         // 关区名称
         item.setCustomsName(mapDicData.get(request.getCustoms()));
         // 检查时间
         item.setCheckTime(LocalDateTimeUtil.getTimeStamp(request.getCheckTime(), Constants.STR_DATE).getTime());
         // 检查人员
         item.setCheckPerson(loginUser.getUserId().toString());
-        // 网格类型
-        item.setGridCategory(grid.getGridCategory());
-        // 隐患分类
-        item.setDangerCategory(grid.getDangerCategory());
         // 附件列表
         item.setAttachmentList("");
         if (ListUtil.isNotNullOrEmpty(request.getListAttachment())) {
@@ -171,35 +156,49 @@ public class CheckRecordService extends BasicService {
         if (Objects.equals(request.getIsSubmit(), EYesOrNo.YES.getValue())) {
             item.setStatus(ECheckFormStatus.SUBMITTED.getValue());
         }
-        // 设置记录创建时间
-        item.setCreateTime(now);
-        // 是否删除(逻辑删除)初始值
-        item.setIsDelete(EYesOrNo.NO.getValue());
-        // 创建人信息
-        item.setCreateBy(loginUser.getUserId().toString());
-        item.setCreateByName(loginUser.getUsername());
-
-        int result = this.dao.insert(item);
-        if (result != 1) {
-            return ExecutedResult.failed("创建[隐患检查记录]失败。");
+        // 修改人信息
+        item.setUpdateBy(loginUser.getUserId().toString());
+        item.setUpdateByName(loginUser.getUsername());
+        item.setUpdateTime(LocalDateTimeUtil.getTimeStamp(now));
+
+        // 构建检查项列表
+        List<CheckRecordItemPO> listItem = request.getListItem().stream().map(c -> {
+            CheckRecordItemPO checkItem = new CheckRecordItemPO();
+            checkItem.setId(c.getId());
+            checkItem.setCustoms(item.getCustoms());
+            checkItem.setCustomsName(item.getCustomsName());
+            checkItem.setCheckTime(item.getCheckTime());
+            checkItem.setCheckPerson(item.getCheckPerson());
+            checkItem.setRectifyStatus(c.getCheckResult());
+            checkItem.setDangerDescription(c.getDangerDescription());
+            checkItem.setRectifyPlan(c.getRectifyPlan());
+            checkItem.setRectifyDeadline(c.getRectifyDeadline());
+            checkItem.setRectifyStatus(ERectifyStatus.NONE.getValue());
+            if (StringUtil.isNotNullOrEmpty(c.getRectifyPlan())) {
+                checkItem.setRectifySubmitTime(now);
+                checkItem.setRectifyStatus(ERectifyStatus.WAITING.getValue());
+            }
+
+            return checkItem;
+        }).collect(Collectors.toList());
+
+        try {
+            this.submitCheckRecord(item, listItem);
+        } catch (Exception e) {
+            return ExecutedResult.failed("提交检查单失败." + e.getMessage());
         }
-        return ExecutedResult.success(item.getId());
+        return ExecutedResult.success();
     }
-
-    public ExecutedResult<String> modify(ReqModifyCheckRecord request) {
-        // 验证记录是否存在
-        ExecutedResult<CheckRecordPO> checkExists = this.check4Id(request.getId());
-        if (checkExists.isFailed()) {
-            return ExecutedResult.failed(checkExists.getMsg());
+    @Transactional(rollbackFor = Exception.class)
+    private void submitCheckRecord(CheckRecordPO item, List<CheckRecordItemPO> listItem) throws Exception {
+        boolean updateCheckItem = checkRecordItemMapper.update(listItem);
+        if (!updateCheckItem) {
+            throw new Exception("更新检查项失败");
         }
-        // 转换po
-        CheckRecordPO item = CopierUtil.mapTo(request, CheckRecordPO.class);
-
-        int result = this.dao.updateById(item);
+        int result = dao.updateById(item);
         if (result != 1) {
-            return ExecutedResult.failed("编辑[隐患检查记录]失败。");
+            throw new Exception("更新检查记录失败");
         }
-        return ExecutedResult.success();
     }
 
     public ExecutedResult<CheckRecordVO> get(Long id) {
@@ -287,7 +286,8 @@ public class CheckRecordService extends BasicService {
         // 网格隐患分类列表
         Map<Long, DangerCheckFormPO> mapForm = checkFormMapper.map4DangerCategory(list.stream().map(GridInfoPO::getDangerCategory).collect(Collectors.toList()));
         // 网格今日隐患检查记录
-        List<Long> listTodayFinishGridId = dao.checkToday4Grid(listGridId);
+        List<GridCheckFormBo> listTodayFinishGridId = dao.checkToday4Grid(listGridId);
+        Map<Long, GridCheckFormBo> map4Grid = listTodayFinishGridId.stream().collect(Collectors.toMap(GridCheckFormBo::getGridId, c -> c));
         List<ResListGrid4User> listVo = list.stream().map(c -> {
             DangerCheckFormPO form = mapForm.get(c.getDangerCategory());
 
@@ -300,10 +300,146 @@ public class CheckRecordService extends BasicService {
                 item.setCheckFormId(form.getId());
                 item.setCheckFormName(form.getName());
             }
-            item.setCheckStatus(listTodayFinishGridId.contains(c.getId()) ? 1 : 0);
+            item.setCheckStatus(ECheckFormStatus.WAITING.getValue());
+            if (map4Grid.containsKey(c.getId())) {
+                item.setCheckStatus(map4Grid.get(c.getId()).getStatus());
+            }
 
             return item;
         }).collect(Collectors.toList());
         return ExecutedResult.success(listVo);
     }
+
+    /**
+     * 指定日期生成待检记录
+     * @param date 指定日期
+     */
+    public void initCheckRecord(String date) {
+        // 获取所有隐患检查表
+        List<DangerCheckFormPO> listForm = checkFormMapper.selectList(null);
+        // 获取所有隐患检查表-检查项
+        List<DangerCheckItemPO> listCheckItem = checkItemMapper.selectList(null);
+        Map<Long, List<DangerCheckItemPO>> mapCheckItem4Form = listCheckItem.stream().collect(Collectors.groupingBy(DangerCheckItemPO::getCheckFormId));
+
+        // 检查单按隐患分类分组
+        Map<Long, DangerCheckFormPO> mapForm4DangerCategory = listForm.stream().collect(Collectors.toMap(DangerCheckFormPO::getDangerCategory, c -> c));
+
+        // 获取所有网格
+        List<GridInfoPO> listGrid = gridInfoMapper.selectList(null);
+
+        // 遍历网格
+        for (GridInfoPO grid : listGrid) {
+            // 指定网格的所有网格员
+            if (!mapForm4DangerCategory.containsKey(grid.getDangerCategory())) {
+                log.warn("指定日期生成待检记录, 此网格分类没有配置隐患检查表!{}", (grid.getGridName() + " - " + grid.getDangerCategory()));
+                continue;
+            }
+            // 今日是否已生成检查记录
+            Long count4Date = dao.checkDate4Grid(grid.getId(), date);
+            if (count4Date.compareTo(0L) > 0) {
+                continue;
+            }
+            DangerCheckFormPO form = mapForm4DangerCategory.get(grid.getDangerCategory());
+
+            Long now = LocalDateTimeUtil.nowTimeStamp();
+
+            // 生成待检记录
+            CheckRecordPO item = new CheckRecordPO();
+            // 设置主键
+            item.setId(new Sequence(null).nextId());
+            // 检查单号
+            item.setCheckFormNo("CK" + LocalDateTimeUtil.toFormatString(LocalDateTime.now(), "yyyyMMddHHmmss") + RandVerifyCode.complexCode(6));
+            // 所属网格
+            item.setGridId(grid.getId());
+            // 所属检查表
+            item.setCheckFormId(form.getId());
+            // 检查表名称
+            item.setCheckFormName(form.getName());
+            // 所属部门
+            item.setDepartment(grid.getDepartment());
+            // 部门名称
+            item.setDepartmentName(grid.getDepartmentName());
+            // 所属关区
+            item.setCustoms("");
+            // 关区名称
+            item.setCustomsName("");
+            // 检查时间
+            item.setCheckTime(0L);
+            // 检查人员
+            item.setCheckPerson("");
+            // 检查人员名称
+            item.setCheckPersonName("");
+            // 联系方式
+            item.setContactInfo("");
+            // 网格类型
+            item.setGridCategory(grid.getGridCategory());
+            // 隐患分类
+            item.setDangerCategory(grid.getDangerCategory());
+            // 附件列表
+            item.setAttachmentList("");
+            // 是否有隐患
+            item.setHasDanger(EYesOrNo.NO.getValue());
+            // 是否已提供整改措施
+            item.setHasRectifyPlan(EYesOrNo.NO.getValue());
+            // 整改措施提交时间
+            item.setRectifySubmitTime(0L);
+            //整改期限
+            item.setRectifyDeadline(0L);
+            // 状态
+            item.setStatus(ECheckFormStatus.WAITING.getValue());
+            // 数据创建时间
+            item.setCreateTime(now);
+            // 数据创建人
+            item.setCreateBy("system");
+            item.setCreateByName("系统");
+            // 是否删除(逻辑删除)初始值
+            item.setIsDelete(EYesOrNo.NO.getValue());
+
+            // 生成检查单的检查项
+            List<CheckRecordItemPO> listItem = mapCheckItem4Form.get(form.getId()).stream().map(c -> {
+                CheckRecordItemPO checkItem = new CheckRecordItemPO();
+                checkItem.setCheckRecordId(item.getId());
+                checkItem.setGridId(grid.getId());
+                checkItem.setCheckFormId(form.getId());
+                checkItem.setCheckFormName(form.getName());
+                checkItem.setDepartment(grid.getDepartment());
+                checkItem.setDepartmentName(grid.getDepartmentName());
+                checkItem.setCustoms("");
+                checkItem.setCustomsName("");
+                checkItem.setItemName(c.getItemName());
+                checkItem.setCheckTime(0L);
+                checkItem.setCheckPerson("");
+                checkItem.setCheckResult(0);
+                checkItem.setDangerDescription("");
+                checkItem.setRectifyPlan("");
+                checkItem.setRectifySubmitTime(0L);
+                checkItem.setRectifyDeadline(0L);
+                checkItem.setRectifyStatus(ERectifyStatus.NONE.getValue());
+                checkItem.setRectifyTime(0L);
+                checkItem.setIsOnTime(EYesOrNo.NO.getValue());
+                checkItem.setRectifyPerson("");
+                checkItem.setRectifyPersonName("");
+                checkItem.setCreateTime(now);
+                checkItem.setIsDelete(EYesOrNo.NO.getValue());
+
+                return checkItem;
+            }).collect(Collectors.toList());
+            try {
+                this.initCheckRecord(item, listItem);
+            } catch (Exception e) {
+                log.error("初始化网格检查记录错误." + e.getMessage(), e);
+            }
+        }
+    }
+    @Transactional(rollbackFor = Exception.class)
+    private void initCheckRecord(CheckRecordPO item, List<CheckRecordItemPO> listItem) throws Exception {
+        boolean insertCheckItem = checkRecordItemMapper.insert(listItem);
+        if (!insertCheckItem) {
+            throw new Exception("添加检查项失败");
+        }
+        int checkRecordRowCount = dao.insert(item);
+        if (checkRecordRowCount != 1) {
+            throw new Exception("添加检查记录失败");
+        }
+    }
 }

+ 17 - 17
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/service/impl/QuartzService.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/QuartzService.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.service.impl;
+package com.customs.cq.datacenter.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.customs.cq.datacenter.common.ExecutedResult;
@@ -8,22 +8,22 @@ import com.customs.cq.datacenter.common.enums.EState;
 import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
-import com.customs.cq.datacenter.system.domain.QuartzTaskErrorPO;
-import com.customs.cq.datacenter.system.domain.QuartzTaskInfoPO;
-import com.customs.cq.datacenter.system.domain.QuartzTaskRecordPO;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskRecord;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqCreateQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqModifyQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqRunTaskRightNow;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskErrorVO;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskInfoVO;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskRecordVO;
-import com.customs.cq.datacenter.system.mapper.impl.QuartzTaskErrorMapperImpl;
-import com.customs.cq.datacenter.system.mapper.impl.QuartzTaskInfoMapperImpl;
-import com.customs.cq.datacenter.system.mapper.impl.QuartzTaskRecordMapperImpl;
-import com.customs.cq.datacenter.system.quartz.QuartzExecutor;
-import com.customs.cq.datacenter.system.quartz.QuartzMainJobFactory;
+import com.customs.cq.datacenter.business.domain.QuartzTaskErrorPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskInfoPO;
+import com.customs.cq.datacenter.business.domain.QuartzTaskRecordPO;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskRecord;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqCreateQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqModifyQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqRunTaskRightNow;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskErrorVO;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskInfoVO;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskRecordVO;
+import com.customs.cq.datacenter.business.mapper.impl.QuartzTaskErrorMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.QuartzTaskInfoMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.QuartzTaskRecordMapperImpl;
+import com.customs.cq.datacenter.business.quartz.QuartzExecutor;
+import com.customs.cq.datacenter.business.quartz.QuartzMainJobFactory;
 import org.quartz.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

+ 7 - 7
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/service/impl/StatisticsService.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/StatisticsService.java

@@ -20,7 +20,7 @@
  * #                  神兽保佑
  * #                  永无BUG!
  */
-package com.customs.cq.datacenter.system.service.impl;
+package com.customs.cq.datacenter.business.service;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -32,12 +32,12 @@ import com.customs.cq.datacenter.common.model.Tuple;
 import com.customs.cq.datacenter.common.utils.*;
 import com.customs.cq.datacenter.common.core.service.BasicService;
 import com.customs.cq.datacenter.system.mapper.SysUserMapper;
-import com.customs.cq.datacenter.system.domain.StatisticsUserLoginPO;
-import com.customs.cq.datacenter.system.domain.SysTotalStatisticsPO;
-import com.customs.cq.datacenter.system.entity.request.systotalstatistics.ReqCreateSysTotalStatistics;
-import com.customs.cq.datacenter.system.entity.response.statistics.ResNearMonthUserLogin;
-import com.customs.cq.datacenter.system.mapper.impl.StatisticsUserLoginMapperImpl;
-import com.customs.cq.datacenter.system.mapper.impl.SysTotalStatisticsMapperImpl;
+import com.customs.cq.datacenter.business.domain.StatisticsUserLoginPO;
+import com.customs.cq.datacenter.business.domain.SysTotalStatisticsPO;
+import com.customs.cq.datacenter.business.entity.request.systotalstatistics.ReqCreateSysTotalStatistics;
+import com.customs.cq.datacenter.business.entity.response.statistics.ResNearMonthUserLogin;
+import com.customs.cq.datacenter.business.mapper.impl.StatisticsUserLoginMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.SysTotalStatisticsMapperImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 4 - 4
secure-producting-system/src/main/java/com/customs/cq/datacenter/system/service/impl/UserStatisticsService.java → secure-producting-business/src/main/java/com/customs/cq/datacenter/business/service/UserStatisticsService.java

@@ -1,4 +1,4 @@
-package com.customs.cq.datacenter.system.service.impl;
+package com.customs.cq.datacenter.business.service;
 
 import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.constant.Constants;
@@ -7,11 +7,11 @@ import com.customs.cq.datacenter.common.enums.EYesOrNo;
 import com.customs.cq.datacenter.common.utils.LocalDateTimeUtil;
 import com.customs.cq.datacenter.common.utils.NumericUtil;
 import com.customs.cq.datacenter.common.utils.SnowFlakeUtil;
-import com.customs.cq.datacenter.system.domain.StatisticsUserLoginPO;
-import com.customs.cq.datacenter.system.domain.SysTotalStatisticsPO;
+import com.customs.cq.datacenter.business.domain.StatisticsUserLoginPO;
+import com.customs.cq.datacenter.business.domain.SysTotalStatisticsPO;
 import com.customs.cq.datacenter.system.mapper.SysLogininforMapper;
 import com.customs.cq.datacenter.system.mapper.SysUserMapper;
-import com.customs.cq.datacenter.system.mapper.impl.StatisticsUserLoginMapperImpl;
+import com.customs.cq.datacenter.business.mapper.impl.StatisticsUserLoginMapperImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 11 - 4
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ECheckFormStatus.java

@@ -3,15 +3,22 @@ package com.customs.cq.datacenter.common.enums;
 import java.util.Arrays;
 import java.util.Objects;
 
+/**
+ * 检查单状态
+ */
 public enum ECheckFormStatus {
     /**
-     * 暂存=1,
+     * 未检=0,
      */
-    STAGING("暂存", 1),
+    WAITING("未检", 0),
     /**
-     * 已提交=2,
+     * 暂存=10,
      */
-    SUBMITTED("已提交", 2),
+    STAGING("暂存", 10),
+    /**
+     * 已提交=20,
+     */
+    SUBMITTED("已提交", 20),
     ;
 
     /**

+ 3 - 0
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ECheckResult.java

@@ -3,6 +3,9 @@ package com.customs.cq.datacenter.common.enums;
 import java.util.Arrays;
 import java.util.Objects;
 
+/**
+ * 检查结果
+ */
 public enum ECheckResult {
     /**
      * 无隐患=1,

+ 0 - 69
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EPatrolPlanState.java

@@ -1,69 +0,0 @@
-package com.customs.cq.datacenter.common.enums;
-
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * 巡更计划状态枚举
- */
-public enum EPatrolPlanState {
-    /**
-     * 启用=1,
-     */
-    NORMAL("启用", 1),
-    /**
-     * 停止=2,
-     */
-    DISABLED("停止", 2),
-    /**
-     * 删除=3,
-     */
-    DELETED("删除", 3);
-
-    /**
-     * 枚举描述
-     */
-    private String desc;
-    /**
-     * 枚举值
-     */
-    private Integer value;
-
-    public Integer getValue() {
-        return value;
-    }
-    public String getDesc() {
-        return desc;
-    }
-
-    /**
-     * 构造方法
-     * @param desc 枚举描述
-     * @param value 枚举值
-     */
-    EPatrolPlanState(String desc, Integer value) {
-        this.desc = desc;
-        this.value = value;
-    }
-
-    /**
-     * 根据值获取枚举
-     *
-     * @param value 枚举值
-     * @return
-     */
-    public static EPatrolPlanState getByValue(Integer value) {
-        return Arrays.stream(EPatrolPlanState.values())
-            .filter(e -> Objects.equals(e.getValue(), value))
-            .findAny()
-            .orElse(null);
-    }
-
-    @Override
-    public String toString() {
-        return "EPatrolPlanState{" +
-            "desc='" + desc + '\'' +
-            ", value=" + value +
-            '}';
-    }
-}

+ 0 - 71
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EPatrolResult.java

@@ -1,71 +0,0 @@
-package com.customs.cq.datacenter.common.enums;
-
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * 巡更结果
- */
-public enum EPatrolResult {
-    /**
-     * 待完成
-     */
-    WAITING("待完成", 100),
-
-    /**
-     * 部分完成=120
-     */
-    PART("部分完成", 120),
-
-    /**
-     * 已完成=200
-     */
-    COMPLETED("已完成", 200),
-
-    /**
-     * 漏巡=300
-     */
-    MISS("漏巡", 300),
-    ;
-
-    private String desc;//枚举描述
-    private Integer value;//枚举值
-
-    public Integer getValue() {
-        return value;
-    }
-    public String getDesc() {
-        return desc;
-    }
-
-    /**
-     * 构造方法
-     * @param desc 枚举描述
-     * @param value 枚举值
-     */
-    EPatrolResult(String desc, Integer value) {
-        this.desc = desc;
-        this.value = value;
-    }
-
-    /**
-     * 根据值获取枚举
-     *
-     * @param value 枚举值
-     * @return
-     */
-    public static EPatrolResult getByValue(Integer value) {
-        return Arrays.stream(EPatrolResult.values())
-            .filter(e -> Objects.equals(e.getValue(), value))
-            .findFirst()
-            .orElse(null);
-    }
-
-    @Override
-    public String toString() {
-        return "EPatrolResult{" +
-            "desc='" + desc + '\'' +
-            ", value=" + value +
-            '}';
-    }
-}

+ 20 - 24
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EAttendanceState.java → secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/ERectifyStatus.java

@@ -4,29 +4,25 @@ import java.util.Arrays;
 import java.util.Objects;
 
 /**
- * 出勤状态 枚举
+ * 整改状态
  */
-public enum EAttendanceState {
+public enum ERectifyStatus {
     /**
-     * 正常=1,
+     * 无需整改=0,
      */
-    NORMAL("正常", 1),
+    NONE("无需整改", 0),
     /**
-     * 迟到=2,
+     * 待整改=10,
      */
-    LATED("迟到", 2),
+    WAITING("待整改", 10),
     /**
-     * 早退=3,
+     * 整改中=20,
      */
-    LEAVE_EARLY("早退", 3),
+    DOING("整改中", 20),
     /**
-     * 缺勤=4,
+     * 已整改=30,
      */
-    ABSENCE("缺勤", 4),
-    /**
-     * 休假=5,
-     */
-    LEAVE("休假", 5)
+    DONE("已整改", 30),
     ;
 
     /**
@@ -50,7 +46,7 @@ public enum EAttendanceState {
      * @param desc 枚举描述
      * @param value 枚举值
      */
-    EAttendanceState(String desc, Integer value) {
+    ERectifyStatus(String desc, Integer value) {
         this.desc = desc;
         this.value = value;
     }
@@ -61,18 +57,18 @@ public enum EAttendanceState {
      * @param value 枚举值
      * @return
      */
-    public static EAttendanceState getByValue(Integer value) {
-        return Arrays.stream(EAttendanceState.values())
-            .filter(e -> Objects.equals(e.getValue(), value))
-            .findAny()
-            .orElse(null);
+    public static ERectifyStatus getByValue(Integer value) {
+        return Arrays.stream(ERectifyStatus.values())
+                .filter(e -> Objects.equals(e.getValue(), value))
+                .findAny()
+                .orElse(null);
     }
 
     @Override
     public String toString() {
-        return "EAttendanceState{" +
-            "desc='" + desc + '\'' +
-            ", value=" + value +
-            '}';
+        return "ERectifyStatus{" +
+                "desc='" + desc + '\'' +
+                ", value=" + value +
+                '}';
     }
 }

+ 0 - 67
secure-producting-common/src/main/java/com/customs/cq/datacenter/common/enums/EVisitingApplyState.java

@@ -1,67 +0,0 @@
-package com.customs.cq.datacenter.common.enums;
-
-import java.util.Arrays;
-import java.util.Objects;
-
-public enum EVisitingApplyState {
-    /**
-     * 待审核=100,
-     */
-    AWAITING("待审核", 100),
-    /**
-     * 审核通过=200,
-     */
-    PASSED("审核通过", 200),
-    /**
-     * 审核拒绝=300,
-     */
-    REFUSED("审核拒绝", 300)
-    ;
-
-    /**
-     * 枚举描述
-     */
-    private String desc;
-    /**
-     * 枚举值
-     */
-    private Integer value;
-
-    public Integer getValue() {
-        return value;
-    }
-    public String getDesc() {
-        return desc;
-    }
-
-    /**
-     * 构造方法
-     * @param desc 枚举描述
-     * @param value 枚举值
-     */
-    EVisitingApplyState(String desc, Integer value) {
-        this.desc = desc;
-        this.value = value;
-    }
-
-    /**
-     * 根据值获取枚举
-     *
-     * @param value 枚举值
-     * @return
-     */
-    public static EVisitingApplyState getByValue(Integer value) {
-        return Arrays.stream(EVisitingApplyState.values())
-            .filter(e -> Objects.equals(e.getValue(), value))
-            .findAny()
-            .orElse(null);
-    }
-
-    @Override
-    public String toString() {
-        return "EVisitingApplyState{" +
-            "desc='" + desc + '\'' +
-            ", value=" + value +
-            '}';
-    }
-}

+ 3 - 3
secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/statistics/StatisticsController.java

@@ -30,9 +30,9 @@ import com.customs.cq.datacenter.common.utils.ParameterUtil;
 import com.customs.cq.datacenter.common.validator.ParameterValidateResult;
 import com.customs.cq.datacenter.common.validator.ParameterValidator;
 import com.customs.cq.datacenter.common.core.controller.BasicController;
-import com.customs.cq.datacenter.system.entity.request.systotalstatistics.ReqCreateSysTotalStatistics;
-import com.customs.cq.datacenter.system.entity.response.statistics.ResNearMonthUserLogin;
-import com.customs.cq.datacenter.system.service.impl.StatisticsService;
+import com.customs.cq.datacenter.business.entity.request.systotalstatistics.ReqCreateSysTotalStatistics;
+import com.customs.cq.datacenter.business.entity.response.statistics.ResNearMonthUserLogin;
+import com.customs.cq.datacenter.business.service.StatisticsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 9 - 9
secure-producting-host/src/main/java/com/customs/cq/datacenter/host/web/controller/system/QuartzController.java

@@ -4,15 +4,15 @@ import com.customs.cq.datacenter.common.ExecutedResult;
 import com.customs.cq.datacenter.common.PagerResult;
 import com.customs.cq.datacenter.common.annotation.Log;
 import com.customs.cq.datacenter.common.enums.BusinessType;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.search.SearchQuartzTaskRecord;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqCreateQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqModifyQuartzTaskInfo;
-import com.customs.cq.datacenter.system.entity.request.quartztaskinfo.ReqRunTaskRightNow;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskErrorVO;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskInfoVO;
-import com.customs.cq.datacenter.system.domain.vo.QuartzTaskRecordVO;
-import com.customs.cq.datacenter.system.service.impl.QuartzService;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.search.SearchQuartzTaskRecord;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqCreateQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqModifyQuartzTaskInfo;
+import com.customs.cq.datacenter.business.entity.request.quartztaskinfo.ReqRunTaskRightNow;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskErrorVO;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskInfoVO;
+import com.customs.cq.datacenter.business.domain.vo.QuartzTaskRecordVO;
+import com.customs.cq.datacenter.business.service.QuartzService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
secure-producting-host/src/test/java/com/customs/cq/datacenter/host/UserStatisticsTest.java

@@ -1,6 +1,6 @@
 package com.customs.cq.datacenter.host;
 
-import com.customs.cq.datacenter.system.service.impl.UserStatisticsService;
+import com.customs.cq.datacenter.business.service.UserStatisticsService;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;

+ 0 - 6
secure-producting-system/pom.xml

@@ -59,11 +59,5 @@
             <groupId>jakarta.validation</groupId>
             <artifactId>jakarta.validation-api</artifactId>
         </dependency>
-
-        <!--quartz依赖-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-quartz</artifactId>
-        </dependency>
     </dependencies>
 </project>