|
|
@ -8,6 +8,7 @@ import java.net.http.HttpClient;
|
|
|
|
import java.net.http.HttpRequest;
|
|
|
|
import java.net.http.HttpRequest;
|
|
|
|
import java.net.http.HttpResponse;
|
|
|
|
import java.net.http.HttpResponse;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
|
|
|
import java.text.NumberFormat;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -368,13 +369,13 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<>();
|
|
|
|
Map<String, Object> valueMap = new HashMap<>();
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
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(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));
|
|
|
|
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(0, 0).value("마약류 제품 구분별 현황").value(center).merge(0, cellDefs.size()-1);
|
|
|
|
xlsx.cell(2, 1).value("마약/향정 구분").value(headerStyle2).merge(1, 7);
|
|
|
|
xlsx.cell(2, 1).value("마약/향정 구분(폐기건수 / 폐기수량)").value(headerStyle2).merge(1, 7);
|
|
|
|
xlsx.cell(2, 8).value("중점/일반 구분").value(headerStyle2).merge(8, 11);
|
|
|
|
xlsx.cell(2, 8).value("중점/일반 구분(폐기건수 / 폐기수량)").value(headerStyle2).merge(8, 11);
|
|
|
|
xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
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()));
|
|
|
|
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) {
|
|
|
|
private static Format a_slash_ab(Format format, String a, String b) {
|
|
|
|
return format.of(a).value((o) -> {
|
|
|
|
return format.of(a).value((o) -> {
|
|
|
|
|
|
|
|
//return ((Map<?,?>)o).get(a) + " / " + ((Map<?,?>)o).get(a + b);
|
|
|
|
Number aa = (Number)((Map<?,?>)o).get(a);
|
|
|
|
Number aa = (Number)((Map<?,?>)o).get(a);
|
|
|
|
Number bb = (Number)((Map<?,?>)o).get(a + b);
|
|
|
|
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());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|