username@email.com
2025-04-21 d594c576eb6cd7073e880cd09fe581fb2ac5504b
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();