czh %!s(int64=2) %!d(string=hai) anos
pai
achega
2d0ded4d79
Modificáronse 17 ficheiros con 168 adicións e 151 borrados
  1. 118 118
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/GlobalSystemExceptionHandler.java
  2. 2 2
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractLogisticsService.java
  3. 2 2
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractTradeService.java
  4. 1 1
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/AddressQueryReqVo.java
  5. 7 2
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/CooperateApplyQueryReqVo.java
  6. 2 2
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/CooperateManageQueryReqVo.java
  7. 4 3
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java
  8. 3 5
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java
  9. 6 6
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java
  10. 2 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/model/report/KwsRoleExcel.java
  11. 2 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/model/report/KwsUserExcel.java
  12. 1 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/req/EntFindPageReqVo.java
  13. 2 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java
  14. 5 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsRoleService.java
  15. 6 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java
  16. 3 2
      sckw-modules/sckw-system/src/main/resources/mapper/KwsRoleDao.xml
  17. 2 2
      sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml

+ 118 - 118
sckw-common/sckw-common-core/src/main/java/com/sckw/core/exception/GlobalSystemExceptionHandler.java

@@ -22,124 +22,124 @@ import java.util.Set;
 @Configuration
 public class GlobalSystemExceptionHandler {
 
-    @ExceptionHandler(value = SystemException.class)
-    @ResponseBody
-    public HttpResult handlerSystemException(SystemException e) {
-        log.error("业务异常:", e);
-        return HttpResult.error(e.getCode(), e.getMessage());
-    }
-
-    @ExceptionHandler(value = RuntimeException.class)
-    @ResponseBody
-    public HttpResult handlerRuntimeException(RuntimeException e) {
-        log.error("业务异常:", e);
-        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
-    }
-
-    /**
-     * BusinessException处理
-     *
-     * @param ex
-     * @return
-     */
-    @ResponseBody
-    @ExceptionHandler(BusinessException.class)
-    public HttpResult businessExceptionHandler(BusinessException ex) {
-        log.error("业务异常,message={},param={}", ex.getMsg(), ex.getParam());
-        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.getMessage());
-    }
-
-    /**
-     * 前端自定义提示异常
-     *
-     * @param ex
-     * @return
-     */
-    @ResponseBody
-    @ExceptionHandler(CustomPromptException.class)
-    public HttpResult customPromptExceptionHandler(CustomPromptException ex) {
-        log.error("前端自定义提示异常,code={},message={},param={}", ex.getCode(), ex.getMsg(), ex.getParam());
-        return HttpResult.error(ex.getCode(), ex.getMessage());
-    }
-
-
-    /**
-     * NotLoginException处理
-     *
-     * @param ex
-     * @return
-     */
-    @ResponseBody
-    @ExceptionHandler(NotLoginException.class)
-    public HttpResult notLoginException(NotLoginException ex) {
-        log.error("用户未登录, message={}, param={}", ex.getMsg(), ex.getParam());
-        return HttpResult.error(HttpStatus.UN_LOGIN_CODE, HttpStatus.UN_LOGIN_MESSAGE, ex.getMessage());
-    }
-
-    @ResponseBody
-    @ExceptionHandler(MissingServletRequestParameterException.class)
-    public HttpResult noArgs(MissingServletRequestParameterException ex) {
-        String format = "参数:[%s]不能为空";
-        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, String.format(format, ex.getParameterName()));
-    }
-
-    /**
-     * 注解校验异常处理
-     *
-     * @param ex
-     * @return
-     */
-    @ResponseBody
-    @ExceptionHandler(MethodArgumentNotValidException.class)
-    public HttpResult methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException ex) {
-        List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors();
-        StringBuilder sb = new StringBuilder();
-        if (!CollectionUtils.isEmpty(fieldErrors)) {
-            boolean first = true;
-            for (FieldError fieldError : fieldErrors) {
-                if (!first) {
-                    sb.append(",");
-                }
-                sb.append(fieldError.getDefaultMessage());
-                first = false;
-            }
-        }
-        String errMsg = sb.toString();
-        log.error("参数校验异常:{}", errMsg);
-        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, errMsg);
-    }
-
-    @ResponseBody
-    @ExceptionHandler(ConstraintViolationException.class)
-    public HttpResult constraintViolationExceptionHandler(ConstraintViolationException ex) {
-        log.error("参数校验异常c:{}", ex.getMessage());
-        Set<ConstraintViolation<?>> constraintViolations = ex.getConstraintViolations();
-        StringBuilder sb = new StringBuilder();
-        if (!CollectionUtils.isEmpty(constraintViolations)) {
-            boolean first = true;
-            for (ConstraintViolation<?> constraintViolation : constraintViolations) {
-                if (!first) {
-                    sb.append(",");
-                }
-                sb.append(constraintViolation.getMessage());
-                first = false;
-            }
-        }
-        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, sb.toString());
-    }
-
-    /**
-     * exception处理
-     *
-     * @param ex
-     * @returnh
-     */
-    @ResponseBody
-    @ExceptionHandler(Exception.class)
-    public HttpResult defaultExceptionHandler(Exception ex) {
-        log.error("系统异常", ex);
-        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.toString());
-    }
+//    @ExceptionHandler(value = SystemException.class)
+//    @ResponseBody
+//    public HttpResult handlerSystemException(SystemException e) {
+//        log.error("业务异常:", e);
+//        return HttpResult.error(e.getCode(), e.getMessage());
+//    }
+//
+//    @ExceptionHandler(value = RuntimeException.class)
+//    @ResponseBody
+//    public HttpResult handlerRuntimeException(RuntimeException e) {
+//        log.error("业务异常:", e);
+//        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
+//    }
+//
+//    /**
+//     * BusinessException处理
+//     *
+//     * @param ex
+//     * @return
+//     */
+//    @ResponseBody
+//    @ExceptionHandler(BusinessException.class)
+//    public HttpResult businessExceptionHandler(BusinessException ex) {
+//        log.error("业务异常,message={},param={}", ex.getMsg(), ex.getParam());
+//        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.getMessage());
+//    }
+//
+//    /**
+//     * 前端自定义提示异常
+//     *
+//     * @param ex
+//     * @return
+//     */
+//    @ResponseBody
+//    @ExceptionHandler(CustomPromptException.class)
+//    public HttpResult customPromptExceptionHandler(CustomPromptException ex) {
+//        log.error("前端自定义提示异常,code={},message={},param={}", ex.getCode(), ex.getMsg(), ex.getParam());
+//        return HttpResult.error(ex.getCode(), ex.getMessage());
+//    }
+//
+//
+//    /**
+//     * NotLoginException处理
+//     *
+//     * @param ex
+//     * @return
+//     */
+//    @ResponseBody
+//    @ExceptionHandler(NotLoginException.class)
+//    public HttpResult notLoginException(NotLoginException ex) {
+//        log.error("用户未登录, message={}, param={}", ex.getMsg(), ex.getParam());
+//        return HttpResult.error(HttpStatus.UN_LOGIN_CODE, HttpStatus.UN_LOGIN_MESSAGE, ex.getMessage());
+//    }
+//
+//    @ResponseBody
+//    @ExceptionHandler(MissingServletRequestParameterException.class)
+//    public HttpResult noArgs(MissingServletRequestParameterException ex) {
+//        String format = "参数:[%s]不能为空";
+//        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, String.format(format, ex.getParameterName()));
+//    }
+//
+//    /**
+//     * 注解校验异常处理
+//     *
+//     * @param ex
+//     * @return
+//     */
+//    @ResponseBody
+//    @ExceptionHandler(MethodArgumentNotValidException.class)
+//    public HttpResult methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException ex) {
+//        List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors();
+//        StringBuilder sb = new StringBuilder();
+//        if (!CollectionUtils.isEmpty(fieldErrors)) {
+//            boolean first = true;
+//            for (FieldError fieldError : fieldErrors) {
+//                if (!first) {
+//                    sb.append(",");
+//                }
+//                sb.append(fieldError.getDefaultMessage());
+//                first = false;
+//            }
+//        }
+//        String errMsg = sb.toString();
+//        log.error("参数校验异常:{}", errMsg);
+//        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, errMsg);
+//    }
+//
+//    @ResponseBody
+//    @ExceptionHandler(ConstraintViolationException.class)
+//    public HttpResult constraintViolationExceptionHandler(ConstraintViolationException ex) {
+//        log.error("参数校验异常c:{}", ex.getMessage());
+//        Set<ConstraintViolation<?>> constraintViolations = ex.getConstraintViolations();
+//        StringBuilder sb = new StringBuilder();
+//        if (!CollectionUtils.isEmpty(constraintViolations)) {
+//            boolean first = true;
+//            for (ConstraintViolation<?> constraintViolation : constraintViolations) {
+//                if (!first) {
+//                    sb.append(",");
+//                }
+//                sb.append(constraintViolation.getMessage());
+//                first = false;
+//            }
+//        }
+//        return HttpResult.error(HttpStatus.PARAMETERS_PATTERN_ERROR_CODE, sb.toString());
+//    }
+//
+//    /**
+//     * exception处理
+//     *
+//     * @param ex
+//     * @returnh
+//     */
+//    @ResponseBody
+//    @ExceptionHandler(Exception.class)
+//    public HttpResult defaultExceptionHandler(Exception ex) {
+//        log.error("系统异常", ex);
+//        return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, ex.toString());
+//    }
 
 }
 

+ 2 - 2
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractLogisticsService.java

@@ -753,7 +753,7 @@ public class KwcContractLogisticsService {
         queryListReqDto.setAllEnt(allEnt);
         List<QueryListResDto> queryListResDtos = kwcContractLogisticsMapper.queryList(queryListReqDto);
         if (CollectionUtils.isEmpty(queryListResDtos)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
 
         List<QueryListResVo> list = getQueryListResVos(queryListResDtos);
@@ -945,7 +945,7 @@ public class KwcContractLogisticsService {
         reqVo.setIdList(StringUtils.splitStrToList(reqVo.getIds(), Global.COMMA, Long.class));
         List<QueryListResDto> queryListResDtos = kwcContractLogisticsMapper.queryLogisticsList(reqVo);
         if (CollectionUtils.isEmpty(queryListResDtos)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<QueryListResVo> list = getLogisticsResVo(queryListResDtos);
         List<LogisticsListExport> dataList = BeanUtils.copyToList(list, LogisticsListExport.class);

+ 2 - 2
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractTradeService.java

@@ -756,7 +756,7 @@ public class KwcContractTradeService {
         queryListReqDto.setAllEnt(allEnt);
         List<QueryListResDto> queryListResDtos = kwcContractTradeMapper.queryList(queryListReqDto);
         if (CollectionUtils.isEmpty(queryListResDtos)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
 
         List<QueryListResVo> list = getQueryListResVos(queryListResDtos);
@@ -946,7 +946,7 @@ public class KwcContractTradeService {
         reqVo.setIdList(StringUtils.splitStrToList(reqVo.getIds(), Global.COMMA, Long.class));
         List<QueryListResDto> queryListResDtos = kwcContractTradeMapper.queryTradeList(reqVo);
         if (CollectionUtils.isEmpty(queryListResDtos)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<QueryListResVo> list = getTradeListResVo(queryListResDtos);
         List<TradeListExport> dataList = BeanUtils.copyToList(list, TradeListExport.class);

+ 1 - 1
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/AddressQueryReqVo.java

@@ -54,6 +54,6 @@ public class AddressQueryReqVo extends PageRequest implements Serializable {
     /**
      * 主键
      */
-    private List<Long> ids;
+    private String ids;
 
 }

+ 7 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/CooperateApplyQueryReqVo.java

@@ -47,9 +47,14 @@ public class CooperateApplyQueryReqVo extends PageRequest implements Serializabl
     private Date endTime;
 
     /**
-     * ids id集合
+     * ids
      */
-    private List<Long> ids;
+    private String ids;
+
+    /**
+     * idList
+     */
+    private List<Long> idList;
 
     /**
      * 状态 0 审核中  3 已驳回  4 已撤销

+ 2 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/CooperateManageQueryReqVo.java

@@ -42,9 +42,9 @@ public class CooperateManageQueryReqVo extends PageRequest implements Serializab
     private Date endTime;
 
     /**
-     * id集合
+     * id
      */
-    private List<Long> ids;
+    private String ids;
 
     /**
      * 状态

+ 4 - 3
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java

@@ -111,8 +111,9 @@ public class KwmAddressService {
             wrapper.lt(KwmAddress::getCreateTime, DateUtil.offsetDay(reqVo.getEndTime(), 1));
         }
 
-        if (CollectionUtils.isNotEmpty(reqVo.getIds())) {
-            wrapper.in(KwmAddress::getId, reqVo.getIds());
+        if (StringUtils.isNotBlank(reqVo.getIds())) {
+            wrapper.in(KwmAddress::getId, StringUtils.splitStrToList(reqVo.getIds(), Long.class));
+
         }
 
         if (!Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.MANAGE.getCode())) {
@@ -380,7 +381,7 @@ public class KwmAddressService {
     public void export(AddressQueryReqVo reqVo, HttpServletResponse response) {
         List<KwmAddress> kwmAddressList = findList(reqVo);
         if (CollectionUtils.isEmpty(kwmAddressList)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<AddressQueryResVo> list = getAddressQueryResVo(kwmAddressList);
         ExcelUtil.downData(response, AddressQueryExport.class, BeanUtils.copyToList(list, AddressQueryExport.class));

+ 3 - 5
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java

@@ -188,9 +188,8 @@ public class KwmCooperateApplyService {
             cooperateManageQueryReqDto.setCooperateTypes(Arrays.asList(cooperateTypes.split(Global.COMMA)));
         }
 
-        List<Long> ids = reqVo.getIds();
-        if (!CollectionUtils.isEmpty(ids)) {
-            cooperateManageQueryReqDto.setIds(ids);
+        if (StringUtils.isNotBlank(reqVo.getIds())) {
+            cooperateManageQueryReqDto.setIds(StringUtils.splitStrToList(reqVo.getIds(), Long.class));
         }
         //只允许查出申请中、已拒绝、已撤销的记录
         List<Integer> status = new ArrayList<>();
@@ -211,7 +210,6 @@ public class KwmCooperateApplyService {
         }
         cooperateManageQueryReqDto.setStatus(status);
 
-
         Long entId = LoginUserHolder.getEntId();
         cooperateManageQueryReqDto.setCurrentEntId(entId);
         List<Long> currentEntIdList = new ArrayList<>();
@@ -619,7 +617,7 @@ public class KwmCooperateApplyService {
         CooperateManageQueryReqDto reqDto = buildQueryParam(reqVo);
         List<CooperateManageQueryResDto> list = kwmCooperateMapper.findList(reqDto);
         if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
 
         List<CooperateManageQueryResVo> cooperateManageQueryResVos = getCooperateManageQueryResVos(list);

+ 6 - 6
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java

@@ -145,9 +145,8 @@ public class KwmCooperateManageService {
         }
         cooperateManageQueryReqDto.setStatus(status);
 
-        List<Long> ids = reqVo.getIds();
-        if (!CollectionUtils.isEmpty(ids)) {
-            cooperateManageQueryReqDto.setIds(ids);
+        if (StringUtils.isNotBlank(reqVo.getIds())) {
+            cooperateManageQueryReqDto.setIds(StringUtils.splitStrToList(reqVo.getIds(), Long.class));
         }
 
 
@@ -371,7 +370,7 @@ public class KwmCooperateManageService {
         CooperateManageQueryReqDto reqDto = buildQueryParam(reqVo);
         List<CooperateManageQueryResDto> list = kwmCooperateMapper.findManageList(reqDto);
         if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<CooperateManageQueryResVo> cooperateManageQueryResVos = commonBusinessService.getCooperateManageQueryResVos(list);
         List<CooperateManageExport> result = new ArrayList<>();
@@ -760,6 +759,7 @@ public class KwmCooperateManageService {
                 queryAllCooperateInfoReqDto.setQueryEntIdList(entCacheResDtos.stream().map(EntCacheResDto::getId).toList());
             }
         }
+        queryAllCooperateInfoReqDto.setIds(StringUtils.splitStrToList(reqVo.getIds(), Long.class));
         return queryAllCooperateInfoReqDto;
     }
 
@@ -818,11 +818,11 @@ public class KwmCooperateManageService {
     public void exportAllCooperateInfo(CooperateManageQueryReqVo reqVo, HttpServletResponse response) {
         List<CooperateManageQueryResDto> list = kwmCooperateMapper.queryAllCooperateInfoList(getQueryAllCooperateInfoReqDto(reqVo));
         if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<QueryAllCooperateInfoResVo> allCooperateInfoVo = getAllCooperateInfoVo(list);
         if (CollectionUtils.isEmpty(allCooperateInfoVo)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         List<QueryAllCooperateInfoExcel> queryAllCooperateInfoExcels = BeanUtils.copyToList(allCooperateInfoVo, QueryAllCooperateInfoExcel.class);
         ExcelUtil.downData(response, QueryAllCooperateInfoExcel.class, queryAllCooperateInfoExcels);

+ 2 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/report/KwsRoleExcel.java

@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.sckw.core.utils.LongToStringUtils;
+import com.sckw.excel.annotation.ExcelContext;
 import lombok.Data;
 
 import java.io.Serial;
@@ -16,6 +17,7 @@ import java.util.Date;
  * @date 2023/9/14
  */
 @Data
+@ExcelContext(fileName = "岗位权限", sheetName = "岗位权限")
 public class KwsRoleExcel implements Serializable {
 
     @Serial

+ 2 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/report/KwsUserExcel.java

@@ -2,6 +2,7 @@ package com.sckw.system.model.report;
 
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.excel.annotation.ExcelContext;
 import lombok.Data;
 
 import java.io.Serial;
@@ -14,6 +15,7 @@ import java.util.Date;
  * @date 2023/9/14
  */
 @Data
+@ExcelContext(fileName = "员工账号", sheetName = "员工账号")
 public class KwsUserExcel implements Serializable {
 
     @Serial

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/req/EntFindPageReqVo.java

@@ -98,7 +98,7 @@ public class EntFindPageReqVo extends PageRequest implements Serializable {
     /**
      * 企业id
      */
-    private List<Long> ids;
+    private String ids;
 
     /**
      * 查企业客户

+ 2 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -270,7 +270,7 @@ public class KwsEnterpriseService {
     public List<FindEntListPojo> findPojo(EntFindPageReqVo reqVo) {
         FindPojoParam findPojoParam = new FindPojoParam();
         BeanUtils.copyProperties(reqVo, findPojoParam);
-        findPojoParam.setIdList(reqVo.getIds());
+        findPojoParam.setIdList(StringUtils.splitStrToList(reqVo.getIds(), Long.class));
         if (StringUtils.isNotBlank(reqVo.getEntTypes())) {
             findPojoParam.setTypeList(Arrays.stream(reqVo.getEntTypes().split(Global.COMMA)).map(Integer::parseInt).toList());
         }
@@ -1185,7 +1185,7 @@ public class KwsEnterpriseService {
         List<EntFindPageResVo> result = new ArrayList<>();
 
         if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
 
         for (FindEntListPojo item : list) {

+ 5 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsRoleService.java

@@ -473,9 +473,13 @@ public class KwsRoleService {
         FindManagePojo manageInfoByEntId = kwsEnterpriseDao.findManageInfoByEntId(LoginUserHolder.getEntId());
         params.put("entId", LoginUserHolder.getEntId());
         params.put("manageRoleId", manageInfoByEntId.getRoleId());
+        String ids = StringUtils.valueOf(params.get("ids"));
+        if (StringUtils.isNotBlank(ids)) {
+            params.put("idList", StringUtils.splitStrToList(ids, Long.class));
+        }
         List<RoleResVo> roleResVos = kwsRoleDao.findPage(params);
         if (CollectionUtils.isEmpty(roleResVos)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
         ExcelUtil.downData(response, KwsRoleExcel.class, BeanUtils.copyToList(roleResVos, KwsRoleExcel.class));
     }

+ 6 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -648,10 +648,14 @@ public class KwsUserService {
 
 
     public void export(HashMap params, HttpServletResponse response) {
+        params.put("entId", LoginUserHolder.getEntId());
+        String ids = StringUtils.valueOf(params.get("ids"));
+        if (StringUtils.isNotBlank(ids)) {
+            params.put("idList", StringUtils.splitStrToList(ids, Long.class));
+        }
         List<KwsUserResVo> list = kwsUserDao.findPage(params);
-
         if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException("导出数据为空");
+            throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
 
         List<KwsUserExcel> result = new ArrayList<>();

+ 3 - 2
sckw-modules/sckw-system/src/main/resources/mapper/KwsRoleDao.xml

@@ -161,8 +161,9 @@
     <if test="endTime != null and endTime != ''" >
       and sr.create_time &lt; date_add(#{endTime}, INTERVAL 1 DAY)
     </if>
-    <if test="ids != null and ids.size() > 0">
-      <foreach collection="ids" item="item" open="(" close=")" separator=",">
+    <if test="idList != null and idList.size() > 0">
+        and sr.id in
+      <foreach collection="idList" item="item" open="(" close=")" separator=",">
         #{item}
       </foreach>
     </if>

+ 2 - 2
sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml

@@ -240,9 +240,9 @@
     <if test="systemType != null and systemType != ''">
       and su.system_type = #{systemType, jdbcType=VARCHAR}
     </if>
-    <if test="ids != null and ids.size() > 0">
+    <if test="idList != null and idList.size() > 0">
       and su.id in
-      <foreach collection="ids" item="item" open="(" close=")" separator=",">
+      <foreach collection="idList" item="item" open="(" close=")" separator=",">
         #{item}
       </foreach>
     </if>