Browse Source

订单下载更新物料信息方法更新

hejq 7 years ago
parent
commit
6c7426c8e5
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/main/java/com/uas/erp/schedular/b2b/task/SaleDownTask.java

+ 5 - 5
src/main/java/com/uas/erp/schedular/b2b/task/SaleDownTask.java

@@ -77,16 +77,16 @@ public class SaleDownTask extends AbstractTask {
         if (idStr.length() > 0) {
             sqls.add("update SaleDown set (sa_custid,sa_custcode,sa_custname,sa_apcustcode,sa_apcustname,sa_shcustcode,sa_shcustname,sa_sellerid,sa_seller,sa_sellercode)=(select cu_id,cu_code,cu_name,cu_arcode,cu_arname,cu_shcustcode,cu_shcustname,cu_sellerid,cu_sellername,em_code from customer left join employee on em_id=cu_sellerid where cu_uu=sa_customeruu) where sa_id in ("
                     + idStr.toString() + ")");
-            sqls.add("merge into SaleDownDetail d" +
+            sqls.add("merge into SaleDownDetail d \n" +
                     "using (select pc_prodid,pc_prodcode,pc_custproddetail,pc_custprodspec,pc_custprodcode from saledown " +
                     "inner join productcustomer on pc_custcode = sa_custcode and sa_id in (" + idStr.toString() + ")) p " +
-                    "on (d.sd_custprodcode = p.pc_custprodcode and sd_said in (" + idStr.toString() + "))" +
-                    "when matched then" +
+                    "on (d.sd_custprodcode = p.pc_custprodcode and sd_said in (" + idStr.toString() + ")) " +
+                    "when matched then \n" +
                     "update set d.sd_prodid = p.pc_prodid,d.sd_prodcode = p.pc_prodcode,d.sd_custproddetail = p.pc_custproddetail,d.sd_prodcustcode = p.pc_custprodspec");
             // 更新客户采购订单明细中的物料,客户物料编号与我司编码一致的料号
-            sqls.add("merge into SaleDownDetail d " +
+            sqls.add("merge into SaleDownDetail d \n" +
                     "using product p on (d.sd_custprodcode = p.pr_code and d.sd_said in (" + idStr.toString() + ")) " +
-                    "when matched then " +
+                    "when matched then \n" +
                     "update set sd_prodid = p.pr_id, sd_prodcode = p.pr_code");
         }
         if (sqls.size() > 0) {