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

dev
minuk926 3 years ago
parent 0459af84b0
commit ed2d00964e

@ -7,6 +7,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
@Schema(name = "MinSimsaUser680", description = "민원심사사용자매핑") @Schema(name = "MinSimsaUser680", description = "민원심사사용자매핑")
@Table(name = "min_simsa_user680", schema = "", catalog = "") @Table(name = "min_simsa_user680", schema = "", catalog = "")
@ -53,7 +54,7 @@ public class MinSimsaUser680 implements Serializable {
@Schema(required = false, title = "입력일시", example = " ", description = "Input Description...") @Schema(required = false, title = "입력일시", example = " ", description = "Input Description...")
@Column(name = "msu_indate", nullable = true) @Column(name = "msu_indate", nullable = true)
private java.sql.Date msuIndate; private LocalDate msuIndate;

@ -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;
}

@ -1,7 +1,7 @@
package com.xit.biz.ctgy.repository; 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; import org.springframework.data.jpa.repository.JpaRepository;
public interface IJudgeUserRepository extends JpaRepository<MinSimsaUser680, Long> { public interface IJudgeUserRepository extends JpaRepository<MinSimsaUser680Sc, Long> {
} }

@ -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<MinSimsaUser680, Long> {
}

@ -8,10 +8,7 @@ import com.xit.biz.ctgy.entity.MinSimsaUser680;
import com.xit.biz.ctgy.entity.MinUserinfo; import com.xit.biz.ctgy.entity.MinUserinfo;
import com.xit.biz.ctgy.entity.Tf680Recall; import com.xit.biz.ctgy.entity.Tf680Recall;
import com.xit.biz.ctgy.mapper.IParkingMapper; import com.xit.biz.ctgy.mapper.IParkingMapper;
import com.xit.biz.ctgy.repository.IMinUserRepository; import com.xit.biz.ctgy.repository.*;
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.biz.ctgy.service.IParkingService;
import com.xit.core.constant.ErrorCode; import com.xit.core.constant.ErrorCode;
import com.xit.core.exception.CustomBaseException; import com.xit.core.exception.CustomBaseException;
@ -32,7 +29,7 @@ public class ParkingService implements IParkingService {
private final IParkingRepository repository; private final IParkingRepository repository;
private final IRecallRepository recallRepository; private final IRecallRepository recallRepository;
private final IMinUserRepository userRepository; private final IMinUserRepository userRepository;
private final IJudgeUserRepository judgeUserRepository; private final IParkingJudgeUserRepository parkingJudgeUserRepository;
private final IParkingMapper mapper; private final IParkingMapper mapper;
// @Override // @Override
@ -111,7 +108,7 @@ public class ParkingService implements IParkingService {
//.msuIndate() //.msuIndate()
.build() .build()
).collect(Collectors.toList()); ).collect(Collectors.toList());
judgeUserRepository.saveAll(simsaUserList); parkingJudgeUserRepository.saveAll(simsaUserList);
} }
} }

@ -6,10 +6,7 @@ import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeListDto; import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto; import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct; import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
import com.xit.biz.ctgy.entity.GnRecallSc; import com.xit.biz.ctgy.entity.*;
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.mapper.IResidentAndDisabledMapper; import com.xit.biz.ctgy.mapper.IResidentAndDisabledMapper;
import com.xit.biz.ctgy.repository.IJudgeUserRepository; import com.xit.biz.ctgy.repository.IJudgeUserRepository;
import com.xit.biz.ctgy.repository.IMinUserRepository; import com.xit.biz.ctgy.repository.IMinUserRepository;
@ -156,8 +153,8 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
CtgyConstants.UserInfo.ISENABLED_USE.getCode(), CtgyConstants.UserInfo.ISENABLED_USE.getCode(),
CtgyConstants.UserInfo.ACCESSTYPE_SIMSA.getCode()); CtgyConstants.UserInfo.ACCESSTYPE_SIMSA.getCode());
List<MinSimsaUser680> simsaUserList = userinfoList.stream().map(u -> List<MinSimsaUser680Sc> simsaUserList = userinfoList.stream().map(u ->
MinSimsaUser680.builder() MinSimsaUser680Sc.builder()
.msuMaincode(scCode) .msuMaincode(scCode)
.msuUserid(u.getUserid()) .msuUserid(u.getUserid())
.msuResult(CtgyConstants.SimsaUserInfo.MSU_RESULT_NONE.getCode()) .msuResult(CtgyConstants.SimsaUserInfo.MSU_RESULT_NONE.getCode())

Loading…
Cancel
Save