Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216

This commit is contained in:
gaojiabao
2023-04-04 22:59:53 +08:00
2 changed files with 64 additions and 33 deletions
@@ -2391,35 +2391,63 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
String qcdw = rowList.get("起草部门"); String qcdw = rowList.get("起草部门");
String qcbm = tsInstitutionDao.selectByName(qcdw); if (StringUtils.isNotBlank(qcdw)){
if (qcdw != null && !qcdw.equals("")){ String str = "";
if (!qcdw.equals(qcbm)){ String qcbm = "";
return Result.error(""+ count +"行输入的起草部门不存在"); String qcdws = "";
} String[] split = qcdw.split(",");
if (StringUtils.isNotBlank(qcdw)) { for (int j = 0; j < split.length; j++) {
if (qcdw.length() > 100) { str = split[j];
return Result.error(""+ count +"行输入的起草部门过长"); 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 qcrbuss = rowList.get("起草人");
String account = tsUserDao.selectByAccount(qcrbuss); String[] split3 = qcrbuss.split(",");
QueryWrapper<TsUser> queryWrapper = new QueryWrapper<>(); String account = "";
queryWrapper.eq(qcrbuss != null,"UNAME",qcrbuss) String str = "";
.eq(account != null,"ACCOUNT",account); String qcr = "";
TsUser tsUser = tsUserDao.selectOne(queryWrapper); String qcrs = "";
if (qcrbuss != null && !qcrbuss.equals("")) { if (StringUtils.isNotBlank(qcrbuss)){
if (!account.equals(tsUser.getAccount()) && !qcrbuss.equals(tsUser.getUname())){ for (int j = 0; j < split3.length; j++) {
return Result.error(""+ count +"行输入的起草人名称不存在"); str = split3[j];
account = tsUserDao.selectByAccount(str);
qcr = tsUserDao.selectByQcrName(account);
if (str != null && !str.equals("")) {
if (!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(qcrs);
}
sarBussStandAttrInfo.setQcrbuss(qcrbuss + "(" + account + ")");
} }
String sycxclass = rowList.get("适用车型"); String sycxclass = rowList.get("适用车型");
if (StringUtils.isNotBlank(sycxclass) && !sycxclass.equals("")){ if (StringUtils.isNotBlank(sycxclass) && !sycxclass.equals("")){
String[] strings = sycxclass.split(","); String[] strings = sycxclass.split(",");
@@ -2569,8 +2597,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("发布稿中"+ count +""+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
} }
} }
sarBussStandAttrInfo.setFbgbuss(s); sarBussStandAttrInfo.setFbgbuss(s);
@@ -2597,8 +2625,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("编制说明中"+ count +""+ fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
} }
} }
sarBussStandAttrInfo.setBzsmbuss(s); sarBussStandAttrInfo.setBzsmbuss(s);
@@ -2625,8 +2653,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("历史版本中"+ count +""+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
} }
} }
sarBussStandAttrInfo.setLsbbbuss(s); sarBussStandAttrInfo.setLsbbbuss(s);
@@ -2653,8 +2681,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("其他文件中"+ count +""+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx/png格式的附件");
} }
} }
sarBussStandAttrInfo.setQtwjbuss(s); sarBussStandAttrInfo.setQtwjbuss(s);
@@ -2681,8 +2709,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("修改单中"+ count +""+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
} }
} }
sarBussStandAttrInfo.setXgd(s); sarBussStandAttrInfo.setXgd(s);
@@ -2709,8 +2737,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
s = attFileVo.getAttId(); s = attFileVo.getAttId();
} }
} else { } else {
logger.info(""+ 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格式的附件"); return Result.error("关联文件中"+ count +""+fjName + "格式不正确,请上传pdf/ppt/pptx/doc/docx格式的附件");
} }
} }
sarBussStandAttrInfo.setGlwjbuss(s); sarBussStandAttrInfo.setGlwjbuss(s);
@@ -78,4 +78,7 @@ public interface TsUserDao extends BaseMapper<TsUser> {
@Select("select ACCOUNT from ts_user where UNAME =#{qcrbuss}") @Select("select ACCOUNT from ts_user where UNAME =#{qcrbuss}")
String selectByAccount(String qcrbuss); String selectByAccount(String qcrbuss);
@Select("select UNAME from ts_user where ACCOUNT =#{str}")
String selectByQcrName(String str);
} }