Commit 1e40227a authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents f6a63ba2 83c46859
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Description 用户表格导入导出默认表头数据
* @Date 9:59 2022/9/20
* @Param
* @return
**/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("l_excel_head_for_io")
@Schema(description = "用户表格导入导出默认表头数据")
public class LExcelHeadForIo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 配置名称
*/
@NotBlank(message = "配置名称不能为空")
@Length(max = 50, message = "配置名称不能超过20个字符")
@ExcelAttribute(name = "配置名称", isNotEmpty = true, errorInfo = "配置名称不能为空", maxLength = 20)
@Schema(description = "配置名称")
private String name;
/**
* 使用者
*/
@Length(max = 32, message = "使用者不能超过32个字符")
@ExcelAttribute(name = "使用者", isNotEmpty = true, errorInfo = "使用者不能为空", maxLength = 32)
@Schema(description = "使用者")
private String createUser;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 使用标识
*/
@NotBlank(message = "使用标识不能为空")
@Length(max = 40, message = "使用标识不能超过40个字符")
@ExcelAttribute(name = "使用标识", isNotEmpty = true, errorInfo = "使用标识不能为空", maxLength = 40)
@Schema(description = "使用标识(建议传按钮的权限标识保证唯一)")
private String useCode;
/**
* 表头内容
*/
@NotBlank(message = "表头内容不能为空")
@ExcelAttribute(name = "表头内容", isNotEmpty = true, errorInfo = "表头内容不能为空")
@Schema(description = "表头内容", name = "excelHeadText")
private String excelHeadText;
/**
* 注释(一般填使用模块方便排查问题)
*/
@Length(max = 50, message = "注释")
@ExcelAttribute(name = "注释", maxLength = 50)
@Schema(description = "注释(一般填使用模块方便排查问题)")
private String remark;
}
......@@ -488,4 +488,12 @@ public class TSettleDomain extends BaseEntity {
@ExcelIgnore
private String bpoFlag;
/**
* EKP的服务团队 : 存
*/
@Schema(description = "EKP的服务团队", name = "serviceTeam")
@ExcelIgnore
@TableField(exist = false)
private String serviceTeam;
}
......@@ -7,7 +7,7 @@ public class EmployeeContractConstants {
public static final String NOT_CREATE_USER = "不是创建人,无法删除";
public static final String NOT_AUDIT_STATUS = "不是待提交或审核不通过,无法删除";
public static final String NOT_AUDIT_STATUS = "不是待提交,无法删除";
public static final String NOT_AUDIT = "未审核通过,无法更新";
public static final String INVALID = "作废、终止,无法更新";
......
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LExcelHeadForIo;
import com.yifu.cloud.plus.v1.yifu.archives.service.LExcelHeadForIoService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.time.LocalDateTime;
import java.util.List;
/**
* @Author fxj
* @Description 用户表格导入导出默认表头数据
* @Date 9:59 2022/9/20
* @Param
* @return
**/
@RestController
@AllArgsConstructor
@RequestMapping("/lexcelheadforio")
@Tag(name = "用户表格导入导出默认表头数据")
public class LExcelHeadForIoController {
private final LExcelHeadForIoService lExcelHeadForIoService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param lExcelHeadForIo 用户表格导入导出默认表头数据
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<LExcelHeadForIo>> getLExcelHeadForIoPage(Page<LExcelHeadForIo> page, LExcelHeadForIo lExcelHeadForIo) {
return new R<>(lExcelHeadForIoService.getLExcelHeadForIoPage(page, lExcelHeadForIo));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation(description = "id查询")
@GetMapping("/{id}")
public R<LExcelHeadForIo> getById(@PathVariable("id") String id) {
return new R<>(lExcelHeadForIoService.getById(id));
}
/**
* 通过useCode查询本人配置
*
* @param useCode
* @return R
*/
@Operation(description = "通过useCode查询本人配置")
@GetMapping("/getOwnList/{useCode}")
public R<List<LExcelHeadForIo>> getOwnListByUseCode(@PathVariable("useCode") String useCode) {
YifuUser user = SecurityUtils.getUser();
return new R<>(lExcelHeadForIoService.list(Wrappers.<LExcelHeadForIo>lambdaQuery().eq(LExcelHeadForIo::getCreateUser, String.valueOf(user.getId())).eq(LExcelHeadForIo::getUseCode, useCode)));
}
/**
* 新增记录
*
* @param lExcelHeadForIo
* @return R
*/
@Operation(description = "新增 maxMun:最大配置项(不传默认3)")
@PostMapping
public R<Boolean> save(@Valid @RequestBody LExcelHeadForIo lExcelHeadForIo,Integer maxMun) {
YifuUser user = SecurityUtils.getUser();
if(null == maxMun){
maxMun = CommonConstants.dingleDigitIntArray[3];
}
lExcelHeadForIo.setCreateUser(String.valueOf(user.getId()));
lExcelHeadForIo.setCreateTime(LocalDateTime.now());
long count = lExcelHeadForIoService.count(Wrappers.<LExcelHeadForIo>lambdaQuery()
.eq(LExcelHeadForIo::getCreateUser, lExcelHeadForIo.getCreateUser())
.eq(LExcelHeadForIo::getUseCode, lExcelHeadForIo.getUseCode()));
if(maxMun <= count){
return R.failed("保存失败,配置项不能超过最大配置数".concat(String.valueOf(maxMun)));
}
return new R<>(lExcelHeadForIoService.save(lExcelHeadForIo));
}
/**
* 修改记录
*
* @param lExcelHeadForIo
* @return R
*/
@Operation(description = "修改(wxhr:lexcelheadforio_edit)")
@SysLog("修改用户表格导入导出默认表头数据")
@PutMapping
public R<Boolean> update(@RequestBody LExcelHeadForIo lExcelHeadForIo) {
if(Common.isEmpty(lExcelHeadForIo.getId())){
return R.failed("操作失败,id不能为空!");
}
LExcelHeadForIo eh = lExcelHeadForIoService.getById(lExcelHeadForIo.getId());
if(null == eh ){
return R.failed("操作失败,无此配置!");
}
YifuUser user = SecurityUtils.getUser();
if(String.valueOf(user.getId()).equals(eh.getCreateUser())){
lExcelHeadForIo.setCreateTime(null);
lExcelHeadForIo.setCreateUser(null);
return new R<>(lExcelHeadForIoService.updateById(lExcelHeadForIo));
}else{
return R.failed("操作失败,此配置不属于您,您无权修改!");
}
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation(description = "删除(wxhr:lexcelheadforio_del)")
@SysLog("删除用户表格导入导出默认表头数据")
@DeleteMapping("/{id}")
public R<Boolean> removeById(@PathVariable String id) {
LExcelHeadForIo eh = lExcelHeadForIoService.getById(id);
if(null == eh ){
return R.failed("数据库存着此配置,无需重复删除!");
}
YifuUser user = SecurityUtils.getUser();
if(String.valueOf(user.getId()).equals(eh.getCreateUser())){
return new R<>(lExcelHeadForIoService.removeById(id));
}else{
return R.failed("操作失败,此配置不属于您,您无权删除!");
}
}
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LExcelHeadForIo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @Author fxj
* @Description 用户表格导入导出默认表头数据
* @Date 10:08 2022/9/20
* @Param
* @return
**/
@Mapper
public interface LExcelHeadForIoMapper extends BaseMapper<LExcelHeadForIo> {
/**
* 用户表格导入导出默认表头数据简单分页查询
* @param lExcelHeadForIo 用户表格导入导出默认表头数据
* @return
*/
IPage<LExcelHeadForIo> getLExcelHeadForIoPage(Page page, @Param("lExcelHeadForIo") LExcelHeadForIo lExcelHeadForIo);
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LExcelHeadForIo;
/**
* @Author fxj
* @Description 用户表格导入导出默认表头数据
* @Date 10:08 2022/9/20
* @Param
* @return
**/
public interface LExcelHeadForIoService extends IService<LExcelHeadForIo> {
/**
* 用户表格导入导出默认表头数据简单分页查询
*
* @param lExcelHeadForIo 用户表格导入导出默认表头数据
* @return
*/
IPage<LExcelHeadForIo> getLExcelHeadForIoPage(Page<LExcelHeadForIo> page, LExcelHeadForIo lExcelHeadForIo);
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LExcelHeadForIo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.LExcelHeadForIoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.LExcelHeadForIoService;
import org.springframework.stereotype.Service;
/**
* @Author fxj
* @Description 用户表格导入导出默认表头数据
* @Date 10:08 2022/9/20
* @Param
* @return
**/
@Service("lExcelHeadForIoService")
public class LExcelHeadForIoServiceImpl extends ServiceImpl<LExcelHeadForIoMapper, LExcelHeadForIo> implements LExcelHeadForIoService {
/**
* 用户表格导入导出默认表头数据简单分页查询
*
* @param lExcelHeadForIo 用户表格导入导出默认表头数据
* @return
*/
@Override
public IPage<LExcelHeadForIo> getLExcelHeadForIoPage(Page<LExcelHeadForIo> page, LExcelHeadForIo lExcelHeadForIo) {
return baseMapper.getLExcelHeadForIoPage(page, lExcelHeadForIo);
}
}
......@@ -553,8 +553,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
errorVo.setMainName(contractInfo.getApplyNo());
if (!user.getId().equals(contractInfo.getCreateBy())) {
errorVo.setErrorInfo(EmployeeContractConstants.NOT_CREATE_USER);
} else if (contractInfo.getAuditStatus() != CommonConstants.ZERO_INT
&& contractInfo.getAuditStatus() != CommonConstants.dingleDigitIntArray[3]) {
} else if (contractInfo.getAuditStatus() != CommonConstants.ZERO_INT) {
errorVo.setErrorInfo(EmployeeContractConstants.NOT_AUDIT_STATUS);
} else {
errorVo.setResult(CommonConstants.ONE_INT);
......
......@@ -16,8 +16,10 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
......@@ -38,6 +40,7 @@ import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
......@@ -141,6 +144,15 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
}
}
// 处理服务团队数据权限 2022-09-19 fxj
if (Common.isNotNull(tSettleDomain.getServiceTeam())){
R<AllUserNaVo> res = upmsDaprUtils.getUserIdsByUserNames(tSettleDomain.getServiceTeam());
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotNull(res.getData().getUserIds())){
// 先清理缓存
this.removeSettleCache(null,res.getData().getUserIds());
saveForEkp(res.getData().getUserIds(),tSettleDomain.getId());
}
}
tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId());
if (Common.isNotNull(tSettleDomainInfo)) {
baseMapper.updateById(tSettleDomain);
......@@ -163,4 +175,36 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
return setMap;
}
/**
* @Author fxj
* @Description 更新EKP对应MVP 项目权限,已有权限不做删除处理
* @Date 17:17 2022/9/19
* @Param
* @return
**/
public boolean saveForEkp(List<String> userIds, String domainId){
// 1. 先清除现有的这些认的项目权限
permissonMapper.delete(Wrappers.<TCutsomerDataPermisson>query().lambda()
.in(TCutsomerDataPermisson::getBePermissonUser,userIds)
.eq(TCutsomerDataPermisson::getSettleDomainId,domainId));
// 2.新增新的项目人员权限
TCutsomerDataPermisson pm;
if (Common.isNotNull(userIds)){
for (String uId:userIds){
pm = new TCutsomerDataPermisson();
pm.setIsCustomerService(CommonConstants.ZERO_STRING);
pm.setIsOwner(CommonConstants.ONE_STRING);
pm.setPermissonSrc("EKP服务团队");
pm.setPermissonLevel(CommonConstants.ONE_INT);
pm.setBePermissonUser(uId);
pm.setBePermissionTime(LocalDateTime.now());
pm.setSettleDomainId(domainId);
pm.setPermissionUser(CommonConstants.ONE_STRING);
pm.setType(CommonConstants.TWO_STRING);
permissonMapper.insert(pm);
}
}
return true;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.LExcelHeadForIoMapper">
<resultMap id="lExcelHeadForIoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.LExcelHeadForIo">
<id property="id" column="id"/>
<result property="createUser" column="create_user"/>
<result property="createTime" column="create_time"/>
<result property="useCode" column="use_code"/>
<result property="excelHeadText" column="excel_head_text"/>
<result property="remark" column="remark"/>
<result property="name" column="name"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.create_user,
a.create_time,
a.use_code,
a.excel_head_text,
a.remark,
a.name
</sql>
<sql id="lExcelHeadForIo_where">
<if test="lExcelHeadForIo != null">
<if test="lExcelHeadForIo.id != null and lExcelHeadForIo.id.trim() != ''">
AND a.id = #{lExcelHeadForIo.id}
</if>
<if test="lExcelHeadForIo.createUser != null and lExcelHeadForIo.createUser.trim() != ''">
AND a.create_user = #{lExcelHeadForIo.createUser}
</if>
<if test="lExcelHeadForIo.createTime != null">
AND a.create_time = #{lExcelHeadForIo.createTime}
</if>
<if test="lExcelHeadForIo.useCode != null and lExcelHeadForIo.useCode.trim() != ''">
AND a.use_code = #{lExcelHeadForIo.useCode}
</if>
<if test="lExcelHeadForIo.excelHeadText != null and lExcelHeadForIo.excelHeadText.trim() != ''">
AND a.excel_head_text = #{lExcelHeadForIo.excelHeadText}
</if>
<if test="lExcelHeadForIo.remark != null and lExcelHeadForIo.remark.trim() != ''">
AND a.remark = #{lExcelHeadForIo.remark}
</if>
</if>
</sql>
<!--lExcelHeadForIo简单分页查询-->
<select id="getLExcelHeadForIoPage" resultMap="lExcelHeadForIoMap">
SELECT
<include refid="Base_Column_List"/>
FROM l_excel_head_for_io a
<where>
1=1
<include refid="lExcelHeadForIo_where"/>
</where>
</select>
</mapper>
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
......@@ -51,4 +52,19 @@ public class UpmsDaprUtils {
}
return allUserVoR;
}
/**
* @Author fxj
* @Description 获取指定用户名对应用户IDs
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public R<AllUserNaVo> getUserIdsByUserNames(String usernames) {
R<AllUserNaVo> allUserVoR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getUserIdsByUserNames", usernames, AllUserNaVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(allUserVoR)){
return R.failed("获取指定用户名对应用户IDs失败!");
}
return allUserVoR;
}
}
......@@ -5525,7 +5525,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setOldCustomerName(oldJsonObject.getCustomerName());
param.setNewDeptName(jsonObject.getDepartName());
param.setNewCustomerName(jsonObject.getCustomerName());
param.setOldCustomerCode(jsonObject.getCustomerCode());
param.setNewCustomerCode(jsonObject.getCustomerCode());
String settleType = jsonObject.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
......
......@@ -189,6 +189,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
continue;
}else{
ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL);
ekpParam.setSettleType(CommonConstants.EMPTY_STRING);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
......
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService;
......@@ -93,6 +94,31 @@ public class SysBaseSetInfoController {
return R.ok(baseSetInfo);
}
/**
* 通过户名称查询基数设置表
*
* @param houseHoldName 户名称
* @param type 类型 0.社保 1.公积金
* @return R
*/
@Operation(summary = "通过户名称查询", description = "通过户名称查询:type(0.社保 1.公积金) houseHoldName(社保户或公积金名称)")
@GetMapping("/getBaseSetByParam")
public R<SysBaseSetInfo> getBaseSetByParam(@RequestParam(name = "houseHoldName") String houseHoldName,
@RequestParam(name = "type") String type) {
// 在用 非删除 最近创建的一条配置数据
SysBaseSetInfo baseSetInfo = sysBaseSetInfoService.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getDepartName,houseHoldName).eq(SysBaseSetInfo::getBaseType,type)
.eq(SysBaseSetInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(SysBaseSetInfo::getStatus,CommonConstants.ZERO_STRING)
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (null != baseSetInfo && CommonConstants.ONE_STRING.equals(baseSetInfo.getBaseType())){
baseSetInfo.setFundProList(sysPayProportionService.list(Wrappers.<SysPayProportion>query().lambda()
.eq(SysPayProportion::getSysBaseSetId,baseSetInfo.getId())));
}
return R.ok(baseSetInfo);
}
/**
* 新增基数设置表
*
......
......@@ -4,6 +4,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
/**
* @Author fxj
......@@ -13,5 +14,16 @@ import java.util.HashMap;
*/
@Data
public class AllUserNaVo implements Serializable {
/**
* @Author fxj
* @Description key 用户ID value 用户名称
* @Date 17:05 2022/9/19
**/
private HashMap<String,String> userNames;
/**
* @Author fxj
* @Description 用户IDS
* @Date 17:05 2022/9/19
**/
private List<String> userIds;
}
......@@ -45,6 +45,7 @@ import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
......@@ -294,7 +295,32 @@ public class UserController {
}
return naVo;
}
/**
* @Author fxj
* @Description 获取所有用户-- 指定用户名
* @Date 18:20 2022/8/16
* @Param
* @return
**/
@Inner
@PostMapping(value = {"/inner/getUserIdsByUserNames"})
public AllUserNaVo getUserIdsByUserNames(@RequestBody String usernames) {
AllUserNaVo naVo = new AllUserNaVo();
if (Common.isEmpty(usernames)){
return naVo;
}
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda()
.in(SysUser::getUsername,Common.getList(usernames)));
if (Common.isNotEmpty(sysUsers)){
List<String> userIds = new ArrayList<>();
for (SysUser u:sysUsers){
userIds.add(u.getUserId());
}
naVo.setUserIds(userIds);
}
return naVo;
}
/**
* @Author hgw
* @Description 获取部门下的用户id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment