From fcb79272ad1c226b151c5b18e974e40c0310fb35 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Tue, 31 May 2022 17:19:16 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20dashboard=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/ctgy/dto/DashboardJudgeListDto.java | 38 +++++++++++++++++++ .../xit/biz/ctgy/mapper/IParkingMapper.java | 3 ++ .../mapper/IResidentAndDisabledMapper.java | 3 ++ .../impl/ResidentAndDisabledService.java | 6 +++ .../biz/ctgy/parking-mapper.xml | 24 ++++++++++++ .../biz/ctgy/residentanddisabled-mapper.xml | 27 +++++++++++++ 6 files changed, 101 insertions(+) create mode 100644 src/main/java/com/xit/biz/ctgy/dto/DashboardJudgeListDto.java diff --git a/src/main/java/com/xit/biz/ctgy/dto/DashboardJudgeListDto.java b/src/main/java/com/xit/biz/ctgy/dto/DashboardJudgeListDto.java new file mode 100644 index 0000000..3982a78 --- /dev/null +++ b/src/main/java/com/xit/biz/ctgy/dto/DashboardJudgeListDto.java @@ -0,0 +1,38 @@ +package com.xit.biz.ctgy.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.validation.constraints.Size; +import java.time.LocalDate; + +@Schema(name = "DashboardJudgeListDto", description = "심사자심의통계대쉬보드") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DashboardJudgeListDto { + + @Schema(title = "심사종료일", example = "2022-03-23", description = "심사종료일") + @JsonFormat(pattern="yyyy-MM-dd") + private LocalDate msEdate; + + @Schema(title = "심사팀코드", example = " ", description = "심사팀코드") + private String msuTeam; + + @Schema(title = "심사자이름", example = " ", description = "심사자이름") + private String name; + + @Schema(title = "심사완료건수", example = " ", description = "심사완료건수") + private Long jcnt; + + @Schema(title = "심사대상건수", example = " ", description = "심사대상건수") + private Long tcnt; + + @Schema(title = "데이타구분", example = "1", description = "데이타구분: 1-거주자,2-장애인") + private String msDatagb; +} diff --git a/src/main/java/com/xit/biz/ctgy/mapper/IParkingMapper.java b/src/main/java/com/xit/biz/ctgy/mapper/IParkingMapper.java index 7ccb39c..f97055f 100644 --- a/src/main/java/com/xit/biz/ctgy/mapper/IParkingMapper.java +++ b/src/main/java/com/xit/biz/ctgy/mapper/IParkingMapper.java @@ -1,5 +1,6 @@ package com.xit.biz.ctgy.mapper; +import com.xit.biz.ctgy.dto.DashboardJudgeListDto; import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.ParkingTargetDto; import org.apache.ibatis.annotations.Mapper; @@ -47,4 +48,6 @@ public interface IParkingMapper { */ List> selectParkingJudgeResultList(Map map); List> selectParkingJudgeResultList2(Map map); + + List selectDashboardJudgeList(); } diff --git a/src/main/java/com/xit/biz/ctgy/mapper/IResidentAndDisabledMapper.java b/src/main/java/com/xit/biz/ctgy/mapper/IResidentAndDisabledMapper.java index 355a0a7..d5dcf23 100644 --- a/src/main/java/com/xit/biz/ctgy/mapper/IResidentAndDisabledMapper.java +++ b/src/main/java/com/xit/biz/ctgy/mapper/IResidentAndDisabledMapper.java @@ -1,5 +1,6 @@ package com.xit.biz.ctgy.mapper; +import com.xit.biz.ctgy.dto.DashboardJudgeListDto; import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.JudgeResultDto; import com.xit.biz.ctgy.dto.JudgeTargetDto; @@ -48,4 +49,6 @@ public interface IResidentAndDisabledMapper { */ List> selectJudgeResultList(Map map); List selectJudgeResultList2(Map map); + + List selectDashboardJudgeList(String msDatagb); } 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 d638203..b326e75 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 @@ -8,6 +8,7 @@ import com.xit.biz.ctgy.dto.JudgeStdDto; import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct; import com.xit.biz.ctgy.entity.*; +import com.xit.biz.ctgy.mapper.IParkingMapper; import com.xit.biz.ctgy.mapper.IResidentAndDisabledMapper; import com.xit.biz.ctgy.repository.*; import com.xit.biz.ctgy.service.IPublicBoardService; @@ -65,6 +66,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { private final ICmmFileService fileService; private final IPublicBoardService pBoardService; + private final IParkingMapper parkingMapper; private final EntityManager entityManager; @@ -350,6 +352,10 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { public Map findDashboard(){ Map resultMap = new HashMap<>(); resultMap.put("pBoardList", pBoardService.findAll(MinInfoBoard680.builder().build(), PageRequest.of(0, 6))); + resultMap.put("parkJudgeList", parkingMapper.selectDashboardJudgeList()); + resultMap.put("residentJudgeList", residentAndDisabledMapper.selectDashboardJudgeList(CtgyConstants.Judge.DATAGB_RESIDENT.getCode())); + resultMap.put("disabledJudgeList", residentAndDisabledMapper.selectDashboardJudgeList(CtgyConstants.Judge.DATAGB_DISABLED.getCode())); + return resultMap; } 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 951ad85..b5a4e97 100644 --- a/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml +++ b/src/main/resources/mybatis-mapper/biz/ctgy/parking-mapper.xml @@ -172,6 +172,30 @@ AND MSU.msu_userid = MU.userid ORDER BY MSU.msu_userid, MU.name, MS.ms_maincode, MS.ms_seq, MS.ms_carnum + + + +