From c15dda6b6013d42cd1cae1e66a632503af2d1f66 Mon Sep 17 00:00:00 2001 From: Lim Jonguk Date: Wed, 18 May 2022 01:21:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=8B=AC=EC=82=AC=EA=B2=B0=EA=B3=BC?= =?UTF-8?q?=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xit/biz/ctgy/dto/JudgeResultDto.java | 2 +- .../xit/biz/ctgy/dto/JudgeResultUserDto.java | 11 +++- .../service/IResidentAndDisabledService.java | 1 + .../impl/ResidentAndDisabledService.java | 51 +++++++++++++++++++ .../biz/ctgy/parking-mapper.xml | 33 +++++++----- .../biz/ctgy/residentanddisabled-mapper.xml | 20 ++++---- 6 files changed, 93 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/xit/biz/ctgy/dto/JudgeResultDto.java b/src/main/java/com/xit/biz/ctgy/dto/JudgeResultDto.java index afa1982..4737f28 100644 --- a/src/main/java/com/xit/biz/ctgy/dto/JudgeResultDto.java +++ b/src/main/java/com/xit/biz/ctgy/dto/JudgeResultDto.java @@ -30,7 +30,7 @@ public class JudgeResultDto { @Schema(required = false, title = "결과코드", example = " ", description = "Input Description...") private String msResult; - List judgeResultUserDtoList; + List judgeResultUsers; // @Schema(required = true, title = "차수", example = " ", description = "Input Description...") // private Long msChasu; diff --git a/src/main/java/com/xit/biz/ctgy/dto/JudgeResultUserDto.java b/src/main/java/com/xit/biz/ctgy/dto/JudgeResultUserDto.java index eb8c5b8..5fc7312 100644 --- a/src/main/java/com/xit/biz/ctgy/dto/JudgeResultUserDto.java +++ b/src/main/java/com/xit/biz/ctgy/dto/JudgeResultUserDto.java @@ -8,6 +8,7 @@ import lombok.NoArgsConstructor; import lombok.Setter; import org.apache.ibatis.type.Alias; +import javax.persistence.Column; import java.time.LocalDate; @Schema(name = "JudgeResultUserDto", description = "심사결과사용자") @@ -17,13 +18,21 @@ import java.time.LocalDate; @NoArgsConstructor public class JudgeResultUserDto { + @Schema(required = true, title = "민원심사사용자매핑코드", example = " ", description = "Input Description...") + private Long msuCode; + @Schema(required = true, title = "민원코드", example = " ", description = "민원코드") private Long msuMaincode; + @Schema(required = true, title = "민원심사사용자코드", example = " ", description = "Input Description...") + private String msuUserid; + @Schema(required = false, title = "결과코드", example = " ", description = "Input Description...") private String msuResult; + @Schema(required = true, title = "팀코드", example = " ", description = "Input Description...") + private String msuTeam; + @Schema(required = false, title = "단속시간", example = " ", description = "Input Description...") private String name; - } diff --git a/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java index 485e360..bd2977a 100644 --- a/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java @@ -61,6 +61,7 @@ public interface IResidentAndDisabledService { * @return Map */ Map findJudgeResults(final JudgeListDto dto); + Map findJudgeResults2(final JudgeListDto dto); /** * 거주자 / 장애인 심의대상 목록 조회 diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java index da583f2..29b106b 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java @@ -240,6 +240,57 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { return resultMap; } + @Override + @Transactional(readOnly = true) + public Map findJudgeResults2(JudgeListDto dto) { + Map resultMap = new HashMap<>(); + + // team && 팀별 부과현황 조회 : 팀이 선택되지 않은 경우 모두 +// Map teamMap = residentAndDisabledMapper.selectTotJudgeResultGroupByTeamAndChasu(dto); +// if (Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND); +// List> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto); +// totJudgeUserList.add(teamMap); + + List> teamList = residentAndDisabledMapper.selectJudgeTeamGroupByChasuAndTeamList(dto); + if (Checks.isEmpty(teamList) || teamList.size() == 0) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND); + + // 차수별 심사자별 심사결과 합산 + dto.setMsuTeam(String.valueOf(teamList.get(0).get("msuTeam"))); + List> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto); + totJudgeUserList.add(teamList.get(0)); + + // 심사대상 차량 목록 + List> judgeCarList = residentAndDisabledMapper.selectJudgeResultGroupByCarnum(dto); + + // 차량별 심사자 심사결과 목록 + Map paramMap = new HashMap<>(); + paramMap.put("msDatagb", dto.getMsDatagb()); + paramMap.put("msChasu", dto.getMsChasu()); + paramMap.put("msSdate", dto.getMsSdate()); + paramMap.put("msEdate", dto.getMsEdate()); + paramMap.put("msuTeam", dto.getMsuTeam()); + + paramMap.put("seqList", judgeCarList.stream().map(m -> m.get("msSeq")).collect(Collectors.toList())); + paramMap.put("carnumList", judgeCarList.stream().map(m -> m.get("msCarnum")).collect(Collectors.toList())); + List> jurgeUserList = residentAndDisabledMapper.selectJudgeResultList(paramMap); + +// List> resultList = judgeCarList.stream().peek((m) -> { +// paramMap.put("msSeq", m.get("msSeq")); +// paramMap.put("msCarnum", m.get("msCarnum")); +// m.put("simsa", residentAndDisabledMapper.selectJudgeResultList(paramMap)); +// }).collect(Collectors.toList()); + + + resultMap.put("teamList", teamList); + // 차수별 심사자별 심사결과 합산 + resultMap.put("totJudgeUserData", totJudgeUserList); + // 심사대상 차량 목록 + resultMap.put("judgeCarData", judgeCarList); + // 차량별 심사자 심사결과 목록 + resultMap.put("judgeUserData", jurgeUserList); + return resultMap; + } + /** * 심사자료 삭제 * 1. 삭제 대상 조회 : min_simsa680_sc 테이블 : ms_datagb, ms_chasu, ms_sdate, ms_edate 조건으로 ms_maincode 삭제 대상 조회 diff --git a/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml b/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml index dbb4f41..951ad85 100644 --- a/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml +++ b/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml @@ -46,7 +46,13 @@ @@ -96,8 +102,8 @@ , min_userinfo MU WHERE MS.ms_maincode = MSU.msu_maincode AND MS.ms_chasu = #{msChasu} - AND MS.ms_sdate >= #{msSdate} - AND MS.ms_edate <= #{msEdate} + AND MS.ms_sdate = #{msSdate} + AND MS.ms_edate = #{msEdate} AND MSU.msu_userid = MU.userid AND MSU.msu_team = #{msuTeam} @@ -115,12 +121,13 @@ , min_simsa_user680 MSU WHERE MS.ms_maincode = MSU.msu_maincode AND MS.ms_chasu = #{msChasu} - AND MS.ms_sdate >= #{msSdate} - AND MS.ms_edate <= #{msEdate} + AND MS.ms_sdate = #{msSdate} + AND MS.ms_edate = #{msEdate} AND MSU.msu_team = #{msuTeam} GROUP BY MS.ms_maincode, MS.ms_seq, MS.ms_carnum + ORDER BY MS.ms_maincode, MS.ms_seq, MS.ms_carnum + + - - + + diff --git a/src/test/java/com/xit/core/JasyptApplicationTests.java b/src/test/java/com/xit/core/JasyptApplicationTests.java new file mode 100644 index 0000000..bd61890 --- /dev/null +++ b/src/test/java/com/xit/core/JasyptApplicationTests.java @@ -0,0 +1,36 @@ +package com.xit.core; + +import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest +@ActiveProfiles(value="dev") +class JasyptApplicationTests { + + @Test + void contextLoads() { + } + + @Test + void jasypt() { + String url = "jdbc:oracle:thin:@211.119.124.118:1521:bustms"; + String username = "traffic"; + String password = "xhdgkq0"; + + System.out.println(jasyptEncoding(url)); + System.out.println(jasyptEncoding(username)); + System.out.println(jasyptEncoding(password)); + } + + public String jasyptEncoding(String value) { + + String key = "xit_jasypt_key"; + StandardPBEStringEncryptor pbeEnc = new StandardPBEStringEncryptor(); + pbeEnc.setAlgorithm("PBEWithMD5AndDES"); + pbeEnc.setPassword(key); + return pbeEnc.encrypt(value); + } + +} \ No newline at end of file From 02948de6622dbcd4e5307ffbdaf48e8db0104e59 Mon Sep 17 00:00:00 2001 From: Lim Jonguk Date: Tue, 24 May 2022 23:26:20 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=EC=84=A4=EC=A0=95=EA=B0=92=20?= =?UTF-8?q?=EC=95=94=ED=98=B8=ED=99=94=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logback-spring.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 492e05a..277f9b2 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -4,12 +4,12 @@ - - + + - - + +