|
|
@ -361,23 +361,24 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
XLSWriter xlsx = new XLSWriter().worksheet(0);
|
|
|
|
XLSWriter xlsx = new XLSWriter().worksheet(0);
|
|
|
|
Format format = new Format(xlsx);
|
|
|
|
Format format = new Format(xlsx);
|
|
|
|
CellStyle center = format.cellStyle(Style.CENTER);
|
|
|
|
CellStyle center = format.cellStyle(Style.CENTER);
|
|
|
|
|
|
|
|
CellStyle right = format.cellStyle(Style.RIGHT);
|
|
|
|
CellStyle numeric = format.n_nn0();
|
|
|
|
CellStyle numeric = format.n_nn0();
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtNcrdAndPrtmStatistics(query);
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtNcrdAndPrtmStatistics(query);
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
Map<String, Object> valueMap = new HashMap<>();
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("대마", format.of("대마").style(numeric));
|
|
|
|
valueMap.put("대마", a_slash_ab(format, "대마", "Qy").style(numeric));
|
|
|
|
valueMap.put("마약", format.of("마약").style(numeric));
|
|
|
|
valueMap.put("마약", a_slash_ab(format, "마약", "Qy").style(right));
|
|
|
|
valueMap.put("한외마약", format.of("한외마약").style(numeric));
|
|
|
|
valueMap.put("한외마약", a_slash_ab(format, "한외마약", "Qy").style(right));
|
|
|
|
valueMap.put("향정", format.of("향정").style(numeric));
|
|
|
|
valueMap.put("향정", a_slash_ab(format, "향정", "Qy").style(right));
|
|
|
|
valueMap.put("향정제외", format.of("향정제외").style(numeric));
|
|
|
|
valueMap.put("향정제외", a_slash_ab(format, "향정제외", "Qy").style(right));
|
|
|
|
valueMap.put("기타", format.of("기타").style(numeric));
|
|
|
|
valueMap.put("기타", a_slash_ab(format, "기타", "Qy").style(right));
|
|
|
|
valueMap.put("마약향정 계", format.of("마약향정계").style(numeric));
|
|
|
|
valueMap.put("마약향정계", a_slash_ab(format, "마약향정계", "Qy").style(right));
|
|
|
|
valueMap.put("비마약류", format.of("비마약류").style(numeric));
|
|
|
|
valueMap.put("비마약류", a_slash_ab(format, "비마약류", "Qy").style(right));
|
|
|
|
valueMap.put("일반관리대상", format.of("일반관리대상").style(numeric));
|
|
|
|
valueMap.put("일반관리대상", a_slash_ab(format, "일반관리대상", "Qy").style(right));
|
|
|
|
valueMap.put("중점관리대상", format.of("중점관리대상").style(numeric));
|
|
|
|
valueMap.put("중점관리대상", a_slash_ab(format, "중점관리대상", "Qy").style(right));
|
|
|
|
valueMap.put("중점일반 계", format.of("중점일반계").style(numeric));
|
|
|
|
valueMap.put("중점일반계", a_slash_ab(format, "중점일반계", "Qy").style(right));
|
|
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
|
@ -416,7 +417,7 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("대마", format.of("대마").style(numeric));
|
|
|
|
valueMap.put("제품코드", format.of("prduct_cd").style(numeric));
|
|
|
|
valueMap.put("마약", format.of("마약").style(numeric));
|
|
|
|
valueMap.put("마약", format.of("마약").style(numeric));
|
|
|
|
valueMap.put("한외마약", format.of("한외마약").style(numeric));
|
|
|
|
valueMap.put("한외마약", format.of("한외마약").style(numeric));
|
|
|
|
valueMap.put("향정", format.of("향정").style(numeric));
|
|
|
|
valueMap.put("향정", format.of("향정").style(numeric));
|
|
|
@ -1017,6 +1018,14 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
byteOut.write(("Content-Type: application/json; charset=UTF-8" + lineSeparator + lineSeparator).getBytes(StandardCharsets.UTF_8));
|
|
|
|
byteOut.write(("Content-Type: application/json; charset=UTF-8" + lineSeparator + lineSeparator).getBytes(StandardCharsets.UTF_8));
|
|
|
|
byteOut.write((dsuseMgtJsonStr + lineSeparator).getBytes(StandardCharsets.UTF_8));
|
|
|
|
byteOut.write((dsuseMgtJsonStr + lineSeparator).getBytes(StandardCharsets.UTF_8));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Format a_slash_ab(Format format, String a, String b) {
|
|
|
|
|
|
|
|
return format.of(a).value((o) -> {
|
|
|
|
|
|
|
|
Number aa = (Number)((Map<?,?>)o).get(a);
|
|
|
|
|
|
|
|
Number bb = (Number)((Map<?,?>)o).get(a + b);
|
|
|
|
|
|
|
|
return aa.intValue() + " / " + bb.intValue();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
// private method
|
|
|
|
// private method
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|