feat: 심의등록 반영

dev
minuk926 3 years ago
parent 8bf7cd94e7
commit 3176860731

@ -61,7 +61,7 @@ public class MinUserController {
@Operation(summary = "사용자 정보 조회" , description = "사용자 정보 조회")
@GetMapping("/{userid}")
//@Transactional(readOnly = true)
public ResponseEntity<? extends IRestResponse> getMinUser(@PathVariable String userid) {
public ResponseEntity<? extends IRestResponse> getMinUser(@PathVariable final String userid) {
return RestResponse.of(service.findMinUserByUserid(userid));
}
}

@ -2,6 +2,7 @@ package com.xit.biz.ctgy.controller;
import com.xit.biz.ctgy.dto.MinSimsa680Dto;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaTargetDto;
import com.xit.biz.ctgy.dto.struct.MinSimsa680GroupMapstruct;
import com.xit.biz.ctgy.dto.struct.MinSimsa680Mapstruct;
import com.xit.biz.ctgy.service.IParkingService;
@ -72,8 +73,13 @@ public class ParkingController {
@Operation(summary = "주정차의견진술심의목록-상세" , description = "주정차의견진술심의목록-상세")
@GetMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findSimsaTargets(){
return RestResponse.of(service.findSimsaTargets());
@Parameters({
@Parameter(in = ParameterIn.QUERY, name = "rcIrTransfer", description = "전송상태(미접수-1,접수-2)", required = true, example = "1"),
@Parameter(in = ParameterIn.QUERY, name = "rcSeq1", description = "접수번호-시작", required = true, example = "2022200801"),
@Parameter(in = ParameterIn.QUERY, name = "rcSeq2", description = "접수번호-종료", required = true, example = "2022200899"),
})
public ResponseEntity<? extends IRestResponse> findSimsaTargets(@Parameter(hidden = true) final MinSimsaTargetDto dto){
return RestResponse.of(service.findSimsaTargets(dto));
}
@Operation(summary = "주정차의견진술심의등록" , description = "주정차의견진술심의등록")

@ -54,7 +54,7 @@ public class PublicBoardController {
@Parameter(in = ParameterIn.PATH, name = "inCode", description = "게시글번호", required = true, example = "18"),
})
@GetMapping(value = "/{inCode}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findByInCode(@PathVariable Long inCode) {
public ResponseEntity<? extends IRestResponse> findByInCode(@PathVariable final Long inCode) {
return RestResponse.of(service.findByInCode(inCode));
}
}

@ -22,10 +22,10 @@ public class MinSimsaTargetDto {
@Schema(title = "접수번호", example = " ", description = "Input Description...")
private String rcSeq;
@Schema(title = "차량번호", example = " ", description = "Input Description...")
private String mmQcarno;
@Schema(title = "최초차량번호", example = " ", description = "Input Description...")
private String mmOcarno;
@Schema(title = "차량번호", example = " ", description = "Input Description...")
@Schema(title = "최종차량번호", example = " ", description = "Input Description...")
private String mmNcarno;
@Schema(title = "", example = " ", description = "Input Description...")
@ -44,7 +44,7 @@ public class MinSimsaTargetDto {
private String rcIngbStr;
@Schema(title = "접수일자", example = " ", description = "Input Description...")
private java.sql.Date rcDate;
private String rcDate;
@Schema(title = "심사시작일", example = " ", description = "Input Description...")
private java.sql.Date msSdate;
@ -64,5 +64,8 @@ public class MinSimsaTargetDto {
@Schema(title = "접수번호", example = " ", description = "Input Description...")
private String rcSeq2;
@Schema(title = "전송상태-심사", example = "1", description = "전송상태-1:미전송(미심사), 2:전송(심사)")
private String rcIrTransfer;
}

@ -10,14 +10,14 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Optional;
public interface IMinUserRepository extends JpaRepository<MinUserinfo, String> {
Optional<MinUserinfo> findByUserid(String userid);
Optional<MinUserinfo> findByUserid(final String userid);
@Query(value = "SELECT TRAFFIC.ECL_ENCRYPT(?1) AS passwd FROM DUAL C", nativeQuery = true)
//@Query(value = "SELECT ECL_ENCRYPT(?1) AS passwd", nativeQuery = true)
String queryGetPasswdEncode(@Param("passwd") String passwd);
String queryGetPasswdEncode(@Param("passwd") final String passwd);
@Query(value = "SELECT ECL_DECRYPT(MU.passwd) AS passwd FROM min_userinfo MU WHERE MU.userid = ?1", nativeQuery = true)
String queryGetPasswd(@Param("userid") String userid);
String queryGetPasswd(@Param("userid") final String userid);
MinUserinfo findMinUserinfoByUserid(String userid);
MinUserinfo findMinUserinfoByUserid(final String userid);
}

@ -8,27 +8,4 @@ import java.util.List;
import java.util.Map;
public interface IParkingRepository extends JpaRepository<MinSimsa680, Long>, IParkingRepositoryCustom {
// @Query(value="SELECT new map(TM.MM_CODE as mmCode,"+
// " TR.RC_CODE as rcCode, " +
// " TR.RC_SEQ as rcSeq, " +
// " TM.MM_OCARNO as mmOcarno, " +
// " TM.MM_NCARNO as mmNcarno)" +
// " FROM TF680_MAIN TM " +
// " JOIN TF680_RECALL TR ON TM.MM_CODE = TR.RC_MAINCODE " +
// " LEFT JOIN TB_CMM_CODE_S TCCS1 ON TR.RC_INGB = TCCS1.CODE_CD " +
// " AND TCCS1.CODE_GRP_ID = 'TRAFFIC' " +
// " AND TCCS1.CODE_LCD = 'GANGNAM_SIMSA' " +
// " AND TCCS1.CODE_MCD = 'RC_INGB' " +
// " LEFT JOIN TB_CMM_CODE_S TCCS2 ON TR.RC_CONT_DOC = TCCS2.CODE_CD " +
// " AND TCCS2.CODE_GRP_ID = 'TRAFFIC' " +
// " AND TCCS2.CODE_LCD = 'GANGNAM_SIMSA' " +
// " AND TCCS2.CODE_MCD = 'RC_CONT_DOC' " +
// " WHERE MM_DBGB = '11' " +
// " AND MM_LSTATE <> '75' " +
// " AND RC_GB = '1' " +
// " AND RC_STATE = '0' " +
// " AND RC_IR_TRANSFER = '1' " +
// " order by RC_SEQ ")
// List<Map<String,Object>> findSimsaTargets();
}

@ -2,6 +2,7 @@ package com.xit.biz.ctgy.repository;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.dto.MinSimsaTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -10,10 +11,10 @@ import org.springframework.data.jpa.repository.Query;
import java.util.List;
public interface IParkingRepositoryCustom {
Page<MinSimsa680GroupDto> findSimsas(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto);
Page<MinSimsa680GroupDto> findSimsas(final MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findSimsaDetails(final MinSimsa680GroupDto minSimsa680GroupDto);
//List<MinSimsa680> findSimsaTargets();
List<MinSimsaTargetDto> findSimsaTargets(final MinSimsaTargetDto dto);
Page<MinSimsaReviewGroupDto> findMinSimsa680s2(Pageable pageable);

@ -2,8 +2,10 @@ package com.xit.biz.ctgy.repository;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.QueryResults;
import com.querydsl.core.types.ExpressionUtils;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.dsl.CaseBuilder;
import com.querydsl.jpa.JPAExpressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
@ -17,6 +19,7 @@ import org.springframework.data.domain.Pageable;
import java.util.List;
import static com.xit.biz.cmm.entity.QCmmCodeS.cmmCodeS;
import static com.xit.biz.ctgy.entity.QMinSimsa680.minSimsa680;
import static com.xit.biz.ctgy.entity.QMinSimsaUser680.minSimsaUser680;
import static com.xit.biz.ctgy.entity.QMinUserinfo.minUserinfo;
@ -29,7 +32,7 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
private final JPAQueryFactory queryFactory;
@Override
public Page<MinSimsa680GroupDto> findSimsas(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) {
public Page<MinSimsa680GroupDto> findSimsas(final MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) {
/*
SELECT MS_CHASU, MS_SDATE, MS_STARTSI, MS_EDATE, MS_CDATE, MS_CLOSESI, COUNT(*) CNT
FROM MIN_SIMSA680
@ -71,7 +74,8 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
}
public List<MinSimsa680> findSimsaDetails(MinSimsa680GroupDto dto) {
@Override
public List<MinSimsa680> findSimsaDetails(final MinSimsa680GroupDto dto) {
BooleanBuilder builder = new BooleanBuilder();
builder.and(minSimsa680.msSdate.eq(dto.getMsSdate()));
@ -102,8 +106,8 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
return rslt;
}
//@Override
public List<MinSimsaTargetDto> findSimsaTargets() {
@Override
public List<MinSimsaTargetDto> findSimsaTargets(final MinSimsaTargetDto dto) {
/*
SELECT TM.MM_CODE,
TR.RC_CODE,
@ -171,9 +175,9 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
//builder.and(tf680Main.mmLstate.ne("75"));
builder.and(tf680Recall.rcGb.eq("1"));
builder.and(tf680Recall.rcState.eq("0"));
builder.and(tf680Recall.rcIrTransfer.eq("1"));
//builder.and(tf680Recall.rcSeq.gt("1"));
//builder.and(tf680Recall.rcSeq.lt("1"));
builder.and(tf680Recall.rcIrTransfer.eq(dto.getRcIrTransfer()));
builder.and(tf680Recall.rcSeq.gt(dto.getRcSeq1()));
builder.and(tf680Recall.rcSeq.lt(dto.getRcSeq2()));
List<MinSimsaTargetDto> rslt =
@ -186,7 +190,22 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
tf680Main.mmNcarno,
tf680Recall.rcName,
tf680Recall.rcContDoc,
tf680Recall.rcIngb
tf680Recall.rcIngb,
tf680Recall.rcDate,
ExpressionUtils.as(
JPAExpressions.select(cmmCodeS.codeNm)
.from(cmmCodeS)
.where(tf680Recall.rcContDoc.eq(cmmCodeS.codeCd),cmmCodeS.codeGrpId.eq("TRAFFIC"),
cmmCodeS.codeLcd.eq("GANGNAM_SIMSA"),
cmmCodeS.codeMcd.eq("RC_CONT_DOC")),
"rcContDocStr"),
ExpressionUtils.as(
JPAExpressions.select(cmmCodeS.codeNm)
.from(cmmCodeS)
.where(tf680Recall.rcIngb.eq(cmmCodeS.codeCd),cmmCodeS.codeGrpId.eq("TRAFFIC"),
cmmCodeS.codeLcd.eq("GANGNAM_SIMSA"),
cmmCodeS.codeMcd.eq("RC_INGB")),
"rcIngbStr")
))
.from(tf680Main)
.join(tf680Recall)
@ -198,7 +217,6 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
return rslt;
}
@Override
public Page<MinSimsaReviewGroupDto> findMinSimsa680s2(Pageable pageable) {
/*

@ -4,5 +4,5 @@ import com.xit.biz.ctgy.entity.MinInfoBoard680;
import org.springframework.data.jpa.repository.JpaRepository;
public interface IPublicBoardRepository extends JpaRepository<MinInfoBoard680, Long> {
MinInfoBoard680 findByInCode(Long inCode);
MinInfoBoard680 findByInCode(final Long inCode);
}

@ -7,5 +7,5 @@ import org.springframework.data.domain.Pageable;
public interface IBoardService {
Page<MinCivBoard680> findAll(MinCivBoard680 minCivBoard680, Pageable pageable);
Page<MinCivBoard680> findAll(final MinCivBoard680 minCivBoard680, Pageable pageable);
}

@ -9,9 +9,9 @@ import java.util.Optional;
public interface IMinUserService {
Page<MinUserinfo> findMinUsers(MinUserinfo minUserinfo, Pageable pageable);
Page<MinUserinfo> findMinUsers(final MinUserinfo minUserinfo, Pageable pageable);
MinUserinfo findMinUser();
MinUserinfo findMinUserByUserid(String userId);
MinUserinfo findMinUserByUserid(final String userId);
}

@ -2,6 +2,7 @@ package com.xit.biz.ctgy.service;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.dto.MinSimsaTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -12,13 +13,13 @@ import java.util.Map;
public interface IParkingService {
//Page<MinSimsa680GroupDto> findMinSimsa680Groups(MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsa680GroupDto> findSimsas(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto);
List<Map<String,Object>> findSimsaTargets();
Page<MinSimsa680GroupDto> findSimsas(final MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findSimsaDetails(final MinSimsa680GroupDto minSimsa680GroupDto);
List<MinSimsaTargetDto> findSimsaTargets(final MinSimsaTargetDto dto) ;
Page<MinSimsa680> findAll(MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsa680> findAll(final MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsaReviewGroupDto> findMinSimsa680s2(MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsaReviewGroupDto> findMinSimsa680s2(final MinSimsa680 minSimsa680, Pageable pageable);
MinSimsa680 saveParkingSimsa(MinSimsa680 toEntity);
MinSimsa680 saveParkingSimsa(final MinSimsa680 toEntity);
}

@ -6,6 +6,6 @@ import org.springframework.data.domain.Pageable;
public interface IPublicBoardService {
Page<MinInfoBoard680> findAll(MinInfoBoard680 entity, Pageable pageable);
MinInfoBoard680 findByInCode(Long inCode);
Page<MinInfoBoard680> findAll(final MinInfoBoard680 entity, Pageable pageable);
MinInfoBoard680 findByInCode(final Long inCode);
}

@ -21,7 +21,7 @@ public class BoardService implements IBoardService {
private final IBoardRepository repository;
@Transactional(readOnly = true)
public Page<MinCivBoard680> findAll(MinCivBoard680 entity, Pageable pageable) {
public Page<MinCivBoard680> findAll(final MinCivBoard680 entity, Pageable pageable) {
//Sort sort = Sort.by(Sort.Direction.ASC, "codeOrdr");
pageable = JpaUtil.getPagingInfo(pageable);
ExampleMatcher exampleMatcher = ExampleMatcher.matchingAll()

@ -26,7 +26,7 @@ public class MinUserService implements IMinUserService {
}
@Transactional//(readOnly = true)
public Page<MinUserinfo> findMinUsers(MinUserinfo minUserinfo, Pageable pageable) {
public Page<MinUserinfo> findMinUsers(final MinUserinfo minUserinfo, Pageable pageable) {
//Sort sort = Sort.by(Sort.Direction.ASC, "codeOrdr");
pageable = JpaUtil.getPagingInfo(pageable);
ExampleMatcher exampleMatcher = ExampleMatcher.matchingAll()
@ -47,7 +47,7 @@ public class MinUserService implements IMinUserService {
}
@Override
public MinUserinfo findMinUserByUserid(String userid) {
public MinUserinfo findMinUserByUserid(final String userid) {
return repository.findMinUserinfoByUserid(userid);
}
}

@ -2,6 +2,7 @@ package com.xit.biz.ctgy.service.impl;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.dto.MinSimsaTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import com.xit.biz.ctgy.repository.IParkingRepository;
import com.xit.biz.ctgy.service.IParkingService;
@ -25,8 +26,9 @@ public class ParkingService implements IParkingService {
private final IParkingRepository repository;
@Override
@Transactional(readOnly = true)
public Page<MinSimsa680> findAll(MinSimsa680 entity, Pageable pageable) {
public Page<MinSimsa680> findAll(final MinSimsa680 entity, Pageable pageable) {
pageable = JpaUtil.getPagingInfo(pageable);
ExampleMatcher exampleMatcher = ExampleMatcher.matchingAll()
.withMatcher("ciTitle", contains())
@ -37,21 +39,25 @@ public class ParkingService implements IParkingService {
return page;
}
@Override
@Transactional(readOnly = true)
public Page<MinSimsa680GroupDto> findSimsas(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) {
public Page<MinSimsa680GroupDto> findSimsas(final MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) {
return repository.findSimsas(minSimsa680GroupDto, pageable);
}
@Override
@Transactional(readOnly = true)
public List<MinSimsa680> findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto) {
public List<MinSimsa680> findSimsaDetails(final MinSimsa680GroupDto minSimsa680GroupDto) {
return repository.findSimsaDetails(minSimsa680GroupDto);
}
@Override
@Transactional(readOnly = true)
public List<Map<String,Object>> findSimsaTargets() {
return null ; //repository.findSimsaTargets();
public List<MinSimsaTargetDto> findSimsaTargets(MinSimsaTargetDto dto) {
return repository.findSimsaTargets(dto);
}
@Override
@Transactional(readOnly = true)
public Page<MinSimsaReviewGroupDto> findMinSimsa680s2(MinSimsa680 minSimsa680, Pageable pageable) {
return repository.findMinSimsa680s2(pageable);

@ -21,7 +21,7 @@ public class PublicBoardService implements IPublicBoardService {
private final IPublicBoardRepository repository;
@Transactional(readOnly = true)
public Page<MinInfoBoard680> findAll(MinInfoBoard680 entity, Pageable pageable) {
public Page<MinInfoBoard680> findAll(final MinInfoBoard680 entity, Pageable pageable) {
//Sort sort = Sort.by(Sort.Direction.ASC, "codeOrdr");
pageable = JpaUtil.getPagingInfo(pageable);
ExampleMatcher exampleMatcher = ExampleMatcher.matchingAll()
@ -34,7 +34,7 @@ public class PublicBoardService implements IPublicBoardService {
}
@Override
public MinInfoBoard680 findByInCode(Long inCode) {
public MinInfoBoard680 findByInCode(final Long inCode) {
return repository.findByInCode(inCode);
}
}

Loading…
Cancel
Save