|
|
@@ -2,6 +2,7 @@ package com.goafanti.customer.controller;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
+import java.lang.reflect.Field;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
import java.text.DateFormat;
|
|
|
import java.text.ParseException;
|
|
|
@@ -18,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.goafanti.common.enums.AchievementFields;
|
|
|
+import com.goafanti.common.utils.*;
|
|
|
import com.goafanti.customer.bo.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@@ -40,11 +42,6 @@ import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.Attachment;
|
|
|
import com.goafanti.common.model.OrganizationContactBook;
|
|
|
import com.goafanti.common.model.User;
|
|
|
-import com.goafanti.common.utils.BeanUtilsExt;
|
|
|
-import com.goafanti.common.utils.DateUtils;
|
|
|
-import com.goafanti.common.utils.ExcelUtils;
|
|
|
-import com.goafanti.common.utils.SHA256Util;
|
|
|
-import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.customer.service.impl.AdminOrgAnnualReportServiceImpl;
|
|
|
@@ -346,7 +343,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
Result res = new Result();
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
- InputChannelState.getDesc(bindingResult.getFieldError().getField())));
|
|
|
+ ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ if (customerService.checkUserName(in.getName())){
|
|
|
+ res.getError().add(buildError("客户名称已存在"));
|
|
|
return res;
|
|
|
}
|
|
|
in.setType(1);
|
|
|
@@ -360,6 +361,7 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/** 单位客户详情信息 **/
|
|
|
@RequestMapping(value = "/findOrganizationCustomerDetail", method = RequestMethod.GET)
|
|
|
public Result findOrganizationCustomerDetail(String uid){
|