From 4f36115eee9fa38088056bef85eb6f1f70253ef7 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 18 Aug 2023 18:07:13 +0900 Subject: [PATCH] =?UTF-8?q?ImportService,=20PayerService=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/fims/crdn/dao/ImportMapper.java | 79 +++++ .../xit/fims/crdn/service/ImportService.java | 14 + .../fims/crdn/service/bean/ImportBean.java | 271 ++++++++++++++++ .../crdn/service/bean/ImportServiceBean.java | 53 ++++ .../fims/crdn/web/InterfaceController.java | 42 +++ src/main/java/cokr/xit/fims/payer/Payer.java | 163 ++++++++++ .../java/cokr/xit/fims/payer/PayerQuery.java | 89 ++++++ .../cokr/xit/fims/payer/dao/PayerMapper.java | 107 +++++++ .../xit/fims/payer/service/PayerService.java | 55 ++++ .../fims/payer/service/bean/PayerBean.java | 82 +++++ .../payer/service/bean/PayerServiceBean.java | 55 ++++ .../xit/fims/payer/web/PayerController.java | 103 ++++++ src/main/resources/application.yml | 3 +- src/main/resources/intf-conf/file-job.conf | 2 +- .../sql/mapper/fims/crdn/import-mapper.xml | 41 +++ .../sql/mapper/fims/payer-mapper.xml | 299 ++++++++++++++++++ 16 files changed, 1456 insertions(+), 2 deletions(-) create mode 100644 src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java create mode 100644 src/main/java/cokr/xit/fims/crdn/service/ImportService.java create mode 100644 src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java create mode 100644 src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java create mode 100644 src/main/java/cokr/xit/fims/crdn/web/InterfaceController.java create mode 100644 src/main/java/cokr/xit/fims/payer/Payer.java create mode 100644 src/main/java/cokr/xit/fims/payer/PayerQuery.java create mode 100644 src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java create mode 100644 src/main/java/cokr/xit/fims/payer/service/PayerService.java create mode 100644 src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java create mode 100644 src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java create mode 100644 src/main/java/cokr/xit/fims/payer/web/PayerController.java create mode 100644 src/main/resources/sql/mapper/fims/crdn/import-mapper.xml create mode 100644 src/main/resources/sql/mapper/fims/payer-mapper.xml diff --git a/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java new file mode 100644 index 00000000..cf6ac83d --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java @@ -0,0 +1,79 @@ +package cokr.xit.fims.crdn.dao; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + +import cokr.xit.foundation.component.AbstractMapper; +import cokr.xit.foundation.data.DataObject; + +/**외부연계 파일을 단속 자료로 변환하기 위한 Mapper + * @author mjkhan + */ +@Mapper("importMapper") +public interface ImportMapper extends AbstractMapper { + /**국민신문고 민원의 기관코드, 부서코드를 조건으로 시군구코드를 조회한다. + * @param params 파라미터 + * + * @return 시군구코드 목록 + */ + List selectSggList(Map params); + + /**국민신문고 민원의 기관코드, 부서코드를 조건으로 시군구코드를 조회하여 {"기관코드-부서코드", "시군구코드"} 형식의 맵으로 반환한다. + * @param institutes 기관코드 + * @param depts 부서코드 + * @return 기관코드-부서코드별 시군구코드 + */ + default Map selectSggs(Iterable institutes, Iterable depts) { + DataObject params = params() + .set("institutes", institutes) + .set("depts", depts); + + List list = selectSggList(params); + return list.stream() + .collect(Collectors.toMap( + row -> row.get("INST_CD") + "-" + row.get("DEPT_CD"), + row -> row.string("SGG_CD") + )); + } + + /**업무코드를 조회한다. + * @return 업무코드 목록 + */ + List selectTaskCd(); + + /**업무코드를 조회하여 {"부서코드", "업무코드"} 형식의 맵으로 반환한다. + * @return {"부서코드", "업무코드"} 맵 + */ + default Map selectTaskMap() { + List list = selectTaskCd(); + return list.stream() + .collect(Collectors.toMap( + row -> row.string("DEPT_CD"), + row -> row.string("TASK_CD") + )); + } + + /**차종별 과태료 차종코드를 조회한다. + * @return 차종별 과태료 차종코드 목록 + */ + List selectCarMdlCd(); + + /**차종별 과태료 차종코드를 조회하여 {"차종종별 코드", "과태료 차종코드"} 형식의 맵으로 반환한다.
+ * 단, 차종종별코드가 "3"일 경우 최대적재량이 4000 kg 이하인 차량은 "3-1", 4000 kg보다 큰 차량은 "3-2"로 + * 차종종별 코드를 적용해야 한다. + * @return {"차종종별 코드", "과태료 차종코드"} 맵 + */ + default Map selectCarMdl() { + List list = selectCarMdlCd(); + return list.stream() + .collect(Collectors.toMap( + row -> row.string("VHCTY_ASORT_CODE"), + row -> row.string("FFNLG_CARMDL_CD") + )); + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/crdn/service/ImportService.java b/src/main/java/cokr/xit/fims/crdn/service/ImportService.java new file mode 100644 index 00000000..ff221469 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/ImportService.java @@ -0,0 +1,14 @@ +package cokr.xit.fims.crdn.service; + +import java.util.List; + +/**외부 연계 파일에서 단속자료를 추출하여 등록하는 서비스 + * @author mjkhan + */ +public interface ImportService { + /**국민신문고에서 수신한 연계파일에서 단속자료를 추출하여 등록한다. + * @param interfaceSequences 외부연계 아이디 + * @return 저장된 정보수 + */ + int createCrdns(List interfaceSequences); +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java new file mode 100644 index 00000000..bac38bbb --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java @@ -0,0 +1,271 @@ +package cokr.xit.fims.crdn.service.bean; + +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Component; + +import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.dao.ImportMapper; +import cokr.xit.fims.cvlc.CrdnCvlcpt; +import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.service.bean.PayerBean; +import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.util.DateFormats; +import cokr.xit.interfaces.lvis.service.bean.VehicleInfoBean; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest; +import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse; +import cokr.xit.interfaces.smg.Petition; +import cokr.xit.interfaces.smg.dao.SmgMapper; + +/**외부연계 파일에서 단속자료를 등록하는 Bean + * @author mjkhan + */ +@Component("importBean") +public class ImportBean extends AbstractComponent { + @Resource(name = "importMapper") + private ImportMapper importMapper; + @Resource(name = "smgMapper") + private SmgMapper smgMapper; + @Resource(name = "crdnCvlcptMapper") + private CrdnCvlcptMapper cvlcptMapper; + @Resource(name = "vehicleInfoBean") + private VehicleInfoBean vehicleInfoBean; + @Resource(name = "payerBean") + private PayerBean payerBean; + + /**국민신문고 민원파일에서 단속자료를 추출하여 등록한다. + * @param interfaceSequences 외부연계 키 + * @return 저장된 정보수 + */ + public List createCrdns(List petitions) { + if (isEmpty(petitions)) return Collections.emptyList(); + + Map + ssgs = getSSGs(petitions), + tasks = importMapper.selectTaskMap(), //TODO: 업무구분 추출 다시 검토할 것 + carModels = importMapper.selectCarMdl(); + List crdns = create(petitions, ssgs, tasks); + + BiFunction getCarModel = (vhctyAsortCd, mxmmLdg) -> { + if (isEmpty(vhctyAsortCd)) return null; + + if ("3".equals(vhctyAsortCd)) { + int weight = toInt(mxmmLdg); + if (weight < 1) return null; + + vhctyAsortCd = weight <= 4000 ? "3-1" : "3-2"; + } + return carModels.get(vhctyAsortCd); + }; + setVehicleInfo(crdns, getCarModel); + return crdns; + } + + /**민원의 기관코드, 부서코드를 조건으로 시군구 코드를 조회한다. + * @param petitions 국민신문고 민원 + * @return 기관코드, 부서코드별 시군구 코드("기관코드-부서코드", "시군구코드") + */ + private Map getSSGs(List petitions) { + List + institutes = petitions.stream().map(petition -> petition.getPcdAncCodeV()).toList(), + depts = petitions.stream().map(petition -> petition.getPcdDeptV()).toList(); + return importMapper.selectSggs(institutes, depts); + } + + /**국민신문고 민원에서 단속자료를 생성하여 반환한다. + * @param petitions 국민신문고 민원 + * @param sggs 시군구코드 + * @return 단속자료 목록 + */ + private List create(List petitions, Map sggs, Map tasks) { + Petition.Violation violation = new Petition.Violation(); + DateFormats dateFormats = new DateFormats(); + + return petitions.stream() + .flatMap(petition -> { + violation + .setTitle(petition.getPetiTitleV()) + .setReason(petition.getPetiReasonL()); + + Map>> byVehicleNo = violation.getVehicleNoDatetimes().stream() + .collect(Collectors.groupingBy(map -> map.get("vehicleNo"))); //차량번호별 단속정보 + List vehicleNos = List.copyOf(byVehicleNo.keySet()); + + return byVehicleNo.entrySet().stream() + .map(entry -> { + String vehicleNo = entry.getKey(); + boolean first = vehicleNos.indexOf(vehicleNo) < 1; + Crdn crdn = new Crdn(); + + String instDept = petition.getPcdAncCodeV() + "-" + petition.getPcdDeptV(), + sgg = sggs.get(instDept); + crdn.setSggCd(sgg); + String dept = petition.getPcdDeptV(); + crdn.setTaskSeCd(ifEmpty(tasks.get(dept), () -> tasks.get("default"))); + + crdn.setCrdnRegSeCd(first ? "02" : "04"); // 첫번째면 자동등록, 아니면 복사등록 (FIM026) + crdn.setCrdnInptSeCd("14"); // 국민신문고 연계 (FIM003) + + crdn.setLinkTblNm("TB_ESB_INTERFACE"); + crdn.setLinkId(petition.getInterfaceSeqN()); + + //crdn.setCrdnSeCd(null); // petition.getPetiPathGubunC() -> FIMS 코드로 변경 + + crdn.setVhrno(vehicleNo); //차량번호 + List> datetimes = entry.getValue(); + String str = datetimes.get(datetimes.size() - 1).get("datetime"); //해당 차량의 마지막 날짜시간 + Date datetime = dateFormats.parse("yyyyMMddHHmmss", str); + crdn.setCrdnYmd(dateFormats.format("yyyyMMdd", datetime)); //단속일자 + String time = dateFormats.format("HHmmss", datetime); + crdn.setCrdnTm(time); //단속시간 + crdn.setCrdnBgngTm(time); + + String location = violation.getLocation(); //단속장소 + crdn.setCrdnStdgNm(violation.getDong(location)); + crdn.setCrdnPlc(location); + crdn.setDtlCrdnPlc(null); + + crdn.setTeamId(null); + crdn.setCrdnSpareaCd("00"); + crdn.setCrdnBgngTm(null); + crdn.setCrdnEndTm(null); + crdn.setCrdnSn(null); + + Map coordinates = violation.getCoordinates(); + crdn.setGpsX(coordinates.get("latitude")); + crdn.setGpsY(coordinates.get("longitude")); + + crdn.setTowngYn("N"); + crdn.setParkngPsbltyRsltCd("0"); + crdn.setOvtimeYn("N"); + crdn.setOpnnSbmsnYn("N"); + crdn.setCrdnSttsCd("01"); + + crdn.setVltnCd(violation.getCode()); + + crdn.setAtchFileCnt(petition.getAttachmentCount()); + return crdn; + }); + }) + .toList(); + } + + /**단속 정보에 차량 정보를 설정한다. + * @param crdns + * @param basicInfoMap + */ + private void setVehicleInfo(List crdns, BiFunction getCarModel) { + List reqs = crdns.stream() + .filter(crdn -> !isEmpty(crdn.getVhrno())) + .map(crdn -> { + BasicInfoRequest req = new BasicInfoRequest(); + req.setLevy_stdde(crdn.getCrdnYmd()); + req.setVhrno(crdn.getVhrno()); + return req; + }).toList(); + Map vehicleInfoMap = vehicleInfoBean.getBasicInfo(reqs); + + crdns.forEach(crdn -> { + String vhrno = crdn.getVhrno(); + BasicInfoResponse resp = vehicleInfoMap.get(vhrno); + if (resp == null) return; + + BasicInfoResponse.BasicInfo basicInfo = resp.getBasicInfo(); + Payer payer = getPayer(crdn.getSggCd(), basicInfo); + if (payer != null) + crdn.setRtpyrId(payer.getRtpyrId()); // TODO: 차적 차량번호 + 소유자 회원번호 == tb_payer.차량번호 + 납부자 번호 -> tb_payer.납부자 id + crdn.setVin(basicInfo.getVin()); + crdn.setVhclNm(basicInfo.getCnm()); + crdn.setVhclColor(basicInfo.getColor_nm()); + crdn.setUseFuelCd(basicInfo.getUse_fuel_code()); + crdn.setFfnlgCarmdlCd(getCarModel.apply(basicInfo.getVhcty_asort_code(), basicInfo.getMxmm_ldg())); + }); + } + + private Payer getPayer(String sggCd, BasicInfoResponse.BasicInfo basicInfo) { + Payer payer = new Payer(); + + payer.setSggCd(sggCd); + String vhrno = basicInfo.getVhrno(); + payer.setVhrno(vhrno); + payer.setRtpyrSeCd(basicInfo.getMber_se_code()); + String rtpyrNo = basicInfo.getMber_se_no(); + payer.setRtpyrNo(rtpyrNo); + payer.setRtpyrNm(basicInfo.getMber_nm()); + payer.setRtpyrTelno(basicInfo.getTelno()); + payer.setRoadNmCd(basicInfo.getUse_strnghld_road_nm_code()); + payer.setUdgdSeCd(basicInfo.getUsgsrhld_undgrnd_buld_se_code()); + String str = basicInfo.getUse_strnghld_buld_main_no(); + if (!isEmpty(str)) + payer.setBmno(toInt(str)); + str = basicInfo.getUse_strnghld_buld_sub_no(); + if (!isEmpty(str)) + payer.setBsno(toInt(str)); + payer.setStdgCd(basicInfo.getUse_strnghld_legaldong_code()); + payer.setDongCd(basicInfo.getUse_strnghld_adstrd_code()); + payer.setMtnSeCd(basicInfo.getUse_strnghld_mntn()); + str = basicInfo.getUse_strnghld_lnbr(); + if (!isEmpty(str)) + payer.setMno(toInt(str)); + str = basicInfo.getUse_strnghld_ho(); + if (!isEmpty(str)) + payer.setSno(toInt(str)); + payer.setDtlAddr(basicInfo.getUse_strnghld_adres_nm()); + payer.setWholAddr(basicInfo.getOwner_adres_full()); + + boolean saved = payerBean.create(payer); + if (saved) + return payer; + + return payerBean.getPayer(vhrno, rtpyrNo); + } + + public int createCvlcpts(List petitions) { + int affected = 0; + UnaryOperator parseDate = str -> { + return str == null ? null : + str.replace("-", "") + .replace(":", "") + .replace(" ", ""); + }; + Petition.Violation violation = new Petition.Violation(); + for (Petition petition: petitions) { + violation.setTitle(petition.getPetiTitleV()).setReason(petition.getPetiReasonL()); + CrdnCvlcpt cvlcpt = new CrdnCvlcpt(); + + cvlcpt.setCvlcptLinkId(petition.getInterfaceSeqN()); + cvlcpt.setDstrbncYn("03".equals(violation.getCode()) ? "Y" : "N"); + String rcptYmd = parseDate.apply(petition.getAncRegD()); + if (rcptYmd != null && rcptYmd.length() >= 8) + cvlcpt.setCvlcptRcptYmd(rcptYmd.substring(0, 8)); + cvlcpt.setCvlcptAplySeCd(petition.getPetiGubunC()); + cvlcpt.setCvlcptAplyNo(petition.getPetiNoC()); + cvlcpt.setCvlcptRcptNo(petition.getCivilNoC()); + cvlcpt.setCvlcptListNo(null); //민원 목록 번호 + cvlcpt.setCvlcptAplcntNm(petition.getPeterNameV()); + cvlcpt.setCvlcptAplyDt(parseDate.apply(petition.getPetiRegD())); + cvlcpt.setCvlcptAplyTtlNm(petition.getPetiTitleV()); + cvlcpt.setCvlcptAplyCn(petition.getPetiReasonL()); + cvlcpt.setCvlcptGist(petition.getCivilGistV()); + cvlcpt.setCvlcptPrcsPicNm(petition.getDutyIdV()); + cvlcpt.setCvlcptPrcsPrnmntDt(parseDate.apply(petition.getPetiEndD())); + cvlcpt.setCvlcptPrcsCd(null);; // 민원 처리 코드 + cvlcpt.setCvlcptPrcsSumry(petition.getCivilAbstractL()); + cvlcpt.setCvlcptPrcsRsltCn(petition.getPcdRstContL()); + cvlcpt.setCvlcptPrcsCmptnDt(parseDate.apply(petition.getDoRegD())); + cvlcpt.setCvlcptPrcsPic(petition.getDutyIdV()); + cvlcptMapper.insertCvlcpt(cvlcpt); + } + + return affected; + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java new file mode 100644 index 00000000..c8030c5b --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java @@ -0,0 +1,53 @@ +package cokr.xit.fims.crdn.service.bean; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import cokr.xit.base.file.FileInfo; +import cokr.xit.base.file.service.bean.FileBean; +import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.service.CrdnService; +import cokr.xit.fims.crdn.service.ImportService; +import cokr.xit.foundation.component.AbstractServiceBean; +import cokr.xit.interfaces.smg.Petition; +import cokr.xit.interfaces.smg.service.bean.SmgReceiverBean; + +/**외부 연계 파일에서 단속자료를 추출하여 등록하는 서비스의 구현체 + * @author mjkhan + */ +@Service("importService") +public class ImportServiceBean extends AbstractServiceBean implements ImportService { + @Resource(name = "smgReceiverBean") + private SmgReceiverBean smgBean; + @Resource(name = "importBean") + private ImportBean importBean; + @Resource(name = "fileBean") + private FileBean fileBean; + @Resource(name = "crdnService") + private CrdnService crdnService; + + @Override + public int createCrdns(List interfaceSequences) { + List petitions = smgBean.getPetitions(interfaceSequences); + List crdns = importBean.createCrdns(petitions); + if (crdns.isEmpty()) return 0; + + List intfSeqs = crdns.stream().map(Crdn::getLinkId).toList(); + Map> byInfoKey = fileBean.getFilesOf("010", intfSeqs.toArray(new String[intfSeqs.size()])).stream() + .collect(Collectors.groupingBy(FileInfo::getInfoKey)); + + for (Crdn crdn: crdns) { + List files = byInfoKey.get(crdn.getLinkId()); + crdnService.create(null, crdn, files); + } + + importBean.createCvlcpts(petitions); + + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/crdn/web/InterfaceController.java b/src/main/java/cokr/xit/fims/crdn/web/InterfaceController.java new file mode 100644 index 00000000..dd604cf4 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/web/InterfaceController.java @@ -0,0 +1,42 @@ +package cokr.xit.fims.crdn.web; + +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import cokr.xit.base.web.ApplicationController; +import cokr.xit.fims.crdn.service.ImportService; + +@Controller("fimsInterface") +@RequestMapping(value = "/interface/smg", name = "국민 신문고 민원") +public class InterfaceController extends ApplicationController { + @Resource(name = "importService") + private ImportService importService; + + /**국민 신문고에서 받은 민원을 등록했음을 통보한다. + * @param interfaceSequences 민원의 인터페이스 키 목록 + * @return jsonView + *
  • received - 통보 수신 여부(true || false)
  • + *
  • saved - 저장 여부(true || false)
  • + *
+ */ + @PostMapping(value = "/petition/receive.do", name = "국민 신문고 민원 수신") + public ModelAndView importSmgPetition(@RequestBody Map params) { + List intfSeqs = (List)params.get("interfaceSequences"); + boolean empty = isEmpty(intfSeqs); + log().debug("interfaceSequences received: {}", empty ? "none" : String.join(", ", intfSeqs)); + + int affected = importService.createCrdns(intfSeqs); + return new ModelAndView("jsonView") + .addObject("received", !empty) + .addObject("affected", affected) + .addObject("saved", true); + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/Payer.java b/src/main/java/cokr/xit/fims/payer/Payer.java new file mode 100644 index 00000000..e73f94f9 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/Payer.java @@ -0,0 +1,163 @@ +package cokr.xit.fims.payer; + +import cokr.xit.foundation.AbstractEntity; +import lombok.Getter; +import lombok.Setter; + +/** + * 납부자 대장 + * @author mjkhan + */ +@Getter +@Setter +public class Payer extends AbstractEntity { + /** + * 납부자 ID + */ + private String rtpyrId; + + /** + * 시군구 코드 + */ + private String sggCd; + + /** + * 납부자 입력 구분 코드 + */ + private String rtpyrInptSeCd; + + /** + * 납부자 구분 코드 + */ + private String rtpyrSeCd; + + /** + * 납부자 번호 + */ + private String rtpyrNo; + + /** + * 납부자 명 + */ + private String rtpyrNm; + + /** + * 납부자 이메일 + */ + private String rtpyrEml; + + /** + * 납부자 생년월일 + */ + private String rtpyrBrdt; + + /** + * 납부자 상태 코드 + */ + private String rtpyrSttsCd; + + /** + * 주소 구분 코드 + */ + private String addrSeCd; + + /** + * 우편번호 + */ + private String zip; + + /** + * 도로 명 코드 + */ + private String roadNmCd; + + /** + * 지하 구분 코드 + */ + private String udgdSeCd; + + /** + * 건물본번 + */ + private Integer bmno; + + /** + * 건물부번 + */ + private Integer bsno; + + /** + * 건물 관리 번호 + */ + private String bldgMngNo; + + /** + * 법정동 코드 + */ + private String stdgCd; + + /** + * 행정동 코드 + */ + private String dongCd; + + /** + * 산 구분 코드 + */ + private String mtnSeCd; + + /** + * 본번 + */ + private Integer mno; + + /** + * 부번 + */ + private Integer sno; + + /** + * 특수 동 + */ + private String spclDong; + + /** + * 특수 호 + */ + private String spclHo; + + /** + * 특수 주소 + */ + private String spclAddr; + + /** + * 주소 + */ + private String addr; + + /** + * 상세 주소 + */ + private String dtlAddr; + + /** + * 전체 주소 + */ + private String wholAddr; + + /** + * 차량번호 + */ + private String vhrno; + + /** + * 납부자 전화번호 + */ + private String rtpyrTelno; + + /** + * 납부자 휴대 전화번호 + */ + private String rtpyrMblTelno; +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/PayerQuery.java b/src/main/java/cokr/xit/fims/payer/PayerQuery.java new file mode 100644 index 00000000..8f9d9663 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/PayerQuery.java @@ -0,0 +1,89 @@ +package cokr.xit.fims.payer; + +import cokr.xit.foundation.component.QueryRequest; + +/**납부자 대장 정보 조회 요청 + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +public class PayerQuery extends QueryRequest { + private static final long serialVersionUID = 1L; + + /** + * 납부자 ID + */ + private String[] rtpyrIds; + /** 차량번호 */ + private String vhrno; + /** 납부자번호 */ + private String rtpyrNo; + + /**납부자 ID를 반환한다. + * @return 납부자 ID + */ + public String[] getRtpyrIds() { + return ifEmpty(rtpyrIds, () -> null); + } + + /**납부자 ID를 설정한다. + * @param rtpyrIds 납부자 ID + * @return 현재 PayerQuery + */ + public PayerQuery setRtpyrIds(String... rtpyrIds) { + this.rtpyrIds = rtpyrIds; + return this; + } + + /**납부자 ID를 반환한다. + * @return 납부자 ID + */ + public String getRtpyrId() { + return !isEmpty(rtpyrIds) ? rtpyrIds[0] : null; + } + + /**납부자 ID를 설정한다. + * @param rtpyrIds 납부자 ID + * @return 현재 PayerQuery + */ + public PayerQuery setRtpyrId(String rtpyrId) { + return setRtpyrIds(rtpyrId); + } + + /**차량번호를 반환한다. + * @return 차량번호 + */ + public String getVhrno() { + return vhrno; + } + + /**차량번호를 설정한다. + * @param vhrno 차량번호 + * @return 현재 PayerQuery + */ + public PayerQuery setVhrno(String vhrno) { + this.vhrno = vhrno; + return this; + } + + /**납부자 번호를 반환한다. + * @return 납부자 번호 + */ + public String getRtpyrNo() { + return rtpyrNo; + } + + /**납부자 번호를 설정한다. + * @param rtpyrNo 납부자 번호 + * @return 현재 PayerQuery + */ + public PayerQuery setRtpyrNo(String rtpyrNo) { + this.rtpyrNo = rtpyrNo; + return this; + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java b/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java new file mode 100644 index 00000000..2a12f103 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/dao/PayerMapper.java @@ -0,0 +1,107 @@ +package cokr.xit.fims.payer.dao; + +import java.util.List; +import java.util.Map; + +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.PayerQuery; +import cokr.xit.foundation.component.AbstractMapper; +import cokr.xit.foundation.data.DataObject; + +/** 납부자 대장 정보 DAO + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +@Mapper("payerMapper") +public interface PayerMapper extends AbstractMapper { + /**지정한 조건에 따라 납부자 대장 목록을 조회하여 반환한다.
+ * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 목록 + */ + List selectPayerList(PayerQuery req); + + /**지정한 조건에 따라 납부자 대장 객체들을 반환한다. + * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 객체 목록 + */ + List selectPayers(PayerQuery req); + + /**납부자 대장 정보를 등록한다. + * @param payer 납부자 대장 + * @return 저장된 정보수 + */ + int insertPayer(Payer payer); + + /**납부자 대장 정보를 등록한다. + * @param params 파라미터 + *
  • "payer" - 납부자 대장
  • + *
+ * @return 저장된 정보수 + */ + int insertHistory(Map params); + + /**납부자 대장 정보를 등록한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + default boolean insert(Payer payer) { + boolean saved = insertPayer(payer) > 0; + if (saved) { + DataObject params = params().set("payer", payer); + insertHistory(params); + } + return saved; + } + + /**납부자 대장 정보를 수정한다. + * @param params 파라미터 + *
  • "payer" - 납부자 대장
  • + *
  • "currentUser" - 현재 접속한 사용자
  • + *
+ * @return 저장된 정보수 + */ + int updatePayer(Payer payer); + + /**납부자 대장 정보를 수정한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + default boolean update(Payer payer) { + boolean saved = updatePayer(payer) == 1; + if (saved) { + DataObject params = params().set("payer", payer); + insertHistory(params); + } + return saved; + } + + /**지정한 납부자 대장을 삭제한다. + * @param params 파라미터 + *
  • "rtpyrIds" - 납부자 아이디
  • + *
+ * @return 저장된 정보수 + */ + int deletePayer(Map params); + + /**납부자 대장 정보를 삭제한다. + * @param rtpyrIds 납부자 아이디 + * @return 저장된 정보수 + */ + default int delete(String... rtpyrIds) { + return !isEmpty(rtpyrIds) ? deletePayer(params().set("rtpyrIds", rtpyrIds)) : 0; + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/service/PayerService.java b/src/main/java/cokr/xit/fims/payer/service/PayerService.java new file mode 100644 index 00000000..bc50ecc5 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/service/PayerService.java @@ -0,0 +1,55 @@ +package cokr.xit.fims.payer.service; + +import java.util.List; + +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.PayerQuery; +import cokr.xit.foundation.data.DataObject; + +/**납부자 대장 관리 서비스 인터페이스. + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +public interface PayerService { + /**지정한 조건에 따라 납부자 대장 목록을 조회하여 반환한다. + * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 목록 + */ + List getPayerList(PayerQuery req); + + /**지정한 조건에 따라 납부자 대장 객체들을 반환한다. + * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 객체 목록 + */ + List getPayers(PayerQuery req); + + /**납부자 대장 정보를 등록한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + boolean create(Payer payer); + + /**납부자 대장 정보를 수정한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + boolean update(Payer payer); + + /**납부자 대장 정보를 삭제한다. + * @param rtpyrIds 납부자 아이디 + * @return 저장된 정보수 + */ + public int remove(String... rtpyrIds); +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java b/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java new file mode 100644 index 00000000..3fda3b0e --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/service/bean/PayerBean.java @@ -0,0 +1,82 @@ +package cokr.xit.fims.payer.service.bean; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Component; + +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.PayerQuery; +import cokr.xit.fims.payer.dao.PayerMapper; +import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.data.DataObject; + +/**납부자 대장 정보 관리 Bean + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +@Component("payerBean") +public class PayerBean extends AbstractComponent { + /** 납부자 대장 정보 DAO */ + @Resource(name = "payerMapper") + private PayerMapper payerMapper; + + /**지정한 조건에 따라 납부자 대장 목록을 조회하여 반환한다. + * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 목록 + */ + public List getPayerList(PayerQuery req) { + return payerMapper.selectPayerList(req); + } + + /**지정한 조건에 따라 납부자 대장 객체들을 반환한다. + * @param req 납부자 대장 조회 조건 + * @return 납부자 대장 객체 목록 + */ + public List getPayers(PayerQuery req) { + return payerMapper.selectPayers(req); + } + + public Payer getPayer(String vhrno, String rtpyrNo) { + PayerQuery req = new PayerQuery().setVhrno(vhrno).setRtpyrNo(rtpyrNo); + List payers = getPayers(req); + return !payers.isEmpty() ? payers.get(0) : null; + } + + /**납부자 대장 정보를 등록한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + public boolean create(Payer payer) { + return payerMapper.insert(payer); + } + + /**납부자 대장 정보를 수정한다. + * @param payer 납부자 대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + public boolean update(Payer payer) { + return payerMapper.update(payer); + } + + /**납부자 대장 정보를 삭제한다. + * @param rtpyrIds 납부자 아이디 + * @return 저장된 정보수 + */ + public int remove(String... rtpyrIds) { + return payerMapper.delete(rtpyrIds); + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java b/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java new file mode 100644 index 00000000..198d2793 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/service/bean/PayerServiceBean.java @@ -0,0 +1,55 @@ +package cokr.xit.fims.payer.service.bean; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.PayerQuery; +import cokr.xit.fims.payer.service.PayerService; +import cokr.xit.foundation.component.AbstractServiceBean; +import cokr.xit.foundation.data.DataObject; + +/**납부자 대장 서비스 구현체. + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +@Service("payerService") +public class PayerServiceBean extends AbstractServiceBean implements PayerService { + /** 납부자 대장 정보 Bean */ + @Resource(name = "payerBean") + private PayerBean payerBean; + + @Override + public List getPayerList(PayerQuery req) { + return payerBean.getPayerList(req); + } + + @Override + public List getPayers(PayerQuery req) { + return payerBean.getPayers(req); + } + + @Override + public boolean create(Payer payer) { + return payerBean.create(payer); + } + + @Override + public boolean update(Payer payer) { + return payerBean.update(payer); + } + + @Override + public int remove(String... rtpyrIds) { + return payerBean.remove(rtpyrIds); + } +} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/payer/web/PayerController.java b/src/main/java/cokr/xit/fims/payer/web/PayerController.java new file mode 100644 index 00000000..3d9630a9 --- /dev/null +++ b/src/main/java/cokr/xit/fims/payer/web/PayerController.java @@ -0,0 +1,103 @@ +package cokr.xit.fims.payer.web; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import cokr.xit.fims.payer.Payer; +import cokr.xit.fims.payer.PayerQuery; +import cokr.xit.fims.payer.service.PayerService; +import cokr.xit.foundation.web.AbstractController; + +/**납부자 서비스의 웹 컨트롤러 + * + *

상세 설명: + * + *

+ * ============ 변경 이력 ============
+ * 2023-08-18	mjkhan 최초 작성
+ * ================================
+ * 
+ */ +@RequestMapping(name = "납부자", value = "/payer") +public class PayerController extends AbstractController { + /**납부자 서비스*/ + @Resource(name = "payerService") + private PayerService payerService; + + /**납부자 관리 메인화면(payer/payer-main)을 연다. + * 조건없는 {@link #getPayerList(PayerQuery) 납부자 조회 결과}를 포함시킨다. + * @return /payer/payer-main + */ + @RequestMapping(name = "납부자 메인", value = "/main.do") + public ModelAndView main() { + ModelAndView mav = getPayerList(new PayerQuery().setPageNum(1)); + mav.setViewName("/payer/payer-main"); + return mav.addObject("payerList", toJson(mav.getModel().get("payerList"))); + } + + /**납부자 목록을 조회하여 반환한다.
+ * {@link PayerService#getPayerList(PayerQuery)} 참고 + * @param req 납부자 조회 조건 + * @return jsonView + *
 {
+	 *     "payerList": [납부자 목록]
+	 *     "payerStart": 납부자 목록 시작 인덱스
+	 *     "payerFetch": 한 번에 가져오는 납부자 목록 수
+	 *     "payerTotal": 조회 결과 찾은 전체 납부자 수
+	 * }
+ */ + @RequestMapping(name = "납부자 조회", value = "/list.do") + public ModelAndView getPayerList(PayerQuery req) { + List result = payerService.getPayerList(setFetchSize(req)); + return setCollectionInfo(new ModelAndView("jsonView"), result, "payer"); + } + + /**납부자를 등록한다. + * @param payer 납부자 정보 + * @return jsonView + *
 {
+	 *     "saved": 등록되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + @PostMapping(name = "납부자 등록", value = "/create.do") + public ModelAndView create(Payer payer) { + boolean saved = payerService.create(payer); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + + /**납부자 정보를 수정한다. + * @param payer 납부자 정보 + * @return jsonView + *
 {
+	 *     "saved": 수정되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + @PostMapping(name = "납부자 수정", value = "/update.do") + public ModelAndView update(Payer payer) { + boolean saved = payerService.update(payer); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + + /**지정한 납부자를 제거한다. + * @param payerIDs 납부자 아이디 + * @return jsonView + *
 {
+	 *     "affected": 저장된 정보수
+	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + @PostMapping(name = "납부자 제거", value = "/remove.do") + public ModelAndView remove(String... rtpyrIds) { + int affected = payerService.remove(rtpyrIds); + return new ModelAndView("jsonView") + .addObject("affected", affected) + .addObject("saved", affected > 0); + } +} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 223948e8..8b2fbdd9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,5 @@ server: - #port: 18080 +# port: 18080 servlet: context-path: / @@ -52,6 +52,7 @@ propertyService: - tempDir: C:\temp - pageUnit: 10 - pageSize: 10 + - permitAccess: /api/**/*.do,/interface/**/*.do extFileName: - encoding: UTF-8 filename: classpath*:intf-conf/xit-lvis.properties diff --git a/src/main/resources/intf-conf/file-job.conf b/src/main/resources/intf-conf/file-job.conf index b6736b39..53cebdbf 100644 --- a/src/main/resources/intf-conf/file-job.conf +++ b/src/main/resources/intf-conf/file-job.conf @@ -24,7 +24,7 @@ "name": "smg-receive", "dirCode": "smg", /* <-- dirCodes */ "infoType": "010", - "alert": "http://localhost:8080/api/smg/petition/receive.do" /* 업무 통보 url */ + "alert": "http://localhost:8080/interface/smg/petition/receive.do" /* 업무 통보 url */ }, { /* 국민신문고 전송 */ "name": "smg-send", diff --git a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml new file mode 100644 index 00000000..49512477 --- /dev/null +++ b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/fims/payer-mapper.xml b/src/main/resources/sql/mapper/fims/payer-mapper.xml new file mode 100644 index 00000000..04bc5a0a --- /dev/null +++ b/src/main/resources/sql/mapper/fims/payer-mapper.xml @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT RTPYR_ID + , SGG_CD + , RTPYR_INPT_SE_CD + , RTPYR_SE_CD + , RTPYR_NO + , RTPYR_NM + , RTPYR_EML + , RTPYR_BRDT + , RTPYR_STTS_CD + , ADDR_SE_CD + , ZIP + , ROAD_NM_CD + , UDGD_SE_CD + , BMNO + , BSNO + , BLDG_MNG_NO + , STDG_CD + , DONG_CD + , MTN_SE_CD + , MNO + , SNO + , SPCL_DONG + , SPCL_HO + , SPCL_ADDR + , ADDR + , DTL_ADDR + , WHOL_ADDR + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + , VHRNO + , RTPYR_TELNO + , RTPYR_MBL_TELNO + FROM TB_PAYER + + + + + +/* 납부자 대장 등록(payerMapper.insertPayer) */ + +SELECT CONCAT(THIS_YEAR, LPAD(IFNULL(SUBSTR(MAX(RTPYR_ID), 5) + 1, 1), 16, '0')) NEW_ID + FROM TB_PAYER A + , (SELECT DATE_FORMAT(CURRENT_DATE, '%Y') THIS_YEAR) B + WHERE RTPYR_ID LIKE CONCAT(THIS_YEAR, '%') +INSERT INTO TB_PAYER ( + RTPYR_ID + , SGG_CD + , VHRNO + , RTPYR_INPT_SE_CD + , RTPYR_SE_CD + , RTPYR_NO + , RTPYR_NM + , RTPYR_TELNO + , RTPYR_MBL_TELNO + , RTPYR_EML + , RTPYR_BRDT + , RTPYR_STTS_CD + , ADDR_SE_CD + , ZIP + , ROAD_NM_CD + , UDGD_SE_CD + , BMNO + , BSNO + , BLDG_MNG_NO + , STDG_CD + , DONG_CD + , MTN_SE_CD + , MNO + , SNO + , SPCL_DONG + , SPCL_HO + , SPCL_ADDR + , ADDR + , DTL_ADDR + , WHOL_ADDR + , REG_DT + , RGTR + , MDFCN_DT + , MDFR +) +SELECT #{rtpyrId} + , '41480' + , #{vhrno} + , #{rtpyrInptSeCd} + , #{rtpyrSeCd} + , #{rtpyrNo} + , #{rtpyrNm} + , #{rtpyrTelno} + , #{rtpyrMblTelno} + , #{rtpyrEml} + , #{rtpyrBrdt} + , #{rtpyrSttsCd} + , #{addrSeCd} + , #{zip} + , #{roadNmCd} + , #{udgdSeCd} + , #{bmno} + , #{bsno} + , #{bldgMngNo} + , #{stdgCd} + , #{dongCd} + , #{mtnSeCd} + , #{mno} + , #{sno} + , #{spclDong} + , #{spclHo} + , #{spclAddr} + , #{addr} + , #{dtlAddr} + , #{wholAddr} + , #{createdAt} + , #{createdBy} + , #{lastModified} + , #{modifiedBy} + FROM DUAL + WHERE NOT EXISTS ( + SELECT * + FROM TB_PAYER B + WHERE VHRNO = #{vhrno} + AND RTPYR_NO = #{rtpyrNo} + ) + +/* 납부자 대장 등록(payerMapper.insertHistory) */ + +SELECT IFNULL(MAX(HSTRY_SN) + 1, 1) NEW_ID + FROM TB_PAYER_HSTRY +WHERE RTPYR_ID = #{payer.rtpyrId} +INSERT INTO TB_PAYER_HSTRY ( + RTPYR_ID + , HSTRY_SN + , SGG_CD + , VHRNO + , RTPYR_INPT_SE_CD + , RTPYR_SE_CD + , RTPYR_NO + , RTPYR_NM + , RTPYR_TELNO + , RTPYR_MBL_TELNO + , RTPYR_EML + , RTPYR_BRDT + , RTPYR_STTS_CD + , ADDR_SE_CD + , ZIP + , ROAD_NM_CD + , UDGD_SE_CD + , BMNO + , BSNO + , BLDG_MNG_NO + , STDG_CD + , DONG_CD + , MTN_SE_CD + , MNO + , SNO + , SPCL_DONG + , SPCL_HO + , SPCL_ADDR + , ADDR + , DTL_ADDR + , WHOL_ADDR + , REG_DT + , RGTR +) VALUES ( + #{payer.rtpyrId} + , #{historySeq} + , '41480' + , #{payer.vhrno} + , #{payer.rtpyrInptSeCd} + , #{payer.rtpyrSeCd} + , #{payer.rtpyrNo} + , #{payer.rtpyrNm} + , #{payer.rtpyrTelno} + , #{payer.rtpyrMblTelno} + , #{payer.rtpyrEml} + , #{payer.rtpyrBrdt} + , #{payer.rtpyrSttsCd} + , #{payer.addrSeCd} + , #{payer.zip} + , #{payer.roadNmCd} + , #{payer.udgdSeCd} + , #{payer.bmno} + , #{payer.bsno} + , #{payer.bldgMngNo} + , #{payer.stdgCd} + , #{payer.dongCd} + , #{payer.mtnSeCd} + , #{payer.mno} + , #{payer.sno} + , #{payer.spclDong} + , #{payer.spclHo} + , #{payer.spclAddr} + , #{payer.addr} + , #{payer.dtlAddr} + , #{payer.wholAddr} + , + , #{currentUser.id} +) + +/* 납부자 대장 수정(payerMapper.updatePayer) */ +UPDATE TB_PAYER SET + SGG_CD = #{sggCd} + , RTPYR_INPT_SE_CD = #{rtpyrInptSeCd} + , RTPYR_SE_CD = #{rtpyrSeCd} + , RTPYR_NO = #{rtpyrNo} + , RTPYR_NM = #{rtpyrNm} + , RTPYR_EML = #{rtpyrEml} + , RTPYR_BRDT = #{rtpyrBrdt} + , RTPYR_STTS_CD = #{rtpyrSttsCd} + , ADDR_SE_CD = #{addrSeCd} + , ZIP = #{zip} + , ROAD_NM_CD = #{roadNmCd} + , UDGD_SE_CD = #{udgdSeCd} + , BMNO = #{bmno} + , BSNO = #{bsno} + , BLDG_MNG_NO = #{bldgMngNo} + , STDG_CD = #{stdgCd} + , DONG_CD = #{dongCd} + , MTN_SE_CD = #{mtnSeCd} + , MNO = #{mno} + , SNO = #{sno} + , SPCL_DONG = #{spclDong} + , SPCL_HO = #{spclHo} + , SPCL_ADDR = #{spclAddr} + , ADDR = #{addr} + , DTL_ADDR = #{dtlAddr} + , WHOL_ADDR = #{wholAddr} + , VHRNO = #{vhrno} + , RTPYR_TELNO = #{rtpyrTelno} + , RTPYR_MBL_TELNO = #{rtpyrMblTelno} + , MDFCN_DT = #{lastModified} + , MDFR = #{modifiedBy} + WHERE RTPYR_ID = #{rtpyrId} + +/* 납부자 대장 삭제(payerMapper.deletePayer) */ +UPDATE TB_PAYER + SET USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE RTPYR_ID IN (#{rtpyrId}) + + \ No newline at end of file