From d594c576eb6cd7073e880cd09fe581fb2ac5504b Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 21 四月 2025 08:38:36 +0800
Subject: [PATCH] 修改在职企业维护

---
 zhengcaioa/Services/CooperatecustomCustomerService.cs |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs
index 4096d52..ac6a6b6 100644
--- a/zhengcaioa/Services/CooperatecustomCustomerService.cs
+++ b/zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -1282,6 +1282,18 @@
                 {
                     DTO.Id = Guid.NewGuid().ToString();
                     _context.CustomerGuanlianhuiyuans.Add(DTO);
+
+
+                    var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault();
+                    if (cooperatecustomCustomer != null)
+                    {
+                        cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid;
+                    }
+                    var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault();
+                    if (intentionCustomer != null)
+                    {
+                        intentionCustomer.HuiyuanId = DTO.Huiyuanid;
+                    }
                 }
                 else
                 {
@@ -1294,7 +1306,18 @@
                     updateproject.RecStatus = DTO.RecStatus;
                     updateproject.Modifier = DTO.Modifier;
                     updateproject.Modifytime = DTO.Modifytime;
-                    
+
+                    var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault();
+                    if (cooperatecustomCustomer != null)
+                    {
+                        cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid;
+                    }
+                    var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault();
+                    if (intentionCustomer != null)
+                    {
+                        intentionCustomer.HuiyuanId = DTO.Huiyuanid;
+                    }
+
                 }
 
                 _context.SaveChanges();

--
Gitblit v1.9.1