Commit 18f11213 by 284718418@qq.com

修改导入BUG,重复数据显示,导入失败数据显示

parent 90b5dfc4
......@@ -379,6 +379,10 @@ public class CrmController {
public Result<Object> addClient(@CurrentUser UserBean userBean, @RequestBody CrmClientData crmClientData) {
Integer empNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean);
CrmClientData crmd = CrmClientData.builder().build().selectOne(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode,orgCode).eq(CrmClientData::getBelongUser, empNum).eq(CrmClientData::getClientName, crmClientData.getClientName()));
if(!org.springframework.util.StringUtils.isEmpty(crmd)){
return ResultUtil.error("该客户已存在,请勿重复添加");
}
crmClientData.setClientStatus(1);
crmClientData.setCreateUser(empNum);
SysRegion district = zpglService.getSysRegion(crmClientData.getDistrictId());
......@@ -1526,9 +1530,9 @@ public class CrmController {
reader.addHeaderAlias("个人地址", "linkAddress");
reader.addHeaderAlias("跟进记录", "followuprecord");
List<CrmClientDataImportVo> list = reader.read(0, 1, CrmClientDataImportVo.class);
Map<String, String> map = Maps.newHashMap();
Map<String, String> map = null;
for (CrmClientDataImportVo crmClientDataImportVo : list) {
map = Maps.newHashMap();
String name = crmClientDataImportVo.getClientName();
try {
CrmClientData crmd = CrmClientData.builder().build().selectOne(new QueryWrapper<CrmClientData>().lambda().eq(CrmClientData::getOrgCode,orgCode).eq(CrmClientData::getBelongUser, empNum).eq(CrmClientData::getClientName, crmClientDataImportVo.getClientName())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment