huangzhiguo 1 year ago
parent
commit
722bd2dfbf

+ 3 - 24
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -274,7 +274,6 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                  */
 
                 Integer returnNum = 0;
-                Double returnNumAmount = 0d;
                 // 平台服务费
                 Double allServeAmount = 0d;
                 Double brokerage = 0d;
@@ -295,28 +294,11 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     // 付采美总金额
                     allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
                     // 子订单利润
-                    if (p.getReturnedNum().equals(p.getNum())) {
-                        if (p.getProductType() == 0) {
-                            brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
-                        } else {
-                            brokerage = MathUtil.add(brokerage, 0).doubleValue();
-                        }
-                    } else if (p.getReturnedNum() < p.getNum()) {
-                        if (p.getProductType() == 0) {
-                            brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), MathUtil.sub(p.getNum(), p.getReturnedNum()))).doubleValue();
-                        } else {
-                            brokerage = MathUtil.add(brokerage, 0).doubleValue();
-                        }
+                    if (p.getProductType() == 0) {
+                        brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
                     } else {
-                        if (p.getProductType() == 0) {
-                            brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
-                        } else {
-                            brokerage = MathUtil.add(brokerage, 0).doubleValue();
-                        }
+                        brokerage = MathUtil.add(brokerage, 0).doubleValue();
                     }
-                    allServeAmount = MathUtil.sub(allServeAmount, MathUtil.mul(returnNum, p.getCmCostPrice())).doubleValue();
-                    // 应退的成本
-                    returnNumAmount = MathUtil.mul(returnNum, p.getCostPrice()).doubleValue();
                 }
                 so.setBrokerage(brokerage);
                 so.setAllServeAmount(allServeAmount);
@@ -329,9 +311,6 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     BigDecimal waitPayShop = MathUtil.sub(so.getWaitPayShop(), so.getDifferencePrice());
                     so.setWaitPayShop(waitPayShop.doubleValue());
                 }
-                so.setWaitPayShop(MathUtil.sub(so.getWaitPayShop(), returnNumAmount).doubleValue());
-                so.setShopProductAmount(MathUtil.sub(so.getShopProductAmount(), returnNumAmount).doubleValue());
-                so.setShouldPayShopAmount(MathUtil.sub(so.getShouldPayShopAmount(), returnNumAmount).doubleValue());
 
                 //统计该子订单的主的收款金额和收款状态
                 NewOrder newOrder = newOrderDao.get(so.getOrderID().toString());

+ 4 - 7
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -1454,13 +1454,10 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                      * (3)来自采美平台的第三方供应商的线下转账账号为空或者为采美账号的子订单
                      * (4)商品分账号是采美信息的商品的子订单(走了线上支付才排除)
                      */
-                    if ((1161 != shopOrder.getShopID() || 2 != shopOrder.getOrderType() || !flag ||
-                            (!"E1807059160".equals(shopOrder.getSplitCode()) &&  null != discernPayWay && 1 == discernPayWay))) {
-                        // 线下支付的订单
-                        if (null != discernPayWay && 1 != discernPayWay) {
-                            // 订单下线收款, 付款状态与收款状态同步显示
-                            shopOrder.setPayStatus(shopOrder.getReceiptStatus());
-                        }
+                    if ((1161 != shopOrder.getShopID() && 2 != shopOrder.getOrderType() && !flag &&
+                            (!"E1807059160".equals(shopOrder.getSplitCode()) && null != discernPayWay && 1 != discernPayWay))) {
+                                // 订单下线收款, 付款状态与收款状态同步显示
+                                shopOrder.setPayStatus(shopOrder.getReceiptStatus());
                     }
                     // 订单已收款才会出现抹平或者多收退余额,(已收再退款或者撤销退款订单即使存在抹平也需要当未抹平重新计算付款)
                     String receiptStatus = shopOrder.getReceiptStatus();

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -692,7 +692,7 @@
                                     0.00
                                 </c:if>
                             </td>
-                            <td><fmt:formatNumber value="${p.returnedNum == p.returnedNum ? 0.00 : p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
+                            <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
                             <td class="p-taxes-t"><c:choose>