‘linchangsheng’ преди 5 месеца
родител
ревизия
b5e2069cff

+ 2 - 5
mall-server-api/src/main/java/com/gree/mall/manager/bean/workorder/WebsitDispatchRe.java

@@ -24,15 +24,12 @@ public class WebsitDispatchRe {
     @ApiModelProperty(value = "街道id")
     private String streetCode;
 
-    @ApiModelProperty(value = "工单渠道id")
-    private List<String> dictCode;
-
     @ApiModelProperty(value = "工单类型id")
     private List<String> orderSmallId;
 
     @ApiModelProperty(value = "产品大类id")
     private List<String> categoryId;
 
-    @ApiModelProperty(value = "工单来源id")
-    private List<String> orderSourceId;
+    @ApiModelProperty(value = "销量类型ids")
+    private List<String> saleIds;
 }

+ 7 - 14
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/workorder/IncreMapper.java

@@ -29,10 +29,9 @@ public interface IncreMapper {
                                @Param("cityCode") String cityCode,
                                @Param("areaCode") String areaCode,
                                @Param("streetCode") String streetCode,
-                               @Param("dictCode") List<String> dictCode,
+                               @Param("sales") List<String> sales,
                                @Param("orderSmallId") List<String> orderSmallId,
                                @Param("categoryId") List<String> categoryId,
-                               @Param("orderSourceId") List<String> orderSourceId,
                                 @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -41,10 +40,9 @@ public interface IncreMapper {
             @Param("cityCode") String cityCode,
             @Param("areaCode") String areaCode,
             @Param("streetCode") String streetCode,
-            @Param("dictCode") List<String> dictCode,
+            @Param("sales") List<String> sales,
             @Param("orderSmallId") List<String> orderSmallId,
             @Param("categoryId") List<String> categoryId,
-            @Param("orderSourceId") List<String> orderSourceId,
             @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -52,10 +50,9 @@ public interface IncreMapper {
                                  @Param("cityCode") String cityCode,
                                  @Param("areaCode") String areaCode,
                                  @Param("streetCode") String streetCode,
-                                 @Param("dictCode") List<String> dictCode,
+                                 @Param("sales") List<String> sales,
                                  @Param("orderSmallId") List<String> orderSmallId,
                                  @Param("categoryId") List<String> categoryId,
-                                 @Param("orderSourceId") List<String> orderSourceId,
                                  @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -63,10 +60,9 @@ public interface IncreMapper {
                                @Param("cityCode") String cityCode,
                                @Param("areaCode") String areaCode,
                                @Param("streetCode") String streetCode,
-                               @Param("dictCode") List<String> dictCode,
+                               @Param("sales") List<String> sales,
                                @Param("orderSmallId") List<String> orderSmallId,
                                @Param("categoryId") List<String> categoryId,
-                               @Param("orderSourceId") List<String> orderSourceId,
                                @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -86,10 +82,9 @@ public interface IncreMapper {
                                      @Param("cityCode") String cityCode,
                                      @Param("areaCode") String areaCode,
                                      @Param("streetCode") String streetCode,
-                                     @Param("dictCode") List<String> dictCode,
+                                     @Param("sales") List<String> sales,
                                      @Param("orderSmallId") List<String> orderSmallId,
                                      @Param("categoryId") List<String> categoryId,
-                                     @Param("orderSourceId") List<String> orderSourceId,
                                      @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -97,10 +92,9 @@ public interface IncreMapper {
                                        @Param("cityCode") String cityCode,
                                        @Param("areaCode") String areaCode,
                                        @Param("streetCode") String streetCode,
-                                       @Param("dictCode") List<String> dictCode,
+                                       @Param("sales") List<String> sales,
                                        @Param("orderSmallId") List<String> orderSmallId,
                                        @Param("categoryId") List<String> categoryId,
-                                       @Param("orderSourceId") List<String> orderSourceId,
                                        @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
@@ -109,10 +103,9 @@ public interface IncreMapper {
             @Param("cityCode") String cityCode,
             @Param("areaCode") String areaCode,
             @Param("streetCode") String streetCode,
-            @Param("dictCode") List<String> dictCode,
+            @Param("sales") List<String> sales,
             @Param("orderSmallId") List<String> orderSmallId,
             @Param("categoryId") List<String> categoryId,
-            @Param("orderSourceId") List<String> orderSourceId,
             @Param("adminCompanyIds") List<String> adminCompanyIds);
 
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")

+ 16 - 26
mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/DispatchController.java

@@ -146,8 +146,8 @@ public class DispatchController {
 
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic.pList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 
@@ -158,8 +158,8 @@ public class DispatchController {
 
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic.cList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 
@@ -170,8 +170,8 @@ public class DispatchController {
 
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic.aList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 
@@ -181,23 +181,13 @@ public class DispatchController {
             @RequestBody WebsitDispatchRe websitDispatchRe
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic.sList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 
 
-    @PostMapping("/channel")
-    @ApiOperation(value = "工单渠道")
-    public ResponseHelper<List<DispatchCherVO>> channel(
-            @RequestBody WebsitDispatchRe websitDispatchRe
-    ) {
-        List<DispatchCherVO> dispatchCherVOS = changeOrderLogic.channel(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
 
-        return ResponseHelper.success(dispatchCherVOS);
-    }
 
     @PostMapping("/smallList")
     @ApiOperation(value = "工单类型")
@@ -206,8 +196,8 @@ public class DispatchController {
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic
                 .smallList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                        websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                        websitDispatchRe.getCategoryId());
 
         return ResponseHelper.success(dispatchCherVOS);
     }
@@ -219,20 +209,20 @@ public class DispatchController {
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic
                 .categoryList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                        websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                        websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 
-    @PostMapping("/sourceList")
-    @ApiOperation(value = "工单来源")
+    @PostMapping("/salesList")
+    @ApiOperation(value = "销售类型")
     public ResponseHelper sourceList(
             @RequestBody WebsitDispatchRe websitDispatchRe
     ) {
         List<DispatchCherVO> dispatchCherVOS = changeOrderLogic
                 .sourceList(websitDispatchRe.getProvinceCode(), websitDispatchRe.getCityCode(),
-                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getDictCode(), websitDispatchRe.getOrderSmallId(),
-                        websitDispatchRe.getCategoryId(), websitDispatchRe.getOrderSmallId());
+                        websitDispatchRe.getAreaCode(), websitDispatchRe.getStreetCode(), websitDispatchRe.getSaleIds(), websitDispatchRe.getOrderSmallId(),
+                        websitDispatchRe.getCategoryId());
         return ResponseHelper.success(dispatchCherVOS);
     }
 

+ 14 - 14
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/ChangeOrderLogic.java

@@ -352,33 +352,33 @@ public class ChangeOrderLogic {
         return websitDispatchVOIPage;
     }
 
-    public List<DispatchCherVO> pList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> pList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
 
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.pList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.pList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> cList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> cList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.cList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.cList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> aList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> aList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.aList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.aList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> sList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> sList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.sList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.sList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
     public List<DispatchCherVO> channel(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
@@ -388,25 +388,25 @@ public class ChangeOrderLogic {
         return increMapper.channel(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> smallList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> smallList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.smallList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.smallList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> categoryList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> categoryList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.categoryList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.categoryList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
-    public List<DispatchCherVO> sourceList(String pId, String cityCode, String areaCode, String streetCode, List<String> dictCode, List<String> orderSmallId, List<String> categoryId, List<String> orderSourceId) {
+    public List<DispatchCherVO> sourceList(String pId, String cityCode, String areaCode, String streetCode, List<String> sales, List<String> orderSmallId, List<String> categoryId) {
         //获取当前登录企业id
         AdminUserCom adminUser = commonLogic.getAdminUser();
         List<String> adminCompanyIds = adminUser.getCompanyWechatIds();
-        return increMapper.sourceList(pId, cityCode, areaCode, streetCode, dictCode, orderSmallId, categoryId, orderSourceId, adminCompanyIds);
+        return increMapper.sourceList(pId, cityCode, areaCode, streetCode, sales, orderSmallId, categoryId, adminCompanyIds);
     }
 
     @Transactional(rollbackFor = Exception.class)

+ 27 - 115
mall-server-api/src/main/resources/mapper/workorder/IncreMapper.xml

@@ -92,7 +92,7 @@
         a.province_code as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -113,13 +113,6 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -145,7 +138,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -163,12 +156,6 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
 
      group by a.province_code
     </select>
@@ -178,7 +165,7 @@
         a.city_code as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -199,13 +186,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -231,7 +212,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -249,12 +230,7 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
 
         group by a.city_code
     </select>
@@ -264,7 +240,7 @@
         a.area_code as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -285,13 +261,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -317,7 +287,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -335,13 +305,6 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
-
         group by a.area_code
     </select>
     <select id="sList" resultType="com.gree.mall.manager.bean.workorder.DispatchCherVO">
@@ -350,7 +313,7 @@
         a.id as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -371,13 +334,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -403,7 +360,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -421,12 +378,6 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
 
         group by a.id
     </select>
@@ -457,13 +408,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -522,7 +467,7 @@
         c.id as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -543,13 +488,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -575,7 +514,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -593,12 +532,7 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
 
         group by c.id
     </select>
@@ -608,7 +542,7 @@
         d.category_id as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -629,13 +563,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -661,7 +589,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -679,22 +607,17 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
 
         group by d.category_id
     </select>
     <select id="sourceList" resultType="com.gree.mall.manager.bean.workorder.DispatchCherVO">
         SELECT
-        e.dict_value as valueName,
-        e.dict_code as keyId
+        b.dict_value as valueName,
+        b.dict_code as keyId
         FROM
         region a
-        join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL' and b.del = 0
+        join sys_dict_company b on b.dict_type = 'SALES_TYPE' and b.dict_code >= 100 and b.del = 0
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND b.company_wechat_id IN
             <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
@@ -715,13 +638,7 @@
                 #{item}
             </foreach>
         </if>
-        join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE' and e.del = 0
-        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
-            AND e.company_wechat_id IN
-            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
         LEFT JOIN websit_dispatch f on a.id = f.street_code and b.dict_code = f.dict_code and c.id = f.order_small_id and d.category_id = f.category_id and e.dict_code = f.order_source_id
         <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
             AND f.company_wechat_id IN
@@ -747,7 +664,7 @@
         <if test="streetCode != null and streetCode !=''">
             AND a.id =  #{streetCode}
         </if>
-        <if test="dictCode != null and dictCode.size > 0">
+        <if test="sales != null and sales.size > 0">
             AND b.dict_code IN
             <foreach item="item" index="index" collection="dictCode" open="(" separator="," close=")">
                 #{item}
@@ -765,12 +682,7 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderSourceId != null and orderSourceId.size > 0">
-            AND e.dict_code in
-            <foreach item="item" index="index" collection="orderSourceId" open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
+
 
         group by  e.dict_code
     </select>