Browse Source

Merge branch 'release-201847-wangcz' of ssh://10.10.101.21/source/platform-b2b into feature-hejq-payment-0104

hejq 7 years ago
parent
commit
e0636174ee

+ 8 - 8
src/main/java/com/uas/platform/b2b/model/util/ApCheckTodoCountSqls.java

@@ -28,7 +28,7 @@ public class ApCheckTodoCountSqls {
      */
     public static final String SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
         "from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
-        "where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 " +
+        "where pa_venduu = ? and pa_enuu = ? and pai_orderprice <> 0 " +
         "group by pa_currency";
 
     /**
@@ -36,7 +36,7 @@ public class ApCheckTodoCountSqls {
      */
     public static final String THISMONTH_SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
         "from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
-        "where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 and pa_date >= ? and pa_date < ? " +
+        "where pa_venduu = ? and pa_enuu = ? and pai_orderprice <> 0 and pa_date >= ? and pa_date < ? " +
         "group by pa_currency";
 
     /**
@@ -44,14 +44,14 @@ public class ApCheckTodoCountSqls {
      */
     public static final String SALE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice), 0) as count, pr_currency as currency \n" +
         "from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
-        "where pr_venduu = ? and pr_enuu = ? and pri_qty > abs(coalesce(pri_ycheckqty, 0)) group by pr_currency";
+        "where pr_venduu = ? and pr_enuu = ? group by pr_currency";
 
     /**
      * 客户采购验退单未对账金额查询语句
      */
     public static final String THISMONTH_SALE_RETURN_COUNT_SQL = "select sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice) as count, pr_currency as currency \n" +
         "from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
-        "where pr_venduu = ? and pr_enuu = ? and pr_date >= ? and pr_date < ? and pri_qty > abs(coalesce(pri_ycheckqty, 0)) group by pr_currency";
+        "where pr_venduu = ? and pr_enuu = ? and pr_date >= ? and pr_date < ? group by pr_currency";
 
     /**
      * 客户委外验收单未对账金额查询语句
@@ -59,7 +59,7 @@ public class ApCheckTodoCountSqls {
     public static final String MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
         " from make$accept " +
         "join make$acceptitem on ma_id = mai_paid " +
-        "where ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 and  mai_qty > coalesce(mai_ycheckqty, 0) group by ma_currency";
+        "where ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 group by ma_currency";
 
     /**
      * 客户委外验收单未对账金额查询语句
@@ -67,7 +67,7 @@ public class ApCheckTodoCountSqls {
     public static final String THISMONTH_MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
         " from make$accept " +
         "join make$acceptitem on ma_id = mai_paid " +
-        "where ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 and ma_date >= ? and ma_date < ? and mai_qty > coalesce(mai_ycheckqty, 0) group by ma_currency";
+        "where ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 and ma_date >= ? and ma_date < ? group by ma_currency";
 
     /**
      * 客户委外验退单未对账金额查询语句
@@ -75,7 +75,7 @@ public class ApCheckTodoCountSqls {
     public static final String MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count,mr_currency as currency " +
         " from make$return " +
         "join make$returnitem on mr_id =  mri_paid " +
-        "where mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 and mri_qty > abs(coalesce(mri_ycheckqty, 0)) group by mr_currency";
+        "where mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 group by mr_currency";
 
     /**
      * 客户委外验退单未对账金额查询语句
@@ -83,6 +83,6 @@ public class ApCheckTodoCountSqls {
     public static final String THISMONTH_MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count, mr_currency as currency " +
         " from make$return " +
         "join make$returnitem on mr_id =  mri_paid " +
-        "where mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 and mr_date >= ? and mr_date < ? and mri_qty > abs(coalesce(mri_ycheckqty, 0)) " +
+        "where mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 and mr_date >= ? and mr_date < ?  " +
         "group by mr_currency";
 }

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

@@ -340,7 +340,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
             List<ApCheckAmount> thisMonthTodoTrades = apCheckService.getThisMonthTodoTrade(vendorUU, customerUU, checkDate, fromDate, endDate);
             erpProdIo.setThisMonthTodoCount(thisMonthTodoTrades);
             // 本月应收(已收)
-            List<ApCheckAmount>  thisMonthDoneTrades = apCheckService.getThisMonthDoneTrade(vendorUU, customerUU, checkDate, fromDate, endDate);
+            List<ApCheckAmount> thisMonthDoneTrades = apCheckService.getThisMonthDoneTrade(vendorUU, customerUU, checkDate, fromDate, endDate);
             erpProdIo.setThisMonthDoneCount(thisMonthDoneTrades);
         }
     }

+ 1 - 3
src/main/java/com/uas/platform/b2b/service/impl/PurchaseApCheckServiceImpl.java

@@ -894,9 +894,7 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
             currencySet.forEach(currency -> {
                 Double amount = totalTrades.stream().filter(tradeCount -> null != tradeCount && currency.equals(tradeCount.getCurrency()))
                     .mapToDouble(ApCheckAmount::getCount).sum();
-                if (amount > 0) {
-                    resultCounts.add(new ApCheckAmount(currency, DecimalUtils.decimalPoint(amount, 2)));
-                }
+                resultCounts.add(new ApCheckAmount(currency, DecimalUtils.decimalPoint(amount, 2)));
             });
         }
         return resultCounts;

+ 4 - 12
src/main/webapp/resources/js/index/app.js

@@ -9694,9 +9694,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
                             var _MonthTodoCountArr = []
                             list.thisMonthTodoCount && list.thisMonthTodoCount.forEach(function(item) {
-                                if (item.amount > 0) {
-                                    _MonthTodoCountArr.push(item)
-                                }
+                                _MonthTodoCountArr.push(item)
                             })
                             list.thisMonthTodoCount = _MonthTodoCountArr
 
@@ -10003,9 +10001,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
                         var _MonthTodoCountArr = []
                         data.thisMonthTodoCount && data.thisMonthTodoCount.forEach(function(item) {
-                            if (item.amount > 0) {
-                                _MonthTodoCountArr.push(item)
-                            }
+                            _MonthTodoCountArr.push(item)
                         })
                         data.thisMonthTodoCount = _MonthTodoCountArr
 
@@ -10645,9 +10641,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
                             var _MonthTodoCountArr = []
                             list.thisMonthTodoCount && list.thisMonthTodoCount.forEach(function(item) {
-                                if (item.amount > 0) {
-                                    _MonthTodoCountArr.push(item)
-                                }
+                                _MonthTodoCountArr.push(item)
                             })
                             list.thisMonthTodoCount = _MonthTodoCountArr
 
@@ -10963,9 +10957,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
                             var _MonthTodoCountArr = []
                             data.thisMonthTodoCount && data.thisMonthTodoCount.forEach(function(item) {
-                                if (item.amount > 0) {
-                                    _MonthTodoCountArr.push(item)
-                                }
+                                _MonthTodoCountArr.push(item)
                             })
                             data.thisMonthTodoCount = _MonthTodoCountArr
 

+ 2 - 2
src/main/webapp/resources/tpl/index/fa/apCheck.html

@@ -821,7 +821,7 @@
 										<input ng-model="childs.$selected" name="checkbox" type="checkbox" ng-checked="childs.$selected" ng-click="stopPrevent($event)" ng-if="childs.haveChecked !== 1">
 										<span ng-if="childs.haveChecked === 1">已对账</span>
 									</td>
-									<td width="70" rowspan="{{index}}" ng-if="index === 0"></td>
+									<td width="70" rowspan="{{check.details.length}}" ng-if="index === 0"></td>
 									<td width="70">{{::childs.inoutno}}</td>
 									<td width="70">{{::childs.sendcode}}</td>
 									<td width="70">{{::childs.prodcode}}</td>
@@ -849,7 +849,7 @@
 					</tr>
 				</table>
 			</div>
-			<div style="padding: 10px 20px">本期间应收总额:{{totalMoney | number:2 || 0}}</div>
+			<!--<div style="padding: 10px 20px">本期间应收总额:{{totalMoney | number:2 || 0}}</div>-->
 		</div>
 	</div>
 </div>

+ 2 - 2
src/main/webapp/resources/tpl/index/fa/arCheck.html

@@ -718,7 +718,7 @@
 										<!--<input ng-model="childs.$selected" name="checkbox" type="checkbox" ng-checked="childs.$selected" ng-click="stopPrevent($event)" ng-if="childs.haveChecked !== 1">-->
 										<!--<span ng-if="childs.haveChecked === 1">已对账</span>-->
 									<!--</td>-->
-									<td width="70" rowspan="{{index}}" ng-if="index === 0"></td>
+									<td width="70" rowspan="{{check.details.length}}" ng-if="index === 0"></td>
 									<td width="70">{{::childs.inoutno}}</td>
 									<td width="70">{{::childs.sendcode}}</td>
 									<td width="70">{{::childs.prodcode}}</td>
@@ -746,7 +746,7 @@
 					</tr>
 				</table>
 			</div>
-			<div style="padding: 10px 20px">本期间应付总额:{{totalMoney | number:2 || 0}}</div>
+			<!--<div style="padding: 10px 20px">本期间应付总额:{{totalMoney | number:2 || 0}}</div>-->
 		</div>
 	</div>
 </div>