Browse Source

no message

FengChaoYu 8 months ago
parent
commit
c2de4f4e32

+ 25 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/settle/repair/DailyCountBean.java

@@ -0,0 +1,25 @@
+package com.gree.mall.manager.bean.settle.repair;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class DailyCountBean {
+
+    @ApiModelProperty(value = "待发放")
+    private Integer waitCount;
+
+    @ApiModelProperty(value = "已发放")
+    private Integer endCount;
+
+    @ApiModelProperty(value = "受理中")
+    private Integer ingCount;
+
+    @ApiModelProperty(value = "发放失败")
+    private Integer errCount;
+
+    @ApiModelProperty(value = "驳回")
+    private Integer rejectCount;
+}

+ 10 - 0
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -714,4 +714,14 @@ public interface CommonMapper {
     IPage<AllDailyImportSummaryItemVO> repairAllList(Page page,
                                                   @Param("ex") ZfireParamBean zfireParamBean,
                                                   @Param("companyWechatIds") List<String> companyWechatIds);
+
+    /**
+     * 维修工单结算清单列表
+     * @param companyWechatIds
+     * @param adminWebsitIds
+     * @return
+     */
+    Integer repairAllCount(@Param("companyWechatIds") List<String> companyWechatIds,
+                           @Param("adminWebsitIds") List<String> adminWebsitIds,
+                           @Param("status") Integer status);
 }

+ 8 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/settle/repair/DailyImportSummaryController.java

@@ -451,7 +451,7 @@ public class DailyImportSummaryController {
     }
 
     @ZfireList
-    @PostMapping("/repiar/all/list")
+    @PostMapping("/repair/all/list")
     @ApiOperation(value = "维修工单结算清单-列表")
     public ResponseHelper<IPage<AllDailyImportSummaryItemVO>> repairAllList(
             @RequestBody ZfireParamBean zfireParamBean
@@ -461,7 +461,7 @@ public class DailyImportSummaryController {
         });
     }
 
-    @PostMapping("/repiar/all/list/export")
+    @PostMapping("/repair/all/list/export")
     @ApiOperation("维修工单结算清单-导出")
     public void repairAllListExport(
             @RequestBody ZfireParamBean zfireParamBean,
@@ -473,4 +473,10 @@ public class DailyImportSummaryController {
         //3.导出
         FieldUtils.exportData(page.getRecords(), zfireParamBean.getExportFields(), request, response);
     }
+
+    @PostMapping("/repair/all/count")
+    @ApiOperation("维修工单结算清单-统计")
+    public ResponseHelper<DailyCountBean> repairAllListExport() throws Exception {
+        return ResponseHelper.success(dailyImportSummaryLogic.repairAllCount());
+    }
 }

+ 11 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/settle/repair/DailyImportSummaryLogic.java

@@ -1446,4 +1446,15 @@ public class DailyImportSummaryLogic {
 
         return commonMapper.repairAllList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean, adminUser.getCompanyWechatIds());
     }
+
+    public DailyCountBean repairAllCount() {
+        AdminUserCom adminUser = commonLogic.getAdminUser();
+        DailyCountBean bean = new DailyCountBean();
+        bean.setWaitCount(commonMapper.repairAllCount(adminUser.getCompanyWechatIds(), adminUser.getAdminWebsitIds(), 1));
+        bean.setEndCount(commonMapper.repairAllCount(adminUser.getCompanyWechatIds(), adminUser.getAdminWebsitIds(), 2));
+        bean.setIngCount(commonMapper.repairAllCount(adminUser.getCompanyWechatIds(), adminUser.getAdminWebsitIds(), 3));
+        bean.setErrCount(commonMapper.repairAllCount(adminUser.getCompanyWechatIds(), adminUser.getAdminWebsitIds(), 4));
+        bean.setRejectCount(commonMapper.repairAllCount(adminUser.getCompanyWechatIds(), adminUser.getAdminWebsitIds(), 5));
+        return bean;
+    }
 }

+ 21 - 0
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -1243,6 +1243,7 @@
                     AND u.user_id = wb.user_id
                     AND u.apply_type = 'WORKER'
                     AND wb.examine_status = 'OK'
+                GROUP BY wb.worker_number
             ) aa on a.worker_number = aa.worker_number
             LEFT JOIN settle_daily_bank_account b ON aa.id_card = b.idcard
             LEFT JOIN settle_daily_issue_summary_record c ON c.id  = a.issue_salary_id
@@ -1266,5 +1267,25 @@
         ${ex.orderBy}
     </select>
 
+    <select id="repairAllCount" resultType="java.lang.Integer">
+        SELECT
+            COUNT(1)
+        FROM
+            settle_daily_import_summary_item a JOIN settle_daily_issue_summary_record c ON c.id = a.issue_salary_id
+        <if test="companyWechatIds != null and companyWechatIds.size > 0">
+            AND a.company_wechat_id IN
+            <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="adminWebsitIds != null and adminWebsitIds.size > 0">
+            AND a.websit_number IN
+            <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        WHERE
+            c.status = #{status}
+    </select>
 
 </mapper>