Compare commits

..

No commits in common. "8443310b649c2c7f484181edfdea6128f4c52129" and "30e8ca481d92a982a8de5bbf266658e9540d69f2" have entirely different histories.

8 changed files with 125 additions and 252 deletions

View File

@ -529,24 +529,24 @@ public class ReportJudgeServiceImpl extends EgovAbstractServiceImpl implements R
} }
int total = 0; int total = 0;
for (HashMap<String, String> item : list) { for (HashMap<String, String> item : list) {
total += Integer.parseInt(item.get(key)); total = total + Integer.parseInt(item.get(key));
} }
map.put(key, String.valueOf(total)); map.put(key, String.valueOf(total));
} }
} else { } else {
map.put("report1", "0"); map.put("REPORT1", "0");
map.put("report2", "0"); map.put("REPORT2", "0");
map.put("ju1", "0"); map.put("JU1", "0");
map.put("ju2", "0"); map.put("JU2", "0");
map.put("ju3", "0"); map.put("JU3", "0");
map.put("ju4", "0"); map.put("JU4", "0");
map.put("ju5", "0"); map.put("JU5", "0");
map.put("ju6", "0"); map.put("JU6", "0");
map.put("ju7", "0"); map.put("JU7", "0");
map.put("ag", "0"); map.put("AG", "0");
map.put("bg", "0"); map.put("BG", "0");
map.put("cg", "0"); map.put("CG", "0");
map.put("dg", "0"); map.put("DG", "0");
} }
list.add(list.size(), map); list.add(list.size(), map);

View File

@ -9,11 +9,6 @@ import kcg.faics.cmmn.bbs.BaseSearchVO;
* VO * VO
*/ */
public class ReportSearchVO extends BaseSearchVO implements Cloneable { public class ReportSearchVO extends BaseSearchVO implements Cloneable {
private int report1;
private int report2;
/** /**
* *
@ -155,22 +150,6 @@ public class ReportSearchVO extends BaseSearchVO implements Cloneable {
*/ */
private String month; private String month;
public int getReport1() {
return report1;
}
public void setReport1(int report1) {
this.report1 = report1;
}
public int getReport2() {
return report2;
}
public void setReport2(int report2) {
this.report2 = report2;
}
public String getUserid() { public String getUserid() {
return userid; return userid;
} }

View File

@ -271,53 +271,7 @@
<![CDATA[ <![CDATA[
/*ReportJudge.statsJudge*/ /*ReportJudge.statsJudge*/
WITH RPT AS ( WITH RPT AS (
SELECT SELECT *
A.IN_PLACE_CODE ,
sum(REPORT1) REPORT1,
sum(REPORT2) REPORT2,
SUM(JU1) JU1,
SUM(JU2) JU2,
SUM(JU3) JU3,
SUM(JU4) JU4,
SUM(JU5) JU5,
SUM(JU6) JU6,
SUM(JU7) JU7,
sum(JU1 + JU2) as AG,
sum(JU3 + JU4) as BG,
sum(JU5 + JU6) as CG,
sum(JU7) as DG
from (select
IN_PLACE_CODE,
SUM(case when IN_REPORT1 = 1 then 1 else 0 end) as REPORT1,
SUM(case when IN_REPORT2 = 1 then 1 else 0 end) as REPORT2,
case IN_JUDGE
when 1 then COUNT(in_seq)
else 0
end JU1,
case IN_JUDGE
when 2 then COUNT(in_seq)
else 0
end JU2,
case IN_JUDGE
when 3 then COUNT(in_seq)
else 0
end JU3,
case IN_JUDGE
when 4 then COUNT(in_seq)
else 0
end JU4,
case IN_JUDGE
when 5 then COUNT(in_seq)
else 0
end JU5,
case IN_JUDGE
when 6 then COUNT(in_seq)
else 0
end JU6,
case IN_JUDGE
when 7 then COUNT(in_seq)
else 0
end JU7
FROM FROM
RPT_INFO RPT_INFO
WHERE WHERE
@ -325,159 +279,98 @@
AND IN_STATE_CODE <> '99' AND IN_STATE_CODE <> '99'
AND IN_INFODATE >= #{dateStart}::date AND IN_INFODATE >= #{dateStart}::date
AND IN_INFODATE <= #{dateEnd}::date AND IN_INFODATE <= #{dateEnd}::date
group by IN_PLACE_CODE, IN_JUDGE) A ]]>
where in_place_code <>'' <if test="policeType != null and policeType.length > 0">
group by IN_PLACE_CODE AND IN_TYPE IN
]]> <foreach collection="policeType" item="type" open="(" close=")" separator=",">
<if test="policeType != null and policeType.length > 0"> #{type}
AND IN_TYPE IN
<foreach collection="policeType" item="type" open="(" close=")" separator=",">
#{type}
</foreach>
</if>
<if test="judges != null and judges.length > 0">
AND IN_JUDGE IN
<foreach collection="judges" item="judge" open="(" close=")" separator=",">
#{judge}
</foreach>
</if>
<if test="category1 != null and category1.length > 0">
AND IN_CATEGORY1 IN
<foreach collection="category1" item="category" open="(" close=")" separator=",">
#{category}
</foreach>
</if>
<if test="category2 != null and category2.length > 0">
AND IN_CATEGORY2 IN
<foreach collection="category2" item="category" open="(" close=")" separator=",">
#{category}
</foreach>
</if>
<if test="category3 != null and category3.length > 0">
AND IN_CATEGORY3 IN
<foreach collection="category3" item="category" open="(" close=")" separator=",">
#{category}
</foreach>
</if>
<if test="category4 != null and category4.length > 0">
AND IN_CATEGORY4 IN
<foreach collection="category4" item="category" open="(" close=")" separator=",">
#{category}
</foreach>
</if>
)
select C.CODENM PLACENAME,
R.REPORT1, R.report2, r.ju1, r.ju2, r.ju3, r.ju4, r.ju5, r.ju6, r.ju7, r.ag, r.bg, r.cg, r.dg
from RPT R
inner join TCODE C
ON C.CODE1 = 'C001' AND C.CODE2 = R.IN_PLACE_CODE
<if test="places != null and places.length > 0">
AND CODE2 IN
<foreach collection="places" item="place" open="(" close=")" separator=",">
#{place}
</foreach> </foreach>
</if> </if>
<if test="judges != null and judges.length > 0">
<!-- WITH RPT AS (--> AND IN_JUDGE IN
<!-- SELECT *--> <foreach collection="judges" item="judge" open="(" close=")" separator=",">
<!-- FROM--> #{judge}
<!-- RPT_INFO--> </foreach>
<!-- WHERE--> </if>
<!-- IN_COMPLETE = '1'--> <if test="category1 != null and category1.length > 0">
<!-- AND IN_STATE_CODE <> '99'--> AND IN_CATEGORY1 IN
<!-- AND IN_INFODATE >= #{dateStart}--> <foreach collection="category1" item="category" open="(" close=")" separator=",">
<!-- AND IN_INFODATE <= #{dateEnd}--> #{category}
<!-- ]]>--> </foreach>
<!-- <if test="policeType != null and policeType.length > 0">--> </if>
<!-- AND IN_TYPE IN--> <if test="category2 != null and category2.length > 0">
<!-- <foreach collection="policeType" item="type" open="(" close=")" separator=",">--> AND IN_CATEGORY2 IN
<!-- #{type}--> <foreach collection="category2" item="category" open="(" close=")" separator=",">
<!-- </foreach>--> #{category}
<!-- </if>--> </foreach>
<!-- <if test="judges != null and judges.length > 0">--> </if>
<!-- AND IN_JUDGE IN--> <if test="category3 != null and category3.length > 0">
<!-- <foreach collection="judges" item="judge" open="(" close=")" separator=",">--> AND IN_CATEGORY3 IN
<!-- #{judge}--> <foreach collection="category3" item="category" open="(" close=")" separator=",">
<!-- </foreach>--> #{category}
<!-- </if>--> </foreach>
<!-- <if test="category1 != null and category1.length > 0">--> </if>
<!-- AND IN_CATEGORY1 IN--> <if test="category4 != null and category4.length > 0">
<!-- <foreach collection="category1" item="category" open="(" close=")" separator=",">--> AND IN_CATEGORY4 IN
<!-- #{category}--> <foreach collection="category4" item="category" open="(" close=")" separator=",">
<!-- </foreach>--> #{category}
<!-- </if>--> </foreach>
<!-- <if test="category2 != null and category2.length > 0">--> </if>
<!-- AND IN_CATEGORY2 IN--> <![CDATA[
<!-- <foreach collection="category2" item="category" open="(" close=")" separator=",">--> )
<!-- #{category}--> SELECT
<!-- </foreach>--> A.PLACENAME,
<!-- </if>--> TO_CHAR(REPORT1) REPORT1, TO_CHAR(REPORT2) REPORT2,
<!-- <if test="category3 != null and category3.length > 0">--> TO_CHAR(JU1) JU1, TO_CHAR(JU2) JU2, TO_CHAR(JU3) JU3, TO_CHAR(JU4) JU4, TO_CHAR(JU5) JU5, TO_CHAR(JU6) JU6, TO_CHAR(JU7) JU7,
<!-- AND IN_CATEGORY3 IN--> TO_CHAR((JU1 + JU2)) AS AG, TO_CHAR((JU3 + JU4)) AS BG, TO_CHAR((JU5 + JU6)) AS CG, TO_CHAR(JU7) AS DG
<!-- <foreach collection="category3" item="category" open="(" close=")" separator=",">--> FROM
<!-- #{category}--> ((
<!-- </foreach>--> SELECT
<!-- </if>--> PLACENAME, PLACECODE, IN_JUDGE, IN_SEQ
<!-- <if test="category4 != null and category4.length > 0">--> FROM
<!-- AND IN_CATEGORY4 IN--> RPT R
<!-- <foreach collection="category4" item="category" open="(" close=")" separator=",">--> RIGHT OUTER JOIN
<!-- #{category}--> (
<!-- </foreach>--> SELECT CODE2 AS PLACECODE, CODENM AS PLACENAME
<!-- </if>--> FROM TCODE
<!-- <![CDATA[--> WHERE CODE1 = 'C001'
<!-- )--> ]]>
<!-- SELECT--> <if test="places != null and places.length > 0">
<!-- A.PLACENAME,--> AND CODE2 IN
<!-- TO_CHAR(REPORT1) REPORT1, TO_CHAR(REPORT2) REPORT2,--> <foreach collection="places" item="place" open="(" close=")" separator=",">
<!-- TO_CHAR(JU1) JU1, TO_CHAR(JU2) JU2, TO_CHAR(JU3) JU3, TO_CHAR(JU4) JU4, TO_CHAR(JU5) JU5, TO_CHAR(JU6) JU6, TO_CHAR(JU7) JU7,--> #{place}
<!-- TO_CHAR((JU1 + JU2)) AS AG, TO_CHAR((JU3 + JU4)) AS BG, TO_CHAR((JU5 + JU6)) AS CG, TO_CHAR(JU7) AS DG--> </foreach>
<!-- FROM--> </if>
<!-- ((--> <![CDATA[
<!-- SELECT--> ) C
<!-- PLACENAME, PLACECODE, IN_JUDGE, IN_SEQ--> ON C.PLACECODE = R.IN_PLACE_CODE
<!-- FROM--> ) PIVOT (COUNT(IN_SEQ) FOR IN_JUDGE IN (1 JU1, 2 JU2, 3 JU3, 4 JU4, 5 JU5, 6 JU6, 7 JU7))) A,
<!-- RPT R--> (
<!-- RIGHT OUTER JOIN--> SELECT
<!-- (--> PLACENAME,
<!-- SELECT CODE2 AS PLACECODE, CODENM AS PLACENAME--> SUM(CASE WHEN IN_REPORT1 = 1 THEN 1 ELSE 0 END) AS REPORT1,
<!-- FROM TCODE--> SUM(CASE WHEN IN_REPORT2 = 1 THEN 1 ELSE 0 END) AS REPORT2
<!-- WHERE CODE1 = 'C001'--> FROM
<!-- ]]>--> RPT R
<!-- <if test="places != null and places.length > 0">--> RIGHT OUTER JOIN
<!-- AND CODE2 IN--> (
<!-- <foreach collection="places" item="place" open="(" close=")" separator=",">--> SELECT CODE2 AS PLACECODE, CODENM AS PLACENAME
<!-- #{place}--> FROM TCODE
<!-- </foreach>--> WHERE CODE1 = 'C001'
<!-- </if>--> ]]>
<!-- <![CDATA[--> <if test="places != null and places.length > 0">
<!-- ) C--> AND CODE2 IN
<!-- ON C.PLACECODE = R.IN_PLACE_CODE--> <foreach collection="places" item="place" open="(" close=")" separator=",">
<!-- ) PIVOT (COUNT(IN_SEQ) FOR IN_JUDGE IN (1 JU1, 2 JU2, 3 JU3, 4 JU4, 5 JU5, 6 JU6, 7 JU7))) A,--> #{place}
<!-- (--> </foreach>
<!-- SELECT--> </if>
<!-- PLACENAME,--> <![CDATA[
<!-- SUM(CASE WHEN IN_REPORT1 = 1 THEN 1 ELSE 0 END) AS REPORT1,--> ) C
<!-- SUM(CASE WHEN IN_REPORT2 = 1 THEN 1 ELSE 0 END) AS REPORT2--> ON C.PLACECODE = R.IN_PLACE_CODE
<!-- FROM--> GROUP BY
<!-- RPT R--> PLACENAME, PLACECODE ) B
<!-- RIGHT OUTER JOIN--> WHERE A.PLACENAME = B.PLACENAME
<!-- (--> ORDER BY PLACECODE
<!-- SELECT CODE2 AS PLACECODE, CODENM AS PLACENAME--> ]]>
<!-- FROM TCODE-->
<!-- WHERE CODE1 = 'C001'-->
<!-- ]]>-->
<!-- <if test="places != null and places.length > 0">-->
<!-- AND CODE2 IN-->
<!-- <foreach collection="places" item="place" open="(" close=")" separator=",">-->
<!-- #{place}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <![CDATA[-->
<!-- ) C-->
<!-- ON C.PLACECODE = R.IN_PLACE_CODE-->
<!-- GROUP BY-->
<!-- PLACENAME, PLACECODE ) B-->
<!-- WHERE A.PLACENAME = B.PLACENAME-->
<!-- ORDER BY PLACECODE-->
</select> </select>
</mapper> </mapper>

View File

@ -1098,7 +1098,8 @@
<ul class="right btn-style"> <ul class="right btn-style">
<c:if test="${regFlag eq 'create'}"> <c:if test="${regFlag eq 'create'}">
<li><a href="javascript:fnInsert('1')"><spring:message code="arrest.submit" /></a></li> <li><a href="javascript:fnInsert('1')"><spring:message
code="arrest.submit" /></a></li>
<%-- <li><a href="javascript:fnInsert('0')"><spring:message code="arrest.temporary"/></a></li> --%> <%-- <li><a href="javascript:fnInsert('0')"><spring:message code="arrest.temporary"/></a></li> --%>
</c:if> </c:if>
<c:if test="${regFlag eq 'modify'}"> <c:if test="${regFlag eq 'modify'}">

View File

@ -267,21 +267,21 @@
<c:if test="${status.last}"><td align="center"><c:out value="${stats.placename}"/></td></c:if> <c:if test="${status.last}"><td align="center"><c:out value="${stats.placename}"/></td></c:if>
<c:if test="${!status.last}"><td align="left"><c:out value="${stats.placename}"/></td></c:if> <c:if test="${!status.last}"><td align="left"><c:out value="${stats.placename}"/></td></c:if>
<td align="center"><c:out value="${stats.report1}"/></td> <td align="center"><c:out value="${stats.REPORT1}"/></td>
<td align="center"><c:out value="${stats.report2}"/></td> <td align="center"><c:out value="${stats.REPORT2}"/></td>
<td align="center"><c:out value="${stats.ju1}"/></td> <td align="center"><c:out value="${stats.JU1}"/></td>
<td align="center"><c:out value="${stats.ju2}"/></td> <td align="center"><c:out value="${stats.JU2}"/></td>
<td align="center"><c:out value="${stats.ju3}"/></td> <td align="center"><c:out value="${stats.JU3}"/></td>
<td align="center"><c:out value="${stats.ju4}"/></td> <td align="center"><c:out value="${stats.JU4}"/></td>
<td align="center"><c:out value="${stats.ju5}"/></td> <td align="center"><c:out value="${stats.JU5}"/></td>
<td align="center"><c:out value="${stats.ju6}"/></td> <td align="center"><c:out value="${stats.JU6}"/></td>
<td align="center"><c:out value="${stats.ju7}"/></td> <td align="center"><c:out value="${stats.JU7}"/></td>
<td align="center"><c:out value="${stats.ag}"/></td> <td align="center"><c:out value="${stats.AG}"/></td>
<td align="center"><c:out value="${stats.bg}"/></td> <td align="center"><c:out value="${stats.BG}"/></td>
<td align="center"><c:out value="${stats.cg}"/></td> <td align="center"><c:out value="${stats.CG}"/></td>
<td align="center"><c:out value="${stats.dg}"/></td> <td align="center"><c:out value="${stats.DG}"/></td>
</tr> </tr>
</c:forEach> </c:forEach>
</c:if> </c:if>

View File

@ -96,7 +96,7 @@
</tr> </tr>
<tr> <tr>
<th> <th>
<form:label path="tel"><spring:message code="target.divmng.equipstat" /></form:label> <form:label path="tel"><spring:message code="target.divmng.equipStat" /></form:label>
</th> </th>
<td colspan="3"> <td colspan="3">
<form:textarea path="equipStat" cssClass="ta" /> <form:textarea path="equipStat" cssClass="ta" />

View File

@ -36,7 +36,7 @@
<td><c:out value="${divMngVO.condition}" /></td> <td><c:out value="${divMngVO.condition}" /></td>
</tr> </tr>
<tr> <tr>
<th><spring:message code="target.divmng.equipstat" /></th> <th><spring:message code="target.divmng.equipStat" /></th>
<td colspan="3"><c:out value="${divMngVO.equipStat}" /></td> <td colspan="3"><c:out value="${divMngVO.equipStat}" /></td>
</tr> </tr>
<tr> <tr>