Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/uas_schedular

chenw 6 years ago
parent
commit
307e3fc11a

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

@@ -20,7 +20,7 @@ public class CheckTransTask extends AbstractTask {
 
     @TaskMapping(title = "采购询价单", fixedDelay = 60000)
     public void uploadInquiry() {
-        List<Inquiry> inquiryList = jdbcTemplate.queryForBeanList("select * from (select in_id from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and IN_SENDSTATUS='已上传' and in_b2bid is null and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) order by in_date desc) where rowNum <= 100",
+        List<Inquiry> inquiryList = jdbcTemplate.queryForBeanList("select * from (select in_id from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and IN_SENDSTATUS='已上传' and in_b2bid is null and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) order by in_date desc) where rowNum <= 100",
                 Inquiry.class);
         if (!CollectionUtils.isEmpty(inquiryList)) {
             ContextHolder.setDataSize(inquiryList.size());
@@ -43,7 +43,7 @@ public class CheckTransTask extends AbstractTask {
 
     @TaskMapping(title = "采购订单", fixedDelay = 60000)
     public void uploadPurchase() {
-        List<Purchase> purchaseList = jdbcTemplate.queryForBeanList("select * from (select pu_id from purchase left join vendor on pu_vendcode=ve_code left join employee on pu_buyerid=em_id where PU_SENDSTATUS='已上传' and pu_statuscode='AUDITED' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and not exists (select 1 from purchasedetail,product where pd_puid=pu_id and pr_code=pd_prodcode and pr_sendstatus<>'已上传' and pu_b2bid is null) order by pu_code) where rowNum <= 100",
+        List<Purchase> purchaseList = jdbcTemplate.queryForBeanList("select * from (select pu_id from purchase left join vendor on pu_vendcode=ve_code left join employee on pu_buyerid=em_id where PU_SENDSTATUS='已上传' and pu_statuscode='AUDITED' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and not exists (select 1 from purchasedetail,product where pd_puid=pu_id and pr_code=pd_prodcode and pr_sendstatus<>'已上传' and pu_b2bid is null) order by pu_code) where rowNum <= 100",
                 Purchase.class);
         if (!CollectionUtils.isEmpty(purchaseList)) {
             ContextHolder.setDataSize(purchaseList.size());

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

@@ -35,7 +35,7 @@ public class InquiryMouldTask extends AbstractTask {
      * @return
      */
     public List<InquiryMould> getInquiryMouldUpload() {
-        List<InquiryMould> inquiryMoulds = jdbcTemplate.queryForBeanList("select InquiryMould.*,ve_uu in_veuu,em_uu in_recorderuu from InquiryMould left join employee on in_recorderid = em_id left join vendor on ve_code=in_vendcode where (in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中')) and nvl(in_sourcetype,' ')='模具报价单' and exists (select 1 from InquiryMould left join vendor on in_vendcode=ve_code and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) order by in_code",
+        List<InquiryMould> inquiryMoulds = jdbcTemplate.queryForBeanList("select InquiryMould.*,ve_uu in_veuu,em_uu in_recorderuu from InquiryMould left join employee on in_recorderid = em_id left join vendor on ve_code=in_vendcode where (in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中')) and nvl(in_sourcetype,' ')='模具报价单' and exists (select 1 from InquiryMould left join vendor on in_vendcode=ve_code and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) order by in_code",
                 InquiryMould.class);
         for (InquiryMould inquiryMould : inquiryMoulds) {
             List<InquiryMouldDet> dets = jdbcTemplate.queryForBeanList(
@@ -237,7 +237,7 @@ public class InquiryMouldTask extends AbstractTask {
 
     @TaskMapping(title = "上传买家对报价信息是否采纳的决策到平台", fixedDelay = 60000)
     public void uploadInquiryMouldDecide() {
-        List<InquiryMouldDecide> decides = jdbcTemplate.queryForBeanList("select in_id,in_code,in_adoptstatus,b2b_im_id,in_checksendstatus from InquiryMould left join vendor on in_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_sourcetype,' ')='模具报价单' and IN_CHECKSENDSTATUS='待上传' and (in_adoptstatus is not null and nvl (in_adoptstatus,'')<>'待审核') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 order by in_code,in_id",
+        List<InquiryMouldDecide> decides = jdbcTemplate.queryForBeanList("select in_id,in_code,in_adoptstatus,b2b_im_id,in_checksendstatus from InquiryMould left join vendor on in_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_sourcetype,' ')='模具报价单' and IN_CHECKSENDSTATUS='待上传' and (in_adoptstatus is not null and nvl (in_adoptstatus,'')<>'待审核') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by in_code,in_id",
                 InquiryMouldDecide.class);
         if (!CollectionUtils.isEmpty(decides)) {
             ContextHolder.setDataSize(decides.size());

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

@@ -66,7 +66,7 @@ public class InquiryTask extends AbstractTask {
     private Integer uploadProduct() {
         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 coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传'");
+                        "and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传'");
     }
 
     /**
@@ -75,11 +75,11 @@ public class InquiryTask extends AbstractTask {
      * @return
      */
     private List<Inquiry> getInquiryUpload() {
-        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select Inquiry.*,em_uu in_recorderuu from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) and  rowNum <= 200 order by in_code  ",
+        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select Inquiry.*,em_uu in_recorderuu from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) and  rowNum <= 200 order by in_code  ",
                 Inquiry.class);
         for (Inquiry inquiry : inquiries) {
             // 获取询价单明细
-            List<InquiryDetail> details = jdbcTemplate.queryForBeanList("select InquiryDetail.*,ve_uu,nvl(id_vendcontact,ve_contact) ve_contact,nvl(id_vendcontactuu,ve_contactuu) ve_contactuu,em_uu ve_buyeruu from InquiryDetail left join vendor on id_vendcode=ve_code left join employee on ve_buyercode=em_code where id_inid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0",
+            List<InquiryDetail> details = jdbcTemplate.queryForBeanList("select InquiryDetail.*,ve_uu,nvl(id_vendcontact,ve_contact) ve_contact,nvl(id_vendcontactuu,ve_contactuu) ve_contactuu,em_uu ve_buyeruu from InquiryDetail left join vendor on id_vendcode=ve_code left join employee on ve_buyercode=em_code where id_inid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1",
                     InquiryDetail.class, inquiry.getIn_id());
             for (InquiryDetail detail : details) {
                 // 获取询价单明细的价格分段
@@ -201,7 +201,7 @@ public class InquiryTask extends AbstractTask {
 
     @TaskMapping(title = "上传买家对报价信息是否采纳的决策到平台", fixedDelay = 60000)
     public void uploadInquiryDecide() {
-        List<InquiryDecide> replies = jdbcTemplate.queryForBeanList("select id_id,in_code,id_detno,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_class,' ')<>'主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum < 100 order by in_code,id_detno",
+        List<InquiryDecide> replies = jdbcTemplate.queryForBeanList("select id_id,in_code,id_detno,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_class,' ')<>'主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum < 100 order by in_code,id_detno",
                 InquiryDecide.class);
         if (!CollectionUtils.isEmpty(replies)) {
             ContextHolder.setDataSize(replies.size());
@@ -213,7 +213,7 @@ public class InquiryTask extends AbstractTask {
 
     @TaskMapping(title = "上传买家对报价信息作废的决策到平台", fixedDelay = 60000)
     public void uploadInquiryInvalid() {
-        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum <= 100 order by in_code",
+        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum <= 100 order by in_code",
                 Inquiry.class);
         if (!CollectionUtils.isEmpty(inquiries)) {
             ContextHolder.setDataSize(inquiries.size());
@@ -297,7 +297,7 @@ public class InquiryTask extends AbstractTask {
 
     @TaskMapping(title = "上传买家对主动报价询价单的报价信息作废的决策到平台", fixedDelay = 60000)
     public void uploadQuotationInvalid() {
-        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')='主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum <= 100 order by in_code",
+        List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')='主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum <= 100 order by in_code",
                 Inquiry.class);
         if (!CollectionUtils.isEmpty(inquiries)) {
             ContextHolder.setDataSize(inquiries.size());
@@ -309,7 +309,7 @@ public class InquiryTask extends AbstractTask {
 
     @TaskMapping(title = "上传买家对主动报价信息是否采纳的决策到平台", fixedDelay = 60000)
     public void uploadQuotationDecide() {
-        List<InquiryDecide> decides = jdbcTemplate.queryForBeanList("select id_id,id_detno,b2b_qu_id,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and in_class='主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and b2b_qu_id is not null order by in_code,id_detno",
+        List<InquiryDecide> decides = jdbcTemplate.queryForBeanList("select id_id,id_detno,b2b_qu_id,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and in_class='主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and b2b_qu_id is not null order by in_code,id_detno",
                 InquiryDecide.class);
         if (!CollectionUtils.isEmpty(decides)) {
             ContextHolder.setDataSize(decides.size());

+ 2 - 2
src/main/java/com/uas/erp/schedular/b2b/task/MakeProdInOutTask.java

@@ -40,7 +40,7 @@ public class MakeProdInOutTask extends AbstractTask {
                 "select * from (select prodinout.*, ve_uu pi_vendoruu from "
                         + " prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where"
                         + " pi_class='委外验收单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中')"
-                        + "and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 ) where rownum<=200", MakeProdInOut.class);
+                        + "and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 ) where rownum<=200", MakeProdInOut.class);
         for (MakeProdInOut prodInOut : prodInOuts) {
             List<MakeProdInOutDetail> details = jdbcTemplate.queryForBeanList(
                     "select prodiodetail.* , pd_pdno pd_detno from prodiodetail where pd_piid = ? ",
@@ -81,7 +81,7 @@ public class MakeProdInOutTask extends AbstractTask {
     public List<MakeProdInOut> getProdReturnUpload() {
         List<MakeProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from"
                         + " prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where"
-                        + " pi_class='委外验退单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) where rownum <= 200 ",
+                        + " pi_class='委外验退单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) where rownum <= 200 ",
                 MakeProdInOut.class);
         for (MakeProdInOut prodInOut : prodInOuts) {
             List<MakeProdInOutDetail> details = jdbcTemplate.queryForBeanList(

+ 2 - 2
src/main/java/com/uas/erp/schedular/b2b/task/MakeTask.java

@@ -31,7 +31,7 @@ public class MakeTask extends AbstractTask {
     public void uploadMake() {
         Integer size = uploadProduct();
         if (size == 0) {
-            List<Make> makes = jdbcTemplate.queryForBeanList("select * from (select make.*, ve_uu from make left join vendor on ma_vendcode=ve_code where nvl(ve_b2benable,0)<>0 and coalesce(ve_uu, '0') <> '0' and nvl(ma_tasktype, '')='OS' and ma_checkstatuscode='APPROVE' and (ma_sendstatus='待上传' or ma_sendstatus='上传中')) where rownum <= 100",
+            List<Make> makes = jdbcTemplate.queryForBeanList("select * from (select make.*, ve_uu from make left join vendor on ma_vendcode=ve_code where nvl(ve_b2benable,0)=1 and coalesce(ve_uu, '0') <> '0' and nvl(ma_tasktype, '')='OS' and ma_checkstatuscode='APPROVE' and (ma_sendstatus='待上传' or ma_sendstatus='上传中')) where rownum <= 100",
                     Make.class);
             if (!CollectionUtils.isEmpty(makes)) {
                 ContextHolder.setDataSize(makes.size());
@@ -45,7 +45,7 @@ public class MakeTask 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 make left join vendor on ve_code = ma_vendcode where ma_tasktype='OS'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and make.ma_prodcode = product.pr_code) and nvl(pr_sendstatus,' ')<>'已上传' order by pr_id) where rownum <= 500",
+        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 make left join vendor on ve_code = ma_vendcode where ma_tasktype='OS'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and make.ma_prodcode = product.pr_code) and nvl(pr_sendstatus,' ')<>'已上传' order by pr_id) where rownum <= 500",
                 Prod.class);
         if (!CollectionUtils.isEmpty(prods)) {
             return prods.size();

+ 2 - 2
src/main/java/com/uas/erp/schedular/b2b/task/PurchaseAPBillTask.java

@@ -47,7 +47,7 @@ public class PurchaseAPBillTask extends AbstractTask {
         List<PurchaseAPBill> purchaseAPBills = jdbcTemplate.queryForBeanList(
                 "select * from (select apbill.*, ve_uu ab_vendoruu from apbill"
                         + " left join vendor on apbill.ab_vendcode = vendor.ve_code where ab_class = '应付发票' and ab_status = '已过账'"
-                        + " and ab_sendstatus = '待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ab_kind,' ')<>'货款调账' and nvl(ve_b2benable,0)<>0 ) where rownum <= 10",
+                        + " and ab_sendstatus = '待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ab_kind,' ')<>'货款调账' and nvl(ve_b2benable,0)=1 ) where rownum <= 10",
                 PurchaseAPBill.class);
         for (PurchaseAPBill purchaseAPBill : purchaseAPBills) {
             List<PurchaseAPBillDetail> apBillDetails = jdbcTemplate.queryForBeanList(
@@ -89,7 +89,7 @@ public class PurchaseAPBillTask extends AbstractTask {
      */
     private List<PurchaseAPBill> getApbillAdjustmentUpload() {
         List<PurchaseAPBill> purchaseAPBills = jdbcTemplate.queryForBeanList("select * from (select apbill.*, ve_uu ab_vendoruu from apbill left join vendor on apbill.ab_vendcode = vendor.ve_code where vendor.ve_b2bcheck = -1 and ab_class = '其它应付单' and ab_status = '已过账'"
-                                + " and ab_sendstatus = '待上传' and coalesce(ve_uu, '0') <> '0'  and nvl(ab_kind,' ')='货款调账' and nvl(ve_b2benable,0)<>0 ) where rownum <= 200",
+                                + " and ab_sendstatus = '待上传' and coalesce(ve_uu, '0') <> '0'  and nvl(ab_kind,' ')='货款调账' and nvl(ve_b2benable,0)=1 ) where rownum <= 200",
                 PurchaseAPBill.class);
         for (PurchaseAPBill purchaseAPBill : purchaseAPBills) {
             List<PurchaseAPBillDetail> apBillDetails = jdbcTemplate.queryForBeanList(

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

@@ -42,7 +42,7 @@ public class PurchaseChangeTask extends AbstractTask {
      * @return
      */
     private List<PurchaseChange> getPurchaseChangeUpload() {
-        List<PurchaseChange> purchaseChanges = jdbcTemplate.queryForBeanList("select purchasechange.* from purchasechange left join Purchase on pc_purccode=pu_code left join vendor on ve_code=pu_vendcode where PC_SENDSTATUS='待上传' and pu_sendstatus='已上传' and nvl(pu_ordertype,' ')<>'B2C' and nvl(pc_agreed,1)<>0 and pc_statuscode in ('AUDITED','TO_CONFIRM') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 order by pc_code",
+        List<PurchaseChange> purchaseChanges = jdbcTemplate.queryForBeanList("select purchasechange.* from purchasechange left join Purchase on pc_purccode=pu_code left join vendor on ve_code=pu_vendcode where PC_SENDSTATUS='待上传' and pu_sendstatus='已上传' and nvl(pu_ordertype,' ')<>'B2C' and nvl(pc_agreed,1)<>0 and pc_statuscode in ('AUDITED','TO_CONFIRM') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by pc_code",
                 PurchaseChange.class);
         for (PurchaseChange purchaseChange : purchaseChanges) {
             List<PurchaseChangeDetail> changeDetails = jdbcTemplate.queryForBeanList(

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

@@ -40,7 +40,7 @@ public class PurchaseForecastTask extends AbstractTask {
                         + "on pf_buyerid=em_id where Pf_SENDSTATUS='待上传' order by pf_code", PurchaseForecast.class);
         for (PurchaseForecast purchaseForecast : purchaseForecasts) {
             List<PurchaseForecastDetail> purchaseForecastDetails = jdbcTemplate.queryForBeanList("select purchaseforecastdetail.*, ve_uu, ve_contact, ve_contactuu from purchaseforecastDetail "
-                                    + "left join vendor on pfd_vendcode=ve_code where pfd_pfid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 ",
+                                    + "left join vendor on pfd_vendcode=ve_code where pfd_pfid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 ",
                     PurchaseForecastDetail.class, purchaseForecast.getPf_id());
             // 存在有效的明细的单上传,明细都无效的不上传
             if (purchaseForecastDetails.size() > 0) {

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

@@ -45,7 +45,7 @@ public class PurchaseMRBTask extends AbstractTask {
         List<PurchaseQuaMRB> purchaseMRBs = jdbcTemplate.queryForBeanList(
                 "select qua_mrb.*, vendor.ve_uu mr_venduu, qua_mrb.mr_presult mr_result from qua_mrb "
                         + " left join vendor on qua_mrb.mr_vendcode = vendor.ve_code where mr_sendstatus = '待上传' "
-                        + " and mr_status = '已审核' and mr_qctype = '采购检验单' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 ",
+                        + " and mr_status = '已审核' and mr_qctype = '采购检验单' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 ",
                 PurchaseQuaMRB.class);
         for (PurchaseQuaMRB purchaseMRB : purchaseMRBs) {
             List<PurchaseQuaMRBCheckItem> checkItems = jdbcTemplate.queryForBeanList("select * from qua_mrbdet where md_mrid = ? ",

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

@@ -27,7 +27,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,' ')='待上传'and pn_status<>'已取消' and nvl(pu_sendstatus, '') = '已上传' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 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,' ')='待上传'and pn_status<>'已取消' and nvl(pu_sendstatus, '') = '已上传' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by pn_indate) where rownum <= 100",
                 PurchaseNotify.class);
         if (!CollectionUtils.isEmpty(notifies)) {
             ContextHolder.setDataSize(notifies.size());
@@ -127,7 +127,7 @@ public class PurchaseNotifyTask extends AbstractTask {
 
     @TaskMapping(title = "上传结案送货提醒", fixedDelay = 60000)
     public void uploadPurchaseNotifyEnd() {
-        List<PurchaseNotify> notifies = jdbcTemplate.queryForBeanList("select * from (select purchasenotify.pn_id,ve_uu from purchasenotify left join purchase on pn_ordercode=pu_code left join vendor on pu_vendcode=ve_code where PN_SENDSTATUS='待上传' and pn_statuscode='CANCELED' and pu_sendstatus='已上传' and nvl(pu_ordertype,' ')<>'B2C' and pn_b2bid is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 order by pn_indate) where rownum<=400",
+        List<PurchaseNotify> notifies = jdbcTemplate.queryForBeanList("select * from (select purchasenotify.pn_id,ve_uu from purchasenotify left join purchase on pn_ordercode=pu_code left join vendor on pu_vendcode=ve_code where PN_SENDSTATUS='待上传' and pn_statuscode='CANCELED' and pu_sendstatus='已上传' and nvl(pu_ordertype,' ')<>'B2C' and pn_b2bid is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by pn_indate) where rownum<=400",
                 PurchaseNotify.class);
         if (!CollectionUtils.isEmpty(notifies)) {
             ContextHolder.setDataSize(notifies.size());
@@ -175,7 +175,7 @@ public class PurchaseNotifyTask extends AbstractTask {
      * @return
      */
     private List<AcceptNotify> getAcceptNotify() {
-        List<AcceptNotify> accepts = jdbcTemplate.queryForBeanList("select AcceptNotify.* from AcceptNotify left join vendor on an_vendcode=ve_code where AN_SENDSTATUS='待上传' and an_statuscode='AUDITED' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and B2B_SS_ID is not null order by an_date",
+        List<AcceptNotify> accepts = jdbcTemplate.queryForBeanList("select AcceptNotify.* from AcceptNotify left join vendor on an_vendcode=ve_code where AN_SENDSTATUS='待上传' and an_statuscode='AUDITED' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and B2B_SS_ID is not null order by an_date",
                 AcceptNotify.class);
         for (AcceptNotify accept : accepts) {
             List<AcceptNotifyDetail> details = jdbcTemplate.queryForBeanList("select * from AcceptNotifyDetail where and_anid=?",
@@ -193,7 +193,7 @@ public class PurchaseNotifyTask extends AbstractTask {
      */
     @TaskMapping(title = "上传收料通知修改的确认数", fixedDelay = 60000)
     public void uploadAcceptNotifyConfirm() {
-        List<AcceptNotifyConfirm> confirms = jdbcTemplate.queryForBeanList("select b2b_ss_id,and_id,and_detno,and_inqty from AcceptNotify left join vendor on an_vendcode=ve_code left join AcceptNotifyDetail on and_anid=an_id where b2b_ss_id is not null and an_statuscode in ('AUDITED','TURNVA', 'PART2VA') and and_sendstatus='待上传' and and_inqty<nvl(and_b2bqty,and_inqty) and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 order by b2b_ss_id,and_detno",
+        List<AcceptNotifyConfirm> confirms = jdbcTemplate.queryForBeanList("select b2b_ss_id,and_id,and_detno,and_inqty from AcceptNotify left join vendor on an_vendcode=ve_code left join AcceptNotifyDetail on and_anid=an_id where b2b_ss_id is not null and an_statuscode in ('AUDITED','TURNVA', 'PART2VA') and and_sendstatus='待上传' and and_inqty<nvl(and_b2bqty,and_inqty) and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by b2b_ss_id,and_detno",
                 AcceptNotifyConfirm.class);
         if (!CollectionUtils.isEmpty(confirms)) {
             ContextHolder.setDataSize(confirms.size());

+ 4 - 4
src/main/java/com/uas/erp/schedular/b2b/task/PurchaseProdInOutTask.java

@@ -38,7 +38,7 @@ public class PurchaseProdInOutTask extends AbstractTask {
      */
     private List<PurchaseProdInOut> getProInOutUpload() {
         List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList(
-                "select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='采购验收单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 ) where rownum <= 20 and exists (select 1 from purchase,prodiodetail where pd_piid=pi_id and pu_sendstatus='已上传')",
+                "select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='采购验收单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 ) where rownum <= 20 and exists (select 1 from purchase,prodiodetail where pd_piid=pi_id and pu_sendstatus='已上传')",
                 PurchaseProdInOut.class);
         System.out.println(CollectionUtil.getKeyString(prodInOuts));
         for (PurchaseProdInOut prodInOut : prodInOuts) {
@@ -71,7 +71,7 @@ public class PurchaseProdInOutTask extends AbstractTask {
      * @return
      */
     private List<PurchaseProdInOut> getProdReturnUpload() {
-        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='采购验退单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and exists (select 1 from prodiodetail left join purchase on pu_code=pd_ordercode where pd_piid=pi_id and (pd_ordercode is null or pu_sendstatus='已上传')) and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) where rownum <= 200 ",
+        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='采购验退单' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and exists (select 1 from prodiodetail left join purchase on pu_code=pd_ordercode where pd_piid=pi_id and (pd_ordercode is null or pu_sendstatus='已上传')) and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) where rownum <= 200 ",
                 PurchaseProdInOut.class);
         for (PurchaseProdInOut prodInOut : prodInOuts) {
             List<PurchaseProdInOutDetail> details = jdbcTemplate.queryForBeanList(
@@ -103,7 +103,7 @@ public class PurchaseProdInOutTask extends AbstractTask {
      * @return
      */
     private List<PurchaseProdInOut> getProdBadInUpload() {
-        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='不良品入库单' and pi_type='PURC' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) where rownum<=200 ",
+        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='不良品入库单' and pi_type='PURC' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) where rownum<=200 ",
                 PurchaseProdInOut.class);
         for (PurchaseProdInOut prodInOut : prodInOuts) {
             List<PurchaseProdInOutDetail> details = jdbcTemplate.queryForBeanList(
@@ -135,7 +135,7 @@ public class PurchaseProdInOutTask extends AbstractTask {
      * @return
      */
     private List<PurchaseProdInOut> getProdBadOutUpload() {
-        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='不良品出库单' and pi_type = 'PURC' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) where rownum <= 200 ",
+        List<PurchaseProdInOut> prodInOuts = jdbcTemplate.queryForBeanList("select * from (select prodinout.*, ve_uu pi_vendoruu from prodinout left join vendor on prodinout.pi_cardcode = vendor.ve_code where pi_class='不良品出库单' and pi_type = 'PURC' and pi_status = '已过账' and (pi_sendstatus = '待上传' or pi_sendstatus='上传中') and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) where rownum <= 200 ",
                 PurchaseProdInOut.class);
         for (PurchaseProdInOut prodInOut : prodInOuts) {
             List<PurchaseProdInOutDetail> details = jdbcTemplate.queryForBeanList(

+ 4 - 4
src/main/java/com/uas/erp/schedular/b2b/task/PurchaseSampleTask.java

@@ -48,11 +48,11 @@ public class PurchaseSampleTask extends AbstractTask {
         List<ProductSample> productSamples = jdbcTemplate.queryForBeanList("select productsample.*,em_uu ps_appmanuu from productsample left join employee"
                         + " on productsample.ps_appmanid = em_id where (ps_sendstatus='待上传' or"
                         + " ps_sendstatus='上传中') and ps_status='已审核' and exists (select 1 from productsampledetail left"
-                        + " join vendor on pd_vendcode=ve_code where pd_psid=ps_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) order by ps_code",
+                        + " join vendor on pd_vendcode=ve_code where pd_psid=ps_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) order by ps_code",
                 ProductSample.class);
         for (ProductSample productSample : productSamples) {
             List<ProductSampleDetail> details = jdbcTemplate.queryForBeanList("select productsampledetail.*,ve_contactuu pd_contactuu from productsampledetail"
-                            + " left join vendor on pd_vendcode=ve_code where pd_psid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0",
+                            + " left join vendor on pd_vendcode=ve_code where pd_psid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1",
                     ProductSampleDetail.class, productSample.getPs_id());
             productSample.setDetails(details);
             // 附件信息
@@ -172,7 +172,7 @@ public class PurchaseSampleTask extends AbstractTask {
         List<ProductSampleApproval> saleSampleSends = jdbcTemplate.queryForBeanList("select * from (select productapproval.*, "
                                 + "to_number(ve_uu) pa_venduu, pr_detail, pr_spec, pr_unit from productapproval left join vendor on "
                                 + "productapproval.pa_providecode = vendor.ve_code left join product on productapproval.pa_prodcode = "
-                                + "product.pr_code where pa_status='已审核' and pa_sendstatus='待上传'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum<10)",
+                                + "product.pr_code where pa_status='已审核' and pa_sendstatus='待上传'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum<10)",
                 ProductSampleApproval.class);
         if (!CollectionUtils.isEmpty(saleSampleSends)) {
             for (ProductSampleApproval approval : saleSampleSends) {
@@ -201,7 +201,7 @@ public class PurchaseSampleTask extends AbstractTask {
     public void invalidateSaleSampleSend() {
         List<Long> sampleIds = jdbcTemplate.queryIdList("select productsample.ps_id id from productsample left join employee" +
                 " on productsample.ps_appmanid = em_id where ps_sendstatus = '已上传' and ps_status='已作废' and exists (select 1 from productsampledetail left" +
-                " join vendor on pd_vendcode=ve_code where pd_psid=ps_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) order by ps_code",
+                " join vendor on pd_vendcode=ve_code where pd_psid=ps_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) order by ps_code",
                 IdObject.class);
         if (!CollectionUtils.isEmpty(sampleIds)) {
             ContextHolder.setDataSize(sampleIds.size());

+ 4 - 4
src/main/java/com/uas/erp/schedular/b2b/task/PurchaseTask.java

@@ -48,7 +48,7 @@ public class PurchaseTask 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 purchase left join vendor on pu_vendcode=ve_code left join purchasedetail on pd_puid=pu_id where (PU_SENDSTATUS='待上传' or PU_SENDSTATUS='上传中' or pu_sendstatus='已上传') and nvl(pu_ordertype,' ')<>'B2C' and pu_statuscode='AUDITED' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and pd_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传' order by pr_id) where rownum <= 500",
+        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 purchase left join vendor on pu_vendcode=ve_code left join purchasedetail on pd_puid=pu_id where (PU_SENDSTATUS='待上传' or PU_SENDSTATUS='上传中' or pu_sendstatus='已上传') and nvl(pu_ordertype,' ')<>'B2C' and pu_statuscode='AUDITED' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and pd_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传' order by pr_id) where rownum <= 500",
                 Prod.class);
         if (!CollectionUtils.isEmpty(prods)) {
             return prods.size();
@@ -62,7 +62,7 @@ public class PurchaseTask extends AbstractTask {
      * @return
      */
     private List<Purchase> getPurchasesUpload() {
-        List<Purchase> purchases = jdbcTemplate.queryForBeanList("select * from (select purchase.*,em_uu,em_name,em_sex,em_mobile,em_email,vendor.ve_uu,pu_vendcontact ve_contact,purchase.pu_vendcontactuu ve_contactuu from purchase left join vendor on pu_vendcode=ve_code left join employee on pu_buyerid=em_id where (PU_SENDSTATUS='待上传' or PU_SENDSTATUS='上传中') and pu_statuscode='AUDITED' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and not exists (select 1 from purchasedetail,product where pd_puid=pu_id and pr_code=pd_prodcode and pr_sendstatus<>'已上传') order by pu_code) where rownum < 100",
+        List<Purchase> purchases = jdbcTemplate.queryForBeanList("select * from (select purchase.*,em_uu,em_name,em_sex,em_mobile,em_email,vendor.ve_uu,pu_vendcontact ve_contact,purchase.pu_vendcontactuu ve_contactuu from purchase left join vendor on pu_vendcode=ve_code left join employee on pu_buyerid=em_id where (PU_SENDSTATUS='待上传' or PU_SENDSTATUS='上传中') and pu_statuscode='AUDITED' and nvl(pu_ordertype,' ')<>'B2C' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and not exists (select 1 from purchasedetail,product where pd_puid=pu_id and pr_code=pd_prodcode and pr_sendstatus<>'已上传') order by pu_code) where rownum < 100",
                 Purchase.class);
         List<Purchase> thisPost = new ArrayList<>();
         int count = 0;
@@ -174,7 +174,7 @@ public class PurchaseTask extends AbstractTask {
 
     @TaskMapping(title = "上传主动回复的记录到平台", fixedDelay = 60000, enabled = false)
     public void uploadPurchaseReply() {
-        List<PurchaseReply> replies = jdbcTemplate.queryForBeanList("select * from (select pr_id,pr_qty,pr_delivery,pr_remark,pr_pucode,pr_pddetno,pr_date,pr_recorder,b2b_pr_id,pr_type from PurchaseReply left join PurchaseDetail on pr_pucode=pd_code and pr_pddetno=pd_detno left join purchase on pd_puid=pu_id left join vendor on pu_vendcode=ve_code where PR_SENDSTATUS='待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and nvl(b2b_pr_id,0)=0 order by pr_date) where rownum <= 10",
+        List<PurchaseReply> replies = jdbcTemplate.queryForBeanList("select * from (select pr_id,pr_qty,pr_delivery,pr_remark,pr_pucode,pr_pddetno,pr_date,pr_recorder,b2b_pr_id,pr_type from PurchaseReply left join PurchaseDetail on pr_pucode=pd_code and pr_pddetno=pd_detno left join purchase on pd_puid=pu_id left join vendor on pu_vendcode=ve_code where PR_SENDSTATUS='待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and nvl(b2b_pr_id,0)=0 order by pr_date) where rownum <= 10",
                 PurchaseReply.class);
         if (!CollectionUtils.isEmpty(replies)) {
             ContextHolder.setDataSize(replies.size());
@@ -187,7 +187,7 @@ public class PurchaseTask extends AbstractTask {
 
     @TaskMapping(title = "上传结案、反结案采购订单", fixedDelay = 60000)
     public void uploadPurchaseEnd() {
-        List<PurchaseDetailEnd> details = jdbcTemplate.queryForBeanList("select * from (select pd_id,pd_code,pd_detno,case when pd_mrpstatuscode='FINISH' then 1 else 0 end pd_ended from PurchaseDetail left join purchase on pd_puid=pu_id left join vendor on pu_vendcode=ve_code where PU_SENDSTATUS='已上传' and nvl(pu_ordertype,' ')<>'B2C' and pd_endstatus='待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 order by pd_code,pd_detno) where rownum <= 200",
+        List<PurchaseDetailEnd> details = jdbcTemplate.queryForBeanList("select * from (select pd_id,pd_code,pd_detno,case when pd_mrpstatuscode='FINISH' then 1 else 0 end pd_ended from PurchaseDetail left join purchase on pd_puid=pu_id left join vendor on pu_vendcode=ve_code where PU_SENDSTATUS='已上传' and nvl(pu_ordertype,' ')<>'B2C' and pd_endstatus='待上传' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 order by pd_code,pd_detno) where rownum <= 200",
                 PurchaseDetailEnd.class);
         if (!CollectionUtils.isEmpty(details)) {
             ContextHolder.setDataSize(details.size());

+ 2 - 2
src/main/java/com/uas/erp/schedular/mall/task/OrderTask.java

@@ -47,8 +47,8 @@ import java.util.Map;
 @TaskMapping(title = "商城订单")
 public class OrderTask extends AbstractTask {
 
-//    private static final String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";
-    private static final String BASEPATH_TRADE = "https://malltraderest.uuzcc.cn";
+    private static final String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";
+    //private static final String BASEPATH_TRADE = "https://malltraderest.uuzcc.cn";
 
     private static final Logger LOGGER = LoggerFactory.getLogger(OrderTask.class);
 

+ 6 - 6
src/main/java/com/uas/erp/schedular/mall/task/ProductTask.java

@@ -270,15 +270,15 @@ public class ProductTask extends AbstractTask {
         return list;
     }
 
-/*    private final static String SECRETKEY = "58177a621f4645398c92e93768002de7";
+    private final static String SECRETKEY = "58177a621f4645398c92e93768002de7";
     private final static String SECRETUU = "10044412";
     private final static String BASEPATH_PRODUCT = "https://mallproductrest.usoftchina.com";
-    private final static String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";*/
+    private final static String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";
 
-    private final static String SECRETKEY = "c49f7be6a861461ab951e55030055a5c";
-    private final static String SECRETUU = "50000089";
-    private final static String BASEPATH_PRODUCT = "https://mallproductrest.uuzcc.cn";
-    private final static String BASEPATH_TRADE = "https://malltraderest.uuzcc.cn";
+//    private final static String SECRETKEY = "c49f7be6a861461ab951e55030055a5c";
+//    private final static String SECRETUU = "50000089";
+//    private final static String BASEPATH_PRODUCT = "https://mallproductrest.uuzcc.cn";
+//    private final static String BASEPATH_TRADE = "https://malltraderest.uuzcc.cn";
 //    private final static String BASEPATH = "http://10.1.80.79:25320";
 
     /**

+ 1 - 1
src/main/java/com/uas/erp/schedular/publicinquiry/task/PubInquiryTask.java

@@ -194,7 +194,7 @@ public class PubInquiryTask extends AbstractTask {
     public void uploadInquiryInvalid() {
         Enterprise enterprise = getEnterprise();
         if (null != enterprise) {
-            List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from InquiryAuto left join InquiryAutoDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendStatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum <= 100 order by in_code",
+            List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from InquiryAuto left join InquiryAutoDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendStatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价'  and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum <= 100 order by in_code",
                     Inquiry.class);
             if (!CollectionUtils.isEmpty(inquiries)) {
                 ContextHolder.setDataSize(inquiries.size());