mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 04:27:21 +09:00
WorkState 뷰 및 컨트롤러 및 서비스
This commit is contained in:
18
src/main/java/kr/co/uplus/ez/api/comm/FileService.java
Normal file
18
src/main/java/kr/co/uplus/ez/api/comm/FileService.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package kr.co.uplus.ez.api.comm;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
public interface FileService {
|
||||
|
||||
void init();
|
||||
void store(MultipartFile file);
|
||||
Stream<Path> loadAll();
|
||||
Path load(String filename);
|
||||
Resource loadAsResource(String filename);
|
||||
void deleteAll();
|
||||
void deleteFile(String filename);
|
||||
}
|
||||
@@ -292,7 +292,6 @@ public class SysMgtController {
|
||||
* desc : 배치 상세내용.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "batchDetail", notes = "배치 상세내용")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "batchDetail", method = {RequestMethod.POST})
|
||||
@@ -429,8 +428,12 @@ public class SysMgtController {
|
||||
|
||||
@RequestMapping(value = "/setWorkState", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public void setWorkState(@RequestBody @Valid Object setWorkParam) {
|
||||
public SetWorkStateResDto setWorkState(@RequestBody @Valid Object setWorkParam, BindingResult bindingResult) {
|
||||
|
||||
logger.debug("setWorkParam={}",setWorkParam);
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SetWorkStateResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return sysService.setWorkState(setWorkParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package kr.co.uplus.ez.api.sysMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
||||
import kr.co.uplus.ez.api.comm.FileService;
|
||||
import kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
@@ -34,6 +35,9 @@ public class SysMgtService {
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
@Autowired
|
||||
FileService fileService;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
@@ -526,5 +530,12 @@ public class SysMgtService {
|
||||
return new NotiListResDto(ApiResponseCode.SUCCESS, notiListRes);
|
||||
}
|
||||
|
||||
public SetWorkStateResDto setWorkState(Object setWorkParam) {
|
||||
|
||||
logger.debug("setWorkParam={}",setWorkParam);
|
||||
|
||||
|
||||
return new SetWorkStateResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
|
||||
public class SetWorkStateResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
public SetWorkStateResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SetWorkStateResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user