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