fix: 거주자/장애인 심의대상 등록 처리

dev
Lim Jonguk 3 years ago
parent 571811aa41
commit 09dae5f85e

@ -79,8 +79,8 @@ public class ResidentAndDisabledController {
@Parameters({
@Parameter(in = ParameterIn.QUERY, name = "scDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
@Parameter(in = ParameterIn.QUERY, name = "scTransfer", description = "전송상태(미접수-1,접수-2)", required = true, example = "1"),
@Parameter(in = ParameterIn.QUERY, name = "scSeq1", description = "접수번호-시작", required = true, example = "2022200801"),
@Parameter(in = ParameterIn.QUERY, name = "scSeq2", description = "접수번호-종료", required = true, example = "2022200899"),
@Parameter(in = ParameterIn.QUERY, name = "scSeq1", description = "접수번호-시작", required = true, example = "2022000001"),
@Parameter(in = ParameterIn.QUERY, name = "scSeq2", description = "접수번호-종료", required = true, example = "2022999999"),
})
public ResponseEntity<? extends IRestResponse> findResidentJudgeTargets(@Parameter(hidden = true) final JudgeTargetDto dto){
return RestResponse.of(service.findJudgeTargets(dto));

@ -10,7 +10,7 @@ import lombok.Setter;
import java.time.LocalDate;
import java.util.List;
@Schema(name = "ResidentTargetDto", description = "")
@Schema(name = "JudgeTargetDto", description = "거주자/장애인 심사대상 DTO")
@Getter
@Setter
@AllArgsConstructor
@ -88,6 +88,9 @@ public class JudgeTargetDto {
@Schema(title = "", example = "0", description = "결과코드")
private Long msChasu;
@Schema(title = "자료상태", example = "1", description = "자료상태: 1-접수, 2-심사중, 3-수용, 4-미수용")
private String scState;
@Schema(title = "팀코드", example = "001", description = "팀코드")
private String msuTeam;
}

@ -6,7 +6,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Schema(name = "JudgeDto", description = "민원심사")
@Schema(name = "MinSimsa680Dto", description = "민원심사")
@Getter
@Setter
@AllArgsConstructor

@ -109,6 +109,7 @@ public class GnRecallSc {
private String scPicad4;
@Schema(required = true, title = " ", example = " ", description = " ")
@Column(name = "sc_transfer")
@Setter
private String scTransfer;
@Schema(required = true, title = " ", example = " ", description = " ")
@Column(name = "sc_datagb")
@ -118,6 +119,7 @@ public class GnRecallSc {
private String scAnswer;
@Schema(required = true, title = " ", example = " ", description = " ")
@Column(name = "sc_state")
@Setter
private String scState;
@Schema(title = " ", example = " ", description = " ")
@Column(name = "zipcode1")

@ -13,6 +13,8 @@ import com.xit.biz.ctgy.repository.IParkingRepository;
import com.xit.biz.ctgy.repository.IRecallRepository;
import com.xit.biz.ctgy.repository.IJudgeUserRepository;
import com.xit.biz.ctgy.service.IParkingService;
import com.xit.core.constant.ErrorCode;
import com.xit.core.exception.CustomBaseException;
import com.xit.core.support.jpa.JpaUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
@ -70,6 +72,10 @@ public class ParkingService implements IParkingService {
boolean isFirst = true;
for(Long rcCode : dto.getRcCodes()) {
//---------------------------------------------------------
// 심사대상 등록
//---------------------------------------------------------
dto.setRcCode(rcCode);
if (isFirst) {
@ -77,16 +83,18 @@ public class ParkingService implements IParkingService {
dto.setMsResult("0");
isFirst = false;
}
// 심사대상 등록
mapper.insertParkingJudgeTargetIntoSelect(dto);
// 등록된 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수
Tf680Recall recallEntity = recallRepository.findById(dto.getRcCode()).orElseGet(()->Tf680Recall.builder().build());
//---------------------------------------------------------
// 등록한 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수
//---------------------------------------------------------
Tf680Recall recallEntity = recallRepository.findById(dto.getRcCode()).orElseThrow(() -> new CustomBaseException(ErrorCode.DATA_NOT_FOUND));
recallEntity.setRcIrTransfer(CtgyConstants.Judge.TRANSFER_ACCEPT.getCode());
JpaUtil.saveIfNullId(recallEntity.getRcCode(), recallRepository, recallEntity);
//---------------------------------------------------------
// 심사자 등록
//---------------------------------------------------------
List<MinUserinfo> userinfoList = userRepository.findAllByTeamAndIsenableAndAccesstype(
dto.getMsuTeam(),
CtgyConstants.UserInfo.ISENABLED_USE.getCode(),
@ -104,7 +112,6 @@ public class ParkingService implements IParkingService {
.build()
).collect(Collectors.toList());
judgeUserRepository.saveAll(simsaUserList);
}
}

@ -14,6 +14,8 @@ import com.xit.biz.ctgy.repository.IJudgeUserRepository;
import com.xit.biz.ctgy.repository.IMinUserRepository;
import com.xit.biz.ctgy.repository.IResidentAndDisabledRepository;
import com.xit.biz.ctgy.service.IResidentAndDisabledService;
import com.xit.core.constant.ErrorCode;
import com.xit.core.exception.CustomBaseException;
import com.xit.core.support.jpa.JpaUtil;
import com.xit.core.util.DateUtil;
import lombok.RequiredArgsConstructor;
@ -130,6 +132,10 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
boolean isFirst = true;
for(Long scCode : dto.getScCodes()) {
//---------------------------------------------------------
// 심사대상 등록
//---------------------------------------------------------
dto.setScCode(scCode);
if (isFirst) {
@ -137,16 +143,19 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
dto.setMsResult("0");
isFirst = false;
}
// 심사대상 등록
mapper.insertJudgeTargetIntoSelect(dto);
// // 등록된 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수
// Tf680Recall recallEntity = recallRepository.findById(dto.getRcCode()).orElseGet(Tf680Recall::new);
// recallEntity.setRcIrTransfer(CtgyConstants.Judge.TRANSFER_ACCEPT.getCode());
// JpaUtil.saveIfNullId(recallEntity.getRcCode(), recallRepository, recallEntity);
//---------------------------------------------------------
// 등록한 심사대상 데이타 등록 상태 변경 : 미접수 -> 접수
//---------------------------------------------------------
GnRecallSc entity = repository.findById(dto.getScCode()).orElseThrow(() -> new CustomBaseException(ErrorCode.DATA_NOT_FOUND));
entity.setScTransfer(CtgyConstants.Judge.TRANSFER_ACCEPT.getCode());
//entity.setScState(CtgyConstants.Judge.DATA_STATE_JUDGE.getCode());
JpaUtil.saveIfNullId(dto.getScCode(), repository, entity);
//---------------------------------------------------------
// 심사자 등록
//---------------------------------------------------------
List<MinUserinfo> userinfoList = userRepository.findAllByTeamAndIsenableAndAccesstype(
dto.getMsuTeam(),
CtgyConstants.UserInfo.ISENABLED_USE.getCode(),
@ -163,7 +172,6 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
.build()
).collect(Collectors.toList());
judgeUserRepository.saveAll(simsaUserList);
}
}

@ -39,6 +39,7 @@ public enum ErrorCode {
BAD_REQUEST(HttpStatus.BAD_REQUEST, "요청 매개변수 오류 입니다."),
NOT_FOUND(HttpStatus.NOT_FOUND, "잘못된 요청 입니다"),
FILE_NOT_FOUND(HttpStatus.NOT_FOUND, "파일이 존재하지 않습니다"),
DATA_NOT_FOUND(HttpStatus.NOT_FOUND, "처리 데이타 오류(처리 요청 데이타 미존재)"),
/* 400 BAD_REQUEST : 잘못된 요청 */
CANNOT_FOLLOW_MYSELF(HttpStatus.BAD_REQUEST, "자기 자신은 팔로우 할 수 없습니다"),

Loading…
Cancel
Save