From c0926979c08651d5920fe4f0fb04097d044129ad Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期四, 27 二月 2025 17:58:49 +0800
Subject: [PATCH] zjh20250227

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
index 6b38df4..1d0d4b1 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -4033,5 +4033,44 @@
         }
         return AjaxResult.error();
     }
+
+
+
+    @PostMapping("/addBlTransition")
+    @ApiOperation(value = "琛ュ綍娣诲姞杩囨浮琛ㄦ暟鎹�")
+    @Transactional
+    public AjaxResult addBlTransition(@RequestBody Map<String, Object> map) {
+        Object packId = map.get("pacId");
+        if (null == map.get("cusId")) return AjaxResult.error("璇烽�夋嫨浣撴浜�");
+        String cusId = map.get("cusId").toString();
+        Object proIds1 = map.get("proIds");
+        List<Long> proIds = null;
+        if (null != proIds1 && !proIds1.equals("")) {
+            proIds = JSON.parseArray(proIds1.toString(), Long.class);
+        }
+        TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusId);
+        String cardId = "0";
+        if (null != tjCustomer) {
+            cardId = tjCustomer.getCardId();
+        }
+        if ((null == proIds || proIds.isEmpty()) && (null == packId || packId.equals(""))) {
+            transitionService.deletedTbTransitionByCusId(cusId);
+        }
+
+        //鍗曢」
+        if (null != proIds && !proIds.isEmpty()) {
+            //寮傛淇濆瓨鏁版嵁搴撹〃
+            for (Long proId : proIds) {
+                TjProject project = projectService.selectTjProjectByProId(proId);
+                if (null != project) {
+                    List<TbTransition> transitionList = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId));
+                    if (null == transitionList || transitionList.isEmpty()) {
+                        transitionService.saveRedisTransitionByProId(cusId, cardId, proId);
+                    }
+                }
+            }
+        }
+        return AjaxResult.success();
+    }
 }
 

--
Gitblit v1.8.0