|
@@ -1,27 +1,7 @@
|
|
-/*
|
|
|
|
- *
|
|
|
|
- * Copyright (c) 2018-2025, hnqz All rights reserved.
|
|
|
|
- *
|
|
|
|
- * Redistribution and use in source and binary forms, with or without
|
|
|
|
- * modification, are permitted provided that the following conditions are met:
|
|
|
|
- *
|
|
|
|
- * Redistributions of source code must retain the above copyright notice,
|
|
|
|
- * this list of conditions and the following disclaimer.
|
|
|
|
- * Redistributions in binary form must reproduce the above copyright
|
|
|
|
- * notice, this list of conditions and the following disclaimer in the
|
|
|
|
- * documentation and/or other materials provided with the distribution.
|
|
|
|
- * Neither the name of the pig4cloud.com developer nor the names of its
|
|
|
|
- * contributors may be used to endorse or promote products derived from
|
|
|
|
- * this software without specific prior written permission.
|
|
|
|
- * Author: hnqz
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
package com.qunzhixinxi.hnqz.admin.controller;
|
|
package com.qunzhixinxi.hnqz.admin.controller;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
-import cn.hutool.core.util.EnumUtil;
|
|
|
|
import cn.hutool.core.util.IdcardUtil;
|
|
import cn.hutool.core.util.IdcardUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
@@ -41,6 +21,8 @@ import com.qunzhixinxi.hnqz.admin.api.entity.SysDictItem;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysRole;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysRole;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUser;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUserRole;
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.SysUserRole;
|
|
|
|
+import com.qunzhixinxi.hnqz.admin.api.entity.WmPlatformQuizTestResult;
|
|
|
|
+import com.qunzhixinxi.hnqz.admin.api.model.WmQuizResultModel;
|
|
import com.qunzhixinxi.hnqz.admin.api.vo.UserVO;
|
|
import com.qunzhixinxi.hnqz.admin.api.vo.UserVO;
|
|
import com.qunzhixinxi.hnqz.admin.entity.SysDeptSub;
|
|
import com.qunzhixinxi.hnqz.admin.entity.SysDeptSub;
|
|
import com.qunzhixinxi.hnqz.admin.entity.SysUserSub;
|
|
import com.qunzhixinxi.hnqz.admin.entity.SysUserSub;
|
|
@@ -49,18 +31,15 @@ import com.qunzhixinxi.hnqz.admin.entity.input.UserCertificationInput;
|
|
import com.qunzhixinxi.hnqz.admin.entity.model.excel.CommonUserExcelModel;
|
|
import com.qunzhixinxi.hnqz.admin.entity.model.excel.CommonUserExcelModel;
|
|
import com.qunzhixinxi.hnqz.admin.entity.vo.SysUserSubVO;
|
|
import com.qunzhixinxi.hnqz.admin.entity.vo.SysUserSubVO;
|
|
import com.qunzhixinxi.hnqz.admin.enums.GigTypeEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.GigTypeEnum;
|
|
-import com.qunzhixinxi.hnqz.admin.enums.OladingCertStatus;
|
|
|
|
-import com.qunzhixinxi.hnqz.admin.enums.RenlijiaCertStatus;
|
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
-import com.qunzhixinxi.hnqz.admin.enums.YeeCertStatus;
|
|
|
|
-import com.qunzhixinxi.hnqz.admin.enums.ZhengQiZhiXingCertStatus;
|
|
|
|
import com.qunzhixinxi.hnqz.admin.mapper.*;
|
|
import com.qunzhixinxi.hnqz.admin.mapper.*;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDeptService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDeptService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDeptSubService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDeptSubService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDictItemService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysDictItemService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysUserService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysUserService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysUserSubService;
|
|
import com.qunzhixinxi.hnqz.admin.service.SysUserSubService;
|
|
|
|
+import com.qunzhixinxi.hnqz.admin.service.WmPlatformQuizTestResultService;
|
|
import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
|
|
import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
|
|
import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
|
|
@@ -71,9 +50,6 @@ import com.qunzhixinxi.hnqz.common.qcc.service.QccService;
|
|
import com.qunzhixinxi.hnqz.common.security.annotation.Inner;
|
|
import com.qunzhixinxi.hnqz.common.security.annotation.Inner;
|
|
import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
|
|
import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
|
|
import com.qunzhixinxi.hnqz.common.taxhelper.enums.TaxHelperCertStatus;
|
|
import com.qunzhixinxi.hnqz.common.taxhelper.enums.TaxHelperCertStatus;
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -84,19 +60,22 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
+import java.time.LocalDateTime;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @author hnqz
|
|
|
|
- * @date 2018/12/16
|
|
|
|
|
|
+ * 用户管理
|
|
|
|
+ *
|
|
|
|
+ * @version 1.0.0
|
|
|
|
+ * @date 2023-10-26 15:32
|
|
*/
|
|
*/
|
|
@Slf4j
|
|
@Slf4j
|
|
@RestController
|
|
@RestController
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@RequestMapping("/user")
|
|
@RequestMapping("/user")
|
|
-@Api(value = "user", tags = "用户管理模块")
|
|
|
|
public class SysUserController {
|
|
public class SysUserController {
|
|
|
|
|
|
private final SysUserService userService;
|
|
private final SysUserService userService;
|
|
@@ -108,6 +87,7 @@ public class SysUserController {
|
|
private final QccService qccService;
|
|
private final QccService qccService;
|
|
private final SysUserSubService sysUserSubService;
|
|
private final SysUserSubService sysUserSubService;
|
|
private final SysDictItemService sysDictItemService;
|
|
private final SysDictItemService sysDictItemService;
|
|
|
|
+ private final WmPlatformQuizTestResultService platformQuizTestResultService;
|
|
|
|
|
|
|
|
|
|
private boolean isZbOrDbUsers(Integer[] roles) {
|
|
private boolean isZbOrDbUsers(Integer[] roles) {
|
|
@@ -131,7 +111,6 @@ public class SysUserController {
|
|
* @param input
|
|
* @param input
|
|
* @return R
|
|
* @return R
|
|
*/
|
|
*/
|
|
- @ApiOperation(value = "用户管理-认证", notes = "用户管理-认证")
|
|
|
|
@SysLog("用户管理-认证")
|
|
@SysLog("用户管理-认证")
|
|
@GetMapping("/getAuthInfo")
|
|
@GetMapping("/getAuthInfo")
|
|
public R getAuthInfo(UserCertificationInput input) {
|
|
public R getAuthInfo(UserCertificationInput input) {
|
|
@@ -145,7 +124,6 @@ public class SysUserController {
|
|
* @param input
|
|
* @param input
|
|
* @return R
|
|
* @return R
|
|
*/
|
|
*/
|
|
- @ApiOperation(value = "用户管理-认证-确定", notes = "用户管理-认证-确定")
|
|
|
|
@SysLog("用户管理-认证-确定")
|
|
@SysLog("用户管理-认证-确定")
|
|
@PostMapping("/batchChannelCert")
|
|
@PostMapping("/batchChannelCert")
|
|
public R batchChannelCert(@RequestBody UserCertificationInput input) {
|
|
public R batchChannelCert(@RequestBody UserCertificationInput input) {
|
|
@@ -163,24 +141,6 @@ public class SysUserController {
|
|
@GetMapping("/info/{username}")
|
|
@GetMapping("/info/{username}")
|
|
public R info(@PathVariable String username) {
|
|
public R info(@PathVariable String username) {
|
|
|
|
|
|
- // //排除众包用户
|
|
|
|
- // List<Integer> roleList=new ArrayList<>();
|
|
|
|
- // roleList.add(5); //医药代表
|
|
|
|
- // roleList.add(6); //众包代表
|
|
|
|
- // QueryWrapper<SysUserRole> wrappers=Wrappers.query();
|
|
|
|
- //
|
|
|
|
- // List<SysUserRole>
|
|
|
|
- // list=sysUserRoleService.list(wrappers.lambda().notIn(SysUserRole::getRoleId,roleList));
|
|
|
|
- // List<Integer> listZbUserList=new ArrayList<>();
|
|
|
|
- // for (SysUserRole sysUserRole:list) {
|
|
|
|
- // listZbUserList.add(sysUserRole.getUserId());
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // if(null==listZbUserList)
|
|
|
|
- // {
|
|
|
|
- // return R.failed(null, String.format("用户信息为空 %s", username));
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
// 根据用户名查询用户时,过滤掉已删除和已禁用的用户
|
|
// 根据用户名查询用户时,过滤掉已删除和已禁用的用户
|
|
List<SysUser> user = userService.list(Wrappers.<SysUser>query().lambda().eq(SysUser::getUsername, username)
|
|
List<SysUser> user = userService.list(Wrappers.<SysUser>query().lambda().eq(SysUser::getUsername, username)
|
|
.eq(SysUser::getDelFlag, 0).eq(SysUser::getLockFlag, 0));
|
|
.eq(SysUser::getDelFlag, 0).eq(SysUser::getLockFlag, 0));
|
|
@@ -265,8 +225,6 @@ public class SysUserController {
|
|
@SysLog("删除用户信息")
|
|
@SysLog("删除用户信息")
|
|
@DeleteMapping("/{id}")
|
|
@DeleteMapping("/{id}")
|
|
@PreAuthorize("@pms.hasPermission('sys_user_del')")
|
|
@PreAuthorize("@pms.hasPermission('sys_user_del')")
|
|
- @ApiOperation(value = "删除用户", notes = "根据ID删除用户")
|
|
|
|
- @ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
|
|
|
public R userDel(@PathVariable Integer id) {
|
|
public R userDel(@PathVariable Integer id) {
|
|
SysUser sysUser = userService.getById(id);
|
|
SysUser sysUser = userService.getById(id);
|
|
return R.ok(userService.deleteUserById(sysUser));
|
|
return R.ok(userService.deleteUserById(sysUser));
|
|
@@ -698,489 +656,6 @@ public class SysUserController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
|
-// * 批量导入用户
|
|
|
|
-// *
|
|
|
|
-// * @param file 用户信息文件
|
|
|
|
-// * @return success/false
|
|
|
|
-// */
|
|
|
|
-// @SysLog("批量导入用户")
|
|
|
|
-// @PostMapping(value = "/batch")
|
|
|
|
-// @PreAuthorize("@pms.hasPermission('sys_user_add')")
|
|
|
|
-// public R batchUser(@RequestPart("file") MultipartFile file) {
|
|
|
|
-//
|
|
|
|
-// // 获取操作员和操作员所在的结算主体
|
|
|
|
-// HnqzUser operator = SecurityUtils.getUser();
|
|
|
|
-// SysDept sysDept = sysDeptService.getById(operator.getDeptId());
|
|
|
|
-//
|
|
|
|
-// // 读取excel
|
|
|
|
-// try {
|
|
|
|
-// String fileName = file.getOriginalFilename().toLowerCase();
|
|
|
|
-// InputStream inputStream = file.getInputStream();
|
|
|
|
-//
|
|
|
|
-// // 校验文件信息
|
|
|
|
-// Workbook wbs = null;
|
|
|
|
-// if (fileName.endsWith("xls")) {
|
|
|
|
-// //2003
|
|
|
|
-// wbs = new HSSFWorkbook(inputStream);
|
|
|
|
-// } else if (fileName.endsWith("xlsx")) {
|
|
|
|
-// //2007
|
|
|
|
-// wbs = new XSSFWorkbook(inputStream);
|
|
|
|
-// } else {
|
|
|
|
-// return R.failed("上传文件格式错误!");
|
|
|
|
-// }
|
|
|
|
-// if (wbs.isSheetHidden(0)) {
|
|
|
|
-// return R.failed("导入表中有隐藏列");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 校验页(数据页)
|
|
|
|
-// Sheet sheet = wbs.getSheetAt(1);
|
|
|
|
-//
|
|
|
|
-// // 校验模板
|
|
|
|
-// Row row0 = sheet.getRow(0);
|
|
|
|
-// if (row0 == null) {
|
|
|
|
-// return R.failed("导入模版错误!");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 校验记录数
|
|
|
|
-// int rowNum = sheet.getLastRowNum();
|
|
|
|
-// if (rowNum < 1) {
|
|
|
|
-// return R.failed("导入表中缺少数据!");
|
|
|
|
-// } else if (rowNum > 1000) {
|
|
|
|
-// return R.failed("单次批量导入最大支持1000行数据!");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 校验列信息
|
|
|
|
-// String name = row0.getCell(0).getStringCellValue();
|
|
|
|
-// if (!"姓名".equals(name)) {
|
|
|
|
-// return R.failed("导入模版第一列错误!");
|
|
|
|
-// }
|
|
|
|
-// String phone = row0.getCell(1).getStringCellValue();
|
|
|
|
-// if (!"手机号".equals(phone)) {
|
|
|
|
-// return R.failed("导入模版第二列错误!");
|
|
|
|
-// }
|
|
|
|
-// String prov = row0.getCell(2).getStringCellValue();
|
|
|
|
-// if (!"省".equals(prov)) {
|
|
|
|
-// return R.failed("导入模版第三列错误!");
|
|
|
|
-// }
|
|
|
|
-// String city = row0.getCell(3).getStringCellValue();
|
|
|
|
-// if (!"市".equals(city)) {
|
|
|
|
-// return R.failed("导入模版第四列错误!");
|
|
|
|
-// }
|
|
|
|
-// String role = row0.getCell(4).getStringCellValue();
|
|
|
|
-// if (!"角色".equals(role)) {
|
|
|
|
-// return R.failed("导入模版第五列错误!");
|
|
|
|
-// }
|
|
|
|
-// String userStatus = row0.getCell(5).getStringCellValue();
|
|
|
|
-// if (!"状态".equals(userStatus)) {
|
|
|
|
-// return R.failed("导入模版第六列错误!");
|
|
|
|
-// }
|
|
|
|
-// String provinceCode = row0.getCell(6).getStringCellValue();
|
|
|
|
-// if (!"省份编码".equals(provinceCode)) {
|
|
|
|
-// return R.failed("导入模版第七列错误!");
|
|
|
|
-// }
|
|
|
|
-// String cityCode = row0.getCell(7).getStringCellValue();
|
|
|
|
-// if (!"城市编码".equals(cityCode)) {
|
|
|
|
-// return R.failed("导入模版第八列错误!");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //数据
|
|
|
|
-// List<UserDTO> userDTOList = new ArrayList<>();
|
|
|
|
-// List<ErrorInfoVo> errorList = new ArrayList<>();
|
|
|
|
-// log.info(">>> 通过excel批量创建用户开始 <<<");
|
|
|
|
-// // 行数据
|
|
|
|
-// for (int i = 1; i <= rowNum; i++) {
|
|
|
|
-//
|
|
|
|
-// // 行编号
|
|
|
|
-// int rNum = i;
|
|
|
|
-// Row row = sheet.getRow(i);
|
|
|
|
-// log.info(">>>当前导入第{}行<<<", i);
|
|
|
|
-//
|
|
|
|
-// if (row == null) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnName(null);
|
|
|
|
-// errorInfoVo.setContent(null);
|
|
|
|
-// errorInfoVo.setReason("当前行没有数据信息");
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// int colNum = row.getLastCellNum();
|
|
|
|
-// UserDTO userDTO = new UserDTO();
|
|
|
|
-//
|
|
|
|
-// userDTO.setDeptId(sysDept.getDeptId());
|
|
|
|
-// if(ArrayUtils.contains(sysDept.getSubjectType(),SubjectTypeEnum.TYPE_SHUIBANGYUN.getCode())){
|
|
|
|
-// userDTO.setCertStatus(TaxHelperCertStatus.UN_CERT.getCode());
|
|
|
|
-// }
|
|
|
|
-// // if(ArrayUtils.contains(sysDept.getSubjectType(),SubjectTypeEnum.TYPE_RENLIJIA.getCode())){
|
|
|
|
-// // userDTO.setRljCertStatus(DingEnum.CER_STATUS_4.getType());
|
|
|
|
-// // }
|
|
|
|
-// // if ("1".equals(sysDept.getSubjectType())) {
|
|
|
|
-// // userDTO.setCertStatus(TaxHelperCertStatus.UN_CERT.getCode());
|
|
|
|
-// // userDTO.setUserType("1");
|
|
|
|
-// // } else {
|
|
|
|
-// // userDTO.setUserType("0");
|
|
|
|
-// // }
|
|
|
|
-// userDTO.setCreateTime(LocalDateTime.now());
|
|
|
|
-//
|
|
|
|
-// for (int j = 0; j < colNum; j++) {//列数据
|
|
|
|
-//
|
|
|
|
-// // 获取列名称
|
|
|
|
-// String columnName = row0.getCell(j).getStringCellValue();
|
|
|
|
-// int columnNum = j + 1;
|
|
|
|
-//
|
|
|
|
-// if (null == row.getCell(j)) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnNum(columnNum);
|
|
|
|
-// errorInfoVo.setColumnName(columnName);
|
|
|
|
-// errorInfoVo.setContent(null);
|
|
|
|
-// errorInfoVo.setReason("列数据为空");
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 格式化字符串
|
|
|
|
-// row.getCell(j).setCellType(CellType.STRING);
|
|
|
|
-// String value = row.getCell(j).getStringCellValue()
|
|
|
|
-// .replaceAll(" ", "")
|
|
|
|
-// .replaceAll(",", "")
|
|
|
|
-// .replaceAll("\\u00A0", "")
|
|
|
|
-// .replaceAll((char) 12288 + "", "")
|
|
|
|
-// .replace("+", "·");
|
|
|
|
-//
|
|
|
|
-// // 校验value
|
|
|
|
-// if (StringUtil.isEmpty(value)) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnNum(columnNum);
|
|
|
|
-// errorInfoVo.setColumnName(columnName);
|
|
|
|
-// errorInfoVo.setContent(value);
|
|
|
|
-// errorInfoVo.setReason("数据为空");
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// if (j == 0) {
|
|
|
|
-// userDTO.setRealname(value);
|
|
|
|
-// } else if (j == 1) {
|
|
|
|
-// // 记录错误说明
|
|
|
|
-// String errorInfo = null;
|
|
|
|
-// // 正则校验手机号
|
|
|
|
-// if (ValidateUtils.validPhoneNum("0", value)) {
|
|
|
|
-// // 判断同一个dept下用户是否重复
|
|
|
|
-// SysUser query = new SysUser();
|
|
|
|
-// query.setUsername(value);
|
|
|
|
-// query.setDeptId(userDTO.getDeptId());
|
|
|
|
-// SysUser sysUser = sysUserMapper.selectUserByName(query);
|
|
|
|
-// if (sysUser != null) {
|
|
|
|
-// errorInfo = "手机号已被占用";
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-// errorInfo = "不是手机号";
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 封装错误信息
|
|
|
|
-// if (StringUtils.isNotEmpty(errorInfo)) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnNum(columnNum);
|
|
|
|
-// errorInfoVo.setColumnName(columnName);
|
|
|
|
-// errorInfoVo.setContent(value);
|
|
|
|
-// errorInfoVo.setReason(errorInfo);
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// userDTO.setPlatId(value);
|
|
|
|
-// userDTO.setPhone(value);
|
|
|
|
-// userDTO.setUsername(value);
|
|
|
|
-// } else if (j == 2) {
|
|
|
|
-// if ("全国".equals(value)) {
|
|
|
|
-// userDTO.setProvince("");
|
|
|
|
-// } else {
|
|
|
|
-// userDTO.setProvince(value);
|
|
|
|
-// }
|
|
|
|
-// } else if (j == 3) {
|
|
|
|
-// if (StringUtils.isEmpty(userDTO.getProvince())) {
|
|
|
|
-// userDTO.setCity("");
|
|
|
|
-// } else {
|
|
|
|
-// userDTO.setCity(value);
|
|
|
|
-// }
|
|
|
|
-// } else if (j == 4) {
|
|
|
|
-// // 声明错误信息记录
|
|
|
|
-// String errorInfo = "";
|
|
|
|
-//
|
|
|
|
-// // 根据角色名称获取角色
|
|
|
|
-// SysRole sysRole = sysRoleMapper.selectOne(Wrappers.<SysRole>query().eq("role_name", value));
|
|
|
|
-// if (sysRole != null) {
|
|
|
|
-// userDTO.setRole(Arrays.asList(sysRole.getRoleId()));
|
|
|
|
-// if (userDTO.getRole().contains(2)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (r.getRoleId() == 3) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为药企管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 4) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为CSO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 5) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为全职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 6) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为兼职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 7) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为财务管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(3)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (r.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员角色,不能同时为平台管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 4) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员角色,不能同时为CSO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (sysDept.getLevel() == 3 || sysDept.getLevel() == 4) {
|
|
|
|
-// if (r.getRoleId() == 5) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在CSO关系角色,不能同时为药企管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(4)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (sysRole.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员角色,不能同时为!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// if (r.getRoleId() == 3) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员角色,不能同时为CSO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 5) {
|
|
|
|
-// SysUserRole sysUserRole = new SysUserRole();
|
|
|
|
-// sysUserRole.setUserId(userVO.getUserId());
|
|
|
|
-// List<SysUserRole> sysUserRoleList = sysUserRoleMapper.selectById(sysUserRole);
|
|
|
|
-// for (int k = 0; k < sysUserRoleList.size(); k++) {
|
|
|
|
-// SysUser sysUser = userService.getById(sysUserRoleList.get(k).getUserId());
|
|
|
|
-// if (!sysUser.getDeptId().equals(userDTO.getDeptId())) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在全职学术推广员角色,不能为其他机构CSO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(7)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (r.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员,不能同时为财务管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (sysDept.getLevel() == 3 || sysDept.getLevel() == 4) {
|
|
|
|
-// if (r.getRoleId() == 3) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员,不能同时为CSO机构财务管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(5)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (r.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员,不能同时为全职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 3) {
|
|
|
|
-// if (sysDept.getLevel() == 3 || sysDept.getLevel() == 4) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员,不能为CSO的全职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 4) {
|
|
|
|
-// if (sysDept.getLevel() == 3 || sysDept.getLevel() == 4) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在CSO管理员,不能为其他CSO的全职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(6)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (r.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员,不能同时为兼职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// SysUserRole sysUserRole = new SysUserRole();
|
|
|
|
-// sysUserRole.setUserId(userVO.getUserId());
|
|
|
|
-// List<SysUserRole> sysUserRoleList = sysUserRoleMapper.selectById(sysUserRole);
|
|
|
|
-// for (int k = 0; k < sysUserRoleList.size(); k++) {
|
|
|
|
-// if (sysUserRoleList.get(k).getRoleId().equals(7)) {
|
|
|
|
-// SysUser sysUser = userService.getById(sysUserRoleList.get(k).getUserId());
|
|
|
|
-// if (sysUser.getDeptId().equals(userDTO.getDeptId())) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在财务管理员角色,不能同时为兼职学术推广员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } else if (userDTO.getRole().contains(9)) {
|
|
|
|
-// UserDTO tmp = new UserDTO();
|
|
|
|
-// tmp.setUsername(userDTO.getUsername());
|
|
|
|
-// tmp.setDelFlag("0");
|
|
|
|
-// List<UserVO> userVoList = sysUserMapper.selectByPhone(tmp);
|
|
|
|
-// if (userVoList.size() > 0) {
|
|
|
|
-// for (UserVO userVO : userVoList) {
|
|
|
|
-// if (null != userVO.getRoleList()) {
|
|
|
|
-// for (SysRole r : userVO.getRoleList()) {
|
|
|
|
-// if (sysRole.getRoleId() == 2) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在平台管理员,不能同时为CRO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// if (r.getRoleId() == 3) {
|
|
|
|
-// errorInfo = errorInfo + "用户已存在药企管理员,不能同时为CRO管理员!";
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// if (userDTO.getRole().contains(3)) {
|
|
|
|
-// if (sysDept.getLevel() != 2) {
|
|
|
|
-// errorInfo = errorInfo + "角色选为药企管理员时,组织架构必须为药企!";
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// if (!userDTO.getDeptId().equals(SecurityUtils.getUser().getDeptId())) {
|
|
|
|
-// if (userDTO.getRole().contains(5) || userDTO.getRole().contains(6)) {
|
|
|
|
-// errorInfo = errorInfo + "不能跨机构维护学术推广员!";
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 存在错误
|
|
|
|
-// if (StringUtils.isNotEmpty(errorInfo) || sysRole == null) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnNum(columnNum);
|
|
|
|
-// errorInfoVo.setColumnName(columnName);
|
|
|
|
-// errorInfoVo.setContent(errorInfo);
|
|
|
|
-// errorInfoVo.setReason("角色信息有误");
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// } else if (j == 5) {
|
|
|
|
-// if (!"活跃".equals(value) && !"休眠".equals(value)) {
|
|
|
|
-// ErrorInfoVo errorInfoVo = new ErrorInfoVo();
|
|
|
|
-// errorInfoVo.setRowNum(rNum);
|
|
|
|
-// errorInfoVo.setColumnNum(columnNum);
|
|
|
|
-// errorInfoVo.setColumnName(columnName);
|
|
|
|
-// errorInfoVo.setContent(value);
|
|
|
|
-// errorInfoVo.setReason("角色状态有误");
|
|
|
|
-// errorList.add(errorInfoVo);
|
|
|
|
-// continue;
|
|
|
|
-// }
|
|
|
|
-// userDTO.setLockFlag("活跃".equals(value) ? "0" : "9");
|
|
|
|
-// } else if (j == 6) {
|
|
|
|
-// userDTO.setProvinceCode(value);
|
|
|
|
-// } else if (j == 7) {
|
|
|
|
-// userDTO.setCityCode(value);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 记录争取额的信息
|
|
|
|
-// userDTOList.add(userDTO);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// // 判断是否有错误的数据行,如果没有,执行入库操作
|
|
|
|
-// if (CollectionUtils.isEmpty(errorList)) {
|
|
|
|
-// userDTOList.forEach(userDTO -> {
|
|
|
|
-// userService.saveUser(userDTO);
|
|
|
|
-// });
|
|
|
|
-// }
|
|
|
|
-// return R.ok(errorList);
|
|
|
|
-//
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
-// log.error("批量创建用户失败:{}",e.getMessage());
|
|
|
|
-// e.printStackTrace();
|
|
|
|
-// return R.failed("批量创建用户失败");
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 更新用户信息
|
|
* 更新用户信息
|
|
*
|
|
*
|
|
@@ -1192,13 +667,7 @@ public class SysUserController {
|
|
@PreAuthorize("@pms.hasPermission('sys_user_edit')")
|
|
@PreAuthorize("@pms.hasPermission('sys_user_edit')")
|
|
public R updateUser(@Valid @RequestBody UserDTO userDto) {
|
|
public R updateUser(@Valid @RequestBody UserDTO userDto) {
|
|
|
|
|
|
- // TODO qcc调用企查查查询是否为主要人员
|
|
|
|
- /**
|
|
|
|
- * @Modify: start qcc调用企查查查询是否为主要人员
|
|
|
|
- * @Version: v2021.4.16
|
|
|
|
- * @Author: ryz
|
|
|
|
- * @Date: 2021/5/6
|
|
|
|
- */
|
|
|
|
|
|
+ // qcc调用企查查查询是否为主要人员
|
|
SysDept sysDept = sysDeptService.getById(userDto.getDeptId());
|
|
SysDept sysDept = sysDeptService.getById(userDto.getDeptId());
|
|
|
|
|
|
if (null != userDto.getUserId()) {
|
|
if (null != userDto.getUserId()) {
|
|
@@ -1491,7 +960,7 @@ public class SysUserController {
|
|
* @return 用户集合
|
|
* @return 用户集合
|
|
*/
|
|
*/
|
|
@GetMapping("/selectUserList")
|
|
@GetMapping("/selectUserList")
|
|
- public R selectUserList(Page page, UserDTO userDTO) {
|
|
|
|
|
|
+ public R<?> selectUserList(Page page, UserDTO userDTO) {
|
|
|
|
|
|
userDTO.setSubType(null);
|
|
userDTO.setSubType(null);
|
|
if (StrUtil.isNotBlank(userDTO.getSubjectLocation())) {
|
|
if (StrUtil.isNotBlank(userDTO.getSubjectLocation())) {
|
|
@@ -1506,14 +975,42 @@ public class SysUserController {
|
|
|
|
|
|
IPage<UserVO> userVosPage = userService.selectUserList(page, userDTO);
|
|
IPage<UserVO> userVosPage = userService.selectUserList(page, userDTO);
|
|
|
|
|
|
|
|
+ Set<Integer> userIds = userVosPage.getRecords().stream().map(UserVO::getUserId).collect(Collectors.toSet());
|
|
|
|
+
|
|
|
|
+ if (CollUtil.isNotEmpty(userIds)) {
|
|
|
|
+
|
|
|
|
+ List<WmPlatformQuizTestResult> quizTestResults = platformQuizTestResultService.listPltQuizResults(userIds);
|
|
|
|
+
|
|
|
|
+ LocalDate today = LocalDate.now();
|
|
|
|
+ Map<Integer, List<WmPlatformQuizTestResult>> quizTestResult = quizTestResults.stream().filter(res -> res.getExpiry().isAfter(today)).collect(Collectors.groupingBy(WmPlatformQuizTestResult::getUserId));
|
|
|
|
+
|
|
|
|
+ userVosPage.getRecords().forEach(vo -> {
|
|
|
|
+ List<WmPlatformQuizTestResult> testResults = quizTestResult.get(vo.getUserId());
|
|
|
|
+ List<WmQuizResultModel> pure = null;
|
|
|
|
+ if (CollUtil.isNotEmpty(testResults)) {
|
|
|
|
+ Map<Integer, List<WmPlatformQuizTestResult>> collect = testResults.stream().collect(Collectors.groupingBy(WmPlatformQuizTestResult::getQuizId));
|
|
|
|
+ pure = new ArrayList<>(collect.size());
|
|
|
|
+
|
|
|
|
+ for (Map.Entry<Integer, List<WmPlatformQuizTestResult>> entry : collect.entrySet()) {
|
|
|
|
+ pure.add(entry.getValue().get(0).getQuizResult());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ vo.setQuizResult(CollUtil.isEmpty(pure) ? Collections.emptyList() : pure);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
// 封装结算通道
|
|
// 封装结算通道
|
|
Set<Integer> deptIds = userVosPage.getRecords().stream().map(UserVO::getDeptId).collect(Collectors.toSet());
|
|
Set<Integer> deptIds = userVosPage.getRecords().stream().map(UserVO::getDeptId).collect(Collectors.toSet());
|
|
|
|
|
|
if (CollUtil.isNotEmpty(deptIds)) {
|
|
if (CollUtil.isNotEmpty(deptIds)) {
|
|
// 税源地
|
|
// 税源地
|
|
Map<Integer, Map<String, Integer>> coll = sysDeptSubService.list(Wrappers.<SysDeptSub>lambdaQuery()
|
|
Map<Integer, Map<String, Integer>> coll = sysDeptSubService.list(Wrappers.<SysDeptSub>lambdaQuery()
|
|
- .eq(SysDeptSub::getEnableFlag, SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode())
|
|
|
|
- .in(SysDeptSub::getDeptId, deptIds))
|
|
|
|
|
|
+ .eq(SysDeptSub::getEnableFlag, SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode())
|
|
|
|
+ .in(SysDeptSub::getDeptId, deptIds))
|
|
.stream()
|
|
.stream()
|
|
.collect(Collectors.groupingBy(SysDeptSub::getDeptId,
|
|
.collect(Collectors.groupingBy(SysDeptSub::getDeptId,
|
|
Collectors.toMap(sysDeptSub -> sysDeptSub.getSubjectLocation().name(), SysDeptSub::getSubjectChannel)));
|
|
Collectors.toMap(sysDeptSub -> sysDeptSub.getSubjectLocation().name(), SysDeptSub::getSubjectChannel)));
|
|
@@ -1548,7 +1045,7 @@ public class SysUserController {
|
|
// 平台管理员和admin获取全部
|
|
// 平台管理员和admin获取全部
|
|
else {
|
|
else {
|
|
List<SysDictItem> list = sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getType, "subject_location"));
|
|
List<SysDictItem> list = sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getType, "subject_location"));
|
|
- locations = list.stream().map( item -> Enum.valueOf(SubjectLocation.class, item.getValue())).collect(Collectors.toList());
|
|
|
|
|
|
+ locations = list.stream().map(item -> Enum.valueOf(SubjectLocation.class, item.getValue())).collect(Collectors.toList());
|
|
}
|
|
}
|
|
|
|
|
|
userVosPage.getRecords().forEach(userVO -> {
|
|
userVosPage.getRecords().forEach(userVO -> {
|
|
@@ -1565,16 +1062,6 @@ public class SysUserController {
|
|
.eq(SysUserSub::getUserId, userVO.getUserId()));
|
|
.eq(SysUserSub::getUserId, userVO.getUserId()));
|
|
|
|
|
|
if (CollUtil.isNotEmpty(userSubList) && CollUtil.isNotEmpty(locations)) {
|
|
if (CollUtil.isNotEmpty(userSubList) && CollUtil.isNotEmpty(locations)) {
|
|
- // 不同渠道认证信息列表
|
|
|
|
- List<SysUserSubVO> certList = new ArrayList<>();
|
|
|
|
-// userSubList.stream()
|
|
|
|
-// .filter(userSub -> locations.contains(userSub.getSubjectLocation()))
|
|
|
|
-// .forEach(sysUserSub -> {
|
|
|
|
-// SysUserSubVO userSubVO = BeanUtil.copyProperties(sysUserSub, SysUserSubVO.class, "certStatus");
|
|
|
|
-// userSubVO.setCertStatus(GigTypeEnum.getCertStatusByCode(sysUserSub.getGigType(), sysUserSub.getCertStatus()));
|
|
|
|
-// userSubVO.setCertStatusDisplay(String.format("%s:%s", sysUserSub.getSubjectLocation().getDescription(),GigTypeEnum.getCertStatusNameByCode(sysUserSub.getGigType(), sysUserSub.getCertStatus())));
|
|
|
|
-// certList.add(userSubVO);
|
|
|
|
-// });
|
|
|
|
|
|
|
|
// 不同渠道认证名称,封装成中文名称数组格式
|
|
// 不同渠道认证名称,封装成中文名称数组格式
|
|
Map<SubjectLocation, SysUserSub> certStatusMap = userSubList.stream()
|
|
Map<SubjectLocation, SysUserSub> certStatusMap = userSubList.stream()
|
|
@@ -1606,20 +1093,6 @@ public class SysUserController {
|
|
).collect(Collectors.toList());
|
|
).collect(Collectors.toList());
|
|
userVO.setCertList(subVOS);
|
|
userVO.setCertList(subVOS);
|
|
|
|
|
|
-// List<SubjectLocation> collect = certList.stream().map(SysUserSubVO::getSubjectLocation).collect(Collectors.toList());
|
|
|
|
-
|
|
|
|
-// List<SysUserSubVO> subVOS = locations.stream().filter(loc -> !collect.contains(loc)).map(loc -> {
|
|
|
|
-// SysUserSubVO userSubVO = new SysUserSubVO();
|
|
|
|
-// userSubVO.setUserId(userVO.getUserId());
|
|
|
|
-// userSubVO.setGigType(loc.getGigType());
|
|
|
|
-// userSubVO.setSubjectLocation(loc);
|
|
|
|
-// userSubVO.setCertStatus(GigTypeEnum.getCertStatusByCode(userSubVO.getGigType(), 0));
|
|
|
|
-// userSubVO.setCertStatusDisplay(String.format("%s:%s", userSubVO.getSubjectLocation().getDescription(), GigTypeEnum.getCertStatusNameByCode(userSubVO.getGigType(), 0)));
|
|
|
|
-// return userSubVO;
|
|
|
|
-// }
|
|
|
|
-// ).collect(Collectors.toList());
|
|
|
|
-// certList.addAll(subVOS);
|
|
|
|
-
|
|
|
|
// 该企业配置的所有税源地
|
|
// 该企业配置的所有税源地
|
|
List<SubjectLocation> subjectLocationList = subList.stream().map(SysDeptSub::getSubjectLocation).collect(Collectors.toList());
|
|
List<SubjectLocation> subjectLocationList = subList.stream().map(SysDeptSub::getSubjectLocation).collect(Collectors.toList());
|
|
|
|
|