|
|
@@ -156,10 +156,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
try {
|
|
|
switch (cellNum) {
|
|
|
case 0:
|
|
|
- if (StringUtils.isEmpty(getCellValue(cell))) {
|
|
|
- throw new Exception();
|
|
|
- }
|
|
|
- in.setUserName(getCellValue(cell));
|
|
|
+ in.setUserName(getCellValue(cell));
|
|
|
break;
|
|
|
case 1:
|
|
|
in.setProvince(getProvinceId(pList,getCellValue(cell)));
|
|
|
@@ -174,16 +171,9 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
in.setSocietyTags(getCellValue(cell));
|
|
|
break;
|
|
|
case 4:
|
|
|
- if (StringUtils.isEmpty(getCellValue(cell))) {
|
|
|
- System.out.println("联系人");
|
|
|
- throw new Exception();
|
|
|
- }
|
|
|
in.setContacts(getCellValue(cell));
|
|
|
break;
|
|
|
case 5:
|
|
|
- if (StringUtils.isEmpty(getCellValue(cell))) {
|
|
|
- throw new Exception();
|
|
|
- }
|
|
|
in.setContactMobile(getCellValue(cell));
|
|
|
break;
|
|
|
case 6:
|
|
|
@@ -194,6 +184,11 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不完整。"));
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isBlank(in.getUserName())||
|
|
|
+ StringUtils.isBlank(in.getContacts())||
|
|
|
+ StringUtils.isBlank(in.getContactMobile())) {
|
|
|
+ throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不完整。"));
|
|
|
+ }
|
|
|
String uid=UUID.randomUUID().toString();
|
|
|
in.setAid(aid);
|
|
|
in.setCreateTime(now.getTime());
|
|
|
@@ -270,11 +265,9 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
|
|
|
|
|
|
private void checkListName(List<InputUserChannel> list) {
|
|
|
- System.out.println("list.size="+list.size());
|
|
|
for (InputUserChannel in : list) {
|
|
|
int i=0;
|
|
|
for (InputUserChannel in2 : list) {
|
|
|
- System.out.println(in.getUserName()+"--"+in2.getUserName()+"="+in.getUserName().equals(in2.getUserName()));
|
|
|
if (in.getUserName().equals(in2.getUserName())) {
|
|
|
i++;
|
|
|
if (i>1) {
|