main
siniya70 1 year ago
commit 64c0de4967

@ -34,6 +34,23 @@
<artifactId>xit-base-starter</artifactId>
<version>23.04.01-SNAPSHOT</version>
</dependency>
<dependency> <!-- 자망연계 -->
<groupId>cokr.xit.interfaces</groupId>
<artifactId>xit-lvis</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency> <!-- 국민신문고 -->
<groupId>cokr.xit.interfaces</groupId>
<artifactId>xit-smg</artifactId>
<version>23.04.01-SNAPSHOT</version>
</dependency>
<dependency> <!-- epost -->
<groupId>cokr.xit.interfaces</groupId>
<artifactId>xit-epost</artifactId>
<version>23.04.01-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>

@ -1,8 +1,10 @@
package cokr.xit.fims;
import org.springframework.boot.SpringApplication;
import cokr.xit.base.boot.XitBaseApplication;
//@ImportResource("classpath:spring/context-*.xml")
public class FimsApplication extends XitBaseApplication {
public static void main(String[] args) {

@ -45,18 +45,11 @@ public class FileController extends cokr.xit.base.file.web.FileController {
public void modifySvg(HttpServletRequest request, HttpServletResponse response) throws URISyntaxException, IOException, ParserConfigurationException, SAXException {
String requestURI = request.getRequestURI().toString();
String filepath = requestURI.replace("/file/modifySvg","/resources/image");
System.out.println("log : "+filepath);
String filepath = requestURI.split("modifySvg")[1];
filepath = URLDecoder.decode(filepath);
System.out.println("log : "+filepath);
filepath = request.getSession().getServletContext().getRealPath(filepath);
System.out.println("log : "+filepath);
filepath = filepath.replace("\\","/");
System.out.println("log : "+filepath);
String contextPath = request.getSession().getServletContext().getContextPath();
filepath = filepath.replace("webapp"+contextPath+"/resources", "webapp/resources");
System.out.println("log : "+filepath);
filepath = "file:///"+filepath;
String svgRootPath = ("classpath:svg");
filepath = svgRootPath + filepath;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();

@ -12,6 +12,21 @@ import lombok.Setter;
public class Crdn extends AbstractEntity {
public static String INF_TYPE = "100";
/**
*
*/
private String[] modifyFileKeyList;
/**
*
*/
private String[] deleteFileKeyList;
/**
*
*/
private int fileChgCnt;
/**
*
*/

@ -16,40 +16,49 @@ public class CrdnQuery extends CmmnQuery {
private static final long serialVersionUID = 1L;
//조회유형
private String view;
private String grid;
private String inspectionDataType;
//현재정보
private String currentUserId;
private String currentInstitute;
private String inspectionDataType;
//ID
private String crdnId;
private String[] crdnIDs;
private String amtDcsnCdGroupId;
private String dtlAmtDcsnCdGroupId;
private String vhrno;
private String cvlcptPrcsPicNm;
//날짜
private String aplcnYmd;
private String schCvlcptRcptYmdFrom;
private String schCvlcptRcptYmdTo;
private String schRductYmdFrom;
private String schRductYmdTo;
private String schCrdnYmdFrom;
private String schCrdnYmdTo;
//from, to
private Integer schCrdnCntFrom;
private Integer schCrdnCntTo;
//코드
private String amtDcsnCd;
private String dtlAmtDcsnCd;
private String crdnInptSeCd;
private String cvlcptPrcsCd;
//포함, 제외, 특정 자료
private String schOnlySamePlace;
private String schOnlyUnpay;
private String schExclEnd;
private String schExclTimeout;
private String crdnInptSeCd;
private String cvlcptPrcsCd;
private String aplcnYmd;
private String amtDcsnCdGroupId;
private String amtDcsnCd;
private String dtlAmtDcsnCdGroupId;
private String dtlAmtDcsnCd;
//기타
private String vhrno;
private String cvlcptPrcsPicNm;
public String getView() {
return ifEmpty(view, () -> null);

@ -69,4 +69,10 @@ public interface Crdn01Mapper extends AbstractMapper {
*/
DataObject selectCivilComplaintReceiptInitialDataInfo(CrdnQuery req);
/** . TODO : mybatis
* @param crdn
* @return
*/
int saveCivilComplaint(Crdn crdn);
}

@ -66,5 +66,12 @@ public interface Crdn06Mapper extends AbstractMapper {
List<DataObject> selectCrackdowns(CrdnQuery req);
/** .<br />
* {@link cokr.xit.fims.crdn.service.bean.Crdn06Bean#update(Crdn)}
* @param crdn
* @return
*/
int update(Crdn crdn);
}

@ -5,14 +5,19 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.assertj.core.util.Arrays;
import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.FileService;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.hwp.AddingParagraphBetweenHWPFile;
import cokr.xit.fims.cmmn.hwp.InsertingImageCell;
@ -20,6 +25,7 @@ import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.Crdn01Mapper;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.sprt.Sprt;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.HWPFile;
@ -39,10 +45,16 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
@Resource(name="crdn01Mapper")
protected Crdn01Mapper crdn01Mapper;
@Resource(name="fileBean")
private FileBean fileBean;
/** 민원관리 Bean */
@Resource(name="crdn01Bean")
protected Crdn01Bean crdn01Bean;
@Resource(name="crdn06Bean")
protected Crdn06Bean crdn06Bean;
@Override
public List<DataObject> getCrackdownList(CrdnQuery req) {
@ -65,7 +77,10 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
return crdn01Bean.removeCivilComplaint(crdnIDs);
}
public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery, String baseFormatFilePath, String attachFormatFilePath) {
public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery) {
String baseFormatFilePath = ("classpath:format/cvlcptOrgnl_text.hwp");
String attachFormatFilePath = ("classpath:format/cvlcptOrgnl_photo.hwp");
crdnQuery.setView("hwp");
DataObject dataObject = crdn01Bean.getCivilComplaintOriginalInfo(crdnQuery);
@ -74,7 +89,10 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
SimpleDateFormat ymdHypenFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
HWPFile baseFormatFile = HWPReader.fromFile(baseFormatFilePath);
File file = ResourceUtils.getFile(baseFormatFilePath);
HWPFile baseFormatFile = HWPReader.fromFile(file);
ArrayList<String> strings = new ArrayList<String>();
strings.add(dataObject.string("CVLCPT_APLCNT_NM"));
@ -131,12 +149,17 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
List<DataObject> fileInfoList = fileService.getFileList(fileQuery);
fileInfoList = fileInfoList.stream()
.filter(fileInfo -> fileInfo.string("MIME_TYPE").startsWith("image"))
.collect(Collectors.toList());
if(fileInfoList != null && fileInfoList.size() > 0) {
int photoCnt = fileInfoList.size();
int PHOTO_COUNT_PER_PAGE = 4;
for(int i=0; i < photoCnt; i += PHOTO_COUNT_PER_PAGE) {
HWPFile attachFormatFile = HWPReader.fromFile(attachFormatFilePath);
file = ResourceUtils.getFile(attachFormatFilePath);
HWPFile attachFormatFile = HWPReader.fromFile(file);
InsertingImageCell.IMPL_InsertPicture(attachFormatFile, "왼쪽위사진", fileInfoList.get(i).string("URL"));
if(i+1 < photoCnt)
InsertingImageCell.IMPL_InsertPicture(attachFormatFile, "오른쪽위사진", fileInfoList.get(i+1).string("URL"));
@ -169,29 +192,72 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
}
public DataObject getCivilComplaintReceiptInitialDataInfo(CrdnQuery req) {
//민원조회
DataObject dataObject = crdn01Mapper.selectCivilComplaintReceiptInitialDataInfo(req);
//첨부파일 조회
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoKeys(dataObject.string("CRDN_ID"));
fileQuery.setInfoType("190");
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(req.getCrdnId());
List<DataObject> fileList = fileService.getFileList(fileQuery);
if(fileList != null && !fileList.isEmpty()) {
dataObject.set("videoExist", "Y");
} else {
dataObject.set("videoExist", "N");
dataObject.set("fileList", fileList);
}
//동영상 존재 여부 확인
dataObject.set("videoExist", "N");
String linkTblNm = dataObject.string("LINK_TBL_NM");
if(!linkTblNm.equals("")) {
if(linkTblNm.equals("TB_ESB_INTERFACE")) {
fileQuery.setInfoType("010");
} else if(linkTblNm.equals("TB_SAEOL")) {
fileQuery.setInfoType("020");
} else {
throw new RuntimeException("파일 조회 중 오류가 발생하였습니다.");
}
fileQuery.setInfoType(Crdn.INF_TYPE);
fileList = fileService.getFileList(fileQuery);
if(fileList != null && !fileList.isEmpty()) {
dataObject.set("fileList", fileList);
fileQuery.setInfoKeys(dataObject.string("LINK_ID"));
List<DataObject> linkFileList = fileService.getFileList(fileQuery);
if(linkFileList != null && !linkFileList.isEmpty()) {
for(int i=0; i < linkFileList.size(); i++) {
String mimeType = linkFileList.get(i).string("MIME_TYPE");
if(Arrays.asList(Sprt.VIDEO_MIME_TYPE).contains(mimeType)) {
dataObject.set("videoExist", "Y");
}
}
}
}
return dataObject;
}
public boolean saveCivilComplaint(Crdn crdn, List<FileInfo> newFileInfoList) {
int fileInsertEffected = 0;
int fileDeleteEffected = 0;
if(newFileInfoList != null && !newFileInfoList.isEmpty()) {
fileInsertEffected = fileBean.create(newFileInfoList);
}
if(crdn.getDeleteFileKeyList() != null) {
fileDeleteEffected = fileBean.remove(crdn.getDeleteFileKeyList());
}
crdn.setFileChgCnt(fileInsertEffected - fileDeleteEffected);
return saveCivilComplaint(crdn);
}
public boolean saveCivilComplaint(Crdn crdn) {
//TODO : crdn01Mapper.saveCivilComplaint(crdn);
return crdn06Bean.update(crdn);
}
}

@ -136,7 +136,7 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements CrdnServic
excl01.setLevyExclRsnCd("192");
excl01.setEtcCn("");
result = excl01Bean.createLevyExclusion(excl01);
result = excl01Bean.create(excl01);
if (!result) {
return false;
}

@ -29,7 +29,7 @@ public class Crdn06Bean extends AbstractComponent {
case "tagInformationUndefinedData":
return crdn06Mapper.updateTagInformation(crdn) == 1 ? true : false;
default:
return false; //crdn06Mapper.update(crdn);
return crdn06Mapper.update(crdn) == 1 ? true : false;
}
}

@ -1,15 +1,21 @@
package cokr.xit.fims.crdn.web;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.FileInfo.Relation;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
@ -129,6 +135,8 @@ public class Crdn01Controller extends ApplicationController {
DataObject info = crdn01Service.getCivilComplaintReceiptInitialDataInfo(req);
mav.addObject("crdnInfo", json ? info : toJson(info));
mav.addObject("openerPageName", request.getParameter("openerPageName"));
return mav;
}
@ -183,16 +191,58 @@ public class Crdn01Controller extends ApplicationController {
.addObject("saved", saved);
}
/** .
* @param crdnId
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
@RequestMapping(name="민원자료 저장", value="/020/save.do")
public ModelAndView saveCivilComplaint(Crdn crdn, MultipartFile[] newFileList, MultipartFile[] modifyFileList) {
boolean saved = false;
List<FileInfo> newFileInfoList = new ArrayList<FileInfo>();
if(newFileList != null || modifyFileList != null) {
Relation relation = new Relation();
relation.setInfoType(crdn.INF_TYPE);
relation.setInfoKey(crdn.getCrdnId());
if(newFileList != null) {
newFileInfoList = new FileInfoFactory().makeFileInfos(relation, newFileList);
}
if(modifyFileList != null) {
newFileInfoList.addAll(new FileInfoFactory().makeFileInfos(relation, modifyFileList));
if(crdn.getDeleteFileKeyList() == null) {
crdn.setDeleteFileKeyList(crdn.getModifyFileKeyList());
} else {
String[] arr1 = crdn.getDeleteFileKeyList();
String[] arr2 = crdn.getModifyFileKeyList();
String[] sumArr = Stream.of(arr1, arr2).flatMap(Stream::of).toArray(String[]::new);
crdn.setDeleteFileKeyList(sumArr);
}
}
}
saved = crdn01Service.saveCivilComplaint(crdn, newFileInfoList);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
/** .
* @return hwp
*/
@RequestMapping(name="민원내역 원본 한글 파일 생성", value="/050/makeFileFromHwpFormat.do")
public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery, HttpServletRequest request) {
String baseFormatFilePath = request.getServletContext().getRealPath("resources/format/cvlcptOrgnl_text.hwp");
String attachFormatFilePath = request.getServletContext().getRealPath("resources/format/cvlcptOrgnl_photo.hwp");
return crdn01Service.makeFileFromHwpFormat(crdnQuery, baseFormatFilePath, attachFormatFilePath);
return crdn01Service.makeFileFromHwpFormat(crdnQuery);
}
/** .

@ -121,14 +121,14 @@ public class Crdn05Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name="단속자료 수기 등록", value="/030/create.do")
public ModelAndView createCrdnDataByManual(Crdn crdn, MultipartFile[] uploadFileList) {
public ModelAndView createCrdnDataByManual(Crdn crdn, MultipartFile[] newFileList) {
boolean saved = false;
crdn.setCrdnRegSeCd("01");
crdn.setCrdnInptSeCd("03");//TODO : 사용자 기관의 시청,구청 구분
if(uploadFileList != null) {
List<FileInfo> fileInfoList = new FileInfoFactory().makeFileInfos(null, uploadFileList);
if(newFileList != null) {
List<FileInfo> fileInfoList = new FileInfoFactory().makeFileInfos(null, newFileList);
saved = crdn05Service.create(crdn, fileInfoList);
} else {
saved = crdn05Service.create(crdn);

@ -21,6 +21,7 @@ public class Excl01Query extends QueryRequest {
private String taskSeCd; // 업무 구분 코드
private String delYn; // 삭제 여부
// ID
private String levyExclIDs; // 부과 제외 ID
private String levyExclId; // 부과 제외 ID
private String crdnId; // 단속 ID
// 공통 조건
@ -79,6 +80,16 @@ public class Excl01Query extends QueryRequest {
return self();
}
public String getLevyExclIDs() {
return ifEmpty(levyExclIDs, () -> null);
}
public <T extends Excl01Query> T setLevyExclIDs(String levyExclIDs) {
this.levyExclIDs = levyExclIDs;
return self();
}
public String getLevyExclId() {
return ifEmpty(levyExclId, () -> null);
}

@ -21,6 +21,7 @@ public class Excl02Query extends QueryRequest {
private String taskSeCd; // 업무 구분 코드
private String delYn; // 삭제 여부
// ID
private String opnnIDs; // 의견 제출 ID
private String opnnId; // 의견 제출 ID
private String crdnId; // 단속 ID
// 공통 조건
@ -74,6 +75,17 @@ public class Excl02Query extends QueryRequest {
return self();
}
public String getOpnnIDs() {
return ifEmpty(opnnIDs, () -> null);
}
public <T extends Excl02Query> T setOpnnIDs(String opnnIDs) {
this.opnnIDs = opnnIDs;
return self();
}
public String getOpnnId() {
return ifEmpty(opnnId, () -> null);
}

@ -39,12 +39,24 @@ public interface Excl01Mapper extends AbstractMapper {
* @param levyExclId ID
* @return
*/
default DataObject selectLevyExclInfo(String levyExclId) {
List<DataObject> levyExcl = selectLevyExcls(new Excl01Query().setLevyExclId(levyExclId).setOrderBy("LEVY_EXCL_ID"));
default DataObject selectInfo(String levyExclId) {
List<DataObject> levyExcl = selectLevyExcls(new Excl01Query().setLevyExclId(levyExclId));
return !levyExcl.isEmpty() ? levyExcl.get(0) : null;
}
/** ID , .
* @param crdnId ID
* @return ,
*/
DataObject selectCrdn(Excl01Query req);
default DataObject selectCrdnInfo(String crdnId) {
DataObject crdnInfo = selectCrdn(new Excl01Query().setCrdnId(crdnId));
return crdnInfo;
}
/** .
* @param params
* <ul><li>"excl01" - </li>
@ -88,18 +100,6 @@ public interface Excl01Mapper extends AbstractMapper {
return excl01 != null && deleteLevyExcl(params().set("excl01", excl01)) >= 1;
}
/** ID , .
* @param crdnId ID
* @return ,
*/
DataObject selectCrdnLevyExcl(Excl01Query req);
default DataObject selectCrdnLevyExcl(String crdnId) {
DataObject crdnLevyExclInfo = selectCrdnLevyExcl(new Excl01Query().setCrdnId(crdnId));
return crdnLevyExclInfo;
}
/**(TB_CRDN) .
* @param params
* <ul><li>"excl01" - </li>

@ -39,12 +39,24 @@ public interface Excl02Mapper extends AbstractMapper {
* @param opnnId ID
* @return
*/
default DataObject selectOpnnSbmsnInfo(String opnnId) {
List<DataObject> opnnSbmsn = selectOpnnSbmsns(new Excl02Query().setOpnnId(opnnId).setOrderBy("OPNN_ID"));
default DataObject selectInfo(String opnnId) {
List<DataObject> opnnSbmsn = selectOpnnSbmsns(new Excl02Query().setOpnnId(opnnId));
return !opnnSbmsn.isEmpty() ? opnnSbmsn.get(0) : null;
}
/** ID , .
* @param crdnId ID
* @return ,
*/
DataObject selectCrdn(Excl02Query req);
default DataObject selectCrdnInfo(String crdnId) {
DataObject crdnInfo = selectCrdn(new Excl02Query().setCrdnId(crdnId));
return crdnInfo;
}
/** .
* @param params
* <ul><li>"opnnSbmsn" - </li>
@ -61,7 +73,7 @@ public interface Excl02Mapper extends AbstractMapper {
* <li> false</li>
* </ul>
*/
default boolean insertOpnnSbmsn(Excl02 excl02) {
default boolean insert(Excl02 excl02) {
return excl02 != null && insertOpnnSbmsn(params().set("excl02", excl02)) == 1;
}
@ -81,7 +93,7 @@ public interface Excl02Mapper extends AbstractMapper {
* <li> false</li>
* </ul>
*/
default boolean updateOpnnSbmsn(Excl02 excl02) {
default boolean update(Excl02 excl02) {
return excl02 != null && updateOpnnSbmsn(params().set("excl02", excl02)) == 1;
}
@ -101,7 +113,7 @@ public interface Excl02Mapper extends AbstractMapper {
* <li> false</li>
* </ul>
*/
default boolean deleteOpnnSbmsn(Excl02 excl02) {
default boolean delete(Excl02 excl02) {
return excl02 != null && deleteOpnnSbmsn(params().set("excl02", excl02)) == 1;
}

@ -5,7 +5,6 @@ import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.excl.Excl01Query;
import cokr.xit.fims.excl.Excl03;
import cokr.xit.fims.excl.Excl03Query;
import cokr.xit.foundation.component.AbstractMapper;
@ -36,16 +35,6 @@ public interface Excl03Mapper extends AbstractMapper {
*/
List<DataObject> selectCrdnReRegs(Excl03Query req);
/** ID .
* @param levyExclId ID
* @return
*/
default DataObject selectCrdnReRegInfo(String reRegId) {
List<DataObject> crdnReRegInfo = selectCrdnReRegs(new Excl03Query().setReRegId(reRegId).setOrderBy("RE_REG_ID"));
return !crdnReRegInfo.isEmpty() ? crdnReRegInfo.get(0) : null;
}
/** .
* @param params
* <ul><li>"crdnReReg" - </li>
@ -86,33 +75,10 @@ public interface Excl03Mapper extends AbstractMapper {
return excl03 != null && deleteCrdnReReg(params().set("excl03", excl03)) == 1;
}
/** ID .
* @param crdnId ID
* @return
*/
DataObject selectCrdnInfo(String crdnId);
/** .
* @param params
* <ul><li>"excl03" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int insertCopyCrdn(Map<String, Object> params);
/** .
* @param excl03
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean insertCopyCrdn(Excl03 excl03) {
return excl03 != null && insertCopyCrdn(params().set("excl03", excl03)) == 1;
}
}

@ -29,7 +29,7 @@ public interface Excl01Service {
* @param levyExclId ID
* @return
*/
DataObject getLevyExclusionInfo(Excl01Query req);
DataObject getInfo(Excl01Query req);
/** .
* @param excl
@ -38,7 +38,7 @@ public interface Excl01Service {
* <li> false</li>
* </ul>
*/
Map<String, String> createLevyExclusion(Excl01 excl01);
Map<String, String> create(Excl01 excl01);
/** .
* @param excl
@ -47,7 +47,7 @@ public interface Excl01Service {
* <li> false</li>
* </ul>
*/
Map<String, String> updateLevyExclusion(Excl01 excl01);
Map<String, String> update(Excl01 excl01);
/** .
* @param excl
@ -56,7 +56,7 @@ public interface Excl01Service {
* <li> false</li>
* </ul>
*/
boolean removeLevyExclusion(Excl01 excl01);
boolean remove(Excl01 excl01);
/** .
* @param excl
@ -65,6 +65,6 @@ public interface Excl01Service {
* <li> false</li>
* </ul>
*/
boolean removeLevyExclusionList(Excl01 excl01);
boolean removeList(Excl01 excl01);
}

@ -34,7 +34,7 @@ public interface Excl02Service {
* @param opnnId ID
* @return
*/
DataObject getOpinionSubmissionInfo(String opnnId);
DataObject getInfo(Excl02Query req);
/** .
* @param opnnSbmsn
@ -43,7 +43,7 @@ public interface Excl02Service {
* <li> false</li>
* </ul>
*/
boolean createOpinionSubmission(Excl02 excl02);
boolean create(Excl02 excl02);
/** .
* @param opnnSbmsn
@ -52,7 +52,7 @@ public interface Excl02Service {
* <li> false</li>
* </ul>
*/
boolean updateOpinionSubmission(Excl02 excl02);
boolean update(Excl02 excl02);
/** .
* @param opnnSbmsn
@ -61,6 +61,6 @@ public interface Excl02Service {
* <li> false</li>
* </ul>
*/
boolean removeOpinionSubmission(Excl02 excl02);
boolean remove(Excl02 excl02);
}

@ -30,12 +30,6 @@ public interface Excl03Service {
*/
List<DataObject> getCrackdownReRegistrations(Excl03Query req);
/** ID .<br />
* @param reRegId ID
* @return
*/
DataObject getCrackdownReRegistrationInfo(String reRegId);
/** .
* @param excl03
* @return
@ -43,7 +37,7 @@ public interface Excl03Service {
* <li> false</li>
* </ul>
*/
boolean createCrackdownReRegistration(Excl03 excl03);
boolean create(Excl03 excl03);
/** .
* @param excl03
@ -52,5 +46,5 @@ public interface Excl03Service {
* <li> false</li>
* </ul>
*/
boolean removeCrackdownReRegistration(Excl03 excl03);
boolean remove(Excl03 excl03);
}

@ -34,6 +34,8 @@ public class Excl01Bean extends AbstractComponent {
* @return
*/
public List<DataObject> getLevyExclusionList(Excl01Query req) {
req.setOrderBy("LEVY_EXCL_ID"); // 정렬
return excl01Mapper.selectLevyExclList(req);
}
@ -41,11 +43,11 @@ public class Excl01Bean extends AbstractComponent {
* @param levyExclId ID
* @return
*/
public DataObject getLevyExclusionInfo(Excl01Query req) {
public DataObject getInfo(Excl01Query req) {
if (req.getLevyExclId() != null) {
return excl01Mapper.selectLevyExclInfo(req.getLevyExclId()); // 수정(부과제외 조회)
return excl01Mapper.selectInfo(req.getLevyExclId()); // 수정(부과제외 조회)
} else {
DataObject dataCrdn = excl01Mapper.selectCrdnLevyExcl(req); // 등록(단속 조회)
DataObject dataCrdn = excl01Mapper.selectCrdn(req); // 등록(단속 조회)
// 초기 데이터 설정
dataCrdn.set("LEVY_EXCL_YMD", dataCrdn.get("TODAY")); // 부과 제외 일자
@ -62,7 +64,7 @@ public class Excl01Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean createLevyExclusion(Excl01 excl01) {
public boolean create(Excl01 excl01) {
return excl01Mapper.insert(excl01);
}
@ -73,7 +75,7 @@ public class Excl01Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean updateLevyExclusion(Excl01 excl01) {
public boolean update(Excl01 excl01) {
return excl01Mapper.update(excl01);
}
@ -84,7 +86,7 @@ public class Excl01Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean removeLevyExclusion(Excl01 excl01) {
public boolean remove(Excl01 excl01) {
return excl01Mapper.delete(excl01);
}
@ -93,7 +95,7 @@ public class Excl01Bean extends AbstractComponent {
* @return
*/
public DataObject getCrdnLevyExclusion(String crdnId) {
return excl01Mapper.selectCrdnLevyExcl(crdnId);
return excl01Mapper.selectCrdnInfo(crdnId);
}
/** .

@ -43,12 +43,12 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
@Override
public DataObject getLevyExclusionInfo(Excl01Query req) {
return excl01Bean.getLevyExclusionInfo(req);
public DataObject getInfo(Excl01Query req) {
return excl01Bean.getInfo(req);
}
@Override
public Map<String, String> createLevyExclusion(Excl01 excl01) {
public Map<String, String> create(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
Map<String, String> retMap = new HashMap<String, String>(); // 결과 return
@ -90,7 +90,7 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
// 부과제외(TB_LEVY_EXCL) 대장 등록
retSuccess = excl01Bean.createLevyExclusion(excl01);
retSuccess = excl01Bean.create(excl01);
// 1건이 등록 되지 않았다면..
if (!retSuccess) {
retMap.put("retSaved", "false");
@ -137,12 +137,12 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
@Override
public Map<String, String> updateLevyExclusion(Excl01 excl01) {
public Map<String, String> update(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
Map<String, String> retMap = new HashMap<String, String>(); // 결과 return
retSuccess = excl01Bean.updateLevyExclusion(excl01);
retSuccess = excl01Bean.update(excl01);
if (!retSuccess) {
retMap.put("retSaved", "false");
retMap.put("retMessage", "부과제외 대장 수정에 실패하였습니다.");
@ -159,35 +159,7 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
@Override
public boolean removeLevyExclusionList(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
Excl01 infoLevyExcl = new Excl01(); // 부과제외(TB_LEVY_EXCL) 조회
// 부과제외ID 건수를 확인하여 1건이하면.. 종료
if (excl01.getLevyExclIDs().length < 1 ) {
return retSuccess;
}
// 부과제외ID 만큼 반복..
for (int iLoop = 0; iLoop < excl01.getLevyExclIDs().length; iLoop++) {
infoLevyExcl.setLevyExclId(excl01.getLevyExclIDs()[iLoop]); // 부과제외 ID
infoLevyExcl.setDelRsn(excl01.getDelRsn()); // 삭제 사유
retSuccess = removeLevyExclusion(infoLevyExcl);
if (!retSuccess) {
return retSuccess;
}
}
// 처리 성공
retSuccess = true;
return retSuccess;
}
@Override
public boolean removeLevyExclusion(Excl01 excl01) {
public boolean remove(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
String retMessage = "삭제 처리 중 ";
@ -199,7 +171,7 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
CrdnSttsHstry deltCrdnSttsHstry = new CrdnSttsHstry(); // 단속상태이력(TB_CRDN_STTS_HSTRY) 삭제
// 부과제외(TB_LEVY_EXCL) + 단속(TB_CRDN) 자료 조회
infoCrdnSttsCd = excl01Bean.getLevyExclusionInfo(new Excl01Query().setLevyExclId(excl01.getLevyExclId()));
infoCrdnSttsCd = excl01Bean.getInfo(new Excl01Query().setLevyExclId(excl01.getLevyExclId()));
// 단속 상태 이력(TB_CRDN_STTS_HSTRY) 대장에서 부과제외 자료 조회
infoCrdnSttsHstry = crdnSttsHstryBean.getCrdnSttsHstryInfo(infoCrdnSttsCd.string("CRDN_ID"));
@ -213,7 +185,7 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
}
// 부과제외(TB_LEVY_EXCL) 삭제
retSuccess = excl01Bean.removeLevyExclusion(excl01);
retSuccess = excl01Bean.remove(excl01);
if (!retSuccess) {
retMessage = retMessage + "부과제외 자료 삭제에서 오류가 발생 되었습니다.";
@ -339,4 +311,36 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv
return retSuccess;
}
@Override
public boolean removeList(Excl01 excl01) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
int dataCount = 0; // 선택한 자료 건수
Excl01 infoLevyExcl = new Excl01(); // 부과제외(TB_LEVY_EXCL) 조회
// 변수 셋팅
dataCount = excl01.getLevyExclIDs().length; // ID 건수
// 부과제외ID 건수를 확인하여 1건이하면.. 종료
if (dataCount < 1 ) {
return retSuccess;
}
// 부과제외ID 만큼 반복..
for (int iLoop = 0; iLoop < dataCount; iLoop++) {
infoLevyExcl.setLevyExclId(excl01.getLevyExclIDs()[iLoop]); // 부과제외 ID
infoLevyExcl.setDelRsn(excl01.getDelRsn()); // 삭제 사유
retSuccess = remove(infoLevyExcl);
if (!retSuccess) {
return retSuccess;
}
}
// 처리 성공
retSuccess = true;
return retSuccess;
}
}

@ -34,6 +34,8 @@ public class Excl02Bean extends AbstractComponent {
* @return
*/
public List<DataObject> getOpinionSubmissionList(Excl02Query req) {
req.setOrderBy("OPNN_ID"); // 정렬
return excl02Mapper.selectOpnnSbmsnList(req);
}
@ -49,8 +51,17 @@ public class Excl02Bean extends AbstractComponent {
* @param opnnId ID
* @return
*/
public DataObject getOpinionSubmissionInfo(String opnnId) {
return excl02Mapper.selectOpnnSbmsnInfo(opnnId);
public DataObject getInfo(Excl02Query req) {
if (req.getOpnnId() != null) {
return excl02Mapper.selectInfo(req.getOpnnId()); // 수정(의견제출 조회)
} else {
DataObject dataCrdn = excl02Mapper.selectCrdn(req); // 등록(단속 조회)
// 초기 데이터 설정
dataCrdn.set("RCPT_YMD", dataCrdn.get("TODAY")); // 접수 일자
return dataCrdn;
}
}
/** .
@ -60,8 +71,8 @@ public class Excl02Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean createOpinionSubmission(Excl02 excl02) {
return excl02Mapper.insertOpnnSbmsn(excl02);
public boolean create(Excl02 excl02) {
return excl02Mapper.insert(excl02);
}
/** .
@ -71,8 +82,8 @@ public class Excl02Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean updateOpinionSubmission(Excl02 excl02) {
return excl02Mapper.updateOpnnSbmsn(excl02);
public boolean update(Excl02 excl02) {
return excl02Mapper.update(excl02);
}
/** .
@ -82,8 +93,8 @@ public class Excl02Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean removeOpinionSubmission(Excl02 excl02) {
return excl02Mapper.deleteOpnnSbmsn(excl02);
public boolean remove(Excl02 excl02) {
return excl02Mapper.delete(excl02);
}
}

@ -40,23 +40,23 @@ public class Excl02ServiceBean extends AbstractServiceBean implements Excl02Serv
}
@Override
public DataObject getOpinionSubmissionInfo(String opnnId) {
return excl02Bean.getOpinionSubmissionInfo(opnnId);
public DataObject getInfo(Excl02Query req) {
return excl02Bean.getInfo(req);
}
@Override
public boolean createOpinionSubmission(Excl02 excl02) {
return excl02Bean.createOpinionSubmission(excl02);
public boolean create(Excl02 excl02) {
return excl02Bean.create(excl02);
}
@Override
public boolean updateOpinionSubmission(Excl02 excl02) {
return excl02Bean.updateOpinionSubmission(excl02);
public boolean update(Excl02 excl02) {
return excl02Bean.update(excl02);
}
@Override
public boolean removeOpinionSubmission(Excl02 excl02) {
return excl02Bean.removeOpinionSubmission(excl02);
public boolean remove(Excl02 excl02) {
return excl02Bean.remove(excl02);
}
}

@ -34,6 +34,8 @@ public class Excl03Bean extends AbstractComponent {
* @return
*/
public List<DataObject> getCrackdownReRegistrationList(Excl03Query req) {
req.setOrderBy("RE_REG_ID"); // 정렬
return excl03Mapper.selectCrdnReRegList(req);
}
@ -45,14 +47,6 @@ public class Excl03Bean extends AbstractComponent {
return excl03Mapper.selectCrdnReRegs(req);
}
/** ID .<br />
* @param opnnId ID
* @return
*/
public DataObject getCrackdownReRegistrationInfo(String opnnId) {
return excl03Mapper.selectCrdnReRegInfo(opnnId);
}
/** .
* @param excl03
* @return
@ -60,7 +54,7 @@ public class Excl03Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean createCrackdownReRegistration(Excl03 excl03) {
public boolean create(Excl03 excl03) {
return excl03Mapper.insert(excl03);
}
@ -71,7 +65,7 @@ public class Excl03Bean extends AbstractComponent {
* <li> false</li>
* </ul>
*/
public boolean removeCrackdownReRegistration(Excl03 excl03) {
public boolean remove(Excl03 excl03) {
return excl03Mapper.delete(excl03);
}
@ -83,15 +77,4 @@ public class Excl03Bean extends AbstractComponent {
return excl03Mapper.selectCrdnInfo(crdnId);
}
/** .
* @param excl03
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean createCopyCrackdown(Excl03 excl03) {
return excl03Mapper.insertCopyCrdn(excl03);
}
}

@ -8,13 +8,11 @@ import org.springframework.stereotype.Service;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.service.bean.Crdn05ServiceBean;
import cokr.xit.fims.excl.Excl03;
import cokr.xit.fims.excl.Excl03Query;
import cokr.xit.fims.excl.service.Excl03Service;
import cokr.xit.fims.task.service.TaskService;
/** .
*
@ -47,12 +45,7 @@ public class Excl03ServiceBean extends AbstractServiceBean implements Excl03Serv
}
@Override
public DataObject getCrackdownReRegistrationInfo(String reRegId) {
return excl03Bean.getCrackdownReRegistrationInfo(reRegId);
}
@Override
public boolean createCrackdownReRegistration(Excl03 excl03) {
public boolean create(Excl03 excl03) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
String retMessage = "등록 처리 중 ";
@ -62,91 +55,89 @@ public class Excl03ServiceBean extends AbstractServiceBean implements Excl03Serv
Crdn crdn = new Crdn();
crdn.setSggCd(infoCrdn.string("SGG_CD"));
crdn.setTaskSeCd(infoCrdn.string("TASK_SE_CD"));
// crdn.setCrdnRegSeCd(infoCrdn.string("CRDN_REG_SE_CD"));
// crdn.setCrdnInptSeCd(infoCrdn.string("CRDN_INPT_SE_CD"));
// crdn.setLinkTblNm(infoCrdn.string("LINK_TBL_NM"));
// crdn.setLinkId(infoCrdn.string("LINK_ID"));
// crdn.setRtpyrId(infoCrdn.string("RTPYR_ID"));
// crdn.setCrdnSeCd(infoCrdn.string("CRDN_SE_CD"));
// crdn.setCrdnYmd(infoCrdn.string("CRDN_YMD"));
// crdn.setCrdnTm(infoCrdn.string("CRDN_TM"));
// crdn.setVhrno(infoCrdn.string("VHRNO"));
// crdn.setCrdnStdgNm(infoCrdn.string("CRDN_STDG_NM"));
// crdn.setCrdnRoadNm(infoCrdn.string("CRDN_ROAD_NM"));
// crdn.setCrdnPlc(infoCrdn.string("CRDN_PLC"));
// crdn.setDtlCrdnPlc(infoCrdn.string("DTL_CRDN_PLC"));
// crdn.setTeamId(infoCrdn.string("TEAM_ID"));
// crdn.setVltnId(infoCrdn.string("VLTN_ID"));
// crdn.setCrdnSpareaCd(infoCrdn.string("CRDN_SPAREA_CD"));
// crdn.setCrdnBgngTm(infoCrdn.string("CRDN_BGNG_TM"));
// crdn.setCrdnEndHr(infoCrdn.string("CRDN_END_HR"));
// crdn.setCrdnSn(infoCrdn.string("CRDN_SN"));
// crdn.setGpsX(infoCrdn.string("GPS_X"));
// crdn.setGpsY(infoCrdn.string("GPS_Y"));
// crdn.setMoscX(infoCrdn.string("MOSC_X"));
// crdn.setMoscY(infoCrdn.string("MOSC_Y"));
// crdn.setTowngYn(infoCrdn.string("TOWNG_YN"));
// crdn.setAtchFileCnt(infoCrdn.string("ATCH_FILE_CNT"));
// crdn.setVin(infoCrdn.string("VIN"));
// crdn.setVhclNm(infoCrdn.string("VHCL_NM"));
// crdn.setVhclColor(infoCrdn.string("VHCL_COLOR"));
// crdn.setUseFuelCd(infoCrdn.string("USE_FUEL_CD"));
// crdn.setUsgSeCd(infoCrdn.string("USG_SE_CD"));
// crdn.setMxmmLoadQy(infoCrdn.string("MXMM_LOAD_QY"));
// crdn.setTkcarPsncpaCnt(infoCrdn.string("TKCAR_PSNCPA_CNT"));
// crdn.setCarmdlAsortNm(infoCrdn.string("CARMDL_ASORT_NM"));
// crdn.setCarmdlTypeNm(infoCrdn.string("CARMDL_TYPE_NM"));
// crdn.setCarmdlClsfNm(infoCrdn.string("CARMDL_CLSF_NM"));
// crdn.setErsrYmd(infoCrdn.string("ERSR_YMD"));
// crdn.setFfnlgCarmdlCd(infoCrdn.string("FFNLG_CARMDL_CD"));
// crdn.setParkngPsbltyRsltCd(infoCrdn.string("PARKNG_PSBLTY_RSLT_CD"));
// crdn.setVltnNmtm(infoCrdn.string("VLTN_NMTM"));
// crdn.setOvtimeYn(infoCrdn.string("OVTIME_YN"));
// crdn.setRvwSeCd(infoCrdn.string("RVW_SE_CD"));
// crdn.setRvwPrcsScrnNm(infoCrdn.string("RVW_PRCS_SCRN_NM"));
// crdn.setRvwDt(infoCrdn.string("RVW_DT"));
// crdn.setRvwr(infoCrdn.string("RVWR"));
// crdn.setFfnlgAmt(infoCrdn.string("FFNLG_AMT"));
// crdn.setFfnlgRductRt(infoCrdn.string("FFNLG_RDUCT_RT"));
// crdn.setLevyAmt(infoCrdn.string("LEVY_AMT"));
// crdn.setAdvntceBgngYmd(infoCrdn.string("ADVNTCE_BGNG_YMD"));
// crdn.setAdvntceDudtYmd(infoCrdn.string("ADVNTCE_DUDT_YMD"));
// crdn.setAdvntceLevyAmt(infoCrdn.string("ADVNTCE_LEVY_AMT"));
// crdn.setOpnnSbmsnYn(infoCrdn.string("OPNN_SBMSN_YN"));
// crdn.setEtcCn(infoCrdn.string("ETC_CN"));
// crdn.setLevyId("");
// crdn.setCrdnSttsCd("01");
// crdn.setCrdnSttsChgDt("");
// crdn.setAdtnAmt(infoCrdn.string("0"));
// crdn.setMinusAmt(infoCrdn.string("0"));
// crdn.setRcvmtAmt(infoCrdn.string("0"));
crdn.setBfrCrdnId(infoCrdn.string("CRDN_ID"));
crdn.setSggCd(infoCrdn.string("SGG_CD")); // 시군구 코드
crdn.setTaskSeCd(infoCrdn.string("TASK_SE_CD")); // 업무 구분 코드
crdn.setCrdnRegSeCd("03"); // 단속 등록 구분 코드(FIM026) - 재 등록
crdn.setCrdnInptSeCd(infoCrdn.string("CRDN_INPT_SE_CD")); // 단속 입력 구분 코드
crdn.setLinkTblNm(infoCrdn.string("LINK_TBL_NM")); // 연계 테이블 명
crdn.setLinkId(infoCrdn.string("LINK_ID")); // 연계 ID
crdn.setRtpyrId(infoCrdn.string("RTPYR_ID")); // 납부자 ID
crdn.setCrdnSeCd(infoCrdn.string("CRDN_SE_CD")); // 단속 구분 코드
crdn.setCrdnYmd(infoCrdn.string("CRDN_YMD")); // 단속 일자
crdn.setCrdnTm(infoCrdn.string("CRDN_TM")); // 단속 시각
crdn.setVhrno(infoCrdn.string("VHRNO")); // 차량번호
crdn.setCrdnStdgNm(infoCrdn.string("CRDN_STDG_NM")); // 단속 법정동 명
crdn.setCrdnRoadNm(infoCrdn.string("CRDN_ROAD_NM")); // 단속 도로 명
crdn.setCrdnPlc(infoCrdn.string("CRDN_PLC")); // 단속 장소
crdn.setDtlCrdnPlc(infoCrdn.string("DTL_CRDN_PLC")); // 상세 단속 장소
crdn.setTeamId(infoCrdn.string("TEAM_ID")); // 조 ID
crdn.setVltnId(infoCrdn.string("VLTN_ID")); // 위반 ID
crdn.setVltnCd(infoCrdn.string("VLTN_CD")); // 위반 코드
crdn.setCrdnSpareaCd(infoCrdn.string("CRDN_SPAREA_CD")); // 단속 특별구역 코드
crdn.setCrdnBgngTm(infoCrdn.string("CRDN_BGNG_TM")); // 단속 시작 시각
crdn.setCrdnEndHr(infoCrdn.string("CRDN_END_HR")); // 단속 종료 시각
crdn.setCrdnSn(infoCrdn.string("CRDN_SN")); // 단속 일련번호
crdn.setGpsX(infoCrdn.string("GPS_X")); // GPS X
crdn.setGpsY(infoCrdn.string("GPS_Y")); // GPS Y
crdn.setMoscX(infoCrdn.string("MOSC_X")); // 모자이크 X
crdn.setMoscY(infoCrdn.string("MOSC_Y")); // 모자이크 Y
crdn.setTowngYn(infoCrdn.string("TOWNG_YN")); // 견인 여부
crdn.setAtchFileCnt(Integer.parseInt(infoCrdn.string("ATCH_FILE_CNT"))); // 첨부 파일 수
crdn.setVin(infoCrdn.string("VIN")); // 차대번호
crdn.setVhclNm(infoCrdn.string("VHCL_NM")); // 차량 명
crdn.setVhclColor(infoCrdn.string("VHCL_COLOR")); // 차량 색상
crdn.setUseFuelCd(infoCrdn.string("USE_FUEL_CD")); // 사용 연료 코드
crdn.setUsgSeCd(infoCrdn.string("USG_SE_CD")); // 용도 구분 코드
crdn.setMxmmLoadQy(infoCrdn.string("MXMM_LOAD_QY")); // 최대 적재 량
crdn.setTkcarPsncpaCnt(infoCrdn.string("TKCAR_PSNCPA_CNT")); // 승차 정원 수
crdn.setCarmdlAsortNm(infoCrdn.string("CARMDL_ASORT_NM")); // 차종 종별 명
crdn.setCarmdlTypeNm(infoCrdn.string("CARMDL_TYPE_NM")); // 차종 유형 명
crdn.setCarmdlClsfNm(infoCrdn.string("CARMDL_CLSF_NM")); // 차종 분류 명
crdn.setErsrYmd(infoCrdn.string("ERSR_YMD")); // 말소 일자
crdn.setFfnlgCarmdlCd(infoCrdn.string("FFNLG_CARMDL_CD")); // 과태료 차종 코드
crdn.setParkngPsbltyRsltCd(infoCrdn.string("PARKNG_PSBLTY_RSLT_CD")); // 주차 가능 결과 코드
crdn.setVltnNmtm(infoCrdn.string("VLTN_NMTM")); // 위반 횟수
crdn.setOvtimeYn(infoCrdn.string("OVTIME_YN")); // 시간외 여부
crdn.setRvwSeCd(infoCrdn.string("RVW_SE_CD")); // 검토 구분 코드
crdn.setRvwPrcsScrnNm(infoCrdn.string("RVW_PRCS_SCRN_NM")); // 검토 처리 화면 명
crdn.setRvwDt(infoCrdn.string("RVW_DT")); // 검토 일시
crdn.setRvwr(infoCrdn.string("RVWR")); // 검토자
crdn.setFfnlgAmt(0); // 과태료 금액 - 초기 값
crdn.setFfnlgRductRt(infoCrdn.string("FFNLG_RDUCT_RT")); // 과태료 감경 율
crdn.setLevyAmt(0); // 부과 금액 - 초기 값
// crdn.setAdvntceBgngYmd(""); // 사전통지 시작 일자
// crdn.setAdvntceDudtYmd(""); // 사전통지 납기 일자
crdn.setAdvntceLevyAmt(0); // 사전통지 부과 금액 - 초기 값
crdn.setOpnnSbmsnYn("N"); // 의견 제출 여부
crdn.setEtcCn(infoCrdn.string("ETC_CN")); // 기타 내용
// crdn.setLevyId(""); // 부과 ID
crdn.setCrdnSttsCd("01"); // 단속 상태 코드
crdn.setCrdnSttsChgDt(""); // 단속 상태 변경 일시
crdn.setAdtnAmt(0); // 가산 금액
crdn.setMinusAmt(0); // 감경 금액
crdn.setRcvmtAmt(0); // 수납 금액
crdn.setBfrCrdnId(infoCrdn.string("CRDN_ID")); // 이전 단속 ID
crdn.setDelYn("N");
// 단속 대장 입력
crdn.setDoGuidance("");
retSuccess = crdn05Service.create(crdn);
if (!retSuccess) {
retMessage = "단속 대장 등록에 실패하였습니다.";
// 예외를 발생시켜서 오류메세지를 보내고 Database 롤백..
throw new RuntimeException(retMessage);
}
// // 단속 대장 자료 복사
// retSuccess = excl03Bean.createCopyCrackdown(excl03);
// if (!retSuccess) {
// retMessage = "재부과 대장에 실패하였습니다.";
//
// // 예외를 발생시켜서 오류메세지를 보내고 Database 롤백..
// throw new RuntimeException(retMessage);
// }
}
// 단속 대장 사진 복사
// 재부과 대장 등록
retSuccess = excl03Bean.createCrackdownReRegistration(excl03);
excl03.setCrdnId(crdn.getCrdnId());
excl03.setCrdnRegSeCd("03");
retSuccess = excl03Bean.create(excl03);
if (!retSuccess) {
retMessage = "재부과 대장 등록에 실패하였습니다.";
@ -161,8 +152,8 @@ public class Excl03ServiceBean extends AbstractServiceBean implements Excl03Serv
}
@Override
public boolean removeCrackdownReRegistration(Excl03 excl03) {
return excl03Bean.removeCrackdownReRegistration(excl03);
public boolean remove(Excl03 excl03) {
return excl03Bean.remove(excl03);
}
}

@ -78,8 +78,8 @@ public class Excl01Controller extends ApplicationController {
* }</pre>
*/
@RequestMapping(name = "부과제외 정보 조회", value = "/020/info.do")
public ModelAndView getLevyExclusioninfo(Excl01Query req) {
DataObject levyExclusionInfo = excl01Service.getLevyExclusionInfo(req);
public ModelAndView getInfo(Excl01Query req) {
DataObject levyExclusionInfo = excl01Service.getInfo(req);
boolean json = jsonResponse();
@ -107,8 +107,8 @@ public class Excl01Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "부과제외 대장 등록", value = "/020/create.do")
public ModelAndView createLevyExclusion(Excl01 excl01) {
Map<String, String> retMap = excl01Service.createLevyExclusion(excl01);
public ModelAndView create(Excl01 excl01) {
Map<String, String> retMap = excl01Service.create(excl01);
return new ModelAndView("jsonView")
.addObject("retSaved", retMap.get("retSaved"))
@ -123,8 +123,8 @@ public class Excl01Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "부과제외 대장 수정", value = "/020/update.do")
public ModelAndView updateLevyExclusion(Excl01 excl01) {
Map<String, String> retMap = excl01Service.updateLevyExclusion(excl01);
public ModelAndView update(Excl01 excl01) {
Map<String, String> retMap = excl01Service.update(excl01);
return new ModelAndView("jsonView")
.addObject("retSaved", retMap.get("retSaved"))
@ -140,8 +140,8 @@ public class Excl01Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "부과제외 대장 제거", value = "/010/remove.do")
public ModelAndView removeLevyExclusion(Excl01 excl01) {
boolean saved = excl01Service.removeLevyExclusion(excl01);
public ModelAndView remove(Excl01 excl01) {
boolean saved = excl01Service.remove(excl01);
return new ModelAndView("jsonView")
.addObject("saved", saved);
@ -156,8 +156,8 @@ public class Excl01Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "부과제외 대장 제거", value = "/010/removes.do")
public ModelAndView removeLevyExclusionList(Excl01 excl01) {
boolean saved = excl01Service.removeLevyExclusionList(excl01);
public ModelAndView removeList(Excl01 excl01) {
boolean saved = excl01Service.removeList(excl01);
return new ModelAndView("jsonView")
.addObject("saved", saved);

@ -7,6 +7,7 @@ import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
@ -78,17 +79,25 @@ public class Excl02Controller extends ApplicationController {
* }</pre>
*/
@RequestMapping(name = "의견제출 정보 조회", value = "/020/info.do")
public ModelAndView getOpinionSubmissionInfo(String opnnId) {
if (!isEmpty(opnnId)) {
DataObject opinionSubmissionInfo = excl02Service.getOpinionSubmissionInfo(opnnId);
public ModelAndView getInfo(Excl02Query req) {
DataObject opnnSbmsnInfo = excl02Service.getInfo(req);
boolean json = jsonResponse();
boolean json = jsonResponse();
return new ModelAndView(json ? "jsonView" : "fims/excl/excl02020-info")
.addObject("opinionSubmissionInfo", json ? opinionSubmissionInfo : toJson(opinionSubmissionInfo));
} else {
return new ModelAndView("fims/excl/excl02020-info");
}
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/excl/excl02020-info");
// View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM029", "FIM030", "FIM031", "FIM032", "FIM033", "FIM054");
return mav
.addObject("pageName", "excl02020")
.addObject("FIM029List", commonCodes.get("FIM029")) // 접수 구분 코드(RCPT_SE_CD)
.addObject("FIM030List", commonCodes.get("FIM030")) // 통보 구분 코드(NTFCTN_SE_CD)
.addObject("FIM032List", commonCodes.get("FIM032")) // 소유주 관계 구분 코드(OWNR_REL_CD)
.addObject("FIM033List", commonCodes.get("FIM033")) // 의견 제출 구분 코드(OPNN_SBMSN_SE_CD)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
.addObject("opnnSbmsnInfo", json ? opnnSbmsnInfo : toJson(opnnSbmsnInfo))
;
}
/** .
@ -98,9 +107,9 @@ public class Excl02Controller extends ApplicationController {
* "saved": true, false
* }</code></pre>
*/
@PostMapping(name="의견제출 대장 등록", value="/010/create.do")
public ModelAndView createOpinionSubmission(Excl02 excl02) {
boolean saved = excl02Service.createOpinionSubmission(excl02);
@PostMapping(name="의견제출 대장 등록", value="/020/create.do")
public ModelAndView create(Excl02 excl02) {
boolean saved = excl02Service.create(excl02);
return new ModelAndView("jsonView")
.addObject("saved", saved);
@ -113,9 +122,9 @@ public class Excl02Controller extends ApplicationController {
* "saved": true, false
* }</code></pre>
*/
@PostMapping(name="의견제출 대장 수정", value="/010/update.do")
public ModelAndView updateOpinionSubmission(Excl02 excl02) {
boolean saved = excl02Service.updateOpinionSubmission(excl02);
@PostMapping(name="의견제출 대장 수정", value="/020/update.do")
public ModelAndView update(Excl02 excl02, MultipartFile[] uploadFileList) {
boolean saved = excl02Service.update(excl02);
return new ModelAndView("jsonView")
.addObject("saved", saved);
@ -130,8 +139,8 @@ public class Excl02Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name="의견제출 대장 제거", value="/010/remove.do")
public ModelAndView removeOpinionSubmission(Excl02 excl02) {
boolean saved = excl02Service.removeOpinionSubmission(excl02);
public ModelAndView remove(Excl02 excl02) {
boolean saved = excl02Service.remove(excl02);
return new ModelAndView("jsonView")
.addObject("saved", saved);

@ -14,7 +14,6 @@ import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.excl.Excl03;
import cokr.xit.fims.excl.Excl03Query;
import cokr.xit.fims.excl.service.Excl03Service;
import cokr.xit.foundation.data.DataObject;
/**
*
@ -68,27 +67,6 @@ public class Excl03Controller extends ApplicationController {
return setCollectionInfo(new ModelAndView("jsonView"), result, "crdnReReg");
}
/** ID .
* @param reRegId ID
* @return fims/excl/excl03020-info jsonView
* <pre>{
* "opnnSbmsnInfo":
* }</pre>
*/
@RequestMapping(name="단속 재등록 정보 조회", value="/020/info.do")
public ModelAndView getCrackdownReRegistrationInfo(String reRegId) {
if (!isEmpty(reRegId)) {
DataObject crackdownReRegistrationInfo = excl03Service.getCrackdownReRegistrationInfo(reRegId);
boolean json = jsonResponse();
return new ModelAndView(json ? "jsonView" : "fims/excl/excl03020-info")
.addObject("crackdownReRegistrationInfo", json ? crackdownReRegistrationInfo : toJson(crackdownReRegistrationInfo));
} else {
return new ModelAndView("fims/excl/excl03020-info");
}
}
/** .
* @param excl03
* @return jsonView
@ -97,8 +75,8 @@ public class Excl03Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "단속 재등록 등록", value = "/010/create.do")
public ModelAndView createCrackdownReRegistration(Excl03 excl03) {
boolean saved = excl03Service.createCrackdownReRegistration(excl03);
public ModelAndView create(Excl03 excl03) {
boolean saved = excl03Service.create(excl03);
return new ModelAndView("jsonView")
.addObject("saved", saved);
@ -113,8 +91,8 @@ public class Excl03Controller extends ApplicationController {
* }</code></pre>
*/
@PostMapping(name = "단속 재등록 제거", value = "/010/remove.do")
public ModelAndView removeCrackdownReRegistration(Excl03 excl03) {
boolean saved = excl03Service.removeCrackdownReRegistration(excl03);
public ModelAndView remove(Excl03 excl03) {
boolean saved = excl03Service.remove(excl03);
return new ModelAndView("jsonView")
.addObject("saved", saved);

@ -11,4 +11,8 @@ import lombok.Setter;
@Setter
public class Sprt extends AbstractEntity {
public static String[] VIDEO_MIME_TYPE = {
"video/mp4", "video/webm", "video/ogg"
};
}

@ -0,0 +1,18 @@
package cokr.xit.fims.sprt.service;
import cokr.xit.foundation.data.DataObject;
/** .
* <ul><li>{@link #getVideoInfo(SprtQuery) }</li>
* </ul>
* @author leebj
*/
public interface Sprt03Service {
/** .
* @param crdnId
* @return
*/
DataObject getVideoInfo(String crdnId);
}

@ -0,0 +1,67 @@
package cokr.xit.fims.sprt.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.assertj.core.util.Arrays;
import org.springframework.stereotype.Service;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.FileService;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.Crdn01Mapper;
import cokr.xit.fims.sprt.Sprt;
import cokr.xit.fims.sprt.service.Sprt03Service;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
/**
* @author leebj
*/
@Service("sprt03Service")
public class Sprt03ServiceBean extends AbstractServiceBean implements Sprt03Service {
@Resource(name = "crdn01Mapper")
private Crdn01Mapper crdn01Mapper;
@Resource(name="fileService")
FileService fileService;
@Override
public DataObject getVideoInfo(String crdnId) {
DataObject fileInfo = new DataObject();
CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setCrdnId(crdnId);
DataObject cvlcptInfo = crdn01Mapper.selectCivilComplaintReceiptInitialDataInfo(crdnQuery);
String linkTblNm = cvlcptInfo.string("LINK_TBL_NM");
if(!linkTblNm.equals("")) {
FileQuery fileQuery = new FileQuery();
if(linkTblNm.equals("TB_ESB_INTERFACE")) {
fileQuery.setInfoType("010");
} else if(linkTblNm.equals("TB_SAEOL")) {
fileQuery.setInfoType("020");
} else {
throw new RuntimeException("파일 조회 중 오류가 발생하였습니다.");
}
fileQuery.setInfoKeys(cvlcptInfo.string("LINK_ID"));
List<DataObject> fileList = fileService.getFileList(fileQuery);
if(fileList != null && !fileList.isEmpty()) {
for(int i=0; i < fileList.size() ;i++) {
DataObject file = fileList.get(i);
String mimeType = file.string("MIME_TYPE");
if(Arrays.asList(Sprt.VIDEO_MIME_TYPE).contains(mimeType)){
fileInfo = file;
break;
}
}
}
}
return fileInfo;
}
}

@ -4,12 +4,12 @@ import java.util.List;
import javax.annotation.Resource;
import org.assertj.core.util.Arrays;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.FileService;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.sprt.service.Sprt03Service;
import cokr.xit.foundation.data.DataObject;
public class Sprt03Controller extends ApplicationController {
@ -17,10 +17,8 @@ public class Sprt03Controller extends ApplicationController {
@Resource(name="fileService")
FileService fileService;
public String VIDEO_INF_TYPE = "190";
public String[] VIDEO_MIME_TYPE = {
"video/mp4", "video/webm", "video/ogg"
};
@Resource(name="sprt03Service")
Sprt03Service sprt03Service;
/** .
* @return fims/sprt/sprt03010-main
@ -33,20 +31,9 @@ public class Sprt03Controller extends ApplicationController {
if(crdnId != null && !crdnId.equals("")) {
mav.addObject("crdnId", crdnId);
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoKeys(crdnId);
fileQuery.setInfoType(VIDEO_INF_TYPE);
List<DataObject> fileList = fileService.getFileList(fileQuery);
if(fileList != null && !fileList.isEmpty()) {
for(int i=0; i < fileList.size() ;i++) {
DataObject file = fileList.get(i);
String mimeType = file.string("MIME_TYPE");
if(Arrays.asList(VIDEO_MIME_TYPE).contains(mimeType)){
mav.addObject("fileInfo", toJson(file));
break;
}
}
DataObject file = sprt03Service.getVideoInfo(crdnId);
if(!file.isEmpty()) {
mav.addObject("fileInfo", toJson(file));
}
}

@ -51,9 +51,6 @@ propertyService:
- tempDir: C:\temp
- pageUnit: 10
- pageSize: 10
# extFileName:
# - encoding: UTF-8
# filename: classpath*:properties/your-file-01.properties
# - encoding: UTF-8
# filename: classpath*:properties/your-file-02.properties
extFileName:
- encoding: UTF-8
filename: classpath*:intf-conf/xit-lvis.properties

@ -0,0 +1,54 @@
{
"dirs": {
"receive": "files/ESB_AGENT/RCV", /* 수신 파일 최상위 디렉토리 */
"send": "files/ESB_AGENT/SND", /* 전송 파일 최상위 디렉토리 */
"working": "files/interface/work", /* 파일 작업 최상위 디렉토리 */
"success": "files/interface/success", /* 작업 완료한 파일의 최상위 디렉토리 */
"fail": "files/interface/fail" /* 작업 실패한 파일의 최상위 디렉토리 */
},
"dirCodes": {
"smg": "CG131000000768", /* 국민신문고 기관코드 */
"epost": "CG144523401150" /* epost 기관코드 */
},
"defaults": {
"charset": "euc-kr",
"fetchSize": 100,
"workSize": 100
},
"jobs": [
{ /* 국민신문고 수신 */
"name": "smg-receive",
"dirCode": "smg", /* <-- dirCodes */
"infoType": "010",
"alert": "http://localhost:8080/fims/api/smg/petition/receive.do" /* 업무 통보 url */
},
{ /* 국민신문고 전송 */
"name": "smg-send",
"dirCode": "smg", /* <-- dirCodes */
"alert": "http://localhost:8080/fims/api/smg/petition/reply.do" /* 업무 통보 url */
},
{ /* epost 전자우편 신청 전송 */
"name": "epost-send-request",
"dirCode": "epost", /* <-- dirCodes */
"conOrg": "YICT", /* 외부기관 구분코드 */
"rceptId": "40219", /* 접수우체국 국기호 */
"expiryDays": 10, /* 배달 만료 일수 */
"attachmentDir": "files/interface/attachment/epost", /* 원본 첨부파일 디렉토리 경로 */
"txtFilename": "POSDF5$send_{yyyyMMddHHmmssSSS}.txt",
"zipFilename": "POSDF5${conKey}.zip"
},
{ /* epost 전자우편 신청 수신 결과 */
"name": "epost-receive-result",
"dirCode": "epost", /* <-- dirCodes */
"alert": "http://localhost:8080/fims/api/epost/result/receive.do" /* 업무 통보 url */
}
]
}

@ -0,0 +1,34 @@
#\uc2dc\uad70\uad6c\ucf54\ub4dc(\ud544\uc218)
lvis.sigungu.code=28000
#\ub2f4\ub2f9\uc790 \uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638
lvis.charger.ihinum=
#\ub2f4\ub2f9\uc790 IP \uc5b4\ub4dc\ub808\uc2a4
lvis.charger.ip_adres=
#\ub2f4\ub2f9\uc790\uba85
lvis.charger.nm=\uc774\uad11\uc9c4
#\ub2f4\ub2f9\uc790 \uc5f0\ub77d\ucc98
lvis.charger.wrc_telno=032-440-3963
#\uc815\ubcf4\uc2dc\uc2a4\ud15c ID(\ud544\uc218)
lvis.info_sys.id=28-230
#\uc815\ubcf4\uc2dc\uc2a4\ud15c IP(\ud544\uc218)
lvis.info_sys.ip=101.0.115.13
#\uc815\ubcf4\uc2dc\uc2a4\ud15c MAC \uc5b4\ub4dc\ub808\uc2a4
lvis.info_sys.macaddress=EC:EB:B8:97:F2:14
#\uc554\ud638\ud654\ud0a4
lvis.enc.key=0BCE7F19897CEA91
#\uc554\ud638\ud654\ud0a4 \uadf8\ub8f9
lvis.enc.key_group=1
#\uc554\ud638\ud654\ud0a4 \ubc88\ud638
lvis.enc.key_no=1
#lvis \uc0ac\uc6a9 \uc11c\ube44\uc2a4 (production || test)
lvis.host.active=test
#lvis \uc6b4\uc601 \uc11c\ube44\uc2a4 \uc8fc\uc18c
lvis.host.production=http://auto.car.go.kr:39700/lvis/services/WsFrontController
#lvis \ud14c\uc2a4\ud2b8 \uc11c\ube44\uc2a4 \uc8fc\uc18c
lvis.host.test=http://10.98.198.199:9700/lvis/services/WsFrontController
#\uc790\ub3d9\ucc28 \uae30\ubcf8\uc0ac\ud56d \uc870\ud68c \ub85c\uadf8 \uc800\uc7a5 \uc5ec\ubd80(true || false)
lvis.log.basicInfo=true

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd" >
<!-- 국민신문고 민원 수신 -->
<bean id="smgReceiver" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="smgService"/>
<property name="targetMethod" value="receivePetitions"/>
</bean>
<bean id="smgReceiverTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="smgReceiver" />
<property name="cronExpression" value="0 0/1 * * * ?" /> <!-- 1분마다 -->
</bean>
<!-- 국민신문고 민원답변 전송 -->
<bean id="smgSender" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="smgService"/>
<property name="targetMethod" value="sendReplies"/>
</bean>
<bean id="smgSenderTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="smgSender" />
<property name="cronExpression" value="0 0/1 * * * ?" /> <!-- 1분마다 -->
</bean>
<!-- epost 전자우편 신청 전송 -->
<bean id="epostSender" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="emailRequestService"/>
<property name="targetMethod" value="sendRequests"/>
</bean>
<bean id="epostSenderTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="epostSender" />
<property name="cronExpression" value="0 0/1 0 * * ?" /> <!-- 1분마다 -->
</bean>
<!-- epost 전자우편 결과 수신 -->
<bean id="epostReceiver" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="emailResultService"/>
<property name="targetMethod" value="receiveResults"/>
</bean>
<bean id="epostReceiverTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="epostReceiver" />
<property name="cronExpression" value="0 30 6 * * ?" /> <!-- 매일 06:30 -->
<!-- property name="cronExpression" value="0 0/1 0 * * ?" /> <1분마다 -->
</bean>
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="jobDetails">
<list>
<ref bean="smgReceiver" />
<ref bean="smgSender" />
<ref bean="epostSender" />
<ref bean="epostReceiver" />
</list>
</property>
<property name="triggers">
<list>
<ref bean="smgReceiverTrigger" />
<ref bean="smgSenderTrigger" />
<ref bean="epostSenderTrigger" />
<ref bean="epostReceiverTrigger" />
</list>
</property>
</bean>
<!--
실행 스케쥴 설정 참고 -> https://fmd1225.tistory.com/60
-->
</beans>

@ -22,12 +22,13 @@
<sql id="fileDirs">SELECT INF_TYPE
, CONCAT('files/', DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR
FROM (
SELECT '010' INF_TYPE, 'smg' DIR UNION <!-- 국민 신문고 -->
SELECT '020' INF_TYPE, 'saeol' DIR UNION <!-- 세올 -->
SELECT '030' INF_TYPE, 'epost' DIR UNION <!-- epost -->
SELECT '100' INF_TYPE, 'violation' DIR UNION <!-- 단속 정보 -->
SELECT '110' INF_TYPE, 'opinion' DIR UNION <!-- 의견 진술 -->
SELECT '190' INF_TYPE, 'capture' DIR <!-- 캡쳐용 동영상 -->
SELECT '010' INF_TYPE, 'interface/attachment/smg' DIR UNION <!-- 국민 신문고 -->
SELECT '020' INF_TYPE, 'interface/attachment/saeol' DIR UNION <!-- 세올 -->
SELECT '030' INF_TYPE, 'interface/attachment/epost' DIR UNION <!-- epost -->
SELECT '100' INF_TYPE, 'attachment/violation' DIR UNION <!-- 단속 정보 -->
SELECT '110' INF_TYPE, 'attachment/opinion' DIR UNION <!-- 의견 진술 -->
SELECT '190' INF_TYPE, 'attachment/capture' DIR <!-- 캡쳐용 동영상 -->
) FILE_DIRS</sql>
<sql id="selectFiles">

@ -62,7 +62,7 @@
<insert id="insertCrdnSttsHstry" parameterType="map">/* 단속 상태 이력 등록(crdnSttsHstryMapper.insertCrdnSttsHstry) */
<selectKey resultType="string" keyProperty="crdnSttsHstry.sttsHstryId" keyColumn="NEW_ID" order="BEFORE">
SELECT LPAD(IFNULL(MAX(STTS_HSTRY_ID) + 1, 1), 20, '0') NEW_ID FROM TB_CRDN_STTS_HSTRY
SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(STTS_HSTRY_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_CRDN_STTS_HSTRY
</selectKey>
INSERT
INTO TB_CRDN_STTS_HSTRY (

@ -350,6 +350,8 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.VHCL_COLOR <!-- 차량색상 -->
, C.USE_FUEL_CD <!-- 사용 연료 코드 -->
, C.VIN <!-- 차대번호 -->
, C.LINK_TBL_NM <!-- 연계 테이블 명 -->
, C.LINK_ID <!-- 연계 아이디 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID AND CC.DEL_YN = 'N')
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)

@ -274,7 +274,24 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
</if>
</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
<when test="by == 'vhrno'">C.VHRNO</when>
<when test="by == 'crdnStdgNm'">C.CRDN_STDG_NM</when>
<when test="by == 'crdnPlc'">C.CRDN_PLC</when>
<when test="by == 'atchFileCnt'">C.ATCH_FILE_CNT</when>
<when test="by == 'crdnSttsCd'">C.CRDN_STTS_CD</when>
<when test="by == 'ffnlgAmt'">C.FFNLG_AMT</when>
<when test="by == 'crdnInptSeCd'">C.CRDN_INPT_SE_CD</when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
</otherwise>
</choose>
</if>
<include refid="utility.orderBy" />
@ -296,6 +313,8 @@ SELECT GROUP_CONCAT(C.CRDN_ID) AS CRDN_ID_LIST <!-- 단속 ID -->
</choose>
, COUNT(*) AS CRDN_CNT <!-- 단속건수 -->
FROM TB_CRDN C
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
AND C.VHRNO != ''
@ -310,7 +329,25 @@ SELECT GROUP_CONCAT(C.CRDN_ID) AS CRDN_ID_LIST <!-- 단속 ID -->
<if test="vhrno != null">AND C.VHRNO = #{vhrno}</if>
<if test="schExclEnd == 'on'">AND C.CRDN_STTS_CD != '81'</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
<when test="by == 'crdnInptSeCd'">C.CRDN_INPT_SE_CD</when>
<when test="by == 'teamNm'">TI.TEAM_NM</when>
<when test="by == 'vhrno'">C.VHRNO</when>
<when test="by == 'crdnStdgNm'">C.CRDN_STDG_NM</when>
<when test="by == 'crdnPlc'">C.CRDN_PLC</when>
<when test="by == 'crdnSttsCd'">C.CRDN_STTS_CD</when>
<when test="by == 'ffnlgAmt'">C.FFNLG_AMT</when>
<when test="by == 'rtpyrNm'">P.RTPYR_NM</when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
</otherwise>
</choose>
</if>
GROUP BY C.VHRNO<if test="schOnlySamePlace == 'on'">, C.CRDN_STDG_NM </if>
HAVING COUNT(*) <![CDATA[ >= ]]>
@ -461,6 +498,14 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<include refid="selectCrackdown"/>
</select>
<update id="update" parameterType="cokr.xit.fims.crdn.Crdn">
/* 단속정보 수정(crdn06Mapper.update) */
UPDATE TB_CRDN
SET ATCH_FILE_CNT = ATCH_FILE_CNT + (#{fileChgCnt})
<!-- TODO : 컬럼 추가 -->
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update>
</mapper>

@ -83,9 +83,9 @@
, E.CVLCPT_APLCNT_NM /* 민원 신청인 명 */
, E.CVLCPT_PRCS_PIC_NM /* 민원 처리 담당자 명 */
FROM TB_LEVY_EXCL A
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT E ON (C.CRDN_ID = E.CRDN_ID AND E.DEL_YN = 'N')
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT E ON (C.CRDN_ID = E.CRDN_ID AND E.DEL_YN = 'N')
</sql>
<select id="selectLevyExclList" parameterType="map" resultType="dataobject">/* 부과제외 대장 목록 조회(excl01Mapper.selectLevyExclList) */
@ -214,8 +214,10 @@
, C.VHRNO /* 차량번호 */
, C.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, D.RTPYR_NM /* 납부자 명 */
FROM TB_LEVY_EXCL A
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
</sql>
<select id="selectLevyExcls" parameterType="map" resultType="dataobject">/* 부과제외 대장 객체 가져오기(excl01Mapper.selectLevyExcl) */
@ -231,7 +233,28 @@
AND A.DEL_YN = #{delYn} /* 삭제 여부 */
</if>
</where>
<include refid="utility.sortBy" /> DESC
<include refid="utility.orderBy" />
</select>
<select id="selectCrdn" parameterType="map" resultType="dataobject">/* 단속 대장 객체 가져오기(excl01Mapper.selectCrdn) */
SELECT A.CRDN_ID /* 단속 ID */
, A.SGG_CD /* 시군구 코드 */
, A.TASK_SE_CD /* 업무 구분 코드 */
, A.CRDN_REG_SE_CD /* 단속 등록 구분 코드 */
, A.CRDN_YMD /* 단속 일자 */
, A.CRDN_TM /* 단속 시각 */
, A.VHRNO /* 차량번호 */
, A.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', A.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, A.CRDN_STTS_CHG_DT /* 단속 상태 변경 일시 */
, B.RTPYR_ID /* 납부자 ID */
, B.RTPYR_NM /* 납부자 명 */
, C.LEVY_EXCL_ID /* 부과 제외 ID */
, <include refid="utility.today" /> AS TODAY /* 오늘 일자 */
FROM TB_CRDN A
LEFT OUTER JOIN TB_PAYER B ON (A.RTPYR_ID = B.RTPYR_ID)
LEFT OUTER JOIN TB_LEVY_EXCL C ON (A.CRDN_ID = C.CRDN_ID AND C.DEL_YN = 'N')
WHERE A.CRDN_ID = #{crdnId} /* 단속 ID */
</select>
<insert id="insertLevyExcl" parameterType="map">/* 부과제외 대장 등록(excl01Mapper.insertLevyExcl) */
@ -302,30 +325,6 @@
</choose>
</update>
<select id="selectCrdnLevyExcl" parameterType="map" resultType="dataobject">/* 단속 대장 객체 가져오기(excl01Mapper.selectCrdnLevyExcl) */
SELECT A.CRDN_ID /* 단속 ID */
, A.SGG_CD /* 시군구 코드 */
, A.TASK_SE_CD /* 업무 구분 코드 */
, A.CRDN_REG_SE_CD /* 단속 등록 구분 코드 */
, A.CRDN_YMD /* 단속 일자 */
, A.CRDN_TM /* 단속 시각 */
, A.VHRNO /* 차량번호 */
, A.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', A.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, A.CRDN_STTS_CHG_DT /* 단속 상태 변경 일시 */
, B.LEVY_EXCL_ID /* 부과 제외 ID */
, B.LEVY_EXCL_YMD /* 부과제외 일자 */
, B.LEVY_EXCL_SE_CD /* 부과제외 구분 코드 */
, (SELECT FN_GET_CODE_NM('FIM021', B.LEVY_EXCL_SE_CD) FROM DUAL) AS LEVY_EXCL_SE_NM /* 부과 제외 구분 명 */
, B.LEVY_EXCL_RSN_CD /* 부과제외 사유 코드 */
, (SELECT FN_GET_CODE_NM('FIM022', B.LEVY_EXCL_RSN_CD) FROM DUAL) AS LEVY_EXCL_RSN_NM /* 부과 제외 사유 명 */
, B.ETC_CN /* 기타 내용 */
, <include refid="utility.today" /> AS TODAY /* 오늘 일자 */
FROM TB_CRDN A
LEFT OUTER JOIN TB_LEVY_EXCL B ON (A.CRDN_ID = B.CRDN_ID AND B.DEL_YN = 'N')
WHERE A.CRDN_ID = #{crdnId} /* 단속 ID */
</select>
<update id="updateCrdnSttsCd" parameterType="map">/* 단속 대장 수정(excl01Mapper.updateCrdnSttsCd) */
UPDATE TB_CRDN
SET CRDN_STTS_CD = #{excl01.crdnSttsCd} /* 단속 상태 코드 */

@ -119,8 +119,8 @@
, D.ADDR /* 주소 */
, D.DTL_ADDR /* 상세 주소 */
FROM TB_OPNN_SBMSN A
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
</sql>
<select id="selectOpnnSbmsnList" parameterType="map" resultType="dataobject">/* 의견제출 대장 목록 조회(excl02Mapper.selectOpnnSbmsnList) */
@ -275,26 +275,59 @@
, A.DEL_DT /* 삭제 일시 */
, A.DLTR /* 삭제자 */
, A.DEL_RSN /* 삭제 사유 */
, C.CRDN_YMD /* 단속 일자 */
, C.CRDN_TM /* 단속 시각 */
, C.VHRNO /* 차량번호 */
, C.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, D.RTPYR_NM /* 납부자 명 */
FROM TB_OPNN_SBMSN A
INNER JOIN TB_CRDN C ON (A.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER D ON (C.RTPYR_ID = D.RTPYR_ID)
</sql>
<select id="selectOpnnSbmsnInfo" parameterType="map" resultMap="excl02Row">/* 의견제출 대장 객체 가져오기(excl02Mapper.selectOpnnSbmsnInfo) */
<include refid="select" />
WHERE A.OPNN_ID = #{opnnId} /* 부과 제외 ID */
<include refid="utility.orderBy" />
</select>
<select id="selectOpnnSbmsns" parameterType="map" resultMap="excl02Row">/* 의견제출 대장 객체 가져오기(excl02Mapper.selectOpnnSbmsns) */
<select id="selectOpnnSbmsns" parameterType="map" resultType="dataobject">/* 의견제출 대장 객체 가져오기(excl02Mapper.selectOpnnSbmsns) */
<include refid="select" />
WHERE A.DEL_YN = 'N' /* 삭제 여부 */
<if test="opnnIds != null">
<where>
<if test="opnnIDs != null">
AND A.OPNN_ID IN (
<foreach collection="opnnIds" item="opnnId" separator=","> #{opnnId} </foreach>
<foreach collection="opnnIDs" item="opnnId" separator=","> #{opnnId} </foreach>
)
</if>
</if>
<if test="opnnId != null">
AND A.OPNN_ID = #{opnnId} /* 의견제출 ID */
</if>
<if test="crdnId != null">
AND A.CRDN_ID = #{crdnId} /* 단속 ID */
</if>
<if test="delYn != null">
AND A.DEL_YN = #{delYn} /* 삭제 여부 */
</if>
</where>
<include refid="utility.orderBy" />
</select>
<select id="selectCrdn" parameterType="map" resultType="dataobject">/* 단속 대장 객체 가져오기(excl02Mapper.selectCrdn) */
SELECT A.CRDN_ID /* 단속 ID */
, A.SGG_CD /* 시군구 코드 */
, A.TASK_SE_CD /* 업무 구분 코드 */
, A.CRDN_REG_SE_CD /* 단속 등록 구분 코드 */
, A.CRDN_YMD /* 단속 일자 */
, A.CRDN_TM /* 단속 시각 */
, A.VHRNO /* 차량번호 */
, A.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', A.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, A.CRDN_STTS_CHG_DT /* 단속 상태 변경 일시 */
, B.RTPYR_ID /* 납부자 ID */
, B.RTPYR_NM /* 납부자 명 */
, C.OPNN_ID /* 의견 ID */
, <include refid="utility.today" /> AS TODAY /* 오늘 일자 */
FROM TB_CRDN A
LEFT OUTER JOIN TB_PAYER B ON (A.RTPYR_ID = B.RTPYR_ID)
LEFT OUTER JOIN TB_OPNN_SBMSN C ON (A.CRDN_ID = C.CRDN_ID AND C.DEL_YN = 'N')
WHERE A.CRDN_ID = #{crdnId} /* 단속 ID */
</select>
<insert id="insertOpnnSbmsn" parameterType="map">/* 의견제출 대장 등록(excl02Mapper.insertOpnnSbmsn) */
INSERT
INTO TB_OPNN_SBMSN (
@ -403,7 +436,7 @@
WHERE OPNN_ID = #{opnnSbmsn.opnnId} /* 의견 ID */
</update>
<update id="deleteOpnnSbmsn" parameterType="map">/* 의견제출 대장 삭제(excl02Mapper.deleteOpnnSbmsn) */
<update id="delete" parameterType="map">/* 의견제출 대장 삭제(excl02Mapper.deleteOpnnSbmsn) */
UPDATE TB_OPNN_SBMSN
SET DEL_YN = 'Y'
, DEL_DT = <include refid="utility.now" /> /* 삭제 일시 */

@ -147,31 +147,30 @@
</select>
<insert id="insertCrdnReReg" parameterType="map">/* 단속 재등록 등록(excl03Mapper.insertCrdnReReg) */
<selectKey resultType="string" keyProperty="excl03.reRegId" keyColumn="NEW_ID" order="BEFORE">
SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RE_REG_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_CRDN_RE_REG
</selectKey>
INSERT INTO TB_CRDN_RE_REG (
RE_REG_ID /* 재등록 ID */
, BEF_CRDN_ID /* 신규 단속 ID */
, BFR_CRDN_ID /* 신규 단속 ID */
, CRDN_ID /* 단속 ID */
, RE_REG_YMD /* 재 등록 일자 */
, CRDN_REG_SE_CD /* 단속 등록 구분 코드 */
, ETC_CN /* 기타 내용 */
, DEL_YN /* 삭제 여부 */
, REG_DT /* 등록 일시 */
, RGTR /* 등록자 */
, DEL_DT /* 삭제 일시 */
, DLTR /* 삭제자 */
, DEL_RSN /* 삭제 사유 */
)
VALUES (
#{reRegId} /* 재등록 ID */
, #{befCrdnId} /* 신규 단속 ID */
, #{crdnId} /* 단속 ID */
, #{crdnRegSeCd} /* 단속 등록 구분 코드 */
, #{etcCn} /* 기타 내용 */
, #{delYn} /* 삭제 여부 */
, <include refid="utility.now" /> /* 등록 일시 */
, #{currentUser.id} /* 등록자 */
, #{removedAt} /* 삭제 일시 */
, #{removedBy} /* 삭제자 */
, #{delRsn} /* 삭제 사유 */
#{excl03.reRegId} /* 재등록 ID */
, #{excl03.bfrCrdnId} /* 신규 단속 ID */
, #{excl03.crdnId} /* 단속 ID */
, <include refid="utility.today" /> /* 재 등록 일자 */
, #{excl03.crdnRegSeCd} /* 단속 등록 구분 코드 */
, #{excl03.etcCn} /* 기타 내용 */
, 'N' /* 삭제 여부 */
, #{excl03.createdAt} /* 등록 일시 */
, #{excl03.createdBy} /* 등록자 */
)
</insert>
@ -186,214 +185,74 @@
</update>
<select id="selectCrdnInfo" parameterType="map" resultType="dataobject">/* 단속 재등록 객체 가져오기(excl03Mapper.selectCrdnInfo) */
SELECT CRDN_ID
, SGG_CD
, TASK_SE_CD
, CRDN_REG_SE_CD
, CRDN_INPT_SE_CD
, LINK_TBL_NM
, LINK_ID
, RTPYR_ID
, CRDN_SE_CD
, CRDN_YMD
, CRDN_TM
, VHRNO
, CRDN_STDG_NM
, CRDN_ROAD_NM
, CRDN_PLC
, DTL_CRDN_PLC
, TEAM_ID
, VLTN_ID
, CRDN_SPAREA_CD
, CRDN_BGNG_TM
, CRDN_END_HR
, CRDN_SN
, GPS_X
, GPS_Y
, MOSC_X
, MOSC_Y
, TOWNG_YN
, ATCH_FILE_CNT
, VIN
, VHCL_NM
, VHCL_COLOR
, USE_FUEL_CD
, USG_SE_CD
, MXMM_LOAD_QY
, TKCAR_PSNCPA_CNT
, CARMDL_ASORT_NM
, CARMDL_TYPE_NM
, CARMDL_CLSF_NM
, ERSR_YMD
, FFNLG_CARMDL_CD
, PARKNG_PSBLTY_RSLT_CD
, VLTN_NMTM
, OVTIME_YN
, RVW_SE_CD
, RVW_PRCS_SCRN_NM
, RVW_DT
, RVWR
, FFNLG_AMT
, FFNLG_RDUCT_RT
, LEVY_AMT
, ADVNTCE_BGNG_YMD
, ADVNTCE_DUDT_YMD
, ADVNTCE_LEVY_AMT
, OPNN_SBMSN_YN
, ETC_CN
, LEVY_ID
, CRDN_STTS_CD
, CRDN_STTS_CHG_DT
, ADTN_AMT
, MINUS_AMT
, RCVMT_AMT
, BFR_CRDN_ID
, DEL_YN /* 삭제 여부 */
, REG_DT /* 등록 일시 */
, RGTR /* 등록자 */
FROM TB_CRDN
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
SELECT A.CRDN_ID
, A.SGG_CD
, A.TASK_SE_CD
, A.CRDN_REG_SE_CD
, A.CRDN_INPT_SE_CD
, A.LINK_TBL_NM
, A.LINK_ID
, A.RTPYR_ID
, A.CRDN_SE_CD
, A.CRDN_YMD
, A.CRDN_TM
, A.VHRNO
, A.CRDN_STDG_NM
, A.CRDN_ROAD_NM
, A.CRDN_PLC
, A.DTL_CRDN_PLC
, A.TEAM_ID
, A.VLTN_ID
, (SELECT VLTN_CD FROM TB_VLTN_INFO X WHERE X.VLTN_ID = A.VLTN_ID AND X.SGG_CD = A.SGG_CD AND X.TASK_SE_CD = A.TASK_SE_CD) AS VLTN_CD
, A.CRDN_SPAREA_CD
, A.CRDN_BGNG_TM
, A.CRDN_END_HR
, A.CRDN_SN
, A.GPS_X
, A.GPS_Y
, A.MOSC_X
, A.MOSC_Y
, A.TOWNG_YN
, A.ATCH_FILE_CNT
, A.VIN
, A.VHCL_NM
, A.VHCL_COLOR
, A.USE_FUEL_CD
, A.USG_SE_CD
, A.MXMM_LOAD_QY
, A.TKCAR_PSNCPA_CNT
, A.CARMDL_ASORT_NM
, A.CARMDL_TYPE_NM
, A.CARMDL_CLSF_NM
, A.ERSR_YMD
, A.FFNLG_CARMDL_CD
, A.PARKNG_PSBLTY_RSLT_CD
, A.VLTN_NMTM
, A.OVTIME_YN
, A.RVW_SE_CD
, A.RVW_PRCS_SCRN_NM
, A.RVW_DT
, A.RVWR
, A.FFNLG_AMT
, A.FFNLG_RDUCT_RT
, A.LEVY_AMT
, A.ADVNTCE_BGNG_YMD
, A.ADVNTCE_DUDT_YMD
, A.ADVNTCE_LEVY_AMT
, A.OPNN_SBMSN_YN
, A.ETC_CN
, A.LEVY_ID
, A.CRDN_STTS_CD
, A.CRDN_STTS_CHG_DT
, A.ADTN_AMT
, A.MINUS_AMT
, A.RCVMT_AMT
, A.BFR_CRDN_ID
, A.DEL_YN /* 삭제 여부 */
, A.REG_DT /* 등록 일시 */
, A.RGTR /* 등록자 */
FROM TB_CRDN A
WHERE A.CRDN_ID = #{crdnId} /* 단속 ID */
</select>
<insert id="insertCopyCrdn" parameterType="map">/* 단속 재등록 등록(excl03Mapper.insertCopyCrdn) */
<selectKey resultType="string" keyProperty="crdnId" keyColumn="NEW_ID" order="BEFORE">
SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CRDN_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_CRDN
</selectKey>
INSERT INTO TB_CRDN (
CRDN_ID
, SGG_CD
, TASK_SE_CD
, CRDN_REG_SE_CD
, CRDN_INPT_SE_CD
, LINK_TBL_NM
, LINK_ID
, RTPYR_ID
, CRDN_SE_CD
, CRDN_YMD
, CRDN_TM
, VHRNO
, CRDN_STDG_NM
, CRDN_ROAD_NM
, CRDN_PLC
, DTL_CRDN_PLC
, TEAM_ID
, VLTN_ID
, CRDN_SPAREA_CD
, CRDN_BGNG_TM
, CRDN_END_HR
, CRDN_SN
, GPS_X
, GPS_Y
, MOSC_X
, MOSC_Y
, TOWNG_YN
, ATCH_FILE_CNT
, VIN
, VHCL_NM
, VHCL_COLOR
, USE_FUEL_CD
, USG_SE_CD
, MXMM_LOAD_QY
, TKCAR_PSNCPA_CNT
, CARMDL_ASORT_NM
, CARMDL_TYPE_NM
, CARMDL_CLSF_NM
, ERSR_YMD
, FFNLG_CARMDL_CD
, PARKNG_PSBLTY_RSLT_CD
, VLTN_NMTM
, OVTIME_YN
, RVW_SE_CD
, RVW_PRCS_SCRN_NM
, RVW_DT
, RVWR
, FFNLG_AMT
, FFNLG_RDUCT_RT
, LEVY_AMT
, ADVNTCE_BGNG_YMD
, ADVNTCE_DUDT_YMD
, ADVNTCE_LEVY_AMT
, OPNN_SBMSN_YN
, ETC_CN
, LEVY_ID
, CRDN_STTS_CD
, CRDN_STTS_CHG_DT
, ADTN_AMT
, MINUS_AMT
, RCVMT_AMT
, BFR_CRDN_ID
, DEL_YN /* 삭제 여부 */
, REG_DT /* 등록 일시 */
, RGTR /* 등록자 */
)
SELECT
, #{excl03.crdnId}
, SGG_CD
, TASK_SE_CD
, CRDN_REG_SE_CD
, CRDN_INPT_SE_CD
, LINK_TBL_NM
, LINK_ID
, RTPYR_ID
, CRDN_SE_CD
, CRDN_YMD
, CRDN_TM
, VHRNO
, CRDN_STDG_NM
, CRDN_ROAD_NM
, CRDN_PLC
, DTL_CRDN_PLC
, TEAM_ID
, VLTN_ID
, CRDN_SPAREA_CD
, CRDN_BGNG_TM
, CRDN_END_HR
, CRDN_SN
, GPS_X
, GPS_Y
, MOSC_X
, MOSC_Y
, TOWNG_YN
, ATCH_FILE_CNT
, VIN
, VHCL_NM
, VHCL_COLOR
, USE_FUEL_CD
, USG_SE_CD
, MXMM_LOAD_QY
, TKCAR_PSNCPA_CNT
, CARMDL_ASORT_NM
, CARMDL_TYPE_NM
, CARMDL_CLSF_NM
, ERSR_YMD
, FFNLG_CARMDL_CD
, PARKNG_PSBLTY_RSLT_CD
, VLTN_NMTM
, OVTIME_YN
, RVW_SE_CD
, RVW_PRCS_SCRN_NM
, RVW_DT
, RVWR
, FFNLG_AMT
, FFNLG_RDUCT_RT
, LEVY_AMT
, ADVNTCE_BGNG_YMD
, ADVNTCE_DUDT_YMD
, ADVNTCE_LEVY_AMT
, OPNN_SBMSN_YN
, ETC_CN
, NULL /* 부과 ID */
, '01' /* 단속 상태 코드 */
, <include refid="utility.now" /> /* 단속 상태 변경 일시 */
, '0' /* 가산 금액 */
, '0' /* 감경 금액 */
, '0' /* 수납 금액 */
, CRDN_ID
, 'N' /* 삭제 여부 */
, #{excl03.createdAt} /* 등록 일시 */
, #{excl03.createdBy} /* 등록자 */
FROM TB_CRDN
WHERE CRDN_ID = #{excl03.bfrCrdnId} /* 이전 단속 ID */
</insert>
</mapper>

@ -0,0 +1,835 @@
<?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.interfaces.epost.dao.EmailRequestMapper">
<!-- 전자우편 신청 정보 매퍼
========== 변경 이력 ==========
2023-07-03 mjkhan 최초 작성
============================ -->
<select id="selectSendingRequestList" parameterType="map" resultType="dataobject">/* 전자우편 접수 전송 대상 조회(emailRequestMapper.selectSendingRequestList) */
SELECT CON_ORG <!-- 외부기관구분코드 -->
, RCEPT_ID <!-- 접수우체국국기호 -->
, DATA_CD <!-- 접수코드 -->
, DIV_KB <!-- 취급구분 -->
, DFPAYYN <!-- 결재방법 -->
, RCPT_KB <!-- 내용문 유형 -->
, SEAL_CD <!-- 내용문 상세 종류 -->
, WORD_KB <!-- 내용문 종류 -->
, MAIL_CNT <!-- 내용문 매수 -->
, RECEV_CNT <!-- 수취인 수 -->
, ENV_CD <!-- 봉투 종류 -->
, COLOR_YN <!-- 칼라우편물/흑백우편물 -->
, MM_YN <!-- 메일머지 플래그 -->
, FLEX_CD <!-- 이면구분 -->
, DM_CNT <!-- 동봉물 개수, 없다면 '0' -->
, SB_FG <!-- 반송불필요여부 -->
, APVL_NB <!-- 승인번호 -->
, SEND_DATE <!-- 신청일자 -->
, SEND_TIME <!-- 전송시간 -->
, A.CON_KEY <!-- 외부 연계 식별키 -->
, RELORSECT_CD <!-- 연계기관결제부서코드 -->
, RGST_NMBR CON_DATA <!-- 외부 연계 추가 데이터 -->
, RECEV_SENDER_NM SENDER_NM <!-- 발송인명 -->
, RECEV_SENDER_ZIPCODE SENDER_ZIPCODE <!-- 우편번호 -->
, RECEV_SENDER_ADDR SENDER_ADDR <!-- 주소(시, 구) -->
, RECEV_SENDER_DETAILADDR SENDER_DTAILADDR <!-- 상세주소 -->
, A.CON_KEY SENDER_DATA <!-- 발송인별 추가 데이터 -->
, @row_no := CASE WHEN @con_key = A.CON_KEY THEN @row_no + 1
ELSE 1
END SQL_CNT <!-- 수취인순번 -->
, @con_key := A.CON_KEY _PREV_CON
, RECEV_CAR_OWNER_NM RECEV_NM <!-- 수취인명 -->
, RECEV_CAR_OWNER_ZIPCODE RECEV_ZIPCODE <!-- 우편번호 -->
, RECEV_CAR_OWNER_ADDR RECEV_ADDR <!-- 주소(시, 구) -->
, RECEV_CAR_OWNER_DETAILADDR RECEV_DTAILADDR <!-- 상세주소 -->
, RGST_NMBR <!-- 등기번호 -->
, 'NULL' RECEV_DATA <!-- 수취인별 추가 데이터 -->
, 'NULL' TEL_NUMBER1 <!-- 수취인별 전화번호(앞) -->
, 'NULL' TEL_NUMBER2 <!-- 수취인별 전화번호(중간) -->
, 'NULL' TEL_NUMBER3 <!-- 수취인별 전화번호(끝) -->
, 'NULL' PHONE_NUMBER1 <!-- 수취인별핸드폰번호(앞) -->
, 'NULL' PHONE_NUMBER2 <!-- 수취인별핸드폰번호(중간) -->
, 'NULL' PHONE_NUMBER3 <!-- 수취인별핸드폰번호(끝) -->
, 'NULL' RETURN_NM <!-- 회송처 -->
, 'NULL' RETURN_ZIPCODE <!-- 회송처 우편번호 -->
, 'NULL' RETURN_ADDR <!-- 회송처 주소 -->
, 'NULL' RETURN_DTAILADDR <!-- 회송처 상세주소 -->
, NULL ATTACH_NM <!-- 첨부파일 -->
, RECEV_SENDER_ORG_CODE <!-- 발송기관코드 -->
, RECEV_SENDER_NM <!-- 발송인명 -->
, RECEV_SENDER_ZIPCODE <!-- 발송인 우편번호 -->
, RECEV_SENDER_ADDR <!-- 주소(시, 구) -->
, RECEV_SENDER_DETAILADDR <!-- 상세주소 -->
, RECEV_SENDER_DEPART_TEL <!-- 부과부서 전화번호 -->
, RECEV_SENDER_DEPART_NM <!-- 부과부서 -->
, RECEV_DIV_CD <!-- 등기구분 -->
, RECEV_SEQ <!-- 일련번호 -->
, RECEV_CODE <!-- 발송코드 -->
, RECEV_BAR1D <!-- 바코드 -->
, RECEV_BAR2D <!-- 이차원바코드 -->
, RECEV_BILL_NUNBER <!-- 고지번호 -->
, RECEV_DOC_CD1 <!-- 문서종류1 -->
, RECEV_DOC_CD2 <!-- 문서종류2 -->
, RECEV_DOC_CD3 <!-- 문서종류3 -->
, RECEV_DOC_CD4 <!-- 문서종류4 -->
, RECEV_DOC_CD5 <!-- 문서종류5 -->
, RECEV_SUBJ1 <!-- 과목명1 -->
, RECEV_SUBJ2 <!-- 과목명2 -->
, RECEV_SUBJ3 <!-- 과목명3 -->
, RECEV_VIOLATE_DT <!-- 위반일시 -->
, RECEV_VIOLATE_DONG <!-- 위반동 -->
, RECEV_VIOLATE_PLACE <!-- 위반장소 -->
, RECEV_LAWS <!-- 법조항 -->
, RECEV_PAY_NUMBER1 <!-- 납부번호1 -->
, RECEV_PAY_NUMBER2 <!-- 납부번호2 -->
, RECEV_OCR0 <!-- OCR0 -->
, RECEV_OCR1 <!-- OCR1 -->
, RECEV_OCR2 <!-- OCR2 -->
, RECEV_ONLINE_PAY_NUMBER <!-- 전자납부번호 -->
, VRACTNO RECEV_VACCOUNT_NUMBER <!-- 가상계좌번호 -->
, RECEV_FINE_PRICE <!-- 과태료 -->
, RECEV_PAY_PRICE <!-- 납부금액 -->
, RECEV_PAY_DT <!-- 납부기한 -->
, RECEV_PAY_IN_DATE <!-- 납기내기한 -->
, RECEV_PAY_IN_PRICE <!-- 납기내금액 -->
, RECEV_PAY_IN_ADD_PRICE <!-- 납기내가산금 -->
, RECEV_PAY_IN_DEFAULT_PRICE <!-- 납기내합계금액 -->
, RECEV_PAY_OUT_DATE <!-- 납기후기한 -->
, RECEV_PAY_OUT_PRICE <!-- 납기후금액 -->
, RECEV_PAY_OUT_ADD_PRICE <!-- 납기후가산금 -->
, RECEV_PAY_OUT_DEFAULT_PRICE <!-- 납기후합계금액 -->
, RECEV_CAR_NUMBER <!-- 차량번호 -->
, RECEV_CAR_OWNER_ZIPCODE <!-- 우편번호 -->
, RECEV_CAR_OWNER_ADDR <!-- 주소(시, 구) -->
, RECEV_CAR_OWNER_DETAILADDR <!-- 상세주소 -->
, RECEV_CAR_OWNER_NM <!-- 소유자명 -->
, RECEV_CAR_OWNER_SSN <!-- 주민번호(생년월일) -->
, RECEV_PRINT_DT <!-- 출력일자 -->
, RECEV_PRINT_YEAR <!-- 출력년도 -->
, RECEV_PRINT_MONTH <!-- 출력월 -->
, RECEV_PRINT_DAY <!-- 출력일 -->
, RECEV_EVIDENCE_NUMBER <!-- 증거번호 -->
, RECEV_PHOTO_CNT <!-- 사진장수 -->
, RECEV_PHOTO_FILENAME1 <!-- 사진파일명1 -->
, RECEV_PHOTO_FILENAME2 <!-- 사진파일명2 -->
, RECEV_PHOTO_FILENAME3 <!-- 사진파일명3 -->
, RECEV_PHOTO_FILENAME4 <!-- 사진파일명4 -->
, REG_VAR_DATA1 RECV_NOTICE_CONTS <!-- 주.정차위반과태료납부 안내 -->
, 'NULL' RECEV_TEMP_DATA1 <!-- 추가데이터1 -->
, 'NULL' RECEV_TEMP_DATA2 <!-- 추가데이터2 -->
, 'NULL' RECEV_TEMP_DATA3 <!-- 추가데이터3 -->
, DTL_VAR_DATA1 RECEV_TEMP_DATA4 <!-- 추가데이터4 (계도 메일 제목) -->
, DTL_VAR_DATA2 RECEV_TEMP_DATA5 <!-- 추가데이터5 (계도 메일 내용) -->
, RECEV_SENDER_FAX <!-- 부과부서 팩스번호 -->
, RECEV_SERDER_STAFF <!-- 부과부서 담당자 -->
, RECEV_SENDER_EMAIL <!-- 부과부서 이메일 -->
, VRACTNO2 RECEV_TEMP_DATA6 <!-- 추가데이터6 -->
, VRACTNO3 RECEV_TEMP_DATA7 <!-- 추가데이터7 -->
, VRACTNO4 RECEV_TEMP_DATA8 <!-- 추가데이터8 -->
, VRACTNO5 RECEV_TEMP_DATA9 <!-- 추가데이터9 -->
, VRACTNO6 RECEV_TEMP_DATA10 <!-- 추가데이터10 -->
, VRACTNO7 RECEV_TEMP_DATA11 <!-- 추가데이터11 -->
, VRACTNO8 RECEV_TEMP_DATA12 <!-- 추가데이터12 -->
, VRACTNO9 RECEV_TEMP_DATA13 <!-- 추가데이터13 -->
, VRACTNO10 RECEV_TEMP_DATA14 <!-- 추가데이터14 -->
, VRACTNO11 RECEV_TEMP_DATA15 <!-- 추가데이터15 -->
FROM TB_EPOST_RCPT_REG A
, TB_EPOST_RCPT_DTL B
, (SELECT @row_no := 0, @con_key := '', #{conOrg} CON_ORG) C
WHERE POST_PROC_STT = '01'
AND A.CON_KEY = B.CON_KEY
ORDER BY A.CON_KEY, RGST_NMBR, RECEV_SEQ</select>
<resultMap id="emailRequestRow" type="cokr.xit.interfaces.epost.EmailRequest"> <!-- 전자우편 신청 -->
<result property="conKey" column="CON_KEY" /> <!-- 외부연계식별키 -->
<result property="rceptId" column="RCEPT_ID" /> <!-- 접수우체국국기호 -->
<result property="dataCd" column="DATA_CD" /> <!-- 접수코드 -->
<result property="divKb" column="DIV_KB" /> <!-- 취급구분 -->
<result property="dfpayyn" column="DFPAYYN" /> <!-- 결재방법 -->
<result property="rcptKb" column="RCPT_KB" /> <!-- 내용문 유형 -->
<result property="sealCd" column="SEAL_CD" /> <!-- 내용문 상세 종류 -->
<result property="wordKb" column="WORD_KB" /> <!-- 내용문 종류 -->
<result property="mailCnt" column="MAIL_CNT" /> <!-- 내용문 매수 -->
<result property="recevCnt" column="RECEV_CNT" /> <!-- 수취인 수 -->
<result property="envCd" column="ENV_CD" /> <!-- 봉투 종류 -->
<result property="colorYn" column="COLOR_YN" /> <!-- 칼라우편물 -->
<result property="mmYn" column="MM_YN" /> <!-- 메일머지 플래그 -->
<result property="flexCd" column="FLEX_CD" /> <!-- 이면구분 -->
<result property="dmCnt" column="DM_CNT" /> <!-- 동봉물 개수 -->
<result property="sbFg" column="SB_FG" /> <!-- 반송불필요 여부 -->
<result property="apvlNb" column="APVL_NB" /> <!-- 승인번호 -->
<result property="sendDate" column="SEND_DATE" /> <!-- 신청 일자 -->
<result property="sendTime" column="SEND_TIME" /> <!-- 전송 시간 -->
<result property="relorsectCd" column="RELORSECT_CD" /> <!-- 연계기관결제부서코드 -->
<result property="recevSenderOrgCode" column="RECEV_SENDER_ORG_CODE" /> <!-- 발송기관코드 -->
<result property="recevSenderNm" column="RECEV_SENDER_NM" /> <!-- 발송인명 -->
<result property="recevSenderZipcode" column="RECEV_SENDER_ZIPCODE" /> <!-- 발송인 우편번호 -->
<result property="recevSenderAddr" column="RECEV_SENDER_ADDR" /> <!-- 주소 -->
<result property="recevSenderDetailaddr" column="RECEV_SENDER_DETAILADDR" /> <!-- 상세주소 -->
<result property="recevSenderDepartTel" column="RECEV_SENDER_DEPART_TEL" /> <!-- 부과부서 전화번호 -->
<result property="recevSenderDepartNm" column="RECEV_SENDER_DEPART_NM" /> <!-- 부과부서 -->
<result property="recevDivCd" column="RECEV_DIV_CD" /> <!-- 등기구분 -->
<result property="recevPrintDt" column="RECEV_PRINT_DT" /> <!-- 출력일자 -->
<result property="recevPrintYear" column="RECEV_PRINT_YEAR" /> <!-- 출력연도 -->
<result property="recevPrintMonth" column="RECEV_PRINT_MONTH" /> <!-- 출력월 -->
<result property="recevPrintDay" column="RECEV_PRINT_DAY" /> <!-- 출력일 -->
<result property="recevSenderFax" column="RECEV_SENDER_FAX" /> <!-- 부과부서 팩스번호 -->
<result property="recevSerderStaff" column="RECEV_SERDER_STAFF" /> <!-- 부과부서 담당자 -->
<result property="recevSenderEmail" column="RECEV_SENDER_EMAIL" /> <!-- 부과부서 이메일 -->
<result property="sndngId" column="SNDNG_ID" /> <!-- 발송 ID -->
<result property="jobCd" column="JOB_CD" /> <!-- 작업 코드 -->
<result property="regVarData1" column="REG_VAR_DATA1" /> <!-- 추가 데이터1 (주.정차위반과태료납부 안내) -->
<result property="regVarData2" column="REG_VAR_DATA2" /> <!-- 추가 데이터2 -->
<result property="regVarData3" column="REG_VAR_DATA3" /> <!-- 추가 데이터3 -->
<result property="regVarData4" column="REG_VAR_DATA4" /> <!-- 추가 데이터4 -->
<result property="regVarData5" column="REG_VAR_DATA5" /> <!-- 추가 데이터5 -->
<result property="postProcStt" column="POST_PROC_STT" /> <!-- 우편 처리 상태 -->
<result property="rceptYmd" column="RCEPT_YMD" /> <!-- 접수 일자 -->
<result property="delYn" column="DEL_YN" /> <!-- 삭제 여부 -->
<result property="createdAt" column="REG_DT" /> <!-- 등록 일시 -->
<result property="createdBy" column="RGTR" /> <!-- 등록자 -->
<result property="removedAt" column="DEL_DT" /> <!-- 삭제 일시 -->
<result property="removedBy" column="DLTR" /> <!-- 삭제자 -->
</resultMap>
<sql id="select">SELECT CON_KEY <!-- 외부연계식별키 -->
, RCEPT_ID <!-- 접수우체국국기호 -->
, DATA_CD <!-- 접수코드 -->
, DIV_KB <!-- 취급구분 -->
, DFPAYYN <!-- 결재방법 -->
, RCPT_KB <!-- 내용문 유형 -->
, SEAL_CD <!-- 내용문 상세 종류 -->
, WORD_KB <!-- 내용문 종류 -->
, MAIL_CNT <!-- 내용문 매수 -->
, RECEV_CNT <!-- 수취인 수 -->
, ENV_CD <!-- 봉투 종류 -->
, COLOR_YN <!-- 칼라우편물 -->
, MM_YN <!-- 메일머지 플래그 -->
, FLEX_CD <!-- 이면구분 -->
, DM_CNT <!-- 동봉물 개수 -->
, SB_FG <!-- 반송불필요 여부 -->
, APVL_NB <!-- 승인번호 -->
, SEND_DATE <!-- 신청 일자 -->
, SEND_TIME <!-- 전송 시간 -->
, RELORSECT_CD <!-- 연계기관결제부서코드 -->
, RECEV_SENDER_ORG_CODE <!-- 발송기관코드 -->
, RECEV_SENDER_NM <!-- 발송인명 -->
, RECEV_SENDER_ZIPCODE <!-- 발송인 우편번호 -->
, RECEV_SENDER_ADDR <!-- 주소 -->
, RECEV_SENDER_DETAILADDR <!-- 상세주소 -->
, RECEV_SENDER_DEPART_TEL <!-- 부과부서 전화번호 -->
, RECEV_SENDER_DEPART_NM <!-- 부과부서 -->
, RECEV_DIV_CD <!-- 등기구분 -->
, RECEV_PRINT_DT <!-- 출력일자 -->
, RECEV_PRINT_YEAR <!-- 출력연도 -->
, RECEV_PRINT_MONTH <!-- 출력월 -->
, RECEV_PRINT_DAY <!-- 출력일 -->
, RECEV_SENDER_FAX <!-- 부과부서 팩스번호 -->
, RECEV_SERDER_STAFF <!-- 부과부서 담당자 -->
, RECEV_SENDER_EMAIL <!-- 부과부서 이메일 -->
, SNDNG_ID <!-- 발송 ID -->
, JOB_CD <!-- 작업 코드 -->
, REG_VAR_DATA1 <!-- 추가 데이터1 (주.정차위반과태료납부 안내) -->
, REG_VAR_DATA2 <!-- 추가 데이터2 -->
, REG_VAR_DATA3 <!-- 추가 데이터3 -->
, REG_VAR_DATA4 <!-- 추가 데이터4 -->
, REG_VAR_DATA5 <!-- 추가 데이터5 -->
, POST_PROC_STT <!-- 우편 처리 상태 -->
, RCEPT_YMD <!-- 접수 일자 -->
, DEL_YN <!-- 삭제 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, DEL_DT <!-- 삭제 일시 -->
, DLTR <!-- 삭제자 -->
FROM TB_EPOST_RCPT_REG</sql>
<select id="selectRequestList" parameterType="map" resultType="dataobject">/* 전자우편 신청 목록 조회(emailRequestMapper.selectRequestList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
<where>
<if test="conKeys != null">AND CON_KEY IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)</if>
<if test="conKeys == null">
AND RCEPT_YMD BETWEEN #{fromRegDate} AND #{toRegDate}
<if test="statusList != null">AND POST_PROC_STT IN (<foreach collection="statusList" item="status" separator=",">#{status}</foreach>)</if>
AND DEL_YN = 'N'
</if>
</where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select>
<select id="selectRequests" parameterType="map" resultMap="emailRequestRow">/* 전자우편 신청 객체 가져오기(emailRequestMapper.selectRequests) */
<include refid="select" />
<where>AND CON_KEY IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)</where>
<include refid="utility.orderBy" /></select>
<insert id="insertRequest" parameterType="map">/* 전자우편 신청 등록(emailRequestMapper.insertRequest) */
INSERT INTO TB_EPOST_RCPT_REG (
CON_KEY <!-- 외부연계식별키 -->
, RCEPT_ID <!-- 접수우체국국기호 -->
, DATA_CD <!-- 접수코드 -->
, DIV_KB <!-- 취급구분 -->
, DFPAYYN <!-- 결재방법 -->
, RCPT_KB <!-- 내용문 유형 -->
, SEAL_CD <!-- 내용문 상세 종류 -->
, WORD_KB <!-- 내용문 종류 -->
, MAIL_CNT <!-- 내용문 매수 -->
, RECEV_CNT <!-- 수취인 수 -->
, ENV_CD <!-- 봉투 종류 -->
, COLOR_YN <!-- 칼라우편물 -->
, MM_YN <!-- 메일머지 플래그 -->
, FLEX_CD <!-- 이면구분 -->
, DM_CNT <!-- 동봉물 개수 -->
, SB_FG <!-- 반송불필요 여부 -->
, APVL_NB <!-- 승인번호 -->
, SEND_DATE <!-- 신청 일자 -->
, SEND_TIME <!-- 전송 시간 -->
, RELORSECT_CD <!-- 연계기관결제부서코드 -->
, RECEV_SENDER_ORG_CODE <!-- 발송기관코드 -->
, RECEV_SENDER_NM <!-- 발송인명 -->
, RECEV_SENDER_ZIPCODE <!-- 발송인 우편번호 -->
, RECEV_SENDER_ADDR <!-- 주소 -->
, RECEV_SENDER_DETAILADDR <!-- 상세주소 -->
, RECEV_SENDER_DEPART_TEL <!-- 부과부서 전화번호 -->
, RECEV_SENDER_DEPART_NM <!-- 부과부서 -->
, RECEV_DIV_CD <!-- 등기구분 -->
, RECEV_PRINT_DT <!-- 출력일자 -->
, RECEV_PRINT_YEAR <!-- 출력연도 -->
, RECEV_PRINT_MONTH <!-- 출력월 -->
, RECEV_PRINT_DAY <!-- 출력일 -->
, RECEV_SENDER_FAX <!-- 부과부서 팩스번호 -->
, RECEV_SERDER_STAFF <!-- 부과부서 담당자 -->
, RECEV_SENDER_EMAIL <!-- 부과부서 이메일 -->
, SNDNG_ID <!-- 발송 ID -->
, JOB_CD <!-- 작업 코드 -->
, REG_VAR_DATA1 <!-- 추가 데이터1 (주.정차위반과태료납부 안내) -->
, REG_VAR_DATA2 <!-- 추가 데이터2 -->
, REG_VAR_DATA3 <!-- 추가 데이터3 -->
, REG_VAR_DATA4 <!-- 추가 데이터4 -->
, REG_VAR_DATA5 <!-- 추가 데이터5 -->
, POST_PROC_STT <!-- 우편 처리 상태 -->
, RCEPT_YMD <!-- 접수 일자 -->
, DEL_YN <!-- 삭제 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, DEL_DT <!-- 삭제 일시 -->
, DLTR <!-- 삭제자 -->
) VALUES (
#{emailRequest.conKey} <!-- 외부연계식별키 -->
, #{emailRequest.rceptId} <!-- 접수우체국국기호 -->
, #{emailRequest.dataCd} <!-- 접수코드 -->
, #{emailRequest.divKb} <!-- 취급구분 -->
, #{emailRequest.dfpayyn} <!-- 결재방법 -->
, #{emailRequest.rcptKb} <!-- 내용문 유형 -->
, #{emailRequest.sealCd} <!-- 내용문 상세 종류 -->
, #{emailRequest.wordKb} <!-- 내용문 종류 -->
, #{emailRequest.mailCnt} <!-- 내용문 매수 -->
, #{emailRequest.recevCnt} <!-- 수취인 수 -->
, #{emailRequest.envCd} <!-- 봉투 종류 -->
, #{emailRequest.colorYn} <!-- 칼라우편물 -->
, #{emailRequest.mmYn} <!-- 메일머지 플래그 -->
, #{emailRequest.flexCd} <!-- 이면구분 -->
, #{emailRequest.dmCnt} <!-- 동봉물 개수 -->
, #{emailRequest.sbFg} <!-- 반송불필요 여부 -->
, #{emailRequest.apvlNb} <!-- 승인번호 -->
, #{emailRequest.sendDate} <!-- 신청 일자 -->
, #{emailRequest.sendTime} <!-- 전송 시간 -->
, #{emailRequest.relorsectCd} <!-- 연계기관결제부서코드 -->
, #{emailRequest.recevSenderOrgCode} <!-- 발송기관코드 -->
, #{emailRequest.recevSenderNm} <!-- 발송인명 -->
, #{emailRequest.recevSenderZipcode} <!-- 발송인 우편번호 -->
, #{emailRequest.recevSenderAddr} <!-- 주소 -->
, #{emailRequest.recevSenderDetailaddr} <!-- 상세주소 -->
, #{emailRequest.recevSenderDepartTel} <!-- 부과부서 전화번호 -->
, #{emailRequest.recevSenderDepartNm} <!-- 부과부서 -->
, #{emailRequest.recevDivCd} <!-- 등기구분 -->
, #{emailRequest.recevPrintDt} <!-- 출력일자 -->
, #{emailRequest.recevPrintYear} <!-- 출력연도 -->
, #{emailRequest.recevPrintMonth} <!-- 출력월 -->
, #{emailRequest.recevPrintDay} <!-- 출력일 -->
, #{emailRequest.recevSenderFax} <!-- 부과부서 팩스번호 -->
, #{emailRequest.recevSerderStaff} <!-- 부과부서 담당자 -->
, #{emailRequest.recevSenderEmail} <!-- 부과부서 이메일 -->
, #{emailRequest.sndngId} <!-- 발송 ID -->
, #{emailRequest.jobCd} <!-- 작업 코드 -->
, #{emailRequest.regVarData1} <!-- 추가 데이터1 (주.정차위반과태료납부 안내) -->
, #{emailRequest.regVarData2} <!-- 추가 데이터2 -->
, #{emailRequest.regVarData3} <!-- 추가 데이터3 -->
, #{emailRequest.regVarData4} <!-- 추가 데이터4 -->
, #{emailRequest.regVarData5} <!-- 추가 데이터5 -->
, #{emailRequest.postProcStt} <!-- 우편 처리 상태 -->
, #{emailRequest.rceptYmd} <!-- 접수 일자 -->
, #{emailRequest.delYn} <!-- 삭제 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{currentUser.id} <!-- 등록자 -->
, #{emailRequest.removedAt} <!-- 삭제 일시 -->
, #{emailRequest.removedBy} <!-- 삭제자 -->
)</insert>
<update id="updateRequest" parameterType="map">/* 전자우편 신청 수정(emailRequestMapper.updateRequest) */
UPDATE TB_EPOST_RCPT_REG SET
RCEPT_ID = #{emailRequest.rceptId} <!-- 접수우체국국기호 -->
, DATA_CD = #{emailRequest.dataCd} <!-- 접수코드 -->
, DIV_KB = #{emailRequest.divKb} <!-- 취급구분 -->
, DFPAYYN = #{emailRequest.dfpayyn} <!-- 결재방법 -->
, RCPT_KB = #{emailRequest.rcptKb} <!-- 내용문 유형 -->
, SEAL_CD = #{emailRequest.sealCd} <!-- 내용문 상세 종류 -->
, WORD_KB = #{emailRequest.wordKb} <!-- 내용문 종류 -->
, MAIL_CNT = #{emailRequest.mailCnt} <!-- 내용문 매수 -->
, RECEV_CNT = #{emailRequest.recevCnt} <!-- 수취인 수 -->
, ENV_CD = #{emailRequest.envCd} <!-- 봉투 종류 -->
, COLOR_YN = #{emailRequest.colorYn} <!-- 칼라우편물 -->
, MM_YN = #{emailRequest.mmYn} <!-- 메일머지 플래그 -->
, FLEX_CD = #{emailRequest.flexCd} <!-- 이면구분 -->
, DM_CNT = #{emailRequest.dmCnt} <!-- 동봉물 개수 -->
, SB_FG = #{emailRequest.sbFg} <!-- 반송불필요 여부 -->
, APVL_NB = #{emailRequest.apvlNb} <!-- 승인번호 -->
, SEND_DATE = #{emailRequest.sendDate} <!-- 신청 일자 -->
, SEND_TIME = #{emailRequest.sendTime} <!-- 전송 시간 -->
, RELORSECT_CD = #{emailRequest.relorsectCd} <!-- 연계기관결제부서코드 -->
, RECEV_SENDER_ORG_CODE = #{emailRequest.recevSenderOrgCode} <!-- 발송기관코드 -->
, RECEV_SENDER_NM = #{emailRequest.recevSenderNm} <!-- 발송인명 -->
, RECEV_SENDER_ZIPCODE = #{emailRequest.recevSenderZipcode} <!-- 발송인 우편번호 -->
, RECEV_SENDER_ADDR = #{emailRequest.recevSenderAddr} <!-- 주소 -->
, RECEV_SENDER_DETAILADDR = #{emailRequest.recevSenderDetailaddr} <!-- 상세주소 -->
, RECEV_SENDER_DEPART_TEL = #{emailRequest.recevSenderDepartTel} <!-- 부과부서 전화번호 -->
, RECEV_SENDER_DEPART_NM = #{emailRequest.recevSenderDepartNm} <!-- 부과부서 -->
, RECEV_DIV_CD = #{emailRequest.recevDivCd} <!-- 등기구분 -->
, RECEV_PRINT_DT = #{emailRequest.recevPrintDt} <!-- 출력일자 -->
, RECEV_PRINT_YEAR = #{emailRequest.recevPrintYear} <!-- 출력연도 -->
, RECEV_PRINT_MONTH = #{emailRequest.recevPrintMonth} <!-- 출력월 -->
, RECEV_PRINT_DAY = #{emailRequest.recevPrintDay} <!-- 출력일 -->
, RECEV_SENDER_FAX = #{emailRequest.recevSenderFax} <!-- 부과부서 팩스번호 -->
, RECEV_SERDER_STAFF = #{emailRequest.recevSerderStaff} <!-- 부과부서 담당자 -->
, RECEV_SENDER_EMAIL = #{emailRequest.recevSenderEmail} <!-- 부과부서 이메일 -->
, SNDNG_ID = #{emailRequest.sndngId} <!-- 발송 ID -->
, JOB_CD = #{emailRequest.jobCd} <!-- 작업 코드 -->
, REG_VAR_DATA1 = #{emailRequest.regVarData1} <!-- 추가 데이터1 (주.정차위반과태료납부 안내) -->
, REG_VAR_DATA2 = #{emailRequest.regVarData2} <!-- 추가 데이터2 -->
, REG_VAR_DATA3 = #{emailRequest.regVarData3} <!-- 추가 데이터3 -->
, REG_VAR_DATA4 = #{emailRequest.regVarData4} <!-- 추가 데이터4 -->
, REG_VAR_DATA5 = #{emailRequest.regVarData5} <!-- 추가 데이터5 -->
, POST_PROC_STT = #{emailRequest.postProcStt} <!-- 우편 처리 상태 -->
, RCEPT_YMD = #{emailRequest.rceptYmd} <!-- 접수 일자 -->
, DEL_YN = #{emailRequest.delYn} <!-- 삭제 여부 -->
, DEL_DT = #{emailRequest.removedAt} <!-- 삭제 일시 -->
, DLTR = #{emailRequest.removedBy} <!-- 삭제자 -->
WHERE CON_KEY = #{emailRequest.conKey}</update>
<update id="updateRequestStatus" parameterType="map">/* 전자우편 신청 상태 변경(emailRequestMapper.updateRequestStatus) */
UPDATE TB_EPOST_RCPT_REG SET
POST_PROC_STT = #{status}
<if test='resultType == "registration"'> , RCEPT_YMD = CASE CON_KEY<foreach collection="results" item="result">
WHEN #{result.reletcdata} THEN #{result.rceptYmd}</foreach>
ELSE RCEPT_YMD END</if>
WHERE CON_KEY IN (
<if test='conKeys != null'><foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach></if>
<if test='resultType == "reception"'><foreach collection="results" item="result" separator=",">#{result.reldivkey}</foreach></if>
<if test='resultType == "registration"'><foreach collection="results" item="result" separator=",">#{result.reletcdata}</foreach></if>
<if test='resultType == "production"'><foreach collection="results" item="result" separator=",">#{result.conKey}</foreach></if>
<if test='resultType == "delivery"'><foreach collection="results" item="result" separator=",">#{result.reletcdata}</foreach></if>
)
AND POST_PROC_STT &lt; #{maxStatus}</update>
<update id="updateRequestAsDelivered" parameterType="map">/* 전자우편 배달 완료 처리(emailRequestMapper.updateRequestAsDelivered) */
UPDATE TB_EPOST_RCPT_REG SET
POST_PROC_STT = #{status}
WHERE POST_PROC_STT = '27' <!-- 배달중 -->
AND DEL_YN = 'N'
AND REG_DT &lt; CONCAT(DATE_FORMAT(DATE_SUB(CURRENT_DATE, INTERVAL #{expiryDays} DAY), '%Y%m%d'), '000000')</update>
<update id="deleteRequest" parameterType="map">/* 전자우편 신청 삭제(emailRequestMapper.deleteRequest) */
UPDATE TB_EPOST_RCPT_REG SET
DEL_YN = 'Y'
, DEL_DT =<include refid="utility.now" />
, DLTR = #{currentUser.id}
WHERE CON_KEY IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)</update>
<resultMap id="emailRequestDetailRow" type="cokr.xit.interfaces.epost.EmailRequestDetail"> <!-- 전자우편 신청 상세 -->
<result property="conKey" column="CON_KEY" /> <!-- 외부연계식별키 -->
<result property="rgstNmbr" column="RGST_NMBR" /> <!-- 등기번호 -->
<result property="recevSeq" column="RECEV_SEQ" /> <!-- 일련번호 -->
<result property="recevCode" column="RECEV_CODE" /> <!-- 발송코드 -->
<result property="recevBar1d" column="RECEV_BAR1D" /> <!-- 바코드 -->
<result property="recevBar2d" column="RECEV_BAR2D" /> <!-- 이차원바코드 -->
<result property="recevBillNunber" column="RECEV_BILL_NUNBER" /> <!-- 고지번호 -->
<result property="recevDocCd1" column="RECEV_DOC_CD1" /> <!-- 문서종류1 -->
<result property="recevDocCd2" column="RECEV_DOC_CD2" /> <!-- 문서종류2 -->
<result property="recevDocCd3" column="RECEV_DOC_CD3" /> <!-- 문서종류3 -->
<result property="recevDocCd4" column="RECEV_DOC_CD4" /> <!-- 문서종류4 -->
<result property="recevDocCd5" column="RECEV_DOC_CD5" /> <!-- 문서종류5 -->
<result property="recevSubj1" column="RECEV_SUBJ1" /> <!-- 과목명1 -->
<result property="recevSubj2" column="RECEV_SUBJ2" /> <!-- 과목명2 -->
<result property="recevSubj3" column="RECEV_SUBJ3" /> <!-- 과목명3 -->
<result property="recevViolateDt" column="RECEV_VIOLATE_DT" /> <!-- 위반일시 -->
<result property="recevViolateDong" column="RECEV_VIOLATE_DONG" /> <!-- 위반동 -->
<result property="recevViolatePlace" column="RECEV_VIOLATE_PLACE" /> <!-- 위반장소 -->
<result property="recevLaws" column="RECEV_LAWS" /> <!-- 법조항 -->
<result property="recevPayNumber1" column="RECEV_PAY_NUMBER1" /> <!-- 납부번호1 -->
<result property="recevPayNumber2" column="RECEV_PAY_NUMBER2" /> <!-- 납부번호2 -->
<result property="recevOcr0" column="RECEV_OCR0" /> <!-- OCR0 -->
<result property="recevOcr1" column="RECEV_OCR1" /> <!-- OCR1 -->
<result property="recevOcr2" column="RECEV_OCR2" /> <!-- OCR2 -->
<result property="recevOnlinePayNumber" column="RECEV_ONLINE_PAY_NUMBER" /> <!-- 전자납부번호 -->
<result property="recevFinePrice" column="RECEV_FINE_PRICE" /> <!-- 과태료 -->
<result property="recevPayPrice" column="RECEV_PAY_PRICE" /> <!-- 납부금액 -->
<result property="recevPayDt" column="RECEV_PAY_DT" /> <!-- 납부기한 -->
<result property="recevPayInDate" column="RECEV_PAY_IN_DATE" /> <!-- 납기내기한 -->
<result property="recevPayInPrice" column="RECEV_PAY_IN_PRICE" /> <!-- 납기내금액 -->
<result property="recevPayInAddPrice" column="RECEV_PAY_IN_ADD_PRICE" /> <!-- 납기내가산금 -->
<result property="recevPayInDefaultPrice" column="RECEV_PAY_IN_DEFAULT_PRICE" /> <!-- 납기내합계금액 -->
<result property="recevPayOutDate" column="RECEV_PAY_OUT_DATE" /> <!-- 납기후기한 -->
<result property="recevPayOutPrice" column="RECEV_PAY_OUT_PRICE" /> <!-- 납기후금액 -->
<result property="recevPayOutAddPrice" column="RECEV_PAY_OUT_ADD_PRICE" /> <!-- 납기후가산금 -->
<result property="recevPayOutDefaultPrice" column="RECEV_PAY_OUT_DEFAULT_PRICE" /> <!-- 납기후합계금액 -->
<result property="recevCarNumber" column="RECEV_CAR_NUMBER" /> <!-- 차량번호 -->
<result property="recevCarOwnerZipcode" column="RECEV_CAR_OWNER_ZIPCODE" /> <!-- 우편번호 -->
<result property="recevCarOwnerAddr" column="RECEV_CAR_OWNER_ADDR" /> <!-- 주소 -->
<result property="recevCarOwnerDetailaddr" column="RECEV_CAR_OWNER_DETAILADDR" /> <!-- 상세주소 -->
<result property="recevCarOwnerNm" column="RECEV_CAR_OWNER_NM" /> <!-- 소유자명 -->
<result property="recevCarOwnerSsn" column="RECEV_CAR_OWNER_SSN" /> <!-- 주민번호 -->
<result property="recevEvidenceNumber" column="RECEV_EVIDENCE_NUMBER" /> <!-- 증거번호 -->
<result property="recevPhotoCnt" column="RECEV_PHOTO_CNT" /> <!-- 사진장수 -->
<result property="recevPhotoFilename1" column="RECEV_PHOTO_FILENAME1" /> <!-- 사진파일명1 -->
<result property="recevPhotoFilename2" column="RECEV_PHOTO_FILENAME2" /> <!-- 사진파일명2 -->
<result property="recevPhotoFilename3" column="RECEV_PHOTO_FILENAME3" /> <!-- 사진파일명3 -->
<result property="recevPhotoFilename4" column="RECEV_PHOTO_FILENAME4" /> <!-- 사진파일명4 -->
<result property="vractno2" column="VRACTNO2" /> <!-- 가상계좌번호2 -->
<result property="vractno3" column="VRACTNO3" /> <!-- 가상계좌번호3 -->
<result property="vractno4" column="VRACTNO4" /> <!-- 가상계좌번호4 -->
<result property="vractno5" column="VRACTNO5" /> <!-- 가상계좌번호5 -->
<result property="vractno6" column="VRACTNO6" /> <!-- 가상계좌번호6 -->
<result property="vractno7" column="VRACTNO7" /> <!-- 가상계좌번호7 -->
<result property="vractno8" column="VRACTNO8" /> <!-- 가상계좌번호8 -->
<result property="vractno9" column="VRACTNO9" /> <!-- 가상계좌번호9 -->
<result property="vractno10" column="VRACTNO10" /> <!-- 가상계좌번호10 -->
<result property="vractno11" column="VRACTNO11" /> <!-- 가상계좌번호11 -->
<result property="dtlVarData1" column="DTL_VAR_DATA1" /> <!-- 추가 데이터1 (계도 메일 제목) -->
<result property="dtlVarData2" column="DTL_VAR_DATA2" /> <!-- 추가 데이터2 (계도 메일 내용) -->
<result property="dtlVarData3" column="DTL_VAR_DATA3" /> <!-- 추가 데이터3 -->
<result property="dtlVarData4" column="DTL_VAR_DATA4" /> <!-- 추가 데이터4 -->
<result property="dtlVarData5" column="DTL_VAR_DATA5" /> <!-- 추가 데이터5 -->
<result property="dlvrRsltId" column="DLVR_RSLT_ID" /> <!-- 배달 결과 ID -->
<result property="makeRsltCd" column="MAKE_RSLT_CD" /> <!-- 제작 결과 코드 -->
<result property="createdAt" column="REG_DT" /> <!-- 등록 일시 -->
<result property="createdBy" column="RGTR" /> <!-- 등록자 -->
<result property="vractno" column="VRACTNO" /> <!-- 가상계좌번호 -->
</resultMap>
<sql id="selectDetail">SELECT CON_KEY <!-- 외부연계식별키 -->
, RGST_NMBR <!-- 등기번호 -->
, RECEV_SEQ <!-- 일련번호 -->
, RECEV_CODE <!-- 발송코드 -->
, RECEV_BAR1D <!-- 바코드 -->
, RECEV_BAR2D <!-- 이차원바코드 -->
, RECEV_BILL_NUNBER <!-- 고지번호 -->
, RECEV_DOC_CD1 <!-- 문서종류1 -->
, RECEV_DOC_CD2 <!-- 문서종류2 -->
, RECEV_DOC_CD3 <!-- 문서종류3 -->
, RECEV_DOC_CD4 <!-- 문서종류4 -->
, RECEV_DOC_CD5 <!-- 문서종류5 -->
, RECEV_SUBJ1 <!-- 과목명1 -->
, RECEV_SUBJ2 <!-- 과목명2 -->
, RECEV_SUBJ3 <!-- 과목명3 -->
, RECEV_VIOLATE_DT <!-- 위반일시 -->
, RECEV_VIOLATE_DONG <!-- 위반동 -->
, RECEV_VIOLATE_PLACE <!-- 위반장소 -->
, RECEV_LAWS <!-- 법조항 -->
, RECEV_PAY_NUMBER1 <!-- 납부번호1 -->
, RECEV_PAY_NUMBER2 <!-- 납부번호2 -->
, RECEV_OCR0 <!-- OCR0 -->
, RECEV_OCR1 <!-- OCR1 -->
, RECEV_OCR2 <!-- OCR2 -->
, RECEV_ONLINE_PAY_NUMBER <!-- 전자납부번호 -->
, RECEV_FINE_PRICE <!-- 과태료 -->
, RECEV_PAY_PRICE <!-- 납부금액 -->
, RECEV_PAY_DT <!-- 납부기한 -->
, RECEV_PAY_IN_DATE <!-- 납기내기한 -->
, RECEV_PAY_IN_PRICE <!-- 납기내금액 -->
, RECEV_PAY_IN_ADD_PRICE <!-- 납기내가산금 -->
, RECEV_PAY_IN_DEFAULT_PRICE <!-- 납기내합계금액 -->
, RECEV_PAY_OUT_DATE <!-- 납기후기한 -->
, RECEV_PAY_OUT_PRICE <!-- 납기후금액 -->
, RECEV_PAY_OUT_ADD_PRICE <!-- 납기후가산금 -->
, RECEV_PAY_OUT_DEFAULT_PRICE <!-- 납기후합계금액 -->
, RECEV_CAR_NUMBER <!-- 차량번호 -->
, RECEV_CAR_OWNER_ZIPCODE <!-- 우편번호 -->
, RECEV_CAR_OWNER_ADDR <!-- 주소 -->
, RECEV_CAR_OWNER_DETAILADDR <!-- 상세주소 -->
, RECEV_CAR_OWNER_NM <!-- 소유자명 -->
, RECEV_CAR_OWNER_SSN <!-- 주민번호 -->
, RECEV_EVIDENCE_NUMBER <!-- 증거번호 -->
, RECEV_PHOTO_CNT <!-- 사진장수 -->
, RECEV_PHOTO_FILENAME1 <!-- 사진파일명1 -->
, RECEV_PHOTO_FILENAME2 <!-- 사진파일명2 -->
, RECEV_PHOTO_FILENAME3 <!-- 사진파일명3 -->
, RECEV_PHOTO_FILENAME4 <!-- 사진파일명4 -->
, VRACTNO2 <!-- 가상계좌번호2 -->
, VRACTNO3 <!-- 가상계좌번호3 -->
, VRACTNO4 <!-- 가상계좌번호4 -->
, VRACTNO5 <!-- 가상계좌번호5 -->
, VRACTNO6 <!-- 가상계좌번호6 -->
, VRACTNO7 <!-- 가상계좌번호7 -->
, VRACTNO8 <!-- 가상계좌번호8 -->
, VRACTNO9 <!-- 가상계좌번호9 -->
, VRACTNO10 <!-- 가상계좌번호10 -->
, VRACTNO11 <!-- 가상계좌번호11 -->
, DTL_VAR_DATA1 <!-- 추가 데이터1 (계도 메일 제목) -->
, DTL_VAR_DATA2 <!-- 추가 데이터2 (계도 메일 내용) -->
, DTL_VAR_DATA3 <!-- 추가 데이터3 -->
, DTL_VAR_DATA4 <!-- 추가 데이터4 -->
, DTL_VAR_DATA5 <!-- 추가 데이터5 -->
, DLVR_RSLT_ID <!-- 배달 결과 ID -->
, MAKE_RSLT_CD <!-- 제작 결과 코드 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, VRACTNO <!-- 가상계좌번호 -->
FROM TB_EPOST_RCPT_DTL</sql>
<select id="selectRequestDetailList" parameterType="map" resultType="dataobject">/* 전자우편 신청 상세 목록 조회(emailRequestMapper.selectRequestDetailList) */
<include refid="utility.paging-prefix" />
<include refid="selectDetail" />
<where>
AND CON_KEY IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)
<if test="rgstNmbrs != null">AND RGST_NMBR IN (<foreach collection="rgstNmbrs" item="rgstNmbr" separator=",">#{rgstNmbr}</foreach>)</if>
</where>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select>
<select id="selectRequestDetails" parameterType="map" resultMap="emailRequestDetailRow">/* 전자우편 신청 상세 객체 가져오기(emailRequestMapper.selectRequestDetails) */
<include refid="selectDetail" />
<where>
AND CON_KEY IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)
<if test="rgstNmbrs != null">AND RGST_NMBR IN (<foreach collection="rgstNmbrs" item="rgstNmbr" separator=",">#{rgstNmbr}</foreach>)</if>
</where>
<include refid="utility.orderBy" /></select>
<insert id="insertRequestDetail" parameterType="map">/* 전자우편 신청 상세 등록(emailRequestMapper.insertRequestDetail) */
INSERT INTO TB_EPOST_RCPT_DTL (
CON_KEY <!-- 외부연계식별키 -->
, RGST_NMBR <!-- 등기번호 -->
, RECEV_SEQ <!-- 일련번호 -->
, RECEV_CODE <!-- 발송코드 -->
, RECEV_BAR1D <!-- 바코드 -->
, RECEV_BAR2D <!-- 이차원바코드 -->
, RECEV_BILL_NUNBER <!-- 고지번호 -->
, RECEV_DOC_CD1 <!-- 문서종류1 -->
, RECEV_DOC_CD2 <!-- 문서종류2 -->
, RECEV_DOC_CD3 <!-- 문서종류3 -->
, RECEV_DOC_CD4 <!-- 문서종류4 -->
, RECEV_DOC_CD5 <!-- 문서종류5 -->
, RECEV_SUBJ1 <!-- 과목명1 -->
, RECEV_SUBJ2 <!-- 과목명2 -->
, RECEV_SUBJ3 <!-- 과목명3 -->
, RECEV_VIOLATE_DT <!-- 위반일시 -->
, RECEV_VIOLATE_DONG <!-- 위반동 -->
, RECEV_VIOLATE_PLACE <!-- 위반장소 -->
, RECEV_LAWS <!-- 법조항 -->
, RECEV_PAY_NUMBER1 <!-- 납부번호1 -->
, RECEV_PAY_NUMBER2 <!-- 납부번호2 -->
, RECEV_OCR0 <!-- OCR0 -->
, RECEV_OCR1 <!-- OCR1 -->
, RECEV_OCR2 <!-- OCR2 -->
, RECEV_ONLINE_PAY_NUMBER <!-- 전자납부번호 -->
, RECEV_FINE_PRICE <!-- 과태료 -->
, RECEV_PAY_PRICE <!-- 납부금액 -->
, RECEV_PAY_DT <!-- 납부기한 -->
, RECEV_PAY_IN_DATE <!-- 납기내기한 -->
, RECEV_PAY_IN_PRICE <!-- 납기내금액 -->
, RECEV_PAY_IN_ADD_PRICE <!-- 납기내가산금 -->
, RECEV_PAY_IN_DEFAULT_PRICE <!-- 납기내합계금액 -->
, RECEV_PAY_OUT_DATE <!-- 납기후기한 -->
, RECEV_PAY_OUT_PRICE <!-- 납기후금액 -->
, RECEV_PAY_OUT_ADD_PRICE <!-- 납기후가산금 -->
, RECEV_PAY_OUT_DEFAULT_PRICE <!-- 납기후합계금액 -->
, RECEV_CAR_NUMBER <!-- 차량번호 -->
, RECEV_CAR_OWNER_ZIPCODE <!-- 우편번호 -->
, RECEV_CAR_OWNER_ADDR <!-- 주소 -->
, RECEV_CAR_OWNER_DETAILADDR <!-- 상세주소 -->
, RECEV_CAR_OWNER_NM <!-- 소유자명 -->
, RECEV_CAR_OWNER_SSN <!-- 주민번호 -->
, RECEV_EVIDENCE_NUMBER <!-- 증거번호 -->
, RECEV_PHOTO_CNT <!-- 사진장수 -->
, RECEV_PHOTO_FILENAME1 <!-- 사진파일명1 -->
, RECEV_PHOTO_FILENAME2 <!-- 사진파일명2 -->
, RECEV_PHOTO_FILENAME3 <!-- 사진파일명3 -->
, RECEV_PHOTO_FILENAME4 <!-- 사진파일명4 -->
, VRACTNO2 <!-- 가상계좌번호2 -->
, VRACTNO3 <!-- 가상계좌번호3 -->
, VRACTNO4 <!-- 가상계좌번호4 -->
, VRACTNO5 <!-- 가상계좌번호5 -->
, VRACTNO6 <!-- 가상계좌번호6 -->
, VRACTNO7 <!-- 가상계좌번호7 -->
, VRACTNO8 <!-- 가상계좌번호8 -->
, VRACTNO9 <!-- 가상계좌번호9 -->
, VRACTNO10 <!-- 가상계좌번호10 -->
, VRACTNO11 <!-- 가상계좌번호11 -->
, DTL_VAR_DATA1 <!-- 추가 데이터1 (계도 메일 제목) -->
, DTL_VAR_DATA2 <!-- 추가 데이터2 (계도 메일 내용) -->
, DTL_VAR_DATA3 <!-- 추가 데이터3 -->
, DTL_VAR_DATA4 <!-- 추가 데이터4 -->
, DTL_VAR_DATA5 <!-- 추가 데이터5 -->
, DLVR_RSLT_ID <!-- 배달 결과 ID -->
, MAKE_RSLT_CD <!-- 제작 결과 코드 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, VRACTNO <!-- 가상계좌번호 -->
) VALUES (
#{emailRequestDetail.conKey} <!-- 외부연계식별키 -->
, #{emailRequestDetail.rgstNmbr} <!-- 등기번호 -->
, #{emailRequestDetail.recevSeq} <!-- 일련번호 -->
, #{emailRequestDetail.recevCode} <!-- 발송코드 -->
, #{emailRequestDetail.recevBar1d} <!-- 바코드 -->
, #{emailRequestDetail.recevBar2d} <!-- 이차원바코드 -->
, #{emailRequestDetail.recevBillNunber} <!-- 고지번호 -->
, #{emailRequestDetail.recevDocCd1} <!-- 문서종류1 -->
, #{emailRequestDetail.recevDocCd2} <!-- 문서종류2 -->
, #{emailRequestDetail.recevDocCd3} <!-- 문서종류3 -->
, #{emailRequestDetail.recevDocCd4} <!-- 문서종류4 -->
, #{emailRequestDetail.recevDocCd5} <!-- 문서종류5 -->
, #{emailRequestDetail.recevSubj1} <!-- 과목명1 -->
, #{emailRequestDetail.recevSubj2} <!-- 과목명2 -->
, #{emailRequestDetail.recevSubj3} <!-- 과목명3 -->
, #{emailRequestDetail.recevViolateDt} <!-- 위반일시 -->
, #{emailRequestDetail.recevViolateDong} <!-- 위반동 -->
, #{emailRequestDetail.recevViolatePlace} <!-- 위반장소 -->
, #{emailRequestDetail.recevLaws} <!-- 법조항 -->
, #{emailRequestDetail.recevPayNumber1} <!-- 납부번호1 -->
, #{emailRequestDetail.recevPayNumber2} <!-- 납부번호2 -->
, #{emailRequestDetail.recevOcr0} <!-- OCR0 -->
, #{emailRequestDetail.recevOcr1} <!-- OCR1 -->
, #{emailRequestDetail.recevOcr2} <!-- OCR2 -->
, #{emailRequestDetail.recevOnlinePayNumber} <!-- 전자납부번호 -->
, #{emailRequestDetail.recevFinePrice} <!-- 과태료 -->
, #{emailRequestDetail.recevPayPrice} <!-- 납부금액 -->
, #{emailRequestDetail.recevPayDt} <!-- 납부기한 -->
, #{emailRequestDetail.recevPayInDate} <!-- 납기내기한 -->
, #{emailRequestDetail.recevPayInPrice} <!-- 납기내금액 -->
, #{emailRequestDetail.recevPayInAddPrice} <!-- 납기내가산금 -->
, #{emailRequestDetail.recevPayInDefaultPrice} <!-- 납기내합계금액 -->
, #{emailRequestDetail.recevPayOutDate} <!-- 납기후기한 -->
, #{emailRequestDetail.recevPayOutPrice} <!-- 납기후금액 -->
, #{emailRequestDetail.recevPayOutAddPrice} <!-- 납기후가산금 -->
, #{emailRequestDetail.recevPayOutDefaultPrice} <!-- 납기후합계금액 -->
, #{emailRequestDetail.recevCarNumber} <!-- 차량번호 -->
, #{emailRequestDetail.recevCarOwnerZipcode} <!-- 우편번호 -->
, #{emailRequestDetail.recevCarOwnerAddr} <!-- 주소 -->
, #{emailRequestDetail.recevCarOwnerDetailaddr} <!-- 상세주소 -->
, #{emailRequestDetail.recevCarOwnerNm} <!-- 소유자명 -->
, #{emailRequestDetail.recevCarOwnerSsn} <!-- 주민번호 -->
, #{emailRequestDetail.recevEvidenceNumber} <!-- 증거번호 -->
, #{emailRequestDetail.recevPhotoCnt} <!-- 사진장수 -->
, #{emailRequestDetail.recevPhotoFilename1} <!-- 사진파일명1 -->
, #{emailRequestDetail.recevPhotoFilename2} <!-- 사진파일명2 -->
, #{emailRequestDetail.recevPhotoFilename3} <!-- 사진파일명3 -->
, #{emailRequestDetail.recevPhotoFilename4} <!-- 사진파일명4 -->
, #{emailRequestDetail.vractno2} <!-- 가상계좌번호2 -->
, #{emailRequestDetail.vractno3} <!-- 가상계좌번호3 -->
, #{emailRequestDetail.vractno4} <!-- 가상계좌번호4 -->
, #{emailRequestDetail.vractno5} <!-- 가상계좌번호5 -->
, #{emailRequestDetail.vractno6} <!-- 가상계좌번호6 -->
, #{emailRequestDetail.vractno7} <!-- 가상계좌번호7 -->
, #{emailRequestDetail.vractno8} <!-- 가상계좌번호8 -->
, #{emailRequestDetail.vractno9} <!-- 가상계좌번호9 -->
, #{emailRequestDetail.vractno10} <!-- 가상계좌번호10 -->
, #{emailRequestDetail.vractno11} <!-- 가상계좌번호11 -->
, #{emailRequestDetail.dtlVarData1} <!-- 추가 데이터1 (계도 메일 제목) -->
, #{emailRequestDetail.dtlVarData2} <!-- 추가 데이터2 (계도 메일 내용) -->
, #{emailRequestDetail.dtlVarData3} <!-- 추가 데이터3 -->
, #{emailRequestDetail.dtlVarData4} <!-- 추가 데이터4 -->
, #{emailRequestDetail.dtlVarData5} <!-- 추가 데이터5 -->
, #{emailRequestDetail.dlvrRsltId} <!-- 배달 결과 ID -->
, #{emailRequestDetail.makeRsltCd} <!-- 제작 결과 코드 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{currentUser.id} <!-- 등록자 -->
, #{emailRequestDetail.vractno} <!-- 가상계좌번호 -->
)</insert>
<update id="updateRequestDetail" parameterType="map">/* 전자우편 신청 상세 수정(emailRequestMapper.updateRequestDetail) */
UPDATE TB_EPOST_RCPT_DTL SET
RECEV_SEQ = #{emailRequestDetail.recevSeq} <!-- 일련번호 -->
, RECEV_CODE = #{emailRequestDetail.recevCode} <!-- 발송코드 -->
, RECEV_BAR1D = #{emailRequestDetail.recevBar1d} <!-- 바코드 -->
, RECEV_BAR2D = #{emailRequestDetail.recevBar2d} <!-- 이차원바코드 -->
, RECEV_BILL_NUNBER = #{emailRequestDetail.recevBillNunber} <!-- 고지번호 -->
, RECEV_DOC_CD1 = #{emailRequestDetail.recevDocCd1} <!-- 문서종류1 -->
, RECEV_DOC_CD2 = #{emailRequestDetail.recevDocCd2} <!-- 문서종류2 -->
, RECEV_DOC_CD3 = #{emailRequestDetail.recevDocCd3} <!-- 문서종류3 -->
, RECEV_DOC_CD4 = #{emailRequestDetail.recevDocCd4} <!-- 문서종류4 -->
, RECEV_DOC_CD5 = #{emailRequestDetail.recevDocCd5} <!-- 문서종류5 -->
, RECEV_SUBJ1 = #{emailRequestDetail.recevSubj1} <!-- 과목명1 -->
, RECEV_SUBJ2 = #{emailRequestDetail.recevSubj2} <!-- 과목명2 -->
, RECEV_SUBJ3 = #{emailRequestDetail.recevSubj3} <!-- 과목명3 -->
, RECEV_VIOLATE_DT = #{emailRequestDetail.recevViolateDt} <!-- 위반일시 -->
, RECEV_VIOLATE_DONG = #{emailRequestDetail.recevViolateDong} <!-- 위반동 -->
, RECEV_VIOLATE_PLACE = #{emailRequestDetail.recevViolatePlace} <!-- 위반장소 -->
, RECEV_LAWS = #{emailRequestDetail.recevLaws} <!-- 법조항 -->
, RECEV_PAY_NUMBER1 = #{emailRequestDetail.recevPayNumber1} <!-- 납부번호1 -->
, RECEV_PAY_NUMBER2 = #{emailRequestDetail.recevPayNumber2} <!-- 납부번호2 -->
, RECEV_OCR0 = #{emailRequestDetail.recevOcr0} <!-- OCR0 -->
, RECEV_OCR1 = #{emailRequestDetail.recevOcr1} <!-- OCR1 -->
, RECEV_OCR2 = #{emailRequestDetail.recevOcr2} <!-- OCR2 -->
, RECEV_ONLINE_PAY_NUMBER = #{emailRequestDetail.recevOnlinePayNumber} <!-- 전자납부번호 -->
, RECEV_FINE_PRICE = #{emailRequestDetail.recevFinePrice} <!-- 과태료 -->
, RECEV_PAY_PRICE = #{emailRequestDetail.recevPayPrice} <!-- 납부금액 -->
, RECEV_PAY_DT = #{emailRequestDetail.recevPayDt} <!-- 납부기한 -->
, RECEV_PAY_IN_DATE = #{emailRequestDetail.recevPayInDate} <!-- 납기내기한 -->
, RECEV_PAY_IN_PRICE = #{emailRequestDetail.recevPayInPrice} <!-- 납기내금액 -->
, RECEV_PAY_IN_ADD_PRICE = #{emailRequestDetail.recevPayInAddPrice} <!-- 납기내가산금 -->
, RECEV_PAY_IN_DEFAULT_PRICE = #{emailRequestDetail.recevPayInDefaultPrice} <!-- 납기내합계금액 -->
, RECEV_PAY_OUT_DATE = #{emailRequestDetail.recevPayOutDate} <!-- 납기후기한 -->
, RECEV_PAY_OUT_PRICE = #{emailRequestDetail.recevPayOutPrice} <!-- 납기후금액 -->
, RECEV_PAY_OUT_ADD_PRICE = #{emailRequestDetail.recevPayOutAddPrice} <!-- 납기후가산금 -->
, RECEV_PAY_OUT_DEFAULT_PRICE = #{emailRequestDetail.recevPayOutDefaultPrice} <!-- 납기후합계금액 -->
, RECEV_CAR_NUMBER = #{emailRequestDetail.recevCarNumber} <!-- 차량번호 -->
, RECEV_CAR_OWNER_ZIPCODE = #{emailRequestDetail.recevCarOwnerZipcode} <!-- 우편번호 -->
, RECEV_CAR_OWNER_ADDR = #{emailRequestDetail.recevCarOwnerAddr} <!-- 주소 -->
, RECEV_CAR_OWNER_DETAILADDR = #{emailRequestDetail.recevCarOwnerDetailaddr} <!-- 상세주소 -->
, RECEV_CAR_OWNER_NM = #{emailRequestDetail.recevCarOwnerNm} <!-- 소유자명 -->
, RECEV_CAR_OWNER_SSN = #{emailRequestDetail.recevCarOwnerSsn} <!-- 주민번호 -->
, RECEV_EVIDENCE_NUMBER = #{emailRequestDetail.recevEvidenceNumber} <!-- 증거번호 -->
, RECEV_PHOTO_CNT = #{emailRequestDetail.recevPhotoCnt} <!-- 사진장수 -->
, RECEV_PHOTO_FILENAME1 = #{emailRequestDetail.recevPhotoFilename1} <!-- 사진파일명1 -->
, RECEV_PHOTO_FILENAME2 = #{emailRequestDetail.recevPhotoFilename2} <!-- 사진파일명2 -->
, RECEV_PHOTO_FILENAME3 = #{emailRequestDetail.recevPhotoFilename3} <!-- 사진파일명3 -->
, RECEV_PHOTO_FILENAME4 = #{emailRequestDetail.recevPhotoFilename4} <!-- 사진파일명4 -->
, VRACTNO2 = #{emailRequestDetail.vractno2} <!-- 가상계좌번호2 -->
, VRACTNO3 = #{emailRequestDetail.vractno3} <!-- 가상계좌번호3 -->
, VRACTNO4 = #{emailRequestDetail.vractno4} <!-- 가상계좌번호4 -->
, VRACTNO5 = #{emailRequestDetail.vractno5} <!-- 가상계좌번호5 -->
, VRACTNO6 = #{emailRequestDetail.vractno6} <!-- 가상계좌번호6 -->
, VRACTNO7 = #{emailRequestDetail.vractno7} <!-- 가상계좌번호7 -->
, VRACTNO8 = #{emailRequestDetail.vractno8} <!-- 가상계좌번호8 -->
, VRACTNO9 = #{emailRequestDetail.vractno9} <!-- 가상계좌번호9 -->
, VRACTNO10 = #{emailRequestDetail.vractno10} <!-- 가상계좌번호10 -->
, VRACTNO11 = #{emailRequestDetail.vractno11} <!-- 가상계좌번호11 -->
, DTL_VAR_DATA1 = #{emailRequestDetail.dtlVarData1} <!-- 추가 데이터1 -->
, DTL_VAR_DATA2 = #{emailRequestDetail.dtlVarData2} <!-- 추가 데이터2 -->
, DTL_VAR_DATA3 = #{emailRequestDetail.dtlVarData3} <!-- 추가 데이터3 -->
, DTL_VAR_DATA4 = #{emailRequestDetail.dtlVarData4} <!-- 추가 데이터4 -->
, DTL_VAR_DATA5 = #{emailRequestDetail.dtlVarData5} <!-- 추가 데이터5 -->
, DLVR_RSLT_ID = #{emailRequestDetail.dlvrRsltId} <!-- 배달 결과 ID -->
, MAKE_RSLT_CD = #{emailRequestDetail.makeRsltCd} <!-- 제작 결과 코드 -->
, VRACTNO = #{emailRequestDetail.vractno} <!-- 가상계좌번호 -->
WHERE CON_KEY = #{emailRequestDetail.conKey}
AND RGST_NMBR = #{emailRequestDetail.rgstNmbr}</update>
<update id="updateRequestDetailStatus" parameterType="map">/* 전자우편 신청 상세 상태 변경(emailRequestMapper.updateRequestDetailStatus) */
UPDATE TB_EPOST_RCPT_DTL A
<if test='resultType == "production"'>
, (<foreach collection="results" item="result" separator=" UNION">
SELECT #{result.conKey} CON_KEY, #{result.rgstNmbr} RGST_NMBR, #{result.dataCd} MAKE_RSLT_CD</foreach>
) B
SET A.MAKE_RSLT_CD = B.MAKE_RSLT_CD
</if>
<if test='resultType == "delivery"'>
, (<foreach collection="results" item="result" separator=" UNION">
SELECT #{result.reletcdata} CON_KEY, #{result.regino} RGST_NMBR, #{result.dlvrRsltId} DLVR_RSLT_ID</foreach>
) B
SET A.DLVR_RSLT_ID = B.DLVR_RSLT_ID
</if>
WHERE A.CON_KEY = B.CON_KEY
AND B.RGST_NMBR = B.RGST_NMBR
</update>
</mapper>

@ -0,0 +1,216 @@
<?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.interfaces.epost.dao.EmailResultMapper">
<!-- 전자우편 신청 정보 매퍼
========== 변경 이력 ==========
2023-07-03 mjkhan 최초 작성
============================ -->
<insert id="insertReceptionResult" parameterType="cokr.xit.interfaces.epost.ReceptionResult">/* 전자우편 신청 수신 결과 등록(emailResultMapper.insertReceptionResult) */
<selectKey resultType="string" keyProperty="rcptnRsltId" order="BEFORE">
SELECT IFNULL(MAX(RCPTN_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_RCPTN_RSLT A, (<include refid="utility.selectToday" />) B
WHERE RCPTN_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_RCPTN_RSLT (
RCPTN_RSLT_ID <!-- 수신 결과 ID -->
, OUTSIDUSERID <!-- 연계기관코드 -->
, INIT_TIME <!-- 수신일시 -->
, RECV_FILENAME <!-- 수신파일명 -->
, RELDIVKEY <!-- 연계키 -->
, RECPRSNSEQ <!-- 수취인순번 -->
, REGINO <!-- 등기번호 -->
, ATTACHFILENM <!-- 첨부파일명 -->
, JUNGHAP1 <!-- 1차검증 -->
, JUNGHAP2 <!-- 2차검증 -->
, JUNGHAP3 <!-- 3차검증 -->
, CODE <!-- 상태코드 -->
, MSG <!-- 메시지 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
)
SELECT #{rcptnRsltId} <!-- 수신 결과 ID -->
, #{outsiduserid} <!-- 연계기관코드 -->
, #{initTime} <!-- 수신일시 -->
, #{recvFilename} <!-- 수신파일명 -->
, #{reldivkey} <!-- 연계키 -->
, #{recprsnseq} <!-- 수취인순번 -->
, #{regino} <!-- 등기번호 -->
, #{attachfilenm} <!-- 첨부파일명 -->
, #{junghap1} <!-- 1차검증 -->
, #{junghap2} <!-- 2차검증 -->
, #{junghap3} <!-- 3차검증 -->
, #{code} <!-- 상태코드 -->
, #{msg} <!-- 메시지 -->
, #{createdAt} <!-- 등록 일시 -->
, #{createdBy} <!-- 등록자 -->
WHERE NOT EXISTS (
SELECT 1
FROM TB_EPOST_RCPTN_RSLT
WHERE RELDIVKEY = #{reldivkey}
AND REGINO = #{regino}
)</insert>
<insert id="insertRegistrationResult" parameterType="cokr.xit.interfaces.epost.RegistrationResult">/* 전자우편 신청 접수 결과 등록(emailResultMapper.insertRegistrationResult) */
<selectKey resultType="string" keyProperty="rcptRsltId" order="BEFORE">
SELECT IFNULL(MAX(RCPT_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_RCPT_RSLT A, (<include refid="utility.selectToday" />) B
WHERE RCPT_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_RCPT_RSLT (
RCPT_RSLT_ID <!-- 접수 결과 ID -->
, CON_ORG <!-- 외부기관구분코드 -->
, RELORSECT_CD <!-- 결제부서코드 -->
, RELETCDATA <!-- 발송인별추가데이터 -->
, EXTRI_REGYMD <!-- 기관발송일자 -->
, RCEPT_YMD <!-- 접수일자 -->
, RCEPT_ID <!-- 접수우체국국기호 -->
, DIV_KB <!-- 취급구분 -->
, RCEPT_CNT <!-- 발송수량 -->
, RCEPT_AMT <!-- 결제금액 -->
, USEFEE_AMT <!-- 제작수수료 -->
, TOTPOST_PRC <!-- 우편요금 -->
, JOB_CD <!-- 작업 코드 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
)
SELECT #{rcptRsltId} <!-- 접수 결과 ID -->
, #{conOrg} <!-- 외부기관구분코드 -->
, #{relorsectCd} <!-- 결제부서코드 -->
, #{reletcdata} <!-- 발송인별추가데이터 -->
, #{extriRegymd} <!-- 기관발송일자 -->
, #{rceptYmd} <!-- 접수일자 -->
, #{rceptId} <!-- 접수우체국국기호 -->
, #{divKb} <!-- 취급구분 -->
, #{rceptCnt} <!-- 발송수량 -->
, #{rceptAmt} <!-- 결제금액 -->
, #{usefeeAmt} <!-- 제작수수료 -->
, #{totpostPrc} <!-- 우편요금 -->
, #{jobCd} <!-- 작업 코드 -->
, #{createdAt} <!-- 등록 일시 -->
, #{createdBy} <!-- 등록자 -->
FROM DUAL
WHERE NOT EXISTS ( <!-- RELETCDATA가 등록되어 있는 것은 제외 -->
SELECT 1
FROM TB_EPOST_RCPT_RSLT
WHERE RELETCDATA = #{reletcdata}
)</insert>
<update id="updateRegistrationResult" parameterType="map">/* 전자우편 신청 접수 결과(jobCd) 업데이트(emailResultMapper.updateRegistrationResult) */
UPDATE TB_EPOST_RCPT_RSLT A
, TB_EPOST_RCPT_REG B
SET A.JOB_CD = SUBSTR(B.JOB_CD, 2)
WHERE A.RELETCDATA IN (<foreach collection="conKeys" item="conKey" separator=",">#{conKey}</foreach>)
AND A.RELETCDATA = B.CON_KEY</update>
<insert id="insertProductionResult" parameterType="cokr.xit.interfaces.epost.ProductionResult">/* 전자우편 제작 결과 등록(emailResultMapper.insertProductionResult) */
INSERT INTO TB_EPOST_MAKE_RSLT (
CON_KEY <!-- 외부연계식별키 -->
, RGST_NMBR <!-- 등기 번호 -->
, RELETCDATA <!-- 발송인별추가데이터 -->
, DATA_CD <!-- 제작결과 -->
, MAIL_CNT <!-- 내용문매수 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
)
SELECT #{conKey} <!-- 외부연계식별키 -->
, #{rgstNmbr} <!-- 등기 번호 -->
, #{reletcdata} <!-- 발송인별추가데이터 -->
, #{dataCd} <!-- 제작결과 -->
, #{mailCnt} <!-- 내용문매수 -->
, #{createdAt} <!-- 등록 일시 -->
, #{createdBy} <!-- 등록자 -->
FROM DUAL
WHERE NOT EXISTS ( <!-- CON_KEY, RGST_NMBR가 등록되어 있는 것은 제외 -->
SELECT 1
FROM TB_EPOST_MAKE_RSLT
WHERE CON_KEY = #{conKey}
AND RGST_NMBR = #{rgstNmbr}
)</insert>
<insert id="insertDeliveryResult" parameterType="cokr.xit.interfaces.epost.DeliveryResult">/* 전자우편 배달 결과 등록(emailResultMapper.insertDeliveryResult) */
<selectKey resultType="string" keyProperty="dlvrRsltId" order="BEFORE">
SELECT IFNULL(MAX(DLVR_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_DLVR_RSLT A, (<include refid="utility.selectToday" />) B
WHERE DLVR_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_DLVR_RSLT (
DLVR_RSLT_ID <!-- 배달 결과 ID -->
, CON_KEY <!-- 외부연계식별키 -->
, OUTSIDUSERID <!-- 외부기관구분코드 -->
, RELETCDATA <!-- 발송인별추가데이터 -->
, REGINO <!-- 등기번호 -->
, DELIVYMD <!-- 배달일자 -->
, DELIVHHMI <!-- 배달시분 -->
, DELIVRSLTCD <!-- 배달결과코드 -->
, NONDELIVREASNCD <!-- 미배달사유코드 -->
, NONDELIVREASNCDNM <!-- 미배달사유명 -->
, SUBRECPRSNNM <!-- 수령인명 -->
, RELRECPRSNCD <!-- 수령인관계코드 -->
, RELRECPRSNCDNM <!-- 수령인관계명 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
) VALUES (
#{dlvrRsltId} <!-- 배달 결과 ID -->
, #{reletcdata} <!-- 외부연계식별키, 발송인별추가데이터 -->
, #{outsiduserid} <!-- 외부기관구분코드 -->
, #{reletcdata} <!-- 발송인별추가데이터 -->
, #{regino} <!-- 등기번호 -->
, #{delivymd} <!-- 배달일자 -->
, #{delivhhmi} <!-- 배달시분 -->
, #{delivrsltcd} <!-- 배달결과코드 -->
, #{nondelivreasncd} <!-- 미배달사유코드 -->
, #{nondelivreasncdnm} <!-- 미배달사유명 -->
, #{subrecprsnnm} <!-- 수령인명 -->
, #{relrecprsncd} <!-- 수령인관계코드 -->
, #{relrecprsncdnm} <!-- 수령인관계명 -->
, #{createdAt} <!-- 등록 일시 -->
, #{createdBy} <!-- 등록자 -->
)</insert>
<select id="selectResultLogs" parameterType="map" resultType="dataobject">/* 전자우편 신청결과 로그 조회(emailResultMapper.selectResultLogs) */
<include refid="utility.paging-prefix" />
SELECT PROC_ID <!-- 처리 ID -->
, PROC_SEQ <!-- 순번 -->
, PROC_TYPE <!-- 처리 유형 -->
, RESULT_ID <!-- 처리결과 ID -->
, CON_KEY <!-- 외부연계 식별자 -->
, RGST_NMBR <!-- 등기번호 -->
, PROC_STT <!-- 처리상태 -->
FROM TB_EPOST_PROC_LOG
WHERE PROC_ID = #{procID}
AND PROC_STT = 'N'
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select>
<insert id="insertResultLogs" parameterType="map">/* 전자우편 신청결과 로그 등록(emailResultMapper.insertResultLogs) */
INSERT INTO TB_EPOST_PROC_LOG (
PROC_ID <!-- 처리 ID -->
, PROC_SEQ <!-- 처리 순번 -->
, PROC_TYPE <!-- 처리 유형 -->
, RESULT_ID <!-- 결과 ID -->
, CON_KEY <!-- 외부연계 식별키 -->
, RGST_NMBR <!-- 등기번호 -->
, PROC_STT <!-- 업무 연계 상태 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
)<foreach collection="logs" item="log" separator=" UNION">
SELECT #{log.procId} <!-- 처리 ID -->
, #{log.procSeq} <!-- 처리 순번 -->
, #{log.procType} <!-- 처리 유형 -->
, #{log.resultId} <!-- 결과 ID -->
, #{log.conKey} <!-- 외부연계 식별키 -->
, #{log.rgstNmbr} <!-- 등기번호 -->
, 'N' <!-- 업무 연계 상태 -->
, #{log.createdAt} <!-- 등록 일시 -->
, #{log.createdBy} <!-- 등록자 --></foreach>
</insert>
<update id="updateResultLogStatus" parameterType="map">/* 전자우편 신청결과 로그 상태 업데이트(emailResultMapper.updateResultLogStatus) */
UPDATE TB_EPOST_PROC_LOG A
, (<foreach collection="logs" item="log" separator=" UNION">
SELECT #{log.PROC_ID} PROC_ID, #{log.PROC_SEQ} PROC_SEQ, #{log.PROC_STT} PROC_STT</foreach>
) B
SET A.PROC_STT = B.PROC_STT
WHERE A.PROC_ID = B.PROC_ID
AND A.PROC_SEQ = B.PROC_SEQ</update>
</mapper>

@ -0,0 +1,386 @@
<?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.interfaces.smg.dao.SmgMapper">
<resultMap id="petitionRow" type="cokr.xit.interfaces.smg.Petition">
<result column="INTERFACE_SEQ_N" property="interfaceSeqN" /> <!-- 인터페이스 키 -->
<result column="SYS_GUBUN_C" property="sysGubunC" /> <!-- 시스템 구분 -->
<result column="ANC_CODE_V" property="ancCodeV" /> <!-- 기관 코드 -->
<result column="PETI_GUBUN_C" property="petiGubunC" /> <!-- 민원 구분 -->
<result column="PETI_ANC_CODE_V" property="petiAncCodeV" /> <!-- 민원 기관 코드 -->
<result column="PETI_NO_C" property="petiNoC" /> <!-- 민원 신청 번호 -->
<result column="CIVIL_NO_C" property="civilNoC" /> <!-- 민원 접수 번호 -->
<result column="PETER_NAME_V" property="peterNameV" /> <!-- 민원 신청인 명 -->
<result column="ZIP_CODE_C" property="zipCodeC" /> <!-- 민원 신청인 우편번호 -->
<result column="ADDRESS_V" property="addressV" /> <!-- 민원 신청인 주소 -->
<result column="EMAIL_V" property="emailV" /> <!-- 민원 신청인 이메일 -->
<result column="CEL_NO_V" property="celNoV" /> <!-- 민원 신청인 핸드폰번호 -->
<result column="TEL_NO_V" property="telNoV" /> <!-- 민원 신청인 전화번호 -->
<result column="PETI_TITLE_V" property="petiTitleV" /> <!-- 민원 신청 제목 -->
<result column="PETI_REASON_L" property="petiReasonL" /> <!-- 민원 신청 내용 -->
<result column="OPEN_YN_C" property="openYnC" /> <!-- 민원 공개 여부 -->
<result column="PETI_REG_D" property="petiRegD" /> <!-- 민원 신청 일자 -->
<result column="PETI_REASON_ATTACH_YN_C" property="petiReasonAttachYnC" /> <!-- 민원 신청 내용 첨부 여부 -->
<result column="CIVIL_GIST_V" property="civilGistV" /> <!-- 민원 요지 -->
<result column="CIVIL_ABSTRACT_L" property="civilAbstractL" /> <!-- 민원 처리 요약 -->
<result column="PCD_DEPT_V" property="pcdDeptV" /> <!-- 처리 부서 코드 -->
<result column="PCD_DEPT_NM_V" property="pcdDeptNmV" /> <!-- 민원 처리 부서명 -->
<result column="DUTY_ID_V" property="dutyIdV" /> <!-- 민원 처리 담당자 명 -->
<result column="PCD_EMAIL_V" property="pcdEmailV" /> <!-- 담당자 이메일 -->
<result column="PCD_TEL_V" property="pcdTelV" /> <!-- 담당자 전화번호 -->
<result column="PCD_RST_CONT_L" property="pcdRstContL" /> <!-- 민원 처리 결과 -->
<result column="DO_REG_D" property="doRegD" /> <!-- 민원 처리 완료 일자 -->
<result column="PCD_RST_CONT_ATTACH_YN_C" property="pcdRstContAttachYnC" /> <!-- 민원 처리 결과 첨부 여부 -->
<result column="PCD_ANC_CODE_V" property="pcdAncCodeV" /> <!-- 민원 실 처리 기관 코드 -->
<result column="PETI_PROC_DUR_N" property="petiProcDurN" /> <!-- 민원 처리 기간'column="-->
<result column="PETI_END_D" property="petiEndD" /> <!-- 처리 예정 일자 -->
<result column="ANC_REG_D" property="ancRegD" /> <!-- 접수 일자 -->
<result column="MORE_AGAIN_V" property="moreAgainV" /> <!-- 한마디더 -->
<result column="SATISFY_C" property="satisfyC" /> <!-- 만족도 항목1 -->
<result column="SATISFY2_C" property="satisfy2C" /> <!-- 만족도 항목2 -->
<result column="SATISFY3_C" property="satisfy3C" /> <!-- 만족도 항목3 -->
<result column="SATISFY_REG_D" property="satisfyRegD" /> <!-- 만족도 입력일 -->
<result column="REG_D" property="regD" /> <!-- 등록 일자 -->
<result column="SEND_YN_C" property="sendYnC" /> <!-- 송신 여부 -->
<result column="SEND_D" property="sendD" /> <!-- 송신 일자 -->
<result column="APPLY_D" property="applyD" /> <!-- 적용 일자 -->
<result column="APPLY_GUBUN_C" property="applyGubunC" /> <!-- 완료 구분 -->
<result column="PCD_GUBUN_V" property="pcdGubunV" /> <!-- 처리 구분1 -->
<result column="PCD_GUBUN2_V" property="pcdGubun2V" /> <!-- 처리 구분2 -->
<result column="PCD_GUBUN3_V" property="pcdGubun3V" /> <!-- 처리 구분3 -->
<result column="PETI_PATH_GUBUN_C" property="petiPathGubunC" /> <!-- 신청 경로 코드 -->
<result column="ORGNL_FILE_NM" property="originalFilename" /> <!-- 원본 파일 명 -->
<result column="REG_DT" property="createdAt" /> <!-- 등록 일시 -->
<result column="RGTR" property="createdBy" /> <!-- 등록자 -->
<result column="PETI_FILE_SIZE_N" property="petiFileSizeN" /> <!-- 민원 신청 첨부파일 크기 -->
<result column="PETI_FILE_PATH1_V" property="petiFilePath1V" /> <!-- 민원 신청 첨부파일명 1 -->
<result column="PETI_FILE_PATH2_V" property="petiFilePath2V" /> <!-- 민원 신청 첨부파일명 2 -->
<result column="PETI_FILE_PATH3_V" property="petiFilePath3V" /> <!-- 민원 신청 첨부파일명 3 -->
<result column="PETI_FILE_PATH4_V" property="petiFilePath4V" /> <!-- 민원 신청 첨부파일명 4 -->
<result column="PETI_FILE_PATH5_V" property="petiFilePath5V" /> <!-- 민원 신청 첨부파일명 5 -->
<result column="PCD_FILE_SIZE_N" property="pcdFileSizeN" /> <!-- 민원 처리 첨부파일 크기 -->
<result column="PCD_FILE_PATH1_V" property="pcdFilePath1V" /> <!-- 민원 처리 첨부파일명 1 -->
<result column="PCD_FILE_PATH2_V" property="pcdFilePath1V" /> <!-- 민원 처리 첨부파일명 2 -->
<result column="PCD_FILE_PATH3_V" property="pcdFilePath1V" /> <!-- 민원 처리 첨부파일명 3 -->
<result column="PCD_FILE_PATH4_V" property="pcdFilePath1V" /> <!-- 민원 처리 첨부파일명 4 -->
<result column="PCD_FILE_PATH5_V" property="pcdFilePath1V" /> <!-- 민원 처리 첨부파일명 5 -->
<result column="STRG_ATCHFILE_NM1" property="attachmentPath1" /> <!-- 저장 첨부파일명 1 -->
<result column="STRG_ATCHFILE_NM2" property="attachmentPath2" /> <!-- 저장 첨부파일명 2 -->
<result column="STRG_ATCHFILE_NM3" property="attachmentPath3" /> <!-- 저장 첨부파일명 3 -->
<result column="STRG_ATCHFILE_NM4" property="attachmentPath4" /> <!-- 저장 첨부파일명 4 -->
<result column="STRG_ATCHFILE_NM5" property="attachmentPath5" /> <!-- 저장 첨부파일명 5 -->
<result column="TRSM_INTERFACE_SEQ_N" property="sendInterfaceSeqN" /> <!-- 전송 인터페이스 키 -->
<result column="TRSM_STTS_CD" property="sendStatus" /> <!-- 전송 상태 -->
<result column="TRSM_STTS_MSG" property="sendStatusMsg" /> <!-- 전송 상태 메시지 -->
</resultMap>
<select id="selectPetitions" parameterType="list" resultMap="petitionRow">/* smgMapper.selectPetitions(국민신문고 수신 민원 조회) */
SELECT A.*
, PETI_FILE_SIZE_N
, PETI_FILE_PATH1_V
, PETI_FILE_PATH2_V
, PETI_FILE_PATH3_V
, PETI_FILE_PATH4_V
, PETI_FILE_PATH5_V
, PCD_FILE_SIZE_N
, PCD_FILE_PATH1_V
, PCD_FILE_PATH2_V
, PCD_FILE_PATH3_V
, PCD_FILE_PATH4_V
, PCD_FILE_PATH5_V
, STRG_ATCHFILE_NM1
, STRG_ATCHFILE_NM2
, STRG_ATCHFILE_NM3
, STRG_ATCHFILE_NM4
, STRG_ATCHFILE_NM5
FROM TB_ESB_INTERFACE A
, TB_ESB_INTERFACE_FILE B
WHERE A.INTERFACE_SEQ_N IN (<foreach collection="list" item="item" separator=",">#{item}</foreach>)
AND A.INTERFACE_SEQ_N = B.INTERFACE_SEQ_N
ORDER BY INTERFACE_SEQ_N DESC</select>
<insert id="insertPetition" parameterType="cokr.xit.interfaces.smg.Petition">/* smgMapper.insertPetition(국민신문고 수신 민원 등록) */
INSERT INTO TB_ESB_INTERFACE (
INTERFACE_SEQ_N <!-- 인터페이스 키 -->
, SYS_GUBUN_C <!-- 시스템 구분 -->
, ANC_CODE_V <!-- 기관 코드 -->
, PETI_GUBUN_C <!-- 민원 구분 -->
, PETI_ANC_CODE_V <!-- 민원 기관 코드 -->
, PETI_NO_C <!-- 민원 신청 번호 -->
, CIVIL_NO_C <!-- 민원 접수 번호 -->
, PETER_NAME_V <!-- 민원 신청인 명 -->
, ZIP_CODE_C <!-- 민원 신청인 우편번호 -->
, ADDRESS_V <!-- 민원 신청인 주소 -->
, EMAIL_V <!-- 민원 신청인 이메일 -->
, CEL_NO_V <!-- 민원 신청인 핸드폰번호 -->
, TEL_NO_V <!-- 민원 신청인 전화번호 -->
, PETI_TITLE_V <!-- 민원 신청 제목 -->
, PETI_REASON_L <!-- 민원 신청 내용 -->
, OPEN_YN_C <!-- 민원 공개 여부 -->
, PETI_REG_D <!-- 민원 신청 일자 -->
, PETI_REASON_ATTACH_YN_C <!-- 민원 신청 내용 첨부 여부 -->
, CIVIL_GIST_V <!-- 민원 요지 -->
, CIVIL_ABSTRACT_L <!-- 민원 처리 요약 -->
, PCD_DEPT_V <!-- 처리 부서 코드 -->
, PCD_DEPT_NM_V <!-- 민원 처리 부서명 -->
, DUTY_ID_V <!-- 민원 처리 담당자 명 -->
, PCD_EMAIL_V <!-- 담당자 이메일 -->
, PCD_TEL_V <!-- 담당자 전화번호 -->
, PCD_RST_CONT_L <!-- 민원 처리 결과 -->
, DO_REG_D <!-- 민원 처리 완료 일자 -->
, PCD_RST_CONT_ATTACH_YN_C <!-- 민원 처리 결과 첨부 여부 -->
, PCD_ANC_CODE_V <!-- 민원 실 처리 기관 코드 -->
, PETI_PROC_DUR_N <!-- 민원 처리 기간', -->
, PETI_END_D <!-- 처리 예정 일자 -->
, ANC_REG_D <!-- 접수 일자 -->
, MORE_AGAIN_V <!-- 한마디더 -->
, SATISFY_C <!-- 만족도 항목1 -->
, SATISFY2_C <!-- 만족도 항목2 -->
, SATISFY3_C <!-- 만족도 항목3 -->
, SATISFY_REG_D <!-- 만족도 입력일 -->
, REG_D <!-- 등록 일자 -->
, SEND_YN_C <!-- 송신 여부 -->
, SEND_D <!-- 송신 일자 -->
, APPLY_D <!-- 적용 일자 -->
, APPLY_GUBUN_C <!-- 완료 구분 -->
, PCD_GUBUN_V <!-- 처리 구분1 -->
, PCD_GUBUN2_V <!-- 처리 구분2 -->
, PCD_GUBUN3_V <!-- 처리 구분3 -->
, PETI_PATH_GUBUN_C <!-- 신청 경로 코드 -->
, ORGNL_FILE_NM <!-- 원본 파일 명 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
) VALUES (
#{interfaceSeqN} <!-- 인터페이스 키 -->
, #{sysGubunC} <!-- 시스템 구분 -->
, #{ancCodeV} <!-- 기관 코드 -->
, #{petiGubunC} <!-- 민원 구분 -->
, #{petiAncCodeV} <!-- 민원 기관 코드 -->
, #{petiNoC} <!-- 민원 신청 번호 -->
, #{civilNoC} <!-- 민원 접수 번호 -->
, #{peterNameV} <!-- 민원 신청인 명 -->
, #{zipCodeC} <!-- 민원 신청인 우편번호 -->
, #{addressV} <!-- 민원 신청인 주소 -->
, #{emailV} <!-- 민원 신청인 이메일 -->
, #{celNoV} <!-- 민원 신청인 핸드폰번호 -->
, #{telNoV} <!-- 민원 신청인 전화번호 -->
, #{petiTitleV} <!-- 민원 신청 제목 -->
, #{petiReasonL} <!-- 민원 신청 내용 -->
, #{openYnC} <!-- 민원 공개 여부 -->
, #{petiRegD} <!-- 민원 신청 일자 -->
, #{petiReasonAttachYnC} <!-- 민원 신청 내용 첨부 여부 -->
, #{civilGistV} <!-- 민원 요지 -->
, #{civilAbstractL} <!-- 민원 처리 요약 -->
, #{pcdDeptV} <!-- 처리 부서 코드 -->
, #{pcdDeptNmV} <!-- 민원 처리 부서명 -->
, #{dutyIdV} <!-- 민원 처리 담당자 명 -->
, #{pcdEmailV} <!-- 담당자 이메일 -->
, #{pcdTelV} <!-- 담당자 전화번호 -->
, #{pcdRstContL} <!-- 민원 처리 결과 -->
, #{doRegD} <!-- 민원 처리 완료 일자 -->
, #{pcdRstContAttachYnC} <!-- 민원 처리 결과 첨부 여부 -->
, #{pcdAncCodeV} <!-- 민원 실 처리 기관 코드 -->
, #{petiProcDurN} <!-- 민원 처리 기간', -->
, #{petiEndD} <!-- 처리 예정 일자 -->
, #{ancRegD} <!-- 접수 일자 -->
, #{moreAgainV} <!-- 한마디더 -->
, #{satisfyC} <!-- 만족도 항목1 -->
, #{satisfy2C} <!-- 만족도 항목2 -->
, #{satisfy3C} <!-- 만족도 항목3 -->
, #{satisfyRegD} <!-- 만족도 입력일 -->
, #{regD} <!-- 등록 일자 -->
, #{sendYnC} <!-- 송신 여부 -->
, #{sendD} <!-- 송신 일자 -->
, #{applyD} <!-- 적용 일자 -->
, #{applyGubunC} <!-- 완료 구분 -->
, #{pcdGubunV} <!-- 처리 구분1 -->
, #{pcdGubun2V} <!-- 처리 구분2 -->
, #{pcdGubun3V} <!-- 처리 구분3 -->
, #{petiPathGubunC} <!-- 신청 경로 코드 -->
, #{originalFilename} <!-- 원본 파일 명 -->
,<include refid="utility.now" /><!-- 등록 일시 -->
, #{createdBy} <!-- 등록자 -->
)</insert>
<insert id="insertFile" parameterType="cokr.xit.interfaces.smg.Petition">/* smgMapper.insertFile(국민신문고 수신 민원 첨부파일 등록) */
INSERT INTO TB_ESB_INTERFACE_FILE (
INTERFACE_SEQ_N <!-- 인터페이스 키 -->
, PETI_FILE_SIZE_N <!-- 민원 신청 첨부파일 크기 -->
, PETI_FILE_PATH1_V <!-- 민원 신청 첨부파일명 1 -->
, PETI_FILE_PATH2_V <!-- 민원 신청 첨부파일명 2 -->
, PETI_FILE_PATH3_V <!-- 민원 신청 첨부파일명 3 -->
, PETI_FILE_PATH4_V <!-- 민원 신청 첨부파일명 4 -->
, PETI_FILE_PATH5_V <!-- 민원 신청 첨부파일명 5 -->
, PCD_FILE_SIZE_N <!-- 민원 처리 첨부파일 크기 -->
, PCD_FILE_PATH1_V <!-- 민원 처리 첨부파일명 1 -->
, PCD_FILE_PATH2_V <!-- 민원 처리 첨부파일명 2 -->
, PCD_FILE_PATH3_V <!-- 민원 처리 첨부파일명 3 -->
, PCD_FILE_PATH4_V <!-- 민원 처리 첨부파일명 4 -->
, PCD_FILE_PATH5_V <!-- 민원 처리 첨부파일명 5 -->
, STRG_ATCHFILE_NM1 <!-- 저장 첨부파일명 1 -->
, STRG_ATCHFILE_NM2 <!-- 저장 첨부파일명 2 -->
, STRG_ATCHFILE_NM3 <!-- 저장 첨부파일명 3 -->
, STRG_ATCHFILE_NM4 <!-- 저장 첨부파일명 4 -->
, STRG_ATCHFILE_NM5 <!-- 저장 첨부파일명 5 -->
) VALUES (
#{interfaceSeqN} <!-- 인터페이스 키 -->
, #{petiFileSizeN} <!-- 민원 신청 첨부파일 크기 -->
, #{petiFilePath1V} <!-- 민원 신청 첨부파일명 1 -->
, #{petiFilePath2V} <!-- 민원 신청 첨부파일명 2 -->
, #{petiFilePath3V} <!-- 민원 신청 첨부파일명 3 -->
, #{petiFilePath4V} <!-- 민원 신청 첨부파일명 4 -->
, #{petiFilePath5V} <!-- 민원 신청 첨부파일명 5 -->
, #{pcdFileSizeN} <!-- 민원 처리 첨부파일 크기 -->
, #{pcdFilePath1V} <!-- 민원 처리 첨부파일명 1 -->
, #{pcdFilePath1V} <!-- 민원 처리 첨부파일명 2 -->
, #{pcdFilePath1V} <!-- 민원 처리 첨부파일명 3 -->
, #{pcdFilePath1V} <!-- 민원 처리 첨부파일명 4 -->
, #{pcdFilePath1V} <!-- 민원 처리 첨부파일명 5 -->
, #{attachmentPath1} <!-- 저장 첨부파일명 1 -->
, #{attachmentPath2} <!-- 저장 첨부파일명 2 -->
, #{attachmentPath3} <!-- 저장 첨부파일명 3 -->
, #{attachmentPath4} <!-- 저장 첨부파일명 4 -->
, #{attachmentPath5} <!-- 저장 첨부파일명 5 -->
)</insert>
<select id="selectReplies" parameterType="list" resultMap="petitionRow">/* smgMapper.selectReplies(국민신문고 답변 대상 조회) */
SELECT A.INTERFACE_SEQ_N <!-- 인터페이스키 -->
, A.SYS_GUBUN_C <!-- 시스템구분 -->
, A.ANC_CODE_V <!-- 기관코드 -->
, A.PETI_GUBUN_C <!-- 민원구분 -->
, A.PETI_ANC_CODE_V <!-- 민원기관코드 -->
, A.PETI_NO_C <!-- 민원 신청 번호 -->
, A.CIVIL_NO_C <!-- 민원 접수 번호 -->
, PETER_NAME_V <!-- 민원 신청인 명 -->
, ZIP_CODE_C <!-- 민원 신청인 우편 번호 -->
, ADDRESS_V <!-- 민원 신청인 주소 -->
, PETI_TITLE_V <!-- 민원 신청 제목 -->
, PETI_REASON_L <!-- 민원 신청 내용 -->
, OPEN_YN_C <!-- 민원 공개 여부 -->
, PETI_REG_D <!-- 민원 신청일 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.CIVIL_GIST_V ELSE B.CIVIL_GIST_V END CIVIL_GIST_V <!-- 민원요지 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.CIVIL_ABSTRACT_L ELSE B.CIVIL_ABSTRACT_L END CIVIL_ABSTRACT_L <!-- 민원처리요약 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_DEPT_V ELSE B.PCD_DEPT_V END PCD_DEPT_V <!-- 처리부서코드 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_DEPT_NM_V ELSE B.PCD_DEPT_NM_V END PCD_DEPT_NM_V <!-- 민원 처리 부서명 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.DUTY_ID_V ELSE B.DUTY_ID_V END DUTY_ID_V <!-- 민원 처리 담당자 명 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_EMAIL_V ELSE B.PCD_EMAIL_V END PCD_EMAIL_V <!-- 담당자 이메일 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_TEL_V ELSE B.PCD_TEL_V END PCD_TEL_V <!-- 담당자 전화번호 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_RST_CONT_L ELSE B.PCD_RST_CONT_L END PCD_RST_CONT_L<!-- 민원 처리 결과 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.DO_REG_D ELSE B.DO_REG_D END DO_REG_D <!-- 민원 처리 완료 일자 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_RST_CONT_ATTACH_YN_C ELSE B.PCD_RST_CONT_ATTACH_YN_C END PCD_RST_CONT_ATTACH_YN_C <!-- 민원 처리 결과 첨부 여부 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_ANC_CODE_V ELSE B.PCD_ANC_CODE_V END PCD_ANC_CODE_V<!-- 민원 실 처리 기관 코드 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.REG_D ELSE B.REG_D END REG_D <!-- 등록일자 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.SEND_YN_C ELSE B.SEND_YN_C END SEND_YN_C <!-- 송신여부 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.SEND_D ELSE B.SEND_D END SEND_D <!-- 송신일자 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.APPLY_D ELSE B.APPLY_D END APPLY_D <!-- 적용일자 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.APPLY_GUBUN_C ELSE B.APPLY_GUBUN_C END APPLY_GUBUN_C <!-- 완료구분 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_GUBUN_V ELSE B.PCD_GUBUN_V END PCD_GUBUN_V <!-- 처리구분1 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_GUBUN2_V ELSE B.PCD_GUBUN2_V END PCD_GUBUN2_V <!-- 처리구분2 -->
, CASE A.PETI_GUBUN_C WHEN '180' THEN A.PCD_GUBUN3_V ELSE B.PCD_GUBUN3_V END PCD_GUBUN3_V <!-- 처리구분3 -->
, A.TRSM_INTERFACE_SEQ_N <!-- 전송 인터페이스 키 -->
FROM TB_ESB_INTERFACE_TRSM A
LEFT OUTER JOIN TB_ESB_INTERFACE B ON A.INTERFACE_SEQ_N = B.INTERFACE_SEQ_N
<if test='list == null'>WHERE A.APPLY_GUBUN_C = 'N'</if>
<if test='list != null'>WHERE A.INTERFACE_SEQ_N IN (<foreach collection="list" item="item" separator=",">#{item}</foreach>)</if>
ORDER BY A.INTERFACE_SEQ_N
</select>
<insert id="insertReply" parameterType="map">/* smgMapper.insertReply(답변/반송 등록)*/
INSERT INTO TB_ESB_INTERFACE_TRSM (
INTERFACE_SEQ_N <!--인터페이스 키 -->
, SYS_GUBUN_C <!--시스템 구분 -->
, ANC_CODE_V <!--기관 코드 -->
, PETI_GUBUN_C <!--민원 구분 -->
, PETI_ANC_CODE_V <!--민원 기관 코드 -->
, PETI_NO_C <!--민원 신청 번호 -->
, CIVIL_NO_C <!--민원 접수 번호 -->
, CIVIL_GIST_V <!--민원 요지 -->
, CIVIL_ABSTRACT_L <!--민원 처리 요약 -->
, PCD_DEPT_V <!--처리 부서 코드 -->
, PCD_DEPT_NM_V <!--민원 처리 부서명 -->
, DUTY_ID_V <!--민원 처리 담당자 명 -->
, PCD_EMAIL_V <!--담당자 이메일 -->
, PCD_TEL_V <!--담당자 전화번호 -->
, PCD_RST_CONT_L <!--민원 처리 결과 -->
, DO_REG_D <!--민원 처리 완료 일자 -->
, PCD_RST_CONT_ATTACH_YN_C <!--민원 처리 결과 첨부 여부 -->
, PCD_ANC_CODE_V <!--민원 실 처리 기관 코드 -->
, REG_D <!--등록 일자 -->
, SEND_YN_C <!--송신 여부 -->
, SEND_D <!--송신 일자 -->
, APPLY_D <!--적용 일자 -->
, APPLY_GUBUN_C <!--완료 구분 -->
, PCD_GUBUN_V <!--처리 구분1 -->
, PCD_GUBUN2_V <!--처리 구분2 -->
, PCD_GUBUN3_V <!--처리 구분3 -->
, TRSM_INTERFACE_SEQ_N <!--전송 인터페이스 키 -->
, TRSM_STTS_CD <!--전송 상태 -->
, TRSM_STTS_MSG <!--전송 상태 메시지 -->
, REG_DT <!--등록 일시 -->
, RGTR <!--등록자 -->
, MDFCN_DT <!--수정 일시 -->
, MDFR <!--수정자 -->
) VALUES (
#{reply.interfaceSeqN} <!--인터페이스 키 -->
, #{reply.sysGubunC} <!--시스템 구분 -->
, #{reply.ancCodeV} <!--기관 코드 -->
, #{reply.petiGubunC} <!--민원 구분 -->
, #{reply.petiAncCodeV} <!--민원 기관 코드 -->
, #{reply.petiNoC} <!--민원 신청 번호 -->
, #{reply.civilNoC} <!--민원 접수 번호 -->
, #{reply.civilGistV} <!--민원 요지 -->
, #{reply.civilAbstractL} <!--민원 처리 요약 -->
, #{reply.pcdDeptV} <!--처리 부서 코드 -->
, #{reply.pcdDeptNmV} <!--민원 처리 부서명 -->
, #{reply.dutyIdV} <!--민원 처리 담당자 명 -->
, #{reply.pcdEmailV} <!--담당자 이메일 -->
, #{reply.pcdTelV} <!--담당자 전화번호 -->
, #{reply.pcdRstContL} <!--민원 처리 결과 -->
, #{reply.doRegD} <!--민원 처리 완료 일자 -->
, #{reply.pcdRstContAttachYnC} <!--민원 처리 결과 첨부 여부 -->
, #{reply.pcdAncCodeV} <!--민원 실 처리 기관 코드 -->
, #{reply.regD} <!--등록 일자 -->
, #{reply.sendYnC} <!--송신 여부 -->
, #{reply.sendD} <!--송신 일자 -->
, #{reply.applyD} <!--적용 일자 -->
, #{reply.applyGubunC} <!--완료 구분 -->
, #{reply.pcdGubunV} <!--처리 구분1 -->
, #{reply.pcdGubun2V} <!--처리 구분2 -->
, #{reply.pcdGubun3V} <!--처리 구분3 -->
, #{reply.sendInterfaceSeqN} <!--전송 인터페이스 키 -->
, #{reply.sendStatus} <!--전송 상태 -->
, #{reply.sendStatusMsg} <!--전송 상태 메시지 -->
,<include refid="utility.now" />
, #{currentUser.id} <!--등록자 -->
,<include refid="utility.now" />
, #{currentUser.id} <!--수정자 -->
)</insert>
<update id="updateSendStatus" parameterType="map">/* smgMapper.updateSendStatus(답변/반송 전송상태 업데이트) */
UPDATE TB_ESB_INTERFACE_TRSM A
, (<foreach collection="replies" item="reply" separator="UNION">
SELECT #{reply.interfaceSeqN} INTERFACE_SEQ_N, #{reply.sendInterfaceSeqN} TRSM_INTERFACE_SEQ_N, #{reply.sendD} SEND_D, #{reply.applyD} APPLY_D, #{reply.applyGubunC} APPLY_GUBUN_C, #{reply.sendStatus} TRSM_STTS_CD, #{reply.sendStatusMsg} TRSM_STTS_MSG</foreach>
) B
SET A.TRSM_INTERFACE_SEQ_N = B.TRSM_INTERFACE_SEQ_N
, A.SEND_D = B.SEND_D
, A.APPLY_D = B.APPLY_D
, A.APPLY_GUBUN_C = B.APPLY_GUBUN_C
, A.TRSM_STTS_CD = B.TRSM_STTS_CD
, A.TRSM_STTS_MSG = B.TRSM_STTS_MSG
, A.MDFCN_DT = #{now}
, A.MDFR = #{currentUser.id}
WHERE A.INTERFACE_SEQ_N = B.INTERFACE_SEQ_N</update>
</mapper>

@ -0,0 +1,186 @@
<?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.interfaces.lvis.dao.VehicleInfoMapper">
<insert id="insertBasicInfo" parameterType="map">/* vehicleInfoMapper.insertBasicInfo(자동차 기본사항 조회 로그 등록) */
INSERT INTO TB_BASIC_INFO_LOG (
LOG_ID
, PRYE <!-- 연식 -->
, REGIST_DE <!-- 등록일(변경일) -->
, ERSR_REGIST_SE_CODE <!-- 말소등록구분코드 -->
, ERSR_REGIST_SE_NM <!-- 말소등록구분명 -->
, ERSR_REGIST_DE <!-- 말소등록일 -->
, REGIST_DETAIL_CODE <!-- 등록상세코드 -->
, DSPLVL <!-- 배기량 -->
, USE_STRNGHLD_LEGALDONG_CODE <!-- 사용본거지법정동코드 -->
, USE_STRNGHLD_ADSTRD_CODE <!-- 사용본거지행정동코드 -->
, USE_STRNGHLD_MNTN <!-- 사용본거지산 -->
, USE_STRNGHLD_LNBR <!-- 사용본거지번지 -->
, USE_STRNGHLD_HO <!-- 사용본거지호 -->
, USE_STRNGHLD_ADRES_NM <!-- 사용본거지상세주소 -->
, USE_STRNGHLD_ROAD_NM_CODE <!-- 사용본거지도로명코드 -->
, USGSRHLD_UNDGRND_BULD_SE_CODE <!-- 사용본거지지하건물구분코드 -->
, USE_STRNGHLD_BULD_MAIN_NO <!-- 사용본거지건물주요번호 -->
, USE_STRNGHLD_BULD_SUB_NO <!-- 사용본거지건물부번호 -->
, MBER_SE_CODE <!-- 대표소유자회원구분코드 -->
, MBER_NM <!-- 대표소유자성명 -->
, MBER_SE_NO <!-- 대표소유자회원번호 -->
, TELNO <!-- 대표소유자전화번호 -->
, OWNER_LEGALDONG_CODE <!-- 소유자법정동코드 -->
, OWNER_ADSTRD_CODE <!-- 소유자행정동코드 -->
, OWNER_MNTN <!-- 소유자산 -->
, OWNER_LNBR <!-- 소유자번지 -->
, OWNER_HO <!-- 소유자호 -->
, OWNER_ADRES_NM <!-- 소유자상세주소 -->
, OWNER_ROAD_NM_CODE <!-- 소유자도로명코드 -->
, OWNER_UNDGRND_BULD_SE_CODE <!-- 소유자지하건물구분코드 -->
, OWNER_BULD_MAIN_NO <!-- 소유자건물주요번호 -->
, OWNER_BULD_SUB_NO <!-- 소유자건물부번호 -->
, OWNER_ADRES_FULL <!-- 소유자전체주소 -->
, AFTR_VHRNO <!-- 신차량번호 -->
, USE_FUEL_CODE <!-- 사용연료코드 -->
, PRPOS_SE_CODE <!-- 용도구분코드 -->
, MTRS_FOM_NM <!-- 원동기형식명 -->
, FRNT_VHRNO <!-- 이전차량번호 -->
, VHRNO <!-- 차량번호 -->
, VIN <!-- 차대번호 -->
, CNM <!-- 차명 -->
, VHCLE_TOT_WT <!-- 차량총중량 -->
, CAAG_ENDDE <!-- 차령만료일자 -->
, CHANGE_DE <!-- 차번호변경시기 -->
, VHCTY_ASORT_CODE <!-- 차종종별코드 -->
, VHCTY_TY_CODE <!-- 차종유형코드 -->
, VHCTY_SE_CODE <!-- 차종분류코드 -->
, MXMM_LDG <!-- 최대적재량 -->
, VHCTY_ASORT_NM <!-- 차종종별명 -->
, VHCTY_TY_NM <!-- 차종유형명 -->
, VHCTY_SE_NM <!-- 차종분류명 -->
, FRST_REGIST_DE <!-- 최초등록일 -->
, FOM_NM <!-- 형식 -->
, ACQS_DE <!-- 취득일자 -->
, ACQS_END_DE <!-- 취득종료일자 -->
, YBL_MD <!-- 제작년월일 -->
, TRANSR_REGIST_DE <!-- 이전등록일(양수일) -->
, SPCF_REGIST_STTUS_CODE <!-- 제원등록상태코드 -->
, COLOR_NM <!-- 색상명 -->
, MRTG_CO <!-- 저당수 -->
, SEIZR_CO <!-- 압류건수 -->
, STMD_CO <!-- 구조변경수 -->
, NMPL_CSDY_AT <!-- 번호판영치여부 -->
, NMPL_CSDY_REMNR_DE <!-- 번호판영치최고일 -->
, ORIGIN_SE_CODE <!-- 출처구분코드 -->
, NMPL_STNDRD_CODE <!-- 번호판규격코드 -->
, ACQS_AMOUNT <!-- 취득금액 -->
, INSPT_VALID_PD_BGNDE <!-- 검사유효기간시작일 -->
, INSPT_VALID_PD_ENDDE <!-- 검사유효기간종료일 -->
, CHCK_VALID_PD_BGNDE <!-- 점검유효기간시작일 -->
, CHCK_VALID_PD_ENDDE <!-- 점검유효기간종료일 -->
, USE_STRNGHLD_GRC_CODE <!-- 사용본거지관청코드 -->
, TKCAR_PSCAP_CO <!-- 승차정원수 -->
, SPMNNO <!-- 제원관리번호 -->
, TRVL_DSTNC <!-- 주행거리 -->
, FRST_REGIST_RQRCNO <!-- 최초등록접수번호 -->
, VLNT_ERSR_PRVNTC_NTICE_DE <!-- 예고통지일 -->
, REGIST_INSTT_NM <!-- 등록기관명 -->
, PROCESS_IMPRTY_RESN_CODE <!-- 처리불가사유코드 -->
, PROCESS_IMPRTY_RESN_DTLS <!-- 처리불가사유명세 -->
, VIMS_PRPOS_SE_CODE <!-- 용도구분코드 -->
, VIMS_VHCTY_ASORT_CODE <!-- 차종종별코드 -->
, VIMS_VHCTY_TY_CODE <!-- 차종유형코드 -->
, VIMS_VHCTY_SE_CODE <!-- 차종분류코드 -->
, CBD_LT <!-- 차체길이 -->
, CBD_BT <!-- 차체너비 -->
, CBD_HG <!-- 차체높이 -->
, FRST_MXMM_LDG <!-- 최초최대적재량 -->
) VALUES (
<include refid="utility.now" />
, #{prye} <!-- 연식 -->
, #{regist_de} <!-- 등록일(변경일) -->
, #{ersr_regist_se_code} <!-- 말소등록구분코드 -->
, #{ersr_regist_se_nm} <!-- 말소등록구분명 -->
, #{ersr_regist_de} <!-- 말소등록일 -->
, #{regist_detail_code} <!-- 등록상세코드 -->
, #{dsplvl} <!-- 배기량 -->
, #{use_strnghld_legaldong_code} <!-- 사용본거지법정동코드 -->
, #{use_strnghld_adstrd_code} <!-- 사용본거지행정동코드 -->
, #{use_strnghld_mntn} <!-- 사용본거지산 -->
, #{use_strnghld_lnbr} <!-- 사용본거지번지 -->
, #{use_strnghld_ho} <!-- 사용본거지호 -->
, #{use_strnghld_adres_nm} <!-- 사용본거지상세주소 -->
, #{use_strnghld_road_nm_code} <!-- 사용본거지도로명코드 -->
, #{usgsrhld_undgrnd_buld_se_code} <!-- 사용본거지지하건물구분코드 -->
, #{use_strnghld_buld_main_no} <!-- 사용본거지건물주요번호 -->
, #{use_strnghld_buld_sub_no} <!-- 사용본거지건물부번호 -->
, #{mber_se_code} <!-- 대표소유자회원구분코드 -->
, #{mber_nm} <!-- 대표소유자성명 -->
, #{mber_se_no} <!-- 대표소유자회원번호 -->
, #{telno} <!-- 대표소유자전화번호 -->
, #{owner_legaldong_code} <!-- 소유자법정동코드 -->
, #{owner_adstrd_code} <!-- 소유자행정동코드 -->
, #{owner_mntn} <!-- 소유자산 -->
, #{owner_lnbr} <!-- 소유자번지 -->
, #{owner_ho} <!-- 소유자호 -->
, #{owner_adres_nm} <!-- 소유자상세주소 -->
, #{owner_road_nm_code} <!-- 소유자도로명코드 -->
, #{owner_undgrnd_buld_se_code} <!-- 소유자지하건물구분코드 -->
, #{owner_buld_main_no} <!-- 소유자건물주요번호 -->
, #{owner_buld_sub_no} <!-- 소유자건물부번호 -->
, #{owner_adres_full} <!-- 소유자전체주소 -->
, #{aftr_vhrno} <!-- 신차량번호 -->
, #{use_fuel_code} <!-- 사용연료코드 -->
, #{prpos_se_code} <!-- 용도구분코드 -->
, #{mtrs_fom_nm} <!-- 원동기형식명 -->
, #{frnt_vhrno} <!-- 이전차량번호 -->
, #{vhrno} <!-- 차량번호 -->
, #{vin} <!-- 차대번호 -->
, #{cnm} <!-- 차명 -->
, #{vhcle_tot_wt} <!-- 차량총중량 -->
, #{caag_endde} <!-- 차령만료일자 -->
, #{change_de} <!-- 차번호변경시기 -->
, #{vhcty_asort_code} <!-- 차종종별코드 -->
, #{vhcty_ty_code} <!-- 차종유형코드 -->
, #{vhcty_se_code} <!-- 차종분류코드 -->
, #{mxmm_ldg} <!-- 최대적재량 -->
, #{vhcty_asort_nm} <!-- 차종종별명 -->
, #{vhcty_ty_nm} <!-- 차종유형명 -->
, #{vhcty_se_nm} <!-- 차종분류명 -->
, #{frst_regist_de} <!-- 최초등록일 -->
, #{fom_nm} <!-- 형식 -->
, #{acqs_de} <!-- 취득일자 -->
, #{acqs_end_de} <!-- 취득종료일자 -->
, #{ybl_md} <!-- 제작년월일 -->
, #{transr_regist_de} <!-- 이전등록일(양수일) -->
, #{spcf_regist_sttus_code} <!-- 제원등록상태코드 -->
, #{color_nm} <!-- 색상명 -->
, #{mrtg_co} <!-- 저당수 -->
, #{seizr_co} <!-- 압류건수 -->
, #{stmd_co} <!-- 구조변경수 -->
, #{nmpl_csdy_at} <!-- 번호판영치여부 -->
, #{nmpl_csdy_remnr_de} <!-- 번호판영치최고일 -->
, #{origin_se_code} <!-- 출처구분코드 -->
, #{nmpl_stndrd_code} <!-- 번호판규격코드 -->
, #{acqs_amount} <!-- 취득금액 -->
, #{inspt_valid_pd_bgnde} <!-- 검사유효기간시작일 -->
, #{inspt_valid_pd_endde} <!-- 검사유효기간종료일 -->
, #{chck_valid_pd_bgnde} <!-- 점검유효기간시작일 -->
, #{chck_valid_pd_endde} <!-- 점검유효기간종료일 -->
, #{use_strnghld_grc_code} <!-- 사용본거지관청코드 -->
, #{tkcar_pscap_co} <!-- 승차정원수 -->
, #{spmnno} <!-- 제원관리번호 -->
, #{trvl_dstnc} <!-- 주행거리 -->
, #{frst_regist_rqrcno} <!-- 최초등록접수번호 -->
, #{vlnt_ersr_prvntc_ntice_de} <!-- 예고통지일 -->
, #{regist_instt_nm} <!-- 등록기관명 -->
, #{process_imprty_resn_code} <!-- 처리불가사유코드 -->
, #{process_imprty_resn_dtls} <!-- 처리불가사유명세 -->
, #{vims_prpos_se_code} <!-- 용도구분코드 -->
, #{vims_vhcty_asort_code} <!-- 차종종별코드 -->
, #{vims_vhcty_ty_code} <!-- 차종유형코드 -->
, #{vims_vhcty_se_code} <!-- 차종분류코드 -->
, #{cbd_lt} <!-- 차체길이 -->
, #{cbd_bt} <!-- 차체너비 -->
, #{cbd_hg} <!-- 차체높이 -->
, #{frst_mxmm_ldg} <!-- 최초최대적재량 -->
)</insert>
</mapper>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -296,7 +296,10 @@ $(document).ready(function(){
ajax.get({
url : $P.crdnControl.urls.getInfo,
data : {"crdnId" : dataKey},
data : {
"crdnId" : dataKey,
"openerPageName" : "${pageName}"
},
success : resp => {
dialog.open({
id : dialogId,

@ -2,7 +2,7 @@
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<div class="d-flex flex-row justify-content-evenly">
<div class="card" style="max-width:1100px;" title="민원접수 초기자료 편집">
<div class="card" style="max-width:1000px;" title="민원접수 초기자료 편집">
<form id="frmEdit--${pageName}">
<input id="crdnId--${pageName}" name="crdnId" type="hidden" data-map="CRDN_ID" />
<input id="taskSeCd--${pageName}" name="taskSeCd" type="hidden" value="${taskSeCd}" />
@ -10,7 +10,7 @@
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="crdnSeCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속구분</label>
<label for="crdnSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">단속구분</label>
<select id="crdnSeCd--${pageName}" name="crdnSeCd" data-map="CRDN_SE_CD" class="form-select">
<c:forEach items="${FIM002List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -20,7 +20,7 @@
</template>
</div>
<div class="col-md-4">
<label for="crdnYmd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
<label for="crdnYmd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end required">
위반일자
</label>
<input type="text" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD"
@ -28,7 +28,7 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<div class="col-md-4">
<label for="crdnTm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
<label for="crdnTm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end required">
위반시간
</label>
<input type="text" id="crdnTm--${pageName}" name="crdnTm" data-map="CRDN_TM"
@ -36,14 +36,14 @@
placeholder="시:분:초" />
</div>
<div class="col-md-4">
<label for="vhrno--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
<label for="vhrno--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
차량번호
</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" class="form-control"
data-maxlengthb="30" required />
data-maxlengthb="30" />
</div>
<div class="col-md-6">
<label for="vltnCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">
<label for="vltnCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
위반내용
</label>
<select id="vltnCd--${pageName}" name="vltnCd" class="form-select" data-map="VLTN_CD">
@ -53,26 +53,26 @@
</select>
</div>
<div class="col-md-6 select2-primary">
<label for="crdnStdgNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<label for="crdnStdgNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" class="form-control" readonly/>
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button>
</div>
<div class="col-md-4">
<label for="crdnPlc--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">위반장소</label>
<label for="crdnPlc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">위반장소</label>
<input type="text" id="crdnPlc--${pageName}" name="crdnPlc" data-map="CRDN_PLC" class="form-control"
data-maxlengthb="200" />
</div>
<div class="col-md-8" slot="edit">
<template class="bpv">
<slot>
<label for="dtlCrdnPlc--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">상세위반장소</label>
<label for="dtlCrdnPlc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">상세위반장소</label>
<input type="text" id="dtlCrdnPlc--${pageName}" name="dtlCrdnPlc" data-map="DTL_CRDN_PLC" class="form-control"
data-maxlenghb="200" />
</slot>
</template>
<template class="pvs">
<slot>
<label for="crdnSpareaCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label>
<label for="crdnSpareaCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label>
<select id="crdnSpareaCd--${pageName}" name="crdnSpareaCd" data-map="CRDN_SPAREA_CD" class="form-select">
<c:forEach items="${FIM007List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -82,45 +82,45 @@
</template>
</div>
<div class="col-md-6">
<label for="cvlcptAplcntNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">신고자</label>
<label for="cvlcptAplcntNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">신고자</label>
<input type="text" id="cvlcptAplcntNm--${pageName}" name="cvlcptAplcntNm" data-map="CVLCPT_APLCNT_NM"
class="form-control" />
</div>
<div class="col-md-6">
<label for="cvlcptPrcsPicNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">담당자</label>
<label for="cvlcptPrcsPicNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">담당자</label>
<input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm" data-map="CVLCPT_PRCS_PIC_NM"
class="form-control" />
</div>
<div class="col-md-12">
<label for="cvlcptAplyCn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end align-top"
<label for="cvlcptAplyCn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end align-top"
>신고내용</label>
<textarea type="text" id="cvlcptAplyCn--${pageName}" name="cvlcptAplyCn" data-map="CVLCPT_APLY_CN"
class="form-control" cols="100%" rows="4"
></textarea>
</div>
<div class="col-md-6">
<label for="cvlcptRcptYmd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">접수일</label>
<label for="cvlcptRcptYmd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">접수일</label>
<input type="text" id="cvlcptRcptYmd--${pageName}" name="cvlcptRcptYmd" data-map="CVLCPT_RCPT_YMD"
class="form-control form-date" data-fmt-type="day" maxlength="10" disabled />
</div>
<div class="col-md-6">
<label for="cvldptPrcsPrnmntDt--${pageName}"
class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">답변기한</label>
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">답변기한</label>
<input type="text" id="cvldptPrcsPrnmntDt--${pageName}" name="cvldptPrcsPrnmntDt" data-map="CVLCPT_PRCS_PRNMNT_DT"
class="form-control form-date" data-fmt-type="day" maxlength="10" disabled />
</div>
<div class="col-md-12">
<label for="etcCn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
<label for="etcCn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
<input type="text" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" class="form-control"
data-maxlengthb="1000" />
</div>
<div class="col-md-4">
<label for="rtpyrNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">소유자</label>
<label for="rtpyrNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">소유자</label>
<input type="text" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" class="form-control"
/>
</div>
<div class="col-md-4">
<label for="rtpyrSeCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주민번호구분</label>
<label for="rtpyrSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">주민번호구분</label>
<select id="rtpyrSeCd--${pageName}" name="rtpyrSeCd" data-map="RTPYR_SE_CD" class="form-select">
<c:forEach items="${FIM011List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -128,22 +128,22 @@
</select>
</div>
<div class="col-md-4">
<label for="rtpyrNo--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주민번호</label>
<label for="rtpyrNo--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">주민번호</label>
<input type="text" id="rtpyrNo--${pageName}" name="rtpyrNo" data-map="RTPYR_NO" class="form-control privacy" />
<input type="text" id="mask-rtpyrNo--${pageName}" class="form-control privacy-mask" disabled value="******"/>
</div>
<div class="col-md-12">
<label for="addr--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">주소</label>
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">주소</label>
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-700"
data-maxlengthb="320" />
</div>
<div class="col-md-12">
<label for="dtlAddr--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">상세주소</label>
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">상세주소</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-700"
data-maxlengthb="200" />
</div>
<div class="col-md-6">
<label for="zip--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">우편번호</label>
<label for="zip--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">우편번호</label>
<input type="text" id="zip--${pageName}" name="zip" data-map="ZIP" class="form-control w-px-100"
maxlength="7" pattern="(\d{3}-\d{3}|\d{6}|\d{5})" />
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button>
@ -152,36 +152,36 @@
</div>
<div class="col-md-4">
<label for="vin--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차대번호</label>
<label for="vin--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차대번호</label>
<input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly
placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label>
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label>
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</slot>
</template>
</div>
<div class="col-md-4">
<label for="vhclNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
<label for="vhclNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
<input type="text" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly
placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-4">
<label for="vhclColor--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량색상</label>
<label for="vhclColor--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차량색상</label>
<input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly
placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-4">
<label for="useFuelCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<label for="useFuelCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled>
<c:forEach items="${LVS005List}" var="item">
<option value=""></option>
@ -192,7 +192,7 @@
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot>
<label for="towngYn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
<label for="towngYn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
<select id="towngYn--${pageName}" name="towngYn" class="form-select" data-map="TOWNG_YN">
<c:forEach items="${FIM053List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -204,7 +204,7 @@
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot>
<label for="crdnSn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label>
<label for="crdnSn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label>
<input type="text" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" class="form-control"
maxlength="20" data-maxlengthb="20" />
</slot>
@ -213,7 +213,7 @@
<div class="col-md-4" slot="edit">
<template class="dpv">
<slot>
<label for="parkngPsbltyRsltCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
<label for="parkngPsbltyRsltCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
<select id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD" class="form-select">
<c:forEach items="${FIM034List}" var="item">
<option value="${item.code}">${item.value}</option>
@ -225,7 +225,7 @@
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="teamNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속조</label>
<label for="teamNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">단속조</label>
<select id="teamNm--${pageName}" name="teamNm" data-map="TEAM_NM" class="form-select">
</select>
</slot>
@ -234,7 +234,7 @@
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속원</label>
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">단속원</label>
<input type="text" id="teamer1--${pageName}" name="teamer1" data-map="TEAMER_1" class="form-control" />
<input type="text" id="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" class="form-control" />
<input type="text" id="teamer3--${pageName}" name="teamer3" data-map="TEAMER_3" class="form-control" />
@ -253,7 +253,7 @@
<div class="col-md-6">
<div class="row justify-content-end">
<div class="col-sm-3">
<button type="button" id="btnInst--${pageName}" class="btn btn-primary">등록</button>
<button type="button" id="btnInst--${pageName}" class="btn btn-primary">저장</button>
</div>
</div>
</div>
@ -261,30 +261,36 @@
</form>
</div>
<div class="card" style="width:400px;">
<form id="frmFile--${pageName}" class="dpv eca" method="post" enctype="multipart/form-data">
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple accept="image/*" hidden />
<div class="card" style="width:500px;">
<form id="frmFile--${pageName}" method="post" enctype="multipart/form-data">
<input type="file" id="newFileList--${pageName}" name="newFileList" multiple accept="image/*" hidden />
<input type="file" id="modifyFileList--${pageName}" name="modifyFileList" multiple accept="image/*" hidden />
</form>
<div class="col-md-12 d-flex justify-content-between">
<div class="fs-4 fw-bold">등록된 사진</div>
<button type="button" id="btnEditPhoto--${pageName}" class="btn btn-blue">선택 사진 편집</button>
<div>
<button type="button" id="btnEditPhoto--${pageName}" class="btn btn-blue">선택 사진 편집</button>
<button type="button" id="btnDeleteExistPhoto--${pageName}" class="btn btn-blue">선택 사진 삭제</button>
</div>
</div>
<div id="display3--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
<div id="displayForExist--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
</div>
<form id="frmUploadSet--${pageName}" method="post" enctype="multipart/form-data">
<input type="file" id="inputUploadSet--${pageName}" name="inputUploadSet" multiple accept="image/*" hidden />
</form>
<div class="col-md-12 d-flex justify-content-between">
<div class="fs-4 fw-bold">추가한 사진</div>
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">사진 추가</button>
<div>
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">사진 추가</button>
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-blue">동영상 캡쳐</button>
<button type="button" id="btnCancelAddFile--${pageName}" class="btn btn-blue">선택 사진 삭제</button>
</div>
</div>
<div id="display--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
<div id="displayForNew--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
</div>
<div class="col-md-12 d-flex justify-content-between" id="cpatureTitleArea--${pageName}">
<div class="fs-4 fw-bold">캡쳐 이미지</div>
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-blue">동영상 캡쳐</button>
</div>
<div id="display2--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
</div>
</div>
@ -300,17 +306,21 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.existFileArr = [];
$P.captureFileArr = [];
$P.localUploadArr = [];
$P.numberPlateArr = [];
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
$P.uploadSet = uploadSupport("#uploadFileList--${pageName}");
$P.uploadSet = uploadSupport("#inputUploadSet--${pageName}");
$P.crdnControl = new DatasetControl({
urls : { load : "", create : wctx.url("/${taskSeCd}/crdn/crdn01/020/save.do") },
urls : { load : "", update : wctx.url("/${taskSeCd}/crdn/crdn01/020/save.do") },
keymapper:info => info ? info.CRDN_ID : "",
dataGetter:obj => obj.crdnInfo,
formats: {
@ -330,11 +340,30 @@ $(document).ready(function(){
formData.append(key,value);
}
if(formData.get("uploadFileList").size == 0){
formData.delete("uploadFileList");
formData.delete("newFileList");
formData.delete("modifyFileList");
if($P.localUploadArr.length > 0){
$P.localUploadArr.forEach(item => formData.append("newFileList",item));
}
if($P.numberPlateArr.length > 0){
$P.numberPlateArr.forEach(item => formData.append("newFileList",item));
}
if($P.captureFileArr.length > 0){
$P.captureFileArr.forEach(item => formData.append("uploadFileList",item));
$P.captureFileArr.forEach(item => formData.append("newFileList",item));
}
if($P.existFileArr.length > 0){
for(var i=0; i < $P.existFileArr.length; i++){
if($P.existFileArr[i].status == "delete"){
formData.append("deleteFileKeyList", $P.existFileArr[i].FILE_ID);
} else if($P.existFileArr[i].status == "modified"){
formData.append("modifyFileKeyList", $P.existFileArr[i].FILE_ID);
formData.append("modifyFileList", $P.existFileArr[i]);
}
}
}
ajax.post({
@ -351,32 +380,91 @@ $(document).ready(function(){
$P.formFields.set(item);
}
$P.uploadSet.onDatasetChange = () => { $P.fnDisplay(); };
$P.uploadSet.onRemove = () => { $P.fnDisplay(); };
$P.uploadSet.onDatasetChange = () => {
var files = $P.uploadSet.getDataset();
files.forEach(item => $P.localUploadArr.push(item));
$P.fnDisplay(false);
};
$P.uploadSet.onRemove = () => { };
$P.crdnControl.onSave = (resp) => {
if (resp.saved) {
dialog.alert("저장됐습니다.");
dialog.close("manualdialog");
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
}
};
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnMakeImgForExistFile = (fileArr) => {
var tagsText = "";
$P.fnDisplay = () => {
var displayArea = document.querySelector("#display--${pageName}");
var imgTags = $P.uploadSet.inStrings("<img src='{url}' width='200' height='200' />").join("\n");
displayArea.innerHTML = imgTags;
for(var index = 0, j = 0; index < fileArr.length; index++){
var item = fileArr[index];
var display2Area = document.querySelector("#display2--${pageName}");
var imgTags2 = "";
if($P.captureFileArr.length > 0){
$P.captureFileArr.forEach(function(item, index){
imgTags2 += "<img src='" + item.url + "' width='200' height='200' />";
});
if(item.status == "delete"){
continue;
}
tagsText += "<label class='mx-2'>";
tagsText += "<input type='radio' name='existPhoto' class='form-check-input' value='"+item.FILE_ID +"' ";
if(index == 0){
tagsText += " checked='checked' ";
}
tagsText += " />";
tagsText += "<img src='"+ item.URL +"' width='200' height='200' />";
tagsText += "</label>";
if(j % 2 == 1){
tagsText += "<br />";
}
j++;
}
return tagsText;
}
$P.fnMakeImgForNewFile = (fileArr) => {
var tagsText = "";
for(var index = 0; index < fileArr.length; index++){
var item = fileArr[index];
tagsText += "<label class='mx-2'>";
tagsText += "<input type='checkbox' name='newPhoto' class='form-check-input' value='"+item.id +"' ";
tagsText += " />";
tagsText += "<img src='"+ item.url +"' width='200' height='200' />";
tagsText += "</label>";
if(index % 2 == 1){
tagsText += "<br />";
}
}
return tagsText;
}
$P.fnDisplay = (isExist) => {
if(isExist){
var displayArea = document.querySelector("#displayForExist--${pageName}");
var tagsText = $P.fnMakeImgForExistFile($P.existFileArr);
if(tagsText == ""){
displayArea.innerHTML = "등록된 사진이 없습니다.";
$("#btnEditPhoto--crdn01020-info").hide();
} else {
displayArea.innerHTML = tagsText;
$("#btnEditPhoto--crdn01020-info").show();
}
} else {
var displayArea = document.querySelector("#displayForNew--${pageName}");
var concatArr = $P.localUploadArr.concat($P.numberPlateArr).concat($P.captureFileArr);
var tagsText = $P.fnMakeImgForNewFile(concatArr);
displayArea.innerHTML = tagsText;
}
display2Area.innerHTML = imgTags2;
};
$P.fnSave = () => {
@ -414,18 +502,42 @@ $(document).ready(function(){
file.url = (window.URL || window.webkitURL).createObjectURL(file);
$P.captureFileArr.push(file);
if(index === array.length - 1){
$P.fnDisplay();
$P.fnDisplay(false);
}
});
});
}
$P.editPhotoCallback = (modifiedFile, originalFileInfo, isNumberPlate) => {
modifiedFile.id = "file-" + new Date().getTime() + "-" + "0";
modifiedFile.url = (window.URL || window.webkitURL).createObjectURL(modifiedFile);
if(isNumberPlate){
$P.numberPlateArr.push(modifiedFile);
$P.fnDisplay(false);
} else {
$P.existFileArr.forEach(function(item,index){
if(item.FILE_ID == originalFileInfo.FILE_ID){
modifiedFile.URL = modifiedFile.url;
modifiedFile.FILE_ID = originalFileInfo.FILE_ID;
modifiedFile.status = "modified";
$P.existFileArr.splice(index, 1, modifiedFile);
};
});
$P.fnDisplay(true);
}
}
/**************************************************************************
* element.on
**************************************************************************/
$("#btnInst--${pageName}").on('click', () => $P.fnSave());
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFileList--${pageName}").trigger("click"); });
$("#btnAddFile--${pageName}").on('click', () => { $("#inputUploadSet--${pageName}").trigger("click"); });
$("#btnOpenVideoCapture--${pageName}").on('click', () => {
var crdnId = $("#crdnId--${pageName}").val();
@ -435,14 +547,57 @@ $(document).ready(function(){
);
});
$("#btnEditPhoto--${pageName}").on('click', () => {
var fileId = $("#display3--${pageName}").find("[name='editTarget']:checked").val();
var checked = $("#displayForExist--${pageName}").find("[name='existPhoto']:checked");
if(checked.length < 1){
alert("선택된 사진이 없습니다.");
return;
}
var fileId = checked.val();
window.open(wctx.url("/sprt/sprt03/020/main.do?openerPageName=${pageName}&fileId="+fileId)
,"editPhoto"
,"width=1800,height=950"
,"width=1400,height=750"
);
});
$("#btnDeleteExistPhoto--${pageName}").on('click', () => {
var checked = $("#displayForExist--${pageName}").find("[name='existPhoto']:checked");
if(checked.length < 1){
alert("선택된 사진이 없습니다.");
return;
}
var target = checked[0].value;
$P.existFileArr.forEach(function(item){
if(item.FILE_ID == target){
item.status = "delete";
}
});
$P.fnDisplay(true);
});
$("#btnCancelAddFile--${pageName}").on('click', () => {
var checked = $("#displayForNew--${pageName}").find("[name='newPhoto']:checked");
if(checked.length < 1){
alert("선택된 사진이 없습니다.");
return;
}
var checkedArr = [];
for(var i=0; i < checked.length; i++){
checkedArr.push(checked[i].value);
}
$P.captureFileArr = $P.captureFileArr.filter(item => checkedArr.indexOf(item.id) == -1);
$P.localUploadArr = $P.localUploadArr.filter(item => checkedArr.indexOf(item.id) == -1);
$P.numberPlateArr = $P.numberPlateArr.filter(item => checkedArr.indexOf(item.id) == -1);
$P.fnDisplay(false);
});
/**************************************************************************
* 초기화
@ -482,37 +637,24 @@ $(document).ready(function(){
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
var crdnInfo = ${crdnInfo};
crdnInfo.CVLCPT_APLY_CN = escapeHTMLEntity(crdnInfo.CVLCPT_APLY_CN);
$P.crdnControl.setData([crdnInfo]);
if(crdnInfo.videoExist == "N"){
$("#cpatureTitleArea--${pageName}").hide();
$("#display2--${pageName}").hide();
$("#btnOpenVideoCapture--${pageName}").hide();
}
if(crdnInfo.fileList){
var editPhotoArea = "";
crdnInfo.fileList.forEach(function(item, index){
editPhotoArea += "<label>"
editPhotoArea += "<input type='radio' name='editTarget' class='form-check-input' value='"+item.FILE_ID +"' ";
if(index == 0){
editPhotoArea += " checked='checked' ";
}
editPhotoArea += " />";
editPhotoArea += "<img src='"+ item.URL +"' width='200' height='200' />";
editPhotoArea += "</label>";
editPhotoArea += "<br />";
crdnInfo.fileList.forEach(function(item){
item.status = "";
$P.existFileArr.push(item);
});
$("#display3--${pageName}").append(editPhotoArea);
} else {
$("#display3--${pageName}").append("등록된 사진이 없습니다.");
$("#btnEditPhoto--crdn01020-info").hide();
}
$P.fnDisplay(true);
});

@ -1,3 +1,3 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="pageKorName" scope="request">민원(새올) 개별 등록</c:set>
<c:set var="pageKorName" scope="request">민원 개별 등록</c:set>

@ -236,19 +236,19 @@
</form>
</div>
<div class="card" style="width:400px;">
<form id="frmFile--${pageName}" class="dpv eca" method="post" enctype="multipart/form-data">
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple accept="image/*" hidden />
<form id="frmFile--${pageName}" method="post" enctype="multipart/form-data">
<input type="file" id="newFileList--${pageName}" name="newFileList" multiple accept="image/*" hidden />
</form>
<div class="col-md-12">
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">이미지 추가</button>
</div>
<div id="display--${pageName}" style="overflow-y: scroll;height: 340px;border-style: solid;">
</div>
<form id="frmUploadSet--${pageName}" method="post" enctype="multipart/form-data">
<input type="file" id="inputUploadSet--${pageName}" name="inputUploadSet" multiple accept="image/*" hidden />
</form>
<div class="col-md-12">
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">이미지 추가</button>
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-blue">동영상 캡쳐</button>
<button type="button" id="btnCancelAddFile--${pageName}" class="btn btn-blue">선택 사진 삭제</button>
</div>
<div id="display2--${pageName}" style="overflow-y: scroll;height: 340px;border-style: solid;">
<div id="display--${pageName}" style="overflow-y: scroll;height: 600px;border-style: solid;">
</div>
</div>
@ -267,13 +267,14 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.captureFileArr = [];
$P.localUploadArr = [];
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
$P.uploadSet = uploadSupport("#uploadFileList--${pageName}");
$P.uploadSet = uploadSupport("#inputUploadSet--${pageName}");
$P.crdnControl = new DatasetControl({
urls : { load : "", create : wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do") },
@ -296,11 +297,14 @@ $(document).ready(function(){
formData.append(key,value);
}
if(formData.get("uploadFileList").size == 0){
formData.delete("uploadFileList");
formData.delete("newFileList");
if($P.localUploadArr.length > 0){
$P.localUploadArr.forEach(item => formData.append("newFileList",item));
}
if($P.captureFileArr.length > 0){
$P.captureFileArr.forEach(item => formData.append("uploadFileList",item));
$P.captureFileArr.forEach(item => formData.append("newFileList",item));
}
ajax.post({
@ -313,8 +317,13 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl.on, Dataset.on
**************************************************************************/
$P.uploadSet.onDatasetChange = () => { $P.fnDisplay(); };
$P.uploadSet.onRemove = () => { $P.fnDisplay(); };
$P.uploadSet.onDatasetChange = () => {
var files = $P.uploadSet.getDataset();
files.forEach(item => $P.localUploadArr.push(item));
$P.fnDisplay();
};
$P.uploadSet.onRemove = () => { };
$P.crdnControl.onSave = (resp) => {
if (resp.saved) {
@ -325,20 +334,32 @@ $(document).ready(function(){
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnMakeImgForNewFile = (fileArr) => {
var tagsText = "";
for(var index = 0; index < fileArr.length; index++){
var item = fileArr[index];
tagsText += "<label class='mx-2'>";
tagsText += "<input type='checkbox' name='newPhoto' class='form-check-input' value='"+item.id +"' ";
tagsText += " />";
tagsText += "<img src='"+ item.url +"' width='200' height='200' />";
tagsText += "</label>";
if(index % 2 == 1){
tagsText += "<br />";
}
}
return tagsText;
}
$P.fnDisplay = () => {
var displayArea = document.querySelector("#display--${pageName}");
var imgTags = $P.uploadSet.inStrings("<img src='{url}' width='200' height='200' />").join("\n");
displayArea.innerHTML = imgTags;
var display2Area = document.querySelector("#display2--${pageName}");
var imgTags2 = "";
if($P.captureFileArr.length > 0){
$P.captureFileArr.forEach(function(item, index){
imgTags2 += "<img src='" + item.url + "' width='200' height='200' />";
});
}
display2Area.innerHTML = imgTags2;
var concatArr = $P.localUploadArr.concat($P.captureFileArr);
var tagsText = $P.fnMakeImgForNewFile(concatArr);
displayArea.innerHTML = tagsText;
};
$P.fnSave = () => {
@ -387,7 +408,9 @@ $(document).ready(function(){
**************************************************************************/
$("#btnInst--${pageName}").on('click', () => $P.fnSave());
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFileList--${pageName}").trigger("click"); });
$("#btnAddFile--${pageName}").on('click', () => { $("#inputUploadSet--${pageName}").trigger("click"); });
$("#btnOpenVideoCapture--${pageName}").on('click', () => {
window.open(wctx.url("/sprt/sprt03/010/main.do?openerPageName=${pageName}")
,"newVideoCapture"
@ -395,6 +418,23 @@ $(document).ready(function(){
);
});
$("#btnCancelAddFile--${pageName}").on('click', () => {
var checked = $("#display--${pageName}").find("[name='newPhoto']:checked");
if(checked.length < 1){
alert("선택된 사진이 없습니다.");
return;
}
var checkedArr = [];
for(var i=0; i < checked.length; i++){
checkedArr.push(checked[i].value);
}
$P.captureFileArr = $P.captureFileArr.filter(item => checkedArr.indexOf(item.id) == -1);
$P.localUploadArr = $P.localUploadArr.filter(item => checkedArr.indexOf(item.id) == -1);
$P.fnDisplay();
});
/**************************************************************************
* 초기화

@ -392,6 +392,7 @@ $(document).ready(function(){
* 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
initDetailSearchButton("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);

@ -103,6 +103,8 @@
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
</div>
<div class="col-6">
@ -165,20 +167,30 @@
<table id="photoInspection_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr>
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th style="min-width: 80px;">No.</th>
<th style="min-width: 160px;">단속일시</th>
<th style="min-width: 80px;">차량번호</th>
<th style="min-width: 80px;">위반건수</th>
<th onclick="searchFromGridTitle('CRDN_YMD','단속일자','ymd','');"
style="min-width: 160px;">단속일시</th>
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');"
style="min-width: 80px;">차량번호</th>
<th style="min-width: 80px;" class="text-orange">위반건수</th>
<th style="min-width: 80px;" class="text-orange">검사결과</th>
<th style="min-width: 250px;" class="text-orange">처리방법</th>
<th style="min-width: 80px;">위반동</th>
<th style="min-width: 300px;">위반장소</th>
<th style="min-width: 80px;">사진매수</th>
<th style="min-width: 80px;">처리상태</th>
<th style="min-width: 80px;">원금액</th>
<th style="min-width: 80px;">감경금액</th>
<th style="min-width: 80px;">자료출처</th>
<th onclick="searchFromGridTitle('CRDN_STDG_NM',this.innerText,'match','perfect');"
style="min-width: 80px;">위반동</th>
<th onclick="searchFromGridTitle('CRDN_PLC',this.innerText,'match','part');"
style="min-width: 300px;">위반장소</th>
<th onclick="searchFromGridTitle('ATCH_FILE_CNT',this.innerText,'match','perfect');"
style="min-width: 80px;">사진매수</th>
<th onclick="searchFromGridTitle('CRDN_STTS_CD',this.innerText,'codeValue','FIM010');"
style="min-width: 80px;">처리상태</th>
<th onclick="searchFromGridTitle('FFNLG_AMT',this.innerText,'match','perfect');"
style="min-width: 80px;">원금액</th>
<th onclick="searchFromGridTitle('UNKNOWN',this.innerText,'match','perfect');"
style="min-width: 80px;">감경금액</th>
<th onclick="searchFromGridTitle('CRDN_INPT_SE_CD',this.innerText,'codeValue','FIM003');"
style="min-width: 80px;">자료출처</th>
</tr>
</thead>
<tbody id="photoInspectionTbody--${pageName}"></tbody>
@ -233,10 +245,14 @@
<table id="sameVehicleInspectionMain_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr>
<th>차량번호</th>
<th>단속동</th>
<th>단속건수</th>
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');"
>차량번호</th>
<th onclick="searchFromGridTitle('CRDN_STDG_NM',this.innerText,'match','perfect');"
>단속동</th>
<th class="text-orange"
>단속건수</th>
</tr>
</thead>
<tbody id="sameVehicleInspectionMainTbody--${pageName}"></tbody>
@ -264,16 +280,26 @@
<table id="sameVehicleInspectionSub_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr>
<th>단속일시</th>
<th>자료출처</th>
<th>단속조</th>
<th>차량번호</th>
<th>단속동</th>
<th>단속장소</th>
<th>처리상태</th>
<th>금액</th>
<th>성명</th>
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th onclick="searchFromGridTitle('CRDN_YMD','단속일자','ymd','');"
>단속일시</th>
<th onclick="searchFromGridTitle('CRDN_INPT_SE_CD',this.innerText,'codeValue','FIM003');"
>자료출처</th>
<th onclick="searchFromGridTitle('TEAM_NM',this.innerText,'match','perfect');"
>단속조</th>
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');"
>차량번호</th>
<th onclick="searchFromGridTitle('CRDN_STDG_NM',this.innerText,'match','perfect');"
>단속동</th>
<th onclick="searchFromGridTitle('CRDN_PLC',this.innerText,'match','part');"
>단속장소</th>
<th onclick="searchFromGridTitle('CRDN_STTS_CD',this.innerText,'codeValue','FIM010');"
>처리상태</th>
<th onclick="searchFromGridTitle('FFNLG_AMT',this.innerText,'match','perfect');"
>금액</th>
<th onclick="searchFromGridTitle('RTPYR_NM',this.innerText,'match','part');"
>성명</th>
<th class="privacy">주민번호(전체)</th>
<th class="privacy-mask">주민번호(마스크)</th>
</tr>
@ -691,6 +717,7 @@ $(document).ready(function(){
* 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
initDetailSearchButton("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);

@ -350,7 +350,7 @@
id : ${pageName}Control.prefixed("dialog")
, title : "개별총정보"
, content : resp
, size : "xl"
, size : "xxl"
// , init : () => ${pageName}Control.setInfo(info) // 개별총정보 다이얼로그에서 실행할 함수
});
}
@ -409,9 +409,9 @@
*/
/**************************************************************************
*
* 초기 셋팅
**************************************************************************/
// 초기 설정
// 화면 초기값 셋팅
function initForm${pageName}() {
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
@ -423,6 +423,19 @@
// 이벤트
function setEvent${pageName}() {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0,4) + "-" + value.substring(4);
}
});
});
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
@ -484,7 +497,6 @@
if (!pageNumber) pageNumber = 1;
${pageName}Control.query = fnGetParams${pageName}(); // 검색조건
${pageName}Control.query.orderBy = "LEVY_EXCL_ID"; // 정렬
${pageName}Control.load(pageNumber);
}

@ -70,7 +70,6 @@
var prefixUrl = "/excl/excl01";
//
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
var ${pageName}Mode = "${pageMode}";
// 공통 코드
var FIM021 = new CommonCodes(${FIM021}, true);
var FIM022 = new CommonCodes(${FIM022}, true);
@ -84,11 +83,11 @@
, keymapper : info => info ? info.LEVY_EXCL_ID : ""
, dataGetter : obj => obj.levyExclInfo
, urls : {
create : wctx.url(prefixUrl + "/020/create.do") // 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 수정
create : wctx.url(prefixUrl + "/020/create.do") // 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 수정
}
, formats : {
LEVY_EXCL_YMD : dateFormat
LEVY_EXCL_YMD : dateFormat
}
});
@ -149,21 +148,19 @@
// 이벤트 설정
function setEvent${pageName}() {
}
// 일자 포맷
$("#frmEdit--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5){
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmEdit--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0,4) + "-" + value.substring(4);
}
});
});
});
}
/**************************************************************************
* function

@ -282,7 +282,7 @@
var ${pageName}Control = new DatasetControl({
prefix : "opnnSbmsn"
, prefixName : "의견제출"
, infoSize : "lg"
, infoSize : "xl"
, keymapper : info => info ? info.OPNN_ID : ""
, dataGetter : obj => obj.opnnSbmsnList
, appendData : true
@ -360,17 +360,16 @@
id : ${pageName}Control.prefixed("dialog")
, title : "개별총정보"
, content : resp
, size : "xl"
// , init : () => ${pageName}Control.setInfo(info) // 개별총정보 다이얼로그에서 실행할 함수
, size : "xxl"
});
}
});
}
/**************************************************************************
*
* 초기 셋팅
**************************************************************************/
// 초기 설정
// 화면 초기값 셋팅
function initForm${pageName}() {
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
@ -382,6 +381,19 @@
// 이벤트
function setEvent${pageName}() {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0,4) + "-" + value.substring(4);
}
});
});
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
@ -442,7 +454,6 @@
if (!pageNumber) pageNumber = 1;
${pageName}Control.query = fnGetParams${pageName}(); // 검색조건
${pageName}Control.query.orderBy = "OPNN_ID"; // 정렬
${pageName}Control.load(pageNumber);
}
@ -461,7 +472,7 @@
function fnModify${pageName}() {
let opnnId = ${pageName}Control.dataset.getValue("OPNN_ID");
// 부과 제외 ID 가 없다면.. return
// 의견제출 ID 가 없다면.. return
if (opnnId == undefined || opnnId == "") {
return;
}

@ -0,0 +1,282 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!-- Page Body -->
<div class="card">
<!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<!-- hidden -->
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" id="opnnId--${pageName}" name="opnnId" data-map="OPNN_ID" />
<div class="row g-1">
<!-- 차량번호 -->
<div class="col-md-6">
<label for="vhrno--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량번호</label>
<input type="text" class="form-control w-25" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" readonly />
</div>
<!-- 납부자 명 -->
<div class="col-md-6">
<label for="rtpyrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">납부자</label>
<input type="text" class="form-control w-45" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" readonly />
</div>
<!-- 접수 번호 -->
<div class="col-md-6">
<label for="rcptNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수 번호</label>
<input type="text" class="form-control w-25" id="rcptNo--${pageName}" name="rcptNo" data-map="RCPT_NO" required />
</div>
<!-- 접수 일자 -->
<div class="col-md-6">
<label for="rcptYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수 일자</label>
<input type="text" class="form-control form-date" id="rcptYmd--${pageName}" name="rcptYmd" data-map="RCPT_YMD"
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<!-- 접수 구분 -->
<div class="col-md-6">
<label for="rcptSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수 구분</label>
<select class="form-select" id="rcptSeCd--${pageName}" name="rcptSeCd" data-map="RCPT_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM029List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 통보 구분 코드 -->
<div class="col-md-6">
<label for="ntfctnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">통보 구분</label>
<select class="form-select" id="ntfctnSeCd--${pageName}" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM030List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 소유주 관계 구분 코드 -->
<div class="col-md-12">
<label for="ownrRelCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">소유주 관계 구분</label>
<select class="form-select" id="ownrRelCd--${pageName}" name="ownrRelCd" data-map="OWNR_REL_CD">
<option value="">선택하세요</option>
<c:forEach items="${FIM032List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 진술자 이름 -->
<div class="col-md-6">
<label for="sttrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">성명</label>
<input type="text" class="form-control w-25" id="sttrNm--${pageName}" name="sttrNm" data-map="STTR_NM" required />
</div>
<!-- 진술자 생년월일 -->
<div class="col-md-6">
<label for="sttrBrdt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">생년월일</label>
<input type="text" class="form-control w-25" id="sttrBrdt--${pageName}" name="sttrBrdt" data-map="STTR_BRDT" placeholder="YY-MM-DD" />
</div>
<!-- 진술자 주소 --><!-- 진술자 우편번호 -->
<div class="col-md-12">
<label for="sttrAddr--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">주소</label>
<input type="text" class="form-control w-75" id="sttrAddr--${pageName}" name="sttrAddr" data-map="STTR_ADDR" />
<input type="text" class="form-control w-px-75" id="sttrZip--${pageName}" name="sttrZip" data-map="STTR_ZIP" />
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button>
</div>
<!-- 진술자 상세주소 -->
<div class="col-md-12">
<label for="sttrDaddr--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상세 주소</label>
<input type="text" class="form-control w-85" id="sttrDaddr--${pageName}" name="sttrDaddr" data-map="STTR_DADDR" />
</div>
<!-- 진술자 연락처 -->
<div class="col-md-6">
<label for="sttrCttpc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">연락처</label>
<input type="text" class="form-control w-25" id="sttrCttpc--${pageName}" name="sttrCttpc" data-map="STTR_CTTPC" />
</div>
<!-- 진술자 이메일 -->
<div class="col-md-6">
<label for="sttrEml--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">이메일</label>
<input type="text" class="form-control w-45" id="sttrEml--${pageName}" name="sttrEml" data-map="STTR_EML" />
</div>
<!-- 의견 제출 내용 -->
<div class="col-md-12">
<label for="opnnSbmsnCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 내용</label>
<textarea class="form-control w-85" id="opnnSbmsnCn--${pageName}" name="opnnSbmsnCn" data-map="OPNN_SBMSN_CN" rows="5" data-maxlengthb="4000">
</textarea>
</div>
<!-- 의견 제출 구분 코드 -->
<div class="col-md-12">
<label for="opnnSbmsnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">의견제출 구분</label>
<select class="form-select" id="opnnSbmsnSeCd--${pageName}" name="opnnSbmsnSeCd" data-map="OPNN_SBMSN_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM033List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 의견 제출 요지 -->
<div class="col-md-12">
<label for="opnnSbmsnGist--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 요지</label>
<input type="text" class="form-control w-85" id="opnnSbmsnGist--${pageName}" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" data-maxlengthb="300" />
</div>
<!-- 담당자 검토 의견 -->
<div class="col-md-12">
<label for="picRvwOpnn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">검토 의견</label>
<textarea class="form-control w-85" id="picRvwOpnn--${pageName}" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="3" data-maxlengthb="1000">
</textarea>
</div>
</div>
</form>
<!-- /입력 영역 -->
<!-- 첨부 파일 등록 -->
<div class="card">
<form id="frmFile--${pageName}" class="dpv eca" method="post" enctype="multipart/form-data">
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple='multiple' hidden />
</form>
<div class="col-md-12">
<button class="btn btn-blue" id="btnAddFile--${pageName}" title="첨부파일추가">파일 추가</button>
<button class="btn btn-blue" id="btnDelFile--${pageName}" title="첨부파일삭제">파일 삭제</button>
</div>
</div>
<!-- /첨부 파일 등록 -->
</div>
<!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button class="btn btn-primary" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
// URL
var prefixUrl = "/excl/excl02";
//
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
// 파일 업로드
var ${pageName}UploadFile = uploadSupport("#uploadFileList--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "opnnSbmsn"
, prefixName : "의견제출"
, keymapper : info => info ? info.OPNN_ID : ""
, dataGetter : obj => obj.opnnSbmsnInfo
, urls : {
create : wctx.url(prefixUrl + "/020/create.do") // 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 수정
}
, formats : {
RCPT_YMD : dateFormat
}
});
${pageName}Control.onCurrentChange = item => {
${pageName}Fields.set(item);
}
/**************************************************************************
*
**************************************************************************/
// 저장 callback
${pageName}Control.onSave = (resp) => {
if (resp.retSaved == "true") {
dialog.alert(resp.retMessage);
dialog.close(${pageName}Control.prefix + "dialog");
}
}
// 저장
${pageName}Control.save = (info) => {
if (!info) return;
let item = ${pageName}Control.getCurrent("item");
let create = isEmpty(info.opnnId);
let formData = new FormData(document.getElementById("frmFile--${pageName}"));
for(let key in info) {
let value = info[key];
formData.append(key, value);
}
if (formData.get("uploadFileList").size == 0) {
formData.delete("uploadFileList");
}
ajax.post({
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
, data: formData, contentType : false, processData : false
, success : resp => ${pageName}Control.onSave(resp)
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 검색조건 초기값 셋팅
function initForm${pageName}() {
// 달력 초기화
initDatepicker("frmEdit--${pageName}");
$("#rcptYmd--${pageName}").datepicker("setDate", new Date());
}
// 이벤트 설정
function setEvent${pageName}() {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmEdit--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0,4) + "-" + value.substring(4);
}
});
});
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFileList--${pageName}").trigger("click"); });
}
/**************************************************************************
* function
**************************************************************************/
// 저장
function fnSave${pageName}() {
let formFields = new FimsFormFields("#frmEdit--${pageName}");
let data = formFields.get();
dialog.alert({
content : "현재 prefixName 정보를 저장하시겠습니까?"
, onOK : () => {
${pageName}Control.save(formFields.get());
}
});
}
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// 이벤트 설정
setEvent${pageName}();
// 화면 초기 설정
initForm${pageName}();
// Dataset 셋팅 - 단건일 경우 setData
${pageName}Control.setData([${opnnSbmsnInfo}]);
});
// #sourceURL=excl01020-info.jsp
</script>

@ -144,12 +144,9 @@
</div>
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button class="btn btn-primary" id="btnCreate--${pageName}" title="등록" onclick="fnCreate${pageName}();">
<button class="btn btn-primary" id="btnCreate--${pageName}" title="등록" onclick="fnSave${pageName}();">
등록
</button>
<button class="btn btn-primary" id="btnRemove--${pageName}" title="삭제" onclick="fnRemove${pageName}();">
삭제
</button>
<button class="btn btn-primary" id="btnBfrCrdnTotalInfo--${pageName}" title="이전 단속정보 보기" onclick="fnBfrCrdnTotalInfo${pageName}();">
이전 단속정보 보기
</button>
@ -242,16 +239,14 @@
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "crdnReReg"
, prefixName : "단속재등록"
, prefixName : "단속 재등록"
, infoSize : "lg"
, keymapper : info => info ? info.RE_REG_ID : ""
, dataGetter : obj => obj.crdnReRegList
, appendData : true
, urls : {
load : wctx.url(prefixUrl + "/010/list.do") // 검색
, getInfo : wctx.url(prefixUrl + "/020/info.do") // 등록 및 수정 팝업
, create : wctx.url(prefixUrl + "/010/create.do") // 신규 등록
, remove : wctx.url(prefixUrl + "/010/remove.do") // 자료 삭제
}
, formats : {
RE_REG_YMD : dateFormat
@ -318,8 +313,7 @@
id : ${pageName}Control.prefixed("dialog")
, title : "개별총정보"
, content : resp
, size : "xl"
// , init : () => ${pageName}Control.setInfo(info) // 개별총정보 다이얼로그에서 실행할 함수
, size : "xxl"
});
}
});
@ -328,11 +322,31 @@
/**************************************************************************
*
**************************************************************************/
// 초기 설정
// 저장 callback
${pageName}Control.onSave = (resp) => {
if (resp.saved)
${pageName}Control.load(1);
}
// 저장
${pageName}Control.save = (info) => {
if (!info) return;
ajax.post({
url : ${pageName}Control.urls.create
, data : info
, success : resp => ${pageName}Control.onSave(resp)
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 화면 초기값 셋팅
function initForm${pageName}() {
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-365).date);
$("#schDateFrom--${pageName}").datepicker("setDate", new Date());
$("#schDateTo--${pageName}").datepicker("setDate", new Date());
${pageName}Control.dataset.clear();
@ -340,6 +354,19 @@
// 이벤트
function setEvent${pageName}() {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input",function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0,4) + "-" + value.substring(4);
}
});
});
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
@ -400,7 +427,6 @@
if (!pageNumber) pageNumber = 1;
${pageName}Control.query = fnGetParams${pageName}(); // 검색조건
${pageName}Control.query.orderBy = "RE_REG_ID"; // 정렬
${pageName}Control.load(pageNumber);
}
@ -410,8 +436,8 @@
}
// 등록
function fnCreate${pageName}() {
// 저장
function fnSave${pageName}() {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 부과제외ID 가 없다면.. return
@ -423,19 +449,10 @@
bfrCrdnId : crdnId
};
ajax.post({
url : ${pageName}Control.urls.create
, data : params
// , success : resp => ${pageName}Control.onSave(resp)
});
}
// 삭제
function fnRemove${pageName}() {
dialog.alert({
content : "선택한 ${prefixName} 정보를 삭제하시겠습니까?"
dialog.alert({
content : "현재 정보를 ${prefixName} 하겠습니까?"
, onOK : () => {
${pageName}Control.remove();
${pageName}Control.save(params);
}
});
}
@ -463,7 +480,6 @@
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked", true);
fnResetAndChangeBiz${pageName}(defaultBizValue);
});
// #sourceURL=excl03010-main.jsp

@ -39,13 +39,14 @@
<link rel="stylesheet" href="<c:url value="/resources/3rd-party/jquery-ui/1.13.2/themes/redmond/jquery-ui.css"/>" />
<link rel="stylesheet" href="<c:url value="/resources/lib/fims/framework/datepicker/datepicker.css"/>" />
<link rel="stylesheet" href="<c:url value="/resources/lib/fims/biz/paintweb/style/style.css"/>?${ver}" />
</head>
<body>
<c:set var="pageKorName" scope="request">사진 편집</c:set>
<div>
<img id="photo" src="" />
</div>
<img id="editableImage" />
<div id="paintWebTarget"></div>
<script src="<c:url value="/resources/3rd-party/sneat/js/helpers.js"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js"/>"></script>
@ -60,23 +61,83 @@
<script src="<c:url value="/resources/3rd-party/jstree/jstree-support.js"/>"></script>
<script src="<c:url value='/resources/3rd-party/sneat/js/config.js'/>"></script>
<script src="<c:url value='/resources/3rd-party/sneat/libs/chartjs/chartjs.js'/>"></script>
<!-- json, xhtml -->
<script src="<c:url value='/resources/lib/fims/biz/paintweb/korean.js'/>?${ver}"></script>
<script src="<c:url value='/resources/lib/fims/biz/paintweb/paintweb-config.js'/>?${ver}"></script>
<script src="<c:url value='/resources/lib/fims/biz/paintweb/layout.js'/>?${ver}"></script>
<!-- init -->
<script src="<c:url value='/resources/lib/fims/biz/paintweb/pwlib.js'/>?${ver}"></script>
<script src="<c:url value='/resources/lib/fims/biz/paintweb/guiScript.js'/>?${ver}"></script>
<script src="<c:url value='/resources/lib/fims/biz/paintweb/paintweb.js'/>?${ver}"></script>
<script src="<c:url value='/resources/lib/fims/biz/paintweb/html2canvas.min.js'/>?${ver}"></script>
<script>
var openerPageName = "${openerPageName}";
//FIXME: pw instance 변수명 변경시 paintweb.js의 imageSaveTo() 내의 2564 line if(pw.image.modified) 변경 필요
var pw;
var originalInfomation = {};
var editableImage = null;
var isNumberPlate = false;
const initEditor = () => {
$(document).ready(function(){
pw = new PaintWeb();
pw.config.imageLoad = editableImage;
pw.config.guiPlaceholder = document.getElementById('paintWebTarget');
pw.config.imageSave = fnImageSaveTo;
pw.config.afterImageSave = fnAfterImageSave;
var fileInfo = [${fileInfo}];
pw.init();
};
if(fileInfo.length > 0){
var fileUrl = fileInfo[0].URL;
function fnImageSaveTo(file, imgWidth, imgHeight, doc, _self){
$("#photo").attr("src", "${pageContext.request.contextPath}" + "/" + fileUrl);
console.log(doc);
console.log(_self);
} else {
alert("사진 파일이 없습니다.");
}
if(isNumberPlate){
if(!confirm('번호판 이미지를 추가하시겠습니까?')) return;
}else{
if(!confirm('편집한 단속이미지를 저장하시겠습니까?')) return;
}
});
window.opener.pageObject[openerPageName].editPhotoCallback(file, originalInfomation, isNumberPlate);
return true;
};
function fnAfterImageSave(){
window.close();
};
$(document).ready(function(){
var fileInfo = [${fileInfo}];
if(fileInfo.length > 0){
originalInfomation = fileInfo[0];
var fileUrl = fileInfo[0].URL;
var fullSrc = "${pageContext.request.contextPath}" + "/" + fileUrl;
editableImage = document.getElementById('editableImage');
editableImage.src = fullSrc;
editableImage.onload = function () {
initEditor();
editableImage.style.display = 'none';
}
} else {
alert("사진 파일이 없습니다.");
}
});
</script>
</body>
</html>

@ -51,7 +51,7 @@
<!-- 데이트픽커 -->
<script src="<c:url value="/resources/lib/fims/framework/datepicker/datepicker.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/framework/cmm/initDatepicker.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/framework/cmm/initAfterPageLoad.js?${ver}"/>"></script>
<!-- 검색 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/searchUtil.js"/>?${ver}"></script>

@ -40,7 +40,7 @@
</label>
</div>
<button type="button" class="btn btn-outline-dark">
민원관리
종합민원관리
</button>
<button type="button" class="btn btn-outline-dark">
일정관리

@ -10973,6 +10973,10 @@ button.list-group-item-gray.active {
width: 75% !important;
}
.w-85 {
width: 85% !important;
}
.w-100 {
width: 100% !important;
}

@ -1,73 +1,73 @@
.svg-cctv-fixed:before {
--bs-origin : url("../../../../../resources/image/fims/framework/고정형cctv.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/고정형cctv.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/고정형cctv.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/고정형cctv.svg");
--bs-active : url("../../../../../file/modifySvg/고정형cctv.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/고정형cctv.svg?modify=alert");
}
.svg-cctv-drive:before {
--bs-origin : url("../../../../../resources/image/fims/framework/이동형cctv.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/이동형cctv.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/이동형cctv.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/이동형cctv.svg");
--bs-active : url("../../../../../file/modifySvg/이동형cctv.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/이동형cctv.svg?modify=alert");
}
.svg-crackdown-road:before {
--bs-origin : url("../../../../../resources/image/fims/framework/도보단속.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/도보단속.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/도보단속.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/도보단속.svg");
--bs-active : url("../../../../../file/modifySvg/도보단속.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/도보단속.svg?modify=alert");
}
.svg-crackdown-minwon:before {
--bs-origin : url("../../../../../resources/image/fims/framework/민원(즉시단속).svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/민원(즉시단속).svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/민원(즉시단속).svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/민원(즉시단속).svg");
--bs-active : url("../../../../../file/modifySvg/민원(즉시단속).svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/민원(즉시단속).svg?modify=alert");
}
.svg-target-lvy:before {
--bs-origin : url("../../../../../resources/image/fims/framework/등록대상.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/등록대상.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/등록대상.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/등록대상.svg");
--bs-active : url("../../../../../file/modifySvg/등록대상.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/등록대상.svg?modify=alert");
}
.svg-target-transfer:before {
--bs-origin : url("../../../../../resources/image/fims/framework/이첩대상.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/이첩대상.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/이첩대상.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/이첩대상.svg");
--bs-active : url("../../../../../file/modifySvg/이첩대상.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/이첩대상.svg?modify=alert");
}
.svg-sendstat-guide:before {
--bs-origin : url("../../../../../resources/image/fims/framework/계도장 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/계도장 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/계도장 발송현황.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/계도장 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/계도장 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/계도장 발송현황.svg?modify=alert");
}
.svg-sendstat-before:before {
--bs-origin : url("../../../../../resources/image/fims/framework/사전통보 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/사전통보 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/사전통보 발송현황.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/사전통보 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/사전통보 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/사전통보 발송현황.svg?modify=alert");
}
.svg-sendstat-nop:before {
--bs-origin : url("../../../../../resources/image/fims/framework/고지서 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/고지서 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/고지서 발송현황.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/고지서 발송현황.svg");
--bs-active : url("../../../../../file/modifySvg/고지서 발송현황.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/고지서 발송현황.svg?modify=alert");
}
.svg-opn-rcp:before {
--bs-origin : url("../../../../../resources/image/fims/framework/접수.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/접수.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/접수.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/접수.svg");
--bs-active : url("../../../../../file/modifySvg/접수.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/접수.svg?modify=alert");
}
.svg-opn-decision:before {
--bs-origin : url("../../../../../resources/image/fims/framework/수용_미수용.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/수용_미수용.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/수용_미수용.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/수용_미수용.svg");
--bs-active : url("../../../../../file/modifySvg/수용_미수용.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/수용_미수용.svg?modify=alert");
}
.svg-opn-selfdrop:before {
--bs-origin : url("../../../../../resources/image/fims/framework/자진취하.svg");
--bs-active : url("../../../../../file/modifySvg/fims/framework/자진취하.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/fims/framework/자진취하.svg?modify=alert");
--bs-origin : url("../../../../../file/modifySvg/자진취하.svg");
--bs-active : url("../../../../../file/modifySvg/자진취하.svg?modify=active");
--bs-alert : url("../../../../../file/modifySvg/자진취하.svg?modify=alert");
}
[class^=svg-]:before {

@ -262,3 +262,11 @@ function snakeToCamel(text){
}
return text;
}
/**
* 카멜 표기법을 케밥 표기법으로 변경한다.
* @return 치환된 문자열
*/
function camelToKebab(text){
return text.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
}

@ -15,3 +15,14 @@ function initDatepicker(elementId){
}
function initDetailSearchButton(elementId){
var executionArea = $("#"+elementId);
/*--------------------- 상세검색 버튼 제어 ---------------------*/
executionArea.find(".btn-open-detail").on("click", function() {
$(this).find('i').toggleClass('bx-chevron-down');
$(this).find('i').toggleClass('bx-chevron-up');
});
}

@ -0,0 +1,81 @@
/**
* 전달받은 이미지를 base64로 인코딩한다
* @param file - 이미지 파일 또는 이미지 URL
* @param maxWidth - 인코딩 시의 이미지 max width 사이즈
* @returns {Promise<any>}
*/
var readImage = () => {
let image = this.$refs.image.src
this.toBlob(image)
.then(res => {
console.log(res)
this.image = {
filename: res.name,
size: res.size,
type: res.type,
lastModified: res.lastModified
}
})
};
/**
* 이미지 url을 blob 파일로 변환하여 전달한다
* @param url
* @returns {Promise<any>}
*/
var toBlob = (url) => {
return new Promise((resolve, reject) => {
this.base64Encode(url)
.then(res => {
let byteString = atob(res.dataUrl)
let ab = new ArrayBuffer(byteString.length)
let ia = new Uint8Array(ab)
for (let i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i)
}
// write the array buffer to blob
let blob = new Blob([ab], {type: 'image/' + res.type})
let formData = new FormData()
formData.append('file', blob, res.name)
resolve(formData.get('file'))
})
})
};
/**
* 전달받은 이미지를 base64로 인코딩한다
*/
var base64Encode = (url) => {
const re = new RegExp('.(gif|jpg|jpeg|tiff|png|ico)$', 'i')
let name = (/[^(/|\\)]*$/).exec(url)[0]
let type = re.test(name) ? re.exec(name)[0].replace('.', '') : 'jpg'
return new Promise((resolve, reject) => {
let image = new Image()
image.onload = function (event) {
let canvas = document.createElement('canvas')
// draw canvas
canvas.width = image.naturalWidth
canvas.height = image.naturalHeight
canvas.getContext('2d').drawImage(image, 0, 0)
let dataUrl = canvas.toDataURL('image/' + type)
resolve({
name: name,
type: type,
dataUrl: dataUrl.split(',')[1]
})
}
image.onerror = function () {
let msg = `"${file}"을 로딩하는 데 오류가 발생하였습니다. 이미지 파일을 확인해주세요.`
alert(msg)
console.error(msg)
}
image.crossOrigin = 'anonymous';
image.src = url
})
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -35,6 +35,7 @@
* @param {PaintWeb} app Reference to the main paint application object.
*/
pwlib.extensions.colormixer = function (app) {
var _self = this,
config = app.config.colormixer,
doc = app.doc,

@ -1,363 +0,0 @@
/*
* Copyright (C) 2009 Mihai Şucan
*
* This file is part of PaintWeb.
*
* PaintWeb is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PaintWeb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PaintWeb. If not, see <http://www.gnu.org/licenses/>.
*
* $URL: http://code.google.com/p/paintweb $
* $Date: 2009-10-29 19:05:49 +0200 $
*/
/**
* @author <a lang="ro" href="http://www.robodesign.ro/mihai">Mihai Şucan</a>
* @fileOverview Holds the integration code for PaintWeb inside <a
* href="http://www.moodle.org">Moodle</a>.
*/
/**
* @class The Moodle extension for PaintWeb. This extension handles the Moodle
* integration inside the PaintWeb code.
*
* <p><strong>Note:</strong> This extension is supposed to work with Moodle 1.9
* and Moodle 2.0.
*
* @param {PaintWeb} app Reference to the main paint application object.
*/
pwlib.extensions.moodle = function (app) {
var _self = this,
appEvent = pwlib.appEvent,
config = app.config,
gui = app.gui,
lang = app.lang.moodle,
moodleServer = config.moodleServer,
tinymceEditor = null,
qfErrorShown = false;
// Holds information related to Moodle.
var moodleInfo = {
// Holds the URL of the image the user is saving.
imageURL: null,
// The class name for the element which holds the textarea buttons (toggle
// on/off).
// This element exists only in Moodle 1.9.
textareaButtons: 'textareaicons',
// The image save handler script on the server-side. The path is relative to
// the PaintWeb base folder.
// This used with Moodle 2.0.
imageSaveHandler20: '../ext/moodle/imagesave20.php',
// The image save handler script for Moodle 1.9.
imageSaveHandler19: '../ext/moodle/imagesave19.php',
// This holds the release version of Moodle being used. This should be 1.9
// or 2.0.
release: 0,
// Moodle 2.0 draft item ID used for file storage.
draftitemid: null
};
/**
* The <code>extensionRegister</code> event handler. Setup event listeners,
* determine Moodle version, and more.
*
* @returns {Boolean} True if the extension initialized successfully, or false
* if not.
*/
this.extensionRegister = function () {
// Register application events.
app.events.add('guiShow', this.guiShow);
app.events.add('guiHide', this.guiHide);
app.events.add('imageSave', this.imageSave);
if (moodleServer && moodleServer.release) {
var matches = moodleServer.release.match(/^\s*(\d+\.\d+)/);
if (matches && matches[1]) {
moodleInfo.release = parseFloat(matches[1]);
}
}
if (typeof window.qf_errorHandler === 'function' && config.tinymce &&
!config.tinymce.onSubmitUnsaved) {
config.tinymce.onSubmitUnsaved = this.onSubmitUnsaved;
}
return true;
};
/**
* The <code>submit</code> event handler for the form to which the PaintWeb
* instance is attached to. This method is invoked by the TinyMCE plugin when
* the form is submitted while the user edits an image with unsaved changes.
* @private
*/
this.onSubmitUnsaved = function () {
var tmce = config.tinymceEditor,
textarea = tmce ? tmce.getElement() : null,
guiPlaceholder = config.guiPlaceholder,
prevSibling = guiPlaceholder.previousSibling;
if (tmce && textarea && window.qf_errorHandler) {
try {
qf_errorHandler(textarea, "\n - " + lang.errorSubmitUnsaved);
} catch (err) {
return;
}
qfErrorShown = true;
// Due to the styling of the error shown by Moodle, PaintWeb must have
// clear:right.
if (prevSibling && prevSibling.className &&
prevSibling.className.indexOf('paintweb_tinymce_status') !== -1) {
prevSibling.style.clear = 'right';
} else {
guiPlaceholder.style.clear = 'right';
}
}
};
/**
* The <code>imageSave</code> application event handler. When the user
* attempts to save an image, this extension handles the event by sending the
* image data to the Moodle server, to perform the actual save operation.
*
* @private
* @param {pwlib.appEvent.imageSave} ev The application event object.
*/
this.imageSave = function (ev) {
if (!ev.dataURL) {
return;
}
ev.preventDefault();
moodleInfo.imageURL = config.imageLoad.src;
if (!moodleInfo.imageURL || moodleInfo.imageURL.substr(0, 5) === 'data:') {
moodleInfo.imageURL = '-';
}
if (config.moodleSaveMethod === 'dataURL') {
app.events.dispatch(new appEvent.imageSaveResult(true,
moodleInfo.imageURL, ev.dataURL));
} else {
var handlerURL = PaintWeb.baseFolder,
send = 'url=' + encodeURIComponent(moodleInfo.imageURL) +
'&dataURL=' + encodeURIComponent(ev.dataURL),
headers = {'Content-Type': 'application/x-www-form-urlencoded'};
// In Moodle 2.0 we include the context ID and the draft item ID, such
// that the image save script can properly save the new image inside the
// current draft area of the current textarea element.
if (moodleInfo.release >= 2) {
handlerURL += moodleInfo.imageSaveHandler20;
if (moodleServer.contextid) {
send += '&contextid=' + encodeURIComponent(moodleServer.contextid);
}
if (moodleInfo.draftitemid) {
send += '&draftitemid=' + encodeURIComponent(moodleInfo.draftitemid);
}
} else {
handlerURL += moodleInfo.imageSaveHandler19;
}
pwlib.xhrLoad(handlerURL, imageSaveReady, 'POST', send, headers);
}
};
/**
* The image save <code>onreadystatechange</code> event handler for the
* <code>XMLHttpRequest</code> which performs the image save. This function
* uses the reply to determine if the image save operation is successful or
* not.
*
* <p>The {@link pwlib.appEvent.imageSaveResult} application event is
* dispatched.
*
* <p>The server-side script must reply with a JSON object with the following
* properties:
*
* <ul>
* <li><var>successful</var> which tells if the image save operation was
* successful or not;
*
* <li><var>url</var> which must tell the same URL as the image we just
* saved (sanity/security check);
*
* <li><var>urlNew</var> is optional. This allows the server-side script to
* change the image URL;
*
* <li><var>errorMessage</var> is optional. When the image save was not
* successful, an error message can be displayed.
* </ul>
*
* @private
* @param {XMLHttpRequest} xhr The XMLHttpRequest object.
*/
function imageSaveReady (xhr) {
if (!xhr || xhr.readyState !== 4) {
return;
}
var result = {successful: false, url: moodleInfo.imageURL};
if ((xhr.status !== 304 && xhr.status !== 200) || !xhr.responseText) {
alert(lang.xhrRequestFailed);
app.events.dispatch(new appEvent.imageSaveResult(false, result.url, null,
lang.xhrRequestFailed));
return;
}
try {
result = JSON.parse(xhr.responseText);
} catch (err) {
result.errorMessage = lang.jsonParseFailed + "\n" + err;
alert(result.errorMessage);
}
if (result.successful) {
if (result.url !== moodleInfo.imageURL) {
alert(pwlib.strf(lang.urlMismatch, {
url: moodleInfo.imageURL,
urlServer: result.url || 'null'}));
}
} else {
if (result.errorMessage) {
alert(lang.imageSaveFailed + "\n" + result.errorMessage);
} else {
alert(lang.imageSaveFailed);
}
}
app.events.dispatch(new appEvent.imageSaveResult(result.successful,
result.url, result.urlNew, result.errorMessage));
};
/**
* The <code>guiShow</code> application event handler. When the PaintWeb GUI
* is shown, we must hide the textarea icons for the current textarea element,
* inside a Moodle page.
* @private
*/
this.guiShow = function () {
var pNode = config.guiPlaceholder.parentNode,
textareaButtons
= pNode.getElementsByClassName(moodleInfo.textareaButtons)[0];
// These show in Moodle 1.9.
if (textareaButtons) {
textareaButtons.style.display = 'none';
}
qfErrorShown = false;
// For Moodle 2.0 we must determine the draft item ID in order to properly
// perform the image save operation into the current draft area.
if (moodleInfo.release < 2) {
return;
}
// Typically the TinyMCE editor instance is attached to a textarea element
// which has a name=whatever[text] or similar form. In the same form as the
// textarea, there must be a hidden input element with the
// name=whatever[itemid]. The value of that input holds the draft item ID.
var tmce = config.tinymceEditor,
textarea = tmce ? tmce.getElement() : null,
frm = textarea ? textarea.form : null;
if (!tmce || !textarea || !textarea.name || !frm) {
return;
}
var fieldname = textarea.name.replace(/\[text\]$/, '');
if (!fieldname) {
return;
}
var draftitemid = frm.elements.namedItem(fieldname + '[itemid]'),
format = frm.elements.namedItem(fieldname + '[format]');
if (draftitemid) {
moodleInfo.draftitemid = draftitemid.value;
}
if (format) {
format.style.display = 'none';
}
};
/**
* The <code>guiHide</code> application event handler. When the PaintWeb GUI
* is hidden, we must show again the textarea icons for the current textarea
* element, inside a Moodle page.
* @private
*/
this.guiHide = function () {
var guiPlaceholder = config.guiPlaceholder,
prevSibling = guiPlaceholder.previousSibling;
pNode = guiPlaceholder.parentNode,
textareaButtons
= pNode.getElementsByClassName(moodleInfo.textareaButtons)[0];
// These show in Moodle 1.9.
if (textareaButtons) {
textareaButtons.style.display = '';
}
var tmce = config.tinymceEditor,
textarea = tmce ? tmce.getElement() : null,
frm = textarea ? textarea.form : null;
if (!tmce || !textarea || !textarea.name || !frm) {
return;
}
if (qfErrorShown) {
if (window.qf_errorHandler) {
qf_errorHandler(textarea, '');
}
if (prevSibling && prevSibling.className &&
prevSibling.className.indexOf('paintweb_tinymce_status') !== -1) {
prevSibling.style.clear = '';
} else {
guiPlaceholder.style.clear = '';
}
}
// The format input element only shows in Moodle 2.0.
if (moodleInfo.release >= 2) {
var fieldname = textarea.name.replace(/\[text\]$/, '');
if (!fieldname) {
return;
}
var format = frm.elements.namedItem(fieldname + '[format]');
if (format) {
format.style.display = '';
}
}
};
};
// vim:set spell spl=en fo=wan1croqlt tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix:

@ -32,6 +32,7 @@
* @param {PaintWeb} app Reference to the main paint application object.
*/
pwlib.extensions.mousekeys = function (app) {
var _self = this,
canvas = app.buffer.canvas,
config = app.config,

@ -872,10 +872,12 @@ pwlib.gui = function (app) {
var selCrop = this.commands.selectionCrop,
selFill = this.commands.selectionFill,
selForNumPlt = this.commands.selectionForNumberPlate,
selDelete = this.commands.selectionDelete;
selCrop.className += classDisabled;
selFill.className += classDisabled;
selForNumPlt.className += classDisabled;
selDelete.className += classDisabled;
return true;
@ -1000,6 +1002,9 @@ pwlib.gui = function (app) {
placeholder.focus();
} catch (err) { }
this.toolActivate("selection"); //영역 선택
app.events.dispatch(new appEvent.guiShow());
};
@ -1413,6 +1418,7 @@ pwlib.gui = function (app) {
button.type = "button";
button.classList.add('btn');
button.classList.add('blue');
button.classList.add('p-1');
button.appendChild(doc.createTextNode(button.title));
if (elem.firstChild) {

@ -1,451 +0,0 @@
/*
* Copyright (C) 2008, 2009 Mihai Şucan
*
* This file is part of PaintWeb.
*
* PaintWeb is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PaintWeb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PaintWeb. If not, see <http://www.gnu.org/licenses/>.
*
* $URL: http://code.google.com/p/paintweb $
* $Date: 2009-05-11 19:37:56 +0300 $
*/
/**
* @author <a lang="ro" href="http://www.robodesign.ro/mihai">Mihai Şucan</a>
* @fileOverview Minimal code used for aiding debugging PaintWeb.
*/
// Opera compatibility
if (!window.console) {
/**
* @namespace Holds a simple method used for debugging. Opera doesn't have the
* window.console API like Firefox+Firebug has.
*/
window.console = {};
}
if (!window.console.log) {
/**
* Display a message in the debugger. If available, opera.postError is used,
* otherwise no message is displayed.
*
* @param {mixed} mixed Any number of arguments, each one is displayed in the
* debugger.
*/
window.console.log = function () {
var msg = '';
for (var i = 0, n = arguments.length; i < n; i++) {
msg += arguments[i] + ' ';
}
if (window.opera && window.opera.postError) {
opera.postError(msg);
}
};
}
if (!window.console.warn) {
/**
* Display a message in the debugger. If available, opera.postError is used,
* otherwise no warning is displayed.
*
* @param {mixed} mixed Any number of arguments, each one is displayed in the
* debugger.
*/
window.console.warn = function () {
console.log.apply(null, arguments);
};
}
/**
* JavaScript code performance profiler.
* <p>Nested timers are accounted for - see the example below.
*
* @example
* <code>// To profile your code just do:
* var profiler = new $.profiler();
*
* profiler.start('long test');
* // ... more code ...
* profiler.start('function 1');
* // ... more code ...
* profiler.stop('function 1');
* // ... more code ...
* profiler.start('function 2');
* // ... more code ...
* profiler.stop('function 2');
* // ... more code ...
* profiler.stop('long test');
*
* // To see the results do:
* profiler.reportText();
* // or ..
* profiler.reportData();</code>
*
* @class JavaScript code performance profiler.
*/
var libProfiler = function () {
/**
* @ignore
* @class Function timer. This is the constructor used for instancing a single
* timer object created by the profiler.
*
* @private
* @param {String} name_ The timer name.
* @param {Boolean} [independent_=false] Tells if the timer is independent.
* Means this timer will not affect the timers execution stack.
*/
function fnTimer (name_, independent_) {
this.avgOwnTimePerCall = 0;
this.avgRunTimePerCall = 0;
this.calls = 0;
this.maxOwnTimePerCall = 0;
this.maxRunTimePerCall = 0;
this.minOwnTimePerCall = 0;
this.minRunTimePerCall = 0;
this.name = name_;
this.ownTimeTotal = 0;
this.runTimeTotal = 0;
this.state = fnTimer.STATE_NONE;
this.independent = independent_;
var startTime_ = 0,
subTimerStart_ = 0,
subTime_ = 0,
stack_ = 0;
/*
* Start timing function execution.
*/
this.start = function () {
if (this.state == fnTimer.STATE_START ||
this.state == fnTimer.STATE_SUB) {
stack_++;
return;
}
startTime_ = (new Date ()).getTime();
this.state = fnTimer.STATE_START;
};
/*
* Stop timing function execution.
*/
this.stop = function () {
if (this.state == fnTimer.STATE_SUB) {
this.subTimerEnd();
}
if (this.state != fnTimer.STATE_START) {
return;
}
this.calls++;
if (stack_) {
stack_--;
return;
}
var runTime = (new Date ()).getTime() - startTime_;
var ownTime = runTime - subTime_;
subTime_ = 0;
this.runTimeTotal += runTime;
this.ownTimeTotal += ownTime;
this.avgRunTimePerCall = this.runTimeTotal / this.calls;
this.avgOwnTimePerCall = this.ownTimeTotal / this.calls;
if (runTime < this.minRunTimePerCall) {
this.minRunTimePerCall = runTime;
}
if (runTime > this.maxRunTimePerCall) {
this.maxRunTimePerCall = runTime;
}
if (ownTime < this.minOwnTimePerCall) {
this.minOwnTimePerCall = ownTime;
}
if (ownTime > this.maxOwnTimePerCall) {
this.maxOwnTimePerCall = ownTime;
}
this.state = fnTimer.STATE_STOP;
};
/*
* Start timing sub-function execution. The sub-function execution timer is
* used for calculating the ownTime (runTime - sub-function execution time).
*/
this.subTimerStart = function () {
if (this.independent || this.state != fnTimer.STATE_START) {
return;
}
subTimerStart_ = (new Date()).getTime();
this.state = fnTimer.STATE_SUB;
};
/*
* Stop timing sub-function execution.
*/
this.subTimerEnd = function () {
if (this.independent || this.state != fnTimer.STATE_SUB) {
return;
}
subTime_ += (new Date()).getTime() - subTimerStart_;
this.state = fnTimer.STATE_START;
};
};
fnTimer.STATE_NONE = 0;
fnTimer.STATE_START = 1;
fnTimer.STATE_SUB = 2;
fnTimer.STATE_STOP = 3;
/**
* Holds the timer objects.
*/
this.timers = {};
var activeTimer_ = null,
timersStack_ = [];
/**
* Start/create a function timer.
*
* @param {String} name The timer name.
* @param {Boolean} [independent=false] Tells if the timer should be
* independent or not. This means that this new function timer is not be
* considered affecting the execution time of existing function timers in the
* call stack.
*/
this.start = function (name, independent) {
var timer = this.timers[name];
if (!timer) {
timer = this.timers[name] = new fnTimer(name, independent);
}
if (!timer.independent && activeTimer_ != name) {
var activeTimer = activeTimer_ ? this.timers[activeTimer_] : null;
if (activeTimer && activeTimer.state == fnTimer.STATE_START) {
timersStack_.push(activeTimer_);
activeTimer.subTimerStart();
}
activeTimer_ = name;
}
timer.start();
};
/**
* Stop a function timer.
*/
this.stop = function (name) {
var timer = this.timers[name];
if (!timer) {
return;
}
timer.stop();
if (timer.independent || name != activeTimer_ ||
name == activeTimer_ && timer.state == fnTimer.STATE_START) {
return;
}
if (timersStack_.length > 0) {
activeTimer_ = timersStack_.pop();
var activeTimer = this.timers[activeTimer_];
activeTimer.subTimerEnd();
} else {
activeTimer_ = null;
}
};
/**
* Generate timers report data.
*
* @returns {Object} Holds all the information gathered by the timers.
*/
this.reportData = function () {
var name, timer, timerDetails,
data = {
avgCallsPerTimer: 0,
avgOwnTimePerCall: 0,
avgOwnTimePerTimer: 0,
avgRunTimePerCall: 0,
avgRunTimePerTimer: 0,
callsTotal: 0,
maxCallsPerTimer: 0,
maxCallsPerTimerName: '',
maxOwnTimePerCall: 0,
maxOwnTimePerCallName: '',
maxRunTimePerCall: 0,
maxRunTimePerCallName: '',
minCallsPerTimer: 0,
minCallsPerTimerName: '',
minOwnTimePerCall: 0,
minOwnTimePerCallName: '',
minRunTimePerCall: 0,
minRunTimePerCallName: '',
ownTimeTotal: 0,
runTimeTotal: 0,
timers: 0,
timerDetails: []
};
for (name in this.timers) {
timer = this.timers[name];
if (timer.state != fnTimer.STATE_STOP) {
continue;
}
timerDetails = {
name: name,
avgOwnTimePerCall: timer.avgOwnTimePerCall,
avgRunTimePerCall: timer.avgRunTimePerCall,
calls: timer.calls,
maxOwnTimePerCall: timer.maxOwnTimePerCall,
maxRunTimePerCall: timer.maxRunTimePerCall,
minOwnTimePerCall: timer.minOwnTimePerCall,
minRunTimePerCall: timer.minRunTimePerCall,
runTimeTotal: timer.runTimeTotal,
ownTimeTotal: timer.ownTimeTotal
};
data.timerDetails.push(timerDetails);
if (timer.calls > data.maxCallsPerTimer || !data.timers) {
data.maxCallsPerTimer = timer.calls;
data.maxCallsPerTimerName = name;
}
if (timer.maxOwnTimePerCall > data.maxOwnTimePerCall || !data.timers) {
data.maxOwnTimePerCall = timer.maxOwnTimePerCall;
data.maxOwnTimePerCallName = name;
}
if (timer.maxRunTimePerCall > data.maxRunTimePerCall || !data.timers) {
data.maxRunTimePerCall = timer.maxRunTimePerCall;
data.maxRunTimePerCallName = name;
}
if (timer.calls < data.minCallsPerTimer || !data.timers) {
data.minCallsPerTimer = timer.calls;
data.minCallsPerTimerName = name;
}
if (timer.minOwnTimePerCall < data.minOwnTimePerCall || !data.timers) {
data.minOwnTimePerCall = timer.minOwnTimePerCall;
data.minOwnTimePerCallName = name;
}
if (timer.minRunTimePerCall < data.minRunTimePerCall || !data.timers) {
data.minRunTimePerCall = timer.minRunTimePerCall;
data.minRunTimePerCallName = name;
}
data.runTimeTotal += timer.runTimeTotal;
data.ownTimeTotal += timer.ownTimeTotal;
data.callsTotal += timer.calls;
data.timers++;
}
if (data.timers == 0) {
return data;
}
data.avgCallsPerTimer = data.callsTotal / data.timers;
data.avgOwnTimePerCall = data.ownTimeTotal / data.callsTotal;
data.avgOwnTimePerTimer = data.ownTimeTotal / data.timers;
data.avgRunTimePerCall = data.runTimeTotal / data.callsTotal;
data.avgRunTimePerTimer = data.runTimeTotal / data.timers;
return data;
};
/**
* Generate a report in text format.
*
* @returns {String} All the information gathered by the timers, as text.
*/
this.reportText = function () {
var data = this.reportData(),
timer, result = '';
if (!data.timers) {
return '';
}
for (var i = 0; i < data.timers; i++) {
timer = data.timerDetails[i];
result += timer.name + ":\n" +
' Avg ownTime / call: ' + timer.avgOwnTimePerCall + " ms\n" +
' Avg runTime / call: ' + timer.avgRunTimePerCall + " ms\n" +
' Calls: ' + timer.calls + "\n"+
' Max ownTime / call: ' + timer.maxOwnTimePerCall + " ms\n" +
' Max runTime / call: ' + timer.maxRunTimePerCall + " ms\n" +
' Min ownTime / call: ' + timer.minOwnTimePerCall + " ms\n" +
' Min runTime / call: ' + timer.minRunTimePerCall + " ms\n" +
' runTime: ' + timer.runTimeTotal + " ms\n" +
' ownTime: ' + timer.ownTimeTotal + " ms\n\n";
}
result += "Overview info:\n" +
' Avg calls / timer: ' + data.avgCallsPerTimer + "\n" +
' Avg ownTime / call: ' + data.avgOwnTimePerCall + " ms\n" +
' Avg ownTime / timer: ' + data.avgOwnTimePerTimer + " ms\n" +
' Avg runTime / call: ' + data.avgRunTimePerCall + " ms\n" +
' Avg runTime / timer: ' + data.avgRunTimePerTimer + " ms\n" +
' Calls total: ' + data.callsTotal + "\n" +
' Max calls / timer: ' + data.maxCallsPerTimer + ' (' +
data.maxCallsPerTimerName + ")\n" +
' Max ownTime / call: ' + data.maxOwnTimePerCall + ' ms (' +
data.maxOwnTimePerCallName + ")\n" +
' Max runTime / call: ' + data.maxRunTimePerCall + ' ms (' +
data.maxRunTimePerCallName + ")\n" +
' Min calls / timer: ' + data.minCallsPerTimer + ' (' +
data.minCallsPerTimerName + ")\n" +
' Min ownTime / call: ' + data.minOwnTimePerCall + ' ms (' +
data.minOwnTimePerCallName + ")\n" +
' Min runTime / call: ' + data.minRunTimePerCall + ' ms (' +
data.minRunTimePerCallName + ")\n" +
' Accumulated ownTime: ' + data.ownTimeTotal + " ms\n" +
' Accumulated runTime: ' + data.runTimeTotal + " ms\n" +
' Timers: ' + data.timers;
return result;
};
/**
* Reset/clear all the timers.
*/
this.reset = function () {
this.timers = {};
activeTimer_ = null;
timersStack_ = [];
};
};
// vim:set spell spl=en fo=wan1croqlt tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix:

@ -1,478 +0,0 @@
/*
http://www.JSON.org/json2.js
2009-04-16
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or '&nbsp;'),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the object holding the key.
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
*/
/*jslint evil: true */
/*global JSON */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
if (!this.JSON) {
JSON = {};
}
(function () {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ?
'"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' :
'"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' :
gap ? '[\n' + gap +
partial.join(',\n' + gap) + '\n' +
mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
k = rep[i];
if (typeof k === 'string') {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' :
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
}());

@ -1,4 +1,4 @@
{
let lang_ko = {
// $Date: 2009-11-16 18:13:48 +0200 $
"errorInitBufferCanvas": "Error: adding the new buffer canvas element failed.",
@ -111,11 +111,14 @@
"imageRotate": "이미지 회전",
"imageBright": "밝게",
"imageDark": "어둡게",
"selectionCrop": "자르기",
"selectionFill": "가림막",
"selectionForNumberPlate": "번호판",
"selectionCopy": "선택영역 복사",
"selectionCrop": "선택영역만 자르기",
"selectionCut": "선택영역 잘라내기",
"selectionDelete": "선택영역 삭제",
"selectionFill": "선택영역 채우기"
"selectionDelete": "선택영역 삭제"
},
"inputs": {
@ -265,4 +268,4 @@
}
// vim:set spell spl=en fo=wan1croql tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix ft=javascript:
}
};

@ -1,268 +0,0 @@
{
// $Date: 2009-11-16 18:13:48 +0200 $
"errorInitBufferCanvas": "Error: adding the new buffer canvas element failed.",
"errorInitContext": "Error while initializing the canvas context.",
"errorElementNotFound": "Error: the following element was not found: {id}.",
"noComputedStyle": "Error: window.getComputedStyle is not available.",
"noXMLHttpRequest": "Error: window.XMLHttpRequest is not available.",
"errorInitCanvas": "Error: Canvas initialization failed.",
"noCanvasSupport": "Error: Your browser does not support Canvas.",
"failedConfigLoad": "Error: Failed loading the configuration.",
"failedLangLoad": "Error: Failed loading the language file.",
"failedMarkupLoad": "Error: Failed loading the interface markup file.",
"errorInitCommands": "Error: failed to initialize the PaintWeb commands!",
"noToolConfigured": "Error: you have no drawing tool configured to load!",
"imageLoadDifferentHost": "Warning: the configured image cannot be loaded because it is from a different domain.",
"toolRegisterFailed": "Error: failed to register tool '{id}'!",
"extensionRegisterFailed": "Error: failed to register extension '{id}'!",
"errorToolActivate": "Error: the tool you want could not be properly activated!",
"errorInitGUI": "Error: the interface failed to initialize!",
"failedSelectionCopy": "Error: failed to copy the selected pixels into memory.",
"noMainTabPanel": "Error: the interface layout has no tabbed panel with ID = main.",
"guiMarkupImportFailed": "Error: the interface markup code could not be imported into the main document.",
"guiMarkupParseFailed": "Error: the interface markup code could not be properly parsed.",
"missingViewport": "Error: the interface markup does not have the image viewport element.",
"missingViewportResizer": "Error: the interface markup does not have the image viewport resize handle.",
"missingCanvasResizer": "Error: the interface markup does not have the Canvas resize handle.",
"missingCanvasContainer": "Error: the interface markup does not have the Canvas container.",
"errorCpickerUnsupported": "Error: your browser does not implement the get/putImageData methods! The color picker tool cannot be used.",
"errorCbucketUnsupported": "Error: your browser does not implement the get/putImageData methods! The color bucket tool cannot be used.",
"errorClipboardUnsupported": "Error: your browser does not support get/putImageData! Clipboard operations like cut/copy/paste cannot be used.",
"errorTextUnsupported": "Error: your browser does not implement the Canvas Text API! The text tool cannot be used.",
"errorInsertimg": "The image could not be inserted. Maybe the address does not point to an image.",
"errorInsertimgHost": "The URL you provided points to a different host. The image cannot be added for security reasons.",
"errorInsertimgNotLoaded": "The image did not load yet, or the URL you provided does not point to an image.",
"promptInsertimg": "Type the address of the image you want to insert:",
"promptImageDimensions": "Please input the new image dimensions you want.",
"promptTextFont": "Type the name of the font you want:",
"errorImageSave": "The image cannot be saved!",
"guiCanvasResizer": "Resize the image canvas.",
"guiViewportResizer": "Resize the image viewport.",
"imageZoomTitle": "Zoom image (Use Up/Down Arrow key)",
"imageZoomLabel": "Zoom:",
"tabs": {
"main": {
"bcurve": "Bézier curve",
"ellipse": "Ellipse",
"eraser": "Eraser",
"line": "Line",
"main": "Main",
"pencil": "Pencil",
"polygon": "Polygon",
"rectangle": "Rectangle",
"selection": "Selection",
"shadow": "Shadow",
"text": "Text",
"textBorder": "Border"
},
"colormixer_inputs": {
"rgb": "RGB",
"rgbTitle": "sRGB: Standard Red, Green and Blue",
"hsv": "HSV",
"hsvTitle": "Hue, Saturation and Value",
"lab": "Lab",
"labTitle": "CIE Lab: Standard observer 2° D65",
"cmyk": "CMYK",
"cmykTitle": "Cyan, Magenta, Yellow and Key (Black)"
},
"colormixer_selector": {
"mixer": "Mixer",
"mixerTitle": "Color space visualisation",
"cpalettes": "Palettes",
"cpalettesTitle": "Predefined color palettes"
}
},
"floatingPanelMinimize": "Minimize",
"floatingPanelRestore": "Restore",
"floatingPanelClose": "Close",
"floatingPanels": {
"about": "About PaintWeb",
"colormixer": "Color mixer"
},
"tools": {
"cbucket": "Color bucket",
"cpicker": "Color picker",
"bcurve": "Bézier curve",
"hand": "Viewport drag",
"ellipse": "Ellipse",
"eraser": "Eraser",
"insertimg": "Insert image",
"line": "Line",
"pencil": "Pencil",
"polygon": "Polygon",
"rectangle": "Rectangle",
"selection": "Rectangle selection",
"text": "Text",
"textUnsupported": "The text tool is not supported by your browser."
},
"commands": {
"about": "About PaintWeb",
"clipboardPaste": "Paste clipboard",
"historyRedo": "Redo",
"historyUndo": "Undo",
"imageClear": "Clear image",
"imageSave": "Save image",
"imageRotate": "Rotate image",
"imageBright": "brighten image",
"imageDark": "darken image",
"selectionCopy": "Copy selection",
"selectionCrop": "Crop selection",
"selectionCut": "Cut selection",
"selectionDelete": "Delete selection",
"selectionFill": "Fill the selection"
},
"inputs": {
"line": {
"lineCap": "Line cap",
"lineCap_butt": "Butt",
"lineCap_round": "Round",
"lineCap_square": "Square",
"lineJoin": "Line join",
"lineJoin_bevel": "Bevel",
"lineJoin_miter": "Miter",
"lineJoin_round": "Round",
"lineWidth": "Line width:",
"miterLimit": "Miter limit:"
},
"shadow": {
"enable": "Enable shadows",
"enableTitle": "If checked, a shadow will render after each drawing operation you do.",
"shadowBlur": "Blur:",
"shadowOffsetX": "Distance X:",
"shadowOffsetY": "Distance Y:",
"shadowColor": "Color: ",
"shadowColorTitle": "Shadow color"
},
"selection": {
"transform": "Image manipulation",
"transformTitle": "If checked, the selected pixels will also be dragged/resized when you make changes to the selection. If unchecked, only the selection marquee will be dragged/resized - pixels will remain unaffected by any such changes.",
"transparent": "Transparent selection",
"transparentTitle": "If checked, the background will remain transparent. If unchecked, the background will be filled with the current fill color."
},
"text": {
"bold": "Bold",
"italic": "Italic",
"fontFamily": "Font family:",
"fontFamily_add": "Another font...",
"fontSize": "Font size:",
"textAlign": "Text alignment",
"left": "Left",
"center": "Center",
"right": "Right",
"textString_value": "Hello world!"
},
"shapeType": "Shape type",
"shapeType_both": "Both",
"shapeType_fill": "Fill",
"shapeType_stroke": "Stroke",
"pencilSize": "Pencil size:",
"eraserSize": "Eraser size:",
"borderWidth": "Border width:",
"fillStyle": "Fill ",
"fillStyleTitle": "Fill color",
"strokeStyle": "Stroke ",
"strokeStyleTitle": "Stroke color",
"colorInputAnchorContent": "Click to pick color"
},
"colormixer": {
"failedColorPaletteLoad": "Error: failed to load the color palette.",
"colorPalettes": {
"_saved": "Saved colors",
"anpa": "ANPA",
"dic": "DIC Color Guide",
"macos": "Mac OS",
"pantone-solid-coated": "PANTONE solid coated",
"toyo94": "TOYO 94 color finder",
"trumatch": "TRUMATCH colors",
"web": "Web safe",
"windows": "Windows"
},
"inputs": {
"hex": "Hex",
"alpha": "Alpha",
"hsv_hue": "Hue",
"hsv_sat": "Saturation",
"hsv_val": "Value",
"rgb_red": "Red",
"rgb_green": "Green",
"rgb_blue": "Blue",
"lab_cie_l": "Lightness",
"lab_cie_a": "a*",
"lab_cie_b": "b*",
"cmyk_cyan": "Cyan",
"cmyk_magenta": "Magenta",
"cmyk_yellow": "Yellow",
"cmyk_black": "Key / Black"
},
"buttons": {
"accept": "Accept",
"cancel": "Cancel",
"saveColor": "Save color",
"pickColor": "Pick color"
}
},
"status": {
"cbucketActive": "Click to start flood filling with the current fill color. Right click to use the stroke color for filling.",
"cpickerNormal": "Click to change the fill color, or Shift+Click to change the stroke color.",
"cpicker_fillStyle": "Click to pick the fill color.",
"cpicker_strokeStyle": "Click to pick the stroke color.",
"cpicker_shadow_shadowColor": "Click to pick the shadow color.",
"bcurveActive": "Click to start drawing the curve. You need four points: start, end and two control points.",
"bcurveControlPoint1": "Click to draw the first control point.",
"bcurveControlPoint2": "Click to draw the second control point. This will also end the drawing operation.",
"bcurveSnapping": "Hold the Shift key down for vertical/horizontal snapping.",
"handActive": "Click and drag the image to scroll.",
"ellipseActive": "Click and drag to draw an ellipse.",
"ellipseMousedown": "Hold the Shift key down to draw a circle.",
"eraserActive": "Click and drag to erase.",
"insertimgActive": "Waiting for the image to load...",
"insertimgLoaded": "Pick where you want to place the image. Click and drag to resize the image.",
"insertimgResize": "Hold the Shift key down to preserve the aspect ratio.",
"lineActive": "Click anywhere to start drawing a line.",
"lineMousedown": "Hold the Shift key down for vertical/horizontal snapping.",
"pencilActive": "Click and drag to draw.",
"polygonActive": "Click anywhere to start drawing a polygon.",
"polygonAddPoint": "Click to add another point to the polygon.",
"polygonEnd": "To end drawing the polygon simply click in the same place as the last point.",
"polygonMousedown": "Hold the Shift key down for vertical/horizontal snapping.",
"rectangleActive": "Click and drag to draw a rectangle.",
"rectangleMousedown": "Hold the Shift key down to draw a square.",
"selectionActive": "Click and drag to draw a selection.",
"selectionAvailable": "Drag or resize the selection. Hold the Control key down to toggle the transformation mode.",
"selectionDrag": "Hold the Shift key down for vertical/horizontal snapping.",
"selectionDraw": "Hold the Shift key down to draw a square selection.",
"selectionResize": "Hold the Shift key down to preserve the aspect ratio.",
"textActive": "Pick where you want to place the text. Make sure you adjust the properties as desired.",
"guiCanvasResizerActive": "Move the mouse to resize the image canvas."
},
// Moodle-related language strings
"moodle": {
"xhrRequestFailed": "The image save request failed.",
"jsonParseFailed": "Parsing the JSON result from the server failed!",
"imageSaveFailed": "The image save operation failed.",
"urlMismatch": "Image address mismatch!\nThe current image is {url}.\nThe server replied a successful save for {urlServer}.",
"errorSubmitUnsaved": "This image is not saved!"
},
"moodleServer": {
"permissionDenied": "Permission denied.",
"saveEmptyDataUrl": "Your request has no data URL.",
"proxyNotFound": "Could not find the PaintWeb image file proxy script.",
"malformedDataUrl": "The data URL is malformed.",
"failedMkdir": "Failed to create the PaintWeb images folder inside the Moodle data folder.",
"saveFailed": "Saving the image failed.",
"backingupImages": "Backing-up images saved with PaintWeb...",
"backupFailed": "An error occurred while copying images saved by PaintWeb."
}
// vim:set spell spl=en fo=wan1croql tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix ft=javascript:
}

@ -1,4 +1,4 @@
<div xmlns="http://www.w3.org/1999/xhtml">
let xhtml = `<div xmlns="http://www.w3.org/1999/xhtml">
<!-- $Date: 2009-11-08 13:19:52 +0200 $ -->
<h1 class="paintweb_appTitle">PaintWeb</h1>
@ -27,18 +27,20 @@
<li class="paintweb_toolSeparator">&#160;</li>
<li data-pwTool="selection">Selection</li>
<li data-pwTool="selection" hidden>영역 선택</li>
<!--<li data-pwTool="hand">Hand</li>-->
<li data-pwTool="rectangle">Rectangle</li>
<!-- <li data-pwTool="rectangle">Rectangle</li> -->
<li class="paintweb_toolSeparator">&#160;</li>
<!--<li data-pwCommand="selectionCut">Cut selection</li>-->
<!--<li data-pwCommand="selectionCopy">Copy selection</li>-->
<li data-pwCommand="selectionCrop">자르기</li>
<li data-pwCommand="selectionFill">가림막</li>
<li data-pwCommand="selectionForNumberPlate">번호판</li>
<!-- <li data-pwCommand="selectionCopy">선택영역 복사</li> -->
<!--<li data-pwCommand="clipboardPaste">Clipboard paste</li>-->
<li data-pwCommand="selectionCrop">Crop selection</li>
<li data-pwCommand="selectionFill">Fill selection</li>
<!--<li data-pwTool="insertimg">Insert image</li>-->
<!--
<li class="paintweb_strokeFillStyles">
<p class="paintweb_opt_fillStyle">Fill
<span data-pwColorInput="fillStyle">&#160;</span>
@ -47,7 +49,7 @@
<span data-pwColorInput="strokeStyle">&#160;</span>
</p>
</li>
-->
<li class="paintweb_toolSeparator">&#160;</li>
<li data-pwCommand="imageRotate">Rotate image</li>
@ -72,7 +74,7 @@
<!--<li data-pwTool="pencil">Pencil</li>-->
<!--<li data-pwTool="eraser">Eraser</li>-->
<li data-pwCommand="imageClear">Clear image</li>
<!-- <li data-pwCommand="imageClear">Clear image</li> -->
<li data-pwCommand="imageSave">Save image</li>
</ul>
@ -152,9 +154,7 @@
<p data-pwId="selTab_selectionCopy">Copy selection</p>
<p data-pwId="selTab_clipboardPaste">Clipboard paste</p>
<p data-pwCommand="selectionCrop">Crop selection</p>
<p data-pwCommand="selectionDelete">Delete selection</p>
<p data-pwCommand="selectionFill">Fill selection</p>
<p class="paintweb_opt_selectionTransparent">
<label><input data-pwConfig="selection.transparent" type="checkbox"
@ -408,4 +408,4 @@
</div>
<!-- vim:set spell spl=en fo=tcroqwanl1 tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix: -->
</div>
</div>`;

@ -1,4 +1,4 @@
{
let paintweb_config = {
// $Date: 2009-11-08 19:54:46 +0200 $
"languages": {
@ -7,14 +7,6 @@
"lang": "ko",
"langFolder": "lang",
/*
The graphical user interface you want to use.
@type String
@default "default"
*/
"gui": "default",
/**
* The folder contains all the interfaces.
@ -24,29 +16,6 @@
*/
"interfacesFolder": "interfaces",
/**
* The interface markup file. The file must be an XHTML valid document.
*
* @type String
* @default "layout.xhtml"
*/
"guiMarkup": "layout.xhtml",
/**
* The interface style file.
*
* @type String
* @default "style.css"
*/
"guiStyle": "style.css",
/**
* The interface script file.
*
* @type String
* @default script.js
*/
"guiScript": "script.js",
/**
* The image viewport width. Make sure the value is a CSS length, like "50%",
@ -69,7 +38,7 @@
* @default "400px"
* 672px
*/
"viewportHeight": "82%",
"viewportHeight": "100%",
/**
* Image save quality for the JPEG format.
@ -77,7 +46,7 @@
* @type Number
* @default 0.9
*/
"jpegSaveQuality": 0.9,
"jpegSaveQuality": 1.0,
/**
* The default image width.
@ -119,7 +88,7 @@
* @type CSS3Color-rgba functional notation
* @default "rgba(0,0,0,1)"
*/
"fillStyle": "rgba(0,0,255,1)",
"fillStyle": "rgba(255,255,255,1)",
/**
* Default stroke style.
@ -214,7 +183,7 @@
*/
/*FIXME: 항목수정*/
/*"tools": ["bcurve", "cbucket", "cpicker", "ellipse", "eraser", "hand", "insertimg", "line", "pencil", "polygon", "rectangle", "selection", "text"],*/
"tools": ["rectangle", "selection"],
"tools": ["selection"],
/**
@ -612,33 +581,34 @@
"Control Y": { "command": "historyRedo" },
"Control N": { "command": "imageClear" },
"Control S": { "command": "imageSave" },
"Control A": { "command": "selectAll" },
"Control X": { "command": "selectionCut" },
"Shift Delete": { "command": "selectionCut" },
//"Control A": { "command": "selectAll" },
//"Control X": { "command": "selectionCut" },
//"Shift Delete": { "command": "selectionCut" },
"Control C": { "command": "selectionCopy" },
"Control V": { "command": "clipboardPaste" },
"Control S": { "command": "imageSave" }
// Use "toolActivate": "id" to activate the tool with the given ID.
"C": { "toolActivate": "cpicker" },
"E": { "toolActivate": "ellipse" },
"F": { "toolActivate": "cbucket" },
"G": { "toolActivate": "polygon" },
"H": { "toolActivate": "hand" },
"I": { "toolActivate": "insertimg" },
"L": { "toolActivate": "line" },
"O": { "toolActivate": "eraser" },
"P": { "toolActivate": "pencil" },
"R": { "toolActivate": "rectangle" },
"S": { "toolActivate": "selection" },
"T": { "toolActivate": "text" },
"V": { "toolActivate": "bcurve" },
//"C": { "toolActivate": "cpicker" },
//"E": { "toolActivate": "ellipse" },
//"F": { "toolActivate": "cbucket" },
//"G": { "toolActivate": "polygon" },
//"H": { "toolActivate": "hand" },
//"I": { "toolActivate": "insertimg" },
//"L": { "toolActivate": "line" },
//"O": { "toolActivate": "eraser" },
//"P": { "toolActivate": "pencil" },
//"R": { "toolActivate": "rectangle" },
//"S": { "toolActivate": "selection" },
//"T": { "toolActivate": "text" },
//"V": { "toolActivate": "bcurve" },
// Miscellaneous commands.
"X": { "command": "swapFillStroke" },
"F1": { "command": "about" }
// "X": { "command": "swapFillStroke" },
//"F1": { "command": "about" }
}
// vim:set spell spl=en fo=wan1croql tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix ft=javascript:
}
};

@ -503,34 +503,6 @@ function PaintWeb (win, doc) {
temp_.onInit = handler;
// Check Canvas support.
if (!doc.createElement('canvas').getContext) {
this.initError(lang.noCanvasSupport);
return false;
}
// Basic functionality used within the Web application.
if (!window.getComputedStyle) {
try {
if (!win.getComputedStyle(doc.createElement('div'), null)) {
this.initError(lang.noComputedStyle);
return false;
}
} catch (err) {
this.initError(lang.noComputedStyle);
return false;
}
}
if (!window.XMLHttpRequest) {
this.initError(lang.noXMLHttpRequest);
return false;
}
if (!this.config.configFile) {
this.initError(lang.noConfigFile);
return false;
}
if (typeof this.config.guiPlaceholder !== 'object' ||
this.config.guiPlaceholder.nodeType !== this.ELEMENT_NODE) {
@ -545,42 +517,36 @@ function PaintWeb (win, doc) {
}
// JSON parser and serializer.
if (!window.JSON) {
this.scriptLoad(PaintWeb.baseFolder + 'includes/json2.js',
this.jsonlibReady);
} else {
this.jsonlibReady();
pwlib = window.pwlib;
appEvent = pwlib.appEvent;
// Create the custom application events object.
_self.events = new pwlib.appEvents(_self);
pwlib.extend(_self.config, paintweb_config);
pwlib.extend(_self.lang, lang_ko);
if (!(_self.initCanvas() && _self.initContext())) {
_self.initError(lang.errorInitCanvas);
return;
}
return true;
};
/**
* The <code>load</code> event handler for the JSON library script.
* @private
*/
this.jsonlibReady = function () {
if (window.pwlib) {
_self.pwlibReady();
} else {
_self.scriptLoad(PaintWeb.baseFolder + 'includes/lib.js',
_self.pwlibReady);
_self.gui = new pwlib.gui(_self);
if (!_self.gui.init(xhtml)) {
_self.initError(lang.errorInitGUI);
return;
}
};
/**
* The <code>load</code> event handler for the PaintWeb library script.
* @private
*/
this.pwlibReady = function () {
pwlib = window.pwlib;
appEvent = pwlib.appEvent;
_self.initTools();
// Create the custom application events object.
_self.events = new pwlib.appEvents(_self);
_self.configLoad();
return true;
};
/**
* Report an initialization error.
*
@ -627,115 +593,12 @@ function PaintWeb (win, doc) {
}
};
/**
* Asynchronously load the configuration file. This method issues an
* XMLHttpRequest to load the JSON file.
*
* @private
*
* @see PaintWeb.config.configFile The configuration file.
* @see pwlib.xhrLoad The library function being used for creating the
* XMLHttpRequest object.
*/
this.configLoad = function () {
pwlib.xhrLoad(PaintWeb.baseFolder + this.config.configFile,
this.configReady);
};
/**
* The configuration reader. This is the event handler for the XMLHttpRequest
* object, for the <code>onreadystatechange</code> event.
*
* @private
*
* @param {XMLHttpRequest} xhr The XMLHttpRequest object being handled.
*
* @see PaintWeb#configLoad The method which issues the XMLHttpRequest request
* for loading the configuration file.
*/
this.configReady = function (xhr) {
/*
* readyState values:
* 0 UNINITIALIZED open() has not been called yet.
* 1 LOADING send() has not been called yet.
* 2 LOADED send() has been called, headers and status are available.
* 3 INTERACTIVE Downloading, responseText holds the partial data.
* 4 COMPLETED Finished with all operations.
*/
if (!xhr || xhr.readyState !== 4) {
return;
}
if ((xhr.status !== 304 && xhr.status !== 200) || !xhr.responseText) {
_self.initError(lang.failedConfigLoad);
return;
}
var config = pwlib.jsonParse(xhr.responseText);
pwlib.extend(_self.config, config);
_self.langLoad();
};
/**
* Asynchronously load the language file. This method issues an XMLHttpRequest
* to load the JSON file.
*
* @private
*
* @see PaintWeb.config.lang The language you want for the PaintWeb user
* interface.
* @see pwlib.xhrLoad The library function being used for creating the
* XMLHttpRequest object.
*/
this.langLoad = function () {
var id = this.config.lang,
file = PaintWeb.baseFolder;
// If the language is not available, always fallback to English.
if (!(id in this.config.languages)) {
id = this.config.lang = 'en';
}
if ('file' in this.config.languages[id]) {
file += this.config.languages[id].file;
} else {
file += this.config.langFolder + '/' + id + '.json';
}
pwlib.xhrLoad(file, this.langReady);
};
/**
* The language file reader. This is the event handler for the XMLHttpRequest
* object, for the <code>onreadystatechange</code> event.
*
* @private
*
* @param {XMLHttpRequest} xhr The XMLHttpRequest object being handled.
*
* @see PaintWeb#langLoad The method which issues the XMLHttpRequest request
* for loading the language file.
*/
this.langReady = function (xhr) {
if (!xhr || xhr.readyState !== 4) {
return;
}
if ((xhr.status !== 304 && xhr.status !== 200) || !xhr.responseText) {
_self.initError(lang.failedLangLoad);
return;
}
pwlib.extend(_self.lang, pwlib.jsonParse(xhr.responseText));
if (_self.initCanvas() && _self.initContext()) {
// Start GUI load now.
_self.guiLoad();
} else {
_self.initError(lang.errorInitCanvas);
}
};
/**
* Initialize the PaintWeb commands.
@ -747,21 +610,24 @@ function PaintWeb (win, doc) {
this.initCommands = function () {
if (this.commandRegister('historyUndo', this.historyUndo) &&
this.commandRegister('historyRedo', this.historyRedo) &&
this.commandRegister('selectAll', this.selectAll) &&
this.commandRegister('selectionCrop', this.selectionCrop) &&
this.commandRegister('selectionCrop', this.selectionCrop) &&
this.commandRegister('selectionFill', this.selectionFill) &&
//this.commandRegister('selectionCut', this.selectionCut) &&
//this.commandRegister('selectionCopy', this.selectionCopy) &&
//this.commandRegister('clipboardPaste', this.clipboardPaste) &&
this.commandRegister('imageSave', this.imageSave) &&
this.commandRegister('imageRotate', this.imageRotate) &&
this.commandRegister('selectionForNumberPlate', this.selectionForNumberPlate) &&
this.commandRegister('imageRotate', this.imageRotate) &&
this.commandRegister('imageBright', this.imageBright) &&
this.commandRegister('imageDark', this.imageDark) &&
this.commandRegister('imageClear', this.imageClear) &&
this.commandRegister('swapFillStroke', this.swapFillStroke) &&
this.commandRegister('imageZoomIn', this.imageZoomIn) &&
this.commandRegister('imageSave', this.imageSave) &&
this.commandRegister('imageZoomIn', this.imageZoomIn) &&
this.commandRegister('imageZoomOut', this.imageZoomOut) &&
this.commandRegister('imageZoomReset', this.imageZoomReset)) {
this.commandRegister('imageZoomReset', this.imageZoomReset) &&
this.commandRegister('selectAll', this.selectAll) &&
this.commandRegister('selectionCut', this.selectionCut) &&
this.commandRegister('selectionCopy', this.selectionCopy) &&
this.commandRegister('clipboardPaste', this.clipboardPaste) &&
this.commandRegister('imageClear', this.imageClear) &&
this.commandRegister('swapFillStroke', this.swapFillStroke)) {
return true;
} else {
this.initError(lang.errorInitCommands);
@ -769,103 +635,8 @@ function PaintWeb (win, doc) {
}
};
/**
* Load th PaintWeb GUI. This method loads the GUI markup file, the stylesheet
* and the script.
*
* @private
*
* @see PaintWeb.config.guiStyle The interface style file.
* @see PaintWeb.config.guiScript The interface script file.
* @see pwlib.gui The interface object.
*/
this.guiLoad = function () {
var cfg = this.config,
gui = this.config.gui,
base = PaintWeb.baseFolder + cfg.interfacesFolder + '/' + gui + '/',
style = base + cfg.guiStyle,
script = base + cfg.guiScript;
this.styleLoad(gui + 'style', style);
if (pwlib.gui) {
this.guiScriptReady();
} else {
this.scriptLoad(script, this.guiScriptReady);
}
};
/**
* The <code>load</code> event handler for the PaintWeb GUI script. This
* method creates an instance of the GUI object that just loaded and starts
* loading the GUI markup.
*
* @private
*
* @see PaintWeb.config.guiScript The interface script file.
* @see PaintWeb.config.guiMarkup The interface markup file.
* @see pwlib.gui The interface object.
* @see pwlib.xhrLoad The library function being used for creating the
* XMLHttpRequest object.
*/
this.guiScriptReady = function () {
var cfg = _self.config,
gui = _self.config.gui,
base = cfg.interfacesFolder + '/' + gui + '/',
markup = base + cfg.guiMarkup;
_self.gui = new pwlib.gui(_self);
// Check if the interface markup is cached already.
if (markup in pwlib.fileCache) {
if (_self.gui.init(pwlib.fileCache[markup])) {
_self.initTools();
} else {
_self.initError(lang.errorInitGUI);
}
} else {
pwlib.xhrLoad(PaintWeb.baseFolder + markup, _self.guiMarkupReady);
}
};
/**
* The GUI markup reader. This is the event handler for the XMLHttpRequest
* object, for the <code>onreadystatechange</code> event.
*
* @private
*
* @param {XMLHttpRequest} xhr The XMLHttpRequest object being handled.
*
* @see PaintWeb#guiScriptReady The method which issues the XMLHttpRequest
* request for loading the interface markup file.
*/
this.guiMarkupReady = function (xhr) {
if (!xhr || xhr.readyState !== 4) {
return;
}
if (xhr.status !== 304 && xhr.status !== 200) {
_self.initError(lang.failedMarkupLoad);
return;
}
var param;
/*if (xhr.responseXML && xhr.responseXML.documentElement) { // by gu
param = xhr.responseXML;
} else */if (xhr.responseText) {
param = xhr.responseText;
} else {
_self.initError(lang.failedMarkupLoad);
return;
}
if (_self.gui.init(param)) {
_self.initTools();
} else {
_self.initError(lang.errorInitGUI);
}
};
/**
* Initialize the Canvas elements. This method creates the elements and
@ -1121,7 +892,10 @@ function PaintWeb (win, doc) {
this.initialized = PaintWeb.INIT_DONE;
//this.toolActivate("selection");
this.events.dispatch(new appEvent.appInit(this.initialized));
};
/**
@ -2460,41 +2234,6 @@ function PaintWeb (win, doc) {
xhr.send('');
};
/**
* Insert a stylesheet into the document.
*
* @param {String} id The stylesheet ID. This is used to avoid inserting the
* same style in the document.
* @param {String} url The URL of the stylesheet you want to insert.
* @param {String} [media='screen, projection'] The media attribute.
* @param {Function} [handler] The <code>load</code> event handler.
*/
this.styleLoad = function (id, url, media, handler) {
id = 'paintweb_style_' + id;
var elem = doc.getElementById(id);
if (elem) {
return;
}
if (!media) {
media = 'screen, projection';
}
elem = doc.createElement('link');
if (handler) {
elem.addEventListener('load', handler, false);
}
elem.id = id;
elem.rel = 'stylesheet';
elem.type = 'text/css';
elem.media = media;
elem.href = url;
this.elems.head.appendChild(elem);
};
/**
* Perform action undo.
@ -2661,6 +2400,7 @@ function PaintWeb (win, doc) {
imageLoad = _self.config.imageLoad,
ext = 'png', idata = null, src = null, pos;
if (!canvas.toDataURL) {
return false;
}
@ -2714,35 +2454,21 @@ function PaintWeb (win, doc) {
}
canvas = null;
// alert('idata~~~'+idata)
if (!idata || idata === 'data:,') {
return false;
}
//--------------------------------------------------------------------
// FIXME: 변경된 부분 : save image
//--------------------------------------------------------------------
if (!_self.config.imageSave) {
if (_self.config.afterImageSave) _self.config.afterImageSave();
return;
}
let fileType = 'image/';
const regx = new RegExp('.(gif|jpg|jpeg|tiff|png|ico)$', 'i')
let name = (/[^(/|\\)]*$/).exec(idata)[0]
// 20220915_5df30439017240afbc7081ae9bfbfa2f_e 와 같은 형태인 경우 imageName으로
// 원본파일명 + '_e'
if(!regx.exec(name)){
const imgName = srcImg.name;
const idx = imgName.indexOf('.');
// 삭제가 아닌 경우 원본이미지명 + '_e' 추가
if(img.width !== 0){
name = imgName.substring(0, idx)+'_e'+ imgName.substring(idx);
}
}
fileType += regx.test(name) ? regx.exec(name)[0].replace('.', '') : 'jpg'
// mine type 'jpg' > jpeg로 변경
const regx = new RegExp('.(gif|jpg|jpeg|tiff|png|ico)$', 'i');
let name = originalInfomation.FILE_NM;;
if(regx.test(name)){
fileType += regx.exec(name)[0].replace('.', '');
} else {
fileType += 'jpg';
}
// mine type 'jpg' > jpeg로 변경
fileType = fileType.replace('image/jpg', 'image/jpeg');
const bstr = atob(idata.split(",")[1]);
let n = bstr.length;
@ -2755,7 +2481,7 @@ function PaintWeb (win, doc) {
// 이미지 삭제인 경우 img.width, img.height 가 0
_self.config.imageSave(file, img.width, img.height, doc, _self);
_self.config.afterImageSave();
return;
//---------------------------------------------------------------------
@ -2789,8 +2515,9 @@ function PaintWeb (win, doc) {
bufferCanvas = _self.buffer.canvas,
bufferCtx = _self.buffer.context,
img = _self.image;
var bufferStyle = _self.buffer.canvas.style,
layerStyle = layerCanvas.style;
var bufferStyle = _self.buffer.canvas.style;
var layerStyle = layerCanvas.style;
var srcCanvas = doc.createElement('canvas');
@ -2815,17 +2542,13 @@ function PaintWeb (win, doc) {
img.width = layerCanvas.width;
img.height = layerCanvas.height;
_self.events.dispatch(new appEvent.imageSizeChange(layerCanvas.width, layerCanvas.height));
bufferStyle.width = layerStyle.width = layerCanvas.width + 'px';
bufferStyle.height = layerStyle.height = layerCanvas.height + 'px';
bufferStyle.width = layerStyle.width = (layerCanvas.width * img.canvasScale) + 'px';
bufferStyle.height = layerStyle.height = (layerCanvas.height * img.canvasScale) + 'px';
_self.events.dispatch(new appEvent.canvasSizeChange(layerCanvas.width, layerCanvas.height, img.canvasScale));
var zoom = _self.image.zoom;
_self.image.zoom=1;
_self.imageZoomTo(zoom);
_self.events.dispatch(new appEvent.canvasSizeChange(bufferCanvas.width * img.canvasScale, bufferCanvas.height * img.canvasScale, img.canvasScale));
pw.image.modified = true;
return true;
};
@ -2866,6 +2589,7 @@ function PaintWeb (win, doc) {
let jobCtx = _self.layer.context;
jobCtx.putImageData(filteredData, 0 , 0);
pw.image.modified = true;
}
this.brightnessCalc = function(pixels, sliderValue) {
@ -3014,6 +2738,14 @@ function PaintWeb (win, doc) {
}
};
this.selectionForNumberPlate = function (ev) {
if (!_self.tool || _self.tool._id !== 'selection') {
return false;
} else {
return _self.tool.selectionForNumberPlate(ev);
}
};
/**
* Paste the current clipboard image. This only works when some ImageData is
* available in {@link PaintWeb#clipboard}.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save