LIVE_YE 2 år sedan
förälder
incheckning
6e465b39a6

+ 0 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/info/UserInfoController.java

@@ -40,7 +40,6 @@ public class UserInfoController extends BaseController
     /**
      * 查询导入人员信息列表
      */
-    @PreAuthorize("@ss.hasPermi('system:info:list')")
     @GetMapping("/list")
     public TableDataInfo list(UserInfo userInfo)
     {
@@ -92,7 +91,6 @@ public class UserInfoController extends BaseController
     /**
      * 获取导入人员信息详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:info:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -102,7 +100,6 @@ public class UserInfoController extends BaseController
     /**
      * 新增导入人员信息
      */
-    @PreAuthorize("@ss.hasPermi('system:info:add')")
     @Log(title = "导入人员信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody UserInfo userInfo)
@@ -113,7 +110,6 @@ public class UserInfoController extends BaseController
     /**
      * 修改导入人员信息
      */
-    @PreAuthorize("@ss.hasPermi('system:info:edit')")
     @Log(title = "导入人员信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody UserInfo userInfo)
@@ -124,7 +120,6 @@ public class UserInfoController extends BaseController
     /**
      * 删除导入人员信息
      */
-    @PreAuthorize("@ss.hasPermi('system:info:remove')")
     @Log(title = "导入人员信息", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 0 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/info/UserNucleicTimeController.java

@@ -39,7 +39,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 查询导入人员核酸时间记录列表
      */
-    @PreAuthorize("@ss.hasPermi('system:time:list')")
     @GetMapping("/list")
     public TableDataInfo list(UserNucleicTime userNucleicTime)
     {
@@ -63,7 +62,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 导出导入人员核酸时间记录列表
      */
-    @PreAuthorize("@ss.hasPermi('system:time:export')")
     @Log(title = "导入人员核酸时间记录", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, UserNucleicTime userNucleicTime)
@@ -76,7 +74,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 获取导入人员核酸时间记录详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:time:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -86,7 +83,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 新增导入人员核酸时间记录
      */
-    @PreAuthorize("@ss.hasPermi('system:time:add')")
     @Log(title = "导入人员核酸时间记录", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody UserNucleicTime userNucleicTime)
@@ -97,7 +93,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 修改导入人员核酸时间记录
      */
-    @PreAuthorize("@ss.hasPermi('system:time:edit')")
     @Log(title = "导入人员核酸时间记录", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody UserNucleicTime userNucleicTime)
@@ -108,7 +103,6 @@ public class UserNucleicTimeController extends BaseController
     /**
      * 删除导入人员核酸时间记录
      */
-    @PreAuthorize("@ss.hasPermi('system:time:remove')")
     @Log(title = "导入人员核酸时间记录", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 9 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java

@@ -134,18 +134,26 @@ public class UserInfoServiceImpl implements IUserInfoService {
     public String importUser(List<UserInfo> userList, String jobStyle, String focusCrowdStyle, String detectionNumber,
                              String detectionScope, String startTime, String endTime) throws Exception {
 
+        if(userList == null){
+            return "表格格式错误,请按照表格模板格式上传人员名单";
+        }
+
         System.out.println("接口开始========");
         long start1 = System.currentTimeMillis();
 
         StringBuilder sb = new StringBuilder();
         for (UserInfo userInfo : userList) {
+            if(userInfo == null){
+                return "表格格式错误,请按照表格模板格式上传人员名单";
+            }
+
             if(userInfo.getIdCard().length()!=18){
                 sb.append(userInfo.getName()).append(",");
             }
         }
 
         if(StringUtils.isNotEmpty(sb.toString())){
-            return "操作失败,以下人员身份证格式错【"+sb.toString()+"】";
+            return "操作失败,以下人员身份证格式错【"+sb.toString()+"】";
         }
 
         //todo 获取当前上传人员部门id
@@ -275,7 +283,6 @@ public class UserInfoServiceImpl implements IUserInfoService {
 
         }
 
-
         for (OdsQssHsjcxx odsQssHsjcxx : OdsQssHsjcxxList) {
             for (UserInfo userInfo : userList) {
                 if (userInfo.getIdCard().equals(odsQssHsjcxx.getSfzhm())) {