feat: entity scope 조정 에러 fix

dev
minuk926 3 years ago
parent dc6402cadd
commit 29fa93e2fe

@ -18,12 +18,12 @@ import java.util.Objects;
@Schema(name = "CmmCodeGrp", description = "코드그룹") //, parent = AuditEntity.class)
@Table(name = "tb_cmm_code_grp")
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class CmmCodeGrp extends AuditEntity implements Serializable {
@Schema(required = true, title = "코드그룹ID", example = "G_CODE_SAM")

@ -15,14 +15,14 @@ import java.util.Objects;
@Schema(name = "CmmCodeL", description = "대분류코드") //, parent = AuditEntity.class)
@Table(name = "tb_cmm_code_l")
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@IdClass(CmmCodeLIds.class)
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Builder
@Getter
public class CmmCodeL extends AuditEntity implements Serializable {
@Schema(required = true, title = "코드그룹ID", example = "G_CODE_SAM", description = "공통코드그룹ID")

@ -14,14 +14,14 @@ import java.util.Objects;
@Schema(name = "CmmCodeM", description = "중분류코드") //, parent = AuditEntity.class)
@Table(name = "tb_cmm_code_m")
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@IdClass(CmmCodeMIds.class)
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class CmmCodeM extends AuditEntity implements Serializable {
@Schema(required = true, title = "코드그룹ID", example = "G_CODE_SAM", description = "공통코드그룹ID")

@ -15,14 +15,14 @@ import java.util.Objects;
@Schema(name = "CmmCodeS", description = "소분류코드") //, parent = AuditEntity.class)
@Table(name = "tb_cmm_code_s")
@IdClass(CmmCodeSIds.class)
@Entity
@Getter
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Getter
@Builder
@IdClass(CmmCodeSIds.class)
@DynamicInsert
@DynamicUpdate
public class CmmCodeS extends AuditEntity implements Serializable {
@Schema(required = true, title = "코드그룹ID", example = "G_CODE_SAM", description = "공통코드그룹ID")

@ -25,12 +25,12 @@ import java.util.Objects;
}
)
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class CmmUser extends AuditEntity implements Serializable { //extends RepresentationModel<CmmUserEntity> implements Serializable {
private static final long SerialVersionUID = 1L;

@ -1,6 +1,6 @@
package com.xit.biz.ctgy.controller;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.dto.struct.MinSimsa680GroupMapstruct;
import com.xit.biz.ctgy.dto.struct.MinSimsa680Mapstruct;
@ -47,7 +47,7 @@ public class ParkingController {
public ResponseEntity<? extends IRestResponse> findParkings(
@Valid
@Parameter(hidden = true)
final MinSimsa680GroupDto dto,
final SimsaListDto dto,
@Parameter(hidden = true)
final Pageable pageable) {
return RestResponse.of(service.findParkings(dto, pageable));
@ -64,7 +64,7 @@ public class ParkingController {
public ResponseEntity<? extends IRestResponse> findParkingDetails(
@Valid
@Parameter(hidden = true)
final MinSimsa680GroupDto dto) {
final SimsaListDto dto) {
return RestResponse.of(service.findParkingDetails(dto));
}

@ -1,7 +1,9 @@
package com.xit.biz.ctgy.controller;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.ResidentDto;
import com.xit.biz.ctgy.dto.ResidentTargetDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
import com.xit.biz.ctgy.service.IResidentService;
import com.xit.core.api.IRestResponse;
@ -91,4 +93,22 @@ public class ResidentController {
return RestResponse.of(HttpStatus.OK);
}
@Operation(summary = "거주자 의견진술 심의 목록" , description = "거주자 의견진술 심의 목록")
@Parameters({
@Parameter(in = ParameterIn.QUERY, name = "scYear", description = "심사년도", required = true, example = "2021"),
@Parameter(in = ParameterIn.QUERY, name = "scChasu", 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(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findResidents(
@Valid
@Parameter(hidden = true)
final SimsaListDto dto,
@Parameter(hidden = true)
final Pageable pageable) {
return RestResponse.of(service.findResidents(dto, pageable));
}
}

@ -6,13 +6,13 @@ import lombok.*;
import javax.validation.constraints.Size;
import java.sql.Date;
@Schema(name = "MinSimsa680GroupDto", description = "심의목록 조회")
@Schema(name = "MinSimsa680GroupDto", description = "심의목록 조회: 주정차/거주자/장애인")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MinSimsa680GroupDto {
public class SimsaListDto {
@Schema(required = true, title = "심사년도", example = "2021", description = "심사년도")
@Size(min = 4, max = 4)
private String msYear;
@ -26,5 +26,8 @@ public class MinSimsa680GroupDto {
private String msClosesi;
private Long cnt;
@Schema(title = "데이타구분", example = "1", description = "데이타구분: 1-거주자,2-장애인")
private String msDatagb;
private String msuTeam;
}

@ -1,12 +1,12 @@
package com.xit.biz.ctgy.dto.struct;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import com.xit.core.support.jpa.mapstruct.IMapstruct;
import com.xit.core.support.jpa.mapstruct.MapStructMapperConfig;
import org.mapstruct.Mapper;
@Mapper(config = MapStructMapperConfig.class)
public interface MinSimsa680GroupMapstruct extends IMapstruct<MinSimsa680GroupDto, MinSimsa680> {
public interface MinSimsa680GroupMapstruct extends IMapstruct<SimsaListDto, MinSimsa680> {
}

@ -11,18 +11,18 @@ import java.util.Objects;
@Schema(name = "GnRecallSc", description = "")
@Table(name = "gn_recall_sc", schema = "traffic", catalog = "")
@Entity
@SequenceGenerator(
name = "RECALL_SC_SEQ_GEN",
sequenceName = "GN_RECALL_SC_SEQ",
allocationSize = 1 // default = 50 이므로 반드시 setting 필요
)
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class GnRecallSc {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "RECALL_SC_SEQ_GEN")

@ -11,11 +11,11 @@ import java.io.Serializable;
@Schema(name = "MinCivBoard680", description = "게시판")
@Table(name = "min_civ_board680", schema = "", catalog = "")
@Entity
@Getter
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class MinCivBoard680 implements Serializable {
private static final long SerialVersionUID = 1L;

@ -16,9 +16,9 @@ import java.io.Serializable;
@IdClass(MinMaincodePK.class)
@DynamicInsert
@DynamicUpdate
@Getter
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class MinMaincode implements Serializable {
private static final long SerialVersionUID = 1L;

@ -10,12 +10,12 @@ import javax.persistence.*;
@Schema(name = "MinSimsa680", description = "민원심사")
@Table(name = "min_simsa680", schema = "", catalog = "")
@Entity
@Getter
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Getter
@Builder
@DynamicInsert
@DynamicUpdate
public class MinSimsa680 { //implements Serializable {
//private static final long SerialVersionUID = 1L;
@ -24,25 +24,6 @@ public class MinSimsa680 { //implements Serializable {
@Column(name = "ms_maincode")
private Long msMaincode;
// @Schema(required = true, title = "민원코드", example = " ", description = "Input Description...")
//// @Column(name = "MS_MAINCODE", nullable = false)
// @OneToOne(fetch = FetchType.LAZY)
// @JoinColumn(name = "rc_code")
// /*private Long msMaincode;*/
// private Tf680Recall tf680Recall;
//@OneToMany(targetEntity = MinSimsaUser680.class, cascade = CascadeType.ALL, orphanRemoval = true)
//@JoinColumn(name = "msu_maincode")
//@OneToMany(targetEntity = MinSimsaUser680.class, mappedBy = "minSimsa680") //, fetch = FetchType.EAGER)//, cascade = CascadeType.ALL, orphanRemoval = true)
//private final Set<MinSimsaUser680> minSimsaUser680s = new HashSet<>();
@Schema(required = true, title = "접수번호", example = " ", description = "Input Description...")
@Column(name = "ms_seq", nullable = false)

@ -0,0 +1,86 @@
package com.xit.biz.ctgy.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Schema(name = "MinSimsa680Sc", description = "민원심사")
@Table(name = "min_simsa680_sc", schema = "", catalog = "")
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class MinSimsa680Sc { //implements Serializable {
//private static final long SerialVersionUID = 1L;
@Schema(required = true, title = "민원코드", example = " ", description = "Input Description...")
@Id
@Column(name = "ms_maincode")
private Long msMaincode;
@Schema(required = true, title = "접수번호", example = " ", description = "Input Description...")
@Column(name = "ms_seq", nullable = false)
private String msSeq;
@Schema(required = true, title = "차량번호", example = " ", description = "Input Description...")
@Column(name = "ms_carnum", nullable = false)
private String msCarnum;
@Schema(required = true, title = "년도", example = " ", description = "Input Description...")
@Column(name = "ms_year", nullable = false)
private String msYear;
@Schema(required = true, title = "차수", example = " ", description = "Input Description...")
@Column(name = "ms_chasu", nullable = false)
private Long msChasu;
@Schema(required = true, title = "심사시작일시", example = " ", description = "Input Description...")
@Column(name = "ms_sdate", nullable = false)
private java.sql.Date msSdate;
@Schema(required = true, title = "심사시작시간", example = " ", description = "Input Description...")
@Column(name = "ms_startsi", nullable = false)
private String msStartsi;
@Schema(required = true, title = "심사종료일시", example = " ", description = "Input Description...")
@Column(name = "ms_edate", nullable = false)
private java.sql.Date msEdate;
@Schema(required = true, title = "심사마감일시", example = " ", description = "Input Description...")
@Column(name = "ms_cdate", nullable = false)
private java.sql.Date msCdate;
@Schema(required = true, title = "심사마감시간", example = " ", description = "Input Description...")
@Column(name = "ms_closesi", nullable = false)
private String msClosesi;
@Schema(required = false, title = "단속일자", example = " ", description = "Input Description...")
@Column(name = "ms_wdate", nullable = true)
private java.sql.Date msWdate;
@Schema(required = false, title = "단속장소", example = " ", description = "Input Description...")
@Column(name = "ms_pos", nullable = true)
private String msPos;
@Schema(required = false, title = "결과코드", example = " ", description = "Input Description...")
@Column(name = "ms_result", nullable = true)
private String msResult;
@Schema(required = false, title = "단속시간", example = " ", description = "Input Description...")
@Column(name = "ms_jbtime", nullable = true)
private String msJbtime;
@Schema(required = false, title = "데이타구분", example = "1", description = "데이타구분: 1-거주자, 2-장애인")
@Column(name = "ms_datagb", nullable = false)
private String msDatagb;
}

@ -10,18 +10,18 @@ import java.io.Serializable;
@Schema(name = "MinSimsaUser680", description = "민원심사사용자매핑")
@Table(name = "min_simsa_user680", schema = "", catalog = "")
@Entity
@SequenceGenerator(
name = "SIMSA_USER680_SEQ_GEN",
sequenceName = "MIN_SIMSA_USER680_SEQ",
allocationSize = 1 // default = 50 이므로 반드시 setting 필요
)
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class MinSimsaUser680 implements Serializable {
private static final long SerialVersionUID = 1L;

@ -15,12 +15,12 @@ import java.util.Set;
@Schema(name = "MinUserinfo", description = "null")
@Table(name = "min_userinfo", schema = "", catalog = "")
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class MinUserinfo implements Serializable {
private static final long SerialVersionUID = 1L;

@ -1,9 +1,7 @@
package com.xit.biz.ctgy.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
@ -11,12 +9,14 @@ import javax.persistence.*;
import java.io.Serializable;
@Schema(name = "Tf680Main", description = "메인")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Data
@Entity
@Table(name = "tf680_main", schema = "", catalog = "")
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class Tf680Main implements Serializable {
private static final long SerialVersionUID = 1L;

@ -9,13 +9,13 @@ import javax.persistence.*;
import java.io.Serializable;
@Schema(name = "Tf680Recall", description = "민원")
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Data
@Entity
@Table(name = "tf680_recall", schema = "", catalog = "")
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Builder
public class Tf680Recall implements Serializable {
private static final long SerialVersionUID = 1L;
@ -114,6 +114,7 @@ public class Tf680Recall implements Serializable {
@Schema(required = false, title = "답변", example = " ", description = "Input Description...")
@Column(name = "rc_answer", nullable = true)
@Setter
private String rcAnswer;
@Schema(required = false, title = "URL", example = " ", description = "Input Description...")
@ -182,6 +183,7 @@ public class Tf680Recall implements Serializable {
@Schema(required = false, title = "인터넷심사전송상태(1:미전송, 2:전송)", example = " ", description = "Input Description...")
@Column(name = "rc_ir_transfer", nullable = true)
@Setter
private String rcIrTransfer;
@Schema(required = false, title = "삭제사유", example = " ", description = "Input Description...")

@ -1,6 +1,6 @@
package com.xit.biz.ctgy.repository;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
@ -10,8 +10,8 @@ import org.springframework.data.domain.Pageable;
import java.util.List;
public interface IParkingRepositoryCustom {
Page<MinSimsa680GroupDto> findParkings(final MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findParkingDetails(final MinSimsa680GroupDto minSimsa680GroupDto);
Page<SimsaListDto> findParkings(final SimsaListDto pMinSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findParkingDetails(final SimsaListDto minSimsa680GroupDto);
List<ParkingTargetDto> findParkingTargets(final ParkingTargetDto dto);

@ -8,7 +8,7 @@ import com.querydsl.core.types.dsl.CaseBuilder;
import com.querydsl.jpa.JPAExpressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
import com.xit.biz.ctgy.CtgyConstants;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
@ -33,19 +33,19 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
private final JPAQueryFactory queryFactory;
@Override
public Page<MinSimsa680GroupDto> findParkings(final MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) {
public Page<SimsaListDto> findParkings(final SimsaListDto dto, Pageable pageable) {
BooleanBuilder builder = new BooleanBuilder();
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsYear())) {
builder.and(minSimsa680.msYear.eq(pMinSimsa680GroupDto.getMsYear()));
if (!Checks.isEmpty(dto.getMsYear())) {
builder.and(minSimsa680.msYear.eq(dto.getMsYear()));
}
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsChasu())) {
builder.and(minSimsa680.msChasu.like(String.valueOf(pMinSimsa680GroupDto.getMsChasu())));
if (!Checks.isEmpty(dto.getMsChasu())) {
builder.and(minSimsa680.msChasu.like(String.valueOf(dto.getMsChasu())));
}
QueryResults<MinSimsa680GroupDto> rslt =
QueryResults<SimsaListDto> rslt =
queryFactory
.select(Projections.fields(
MinSimsa680GroupDto.class,
SimsaListDto.class,
minSimsa680.msYear,
minSimsa680.msChasu,
minSimsa680.msSdate,
@ -68,7 +68,7 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
}
@Override
public List<MinSimsa680> findParkingDetails(final MinSimsa680GroupDto dto) {
public List<MinSimsa680> findParkingDetails(final SimsaListDto dto) {
BooleanBuilder builder = new BooleanBuilder();
builder.and(minSimsa680.msSdate.eq(dto.getMsSdate()));

@ -7,7 +7,7 @@ import org.springframework.data.repository.query.Param;
public interface IResidentRepository extends JpaRepository<GnRecallSc, Long>, IResidentRepositoryCustom {
// TODO : Ansi - sql 미사용
// TODO : Ansi - sql 미사용, 채번테이블 사용하도록 변경 필요
//@Query(value = "SELECT max(e.sc_code) + 1 FROM gn_recall_sc e, nativeQuery = true)
@Query(value = "SELECT rpad(nvl(max(e.sc_seq), :year), 10, '0') + 1 FROM gn_recall_sc e WHERE e.sc_datagb = :scDatagb AND e.sc_seq LIKE :year||'%' ", nativeQuery = true)
Long getGnRecallScMaxScSeq(@Param("year") String year, @Param("scDatagb") String scDatagb);

@ -1,6 +1,7 @@
package com.xit.biz.ctgy.repository;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -9,4 +10,6 @@ public interface IResidentRepositoryCustom {
GnRecallScDto findResident(final Long scCode);
Page<SimsaListDto> findResidents(SimsaListDto dto, Pageable pageable);
}

@ -8,6 +8,8 @@ import com.querydsl.jpa.JPAExpressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
import com.xit.biz.ctgy.CtgyConstants;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.ResidentDto;
import com.xit.core.util.Checks;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
@ -19,6 +21,7 @@ import java.util.List;
import static com.xit.biz.cmm.entity.QCmmCodeS.cmmCodeS;
import static com.xit.biz.ctgy.entity.QGnRecallSc.gnRecallSc;
import static com.xit.biz.ctgy.entity.QMinSimsa680Sc.minSimsa680Sc;
@RequiredArgsConstructor
public class IResidentRepositoryImpl implements IResidentRepositoryCustom {
@ -166,4 +169,43 @@ WHERE SC_DATAGB = '1'
AND SC_CODE =
*/
}
@Override
public Page<SimsaListDto> findResidents(final SimsaListDto dto, Pageable pageable) {
BooleanBuilder builder = new BooleanBuilder();
if (!Checks.isEmpty(dto.getMsYear())) {
builder.and(minSimsa680Sc.msYear.eq(dto.getMsYear()));
}
if (!Checks.isEmpty(dto.getMsChasu())) {
builder.and(minSimsa680Sc.msChasu.eq(dto.getMsChasu()));
}
if (!Checks.isEmpty(dto.getMsDatagb())) {
builder.and(minSimsa680Sc.msDatagb.eq(dto.getMsDatagb()));
}
QueryResults<SimsaListDto> rslt =
queryFactory
.select(Projections.fields(
SimsaListDto.class,
minSimsa680Sc.msYear,
minSimsa680Sc.msChasu,
minSimsa680Sc.msSdate,
minSimsa680Sc.msStartsi,
minSimsa680Sc.msEdate,
minSimsa680Sc.msCdate,
minSimsa680Sc.msClosesi,
minSimsa680Sc.msDatagb,
minSimsa680Sc.count().as("cnt")
))
.from(minSimsa680Sc)
.where(builder)
.groupBy(minSimsa680Sc.msYear, minSimsa680Sc.msChasu, minSimsa680Sc.msSdate, minSimsa680Sc.msStartsi, minSimsa680Sc.msEdate, minSimsa680Sc.msCdate, minSimsa680Sc.msClosesi)
.orderBy(minSimsa680Sc.msYear.desc(), minSimsa680Sc.msChasu.desc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
.fetchResults();
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
}
}

@ -1,6 +1,6 @@
package com.xit.biz.ctgy.service;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import org.springframework.data.domain.Page;
@ -11,8 +11,8 @@ import java.util.List;
public interface IParkingService {
//Page<MinSimsa680GroupDto> findMinSimsa680Groups(MinSimsa680 minSimsa680, Pageable pageable);
Page<MinSimsa680GroupDto> findParkings(final MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findParkingDetails(final MinSimsa680GroupDto minSimsa680GroupDto);
Page<SimsaListDto> findParkings(final SimsaListDto minSimsa680GroupDto, Pageable pageable);
List<MinSimsa680> findParkingDetails(final SimsaListDto minSimsa680GroupDto);
List<ParkingTargetDto> findParkingTargets(final ParkingTargetDto dto) ;
// Page<MinSimsa680> findAll(final MinSimsa680 minSimsa680, Pageable pageable);

@ -1,7 +1,9 @@
package com.xit.biz.ctgy.service;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.ResidentDto;
import com.xit.biz.ctgy.dto.ResidentTargetDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -19,4 +21,6 @@ public interface IResidentService {
List<ResidentTargetDto> findResidentTargets(final ResidentTargetDto dto) ;
void saveResidentTargets(ResidentTargetDto dto);
Page<SimsaListDto> findResidents(SimsaListDto dto, Pageable pageable);
}

@ -1,7 +1,7 @@
package com.xit.biz.ctgy.service.impl;
import com.xit.biz.ctgy.CtgyConstants;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import com.xit.biz.ctgy.entity.MinSimsaUser680;
@ -48,13 +48,13 @@ public class ParkingService implements IParkingService {
@Override
@Transactional(readOnly = true)
public Page<MinSimsa680GroupDto> findParkings(final MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) {
public Page<SimsaListDto> findParkings(final SimsaListDto minSimsa680GroupDto, Pageable pageable) {
return simsaRepository.findParkings(minSimsa680GroupDto, pageable);
}
@Override
@Transactional(readOnly = true)
public List<MinSimsa680> findParkingDetails(final MinSimsa680GroupDto minSimsa680GroupDto) {
public List<MinSimsa680> findParkingDetails(final SimsaListDto minSimsa680GroupDto) {
return simsaRepository.findParkingDetails(minSimsa680GroupDto);
}
@ -97,7 +97,8 @@ public class ParkingService implements IParkingService {
.msuMaincode(rcCode)
.msuUserid(u.getUserid())
.msuResult(CtgyConstants.SimsaUserInfo.MSU_RESULT_NONE.getCode())
//.msuReason()
//.msuReaso
// n()
.msuTeam(dto.getMsuTeam())
//.msuIndate()
.build()

@ -4,6 +4,7 @@ import com.xit.biz.cmm.service.ICmmFileService;
import com.xit.biz.ctgy.CtgyConstants;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.ResidentTargetDto;
import com.xit.biz.ctgy.dto.SimsaListDto;
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
import com.xit.biz.ctgy.entity.*;
import com.xit.biz.ctgy.repository.*;
@ -113,6 +114,13 @@ public class ResidentService implements IResidentService {
}
}
@Override
public Page<SimsaListDto> findResidents(SimsaListDto dto, Pageable pageable) {
pageable = JpaUtil.getPagingInfo(pageable);
return repository.findResidents(dto, pageable);
}
@Override
@Transactional(readOnly = true)
public List<ResidentTargetDto> findResidentTargets(ResidentTargetDto dto) {
@ -166,4 +174,5 @@ public class ResidentService implements IResidentService {
//// simsaRepository.save
// return simsaRepository.findParkingTargets(dto);
}
}

Loading…
Cancel
Save