견문보고

- 문서번호 부여 작업완료
 - 인쇄 작업중.
master
강석 최 2023-02-13 11:14:32 +09:00
parent 684848e43e
commit 767fca621c
9 changed files with 28 additions and 9 deletions

View File

@ -98,7 +98,7 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
affairBoard.setWrtOrgan(loginUser.getOgCd()); affairBoard.setWrtOrgan(loginUser.getOgCd());
affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList()); affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
String parentOrgan = organConfigService.selectParentOrgan(loginUser.getOgCd()); String parentOrgan = organConfigService.selectParentOrgan(loginUser.getOgCd());
if(!parentOrgan.equals("OG001")){ if(parentOrgan!= null && !parentOrgan.equals("OG001")){
affairBoard.setGroupOrganCdList(organConfigService.selectChildOrgan(parentOrgan)); affairBoard.setGroupOrganCdList(organConfigService.selectChildOrgan(parentOrgan));
} }
affairBoard.setQueryType("openReportList"); affairBoard.setQueryType("openReportList");

View File

@ -32,4 +32,6 @@ public interface AffairMapper {
List<TypeStatistics> selectSangboTotal(TypeStatistics typeStatistics); List<TypeStatistics> selectSangboTotal(TypeStatistics typeStatistics);
List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics); List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics);
String selectDocNo(AffairBoard affair);
} }

View File

@ -63,6 +63,8 @@ public class AffairBoard extends BaseModel {
private String affairCategory; private String affairCategory;
@Column(name = "wrt_user_grd") @Column(name = "wrt_user_grd")
private String wrtUserGrd; private String wrtUserGrd;
@Column(name = "doc_no")
private String docNo;
@Transient @Transient
private String organUp; private String organUp;

View File

@ -53,6 +53,7 @@ public class AffairService extends BaseService { // 견문보고
} }
@Transactional @Transactional
public Integer saveAffairBoard(AffairBoard affair, List<Integer> deleteFileSeq){ public Integer saveAffairBoard(AffairBoard affair, List<Integer> deleteFileSeq){
affair.setDocNo(affairMapper.selectDocNo(affair));
Integer affairKey = affairBoardRepository.save(affair).getAffairKey(); Integer affairKey = affairBoardRepository.save(affair).getAffairKey();
if(!affair.getHashTags().isEmpty()){ if(!affair.getHashTags().isEmpty()){
saveHashTagLink(affairKey, affair.getHashTags().split(" ")); saveHashTagLink(affairKey, affair.getHashTags().split(" "));

View File

@ -110,7 +110,8 @@
b.fileCnt, b.fileCnt,
c.affair_status, c.affair_status,
c.affair_rate, c.affair_rate,
c.organ_up c.organ_up,
a.doc_no
from affair_board a from affair_board a
left outer join (select affair_key, left outer join (select affair_key,
count(file_seq) as fileCnt count(file_seq) as fileCnt
@ -137,6 +138,15 @@
where a.affair_key = #{affairKey} where a.affair_key = #{affairKey}
</select> </select>
<select id="selectDocNo" resultType="string" parameterType="AffairBoard">
select b.item_value||'외사-'||a.cnt
from (select wrt_organ, count(*) as cnt
from affair_board
where wrt_organ = #{wrtOrgan}
group by wrt_organ) a
inner join code_mgt b on a.wrt_organ = b.item_cd
</select>
<sql id="searchStatistics"> <sql id="searchStatistics">
<if test='userNm != null and userNm != ""'> <if test='userNm != null and userNm != ""'>
and wrt_user_nm like '%'||#{userNm}||'%' and wrt_user_nm like '%'||#{userNm}||'%'
@ -644,5 +654,4 @@
on c.wrt_organ = a.item_cd and c.affair_rate = b.item_cd on c.wrt_organ = a.item_cd and c.affair_rate = b.item_cd
order by wrt_organ,affairType asc order by wrt_organ,affairType asc
</select> </select>
</mapper> </mapper>

View File

@ -225,6 +225,10 @@ $(document).on('click', '#fileDownBtn', function (){
} }
}) })
$(document).on('click', '#printBtn', function (){
window.open("http://118.219.150.34:50570/ClipReport5/report.jsp")
})
function getAffairViewModal(affairKey){ function getAffairViewModal(affairKey){
$.ajax({ $.ajax({
url: '/affair/affairViewModal', url: '/affair/affairViewModal',

View File

@ -160,7 +160,7 @@
<tr class="affairTr" th:each="affair:${affairList}"> <tr class="affairTr" th:each="affair:${affairList}">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}"> <input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<td><input type="checkbox" class="trChkBox"></td> <td><input type="checkbox" class="trChkBox"></td>
<td th:text="|해양경찰청외사-${affair.affairKey}|"></td> <td th:text="${affair.docNo}"></td>
<td> <td>
<th:block th:each="code:${session.commonCode.get('DC01')}"> <th:block th:each="code:${session.commonCode.get('DC01')}">
<th:block th:if="${affair.affairType1 eq code.itemCd}" th:text="${code.itemValue}"></th:block> <th:block th:if="${affair.affairType1 eq code.itemCd}" th:text="${code.itemValue}"></th:block>
@ -209,7 +209,7 @@
<td th:text="${affair.organUp eq 'T'?'O':'X'}"></td> <td th:text="${affair.organUp eq 'T'?'O':'X'}"></td>
</th:block> </th:block>
<th:block th:if="${page eq 'stayReport'}"> <th:block th:if="${page eq 'stayReport'}">
<th:block th:if="${apprvAuth eq 'APC004' or apprvAuth eq 'APC003'}"> <th:block th:if="${(#strings.contains(apprvAuth, 'APC004') or #strings.contains(apprvAuth, 'APC003')) and affair.affairStatus eq 'DST002'}">
<td colspan="2" class="apprvTd"> <td colspan="2" class="apprvTd">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}"> <input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<input type="radio" class="apprvChkbox" th:id="|apprvChkbox${affair.affairKey}DST004|" th:name="|apprvChkbox${affair.affairKey}|" value="DST004"> <input type="radio" class="apprvChkbox" th:id="|apprvChkbox${affair.affairKey}DST004|" th:name="|apprvChkbox${affair.affairKey}|" value="DST004">
@ -220,7 +220,7 @@
<label th:for="|apprvChkbox${affair.affairKey}|">해제</label> <label th:for="|apprvChkbox${affair.affairKey}|">해제</label>
</td> </td>
</th:block> </th:block>
<th:block th:if="${apprvAuth eq 'APC002' or apprvAuth eq 'APC001'}"> <th:block th:if="${(#strings.contains(apprvAuth, 'APC002') or #strings.contains(apprvAuth, 'APC001')) and affair.affairStatus eq 'DST004'}">
<td colspan="2" class="apprvTd"> <td colspan="2" class="apprvTd">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}"> <input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<div class="row justify-content-center"> <div class="row justify-content-center">

View File

@ -24,7 +24,7 @@
<label <label
class="col-sm-1 col-form-label col-form-label-sm text-center ">문서번호</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">문서번호</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" <label class="col-sm-2 col-form-label col-form-label-sm text-start"
th:text="|해양경찰청외사-${affair.affairKey}|"></label> th:text="${affair.docNo}"></label>
</div> </div>
<div class="row"> <div class="row">
<label <label
@ -361,6 +361,7 @@
</div> </div>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" id="printBtn">인쇄</button>
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}"> <th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<!--본청 관리자 상시 수정 허용--> <!--본청 관리자 상시 수정 허용-->
<button type="button" class="btn btn-warning" id="modifyRatingViewBtn">결재정보수정</button> <button type="button" class="btn btn-warning" id="modifyRatingViewBtn">결재정보수정</button>

View File

@ -125,7 +125,7 @@
<div class="card-header bg-white"> <div class="card-header bg-white">
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto dash-title">외사경찰 견문관리</div> <div class="col-auto dash-title">외사경찰 견문관리</div>
<div class="col-auto"><a href="/affair/affairMgt?affairCategory=CAT215" class="link-dark"><i class="bi bi-list"></i></a></div> <div class="col-auto"><a href="/affair/affairMgt/myReport?affairCategory=CAT215" class="link-dark"><i class="bi bi-list"></i></a></div>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -158,7 +158,7 @@
<div class="card-header bg-white"> <div class="card-header bg-white">
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto dash-title">외사첩보망 견문관리</div> <div class="col-auto dash-title">외사첩보망 견문관리</div>
<div class="col-auto"><a href="/affair/affairMgt?affairCategory=CAT216" class="link-dark"><i class="bi bi-list"></i></a></div> <div class="col-auto"><a href="/affair/affairMgt/myReport?affairCategory=CAT216" class="link-dark"><i class="bi bi-list"></i></a></div>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">