견문 인쇄 작업중.
parent
43df1469ea
commit
1c9dc70549
|
|
@ -156,19 +156,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
|
|||
public ModelAndView affairViewModal(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){
|
||||
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/affairViewModal");
|
||||
affairBoard = affairService.selectAffairBoard(affairBoard.getAffairKey());
|
||||
for(AffairRating rating: affairBoard.getRateList()){
|
||||
if(rating.getRatingOrgan().equals(loginUser.getOgCd())){
|
||||
affairBoard.setAffairStatus(rating.getAffairStatus());
|
||||
}
|
||||
}
|
||||
if(Utils.isEmpty(affairBoard.getAffairStatus())){
|
||||
for(AffairRating rating: affairBoard.getRateList()){
|
||||
if(rating.getOrganUp()==null || !rating.getOrganUp().equals("T")){
|
||||
affairBoard.setAffairStatus(rating.getAffairStatus());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
affairBoard.setAffairStatus(getAffairRating(affairBoard, loginUser.getOgCd()).getAffairStatus());;
|
||||
|
||||
mav.addObject("affair", affairBoard);
|
||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||
|
|
@ -198,6 +187,14 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
|
|||
public Integer modifyAffairRating(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){
|
||||
return affairService.updateAffairRating(loginUser, affairBoard.getRateList());
|
||||
}
|
||||
@GetMapping("/print")
|
||||
public ModelAndView printAffair(AffairBoard affairBoard){
|
||||
ModelAndView mav = new ModelAndView("print/affair");
|
||||
affairBoard = affairService.selectAffairBoard(affairBoard.getAffairKey());
|
||||
mav.addObject("affair", affairBoard);
|
||||
mav.addObject("affairRating", getAffairRating(affairBoard, affairBoard.getWrtOrgan()));
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/statistics")
|
||||
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){
|
||||
|
|
@ -298,4 +295,25 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
|
|||
}
|
||||
|
||||
|
||||
private AffairRating getAffairRating(AffairBoard affairBoard, String ogCd){
|
||||
AffairRating affairRating = null;
|
||||
for(AffairRating rating: affairBoard.getRateList()){
|
||||
if(rating.getRatingOrgan().equals(ogCd)){
|
||||
affairRating = rating;
|
||||
//affairBoard.setAffairStatus(rating.getAffairStatus());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(affairRating==null){
|
||||
for(AffairRating rating: affairBoard.getRateList()){
|
||||
if(rating.getOrganUp()==null || !rating.getOrganUp().equals("T")){
|
||||
affairRating = rating;
|
||||
//affairBoard.setAffairStatus(rating.getAffairStatus());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return affairRating;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
.table > :not(caption) > * > *{
|
||||
padding: 0;
|
||||
}
|
||||
p{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #FAFAFA;
|
||||
font: 11pt "Tahoma";
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
.page {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 10mm;
|
||||
margin: 10mm auto;
|
||||
background: white;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.subpage {
|
||||
padding: 10mm;
|
||||
height: 277mm;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0;
|
||||
}
|
||||
@media print {
|
||||
html, body {
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
}
|
||||
.page {
|
||||
margin: 0;
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
width: initial;
|
||||
min-height: initial;
|
||||
box-shadow: initial;
|
||||
background: initial;
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ $(document).on('click', '#fileDownBtn', function (){
|
|||
})
|
||||
|
||||
$(document).on('click', '#printBtn', function (){
|
||||
/*window.open("http://118.219.150.34:50570/ClipReport5/report.jsp")*/
|
||||
window.open("http://localhost:8080/affair/print?affairKey="+$(this).attr("data-affairkey"));
|
||||
})
|
||||
|
||||
function getAffairViewModal(affairKey){
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-secondary" id="printBtn">인쇄</button>
|
||||
<button type="button" class="btn btn-secondary" id="printBtn" th:data-affairkey="${affair.affairKey}">인쇄</button>
|
||||
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
|
||||
<!--본청 관리자 상시 수정 허용-->
|
||||
<button type="button" class="btn btn-warning" id="modifyRatingViewBtn">결재정보수정</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,166 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>견문인쇄</title>
|
||||
<link rel="stylesheet" th:href="@{/vendor/bootstrap-5.2.0-dist/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/print.css}">
|
||||
<script type="text/javascript" th:src="@{/vendor/jquery-3.6.0/jquery-3.6.0.min.js}"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
window.print();
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="book">
|
||||
<div class="page">
|
||||
<div class="subpage">
|
||||
<table class="table table-bordered border-dark text-center mb-0">
|
||||
<tr>
|
||||
<td class="text-center"><h3 class="py-2 mb-0">견문보고서</h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p class="float-start ms-2" th:text="${affair.docNo}"></p><p class="float-end me-2" th:text="${affair.reportDt}"></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-bordered border-dark text-center mb-0">
|
||||
<colgroup>
|
||||
<col style="width: 15%">
|
||||
<col style="width: 45%">
|
||||
<col style="width: 10%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 15%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>수신</td>
|
||||
<td class="text-start"></td>
|
||||
<td class="align-middle" rowspan="3">결재</td>
|
||||
<td>계장</td>
|
||||
<td>과장</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>참조</td>
|
||||
<td class="text-start"></td>
|
||||
<td class="align-middle" rowspan="2" th:text="${affairRating.sectionNm eq affairRating.headNm ? '전결':affairRating.sectionNm}"></td>
|
||||
<td class="align-middle" rowspan="2" th:text="${affairRating.headNm}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>발신</td>
|
||||
<td class="text-start"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-bordered border-dark text-center mb-0">
|
||||
<colgroup>
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan="3">보고자</td>
|
||||
<td>분야1</td>
|
||||
<td>분야2</td>
|
||||
<td>분야3</td>
|
||||
<td>분야4</td>
|
||||
<td colspan="5">평가</td>
|
||||
<td>상보</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>소속</td>
|
||||
<td>계급</td>
|
||||
<td>성명</td>
|
||||
<td class="align-middle" rowspan="2">
|
||||
<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>
|
||||
</td>
|
||||
<td class="align-middle" rowspan="2">
|
||||
<th:block th:each="code:${session.commonCode.get('DC02')}">
|
||||
<th:block class="align-middle" rowspan="2" th:if="${affair.affairType2 eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<td class="align-middle" rowspan="2">
|
||||
<th:block th:each="code:${session.commonCode.get('DC03')}">
|
||||
<th:block class="align-middle" rowspan="2" th:if="${affair.affairType3 eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<td class="align-middle" rowspan="2">
|
||||
<th:block th:each="code:${session.commonCode.get('DC04')}">
|
||||
<th:block class="align-middle" rowspan="2" th:if="${affair.affairType4 eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<th:block th:each="code:${session.commonCode.get('AAR')}">
|
||||
<td th:if="${code.useChk eq 'T'}" th:text="${code.itemValue}"></td>
|
||||
</th:block>
|
||||
<td class="align-middle" rowspan="2" th:text="${affairRating.organUp eq 'T'?'O':'X'}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${affair.wrtUserGrd eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
</th:block>
|
||||
</td>
|
||||
<td th:text="${affair.wrtUserNm}"></td>
|
||||
<th:block th:each="code:${session.commonCode.get('AAR')}">
|
||||
<td th:if="${code.itemCd eq affairRating.affairRate and code.useChk eq 'T'}" th:text="O"></td>
|
||||
<td th:if="${code.itemCd ne affairRating.affairRate and code.useChk eq 'T'}"></td>
|
||||
</th:block>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-bordered border-dark text-center mb-0">
|
||||
<colgroup>
|
||||
<col style="width: 15%">
|
||||
<col style="width: 85%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>비고</td>
|
||||
<td class="text-start" th:text="${affair.etc}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>검토의견</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>제목</td>
|
||||
<td class="text-start" th:text="${affair.title}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>내용</td>
|
||||
<td class="text-start" th:utext="${affair.content}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-bordered border-dark text-center mb-0">
|
||||
<colgroup>
|
||||
<col style="width: 15%">
|
||||
<col style="width: 85%">
|
||||
</colgroup>
|
||||
<th:block th:if="${#lists.isEmpty(affair.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">첨부파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(affair.fileList)}">
|
||||
<th:block th:each="file, cnt:${affair.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<td th:text="|첨부파일${cnt.count}|"></td>
|
||||
<td class="text-start" th:text="|${file.origNm}.${file.fileExtn}|"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue