운영계획서 열람, 수정 기능 추가.

DESKTOP-NQTA8OG\lcks0 2022-09-11 15:30:20 +09:00
parent ea61d6ad09
commit 50b9bdc061
22 changed files with 232 additions and 130 deletions

View File

@ -33,10 +33,4 @@ dependencies {
runtimeOnly 'org.postgresql:postgresql:42.3.6' runtimeOnly 'org.postgresql:postgresql:42.3.6'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:2.7.2' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:2.7.2'
annotationProcessor 'org.projectlombok:lombok:1.18.24' annotationProcessor 'org.projectlombok:lombok:1.18.24'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.7.2'
testImplementation 'org.springframework.security:spring-security-test:5.7.2'
}
tasks.named('test') {
useJUnitPlatform()
} }

View File

@ -1,18 +1,13 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.authMgt;
import com.dbnt.faisp.authMgt.AuthMgtService; import com.dbnt.faisp.authMgt.service.AuthMgtService;
import com.dbnt.faisp.authMgt.model.AccessConfig;
import com.dbnt.faisp.authMgt.model.ApprovalConfig;
import com.dbnt.faisp.authMgt.model.AuthMgt; import com.dbnt.faisp.authMgt.model.AuthMgt;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.userInfo.service.UserInfoService;
import com.dbnt.faisp.userInfo.UserInfoService;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.util.List;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.authMgt; package com.dbnt.faisp.authMgt.service;
import com.dbnt.faisp.authMgt.mapper.AuthMgtMapper; import com.dbnt.faisp.authMgt.mapper.AuthMgtMapper;
import com.dbnt.faisp.authMgt.model.AccessConfig; import com.dbnt.faisp.authMgt.model.AccessConfig;

View File

@ -1,7 +1,7 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.codeMgt;
import com.dbnt.faisp.codeMgt.model.CodeCatg; import com.dbnt.faisp.codeMgt.model.CodeCatg;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.codeMgt; package com.dbnt.faisp.codeMgt.service;
import com.dbnt.faisp.codeMgt.model.CodeCatg; import com.dbnt.faisp.codeMgt.model.CodeCatg;
import com.dbnt.faisp.codeMgt.model.CodeMgt; import com.dbnt.faisp.codeMgt.model.CodeMgt;

View File

@ -1,13 +1,9 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.config;
import com.dbnt.faisp.authMgt.AuthMgtService; import com.dbnt.faisp.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.organMgt.service.OrganConfigService;
import com.dbnt.faisp.menuMgt.model.MenuMgt;
import com.dbnt.faisp.organMgt.OrganConfigService;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.codeMgt.model.CodeCatg;
import com.dbnt.faisp.codeMgt.model.CodeMgt;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
@ -15,9 +11,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
@RestController @RestController

View File

@ -1,6 +1,6 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.fpiMgt;
import com.dbnt.faisp.fpiMgt.monthPlan.MonthPlanService; import com.dbnt.faisp.fpiMgt.monthPlan.service.MonthPlanService;
import com.dbnt.faisp.fpiMgt.monthPlan.model.BoardPlan; import com.dbnt.faisp.fpiMgt.monthPlan.model.BoardPlan;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@RestController @RestController
@ -45,6 +44,14 @@ public class FpiMgtController { // 외사경찰견문관리
return mav; return mav;
} }
@GetMapping("/planViewModal")
public ModelAndView planViewModal(BoardPlan boardPlan){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monthPlan/planViewModal");
boardPlan = monthPlanService.selectBoardPlan(boardPlan.getPlanKey());
mav.addObject("plan", boardPlan);
return mav;
}
@PostMapping("/savePlan") @PostMapping("/savePlan")
public Integer savePlan(BoardPlan boardPlan, public Integer savePlan(BoardPlan boardPlan,
@RequestParam(value = "planInfos", required = false) List<String> planInfos, @RequestParam(value = "planInfos", required = false) List<String> planInfos,

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.fpiMgt.monthPlan; package com.dbnt.faisp.fpiMgt.monthPlan.service;
import com.dbnt.faisp.fpiMgt.monthPlan.mapper.MonthPlanMapper; import com.dbnt.faisp.fpiMgt.monthPlan.mapper.MonthPlanMapper;

View File

@ -1,7 +1,7 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.menuMgt;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.menuMgt.model.MenuMgt;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.menuMgt; package com.dbnt.faisp.menuMgt.service;
import com.dbnt.faisp.menuMgt.mapper.MenuMgtMapper; import com.dbnt.faisp.menuMgt.mapper.MenuMgtMapper;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.menuMgt.model.MenuMgt;

View File

@ -1,8 +1,8 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.organMgt;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.codeMgt.model.CodeMgt; import com.dbnt.faisp.codeMgt.model.CodeMgt;
import com.dbnt.faisp.organMgt.OrganConfigService; import com.dbnt.faisp.organMgt.service.OrganConfigService;
import com.dbnt.faisp.organMgt.model.OrganConfig; import com.dbnt.faisp.organMgt.model.OrganConfig;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.organMgt; package com.dbnt.faisp.organMgt.service;
import com.dbnt.faisp.organMgt.mapper.OrganConfigMapper; import com.dbnt.faisp.organMgt.mapper.OrganConfigMapper;
import com.dbnt.faisp.organMgt.model.OrganConfig; import com.dbnt.faisp.organMgt.model.OrganConfig;

View File

@ -1,18 +1,15 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.translator;
import com.dbnt.faisp.authMgt.AuthMgtService; import com.dbnt.faisp.authMgt.service.AuthMgtService;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.organMgt.service.OrganConfigService;
import com.dbnt.faisp.organMgt.OrganConfigService;
import com.dbnt.faisp.translator.TranslatorService;
import com.dbnt.faisp.translator.model.Translator; import com.dbnt.faisp.translator.model.Translator;
import com.dbnt.faisp.userInfo.UserInfoService; import com.dbnt.faisp.translator.service.TranslatorService;
import com.dbnt.faisp.userInfo.service.UserInfoService;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import java.util.List;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.translator; package com.dbnt.faisp.translator.service;
import com.dbnt.faisp.menuMgt.mapper.MenuMgtMapper; import com.dbnt.faisp.menuMgt.mapper.MenuMgtMapper;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.menuMgt.model.MenuMgt;

View File

@ -1,7 +1,7 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.userInfo;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import com.dbnt.faisp.userInfo.UserInfoService; import com.dbnt.faisp.userInfo.service.UserInfoService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.userInfo; package com.dbnt.faisp.userInfo.service;
import com.dbnt.faisp.config.Role; import com.dbnt.faisp.config.Role;
import com.dbnt.faisp.userInfo.mapper.UserInfoMapper; import com.dbnt.faisp.userInfo.mapper.UserInfoMapper;

View File

@ -1,10 +1,9 @@
package com.dbnt.faisp.controller; package com.dbnt.faisp.userInfo;
import com.dbnt.faisp.authMgt.AuthMgtService; import com.dbnt.faisp.authMgt.service.AuthMgtService;
import com.dbnt.faisp.codeMgt.CodeMgtService; import com.dbnt.faisp.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.userInfo.service.UserInfoService;
import com.dbnt.faisp.userInfo.UserInfoService;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -37,7 +36,7 @@ public class userMgtController {
mav.addObject("searchParams", userInfo); mav.addObject("searchParams", userInfo);
return mav; return mav;
} }
@GetMapping("/userEditModal") @GetMapping("/userEditModal")
public ModelAndView menuEditModal(UserInfo userInfo){ public ModelAndView menuEditModal(UserInfo userInfo){
ModelAndView mav = new ModelAndView("adminPage/userMgt/userEditModal"); ModelAndView mav = new ModelAndView("adminPage/userMgt/userEditModal");

View File

@ -1,23 +1,27 @@
$(document).on('click', '#addPlanBtn', function (){ $(document).on('click', '#addPlanBtn', function (){
getEditModal(null)
})
$(document).on('click', '.planTr', function (){
$.ajax({ $.ajax({
url: '/fpiMgt/planEditModal', url: '/fpiMgt/planViewModal',
data: {planKey: null}, data: {planKey: Number($(this).find(".planKey").val())},
type: 'GET', type: 'GET',
dataType:"html", dataType:"html",
success: function(html){ success: function(html){
$("#planEditBody").empty().append(html) $("#planViewBody").empty().append(html)
$("#planEditModal").modal('show'); $("#planViewModal").modal('show');
$("#planDt").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
}, },
error:function(){ error:function(){
} }
}); });
}) })
$(document).on('click', '#editPlanBtn', function (){
$("#planViewModal").modal('hide');
getEditModal(Number($("#planViewBody").find("[name='planKey']").val()));
})
$(document).on('click', '#planAddBtn', function (){ $(document).on('click', '#planAddBtn', function (){
$("#planDiv").append("<input type='text' class='form-control' name='planInfos'>") $("#planDiv").append("<input type='text' class='form-control' name='planInfos'>")
@ -48,6 +52,38 @@ $(document).on('click', '#saveTempBtn', function (){
savePlan('T') savePlan('T')
}) })
function getEditModal(planKey){
$.ajax({
url: '/fpiMgt/planEditModal',
data: {planKey: planKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#planEditModalContent").empty().append(html)
$("#planEditModal").modal('show');
$("#planDt").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
$("[name='detailPlanInfos']").summernote({
lang:'ko-KR',
height: 120,
disableDragAndDrop: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']]
]
});
},
error:function(){
}
});
}
function savePlan(planState){ function savePlan(planState){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
$("#planState").val(planState); $("#planState").val(planState);

View File

@ -25,7 +25,7 @@
</li> </li>
</ul> </ul>
<div class="tab-content border border-top-0 p-2" id="planContent"> <div class="tab-content border border-top-0 p-2" id="planContent">
<form method="get" th:action="@{/menuMgt/menuMgtPage}"> <form method="get" th:action="@{/fpiMgt/monthPlanPage}">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}"> <input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1"> <div class="row justify-content-between pe-3 py-1">
<div class="col-auto"> <div class="col-auto">
@ -63,7 +63,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr th:each="plan:${planList}"> <tr class="planTr" th:each="plan:${planList}">
<input type="hidden" class="planKey" th:value="${plan.planKey}">
<td><input type="checkbox"></td> <td><input type="checkbox"></td>
<td th:text="${plan.contentTitle}"></td> <td th:text="${plan.contentTitle}"></td>
<td th:text="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}"></td> <td th:text="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}"></td>
@ -122,19 +123,25 @@
</main> </main>
<div class="modal fade" id="planEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planEditModalLabel" aria-hidden="true"> <div class="modal fade" id="planEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content" id="planEditModalContent">
</div>
</div>
</div>
<div class="modal fade" id="planViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl"> <div class="modal-dialog modal-xl">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="planEditModalLabel">월간 계획 작성</h5> <h5 class="modal-title" id="planViewModalLabel">월간 계획 열람</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body" id="planEditBody"> <div class="modal-body" id="planViewBody">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button> <button type="button" class="btn btn-warning" id="editPlanBtn">수정</button>
<button type="button" class="btn btn-primary" id="savePlanBtn">저장</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,47 +1,66 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"> <html lang="ko" xmlns:th="http://www.thymeleaf.org">
<form action="#" method="post" id="planEditForm"> <div class="modal-header">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <h5 class="modal-title" id="planEditModalLabel" th:text="${plan.planKey eq null?'월간 계획 작성':'월간 계획 수정'}"></h5>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<input type="hidden" name="planKey" th:value="${plan.planKey}"> </div>
<input type="hidden" name="wrtOrgan" th:value="${plan.wrtOrgan}"> <div class="modal-body" id="planEditBody">
<input type="hidden" name="planState" id="planState" th:value="${plan.planState}"> <form action="#" method="post" id="planEditForm">
<div class="mb-3 row"> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<label for="wrtNm" class="col-sm-2 col-form-label text-center">작성자</label> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="col-sm-2"> <input type="hidden" name="planKey" th:value="${plan.planKey}">
<input type="text" class="form-control" id="wrtNm" name="wrtNm" th:value="${plan.wrtNm}" readonly> <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="wrtNm" class="col-sm-2 col-form-label text-center">작성자</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="wrtNm" name="wrtNm" th:value="${plan.wrtNm}" readonly>
</div>
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
<label for="planDt" class="col-sm-2 col-form-label text-center">시행일자</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="planDt" name="planDt" th:value="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}" autocomplete="off">
</div>
</div> </div>
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label> <div class="mb-3 row">
<div class="col-sm-2"> <label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label>
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly> <div class="col-sm-10">
<input type="text" class="form-control" id="contentTitle" name="contentTitle" th:value="${plan.contentTitle}">
</div>
</div> </div>
<label for="planDt" class="col-sm-2 col-form-label text-center">시행일자</label> <div class="mb-3 row justify-content-center">
<div class="col-sm-2"> <label for="planDiv" class="col-sm-2 col-form-label text-center">주요 사업계획</label>
<input type="text" class="form-control" id="planDt" name="planDt" th:value="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}" autocomplete="off"> <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" name="planInfos" th:value="${infoList.planInfo}">
</th:block>
</th:block>
</div>
<div class="col-sm-auto">
<button type="button" class="btn btn-sm btn-outline-primary" id="planAddBtn"><i class="bi bi-plus-lg"></i></button>
</div>
</div> </div>
</div> <div class="mb-3 row justify-content-center">
<div class="mb-3 row"> <label for="detailPlanDiv" class="col-sm-2 col-form-label text-center">사업개요 및 추진계획</label>
<label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label> <div class="col-sm-10" id="detailPlanDiv">
<div class="col-sm-10"> <th:block th:each="infoList:${plan.mainInfoList}">
<input type="text" class="form-control" id="contentTitle" name="contentTitle" th:value="${plan.contentTitle}"> <th:block th:if="${infoList.planType eq 'D'}">
<textarea type='text' name='detailPlanInfos' th:utext="${infoList.planInfo}"></textarea>
</th:block>
</th:block>
</div>
<div class="col-sm-auto">
<button type="button" class="btn btn-sm btn-outline-primary" id="detailPlanAddBtn"><i class="bi bi-plus-lg"></i></button>
</div>
</div> </div>
</div> </form>
<div class="mb-3 row justify-content-center"> </div>
<label for="planAddBtn" class="col-sm-2 col-form-label text-center">주요 사업계획</label> <div class="modal-footer">
<div class="col-sm-10" id="planDiv"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<!--<input type="text" class="form-control" name="planInfo">--> <button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
</div> <button type="button" class="btn btn-primary" id="savePlanBtn">저장</button>
<div class="col-sm-auto"> </div>
<button type="button" class="btn btn-sm btn-outline-primary" id="planAddBtn"><i class="bi bi-plus-lg"></i></button>
</div>
</div>
<div class="mb-3 row justify-content-center">
<label for="detailPlanAddBtn" class="col-sm-2 col-form-label text-center">사업개요 및 추진계획</label>
<div class="col-sm-10" id="detailPlanDiv">
<!--<textarea id="detailPlanInfo"></textarea>-->
</div>
<div class="col-sm-auto">
<button type="button" class="btn btn-sm btn-outline-primary" id="detailPlanAddBtn"><i class="bi bi-plus-lg"></i></button>
</div>
</div>
</form>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<input type="hidden" name="planKey" 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="wrtNm" class="col-sm-1 col-form-label text-center">작성자</label>
<div class="col-sm-2">
<input type="text" class="form-control border-0" id="wrtNm" name="wrtNm" th:value="${plan.wrtNm}" 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:if="${plan.sectionApprv eq 'T'}">
<input type="text" class="form-control border-0" value="계장결재" readonly>
</th:block>
<th:block th:if="${plan.sectionApprv eq 'F'}">
<input type="text" class="form-control border-0" value="계장반려" readonly>
</th:block>
<th:block th:if="${plan.headApprv eq 'T'}">
<input type="text" class="form-control border-0" value="부장결재" readonly>
</th:block>
<th:block th:if="${plan.headApprv eq 'F'}">
<input type="text" class="form-control border-0" value="부장반려" readonly>
</th:block>
<th:block th:if="${plan.planState eq 'T'}">
<input type="text" class="form-control border-0" value="임시저장" readonly>
</th:block>
<th:block th:if="${#strings.isEmpty(plan.sectionApprv) and #strings.isEmpty(plan.headApprv) and plan.planState eq 'S'}">
<input type="text" class="form-control border-0" value="결재대기" readonly>
</th:block>
</div>
</div>
<div class="mb-3 row">
<label for="contentTitle" class="col-sm-1 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>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="planDiv" class="col-sm-1 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>
</div>
</div>
<hr>
<div class="mb-3 row">
<label for="detailPlanDiv" class="col-sm-1 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>

View File

@ -1,13 +0,0 @@
package com.dbnt.faisp;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class FaispApplicationTests {
@Test
void contextLoads() {
}
}