청산보고서 작업 완료

강석 최 2022-10-12 17:40:48 +09:00
parent 313b44ace4
commit 0e70e715b2
17 changed files with 393 additions and 152 deletions

View File

@ -2,6 +2,7 @@ package com.dbnt.faisp.config;
import com.dbnt.faisp.fpiMgt.affair.service.AffairService;
import com.dbnt.faisp.fpiMgt.affairPlan.service.PlanService;
import com.dbnt.faisp.fpiMgt.affairResult.service.ResultService;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.service.BoardInvestigationService;
import com.dbnt.faisp.publicBoard.service.PublicBoardService;
import lombok.RequiredArgsConstructor;
@ -21,6 +22,7 @@ public class FileController {
private final PlanService planService;
private final PublicBoardService publicBoardService;
private final AffairService affairService;
private final ResultService resultService;
private final BoardInvestigationService boardInvestigationService;
@GetMapping("/file/fileDownload")
@ -40,6 +42,9 @@ public class FileController {
case "affair":
downloadFile = affairService.selectAffairFile(parentKey, fileSeq);
break;
case "affairResult":
downloadFile = resultService.selectResultFile(parentKey, fileSeq);
break;
case "ivsgt":
downloadFile = boardInvestigationService.selectIvsgtFile(parentKey, fileSeq);
break;

View File

@ -50,8 +50,8 @@ public class ResultController { // 첩보수집활동 > 외사경찰 견문관
mav.addObject("accessAuth", accessAuth);
mav.addObject("apprvAuth", apprvAuth);
resultBoard.setQueryInfo();
// mav.addObject("resultList", resultService.selectResultBoardList(resultBoard));
// resultBoard.setContentCnt(resultService.selectResultBoardListCnt(resultBoard));
mav.addObject("resultList", resultService.selectResultBoardList(resultBoard));
resultBoard.setContentCnt(resultService.selectResultBoardListCnt(resultBoard));
resultBoard.setContentCnt(0);
resultBoard.setPaginationInfo();
mav.addObject("searchParams", resultBoard);
@ -168,6 +168,8 @@ public class ResultController { // 첩보수집활동 > 외사경찰 견문관
resultBoard.setWrtDt(LocalDateTime.now());
}
mav.addObject("result", resultBoard);
mav.addObject("categoryList", codeMgtService.selectCodeMgtList("RIC"));
mav.addObject("codeList", codeMgtService.selectCodeMgtList("RID"));
return mav;
}

View File

@ -1,6 +1,8 @@
package com.dbnt.faisp.fpiMgt.affairResult.mapper;
import com.dbnt.faisp.fpiMgt.affair.model.AffairBoard;
import com.dbnt.faisp.fpiMgt.affairResult.model.ResultBoard;
import com.dbnt.faisp.fpiMgt.affairResult.model.ResultToAffair;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -11,4 +13,6 @@ public interface ResultMapper {
List<ResultBoard> selectResultBoardList(ResultBoard resultBoard);
Integer selectResultBoardListCnt(ResultBoard resultBoard);
List<AffairBoard> selectAffairToResultKey(Integer resultKey);
}

View File

@ -26,7 +26,7 @@ public class ClearInfo {
@Column(name = "use_catg")
private String useCatg;
@Column(name = "use_detail")
private String userDetail;
private String useDetail;
@Column(name = "price")
private Double price;

View File

@ -1,6 +1,7 @@
package com.dbnt.faisp.fpiMgt.affairResult.model;
import com.dbnt.faisp.config.BaseModel;
import com.dbnt.faisp.fpiMgt.affair.model.AffairBoard;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -70,6 +71,8 @@ public class ResultBoard extends BaseModel {
@Transient
private String userType;
@Transient
private Integer affairCnt;
@Transient
private Integer fileCnt;
@Transient
private List<ResultApprv> apprvList;
@ -83,4 +86,6 @@ public class ResultBoard extends BaseModel {
private List<ResultInfo> resultInfoList;
@Transient
private List<ResultToAffair> affairList;
@Transient
private List<AffairBoard> affairBoardList;
}

View File

@ -3,7 +3,11 @@ package com.dbnt.faisp.fpiMgt.affairResult.repository;
import com.dbnt.faisp.fpiMgt.affairResult.model.ClearInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface ClearInfoRepository extends JpaRepository<ClearInfo, ClearInfo.ClearInfoId> {
void deleteByResultKey(Integer resultKey);
List<ClearInfo> findByResultKey(Integer resultKey);
}

View File

@ -3,8 +3,12 @@ package com.dbnt.faisp.fpiMgt.affairResult.repository;
import com.dbnt.faisp.fpiMgt.affairResult.model.ResultInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface ResultInfoRepository extends JpaRepository<ResultInfo, ResultInfo.ResultInfoId> {
void deleteByResultKey(Integer resultKey);
List<ResultInfo> findByResultKey(Integer resultKey);
}

View File

@ -3,8 +3,12 @@ package com.dbnt.faisp.fpiMgt.affairResult.repository;
import com.dbnt.faisp.fpiMgt.affairResult.model.ResultToAffair;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface ResultToAffairRepository extends JpaRepository<ResultToAffair, ResultToAffair.ResultToAffairId> {
void deleteByResultKey(Integer resultKey);
List<ResultToAffair> findByResultKey(Integer resultKey);
}

View File

@ -40,6 +40,9 @@ public class ResultService extends BaseService { // 월간계획
if (savedResult != null) {
savedResult.setFileList(resultFileRepository.findByResultKey(resultKey));
savedResult.setApprvList(resultApprvRepository.findByResultKey(resultKey));
savedResult.setClearInfoList(clearInfoRepository.findByResultKey(resultKey));
savedResult.setResultInfoList(resultInfoRepository.findByResultKey(resultKey));
savedResult.setAffairBoardList(resultMapper.selectAffairToResultKey(resultKey));
}
return savedResult;
}

View File

@ -60,21 +60,28 @@
</sql>
<select id="selectResultBoardList" resultType="ResultBoard" parameterType="ResultBoard">
select a.result_key,
a.content_title,
a.work_start_dt,
a.work_end_dt,
a.result_title,
a.result_state,
a.result_dt,
a.wrt_organ,
a.wrt_part,
a.wrt_user_nm,
a.wrt_user_seq,
a.wrt_dt,
b.fileCnt
b.fileCnt,
c.affairCnt
from result_board a
left outer join (select result_key,
count(file_seq) as fileCnt
from result_file
group by result_key) b
on a.result_key = b.result_key
on a.result_key = b.result_key
left outer join (select result_key,
count(*) as affairCnt
from result_to_affair
group by result_key) c
on a.result_key = c.result_key
<include refid="selectResultBoardListWhere"></include>
order by result_key desc
limit #{rowCnt} offset #{firstIndex}
@ -84,4 +91,18 @@
from result_board a
<include refid="selectResultBoardListWhere"></include>
</select>
<select id="selectAffairToResultKey" resultType="AffairBoard" parameterType="int">
select a.affair_key,
a.title,
a.wrt_dt,
b.affair_rate,
b.organ_up
from affair_board a
inner join affair_rating b
on a.affair_key = b.affair_key and a.wrt_organ = b.rating_organ
inner join result_to_affair c
on a.affair_key = c.affair_key
where c.result_key = #{resultKey}
</select>
</mapper>

View File

@ -5,7 +5,7 @@
top: 0;
left: 0;
background-color: #00000050;
z-index: 1090;
z-index: 2090;
}
#fadeDiv > div{

View File

@ -78,10 +78,15 @@ $(document).on('click', '#getAffairBtn', function (){
affairListTbody += "<input type='hidden' name='affairList["+idx+"].affairKey' value='"+chkBox.value+"'>";
affairListTbody += "<td>"+affairTr.find(".wrtDt")[0].innerText+"</td>";
affairListTbody += "<td>"+affairTr.find(".title")[0].innerText+"</td>";
affairListTbody += "<td>"+(affairTr.find(".affairRate")[0].innerText+(affairTr.find(".organUp")[0].innerText==="O"?"(상보)":""))+"</td>";
if(affairTr.find(".affairRate").length>0){
affairListTbody += "<td>"+(affairTr.find(".affairRate")[0].innerText+(affairTr.find(".organUp")[0].innerText==="O"?"(상보)":""))+"</td>";
}else{
affairListTbody += "<td></td>";
}
affairListTbody += "</tr>";
})
$("#affairListTbody").empty().append(affairListTbody);
$("#affairListModal").modal("hide");
})
$(document).on('click', '.rowDeleteBtn', function (){
@ -154,7 +159,6 @@ $(document).on('click', '.resultTr', function (){
})
$(document).on('click', '.apprvBtn', function (){
$("#apprvFormResultKey").val($("#viewModalResultKey").val());
$("#viewModalApprvValue").val($(this).attr("data-resultstate"));
if(confirm($(this).val()+"하시겠습니까?")){
const formData = new FormData($("#apprvForm")[0]);
@ -214,6 +218,18 @@ function getResultEditModal(resultKey){
format: "yyyy-mm-dd",
language: "ko"
});
$(".contactInfo").summernote({
lang:'ko-KR',
height: 60,
disableDragAndDrop: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']]
]
});
setUploadDiv();
},
error:function(){

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="affairViewModalLabel">월간 계획 열람</h5>
<h5 class="modal-title" id="affairViewModalLabel">견문 열람</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">

View File

@ -12,7 +12,7 @@
</select>
</div>
<div class="col-3">
<select class="form-select form-select-sm" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].userDetail')}">
<select class="form-select form-select-sm" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].useDetail')}">
<option value="">선택</option>
<th:block th:each="code:${codeList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>

View File

@ -63,7 +63,7 @@
<div class="col-sm-4">
<div class="row">
<div class="col-auto me-0">
<input type="text" class="form-control form-control-sm" id="planPrice" name="planPrice">
<input type="text" class="form-control form-control-sm" id="planPrice" name="planPrice" th:value="${#numbers.formatInteger(result.planPrice, 1)}">
</div>
<label for="planPrice" class="col-sm-auto col-form-label col-form-label-sm"></label>
</div>
@ -72,7 +72,7 @@
<div class="col-sm-4">
<div class="row">
<div class="col-auto me-0">
<input type="text" class="form-control form-control-sm" id="usePrice" name="usePrice">
<input type="text" class="form-control form-control-sm" id="usePrice" name="usePrice" th:value="${#numbers.formatInteger(result.usePrice, 1)}">
</div>
<label for="usePrice" class="col-sm-auto col-form-label col-form-label-sm"></label>
</div>
@ -90,7 +90,39 @@
<hr class="my-1">
<div class="row">
<div class="col-12" id="clearInfoRow">
<th:block th:each="info:${result.clearInfoList}">
<div class="row my-1 infoRow" th:id="|row${info.infoSeq}|">
<input type="hidden" class="infoSeq clearInfoSeq" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].infoSeq')}" th:value="${info.infoSeq}">
<div class="col-1 infoSeq" th:text="${info.infoSeq+1}"></div>
<div class="col-3">
<select class="form-select form-select-sm" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].useCatg')}">
<option value="">선택</option>
<th:block th:each="category:${categoryList}">
<option th:value="${category.itemCd}" th:text="${category.itemValue}" th:selected="${category.itemCd eq info.useCatg}"></option>
</th:block>
</select>
</div>
<div class="col-3">
<select class="form-select form-select-sm" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].useDetail')}">
<option value="">선택</option>
<th:block th:each="code:${codeList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq info.useDetail}"></option>
</th:block>
</select>
</div>
<div class="col-5">
<div class="row">
<div class="col-7 pe-0">
<input type="text" class="form-control form-control-sm" th:name="${#strings.concat('clearInfoList[', info.infoSeq,'].price')}" th:value="${#numbers.formatInteger(info.price, 1)}">
</div>
<label class="col-auto"></label>
<div class="col-auto">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</div>
</div>
</th:block>
</div>
</div>
<div class="row justify-content-center">
@ -135,15 +167,15 @@
<label class="col-sm-2 col-form-label col-form-label-sm text-center">활동기간</label>
<div class="col-sm-4">
<div class="input-group w-auto">
<input type="text" class="form-control form-control-sm workStartDtCopy" readonly>
<input type="text" class="form-control form-control-sm workEndDtCopy" readonly>
<input type="text" class="form-control form-control-sm workStartDtCopy" th:value="${#temporals.format(result.workStartDt, 'yyyy-MM-dd')}" readonly>
<input type="text" class="form-control form-control-sm workEndDtCopy" th:value="${#temporals.format(result.workEndDt, 'yyyy-MM-dd')}" readonly>
</div>
</div>
<label for="usePriceCopy" class="col-sm-2 col-form-label col-form-label-sm text-center">집행액</label>
<div class="col-sm-4">
<div class="row">
<div class="col-auto me-0">
<input type="text" class="form-control form-control-sm" id="usePriceCopy" readonly>
<input type="text" class="form-control form-control-sm" id="usePriceCopy" th:value="${result.usePrice}" readonly>
</div>
<label for="usePriceCopy" class="col-sm-auto col-form-label col-form-label-sm"></label>
</div>
@ -161,7 +193,23 @@
<hr class="my-1">
<div class="row">
<div class="col-12" id="resultInfoRow">
<th:block th:each="info:${result.resultInfoList}">
<div class="row my-1 infoRow" th:id="|row${info.infoSeq}|">
<input type="hidden" class="infoSeq resultInfoSeq" th:name="${#strings.concat('resultInfoList[', info.infoSeq,'].infoSeq')}" th:value="${info.infoSeq}">
<div class="col-1 infoSeq" th:text="${info.infoSeq+1}"></div>
<div class="col-3">
<input type="text" class="form-control form-control-sm" th:name="${#strings.concat('resultInfoList[', info.infoSeq,'].contactTarget')}"
th:value="${info.contactTarget}">
</div>
<div class="col-7">
<textarea class="contactInfo" th:id="|contactInfo${info.infoSeq}|" th:name="${#strings.concat('resultInfoList[', info.infoSeq,'].contactInfo')}"
th:utext="${info.contactInfo}"></textarea>
</div>
<div class="col-1">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</th:block>
</div>
</div>
<div class="row justify-content-center">
@ -200,8 +248,8 @@
<label class="col-sm-2 col-form-label col-form-label-sm text-center">활동기간</label>
<div class="col-sm-4">
<div class="input-group w-auto">
<input type="text" class="form-control form-control-sm workStartDtCopy" readonly>
<input type="text" class="form-control form-control-sm workEndDtCopy" readonly>
<input type="text" class="form-control form-control-sm workStartDtCopy" th:value="${#temporals.format(result.workStartDt, 'yyyy-MM-dd')}" readonly>
<input type="text" class="form-control form-control-sm workEndDtCopy" th:value="${#temporals.format(result.workEndDt, 'yyyy-MM-dd')}" readonly>
</div>
</div>
<div class="col-auto">
@ -219,7 +267,14 @@
</tr>
</thead>
<tbody id="affairListTbody">
<tr class="affairViewTr" th:each="affair:${result.affairBoardList}">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<td th:text="${#temporals.format(affair.wrtDt, 'yyyy-MM-dd')}"></td>
<td th:text="${affair.title}"></td>
<th:block th:each="ratingCode:${session.commonCode.get('AAR')}">
<td class="affairRate" th:if="${ratingCode.itemCd eq affair.affairRate}" th:text="${#strings.concat(ratingCode.itemValue, (affair.organUp eq 'T'?'(상보)':''))}"></td>
</th:block>
</tr>
</tbody>
</table>
</div>

View File

@ -16,7 +16,7 @@
<div class="card-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${page eq 'main'?' active':''}" id="planTab" data-bs-toggle="tab" type="button" role="tab">전체 목록</button>
<button class="nav-link" th:classappend="${page eq 'main'?' active':''}" id="resultTab" data-bs-toggle="tab" type="button" role="tab">전체 목록</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${page eq 'stay'?' active':''}" id="stayTab" data-bs-toggle="tab" type="button" role="tab">결재대기목록</button>
@ -83,37 +83,36 @@
<tr>
<th></th>
<th>제목</th>
<th>시행일자</th>
<th>사업기간</th>
<th>관서</th>
<th>부서</th>
<th>작성자</th>
<th>작성일시</th>
<th>첨부파일</th>
<th>견문</th>
<th>상태</th>
</tr>
</thead>
<tbody>
<!--<tr class="planTr" th:each="plan:${planList}">
<input type="hidden" class="planKey" th:value="${plan.planKey}">
<tr class="resultTr" th:each="result:${resultList}">
<input type="hidden" class="resultKey" th:value="${result.resultKey}">
<td><input type="checkbox" class="trChkBox"></td>
<td th:text="${plan.contentTitle}"></td>
<td th:text="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}"></td>
<td th:text="${result.resultTitle}"></td>
<td th:text="${#strings.concat(#temporals.format(result.workStartDt, 'yyyy-MM-dd'), '~', #temporals.format(result.workEndDt, 'yyyy-MM-dd'))}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${plan.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
<td th:if="${result.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<td th:if="${plan.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
<td th:if="${result.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<td th:text="${plan.wrtUserNm}"></td>
<td th:text="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${plan.fileCnt eq null?'파일 없음':#strings.concat(plan.fileCnt,' 건')}"></td>
<td th:if="${plan.planState eq 'DST001'}">임시저장</td>
<td th:if="${plan.planState eq 'DST002'}">결재대기</td>
<td th:if="${plan.planState eq 'DST003'}">계장반려</td>
<td th:if="${plan.planState eq 'DST004'}">계장결재</td>
<td th:if="${plan.planState eq 'DST005'}">부장반려</td>
<td th:if="${plan.planState eq 'DST006'}">부장결재</td>
</tr>-->
<td th:text="${result.wrtUserNm}"></td>
<td th:text="${#temporals.format(result.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${result.fileCnt eq null?'파일 없음':#strings.concat(result.fileCnt,' 건')}"></td>
<td th:text="${result.affairCnt eq null?'견문 없음':#strings.concat(result.affairCnt,' 건')}"></td>
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<td th:if="${result.resultState eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
</tr>
</tbody>
</table>
</div>

View File

@ -1,138 +1,257 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="planViewModalLabel">월간 계획 열람</h5>
<h5 class="modal-title" id="planViewModalLabel">청산보고서 열람</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<input type="hidden" name="planKey" id="viewModalPlanKey" th:value="${plan.planKey}">
<input type="hidden" name="wrtOrgan" th:value="${plan.wrtOrgan}">
<input type="hidden" name="planState" id="planState" th:value="${plan.planState}">
<div class="mb-3 row">
<label for="wrtUserNm" class="col-sm-1 col-form-label text-center">작성자</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${plan.wrtUserNm}" readonly>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
<label for="planDt" class="col-sm-1 col-form-label text-center">시행일자</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="planDt" name="planDt" th:value="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}" readonly>
</div>
<label for="planState" class="col-sm-1 col-form-label text-center">상태</label>
<div class="col-sm-2">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<input type="text" class="form-control border-0" th:if="${commonCode.itemCd eq plan.planState}" th:value="${commonCode.itemValue}" readonly>
</th:block>
</div>
</div>
<hr>
<div class="row">
<div class="col-8">
<input type="hidden" name="resultKey" id="viewModalResultKey" th:value="${result.resultKey}">
<input type="hidden" name="wrtOrgan" th:value="${result.wrtOrgan}">
<input type="hidden" name="resultState" id="resultState" th:value="${result.resultState}">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="clearReportViewTab" data-bs-toggle="tab" data-bs-target="#clearReportViewTabPanel" type="button" role="tab" aria-controls="clearReportViewTabPanel" aria-selected="true">청산보고서</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="resultReportViewTab" data-bs-toggle="tab" data-bs-target="#resultReportViewTabPanel" type="button" role="tab" aria-controls="resultReportViewTabPanel" aria-selected="false">결과보고서</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="affairListViewTab" data-bs-toggle="tab" data-bs-target="#affairListViewTabPanel" type="button" role="tab" aria-controls="affairListViewTabPanel" aria-selected="false">견문목록&증빙자료</button>
</li>
</ul>
<div class="tab-content border border-top-0" id="configInfo">
<div class="tab-pane fade p-2 show active" id="clearReportViewTabPanel" role="tabpanel" aria-labelledby="clearReportViewTab" tabindex="0">
<div class="mb-3 row">
<label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label>
<div class="col-sm-10">
<input type="text" class="form-control border-0" id="contentTitle" name="contentTitle" th:value="${plan.contentTitle}" readonly>
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${result.wrtUserNm}" readonly>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="planDiv" class="col-sm-2 col-form-label text-center">주요<br>사업계획</label>
<div class="col-sm-10" id="planDiv">
<th:block th:each="infoList:${plan.mainInfoList}">
<th:block th:if="${infoList.planType eq 'S'}">
<input type="text" class="form-control border-0" name="planInfo" th:value="${infoList.planInfo}" readonly>
</th:block>
</th:block>
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(result.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="detailPlanDiv" class="col-sm-2 col-form-label text-center">사업개요<br><br>추진계획</label>
<div class="col-sm-10" id="detailPlanDiv">
<th:block th:each="infoList:${plan.mainInfoList}">
<th:block th:if="${infoList.planType eq 'D'}">
<div th:utext="${infoList.planInfo}"></div>
</th:block>
</th:block>
</div>
</div>
</div>
<div class="col-4">
<table class="table">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(plan.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(plan.fileList)}">
<th:block th:each="file:${plan.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="affairPlan"
th:data-parentkey="${file.planKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</tbody>
</table>
</div>
</div>
<th:block th:unless="${#lists.isEmpty(plan.apprvList)}">
<hr>
<th:block th:each="apprv,cnt:${plan.apprvList}">
<div class="row justify-content-between py-1">
<div class="col-auto">
<div class="col-sm-2"></div>
<label for="resultState" class="col-sm-1 col-form-label text-center">상태</label>
<div class="col-sm-2">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<span th:if="${commonCode.itemCd eq apprv.state}" th:text="|결재결과: ${commonCode.itemValue}|"></span>
<input type="text" class="form-control border-0" th:if="${commonCode.itemCd eq result.resultState}" th:value="${commonCode.itemValue}" readonly>
</th:block>
<span th:text="|결재자: ${apprv.userNm}|"></span>
</div>
<div class="col-auto">
<span th:text="|결재일시: ${#temporals.format(apprv.saveDt, 'yyyy-MM-dd HH:mm:ss')}|"></span>
</div>
<div class="col-12">
<span th:text="|기타의견: ${apprv.etc}|"></span>
</div>
</div>
</th:block>
</th:block>
</div>
<div class="col-12" th:if="${apprvAuth ne null}">
<form action="#" method="post" id="apprvForm">
<div class="row">
<div class="col-10">
<input type="hidden" name="planKey" id="apprvFormPlanKey">
<input type="hidden" name="state" id="viewModalApprvValue">
<input type="text" class="form-control form-control-sm" name="etc" placeholder="추가의견, 반려사유 기입">
<input type="text" class="d-none" id="submitPrevention">
<hr>
<div class="mb-3 row">
<label for="clearTitle" class="col-sm-2 col-form-label text-center">목적(제목)</label>
<div class="col-sm-6">
<input type="text" class="form-control border-0" id="clearTitle" name="clearTitle" th:value="${result.clearTitle}" readonly>
</div>
<label for="useDate" class="col-sm-1 col-form-label text-center">사용기간</label>
<div class="col-sm-3">
<input type="text" class="form-control border-0" id="useDate" name="useDate"
th:value="${#strings.concat(#temporals.format(result.useStartDt, 'yyyy-MM-dd'), '~', #temporals.format(result.useEndDt, 'yyyy-MM-dd'))}" readonly>
</div>
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-success apprvBtn" th:data-planstate="${apprvAuth eq 'APC004'||apprvAuth eq 'APC003'?'DST004':'DST006'}" value="승인">
<div class="mb-3 row">
<label for="planPrice" class="col-sm-2 col-form-label text-center">계획금액</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="planPrice" name="planPrice" th:value="${#numbers.formatInteger(result.planPrice, 1, 'COMMA')+'원'}" readonly>
</div>
<label for="usePrice" class="col-sm-1 col-form-label text-center">집행액</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="usePrice" name="usePrice" th:value="${#numbers.formatInteger(result.usePrice, 1, 'COMMA')+'원'}" readonly>
</div>
<div class="col-sm-1"></div>
<label for="workDate" class="col-sm-1 col-form-label text-center">사업기간</label>
<div class="col-sm-3">
<input type="text" class="form-control border-0" id="workDate" name="workDate"
th:value="${#strings.concat(#temporals.format(result.workStartDt, 'yyyy-MM-dd'), '~', #temporals.format(result.workEndDt, 'yyyy-MM-dd'))}" readonly>
</div>
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-danger apprvBtn" th:data-planstate="${apprvAuth eq 'APC004'||apprvAuth eq 'APC003'?'DST003':'DST005'}" value="반려">
<hr>
<div class="mb-3 row">
<label for="clearTitle" class="col-sm-2 col-form-label text-center">세부<br>집행내역</label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th>no</th>
<th>구분</th>
<th>상세</th>
<th>금액</th>
</tr>
</thead>
<tbody>
<tr th:each="clearInfo:${result.clearInfoList}">
<td th:text="${clearInfo.infoSeq+1}"></td>
<th:block th:each="commonCode:${session.commonCode.get('RIC')}">
<td th:if="${clearInfo.useCatg eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('RID')}">
<td th:if="${clearInfo.useDetail eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<td th:text="${#strings.concat(#numbers.formatInteger(clearInfo.price, 1, 'COMMA'), '원')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="clearEtc" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-10">
<input type="text" class="form-control border-0" id="clearEtc" name="clearEtc" th:value="${result.clearEtc}" readonly>
</div>
</div>
</div>
</form>
<div class="tab-pane fade p-2" id="resultReportViewTabPanel" role="tabpanel" aria-labelledby="resultReportViewTab" tabindex="0">
<div class="mb-3 row">
<label for="resultTitle" class="col-sm-2 col-form-label text-center">사업명</label>
<div class="col-sm-10">
<input type="text" class="form-control border-0" id="resultTitle" name="resultTitle" th:value="${result.resultTitle}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="usePrice" class="col-sm-2 col-form-label text-center">집행예산</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="usePrice" name="usePrice" th:value="${#numbers.formatInteger(result.usePrice, 1, 'COMMA')+'원'}" readonly>
</div>
<div class="col-sm-1"></div>
<label for="workDate" class="col-sm-1 col-form-label text-center">사업기간</label>
<div class="col-sm-3">
<input type="text" class="form-control border-0" id="workDate" name="workDate"
th:value="${#strings.concat(#temporals.format(result.workStartDt, 'yyyy-MM-dd'), '~', #temporals.format(result.workEndDt, 'yyyy-MM-dd'))}" readonly>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="clearTitle" class="col-sm-2 col-form-label text-center">활동내용</label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th>no</th>
<th>접촉대상자</th>
<th>접촉내용</th>
</tr>
</thead>
<tbody>
<tr th:each="resultInfo:${result.resultInfoList}">
<td th:text="${resultInfo.infoSeq+1}"></td>
<td th:text="${resultInfo.contactTarget}"></td>
<td th:utext="${resultInfo.contactInfo}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="resultEtc" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-10">
<input type="text" class="form-control border-0" id="resultEtc" name="resultEtc" th:value="${result.resultEtc}" readonly>
</div>
</div>
</div>
<div class="tab-pane fade p-2" id="affairListViewTabPanel" role="tabpanel" aria-labelledby="affairListViewTab" tabindex="0">
<div class="row">
<div class="col-8">
<table class="table table-hover">
<thead>
<tr>
<th>작성일자</th>
<th>제목</th>
<th>활용</th>
</tr>
</thead>
<tbody>
<tr class="affairViewTr" th:each="affair:${result.affairBoardList}">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<td th:text="${#temporals.format(affair.wrtDt, 'yyyy-MM-dd')}"></td>
<td th:text="${affair.title}"></td>
<th:block th:each="ratingCode:${session.commonCode.get('AAR')}">
<td class="affairRate" th:if="${ratingCode.itemCd eq affair.affairRate}" th:text="${#strings.concat(ratingCode.itemValue, (affair.organUp eq 'T'?'(상보)':''))}"></td>
</th:block>
</tr>
</tbody>
</table>
</div>
<div class="col-4">
<table class="table">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(result.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(result.fileList)}">
<th:block th:each="file:${result.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="affairResult"
th:data-parentkey="${file.resultKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<th:block th:unless="${#lists.isEmpty(result.apprvList)}">
<hr>
<th:block th:each="apprv,cnt:${result.apprvList}">
<div class="row justify-content-between py-1">
<div class="col-auto">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<span th:if="${commonCode.itemCd eq apprv.state}" th:text="|결재결과: ${commonCode.itemValue}|"></span>
</th:block>
<span th:text="|결재자: ${apprv.userNm}|"></span>
</div>
<div class="col-auto">
<span th:text="|결재일시: ${#temporals.format(apprv.saveDt, 'yyyy-MM-dd HH:mm:ss')}|"></span>
</div>
<div class="col-12">
<span th:text="|기타의견: ${apprv.etc}|"></span>
</div>
</div>
</th:block>
</th:block>
<div class="col-12 mt-2" th:if="${apprvAuth ne null}">
<th:block th:if="${result.resultState eq 'DST002' and (apprvAuth eq 'APC004'||apprvAuth eq 'APC003')
or result.resultState eq 'DST004' and (apprvAuth eq 'APC002'||apprvAuth eq 'APC001')}">
<form action="#" method="post" id="apprvForm">
<div class="row">
<div class="col-10">
<input type="hidden" name="resultKey" th:value="${result.resultKey}">
<input type="hidden" name="state" id="viewModalApprvValue">
<input type="text" class="form-control form-control-sm" name="etc" placeholder="추가의견, 반려사유 기입">
<input type="text" class="d-none" id="submitPrevention">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-success apprvBtn" th:data-resultstate="${apprvAuth eq 'APC004'||apprvAuth eq 'APC003'?'DST004':'DST006'}" value="승인">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-danger apprvBtn" th:data-resultstate="${apprvAuth eq 'APC004'||apprvAuth eq 'APC003'?'DST003':'DST005'}" value="반려">
</div>
</div>
</form>
</th:block>
</div>
</div>
</div>
<div class="modal-footer">
<th:block th:unless="${plan.planState eq 'DST004' or plan.planState eq 'DST006'}"><!--승인 상태일때는 수정 불가-->
<th:block th:if="${userSeq eq plan.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editPlanBtn">수정</button>
<th:block th:unless="${result.resultState eq 'DST004' or result.resultState eq 'DST006'}"><!--승인 상태일때는 수정 불가-->
<th:block th:if="${userSeq eq result.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editResultBtn">수정</button>
</th:block>
</th:block>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>