‘linchangsheng’ 8 months ago
parent
commit
63f5f978c0

+ 1 - 1
mall-miniapp-service/src/main/resources/mapper/workorder/OrderBaseCMapper.xml

@@ -5,7 +5,7 @@
     <select id="countOrderStatus" resultType="com.gree.mall.miniapp.bean.workorder.CountOrderStatusBean">
          select
             count(DISTINCT if(a.order_status='DJD',a.id,null)) 'djd',
-            count(DISTINCT if(a.order_status='FWZ',a.id,null)) 'fwz',
+            count(DISTINCT if(a.order_status in ('FWZ','GCSZT','BFWG'),a.id,null)) 'fwz',
             count(DISTINCT if(a.is_exception=1,a.id,null)) 'ycd',
             count(DISTINCT if(a.order_status='DQD',a.id,null)) 'dqd',
             count(DISTINCT if(a.order_status in ('YWG','YJS'),a.id,null)) 'ywg',

+ 15 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/workorder/AdminWebsitList.java

@@ -0,0 +1,15 @@
+package com.gree.mall.manager.bean.workorder;
+
+import com.gree.mall.manager.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Data
+public class AdminWebsitList extends AdminWebsit {
+
+    @ApiModelProperty(value = "是否派工 true false")
+    private Boolean ifDispatch = false;
+}

+ 3 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/admin/AdminWebsitController.java

@@ -3,6 +3,7 @@ package com.gree.mall.manager.controller.admin;
 import com.gree.mall.manager.bean.ExcelData;
 import com.gree.mall.manager.bean.admin.AdminWebsitNewBean;
 import com.gree.mall.manager.bean.admin.AdminWebsitTree;
+import com.gree.mall.manager.bean.workorder.AdminWebsitList;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
 import com.gree.mall.manager.logic.admin.AdminWebsitLogic;
@@ -59,7 +60,7 @@ public class AdminWebsitController {
 
     @GetMapping("/websitList")
     @ApiOperation("网点列表")
-    public ResponseHelper<List<AdminWebsit>> websitList(
+    public ResponseHelper<List<AdminWebsitList>> websitList(
             @ApiParam(value = "A=平台 B=商户网点 C=普通网点") @RequestParam(required = false) String type,
             @ApiParam(value = "当前权限网点") @RequestParam(required = false) Boolean isAll,
             @ApiParam(value = "状态") @RequestParam(required = false) Boolean status,
@@ -70,7 +71,7 @@ public class AdminWebsitController {
             @ApiParam(value = "工单来源") @RequestParam(required = false) String orderSource,
             @ApiParam(value = "工单类型") @RequestParam(required = false) String orderSmallId
     ) {
-        List<AdminWebsit> list = adminWebsitLogic.websitList(type, isAll, isIncre, status,streetCode,channelId,categoryId,orderSmallId,orderSource);
+        List<AdminWebsitList> list = adminWebsitLogic.websitList(type, isAll, isIncre, status,streetCode,channelId,categoryId,orderSmallId,orderSource);
         return ResponseHelper.success(list);
     }
 

+ 18 - 3
mall-server-api/src/main/java/com/gree/mall/manager/logic/admin/AdminWebsitLogic.java

@@ -1,5 +1,6 @@
 package com.gree.mall.manager.logic.admin;
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import com.alibaba.excel.util.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -7,6 +8,7 @@ import com.gree.mall.manager.bean.ExcelData;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.bean.admin.AdminWebsitNewBean;
 import com.gree.mall.manager.bean.admin.AdminWebsitTree;
+import com.gree.mall.manager.bean.workorder.AdminWebsitList;
 import com.gree.mall.manager.enums.ExamineStatusEnum;
 import com.gree.mall.manager.enums.admin.AdminWebsitTypeEnum;
 import com.gree.mall.manager.enums.material.WebsitGoodsTypeEnum;
@@ -825,8 +827,8 @@ public class AdminWebsitLogic {
         return excelData;
     }
 
-    public List<AdminWebsit> websitList(String type, Boolean isAll, Boolean isIncre, Boolean status, String streetCode, String channelId, String categoryId,
-                                        String orderSmallId, String orderSourceId) {
+    public List<AdminWebsitList> websitList(String type, Boolean isAll, Boolean isIncre, Boolean status, String streetCode, String channelId, String categoryId,
+                                            String orderSmallId, String orderSourceId) {
 
             AdminUserCom adminUser = commonLogic.getAdminUser();
 
@@ -852,6 +854,19 @@ public class AdminWebsitLogic {
                     .in(CollectionUtils.isNotEmpty(adminUser.getAdminWebsitIds()) && (isAll == null || !isAll), AdminWebsit::getWebsitId, adminUser.getAdminWebsitIds())
                     .in(CollectionUtils.isNotEmpty(adminUser.getCompanyWechatIds()), AdminWebsit::getCompanyWechatId, adminUser.getCompanyWechatIds())
                     .list();
-            return list;
+
+
+        List<AdminWebsitList> adminWebsitLists = BeanUtil.copyToList(list, AdminWebsitList.class);
+
+        if (!CollectionUtils.isEmpty(websitIds)) {
+
+            for (AdminWebsitList adminWebsitList : adminWebsitLists) {
+                if (websitIds.contains(adminWebsitList.getWebsitId())) {
+                    adminWebsitList.setIfDispatch(true);
+                }
+            }
+        }
+
+        return adminWebsitLists;
     }
 }