newFileInfoMap = new HashMap<>();
- String workDirPath = "files/attachment/etc/"+fileSe;
-
- String ext = FilenameUtils.getExtension(mf.getOriginalFilename());
- String fileName = sggCd+"."+ext;
-
- File workDir = new File(workDirPath);
- workDir.mkdirs();
- String newFileFullPath = workDirPath + "/" + fileName;
-
- try {
-
- File newFile = new File(newFileFullPath);
- if(newFile.exists()) {
- if(!newFile.delete()) {
- throw new RuntimeException("[F]이미지 업로드 중 오류가 발생하였습니다.");
- }
- }
- mf.transferTo(newFile);
-
- } catch (Exception e) {
- throw new RuntimeException("[F]이미지 업로드 중 오류가 발생하였습니다.");
- }
-
- newFileInfoMap.put("filePath", newFileFullPath);
- newFileInfoMap.put("fileName", mf.getOriginalFilename());
- return newFileInfoMap;
- }
-
- /**시군구별 업무,위반 설정 정보를 수정한다.
- * @param sgg 시군구 정보
- * @return jsonView
- * {
- * "saved": 수정되었으면 true, 그렇지 않으면 false
- * }
- */
- @RequestMapping(name="업무 설정 정보 수정", value=METHOD_URL.updateTaskStng)
- public ModelAndView updateTaskStng(Task task) {
- ModelAndView mav = new ModelAndView("jsonView");
-
- boolean saved = false;
- String rtnMsg = stngService.updateTaskStng(task, task.getVltnStngList());
- if(rtnMsg.contains("[S]")) {
- saved = true;
- }
- mav.addObject("saved", saved);
- return mav;
- }
-
- /**시군구별 업무,위반 설정을 추가한다.
- * @param sggCd 시군구 코드, taskSeCd 업무 구분 코드
- * @return jsonView
- * {
- * "saved": 수정되었으면 true, 그렇지 않으면 false
- * }
- */
- @RequestMapping(name="시군구 과태료 업무 추가", value=METHOD_URL.createTaskStng)
- public ModelAndView createTaskStng(String sggCd, String taskSeCd) {
- ModelAndView mav = new ModelAndView("jsonView");
-
- boolean saved = false;
- String rtnMsg = stngService.createTaskStng(sggCd, taskSeCd);
- if(rtnMsg.contains("[S]")) {
- saved = true;
- }
- mav.addObject("saved", saved);
- return mav;
- }
-
- /** 부서 설정관리 메인화면을 연다.
- * @return fims/ogdp/ogdp02010-main
- */
- @RequestMapping(name="부서 설정 정보 관리 메인", value=METHOD_URL.deptStngMain)
- public ModelAndView deptStngMain() {
- ModelAndView mav = new ModelAndView();
-
- mav.setViewName("fims/ogdp/ogdp02010-main");
- mav.addObject("pageName", "ogdp02010");
-
- List allSggList = sggDeptService.getSigunguList(new SigunguQuery());
-
- mav.addObject("sggList", allSggList);
-
- return mav;
- }
-
- /**부서 설정 목록을 조회한다.
- * {@link OgdpService#getDeptStngList(CmmnQuery)} 참고
- * @param query 부서 목록 조회 조건
- * @return jsonView
- */
- @RequestMapping(name="부서 설정 목록 조회", value=METHOD_URL.getDeptStngList)
- public ModelAndView getDeptStngList(OgdpQuery query) {
-
- setFetchSize(query);
-
- return setCollectionInfo(new ModelAndView("jsonView"), ogdpBean.getDeptStngList(query),"","");
-
- }
-
- /**지정한 ID의 부서 설정 정보(info)를 반환한다.
- * @param query 부서 조회 조건
- * @return fims/ogdp/ogdp02020-info 또는 jsonView
- * {
- * "deptInfo": 부서 정보
- * }
- */
- @RequestMapping(name="부서 설정 상세 조회", value=METHOD_URL.getDeptStngInfo)
- public ModelAndView getDeptStngInfo(OgdpQuery query) {
- DataObject deptInfo = new DataObject();
-
- if(!ifEmpty(query.getDeptCd(), ()->"").equals("")) {
- deptInfo = ogdpBean.getDeptStngInfo(query);
- } else {
- deptInfo = null;
- }
-
- boolean json = jsonResponse();
- ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/ogdp/ogdp02020-info");
-
- mav.addObject("pageName", "ogdp02020");
- mav.addObject("deptInfo", json ? deptInfo : toJson(deptInfo));
- return mav;
- }
-
-
-
-
- /**부서 설정 정보를 수정한다.
- * @param dept 부서 정보
- * @return jsonView
- * {
- * "saved": 저장되었으면 true, 그렇지 않으면 false
- * }
- */
- @RequestMapping(name="부서 설정 수정", value=METHOD_URL.updateDeptStng)
- public ModelAndView updateDeptStng(FimsDepartment dept) {
- ModelAndView mav = new ModelAndView("jsonView");
- boolean saved = ogdpBean.updateDeptStng(dept);
-
- mav.addObject("saved", saved);
- return mav;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cokr/xit/fims/base/web/UserController.java b/src/main/java/cokr/xit/fims/base/web/UserController.java
deleted file mode 100644
index 637d924d..00000000
--- a/src/main/java/cokr/xit/fims/base/web/UserController.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package cokr.xit.fims.base.web;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-import cokr.xit.base.code.CommonCode;
-import cokr.xit.base.code.service.CodeQuery;
-import cokr.xit.base.code.service.CodeService;
-import cokr.xit.base.code.service.bean.CodeBean;
-import cokr.xit.base.security.SecuredUserInfo;
-import cokr.xit.base.security.access.service.AuthorityService;
-import cokr.xit.base.user.UserQuery;
-import cokr.xit.base.user.service.UserService;
-import cokr.xit.fims.base.FimsUser;
-import cokr.xit.fims.base.service.bean.OgdpBean;
-import cokr.xit.fims.cmmn.service.bean.StngBean;
-import cokr.xit.foundation.data.DataObject;
-
-@Controller
-public class UserController extends cokr.xit.base.user.web.UserController {
-
- @Resource(name="userService")
- private UserService userService;
-
- @Resource(name = "codeBean")
- private CodeBean codeBean;
-
- @Resource(name="codeService")
- private CodeService codeService;
-
- @Resource(name="authorityService")
- private AuthorityService authorityService;
-
- @Resource(name="ogdpBean")
- private OgdpBean ogdpBean;
-
- @Resource(name = "stngBean")
- private StngBean stngBean;
-
- @Override
- public ModelAndView main() {
- ModelAndView mav = super.main();
- Map> commonCodes = codeService.getCodesOf("CMN009");
- mav.addObject("CMN009List", commonCodes.get("CMN009"));
- return mav;
- }
-
- @Override
- public ModelAndView getInfo(String userID) {
-
- ModelAndView mav = new ModelAndView();
-
- boolean json = !isEmpty(userID) && jsonResponse();
- String viewName = json ? "jsonView" : "base/user/user-info";
-
- if (!isEmpty(userID)) {
- DataObject userInfo = userService.getUserInfo(userID);
- mav.setViewName(viewName);
- mav.addObject("userInfo", json ? userInfo : toJson(userInfo));
- } else {
- mav.setViewName("base/user/user-info");
-
- }
-
- mav.addObject("allOgdpList", ogdpBean.selectAllOgdpList());
-
- List ableOgdpList = ogdpBean.selectAbleOgdpList(false, currentUser().getOrgID());
- mav.addObject("ableOgdpList", ableOgdpList);
-
- Map> commonCodes = codeService.getCodesOf("CMN008");
- mav.addObject("CMN008List", commonCodes.get("CMN008"));
-
- return mav;
- }
-
- @Override
- public ModelAndView create(FimsUser user) {
- user.setAccount(user.getAccount().toUpperCase());
- return super.create(user);
- }
-
- @Override
- public ModelAndView isDuplicate(String account, String institute) {
- account = account.toUpperCase();
- return super.isDuplicate(account, institute);
- }
-
- @Override
- public ModelAndView getUserList(UserQuery req) {
- if(req.getBy() != null && req.getTerm() != null && req.getBy().equals("userAccount")) {
- req.setTerm(req.getTerm().toUpperCase());
- }
- return super.getUserList(req);
- }
-
- @RequestMapping(name="내 정보 조회",value="/myInfo.do")
- public ModelAndView myInfo() {
- ModelAndView mav = new ModelAndView("jsonView");
-
- SecuredUserInfo userInfo = currentUser();
-
- //시군구,기관,부서
- ogdpBean.initUserInfo(userInfo);
-
- //관리자여부,내부망사용자여부,업무권한여부
- boolean isAdmin = userInfo.hasAuthorities("ROLE_ADMIN");
- userInfo.getInfo().put("isAdmin", isAdmin);
-
- FimsUser fimsUser = (FimsUser)userInfo.getUser();
- boolean isPublicOfficer = fimsUser.getCntnSeCd().equals("01");
- userInfo.getInfo().put("isPublicOfficer", isPublicOfficer);
-
- CodeQuery codeQuery = new CodeQuery();
- codeQuery.setGroupIDs("FIM054");
- List taskList = codeBean.getCodeList(codeQuery);
- String[] taskRoles = taskList.stream().map((item) -> { return "ROLE_"+item.string("CODE"); })
- .toList().toArray(new String[taskList.size()]);
- boolean hasTaskAuth = userInfo.hasAuthorities(taskRoles);
- userInfo.getInfo().put("hasTaskAuth", hasTaskAuth);
-
-
- //사용자별 업무 및 기본업무
- stngBean.initUserInfo(userInfo);
-
- //지자체 로고(시군구 설정)
- DataObject sggStng = stngBean.getStng("sgg");
- userInfo.getInfo().put("sggLogoPath", sggStng.string("LOGO_FILE_PATH"));
- userInfo.getInfo().put("sggSymbolPath", sggStng.string("SYMBOL_FILE_PATH"));
-
- mav.addObject("myInfo", userInfo);
- return mav;
- }
-
- @RequestMapping(name="시스템 연계 정보",value="/sysLinkInfo.do")
- public ModelAndView sysLinkInfo() {
- ModelAndView mav = new ModelAndView("jsonView");
-
- DataObject deptStng = stngBean.getStng("dept");
- DataObject sysLinkInfo = new DataObject();
- sysLinkInfo.put("NXRP_LINK_YN", deptStng.string("NXRP_LINK_YN"));
- sysLinkInfo.put("CVLCPT_LINK_SE_CD", deptStng.string("CVLCPT_LINK_SE_CD"));
-
- mav.addObject("sysLinkInfo", sysLinkInfo);
- return mav;
- }
-
- @RequestMapping(name="내 정보 변경 화면", value="/openMyInfo.do")
- public ModelAndView openMyInfo() {
- ModelAndView mav = new ModelAndView("fims/user/user01010-main");
-
- DataObject userInfo = userService.getUserInfo(currentUser().getId());
- mav.addObject("userInfo", toJson(userInfo));
-
-
- String cntnSeCd = userInfo.string("CNTN_SE_CD");
- if(cntnSeCd.equals("01")) {
- mav.addObject("cntnSeCd", "01");
-
- mav.addObject("allOgdpList", ogdpBean.selectAllOgdpList());
- List ableOgdpList = ogdpBean.selectAbleOgdpList(false, currentUser().getOrgID());
- mav.addObject("ableOgdpList", ableOgdpList);
-
- Map> commonCodes = codeService.getCodesOf("CMN008");
- mav.addObject("CMN008List", commonCodes.get("CMN008"));
-
- } else if(cntnSeCd.equals("02")) {
- mav.addObject("cntnSeCd", "02");
- }
-
- return mav;
- }
-
- @RequestMapping(name="내 정보 변경", value="/updateMyInfo.do")
- public ModelAndView updateMyInfo(FimsUser user) {
- return super.update(user);
- }
-
- @RequestMapping(name="기본업무 저장",value="/saveDefaultTask.do")
- public ModelAndView saveDefaultTask(String taskSeCd) {
- ModelAndView mav = new ModelAndView("jsonView");
- boolean saved = false;
-
- saved = stngBean.saveDefaultTask(taskSeCd);
-
- mav.addObject("saved", saved);
- return mav;
- }
-
- @RequestMapping(name="설정정보 조회",value="/stngInfo.do")
- public ModelAndView getStngInfo(String type) {
- ModelAndView mav = new ModelAndView("jsonView");
-
- DataObject stngInfo = stngBean.getStng(type);
- mav.addObject("stngInfo",stngInfo);
- return mav;
- }
-
- @RequestMapping(name="교부 계좌번호 수정",value="/updateDtbnActno.do")
- public ModelAndView updateDtbnActno(String dtbnBankNm, String dtbnActno) {
- ModelAndView mav = new ModelAndView("jsonView");
-
- boolean saved = stngBean.updateDtbnActno(dtbnBankNm, dtbnActno);
-
- mav.addObject("saved", saved);
- return mav;
- }
-
- @RequestMapping(name="사용자 검색",value="/user02/010/main.do")
- public ModelAndView findUserMain(HttpServletRequest hReq, String callbackFuncName) {
- ModelAndView mav = new ModelAndView("fims/user/user02010-main");
-
- // 사용자 정보
- FimsUser currentUser = (FimsUser)currentUser().getUser();
-
- return mav
- .addObject("openerPageName", hReq.getParameter("openerPageName")) // 호출한 Jsp PageName
- .addObject("pageName", "user02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
- .addObject("infoPrefix", "user") // prefix
- .addObject("infoPrefixUrl", "/user/user02") // prefixUrl
- .addObject("callbackFuncName", callbackFuncName) // 콜백함수(callbackFuncName)
- .addObject("sggCd", currentUser.getOrgID()) // 시군구 코드(SGG_CD)
- .addObject("deptCd", currentUser.getDeptCode()) // 부서 코드(DEPT_CD)
- .addObject("userAcnt", currentUser.getAccount()) // 사용자 계정(USER_ACNT)
- ;
- }
-
- @RequestMapping(name="회원탈퇴", value="/cancelAccount.do")
- public ModelAndView cancelAccount() {
- int affected = userService.remove(currentUser().getId());
- return new ModelAndView("jsonView")
- .addObject("affected", affected)
- .addObject("saved", affected > 0);
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/CmmnQuery.java b/src/main/java/cokr/xit/fims/cmmn/CmmnQuery.java
deleted file mode 100644
index 9a3d9090..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CmmnQuery.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.component.QueryRequest;
-
-public class CmmnQuery extends QueryRequest {
-
- private static final long serialVersionUID = 1L;
-
- private String sseKey;
-
- private String mainOption;
- private String subOption;
-
- private String cellDefs;
- private String includePhoto;
-
- private String thisDay;
-
- private String taskSeCd; // 업무 구분 코드
- private String sggCd; // 시군구 코드
- private String deptCd; // 부서 코드
- private String instCd; // 기관 코드
- private String useYn; // 사용 여부
- private String delYn; // 삭제 여부
-
- private String schDateOpt; // 검색 일자 구분
- private String schDateFrom; // 검색 일자 시작
- private String schDateTo; // 검색 일자 종료
- private String schRegDateOpt; // 등록 일자 구분
- private String schRegDateFrom; // 등록 일자 시작
- private String schRegDateTo; // 등록 일자 종료
- private String schRgtrOpt; // 등록 사용자 구분
- private String schRgtrCd; // 등록 사용자 코드
- private String schRgtrNm; // 등록 사용자 명
-
- public String getSseKey() {
- return ifEmpty(sseKey, () -> null);
- }
-
- public T setSseKey(String sseKey) {
- this.sseKey = sseKey;
- return self();
- }
-
- public String getMainOption() {
- return ifEmpty(mainOption, () -> null);
- }
-
- public T setMainOption(String mainOption) {
- this.mainOption = mainOption;
- return self();
- }
-
- public String getSubOption() {
- return ifEmpty(subOption, () -> null);
- }
-
- public T setSubOption(String subOption) {
- this.subOption = subOption;
- return self();
- }
-
- public String getCellDefs() {
- return ifEmpty(cellDefs, () -> null);
- }
-
- public T setCellDefs(String cellDefs) {
- this.cellDefs = cellDefs;
- return self();
- }
-
- public String getIncludePhoto() {
- return ifEmpty(includePhoto, () -> null);
- }
-
- public T setIncludePhoto(String includePhoto) {
- this.includePhoto = includePhoto;
- return self();
- }
-
- public String getThisDay() {
- return ifEmpty(thisDay, () -> null);
- }
-
- public T setThisDay(String thisDay) {
- this.thisDay = thisDay;
- return self();
- }
-
- public String getSggCd() {
- return ifEmpty(sggCd, () -> null);
- }
-
- public T setSggCd(String sggCd) {
- this.sggCd = sggCd;
- return self();
- }
-
- public String getDeptCd() {
- return ifEmpty(deptCd, () -> null);
- }
-
- public T setDeptCd(String deptCd) {
- this.deptCd = deptCd;
- return self();
- }
-
- public String getTaskSeCd() {
- return ifEmpty(taskSeCd, () -> null);
- }
-
- public T setTaskSeCd(String taskSeCd) {
- this.taskSeCd = taskSeCd;
- return self();
- }
-
- public String getInstCd() {
- return ifEmpty(instCd, () -> null);
- }
-
- public T setInstCd(String instCd) {
- this.instCd = instCd;
- return self();
- }
-
- public String getUseYn() {
- return ifEmpty(useYn, () -> null);
- }
-
- public T setUseYn(String useYn) {
- this.useYn = useYn;
- return self();
- }
-
- public String getDelYn() {
- return ifEmpty(delYn, () -> null);
- }
-
- public T setDelYn(String delYn) {
- this.delYn = delYn;
- return self();
- }
-
- public String getSchDateOpt() {
- return ifEmpty(schDateOpt, () -> null);
- }
-
- public T setSchDateOpt(String schDateOpt) {
- this.schDateOpt = schDateOpt;
- return self();
- }
-
- public String getSchDateFrom() {
- return ifEmpty(schDateFrom, () -> null);
- }
-
- public T setSchDateFrom(String schDateFrom) {
- this.schDateFrom = schDateFrom;
- return self();
- }
-
- public String getSchDateTo() {
- return ifEmpty(schDateTo, () -> null);
- }
-
- public T setSchDateTo(String schDateTo) {
- this.schDateTo = schDateTo;
- return self();
- }
-
- public String getSchRegDateOpt() {
- return ifEmpty(schRegDateOpt, () -> null);
- }
-
- public T setSchRegDateOpt(String schRegDateOpt) {
- this.schRegDateOpt = schRegDateOpt;
- return self();
- }
-
- public String getSchRegDateFrom() {
- return ifEmpty(schRegDateFrom, () -> null);
- }
-
- public T setSchRegDateFrom(String schRegDateFrom) {
- this.schRegDateFrom = schRegDateFrom;
- return self();
- }
-
- public String getSchRegDateTo() {
- return ifEmpty(schRegDateTo, () -> null);
- }
-
- public T setSchRegDateTo(String schRegDateTo) {
- this.schRegDateTo = schRegDateTo;
- return self();
- }
-
- public String getSchRgtrOpt() {
- return ifEmpty(schRgtrOpt, () -> null);
- }
-
- public T setSchRgtrOpt(String schRgtrOpt) {
- this.schRgtrOpt = schRgtrOpt;
- return self();
- }
-
- public String getSchRgtrCd() {
- return ifEmpty(schRgtrCd, () -> null);
- }
-
- public T setSchRgtrCd(String schRgtrCd) {
- this.schRgtrCd = schRgtrCd;
- return self();
- }
-
- public String getSchRgtrNm() {
- return ifEmpty(schRgtrNm, () -> null);
- }
-
- public T setSchRgtrNm(String schRgtrNm) {
- this.schRgtrNm = schRgtrNm;
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java
deleted file mode 100644
index e8f43843..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java
+++ /dev/null
@@ -1,639 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.text.SimpleDateFormat;
-import java.time.DayOfWeek;
-import java.time.LocalDate;
-import java.time.format.TextStyle;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.io.FilenameUtils;
-import org.springframework.core.io.ClassPathResource;
-
-import cokr.xit.foundation.data.DataObject;
-import cokr.xit.foundation.util.DateFormats;
-
-public class CmmnUtil {
-
- public static List getDataObjectListFromMap(Map map, String key) {
- ArrayList dataObjectList = new ArrayList<>();
- Object list = map.get(key);
- if(list == null) {
- return null;
- }
- if(list instanceof ArrayList>) {
- for(Object o : (ArrayList>) list) {
- if(o instanceof DataObject) {
- dataObjectList.add((DataObject)o);
- }
- }
- }
- return dataObjectList;
- }
-
- /**
- * HTML엔티티코드 문자열을 특수문자로 치환한다.
- * @param HTML엔티티코드 문자열
- * @return 치환된 특수문자
- */
- public static String escapeHTMLEntity(String str) {
- str = str.replaceAll("<", "<");
- str = str.replaceAll(">", ">");
- str = str.replaceAll("&", "&");
- str = str.replaceAll(""", "\\\"");
- str = str.replaceAll("#39;", "'");
- return str;
- }
-
- public static String spacedJoin(String... strings) {
- String result = "";
- for(String str : strings) {
- if(str == null) {
- str = "";
- }
- if(result.equals("") || str.equals("")) {
- result += str;
- } else {
- result += " " + str;
- }
- }
- return result;
- }
-
- /**
- * 문자열 안의 모든 문자가 숫자인지 테스트한다.
- * @param 문자열
- * @return boolean
- */
- public static boolean isNumeric(String str) {
- String REGEXP_PATTERN_NUMBER = "^[\\d]*$";
- return Pattern.matches(REGEXP_PATTERN_NUMBER, str);
- }
-
- /**
- * 문자열 안의 모든 문자가 한글인지 테스트한다.
- * @param 문자열
- * @return boolean
- */
- public static boolean isKorean(String str) {
- String REGEXP_PATTERN_KOR = "^[가-힣]*$";
- return Pattern.matches(REGEXP_PATTERN_KOR, str);
- }
-
- /**
- * 순서를 숫자에서 알파벳문자로 변환한다.
- * @param index 순서번호, 대소문자여부(대문자일경우 true, 소문자일경우 false), startFromZero 0부터 시작 여부(0부터 시작시 true, 1부터 시작시 false)
- * @return 알파벳대문자(A~Z)
- */
- public static String indexToAlphabet(int index, boolean isUpper, boolean startFromZero) {
- int A = isUpper ? 65 : 97;
- int Z = isUpper ? 90 : 122;
-
- int charCode = (A-1);
-
- charCode += index;
-
- if(startFromZero) {
- charCode++;
- }
-
- if(charCode < A || charCode > Z) {
- return "";
- }
-
- return ""+(char)charCode;
- }
-
- /**
- * 확장자가 포함된 파일명에 추가 문자열을 더한 파일명을 반환한다.
- * @param orgnFileName 원본파일명, append 추가 문자열
- * @return 변환된 파일명
- */
- public static String appendFileName(String orgnFileName, String append) {
- return FilenameUtils.removeExtension(orgnFileName) + append + "." + FilenameUtils.getExtension(orgnFileName);
- }
-
- /**
- * 모자이크 처리된 이미지파일을 생성한다.
- * @param source 원본파일, target 결과파일, mosaicInfos 모자이크 정보
- * @return
- */
- public static void createMaskedImage(InputStream source, File target, List mosaicInfos) {
-
- BufferedImage buffer_black_image = new BufferedImage(1, 1, BufferedImage.TYPE_3BYTE_BGR);
- String extension = FilenameUtils.getExtension(target.getName());
- try {
-
- BufferedImage buffer_original_image = ImageIO.read(source);
- Graphics2D graphic = buffer_original_image.createGraphics();
- for(DataObject mosaicInfo : mosaicInfos){
- int mosaicX = mosaicInfo.number("X_AXS").intValue();
- int mosaicY = mosaicInfo.number("Y_AXS").intValue();
- int mosaicWidth = mosaicInfo.number("MOSC_LEN").intValue();
- int mosaicHeight = mosaicInfo.number("MOSC_HGT").intValue();
- graphic.drawImage(buffer_black_image, mosaicX, mosaicY, mosaicWidth, mosaicHeight, null);
- }
-
- ImageIO.write(buffer_original_image, extension, target);
- } catch (IOException e) {
- throw new RuntimeException("이미지 모자이크 처리 중 오류가 발생하였습니다.");
- }
-
- }
-
- /**
- * 하위 폴더가 비워져 있으면 삭제한다.
- * @param file 대상 폴더, removeSelf 대상 폴더까지 삭제할 지 여부
- * @return 삭제된 폴더수
- */
- public static int deleteEmptyDir(File file, boolean removeSelf) {
- if (!file.isDirectory()) return 0;
-
- int delCnt=0;
-
- for (File subFile : file.listFiles()) {
- if (subFile.isDirectory()) {
- delCnt+=deleteEmptyDir(subFile, true);
- }
- }
-
- if(removeSelf) {
- if (file.listFiles().length==0) {
- if(!file.delete()) {
- throw new RuntimeException("파일 삭제 중 오류가 발생하였습니다.");
- }
- delCnt++;
- }
- }
-
- return delCnt;
- }
-
- /**
- * 폴더 경로에 파일명이 동일한 파일이 여러 개 있을 경우 수정일자가 가장 마지막인 파일만 남기고 삭제한다.
- * @param root 경로
- * @return 삭제된 폴더수
- */
- public static void removeDuplicateFileName(String root) {
- List fileList = null;
- try (Stream pathStream = Files.walk(Paths.get(root))){
-
- fileList = pathStream.filter(Files::isRegularFile).toList();
- } catch (IOException e) {
- throw new RuntimeException("파일 조회 오류."+e);
- }
-
- if(fileList != null && !fileList.isEmpty()) {
- Map> byFileName = fileList.stream().collect(Collectors.groupingBy(item -> item.toFile().getName()));
-
- Iterator keys = byFileName.keySet().iterator();
-
- while( keys.hasNext() ){
- String key = keys.next();
- List sameNameFileList = byFileName.get(key);
- if(sameNameFileList.size() < 2) {
- continue;
- }
-
- Path latest = sameNameFileList.stream()
- .max(Comparator.comparing(item -> item.toFile().lastModified()))
- .orElseThrow();
-
- for(Path sameNameFile : sameNameFileList) {
- if(!sameNameFile.equals(latest)) {
- if(!sameNameFile.toFile().delete()) {
- throw new RuntimeException("[F]파일 삭제 오류");
- }
- }
- }
- }
- }
- }
-
- /**
- * 리소스 파일을 파일 공통 저장 경로로 복사한다.
- * @param staticResourcePath 리소스 파일 경로, replace 기존 생성 파일 덮어쓰기 여부
- * @return
- */
- public static String copyStaticResource(String staticResourcePath, boolean replace) {
- try {
-
- String folderPath = FilenameUtils.getFullPathNoEndSeparator(staticResourcePath);
- String storageRoot = "files";
- ClassPathResource cps = new ClassPathResource(staticResourcePath);
- String fileName = cps.getFilename();
-
- File newFile = new File(storageRoot + "/" + folderPath + "/" + fileName);
- if(replace && newFile.exists()) {
- return storageRoot + "/" + folderPath + "/" + fileName;
- }
-
- File folder = new File(storageRoot + "/" + folderPath);
- if(!folder.exists()) {
- folder.mkdirs();
- }
- InputStream is = cps.getInputStream();
-
- Files.copy(is, newFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
-
- return storageRoot + "/" + folderPath + "/" + fileName;
-
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- }
-
-
- /**
- * 현재 날짜와 지정한 날짜와의 차이(일)를 반환한다.
- * @param dayStr 지정한 날짜
- * @return 현재 날짜와의 차이 일수
- */
- public static int compareToday(String dayStr) {
-
- SimpleDateFormat yyyyMMddFormat = new SimpleDateFormat("yyyyMMdd");
- Date curDate = new Date();
- String strCurrentDate = yyyyMMddFormat.format(curDate);
-
- if(dayStr.length() == 8) {
- return Integer.parseInt(strCurrentDate) - Integer.parseInt(dayStr);
- } else if(dayStr.length() == 14) {
- return Integer.parseInt(strCurrentDate) - Integer.parseInt(dayStr.substring(0,8));
- } else {
- throw new RuntimeException("날짜 형식 오류");
- }
- }
-
- /**
- * 지정한 날짜에 일수를 더한 날짜를 반환한다.
- * @param yyyyMMdd 지정한 날짜, add 추가 일수
- * @return 계산된 날짜
- */
- public static String addDay(String yyyyMMdd, int add) {
-
- SimpleDateFormat yyyyMMddFormat = new SimpleDateFormat("yyyyMMdd");
-
- Calendar cal = Calendar.getInstance();
-
- try {
- Date dt = yyyyMMddFormat.parse(yyyyMMdd);
- cal.setTime(dt);
- } catch (Exception e){
- throw new RuntimeException(e);
- }
-
- cal.add(Calendar.DATE, add);
-
- return yyyyMMddFormat.format(cal.getTime());
- }
-
- public static String dateNFormat(String dateStr, String pattern) {
- if(dateStr.length() == 8) {
- return CmmnUtil.date8Format(dateStr, pattern);
- } else if(dateStr.length() == 12) {
- return CmmnUtil.date12Format(dateStr, pattern);
- } else if(dateStr.length() == 14) {
- return CmmnUtil.date14Format(dateStr, pattern);
- } else {
- return dateStr;
- }
- }
-
- public static String date8Format(String dateStr, String pattern) {
- DateFormats dataFormats = new DateFormats();
- Date date = dataFormats.parse("yyyyMMdd", dateStr);
- return dataFormats.format(pattern, date);
- }
- public static String date12Format(String dateStr, String pattern) {
- DateFormats dataFormats = new DateFormats();
- Date date = dataFormats.parse("yyyyMMddHHmm", dateStr);
- return dataFormats.format(pattern, date);
- }
- public static String date14Format(String dateStr, String pattern) {
- DateFormats dataFormats = new DateFormats();
- Date date = dataFormats.parse("yyyyMMddHHmmss", dateStr);
- return dataFormats.format(pattern, date);
- }
-
- /**'-'로 구분된 우편번호를 반환한다.
- * @param zipCode '-'이 없는 우편번호
- * @return '-'로 구분된 우편번호
- */
- public static String zipCodeFormat(String zipCode) {
- if(zipCode != null && zipCode.length() == 6) {
- return zipCode.substring(0,3)+"-"+zipCode.substring(3);
- }
- return zipCode;
- }
-
- /**'-'로 구분된 등기번호를 반환한다.
- * @param rgNo '-'이 없는 등기번호
- * @return '-'로 구분된 등기번호
- */
- public static String rgNoFormat(String rgNo) {
- if(rgNo != null && rgNo.length() == 13) {
- return rgNo.substring(0,5)+"-"+rgNo.substring(5);
- }
- return rgNo;
- }
-
- /**
- * 날짜형 문자열 입력받아 요일을 한글 문자 하나로 반환한다.
- * @param dateStr 날짜
- * @return 요일
- */
- public static String getDayOfWeek(String dateStr) {
- int y = Integer.parseInt(dateStr.substring(0,4));
- int m = Integer.parseInt(dateStr.substring(4,6));
- int d = Integer.parseInt(dateStr.substring(6,8));
- LocalDate date = LocalDate.of(y, m, d);
- DayOfWeek dayOfWeek = date.getDayOfWeek();
- String dow = dayOfWeek.getDisplayName(TextStyle.SHORT, Locale.KOREAN);
- return dow;
- }
-
- /** 숫자를 한글로 표시한다.
- * @param number
- * @return
- */
- public static String convertNumberToHangul(String number) {
- String[] han1 = { "", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구" };
- String[] han2 = { "", "십", "백", "천" };
- String[] han3 = { "", "만", "억", "조", "경" };
- String result = "";
- int len = number.length();
- int nowInt = 0;
- boolean hasHan3 = false;
- for (int i = len; i > 0; i--) {
- nowInt = Integer.parseInt(number.substring(len - i, len - i + 1));
- int han2Pick = (i - 1) % 4;
- if (nowInt > 0) {
- result += (han1[nowInt]) + (han2[han2Pick]);
- if (han2Pick > 0) {
- hasHan3 = false;
- }
- }
- if (!hasHan3 && han2Pick == 0) {
- result += (han3[(i - 1) / 4]);
- hasHan3 = true;
- }
- }
- return result.toString();
- }
-
- public static String convertNumberToHangul(int number) {
- String numStr = Integer.toString(number);
- return convertNumberToHangul(numStr);
- }
-
- /** 카멜케이스 문자열을 스네이크케이스 문자열로 변경한다.
- * @param String
- * @return String
- */
- public static String convertCamelCaseToSnakeCase(String camelCase) {
- Pattern pattern = Pattern.compile("([a-z])([A-Z])");
- Matcher matcher = pattern.matcher(camelCase);
-
- String convert = matcher.replaceAll(matchResult -> {
- return String.format("%s_%s", matchResult.group(1), matchResult.group(2));
- });
-
- return convert.toUpperCase();
- }
-
- /** 스네이크케이스 문자열을 카멜케이스 문자열로 변경한다.
- * @param String
- * @return String
- */
- public static String convertSnakeCaseToCamelCase(String snakeCase) {
- Pattern compile = Pattern.compile("([a-z])_([a-z])");
- Matcher matcher = compile.matcher(snakeCase.toLowerCase());
-
- String convert = matcher.replaceAll(matchResult -> {
- return String.format("%s%s", matchResult.group(1).toLowerCase(), matchResult.group(2).toUpperCase());
- });
-
- return convert;
- }
-
- /**OCR 밴드의 검을 반환한다.
- * @param vrfcCode 검증에 사용할 코드
- * ocrData OCR 데이터
- * bgngPstn 시작 위치
- * totalLength OCR 데이터의 총길이
- * @return 검증 코드
- * - 저장됐으면 true
- * - 그렇지 않으면 false
- *
- */
- public static String getOcrVrfcCode(String vrfcCode, String strData, int totalLength) {
- int temp = 0;
- int cdTemp = 0;
- String retCode = "";
-
- for (int iLoop = 0; iLoop < totalLength; iLoop++) {
- temp = (iLoop + vrfcCode.length()) % vrfcCode.length();
- cdTemp = cdTemp + (Integer.valueOf(strData.substring(iLoop, iLoop + 1)) * Integer.valueOf(vrfcCode.substring(temp, temp + 1)));
- }
-
- retCode = String.valueOf(cdTemp % 10);
-
- return retCode;
- }
-
- public static String getOcrband1(String deptCode, String spclBizCd, String fyr, String acntgSeCd, String txitmCd, String levyNo, String ispySn) {
- if(deptCode.equals("")) {
- deptCode = "0000000";
- }
- if(spclBizCd.equals("")) {
- spclBizCd = "0000";
- }
- if(fyr.equals("")) {
- fyr = "0000";
- }
- if(acntgSeCd.equals("")) {
- acntgSeCd = "00";
- }
- if(txitmCd.equals("")) {
- txitmCd = "000000";
- }
- if(levyNo.equals("")) {
- levyNo = "000000";
- }
- if(ispySn.equals("")) {
- ispySn = "00";
- }
- String band1 = deptCode + spclBizCd + fyr + acntgSeCd + txitmCd + levyNo + ispySn;
-
- String ocrVrfcCode = getOcrVrfcCode("12357", band1, 31);
- band1 = band1 + ocrVrfcCode;
-
- return band1;
- }
-
- public static String getOcrband2(String band1, String levySeCd, int sumAmt, String dudtYmd) {
- if(dudtYmd.equals("")) {
- dudtYmd = "00000000";
- }
-
- String levySeCd1 = "";
- if (levySeCd.equals("01")) {
- levySeCd1 = "1" ;
- } else if (levySeCd.equals("02")) {
- levySeCd1 = "2" ;
- } else {
- levySeCd1 = "2" ;
- }
-
- String band2 = levySeCd1
- + String.format("%011d", sumAmt)
- + dudtYmd
- + "0";
- String ocrVrfcCode = getOcrVrfcCode("23571", band1 + band2, 53);
-
- band2 = band2 + ocrVrfcCode;
- band2 = band1 + band2;
-
- return band2;
- }
-
- public static String getOcrband3(String ocr1, int sumAmt, String dudtYmd, int afterSumAmt) {
- if(dudtYmd.equals("")) {
- dudtYmd = "00000000";
- }
-
- // OCR 2번째줄 54
- // band3 = 국세 + 국세요율(납기후에 추가되는 가산금의 비율) + 시도세 + 시도세요율 + 시군구세 + 시군구세요율
- String band3 = "0000000000"
- + "00"
- + "0000000000"
- + "00"
- + String.format("%011d", sumAmt)
- + "00";
- String ocrVrfcCode = getOcrVrfcCode("35712", band3, 36);
-
- // band4 = 부과월 + 납기후처리 + 납기후금액(12자리)
- // 0=납기후 수납가능, 1=납기후 수납불가, 2=납기 무관, 7~9=납기후 수납가능
- String band4 = dudtYmd.substring(4, 6)
- + "1"
- + String.format("%012d", afterSumAmt);
- ocrVrfcCode = getOcrVrfcCode("57123", band3 + band4, 52);
- band4 = band4 + ocrVrfcCode;
-
- // band5 = 전체 합산해서 검코드 구하기용, 사용하지는 않음
- String band5 = ocr1 + band3 + band4;
- ocrVrfcCode = getOcrVrfcCode("71235", band5, 107);
-
- // band6
- String band6 = band3 + band4 + ocrVrfcCode;
-
- return band6;
- }
-
- public static void setOcrInfo(DataObject dataObject) {
-
- String deptCode = dataObject.string("DEPT_CD");
- String spclBizCd = dataObject.string("SPCL_BIZ_CD");
- String fyr = dataObject.string("FYR");
- String acntgSeCd = dataObject.string("ACNTG_SE_CD");
- String txitmCd = dataObject.string("TXITM_CD");
- String levyNo = dataObject.string("LEVY_NO");
- String ispySn = dataObject.string("ISPY_SN");
- String ocr0 = CmmnUtil.getOcrband1(deptCode, spclBizCd, fyr, acntgSeCd, txitmCd, levyNo, ispySn);
-
- dataObject.set("OCR0", ocr0);
- dataObject.set("OCR0_1", ocr0.substring(0, 17));
- dataObject.set("OCR0_2", ocr0.substring(17));
-
- String levySeCd = dataObject.string("LEVY_SE_CD");
- int sumAmt = dataObject.number("SUM_AMT").intValue(); // 합계 금액
- String dudtYmd = dataObject.string("DUDT_YMD");
- String ocr1 = CmmnUtil.getOcrband2(ocr0, levySeCd, sumAmt, dudtYmd);
- dataObject.set("OCR1", ocr1);
-
- int afterSumAmt = dataObject.number("DUDT_AFTR_AMT").intValue(); // 납기후 금액
- String ocr2 = CmmnUtil.getOcrband3(ocr1, sumAmt, dudtYmd, afterSumAmt);
- dataObject.set("OCR2", ocr2);
- }
-
- public static String getBarcode(String rgSe, String sggCd, String sndngDtlId) {
- String rgSe1 = "";
- if(rgSe.length() > 1) {
- rgSe1 = rgSe.substring(1);
- } else {
- rgSe1 = rgSe;
- }
-
- return "*"+rgSe1+sggCd+sndngDtlId+"*";
- }
-
- public static Long sumByKey(List dataObjectList, String key) {
- return dataObjectList.stream().mapToLong(i -> i.number(key).longValue()).sum();
- }
-
- public static void setBarcode(DataObject dataObject) {
- String recevDivCd = dataObject.string("RECEV_DIV_CD");
- String sggCd = dataObject.string("SGG_CD");
- String sndngDtlId = dataObject.string("SNDNG_DTL_ID");
- String barcode = CmmnUtil.getBarcode(recevDivCd, sggCd, sndngDtlId);
- dataObject.put("BARCODE", barcode);
- dataObject.put("BARCODE1", barcode);
- }
-
- public static float mmToPt(float mm) {
- return mm * 2.83465f;
- }
-
- /**
- * 클라이언트 IP를 반환한다.
- * @param request 서블릿 요청
- * @return 클라이언트 IP
- */
- public static String getClientIpAddr(HttpServletRequest request) {
- String REGEXP_IPV4_ADDR = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";
- String[] headerNames = {"X-Forwarded-For","Proxy-Client-IP","WL-Proxy-Client-IP","HTTP_CLIENT_IP","HTTP_X_FORWARDED_FOR"};
-
- String ip = "";
- for(String headerName : headerNames) {
- ip = request.getHeader(headerName);
- if(ip != null && ip.contains(",")) {
- ip = ip.split(",",-1)[0];
- }
- if(ip != null && Pattern.matches(REGEXP_IPV4_ADDR, ip)) {
- break;
- }
- }
-
- if(ip != null && ip.contains(",")) {
- ip = ip.split(",",-1)[0];
- }
- if(ip == null || !Pattern.matches(REGEXP_IPV4_ADDR, ip)) {
- ip = request.getRemoteAddr();
- }
-
- return ip;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cokr/xit/fims/cmmn/CodeConverter.java b/src/main/java/cokr/xit/fims/cmmn/CodeConverter.java
deleted file mode 100644
index c8421f13..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CodeConverter.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-
-import cokr.xit.base.code.CommonCode;
-import cokr.xit.foundation.data.DataObject;
-
-
-public class CodeConverter {
-
- Map> commonCodes = new HashMap>();
-
- List sggList = new ArrayList();
- List deptList = new ArrayList();
- List vltnList = new ArrayList();
- List userList = new ArrayList();
- List teamList = new ArrayList();
-
- public CodeConverter(Map> commonCodes){
- this.commonCodes = commonCodes;
- }
-
-
- /** 코드값으로 코드를 반환한다.
- * @param codeGroupName 코드그룹명, value 코드값
- * @return 코드
- */
- public String valueToCode(String codeGroupName, String value){
- String result = "";
-
- List commonCodeList = commonCodes.get(codeGroupName);
-
- for(int i = 0; i < commonCodeList.size(); i++) {
- if(value.replaceAll(Matcher.quoteReplacement(" "), "").equals(commonCodeList.get(i).getValue().replaceAll(Matcher.quoteReplacement(" "), ""))) {
- result = commonCodeList.get(i).getCode();
- }
- }
- return result;
- }
-
- /** 코드로 코드값을 반환한다.
- * @param codeGroupName 코드그룹명, code 코드
- * @return 코드값
- */
- public String codeToValue(String codeGroupName, String code){
- String result = "";
-
- List commonCodeList = commonCodes.get(codeGroupName);
-
- for(int i = 0; i < commonCodeList.size(); i++) {
- if(code.equals(commonCodeList.get(i).getCode())) {
- result = commonCodeList.get(i).getValue();
- }
- }
- return result;
- }
-
- /** 코드나 코드명이 비어있을 경우 변환하여 값을 채운다.
- * @param dataObject 맵 데이터, codeGroupName 코드그룹명, codeName 코드가 저장된 키 이름, valueName 코드값이 저장된 키 이름
- * @return
- */
- public void fillIfEmpty(DataObject dataObject, String codeGroupName, String codeName, String valueName) {
- if(!dataObject.string(valueName).equals("") && dataObject.string(codeName).equals("")) {
- dataObject.put(codeName, this.valueToCode(codeGroupName, dataObject.string(valueName)));
- } else if(dataObject.string(valueName).equals("") && !dataObject.string(codeName).equals("")) {
- dataObject.put(valueName, this.codeToValue(codeGroupName, dataObject.string(codeName)));
- }
- }
-
- /** 위반코드로 위반항목명을 반환한다.
- * @param taskSeCd 업무구분코드, vltnCd 위반항목코드
- * @return 위반항목명
- */
- public String vltnCdToValue(String taskSeCd, String vltnCd) {
- String result = "";
- String codeGroup = "";
-
- switch(taskSeCd){
- case "PVS" :
- codeGroup = "FIM004";
- break;
- case "BPV" :
- codeGroup = "FIM005";
- break;
- case "DPV" :
- codeGroup = "FIM006";
- break;
- case "ECA" :
- codeGroup = "FIM061";
- break;
- case "PES" :
- codeGroup = "FIM064";
- break;
- default :
- throw new RuntimeException("위반코드 변환 오류");
- }
-
- List commonCodeList = commonCodes.get(codeGroup);
-
- for(int i = 0; i < commonCodeList.size(); i++) {
- if(vltnCd.equals(commonCodeList.get(i).getCode())) {
- result = commonCodeList.get(i).getValue();
- }
- }
-
- return result;
- }
-
- public void putOtherCode(String type, DataObject dataobject){
- switch(type) {
- case "SGG_CD" :
- this.sggList.add(dataobject);
- break;
- case "DEPT_CD" :
- this.deptList.add(dataobject);
- break;
- case "VLTN_ID" :
- this.vltnList.add(dataobject);
- break;
- case "USER_ID" :
- this.userList.add(dataobject);
- break;
- case "TEAM_ID" :
- this.teamList.add(dataobject);
- break;
- }
- }
-
- public String uniqOtherCodeToValue(String type, String uniqId) {
- String result = "";
-
- List otherCodeList = null;
- switch(type) {
- case "SGG_CD" :
- otherCodeList = this.sggList;
- break;
- case "DEPT_CD" :
- otherCodeList = this.deptList;
- break;
- case "VLTN_ID" :
- otherCodeList = this.vltnList;
- break;
- case "USER_ID" :
- otherCodeList = this.userList;
- break;
- case "TEAM_ID" :
- otherCodeList = this.teamList;
- break;
- }
- if(otherCodeList == null) {
- return result;
- }
-
- for(int i = 0; i < otherCodeList.size(); i++) {
- if(uniqId.equals(otherCodeList.get(i).string(type))) {
- result = otherCodeList.get(i).string("NAME");
- }
- }
-
- return result;
- }
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstry.java b/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstry.java
deleted file mode 100644
index c70c13a7..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstry.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 단속 납부자 이력
- * @author leebj
- */
-@Getter
-@Setter
-public class CrdnPayerHstry extends AbstractEntity {
-
- /**
- * 변경 이력 ID
- */
- private String chgHstryId;
-
- /**
- * 단속 ID
- */
- private String crdnId;
-
- /**
- * 납부자 ID
- */
- private String rtpyrId;
-
- /**
- * 주소 일련번호
- */
- private String addrSn;
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstryQuery.java b/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstryQuery.java
deleted file mode 100644
index 1eebe88b..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CrdnPayerHstryQuery.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-/**단속 납부자 이력 정보 조회 요청
- *
- * 상세 설명:
- *
- *
- * ============ 변경 이력 ============
- * 2023-08-16 leebj 최초 작성
- * ================================
- *
- */
-public class CrdnPayerHstryQuery extends CmmnQuery {
-
- private static final long serialVersionUID = 1L;
-
- private String crdnId; // 단속 ID
- private String rtpyrId; // 납부자 ID
- private String addrSn; // 주소 일련번호
-
- public String getCrdnId() {
- return ifEmpty(crdnId, () -> null);
- }
-
- public T setCrdnId(String crdnId) {
- this.crdnId = crdnId;
- return self();
- }
-
- public String getRtpyrId() {
- return ifEmpty(rtpyrId, () -> null);
- }
-
- public T setRtpyrId(String rtpyrId) {
- this.rtpyrId = rtpyrId;
- return self();
- }
-
- public String getAddrSn() {
- return ifEmpty(addrSn, () -> null);
- }
-
- public T setAddrSn(String addrSn) {
- this.rtpyrId = addrSn;
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstry.java b/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstry.java
deleted file mode 100644
index cfcac2f8..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstry.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-/**단속 상태 이력
-*
-* 상세 설명: 단속 상태 이력 엔티티를 데이터베이스에 저장하는 클래스다.
-*
-*
-* ============ 변경 이력 ============
-* 2023-07-19 JoJH 최초 작성
-* ================================
-*
-*/
-@Getter
-@Setter
-public class CrdnSttsHstry extends AbstractEntity {
-
- /**
- * 상태 이력 ID
- */
- private String sttsHstryId;
-
- /**
- * 단속 ID
- */
- private String crdnId;
-
- /**
- * 이전 상태 코드
- */
- private String bfrSttsCd;
-
- /**
- * 이전 상태 변경 일시
- */
- private String bfrSttsChgDt;
-
- /**
- * 단속 상태 코드
- */
- private String crdnSttsCd;
-
- /**
- * 업무 상세 ID
- */
- private String taskDtlId;
-
- /**
- * 기타 내용
- */
- private String etcCn;
-
- /**
- * 사용 여부
- */
- private String useYn;
-
- /**
- * 등록 일시
- */
- private String regDt;
-
- /**
- * 등록자
- */
- private String rgtr;
-
- /**
- * 수정 일시
- */
- private String mdfcnDt;
-
- /**
- * 수정자
- */
- private String mdfr;
-
- /**
- * 단속 상태 변경 일시 - TB_CRDN(단속)
- */
- private String crdnSttsChgDt;
-
-}
-
diff --git a/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstryQuery.java b/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstryQuery.java
deleted file mode 100644
index df662c7e..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/CrdnSttsHstryQuery.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-/**단속 상태 이력 정보 조회 요청
-*
-* 상세 설명:
-*
-*
-* ============ 변경 이력 ============
-* 2023-07-19 JoJH 최초 작성
-* ================================
-*
-*/
-public class CrdnSttsHstryQuery extends CmmnQuery {
-
- private static final long serialVersionUID = 1L;
-
- private String sttsHstryId; // 상태 이력 ID
- private String crdnId; // 단속 ID
- private String crdnSttsCd; // 단속 상태 코드
- private String taskDtlId; // 업무 상세 ID
-
- public String getSttsHstryId() {
- return ifEmpty(sttsHstryId, () -> null);
- }
-
- public T setSttsHstryId(String sttsHstryId) {
- this.sttsHstryId = sttsHstryId;
-
- return self();
- }
-
- public String getCrdnId() {
- return ifEmpty(crdnId, () -> null);
- }
-
- public T setCrdnId(String crdnId) {
- this.crdnId = crdnId;
-
- return self();
- }
-
- public String getCrdnSttsCd() {
- return ifEmpty(crdnSttsCd, () -> null);
- }
-
- public T setCrdnSttsCd(String crdnSttsCd) {
- this.crdnSttsCd = crdnSttsCd;
-
- return self();
- }
-
- public String getTaskDtlId() {
- return ifEmpty(taskDtlId, () -> null);
- }
-
- public T setTaskDtlId(String taskDtlId) {
- this.taskDtlId = taskDtlId;
-
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/DirectoryStructureToJson.java b/src/main/java/cokr/xit/fims/cmmn/DirectoryStructureToJson.java
deleted file mode 100644
index 0cdfd47d..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/DirectoryStructureToJson.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class DirectoryStructureToJson {
-
- public static Node getNode(File fileNode) throws IOException{
-
- if(fileNode.isDirectory() || fileNode.getName().equals("files")){
- return new Node(fileNode.getName(),"directory", getDirList(fileNode));
- }else{
- return new Node(fileNode.getName(),"file",null);
- }
- }
-
-
- public static List getDirList(File node) throws IOException{
- List children=new ArrayList<>();
- for(File n : node.listFiles()){
- children.add(getNode(n));
- }
- return children;
- }
-
- public static class Node {
- private String text;
- private String type;
- private List children;
-
- public Node() { }
-
- public Node(String text, String type, List children) {
- this.text = text;
- this.type = type;
- this.children = children;
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public List getChildren() {
- return children;
- }
-
- public void setChildren(List children) {
- this.children = children;
- }
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/ExtrArtclStng.java b/src/main/java/cokr/xit/fims/cmmn/ExtrArtclStng.java
deleted file mode 100644
index 48212a8e..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/ExtrArtclStng.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class ExtrArtclStng extends AbstractEntity {
- private String sggCd;
- private String taskSeCd;
- private String tmplatId;
-
- private String extrFormId; //추출항목ID
- private String extrArtclNm; //추출항목명
- private String extrArtclDscrp; //추출항목설명
-
- private String otptArtclSeq; //출력항목순서
- private String leftPstn; //좌측 위치
- private String topPstn; //상단 위치
- private String widthSz; //영역크기 길이
- private String heightSz; //영역크기 높이
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/ExtrForm.java b/src/main/java/cokr/xit/fims/cmmn/ExtrForm.java
deleted file mode 100644
index 8a86ee60..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/ExtrForm.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.util.List;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class ExtrForm extends AbstractEntity {
- private String extrBscId;
- private String sggCd;
- private String taskSeCd;
- private String tmplatId;
- private String mobilePageTmplt;
- private List extrArtclStngList;
- private String[] extrFormIDs;
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/ExtrStngQuery.java b/src/main/java/cokr/xit/fims/cmmn/ExtrStngQuery.java
deleted file mode 100644
index 0db06bd8..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/ExtrStngQuery.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-public class ExtrStngQuery extends CmmnQuery {
-
- private static final long serialVersionUID = 1L;
-
- private String tmplatId;
-
- public String getTmplatId() {
- return ifEmpty(tmplatId, () -> null);
- }
-
- public T setTmplatId(String tmplatId) {
- this.tmplatId = tmplatId;
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/FimsPrintOption.java b/src/main/java/cokr/xit/fims/cmmn/FimsPrintOption.java
deleted file mode 100644
index f6f8ad29..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/FimsPrintOption.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.applib.PrintOption;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class FimsPrintOption extends PrintOption {
-
- /**
- * 업무구분
- */
- private String taskSeCd;
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/Hangul.java b/src/main/java/cokr/xit/fims/cmmn/Hangul.java
deleted file mode 100644
index 2183782c..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/Hangul.java
+++ /dev/null
@@ -1,217 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import org.apache.commons.io.IOUtils;
-
-import com.ibm.icu.text.CharsetDetector;
-import com.ibm.icu.text.CharsetMatch;
-
-public class Hangul {
-
- public Hangul(int hangulIsNByte){
- this.hangulIsNByte = hangulIsNByte;
- }
-
- private int hangulIsNByte;
-
- public int is() {
- return this.hangulIsNByte;
- }
-
- /**
- * 문자열의 바이트 수 구하기
- *
- * @param str
- * @return
- */
- public int getByteLength(String str) {
- if(str == null) {
- return 0;
- }
- int byteLen = 0;
-
- for(int i=0;i 127) || (ch < 0)) {
- byteLen += this.is();
- } else {
- byteLen += 1;
- }
- }
-
- return byteLen;
- }
-
- /**
- * 문자열을 바이트 단위로 패딩
- *
- * @param str
- * @param byteLen
- * @param ch
- * @return
- */
- public String lpadByte(String str, int byteLen, String ch) {
- String result = str;
-
- int strLen = this.getByteLength(str);
-
- for(int i=0; i < byteLen - strLen ; i++) {
- result = ch + result;
- }
-
- return result;
- }
-
- /**
- * 문자열을 바이트 단위로 패딩
- *
- * @param str
- * @param byteLen
- * @param ch
- * @return
- */
- public String rpadByte(String str, int byteLen, String ch) {
- String result = str;
-
- int strLen = this.getByteLength(str);
-
- for(int i=0; i < byteLen - strLen ; i++) {
- result += ch;
- }
-
- return result;
- }
-
- /**
- * 문자열을 바이트 단위로 substring하기
- *
- * @param str
- * @param beginBytes
- * @param endBytes
- * @return
- */
- public String substringByBytes(String str, int beginBytes, int endBytes) {
- if (str == null || str.length() == 0) {
- return "";
- }
-
- if (beginBytes < 0) {
- beginBytes = 0;
- }
-
- if (endBytes < 1) {
- return "";
- }
-
- int len = str.length();
-
- int beginIndex = -1;
- int endIndex = 0;
-
- int curBytes = 0;
- String ch = null;
- for (int i = 0; i < len; i++) {
- ch = str.substring(i, i + 1);
- curBytes += this.getByteLength(ch);
-
-
- if (beginIndex == -1 && curBytes >= beginBytes) {
- beginIndex = i;
- }
-
- if (curBytes > endBytes) {
- break;
- } else {
- endIndex = i + 1;
- }
- }
-
- return str.substring(beginIndex, endIndex);
- }
-
- /**
- * 문자열을 바이트 단위로 substring하기
- *
- * @param str
- * @param beginBytes
- * @return
- */
- public String substringByBytes(String str, int beginBytes) {
- if (str == null || str.length() == 0) {
- return "";
- }
-
- if (beginBytes < 0) {
- beginBytes = 0;
- }
-
- int len = str.length();
-
- int beginIndex = -1;
-
- int curBytes = 0;
- String ch = null;
- for (int i = 0; i < len; i++) {
- ch = str.substring(i, i + 1);
- curBytes += this.getByteLength(ch);
-
-
- if (beginIndex == -1 && curBytes >= beginBytes) {
- beginIndex = i;
- }
-
- }
-
- return str.substring(beginIndex);
- }
-
- /**
- * 텍스트 인코딩 확인
- *
- * @param path
- * @return 캐릭터셋
- */
- public String encodingDetect(String path) throws IOException {
- File f = new File(path);
-
- return encodingDetect(f);
- }
-
- public String encodingDetect(File f) throws IOException {
- CharsetDetector detector;
- CharsetMatch match;
-
- FileInputStream fis = null;
- try {
- String result = "";
-
- fis = new FileInputStream(f);
-
- byte[] byteData = new byte[(int) f.length()];
-
- fis.read(byteData);
- fis.close();
- detector = new CharsetDetector();
-
- detector.setText(byteData);
- match = detector.detect();
-
- System.out.println("encoding is \"" + match.getName() + "\"");
-
- if(match.getName().equals("UTF-8") || match.getName().equals("EUC-KR")) {
- result = match.getName();
- } else {
- result = "EUC-KR";
- }
-
- return result;
- }
- finally {
- IOUtils.closeQuietly(fis);
- }
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OtptArtclStng.java b/src/main/java/cokr/xit/fims/cmmn/OtptArtclStng.java
deleted file mode 100644
index 5d34ea1b..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OtptArtclStng.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class OtptArtclStng extends AbstractEntity {
- private String sggCd;
- private String taskSeCd;
- private String sndngSeCd;
- private String paperSeCd;
-
- private String otptFormId; //출력항목ID
- private String otptArtclNm; //출력항목명
-
- private String otptArtclSeq; //출력항목순서
- private String leftPstn; //좌측 위치
- private String topPstn; //상단 위치
- private String widthSz; //영역크기 길이
- private String heightSz; //영역크기 높이
- private String textSort; //텍스트정렬
- private String lineChgYn; //줄바꿈여부
- private String fontNm; //글꼴명
- private String fontSz; //글자크기
- private String fontColr; //글자색
- private String fontStyle; //글자스타일
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OtptForm.java b/src/main/java/cokr/xit/fims/cmmn/OtptForm.java
deleted file mode 100644
index 6eed04c2..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OtptForm.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.util.List;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class OtptForm extends AbstractEntity {
- private String otptBscId;
- private String sggCd;
- private String taskSeCd;
- private String sndngSeCd;
- private String paperSeCd;
- private String foldLinePstnSeCd;//접는선 위치 구분코드
- private String bcrnImgPath; //배경이미지경로
- private String bcrnImgFileNm; //배경이미지파일
- private String otptPhotoCnt; //출력사진 수
- private List otptArtclStngList;
- private String[] otptFormIDs;
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OtptStngQuery.java b/src/main/java/cokr/xit/fims/cmmn/OtptStngQuery.java
deleted file mode 100644
index ed3273d7..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OtptStngQuery.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-public class OtptStngQuery extends CmmnQuery {
-
- private static final long serialVersionUID = 1L;
-
- //발송구분코드
- private String sndngSeCd;
-
- //출력용지구분코드
- private String paperSeCd;
-
- public String getSndngSeCd() {
- return ifEmpty(sndngSeCd, () -> null);
- }
-
- public T setSndngSeCd(String sndngSeCd) {
- this.sndngSeCd = sndngSeCd;
- return self();
- }
-
- public String getPaperSeCd() {
- return ifEmpty(paperSeCd, () -> null);
- }
-
- public T setPaperSeCd(String paperSeCd) {
- this.paperSeCd = paperSeCd;
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OutsourcingArtclStng.java b/src/main/java/cokr/xit/fims/cmmn/OutsourcingArtclStng.java
deleted file mode 100644
index a60ede7c..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OutsourcingArtclStng.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class OutsourcingArtclStng extends AbstractEntity {
- private String sggCd;
- private String taskSeCd;
- private String sndngSeCd;
-
- private String outsourcingFormId; //항목ID
- private String artclNm; //항목명
-
- private String artclOrdr; //항목순서
- private String artclSz; //항목 바이트수
- private String paddingDirection; //공백방향
- private String formatting; //포매팅
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java b/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java
deleted file mode 100644
index a55b031d..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OutsourcingFileMaker.java
+++ /dev/null
@@ -1,317 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.egovframe.rte.fdl.string.EgovStringUtil;
-
-import cokr.xit.base.file.ZIP;
-import cokr.xit.foundation.Downloadable;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-public class OutsourcingFileMaker {
- protected String printKorName;
- protected FimsPrintOption printOption;
- protected List data;
- protected List printStngItems;
-
- protected String resultZipFilePath;
-
- public OutsourcingFileMaker(String printKorName, FimsPrintOption printOption, List printStngItems,
- List data){
- this.printKorName = printKorName;
- this.printOption = printOption;
- this.data = data;
- this.printStngItems = printStngItems;
- }
-
- /**
- * 서식에서 사용하는 출력항목 중 사용하는 항목만 추출한다.
- */
- public List filterUsedArtcls() {
- List otptArtclNmList = this.printStngItems.stream().map((item) -> { return item.string("ARTCL_NM"); }).toList();
-
- List result = OutsourcingFileMaker.predifinedSetForOutsourcing().stream()
- .filter((item) -> {
- return otptArtclNmList.contains(item.getArtclNm());
- }).toList();
-
- return result;
- }
-
- /**
- * 다운로드 이력에 남길 항목명을 추출한다.
- */
- public List filterDownloadDataNames() {
-
- List result = this.filterUsedArtcls().stream()
- .filter((item) -> {
- return item.isDownloadData();
- })
- .map(PredefinedSet::getArtclDscrp).toList();
-
- return result;
-
- }
-
- public Map makeFile() {
- Map result = new HashMap<>();
-
- Hangul hangul = new Hangul(2);
-
- SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
- String currentTime = ymdhmsFormat.format(new Date());
- String year = currentTime.substring(0, 4);
- String month = currentTime.substring(4, 6);
- String day = currentTime.substring(6, 8);
- String yyyymmdd = year+month+day;
-
- String outsourcingResultPath = "files"+File.separator+"temp"+File.separator+"outsourcing"
- + File.separator + year + File.separator + month + File.separator + day
- + File.separator + currentTime;
-
- File folder = new File(outsourcingResultPath);
- if(!folder.exists()) {
- folder.mkdirs();
- }
-
- try {
-
-
- String imagesFolderName = yyyymmdd + printKorName;
- String metaFileName = yyyymmdd + printKorName + "(외주파일).txt";
-
- String imagesFolderPath = outsourcingResultPath + File.separator + imagesFolderName;
- String metaFilePath = outsourcingResultPath + File.separator + metaFileName;
-
- File imagesFolderPathFile = new File(imagesFolderPath);
- if (!imagesFolderPathFile.exists()) {
- imagesFolderPathFile.mkdirs();
- }
-
- for(int i=0; i < data.size(); i++) {
- DataObject dataObject = data.get(i);
-
- CmmnUtil.setOcrInfo(dataObject);
- CmmnUtil.setBarcode(dataObject);
- String sndngDtlId = dataObject.string("SNDNG_DTL_ID");
-
- int crdnPhotoCnt = dataObject.number("CRDN_PHOTO_CNT").intValue();
-
- for(int j=0; j < crdnPhotoCnt; j++){
- String orgnFilePath = dataObject.string("CRDN_PHOTO"+(j+1));
- String fileKey = dataObject.string("CRDN_PHOTO"+(j+1)+"KEY");
-
- if(EgovStringUtil.null2void(orgnFilePath).equals("")) {
- continue;
- }
-
- if(!orgnFilePath.startsWith("files")) {
- orgnFilePath = CmmnUtil.copyStaticResource(orgnFilePath, false);
- }
-
- File orgnFile = new File(orgnFilePath);
- if(!orgnFile.exists() || !orgnFile.canRead()) {
- continue;
- }
- InputStream orgnFileInputStream = new FileInputStream(orgnFile);
-
- String modifiedFileName = "P"+sndngDtlId+CmmnUtil.indexToAlphabet(j, true, true)+"."+"JPG";
-
- String modifiedFilePath = imagesFolderPath + File.separator + modifiedFileName;
-
- File modifiedFile = new File(modifiedFilePath);
-
- if(dataObject.get("MOS"+fileKey) != null) {
- CmmnUtil.createMaskedImage(orgnFileInputStream, modifiedFile, CmmnUtil.getDataObjectListFromMap(dataObject,"MOS"+fileKey));
- } else {
- Files.copy(orgnFileInputStream, modifiedFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
- }
- dataObject.set("CRDN_PHOTO"+(j+1), modifiedFilePath);
- }
-
- }
-
- File metaFile = new File(metaFilePath);
- if (!metaFile.exists()) {
- if(!metaFile.createNewFile()) {
- throw new RuntimeException("외주파일생성 중 오류가 발생하였습니다.");
- };
- }
- FileWriter fw = new FileWriter(metaFile);
- BufferedWriter writer = new BufferedWriter(fw);
-
-
- for(int i=0; i < data.size(); i++) {
- DataObject dataObject = data.get(i);
-
- if(i != 0) {
- writer.write("\n");
- }
- String line = "";
- for(DataObject printStngItem : printStngItems){
- String artclNm = printStngItem.string("ARTCL_NM");
- int byteCnt = printStngItem.number("ARTCL_SZ").intValue();
- String artclValue = "";
-
- //조회한 데이터와 관련없는 항목(출력일시 등)
- if(artclNm.equals("OTPT_YMD") || artclNm.equals("OTPT_YEAR")
- || artclNm.equals("OTPT_MONTH") || artclNm.equals("OTPT_DAY")) {
- switch(artclNm) {
- case "OTPT_YMD" :
- artclValue = yyyymmdd;
- break;
- case "OTPT_YEAR" :
- artclValue = year;
- break;
- case "OTPT_MONTH" :
- artclValue = month;
- break;
- case "OTPT_DAY" :
- artclValue = day;
- break;
- }
-
- } else {
-
- artclValue = dataObject.string(artclNm);
- }
-
- //포매팅
- if(!printStngItem.string("FORMATTING").equals("")) {
- String formatting = printStngItem.string("FORMATTING");
- switch (formatting) {
- case "zip(hypen)": {
- artclValue = CmmnUtil.zipCodeFormat(artclValue);
- break;
- }
- case "rgNo(hypen)": {
- artclValue = CmmnUtil.rgNoFormat(artclValue);
- break;
- }
- case "amount(comma)": {
- artclValue = DataFormat.n_nn0(artclValue);
- break;
- }
- default:
- if(formatting.startsWith("date(")) {
- String dtlFormatting = formatting.substring(5, formatting.length()-1);
-
- if(dtlFormatting.contains("~") && artclValue.contains("~")) {
- String from = CmmnUtil.dateNFormat(artclValue.split("~",-1)[0], dtlFormatting.split("~",-1)[0]);
- String to = CmmnUtil.dateNFormat(artclValue.split("~",-1)[1], dtlFormatting.split("~",-1)[1]);
-
- artclValue = from + "~" + to;
- } else {
- artclValue = CmmnUtil.dateNFormat(artclValue, dtlFormatting);
- }
- }
- }
-
- }
-
- //공백 패딩 방향
- if(printStngItem.string("PADDING_DIRECTION").equals("left")) {
- line += hangul.lpadByte(artclValue, byteCnt, " ");
- } else {
- line += hangul.rpadByte(artclValue, byteCnt, " ");
- }
-
- }
- writer.write(line);
- }
-
- writer.close();
-
- String zipFileName = yyyymmdd + printKorName + ".zip";
- String zipFilePath = outsourcingResultPath + File.separator + zipFileName;
-
- ZIP zip = new ZIP();
- zip.compress(zipFilePath, metaFilePath, imagesFolderPath);
-
- metaFile.delete();
- File[] images = imagesFolderPathFile.listFiles();
- for(File image : images) {
- image.delete();
- }
- imagesFolderPathFile.delete();
-
- resultZipFilePath = zipFilePath;
- result.put("download", this.getDownloadable().setFilename(zipFileName));
- result.put("downloadData", data);
- result.put("dataNames", this.filterDownloadDataNames());
- } catch(FileNotFoundException e) {
- throw new RuntimeException("파일을 찾을 수 없습니다.");
- } catch (IOException e) {
- throw new RuntimeException("외주파일생성 중 오류가 발생하였습니다.");
- }
-
- return result;
- }
-
-
- public void write(OutputStream out) {
- try {
- FileInputStream fis = new FileInputStream(resultZipFilePath);
- fis.transferTo(out);
- fis.close();
- new File(resultZipFilePath).delete();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public Downloadable getDownloadable() {
- return new Downloadable()
- .setContentType("application/zip")
- .setWriter(this::write);
- }
-
- public static List predifinedSetForOutsourcing() {
- List predefinedSetList = new ArrayList<>();
- predefinedSetList.add(new PredefinedSet("SNDNG_DTL_ID", "발송상세아이디").offLog());
- predefinedSetList.add(new PredefinedSet("VLTN_LAW_NM", "위반법명"));
- predefinedSetList.add(new PredefinedSet("BARCODE", "바코드").offLog());
- predefinedSetList.add(new PredefinedSet("CRDN_DT", "단속일시"));
- predefinedSetList.add(new PredefinedSet("DUDT_YMD", "납부기한"));
- predefinedSetList.add(new PredefinedSet("VHRNO", "차량번호"));
- predefinedSetList.add(new PredefinedSet("FFNLG_CARMDL_NM", "과태료차종명"));
- predefinedSetList.add(new PredefinedSet("VHCL_NM", "차량명"));
- predefinedSetList.add(new PredefinedSet("CRDN_PLC", "단속장소"));
- predefinedSetList.add(new PredefinedSet("RTPYR_ADDR", "납부자기본주소"));
- predefinedSetList.add(new PredefinedSet("RTPYR_DTL_ADDR", "납부자상세주소"));
- predefinedSetList.add(new PredefinedSet("RTPYR_ZIP", "납부자우편번호"));
- predefinedSetList.add(new PredefinedSet("RTPYR_NM", "납부자명"));
- predefinedSetList.add(new PredefinedSet("OPNN_RANGE", "의견진술기간"));
- predefinedSetList.add(new PredefinedSet("CRDN_SE_NM", "단속구분명"));
- predefinedSetList.add(new PredefinedSet("ATCH_FILE_CNT", "첨부파일갯수"));
- predefinedSetList.add(new PredefinedSet("FFNLG_CRDN_AMT", "과태료단속금액"));
- predefinedSetList.add(new PredefinedSet("SUM_AMT", "합계금액"));
- predefinedSetList.add(new PredefinedSet("RG_NO", "등기번호"));
- predefinedSetList.add(new PredefinedSet("OCR0", "OCR0").offLog());
- predefinedSetList.add(new PredefinedSet("OCR0_1", "OCR0_1").offLog());
- predefinedSetList.add(new PredefinedSet("OCR0_2", "OCR0_2").offLog());
- predefinedSetList.add(new PredefinedSet("OCR_BAND1", "OCR_BAND1").offLog());
- predefinedSetList.add(new PredefinedSet("OCR_BAND2", "OCR_BAND2").offLog());
- predefinedSetList.add(new PredefinedSet("BANK_NM", "가상계좌은행명"));
- predefinedSetList.add(new PredefinedSet("VR_ACTNO", "가상계좌"));
- predefinedSetList.add(new PredefinedSet("EPAYNO", "전자납부번호"));
- predefinedSetList.add(new PredefinedSet("EMPTY", "공백").offLog());
- return predefinedSetList;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OutsourcingForm.java b/src/main/java/cokr/xit/fims/cmmn/OutsourcingForm.java
deleted file mode 100644
index df1fc82b..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OutsourcingForm.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import java.util.List;
-
-import cokr.xit.foundation.AbstractEntity;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class OutsourcingForm extends AbstractEntity {
-
- private String outsourcingBscId;
- private String sggCd;
- private String taskSeCd;
- private String sndngSeCd;
- private List zipArtclStngList;
- private String[] outsourcingFormIDs;
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/OutsourcingStngQuery.java b/src/main/java/cokr/xit/fims/cmmn/OutsourcingStngQuery.java
deleted file mode 100644
index eb22b896..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/OutsourcingStngQuery.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-public class OutsourcingStngQuery extends CmmnQuery {
-
- private static final long serialVersionUID = 1L;
-
- //발송구분코드
- private String sndngSeCd;
-
- public String getSndngSeCd() {
- return ifEmpty(sndngSeCd, () -> null);
- }
-
- public T setSndngSeCd(String sndngSeCd) {
- this.sndngSeCd = sndngSeCd;
- return self();
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java b/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java
deleted file mode 100644
index 1d804481..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class PredefinedSet {
- public PredefinedSet(String artclNm, String artclDscrp) {
- this.artclNm = artclNm;
- this.artclDscrp = artclDscrp;
- this.downloadData = true;
- }
- protected String artclNm;
- protected String artclDscrp;
- protected boolean downloadData; //다운로드 이력 기재 항목 여부
-
- /**
- * 해당 항목을 다운로드 이력 제외 항목으로 설정한다.
- */
- public PredefinedSet offLog() {
- this.downloadData = false;
- return this;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/Pstn.java b/src/main/java/cokr/xit/fims/cmmn/Pstn.java
deleted file mode 100644
index 338f1ff1..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/Pstn.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class Pstn {
- public Pstn(float left, float top){
- this.left = left;
- this.top = top;
- }
-
- private float left;
- private float top;
-
- public float[] to2Float() {
- return new float[] { this.left, this.top };
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/PstnAndSize.java b/src/main/java/cokr/xit/fims/cmmn/PstnAndSize.java
deleted file mode 100644
index 59f6a77b..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/PstnAndSize.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class PstnAndSize {
- public PstnAndSize(float left, float top, float width, float height){
- this.left = left;
- this.top = top;
- this.width = width;
- this.height = height;
- }
-
- public PstnAndSize(Pstn pstn, Size size){
- this.left = pstn.getLeft();
- this.top = pstn.getTop();
- this.width = size.getWidth();
- this.height = size.getHeight();
- }
-
- public PstnAndSize(Pstn pstn, float width, float height){
- this.left = pstn.getLeft();
- this.top = pstn.getTop();
- this.width = width;
- this.height = height;
- }
-
- public PstnAndSize(float left, float top, Size size){
- this.left = left;
- this.top = top;
- this.width = size.getWidth();
- this.height = size.getHeight();
- }
-
- private float left;
- private float top;
- private float width;
- private float height;
-
- public Pstn getPstn() {
- return new Pstn(this.left, this.top);
- }
- public Size getSize() {
- return new Size(this.width, this.height);
- }
-
- public float[] to4Float() {
- return new float[] { this.left, this.top, this.width, this.height };
- }
-
- public PstnAndSize x2Width() {
- this.width = this.width * 2.0f;
- return this;
- }
- public PstnAndSize x2Height() {
- this.height = this.height * 2.0f;
- return this;
- }
-
- public PstnAndSize transXY(float transX, float transY) {
- this.left = this.left * transX;
- this.top = this.top * transY;
- this.width = this.width * transX;
- this.height = this.height * transY;
- return this;
- }
-
- public PstnAndSize addPstn(Pstn pstn) {
- this.left = this.left + pstn.getLeft();
- this.top = this.top + pstn.getTop();
- return this;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/Size.java b/src/main/java/cokr/xit/fims/cmmn/Size.java
deleted file mode 100644
index 2eb74b3d..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/Size.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class Size {
- public Size(float width, float height){
- this.width = width;
- this.height = height;
- }
-
- private float width;
- private float height;
-
- public float[] to2Float() {
- return new float[] { this.width, this.height };
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/UnnamedItems.java b/src/main/java/cokr/xit/fims/cmmn/UnnamedItems.java
deleted file mode 100644
index b440573d..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/UnnamedItems.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package cokr.xit.fims.cmmn;
-
-public class UnnamedItems {
-
- protected String[] items;
-
- public void set(int i, String str) {
- this.items[i-1] = str;
- }
- public String[] get() {
- return this.items;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/CrdnPayerHstryMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/CrdnPayerHstryMapper.java
deleted file mode 100644
index 1f2917db..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/CrdnPayerHstryMapper.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.fims.cmmn.CrdnPayerHstry;
-import cokr.xit.fims.cmmn.CrdnPayerHstryQuery;
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-/** 단속 납부자 이력 정보 DAO
- *
- * 상세 설명:
- *
- *
- * ============ 변경 이력 ============
- * 2023-08-16 leebj 최초 작성
- * ================================
- *
- */
-@Mapper("crdnPayerHstryMapper")
-public interface CrdnPayerHstryMapper extends AbstractMapper {
-
- /**지정한 조건에 따라 단속 납부자 이력 목록을 조회하여 반환한다.
- * @param req 단속 납부자 이력 조회 조건
- * @return 단속 납부자 이력 목록
- */
- List selectCrdnPayerHstryList(CrdnPayerHstryQuery req);
-
- /**지정한 조건에 따라 단속 납부자 이력 객체들을 반환한다.
- * @param req 단속 납부자 이력 조회 조건
- * @return 단속 납부자 이력 객체 목록
- */
- List selectCrdnPayerHstrys(CrdnPayerHstryQuery req);
-
- /**단속 납부자 이력 정보를 등록한다.
- * @param params 파라미터
- * - "crdnPayerHstry" - 단속 납부자 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int insertCrdnPayerHstry(Map params);
-
- /**단속 납부자 이력 정보를 등록한다.
- * @param crdnPayerHstry 단속 납부자 이력
- * @return 저장 여부
- * - 저장됐으면 true
- * - 그렇지 않으면 false
- *
- */
- default boolean insertCrdnPayerHstry(CrdnPayerHstry crdnPayerHstry) {
- return crdnPayerHstry != null && insertCrdnPayerHstry(params().set("crdnPayerHstry", crdnPayerHstry)) == 1;
- }
-
- /**단속 납부자 주소 이력 정보를 등록한다.
- * @param params 파라미터
- * - "crdnPayerHstry" - 단속 납부자 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int insertCrdnPayerAddrHstry(Map params);
-
- /**단속 납부자 주소 이력 정보를 등록한다.
- * @param crdnPayerHstry 단속 납부자 이력
- * @return 저장 여부
- * - 저장됐으면 true
- * - 그렇지 않으면 false
- *
- */
- default boolean insertCrdnPayerAddrHstry(CrdnPayerHstry crdnPayerHstry) {
- return crdnPayerHstry != null && insertCrdnPayerAddrHstry(params().set("crdnPayerAddrHstry", crdnPayerHstry)) == 1;
- }
-
- /**단속(TB_CRDN) 대장의 납부자 ID를 수정한다.
- * @param params 파라미터
- * - "crdnPayerHstry" - 단속 납부자 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int updateCrdnRtpyrId(Map params);
-
- /**단속(TB_CRDN) 대장의 납부자 ID를 수정한다.
- * @param crdnPayerHstry 단속 납부자 이력
- * @return 저장 여부
- * - 저장됐으면 true
- * - 그렇지 않으면 false
- *
- */
- default boolean updateCrdnPayer(CrdnPayerHstry crdnPayerHstry) {
- return crdnPayerHstry != null && updateCrdnRtpyrId(params().set("crdnPayerHstry", crdnPayerHstry)) == 1;
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/CrdnSttsHstryMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/CrdnSttsHstryMapper.java
deleted file mode 100644
index 3d4e7d84..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/CrdnSttsHstryMapper.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.List;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-import cokr.xit.fims.cmmn.CrdnSttsHstry;
-import cokr.xit.fims.cmmn.CrdnSttsHstryQuery;
-
-/** 단속 상태 이력 정보 DAO
- *
- * 상세 설명:
- *
- *
- * ============ 변경 이력 ============
- * 2023-07-19 JoJH 최초 작성
- * ================================
- *
- */
-@Mapper("crdnSttsHstryMapper")
-public interface CrdnSttsHstryMapper extends AbstractMapper {
- /**지정한 조건에 따라 단속 상태 이력 목록을 조회하여 반환한다.
- * @param req 단속 상태 이력 조회 조건
- * @return 단속 상태 이력 목록
- */
- List selectCrdnSttsHstryList(CrdnSttsHstryQuery req);
-
- /**지정한 조건에 따라 단속 상태 이력 객체들을 반환한다.
- * @param req 단속 상태 이력 조회 조건
- * @return 단속 상태 이력 객체 목록
- */
- List selectCrdnSttsHstrys(CrdnSttsHstryQuery req);
-
- /**지정한 조건에 따라 단속 상태 이력 객체의 마지막 1개를 반환한다.
- * @param crdnId 단속 ID
- * @return 지정한 단속 ID의 단속 상태 이력 객체
- */
- default DataObject selectCrdnSttsHstryInfo(String crdnId, String crdnSttsCd, String useYn) {
- CrdnSttsHstryQuery req = new CrdnSttsHstryQuery();
-
- req.setCrdnId(crdnId);
- req.setCrdnSttsCd(crdnSttsCd);
- req.setUseYn(useYn);
- req.setOrderBy("STTS_HSTRY_ID DESC");
-
- List crdnSttsHstrys = selectCrdnSttsHstrys(req);
-
- return !crdnSttsHstrys.isEmpty() ? crdnSttsHstrys.get(0) : null;
- }
-
- /**단속 상태 이력 정보를 등록한다.
- * @param params 파라미터
- * - "crdnSttsHstry" - 단속 상태 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int insertCrdnSttsHstry(CrdnSttsHstry crdnSttsHstry);
-
- /**단속 상태 이력 정보를 수정한다.
- * @param params 파라미터
- * - "crdnSttsHstry" - 단속 상태 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int updateCrdnSttsHstry(CrdnSttsHstry crdnSttsHstry);
-
- /**지정한 단속 상태 이력을 삭제한다.
- * @param params 파라미터
- * - "crdnSttsHstry" - 단속 상태 이력
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int deleteCrdnSttsHstry(CrdnSttsHstry crdnSttsHstry);
-
- /**단속(TB_CRDN) 대장의 단속 상태 코드를 수정한다.
- * @param params 파라미터
- * - "excl01" - 부과 제외 대장
- * - "currentUser" - 현재 접속한 사용자
- *
- * @return 저장된 정보수
- */
- int updateCrdnSttsCd(CrdnSttsHstry crdnSttsHstry);
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/ExtrStngMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/ExtrStngMapper.java
deleted file mode 100644
index f20af81a..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/ExtrStngMapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.List;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.fims.cmmn.ExtrArtclStng;
-import cokr.xit.fims.cmmn.ExtrForm;
-import cokr.xit.fims.cmmn.ExtrStngQuery;
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-@Mapper("extrStngMapper")
-public interface ExtrStngMapper extends AbstractMapper {
-
- /**지정한 조건에 따라 자료 추출 템플릿 문구를 조회한다.
- * @param query 자료 추출 설정 조회 조건
- * @return 자료 추출 템플릿 문구
- */
- DataObject selectExtrBscStng(ExtrStngQuery extrStngQuery);
-
- int insertBscStng(ExtrForm extrForm);
-
- int updateBscStng(ExtrForm extrForm);
-
- /**지정한 조건에 따라 추출 항목 설정을 조회한다.
- * @param query 자료 추출 설정 조회 조건
- * @return 자료 추출 설정 항목
- */
- List selectExtrArtclStngList(ExtrStngQuery extrStngQuery);
-
- int updateArtclStng(ExtrArtclStng update);
-
- int deleteArtclStng(ExtrForm extrForm);
-
- int insertArtclStng(ExtrArtclStng insert);
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/LinkMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/LinkMapper.java
deleted file mode 100644
index eec5b003..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/LinkMapper.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-@Mapper("linkMapper")
-public interface LinkMapper extends AbstractMapper {
-
- /**전자고지 발송 마스터 정보를 등록한다.
- * @param params 전자고지 발송 마스터 정보
- * @return 저장여부
- */
- int insertElectronicNoticeSndngMaster(DataObject params);
-
- /**전자고지 발송 디테일 정보를 등록한다.
- * @param params 전자고지 발송 디테일 정보
- * @return 저장여부
- */
- int insertElectronicNoticeSndngDetail(DataObject params);
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/OtptStngMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/OtptStngMapper.java
deleted file mode 100644
index f9c9e109..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/OtptStngMapper.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.List;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.fims.cmmn.OtptArtclStng;
-import cokr.xit.fims.cmmn.OtptForm;
-import cokr.xit.fims.cmmn.OtptStngQuery;
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-@Mapper("otptStngMapper")
-public interface OtptStngMapper extends AbstractMapper {
-
- /**지정한 조건에 따라 출력물 전역 설정을 조회한다.
- * @param query 출력물 설정 조회 조건
- * @return 출력물 전역 설정
- */
- DataObject selectOtptBscStng(OtptStngQuery otptStngQuery);
-
- int insertBscStng(OtptForm otptForm);
-
- int updateBscStng(OtptForm otptForm);
-
- /**지정한 조건에 따라 출력 항목 설정을 조회한다.
- * @param query 출력물 설정 조회 조건
- * @return 출력물 설정 항목
- */
- List selectOtptArtclStngList(OtptStngQuery query);
-
- int updateArtclStng(OtptArtclStng update);
-
- int deleteArtclStng(OtptForm otptForm);
-
- int insertArtclStng(OtptArtclStng insert);
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/OutsourcingStngMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/OutsourcingStngMapper.java
deleted file mode 100644
index 5ff65439..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/OutsourcingStngMapper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.List;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.fims.cmmn.OutsourcingArtclStng;
-import cokr.xit.fims.cmmn.OutsourcingForm;
-import cokr.xit.fims.cmmn.OutsourcingStngQuery;
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-@Mapper("outsourcingStngMapper")
-public interface OutsourcingStngMapper extends AbstractMapper {
-
- /**지정한 조건에 따라 외주파일 출력 항목 설정을 조회한다.
- * @param query 출력물 설정 조회 조건
- * @return 출력물 설정 항목
- */
- List selectArtclStngList(OutsourcingStngQuery query);
-
- int updateArtclStng(OutsourcingArtclStng update);
-
- int deleteArtclStng(OutsourcingForm outsourcingForm);
-
- int insertArtclStng(OutsourcingArtclStng insert);
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/StngMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/StngMapper.java
deleted file mode 100644
index 9ca289d8..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/dao/StngMapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package cokr.xit.fims.cmmn.dao;
-
-import java.util.Map;
-
-import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
-
-import cokr.xit.foundation.component.AbstractMapper;
-import cokr.xit.foundation.data.DataObject;
-
-@Mapper("stngMapper")
-public interface StngMapper extends AbstractMapper {
-
- /**사용자의 기본 업무를 조회한다.
- * @param userId 유저ID
- * @return 기본업무
- */
- DataObject selectDefaultTask(String userId);
-
- /**사용자 설정 정보를 조회한다.
- * @param userId 사용자ID
- * @return 사용자 설정정보
- */
- DataObject selectUserStng(String userId);
-
- /**부서 설정 정보를 조회한다.
- * @param deptCd 부서코드
- * @return 부서 설정정보
- */
- DataObject selectDeptStng(String deptCd);
-
- /**시군구 설정 정보를 조회한다.
- * @param sggCd 시군구코드
- * @return 시군구 설정정보
- */
- DataObject selectSggStng(String sggCd);
-
- /**교부 계좌번호를 변경한다.
- * @param params 교부계좌 변경 정보
- * @return 저장여부
- */
- int updateDtbnActno(Map params);
-
- /**사용자의 기본 업무를 등록한다.
- * @param params 사용자 설정 정보
- * @return 저장여부
- */
- int insertDefaultTask(Map params);
-
- /**사용자의 기본 업무를 변경한다.
- * @param params 사용자 설정 정보
- * @return 저장여부
- */
- int updateDefaultTask(Map params);
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/ftp/FTPUtil.java b/src/main/java/cokr/xit/fims/cmmn/ftp/FTPUtil.java
deleted file mode 100644
index 87e85121..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/ftp/FTPUtil.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package cokr.xit.fims.cmmn.ftp;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-
-import org.apache.commons.net.ftp.FTPClient;
-import org.apache.commons.net.ftp.FTPFile;
-import org.apache.commons.net.ftp.FTPReply;
-
-public class FTPUtil {
- public static boolean fileDown(RemoteSystemInfo rs, String remoteWorkPath, String downloadRoot) {
-
- File f = new File(downloadRoot + remoteWorkPath);
- f.mkdirs();
-
- FTPClient client = null;
-
- String thisSystemFileSeperator = File.separator;
-
- String remoteSystemFileSeparator = rs.getOsType().equals("linux") ? "/" : "\\";
-
- if(!thisSystemFileSeperator.equals(remoteSystemFileSeparator)) {
- remoteWorkPath = remoteWorkPath.replaceAll(
- Matcher.quoteReplacement(thisSystemFileSeperator),
- Matcher.quoteReplacement(remoteSystemFileSeparator)
- );
- }
-
- client = new FTPClient();
- client.setControlEncoding("UTF-8");
- try {
- client.connect(rs.getIp(), Integer.parseInt(rs.getPort()));
- } catch (Exception e) {
- throw new RuntimeException("접속 오류.");
- }
-
- // 접속을 확인.
- int resultCode = client.getReplyCode();
- if (!FTPReply.isPositiveCompletion(resultCode)) {
- throw new RuntimeException("접속 오류 : FTP server refused connection.");
- }
-
- try {
- client.setSoTimeout(1000);
- } catch (Exception e) {
- throw new RuntimeException("접속 오류.");
- }
-
- boolean loginResult = false;
- try {
- // 로그인을 한다.
- loginResult = client.login(rs.getId(), rs.getPw());
- } catch (Exception e) {
- throw new RuntimeException("로그인 오류 : Login Error");
- }
-
- if (!loginResult) {
- throw new RuntimeException("로그인 오류 : Login Error");
- }
-
- List remoteFiles = new ArrayList<>();
- List remoteDirectories = new ArrayList<>();
-
- // FTP에서 파일 리스트와 디렉토리 정보를 취득한다.
- if (!FTPUtil.getFileList(client, remoteSystemFileSeparator, remoteWorkPath, remoteFiles, remoteDirectories)) {
- // 리스트 취득 실패시 프로그램을 종료한다.
- throw new RuntimeException("파일 조회 오류 발생 : File search Error");
- }
-
- for (String remoteDirectory : remoteDirectories) {
- System.out.println("디렉토리-"+remoteDirectory);
-
- String newFolderPath = "";
- if(thisSystemFileSeperator.equals(remoteSystemFileSeparator)) {
- newFolderPath = downloadRoot + remoteDirectory;
- } else {
- newFolderPath = downloadRoot + remoteDirectory.replaceAll(
- Matcher.quoteReplacement(remoteSystemFileSeparator),
- Matcher.quoteReplacement(thisSystemFileSeperator)
- );
- }
-
- File folder = new File(newFolderPath);
- folder.mkdirs();
- }
-
-
- for (String remoteFile : remoteFiles) {
- System.out.println("파일-"+remoteFile);
-
- String tempFileOutputPath = "";
-
- if(thisSystemFileSeperator.equals(remoteSystemFileSeparator)) {
- tempFileOutputPath = downloadRoot + remoteFile;
- } else {
- tempFileOutputPath = downloadRoot + remoteFile.replaceAll(
- Matcher.quoteReplacement(remoteSystemFileSeparator),
- Matcher.quoteReplacement(thisSystemFileSeperator)
- );
- }
-
-
- try (FileOutputStream fo = new FileOutputStream(tempFileOutputPath)){
- //FTPClient의 retrieveFile함수로 보내면 다운로드가 이루어 진다.
- if (client.retrieveFile(remoteFile, fo)) {
- System.out.println("Download - " + remoteFile);
- }
- } catch(Exception e) {
- throw new RuntimeException("파일 다운로드 오류");
- }
-
- }
-
- try {
- client.disconnect();
- } catch(Exception e) {
- throw new RuntimeException("파일 다운로드 오류");
- }
- return true;
- }
-
- // FTP의 파일 리스트와 디렉토리 정보를 취득하는 함수.
- public static boolean getFileList(FTPClient client, String fileSeparator, String work, List files, List directories) {
-
- // FTP의 디렉토리 커서를 이동한다.
- try {
- if (client.changeWorkingDirectory(work)) {
-
- // 해당 디렉토리의 파일 리스트를 취득한다.
- for (FTPFile file : client.listFiles()) {
-
- if (!file.isFile()) {
- // 디렉토리리면 함수의 재귀적 방식으로 하위 탐색을 시작한다.
- if(!getFileList(client, fileSeparator, work + file.getName() + fileSeparator, files, directories)) {
- return false;
- }
-
- // directories 리스트에 디렉토리 경로를 추가한다.
- directories.add(work + file.getName() + fileSeparator);
- } else {
- // files 리스트에 경로를 추가한다.
- files.add(work + file.getName());
- }
-
- }
- // FTP의 디렉토리 커서를 상위로 이동하는 함수
- // client.changeToParentDirectory();
-
- // FTP의 디렉토리 커서를 이동한다.
- return client.changeWorkingDirectory(fileSeparator);
-
- }
- } catch (IOException e) {
- throw new RuntimeException("ftp오류."+e);
- }
-
- // 커서 이동에 실패하면 false를 리턴한다.
- return false;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/ftp/RemoteSystemInfo.java b/src/main/java/cokr/xit/fims/cmmn/ftp/RemoteSystemInfo.java
deleted file mode 100644
index 98174301..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/ftp/RemoteSystemInfo.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cokr.xit.fims.cmmn.ftp;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class RemoteSystemInfo {
- String ip;
- String port;
- String id;
- String pw;
- String osType;
- String workPath;
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java
deleted file mode 100644
index f360a3fa..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.util.List;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-/**
- * 단속확인서
- */
-public class CrdnConfirm extends HWPFormat {
-
- public CrdnConfirm(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = dataObjectList.size();
- this.formatFilePath = "template/hwp/crdnConfirm.hwp";
- this.print.setFormatKorName("단속확인서");
- this.print.setFormatName("crdnConfirm");
- }
-
- @Override
- public List getDownloadDataNames() {
- return List.of("과태료구분","차량번호","단속일시","위반내용","단속장소","단속동","단속조","소유자명","소유자주소");
- }
-
-
-
- @Override
- public void runAsWriter() {
-
-
- String printRequestYmd = print.getPrintRequestDt().substring(0, 8);
- String yyyy = printRequestYmd.substring(0, 4);
- String mm = printRequestYmd.substring(4, 6);
- String dd = printRequestYmd.substring(6, 8);
- String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
-
- String instNm = OgdpUtil.getInstituteLeader((String)print.getPrintRequestUserInfo().getInfo().get("instNm"), false);
-
-
- DataObject one = data.get(currentRunCount);
- DataObject newObj = (DataObject) new DataObject()
- .set("과태료", one.string("TASK_SE_NM"))
- .set("차량번호", one.string("VHRNO"))
- .set("단속일시", DataFormat.yyyy_mm_dd_hh_mm_ss(one.string("CRDN_YMD_TM")))
- .set("위반내용", one.string("VLTN_ARTCL"))
- .set("단속장소", one.string("CRDN_PLC"))
- .set("단속동", one.string("CRDN_STDG_NM"))
- .set("단속조", one.string("TEAM_NM"))
- .set("소유자", one.string("RTPYR_NM"))
- .set("주소", one.string("RTPYR_FULL_ADDR"))
- .set("우편번호", one.string("RTPYR_ZIP"))
- .set("연월일", ymd)
- .set("발신", instNm);
-
- if(!one.string("PHOTO1").equals("")) {
- newObj.set("왼쪽위사진", writer.image().add(one.string("PHOTO1")));
- }
- if(!one.string("PHOTO2").equals("")) {
- newObj.set("오른쪽위사진", writer.image().add(one.string("PHOTO2")));
- }
- if(!one.string("PHOTO3").equals("")) {
- newObj.set("왼쪽아래사진", writer.image().add(one.string("PHOTO3")));
- }
- if(!one.string("PHOTO4").equals("")) {
- newObj.set("오른쪽아래사진", writer.image().add(one.string("PHOTO4")));
- }
-
- writer.table(0, 0, 13).setValues(List.of(newObj));
-
- }
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java
deleted file mode 100644
index 101482b9..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.IntStream;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-/**
- * 단속내역서
- */
-public class CrdnList extends HWPFormat {
-
- public CrdnList(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = 1;
- this.formatFilePath = "template/hwp/crdnList.hwp";
- this.print.setFormatKorName("단속내역서");
- this.print.setFormatName("crdnList");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("과태료구분");
- list.add("시군구명");
- list.add("단속일시");
- list.add("단속장소");
- list.add("차량번호");
- list.add("대체차량번호");
- list.add("고지번호");
- list.add("부과금액");
- list.add("가상계좌번호");
- list.add("전자납부번호");
- list.add("처리상태");
- list.add("처리일자");
- list.add("납부기한");
- list.add("수납일자");
- return list;
- }
-
-
-
- @Override
- public void runAsWriter() {
-
- String globalRtpyrNm = data.get(0).string("RTPYR_NM");
- String globalRtpyrNo = data.get(0).string("RTPYR_NO");
- String globalRtpyrFullAddr = data.get(0).string("RTPYR_FULL_ADDR");
- int globalTotalAmount = data.stream().mapToInt(i -> i.number("LEVY_AMT").intValue()).sum();
-
- writer.setValue("출력일시", DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()));
- writer.setValue("성명", globalRtpyrNm);
- if(print.getPrivateInfoYn(printOption)) {
- writer.setValue("주민번호", globalRtpyrNo);
- } else {
- writer.setValue("주민번호", "*************");
- }
- writer.setValue("주소", globalRtpyrFullAddr);
- writer.setValue("총건수", DataFormat.n_nn0(this.data.size()));
- writer.setValue("총금액", DataFormat.n_nn0(globalTotalAmount));
-
- String instNm = (String) print.getPrintRequestUserInfo().getInfo().get("instNm");
- instNm = OgdpUtil.getLastWord(instNm);
- writer.setValue("발신", instNm);
-
- List list = IntStream.rangeClosed(1, this.data.size()).boxed().map(i -> {
- DataObject one = data.get(i-1);
- return (DataObject) new DataObject()
- .set("과태료", one.string("TASK_SE_NM"))
- .set("시군구명", one.string("SGG_NM"))
- .set("단속일시", DataFormat.yyyy_mm_dd_hh_mm_ss(one.string("CRDN_YMD_TM")))
- .set("단속장소", one.string("CRDN_PLC"))
- .set("차량번호", one.string("VHRNO"))
- .set("대체차량번호", one.string("RPM_SZR_VHRNO"))
- .set("고지번호", one.string("GOJI_NO"))
- .set("금액", DataFormat.n_nn0(one.string("LEVY_AMT")))
- .set("가상계좌번호", one.string("VR_ACTNO"))
- .set("전자납부번호", one.string("EPAYNO"))
- .set("처리상태", one.string("CRDN_STTS_NM"))
- .set("처리일자", DataFormat.yyyy_mm_dd(one.string("CRDN_STTS_CHG_DT").substring(0, 8)))
- .set("납부기한", DataFormat.yyyy_mm_dd(one.string("DUDT_YMD")))
- .set("수납일자", DataFormat.yyyy_mm_dd(one.string("RCVMT_YMD")));
- }).toList();
- writer.table(2, 0, 3).setValues(list);
-
-
- }
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CvlcptOrgn.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CvlcptOrgn.java
deleted file mode 100644
index b9503ceb..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CvlcptOrgn.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.base.docs.hwp.HWPWriter;
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-import kr.dogfoot.hwplib.object.HWPFile;
-
-
-public class CvlcptOrgn extends HWPFormat {
- private List data2 = null;
-
- public CvlcptOrgn(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = 1;
- this.formatFilePath = "template/hwp/cvlcptOrgnl_text.hwp";
- this.print.setFormatKorName("민원원본내역");
- this.print.setFormatName("cvlcptOrgnl");
-
- this.data2 = new ArrayList();
- if(!dataObjectList.get(0).string("PHOTO0").equals("")) {
-
- int photoCnt = dataObjectList.get(0).number("ORGN_PHOTO_CNT").intValue();
- int PHOTO_COUNT_PER_PAGE = 4;
-
- for(int i=0; i < photoCnt; i += PHOTO_COUNT_PER_PAGE) {
-
- DataObject photoObj = new DataObject();
-
- photoObj.set("PHOTO1", dataObjectList.get(0).string("PHOTO"+i));
- if(i+1 < photoCnt)
- photoObj.set("PHOTO2", dataObjectList.get(0).string("PHOTO"+(i+1)));
- if(i+2 < photoCnt)
- photoObj.set("PHOTO3", dataObjectList.get(0).string("PHOTO"+(i+2)));
- if(i+3 < photoCnt)
- photoObj.set("PHOTO4", dataObjectList.get(0).string("PHOTO"+(i+3)));
-
- data2.add(photoObj);
- }
- }
- }
-
- @Override
- public List getDownloadDataNames() {
- return List.of("접수번호","신청자","접수일자","처리기한","민원목록번호","민원내용");
- }
-
- @Override
- public HWPFormat makeFile(){
- HWPFile hwpFile = HWPWriter.classpath(this.formatFilePath);
- this.writer = new HWPWriter(hwpFile);
-
- runAsWriter();
- String tempPath = this.print.pathForNewFile();
- writer.write(tempPath);
- resultFilesPath.add(tempPath);
-
- writer = null;
- currentRunCount++;
-
- if(data2 != null && data2.size() > 0) {
-
- formatFilePath = "template/hwp/cvlcptOrgnl_photo.hwp";
- maxRunCount = data2.size()+1;
-
- while(currentRunCount != maxRunCount) {
- HWPFile hwpFile_i = HWPWriter.classpath(this.formatFilePath);
- this.writer = new HWPWriter(hwpFile_i);
- runAsWriter();
- String tempPath_i = this.print.pathForNewFile();
- writer.write(tempPath_i);
- resultFilesPath.add(tempPath_i);
-
- writer = null;
- currentRunCount++;
- }
- }
-
- this.merge();
-
- return this;
- }
-
-
-
- @Override
- public void runAsWriter() {
-
- if(this.formatFilePath.equals("template/hwp/cvlcptOrgnl_text.hwp")) {
-
- DataObject one = data.get(0);
-
- writer.setValue("신청자", one.string("CVLCPT_APLCNT_NM"));
- writer.setValue("접수일자", DataFormat.yyyy_mm_dd(one.string("CVLCPT_RCPT_YMD")));
-
- String cvlcptRrcsPrnmntDt = one.string("CVLCPT_PRCS_PRNMNT_DT");
- if(cvlcptRrcsPrnmntDt.length() > 8) {
- cvlcptRrcsPrnmntDt = cvlcptRrcsPrnmntDt.substring(0, 8);
- }
-
- writer.setValue("처리기한", DataFormat.yyyy_mm_dd(cvlcptRrcsPrnmntDt));
- writer.setValue("접수번호", one.string("CVLCPT_RCPT_NO"));
- writer.setValue("목록번호", one.string("CVLCPT_LIST_NO"));
-
- String cvlcptAplyCn = one.string("CVLCPT_APLY_CN");
- cvlcptAplyCn = CmmnUtil.escapeHTMLEntity(cvlcptAplyCn);
- writer.setValue("민원내용", cvlcptAplyCn);
-
- } else {
-
- DataObject one = data2.get(currentRunCount-1);
- DataObject newObj = new DataObject();
- if(!one.string("PHOTO1").equals("")) {
- newObj.set("왼쪽위사진", writer.image().add(one.string("PHOTO1")));
- }
- if(!one.string("PHOTO2").equals("")) {
- newObj.set("오른쪽위사진", writer.image().add(one.string("PHOTO2")));
- }
- if(!one.string("PHOTO3").equals("")) {
- newObj.set("왼쪽아래사진", writer.image().add(one.string("PHOTO3")));
- }
- if(!one.string("PHOTO4").equals("")) {
- newObj.set("오른쪽아래사진", writer.image().add(one.string("PHOTO4")));
- }
- writer.table(0, 0, 2).setValues(List.of(newObj));
-
- }
-
- }
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java
deleted file mode 100644
index 23fb53e5..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.foundation.data.DataObject;
-
-public class DlbrDecsnList extends HWPFormat {
-
- public DlbrDecsnList(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = dataObjectList.size();
- this.formatFilePath = "template/hwp/opnnDlbrDecsnForm.hwp";
- this.print.setFormatKorName("의견제출심의결의서");
- this.print.setFormatName("dlbrDecsnList");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("접수번호");
- list.add("접수일");
- list.add("위반정보");
- list.add("진술자명");
- list.add("진술자생년월일");
- list.add("소유주관계");
- list.add("진술자주소");
- list.add("진술자연락처");
- list.add("차량번호");
- list.add("단속일시");
- list.add("단속장소");
- list.add("의견체출내용");
- return list;
- }
-
-
-
- @Override
- public void runAsWriter() {
-
- DataObject one = data.get(currentRunCount);
-
- writer.setValue("접수번호", one.string("RCPT_NO_MASK"));
- writer.setValue("접수일", one.string("RCPT_YMD_MASK"));
- writer.setValue("위반정보", one.string("TASK_SE_NM"));
- writer.setValue("진술자명", one.string("STTR_NM"));
- writer.setValue("진술자생년월일", one.string("STTR_BRDT_MASK"));
- writer.setValue("진술자연락처", one.string("STTR_CTTPC"));
- writer.setValue("소유주관계", one.string("OWNR_REL_NM"));
- writer.setValue("진술자주소", one.string("STTR_WHOL_ADDR"));
- writer.setValue("차량번호", one.string("VHRNO"));
- writer.setValue("단속일시", one.string("CRDN_YMD_TM_MASK"));
- writer.setValue("단속장소", one.string("CRDN_PLC"));
- writer.setValue("의견제출내용", one.string("OPNN_SBMSN_CN"));
- writer.setValue("심의회원직급1", one.string("DLBR_MBR_JBGD1"));
- writer.setValue("심의회원명1", one.string("DLBR_MBR_NM1"));
- writer.setValue("심의회원직급2", one.string("DLBR_MBR_JBGD2"));
- writer.setValue("심의회원명2", one.string("DLBR_MBR_NM2"));
- writer.setValue("심의회원직급3", one.string("DLBR_MBR_JBGD3"));
- writer.setValue("심의회원명3", one.string("DLBR_MBR_NM3"));
- writer.setValue("심의회원직급4", one.string("DLBR_MBR_JBGD4"));
- writer.setValue("심의회원명4", one.string("DLBR_MBR_NM4"));
- writer.setValue("심의회원직급5", one.string("DLBR_MBR_JBGD5"));
- writer.setValue("심의회원명5", one.string("DLBR_MBR_NM5"));
- writer.setValue("심의회원직급6", one.string("DLBR_MBR_JBGD6"));
- writer.setValue("심의회원명6", one.string("DLBR_MBR_NM6"));
- writer.setValue("심의회원직급7", one.string("DLBR_MBR_JBGD7"));
- writer.setValue("심의회원명7", one.string("DLBR_MBR_NM7"));
- writer.setValue("담당자검토의견", one.string("PIC_RVW_OPNN"));
-
-
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java
deleted file mode 100644
index 648ee649..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-/**
- * 납부확인서
- */
-public class RcvmtConfirm extends HWPFormat {
-
- public RcvmtConfirm(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
-
- this.maxRunCount = dataObjectList.size();
- this.formatFilePath = "template/hwp/rcvmtConfirm.hwp";
- print.setFormatKorName("납부확인서");
- print.setFormatName("rcvmtConfirm");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("위반명");
- list.add("위반차량");
- list.add("대체차량");
- list.add("위반금액");
- list.add("단속일자");
- list.add("단속장소");
- list.add("소유자");
- list.add("주민번호");
- list.add("소유자주소");
- list.add("고지번호");
- list.add("수납일자");
- list.add("수납금액");
- return list;
- }
-
-
-
- @Override
- public void runAsWriter() {
-
- String instNm = OgdpUtil.getInstituteLeader((String) print.getPrintRequestUserInfo().getInfo().get("instNm"), false);
-
-
- DataObject one = data.get(currentRunCount);
- DataObject newObj = (DataObject) new DataObject()
- .set("위반명1", one.string("TASK_SE_NM"))
- .set("위반명2", one.string("TASK_SE_NM"))
- .set("위반차량", one.string("VHRNO"))
- .set("대체차량", one.string("RPM_SZR_VHRNO"))
- .set("위반금액", DataFormat.n_nn0(one.string("FFNLG_AMT")))
- .set("단속일자", DataFormat.yyyy_mm_dd(one.string("CRDN_YMD")))
- .set("단속장소", one.string("CRDN_PLC"))
- .set("소유자", one.string("RTPYR_NM"))
- .set("주민번호", one.string("RTPYR_NO"))
- .set("주소", one.string("RTPYR_FULL_ADDR"))
- .set("고지번호", one.string("GOJI_NO"))
- .set("수납일자", DataFormat.yyyy_mm_dd(one.string("RCVMT_YMD")))
- .set("수납금액", DataFormat.n_nn0(one.string("RCVMT_AMT")))
- .set("연월일시분초", DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()))
- .set("확인자", print.getPrintRequestUserInfo().getName())
- .set("발신", instNm)
- ;
-
-
- writer.table(0, 0, 12).setValues(List.of(newObj));
-
-
- }
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java
deleted file mode 100644
index 3956d1d6..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.BiConsumer;
-import java.util.stream.IntStream;
-
-import org.egovframe.rte.fdl.string.EgovStringUtil;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.OffcsCellFinder;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-import kr.dogfoot.hwplib.object.bodytext.control.table.Cell;
-import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
-
-/**
- * 채권신고서
- */
-public class ReportOnClaims extends HWPFormat {
-
- public ReportOnClaims(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = 1;
- this.formatFilePath = "template/hwp/reportOnClaims.hwp";
- this.print.setFormatKorName("채권신고서");
- this.print.setFormatName("reportOnClaims");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("과세번호");
- list.add("법정기일");
- list.add("세목");
- list.add("세액");
- list.add("가산금");
- list.add("합계");
- return list;
- }
-
-
-
- @Override
- public void runAsWriter() {
-
- Map globalVariable = printOption.getGlobalVariable();
-
- String offcsFilePath = EgovStringUtil.null2void(globalVariable.get("offcsFilePath"));
- if(!offcsFilePath.equals("")) {
- BiConsumer bc = writer.image().add(offcsFilePath);
-
- Cell cell = OffcsCellFinder.find(writer);
- if(cell != null) {
- Paragraph para = cell.getParagraphList().getParagraph(0);
- int width = (int)cell.getListHeader().getWidth(),
- height = (int)cell.getListHeader().getHeight();
- bc.accept(para, new Rectangle(1, 1, width, height));
- }
-
- }
-
- writer.setValue("주소", globalVariable.get("deptAddr"));
- writer.setValue("전화", globalVariable.get("deptTelno"));
- writer.setValue("팩스", globalVariable.get("deptFxno"));
- writer.setValue("담당자", print.getPrintRequestUserInfo().getName());
- writer.setValue("사건번호", EgovStringUtil.null2void(globalVariable.get("caseNo")));
- writer.setValue("체납자성명", EgovStringUtil.null2void(globalVariable.get("rtpyrNm")));
- writer.setValue("체납자번호", EgovStringUtil.null2void(globalVariable.get("rtpyrNo")));
- writer.setValue("체납자주소", EgovStringUtil.null2void(globalVariable.get("rtpyrFullAddr")));
- int sumOfList = data.stream().mapToInt(item -> item.number("SUM_AMT").intValue()).sum();
- writer.setValue("채권청구액", DataFormat.n_nn0(sumOfList));
- writer.setValue("합계금액", DataFormat.n_nn0(sumOfList));
- writer.setValue("합계금액한글", CmmnUtil.convertNumberToHangul(sumOfList));
-
- String printRequestYmd = print.getPrintRequestDt().substring(0, 8);
- String yyyy = printRequestYmd.substring(0, 4);
- String mm = printRequestYmd.substring(4, 6);
- String dd = printRequestYmd.substring(6, 8);
- String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
- writer.setValue("연월일", ymd);
-
- String instNm = (String) print.getPrintRequestUserInfo().getInfo().get("instNm");
- instNm = OgdpUtil.getLastWord(instNm);
- instNm = OgdpUtil.getInstituteLeader(instNm, false);
- writer.setValue("발신", instNm);
-
- List list = IntStream.rangeClosed(1, this.data.size()).boxed().map(i -> {
- DataObject one = data.get(i-1);
- DataObject newObj = (DataObject) new DataObject()
- .set("년도", one.string("FYR"))
- .set("과세번호", one.string("GOJI_NO"))
- .set("법정기일", DataFormat.yyyy_mm_dd(one.string("DUDT_YMD")))
- .set("세목", one.string("TXITM_NM"))
- .set("세액", DataFormat.n_nn0(one.string("LEVY_PCPTAX")))
- .set("가산금", DataFormat.n_nn0(one.string("LEVY_ADAMT")))
- .set("합계", DataFormat.n_nn0(one.string("SUM_AMT")));
- return newObj;
- }).toList();
- writer.table(0, 9, 2).setValues(list);
-
- }
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java
deleted file mode 100644
index 03f26809..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.BiConsumer;
-import java.util.stream.IntStream;
-
-import org.egovframe.rte.fdl.string.EgovStringUtil;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.OffcsCellFinder;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-import kr.dogfoot.hwplib.object.bodytext.control.table.Cell;
-import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
-
-/**
- * 교부청구서
- */
-public class RequestForDelivery extends HWPFormat {
-
- public RequestForDelivery(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = 1;
- this.formatFilePath = "template/hwp/requestForDelivery.hwp";
- this.print.setFormatKorName("교부청구서");
- this.print.setFormatName("requestForDelivery");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("징수과목");
- list.add("고지번호");
- list.add("과태료계");
- list.add("법정기일");
- return list;
- }
-
-
-
-
- @Override
- public void runAsWriter() {
-
- Map globalVariable = printOption.getGlobalVariable();
-
- String offcsFilePath = EgovStringUtil.null2void(globalVariable.get("offcsFilePath"));
- if(!offcsFilePath.equals("")) {
- BiConsumer bc = writer.image().add(offcsFilePath);
-
- Cell cell = OffcsCellFinder.find(writer);
- if(cell != null) {
- Paragraph para = cell.getParagraphList().getParagraph(0);
- int width = (int)cell.getListHeader().getWidth(),
- height = (int)cell.getListHeader().getHeight();
- bc.accept(para, new Rectangle(1, 1, width, height));
- }
-
- }
-
-
- writer.setValue("문서번호", EgovStringUtil.null2void(globalVariable.get("docNo")));
- writer.setValue("사건번호", EgovStringUtil.null2void(globalVariable.get("caseNo")));
- writer.setValue("수신", EgovStringUtil.null2void(globalVariable.get("receiver")));
- writer.setValue("체납자성명", EgovStringUtil.null2void(globalVariable.get("rtpyrNm")));
- writer.setValue("체납자번호", EgovStringUtil.null2void(globalVariable.get("rtpyrNo")));
- writer.setValue("차량번호", EgovStringUtil.null2void(globalVariable.get("vhrno")));
- writer.setValue("주소", EgovStringUtil.null2void(globalVariable.get("rtpyrFullAddr")));
-
- int sumOfList = data.stream().mapToInt(item -> item.number("SUM_AMT").intValue()).sum();
- writer.setValue("합계금액", DataFormat.n_nn0(sumOfList));
- writer.setValue("교부청구금액", DataFormat.n_nn0(sumOfList));
- writer.setValue("교부청구금액한글", CmmnUtil.convertNumberToHangul(sumOfList));
- writer.setValue("개설은행", EgovStringUtil.null2void(globalVariable.get("dtbnBankNm")));
- writer.setValue("계좌번호", EgovStringUtil.null2void(globalVariable.get("dtbnActno")));
-
- String instNm = (String) print.getPrintRequestUserInfo().getInfo().get("instNm");
- String deptNm = (String) print.getPrintRequestUserInfo().getInfo().get("deptNm");
- writer.setValue("예금주", instNm + " " + deptNm);
-
- String printRequestYmd = print.getPrintRequestDt().substring(0, 8);
- String yyyy = printRequestYmd.substring(0, 4);
- String mm = printRequestYmd.substring(4, 6);
- String dd = printRequestYmd.substring(6, 8);
- String ymd = yyyy+"년 "+mm+"월 "+dd+"일";
- writer.setValue("연월일", ymd);
-
- instNm = OgdpUtil.getLastWord(instNm);
- instNm = OgdpUtil.getInstituteLeader(instNm, false);
- writer.setValue("발신", instNm);
-
- List list = IntStream.rangeClosed(1, this.data.size()).boxed().map(i -> {
- DataObject one = data.get(i-1);
- DataObject newObj = (DataObject) new DataObject()
- .set("징수과목", one.string("TXITM_NM"))
- .set("고지번호", one.string("GOJI_NO"))
- .set("과태료계", DataFormat.n_nn0(one.string("SUM_AMT")))
- .set("법정기일", DataFormat.yyyy_mm_dd(one.string("DUDT_YMD")))
- ;
- return newObj;
- }).toList();
- writer.table(0, 9, 1).setValues(list);
-
- }
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java
deleted file mode 100644
index 176daacd..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package cokr.xit.fims.cmmn.hwp.format;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.function.BiConsumer;
-import java.util.stream.IntStream;
-
-import org.egovframe.rte.fdl.string.EgovStringUtil;
-
-import cokr.xit.applib.Print;
-import cokr.xit.applib.hwp.OffcsCellFinder;
-import cokr.xit.applib.hwp.format.HWPFormat;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.foundation.data.DataObject;
-import kr.dogfoot.hwplib.object.bodytext.control.table.Cell;
-import kr.dogfoot.hwplib.object.bodytext.paragraph.Paragraph;
-
-public class SvbtcList extends HWPFormat {
-
- public SvbtcList(Print print, FimsPrintOption printOption, List dataObjectList) {
- super(print, printOption, dataObjectList);
- this.maxRunCount = 1;
- this.formatFilePath = "template/hwp/svbtcList.hwp";
- this.print.setFormatKorName("공시송달");
- this.print.setFormatName("svbtc");
- }
-
- @Override
- public List getDownloadDataNames() {
- List list = new ArrayList<>();
- list.add("수령인명");
- list.add("수령인주소");
- list.add("차량번호");
- list.add("위반일자");
- list.add("위반장소");
- list.add("반송일자");
- list.add("반송사유");
- return list;
- }
-
-
- @Override
- public void runAsWriter() {
-
- String offcsFilePath = EgovStringUtil.null2void(data.get(0).string("OFFCS_FILE_PATH"));
- if(!offcsFilePath.equals("")) {
- BiConsumer bc = writer.image().add(offcsFilePath);
-
- Cell cell = OffcsCellFinder.find(writer);
- if(cell != null) {
- Paragraph para = cell.getParagraphList().getParagraph(0);
- int width = (int)cell.getListHeader().getWidth(),
- height = (int)cell.getListHeader().getHeight();
- bc.accept(para, new Rectangle(1, 1, width, height));
- }
- }
-
- writer.setValue("문서번호", data.get(0).string("INPUT_DOC_NO"));
- writer.setValue("제목", data.get(0).string("INPUT_TTL_NM"));
- writer.setValue("공고기간", data.get(0).string("INPUT_SVBTC_DATE"));
- writer.setValue("기관장", data.get(0).string("INST_LEADER"));
- writer.setValue("부서명", data.get(0).string("SGG_DEPT_NM"));
- writer.setValue("부서전화번호", "☎" + data.get(0).string("DEPT_TELNO"));
-
-
- List list = IntStream.rangeClosed(1, this.data.size()).boxed().map(i -> {
- DataObject one = data.get(i-1);
- return (DataObject) new DataObject()
- .set("성명", one.string("RCPN_NM_MASK"))
- .set("주소", one.string("WHOL_ADDR_MASK"))
- .set("차량번호", one.string("VHRNO_MASK"))
- .set("위반장소", one.string("CRDN_PLC"))
- .set("위반일자", one.string("CRDN_DT"))
- .set("반송일자", one.string("DLVR_YMD_MASK"))
- .set("반송사유", one.string("UNDLVR_RSN_NM"))
- ;
- }).toList();
- writer.table(2, 2, 2).setValues(list);
-
- }
-
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractImageEngine.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractImageEngine.java
deleted file mode 100644
index 09fe5cd2..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractImageEngine.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction;
-
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Base64;
-import java.util.List;
-
-import javax.imageio.ImageIO;
-
-import org.apache.pdfbox.contentstream.PDFStreamEngine;
-import org.apache.pdfbox.contentstream.operator.DrawObject;
-import org.apache.pdfbox.contentstream.operator.Operator;
-import org.apache.pdfbox.contentstream.operator.OperatorName;
-import org.apache.pdfbox.contentstream.operator.state.Concatenate;
-import org.apache.pdfbox.contentstream.operator.state.Restore;
-import org.apache.pdfbox.contentstream.operator.state.Save;
-import org.apache.pdfbox.contentstream.operator.state.SetGraphicsStateParameters;
-import org.apache.pdfbox.contentstream.operator.state.SetMatrix;
-import org.apache.pdfbox.cos.COSBase;
-import org.apache.pdfbox.cos.COSName;
-import org.apache.pdfbox.pdmodel.graphics.PDXObject;
-import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject;
-import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
-import org.apache.pdfbox.util.Matrix;
-
-public class ExtractImageEngine extends PDFStreamEngine {
-
- private List base64List = new ArrayList();
-
- public List getBase64List() {
- return base64List;
- }
-
- public void clearBase64List() {
- this.base64List = new ArrayList();
- }
-
- /**
- * Default constructor.
- *
- * @throws IOException If there is an error loading text stripper properties.
- */
- public ExtractImageEngine() throws IOException {
- addOperator(new Concatenate(this));
- addOperator(new DrawObject(this));
- addOperator(new SetGraphicsStateParameters(this));
- addOperator(new Save(this));
- addOperator(new Restore(this));
- addOperator(new SetMatrix(this));
- }
-
-
- /**
- * This is used to handle an operation.
- *
- * @param operator The operation to perform.
- * @param operands The list of arguments.
- *
- * @throws IOException If there is an error processing the operation.
- */
- @Override
- protected void processOperator( Operator operator, List operands) throws IOException {
- String operation = operator.getName();
- if (OperatorName.DRAW_OBJECT.equals(operation)) {
- COSName objectName = (COSName) operands.get( 0 );
- PDXObject xobject = getResources().getXObject( objectName );
- if( xobject instanceof PDImageXObject) {
- PDImageXObject image = (PDImageXObject)xobject;
- int imageWidth = image.getWidth();
- int imageHeight = image.getHeight();
- System.out.println("*******************************************************************");
- System.out.println("Found image [" + objectName.getName() + "]");
-
- Matrix ctmNew = getGraphicsState().getCurrentTransformationMatrix();
- float imageXScale = ctmNew.getScalingFactorX();
- float imageYScale = ctmNew.getScalingFactorY();
-
- // position in user space units. 1 unit = 1/72 inch at 72 dpi
- System.out.println("position in PDF = " + ctmNew.getTranslateX() + ", " + ctmNew.getTranslateY() + " in user space units");
- // raw size in pixels
- System.out.println("raw image size = " + imageWidth + ", " + imageHeight + " in pixels");
- // displayed size in user space units
- System.out.println("displayed size = " + imageXScale + ", " + imageYScale + " in user space units");
- // displayed size in inches at 72 dpi rendering
- imageXScale /= 72;
- imageYScale /= 72;
- System.out.println("displayed size = " + imageXScale + ", " + imageYScale + " in inches at 72 dpi rendering");
- // displayed size in millimeters at 72 dpi rendering
- imageXScale *= 25.4f;
- imageYScale *= 25.4f;
- System.out.println("displayed size = " + imageXScale + ", " + imageYScale + " in millimeters at 72 dpi rendering");
-
- if(imageXScale > 30 && imageYScale > 30 && imageXScale < 120 && imageYScale < 120) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- BufferedImage buffImage = image.getImage();
- ImageIO.write(buffImage, "png", baos);
- byte[] bytesimage = baos.toByteArray();
- String imageStr = Base64.getEncoder().encodeToString(bytesimage);
- base64List.add(imageStr);
- }
- System.out.println();
- } else if(xobject instanceof PDFormXObject) {
- PDFormXObject form = (PDFormXObject)xobject;
- showForm(form);
- }
- } else {
- super.processOperator( operator, operands);
- }
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractText.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractText.java
deleted file mode 100644
index 61cd9738..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/ExtractText.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction;
-
-import java.awt.geom.Rectangle2D;
-import java.io.IOException;
-import java.util.regex.Pattern;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.PDPage;
-import org.apache.pdfbox.text.PDFTextStripper;
-import org.apache.pdfbox.text.PDFTextStripperByArea;
-
-public class ExtractText {
-
- public static final String REGEXP_PATTERN_NUMBER = "^[\\d]*$";
-
- public static String getExtractByStng(PDDocument document, int pageNum,
- float x, float y, float w, float h) {
-
- try {
- PDFTextStripperByArea textStripper = new PDFTextStripperByArea();
-
- Rectangle2D rect = new java.awt.geom.Rectangle2D.Float(x, y, w, h);
- textStripper.addRegion("region", rect);
-
- PDPage docPage = document.getPage(pageNum-1);
-
- textStripper.extractRegions(docPage);
-
- String textForRegion = textStripper.getTextForRegion("region");
-
- System.out.println("영역지정으로 추출된 텍스트");
- System.out.println(textForRegion);
-
- return textForRegion;
-
- } catch (IOException e) {
-
- throw new RuntimeException("자료추출 오류."+e);
- }
-
- }
-
-
- public static String getExtractEpayNo(PDDocument pdDocument, int pageNum) {
- String epayNo = "";
-
- PDFTextStripper Tstripper = new PDFTextStripper();
-
- Tstripper.setStartPage(pageNum);
- Tstripper.setEndPage(pageNum);
- String summaryText = null;
-
- try {
- summaryText = Tstripper.getText(pdDocument);
- } catch (IOException e) {
- throw new RuntimeException("자료추출 오류."+e);
- }
-
- String[] textArr = summaryText.split("\r?\n|\r");
-
- for(int i=0; i < textArr.length; i++) {
- boolean isNumber = Pattern.matches(REGEXP_PATTERN_NUMBER, textArr[i]);
- if(isNumber) {
- if(textArr[i].length() == 19) {
- epayNo = textArr[i];
- }
- }
- }
- return epayNo;
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/Extraction.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/Extraction.java
deleted file mode 100644
index ee2f0d97..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/Extraction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction;
-
-import java.util.List;
-import java.util.Map;
-
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class Extraction {
-
- /**
- * 페이지번호
- */
- int page;
-
- /**
- * 단속사진 base64 문자열
- */
- List base64List;
-
- /**
- * 텍스트 항목
- */
- Map textItem;
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java
deleted file mode 100644
index 6558cda1..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.pdfbox.Loader;
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.PDPage;
-import org.apache.pdfbox.pdmodel.PDPageTree;
-
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.foundation.data.DataObject;
-
-public class PDFExtractionUtil {
- public static List extract(String pdfPath, List extractStngs) {
-
- List extractList = new ArrayList();
-
- File file = null;
- try {
- file = new File(pdfPath);
- } catch (Exception e2) {
- throw new RuntimeException("자료추출 오류."+e2);
- }
- PDDocument pdDocument = null;
- try {
- pdDocument = Loader.loadPDF(file);
- } catch (IOException e) {
- throw new RuntimeException("자료추출 오류."+e);
- }
-
-
- PDPageTree pages = pdDocument.getPages();
- int pageCount = pages.getCount();
-
- int pageIndex = 0;
-
- Extraction extraction = new Extraction();
-
- for(;pageIndex < pageCount; pageIndex++) {
-
- Map textItem = new HashMap();
-
- extraction = new Extraction();
- extraction.setPage(pageIndex+1);
-
- for(DataObject extractStng : extractStngs) {
-
- float x = CmmnUtil.mmToPt(extractStng.number("LEFT_PSTN").floatValue());
- float y = CmmnUtil.mmToPt(extractStng.number("TOP_PSTN").floatValue());
- float w = CmmnUtil.mmToPt(extractStng.number("WIDTH_SZ").floatValue());
- float h = CmmnUtil.mmToPt(extractStng.number("HEIGHT_SZ").floatValue());
-
- String text0 = ExtractText.getExtractByStng(pdDocument, pageIndex+1, x, y, w, h);
- textItem.put(extractStng.string("EXTR_ARTCL_NM"), text0);
- }
-
- extraction.setTextItem(textItem);
-
-
- PDPage page = pages.get(pageIndex);
- List b64imageList = new ArrayList<>();
- try {
- ExtractImageEngine printer = new ExtractImageEngine();
- printer.processPage(page);
- b64imageList = printer.getBase64List();
- printer.clearBase64List();
-
- } catch (IOException e1) {
- throw new RuntimeException("자료추출 오류."+e1);
- }
- extraction.setBase64List(b64imageList);
-
-
- extractList.add(extraction);
- }
-
- return extractList;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java
deleted file mode 100644
index 6d1c82c6..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction.format;
-
-import java.util.ArrayList;
-
-import cokr.xit.fims.cmmn.PredefinedSet;
-
-/**
- * 전자고지
- */
-public class ElectronicNotice extends PDFExtractFormat {
-
- public ElectronicNotice(){
- this.predefinedSetList = new ArrayList();
- predefinedSetList.add(new PredefinedSet("photoArea","사진영역"));
- predefinedSetList.add(new PredefinedSet("vhcleNo","차량번호"));
- predefinedSetList.add(new PredefinedSet("ihidnum","주민번호"));
- predefinedSetList.add(new PredefinedSet("moblphonNo","휴대폰번호"));
- predefinedSetList.add(new PredefinedSet("nm","성명"));
- predefinedSetList.add(new PredefinedSet("adres","주소"));
- predefinedSetList.add(new PredefinedSet("detailAdres","상세주소"));
- predefinedSetList.add(new PredefinedSet("zip","우편번호"));
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java
deleted file mode 100644
index e5da748b..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.extraction.format;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import cokr.xit.fims.cmmn.PredefinedSet;
-import cokr.xit.foundation.data.DataObject;
-
-public abstract class PDFExtractFormat {
-
- protected List predefinedSetList = new ArrayList();
-
- public void appendPredefinedYn(List extrArtclStngList) {
-
- if(extrArtclStngList!=null && !extrArtclStngList.isEmpty()) {
-
- List prototypeStngs = this.getPredefinedSetList();
-
- for(DataObject extrArtclStng : extrArtclStngList) {
- String extrArtclNm = (String) extrArtclStng.get("EXTR_ARTCL_NM");
-
- List prototypeStng = prototypeStngs.stream().filter(item -> item.getArtclNm().equals(extrArtclNm)).toList();
- if(prototypeStng != null && !prototypeStng.isEmpty()) {
- extrArtclStng.set("PREDEFINED_YN", "Y");
- } else {
- extrArtclStng.set("PREDEFINED_YN", "N");
- }
- }
- }
-
-
- }
-
- public List getPredefinedSetList(){
- return this.predefinedSetList;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java
deleted file mode 100644
index 2171964a..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print;
-
-import cokr.xit.fims.cmmn.PredefinedSet;
-import cokr.xit.fims.cmmn.Pstn;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Setter
-public class DefaultOtptArtclStng extends PredefinedSet {
- /**
- * 기본 출력 요소 생성
- */
- public DefaultOtptArtclStng(String componentType, String artclNm, String artclDscrp, String otptBscVl){
- super(artclNm, artclDscrp);
-
- this.componentType = componentType;
- this.otptBscVl=otptBscVl;
-
- this.widthSz=0;
- this.heightSz=0;
-
- this.fontNm="gulimche";
- this.fontSz=10;
- this.fontColr="BLACK";
- this.fontStyle="FILL";
-
- this.textSort = "left";
- this.lineChgYn = "N";
-
- this.forPost = false;
- this.unique = false;
-
- }
-
- /**
- * 용지가 A4일 때의 기본위치를 설정한다. 해당 출력요소는 1장의 출력물에서 1개만 존재한다.
- */
- public DefaultOtptArtclStng a4(float leftPstn, float topPstn) {
- this.a4 = new Pstn(leftPstn, topPstn);
- this.unique = true;
- return this;
- }
-
- /**
- * 용지가 레터일 때의 기본위치를 설정한다. 해당 출력요소는 1장의 출력물에서 1개만 존재한다.
- */
- public DefaultOtptArtclStng letter(float leftPstn, float topPstn) {
- this.letter = new Pstn(leftPstn, topPstn);
- this.unique = true;
- return this;
- }
-
- /**
- * 해당 출력요소를 우편물과 관련된 출력요소로 설정한다.
- */
- public DefaultOtptArtclStng post() {
- this.forPost = true;
- return this;
- }
-
- @Override
- public DefaultOtptArtclStng offLog() {
- this.downloadData = false;
- return this;
- }
-
- /**
- * 출력요소의 기본 텍스트정렬을 설정한다.
- */
- public DefaultOtptArtclStng align(String alignValue) {
- this.textSort = alignValue;
- return this;
- }
-
- /**
- * 출력요소의 기본 영역크기를 설정한다.
- */
- public DefaultOtptArtclStng size(float width, float height) {
- this.widthSz = width;
- this.heightSz = height;
- return this;
- }
-
- /**
- * 출력요소의 기본 글꼴을 설정한다.
- */
- public DefaultOtptArtclStng font(String fontNm, int fontSz, String fontColr, String fontStyle) {
- this.fontNm = fontNm;
- this.fontSz = fontSz;
- this.fontColr = fontColr;
- this.fontStyle = fontStyle;
- return this;
- }
-
- /**
- * 출력요소의 x축 위치정보를 가져온다.
- */
- public float getLeftPstn(String paper) {
- switch (paper) {
- case "01": {
- return this.getA4().getLeft();
- }
- case "02": {
- return this.getLetter().getLeft();
- }
- }
- return 0;
- }
-
- /**
- * 출력요소의 y축 위치정보를 가져온다.
- */
- public float getTopPstn(String paper) {
- switch (paper) {
- case "01": {
- return this.getA4().getTop();
- }
- case "02": {
- return this.getLetter().getTop();
- }
- }
- return 0;
- }
-
- private String componentType; //컴포넌트 유형(텍스트 또는 이미지)
- private String otptBscVl; //기본값
- private boolean unique; //출력물 내 유일 요소 여부
- private boolean forPost; //우편물 관련 요소 여부
-
-
- private Pstn a4; //A4 위치값
- private Pstn letter; //레터 위치값
- private float widthSz; //영역크기 길이
- private float heightSz; //영역크기 높이
- private String textSort; //텍스트정렬
- private String lineChgYn;
- private String fontNm; //글꼴명
- private int fontSz; //글자크기
- private String fontColr; //글자색
- private String fontStyle; //글자스타일
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDF.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDF.java
deleted file mode 100644
index a0043217..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDF.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.PDPageContentStream;
-import org.apache.pdfbox.pdmodel.common.PDRectangle;
-
-import cokr.xit.foundation.component.AbstractBean;
-
-public abstract class PDF extends AbstractBean {
- /**pdf 파일(*.pdf)의 mime type */
- public static final String MIME_TYPE = "application/pdf";
-
- protected PDDocument doc;
- protected PDPageContentStream contentStream;
- protected PDRectangle paperSize;
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFColors.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFColors.java
deleted file mode 100644
index c1f9e15c..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFColors.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print;
-
-import java.lang.reflect.Field;
-
-import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
-import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB;
-
-public class PDFColors {
- public static final PDColor RED = new PDColor(new float[] { 1, 0, 0 }, PDDeviceRGB.INSTANCE);
- public static final PDColor GREEN = new PDColor(new float[] { 0, 1, 0 }, PDDeviceRGB.INSTANCE);
- public static final PDColor BLUE = new PDColor(new float[] { 0, 0, 1 }, PDDeviceRGB.INSTANCE);
-
- public static final PDColor YELLOW = new PDColor(new float[] { 1, 1, 0 }, PDDeviceRGB.INSTANCE);
- public static final PDColor ORANGE = new PDColor(new float[] { 1, 0.502f, 0 }, PDDeviceRGB.INSTANCE);
- public static final PDColor YELLOW_GREEN = new PDColor(new float[] { 0.502f, 1, 0 }, PDDeviceRGB.INSTANCE);
-
- public static final PDColor CYAN = new PDColor(new float[] { 0, 1, 1 }, PDDeviceRGB.INSTANCE);
- public static final PDColor GREEN_CYAN = new PDColor(new float[] { 0, 1, 0.502f }, PDDeviceRGB.INSTANCE);
- public static final PDColor CYAN_BLUE = new PDColor(new float[] { 0, 0.502f, 1 }, PDDeviceRGB.INSTANCE);
-
- public static final PDColor MAGENTA = new PDColor(new float[] { 1, 0, 1 }, PDDeviceRGB.INSTANCE);
- public static final PDColor VIOLET = new PDColor(new float[] { 0.502f, 0, 1 }, PDDeviceRGB.INSTANCE);
- public static final PDColor DEEP_PINK = new PDColor(new float[] { 1, 0, 0.502f }, PDDeviceRGB.INSTANCE);
-
- public static final PDColor WHITE = new PDColor(new float[] { 1, 1, 1 }, PDDeviceRGB.INSTANCE);
- public static final PDColor LIGHT_GREY = new PDColor(new float[] { 0.753f, 0.753f, 0.753f }, PDDeviceRGB.INSTANCE);
- public static final PDColor GREY = new PDColor(new float[] { 0.627f, 0.627f, 0.627f }, PDDeviceRGB.INSTANCE);
- public static final PDColor DARK_GREY = new PDColor(new float[] { 0.376f, 0.376f, 0.376f }, PDDeviceRGB.INSTANCE);
- public static final PDColor BLACK = new PDColor(new float[] { 0, 0, 0 }, PDDeviceRGB.INSTANCE);
-
- public static PDColor getColor(String colorName) {
-
- try {
- Field field = PDFColors.class.getDeclaredField(colorName);
- if(field == null) {
- return BLACK;
- }
-
- field.setAccessible(true);
- PDColor value = (PDColor)field.get(PDFColors.class);
- return value;
- } catch (Exception e) {
- throw new RuntimeException("색상 설정 오류");
- }
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFCoordinate.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFCoordinate.java
deleted file mode 100644
index 1cbcc73c..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFCoordinate.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print;
-
-public class PDFCoordinate {
- private float x;
- private float y;
- private float maxY;
- public PDFCoordinate(float xpt, float ypt, float maxY) {
- this.x = xpt;
- this.y = ypt;
- this.maxY = maxY;
- }
-
- public float[] offset() {
- return new float[] {x, -y};
- }
-
- public float[] absolute() {
- return new float[] {x, maxY-y};
- }
-
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFWriter.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFWriter.java
deleted file mode 100644
index 05d7b385..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/PDFWriter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.pdfbox.pdmodel.PDDocument;
-import org.apache.pdfbox.pdmodel.PDPage;
-import org.apache.pdfbox.pdmodel.PDPageContentStream;
-import org.apache.pdfbox.pdmodel.common.PDRectangle;
-import org.apache.pdfbox.pdmodel.font.PDType0Font;
-import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
-import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
-import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
-import org.springframework.core.io.ClassPathResource;
-
-import cokr.xit.foundation.Downloadable;
-
-public class PDFWriter extends PDF {
-
- public PDFWriter(){
- this.doc = new PDDocument();
- }
-
- public PDFWriter paper(String type){
- if(type.equals("A4")) {
- this.paperSize = PDRectangle.A4;
- } else if(type.equals("LETTER")) {
- this.paperSize = PDRectangle.LETTER;
- }
- return this;
- }
-
- public PDRectangle getPaperSize(){
- return this.paperSize;
- }
-
- public PDType0Font font(String path) throws IOException{
- return PDType0Font.load(doc, new ClassPathResource(path).getInputStream());
- }
-
- public PDFWriter beginPage() throws IOException {
- PDPage blankPage = new PDPage(paperSize);
- doc.addPage(blankPage);
-
- // 작업 페이지 설정
- PDPage page = doc.getPage(doc.getNumberOfPages()-1);
- // 컨텐츠 스트림 열기
- contentStream = new PDPageContentStream(doc, page);
- return this;
- }
-
- public PDFWriter setLineDashPattern(float[] pattern, float phase) throws IOException{
- contentStream.setLineDashPattern(pattern, phase);
- return this;
- }
- public PDFWriter moveTo(float x, float y) throws IOException {
- contentStream.moveTo(x, y);
- return this;
- }
-
- public PDFWriter lineTo(float x, float y) throws IOException {
- contentStream.lineTo(x, y);
- return this;
- }
- public PDFWriter stroke() throws IOException {
- contentStream.stroke();
- return this;
- }
- public PDFWriter beginText() throws IOException {
- contentStream.beginText();
- return this;
- }
- public PDFWriter setFont(PDType0Font font, int fontSize) throws IOException {
- contentStream.setFont(font, fontSize);
- return this;
- }
- public PDFWriter setRenderingMode(RenderingMode fontStyle) throws IOException {
- contentStream.setRenderingMode(fontStyle);
- return this;
- }
- public PDFWriter setNonStrokingColor(PDColor fontColr) throws IOException {
- contentStream.setNonStrokingColor(fontColr);
- return this;
- }
- public PDFWriter newLineAtOffset(float tx, float ty) throws IOException {
- contentStream.newLineAtOffset(tx, ty);
- return this;
- }
- public PDFWriter showText(String text) throws IOException {
- contentStream.showText(text);
- return this;
- }
- public PDFWriter endText() throws IOException {
- contentStream.endText();
- return this;
- }
-
- public PDFWriter image(InputStream imageStream, float x, float y, float width, float height) throws IOException {
- PDImageXObject image = PDImageXObject.createFromByteArray(doc, imageStream.readAllBytes(), "temp");
- contentStream.drawImage(image, x, y, width, height);
- return this;
- }
-
- public PDFWriter endPage() throws IOException {
- contentStream.close();
- contentStream = null;
- return this;
- }
-
-
- public void write(OutputStream out) {
- try {
- doc.save(out);
- doc.close();
- } catch (Exception e) {
- throw runtimeException(e);
- }
- }
-
- public File write(String filepath) {
- File file = new File(filepath);
- try (FileOutputStream out = new FileOutputStream(file)) {
- write(out);
- return file;
- } catch (Exception e) {
- throw runtimeException(e);
- }
- }
-
- public Downloadable getDownloadable() {
- return new Downloadable()
- .setContentType(MIME_TYPE)
- .setWriter(this::write);
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Advntce.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Advntce.java
deleted file mode 100644
index 1f15f176..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Advntce.java
+++ /dev/null
@@ -1,364 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print.format;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import cokr.xit.applib.Print;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-/**
- * 사전통지서
- */
-public class Advntce extends PDFPrintFormat {
- @Override
- public void initDefaultStng() {
- addForPost(
- image("postSenderLogo","우편물송신자로고","").a4(10, 0).letter(10, 0).size(0, 0),
- text("postSenderInst","우편물송신자기관","").a4(10, 5).letter(10, 5),
- text("postSenderDept","우편물송신자부서","").a4(50, 5).letter(50, 5),
- text("postSenderAddr","우편물송신자주소","").a4(10, 15).letter(10, 15),
- text("postSenderDtlAddr","우편물송신자상세주소","").a4(10, 25).letter(10, 25),
- text("postSenderZip","우편물송신자우편번호","").a4(10, 35).letter(10, 35),
- text("postSenderTel","우편물송신자전화번호","").a4(10, 45).letter(10, 45),
- text("postSenderFax","우편물송신자팩스번호","").a4(50, 45).letter(50, 45),
-
- text("postReceiverAddr","우편물수신자주소","").a4(100, 40).letter(100, 40).size(90, 0).align("right"),
- text("postReceiverDtlAddr","우편물수신자상세주소","").a4(100, 50).letter(100, 50).size(90, 0).align("right"),
- text("postReceiver","우편물수신자명","").a4(100, 60).letter(100, 60).size(90, 0).align("right"),
- text("postReceiverZip","우편물수신자우편번호","").a4(100, 70).letter(100, 70).size(90, 0).align("right")
- );
-
- add(
- image("background","배경이미지","").a4(0, 0).letter(0, 0).size(0, 0),
- images("crdnPhoto","단속사진","").a4(110, 100).letter(116, 95).size(90, 80),
- image("rprsCrdnPhoto","대표단속사진","").a4(10, 200).letter(10, 186).size(80, 80),
-
- text("rtpyrNm","수신자명",""),
- text("rtpyrNo","수신자번호",""),
- text("rtpyrAddr","수신자주소",""),
- text("rtpyrDtlAddr","수신자상세주소",""),
- text("rtpyrFullAddr","수신자전체주소",""),
-
- text("vhrno","차량번호",""),
- text("crdnYmd","단속일자",""),
- text("crdnYmdTm","단속일시",""),
- text("crdnPlc","단속장소",""),
- text("ffnlgCarmdlNm","차종",""),
- text("vltnArtcl","위반내용",""),
- text("vltnLawNm","위반법령",""),
- text("crdnSn","증거번호",""),
- text("ffnlgCrdnAmt","최초금액",""),
-
- text("advntceAmt","사전통지금액",""),
- text("advntceDudtYmd","납부기한",""),
-
- text("vrActno","대표가상계좌번호",""),
- text("vrActno1","가상계좌번호1",""),
- text("vrActno2","가상계좌번호2",""),
- text("vrActno3","가상계좌번호3",""),
- text("vrActno4","가상계좌번호4",""),
- text("vrActno5","가상계좌번호5",""),
- text("vrActno6","가상계좌번호6",""),
- text("vrActno7","가상계좌번호7",""),
- text("vrActno8","가상계좌번호8",""),
- text("vrActno9","가상계좌번호9",""),
- text("vrActno10","가상계좌번호10",""),
- text("epayNo","전자납부번호",""),
-
- text("otptYmd","출력일자","").offLog(),
- text("otptDt","출력일시","").offLog(),
- text("otptYYYY","출력년도","").offLog(),
- text("otptMM","출력월","").offLog(),
- text("otptDD","출력일","").offLog(),
-
- text("offcsText","관인명","").offLog(),
- image("offcs","관인이미지","").size(20, 20).offLog(),
-
- text("undefined","(미정)","미정항목").offLog()
- );
- }
- public Advntce() {
- super();
- }
- public Advntce(Print print, FimsPrintOption printOption,
- DataObject otptBscStng, List otptArtclStngList, String paperSeCd, List data){
- super(print,printOption,otptBscStng,otptArtclStngList,paperSeCd, data);
- this.print.setFormatKorName("사전통지서");
- }
-
- /**
- * 출력요소에 매핑될 값을 반환한다.
- */
- @Override
- public String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
-
- String result = "";
- if(forPost) {
- return this.getValueForPost(otptArtclNm, defaultValue, dataObject, printOption, print);
- }
-
- Map globalVariable = printOption.getGlobalVariable();
-
- switch(otptArtclNm) {
- case "background" -> {
- if(globalVariable.get("bcrnImgPath") != null) {
- result = globalVariable.get("bcrnImgPath");
- }
- }
- case "rprsCrdnPhoto" -> { //대표사진
- result = dataObject.string("CRDN_PHOTO1");
- }
- case "rprsCrdnPhotoKey" -> { //대표사진
- result = dataObject.string("CRDN_PHOTO1"+"KEY");
- }
- case "rtpyrNm" -> {
- result = dataObject.string("RTPYR_NM");
- }
- case "rtpyrNo" -> {
- result = dataObject.string("RTPYR_NO");
- }
- case "rtpyrAddr" -> {
- result = dataObject.string("RTPYR_ADDR");
- }
- case "rtpyrDtlAddr" -> {
- result = dataObject.string("RTPYR_DTL_ADDR");
- }
- case "rtpyrFullAddr" -> {
- result = dataObject.string("RTPYR_FULL_ADDR");
- }
- case "rtpyrZip" -> {
- result = dataObject.string("RTPYR_ZIP");
- }
- case "vhrno" -> {
- result = dataObject.string("VHRNO");
- }
- case "crdnYmd" -> {
- result = DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD"));
- }
- case "crdnYmdTm" -> {
- result = DataFormat.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
- }
- case "crdnPlc" -> {
- result = dataObject.string("CRDN_PLC");
- }
- case "ffnlgCarmdlNm" -> {
- result = dataObject.string("FFNLG_CARMDL_NM");
- }
- case "vltnArtcl" -> {
- result = dataObject.string("VLTN_ARTCL");
- }
- case "vltnLawNm" -> {
- result = dataObject.string("VLTN_LAW_NM");
- }
- case "crdnSn" -> {
- result = dataObject.string("CRDN_SN");
- }
- case "ffnlgCrdnAmt" -> {
- result = dataObject.string("FFNLG_CRDN_AMT");
- }
- case "advntceAmt" -> {
- result = DataFormat.n_nn0(dataObject.string("ADVNTCE_AMT"));
- }
- case "advntceDudtYmd" -> {
- result = DataFormat.yyyy_mm_dd(dataObject.string("ADVNTCE_DUDT_YMD"));
- }
-
- case "vrActno" -> {
- result = dataObject.string("VR_ACTNO");
- }
- case "vrActno1" -> {
- result = dataObject.string("VR_ACTNO1");
- }
- case "vrActno2" -> {
- result = dataObject.string("VR_ACTNO2");
- }
- case "vrActno3" -> {
- result = dataObject.string("VR_ACTNO3");
- }
- case "vrActno4" -> {
- result = dataObject.string("VR_ACTNO4");
- }
- case "vrActno5" -> {
- result = dataObject.string("VR_ACTNO5");
- }
- case "vrActno6" -> {
- result = dataObject.string("VR_ACTNO6");
- }
- case "vrActno7" -> {
- result = dataObject.string("VR_ACTNO7");
- }
- case "vrActno8" -> {
- result = dataObject.string("VR_ACTNO8");
- }
- case "vrActno9" -> {
- result = dataObject.string("VR_ACTNO9");
- }
- case "vrActno10" -> {
- result = dataObject.string("VR_ACTNO10");
- }
- case "epayNo" -> {
- result = dataObject.string("EPAY_NO");
- }
-
- case "otptYmd" -> {
- result = DataFormat.yyyy_mm_dd(print.getPrintRequestDt().substring(0,8));
- }
- case "otptDt" -> {
- result = DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
- }
- case "otptYYYY" -> {
- result = print.getPrintRequestDt().substring(0,4);
- }
- case "otptMM" -> {
- result = print.getPrintRequestDt().substring(4,6);
- }
- case "otptDD" -> {
- result = print.getPrintRequestDt().substring(6,8);
- }
-
- case "offcsText" -> {
- String instNm = (String) print.getPrintRequestUserInfo().getInfo().get("instNm");
- instNm = OgdpUtil.getLastWord(instNm);
- instNm = OgdpUtil.getInstituteLeader(instNm, true);
- result = instNm;
- }
- case "offcs" -> {
- result = globalVariable.get("offcsFilePath");
- }
-
- case "undefined" -> {
- result = defaultValue;
- }
- }
-
- return result;
- }
-
- /**
- * 우편물 출력요소에 매핑될 값을 반환한다.
- */
- @Override
- public String getValueForPost(String otptArtclNm, String defaultValue,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
- String result = "";
-
- switch(otptArtclNm) {
- case "postReceiverAddr" -> {
- result = dataObject.string("RTPYR_ADDR");
- }
- case "postReceiverDtlAddr" -> {
- result = dataObject.string("RTPYR_DTL_ADDR");
- }
- case "postReceiverZip" -> {
- result = dataObject.string("RTPYR_ZIP");
- }
- case "postReceiver" -> {
- result = dataObject.string("RTPYR_NM");
- }
- case "postSenderLogo" -> {
- result = printOption.getGlobalVariable().get("logoFilePath");
- }
- case "postSenderInst" -> {
- result = (String)print.getPrintRequestUserInfo().getInfo().get("instNm");
- }
- case "postSenderDept" -> {
- result = (String)print.getPrintRequestUserInfo().getInfo().get("deptNm");
- }
- case "postSenderAddr" -> {
- result = printOption.getGlobalVariable().get("instAddr");
- }
- case "postSenderDtlAddr" -> {
- result = printOption.getGlobalVariable().get("instDaddr");
- }
- case "postSenderZip" -> {
- result = printOption.getGlobalVariable().get("instZip");
- }
- case "postSenderTel" -> {
- result = printOption.getGlobalVariable().get("deptTelno");
- }
- case "postSenderFax" -> {
- result = printOption.getGlobalVariable().get("deptFxno");
- }
-
- }
- return result;
- }
-
-
- @Override
- public List getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
- List result = new ArrayList();
-
- switch(otptArtclNm) {
- case "crdnPhoto" -> {
- int i = 1;
- while(!dataObject.string("CRDN_PHOTO"+i).equals("")) {
- result.add(dataObject.string("CRDN_PHOTO"+i));
- i++;
- }
- }
- case "crdnPhotoKey" -> {
- int i = 1;
- while(!dataObject.string("CRDN_PHOTO"+i+"KEY").equals("")) {
- result.add(dataObject.string("CRDN_PHOTO"+i+"KEY"));
- i++;
- }
- }
- }
-
- return result;
- }
-
-
- /**
- * 출력용 샘플 데이터를 생성한다.
- */
- @Override
- public DataObject createSampleData() {
- DataObject dataObject = new DataObject();
- dataObject.put("RTPYR_NM", "홍길동");
- dataObject.put("RTPYR_ADDR", "무슨도 무슨시 무슨구");
- dataObject.put("RTPYR_DTL_ADDR", "ㅇㅇ아파트 999호");
- dataObject.put("RTPYR_FULL_ADDR", "무슨도 무슨시 무슨구 ㅇㅇ아파트 999호");
- dataObject.put("RTPYR_ZIP", "12345");
- dataObject.put("VHRNO", "00가0000");
- dataObject.put("CRDN_YMD", "20231204");
- dataObject.put("CRDN_YMD_TM", "20231204080808");
- dataObject.put("CRDN_PLC", "사거리 건너편");
- dataObject.put("FFNLG_CARMDL_NM", "승용");
- dataObject.put("VLTN_ARTCL", "주차위반");
- dataObject.put("VLTN_LAW_NM", "00법 제0조 제0항");
- dataObject.put("CRDN_SN", "1234567890");
- dataObject.put("VR_ACTNO", "000000-00-000000");
- dataObject.put("VR_ACTNO1", "111111-00-000000");
- dataObject.put("VR_ACTNO2", "222222-00-000000");
- dataObject.put("VR_ACTNO3", "333333-00-000000");
- dataObject.put("VR_ACTNO4", "444444-00-000000");
- dataObject.put("VR_ACTNO5", "555555-00-000000");
- dataObject.put("VR_ACTNO6", "666666-00-000000");
- dataObject.put("VR_ACTNO7", "777777-00-000000");
- dataObject.put("VR_ACTNO8", "888888-00-000000");
- dataObject.put("VR_ACTNO9", "999999-00-000000");
- dataObject.put("VR_ACTNO10", "101010-00-000000");
- dataObject.put("EPAY_NO", "00000-0-00-00-000000000");
- dataObject.put("FFNLG_CRDN_AMT", "100000");
- dataObject.put("ADVNTCE_AMT", "80000");
- dataObject.put("ADVNTCE_DUDT_YMD", "20231231");
-
- dataObject.put("CRDN_PHOTO1", "samplefiles/crdn1.png");
- dataObject.put("CRDN_PHOTO2", "samplefiles/crdn2.png");
- dataObject.put("CRDN_PHOTO3", "samplefiles/crdn3.png");
- dataObject.put("CRDN_PHOTO4", "samplefiles/crdn4.png");
- dataObject.put("CRDN_PHOTO5", "samplefiles/crdn5.png");
- dataObject.put("CRDN_PHOTO6", "samplefiles/crdn6.png");
- dataObject.put("CRDN_PHOTO7", "samplefiles/crdn7.png");
-
- return dataObject;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Nht.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Nht.java
deleted file mode 100644
index 70858fee..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/Nht.java
+++ /dev/null
@@ -1,446 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print.format;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import cokr.xit.applib.Print;
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.mngt.OgdpUtil;
-import cokr.xit.foundation.data.DataFormat;
-import cokr.xit.foundation.data.DataObject;
-
-public class Nht extends PDFPrintFormat {
- @Override
- public void initDefaultStng() {
- addForPost(
- image("postSenderLogo","우편물송신자로고","").a4(10, 0).letter(10, 0).size(0, 0),
- text("postSenderInst","우편물송신자기관","").a4(10, 5).letter(10, 5),
- text("postSenderDept","우편물송신자부서","").a4(50, 5).letter(50, 5),
- text("postSenderAddr","우편물송신자주소","").a4(10, 15).letter(10, 15),
- text("postSenderDtlAddr","우편물송신자상세주소","").a4(10, 25).letter(10, 25),
- text("postSenderZip","우편물송신자우편번호","").a4(10, 35).letter(10, 35),
- text("postSenderTel","우편물송신자전화번호","").a4(10, 45).letter(10, 45),
- text("postSenderFax","우편물송신자팩스번호","").a4(50, 45).letter(50, 45),
-
- text("postReceiverAddr","우편물수신자주소","").a4(100, 40).letter(100, 40).size(90, 0).align("right"),
- text("postReceiverDtlAddr","우편물수신자상세주소","").a4(100, 50).letter(100, 50).size(90, 0).align("right"),
- text("postReceiver","우편물수신자명","").a4(100, 60).letter(100, 60).size(90, 0).align("right"),
- text("postReceiverZip","우편물수신자우편번호","").a4(100, 70).letter(100, 70).size(90, 0).align("right")
- );
-
- add(
- image("background","배경이미지","").a4(0, 0).letter(0, 0).size(0, 0),
- images("crdnPhoto","단속사진","").a4(110, 100).letter(116, 95).size(90, 80),
- image("rprsCrdnPhoto","대표단속사진","").a4(10, 200).letter(10, 186).size(80, 80),
-
- text("ocr1","OCR32자리",""),
- text("ocr2","OCR54자리1",""),
- text("ocr3","OCR54자리2",""),
-
- text("rtpyrNm","수신자명",""),
- text("rtpyrNo","수신자번호",""),
- text("rtpyrAddr","수신자주소",""),
- text("rtpyrDtlAddr","수신자상세주소",""),
- text("rtpyrFullAddr","수신자전체주소",""),
-
- text("vhrno","차량번호",""),
- text("crdnYmd","단속일자",""),
- text("crdnYmdTm","단속일시",""),
- text("crdnPlc","단속장소",""),
- text("ffnlgCarmdlNm","차종",""),
- text("vltnArtcl","위반내용",""),
- text("vltnLawNm","위반법령",""),
- text("crdnSn","증거번호",""),
- text("ffnlgCrdnAmt","최초금액",""),
-
- text("pcptax","본세",""),
- text("adamt","가산금",""),
- text("sumAmt","납기금액",""),
- text("dudtYmd","납기일자",""),
- text("dudtAftrPcptax","납기후본세",""),
- text("dudtAftrAdamt","납기후가산금",""),
- text("dudtAftrAmt","납기후금액",""),
- text("dudtAftrYmd","납기후일자",""),
-
- text("vrActno","대표가상계좌번호",""),
- text("vrActno1","가상계좌번호1",""),
- text("vrActno2","가상계좌번호2",""),
- text("vrActno3","가상계좌번호3",""),
- text("vrActno4","가상계좌번호4",""),
- text("vrActno5","가상계좌번호5",""),
- text("vrActno6","가상계좌번호6",""),
- text("vrActno7","가상계좌번호7",""),
- text("vrActno8","가상계좌번호8",""),
- text("vrActno9","가상계좌번호9",""),
- text("vrActno10","가상계좌번호10",""),
- text("epayNo","전자납부번호",""),
-
- text("otptYmd","출력일자","").offLog(),
- text("otptDt","출력일시","").offLog(),
- text("otptYYYY","출력년도","").offLog(),
- text("otptMM","출력월","").offLog(),
- text("otptDD","출력일","").offLog(),
-
- text("offcsText","관인명","").offLog(),
- image("offcs","관인이미지","").size(20, 20).offLog(),
-
- text("undefined","(미정)","미정항목").offLog()
- );
- }
-
- public Nht() {
- super();
- }
-
- public Nht(Print print, FimsPrintOption printOption,
- DataObject otptBscStng, List otptArtclStngList, String paperSeCd, List data) {
- super(print,printOption,otptBscStng,otptArtclStngList,paperSeCd, data);
- this.print.setFormatKorName("고지서");
- }
-
-
-
- /**
- * 출력요소에 매핑될 값을 반환한다.
- */
- @Override
- public String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
-
- String result = "";
- if(forPost) {
- return this.getValueForPost(otptArtclNm, defaultValue, dataObject, printOption, print);
- }
-
- Map globalVariable = printOption.getGlobalVariable();
-
- switch(otptArtclNm) {
- case "background" -> {
- if(globalVariable.get("bcrnImgPath") != null) {
- result = globalVariable.get("bcrnImgPath");
- }
- }
- case "rprsCrdnPhoto" -> { //대표사진
- result = dataObject.string("CRDN_PHOTO1");
- }
- case "rprsCrdnPhotoKey" -> { //대표사진
- result = dataObject.string("CRDN_PHOTO1"+"KEY");
- }
- case "rtpyrNm" -> {
- result = dataObject.string("RTPYR_NM");
- }
- case "rtpyrNo" -> {
- result = dataObject.string("RTPYR_NO");
- }
- case "rtpyrAddr" -> {
- result = dataObject.string("RTPYR_ADDR");
- }
- case "rtpyrDtlAddr" -> {
- result = dataObject.string("RTPYR_DTL_ADDR");
- }
- case "rtpyrFullAddr" -> {
- result = dataObject.string("RTPYR_FULL_ADDR");
- }
- case "rtpyrZip" -> {
- result = dataObject.string("RTPYR_ZIP");
- }
- case "vhrno" -> {
- result = dataObject.string("VHRNO");
- }
- case "crdnYmd" -> {
- result = DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD"));
- }
- case "crdnYmdTm" -> {
- result = DataFormat.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
- }
- case "crdnPlc" -> {
- result = dataObject.string("CRDN_PLC");
- }
- case "ffnlgCarmdlNm" -> {
- result = dataObject.string("FFNLG_CARMDL_NM");
- }
- case "vltnArtcl" -> {
- result = dataObject.string("VLTN_ARTCL");
- }
- case "vltnLawNm" -> {
- result = dataObject.string("VLTN_LAW_NM");
- }
- case "crdnSn" -> {
- result = dataObject.string("CRDN_SN");
- }
- case "ffnlgCrdnAmt" -> {
- result = dataObject.string("FFNLG_CRDN_AMT");
- }
-
- case "pcptax" -> { //본세
- result = dataObject.string("PCPTAX");
- }
- case "adamt" -> { //가산금
- result = dataObject.string("ADAMT");
- }
- case "sumAmt" -> { //납기금액
- result = dataObject.string("SUM_AMT");
- }
- case "dudtYmd" -> { //납기일자
- result = dataObject.string("DUDT_YMD");
- }
- case "dudtAftrPcptax" -> { //납기후본세
- result = dataObject.string("PCPTAX");
- }
- case "dudtAftrAdamt" -> { //납기후가산금
- result = (dataObject.number("DUDT_AFTR_AMT").intValue() - dataObject.number("PCPTAX").intValue())+"";
- }
- case "dudtAftrAmt" -> { //납기후금액
- result = dataObject.string("DUDT_AFTR_AMT");
- }
- case "dudtAftrYmd" -> { //납기후일자
- result = dataObject.string("DUDT_AFTR_YMD");
- }
-
- case "vrActno" -> {
- result = dataObject.string("VR_ACTNO");
- }
- case "vrActno1" -> {
- result = dataObject.string("VR_ACTNO1");
- }
- case "vrActno2" -> {
- result = dataObject.string("VR_ACTNO2");
- }
- case "vrActno3" -> {
- result = dataObject.string("VR_ACTNO3");
- }
- case "vrActno4" -> {
- result = dataObject.string("VR_ACTNO4");
- }
- case "vrActno5" -> {
- result = dataObject.string("VR_ACTNO5");
- }
- case "vrActno6" -> {
- result = dataObject.string("VR_ACTNO6");
- }
- case "vrActno7" -> {
- result = dataObject.string("VR_ACTNO7");
- }
- case "vrActno8" -> {
- result = dataObject.string("VR_ACTNO8");
- }
- case "vrActno9" -> {
- result = dataObject.string("VR_ACTNO9");
- }
- case "vrActno10" -> {
- result = dataObject.string("VR_ACTNO10");
- }
- case "epayNo" -> {
- result = dataObject.string("EPAY_NO");
- }
-
- case "ocr1" -> {
- String deptCode = dataObject.string("DEPT_CD");
- String spclBizCd = dataObject.string("SPCL_BIZ_CD");
- String fyr = dataObject.string("FYR");
- String acntgSeCd = dataObject.string("ACNTG_SE_CD");
- String txitmCd = dataObject.string("TXITM_CD");
- String levyNo = dataObject.string("LEVY_NO");
- String ispySn = dataObject.string("ISPY_SN");
- result = CmmnUtil.getOcrband1(deptCode, spclBizCd, fyr, acntgSeCd, txitmCd, levyNo, ispySn);
- }
- case "ocr2" -> {
- String deptCode = dataObject.string("DEPT_CD");
- String spclBizCd = dataObject.string("SPCL_BIZ_CD");
- String fyr = dataObject.string("FYR");
- String acntgSeCd = dataObject.string("ACNTG_SE_CD");
- String txitmCd = dataObject.string("TXITM_CD");
- String levyNo = dataObject.string("LEVY_NO");
- String ispySn = dataObject.string("ISPY_SN");
- String ocrBand1 = CmmnUtil.getOcrband1(deptCode, spclBizCd, fyr, acntgSeCd, txitmCd, levyNo, ispySn);
-
- String levySeCd = dataObject.string("LEVY_SE_CD");
- int sumAmt = dataObject.number("SUM_AMT").intValue(); // 합계 금액
- String dudtYmd = dataObject.string("DUDT_YMD");
- result = CmmnUtil.getOcrband2(ocrBand1, levySeCd, sumAmt, dudtYmd);
- }
- case "ocr3" -> {
- String deptCode = dataObject.string("DEPT_CD");
- String spclBizCd = dataObject.string("SPCL_BIZ_CD");
- String fyr = dataObject.string("FYR");
- String acntgSeCd = dataObject.string("ACNTG_SE_CD");
- String txitmCd = dataObject.string("TXITM_CD");
- String levyNo = dataObject.string("LEVY_NO");
- String ispySn = dataObject.string("ISPY_SN");
- String ocrBand1 = CmmnUtil.getOcrband1(deptCode, spclBizCd, fyr, acntgSeCd, txitmCd, levyNo, ispySn);
-
- String levySeCd = dataObject.string("LEVY_SE_CD");
- int sumAmt = dataObject.number("SUM_AMT").intValue(); // 합계 금액
- String dudtYmd = dataObject.string("DUDT_YMD");
- String ocrBand2 = CmmnUtil.getOcrband2(ocrBand1, levySeCd, sumAmt, dudtYmd);
-
- int afterSumAmt = dataObject.number("DUDT_AFTR_AMT").intValue(); // 납기후 금액
- result = CmmnUtil.getOcrband3(ocrBand2, sumAmt, dudtYmd, afterSumAmt);
- }
-
- case "otptYmd" -> {
- result = DataFormat.yyyy_mm_dd(print.getPrintRequestDt().substring(0,8));
- }
- case "otptDt" -> {
- result = DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
- }
- case "otptYYYY" -> {
- result = print.getPrintRequestDt().substring(0,4);
- }
- case "otptMM" -> {
- result = print.getPrintRequestDt().substring(4,6);
- }
- case "otptDD" -> {
- result = print.getPrintRequestDt().substring(6,8);
- }
-
- case "offcsText" -> {
- String instNm = (String) print.getPrintRequestUserInfo().getInfo().get("instNm");
- instNm = OgdpUtil.getLastWord(instNm);
- instNm = OgdpUtil.getInstituteLeader(instNm, true);
- result = instNm;
- }
- case "offcs" -> {
- result = globalVariable.get("offcsFilePath");
- }
-
- case "undefined" -> {
- result = defaultValue;
- }
- }
-
- return result;
- }
-
- /**
- * 우편물 출력요소에 매핑될 값을 반환한다.
- */
- @Override
- public String getValueForPost(String otptArtclNm, String defaultValue,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
- String result = "";
-
- switch(otptArtclNm) {
- case "postReceiverAddr" -> {
- result = dataObject.string("RTPYR_ADDR");
- }
- case "postReceiverDtlAddr" -> {
- result = dataObject.string("RTPYR_DTL_ADDR");
- }
- case "postReceiverZip" -> {
- result = dataObject.string("RTPYR_ZIP");
- }
- case "postReceiver" -> {
- result = dataObject.string("RTPYR_NM");
- }
- case "postSenderLogo" -> {
- result = printOption.getGlobalVariable().get("logoFilePath");
- }
- case "postSenderInst" -> {
- result = (String)print.getPrintRequestUserInfo().getInfo().get("instNm");
- }
- case "postSenderDept" -> {
- result = (String)print.getPrintRequestUserInfo().getInfo().get("deptNm");
- }
- case "postSenderAddr" -> {
- result = printOption.getGlobalVariable().get("instAddr");
- }
- case "postSenderDtlAddr" -> {
- result = printOption.getGlobalVariable().get("instDaddr");
- }
- case "postSenderZip" -> {
- result = printOption.getGlobalVariable().get("instZip");
- }
- case "postSenderTel" -> {
- result = printOption.getGlobalVariable().get("deptTelno");
- }
- case "postSenderFax" -> {
- result = printOption.getGlobalVariable().get("deptFxno");
- }
-
- }
- return result;
- }
-
- @Override
- public List getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
- DataObject dataObject, FimsPrintOption printOption, Print print) {
- List result = new ArrayList();
-
- switch(otptArtclNm) {
- case "crdnPhoto" -> {
- int i = 1;
- while(!dataObject.string("CRDN_PHOTO"+i).equals("")) {
- result.add(dataObject.string("CRDN_PHOTO"+i));
- i++;
- }
- }
- }
-
- return result;
- }
-
- /**
- * 출력용 샘플 데이터를 생성한다.
- */
- @Override
- public DataObject createSampleData() {
- DataObject dataObject = new DataObject();
- dataObject.put("RTPYR_NM", "홍길동");
- dataObject.put("RTPYR_ADDR", "무슨도 무슨시 무슨구");
- dataObject.put("RTPYR_DTL_ADDR", "ㅇㅇ아파트 999호");
- dataObject.put("RTPYR_FULL_ADDR", "무슨도 무슨시 무슨구 ㅇㅇ아파트 999호");
- dataObject.put("RTPYR_ZIP", "12345");
- dataObject.put("VHRNO", "00가0000");
- dataObject.put("CRDN_YMD", "20231204");
- dataObject.put("CRDN_YMD_TM", "20231204080808");
- dataObject.put("CRDN_PLC", "사거리 건너편");
- dataObject.put("FFNLG_CARMDL_NM", "승용");
- dataObject.put("VLTN_ARTCL", "주차위반");
- dataObject.put("VLTN_LAW_NM", "00법 제0조 제0항");
- dataObject.put("CRDN_SN", "1234567890");
- dataObject.put("VR_ACTNO", "000000-00-000000");
- dataObject.put("VR_ACTNO1", "111111-00-000000");
- dataObject.put("VR_ACTNO2", "222222-00-000000");
- dataObject.put("VR_ACTNO3", "333333-00-000000");
- dataObject.put("VR_ACTNO4", "444444-00-000000");
- dataObject.put("VR_ACTNO5", "555555-00-000000");
- dataObject.put("VR_ACTNO6", "666666-00-000000");
- dataObject.put("VR_ACTNO7", "777777-00-000000");
- dataObject.put("VR_ACTNO8", "888888-00-000000");
- dataObject.put("VR_ACTNO9", "999999-00-000000");
- dataObject.put("VR_ACTNO10", "101010-00-000000");
- dataObject.put("EPAY_NO", "00000-0-00-00-000000000");
- dataObject.put("FFNLG_CRDN_AMT", "100000");
- dataObject.put("ADVNTCE_AMT", "80000");
- dataObject.put("ADVNTCE_DUDT_YMD", "20231231");
-
- dataObject.put("DEPT_CD", "4060411");
- dataObject.put("SPCL_BIZ_CD", "0000");
- dataObject.put("FYR", "2023");
- dataObject.put("ACNTG_SE_CD", "61");
- dataObject.put("TXITM_CD", "234006");
- dataObject.put("LEVY_NO", "123456");
- dataObject.put("ISPY_SN", "00");
- dataObject.put("LEVY_SE_CD", "01");
-
- dataObject.put("PCPTAX", "80000"); //본세
- dataObject.put("ADAMT", "0"); //가산금
- dataObject.put("SUM_AMT", "80000"); //합계금액
- dataObject.put("DUDT_YMD", "20231215"); //납기일자
- dataObject.put("DUDT_AFTR_AMT", "100000"); //납기후 금액
- dataObject.put("DUDT_AFTR_YMD", "20231231"); //납기후 일자
-
- dataObject.put("CRDN_PHOTO1", "samplefiles/crdn1.png");
- dataObject.put("CRDN_PHOTO2", "samplefiles/crdn2.png");
- dataObject.put("CRDN_PHOTO3", "samplefiles/crdn3.png");
- dataObject.put("CRDN_PHOTO4", "samplefiles/crdn4.png");
- dataObject.put("CRDN_PHOTO5", "samplefiles/crdn5.png");
- dataObject.put("CRDN_PHOTO6", "samplefiles/crdn6.png");
- dataObject.put("CRDN_PHOTO7", "samplefiles/crdn7.png");
-
- return dataObject;
- }
-}
diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java
deleted file mode 100644
index 759ddc9e..00000000
--- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java
+++ /dev/null
@@ -1,913 +0,0 @@
-package cokr.xit.fims.cmmn.pdf.print.format;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import org.apache.pdfbox.pdmodel.common.PDRectangle;
-import org.apache.pdfbox.pdmodel.font.PDType0Font;
-import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
-import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
-import org.egovframe.rte.fdl.string.EgovStringUtil;
-import org.springframework.core.io.ClassPathResource;
-
-import cokr.xit.applib.Print;
-import cokr.xit.fims.cmmn.CmmnUtil;
-import cokr.xit.fims.cmmn.FimsPrintOption;
-import cokr.xit.fims.cmmn.Pstn;
-import cokr.xit.fims.cmmn.PstnAndSize;
-import cokr.xit.fims.cmmn.Size;
-import cokr.xit.fims.cmmn.pdf.print.DefaultOtptArtclStng;
-import cokr.xit.fims.cmmn.pdf.print.PDFColors;
-import cokr.xit.fims.cmmn.pdf.print.PDFCoordinate;
-import cokr.xit.fims.cmmn.pdf.print.PDFWriter;
-import cokr.xit.fims.sprt.MediaUtil;
-import cokr.xit.foundation.data.DataObject;
-
-public abstract class PDFPrintFormat {
- protected PDFWriter writer;
-
- protected Print print;
- protected FimsPrintOption printOption;
- protected List data;
-
- protected DataObject otptBscStng;
- protected List otptArtclStngList;
- protected String paperSeCd;
- protected float[] paperMilimeter = new float[2];
- protected List prototypeStngs = new ArrayList();
-
- public abstract void initDefaultStng();
-
- public PDFPrintFormat() {
- initDefaultStng();
- }
-
- public PDFPrintFormat(Print print, FimsPrintOption printOption,
- DataObject otptBscStng, List otptArtclStngList, String paperSeCd, List data) {
- initDefaultStng();
- this.data = data;
- this.print = print;
- this.print.setExtension("pdf");
- this.printOption = printOption;
- this.otptBscStng = otptBscStng;
- this.otptArtclStngList = otptArtclStngList;
- this.paperSeCd = paperSeCd;
- if(paperSeCd.equals("01")) {
- this.paperMilimeter = new float[] {210.0f , 297.0f};
- } else if(paperSeCd.equals("02")){
- this.paperMilimeter = new float[] {216.0f , 279.0f};
- }
- }
-
- public void setOtptBscStng(DataObject otptBscStng) {
- this.otptBscStng = otptBscStng;
- }
-
- public void setOtptArtclStngList(List otptArtclStngList) {
- this.otptArtclStngList = otptArtclStngList;
- }
-
- public List getOtptArtclStngList() {
- return this.otptArtclStngList;
- }
-
-
- public void setPaperSeCd(String paperSeCd) {
- this.paperSeCd = paperSeCd;
-
- }
-
- public void setPrint(Print print) {
- this.print = print;
- };
-
-
- /**
- * 포맷원형을 반환한다.
- */
- public List