Browse Source

处理删除代码之后的问题

yujia 7 years ago
parent
commit
490bb9b980

+ 2 - 24
src/main/java/com/uas/platform/b2c/trade/order/dao/OrderDao.java

@@ -158,7 +158,7 @@ public interface OrderDao extends JpaSpecificationExecutor<Order>, JpaRepository
 	 * @param status    the status
 	 * @param status    the status
 	 * @return the normal count by buyeruu and status
 	 * @return the normal count by buyeruu and status
 	 */
 	 */
-	@Query(value="select count(*) from trade.Order a where a.buyeruu=:buyeruu and a.buyerenuu = :buyerenuu and a.status=:status and a.proofingid is null and (a.launchOrExApplyStatus is null and a.puExInfoJson is null and a.returnId is null and a.refundId is null)")
+	@Query(value="select count(*) from trade.Order a where a.buyeruu=:buyeruu and a.buyerenuu = :buyerenuu and a.status=:status and a.proofingid is null")
 	int getNormalCountByBuyeruuAndStatus(@Param("buyeruu") Long buyeruu, @Param("buyerenuu") Long buyerenuu, @Param("status") Integer status);
 	int getNormalCountByBuyeruuAndStatus(@Param("buyeruu") Long buyeruu, @Param("buyerenuu") Long buyerenuu, @Param("status") Integer status);
 
 
 	/**
 	/**
@@ -169,31 +169,9 @@ public interface OrderDao extends JpaSpecificationExecutor<Order>, JpaRepository
 	 * @param status       the status
 	 * @param status       the status
 	 * @return the normal count by buyeruu and status and dissociative
 	 * @return the normal count by buyeruu and status and dissociative
 	 */
 	 */
-	@Query(value="select count(1) from trade.Order a where a.buyeruu=:buyeruu and a.dissociative = :dissociative and a.status=:status and a.proofingid is null and (a.launchOrExApplyStatus is null and a.puExInfoJson is null and a.returnId is null and a.refundId is null)")
+	@Query(value="select count(1) from trade.Order a where a.buyeruu=:buyeruu and a.dissociative = :dissociative and a.status=:status and a.proofingid is null")
 	int getNormalCountByBuyeruuAndStatusAndDissociative(@Param("buyeruu") Long buyeruu, @Param("dissociative") Integer dissociative, @Param("status") Integer status);
 	int getNormalCountByBuyeruuAndStatusAndDissociative(@Param("buyeruu") Long buyeruu, @Param("dissociative") Integer dissociative, @Param("status") Integer status);
 
 
-	/**
-	 * 获取订单数目:订单有异常申请
-	 *
-	 * @param buyeruu   the buyeruu
-	 * @param buyerenuu the buyerenuu
-	 * @param status    the status
-	 * @return the apply count by buyeruu and status
-	 */
-	@Query(value="select count(*) from trade.Order a where a.buyeruu=:buyeruu and a.buyerenuu = :buyerenuu and a.status=:status and a.proofingid is null and (a.launchOrExApplyStatus = 'BUYER_TO_MALL' or a.launchOrExApplyStatus = 'MALL_TO_SUP' or a.launchOrExApplyStatus = 'SUP_TO_MALL')")
-	int getApplyCountByBuyeruuAndStatus(@Param("buyeruu") Long buyeruu, @Param("buyerenuu") Long buyerenuu, @Param("status") Integer status);
-
-	/**
-	 * 获取订单数目:订单有异常申请(个人用户)
-	 *
-	 * @param buyeruu      the buyeruu
-	 * @param dissociative the dissociative
-	 * @param status       the status
-	 * @return the apply count by buyeruu and status and dissociative
-	 */
-	@Query(value="select count(1) from trade.Order a where a.buyeruu=:buyeruu and a.dissociative = :dissociative and a.status=:status and a.proofingid is null and (a.launchOrExApplyStatus = 'BUYER_TO_MALL' or a.launchOrExApplyStatus = 'MALL_TO_SUP' or a.launchOrExApplyStatus = 'SUP_TO_MALL')")
-	int getApplyCountByBuyeruuAndStatusAndDissociative(@Param("buyeruu") Long buyeruu, @Param("dissociative") Integer dissociative, @Param("status") Integer status);
-
 	/**
 	/**
 	 * 获取订单数目:订单有异常通知
 	 * 获取订单数目:订单有异常通知
 	 *
 	 *

+ 0 - 11
src/main/java/com/uas/platform/b2c/trade/order/dao/PurchaseDao.java

@@ -133,17 +133,6 @@ public interface PurchaseDao extends JpaSpecificationExecutor<Purchase>, JpaRepo
 	@Query(value="select count(*) from trade.Purchase a where a.sellerenuu=:sellerenuu and a.storeid=:storeid and a.proofingid is null and a.used = 1")
 	@Query(value="select count(*) from trade.Purchase a where a.sellerenuu=:sellerenuu and a.storeid=:storeid and a.proofingid is null and a.used = 1")
 	int getCountBySellerenuuAndStoreid(@Param("sellerenuu") Long sellerenuu, @Param("storeid") String storeid);
 	int getCountBySellerenuuAndStoreid(@Param("sellerenuu") Long sellerenuu, @Param("storeid") String storeid);
 
 
-
-	/**
-	 * 根据企业UU、采购单状态、采购单异常申请状态获取采购单数量
-	 *
-	 * @param sellerenuu the sellerenuu
-	 * @param status     the status
-	 * @return lunch exception count by apply status
-	 */
-	@Query(value = "select count(*) from trade.Purchase p where p.sellerenuu=:sellerenuu and p.status=:status and p.launchPuExApplyStatus is not null")
-	int getLunchExceptionCountByApplyStatus(@Param("sellerenuu") Long sellerenuu, @Param("status") Integer status);
-
 	/**
 	/**
 	 * 根据企业UU、采购单状态、采购单退货状态获取采购单数量
 	 * 根据企业UU、采购单状态、采购单退货状态获取采购单数量
 	 *
 	 *

+ 4 - 4
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -2748,7 +2748,7 @@ public class OrderServiceImpl implements OrderService {
 
 
                         normal += orderDao.getNormalCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         normal += orderDao.getNormalCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
-                        apply += orderDao.getApplyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
+                        apply = 0;
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
@@ -2758,7 +2758,7 @@ public class OrderServiceImpl implements OrderService {
 
 
                         normal += orderDao.getNormalCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         normal += orderDao.getNormalCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
-                        apply += orderDao.getApplyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
+                        apply = 0;
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
@@ -2772,7 +2772,7 @@ public class OrderServiceImpl implements OrderService {
 
 
                         normal += orderDao.getNormalCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         normal += orderDao.getNormalCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
-                        apply += orderDao.getApplyCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
+                        apply = 0;
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatus(userUU, enUU, Integer.parseInt(statusStr));
@@ -2782,7 +2782,7 @@ public class OrderServiceImpl implements OrderService {
 
 
                         normal += orderDao.getNormalCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         normal += orderDao.getNormalCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         notify += orderDao.getNotifyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
-                        apply += orderDao.getApplyCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
+                        apply = 0;
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         returnCount += orderDao.getReturnCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         exchange += orderDao.getExchangeCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));
                         refund += orderDao.getRefundCountByBuyeruuAndStatusAndDissociative(userUU, Type.PERSONAL.value(), Integer.parseInt(statusStr));

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java

@@ -1127,7 +1127,7 @@ public class PurchaseServiceImpl implements PurchaseService {
 				int count = purchaseDao.getCountBySellerenuuAndStatusAndStoreid(uu, Integer.parseInt(statusStr), storeid);
 				int count = purchaseDao.getCountBySellerenuuAndStatusAndStoreid(uu, Integer.parseInt(statusStr), storeid);
 				totalCount += count;
 				totalCount += count;
 
 
-                launchPuExCount += purchaseDao.getLunchExceptionCountByApplyStatus(uu, Integer.parseInt(statusStr));
+                launchPuExCount += 0;
                 receivedPuExCount += 0;
                 receivedPuExCount += 0;
                 returnPuCount += purchaseDao.getReturnCountByApplyStatus(uu, Integer.parseInt(statusStr));
                 returnPuCount += purchaseDao.getReturnCountByApplyStatus(uu, Integer.parseInt(statusStr));
                 exchangePuCount += purchaseDao.getExchangeCountByApplyStatus(uu, Integer.parseInt(statusStr));
                 exchangePuCount += purchaseDao.getExchangeCountByApplyStatus(uu, Integer.parseInt(statusStr));

+ 0 - 33
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -634,8 +634,6 @@ define(['app/app'], function (app) {
                                 }
                                 }
                             });
                             });
                         });
                         });
-                        getExMsgState(); // 获取异常消息状态
-                        getReturnByPurchaseIds(); // 获取退货单信息
 
 
                         $scope.orderLength = page.numberOfElements;
                         $scope.orderLength = page.numberOfElements;
                         $scope.pageParams.content = page.content;
                         $scope.pageParams.content = page.content;
@@ -1060,37 +1058,6 @@ define(['app/app'], function (app) {
             });
             });
         };
         };
 
 
-        /**
-         * 根据采购单号获取对应的退货单物流
-         */
-        var getReturnByPurchaseIds = function () {
-            var puids = [];
-            angular.forEach($scope.purchases, function (purchase) {
-                puids.push(purchase.purchaseid);
-            });
-            //puids = puids.slice(0, -1);
-            Return.getReturnByPurchaseIds({puids: puids}, function (data) {
-                $scope.returnInfo = data;
-            }, function (error) {
-                toaster.pop('error', '获取订单关联的退货单信息失败');
-            })
-        };
-
-        /**
-         * 获取异常消息状态
-         */
-        var getExMsgState = function () {
-            var applyIds = [], notifyIds = [];
-            angular.forEach($scope.purchases, function (purchase) {
-                if (purchase.launchPuExApplyId) {
-                    applyIds.push(purchase.launchPuExApplyId);
-                }
-                if (purchase.exApplyIdFromBuyer) {
-                    notifyIds.push(purchase.exApplyIdFromBuyer);
-                }
-            });
-        };
-
         //查看物流详情
         //查看物流详情
         $scope.listLogistics = function (lgtId) {
         $scope.listLogistics = function (lgtId) {
             $modal.open({
             $modal.open({