251210_01_ENH: Project CRUD 구현 및 테스트 진행중

This commit is contained in:
2025-12-10 16:23:10 +09:00
parent 47ce0fffbb
commit 49f4e69372
31 changed files with 1024 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
package com.kri.contact.server.controller;
import com.kri.common.web.BusinessException;
import com.kri.common.webmvc.RequestUserContext;
import com.kri.contact.server.common.consts.AppConstant;
import com.kri.contact.server.dto.DataVerificationDto;
@@ -39,17 +40,22 @@ public class UserController {
@GetMapping()
public List<UserInfoDto> getUserList(RequestUserContext ctx){
//내부 직원
if(ctx.getUserRole() < AppConstant.EXTERNAL_USER_ROLE){
return userService.getUserListWithCmpn("");
String searchCmpn = ctx.getUserCmpn();
if(ctx.getUserRole() < AppConstant.OUTSOURCE_USER_ROLE){
searchCmpn = "";
}
//외주사 이상
return userService.getUserListWithCmpn(ctx.getUserCmpn());
return userService.getUserListWithCmpn(searchCmpn);
}
@GetMapping("outsource")
List<UserInfoDto> getOutsourceList(RequestUserContext ctx){
return userService.getOutsourceList();
}
@GetMapping("cmpn")
public List<String> getUserCmpnList(RequestUserContext ctx){
if(ctx.getUserRole() < AppConstant.EXTERNAL_USER_ROLE){
if(ctx.getUserRole() < AppConstant.OUTSOURCE_USER_ROLE){
return userService.getUserCmpnList();
}
@@ -73,7 +79,7 @@ public class UserController {
String regId = ctx.getUserId();
String clientIp = ctx.getClientIp();
//외주사급이 업로드로 계정을 생성하는 경우 자신의 회사명으로 고정
String forceCmpn = ctx.getUserRole() < AppConstant.EXTERNAL_USER_ROLE? "" : ctx.getUserCmpn();
String forceCmpn = ctx.getUserRole() < AppConstant.OUTSOURCE_USER_ROLE? "" : ctx.getUserCmpn();
ExcelUploadResponseDto result = userService.createUsersFromExcel(file, regId, forceCmpn);