优化企标导入新增多选需求
This commit is contained in:
+65
-33
@@ -2391,35 +2391,67 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
|
||||
|
||||
String qcdw = rowList.get("起草部门");
|
||||
String qcbm = tsInstitutionDao.selectByName(qcdw);
|
||||
if (qcdw != null && !qcdw.equals("")){
|
||||
if (!qcdw.equals(qcbm)){
|
||||
return Result.error("第"+ count +"行输入的起草部门不存在");
|
||||
}
|
||||
if (StringUtils.isNotBlank(qcdw)) {
|
||||
if (qcdw.length() > 100) {
|
||||
return Result.error("第"+ count +"行输入的起草部门过长");
|
||||
if (StringUtils.isNotBlank(qcdw)){
|
||||
String str = "";
|
||||
String qcbm = "";
|
||||
String qcdws = "";
|
||||
String[] split = qcdw.split(",");
|
||||
for (int j = 0; j < split.length; j++) {
|
||||
str = split[j];
|
||||
qcbm = tsInstitutionDao.selectByName(str);
|
||||
if (str != null && !str.equals("")){
|
||||
if (!str.equals(qcbm)){
|
||||
return Result.error("第"+ count +"行输入的起草部门不存在");
|
||||
}
|
||||
if (StringUtils.isNotBlank(str)) {
|
||||
if (str.length() > 100) {
|
||||
return Result.error("第"+ count +"行输入的起草部门过长");
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(qcdws)){
|
||||
qcdws += "," + str;
|
||||
}else {
|
||||
qcdws = str;
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setQcdw(qcdw);
|
||||
}
|
||||
sarBussStandAttrInfo.setQcdw(qcdws);
|
||||
}
|
||||
|
||||
|
||||
String qcrbuss = rowList.get("起草人");
|
||||
String account = tsUserDao.selectByAccount(qcrbuss);
|
||||
QueryWrapper<TsUser> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(qcrbuss != null,"UNAME",qcrbuss)
|
||||
.eq(account != null,"ACCOUNT",account);
|
||||
TsUser tsUser = tsUserDao.selectOne(queryWrapper);
|
||||
if (qcrbuss != null && !qcrbuss.equals("")) {
|
||||
if (!account.equals(tsUser.getAccount()) && !qcrbuss.equals(tsUser.getUname())){
|
||||
return Result.error("第"+ count +"行输入的起草人名称不存在");
|
||||
String[] split3 = qcrbuss.split(",");
|
||||
String account = "";
|
||||
String str = "";
|
||||
String qcrs = "";
|
||||
if (StringUtils.isNotBlank(qcrbuss)){
|
||||
for (int j = 0; j < split3.length; j++) {
|
||||
str = split3[j];
|
||||
account = tsUserDao.selectByAccount(str);
|
||||
QueryWrapper<TsUser> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(str != null,"UNAME",str)
|
||||
.eq(account != null,"ACCOUNT",account);
|
||||
TsUser tsUser = tsUserDao.selectOne(queryWrapper);
|
||||
String acc = tsUser.getAccount();
|
||||
String qcr = tsUser.getUname();
|
||||
if (str != null && !str.equals("")) {
|
||||
if (!account.equals(acc) && !str.equals(qcr)){
|
||||
return Result.error("第"+ count +"行输入的起草人名称不存在");
|
||||
}
|
||||
if (str.length() > 100) {
|
||||
return Result.error("第"+ count +"行输入的起草人过长");
|
||||
}
|
||||
if (StringUtils.isNotBlank(qcrs)){
|
||||
qcrs += "," + str + "(" + account +")";
|
||||
}else {
|
||||
qcrs = str + "(" + account +")";
|
||||
}
|
||||
}
|
||||
if (qcrbuss.length() > 100) {
|
||||
return Result.error("第"+ count +"行输入的起草人过长");
|
||||
}
|
||||
sarBussStandAttrInfo.setQcrbuss(qcrbuss + "(" + account + ")");
|
||||
}
|
||||
sarBussStandAttrInfo.setQcrbuss(qcrs);
|
||||
}
|
||||
|
||||
|
||||
String sycxclass = rowList.get("适用车型");
|
||||
if (StringUtils.isNotBlank(sycxclass) && !sycxclass.equals("")){
|
||||
String[] strings = sycxclass.split(",");
|
||||
@@ -2569,8 +2601,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行" +fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
logger.info("发布稿中第"+ count +"行" +fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("发布稿中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setFbgbuss(s);
|
||||
@@ -2597,8 +2629,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行"+ fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("第"+ count +"行"+ fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
logger.info("编制说明中第"+ count +"行"+ fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("编制说明中第"+ count +"行"+ fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setBzsmbuss(s);
|
||||
@@ -2625,8 +2657,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
logger.info("历史版本中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("历史版本中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setLsbbbuss(s);
|
||||
@@ -2653,8 +2685,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx/png格式的附件");
|
||||
return Result.error("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx/png格式的附件");
|
||||
logger.info("其他文件中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx/png格式的附件");
|
||||
return Result.error("其他文件中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx/png格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setQtwjbuss(s);
|
||||
@@ -2681,8 +2713,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
logger.info("修改单中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("修改单中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setXgd(s);
|
||||
@@ -2709,8 +2741,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
s = attFileVo.getAttId();
|
||||
}
|
||||
} else {
|
||||
logger.info("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
logger.info("关联文件中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
return Result.error("关联文件中第"+ count +"行"+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
|
||||
}
|
||||
}
|
||||
sarBussStandAttrInfo.setGlwjbuss(s);
|
||||
|
||||
Reference in New Issue
Block a user