فهرست منبع

feat(apCheck):更新出入库单单据筛选方法

hejq 7 سال پیش
والد
کامیت
10bbeea527
1فایلهای تغییر یافته به همراه8 افزوده شده و 7 حذف شده
  1. 8 7
      src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

+ 8 - 7
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -454,7 +454,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "join make$returnitem on mr_id =  mri_paid " +
                 "join make$orders on mri_odid = ma_id  " +
                 "left join sec$enterprises on mr_enuu = en_uu " +
-                " where mri_qty > abs(coalesce(mri_ycheckqty, 0)) and mr_venduu = ").append(enUU).append(" ");
+                " where mr_venduu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and mr_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -509,7 +509,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "join make$acceptitem on make$accept.ma_id = mai_paid " +
                 "join make$orders on mai_odid = make$orders.ma_id " +
                 "left join sec$enterprises on make$accept.ma_enuu = en_uu " +
-                "where mai_qty > coalesce(mai_ycheckqty, 0) and make$accept.ma_venduu = ").append(enUU).append(" ");
+                "where make$accept.ma_venduu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and ma_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -564,7 +564,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "left join purc$orderitems on poi_pdid = pd_id " +
                 "left join purc$orders on pu_id = pd_puid " +
                 "left join sec$enterprises on po_enuu = en_uu " +
-                "where poi_qty > abs(coalesce( poi_ycheckqty, 0)) and po_venduu = ").append(enUU).append(" ");
+                "where po_venduu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and po_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -619,7 +619,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "left join purc$orderitems on pbi_pdid = pd_id " +
                 "left join purc$orders on pu_id = pd_puid " +
                 "left join sec$enterprises on pb_enuu = en_uu " +
-                "where pbi_qty > abs(coalesce(pbi_ycheckqty, 0)) and pb_venduu = ").append(enUU).append(" ");
+                "where pb_venduu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and pb_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -674,7 +674,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "left join purc$orderitems on pri_pdid = pd_id " +
                 "left join purc$orders on pu_id = pd_puid " +
                 "left join sec$enterprises on pr_enuu = en_uu " +
-                "where pri_qty > abs(coalesce(pri_ycheckqty, 0)) and pr_venduu = ").append(enUU).append(" ");
+                "where pr_venduu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and pr_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -730,7 +730,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
             " left join purc$orders on purc$orders.pu_id = pd_puid" +
             " left join sec$enterprises on pa_enuu = en_uu" +
             " left join sale$senditem on b2b_si_id = si_id" +
-            " where pai_qty > coalesce(pai_ycheckqty, 0) and pa_venduu =").append(enUU).append(" ");
+            " where pa_venduu =").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and pa_receivename = '").append(keyword.getReceiveName()).append("' ");
         }
@@ -780,7 +780,8 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "aa_orderdetno orderdetno, aa_detno detno, aa_prid prid, aa_prodcode prodcode, aa_prodspec prodspec, aa_prodtitle prodtitle, aa_produnit as produnit, " +
                 "aa_qty qty, aa_orderprice orderprice, aa_currency currency, aa_taxrate taxrate, aa_whname whname, aa_ycheckqty ycheckqty, " +
                 "(aa_qty - coalesce(aa_ycheckqty, 0)) as thischeckqty, aa_custuu custuu, aa_custuseruu custuseruu, aa_enuu enuu, aa_id sourceid, aa_sendcode sendcode, " +
-                "aa_factory factory, aa_custname custname, aa_payment payment from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ").append(enUU).append(" ");
+                "aa_factory factory, aa_custname custname, aa_payment payment from purc$apbilladjustment" +
+                " where aa_enuu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and aa_receivename = '").append(keyword.getReceiveName()).append("' ");
         }