|
|
|
@ -60,21 +60,17 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
private final GnRecallScMapstruct mapstruct = Mappers.getMapper(GnRecallScMapstruct.class);
|
|
|
|
|
private final IResidentAndDisabledRepository gnReacallRepository;
|
|
|
|
|
private final ResidentAndDisabledDao residentAndDisabledDao;
|
|
|
|
|
private final IMinUserRepository userRepository;
|
|
|
|
|
private final UserDao userDao;
|
|
|
|
|
private final IJudgeUserRepository judgeUserRepository;
|
|
|
|
|
|
|
|
|
|
private final IJudgeRepository judgeRepository;
|
|
|
|
|
private final IResidentAndDisabledMapper residentAndDisabledMapper;
|
|
|
|
|
|
|
|
|
|
private final IParkingRepository parkingRepository;
|
|
|
|
|
private final ParkingDao parkingDao;
|
|
|
|
|
|
|
|
|
|
private final ICmmFileService fileService;
|
|
|
|
|
private final IPublicBoardService pBoardService;
|
|
|
|
|
private final IParkingMapper parkingMapper;
|
|
|
|
|
|
|
|
|
|
private final EntityManager entityManager;
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
|
// 관리자
|
|
|
|
@ -198,7 +194,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
public Page<JudgeListDto> findJudges(JudgeListDto dto, Pageable pageable) {
|
|
|
|
|
|
|
|
|
|
pageable = JpaUtil.getPagingInfo(pageable);
|
|
|
|
|
return gnReacallRepository.findJudges(dto, pageable);
|
|
|
|
|
return residentAndDisabledDao.findJudges(dto, pageable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -212,16 +208,16 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
// List<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
// totJudgeUserList.add(teamMap);
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> teamList = residentAndDisabledMapper.selectJudgeTeamGroupByChasuAndTeamList(dto);
|
|
|
|
|
List<Map<String, Object>> teamList = residentAndDisabledDao.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<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
List<Map<String, Object>> totJudgeUserList = residentAndDisabledDao.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
totJudgeUserList.add(teamList.get(0));
|
|
|
|
|
|
|
|
|
|
// 심사대상 차량 목록
|
|
|
|
|
List<Map<String,Object>> judgeCarList = residentAndDisabledMapper.selectJudgeResultGroupByCarnum(dto);
|
|
|
|
|
List<Map<String,Object>> judgeCarList = residentAndDisabledDao.selectJudgeResultGroupByCarnum(dto);
|
|
|
|
|
|
|
|
|
|
// 차량별 심사자 심사결과 목록
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
@ -233,7 +229,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
|
|
|
|
|
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<Map<String,Object>> jurgeUserList = residentAndDisabledMapper.selectJudgeResultList(paramMap);
|
|
|
|
|
List<Map<String,Object>> jurgeUserList = residentAndDisabledDao.selectJudgeResultList(paramMap);
|
|
|
|
|
|
|
|
|
|
// List<Map<String,Object>> resultList = judgeCarList.stream().peek((m) -> {
|
|
|
|
|
// paramMap.put("msSeq", m.get("msSeq"));
|
|
|
|
@ -252,56 +248,56 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
return resultMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(readOnly = true)
|
|
|
|
|
public Map<String,Object> findJudgeResults2(JudgeListDto dto) {
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
// team && 팀별 부과현황 조회 : 팀이 선택되지 않은 경우 모두
|
|
|
|
|
// Map<String, Object> teamMap = residentAndDisabledMapper.selectTotJudgeResultGroupByTeamAndChasu(dto);
|
|
|
|
|
// if (Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
|
|
|
|
|
// @Override
|
|
|
|
|
// @Transactional(readOnly = true)
|
|
|
|
|
// public Map<String,Object> findJudgeResults2(JudgeListDto dto) {
|
|
|
|
|
// Map<String, Object> resultMap = new HashMap<>();
|
|
|
|
|
//
|
|
|
|
|
// // team && 팀별 부과현황 조회 : 팀이 선택되지 않은 경우 모두
|
|
|
|
|
//// Map<String, Object> teamMap = residentAndDisabledMapper.selectTotJudgeResultGroupByTeamAndChasu(dto);
|
|
|
|
|
//// if (Checks.isEmpty(teamMap)) throw new CustomBaseException(ErrorCode.DATA_NOT_FOUND);
|
|
|
|
|
//// List<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
//// totJudgeUserList.add(teamMap);
|
|
|
|
|
//
|
|
|
|
|
// List<Map<String, Object>> 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<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
// totJudgeUserList.add(teamMap);
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> 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<Map<String, Object>> totJudgeUserList = residentAndDisabledMapper.selectTotJudgeResultGroupByUser(dto);
|
|
|
|
|
totJudgeUserList.add(teamList.get(0));
|
|
|
|
|
|
|
|
|
|
// 심사대상 차량 목록
|
|
|
|
|
List<Map<String,Object>> judgeCarList = residentAndDisabledMapper.selectJudgeResultGroupByCarnum(dto);
|
|
|
|
|
|
|
|
|
|
// 차량별 심사자 심사결과 목록
|
|
|
|
|
Map<String, Object> 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<Map<String,Object>> jurgeUserList = residentAndDisabledMapper.selectJudgeResultList(paramMap);
|
|
|
|
|
|
|
|
|
|
// List<Map<String,Object>> 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;
|
|
|
|
|
}
|
|
|
|
|
// totJudgeUserList.add(teamList.get(0));
|
|
|
|
|
//
|
|
|
|
|
// // 심사대상 차량 목록
|
|
|
|
|
// List<Map<String,Object>> judgeCarList = residentAndDisabledMapper.selectJudgeResultGroupByCarnum(dto);
|
|
|
|
|
//
|
|
|
|
|
// // 차량별 심사자 심사결과 목록
|
|
|
|
|
// Map<String, Object> 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<Map<String,Object>> jurgeUserList = residentAndDisabledMapper.selectJudgeResultList(paramMap);
|
|
|
|
|
//
|
|
|
|
|
//// List<Map<String,Object>> 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;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 심사자료 삭제
|
|
|
|
@ -313,16 +309,16 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
public void removeJudge(final JudgeListDto dto) {
|
|
|
|
|
public void removeJudge(@NotNull final JudgeListDto dto) {
|
|
|
|
|
|
|
|
|
|
List<Long> msMaincodes = judgeRepository.findAllMsMaincode(dto.getMsDatagb(), dto.getMsChasu(), dto.getMsSdate(), dto.getMsEdate());
|
|
|
|
|
List<Long> msMaincodes = residentAndDisabledDao.findAllMsMaincode(dto);
|
|
|
|
|
|
|
|
|
|
msMaincodes.forEach(msMaincode -> {
|
|
|
|
|
//List<MinSimsaUser680Sc> judgeUsers = judgeUserRepository.findByMsuMaincode()
|
|
|
|
|
judgeUserRepository.deleteByMsuMaincode(msMaincode);
|
|
|
|
|
residentAndDisabledDao.deleteJudgeUser(msMaincode);
|
|
|
|
|
// 전송상태 -> 미접수(1), 심의결과 -> 접수(1)
|
|
|
|
|
gnReacallRepository.updateScTransferAndScState(dto.getMsDatagb(), msMaincode);
|
|
|
|
|
judgeRepository.deleteById(msMaincode);
|
|
|
|
|
residentAndDisabledDao.updateScTransferAndScState(dto.getMsDatagb(), msMaincode);
|
|
|
|
|
residentAndDisabledDao.deleteJudgeTgt(msMaincode);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|