심사 상세 목록

dev
minuk926 3 years ago
parent e70c818eca
commit a96672d534

@ -55,6 +55,24 @@ public class MinSimsa680Controller {
return RestResponse.of(service.findMinSimsa680Groups(minSimsa680GroupDto, pageable));
}
@Operation(summary = "심사(대상) 상세 조회" , description = "심사(대상) 상세 조회")
@Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msYear", description = "심사년도", required = true, example = "2021"),
@Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = false, example = " "),
@Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"),
@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
})
@GetMapping(value="details", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findMinSimsa680Details(
@Valid
@Parameter(hidden = true)
final MinSimsa680GroupDto minSimsa680GroupDto,
@Parameter(hidden = true)
final Pageable pageable) {
return RestResponse.of(service.findMinSimsa680Details(minSimsa680GroupDto, pageable));
}
// TODO :: 파라메터 정의 필요
@Operation(summary = "심사(대상)자 조회" , description = "심사(대상)자 조회")
@Parameters({

@ -2,10 +2,13 @@ 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.entity.MinSimsa680;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface IMinSimsa680RepositoryCustom {
Page<MinSimsa680GroupDto> findMinSimsa680Groups(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable);
Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
Page<MinSimsaReviewGroupDto> findMinSimsa680s2(Pageable pageable);
}

@ -37,10 +37,10 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
BooleanBuilder builder = new BooleanBuilder();
if( !Checks.isEmpty(pMinSimsa680GroupDto.getMsYear())) {
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsYear())) {
builder.and(minSimsa680.msYear.eq(pMinSimsa680GroupDto.getMsYear()));
}
if( !Checks.isEmpty(pMinSimsa680GroupDto.getMsChasu())) {
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsChasu())) {
builder.and(minSimsa680.msChasu.like(String.valueOf(pMinSimsa680GroupDto.getMsChasu())));
}
QueryResults<MinSimsa680GroupDto> rslt =
@ -67,40 +67,31 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
}
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto, Pageable pageable){
//LocalDate now = LocalDate.now();
LocalDate now = LocalDate.of(2021, 12, 11);
LocalDate now2 = LocalDate.of(2021, 12, 12);
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto, Pageable pageable) {
QueryResults<MinSimsa680> rslt =
queryFactory
.select(Projections.fields(MinSimsa680.class,
minSimsa680.msSeq,
minSimsa680.msCarnum,
minSimsa680.msMaincode))
.from(minSimsaUser680)
.join(minSimsa680)
.on(minSimsa680.msMaincode.eq(minSimsaUser680.msuMaincode))
.join(minUserinfo)
.on(minSimsaUser680.msuUserid.eq(minUserinfo.userid))
.where(minSimsaUser680.msuTeam.eq(""),
minSimsa680.msChasu.eq(dto.getMsChasu()),
minSimsa680.msSdate.eq(dto.getMsSdate()),
minSimsa680.msEdate.eq(dto.getMsEdate()))
.groupBy(minSimsa680.msCarnum,
minSimsa680.msSeq,
minSimsa680.msMaincode)
.orderBy(minSimsa680.msSeq.asc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
.fetchResults();
queryFactory
.select(minSimsa680.msSeq,
minSimsa680.msCarnum,
minSimsa680.msMaincode)
.from(minSimsaUser680)
.join(minSimsa680)
.on(minSimsa680.msMaincode.eq(minSimsaUser680.msuMaincode))
.join(minUserinfo)
.on(minSimsaUser680.msuUserid.eq(minUserinfo.userid))
.where(minSimsaUser680.msuTeam.eq(""),
minSimsa680.msChasu.eq(1L),
minSimsa680.msSdate.eq(java.sql.Date.valueOf(now)),
minSimsa680.msEdate.eq(java.sql.Date.valueOf(now2)))
.groupBy(minSimsa680.msCarnum,
minSimsa680.msSeq,
minSimsa680.msMaincode)
.orderBy(minSimsa680.msSeq.asc())
.offset(0L)
.limit(10L)
//, minSimsa680.msSdate.eq(java.sql.Date.valueOf(now)))
.fetchResults();
// jpaQueryFactory.selectFrom(minSimsa680)
// .leftJoin(minSimsa680.msMaincode, minSimsaUser680).fetchJoin()
// .groupBy(minSimsa680.msEdate, minSimsaUser680.msuTeam, qMinUserinfo.name)
// .orderBy(minSimsa680.msChasu.desc())
// //.where(minSimsa680.name.eq(name))
// .fetch();
return null;
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
}
@Override

@ -10,6 +10,7 @@ public interface IMinSimsa680Service {
//Page<MinSimsa680GroupDto> findMinSimsa680Groups(MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsa680GroupDto> findMinSimsa680Groups(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
Page<MinSimsa680> findMinSimsa680s(MinSimsa680 minSimsa680, Pageable pageable);

@ -36,6 +36,11 @@ public class MinSimsa680Service implements IMinSimsa680Service {
return repository.findMinSimsa680Groups(minSimsa680GroupDto, pageable);
}
@Transactional(readOnly = true)
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) {
return repository.findMinSimsa680Details(minSimsa680GroupDto, pageable);
}
@Transactional(readOnly = true)
public Page<MinSimsaReviewGroupDto> findMinSimsa680s2(MinSimsa680 minSimsa680, Pageable pageable) {
return repository.findMinSimsa680s2(pageable);

@ -4,11 +4,12 @@
<springProfile name="local">
<property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>
<property name="LOG_PATH" value="/data/xit/logs"/>
<!-- <property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>-->
</springProfile>
<springProfile name="dev,prod">
<!-- <property name="LOG_PATH" value="/data/xit/logs"/>-->
<property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>
<property name="LOG_PATH" value="/data/xit/logs"/>
<!-- <property name="LOG_PATH" value="/Users/minuk/data/xit/logs"/>-->
</springProfile>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>

Loading…
Cancel
Save