Explorar el Código

模具询价下载B2B报价后更新sql语句修改

dongbw hace 8 años
padre
commit
f6d073c1ff
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      src/main/java/com/uas/erp/schedular/b2b/task/InquiryMouldTask.java

+ 10 - 10
src/main/java/com/uas/erp/schedular/b2b/task/InquiryMouldTask.java

@@ -139,23 +139,23 @@ public class InquiryMouldTask extends AbstractTask {
         if (null != objs) {
             int count = jdbcTemplate.count("from PriceMould where pd_id=? and pd_vend1=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=? and idd_id=?) b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price1 = nvl(b.idd_price,0)", in_id, idd_id);
+                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=" + in_id + " and idd_id=" + idd_id + ") b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price1 = nvl(b.idd_price,0)");
             }
             count = jdbcTemplate.count("from PriceMould where pd_id=? and pd_vend2=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=? and idd_id=?) b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price2 = nvl(b.idd_price,0)", in_id, idd_id);
+                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=" + in_id + " and idd_id=" + idd_id + ") b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price2 = nvl(b.idd_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend3=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=? and idd_id=?) b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price3 = nvl(b.idd_price,0)", in_id, idd_id);
+                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=" + in_id + " and idd_id=" + idd_id + ") b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price3 = nvl(b.idd_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend4=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=? and idd_id=?) b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price4 = nvl(b.idd_price,0)", in_id, idd_id);
+                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=" + in_id + " and idd_id=" + idd_id + ") b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price4 = nvl(b.idd_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend5=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=? and idd_id=?) b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price5 = nvl(b.idd_price,0)", in_id, idd_id);
+                jdbcTemplate.execute("merge into pricemoulddet a using ( select idd_pddid,idd_price from inquirymoulddet where idd_inid=" + in_id + " and idd_id=" + idd_id + ") b on (b.idd_pddid=a.pdd_id  ) when matched then update set a.pdd_price5 = nvl(b.idd_price,0)");
             }
         }
     }
@@ -172,23 +172,23 @@ public class InquiryMouldTask extends AbstractTask {
         if (null != objs) {
             int count = jdbcTemplate.count("from PriceMould where pd_id=? and pd_vend1=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=? and ind_id=?) b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice1 = nvl(b.ind_price,0)", in_id, ind_id);
+                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=" + in_id + " and ind_id=" + ind_id + ") b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice1 = nvl(b.ind_price,0)");
             }
             count = jdbcTemplate.count("from PriceMould where pd_id=? and pd_vend2=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=? and ind_id=?) b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice2 = nvl(b.ind_price,0)", in_id, ind_id);
+                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=" + in_id + " and ind_id=" + ind_id + ") b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice2 = nvl(b.ind_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend3=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=? and ind_id=?) b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice3 = nvl(b.ind_price,0)", in_id, ind_id);
+                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=" + in_id + " and ind_id=" + ind_id + ") b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice3 = nvl(b.ind_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend4=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=? and ind_id=?) b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice4 = nvl(b.ind_price,0)", in_id, ind_id);
+                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=" + in_id + " and ind_id=" + ind_id + ") b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice4 = nvl(b.ind_price,0)");
             }
             count = jdbcTemplate.count("select * from PriceMould where pd_id=? and pd_vend5=?", objs);
             if (count > 0) {
-                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=? and ind_id=?) b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice5 = nvl(b.ind_price,0)", in_id, ind_id);
+                jdbcTemplate.execute("merge into PriceMouldDetail a using ( select ind_pmdid,ind_price from InquiryMouldDetail where ind_inid=" + in_id + " and ind_id=" + ind_id + ") b on (b.ind_pmdid=a.pmd_id  ) when matched then update set a.pmd_prodprice5 = nvl(b.ind_price,0)");
             }
         }
     }