From ab570b8dd8e9fe5c154a3f34129639636078b2a6 Mon Sep 17 00:00:00 2001 From: lyfO_o <764716047@qq.com> Date: 星期四, 21 十月 2021 09:41:03 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master --- src/main/webapp/resources/template/用户导入模板.xlsx | 0 src/main/webapp/WEB-INF/szygs/szygs.properties | 2 src/main/java/com/nanometer/smartlab/controller/UserMngController.java | 87 ++++++++++++++++++++++++----- src/main/webapp/WEB-INF/zkyshs/zkyshs.properties | 2 src/main/webapp/WEB-INF/gcs/gcs.properties | 2 src/main/webapp/WEB-INF/gslab/gslab.properties | 2 src/main/webapp/WEB-INF/lzhws/lzhws.properties | 2 src/main/webapp/WEB-INF/shgjs/shgjs.properties | 2 src/main/webapp/resources/images/材料科学姑苏实验室logo.png | 0 src/main/webapp/WEB-INF/xjdx/xjdx.properties | 2 src/main/webapp/WEB-INF/zkysh/zkysh.properties | 2 src/main/webapp/WEB-INF/qhyhs/qhyhs.properties | 2 src/main/webapp/WEB-INF/zkdsz/zkdsz.properties | 2 src/main/webapp/WEB-INF/twt/twt.properties | 2 src/main/webapp/WEB-INF/aky/aky.properties | 2 src/main/webapp/WEB-INF/lhs/lhs.properties | 2 src/main/webapp/WEB-INF/sds/sds.properties | 2 src/main/webapp/resources/images/材料科学姑苏实验室logo1.png | 0 src/main/webapp/WEB-INF/config.properties | 2 src/main/webapp/WEB-INF/sin/sin.properties | 2 src/main/webapp/WEB-INF/hws/hws.properties | 2 src/main/webapp/WEB-INF/test/test.properties | 2 22 files changed, 107 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/controller/UserMngController.java b/src/main/java/com/nanometer/smartlab/controller/UserMngController.java index 80e8d17..03b33ba 100644 --- a/src/main/java/com/nanometer/smartlab/controller/UserMngController.java +++ b/src/main/java/com/nanometer/smartlab/controller/UserMngController.java @@ -142,7 +142,7 @@ int totalRows = sheet.getPhysicalNumberOfRows(); List<SysUser> userList=new ArrayList<>(); System.out.println("totalRows=========="+totalRows); - String errorMsg = null; + String errorMsg = ""; for (int i = 1; i < totalRows; i++) { row=sheet.getRow(i); @@ -201,18 +201,47 @@ } SysUser sysUser=new SysUser(); - sysUser.setCompany(valuesList.get(0));//单位 - sysUser.setDepartment(valuesList.get(1));//部门 - sysUser.setArp((int)Double.parseDouble(valuesList.get(2))+"");//arp号 - sysUser.setName(valuesList.get(3));//姓名 - sysUser.setAccount(valuesList.get(4));//账号 - - String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}"; - if (!valuesList.get(5).matches(PW_PATTERN)){ - errorMsg += "第"+i+"行,密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上"; + if (valuesList.get(0) != null && !StringUtils.isEmpty(valuesList.get(0))){ + sysUser.setCompany(valuesList.get(0));//单位 + }else { + errorMsg += "第"+i+"行,单位不能为空"; continue; } - sysUser.setPassword(MD5Utils.encode(valuesList.get(5))+"");//密码 + if (valuesList.get(1) != null && !StringUtils.isEmpty(valuesList.get(1))){ + sysUser.setDepartment(valuesList.get(1));//部门 + }else { + errorMsg += "第"+i+"行,部门不能为空"; + continue; + } + if (valuesList.get(2) != null && !StringUtils.isEmpty(valuesList.get(2))){ + sysUser.setArp((int)Double.parseDouble(valuesList.get(2))+"");//arp号 + }else { + errorMsg += "第"+i+"行,arp不能为空"; + continue; + } + if (valuesList.get(3) != null && !StringUtils.isEmpty(valuesList.get(3))){ + sysUser.setName(valuesList.get(3));//姓名 + }else { + errorMsg += "第"+i+"行,姓名不能为空"; + continue; + } + if (valuesList.get(4) != null && !StringUtils.isEmpty(valuesList.get(4))){ + sysUser.setAccount(valuesList.get(4));//账号 + }else { + errorMsg += "第"+i+"行,账号不能为空"; + continue; + } + if (valuesList.get(5) != null && !StringUtils.isEmpty(valuesList.get(5))){ + String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}"; + if (!valuesList.get(5).matches(PW_PATTERN)){ + errorMsg += "第"+i+"行,密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上"; + continue; + } + sysUser.setPassword(MD5Utils.encode(valuesList.get(5))+"");//密码 + }else { + errorMsg += "第"+i+"行,密码不能为空"; + continue; + } //valuesList.get(8) id卡号检查 if (valuesList.get(8) != null && valuesList.get(8).length()>0){ @@ -232,10 +261,39 @@ continue; } } + + // 检查ARP号 + if (this.sysUserService.isSysUserExist(sysUser.getArp(), null, null, null)) { + errorMsg += ("第"+i+"行,ARP已存在"); + continue; + } + // 检查登陆账号 + if (this.sysUserService.isSysUserExist(null, sysUser.getAccount(), null, null)) { + errorMsg += ("第"+i+"行,登陆账号已存在"); + continue; + } + if (!StringUtils.isEmpty(sysUser.getIdCard()) && this.sysUserService.isSysUserExist(null, null, sysUser.getIdCard(), null)) { + errorMsg += ("第"+i+"行,ID卡号已存在"); + continue; + } sysUser.setPhone(valuesList.get(6));//电话 sysUser.setEmail(valuesList.get(7));//邮箱 - sysUser.setPoint((int)Double.parseDouble(valuesList.get(9)));//分数 - sysUser.setRoleId(valuesList.get(10));//角色 + if (valuesList.get(9) != null){ + sysUser.setPoint((int)Double.parseDouble(valuesList.get(9)));//分数 + }else { + errorMsg += "第"+i+"行,分数不能为空"; + continue; + } + if (valuesList.get(10) != null){ + sysUser.setRoleId(valuesList.get(10));//角色 + }else { + errorMsg += "第"+i+"行,角色不能为空"; + continue; + } + if (valuesList.get(12) == null){ + errorMsg += "第"+i+"行,可见度不能为空"; + continue; + } if(valuesList.get(11).equals("是")){ sysUser.setApproverFlag(ApproverFlag.YES); }else { @@ -253,7 +311,6 @@ if(valuesList.get(12).equals(SeeFlag.LEADING.getText())){ sysUser.setSeeFlag(SeeFlag.LEADING); } - if (valuesList.size() > 13 && !valuesList.get(13).replace(" ","").isEmpty()){ String[] projects = valuesList.get(13).split(","); @@ -276,7 +333,7 @@ this.sysUserService.insertSysUserList(userList); System.out.println("=========导入结束====="); - if (errorMsg != null){ + if (errorMsg != null && !StringUtils.isEmpty(errorMsg)){ FacesUtils.warn(errorMsg); }else { FacesUtils.info("导入成功。"); diff --git a/src/main/webapp/WEB-INF/aky/aky.properties b/src/main/webapp/WEB-INF/aky/aky.properties index 8e2de6d..5c8f99c 100644 --- a/src/main/webapp/WEB-INF/aky/aky.properties +++ b/src/main/webapp/WEB-INF/aky/aky.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A\u5B89\u5168\u79D1\u5B66\u6280\u672F\u7814\u7A76\u9662\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/config.properties b/src/main/webapp/WEB-INF/config.properties index 1febb0c..ace20f1 100644 --- a/src/main/webapp/WEB-INF/config.properties +++ b/src/main/webapp/WEB-INF/config.properties @@ -42,7 +42,6 @@ emailSend.schedule.delay=60000 #\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00F8\uFFFD -message.url= https://sinanoaq.com:8095/api/sendmessage message.signature= 4E85FE3F203915AC358A92205814D043 message.head= \u667A\u6167\u5B9E\u9A8C\u5BA4\uFF08\u8BD5\u5242\uFF09\u5B89\u5168\u7BA1\u63A7\u7CFB\u7EDF message.enable= true @@ -57,5 +56,6 @@ institute.id = ${institute.id} institute.name = ${institute.name} institute.url = ${institute.url} +message.url = ${message.url} reagent.detail.price.api = ${reagent.detail.price.api} diff --git a/src/main/webapp/WEB-INF/gcs/gcs.properties b/src/main/webapp/WEB-INF/gcs/gcs.properties index 6ffdc91..481c6d9 100644 --- a/src/main/webapp/WEB-INF/gcs/gcs.properties +++ b/src/main/webapp/WEB-INF/gcs/gcs.properties @@ -10,3 +10,5 @@ alarm.url = http://gcs.sinanoaq.com/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u5317\u4EAC\u8FC7\u7A0B\u5DE5\u7A0B\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/gslab/gslab.properties b/src/main/webapp/WEB-INF/gslab/gslab.properties index d45771f..ee56aee 100644 --- a/src/main/webapp/WEB-INF/gslab/gslab.properties +++ b/src/main/webapp/WEB-INF/gslab/gslab.properties @@ -11,3 +11,5 @@ alarm.url = reagent.detail.price.api = https://www.reagent.com.cn/reagent-front/goodsApi/getGoodsListExact institute.copyright= Copyright\u00A92021 \u6750\u6599\u79D1\u5B66\u59D1\u82CF\u5B9E\u9A8C\u5BA4\u00A0\u82CFICP\u590720047331\u53F7-1 + +message.url= http://aq.gusulab.ac.cn:18084/api/sendmessage diff --git a/src/main/webapp/WEB-INF/hws/hws.properties b/src/main/webapp/WEB-INF/hws/hws.properties index d298e1f..99ceb19 100644 --- a/src/main/webapp/WEB-INF/hws/hws.properties +++ b/src/main/webapp/WEB-INF/hws/hws.properties @@ -10,3 +10,5 @@ alarm.url = http://hws.sinanoaq.com/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u5927\u8FDE\u5316\u5B66\u7269\u7406\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/lhs/lhs.properties b/src/main/webapp/WEB-INF/lhs/lhs.properties index dd28ecb..2dc45db 100644 --- a/src/main/webapp/WEB-INF/lhs/lhs.properties +++ b/src/main/webapp/WEB-INF/lhs/lhs.properties @@ -10,3 +10,5 @@ alarm.url = http://lhs.sinanoaq.com/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u65B0\u7586\u7406\u5316\u6280\u672F\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/lzhws/lzhws.properties b/src/main/webapp/WEB-INF/lzhws/lzhws.properties index 9c6c6d9..42ad704 100644 --- a/src/main/webapp/WEB-INF/lzhws/lzhws.properties +++ b/src/main/webapp/WEB-INF/lzhws/lzhws.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u5170\u5DDE\u5316\u5B66\u7269\u7406\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/qhyhs/qhyhs.properties b/src/main/webapp/WEB-INF/qhyhs/qhyhs.properties index 0fd2b83..b8accbd 100644 --- a/src/main/webapp/WEB-INF/qhyhs/qhyhs.properties +++ b/src/main/webapp/WEB-INF/qhyhs/qhyhs.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u9752\u6D77\u76D0\u6E56\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/sds/sds.properties b/src/main/webapp/WEB-INF/sds/sds.properties index b5d4890..bf3d7d3 100644 --- a/src/main/webapp/WEB-INF/sds/sds.properties +++ b/src/main/webapp/WEB-INF/sds/sds.properties @@ -10,3 +10,5 @@ alarm.url = http://sds.sinanoaq.com/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u65B0\u7586\u751F\u6001\u4E0E\u5730\u7406\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/shgjs/shgjs.properties b/src/main/webapp/WEB-INF/shgjs/shgjs.properties index 57c4021..d26aa5c 100644 --- a/src/main/webapp/WEB-INF/shgjs/shgjs.properties +++ b/src/main/webapp/WEB-INF/shgjs/shgjs.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u4E0A\u6D77\u5149\u5B66\u7CBE\u5BC6\u673A\u68B0\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/sin/sin.properties b/src/main/webapp/WEB-INF/sin/sin.properties index 9849c07..aa826c1 100644 --- a/src/main/webapp/WEB-INF/sin/sin.properties +++ b/src/main/webapp/WEB-INF/sin/sin.properties @@ -10,3 +10,5 @@ alarm.url = http://sinanoaq.com/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u82CF\u5DDE\u7EB3\u7C73\u6280\u672F\u4E0E\u7EB3\u7C73\u4EFF\u751F\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/szygs/szygs.properties b/src/main/webapp/WEB-INF/szygs/szygs.properties index ca42403..20e92f7 100644 --- a/src/main/webapp/WEB-INF/szygs/szygs.properties +++ b/src/main/webapp/WEB-INF/szygs/szygs.properties @@ -10,3 +10,5 @@ alarm.url = http://58.210.42.60:8001/daping/sendWarnInfo.json reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u82CF\u5DDE\u751F\u7269\u533B\u5B66\u5DE5\u7A0B\u6280\u672F\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/test/test.properties b/src/main/webapp/WEB-INF/test/test.properties index 1e63925..d676ea0 100644 --- a/src/main/webapp/WEB-INF/test/test.properties +++ b/src/main/webapp/WEB-INF/test/test.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = https://www.reagent.com.cn/reagent-front/goodsApi/getGoodsListExact institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u82CF\u5DDE\u7EB3\u7C73\u6280\u672F\u4E0E\u7EB3\u7C73\u4EFF\u751F\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/twt/twt.properties b/src/main/webapp/WEB-INF/twt/twt.properties index c335d44..f262b05 100644 --- a/src/main/webapp/WEB-INF/twt/twt.properties +++ b/src/main/webapp/WEB-INF/twt/twt.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u65B0\u7586\u5929\u6587\u53F0\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/xjdx/xjdx.properties b/src/main/webapp/WEB-INF/xjdx/xjdx.properties index a4727ac..930df4d 100644 --- a/src/main/webapp/WEB-INF/xjdx/xjdx.properties +++ b/src/main/webapp/WEB-INF/xjdx/xjdx.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u65B0\u7586\u5927\u5B66\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/zkdsz/zkdsz.properties b/src/main/webapp/WEB-INF/zkdsz/zkdsz.properties index ba20135..ccc6edb 100644 --- a/src/main/webapp/WEB-INF/zkdsz/zkdsz.properties +++ b/src/main/webapp/WEB-INF/zkdsz/zkdsz.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u6280\u672F\u5927\u5B66\u82CF\u5DDE\u9AD8\u7B49\u7814\u7A76\u9662\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/zkysh/zkysh.properties b/src/main/webapp/WEB-INF/zkysh/zkysh.properties index 23a7cdd..7d4b604 100644 --- a/src/main/webapp/WEB-INF/zkysh/zkysh.properties +++ b/src/main/webapp/WEB-INF/zkysh/zkysh.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u751F\u6001\u73AF\u5883\u7814\u7A76\u4E2D\u5FC3\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git a/src/main/webapp/WEB-INF/zkyshs/zkyshs.properties b/src/main/webapp/WEB-INF/zkyshs/zkyshs.properties index 7a18ef0..c361250 100644 --- a/src/main/webapp/WEB-INF/zkyshs/zkyshs.properties +++ b/src/main/webapp/WEB-INF/zkyshs/zkyshs.properties @@ -10,3 +10,5 @@ alarm.url = reagent.detail.price.api = institute.copyright= Copyright\u00A92017 \u4E2D\u56FD\u79D1\u5B66\u9662\u6C34\u751F\u751F\u7269\u7814\u7A76\u6240\u00A0\u82CFICP\u590710220403\u53F7-6 + +message.url= https://sinanoaq.com:8095/api/sendmessage diff --git "a/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo.png" "b/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo.png" index 517a09d..edc0f4d 100644 --- "a/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo.png" +++ "b/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo.png" Binary files differ diff --git "a/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo1.png" "b/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo1.png" new file mode 100644 index 0000000..517a09d --- /dev/null +++ "b/src/main/webapp/resources/images/\346\235\220\346\226\231\347\247\221\345\255\246\345\247\221\350\213\217\345\256\236\351\252\214\345\256\244logo1.png" Binary files differ diff --git "a/src/main/webapp/resources/template/\347\224\250\346\210\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/src/main/webapp/resources/template/\347\224\250\346\210\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" index 1c3262e..9529fa1 100644 --- "a/src/main/webapp/resources/template/\347\224\250\346\210\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" +++ "b/src/main/webapp/resources/template/\347\224\250\346\210\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" Binary files differ -- Gitblit v1.9.2