ImportService, PayerService 추가

main
mjkhan21 1 year ago
parent 94f1bf07b2
commit 4f36115eee

@ -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
* <ul><li>institutes - </li>
* <li>depts - </li>
* </ul>
* @return
*/
List<DataObject> selectSggList(Map<String, Object> params);
/** , {"기관코드-부서코드", "시군구코드"} .
* @param institutes
* @param depts
* @return -
*/
default Map<String, String> selectSggs(Iterable<?> institutes, Iterable<?> depts) {
DataObject params = params()
.set("institutes", institutes)
.set("depts", depts);
List<DataObject> 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<DataObject> selectTaskCd();
/** {"부서코드", "업무코드"} .
* @return {"부서코드", "업무코드"}
*/
default Map<String, String> selectTaskMap() {
List<DataObject> list = selectTaskCd();
return list.stream()
.collect(Collectors.toMap(
row -> row.string("DEPT_CD"),
row -> row.string("TASK_CD")
));
}
/** .
* @return
*/
List<DataObject> selectCarMdlCd();
/** {"차종종별 코드", "과태료 차종코드"} .<br />
* , "3" 4000 kg "3-1", 4000 kg "3-2"
* .
* @return {"차종종별 코드", "과태료 차종코드"}
*/
default Map<String, String> selectCarMdl() {
List<DataObject> list = selectCarMdlCd();
return list.stream()
.collect(Collectors.toMap(
row -> row.string("VHCTY_ASORT_CODE"),
row -> row.string("FFNLG_CARMDL_CD")
));
}
}

@ -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<String> interfaceSequences);
}

@ -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<Crdn> createCrdns(List<Petition> petitions) {
if (isEmpty(petitions)) return Collections.emptyList();
Map<String, String>
ssgs = getSSGs(petitions),
tasks = importMapper.selectTaskMap(), //TODO: 업무구분 추출 다시 검토할 것
carModels = importMapper.selectCarMdl();
List<Crdn> crdns = create(petitions, ssgs, tasks);
BiFunction<String, String, String> 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<String, String> getSSGs(List<Petition> petitions) {
List<String>
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<Crdn> create(List<Petition> petitions, Map<String, String> sggs, Map<String, String> tasks) {
Petition.Violation violation = new Petition.Violation();
DateFormats dateFormats = new DateFormats();
return petitions.stream()
.flatMap(petition -> {
violation
.setTitle(petition.getPetiTitleV())
.setReason(petition.getPetiReasonL());
Map<String, List<Map<String, String>>> byVehicleNo = violation.getVehicleNoDatetimes().stream()
.collect(Collectors.groupingBy(map -> map.get("vehicleNo"))); //차량번호별 단속정보
List<String> 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<Map<String, String>> 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<String, String> 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<Crdn> crdns, BiFunction<String, String, String> getCarModel) {
List<BasicInfoRequest> 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<String, BasicInfoResponse> 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<Petition> petitions) {
int affected = 0;
UnaryOperator<String> 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;
}
}

@ -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<String> interfaceSequences) {
List<Petition> petitions = smgBean.getPetitions(interfaceSequences);
List<Crdn> crdns = importBean.createCrdns(petitions);
if (crdns.isEmpty()) return 0;
List<String> intfSeqs = crdns.stream().map(Crdn::getLinkId).toList();
Map<String, List<FileInfo>> byInfoKey = fileBean.getFilesOf("010", intfSeqs.toArray(new String[intfSeqs.size()])).stream()
.collect(Collectors.groupingBy(FileInfo::getInfoKey));
for (Crdn crdn: crdns) {
List<FileInfo> files = byInfoKey.get(crdn.getLinkId());
crdnService.create(null, crdn, files);
}
importBean.createCvlcpts(petitions);
return 0;
}
}

@ -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
* <ul><li>received - (true || false)</li>
* <li>saved - (true || false)</li>
* </ul>
*/
@PostMapping(value = "/petition/receive.do", name = "국민 신문고 민원 수신")
public ModelAndView importSmgPetition(@RequestBody Map<String, Object> params) {
List<String> intfSeqs = (List<String>)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);
}
}

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

@ -0,0 +1,89 @@
package cokr.xit.fims.payer;
import cokr.xit.foundation.component.QueryRequest;
/**
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
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;
}
}

@ -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
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
@Mapper("payerMapper")
public interface PayerMapper extends AbstractMapper {
/** .<br />
* @param req
* @return
*/
List<DataObject> selectPayerList(PayerQuery req);
/** .
* @param req
* @return
*/
List<Payer> selectPayers(PayerQuery req);
/** .
* @param payer
* @return
*/
int insertPayer(Payer payer);
/** .
* @param params
* <ul><li>"payer" - </li>
* </ul>
* @return
*/
int insertHistory(Map<String, Object> params);
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean insert(Payer payer) {
boolean saved = insertPayer(payer) > 0;
if (saved) {
DataObject params = params().set("payer", payer);
insertHistory(params);
}
return saved;
}
/** .
* @param params
* <ul><li>"payer" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updatePayer(Payer payer);
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean update(Payer payer) {
boolean saved = updatePayer(payer) == 1;
if (saved) {
DataObject params = params().set("payer", payer);
insertHistory(params);
}
return saved;
}
/** .
* @param params
* <ul><li>"rtpyrIds" - </li>
* </ul>
* @return
*/
int deletePayer(Map<String, ?> params);
/** .
* @param rtpyrIds
* @return
*/
default int delete(String... rtpyrIds) {
return !isEmpty(rtpyrIds) ? deletePayer(params().set("rtpyrIds", rtpyrIds)) : 0;
}
}

@ -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;
/** .
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
public interface PayerService {
/** .
* @param req
* @return
*/
List<DataObject> getPayerList(PayerQuery req);
/** .
* @param req
* @return
*/
List<Payer> getPayers(PayerQuery req);
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
boolean create(Payer payer);
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
boolean update(Payer payer);
/** .
* @param rtpyrIds
* @return
*/
public int remove(String... rtpyrIds);
}

@ -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
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
@Component("payerBean")
public class PayerBean extends AbstractComponent {
/** 납부자 대장 정보 DAO */
@Resource(name = "payerMapper")
private PayerMapper payerMapper;
/** .
* @param req
* @return
*/
public List<DataObject> getPayerList(PayerQuery req) {
return payerMapper.selectPayerList(req);
}
/** .
* @param req
* @return
*/
public List<Payer> getPayers(PayerQuery req) {
return payerMapper.selectPayers(req);
}
public Payer getPayer(String vhrno, String rtpyrNo) {
PayerQuery req = new PayerQuery().setVhrno(vhrno).setRtpyrNo(rtpyrNo);
List<Payer> payers = getPayers(req);
return !payers.isEmpty() ? payers.get(0) : null;
}
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean create(Payer payer) {
return payerMapper.insert(payer);
}
/** .
* @param payer
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean update(Payer payer) {
return payerMapper.update(payer);
}
/** .
* @param rtpyrIds
* @return
*/
public int remove(String... rtpyrIds) {
return payerMapper.delete(rtpyrIds);
}
}

@ -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;
/** .
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
@Service("payerService")
public class PayerServiceBean extends AbstractServiceBean implements PayerService {
/** 납부자 대장 정보 Bean */
@Resource(name = "payerBean")
private PayerBean payerBean;
@Override
public List<DataObject> getPayerList(PayerQuery req) {
return payerBean.getPayerList(req);
}
@Override
public List<Payer> 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);
}
}

@ -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;
/**
*
* <p> :
*
* <pre>
* ============ ============
* 2023-08-18 mjkhan
* ================================
* </pre>
*/
@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")));
}
/** .<br />
* {@link PayerService#getPayerList(PayerQuery)}
* @param req
* @return jsonView
* <pre><code> {
* "payerList": [ ]
* "payerStart":
* "payerFetch":
* "payerTotal":
* }</code></pre>
*/
@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
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
@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
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
@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
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
@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);
}
}

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

@ -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",

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.crdn.dao.ImportMapper">
<select id="selectSggList">/* 기관, 부서별 시군구 코드 조회(importMapper.selectSggList) */
SELECT CASE WHEN A.SGG_CD = B.SGG_CD THEN A.SGG_CD ELSE 'DIFF' END SGG_CD
, INST_CD
, DEPT_CD
, A.SGG_CD A_SGG
, B.SGG_CD B_SGG
FROM (SELECT SGG_CD, INST_CD
FROM TB_SGG_INFO
WHERE INST_CD IN (<foreach collection="institutes" item="institute" separator=",">#{institute}</foreach>)
) A
LEFT OUTER JOIN (SELECT SGG_CD, DEPT_CD
FROM TB_DEPT_INFO
WHERE DEPT_CD IN (<foreach collection="depts" item="dept" separator=",">#{dept}</foreach>)
) B
ON A.SGG_CD = B.SGG_CD</select>
<select id="selectTaskCd" resultType="dataobject">/* importMapper.selectTaskCd(업무코드 조회) */
SELECT '3910354' DEPT_CD, 'PVS' TASK_CD UNION
SELECT '3790034' DEPT_CD, 'PVS' TASK_CD UNION
SELECT '3800029' DEPT_CD, 'PVS' TASK_CD UNION
SELECT '3810054' DEPT_CD, 'PVS' TASK_CD UNION
SELECT '6300915' DEPT_CD, 'PVS' TASK_CD UNION
SELECT '6300753' DEPT_CD, 'BPV' TASK_CD UNION
<!-- SELECT '6300915' DEPT_CD, 'BPV' TASK_CD UNION -->
SELECT '6301014' DEPT_CD, 'BPV' TASK_CD UNION
SELECT 'default' DEPT_CD, 'DPV' TASK_CD</select>
<select id="selectCarMdlCd" resultType="dataobject">/* importMapper.selectCarMdlCd(차종별 과태료 차종 조회) */
SELECT '1' VHCTY_ASORT_CODE, '11' FFNLG_CARMDL_CD UNION <!-- 승용 -->
SELECT '2' VHCTY_ASORT_CODE, '12' FFNLG_CARMDL_CD UNION <!-- 승합 -->
SELECT '3-1' VHCTY_ASORT_CODE, '13' FFNLG_CARMDL_CD UNION <!-- 화물 -->
SELECT '3-2' VHCTY_ASORT_CODE, '14' FFNLG_CARMDL_CD UNION <!-- 화물 -->
SELECT '4' VHCTY_ASORT_CODE, '15' FFNLG_CARMDL_CD <!-- 특수 --></select>
</mapper>

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.payer.dao.PayerMapper">
<!-- 납부자 대장 정보 매퍼
========== 변경 이력 ==========
2023-08-18 mjkhan 최초 작성
============================ -->
<resultMap id="payerRow" type="cokr.xit.fims.payer.Payer"> <!-- 납부자 대장 -->
<result property="rtpyrId" column="RTPYR_ID" /> <!-- 납부자 ID -->
<result property="sggCd" column="SGG_CD" /> <!-- 시군구 코드 -->
<result property="rtpyrInptSeCd" column="RTPYR_INPT_SE_CD" /> <!-- 납부자 입력 구분 코드 -->
<result property="rtpyrSeCd" column="RTPYR_SE_CD" /> <!-- 납부자 구분 코드 -->
<result property="rtpyrNo" column="RTPYR_NO" /> <!-- 납부자 번호 -->
<result property="rtpyrNm" column="RTPYR_NM" /> <!-- 납부자 명 -->
<result property="rtpyrEml" column="RTPYR_EML" /> <!-- 납부자 이메일 -->
<result property="rtpyrBrdt" column="RTPYR_BRDT" /> <!-- 납부자 생년월일 -->
<result property="rtpyrSttsCd" column="RTPYR_STTS_CD" /> <!-- 납부자 상태 코드 -->
<result property="addrSeCd" column="ADDR_SE_CD" /> <!-- 주소 구분 코드 -->
<result property="zip" column="ZIP" /> <!-- 우편번호 -->
<result property="roadNmCd" column="ROAD_NM_CD" /> <!-- 도로 명 코드 -->
<result property="udgdSeCd" column="UDGD_SE_CD" /> <!-- 지하 구분 코드 -->
<result property="bmno" column="BMNO" /> <!-- 건물본번 -->
<result property="bsno" column="BSNO" /> <!-- 건물부번 -->
<result property="bldgMngNo" column="BLDG_MNG_NO" /> <!-- 건물 관리 번호 -->
<result property="stdgCd" column="STDG_CD" /> <!-- 법정동 코드 -->
<result property="dongCd" column="DONG_CD" /> <!-- 행정동 코드 -->
<result property="mtnSeCd" column="MTN_SE_CD" /> <!-- 산 구분 코드 -->
<result property="mno" column="MNO" /> <!-- 본번 -->
<result property="sno" column="SNO" /> <!-- 부번 -->
<result property="spclDong" column="SPCL_DONG" /> <!-- 특수 동 -->
<result property="spclHo" column="SPCL_HO" /> <!-- 특수 호 -->
<result property="spclAddr" column="SPCL_ADDR" /> <!-- 특수 주소 -->
<result property="addr" column="ADDR" /> <!-- 주소 -->
<result property="dtlAddr" column="DTL_ADDR" /> <!-- 상세 주소 -->
<result property="wholAddr" column="WHOL_ADDR" /> <!-- 전체 주소 -->
<result property="createdAt" column="REG_DT" /> <!-- 등록 일시 -->
<result property="createdBy" column="RGTR" /> <!-- 등록자 -->
<result property="lastModified" column="MDFCN_DT" /> <!-- 수정 일시 -->
<result property="modifiedBy" column="MDFR" /> <!-- 수정자 -->
<result property="vhrno" column="VHRNO" /> <!-- 차량번호 -->
<result property="rtpyrTelno" column="RTPYR_TELNO" /> <!-- 납부자 전화번호 -->
<result property="rtpyrMblTelno" column="RTPYR_MBL_TELNO" /> <!-- 납부자 휴대 전화번호 -->
</resultMap>
<sql id="select">SELECT RTPYR_ID <!-- 납부자 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</sql>
<select id="selectPayerList" parameterType="map" resultType="dataobject">/* 납부자 대장 목록 조회(payerMapper.selectPayerList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
<where>AND RTPYR_ID IN (<foreach collection="rtpyrIds" item="rtpyrId" separator=",">#{rtpyrId}</foreach>)</where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select>
<select id="selectPayers" parameterType="map" resultMap="payerRow">/* 납부자 대장 객체 가져오기(payerMapper.selectPayers) */
<include refid="select" />
<where>
<if test="rtpyrIds != null">AND RTPYR_ID IN (<foreach collection="rtpyrIds" item="rtpyrId" separator=",">#{rtpyrId}</foreach>)</if>
<if test="rtpyrIds == null"> AND VHRNO = #{vhrno}
AND RTPYR_NO = #{rtpyrNo}</if></where>
<include refid="utility.orderBy" /></select>
<insert id="insertPayer" parameterType="cokr.xit.fims.payer.Payer">/* 납부자 대장 등록(payerMapper.insertPayer) */
<selectKey keyProperty="rtpyrId" keyColumn="NEW_ID" resultType="string" order="BEFORE">
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, '%')</selectKey>
INSERT INTO TB_PAYER (
RTPYR_ID <!-- 납부자 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} <!-- 납부자 ID -->
, '41480' <!-- #{sggCd} 시군구 코드 -->
, #{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}
)</insert>
<insert id="insertHistory" parameterType="map">/* 납부자 대장 등록(payerMapper.insertHistory) */
<selectKey keyProperty="historySeq" keyColumn="NEW_ID" resultType="int" order="BEFORE">
SELECT IFNULL(MAX(HSTRY_SN) + 1, 1) NEW_ID
FROM TB_PAYER_HSTRY
WHERE RTPYR_ID = #{payer.rtpyrId}</selectKey>
INSERT INTO TB_PAYER_HSTRY (
RTPYR_ID <!-- 납부자 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} <!-- 납부자 ID -->
, #{historySeq} <!-- 이력 일련번호 -->
, '41480' <!-- #{payer.sggCd} 시군구 코드 -->
, #{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} <!-- 전체 주소 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{currentUser.id} <!-- 등록자 -->
)</insert>
<update id="updatePayer" parameterType="cokr.xit.fims.payer.Payer">/* 납부자 대장 수정(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}</update>
<update id="deletePayer" parameterType="map">/* 납부자 대장 삭제(payerMapper.deletePayer) */
UPDATE TB_PAYER
SET USE_YN = 'N'
, MDFCN_DT =<include refid="utility.now" />
, MDFR = #{currentUser.id}
WHERE RTPYR_ID IN (<foreach collection="rtpyrIds" item="rtpyrId" separator=",">#{rtpyrId}</foreach>)</update>
</mapper>
Loading…
Cancel
Save