Browse Source

Merge remote-tracking branch 'origin/master'

will.chen 7 years ago
parent
commit
93d098a84a

+ 1 - 1
src/main/java/com/uas/erp/schedular/b2b/task/CheckTransTask.java

@@ -66,7 +66,7 @@ public class CheckTransTask extends AbstractTask {
 
     @TaskMapping(title = "发货提醒", fixedDelay = 60000)
     public void uploadPurchaseNotify() {
-        List<PurchaseNotify> notifyList = jdbcTemplate.queryForBeanList("select * from (select pu_id from purchaseNotify left join purchase on pn_orderCode=pu_code left join vendor on pu_vendCode=ve_code left join product on pr_code=pn_prodCode where nvl(PN_SENDSTATUS,' ')='已上传' and pn_b2bid is null and pn_status<>'已取消' and pu_sendStatus='已上传' and nvl(pu_orderType,' ')<>'B2C' and ve_uu is not null and nvl(ve_b2bEnable, 0)=1 order by pn_inDate) where rowNum <= 100",
+        List<PurchaseNotify> notifyList = jdbcTemplate.queryForBeanList("select * from (select pn_id from purchaseNotify left join purchase on pn_orderCode=pu_code left join vendor on pu_vendCode=ve_code left join product on pr_code=pn_prodCode where nvl(PN_SENDSTATUS,' ')='已上传' and pn_b2bid is null and pn_status<>'已取消' and pu_sendStatus='已上传' and nvl(pu_orderType,' ')<>'B2C' and ve_uu is not null and nvl(ve_b2bEnable, 0)=1 order by pn_inDate) where rowNum <= 100",
                 PurchaseNotify.class);
         if (!CollectionUtils.isEmpty(notifyList)) {
             ContextHolder.setDataSize(notifyList.size());

+ 3 - 6
src/main/java/com/uas/erp/schedular/b2b/task/InquiryTask.java

@@ -64,12 +64,9 @@ public class InquiryTask extends AbstractTask {
      * 上传物料资料
      */
     private Integer uploadProduct() {
-        final List<Prod> prods = jdbcTemplate.queryForBeanList("select * from (select pr_id,pr_code,pr_detail,pr_spec,pr_unit,pr_zxbzs,pr_zxdhl,pr_leadtime,pr_ltinstock,pr_brand from product where exists (select 1 from inquirydetail left join vendor on id_vendcode=ve_code left join inquiry on in_id=id_inid where (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' and ve_uu is not null and nvl(ve_b2benable,0)=1 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传') where rownum <= 500",
-                Prod.class);
-        if (!CollectionUtils.isEmpty(prods)) {
-            return prods.size();
-        }
-        return 0;
+        return jdbcTemplate.count("select count(1) from product where exists (select 1 from inquirydetail left join vendor on id_vendcode=ve_code " +
+                        "left join inquiry on in_id=id_inid where (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' " +
+                        "and ve_uu is not null and nvl(ve_b2benable,0)=1 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传'");
     }
 
     /**

+ 1 - 1
src/main/java/com/uas/erp/schedular/b2b/task/PurchaseNotifyTask.java

@@ -22,7 +22,7 @@ public class PurchaseNotifyTask extends AbstractTask {
 
     @TaskMapping(title = "上传送货提醒", fixedDelay = 30000)
     public void uploadPurchaseNotify() {
-        List<PurchaseNotify> notifies = jdbcTemplate.queryForBeanList("select * from (select purchasenotify.*,ve_uu,pr_zxbzs from purchasenotify left join purchase on pn_ordercode=pu_code left join vendor on pu_vendcode=ve_code left join product on pr_code=pn_prodcode where (nvl(PN_SENDSTATUS,' ')='待上传' or nvl(pn_sendstatus,' ')='上传中') and pn_status<>'已取消' and nvl(pu_b2bid, 0) <> 0 and nvl(pu_ordertype,' ')<>'B2C' and ve_uu is not null and nvl(ve_b2benable,0)=1 order by pn_indate) where rownum <= 100",
+        List<PurchaseNotify> notifies = jdbcTemplate.queryForBeanList("select * from (select purchasenotify.*,ve_uu,pr_zxbzs from purchasenotify left join purchase on pn_ordercode=pu_code left join vendor on pu_vendcode=ve_code left join product on pr_code=pn_prodcode where (nvl(PN_SENDSTATUS,' ')='待上传' or nvl(pn_sendstatus,' ')='上传中') and pn_status<>'已取消' and nvl(pu_sendstatus, '') = '已上传' and nvl(pu_ordertype,' ')<>'B2C' and ve_uu is not null and nvl(ve_b2benable,0)=1 order by pn_indate) where rownum <= 100",
                 PurchaseNotify.class);
         if (!CollectionUtils.isEmpty(notifies)) {
             ContextHolder.setDataSize(notifies.size());