mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 17:41:29 +09:00
Merge branch '20230508_workState' into develop
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);
|
||||
}
|
||||
105
src/main/java/kr/co/uplus/ez/api/comm/FileServiceImpl.java
Normal file
105
src/main/java/kr/co/uplus/ez/api/comm/FileServiceImpl.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package kr.co.uplus.ez.api.comm;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import kr.co.uplus.ez.api.comm.FileService;
|
||||
|
||||
@Service
|
||||
public class FileServiceImpl implements FileService {
|
||||
// @Value("${spring.servlet.multipart.location}")
|
||||
private String uploadPath = "/efs/admin";
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
try {
|
||||
Files.createDirectories(Paths.get(uploadPath));
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("폴더 생성 실패");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void store(MultipartFile file) {
|
||||
try {
|
||||
if (file.isEmpty()) {
|
||||
throw new Exception("빈 파일입니다.");
|
||||
}
|
||||
|
||||
Path root = Paths.get(uploadPath);
|
||||
|
||||
if (!Files.exists(root)) {
|
||||
init();
|
||||
}
|
||||
|
||||
try (InputStream inputStream = file.getInputStream()) {
|
||||
Files.copy(inputStream, root.resolve(
|
||||
file.getOriginalFilename()), StandardCopyOption.REPLACE_EXISTING
|
||||
);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("파일을 저장할 수 없습니다. Error: " + e.getMessage());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("파일을 저장할 수 없습니다. Error: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<Path> loadAll() {
|
||||
try {
|
||||
Path root = Paths.get(uploadPath);
|
||||
return Files.walk(root, 1).filter(path -> !path.equals(root));
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("파일 읽기 실패", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path load(String filename) {
|
||||
return Paths.get(uploadPath).resolve(filename);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource loadAsResource(String filename) {
|
||||
try {
|
||||
Path file = load(filename);
|
||||
Resource resource = new UrlResource(file.toUri());
|
||||
|
||||
if (resource.exists() || resource.isReadable()) {
|
||||
return resource;
|
||||
|
||||
} else {
|
||||
throw new RuntimeException("파일을 읽을 수 없습니다. : " + filename);
|
||||
}
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
throw new RuntimeException("파일을 읽을 수 없습니다. : " + filename, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
FileSystemUtils.deleteRecursively(Paths.get(uploadPath).toFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFile(String filename) {
|
||||
FileSystemUtils.deleteRecursively(Paths.get(uploadPath + "\\" + filename).toFile());
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,6 @@ public class ChrgDetail implements Serializable{
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
@ApiModelProperty(example = "가입구분", name = "가입구분", dataType = "String")
|
||||
private String joinDiv;
|
||||
}
|
||||
|
||||
@@ -19,5 +19,6 @@ public class UserinInfo implements Serializable{
|
||||
private String userSttusCd;
|
||||
@ApiModelProperty(example = "이용자 유형 코드", name = "이용자 유형 코드", dataType = "String")
|
||||
private String userTpCd;
|
||||
|
||||
@ApiModelProperty(example = "가입구분", name = "가입구분", dataType = "String")
|
||||
private String joinDiv;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.components.WebClientRequestService;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import springfox.documentation.spring.web.json.Json;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
@@ -274,8 +275,8 @@ public class SysMgtController {
|
||||
|
||||
/**
|
||||
* data: 2022. 10.24.
|
||||
* auth: Lee minha
|
||||
* desc: 배치 리스트 조회
|
||||
* auth: Lee
|
||||
* desc: 배치 리스트 조회.
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "batchList", notes = "배치 리스트 조회")
|
||||
@@ -286,12 +287,11 @@ public class SysMgtController {
|
||||
}
|
||||
|
||||
/**
|
||||
* data : 2022. 10. 26
|
||||
* auth : Lee minha
|
||||
* desc : 배치 상세내용
|
||||
* date : 2022. 10. 26
|
||||
* auth : Lee
|
||||
* desc : 배치 상세내용.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "batchDetail", notes = "배치 상세내용")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "batchDetail", method = {RequestMethod.POST})
|
||||
@@ -299,16 +299,21 @@ public class SysMgtController {
|
||||
public BatchDetailResDto batchDetail(@RequestBody @Valid BatchDetailReqDto batchDetailReqDto,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new BatchDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
// batchDetailReqDto.setBatchId("BATCH_010");
|
||||
logger.debug("param 확인 : "+ batchDetailReqDto);
|
||||
return sysService.batchDetail(batchDetailReqDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 26
|
||||
* auth : Lee
|
||||
* @param batchReqMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "batchExecuteJob", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public BatchExeLogResDto batchExecuteJob(@RequestBody @Valid Map<Object, Object> batchReqMap) {
|
||||
@@ -324,35 +329,22 @@ public class SysMgtController {
|
||||
String dayBatch = "yyyyMMdd";
|
||||
String timeBatch = "yyyyMMddHHmmss";
|
||||
|
||||
|
||||
SimpleDateFormat monthDateFormat = new SimpleDateFormat(monthBatch);
|
||||
SimpleDateFormat dayDateFormat = new SimpleDateFormat(dayBatch);
|
||||
SimpleDateFormat timeDateFormat = new SimpleDateFormat(timeBatch);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
logger.info("callUrl={}",callUrl);
|
||||
String jobId = (String) batchReqMap.get("batchId");
|
||||
String batchType = (String) batchReqMap.get("batchType");
|
||||
String strDate = (String) batchReqMap.get("strDate");
|
||||
|
||||
logger.info("유입날짜 확인 {}",batchReqMap.get("strDate"));
|
||||
logger.info("batchExecuteJob input Date Check = {}",batchReqMap.get("strDate"));
|
||||
logger.debug("확인 batchType={}",batchType);
|
||||
|
||||
|
||||
|
||||
if(
|
||||
//월배치일 경우 날짜
|
||||
jobId.equals("BATCH_001")||
|
||||
jobId.equals("BATCH_002")||
|
||||
jobId.equals("BATCH_004")||
|
||||
jobId.equals("BATCH_005")||
|
||||
jobId.equals("BATCH_006")||
|
||||
jobId.equals("BATCH_009")||
|
||||
jobId.equals("BATCH_011")||
|
||||
jobId.equals("BATCH_017")||
|
||||
jobId.equals("BATCH_020")) {
|
||||
|
||||
|
||||
// 배치 타입 : 일배치, 월배치, 매시간
|
||||
if("월배치".equals(batchType)) {
|
||||
logger.debug("월배치 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd").parse(strDate);
|
||||
strDate = (String)monthDateFormat.format(date);
|
||||
@@ -360,32 +352,17 @@ public class SysMgtController {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (
|
||||
//일배치일 경우 날짜
|
||||
jobId.equals("BATCH_003")||
|
||||
jobId.equals("BATCH_008")||
|
||||
jobId.equals("BATCH_010")||
|
||||
jobId.equals("BATCH_012")||
|
||||
jobId.equals("BATCH_013")||
|
||||
jobId.equals("BATCH_014")||
|
||||
jobId.equals("BATCH_015")||
|
||||
jobId.equals("BATCH_018")||
|
||||
jobId.equals("BATCH_019")||
|
||||
jobId.equals("BATCH_021")||
|
||||
jobId.equals("BATCH_022")||
|
||||
jobId.equals("BATCH_023")){
|
||||
|
||||
}else if("일배치".equals(batchType)) {
|
||||
logger.debug("일배치 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd").parse(strDate);
|
||||
strDate = (String)dayDateFormat.format(date);
|
||||
} catch (ParseException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}else if("매시간".equals(batchType)) {
|
||||
logger.debug("매시간 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").parse(strDate);
|
||||
strDate = (String)timeDateFormat.format(date);
|
||||
@@ -394,7 +371,7 @@ public class SysMgtController {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
|
||||
jsonObject.put("strDate", strDate);
|
||||
@@ -449,4 +426,28 @@ public class SysMgtController {
|
||||
return sysService.notiList(notiListReqDto);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setWorkState", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public SetWorkStateResDto setWorkState(@RequestBody @Valid SetWorkStateReqDto setWorkParam, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SetWorkStateResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return sysService.setWorkState(setWorkParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* data: 2023. 05.09.
|
||||
* auth: won
|
||||
* desc: 서비스 점검 이력 조회
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "svcCheckList", notes = "서비스 점검 이력 조회")
|
||||
@RequestMapping(value = "/svcCheckList", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public SvcCheckListResDto svcCheckList(@RequestBody @Valid SvcCheckListReqDto svcCheckListReqDto) {
|
||||
return sysService.svcCheckLists(svcCheckListReqDto);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import kr.co.uplus.ez.api.comm.dto.BatchChkDto;
|
||||
import kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -56,4 +58,5 @@ public interface SysMgtMapper {
|
||||
public List<NotiList> notiListSelect(NotiListReqDto notiListReqDto);
|
||||
|
||||
int notiListSelectCnt(NotiListReqDto notiListReqDto);
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
@@ -14,13 +15,28 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SysMgtService {
|
||||
@@ -34,6 +50,15 @@ public class SysMgtService {
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
@Autowired
|
||||
FileService fileService;
|
||||
|
||||
// 파일위치
|
||||
@Value("${hubeasy_file_info.work-location}") private String dirWorkState;
|
||||
|
||||
// @Value("${spring.servlet.multipart.location}")
|
||||
private String uploadPath = "/efs/admin";
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
@@ -527,4 +552,195 @@ public class SysMgtService {
|
||||
}
|
||||
|
||||
|
||||
public SetWorkStateResDto setWorkState(SetWorkStateReqDto setWorkParam) {
|
||||
|
||||
File file = new File("C:\\efs\\home\\workState\\workStatefile.txt");
|
||||
File fileList = new File("C:\\efs\\admin\\workState\\workStatefile.txt");
|
||||
|
||||
String[] workParamArr = setWorkParam.getStartDate().split("-");
|
||||
|
||||
String year = "";
|
||||
String month = "";
|
||||
String day = "";
|
||||
|
||||
//1.파일 값 셋팅
|
||||
String setWorkState = "";
|
||||
|
||||
setWorkState += setWorkParam.getState() + "@";
|
||||
setWorkState += workParamArr[0] + "@";
|
||||
setWorkState += workParamArr[1] + "@";
|
||||
setWorkState += workParamArr[2] + "@";
|
||||
setWorkState += setWorkParam.getStartTimeT() + "@";
|
||||
setWorkState += setWorkParam.getStartTimeM() + "@";
|
||||
setWorkState += setWorkParam.getEndTimeT() + "@";
|
||||
setWorkState += setWorkParam.getEndTimeM();
|
||||
|
||||
|
||||
try {
|
||||
//1. workState 파일이 없다면? 만들어라
|
||||
if(!file.exists()) {
|
||||
file.createNewFile();
|
||||
}else if(!fileList.exists()) {
|
||||
fileList.createNewFile();
|
||||
}
|
||||
|
||||
//2. Buffer를 사용해서 File에 write할 수 있는 BufferedWriter 생성
|
||||
FileWriter fw = new FileWriter(file);
|
||||
BufferedWriter writer = new BufferedWriter(fw);
|
||||
|
||||
logger.debug("setWorkString={}",setWorkState);
|
||||
|
||||
//3. 파일에 쓰기
|
||||
writer.write(setWorkState);
|
||||
|
||||
//4. Buffer
|
||||
writer.close();
|
||||
|
||||
//5. admin파일에 저장
|
||||
|
||||
String workStateData = "";
|
||||
|
||||
Resource filethree = fileService.loadAsResource(dirWorkState);
|
||||
BufferedReader reader = new BufferedReader(new FileReader(filethree.getFile()));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
reader.close();
|
||||
|
||||
FileWriter fwList = new FileWriter(fileList);
|
||||
BufferedWriter writerList = new BufferedWriter(fwList);
|
||||
|
||||
workStateData = sb.toString();
|
||||
String[] Data = workStateData.split(",");
|
||||
|
||||
List<String> newList = new ArrayList<>();
|
||||
|
||||
if((Data[0].equals(""))==false) {
|
||||
for (String data : Data) {
|
||||
newList.add(data);
|
||||
}
|
||||
}
|
||||
newList.add(setWorkState);
|
||||
|
||||
for (String data : newList) {
|
||||
writerList.write(data+",\r\n");
|
||||
}
|
||||
|
||||
writerList.close();
|
||||
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.debug("setWorkParam={}",setWorkParam);
|
||||
|
||||
|
||||
|
||||
return new SetWorkStateResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* data: 2023. 05.09.
|
||||
* auth: won
|
||||
* desc: 서비스 점검 이력 조회
|
||||
* @return
|
||||
*/
|
||||
public SvcCheckListResDto svcCheckLists(@Valid SvcCheckListReqDto svcCheckListReqDto) {
|
||||
|
||||
String workStateData = "";
|
||||
String [] workStateDataArr = new String[7];
|
||||
log.info("getWorkStateCheck START ==========================================");
|
||||
|
||||
SvcCheckListRes svcCheckListRes = new SvcCheckListRes();
|
||||
List<SvcCheckList> CheckList = new ArrayList<SvcCheckList>();
|
||||
SvcCheckList svcCheckList = new SvcCheckList();
|
||||
|
||||
String nowPage = String.valueOf(svcCheckListReqDto.getPage());
|
||||
int totalCnt = 0;
|
||||
File fileList = new File("C:\\efs\\admin\\workState\\workStatefile.txt");
|
||||
|
||||
try {
|
||||
//파일 읽기
|
||||
Resource file = fileService.loadAsResource(dirWorkState);
|
||||
BufferedReader reader = new BufferedReader(new FileReader(file.getFile()));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
reader.close();
|
||||
|
||||
if(null != sb.toString() && !"".equals(sb.toString())) {
|
||||
workStateData = sb.toString();
|
||||
String[] Data = workStateData.split(",");
|
||||
|
||||
//항목 객체에 값 셋팅
|
||||
for (int i = 0; i < Data.length; i++) {
|
||||
svcCheckList = new SvcCheckList();
|
||||
workStateDataArr = Data[i].split("@");
|
||||
svcCheckList.setWorkState(workStateDataArr[0]);
|
||||
svcCheckList.setYear(workStateDataArr[1]);
|
||||
svcCheckList.setMonth(workStateDataArr[2]);
|
||||
svcCheckList.setDay(workStateDataArr[3]);
|
||||
svcCheckList.setStrtHour(workStateDataArr[4]);
|
||||
svcCheckList.setStrtMin(workStateDataArr[5]);
|
||||
svcCheckList.setEndHour(workStateDataArr[6]);
|
||||
svcCheckList.setEndMin(workStateDataArr[7]);
|
||||
|
||||
String Ymd = svcCheckList.getYear()+"-"+ svcCheckList.getMonth()+"-"+ svcCheckList.getDay();
|
||||
svcCheckList.setYmd(Ymd);
|
||||
String StrHd = svcCheckList.getStrtHour()+" : "+ svcCheckList.getStrtMin();
|
||||
svcCheckList.setStrHd(StrHd);
|
||||
String EndHd = svcCheckList.getEndHour()+" : "+ svcCheckList.getEndMin();
|
||||
svcCheckList.setEndHd(EndHd);
|
||||
// 리스트에 항목 추가
|
||||
CheckList.add(svcCheckList);
|
||||
}
|
||||
|
||||
svcCheckListRes.setList(CheckList);
|
||||
totalCnt = CheckList.size();
|
||||
int page = svcCheckListReqDto.getPage();
|
||||
int pagePerRows = svcCheckListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
svcCheckListReqDto.setPage(page);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if(!fileList.exists()) {
|
||||
log.debug("파일이 존재하지 않습니다.");
|
||||
}else {
|
||||
// 파일 읽기 실패 시 "USE"로 설정하고 결과 반환
|
||||
log.error("WORK STATE READ FAIL : {}",e.getMessage(), e);
|
||||
svcCheckList.setWorkState("USE");
|
||||
|
||||
String[] Data = workStateData.split(",");
|
||||
totalCnt = CheckList.size();
|
||||
int page = svcCheckListReqDto.getPage();
|
||||
int pagePerRows = svcCheckListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
svcCheckListReqDto.setPage(page);
|
||||
return new SvcCheckListResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (totalCnt == 0) {
|
||||
svcCheckListRes.setList(new ArrayList<>());
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
svcCheckListRes.setPaging(paging);
|
||||
|
||||
return new SvcCheckListResDto(ApiResponseCode.CM_NOT_FOUND, svcCheckListRes);
|
||||
}
|
||||
|
||||
|
||||
svcCheckListRes.setList(CheckList);
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
svcCheckListRes.setPaging(paging);
|
||||
|
||||
return new SvcCheckListResDto(ApiResponseCode.SUCCESS,svcCheckListRes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ public class BatchDetailReqDto implements Serializable{
|
||||
//배치 아이디
|
||||
private String batchId;
|
||||
|
||||
//배치명
|
||||
private String batchNm;
|
||||
|
||||
//배치 유형
|
||||
private String batchType;
|
||||
|
||||
//검색 시작일
|
||||
private String startDt;
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SetWorkStateReqDto {
|
||||
|
||||
String startDate;
|
||||
String startTimeT;
|
||||
String startTimeM;
|
||||
String endTimeT;
|
||||
String endTimeM;
|
||||
String state;
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SvcCheckList implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "상태변경", name = "상태변경", dataType = "String")
|
||||
private String workState;
|
||||
@ApiModelProperty(example = "년도", name = "년도", dataType = "String")
|
||||
private String year;
|
||||
@ApiModelProperty(example = "월", name = "월", dataType = "String")
|
||||
private String month;
|
||||
@ApiModelProperty(example = "날", name = "날", dataType = "String")
|
||||
private String day;
|
||||
@ApiModelProperty(example = "시작시각", name = "시작시각", dataType = "String")
|
||||
private String strtHour;
|
||||
@ApiModelProperty(example = "시작분", name = "시작분", dataType = "String")
|
||||
private String strtMin;
|
||||
@ApiModelProperty(example = "종료시각", name = "종료시각", dataType = "String")
|
||||
private String endHour;
|
||||
@ApiModelProperty(example = "종료분", name = "종료분", dataType = "String")
|
||||
private String endMin;
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String ymd;
|
||||
@ApiModelProperty(example = "시작시간", name = "시작시간", dataType = "String")
|
||||
private String strHd;
|
||||
@ApiModelProperty(example = "종료시간", name = "종료시간", dataType = "String")
|
||||
private String endHd;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SvcCheckListReqDto implements Serializable{
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SvcCheckListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<SvcCheckList> list;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SvcCheckListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private SvcCheckListRes data;
|
||||
|
||||
public SvcCheckListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SvcCheckListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SvcCheckListResDto(ApiResponseCode returnStr, SvcCheckListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,6 +28,14 @@ app.props:
|
||||
header: Authorization
|
||||
prefix: "Bearer "
|
||||
|
||||
# file
|
||||
hubeasy_file_info:
|
||||
send-message-location: /efs/home/sendMessage
|
||||
rsv-message-location: /efs/home/rsvMessage
|
||||
caller-id-location: /efs/home/callidDoc
|
||||
consult-location: /efs/home/consult
|
||||
work-location: /efs/admin/workState/workStatefile.txt
|
||||
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
|
||||
@@ -1253,9 +1253,11 @@
|
||||
, ecm.USE_YN
|
||||
, eci.BIZRNO
|
||||
, ecm.CHRG_SEQ
|
||||
, esi.JOIN_DIV
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = ecm.USER_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND ecm.CHRG_SEQ = #{chrgSeq}
|
||||
@@ -1285,6 +1287,7 @@
|
||||
, esu.USER_SEQ
|
||||
, esu.USER_STTUS_CD
|
||||
, esu.USER_TP_CD
|
||||
, esi.JOIN_DIV
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
|
||||
Reference in New Issue
Block a user