diff --git a/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680.java b/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680.java index 22b4e4c..57b5dd0 100644 --- a/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680.java +++ b/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680.java @@ -7,6 +7,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; import java.io.Serializable; +import java.time.LocalDate; @Schema(name = "MinSimsaUser680", description = "민원심사사용자매핑") @Table(name = "min_simsa_user680", schema = "", catalog = "") @@ -53,7 +54,7 @@ public class MinSimsaUser680 implements Serializable { @Schema(required = false, title = "입력일시", example = " ", description = "Input Description...") @Column(name = "msu_indate", nullable = true) - private java.sql.Date msuIndate; + private LocalDate msuIndate; diff --git a/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680Sc.java b/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680Sc.java new file mode 100644 index 0000000..75895fa --- /dev/null +++ b/src/main/java/com/xit/biz/ctgy/entity/MinSimsaUser680Sc.java @@ -0,0 +1,57 @@ +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.*; +import java.time.LocalDate; + +@Schema(name = "MinSimsaUser680Sc", description = "거주자/장애인 심사사용자매핑") +@Table(name = "min_simsa_user680_sc", schema = "", catalog = "") +@SequenceGenerator( + name = "SIMSA_USER680_SC_SEQ_GEN", + sequenceName = "MIN_SIMSA_USER680_SC_SEQ", + allocationSize = 1 // default = 50 이므로 반드시 setting 필요 +) +@Entity +@DynamicInsert +@DynamicUpdate +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@Getter +@Builder +public class MinSimsaUser680Sc { + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SIMSA_USER680_SC_SEQ_GEN") + @Schema(required = true, title = "민원심사사용자매핑코드", example = " ", description = "Input Description...") + @Column(name = "msu_code", nullable = false, length = 10) + private Long msuCode; + + @Schema(required = true, title = "민원코드", example = " ", description = "Input Description...") + @Column(name = "msu_maincode", length = 10) + private Long msuMaincode; + + @Schema(required = true, title = "민원심사사용자코드", example = " ", description = "Input Description...") + @Column(name = "msu_userid", nullable = false, length = 20) + private String msuUserid; + + @Schema(required = false, title = "결과코드", example = " ", description = "Input Description...") + @Column(name = "msu_result", nullable = true) + private String msuResult; + + @Schema(required = false, title = "사유", example = " ", description = "Input Description...") + @Column(name = "msu_reason", nullable = true) + private String msuReason; + + @Schema(required = true, title = "팀코드", example = " ", description = "Input Description...") + @Column(name = "msu_team", nullable = false) + private String msuTeam; + + @Schema(required = false, title = "입력일시", example = " ", description = "Input Description...") + @Column(name = "msu_indate", nullable = true) + private LocalDate msuIndate; + + +} diff --git a/src/main/java/com/xit/biz/ctgy/repository/IJudgeUserRepository.java b/src/main/java/com/xit/biz/ctgy/repository/IJudgeUserRepository.java index d7a7ebc..317806e 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IJudgeUserRepository.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IJudgeUserRepository.java @@ -1,7 +1,7 @@ package com.xit.biz.ctgy.repository; -import com.xit.biz.ctgy.entity.MinSimsaUser680; +import com.xit.biz.ctgy.entity.MinSimsaUser680Sc; import org.springframework.data.jpa.repository.JpaRepository; -public interface IJudgeUserRepository extends JpaRepository { +public interface IJudgeUserRepository extends JpaRepository { } diff --git a/src/main/java/com/xit/biz/ctgy/repository/IParkingJudgeUserRepository.java b/src/main/java/com/xit/biz/ctgy/repository/IParkingJudgeUserRepository.java new file mode 100644 index 0000000..cb48879 --- /dev/null +++ b/src/main/java/com/xit/biz/ctgy/repository/IParkingJudgeUserRepository.java @@ -0,0 +1,7 @@ +package com.xit.biz.ctgy.repository; + +import com.xit.biz.ctgy.entity.MinSimsaUser680; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface IParkingJudgeUserRepository extends JpaRepository { +} diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java b/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java index f84b674..82955a3 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java @@ -8,10 +8,7 @@ import com.xit.biz.ctgy.entity.MinSimsaUser680; import com.xit.biz.ctgy.entity.MinUserinfo; import com.xit.biz.ctgy.entity.Tf680Recall; import com.xit.biz.ctgy.mapper.IParkingMapper; -import com.xit.biz.ctgy.repository.IMinUserRepository; -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.repository.*; import com.xit.biz.ctgy.service.IParkingService; import com.xit.core.constant.ErrorCode; import com.xit.core.exception.CustomBaseException; @@ -32,7 +29,7 @@ public class ParkingService implements IParkingService { private final IParkingRepository repository; private final IRecallRepository recallRepository; private final IMinUserRepository userRepository; - private final IJudgeUserRepository judgeUserRepository; + private final IParkingJudgeUserRepository parkingJudgeUserRepository; private final IParkingMapper mapper; // @Override @@ -111,7 +108,7 @@ public class ParkingService implements IParkingService { //.msuIndate() .build() ).collect(Collectors.toList()); - judgeUserRepository.saveAll(simsaUserList); + parkingJudgeUserRepository.saveAll(simsaUserList); } } diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java index 519fe4f..95d777f 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java @@ -6,10 +6,7 @@ import com.xit.biz.ctgy.dto.GnRecallScDto; import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct; -import com.xit.biz.ctgy.entity.GnRecallSc; -import com.xit.biz.ctgy.entity.MinSimsa680; -import com.xit.biz.ctgy.entity.MinSimsaUser680; -import com.xit.biz.ctgy.entity.MinUserinfo; +import com.xit.biz.ctgy.entity.*; import com.xit.biz.ctgy.mapper.IResidentAndDisabledMapper; import com.xit.biz.ctgy.repository.IJudgeUserRepository; import com.xit.biz.ctgy.repository.IMinUserRepository; @@ -156,8 +153,8 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { CtgyConstants.UserInfo.ISENABLED_USE.getCode(), CtgyConstants.UserInfo.ACCESSTYPE_SIMSA.getCode()); - List simsaUserList = userinfoList.stream().map(u -> - MinSimsaUser680.builder() + List simsaUserList = userinfoList.stream().map(u -> + MinSimsaUser680Sc.builder() .msuMaincode(scCode) .msuUserid(u.getUserid()) .msuResult(CtgyConstants.SimsaUserInfo.MSU_RESULT_NONE.getCode())