Browse Source

修复缺陷

jiawuxian 1 year ago
parent
commit
369a603c37

+ 23 - 19
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/dto/QuestionExportDto.java

@@ -11,11 +11,15 @@ import java.util.Date;
 
 @Data
 public class QuestionExportDto {
+
+    @ExcelProperty(value="序号",index = 0)
+    private Integer index;
+
     /**
      * 隐患所属机构名称
      */
     @ApiModelProperty(value = "隐患所属机构名称")
-    @ExcelProperty(value="机构名称",index = 0)
+    @ExcelProperty(value="机构名称",index = 1)
     @ColumnWidth(20)
     private String orgName;
 
@@ -23,14 +27,14 @@ public class QuestionExportDto {
      * 来源任务名称
      */
     @ApiModelProperty(value = "来源任务名称")
-    @ExcelProperty(value="隐患来源",index = 1)
+    @ExcelProperty(value="隐患来源",index = 2)
     @ColumnWidth(20)
     private String srcTaskName;
 
     /**
      检查、履职项名称
      */
-    @ExcelProperty(value="标准项",index = 2)
+    @ExcelProperty(value="标准项",index = 3)
     @ColumnWidth(20)
     private String checkItem;
 
@@ -38,7 +42,7 @@ public class QuestionExportDto {
      * 检查内容
      */
     @ApiModelProperty(value = "检查内容")
-    @ExcelProperty(value="标准依据",index = 3)
+    @ExcelProperty(value="标准依据",index = 4)
     @ColumnWidth(40)
     private String checkContent;
 
@@ -46,7 +50,7 @@ public class QuestionExportDto {
      * 隐患描述
      */
     @ApiModelProperty(value = "隐患描述")
-    @ExcelProperty(value="隐患描述",index = 4)
+    @ExcelProperty(value="隐患描述",index = 5)
     @ColumnWidth(20)
     private String questionDesc;
 
@@ -54,7 +58,7 @@ public class QuestionExportDto {
      * 提出人名称
      */
     @ApiModelProperty(value = "提出人名称")
-    @ExcelProperty(value="提出人",index = 5)
+    @ExcelProperty(value="提出人",index = 6)
     @ColumnWidth(15)
     private String submitorName;
 
@@ -63,7 +67,7 @@ public class QuestionExportDto {
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "发现时间")
-    @ExcelProperty(value="发现时间",index = 6)
+    @ExcelProperty(value="发现时间",index = 7)
     @ColumnWidth(22)
     private Date submitTime;
 
@@ -71,72 +75,72 @@ public class QuestionExportDto {
      * 整改期限
      */
     @ApiModelProperty(value = "整改期限")
-    @ExcelProperty(value="整改期限",index = 7)
+    @ExcelProperty(value="整改期限",index = 8)
     @ColumnWidth(12)
-    @DateTimeFormat("YYYY-MM-DD")
+    @DateTimeFormat("yyyy-MM-dd")
     private Date reformDeadline;
 
     /**
      * 确认状态
      */
-    @ExcelProperty(value="确认状态",index = 8)
+    @ExcelProperty(value="确认状态",index = 9)
     @ColumnWidth(15)
     private String confirmStatusText;
 
     /**
      * 确认人
      */
-    @ExcelProperty(value="确认人",index = 9)
+    @ExcelProperty(value="确认人",index = 10)
     @ColumnWidth(15)
     private String confirmorName;
 
     /**
      * 确认描述
      */
-    @ExcelProperty(value="异议内容",index = 10)
+    @ExcelProperty(value="异议内容",index = 11)
     @ColumnWidth(15)
     private String confirmDesc;
 
     /**
      * 异议审批状态
      */
-    @ExcelProperty(value="审核结果",index = 11)
+    @ExcelProperty(value="审核结果",index = 12)
     @ColumnWidth(15)
     private String dissentStatusText;
 
     /**
      * 审核人
      */
-    @ExcelProperty(value="审核人",index = 12)
+    @ExcelProperty(value="审核人",index = 13)
     @ColumnWidth(15)
     private String dissenterName;
 
     /**
      * 审核描述
      */
-    @ExcelProperty(value="审核描述",index = 13)
+    @ExcelProperty(value="审核描述",index = 14)
     @ColumnWidth(15)
     private String dissentDesc;
 
     /**
      * 整改日期
      */
-    @ExcelProperty(value="整改日期",index = 14)
+    @ExcelProperty(value="整改时间",index = 15)
     @ColumnWidth(15)
-    @DateTimeFormat("YYYY-MM-DD")
+    @DateTimeFormat("yyyy-MM-dd")
     private Date reformDate;
 
     /**
      * 整改状态
      */
-    @ExcelProperty(value="整改状态",index = 15)
+    @ExcelProperty(value="整改状态",index = 16)
     @ColumnWidth(15)
     private String reformStatusText;
 
     /**
      * 整改描述
      */
-    @ExcelProperty(value="整改描述",index = 16)
+    @ExcelProperty(value="整改描述",index = 17)
     @ColumnWidth(15)
     private String reformDesc;
 }

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/QuestionReformServiceImpl.java

@@ -176,6 +176,10 @@ public class QuestionReformServiceImpl extends ServiceImpl<QuestionMapper, Quest
         }
 
         List<QuestionExportDto> list = baseMapper.selectReformExportList(pageDto);
+        Integer index=1;
+        for (QuestionExportDto questionExportDto : list) {
+            questionExportDto.setIndex(index++);
+        }
         response.setContentType("application/vnd.ms-excel");
         // 调用EasyExcel的导出方法
         EasyExcel.write(response.getOutputStream(), QuestionExportDto.class).sheet("Sheet1").doWrite(list);

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/QuestionServiceImpl.java

@@ -286,6 +286,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
             pageDto.setSubmitRange(nd);
         }
         List<QuestionExportDto> list = baseMapper.selectQuestionExportList(pageDto);
+        Integer index=1;
+        for (QuestionExportDto questionExportDto : list) {
+            questionExportDto.setIndex(index++);
+        }
         response.setContentType("application/vnd.ms-excel");
         // 调用EasyExcel的导出方法
         EasyExcel.write(response.getOutputStream(), QuestionExportDto.class).sheet("Sheet1").doWrite(list);

+ 6 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/task/ResumptionTaskBusiness.java

@@ -389,7 +389,7 @@ public class ResumptionTaskBusiness extends TaskCreatingServiceImplBase<Resumpti
         DateTime time2 = new DateTime(dateTime);
         time2.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
 
-        if (appPlan.getPlanExec() == 1 || appPlan.getPlanExec().equals(ExecTimeCommonEnum.NoBusiness.getCode())) {//全天 上班时间-下班时间 00:00:00-23:59:59
+        if (appPlan.getPlanExec() == 1) {//全天 上班时间-下班时间 00:00:00-23:59:59
             planstartTime = time1.setField(DateField.HOUR_OF_DAY, 0).setField(DateField.MINUTE, 0).setField(DateField.SECOND, 0).setField(DateField.MILLISECOND, 0);
             planendTime = DateUtil.endOfDay(time2).setField(DateField.MILLISECOND, 0);
         } else if (appPlan.getPlanExec() == 2) {//营业前 上班时间-营业时间
@@ -402,7 +402,11 @@ public class ResumptionTaskBusiness extends TaskCreatingServiceImplBase<Resumpti
             planstartTime = time1.setField(DateField.HOUR_OF_DAY, Integer.parseInt(closetime.split(":")[0])).setField(DateField.MINUTE, Integer.parseInt(closetime.split(":")[1])).setField(DateField.SECOND, 0).setField(DateField.MILLISECOND, 0);
             planendTime = DateUtil.endOfDay(time2).setField(DateField.MILLISECOND, 0);
         }else if (appPlan.getPlanExec() == 5){ //非营业时间
-            planstartTime = time1.setField(DateField.HOUR_OF_DAY, Integer.parseInt(closetime.split(":")[0])).setField(DateField.MINUTE, Integer.parseInt(closetime.split(":")[1])).setField(DateField.SECOND, 0).setField(DateField.MILLISECOND, 0);
+            planstartTime = time1
+                    .setField(DateField.HOUR_OF_DAY, Integer.parseInt(closetime.split(":")[0]))
+                    .setField(DateField.MINUTE, Integer.parseInt(closetime.split(":")[1]))
+                    .setField(DateField.SECOND, 0)
+                    .setField(DateField.MILLISECOND, 0);
             planendTime = DateUtil.endOfDay(time2).setField(DateField.MILLISECOND, 0);
         }
 

+ 14 - 7
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -419,7 +419,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 .flatMap(Collection::stream)
                 .map(Long::valueOf)
                 .distinct().
-                        collect(Collectors.toList());
+                collect(Collectors.toList());
 
         return sysOrgMapper.selectList(new LambdaQueryWrapper<SysOrg>()
                 .in(SysOrg::getId, orgIdList)
@@ -537,12 +537,19 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                         .collect(Collectors.toList());
                 break;
             default:
-                result = sysOrgList.stream()
-                        .filter(sysOrg -> ObjectUtil.equal(sysOrg.getParentId(), org.getId()))
-                        //.filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
-                        .sorted(Comparator.comparing(SysOrgVO::getSort))
-                        .collect(Collectors.toList());
-
+                if (org.getName().contains("地区行社")) {
+                    result = sysOrgList.stream()
+                            .filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
+                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getType(), OrgTypeEnum.HANG_SHE.getCode()))
+                            .sorted(Comparator.comparing(SysOrgVO::getSort))
+                            .collect(Collectors.toList());
+                } else {
+                    result = sysOrgList.stream()
+                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getParentId(), org.getId()))
+                            //.filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
+                            .sorted(Comparator.comparing(SysOrgVO::getSort))
+                            .collect(Collectors.toList());
+                }
         }
         final List<SysOrg> orgList = BeanHelper.copyProperties(result, SysOrg.class);
         orgList.sort(Comparator.comparing(SysOrg::getSort));