fix:견문통계 중간저장
parent
f05d719d80
commit
8a033d8d86
|
|
@ -238,19 +238,21 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
|
|||
List<TypeStatistics> type2 = affairService.selectType2List(typeStatistics);
|
||||
List<TypeStatistics> type3 = affairService.selectType3List(typeStatistics);
|
||||
List<TypeStatistics> type4 = affairService.selectType4List(typeStatistics);
|
||||
List<TypeStatistics> totalList = affairService.selectStatusTotal(typeStatistics);
|
||||
List<TypeStatistics> type1List = affairService.selecType1ListCnt(typeStatistics);
|
||||
List<TypeStatistics> type2List = affairService.selecType2ListCnt(typeStatistics);
|
||||
List<TypeStatistics> type3List = affairService.selecType3ListCnt(typeStatistics);
|
||||
List<TypeStatistics> type4List = affairService.selecType4ListCnt(typeStatistics);
|
||||
List<TypeStatistics> totalList = affairService.selectStatusTotal(typeStatistics);
|
||||
TypeStatistics total = new TypeStatistics();
|
||||
total.setItemValue("누계");
|
||||
total.setWrtOrgan("total");
|
||||
total.setCnt(0);
|
||||
for(TypeStatistics stat: totalList) {
|
||||
total.setCnt(total.getCnt()+stat.getCnt());
|
||||
if(!totalList.isEmpty()) {
|
||||
TypeStatistics total = new TypeStatistics();
|
||||
total.setItemValue("누계");
|
||||
total.setWrtOrgan("total");
|
||||
total.setCnt(0);
|
||||
for(TypeStatistics stat: totalList) {
|
||||
total.setCnt(total.getCnt()+stat.getCnt());
|
||||
}
|
||||
totalList.add(total);
|
||||
}
|
||||
totalList.add(total);
|
||||
mav.addObject("totalList", totalList);
|
||||
type1List = addTotalRow(type1, type1List);
|
||||
type2List = addTotalRow(type2, type2List);
|
||||
|
|
|
|||
|
|
@ -123,12 +123,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC01'
|
||||
<if test='category1 != null and category1 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='category1 != null and category1 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01')
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by affairType asc
|
||||
</select>
|
||||
|
||||
|
|
@ -137,12 +142,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC02'
|
||||
<if test='category2 != null and category2 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='category2 != null and category2 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02')
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by affairType asc
|
||||
</select>
|
||||
|
||||
|
|
@ -151,12 +161,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC03'
|
||||
<if test='category3 != null and category3 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='category3 != null and category3 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03')
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by affairType asc
|
||||
</select>
|
||||
|
||||
|
|
@ -165,12 +180,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC04'
|
||||
<if test='category4 != null and category4 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='category4 != null and category4 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04')
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by affairType asc
|
||||
</select>
|
||||
|
||||
|
|
@ -184,16 +204,47 @@
|
|||
from code_mgt
|
||||
where category_cd = 'OG'
|
||||
and use_chk = 'T'
|
||||
<if test='organList != null and organList != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="organList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='organList != null and organList != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="organList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'OG' and use_chk = 'T')
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by item_cd asc) a left outer join
|
||||
(select wrt_organ,
|
||||
count(*) as cnt
|
||||
from affair_board
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test='category1 != null and category1 != ""'>
|
||||
or affair_type1 in
|
||||
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='category2 != null and category2 != ""'>
|
||||
or affair_type2 in
|
||||
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='category3 != null and category3 != ""'>
|
||||
or affair_type3 in
|
||||
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='category4 != null and category4 != ""'>
|
||||
or affair_type4 in
|
||||
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
group by wrt_organ)b on
|
||||
a.item_cd = b.wrt_organ
|
||||
order by wrt_organ asc
|
||||
|
|
@ -209,12 +260,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC01'
|
||||
<if test='category1 != null and category1 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test='category1 != null and category1 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01')
|
||||
</otherwise>
|
||||
</choose>
|
||||
)a left join
|
||||
(select item_cd,
|
||||
item_value
|
||||
|
|
@ -248,12 +304,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC02'
|
||||
<if test='category2 != null and category2 != ""'>
|
||||
<choose>
|
||||
<when test='category2 != null and category2 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02')
|
||||
</otherwise>
|
||||
</choose>
|
||||
)a left join
|
||||
(select item_cd,
|
||||
item_value
|
||||
|
|
@ -287,12 +348,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC03'
|
||||
<if test='category3 != null and category3 != ""'>
|
||||
<choose>
|
||||
<when test='category3 != null and category3 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03')
|
||||
</otherwise>
|
||||
</choose>
|
||||
)a left join
|
||||
(select item_cd,
|
||||
item_value
|
||||
|
|
@ -326,12 +392,17 @@
|
|||
item_value
|
||||
from code_mgt
|
||||
where category_cd = 'DC04'
|
||||
<if test='category4 != null and category4 != ""'>
|
||||
<choose>
|
||||
<when test='category4 != null and category4 != ""'>
|
||||
and item_cd in
|
||||
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
#{item}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04')
|
||||
</otherwise>
|
||||
</choose>
|
||||
)a left join
|
||||
(select item_cd,
|
||||
item_value
|
||||
|
|
|
|||
|
|
@ -90,24 +90,40 @@
|
|||
<tr>
|
||||
<th rowspan="2">구분</th>
|
||||
<th rowspan="2">누계</th>
|
||||
<th:block th:unless="${#lists.isEmpty(type1)}">
|
||||
<th th:colspan="${type1.size()}">분류1</th>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type2)}">
|
||||
<th th:colspan="${type2.size()}">분류2</th>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type3)}">
|
||||
<th th:colspan="${type3.size()}">분류3</th>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type4)}">
|
||||
<th th:colspan="${type4.size()}">분류4</th>
|
||||
</th:block>
|
||||
</tr>
|
||||
<tr>
|
||||
<th:block th:unless="${#lists.isEmpty(type1)}">
|
||||
<th:block th:each="type1:${type1}">
|
||||
<th th:text="${type1.itemValue}"></th>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type2)}">
|
||||
<th:block th:each="type2:${type2}">
|
||||
<th th:text="${type2.itemValue}"></th>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type3)}">
|
||||
<th:block th:each="type3:${type3}">
|
||||
<th th:text="${type3.itemValue}"></th>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(type4)}">
|
||||
<th:block th:each="type4:${type4}">
|
||||
<th th:text="${type4.itemValue}"></th>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue