Răsfoiți Sursa

履职/检查跟踪 导出增加字段任务类型,任务周期,任务时间(执行时刻)

jingyuanchao 1 an în urmă
părinte
comite
6b485e3d6e

+ 5 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/DictConstants.java

@@ -283,6 +283,11 @@ public class DictConstants {
      * 安全检查-检查类型
      */
     public static final String CHECK_TYPE = "check_type";
+
+    /**
+     * 安全检查-检查周期
+     */
+    public static final String CHECK_CYCLE = "check_cycle";
     /**
      * 动环传感器告警状态
      */

+ 9 - 7
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/ResumptionRecordServiceImpl.java

@@ -14,6 +14,7 @@ import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.security.utils.DictUtils;
 import com.xunmei.core.resumption.domain.AppPlanToRole;
+import com.xunmei.core.resumption.domain.AppResumptionDataRemarkimg;
 import com.xunmei.core.resumption.domain.Resumption;
 import com.xunmei.core.resumption.dto.resumptionRecord.ResumptionNFCDto;
 import com.xunmei.core.resumption.dto.resumptionRecord.ResumptionRecordPageDto;
@@ -26,14 +27,12 @@ import com.xunmei.core.resumption.mapper.AppResumptionDataRemarkimgMapper;
 import com.xunmei.core.resumption.mapper.ResumptionRecordMapper;
 import com.xunmei.core.resumption.service.ICoreResumptionDataProtectionService;
 import com.xunmei.core.resumption.service.IResumptionRecordService;
-import com.xunmei.core.resumption.domain.AppResumptionDataRemarkimg;
 import com.xunmei.core.resumption.vo.resumptionRecord.*;
 import com.xunmei.core.resumption.vo.resumptionRegister.ResumptionDataProtectionVo;
 import com.xunmei.system.api.Eto.RoleConditionEto;
 import com.xunmei.system.api.RemoteDictDataService;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.RemoteRoleService;
-import com.xunmei.system.api.domain.SysDictData;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -154,6 +153,12 @@ public class ResumptionRecordServiceImpl extends ServiceImpl<ResumptionRecordMap
             if (ObjectUtil.isNotEmpty(vo.getTaskType())){
                 vo.setTaskType(DictUtils.getDictLabel(DictConstants.RESUMPTION_PLAN_TYPE,Integer.parseInt(vo.getTaskType())));
             }
+            if (ObjectUtil.isNotEmpty(vo.getPlanCycle())){
+                vo.setPlanCycle(DictUtils.getDictLabel(DictConstants.RESUMPTION_PLAN_CYCLE,Integer.parseInt(vo.getPlanCycle())));
+            }
+            if (ObjectUtil.isNotEmpty(vo.getPlanExec())){
+                vo.setPlanExec(DictUtils.getDictLabel(DictConstants.RESUMPTION_PLAN_EXEC,Integer.parseInt(vo.getPlanExec())));
+            }
 
 
             List<Long> roleIds = prMapper.stream().filter(pr -> ObjectUtil.equal(pr.getPlanId(), vo.getPlanId()))
@@ -346,15 +351,12 @@ public class ResumptionRecordServiceImpl extends ServiceImpl<ResumptionRecordMap
         if (data.size() > 200000) {
             throw new ServiceException("每次最多导出200000条");
         }
-
-        Map<String, SysDictData> dicts = remoteDictDataService.selectDictByeType("resumption_status", SecurityConstants.INNER)
-                .stream().collect(Collectors.toMap(SysDictData::getDictValue, v -> v));
         List<ResumptionRecordPageVo> limit = data.stream().limit(200000).collect(Collectors.toList());
         int index = 1;
         for (ResumptionRecordPageVo r : limit) {
             r.setIndex(index++);
-            if (dicts.containsKey(r.getStatus())) {
-                r.setStatusText(dicts.get(r.getStatus()).getDictLabel());
+            if (ObjectUtil.isNotEmpty(r.getStatus())) {
+                r.setStatusText(DictUtils.getDictLabel(DictConstants.RESUMPTION_STATUS,Integer.parseInt(r.getStatus())));
             } else {
                 r.setStatusText("未知");
             }

+ 51 - 53
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/resumptionRecord/ResumptionRecordPageVo.java

@@ -24,88 +24,77 @@ public class ResumptionRecordPageVo {
     @JsonIgnore
     private int index;
 
-    @ApiModelProperty("履职任务id")
-    @ExcelIgnore
-    private String resumptionId;
-
-    /**
-     * 任务名称
-     */
     @ExcelProperty(value = "任务名称",index = 1)
     @ColumnWidth(30)
     private String name;
 
-    /**
-     * 任务名称
-     */
+    @JsonIgnore
     @ExcelProperty(value = "任务类型",index = 2)
     @ColumnWidth(30)
     private String taskType;
 
-    @ApiModelProperty("计划id")
-    @ExcelIgnore
-    private Long planId;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @ApiModelProperty("任务开始时间")
-    @ExcelProperty(value ="开始时间",index=8)
+    @JsonIgnore
+    @ExcelProperty(value = "任务时段",index = 3)
+    @ApiModelProperty(value = "执行时刻",notes = "营业前/中/后")
     @ColumnWidth(30)
-    private Date planStartTime;
+    private String planExec;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @ApiModelProperty(value ="截止时间")
-    @ExcelProperty(value ="截止时间",index = 9)
+    @JsonIgnore
+    @ExcelProperty(value = "任务周期",index = 4)
+    @ApiModelProperty(value = "任务周期")
     @ColumnWidth(30)
-    private Date planEndTime;
-
-
-    @ApiModelProperty(value = "机构id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ExcelIgnore
-    private Long orgId;
-
-    @ApiModelProperty("上级机构")
-    @ExcelIgnore
-    private String parentOrgName;
+    private String planCycle;
 
     @ApiModelProperty("地区")
-    @ExcelProperty(value="地区",index = 3)
+    @ExcelProperty(value="地区",index = 5)
     @ColumnWidth(20)
     private String affiliatedArea;
 
     @ApiModelProperty("行社名称")
-    @ExcelProperty(value="行社名称",index = 4)
+    @ExcelProperty(value="行社名称",index = 6)
     @ColumnWidth(20)
     private String affiliatedBank;
 
-
     @ApiModelProperty("机构名称")
-    @ExcelProperty(value="履职机构",index = 5)
+    @ExcelProperty(value="履职机构",index = 7)
     @ColumnWidth(20)
     private String orgName;
 
-    @ApiModelProperty("履职角色id")
-    @ExcelIgnore
-    private Long roleId;
+    @JsonIgnore
+    @ExcelProperty(value = "任务进度",index = 8)
+    @ColumnWidth(15)
+    private String statusText;
 
     @ApiModelProperty("履职角色")
-    @ExcelProperty(value="履职人员",index = 6)
+    @ExcelProperty(value="履职人员",index = 9)
     @ColumnWidth(20)
     private String roleName;
 
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty("任务开始时间")
+    @ExcelProperty(value ="开始时间",index=10)
+    @ColumnWidth(30)
+    private Date planStartTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value ="截止时间")
+    @ExcelProperty(value ="截止时间",index = 11)
+    @ColumnWidth(30)
+    private Date planEndTime;
+
     @ApiModelProperty("提交人")
-    @ExcelProperty(value = "登记人",index = 10)
+    @ExcelProperty(value = "登记人",index = 12)
     @ColumnWidth(15)
     private String submitter;
 
     @ApiModelProperty("提交时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @ExcelProperty(value = "登记时间",index = 11)
+    @ExcelProperty(value = "登记时间",index = 13)
     @ColumnWidth(20)
     private Date submitTime;
 
     @ApiModelProperty("隐患数量")
-    @ExcelProperty(value = "隐患问题数",index = 12)
+    @ExcelProperty(value = "隐患问题数",index = 14)
     @ColumnWidth(15)
     private Integer abnormalDataNums;
 
@@ -113,25 +102,34 @@ public class ResumptionRecordPageVo {
     @ExcelIgnore
     private String status;
 
-    @JsonIgnore
-    @ExcelProperty(value = "任务进度",index = 7)
-    @ColumnWidth(15)
-    private String statusText;
+    @ApiModelProperty("计划id")
+    @ExcelIgnore
+    private Long planId;
 
-    /**
-     * 年
-     */
+    @ApiModelProperty("年")
     @ExcelIgnore
     private Integer year;
 
-    /**
-     * 月
-     */
+    @ApiModelProperty("季度")
     @ExcelIgnore
     private Integer quarter;
 
+    @ApiModelProperty("履职任务id")
+    @ExcelIgnore
+    private String resumptionId;
+
+    @ApiModelProperty("履职角色id")
+    @ExcelIgnore
+    private Long roleId;
 
+    @ApiModelProperty(value = "机构id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ExcelIgnore
+    private Long orgId;
 
+    @ApiModelProperty("上级机构")
+    @ExcelIgnore
+    private String parentOrgName;
 
 
 //    @ApiModelProperty("二级机构")

+ 3 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafetyTaskServiceImpl.java

@@ -290,6 +290,9 @@ public class CoreSafetyTaskServiceImpl extends ServiceImpl<CoreSafetyTaskMapper,
                 if (ObjectUtil.isNotEmpty(task.getTaskType())){
                     task.setTaskType(DictUtils.getDictLabel(DictConstants.CHECK_TYPE,Integer.parseInt(task.getTaskType())));
                 }
+                if (ObjectUtil.isNotEmpty(task.getPlanCycle())){
+                    task.setPlanCycle(DictUtils.getDictLabel(DictConstants.CHECK_CYCLE,Integer.parseInt(task.getPlanCycle())));
+                }
                 if (ObjectUtil.isNotEmpty(toRoleList)) {
                     List<IdNameVo> finalNames = names;
                     String roleNames = toRoleList

+ 21 - 14
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/vo/CoreSafetyTaskExport.java

@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -32,21 +33,27 @@ public class CoreSafetyTaskExport {
     @ColumnWidth(30)
     private String taskType;
 
+    @JsonIgnore
+    @ExcelProperty(value = "任务周期",index = 3)
+    @ApiModelProperty(value = "任务周期")
+    @ColumnWidth(30)
+    private String planCycle;
+
     @ApiModelProperty(value = "检查主体")
-    @ExcelProperty(value = "检查主体", index = 3)
+    @ExcelProperty(value = "检查主体", index = 4)
     @ColumnWidth(25)
     private String checkOrgName;
 
     @ApiModelProperty(value = "检查人员角色")
-    @ExcelProperty(value = "检查人员", index = 4)
+    @ExcelProperty(value = "检查人员", index = 5)
     private String submitName;
 
     @ApiModelProperty(value = "登记人")
-    @ExcelProperty(value = "登记人", index = 5)
+    @ExcelProperty(value = "登记人", index = 6)
     private String submitUserName;
 
     @ApiModelProperty(value = "0待检查,1检查完成")
-    @ExcelProperty(value = "任务进度", index = 6,converter = SafeStatusConverter.class)
+    @ExcelProperty(value = "任务进度", index = 7,converter = SafeStatusConverter.class)
     private String status;
 
     @ExcelIgnore
@@ -56,7 +63,7 @@ public class CoreSafetyTaskExport {
      * 受检机构所属地区
      */
     @ApiModelProperty(value = "受检机构所属地区")
-    @ExcelProperty(value = "地区", index = 7)
+    @ExcelProperty(value = "地区", index = 8)
     @ColumnWidth(15)
     private String affiliatedArea;
 
@@ -64,35 +71,37 @@ public class CoreSafetyTaskExport {
      * 受检机构所属行社
      */
     @ApiModelProperty(value = "受检机构所属行社")
-    @ExcelProperty(value = "行社名称", index = 8)
+    @ExcelProperty(value = "行社名称", index = 9)
     @ColumnWidth(20)
     private String affiliatedBank;
 
     @ApiModelProperty(value = "受检机构")
-    @ExcelProperty(value = "受检机构", index = 9)
+    @ExcelProperty(value = "受检机构", index = 10)
     @ColumnWidth(25)
     private String orgName;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "开始日期")
-    @ExcelProperty(value = "开始日期", index = 10)
+    @ExcelProperty(value = "开始日期", index = 11)
     @ColumnWidth(20)
     private Date planStartTime;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "截止日期")
-    @ExcelProperty(value = "截止日期", index = 11)
+    @ExcelProperty(value = "截止日期", index = 12)
     @ColumnWidth(20)
     private Date planEndTime;
 
+    @ApiModelProperty(value = "异常数目")
+    @ExcelProperty(value = "隐患问题数", index = 13)
+    private String exceptionCount;
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间")
-//    @ExcelProperty(value = "创建时间", index = 7)
     @ExcelIgnore
     private Date createTime;
 
     @ApiModelProperty(value = "检查组成员")
-//    @ExcelProperty(value = "检查组成员", index = 8)
     @ExcelIgnore
     private String checkTeam;
 
@@ -102,7 +111,5 @@ public class CoreSafetyTaskExport {
     @ExcelIgnore
     private Long planId;
 
-    @ApiModelProperty(value = "异常数目")
-    @ExcelProperty(value = "隐患问题数", index = 12)
-    private String exceptionCount;
+
 }

+ 3 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionRecordMapper.xml

@@ -123,7 +123,9 @@
         o.short_name as org_name,
         o.affiliated_area ,
         o.affiliated_bank,
-        ifnull(p.plan_type,'') as taskType
+        ifnull(p.plan_type,'') as taskType,
+        p.plan_exec as planExec,
+        p.plan_cycle as planCycle
         from core_resumption r
         left join core_resumption_plan p on p.id=r.plan_id
         inner join sys_org o on r.org_id=o.id

+ 2 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -930,7 +930,8 @@
         o1.affiliated_area,
         o1.affiliated_bank,
         t.submit_by as submitUserName,
-        ifnull(p.check_type,'') as taskType
+        ifnull(p.check_type,'') as taskType,
+        p.plan_cycle as planCycle
         FROM
         core_safety_task t
         left join core_safecheck_plan p on t.plan_id=p.id