diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index 4da6337..5189c5f 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -8,6 +8,7 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; +import java.text.NumberFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -368,13 +369,13 @@ public class AddsNimsController extends ApplicationController { Map valueMap = new HashMap<>(); valueMap.put("관할관청", format.of("dept_nm").style(center)); - valueMap.put("대마", a_slash_ab(format, "대마", "Qy").style(numeric)); + valueMap.put("대마", a_slash_ab(format, "대마", "Qy").style(right)); valueMap.put("마약", a_slash_ab(format, "마약", "Qy").style(right)); valueMap.put("한외마약", a_slash_ab(format, "한외마약", "Qy").style(right)); valueMap.put("향정", a_slash_ab(format, "향정", "Qy").style(right)); valueMap.put("향정제외", a_slash_ab(format, "향정제외", "Qy").style(right)); valueMap.put("기타", a_slash_ab(format, "기타", "Qy").style(right)); - valueMap.put("마약향정계", a_slash_ab(format, "마약향정계", "Qy").style(right)); + valueMap.put("마약향정계", a_slash_ab(format, "마약향정계", "Qy").style(numeric)); valueMap.put("비마약류", a_slash_ab(format, "비마약류", "Qy").style(right)); valueMap.put("일반관리대상", a_slash_ab(format, "일반관리대상", "Qy").style(right)); valueMap.put("중점관리대상", a_slash_ab(format, "중점관리대상", "Qy").style(right)); @@ -390,8 +391,8 @@ public class AddsNimsController extends ApplicationController { }); xlsx.cell(0, 0).value("마약류 제품 구분별 현황").value(center).merge(0, cellDefs.size()-1); - xlsx.cell(2, 1).value("마약/향정 구분").value(headerStyle2).merge(1, 7); - xlsx.cell(2, 8).value("중점/일반 구분").value(headerStyle2).merge(8, 11); + xlsx.cell(2, 1).value("마약/향정 구분(폐기건수 / 폐기수량)").value(headerStyle2).merge(1, 7); + xlsx.cell(2, 8).value("중점/일반 구분(폐기건수 / 폐기수량)").value(headerStyle2).merge(8, 11); xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))); xlsx.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); @@ -1021,9 +1022,12 @@ public class AddsNimsController extends ApplicationController { private static Format a_slash_ab(Format format, String a, String b) { return format.of(a).value((o) -> { + //return ((Map)o).get(a) + " / " + ((Map)o).get(a + b); Number aa = (Number)((Map)o).get(a); Number bb = (Number)((Map)o).get(a + b); - return aa.intValue() + " / " + bb.intValue(); + //return aa.intValue() + " / " + bb.intValue(); + NumberFormat nf = NumberFormat.getInstance(); + return nf.format(aa.intValue()) + " / " + nf.format(bb.intValue()); }); } //------------------------------------------------------------------------------------------------- diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp index b21b8c2..960fd99 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp @@ -164,6 +164,8 @@ , dataGetter: obj => obj.${infoPrefix}List , appendData: true , infoSize: "xl" + , formats: { + } }); // $P.control 설정 $P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30 @@ -297,7 +299,7 @@ // DataTables(그리드) let cellDefs = getCellDefs( $("#theadTr0--${pageName} th, #theadTr--${pageName} th") - .not(".dummy-th").not(":eq(0)").not("[colspan]"), + .not(".dummy-th").not("[colspan]"), $($("#${infoPrefix}Row--${pageName}")[0].content).find("td") .not(".dummy-td").not(":eq(0)").not("[colspan]")); $P.control.query.cellDefs = cellDefs; diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp index 20d72ce..6ac8c77 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp @@ -171,6 +171,10 @@ , dataGetter: obj => obj.${infoPrefix}List , appendData: true , infoSize: "xl" + , formats: { + 마약향정계: numberFormat + , 마약향정계Qy: numberFormat + } }); // $P.control 설정 $P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30