‘linchangsheng’ 3 months ago
parent
commit
57b4f8edc8

+ 28 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/apply/WorkerApplyCount.java

@@ -0,0 +1,28 @@
+package com.gree.mall.manager.bean.apply;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class WorkerApplyCount {
+
+    @ApiModelProperty(value = "待网点审批")
+    private Integer dwdsp;
+
+
+    @ApiModelProperty(value = "待中心审批")
+    private Integer dzxsp;
+
+    @ApiModelProperty(value = "中心审批通过")
+    private Integer zxsptg;
+
+
+    @ApiModelProperty(value = "驳回可重审")
+    private Integer bhcs;
+
+
+    @ApiModelProperty(value = "驳回不可重审")
+    private Integer bhbkcx;
+}

+ 12 - 0
mall-server-api/src/main/java/com/gree/mall/manager/controller/apply/WorkerInvolveController.java

@@ -5,6 +5,7 @@ package com.gree.mall.manager.controller.apply;
 import cn.hutool.core.lang.TypeReference;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gree.mall.manager.annotation.ZfireList;
+import com.gree.mall.manager.bean.apply.WorkerApplyCount;
 import com.gree.mall.manager.bean.apply.WorkerInvolveApplyBean;
 import com.gree.mall.manager.bean.apply.WorkerInvolveApplyDetail;
 import com.gree.mall.manager.bean.apply.WorkerInvolveApplyVO;
@@ -38,6 +39,17 @@ public class WorkerInvolveController {
     WorkerInvolveLogic workerInvolveLogic;
 
 
+    @ApiOperation("统计数量")
+    @PostMapping("/count")
+    public ResponseHelper<WorkerApplyCount> count(
+
+    ){
+        WorkerApplyCount workerApplyCount = workerInvolveLogic.count();
+        return ResponseHelper.success(workerApplyCount);
+    }
+
+
+
 
     @ZfireList
     @PostMapping("/list")

+ 36 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/apply/WorkerInvolveLogic.java

@@ -14,6 +14,7 @@ import com.gree.mall.manager.plus.entity.*;
 import com.gree.mall.manager.plus.service.*;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
+import com.gree.mall.miniapp.bean.user.CurrentCompanyWechat;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -173,4 +174,39 @@ public class WorkerInvolveLogic {
 
 
     }
+
+
+    public WorkerApplyCount count() {
+
+        AdminUserCom adminUser = commonLogic.getAdminUser();
+
+        Integer dwdsp = workerInvolveApplyService.lambdaQuery()
+                .in(WorkerInvolveApply::getWebsitId, adminUser.getAdminWebsitIds())
+                .in(WorkerInvolveApply::getStatus, 1).count();
+
+        Integer dzxsp = workerInvolveApplyService.lambdaQuery()
+                .in(WorkerInvolveApply::getWebsitId, adminUser.getAdminWebsitIds())
+                .in(WorkerInvolveApply::getStatus, 3).count();
+
+        Integer tgsp = workerInvolveApplyService.lambdaQuery()
+                .in(WorkerInvolveApply::getWebsitId, adminUser.getAdminWebsitIds())
+                .in(WorkerInvolveApply::getStatus,  5).count();
+
+        Integer bhcs = workerInvolveApplyService.lambdaQuery()
+                .in(WorkerInvolveApply::getWebsitId, adminUser.getAdminWebsitIds())
+                .in(WorkerInvolveApply::getStatus,  2).count();
+
+        Integer bhbkcs = workerInvolveApplyService.lambdaQuery()
+                .in(WorkerInvolveApply::getWebsitId, adminUser.getAdminWebsitIds())
+                .in(WorkerInvolveApply::getStatus,  4).count();
+
+        WorkerApplyCount workerApplyCount = new WorkerApplyCount();
+        workerApplyCount.setDwdsp(dwdsp);
+        workerApplyCount.setDzxsp(dzxsp);
+        workerApplyCount.setZxsptg(tgsp);
+        workerApplyCount.setBhcs(bhcs);
+        workerApplyCount.setBhbkcx(bhbkcs);
+        return workerApplyCount;
+
+    }
 }