Ver Fonte

每日履职报表bug处理

jingyuanchao há 1 ano atrás
pai
commit
a0893cd272

+ 1 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/Constants.java

@@ -154,6 +154,7 @@ public class Constants {
     public static final Integer TWO = 2;
 
 
+    public static final String MONTH_FORMAT = "yyyy-MM";
     public static final String DAILY_FORMAT = "yyyy-MM-dd";
     public static final String DAILY_FORMAT_ZH = "yyyy年MM月dd日";
 

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/controller/ResumptionReportController.java

@@ -83,7 +83,7 @@ public class ResumptionReportController {
         if (null == resumptionDTO.getCycle() || resumptionDTO.getCycle() == 1) {
             ajaxResult.put(TITLE, "营业网点安全保卫履职情况表(" + DateUtil.format(time,Constants.DAILY_FORMAT) + ")");
         } else {
-            ajaxResult.put(TITLE, "营业网点安全保卫履职情况表(" + DateUtil.format(time,Constants.DAILY_FORMAT) + ")");
+            ajaxResult.put(TITLE, "营业网点安全保卫履职情况表(" + DateUtil.format(time,Constants.MONTH_FORMAT) + ")");
         }
         SysOrg sysOrg = remoteOrgService.selectSysOrgById(resumptionDTO.getOrgId(), SecurityConstants.INNER);
         ajaxResult.put("orgName", sysOrg.getShortName());

+ 9 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/service/impl/ResumptionReportServiceImpl.java

@@ -147,7 +147,11 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 //            resumptionDayVO.setTotalRealityRectificationNumber(totalRealityRectificationNumber);
 //            resumptionDayVOS.add(resumptionDayVO);
 //        });
-
+        if ( ObjectUtil.equal(2,resumptionDTO.getCycle())){
+            //web端按月份查询
+            resumptionDTO.setStartTime(DateUtil.beginOfMonth(DateUtil.parse(resumptionDTO.getSearchTime())));
+            resumptionDTO.setEndTime(DateUtil.endOfMonth(DateUtil.parse(resumptionDTO.getSearchTime())));
+        }
         List<CompletableFuture<ResumptionDayVO>> completableFutureList = new ArrayList<>();
         sysOrgs.forEach(o -> {
             CompletableFuture<ResumptionDayVO> getOneOrgResumptionDayVO = CompletableFuture.supplyAsync(() ->
@@ -246,20 +250,20 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 
         // 初始化三个阶段的报告并设置默认值
         ResumptionDayVO preReport = new ResumptionDayVO();
-        preReport.setPlanType(2);
+        preReport.setPlanExec(2);
         setDefaultValues(preReport);
 
         ResumptionDayVO midReport = new ResumptionDayVO();
-        midReport.setPlanType(3);
+        midReport.setPlanExec(3);
         setDefaultValues(midReport);
 
         ResumptionDayVO postReport = new ResumptionDayVO();
-        postReport.setPlanType(4);
+        postReport.setPlanExec(4);
         setDefaultValues(postReport);
 
 
         for (ResumptionDayVO report : reportList) {
-            switch (report.getPlanType()) {
+            switch (report.getPlanExec()) {
                 case 2: preReport = report; break;
                 case 3: midReport = report; break;
                 case 4: postReport = report; break;

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/vo/ResumptionDayVO.java

@@ -78,6 +78,6 @@ public class ResumptionDayVO {
 
     @ExcelIgnore
     @ApiModelProperty(value = "执行时刻")
-    private Integer planType;
+    private Integer planExec;
 
 }

+ 6 - 5
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml

@@ -65,7 +65,7 @@
     </select>-->
     <select id="selectReport" parameterType="map" resultType="com.xunmei.core.reportForms.resumption.vo.ResumptionDayVO">
         SELECT
-        a. planType,
+        a. planExec,
         COALESCE(SUM(a.exception_reform_count), 0) AS totalRealityRectificationNumber,
         COALESCE(COUNT(DISTINCT a.id), 0) AS frontPlanNumber,
         COALESCE(SUM(IF(a.`status` = 3, 1, 0)), 0) AS frontRealityNumber,
@@ -77,7 +77,7 @@
         FROM (
             SELECT
                 r.*,
-                b.plan_cycle as planType,
+                b.plan_exec as planExec,
                 (SELECT COUNT(d.id) FROM core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11,13)) AS
                 exception_reform_count
             FROM
@@ -85,7 +85,7 @@
             INNER JOIN sys_org o ON r.org_id = o.id AND o.deleted = 0 AND o.is_lock = 0
             LEFT JOIN core_resumption_plan b ON r.plan_id = b.id
         WHERE
-            r.type = 2 and b.plan_cycle in (2,3,4)
+            r.type = 2 and b.plan_exec in (2,3,4)
             <if test="orgId !=null">
                 AND r.org_id = #{orgId}
             </if>
@@ -95,7 +95,8 @@
                 </when>
                 <otherwise>
                     <if test=" req.cycle ==2">
-                        AND r.ymd_date like concat(#{req.searchTime},'%')
+                        <!--AND r.ymd_date like concat(#{req.searchTime},'%')-->
+                        and r.ymd_date between #{req.startTime} and #{req.endTime}
                     </if>
                     <if test="req.cycle ==1 || req.cycle ==null">
                         AND r.ymd_date = #{req.searchTime}
@@ -107,7 +108,7 @@
             </if>
         ) a
 
-        GROUP BY a.planType
+        GROUP BY a.planExec
     </select>
     <select id="planRectification" resultType="java.lang.Integer">
         SELECT