中扬CRM客户关系管理系统
#
lsh
2024-04-19 59292e68b11c383948b436e755a4aad8abf1ce24
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)));
            // 电话