Browse Source

修改履职登记

gaoxiong 2 years ago
parent
commit
aac80ee6d8

+ 15 - 4
project_data/sql/0.0.2/soc/soc.sql

@@ -1129,19 +1129,19 @@ END IF;
 			CHANGE COLUMN `plan_id` `parent_plan_id` bigint NULL DEFAULT NULL COMMENT '父计划id,没有就与plan_id一致' AFTER `ymd_minute`,
 			ADD COLUMN `plan_id` bigint NULL COMMENT '生成任务的计划id' AFTER `parent_plan_id`;
     END IF;
-	
+
 	-- 履职库内容表增加NFC点位
     IF
         NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'core_resumption_rule_point' AND COLUMN_NAME = 'check_id' ) THEN
-        ALTER TABLE `core_resumption_rule_point` 
+        ALTER TABLE `core_resumption_rule_point`
 			MODIFY COLUMN `area_id` bigint NULL COMMENT '履职区域,区域表id' AFTER `name`,
 			ADD COLUMN `check_id` bigint NULL COMMENT 'NFC点位id' AFTER `area_id`;
     END IF;
-	
+
 	-- 履职登记内容表增加NFC点位
     IF
         NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'core_resumption_data' AND COLUMN_NAME = 'check_id' ) THEN
-        ALTER TABLE `core_resumption_data` 
+        ALTER TABLE `core_resumption_data`
 			ADD COLUMN `check_id` bigint NULL COMMENT '点位id' AFTER `area_id`;
     END IF;
 
@@ -1157,6 +1157,17 @@ END IF;
         alter table core_drill_task
             add drill_end_time datetime(6) null comment '演练结束时间' after drill_start_time;
     END IF;
+	-- 履职数据增加两个字段,是否必查,是否扫描NFC
+    IF
+        NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'core_resumption_data' AND COLUMN_NAME = 'point_scan' ) THEN
+        ALTER TABLE `core_resumption_data`
+			ADD COLUMN `point_scan` tinyint(1) NULL DEFAULT NULL COMMENT '是否扫描NFC 1扫描,0不扫描' AFTER `data_status`;
+    END IF;
+       IF
+        NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'core_resumption_data' AND COLUMN_NAME = 'required' ) THEN
+        ALTER TABLE `core_resumption_data`
+			ADD COLUMN `required` tinyint(0) NULL DEFAULT 1 COMMENT '是否必须检查 1必检查,0非必捡' AFTER `data_status`;
+    END IF;
 
 
 ALTER TABLE `core_protection` MODIFY COLUMN `device_id` BIGINT NULL DEFAULT NULL COMMENT '设备ID' AFTER `id`;

+ 1 - 1
soc-auth/src/main/java/com/xunmei/auth/service/SysPasswordService.java

@@ -64,7 +64,7 @@ public class SysPasswordService
             recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, String.format("密码输入错误%s次", retryCount),platformType);
             RedisUtils.setCacheObject(getCacheKey(username), retryCount, Duration.ofMinutes(lockTime));
             //redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
-            throw new ServiceException("用户不存在/密码错误");
+            throw new ServiceException("密码错误");
         }
         else
         {

+ 10 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/domain/AppResumptionData.java

@@ -85,4 +85,14 @@ public class AppResumptionData extends Model<AppResumptionData> implements Seria
      * 数据状态 1未处理,2已处理
      */
     private Integer dataStatus;
+
+    /**
+     * 是否扫描NFC 1扫描,0不扫描
+     */
+    private  Integer pointScan;
+
+    /**
+     * 是否检查 1检查,0不检查
+     */
+    private Integer required;
 }

+ 10 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/gx/vo/ResumptionPlanVo.java

@@ -49,6 +49,16 @@ public class ResumptionPlanVo {
     private Long pointId;
 
     /**
+     * 是否扫描NFC 1扫描,0不扫描
+     */
+    private  Integer pointScan;
+
+    /**
+     * 是否检查 1检查,0不检查
+     */
+    private Integer required;
+
+    /**
      * 履职内容
      */
     private String pointName;

+ 29 - 20
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppPlanMapper.xml

@@ -398,25 +398,34 @@
         </where>
     </select>
     <select id="selectResumptionPlan" resultType="com.xunmei.core.resumption.gx.vo.ResumptionPlanVo">
-        select q.item_id,
-               q.item_name,
-               q.point_id,
-               q.point_name,
-               q.area_id,
-               w.`name` as area_name,
-               q.check_id,
-               q.plan_id
-        from (select c.id     as item_id,
-                     c.`name` as item_name,
-                     b.id     as point_id,
-                     b.name   as point_name,
-                     b.area_id,
-                     b.check_id,
-                     a.plan_id
-              from core_resumption_plan_to_point a
-                       LEFT JOIN core_resumption_rule_point b on a.point_id = b.id
-                       LEFT JOIN core_resumption_rule_item c on b.item_id = c.id
-              where a.plan_id = #{planId}) q
-                 LEFT JOIN sys_area w on q.area_id = w.id
+        select
+            q.item_id,
+            q.item_name,
+            q.point_id,
+            q.point_name,
+            q.area_id,
+            w.`name` as area_name,
+            q.check_id,
+            q.plan_id,
+            q.point_scan,
+            q.required
+        from
+            (
+                select
+                    c.id as item_id,
+                    c.`name` as item_name,
+                    b.id as point_id,
+                    b.name as point_name,
+                    b.area_id,
+                    b.check_id,
+                    a.plan_id,
+                    a.point_scan,
+					a.required
+                from core_resumption_plan_to_point a
+                         LEFT JOIN core_resumption_rule_point b on a.point_id = b.id
+                         LEFT JOIN core_resumption_rule_item c on b.item_id = c.id
+                where a.plan_id = #{planId}
+            ) q
+                LEFT JOIN sys_area w on q.area_id = w.id
     </select>
 </mapper>

+ 4 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionMapper.xml

@@ -178,9 +178,11 @@ update   core_resumption set name=#{planName} where plan_id =#{planId} and statu
             a.res_value,
             a.res_remark,
             a.rectification_deadline,
-            a.data_status
+            a.data_status,
+            a.point_scan,
+            a.required
         from
-            (select id as data_id,area_id,check_id,item_id,res_value,res_remark,rectification_deadline,data_status
+            (select id as data_id,area_id,check_id,item_id,res_value,res_remark,rectification_deadline,data_status,point_scan,required
              from core_resumption_data where resumption_id = #{resumptionId}) a
                 LEFT JOIN core_resumption_rule_point b on a.item_id = b.id
                 LEFT JOIN core_resumption_rule_item c on b.item_id = c.id