fix: 심사결과 반영

dev
minuk926 3 years ago
parent 82ea5cda78
commit 00694c3572

@ -53,19 +53,19 @@ public class ParkingController {
return RestResponse.of(service.findParkings(dto, pageable)); return RestResponse.of(service.findParkings(dto, pageable));
} }
@Operation(summary = "주정차 의견진술 심의 목록-상세" , description = "주정차 의견진술 심의 목록-상세") @Operation(summary = "주정차 의견진술 심의 결과" , description = "주정차 의견진술 심의 결과")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-01-04"), @Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-01-04"),
@Parameter(in = ParameterIn.QUERY, name = "msEdate", description = "심사종료일", required = true, example = "2021-01-05"), @Parameter(in = ParameterIn.QUERY, name = "msEdate", description = "심사종료일", required = true, example = "2021-01-05"),
@Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = false, example = "3"), @Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = false, example = "3"),
@Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = true, example = "002") @Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = true, example = "002")
}) })
@GetMapping(value="/detail", produces = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value="/result", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findParkingDetails( public ResponseEntity<? extends IRestResponse> findParkingResults(
@Valid @Valid
@Parameter(hidden = true) @Parameter(hidden = true)
final JudgeListDto dto) { final JudgeListDto dto) {
return RestResponse.of(service.findParkingDetails(dto)); return RestResponse.of(service.findParkingResults(dto));
} }
@Operation(summary = "주정차 의견진술 심의대상 조회" , description = "주정차 의견진술 심의대상 조회") @Operation(summary = "주정차 의견진술 심의대상 조회" , description = "주정차 의견진술 심의대상 조회")

@ -128,7 +128,7 @@ public class ResidentAndDisabledController {
return RestResponse.of(service.findJudges(dto, pageable)); return RestResponse.of(service.findJudges(dto, pageable));
} }
@Operation(summary = "거주자/장애인 의견진술 심의등록 상세 목록" , description = "거주자/장애인 의견진술 심의등록 상세 목록") @Operation(summary = "거주자/장애인 의견진술 심의 결과 목록" , description = "거주자/장애인 의견진술 심의 결과 목록")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"), @Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
@Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-09-10"), @Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-09-10"),
@ -136,13 +136,13 @@ public class ResidentAndDisabledController {
@Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = true, example = "12"), @Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = true, example = "12"),
@Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = false, example = "003") @Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = false, example = "003")
}) })
@GetMapping(value="/detail", produces = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value="/result", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findJudgeDetails( public ResponseEntity<? extends IRestResponse> findJudgeResults(
@Valid @Valid
@Parameter(hidden = true) @Parameter(hidden = true)
final JudgeListDto dto) { final JudgeListDto dto) {
AssertUtils.isTrue(!Checks.isEmpty(dto), "필수 검색 조건이 입력되지 않았습니다."); AssertUtils.isTrue(!Checks.isEmpty(dto), "필수 검색 조건이 입력되지 않았습니다.");
return RestResponse.of(service.findJudgeDetails(dto)); return RestResponse.of(service.findJudgeResults(dto));
} }
} }

@ -5,7 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.sql.Date;
import java.time.LocalDate; import java.time.LocalDate;
@Schema(name = "JudgeListDto", description = "심의목록 조회: 주정차/거주자/장애인") @Schema(name = "JudgeListDto", description = "심의목록 조회: 주정차/거주자/장애인")
@ -40,5 +39,6 @@ public class JudgeListDto {
@Schema(title = "데이타구분", example = "1", description = "데이타구분: 1-거주자,2-장애인") @Schema(title = "데이타구분", example = "1", description = "데이타구분: 1-거주자,2-장애인")
private String msDatagb; private String msDatagb;
@Schema(title = "심사팀코드", example = " ", description = "심사팀코드")
private String msuTeam; private String msuTeam;
} }

@ -17,26 +17,33 @@ public interface IParkingMapper {
* @param dto JudgeListDto * @param dto JudgeListDto
* @return Map * @return Map
*/ */
Map<String,Object> selectTotByParkingJurgeTeamAndChasu(JudgeListDto dto); Map<String,Object> selectTotParkingJudgeResultGroupByTeamAndChasu(JudgeListDto dto);
/**
*
* @param dto JudgeListDto
* @return List<Map<String,Object>
*/
List<Map<String,Object>> selectParkingJudgeTeamGroupByChasuAndTeamList(JudgeListDto dto);
/** /**
* && * &&
* @param dto JudgeListDto * @param dto JudgeListDto
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectTotParkingUsersByJudgeTeamAndChasu(JudgeListDto dto); List<Map<String,Object>> selectTotParkingJudgeResultGroupByUser(JudgeListDto dto);
/** /**
* *
* @param dto JudgeListDto * @param dto JudgeListDto
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectParkingJurgeTargetByCarnum(JudgeListDto dto); List<Map<String,Object>> selectParkingJurgeResultGroupByCarnum(JudgeListDto dto);
/** /**
* *
* @param map Map * @param map Map
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectParkingJudgeResultByCarnum(Map<String,Object> map); List<Map<String,Object>> selectParkingJudgeResultList(Map<String,Object> map);
} }

@ -2,11 +2,8 @@ package com.xit.biz.ctgy.mapper;
import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.core.support.CamelCaseMap;
import org.apache.commons.collections4.map.LinkedMap;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -20,26 +17,33 @@ public interface IResidentAndDisabledMapper {
* @param dto JudgeListDto * @param dto JudgeListDto
* @return Map * @return Map
*/ */
Map<String,Object> selectTotByJudgeTeamAndChasu(JudgeListDto dto); Map<String,Object> selectTotJudgeResultGroupByTeamAndChasu(JudgeListDto dto);
/**
*
* @param dto JudgeListDto
* @return List<Map<String,Object>
*/
List<Map<String,Object>> selectJudgeTeamGroupByChasuAndTeamList(JudgeListDto dto);
/** /**
* && * &&
* @param dto JudgeListDto * @param dto JudgeListDto
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectTotJudgeUsersByJudgeTeamAndChasu(JudgeListDto dto); List<Map<String,Object>> selectTotJudgeResultGroupByUser(JudgeListDto dto);
/** /**
* *
* @param dto JudgeListDto * @param dto JudgeListDto
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectJudgeTargetByCarnum(JudgeListDto dto); List<Map<String,Object>> selectJudgeResultGroupByCarnum(JudgeListDto dto);
/** /**
* *
* @param map Map * @param map Map
* @return List<Map> * @return List<Map>
*/ */
List<Map<String,Object>> selectJudgeResultByCarnum(Map<String,Object> map); List<Map<String,Object>> selectJudgeResultList(Map<String,Object> map);
} }

@ -68,6 +68,7 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
gnRecallSc.scIngb, gnRecallSc.scIngb,
gnRecallSc.scDatagb, gnRecallSc.scDatagb,
gnRecallSc.scCdate, gnRecallSc.scCdate,
gnRecallSc.scState,
ExpressionUtils.as( ExpressionUtils.as(
JPAExpressions.select(cmmCodeS.codeNm) JPAExpressions.select(cmmCodeS.codeNm)
.from(cmmCodeS) .from(cmmCodeS)

@ -13,11 +13,11 @@ public interface IParkingService {
Page<JudgeListDto> findParkings(final JudgeListDto dto, Pageable pageable); Page<JudgeListDto> findParkings(final JudgeListDto dto, Pageable pageable);
/** /**
* *
* @param dto JudgeListDto * @param dto JudgeListDto
* @return Map * @return Map
*/ */
Map<String,Object> findParkingDetails(final JudgeListDto dto); Map<String,Object> findParkingResults(final JudgeListDto dto);
List<ParkingTargetDto> findParkingJudgeTargets(final ParkingTargetDto dto) ; List<ParkingTargetDto> findParkingJudgeTargets(final ParkingTargetDto dto) ;

@ -1,13 +1,10 @@
package com.xit.biz.ctgy.service; package com.xit.biz.ctgy.service;
import com.xit.biz.ctgy.dto.GnRecallScDto; import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeDetailDto;
import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@ -54,11 +51,11 @@ public interface IResidentAndDisabledService {
Page<JudgeListDto> findJudges(JudgeListDto dto, Pageable pageable); Page<JudgeListDto> findJudges(JudgeListDto dto, Pageable pageable);
/** /**
* / * /
* @param dto JudgeListDto * @param dto JudgeListDto
* @return Map * @return Map
*/ */
Map<String,Object> findJudgeDetails(final JudgeListDto dto); Map<String,Object> findJudgeResults(final JudgeListDto dto);
/** /**
* / * /

@ -54,18 +54,22 @@ public class ParkingService implements IParkingService {
} }
@Override @Override
public Map<String,Object> findParkingDetails(JudgeListDto dto) { public Map<String,Object> findParkingResults(JudgeListDto dto) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
// team && 팀별 부과현황 조회 // team && 팀별 부과현황 조회 : 팀이 선택되지 않은 경우 모두
Map<String, Object> teamMap = mapper.selectTotByParkingJurgeTeamAndChasu(dto); // Map<String, Object> teamMap = mapper.selectTotParkingJudgeResultGroupByTeamAndChasu(dto);
if(Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND); // if (Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
dto.setMsuTeam(String.valueOf(teamMap.get("msuTeam"))); // List<Map<String, Object>> totJudgeUserList = mapper.selectTotParkingJudgeResultGroupByUser(dto);
// totJudgeUserList.add(teamMap);
List<Map<String, Object>> totJudgeUserList = mapper.selectTotParkingUsersByJudgeTeamAndChasu(dto); List<Map<String, Object>> teamList = mapper.selectParkingJudgeTeamGroupByChasuAndTeamList(dto);
totJudgeUserList.add(teamMap); if (Checks.isEmpty(teamList) || teamList.size() == 0) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
dto.setMsuTeam(String.valueOf(teamList.get(0).get("msuTeam")));
List<Map<String, Object>> totJudgeUserList = mapper.selectTotParkingJudgeResultGroupByUser(dto);
totJudgeUserList.add(teamList.get(0));
List<Map<String,Object>> judgeCarList = mapper.selectParkingJurgeTargetByCarnum(dto); List<Map<String,Object>> judgeCarList = mapper.selectParkingJurgeResultGroupByCarnum(dto);
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("msDatagb", dto.getMsDatagb()); paramMap.put("msDatagb", dto.getMsDatagb());
paramMap.put("msChasu", dto.getMsChasu()); paramMap.put("msChasu", dto.getMsChasu());
@ -76,7 +80,7 @@ public class ParkingService implements IParkingService {
List<Map<String,Object>> resultList = judgeCarList.stream().peek((m) -> { List<Map<String,Object>> resultList = judgeCarList.stream().peek((m) -> {
paramMap.put("msSeq", m.get("msSeq")); paramMap.put("msSeq", m.get("msSeq"));
paramMap.put("msCarnum", m.get("msCarnum")); paramMap.put("msCarnum", m.get("msCarnum"));
m.put("simsa", mapper.selectParkingJudgeResultByCarnum(paramMap)); m.put("simsa", mapper.selectParkingJudgeResultList(paramMap));
// Map<String,Object> usersMap = mapper.selectJudgeResultByCarnum(paramMap) // Map<String,Object> usersMap = mapper.selectJudgeResultByCarnum(paramMap)
// .stream() // .stream()
// .reduce((preMap, curMap) -> { // .reduce((preMap, curMap) -> {

@ -60,7 +60,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
private final IMinUserRepository userRepository; private final IMinUserRepository userRepository;
private final IJudgeUserRepository judgeUserRepository; private final IJudgeUserRepository judgeUserRepository;
private final IResidentAndDisabledMapper mapper; private final IResidentAndDisabledMapper residentAndDisabledMapper;
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
@ -140,7 +140,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
dto.setMsResult("0"); dto.setMsResult("0");
isFirst = false; isFirst = false;
} }
mapper.insertJudgeTargetIntoSelect(dto); residentAndDisabledMapper.insertJudgeTargetIntoSelect(dto);
//--------------------------------------------------------- //---------------------------------------------------------
// 등록한 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수 // 등록한 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수
@ -180,18 +180,22 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
} }
@Override @Override
public Map<String,Object> findJudgeDetails(JudgeListDto dto) { public Map<String,Object> findJudgeResults(JudgeListDto dto) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
// team && 팀별 부과현황 조회 // team && 팀별 부과현황 조회 : 팀이 선택되지 않은 경우 모두
Map<String, Object> teamMap = mapper.selectTotByJudgeTeamAndChasu(dto); // Map<String, Object> teamMap = residentAndDisabledMapper.selectTotJudgeResultGroupByTeamAndChasu(dto);
if(Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND); // if (Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
dto.setMsuTeam(String.valueOf(teamMap.get("msuTeam"))); // List<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
// totJudgeUserList.add(teamMap);
List<Map<String, Object>> totJudgeUserList = mapper.selectTotJudgeUsersByJudgeTeamAndChasu(dto); List<Map<String, Object>> teamList = residentAndDisabledMapper.selectJudgeTeamGroupByChasuAndTeamList(dto);
totJudgeUserList.add(teamMap); if (Checks.isEmpty(teamList) || teamList.size() == 0) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
dto.setMsuTeam(String.valueOf(teamList.get(0).get("msuTeam")));
List<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
totJudgeUserList.add(teamList.get(0));
List<Map<String,Object>> judgeCarList = mapper.selectJudgeTargetByCarnum(dto); List<Map<String,Object>> judgeCarList = residentAndDisabledMapper.selectJudgeResultGroupByCarnum(dto);
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("msDatagb", dto.getMsDatagb()); paramMap.put("msDatagb", dto.getMsDatagb());
paramMap.put("msChasu", dto.getMsChasu()); paramMap.put("msChasu", dto.getMsChasu());
@ -202,7 +206,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
List<Map<String,Object>> resultList = judgeCarList.stream().peek((m) -> { List<Map<String,Object>> resultList = judgeCarList.stream().peek((m) -> {
paramMap.put("msSeq", m.get("msSeq")); paramMap.put("msSeq", m.get("msSeq"));
paramMap.put("msCarnum", m.get("msCarnum")); paramMap.put("msCarnum", m.get("msCarnum"));
m.put("simsa", mapper.selectJudgeResultByCarnum(paramMap)); m.put("simsa", residentAndDisabledMapper.selectJudgeResultList(paramMap));
// Map<String,Object> usersMap = mapper.selectJudgeResultByCarnum(paramMap) // Map<String,Object> usersMap = mapper.selectJudgeResultByCarnum(paramMap)
// .stream() // .stream()
// .reduce((preMap, curMap) -> { // .reduce((preMap, curMap) -> {

@ -42,8 +42,27 @@
on TJ.mj_dong = TD.do_code on TJ.mj_dong = TD.do_code
</insert> </insert>
<select id="selectTotByParkingJurgeTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectTotParkingJudgeResultGroupByTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* parking-mapper|selectTotByParkingJurgeTeamAndChasu|julim */ /* parking-mapper|selectTotParkingJudgeResultGroupByTeamAndChasu|julim */
SELECT NVL(SUM(DECODE(MS.ms_result, '2', 1, 0)), 0) bu
, 0 as seo
, NVL(SUM(DECODE(MS.ms_result, '1', 1, 0)), 0) mibu
, NVL(SUM(DECODE(MS.ms_result, '1', 1, '2', 1, 0)), 0) tot
, '결과' as name
FROM min_simsa680 MS,
msu680_view MV
WHERE MS.ms_maincode = MV.msu_maincode
<if test='msuTeam != null and msuTeam != ""'>
AND MV.msu_team = #{msuTeam}
</if>
AND MS.ms_chasu = #{msChasu}
AND MS.ms_sdate &gt;= #{msSdate}
AND MS.ms_edate &lt;= #{msEdate}
GROUP BY MS.ms_chasu
</select>
<select id="selectParkingJudgeTeamGroupByChasuAndTeamList" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* parking-mapper|selectParkingJudgeTeamGroupByChasuAndTeamList|julim */
SELECT MV.msu_team SELECT MV.msu_team
, NVL(SUM(DECODE(MS.ms_result, '2', 1, 0)), 0) bu , NVL(SUM(DECODE(MS.ms_result, '2', 1, 0)), 0) bu
, 0 as seo , 0 as seo
@ -59,11 +78,12 @@
AND MS.ms_chasu = #{msChasu} AND MS.ms_chasu = #{msChasu}
AND MS.ms_sdate &gt;= #{msSdate} AND MS.ms_sdate &gt;= #{msSdate}
AND MS.ms_edate &lt;= #{msEdate} AND MS.ms_edate &lt;= #{msEdate}
GROUP BY MV.msu_team, MS.ms_chasu GROUP BY MS.ms_chasu, MV.msu_team
ORDER BY MS.ms_chasu, MV.msu_team
</select> </select>
<select id="selectTotParkingUsersByJudgeTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectTotParkingJudgeResultGroupByUser" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* parking-mapper|selectTotParkingUsersByJudgeTeamAndChasu|julim */ /* parking-mapper|selectTotParkingJudgeResultByUser|julim */
SELECT SUM(DECODE(MSU_RESULT, '2', 1, 0)) bu SELECT SUM(DECODE(MSU_RESULT, '2', 1, 0)) bu
, 0 as seo , 0 as seo
, SUM(DECODE(MSU_RESULT, '1', 1, 0)) mibu , SUM(DECODE(MSU_RESULT, '1', 1, 0)) mibu
@ -76,14 +96,16 @@
AND MS.ms_chasu = #{msChasu} AND MS.ms_chasu = #{msChasu}
AND MS.ms_sdate &gt;= #{msSdate} AND MS.ms_sdate &gt;= #{msSdate}
AND MS.ms_edate &lt;= #{msEdate} AND MS.ms_edate &lt;= #{msEdate}
AND MSU.msu_team = #{msuTeam}
AND MSU.msu_userid = MU.userid AND MSU.msu_userid = MU.userid
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam}
</if>
GROUP BY MSU.msu_userid, MU.name GROUP BY MSU.msu_userid, MU.name
ORDER BY MSU.msu_userid, MU.name ORDER BY MSU.msu_userid, MU.name
</select> </select>
<select id="selectParkingJurgeTargetByCarnum" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectParkingJurgeResultGroupByCarnum" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* parking-mapper|selectParkingJurgeTargetByCarnum|julim */ /* parking-mapper|selectParkingJurgeResultGroupByCarnum|julim */
SELECT MS.ms_maincode SELECT MS.ms_maincode
, MS.ms_seq , MS.ms_seq
, MS.ms_carnum , MS.ms_carnum
@ -93,12 +115,14 @@
AND MS.ms_chasu = #{msChasu} AND MS.ms_chasu = #{msChasu}
AND MS.ms_sdate &gt;= #{msSdate} AND MS.ms_sdate &gt;= #{msSdate}
AND MS.ms_edate &lt;= #{msEdate} AND MS.ms_edate &lt;= #{msEdate}
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam} AND MSU.msu_team = #{msuTeam}
</if>
GROUP BY MS.ms_maincode, MS.ms_seq, MS.ms_carnum GROUP BY MS.ms_maincode, MS.ms_seq, MS.ms_carnum
</select> </select>
<select id="selectParkingJudgeResultByCarnum" parameterType="map" resultType="camelCaseLinkedMap"> <select id="selectParkingJudgeResultList" parameterType="map" resultType="camelCaseLinkedMap">
/* parking-mapper|selectParkingJudgeResultByCarnum|julim */ /* parking-mapper|selectParkingJudgeResultList|julim */
SELECT MS.ms_maincode SELECT MS.ms_maincode
, MS.ms_seq , MS.ms_seq
, MS.ms_carnum , MS.ms_carnum
@ -124,7 +148,9 @@
AND MS.ms_edate &lt;= #{msEdate} AND MS.ms_edate &lt;= #{msEdate}
AND MS.ms_seq = #{msSeq} AND MS.ms_seq = #{msSeq}
AND MS.ms_carnum = #{msCarnum} AND MS.ms_carnum = #{msCarnum}
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam} AND MSU.msu_team = #{msuTeam}
</if>
AND MSU.msu_userid = MU.userid AND MSU.msu_userid = MU.userid
ORDER BY MSU.msu_userid, MU.name ORDER BY MSU.msu_userid, MU.name
</select> </select>

@ -40,9 +40,14 @@
where sc_code = #{scCode} where sc_code = #{scCode}
</insert> </insert>
<select id="selectTotByJudgeTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectTotJudgeResultGroupByTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* residentanddisabled-mapper|selectTotByJudgeTeamAndChasu|julim */ /* residentanddisabled-mapper|selectTotJudgeResultGroupByTeamAndChasu|julim */
SELECT MSV.msu_team SELECT <if test='msuTeam != null and msuTeam != ""'>
MSV.msu_team
</if>
<if test='msuTeam == null or msuTeam == ""'>
''
</if>
, NVL(SUM(DECODE(MSS.ms_result, '2', 1, 0)), 0) bu , NVL(SUM(DECODE(MSS.ms_result, '2', 1, 0)), 0) bu
, 0 as seo , 0 as seo
, NVL(SUM(DECODE(MSS.ms_result, '1', 1, 0)), 0) mibu , NVL(SUM(DECODE(MSS.ms_result, '1', 1, 0)), 0) mibu
@ -61,8 +66,29 @@
GROUP BY MSV.msu_team, MSS.ms_chasu GROUP BY MSV.msu_team, MSS.ms_chasu
</select> </select>
<select id="selectTotJudgeUsersByJudgeTeamAndChasu" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectJudgeTeamGroupByChasuAndTeamList" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* residentanddisabled-mapper|selectTotJudgeUsersByJudgeTeamAndChasu|julim */ /* residentanddisabled-mapper|selectJudgeTeamGroupByChasuAndTeamList|julim */
SELECT MSV.msu_team
, NVL(SUM(DECODE(MSS.ms_result, '2', 1, 0)), 0) bu
, 0 as seo
, NVL(SUM(DECODE(MSS.ms_result, '1', 1, 0)), 0) mibu
, NVL(SUM(DECODE(MSS.ms_result, '1', 1, '2', 1, 0)), 0) tot
, '결과' as name
FROM min_simsa680_sc MSS,
msu680_sc_view MSV
WHERE MSS.ms_maincode = MSV.msu_maincode
<if test='msuTeam != null and msuTeam != ""'>
AND MSV.msu_team = #{msuTeam}
</if>
AND MSS.ms_chasu = #{msChasu}
AND MSS.ms_sdate &gt;= #{msSdate}
AND MSS.ms_edate &lt;= #{msEdate}
GROUP BY MSS.ms_chasu, MSV.msu_team
ORDER BY MSS.ms_chasu, MSV.msu_team
</select>
<select id="selectTotJudgeResultGroupByUser" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* residentanddisabled-mapper|selectTotJudgeResultGroupByUser|julim */
SELECT SUM(DECODE(MSU_RESULT, '2', 1, 0)) bu SELECT SUM(DECODE(MSU_RESULT, '2', 1, 0)) bu
, 0 as seo , 0 as seo
, SUM(DECODE(MSU_RESULT, '1', 1, 0)) mibu , SUM(DECODE(MSU_RESULT, '1', 1, 0)) mibu
@ -76,14 +102,16 @@
AND MSS.ms_chasu = #{msChasu} AND MSS.ms_chasu = #{msChasu}
AND MSS.ms_sdate &gt;= #{msSdate} AND MSS.ms_sdate &gt;= #{msSdate}
AND MSS.ms_edate &lt;= #{msEdate} AND MSS.ms_edate &lt;= #{msEdate}
AND MSU.msu_team = #{msuTeam}
AND MSU.msu_userid = MU.userid AND MSU.msu_userid = MU.userid
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam}
</if>
GROUP BY MSU.msu_userid, MU.name GROUP BY MSU.msu_userid, MU.name
ORDER BY MSU.msu_userid, MU.name ORDER BY MSU.msu_userid, MU.name
</select> </select>
<select id="selectJudgeTargetByCarnum" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap"> <select id="selectJudgeResultGroupByCarnum" parameterType="com.xit.biz.ctgy.dto.JudgeListDto" resultType="camelCaseLinkedMap">
/* residentanddisabled-mapper|selectJudgeTargetByCarnum|julim */ /* residentanddisabled-mapper|selectJudgeResultGroupByCarnum|julim */
SELECT MSS.ms_maincode SELECT MSS.ms_maincode
, MSS.ms_seq , MSS.ms_seq
, MSS.ms_carnum , MSS.ms_carnum
@ -94,12 +122,14 @@
AND MSS.ms_chasu = #{msChasu} AND MSS.ms_chasu = #{msChasu}
AND MSS.ms_sdate &gt;= #{msSdate} AND MSS.ms_sdate &gt;= #{msSdate}
AND MSS.ms_edate &lt;= #{msEdate} AND MSS.ms_edate &lt;= #{msEdate}
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam} AND MSU.msu_team = #{msuTeam}
</if>
GROUP BY MSS.ms_maincode, MSS.ms_seq, MSS.ms_carnum GROUP BY MSS.ms_maincode, MSS.ms_seq, MSS.ms_carnum
</select> </select>
<select id="selectJudgeResultByCarnum" parameterType="map" resultType="camelCaseLinkedMap"> <select id="selectJudgeResultList" parameterType="map" resultType="camelCaseLinkedMap">
/* residentanddisabled-mapper|selectJudgeResultByCarnum|julim */ /* residentanddisabled-mapper|selectJudgeResultList|julim */
SELECT MSS.ms_maincode SELECT MSS.ms_maincode
, MSS.ms_seq , MSS.ms_seq
, MSS.ms_carnum , MSS.ms_carnum
@ -126,7 +156,9 @@
AND MSS.ms_edate &lt;= #{msEdate} AND MSS.ms_edate &lt;= #{msEdate}
AND MSS.ms_seq = #{msSeq} AND MSS.ms_seq = #{msSeq}
AND MSS.ms_carnum = #{msCarnum} AND MSS.ms_carnum = #{msCarnum}
<if test='msuTeam != null and msuTeam != ""'>
AND MSU.msu_team = #{msuTeam} AND MSU.msu_team = #{msuTeam}
</if>
AND MSU.msu_userid = MU.userid AND MSU.msu_userid = MU.userid
ORDER BY MSU.msu_userid, MU.name ORDER BY MSU.msu_userid, MU.name
</select> </select>

Loading…
Cancel
Save