Kaynağa Gözat

履职登记

luojun 2 yıl önce
ebeveyn
işleme
328142b197
13 değiştirilmiş dosya ile 171 ekleme ve 81 silme
  1. 19 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ResumptionController.java
  2. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/mapper/CoreResumptionDataProtectionMapper.java
  3. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/ICoreResumptionDataProtectionService.java
  4. 7 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/ResumptionBusiness.java
  5. 11 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java
  6. 6 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/CoreResumptionDataProtectionServiceImpl.java
  7. 11 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionDataProtectionVo.java
  8. 4 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionNfcVo.java
  9. 5 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionPointVo.java
  10. 5 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/TaskDetailsVo.java
  11. 6 2
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppResumptionDataNfcMapper.xml
  12. 11 6
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppRulePointMapper.xml
  13. 82 67
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/CoreResumptionDataProtectionMapper.xml

+ 19 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ResumptionController.java

@@ -142,6 +142,24 @@ public class ResumptionController {
     AjaxResult toTaskDetails( @RequestBody @Valid final TaskDetailsDto request) throws ParseException {
         TaskDetailsVo  detailvo = new TaskDetailsVo();
         List<Map<String,Object>> tasktotal = resumptionBusiness.toTaskDetails(request);
+
+        //nfc总区域数量统计
+        Integer nfcScanN=0;
+        for (Map<String,Object> m :
+                tasktotal) {
+            List<ResumptionNfcVo> nfc= (List<ResumptionNfcVo>) m.get("nfclist");
+            nfcScanN += nfc.size();
+        }
+        detailvo.setNfcScanN(nfcScanN);
+        detailvo.setNfcScanY(0);
+
+        //区域数量统计
+        Integer areaScanN=0;
+        areaScanN = tasktotal.size();
+        detailvo.setAreaScanN(areaScanN);
+        detailvo.setAreaScanY(0);
+
+
         ResumptionTaskListVo taskObj =resumptionBusiness.getTaskObjByTaskid(request);
         SysConfig systemParame = remoteConfigService.findFirstByCode(SystemParameterConstant.NFC_SCANNING, SecurityConstants.INNER).getData();
 
@@ -149,6 +167,7 @@ public class ResumptionController {
         detailvo.setTaskarealist(tasktotal);
         detailvo.setTaskObj(taskObj);
         detailvo.setNfcScaning("0");
+
         return AjaxResult.success(detailvo);
     }
 

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/mapper/CoreResumptionDataProtectionMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.xunmei.core.resumption.domain.CoreResumptionDataProtection;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xunmei.core.resumption.vo.ResumptionDataProtectionVo;
 
 /**
  * 【请填写功能名称】Mapper接口
@@ -28,6 +29,7 @@ public interface CoreResumptionDataProtectionMapper extends BaseMapper<CoreResum
      */
     List<CoreResumptionDataProtection> selectCoreResumptionDataProtectionList(CoreResumptionDataProtection coreResumptionDataProtection);
 
+    List<ResumptionDataProtectionVo> selectProtection(Long orgId);
     /**
      * 新增【请填写功能名称】
      *

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/ICoreResumptionDataProtectionService.java

@@ -6,6 +6,7 @@ import com.xunmei.core.resumption.domain.CoreResumptionDataProtection;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.core.resumption.vo.ResumptionDataProtectionVo;
 
 /**
  * 【请填写功能名称】Service接口
@@ -22,6 +23,7 @@ public interface ICoreResumptionDataProtectionService extends IService<CoreResum
      */
      CoreResumptionDataProtection selectCoreResumptionDataProtectionById(Long id);
 
+    List<ResumptionDataProtectionVo> selectProtection(Long orgId);
     /**
      * 查询【请填写功能名称】列表
      *

+ 7 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/ResumptionBusiness.java

@@ -47,6 +47,8 @@ public class ResumptionBusiness {
     private AppResumptionDataService appResumptionDataService;
     @Autowired
     private IProtectionService protectionService;
+    @Autowired
+    private ICoreResumptionDataProtectionService coreResumptionDataProtectionService;
 
     public Map<String, Object> tasktotal(ResumptionTaskDto request) throws ParseException {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -479,6 +481,7 @@ public class ResumptionBusiness {
         });
         //获取nfc
         List<ResumptionNfcVo> nfclists = appResumptionDataNfcService.findNfcByAreaIdAndOrgId(nfcBindIdList, resumption.getOrgId(), resumption.getPlanId());
+
         //对nfc进行去重
         List<ResumptionNfcVo> nfclist = nfclists.stream().collect(Collectors.collectingAndThen
                 (Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ResumptionNfcVo -> ResumptionNfcVo.getNfccdoe()))), ArrayList::new));
@@ -537,6 +540,7 @@ public class ResumptionBusiness {
             Map<String, Object> area = new HashMap<>();
             area.put("areaid", key.toString());
             area.put("areaname", pointsList.get(0).getAreaname());
+
             List<ResumptionNfcVo> areanfclist = nfclist.stream().filter(r -> r.getAreaId().equals(key)).collect(Collectors.toList());
             if ("0".equals(0)) {
                 if (areanfclist == null || areanfclist.size() == 0) {
@@ -557,7 +561,8 @@ public class ResumptionBusiness {
                     for (ResumptionPointVo r :
                             checkitemlist) {
                         if (r.getBusinessType() == 1) {
-                            r.setProtectionVo(protectionService.findNotAllHour(resumption.getOrgId()));
+                            List<ResumptionDataProtectionVo> list = coreResumptionDataProtectionService.selectProtection(resumption.getOrgId());
+                            r.setProtectionVo(list);
                         }
                     }
                 }
@@ -565,6 +570,7 @@ public class ResumptionBusiness {
                 item.put("itemid", keya);
                 item.put("itemname", checkitemlist.get(0).getItemname());
                 item.put("checkitemlist", checkitemlist);
+
                 checklist.add(item);
             }
             area.put("checklist", checklist);

+ 11 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java

@@ -227,6 +227,9 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 //
 //            }
         } else {
+            if(app.getRoleList()==null){
+                app.setRoleList(new ArrayList<>());
+            }
             //修改
             QueryWrapper<AppPlan> qw = new QueryWrapper<>();
             qw.lambda().eq(AppPlan::getPlanName, app.getPlanName())
@@ -242,9 +245,12 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             baseMapper.updateById(plan);
 
             Long id = plan.getId();
-            QueryWrapper<AppPlanToRole> apr = new QueryWrapper<>();
-            apr.lambda().eq(AppPlanToRole::getPlanId, id);
-            appPlanToRoleMapper.delete(apr);
+            if(app.getRoleList().size()>0){
+                QueryWrapper<AppPlanToRole> apr = new QueryWrapper<>();
+                apr.lambda().eq(AppPlanToRole::getPlanId, id);
+                appPlanToRoleMapper.delete(apr);
+            }
+
 
             QueryWrapper<AppPlanToPoint> api = new QueryWrapper<>();
             api.lambda().eq(AppPlanToPoint::getPlanId, id);
@@ -260,6 +266,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             appPlanToExecOrgMapper.delete(ape);
 
             List<Long> roleList = app.getRoleList();
+
+
             AppPlanToRole atr = null;
             for (Long roleId : roleList) {
                 atr = new AppPlanToRole();

+ 6 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/CoreResumptionDataProtectionServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.xunmei.core.resumption.domain.CoreResumptionDataProtection;
 import com.xunmei.core.resumption.mapper.CoreResumptionDataProtectionMapper;
 import com.xunmei.core.resumption.service.ICoreResumptionDataProtectionService;
+import com.xunmei.core.resumption.vo.ResumptionDataProtectionVo;
 import com.xunmei.system.api.RemoteOrgService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -74,6 +75,11 @@ public class CoreResumptionDataProtectionServiceImpl extends ServiceImpl<CoreRes
         return coreResumptionDataProtectionMapper.selectById(id);
     }
 
+    @Override
+    public List<ResumptionDataProtectionVo> selectProtection(Long orgId) {
+        return baseMapper.selectProtection(orgId);
+    }
+
     /**
      * 查询【请填写功能名称】列表
      *

+ 11 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionDataProtectionVo.java

@@ -0,0 +1,11 @@
+package com.xunmei.core.resumption.vo;
+
+import com.xunmei.core.resumption.domain.Protection;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class ResumptionDataProtectionVo extends Protection {
+    private String protectionStatus;
+    private Date protectionTime;
+}

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionNfcVo.java

@@ -26,5 +26,9 @@ public class ResumptionNfcVo {
     private Long areaId;
     @JsonSerialize(using = ToStringSerializer.class)
     private Long nfcid;
+    private Long nfcScanStatus;
+    private Long scanMethod;
+    private String img;
+
 }
 

+ 5 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/ResumptionPointVo.java

@@ -8,6 +8,7 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.util.Date;
 import java.util.List;
 
 @Data
@@ -30,7 +31,7 @@ public class ResumptionPointVo {
     private int pointnum;
     private int pointScan;
 
-    private List<Protection> protectionVo;
+    private List<ResumptionDataProtectionVo> protectionVo;
 
     private  int required;
     private Long planId;
@@ -38,8 +39,11 @@ public class ResumptionPointVo {
     private Long pointdataid;
     private String resTime;
     private Integer businessType;
+    private Integer submitBy;
     private String resremark;
+    private Date submitTime;
     private List<ResumptionNfcVo> pointnfclist;
+    private String rectificationDeadline;
 
 }
 

+ 5 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/TaskDetailsVo.java

@@ -18,7 +18,11 @@ import java.util.Map;
 @Builder
 public class TaskDetailsVo {
     @ApiModelProperty("任务统计及列表")
-    private List<Map<String,Object>> taskarealist;
+    private List<Map<String, Object>> taskarealist;
     private ResumptionTaskListVo taskObj;
     private String nfcScaning;
+    private Integer nfcScanY;
+    private Integer nfcScanN;
+    private Integer areaScanY;
+    private Integer areaScanN;
 }

+ 6 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppResumptionDataNfcMapper.xml

@@ -52,13 +52,17 @@
         a.CODE AS nfccdoe,
         d.id AS pointId,
         a.area_id AS areaId,
-        a.id AS nfcid
+        a.id AS nfcid,
+        dnf.STATUS as nfc_scan_status,
+        dnf.scan_method,
+        dnf.img
         FROM
         sys_nfc_bind a
         LEFT JOIN sys_area_check c ON a.check_id = c.id
         LEFT JOIN core_resumption_rule_point d ON a.area_id = d.area_id
         LEFT JOIN core_resumption_plan_to_point e ON e.point_id = d.id
-        WHERE
+        LEFT JOIN core_resumption_data_nfc dnf ON dnf.nfc_id = a.id
+        where
         a.org_id = #{orgId}
 
         AND e.plan_id = #{planId}

+ 11 - 6
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/AppRulePointMapper.xml

@@ -198,23 +198,28 @@
     <select id="findPointByRulePlan" resultType="com.xunmei.core.resumption.vo.ResumptionPointVo">
         SELECT
             a.id AS pointid,
-            a.name AS pointname,
---             a.point_num AS pointnum,
+            a.NAME AS pointname,--             a.point_num AS pointnum,
             a.item_id AS itemid,
             a.area_id AS areaid,
-            f.name AS areaname,
---             a.time_type AS timeType,
+            f.NAME AS areaname,--             a.time_type AS timeType,
             b.plan_id AS planId,
-            e.name AS itemname,
+            e.NAME AS itemname,
             b.point_scan AS pointScan,
             b.required,
-            a.business_type AS businessType
+            a.business_type AS businessType,
+            rd.res_value,
+            rd.res_time,
+            rd.submit_time,
+            rd.res_status,
+            rd.res_remark,
+            rd.submit_by
         FROM
             core_resumption_rule_point a
                 LEFT JOIN core_resumption_plan_to_point b ON a.id = b.point_id
                 LEFT JOIN core_resumption_plan c ON b.plan_id = c.id
                 LEFT JOIN core_resumption_rule_item e ON a.item_id = e.id
                 LEFT JOIN sys_area f ON a.area_id = f.id
+                LEFT JOIN core_resumption_data rd ON rd.item_id = a.item_id
         WHERE
             c.id = #{planId} and a.deleted=0
     </select>

+ 82 - 67
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/CoreResumptionDataProtectionMapper.xml

@@ -4,13 +4,14 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xunmei.core.resumption.mapper.CoreResumptionDataProtectionMapper">
 
-    <resultMap type="com.xunmei.core.resumption.domain.CoreResumptionDataProtection" id="CoreResumptionDataProtectionResult">
-                <result property="id" column="id"/>
-                <result property="resumptionDataId" column="resumption_data_id"/>
-                <result property="resumptionId" column="resumption_id"/>
-                <result property="protectionId" column="protection_id"/>
-                <result property="protectionStatus" column="protection_status"/>
-                <result property="protectionTime" column="protection_time"/>
+    <resultMap type="com.xunmei.core.resumption.domain.CoreResumptionDataProtection"
+               id="CoreResumptionDataProtectionResult">
+        <result property="id" column="id"/>
+        <result property="resumptionDataId" column="resumption_data_id"/>
+        <result property="resumptionId" column="resumption_id"/>
+        <result property="protectionId" column="protection_id"/>
+        <result property="protectionStatus" column="protection_status"/>
+        <result property="protectionTime" column="protection_time"/>
     </resultMap>
 
     <sql id="selectCoreResumptionDataProtectionVo">
@@ -18,91 +19,105 @@
         from core_resumption_data_protection
     </sql>
 
-    <select id="selectCoreResumptionDataProtectionList" parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection"
+    <select id="selectCoreResumptionDataProtectionList"
+            parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection"
             resultMap="CoreResumptionDataProtectionResult">
         <include refid="selectCoreResumptionDataProtectionVo"/>
         <where>
-                        <if test="resumptionDataId != null ">
-                            and resumption_data_id = #{resumptionDataId}
-                        </if>
-                        <if test="resumptionId != null ">
-                            and resumption_id = #{resumptionId}
-                        </if>
-                        <if test="protectionId != null ">
-                            and protection_id = #{protectionId}
-                        </if>
-                        <if test="protectionStatus != null  and protectionStatus != ''">
-                            and protection_status = #{protectionStatus}
-                        </if>
-                        <if test="protectionTime != null ">
-                            and protection_time = #{protectionTime}
-                        </if>
+            <if test="resumptionDataId != null ">
+                and resumption_data_id = #{resumptionDataId}
+            </if>
+            <if test="resumptionId != null ">
+                and resumption_id = #{resumptionId}
+            </if>
+            <if test="protectionId != null ">
+                and protection_id = #{protectionId}
+            </if>
+            <if test="protectionStatus != null  and protectionStatus != ''">
+                and protection_status = #{protectionStatus}
+            </if>
+            <if test="protectionTime != null ">
+                and protection_time = #{protectionTime}
+            </if>
         </where>
     </select>
 
     <select id="selectCoreResumptionDataProtectionById" parameterType="Long"
             resultMap="CoreResumptionDataProtectionResult">
-            <include refid="selectCoreResumptionDataProtectionVo"/>
-            where id = #{id}
+        <include refid="selectCoreResumptionDataProtectionVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectProtection" resultType="com.xunmei.core.resumption.vo.ResumptionDataProtectionVo">
+        SELECT cp.*,
+               dp.protection_status,
+               dp.protection_time
+        FROM core_protection cp
+                 LEFT JOIN core_resumption_data_protection dp ON cp.id = dp.protection_id
+        where cp.org_id = #{orgId}
+          and deleted = 0
+          and all_Hour = 0
     </select>
 
-    <insert id="insertCoreResumptionDataProtection" parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection">
+    <insert id="insertCoreResumptionDataProtection"
+            parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection">
         insert into core_resumption_data_protection
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                    <if test="id != null">id,
-                    </if>
-                    <if test="resumptionDataId != null">resumption_data_id,
-                    </if>
-                    <if test="resumptionId != null">resumption_id,
-                    </if>
-                    <if test="protectionId != null">protection_id,
-                    </if>
-                    <if test="protectionStatus != null">protection_status,
-                    </if>
-                    <if test="protectionTime != null">protection_time,
-                    </if>
+            <if test="id != null">id,
+            </if>
+            <if test="resumptionDataId != null">resumption_data_id,
+            </if>
+            <if test="resumptionId != null">resumption_id,
+            </if>
+            <if test="protectionId != null">protection_id,
+            </if>
+            <if test="protectionStatus != null">protection_status,
+            </if>
+            <if test="protectionTime != null">protection_time,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-                    <if test="id != null">#{id},
-                    </if>
-                    <if test="resumptionDataId != null">#{resumptionDataId},
-                    </if>
-                    <if test="resumptionId != null">#{resumptionId},
-                    </if>
-                    <if test="protectionId != null">#{protectionId},
-                    </if>
-                    <if test="protectionStatus != null">#{protectionStatus},
-                    </if>
-                    <if test="protectionTime != null">#{protectionTime},
-                    </if>
+            <if test="id != null">#{id},
+            </if>
+            <if test="resumptionDataId != null">#{resumptionDataId},
+            </if>
+            <if test="resumptionId != null">#{resumptionId},
+            </if>
+            <if test="protectionId != null">#{protectionId},
+            </if>
+            <if test="protectionStatus != null">#{protectionStatus},
+            </if>
+            <if test="protectionTime != null">#{protectionTime},
+            </if>
         </trim>
     </insert>
 
-    <update id="updateCoreResumptionDataProtection" parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection">
+    <update id="updateCoreResumptionDataProtection"
+            parameterType="com.xunmei.core.resumption.domain.CoreResumptionDataProtection">
         update core_resumption_data_protection
         <trim prefix="SET" suffixOverrides=",">
-                    <if test="resumptionDataId != null">resumption_data_id =
-                        #{resumptionDataId},
-                    </if>
-                    <if test="resumptionId != null">resumption_id =
-                        #{resumptionId},
-                    </if>
-                    <if test="protectionId != null">protection_id =
-                        #{protectionId},
-                    </if>
-                    <if test="protectionStatus != null">protection_status =
-                        #{protectionStatus},
-                    </if>
-                    <if test="protectionTime != null">protection_time =
-                        #{protectionTime},
-                    </if>
+            <if test="resumptionDataId != null">resumption_data_id =
+                #{resumptionDataId},
+            </if>
+            <if test="resumptionId != null">resumption_id =
+                #{resumptionId},
+            </if>
+            <if test="protectionId != null">protection_id =
+                #{protectionId},
+            </if>
+            <if test="protectionStatus != null">protection_status =
+                #{protectionStatus},
+            </if>
+            <if test="protectionTime != null">protection_time =
+                #{protectionTime},
+            </if>
         </trim>
         where id = #{id}
     </update>
 
     <delete id="deleteCoreResumptionDataProtectionById" parameterType="Long">
         delete
-        from core_resumption_data_protection where id = #{id}
+        from core_resumption_data_protection
+        where id = #{id}
     </delete>
 
     <delete id="deleteCoreResumptionDataProtectionByIds" parameterType="String">