Ver Fonte

Merge branch 'saas' into master_saas

yonge há 3 anos atrás
pai
commit
a6db2c4e29

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -412,9 +412,9 @@ public class PayServiceImpl implements PayService {
             checkMaxReceipt(routeScaleDto, routeScaleDto.getMerNo());
         }
         
-        if(routeScaleDtoForGoodsSell != null){
+        /*if(routeScaleDtoForGoodsSell != null){
         	routeScaleDtos.add(routeScaleDtoForGoodsSell);
-        }
+        }*/
         
         Map<String, Object> map = getPayRoute(amount, balanceAmount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routeScaleDtos, subCashAmount);
         
@@ -752,9 +752,9 @@ public class PayServiceImpl implements PayService {
                 routingMoney = amount.subtract(hasRouteMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
             }
 
-            /*if (routingFee.compareTo(BigDecimal.ZERO) <= 0) {
+            if (routingMoney.compareTo(BigDecimal.ZERO) <= 0 && routeBalanceAmount.compareTo(BigDecimal.ZERO) <= 0) {
                 continue;
-            }*/
+            }
 
             hasRouteAmount = hasRouteAmount.add(routingFee);
             hasRouteBalanceAmount = hasRouteBalanceAmount.add(routeBalanceAmount);

+ 8 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -408,7 +408,10 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 	                }
 	                studentPaymentOrderDetail.setGoodsIdList(goodsIdStr);
 	                
-	                BigDecimal tempPrice = studentPaymentOrder.getExpectAmount().multiply(goods.getGroupPurchasePrice()).divide(totalGroupPurchasePrice, BigDecimal.ROUND_DOWN).setScale(2, BigDecimal.ROUND_DOWN);
+	                BigDecimal tempPrice = BigDecimal.ZERO;
+	                if(totalGroupPurchasePrice.compareTo(BigDecimal.ZERO) > 0) {
+	                	tempPrice = studentPaymentOrder.getExpectAmount().multiply(goods.getGroupPurchasePrice()).divide(totalGroupPurchasePrice, BigDecimal.ROUND_DOWN).setScale(2, BigDecimal.ROUND_DOWN);
+	                }
 	                
 	                if(totalPrice.add(tempPrice).compareTo(studentPaymentOrder.getExpectAmount()) > 0 || goodsIdsStr.split(",").length == studentPaymentOrderDetailList.size() + 1){
 	                	studentPaymentOrderDetail.setPrice(studentPaymentOrder.getExpectAmount().subtract(totalPrice));
@@ -742,7 +745,10 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 	                }
 	                studentPaymentOrderDetail.setGoodsIdList(goodsIdStr);
 	                
-	                BigDecimal tempPrice = studentPaymentOrder.getExpectAmount().subtract(repairPrice).multiply(goods.getGroupPurchasePrice()).divide(totalGroupPurchasePrice, BigDecimal.ROUND_DOWN).setScale(2, BigDecimal.ROUND_DOWN);
+	                BigDecimal tempPrice = BigDecimal.ZERO;
+	                if(totalGroupPurchasePrice.compareTo(BigDecimal.ZERO) > 0) {
+	                	tempPrice = studentPaymentOrder.getExpectAmount().subtract(repairPrice).multiply(goods.getGroupPurchasePrice()).divide(totalGroupPurchasePrice, BigDecimal.ROUND_DOWN).setScale(2, BigDecimal.ROUND_DOWN);
+	                }
 	                
 	                if(totalPrice.add(tempPrice).compareTo(studentPaymentOrder.getExpectAmount()) > 0 || goodsIds.split(",").length == studentPaymentOrderDetailList.size()){
 	                	studentPaymentOrderDetail.setPrice(studentPaymentOrder.getExpectAmount().subtract(totalPrice));

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -1385,7 +1385,7 @@
 				#{organId}
 			</foreach>
 		</if>
-		GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d'),spo.organ_id_
+		GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
 	</select>
 	<select id="getTotalAmountDataWithTimelyDetails" resultMap="IndexBaseMonthData">
 		SELECT spo.organ_id_,SUM(CASE WHEN spo.actual_amount_ IS NULL THEN 0 ELSE spo.actual_amount_ END +