From 775a4818b1ff4f18f17b24108cc92c23f728ea61 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 19 四月 2024 15:03:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/crm/manager/controller/CstmrController.java | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/crm/manager/controller/CstmrController.java b/src/main/java/com/zy/crm/manager/controller/CstmrController.java
index 6112615..bbe0dd8 100644
--- a/src/main/java/com/zy/crm/manager/controller/CstmrController.java
+++ b/src/main/java/com/zy/crm/manager/controller/CstmrController.java
@@ -13,14 +13,8 @@
import com.core.exception.CoolException;
import com.zy.crm.common.web.BaseController;
import com.zy.crm.manager.controller.result.FollowerTableVo;
-import com.zy.crm.manager.entity.Cstmr;
-import com.zy.crm.manager.entity.CstmrFoll;
-import com.zy.crm.manager.entity.CstmrType;
-import com.zy.crm.manager.entity.Order;
-import com.zy.crm.manager.service.CstmrFollService;
-import com.zy.crm.manager.service.CstmrService;
-import com.zy.crm.manager.service.CstmrTypeService;
-import com.zy.crm.manager.service.OrderService;
+import com.zy.crm.manager.entity.*;
+import com.zy.crm.manager.service.*;
import com.zy.crm.manager.utils.CompanySearchUtils;
import com.zy.crm.system.entity.Dept;
import com.zy.crm.system.entity.Dic;
@@ -55,6 +49,8 @@
private CstmrService cstmrService;
@Autowired
private CstmrTypeService cstmrTypeService;
+ @Autowired
+ private CstmrGradeService cstmrGradeService;
@Autowired
private DicService dicService;
@Autowired
@@ -411,6 +407,12 @@
throw new CoolException("绗�" + i + "琛屽鎴风被鍒笉鍚堟硶锛岃閲嶆柊瀵煎叆");
}
cstmr.setCstmrType(cstmrType.getId());
+
+ CstmrGrade cstmrGrade = cstmrGradeService.selectByName(hostId, type);
+ if (null == cstmrGrade) {
+ throw new CoolException("绗�" + i + "琛屽鎴风瓑绾т笉鍚堟硶锛岃閲嶆柊瀵煎叆");
+ }
+ cstmr.setCstmrGrade(cstmrGrade.getId());
// 瀹㈡埛鍏崇郴
cstmr.setRela(dataFormatter.formatCellValue(row.getCell(3)));
// 鐢佃瘽
--
Gitblit v1.9.1