외사경찰 > 정원/현원 현황 엑셀 다운로드 오류 수정.
parent
b7010282ab
commit
38b6e5fb79
|
|
@ -103,7 +103,7 @@ public class ExcelExporter<T> extends AbstractExcelExport {
|
||||||
Object o = ((Map<?, ?>) t).get(key);
|
Object o = ((Map<?, ?>) t).get(key);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
value = o.toString();
|
value = o.toString();
|
||||||
} else if (o instanceof Integer || o instanceof Double) {
|
} else if (o instanceof Integer || o instanceof Double || o instanceof Long) {
|
||||||
value = String.valueOf(o);
|
value = String.valueOf(o);
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
value = ((BigDecimal) o).toString();
|
value = ((BigDecimal) o).toString();
|
||||||
|
|
|
||||||
|
|
@ -87,37 +87,37 @@ public class FaController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/memberManagePersonnelExcel.do")
|
@RequestMapping("/memberManagePersonnelExcel.do")
|
||||||
public String memberManagePersonnelExcel(final Model model) throws Exception {
|
public String memberManagePersonnelExcel(final Model model) throws Exception {
|
||||||
|
|
||||||
String title = "외사경찰 정원 및 현원 현황";
|
|
||||||
|
|
||||||
List<HashMap<String, Object>> resultList = memberService.getCapacityManagement();
|
List<HashMap<String, Object>> resultList = memberService.getCapacityManagement();
|
||||||
|
|
||||||
LinkedHashMap<String, String> header = new LinkedHashMap<String, String>();
|
LinkedHashMap<String, String> header = new LinkedHashMap<String, String>();
|
||||||
header.put("CODENM", "구분");
|
header.put("codenm", "구분");
|
||||||
header.put("TOT_CNT", "전체 정원");
|
header.put("tot_cnt", "전체 정원");
|
||||||
header.put("CURRENT_CNT", "현재 정원");
|
header.put("current_cnt", "현재 정원");
|
||||||
header.put("EXCESS", "과부족");
|
header.put("excess", "과부족");
|
||||||
header.put("POSITION204", "총경 정원");
|
header.put("position204", "총경 정원");
|
||||||
header.put("CNT_204", "총경 현원");
|
header.put("cnt_204", "총경 현원");
|
||||||
|
|
||||||
header.put("POSITION203", "경정 정원");
|
header.put("position203", "경정 정원");
|
||||||
header.put("CNT_203", "경정 현원");
|
header.put("cnt_203", "경정 현원");
|
||||||
|
|
||||||
header.put("POSITION202", "경감 정원");
|
header.put("position202", "경감 정원");
|
||||||
header.put("CNT_202", "경감 현원");
|
header.put("cnt_202", "경감 현원");
|
||||||
|
|
||||||
header.put("POSITION201", "경위 정원");
|
header.put("position201", "경위 정원");
|
||||||
header.put("CNT_201", "경위 현원");
|
header.put("cnt_201", "경위 현원");
|
||||||
|
|
||||||
header.put("POSITION104", "경사 정원");
|
header.put("position104", "경사 정원");
|
||||||
header.put("CNT_104", "경사 현원");
|
header.put("cnt_104", "경사 현원");
|
||||||
|
|
||||||
header.put("POSITION103", "경장 정원");
|
header.put("position103", "경장 정원");
|
||||||
header.put("CNT_103", "경장 현원");
|
header.put("cnt_103", "경장 현원");
|
||||||
|
|
||||||
header.put("POSITION102", "순경 정원");
|
|
||||||
header.put("CNT_102", "순경 현원");
|
|
||||||
|
|
||||||
|
header.put("position102", "순경 정원");
|
||||||
|
header.put("cnt_102", "순경 현원");
|
||||||
|
|
||||||
|
String title = "외사경찰 정원 및 현원 현황";
|
||||||
|
|
||||||
model.addAttribute("excel", new ExcelExporter<HashMap<String, Object>>(header, resultList, title));
|
model.addAttribute("excel", new ExcelExporter<HashMap<String, Object>>(header, resultList, title));
|
||||||
model.addAttribute("filename", title);
|
model.addAttribute("filename", title);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -482,11 +482,15 @@
|
||||||
|
|
||||||
<select id="Member.getCapacityManagement" resultType="hashmap">
|
<select id="Member.getCapacityManagement" resultType="hashmap">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
SELECT
|
SELECT CASE RESULT_LIST.PLACE
|
||||||
CASE RESULT_LIST.PLACE WHEN 'PS0' THEN '계' WHEN 'PS001' THEN '소계' ELSE CODE.CODENM END AS CODENM,
|
WHEN 'PS0' THEN '계'
|
||||||
RESULT_LIST.*, CURRENT_CNT - TOT_CNT AS EXCESS
|
WHEN 'PS001' THEN '소계'
|
||||||
|
ELSE CODE.CODENM
|
||||||
|
END AS CODENM,
|
||||||
|
RESULT_LIST.*,
|
||||||
|
CURRENT_CNT - TOT_CNT AS EXCESS
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
A.PLACE1 AS PLACE,
|
A.PLACE1 AS PLACE,
|
||||||
COALESCE(A.TOT_CNT, 0) AS TOT_CNT,
|
COALESCE(A.TOT_CNT, 0) AS TOT_CNT,
|
||||||
COALESCE(B.CURRENT_CNT,0) AS CURRENT_CNT,
|
COALESCE(B.CURRENT_CNT,0) AS CURRENT_CNT,
|
||||||
|
|
@ -509,7 +513,7 @@
|
||||||
SUM(COALESCE(POSITION103,0)) AS POSITION103,
|
SUM(COALESCE(POSITION103,0)) AS POSITION103,
|
||||||
SUM(COALESCE(POSITION102,0)) AS POSITION102
|
SUM(COALESCE(POSITION102,0)) AS POSITION102
|
||||||
FROM TAGENTNUM
|
FROM TAGENTNUM
|
||||||
WHERE PLACE1 <> 'PS95'
|
WHERE PLACE1 <> 'PS95'
|
||||||
) A INNER JOIN (
|
) A INNER JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
'PS0' AS PLACE1,
|
'PS0' AS PLACE1,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue