Commit 213f97a6 authored by fangxinjiang's avatar fangxinjiang

权限批量导入

parent 7f973498
...@@ -532,6 +532,8 @@ public interface CommonConstants { ...@@ -532,6 +532,8 @@ public interface CommonConstants {
String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!"; String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!";
String SETTLE_DOMAIN_NOT_EXIST = "无对应项目信息";
/** /**
* c端机构节点 code * c端机构节点 code
* @Author hgw * @Author hgw
......
...@@ -90,4 +90,12 @@ public class UpmsDaprUtils { ...@@ -90,4 +90,12 @@ public class UpmsDaprUtils {
} }
return userR; return userR;
} }
public R<SysUser> getSimpleUserByLoginName(String loginName) {
R<SysUser> userR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getSimpleUserByLoginName",loginName, SysUser.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(userR)){
return R.failed("获取所有用户数据失败!");
}
return userR;
}
} }
...@@ -19,15 +19,19 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -19,15 +19,19 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; 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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List; import java.util.List;
...@@ -119,4 +123,37 @@ public class TSocialfundHouseResController { ...@@ -119,4 +123,37 @@ public class TSocialfundHouseResController {
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tSocialfundHouseResService.removeById(id)); return R.ok(tSocialfundHouseResService.removeById(id));
} }
/**
* @Author fxj
* @Description 批量导入社保公积金审核权限
* @Date 16:59 2023/10/17
* @Param
* @return
**/
@SneakyThrows
@Operation(description = "批量新增社保公积金审核权限")
@SysLog("批量新增社保公积金审核权限")
@PostMapping("/importListAdd")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tSocialfundHouseResService.importDiy(file.getInputStream());
}
/**
* @Author fxj
* @Description 批量新增社保|公积金办理权限
* @Date 16:59 2023/10/17
* @Param
* @return
**/
@SneakyThrows
@Operation(description = "批量新增社保|公积金办理权限")
@SysLog("批量新增社保|公积金办理权限")
@PostMapping("/importListAddAll")
public R<List<ErrorMessage>> importListAddAll(@RequestBody MultipartFile file,String type) {
if (CommonConstants.ZERO_STRING.equals(type) && CommonConstants.ONE_STRING.equals(type)){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return tSocialfundHouseResService.importDiyAll(file.getInputStream(),type);
}
} }
...@@ -63,4 +63,7 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes ...@@ -63,4 +63,7 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes
**/ **/
void deleteHandleUser(SysHouseHoldInfo holdInfo); void deleteHandleUser(SysHouseHoldInfo holdInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
R<List<ErrorMessage>> importDiyAll(InputStream inputStream, String type);
} }
...@@ -415,6 +415,12 @@ public class UserController { ...@@ -415,6 +415,12 @@ public class UserController {
return userService.getById(userId); return userService.getById(userId);
} }
@Inner
@PostMapping(value = {"/inner/getSimpleUserByLoginName"})
public SysUser getSimpleUserByLoginName(@RequestBody String loginName) {
return userService.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getUsername,loginName).last(CommonConstants.LAST_ONE_SQL));
}
/** /**
* @param nickName 用户名称 * @param nickName 用户名称
* @return 上级部门用户列表 * @return 上级部门用户列表
......
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