测试stand库修改-文档库

This commit is contained in:
xiejunyu
2022-06-08 21:21:42 +08:00
parent 5f1428d3fd
commit 5cb0eca94a
3 changed files with 47 additions and 25 deletions
@@ -50,6 +50,9 @@ public class ShiroRealm extends AuthorizingRealm {
@Resource
private RedisUtil redisUtil;
@Autowired
private HttpServletResponse response;
// @Autowired
// private HttpServletResponse response;
@@ -105,6 +108,25 @@ public class ShiroRealm extends AuthorizingRealm {
String token = (String) auth.getCredentials();
if (token == null) {
log.info("————————身份认证失败——————————IP地址: "+ oConvertUtils.getIpAddrByRequest(SpringContextUtils.getHttpServletRequest()));
String reponseJson = new Gson().toJson(Result.error(401,"token为空,请重新登录!"));
response.setContentType("application/json; charset=utf-8");
response.setCharacterEncoding("utf-8");
OutputStream out = null;
try {
out = response.getOutputStream();
out.write(reponseJson.getBytes());
}catch (IOException ex){
ex.printStackTrace();
}finally {
if(out != null){
try {
out.close();
out.flush();
} catch (IOException e) {
e.printStackTrace();
}
}
}
LoginException.loginException(401,"token为空");
//throw new JeroBootException("token为空!");
}
@@ -1559,7 +1559,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
public void addInfo(Map<String, Object> map) {
String cut = (String) map.get("cut");
try {
String serialNumber = (String)map.get("serial_number");
String serialNumber = String.valueOf(map.get("serial_number"));
//String serialNumber = String.valueOf(map.get("serial_number"));
//编码验重
List<BussDocumentLibraryEO> list = this.list();
@@ -523,17 +523,17 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
if(CutEnum.CN.getValue().equals(cut)){
explainInfo =
"填写说明\n"
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.所有带*号的字段必须填写\n"
+ "3.填写人员时,必须使用人员账号进行填写。\n"
+ "4.填写的人员账号必须与系统中账号保持一致";
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.填写人员时,必须使用人员账号进行填写\n"
+ "3.填写人员账号必须与系统中账号保持一致;\n"
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
}else{
explainInfo =
"filling explanation\n"
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data.\n"
+ "2. All fields marked with * must be filled in.\n"
+ "3. When filling in personnel, you must use the personnel account number to fill in.\n"
+ "4. The personnel account number filled in must be consistent with the account number in the system";
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
}
HSSFRichTextString explain=new HSSFRichTextString(explainInfo);
@@ -631,17 +631,17 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
if (CutEnum.CN.getValue().equals(projectRelatedPersonnel.getCut())) {
explainInfo =
"填写说明\n"
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.所有带*号的字段必须填写\n"
+ "3.填写人员时,必须使用人员账号进行填写。\n"
+ "4.填写的人员账号必须与系统中账号保持一致";
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.填写人员时,必须使用人员账号进行填写\n"
+ "3.填写人员账号必须与系统中账号保持一致;\n"
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
} else {
explainInfo =
"filling explanation\n"
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data.\n"
+ "2. All fields marked with * must be filled in.\n"
+ "3. When filling in personnel, you must use the personnel account number to fill in.\n"
+ "4. The personnel account number filled in must be consistent with the account number in the system";
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
}
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
@@ -704,18 +704,18 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
titleOne = "责任领域,法规工程师,工程接口人,认证工程师,备注";
explainInfo =
"填写说明\n"
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.所有带*号的字段必须填写\n"
+ "3.填写人员时,必须使用人员账号进行填写。\n"
+ "4.填写的人员账号必须与系统中账号保持一致";
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n"
+ "2.填写人员时,必须使用人员账号进行填写\n"
+ "3.填写人员账号必须与系统中账号保持一致;\n"
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
}else{
titleOne = "Responsible Field,Regulation Engineer,Engineering Interface,Homologation Engineer,Comments";
explainInfo =
"filling explanation\n"
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data.\n"
+ "2. All fields marked with * must be filled in.\n"
+ "3. When filling in personnel, you must use the personnel account number to fill in.\n"
+ "4. The personnel account number filled in must be consistent with the account number in the system";
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
}
List<String> titleOneList = Arrays.asList(titleOne.split(","));