feat: dashboard 적용

dev
minuk926 2 years ago
parent 92df0c3c44
commit fcb79272ad

@ -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;
}

@ -1,5 +1,6 @@
package com.xit.biz.ctgy.mapper; 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.JudgeListDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto; import com.xit.biz.ctgy.dto.ParkingTargetDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -47,4 +48,6 @@ public interface IParkingMapper {
*/ */
List<Map<String,Object>> selectParkingJudgeResultList(Map<String,Object> map); List<Map<String,Object>> selectParkingJudgeResultList(Map<String,Object> map);
List<Map<String,Object>> selectParkingJudgeResultList2(Map<String,Object> map); List<Map<String,Object>> selectParkingJudgeResultList2(Map<String,Object> map);
List<DashboardJudgeListDto> selectDashboardJudgeList();
} }

@ -1,5 +1,6 @@
package com.xit.biz.ctgy.mapper; 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.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeResultDto; import com.xit.biz.ctgy.dto.JudgeResultDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.JudgeTargetDto;
@ -48,4 +49,6 @@ public interface IResidentAndDisabledMapper {
*/ */
List<Map<String,Object>> selectJudgeResultList(Map<String,Object> map); List<Map<String,Object>> selectJudgeResultList(Map<String,Object> map);
List<JudgeResultDto> selectJudgeResultList2(Map<String,Object> map); List<JudgeResultDto> selectJudgeResultList2(Map<String,Object> map);
List<DashboardJudgeListDto> selectDashboardJudgeList(String msDatagb);
} }

@ -8,6 +8,7 @@ import com.xit.biz.ctgy.dto.JudgeStdDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct; import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
import com.xit.biz.ctgy.entity.*; 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.mapper.IResidentAndDisabledMapper;
import com.xit.biz.ctgy.repository.*; import com.xit.biz.ctgy.repository.*;
import com.xit.biz.ctgy.service.IPublicBoardService; import com.xit.biz.ctgy.service.IPublicBoardService;
@ -65,6 +66,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
private final ICmmFileService fileService; private final ICmmFileService fileService;
private final IPublicBoardService pBoardService; private final IPublicBoardService pBoardService;
private final IParkingMapper parkingMapper;
private final EntityManager entityManager; private final EntityManager entityManager;
@ -350,6 +352,10 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
public Map<String,Object> findDashboard(){ public Map<String,Object> findDashboard(){
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
resultMap.put("pBoardList", pBoardService.findAll(MinInfoBoard680.builder().build(), PageRequest.of(0, 6))); 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; return resultMap;
} }

@ -172,6 +172,30 @@
AND MSU.msu_userid = MU.userid AND MSU.msu_userid = MU.userid
ORDER BY MSU.msu_userid, MU.name, MS.ms_maincode, MS.ms_seq, MS.ms_carnum ORDER BY MSU.msu_userid, MU.name, MS.ms_maincode, MS.ms_seq, MS.ms_carnum
</select> </select>
<select id="selectDashboardJudgeList" resultType="com.xit.biz.ctgy.dto.DashboardJudgeListDto">
/* parking-mapper|selectDashboardJudgeList|julim */
SELECT MS.ms_edate
, MSU.msu_team
, MU.name
, SUM(DECODE(MSU.msu_result, 0, 0, 1)) jcnt
, COUNT(*) tcnt
FROM min_simsa680 MS
, min_simsa_user680 MSU
, min_userinfo MU
, (SELECT *
FROM (SELECT ms_edate
FROM min_simsa680
ORDER BY ms_edate DESC)
WHERE ROWNUM = 1) T
WHERE MS.ms_maincode = MSU.msu_maincode
AND MSU.msu_userid = MU.userid
AND MS.ms_edate = T.ms_edate
GROUP BY MS.ms_edate, MSU.msu_team, MU.name
ORDER BY MSU.msu_team, MU.name
</select>
<!-- <!--
<select id="selectParkingJudgeResultList2" parameterType="map" resultType="camelCaseLinkedMap"> <select id="selectParkingJudgeResultList2" parameterType="map" resultType="camelCaseLinkedMap">
SELECT MS.ms_maincode SELECT MS.ms_maincode

@ -175,6 +175,33 @@
ORDER BY MSU.msu_userid, MU.name, MSS.ms_maincode, MSS.ms_seq, MSS.ms_carnum ORDER BY MSU.msu_userid, MU.name, MSS.ms_maincode, MSS.ms_seq, MSS.ms_carnum
</select> </select>
<select id="selectDashboardJudgeList" parameterType="string" resultType="com.xit.biz.ctgy.dto.DashboardJudgeListDto">
/* residentanddisabled-mapper|selectDashboardJudgeList|julim */
SELECT MS.ms_edate
, MSU.msu_team
, MU.name
, SUM(DECODE(MSU.msu_result, 0, 0, 1)) jcnt
, COUNT(*) tcnt
FROM min_simsa680_sc MS
, min_simsa_user680_sc MSU
, min_userinfo MU
, (SELECT *
FROM (SELECT ms_edate
FROM min_simsa680_sc
WHERE ms_datagb = #{msDatagb}
ORDER BY ms_edate DESC)
WHERE ROWNUM = 1) T
WHERE MS.MS_DATAGB = #{msDatagb}
AND MS.ms_maincode = MSU.msu_maincode
AND MSU.msu_userid = MU.userid
AND MS.ms_edate = T.ms_edate
GROUP BY MS.ms_edate, MSU.msu_team, MU.name
ORDER BY MSU.msu_team, MU.name
</select>
<!-- <!--
<resultMap id="judgeResult" type="com.xit.biz.ctgy.dto.JudgeResultDto"> <resultMap id="judgeResult" type="com.xit.biz.ctgy.dto.JudgeResultDto">
<result property="msMaincode" column="ms_maincode" /> <result property="msMaincode" column="ms_maincode" />

Loading…
Cancel
Save