|
|
@ -384,47 +384,7 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
return setCollectionInfo(new ModelAndView("jsonView"),
|
|
|
|
return setCollectionInfo(new ModelAndView("jsonView"),
|
|
|
|
addsNimsService.getDsuseMgtDsuseQyByIndutyStatistics(query), "", "");
|
|
|
|
addsNimsService.getDsuseMgtDsuseQyByIndutyStatistics(query), "", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<CellDef> cellDefs = fromJson(query.getCellDefs(), CellDef.listType());
|
|
|
|
return excelDownloadDsuseMgtDsuseQyByIndutyStatistics(query);
|
|
|
|
XLSWriter xlsx = new XLSWriter().worksheet(0);
|
|
|
|
|
|
|
|
Format format = new Format(xlsx);
|
|
|
|
|
|
|
|
CellStyle center = format.cellStyle(Style.CENTER);
|
|
|
|
|
|
|
|
CellStyle numeric = format.n_nn0();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByIndutyStatistics(query);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Style headerStyle2 = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_50_PERCENT.getIndex())
|
|
|
|
|
|
|
|
.configure(styl -> {
|
|
|
|
|
|
|
|
Font font = xlsx.workbook().createFont();
|
|
|
|
|
|
|
|
font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex());
|
|
|
|
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(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()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
|
|
|
|
mav.addObject("download", xlsx.getDownloadable().setFilename("취급자 업종별 폐기 현황.xlsx"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return mav.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getDsuseMgtDsuseQyByBsshStatistics.do", name="취급자별 폐기 현황 통계")
|
|
|
|
@RequestMapping(value = "/getDsuseMgtDsuseQyByBsshStatistics.do", name="취급자별 폐기 현황 통계")
|
|
|
@ -975,17 +935,17 @@ 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(right));
|
|
|
|
valueMap.put("대마", a_slash_b(format, "대마", "대마Qy").style(right));
|
|
|
|
valueMap.put("마약", a_slash_ab(format, "마약", "마약Qy").style(right));
|
|
|
|
valueMap.put("마약", a_slash_b(format, "마약", "마약Qy").style(right));
|
|
|
|
valueMap.put("한외마약", a_slash_ab(format, "한외마약", "한외마약Qy").style(right));
|
|
|
|
valueMap.put("한외마약", a_slash_b(format, "한외마약", "한외마약Qy").style(right));
|
|
|
|
valueMap.put("향정", a_slash_ab(format, "향정", "향정Qy").style(right));
|
|
|
|
valueMap.put("향정", a_slash_b(format, "향정", "향정Qy").style(right));
|
|
|
|
valueMap.put("향정제외", a_slash_ab(format, "향정제외", "향정제외Qy").style(right));
|
|
|
|
valueMap.put("향정제외", a_slash_b(format, "향정제외", "향정제외Qy").style(right));
|
|
|
|
valueMap.put("기타", a_slash_ab(format, "기타", "기타Qy").style(right));
|
|
|
|
valueMap.put("기타", a_slash_b(format, "기타", "기타Qy").style(right));
|
|
|
|
valueMap.put("마약향정계", a_slash_ab(format, "마약향정계", "마약향정계Qy").style(right));
|
|
|
|
valueMap.put("마약향정계", a_slash_b(format, "마약향정계", "마약향정계Qy").style(right));
|
|
|
|
valueMap.put("비마약류", a_slash_ab(format, "비마약류", "비마약류Qy").style(right));
|
|
|
|
valueMap.put("비마약류", a_slash_b(format, "비마약류", "비마약류Qy").style(right));
|
|
|
|
valueMap.put("일반관리대상", a_slash_ab(format, "일반관리대상", "일반관리대상Qy").style(right));
|
|
|
|
valueMap.put("일반관리대상", a_slash_b(format, "일반관리대상", "일반관리대상Qy").style(right));
|
|
|
|
valueMap.put("중점관리대상", a_slash_ab(format, "중점관리대상", "중점관리대상Qy").style(right));
|
|
|
|
valueMap.put("중점관리대상", a_slash_b(format, "중점관리대상", "중점관리대상Qy").style(right));
|
|
|
|
valueMap.put("중점일반계", a_slash_ab(format, "중점일반계", "중점일반계Qy").style(right));
|
|
|
|
valueMap.put("중점일반계", a_slash_b(format, "중점일반계", "중점일반계Qy").style(right));
|
|
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
|
@ -1007,8 +967,10 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
xlsx.cell(2, 0).value("관할관청").value(headerStyle).merge(2, 3, 0, 0);
|
|
|
|
xlsx.cell(2, 0).value("관할관청").value(headerStyle).merge(2, 3, 0, 0);
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(1, cellDefs.size());
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(1, cellDefs.size());
|
|
|
|
xlsx.cell(3, 1).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
xlsx.cell(3, 1).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
|
|
|
|
// data
|
|
|
|
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()));
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
@ -1029,15 +991,15 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByPrdStatistics(query);
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByPrdStatistics(query);
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
Map<String, Object> valueMap = new HashMap<>();
|
|
|
|
valueMap.put("NO.", format.of("ROW_NUM").style(center));
|
|
|
|
valueMap.put("NO.", format.of("ROW_NUM").style(center));
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("관할관청", format.of("dept_nm").style(center));
|
|
|
|
valueMap.put("제품코드", format.of("prduct_cd").style(center));
|
|
|
|
valueMap.put("제품코드", format.of("prduct_cd").style(center));
|
|
|
|
valueMap.put("제품명", format.of("prduct_nm").style(left));
|
|
|
|
valueMap.put("제품명", format.of("prduct_nm").style(left));
|
|
|
|
valueMap.put("신청서접수", a_slash_ab(format, "receiptCnt", "receiptQy").style(right));
|
|
|
|
valueMap.put("신청서접수", a_slash_b(format, "receiptCnt", "receiptQy").style(right));
|
|
|
|
valueMap.put("결과[통보]처리", a_slash_ab(format, "rsltCnt", "rsltQy").style(right));
|
|
|
|
valueMap.put("결과[통보]처리", a_slash_b(format, "rsltCnt", "rsltQy").style(right));
|
|
|
|
valueMap.put("폐기보고확인", a_slash_ab(format, "mappingCnt", "mappingQy").style(right));
|
|
|
|
valueMap.put("폐기보고확인", a_slash_b(format, "mappingCnt", "mappingQy").style(right));
|
|
|
|
valueMap.put("보고완료", a_slash_ab(format, "cpltCnt", "cpltQy").style(right));
|
|
|
|
valueMap.put("보고완료", a_slash_b(format, "cpltCnt", "cpltQy").style(right));
|
|
|
|
valueMap.put("폐기건수", format.of("dsuseCnt").style(numeric));
|
|
|
|
valueMap.put("폐기건수", format.of("dsuseCnt").style(numeric));
|
|
|
|
valueMap.put("폐기수량", format.of("dsuseQy").style(numeric));
|
|
|
|
valueMap.put("폐기수량", format.of("dsuseQy").style(numeric));
|
|
|
|
|
|
|
|
|
|
|
@ -1066,8 +1028,11 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
xlsx.cell(2, 4).value("처리상태 별 (폐기건수 / 폐기수량)").value(headerStyle2).merge(4, 7);
|
|
|
|
xlsx.cell(2, 4).value("처리상태 별 (폐기건수 / 폐기수량)").value(headerStyle2).merge(4, 7);
|
|
|
|
xlsx.cell(2, 8).value("폐기건수").value(headerStyle).merge(2, 3, 8, 8);
|
|
|
|
xlsx.cell(2, 8).value("폐기건수").value(headerStyle).merge(2, 3, 8, 8);
|
|
|
|
xlsx.cell(2, 9).value("폐기수량").value(headerStyle).merge(2, 3, 9, 9);
|
|
|
|
xlsx.cell(2, 9).value("폐기수량").value(headerStyle).merge(2, 3, 9, 9);
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(4, cellDefs.size()-2);
|
|
|
|
|
|
|
|
xlsx.cell(3, 4).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(5, cellDefs.size()-2);
|
|
|
|
|
|
|
|
xlsx.cell(3, 5).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// data
|
|
|
|
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()));
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
@ -1087,22 +1052,25 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByIndutyStatistics(query);
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByIndutyStatistics(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_b(format, "마약류취급의료업", "마약류취급의료업Qy").style(right));
|
|
|
|
valueMap.put("마약", format.of("마약").style(numeric));
|
|
|
|
valueMap.put("마약류소매업", a_slash_b(format, "마약류소매업", "마약류소매업Qy").style(right));
|
|
|
|
valueMap.put("한외마약", format.of("한외마약").style(numeric));
|
|
|
|
valueMap.put("마약류도매업", a_slash_b(format, "마약류도매업", "마약류도매업Qy").style(right));
|
|
|
|
valueMap.put("향정", format.of("향정").style(numeric));
|
|
|
|
valueMap.put("마약류제조업", a_slash_b(format, "마약류제조업", "마약류제조업Qy").style(right));
|
|
|
|
valueMap.put("향정제외", format.of("향정제외").style(numeric));
|
|
|
|
valueMap.put("마약류수출입업", a_slash_b(format, "마약류수출입업", "마약류수출입업Qy").style(right));
|
|
|
|
valueMap.put("기타", format.of("기타").style(numeric));
|
|
|
|
valueMap.put("마약류원료사용", a_slash_b(format, "마약류원료사용", "마약류원료사용Qy").style(right));
|
|
|
|
valueMap.put("계", format.of("마약향정계").style(numeric));
|
|
|
|
valueMap.put("마약류취급학술연구", a_slash_b(format, "마약류취급학술연구", "마약류취급학술연구Qy").style(right));
|
|
|
|
valueMap.put("비마약류", format.of("비마약류").style(numeric));
|
|
|
|
valueMap.put("폐기건수", format.of("dsuseCnt").style(numeric));
|
|
|
|
valueMap.put("일반관리대상", format.of("일반관리대상").style(numeric));
|
|
|
|
valueMap.put("폐기수량", format.of("dsuseQy").style(numeric));
|
|
|
|
valueMap.put("중점관리대상", format.of("중점관리대상").style(numeric));
|
|
|
|
|
|
|
|
valueMap.put("계", format.of("중점일반계").style(numeric));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Style headerStyle = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex())
|
|
|
|
|
|
|
|
.configure(styl -> {
|
|
|
|
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
|
|
|
|
styl.alignment(VerticalAlignment.CENTER);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Style headerStyle2 = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_50_PERCENT.getIndex())
|
|
|
|
Style headerStyle2 = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_50_PERCENT.getIndex())
|
|
|
|
.configure(styl -> {
|
|
|
|
.configure(styl -> {
|
|
|
|
Font font = xlsx.workbook().createFont();
|
|
|
|
Font font = xlsx.workbook().createFont();
|
|
|
@ -1110,10 +1078,16 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
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, 8).value("중점/일반 구분").value(headerStyle2).merge(8, 11);
|
|
|
|
xlsx.cell(2, 0).value("관할관청").value(headerStyle).merge(2, 3, 0, 0);
|
|
|
|
xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
xlsx.cell(2, 1).value("업종별 구분 (폐기건수 / 폐시수량)").value(headerStyle2).merge(1, 7);
|
|
|
|
|
|
|
|
xlsx.cell(2, 8).value("폐기건수").value(headerStyle).merge(2, 3, 8, 8);
|
|
|
|
|
|
|
|
xlsx.cell(2, 9).value("폐기수량").value(headerStyle).merge(2, 3, 9, 9);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(1, cellDefs.size()-2);
|
|
|
|
|
|
|
|
xlsx.cell(3, 1).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
|
|
|
|
// data
|
|
|
|
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()));
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
@ -1129,26 +1103,30 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
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 right = format.cellStyle(Style.RIGHT);
|
|
|
|
|
|
|
|
CellStyle left = format.cellStyle(Style.LEFT);
|
|
|
|
CellStyle numeric = format.cellStyle(Style.N_NN0);
|
|
|
|
CellStyle numeric = format.cellStyle(Style.N_NN0);
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByBsshStatistics(query);
|
|
|
|
List<DataObject> list = addsNimsService.getDsuseMgtDsuseQyByBsshStatistics(query);
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> valueMap = new HashMap<String, Object>();
|
|
|
|
Map<String, Object> valueMap = new HashMap<>();
|
|
|
|
|
|
|
|
valueMap.put("NO.", format.of("ROW_NUM").style(center));
|
|
|
|
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("bssh_cd").style(center));
|
|
|
|
valueMap.put("마약", format.of("마약").style(numeric));
|
|
|
|
valueMap.put("취급업체명", format.of("bssh_nm").style(left));
|
|
|
|
valueMap.put("한외마약", format.of("한외마약").style(numeric));
|
|
|
|
valueMap.put("대표자", format.of("rprsntv_nm").style(center));
|
|
|
|
valueMap.put("향정", format.of("향정").style(numeric));
|
|
|
|
valueMap.put("신청서접수", a_slash_b(format, "receiptCnt", "receiptQy").style(right));
|
|
|
|
valueMap.put("향정제외", format.of("향정제외").style(numeric));
|
|
|
|
valueMap.put("폐기결과[통보]처리", a_slash_b(format, "rsltCnt", "rsltQy").style(right));
|
|
|
|
valueMap.put("기타", format.of("기타").style(numeric));
|
|
|
|
valueMap.put("폐기보고확인", a_slash_b(format, "mappingCnt", "mappingQy").style(right));
|
|
|
|
valueMap.put("계", format.of("마약향정계").style(numeric));
|
|
|
|
valueMap.put("보고완료", a_slash_b(format, "cpltCnt", "cpltQy").style(right));
|
|
|
|
valueMap.put("비마약류", format.of("비마약류").style(numeric));
|
|
|
|
valueMap.put("폐기건수", format.of("dsuseCnt").style(numeric));
|
|
|
|
valueMap.put("일반관리대상", format.of("일반관리대상").style(numeric));
|
|
|
|
valueMap.put("폐기수량", format.of("dsuseQy").style(numeric));
|
|
|
|
valueMap.put("중점관리대상", format.of("중점관리대상").style(numeric));
|
|
|
|
|
|
|
|
valueMap.put("계", format.of("중점일반계").style(numeric));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
CellDef.setValues(cellDefs, valueMap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Style headerStyle = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex())
|
|
|
|
|
|
|
|
.configure(styl -> {
|
|
|
|
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
|
|
|
|
styl.alignment(VerticalAlignment.CENTER);
|
|
|
|
|
|
|
|
});
|
|
|
|
Style headerStyle2 = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_50_PERCENT.getIndex())
|
|
|
|
Style headerStyle2 = new Style().foregroundColor(HSSFColor.HSSFColorPredefined.GREY_50_PERCENT.getIndex())
|
|
|
|
.configure(styl -> {
|
|
|
|
.configure(styl -> {
|
|
|
|
Font font = xlsx.workbook().createFont();
|
|
|
|
Font font = xlsx.workbook().createFont();
|
|
|
@ -1156,10 +1134,20 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
styl.alignment(HorizontalAlignment.CENTER);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
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, 8).value("중점/일반 구분").value(headerStyle2).merge(8, 11);
|
|
|
|
xlsx.cell(2, 0).value("NO.").value(headerStyle).merge(2, 3, 0, 0);
|
|
|
|
xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
xlsx.cell(2, 1).value("관할관청").value(headerStyle).merge(2, 3, 1, 1);
|
|
|
|
|
|
|
|
xlsx.cell(2, 2).value("취급자번호").value(headerStyle).merge(2, 3, 2, 2);
|
|
|
|
|
|
|
|
xlsx.cell(2, 3).value("취급업체명").value(headerStyle).merge(2, 3, 3, 3);
|
|
|
|
|
|
|
|
xlsx.cell(2, 4).value("대표자").value(headerStyle).merge(2, 3, 4, 4);
|
|
|
|
|
|
|
|
xlsx.cell(2, 5).value("처리상태 별 (폐기건수 / 폐기수량)").value(headerStyle2).merge(5, 8);
|
|
|
|
|
|
|
|
xlsx.cell(2, 9).value("폐기건수").value(headerStyle).merge(2, 3, 9, 9);
|
|
|
|
|
|
|
|
xlsx.cell(2, 10).value("폐기수량").value(headerStyle).merge(2, 3, 10, 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<CellDef> cellDefs2 = cellDefs.subList(5, cellDefs.size()-2);
|
|
|
|
|
|
|
|
xlsx.cell(3, 5).rowValues(CellDef.header(cellDefs2, () -> StyleMaker.headerStyle(xlsx)));
|
|
|
|
|
|
|
|
// data
|
|
|
|
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()));
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
|
ModelAndView mav = new ModelAndView("downloadView");
|
|
|
@ -1169,7 +1157,7 @@ public class AddsNimsController extends ApplicationController {
|
|
|
|
.addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
|
|
|
|
.addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static Format a_slash_ab(Format format, String a, String b) {
|
|
|
|
private static Format a_slash_b(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);
|
|
|
|
//return ((Map<?,?>)o).get(a) + " / " + ((Map<?,?>)o).get(a + b);
|
|
|
|
Number aa = (Number)((Map<?,?>)o).get(a);
|
|
|
|
Number aa = (Number)((Map<?,?>)o).get(a);
|
|
|
|