Browse Source

no message

FengChaoYu 9 months ago
parent
commit
e17fc42498

+ 2 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/Freight/RegionTreeBean.java

@@ -3,9 +3,11 @@ package com.gree.mall.manager.bean.Freight;
 import com.gree.mall.manager.plus.entity.Region;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @ApiModel
 @Data
 public class RegionTreeBean extends Region{

+ 2 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/order/OldProductManagerItemAdd.java

@@ -5,9 +5,11 @@ import com.gree.mall.manager.plus.entity.OldProductManagerItemAttribute;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @ApiModel
 @Data
 public class OldProductManagerItemAdd extends OldProductManagerItem {

+ 2 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/websit/WithdrawalOrderDetail.java

@@ -4,9 +4,11 @@ import com.gree.mall.manager.plus.entity.WithdrawalOrder;
 import com.gree.mall.manager.plus.entity.WithdrawalOrderItem;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
 public class WithdrawalOrderDetail extends WithdrawalOrder {
 

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

@@ -6,9 +6,11 @@ import com.gree.mall.manager.plus.entity.WorkerOrderItem;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
 @ApiModel
 public class WorkerOrderDetail extends WorkerOrder {

+ 34 - 10
mall-server-api/src/main/resources/mapper/DailyMapper.xml

@@ -3,27 +3,51 @@
 <mapper namespace="com.gree.mall.manager.commonmapper.DailyMapper">
     <update id="bindWorkerNumber2">
         UPDATE
-            user a
-            JOIN
-            websit_user b ON b.user_id = a.user_id
+            (
+                SELECT
+                    u.id_card,
+                    wb.websit_id,
+                    wb.worker_number,
+                    u.mobile,
+                    u.nick_name
+                FROM
+                    user u, websit_user wb
+                WHERE
+                    u.company_wechat_id = wb.company_wechat_id
+                    AND u.user_id = wb.user_id
+                    AND u.apply_type = 'WORKER'
+                    AND wb.examine_status = 'OK'
+                ) a
             JOIN
             settle_daily_reduce_cost c
-                ON c.repair_worker_name = a.nick_name AND c.repair_worker_mobile = a.mobile AND c.websit_number = b.websit_id
+                ON c.repair_worker_name = a.nick_name AND c.repair_worker_mobile = a.mobile AND c.websit_number = a.websit_id
         SET
-            c.worker_number = b.worker_number
+            c.worker_number = a.worker_number
         WHERE
             c.company_wechat_id = #{companyWechatId}
             AND c.import_batch_no = #{importBatchNo}
     </update>
     <update id="bindWorkerNumber">
         UPDATE
-            user a
-            JOIN
-            websit_user b ON b.user_id = a.user_id
+            (
+                SELECT
+                    u.id_card,
+                    wb.websit_id,
+                    wb.worker_number,
+                    u.mobile,
+                    u.nick_name
+                FROM
+                    user u, websit_user wb
+                WHERE
+                    u.company_wechat_id = wb.company_wechat_id
+                  AND u.user_id = wb.user_id
+                  AND u.apply_type = 'WORKER'
+                  AND wb.examine_status = 'OK'
+            ) a
             JOIN settle_daily_import_summary_item c
-                ON c.repair_worker_name = a.nick_name AND c.repair_worker_mobile = a.mobile AND c.websit_number = b.websit_id
+                ON c.repair_worker_name = a.nick_name AND c.repair_worker_mobile = a.mobile AND c.websit_number = a.websit_id
         SET
-            c.worker_number = b.worker_number
+            c.worker_number = a.worker_number
         WHERE
             c.company_wechat_id = #{companyWechatId}
             AND c.import_batch_no = #{importBatchNo}