no message

main
이범준 7 months ago
parent 1a9fbb4aa6
commit ca5b7c8039

@ -19,6 +19,7 @@ import org.egovframe.rte.fdl.string.EgovStringUtil;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Hangul;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
import net.lingala.zip4j.ZipFile;
@ -167,7 +168,7 @@ public class OutsourcingFileWriter {
break;
}
case "amount(comma)": {
artclValue = CmmnUtil.addCommaToNumber(artclValue);
artclValue = DataFormat.n_nn0(artclValue);
break;
}
default:

@ -9,7 +9,6 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.DayOfWeek;
import java.time.LocalDate;
@ -333,16 +332,6 @@ public class CmmnUtil {
return dow;
}
/**'-' ':' (yyyy-MM-dd hh:mm:ss) .
* @param dateStr '-',':'
* @return '-' ':'
*/
public static String yyyy_mm_dd_hh_mm_ss(String dateStr) {
if (dateStr == null || dateStr.equals("")) return "";
return dateStr.substring(0, 4) + "-" + dateStr.substring(4, 6) + "-" + dateStr.substring(6, 8)
+ " " + dateStr.substring(8, 10) + ":" + dateStr.substring(10, 12) + ":" + dateStr.substring(12, 14);
}
public static String dateNFormat(String dateStr, String pattern) {
if(dateStr.length() == 8) {
@ -372,22 +361,6 @@ public class CmmnUtil {
return dataFormats.format(pattern, date);
}
/** .
* @param str
* @return
*/
public static String addCommaToNumber(String str) {
if (str == null || str.equals("")) return "";
int number = Integer.parseInt(str);
DecimalFormat decFormat = new DecimalFormat("###,###");
return decFormat.format(number);
}
public static String addCommaToNumber(int number) {
DecimalFormat decFormat = new DecimalFormat("###,###");
return decFormat.format(number);
}
/** .
* @param number

@ -3,10 +3,10 @@ package cokr.xit.fims.cmmn.hwp.format;
import java.util.List;
import cokr.xit.base.docs.hwp.HWPWriter;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
import kr.dogfoot.hwplib.object.HWPFile;
@ -48,7 +48,7 @@ public class CrdnConfirm extends HWPFormat {
DataObject newObj = (DataObject) new DataObject()
.set("과태료", one.string("TASK_SE_NM"))
.set("차량번호", one.string("VHRNO"))
.set("단속일시", CmmnUtil.yyyy_mm_dd_hh_mm_ss(one.string("CRDN_YMD_TM")))
.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"))

@ -5,7 +5,6 @@ import java.util.List;
import java.util.stream.IntStream;
import cokr.xit.base.docs.hwp.HWPWriter;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.mngt.FactionUtil;
@ -58,7 +57,7 @@ public class CrdnList extends HWPFormat {
String globalRtpyrFullAddr = data.get(0).string("RTPYR_FULL_ADDR");
int globalTotalAmount = data.stream().mapToInt(i -> i.number("LEVY_AMT").intValue()).sum();
writer.setValue("출력일시", CmmnUtil.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()));
writer.setValue("출력일시", DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()));
writer.setValue("성명", globalRtpyrNm);
if(print.getPrivateInfoYn(printOption)) {
writer.setValue("주민번호", globalRtpyrNo);
@ -78,7 +77,7 @@ public class CrdnList extends HWPFormat {
return (DataObject) new DataObject()
.set("과태료", one.string("TASK_SE_NM"))
.set("시군구명", one.string("SGG_NM"))
.set("단속일시", CmmnUtil.yyyy_mm_dd_hh_mm_ss(one.string("CRDN_YMD_TM")))
.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"))

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import cokr.xit.base.docs.hwp.HWPWriter;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.mngt.FactionUtil;
@ -60,7 +59,7 @@ public class RcvmtConfirm extends HWPFormat {
.set("위반명2", one.string("TASK_SE_NM"))
.set("위반차량", one.string("VHRNO"))
.set("대체차량", one.string("RPM_SZR_VHRNO"))
.set("위반금액", CmmnUtil.addCommaToNumber(one.string("FFNLG_AMT")))
.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"))
@ -68,8 +67,8 @@ public class RcvmtConfirm extends HWPFormat {
.set("주소", one.string("RTPYR_FULL_ADDR"))
.set("고지번호", one.string("GOJI_NO"))
.set("수납일자", DataFormat.yyyy_mm_dd(one.string("RCVMT_YMD")))
.set("수납금액", CmmnUtil.addCommaToNumber(one.string("RCVMT_AMT")))
.set("연월일시분초", CmmnUtil.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()))
.set("수납금액", DataFormat.n_nn0(one.string("RCVMT_AMT")))
.set("연월일시분초", DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt()))
.set("확인자", print.getPrintRequestUserInfo().getName())
.set("발신", instNm)
;

@ -78,8 +78,8 @@ public class ReportOnClaims extends HWPFormat {
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("채권청구액", CmmnUtil.addCommaToNumber(sumOfList));
writer.setValue("합계금액", CmmnUtil.addCommaToNumber(sumOfList));
writer.setValue("채권청구액", DataFormat.n_nn0(sumOfList));
writer.setValue("합계금액", DataFormat.n_nn0(sumOfList));
writer.setValue("합계금액한글", CmmnUtil.convertNumberToHangul(sumOfList));
String printRequestYmd = print.getPrintRequestDt().substring(0, 8);
@ -101,9 +101,9 @@ public class ReportOnClaims extends HWPFormat {
.set("과세번호", one.string("GOJI_NO"))
.set("법정기일", DataFormat.yyyy_mm_dd(one.string("DUDT_YMD")))
.set("세목", one.string("TXITM_NM"))
.set("세액", CmmnUtil.addCommaToNumber(one.string("LEVY_PCPTAX")))
.set("가산금", CmmnUtil.addCommaToNumber(one.string("LEVY_ADAMT")))
.set("합계", CmmnUtil.addCommaToNumber(one.string("SUM_AMT")));
.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);

@ -78,8 +78,8 @@ public class RequestForDelivery extends HWPFormat {
writer.setValue("주소", EgovStringUtil.null2void(globalVariable.get("rtpyrFullAddr")));
int sumOfList = data.stream().mapToInt(item -> item.number("SUM_AMT").intValue()).sum();
writer.setValue("합계금액", CmmnUtil.addCommaToNumber(sumOfList));
writer.setValue("교부청구금액", CmmnUtil.addCommaToNumber(sumOfList));
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")));
@ -104,7 +104,7 @@ public class RequestForDelivery extends HWPFormat {
DataObject newObj = (DataObject) new DataObject()
.set("징수과목", one.string("TXITM_NM"))
.set("고지번호", one.string("GOJI_NO"))
.set("과태료계", CmmnUtil.addCommaToNumber(one.string("SUM_AMT")))
.set("과태료계", DataFormat.n_nn0(one.string("SUM_AMT")))
.set("법정기일", DataFormat.yyyy_mm_dd(one.string("DUDT_YMD")))
;
return newObj;

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.mngt.FactionUtil;
@ -142,7 +141,7 @@ public class Advntce extends PDFPrintFormat {
result = DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD"));
}
case "crdnYmdTm" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
result = DataFormat.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
}
case "crdnPlc" -> {
result = dataObject.string("CRDN_PLC");
@ -163,7 +162,7 @@ public class Advntce extends PDFPrintFormat {
result = dataObject.string("FFNLG_CRDN_AMT");
}
case "advntceAmt" -> {
result = CmmnUtil.addCommaToNumber(dataObject.string("ADVNTCE_AMT"));
result = DataFormat.n_nn0(dataObject.string("ADVNTCE_AMT"));
}
case "advntceDudtYmd" -> {
result = DataFormat.yyyy_mm_dd(dataObject.string("ADVNTCE_DUDT_YMD"));
@ -210,7 +209,7 @@ public class Advntce extends PDFPrintFormat {
result = DataFormat.yyyy_mm_dd(print.getPrintRequestDt().substring(0,8));
}
case "otptDt" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
result = DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
}
case "otptYYYY" -> {
result = print.getPrintRequestDt().substring(0,4);

@ -147,7 +147,7 @@ public class Nht extends PDFPrintFormat {
result = DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD"));
}
case "crdnYmdTm" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
result = DataFormat.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
}
case "crdnPlc" -> {
result = dataObject.string("CRDN_PLC");
@ -276,7 +276,7 @@ public class Nht extends PDFPrintFormat {
result = DataFormat.yyyy_mm_dd(print.getPrintRequestDt().substring(0,8));
}
case "otptDt" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
result = DataFormat.yyyy_mm_dd_hh_mm_ss(print.getPrintRequestDt());
}
case "otptYYYY" -> {
result = print.getPrintRequestDt().substring(0,4);

Loading…
Cancel
Save