From 393d296e43f0e5f11e524cab5446bcd3eee94e89 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Sat, 12 Jun 2021 17:47:38 +0800
Subject: [PATCH] 新增赠送项目是否计算消耗控制

---
 zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
index 01db2dd..00c4211 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -98,20 +98,20 @@
                     break;
                 case "1":
                     queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
-                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
+//                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
                     break;
                 case "2":
                     queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1));
                     queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
-                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
+//                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
                     break;
                 case "3":
                     queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
-                    queryUse.setIsOver(Dictionary.FLAG_YES_Y);
+//                    queryUse.setIsOver(Dictionary.FLAG_YES_Y);
                     break;
                 default:
                     queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
-                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
+//                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
                     break;
             }
         } else {
@@ -125,13 +125,15 @@
 
         queryUse.setTaocanId(null);
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC);
-        List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
+//        List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
+        List<SysProjUse> taoCanList = projUseService.findTaocaoProjUseWithProj(queryUse);
         List<ServiceTcVo> serviceTcVos = SysProjUseMapper.INSTANCE.entityListToTcVoList(taoCanList);
 
         if (CollectionUtils.isNotEmpty(serviceTcVos)) {
             serviceTcVos.forEach(item -> {
-                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
-                List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses);
+//                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
+                List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(item.getTaocanProjUse());
+                item.setTaocanProjUse(null);
                 item.setProj(taocanProj);
             });
         }

--
Gitblit v1.9.1