견문보고 결재정보 수정 기능 추가.

master
강석 최 2023-02-07 18:29:59 +09:00
parent f17161ac78
commit 06db5a413c
9 changed files with 369 additions and 133 deletions

View File

@ -8,6 +8,7 @@ import com.dbnt.faisp.main.fpiMgt.affair.model.AffairRating;
import com.dbnt.faisp.main.fpiMgt.affair.model.TypeStatistics; import com.dbnt.faisp.main.fpiMgt.affair.model.TypeStatistics;
import com.dbnt.faisp.main.fpiMgt.affair.service.AffairService; import com.dbnt.faisp.main.fpiMgt.affair.service.AffairService;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import com.dbnt.faisp.util.Utils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
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.*;
@ -35,12 +36,7 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
@GetMapping("/affairMgt") @GetMapping("/affairMgt")
public ModelAndView affairMgtPage(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){ public ModelAndView affairMgtPage(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){
ModelAndView mav; ModelAndView mav;
if(affairBoard.getDashboardFlag()){
mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgtDashboard");
affairBoard.setRowCnt(5);
}else{
mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgt"); mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgt");
}
mav.addObject("page", "main"); mav.addObject("page", "main");
mav.addObject("searchUrl", "/affair/affairMgt"); mav.addObject("searchUrl", "/affair/affairMgt");
//메뉴권한 확인 //메뉴권한 확인
@ -50,6 +46,7 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
affairBoard.setWrtUserSeq(loginUser.getUserSeq()); affairBoard.setWrtUserSeq(loginUser.getUserSeq());
affairBoard.setRatingOrgan(loginUser.getOgCd());
break; break;
case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능 case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능
affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList()); affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
@ -59,7 +56,6 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth(); (loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd());
mav.addObject("accessAuth", accessAuth); mav.addObject("accessAuth", accessAuth);
mav.addObject("apprvAuth", apprvAuth); mav.addObject("apprvAuth", apprvAuth);
@ -82,6 +78,7 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
switch (accessAuth){ switch (accessAuth){
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
affairBoard.setRatingOrgan(loginUser.getOgCd());
break; break;
case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능 case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능
affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList()); affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
@ -91,7 +88,6 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth(); (loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd());
if(apprvAuth==null) { if(apprvAuth==null) {
if(!accessAuth.equals("ACC003")){ if(!accessAuth.equals("ACC003")){
affairBoard.setWrtUserSeq(loginUser.getUserSeq()); affairBoard.setWrtUserSeq(loginUser.getUserSeq());
@ -135,6 +131,7 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
switch (accessAuth){ switch (accessAuth){
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
affairBoard.setRatingOrgan(loginUser.getOgCd());
break; break;
case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능 case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능
affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList()); affairBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
@ -144,7 +141,6 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth(); (loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd());
if(apprvAuth==null) { if(apprvAuth==null) {
if(!accessAuth.equals("ACC003")){ if(!accessAuth.equals("ACC003")){
affairBoard.setWrtUserSeq(loginUser.getUserSeq()); affairBoard.setWrtUserSeq(loginUser.getUserSeq());
@ -212,6 +208,14 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
affairBoard.setAffairStatus(rating.getAffairStatus()); 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;
}
}
}
mav.addObject("affair", affairBoard); mav.addObject("affair", affairBoard);
mav.addObject("userSeq",loginUser.getUserSeq()); mav.addObject("userSeq",loginUser.getUserSeq());
mav.addObject("userOrgan", loginUser.getOgCd()); mav.addObject("userOrgan", loginUser.getOgCd());
@ -237,6 +241,10 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
public Integer affairStateChange(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<AffairRating> ratingList){ public Integer affairStateChange(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<AffairRating> ratingList){
return affairService.affairStateChange(loginUser, ratingList); return affairService.affairStateChange(loginUser, ratingList);
} }
@PostMapping("/modifyAffairRating")
public Integer modifyAffairRating(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){
return affairService.updateAffairRating(loginUser, affairBoard.getRateList());
}
@GetMapping("/statistics") @GetMapping("/statistics")
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){ public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){

View File

@ -3,6 +3,7 @@ package com.dbnt.faisp.main.fpiMgt.affair.model;
import lombok.*; import lombok.*;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
@ -28,6 +29,7 @@ public class AffairRating{
@Column(name = "section_nm") @Column(name = "section_nm")
private String sectionNm; private String sectionNm;
@Column(name = "section_apprv_dt") @Column(name = "section_apprv_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime sectionApprvDt; private LocalDateTime sectionApprvDt;
@Column(name = "section_apprv") @Column(name = "section_apprv")
private String sectionApprv; private String sectionApprv;
@ -38,6 +40,7 @@ public class AffairRating{
@Column(name = "head_nm") @Column(name = "head_nm")
private String headNm; private String headNm;
@Column(name = "head_apprv_dt") @Column(name = "head_apprv_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime headApprvDt; private LocalDateTime headApprvDt;
@Column(name = "head_apprv") @Column(name = "head_apprv")
private String headApprv; private String headApprv;

View File

@ -8,4 +8,6 @@ import java.util.List;
public interface AffairRatingRepository extends JpaRepository<AffairRating, AffairRating.AffairRatingId> { public interface AffairRatingRepository extends JpaRepository<AffairRating, AffairRating.AffairRatingId> {
List<AffairRating> findByAffairKeyOrderByRatingOrganAsc(Integer affairKey); List<AffairRating> findByAffairKeyOrderByRatingOrganAsc(Integer affairKey);
void deleteByAffairKey(Integer affairKey);
} }

View File

@ -7,8 +7,10 @@ import com.dbnt.faisp.main.fpiMgt.affair.mapper.AffairMapper;
import com.dbnt.faisp.main.fpiMgt.affair.model.*; import com.dbnt.faisp.main.fpiMgt.affair.model.*;
import com.dbnt.faisp.main.fpiMgt.affair.repository.*; import com.dbnt.faisp.main.fpiMgt.affair.repository.*;
import com.dbnt.faisp.main.hashTag.service.HashTagService; import com.dbnt.faisp.main.hashTag.service.HashTagService;
import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import com.dbnt.faisp.main.userInfo.service.UserAlarmService; import com.dbnt.faisp.main.userInfo.service.UserAlarmService;
import com.dbnt.faisp.util.Utils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -26,6 +28,7 @@ public class AffairService extends BaseService { // 견문보고
private final UserAlarmService userAlarmService; private final UserAlarmService userAlarmService;
private final HashTagService hashTagService; private final HashTagService hashTagService;
private final OrganConfigService organConfigService;
private final AffairBoardRepository affairBoardRepository; private final AffairBoardRepository affairBoardRepository;
private final AffairFileRepository affairFileRepository; private final AffairFileRepository affairFileRepository;
private final AffairRatingRepository affairRatingRepository; private final AffairRatingRepository affairRatingRepository;
@ -131,10 +134,12 @@ public class AffairService extends BaseService { // 견문보고
savedRating.setAffairStatus(rating.getSectionApprv()); savedRating.setAffairStatus(rating.getSectionApprv());
switch (rating.getSectionApprv()){ switch (rating.getSectionApprv()){
case "DST004": case "DST004":
//부장 결재자에게 대기문서 알림 생성
userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), savedRating.getRatingOrgan(), "APC001", 30, "견문보고에 결재대기 문서가 있습니다."); userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), savedRating.getRatingOrgan(), "APC001", 30, "견문보고에 결재대기 문서가 있습니다.");
userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), savedRating.getRatingOrgan(), "APC002", 30, "견문보고에 결재대기 문서가 있습니다."); userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), savedRating.getRatingOrgan(), "APC002", 30, "견문보고에 결재대기 문서가 있습니다.");
break; break;
case "DST003": case "DST003":
//작성자에게 반려 알림 생성
AffairBoard affairBoard = affairBoardRepository.findById(rating.getAffairKey()).orElse(new AffairBoard()); AffairBoard affairBoard = affairBoardRepository.findById(rating.getAffairKey()).orElse(new AffairBoard());
userAlarmService.sendAlarmToWrtUser(savedRating.getAffairKey(), affairBoard.getWrtUserSeq(), 30, affairBoard.getTitle()+" 문서가 반려되었습니다."); userAlarmService.sendAlarmToWrtUser(savedRating.getAffairKey(), affairBoard.getWrtUserSeq(), 30, affairBoard.getTitle()+" 문서가 반려되었습니다.");
break; break;
@ -147,9 +152,9 @@ public class AffairService extends BaseService { // 견문보고
savedRating.setAffairRate(rating.getAffairRate()); savedRating.setAffairRate(rating.getAffairRate());
savedRating.setOrganUp(rating.getOrganUp()==null?"F":rating.getOrganUp()); savedRating.setOrganUp(rating.getOrganUp()==null?"F":rating.getOrganUp());
savedRating.setAffairStatus(rating.getHeadApprv()); savedRating.setAffairStatus(rating.getHeadApprv());
if(savedRating.getOrganUp().equals("T")){ if(savedRating.getOrganUp().equals("T")){
List<String> organList = loginUser.getUpOrganCdList(); String upOrgan = organConfigService.selectParentOrgan(loginUser.getOgCd());
String upOrgan = organList.get(organList.indexOf(savedRating.getRatingOrgan())-1);
AffairRating upRating = new AffairRating(); AffairRating upRating = new AffairRating();
upRating.setRatingOrgan(upOrgan); upRating.setRatingOrgan(upOrgan);
upRating.setAffairKey(savedRating.getAffairKey()); upRating.setAffairKey(savedRating.getAffairKey());
@ -161,6 +166,7 @@ public class AffairService extends BaseService { // 견문보고
userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), upOrgan, "APC004", 30, "견문보고에 결재대기 문서가 있습니다."); userAlarmService.sendAlarmToApprvUser(savedRating.getAffairKey(), upOrgan, "APC004", 30, "견문보고에 결재대기 문서가 있습니다.");
} }
// 작성자에게 문서 결제 알림 생성.
AffairBoard affairBoard = affairBoardRepository.findById(rating.getAffairKey()).orElse(new AffairBoard()); AffairBoard affairBoard = affairBoardRepository.findById(rating.getAffairKey()).orElse(new AffairBoard());
switch (rating.getHeadApprv()){ switch (rating.getHeadApprv()){
case "DST006": case "DST006":
@ -177,6 +183,75 @@ public class AffairService extends BaseService { // 견문보고
return ratingList.size()>1?0:ratingList.get(0).getAffairKey(); return ratingList.size()>1?0:ratingList.get(0).getAffairKey();
} }
@Transactional
public Integer updateAffairRating(UserInfo loginUser, List<AffairRating> ratingList) {
int i= ratingList.size();
boolean deleteFlag = false;
do{
i--;
AffairRating rating = ratingList.get(i);
if(deleteFlag){
affairRatingRepository.delete(rating);
}else{
if(Utils.isEmpty(rating.getSectionApprv())){
rating.setSectionNm(null);
rating.setSectionTitle(null);
rating.setSectionApprvDt(null);
rating.setHeadNm(null);
rating.setHeadTitle(null);
rating.setHeadApprv(null);
rating.setHeadApprvDt(null);
rating.setAffairRate(null);
rating.setOrganUp(null);
deleteFlag = true;
}else{
if(Utils.isEmpty(rating.getSectionNm())){
rating.setSectionNm(loginUser.getUserNm());
rating.setSectionTitle(loginUser.getTitleCd());
rating.setSectionApprvDt(LocalDateTime.now());
}
}
if(Utils.isEmpty(rating.getHeadApprv())){
rating.setHeadNm(null);
rating.setHeadTitle(null);
rating.setHeadApprvDt(null);
rating.setAffairRate(null);
}else{
if(Utils.isEmpty(rating.getHeadNm())){
rating.setHeadNm(loginUser.getUserNm());
rating.setHeadTitle(loginUser.getTitleCd());
rating.setHeadApprvDt(LocalDateTime.now());
}
}
if(!rating.getRatingOrgan().equals("OG001")){
if(rating.getOrganUp()==null || rating.getOrganUp().equals("F")){
deleteFlag = true;
}else {
String upOrgan = organConfigService.selectParentOrgan(rating.getRatingOrgan());
AffairRating upRating = new AffairRating();
upRating.setRatingOrgan(upOrgan);
upRating.setAffairKey(rating.getAffairKey());
upRating.setAffairStatus("DST002");
affairRatingRepository.save(upRating);
// 상보시 상위관서 계장 결재권한 사용자에게 알림 생성
userAlarmService.sendAlarmToApprvUser(rating.getAffairKey(), upOrgan, "APC003", 30, "견문보고에 결재대기 문서가 있습니다.");
userAlarmService.sendAlarmToApprvUser(rating.getAffairKey(), upOrgan, "APC004", 30, "견문보고에 결재대기 문서가 있습니다.");
}
}
if(!Utils.isEmpty(rating.getHeadApprv())){
rating.setAffairStatus(rating.getHeadApprv());
}else if(!Utils.isEmpty(rating.getSectionApprv())) {
rating.setAffairStatus(rating.getSectionApprv());
}else{
rating.setAffairStatus("DST002");
}
affairRatingRepository.save(rating);
}
}while (i!=0);
return ratingList.get(0).getAffairKey();
}
public FileInfo selectAffairFile(Integer parentKey, Integer fileSeq) { public FileInfo selectAffairFile(Integer parentKey, Integer fileSeq) {
return affairFileRepository.findById(new AffairFile.AffairFileId(parentKey, fileSeq)).orElse(null); return affairFileRepository.findById(new AffairFile.AffairFileId(parentKey, fileSeq)).orElse(null);
} }
@ -218,4 +293,5 @@ public class AffairService extends BaseService { // 견문보고
public List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics) { public List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics) {
return affairMapper.selectArrCntList(typeStatistics); return affairMapper.selectArrCntList(typeStatistics);
} }
} }

View File

@ -37,6 +37,9 @@ public class OrganConfigService {
upOrganList.add(ogCd); upOrganList.add(ogCd);
return upOrganList; return upOrganList;
} }
public String selectParentOrgan(String ogCd){
return organConfigRepository.findById(ogCd).orElse(new OrganConfig()).getParentOrgan();
}
public List<OrganConfig> selectOrganList() { public List<OrganConfig> selectOrganList() {
List<CodeMgt> codeList = codeMgtService.selectCodeMgtList("OG"); List<CodeMgt> codeList = codeMgtService.selectCodeMgtList("OG");

View File

@ -42,6 +42,66 @@ $(document).on('click', '#editAffairBtn', function (){
$("#affairViewModal").modal('hide'); $("#affairViewModal").modal('hide');
getAffairEditModal(Number($("#affairViewBody").find("[name='affairKey']").val())); getAffairEditModal(Number($("#affairViewBody").find("[name='affairKey']").val()));
}) })
$(document).on('click', '#modifyRatingViewBtn', function (){
const modifyRatingDiv = $("#modifyRatingDiv")
const ratingViewDiv = $("#ratingViewDiv")
if(modifyRatingDiv.attr("data-state")==="hide"){
modifyRatingDiv.attr("data-state", "show")
modifyRatingDiv.show();
ratingViewDiv.hide();
}else{
modifyRatingDiv.attr("data-state", "hide")
modifyRatingDiv.hide();
ratingViewDiv.show();
}
})
$(document).on('change', '.sectionApprv', function (){
if(this.value === "" || this.value==="DST003"){
$(this).parents(".affairRatingRow").find("input, select").attr("disabled", "disabled")
$(this).removeAttr("disabled")
}else{
$(this).parents(".affairRatingRow").find("input, select").removeAttr("disabled")
}
})
$(document).on('change', '.headApprv', function (){
if(this.value === "" || this.value==="DST005"){
$(this).parents(".row").find("input, select").attr("disabled", "disabled")
$(this).removeAttr("disabled")
}else{
$(this).parents(".row").find("input, select").removeAttr("disabled")
}
})
$(document).on('change', '.organUp', function (){
if(!this.checked){
if(confirm("상위관서 결재정보가 삭제됩니다. 계속하시겠습니까?")){
const ratingOrgan = $(this).parents(".affairRatingRow").attr("data-ratingorgan")
$.each($(".affairRatingRow"), function (idx, row){
if($(row).attr("data-ratingorgan")===ratingOrgan){
return false;
}else{
$(row).find("input, select").attr("disabled", "disabled")
}
})
}else{
this.checked = true;
}
}else{
const affairRatingRow = $(".affairRatingRow");
let nextRowFlag = true;
for(let i=affairRatingRow.length-1; i>=0; i--){
const row = $(affairRatingRow[i]);
if(nextRowFlag){
row.find("input, select").removeAttr("disabled")
}
if(row.find('.organUp')[0] !== undefined){
nextRowFlag = row.find('.organUp')[0].checked;
}
}
}
})
$(document).on('click', '#modifyRatingBtn', function (){
modifyAffairRating();
})
$(document).on('change', '#autoDeleteSelector', function (){ $(document).on('change', '#autoDeleteSelector', function (){
let deleteDt = ""; let deleteDt = "";
@ -245,6 +305,55 @@ function saveAffair(affairStatus){
} }
} }
function modifyAffairRating(){
if(confirm("결재 상태를 수정하시겠습니까?")){
contentFade("in");
const formData = new FormData();
$.each($(".affairRatingRow"), function (idx, div){
const row = $(div);
formData.append('rateList['+idx+'].affairKey', $("#viewModalAffairKey").val());
formData.append('rateList['+idx+'].ratingOrgan', row.attr("data-ratingorgan"));
if(row.find(".sectionApprv").length>0){
formData.append('rateList['+idx+'].sectionTitle', row.find(".sectionTitle").val());
formData.append('rateList['+idx+'].sectionNm', row.find(".sectionNm").val());
formData.append('rateList['+idx+'].sectionApprv', row.find(".sectionApprv").val());
formData.append('rateList['+idx+'].sectionApprvDt', row.find(".sectionApprvDt").val());
formData.append('rateList['+idx+'].sectionEtc', row.find(".sectionEtc").val());
}
if(row.find(".headApprv").length>0){
formData.append('rateList['+idx+'].headTitle', row.find(".headTitle").val());
formData.append('rateList['+idx+'].headNm', row.find(".headNm").val());
formData.append('rateList['+idx+'].headApprv', row.find(".headApprv").val());
formData.append('rateList['+idx+'].headApprvDt', row.find(".headApprvDt").val());
formData.append('rateList['+idx+'].affairRate', row.find(".affairRate").val());
if(row.find(".organUp").length>0){
formData.append('rateList['+idx+'].organUp', row.find(".organUp")[0].checked?'T':'F');
}
formData.append('rateList['+idx+'].headEtc', row.find(".headEtc").val());
}
})
$.ajax({
type : 'POST',
data : formData,
url : "/affair/modifyAffairRating",
processData: false,
contentType: false,
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function(result) {
alert("수정되었습니다.");
contentFade("out");
getAffairViewModal(result);
},
error : function(xhr, status) {
alert("수정에 실패하였습니다.")
contentFade("out");
}
})
}
}
function affairStateChange(ratingList){ function affairStateChange(ratingList){
contentFade("in") contentFade("in")
$.ajax({ $.ajax({

View File

@ -8,7 +8,7 @@
<form action="#" method="post" id="affairEditForm"> <form action="#" method="post" id="affairEditForm">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="affairKey" th:value="${affair.affairKey}"> <input type="hidden" name="affairKey" id="affairKey" th:value="${affair.affairKey}">
<input type="hidden" name="affairCategory" th:value="${affair.affairCategory}"> <input type="hidden" name="affairCategory" th:value="${affair.affairCategory}">
<input type="hidden" name="wrtOrgan" th:value="${affair.wrtOrgan}"> <input type="hidden" name="wrtOrgan" th:value="${affair.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${affair.wrtPart}"> <input type="hidden" name="wrtPart" th:value="${affair.wrtPart}">
@ -117,57 +117,6 @@
<input type="file" class="d-none" id="fileInputer" multiple> <input type="file" class="d-none" id="fileInputer" multiple>
</div> </div>
</form> </form>
<th:block th:if="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}">
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<!--본청 관리자의 평가 수정 양식-->
<hr class="mb-1">
<div class="row mb-3">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">견문평가</label>
<div class="col-11">
<div class="row" th:each="rate:${affair.rateList}">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq rate.ratingOrgan}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<div class="col-11">
<div class="row">
<th:block th:if="${rate.headApprv eq null}">
<div class="col-auto">평가 정보가 없습니다.</div>
</th:block>
<th:block th:unless="${rate.headApprv eq null}">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${rate.headTitle eq code.itemCd}" th:text="${#strings.concat('평가자: ', code.itemValue, ' ', rate.headNm)}"></th:block>
</th:block>
</label>
<div class="col-3">
<div class="input-group">
<select class="form-select form-select-sm affairRate w-30">
<th:block th:each="code:${session.commonCode.get('AAR')}">
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq rate.affairRate}"></option>
</th:block>
</select>
<div class="w-70">
<th:block th:unless="${rate.ratingOrgan eq 'OG001'}">
<label for="organUp" class="form-check-label px-1 pt-1">상보여부</label>
<input type="checkbox" id="organUp" class="organUp" value="T" th:checked="${rate.organUp eq 'T'}">
</th:block>
</div>
</div>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-6">
<input type="text" class="form-control form-control-sm headEtc" th:text="${rate.headEtc}">
</div>
</th:block>
</div>
</div>
</div>
</div>
</div>
</th:block>
</th:block>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>--> <!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->

View File

@ -20,93 +20,93 @@
</ul> </ul>
<div class="tab-content bg-white border border-top-0 p-2"> <div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0"> <div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
<div class="row border border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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.affairKey}|"></label>
</div> </div>
<div class="row border border-top-0 border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('JT')}"> <th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq affair.wrtUserGrd}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.wrtUserGrd}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
<th:block th:text="${affair.wrtUserNm}"></th:block> <th:block th:text="${affair.wrtUserNm}"></th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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="${#temporals.format(affair.reportDt, 'yyyy-MM-dd')}"></label> th:text="${#temporals.format(affair.reportDt, 'yyyy-MM-dd')}"></label>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('AVS')}"> <th:block th:each="code:${session.commonCode.get('AVS')}">
<th:block th:if="${code.itemCd eq affair.viewStatus}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.viewStatus}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">상태</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">상태</label>
<th:block th:each="code:${session.commonCode.get('DST')}"> <th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq affair.affairStatus}"> <th:block th:if="${code.itemCd eq affair.affairStatus}">
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label> <label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block> </th:block>
</th:block> </th:block>
</div> </div>
<hr> <hr class="my-1">
<div class="row border border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary 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-11 col-form-label col-form-label-sm text-start" th:text="${affair.title}"></label> <label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${affair.title}"></label>
</div> </div>
<div class="row border border-top-0 border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">분야1</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">분야1</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DC01')}"> <th:block th:each="code:${session.commonCode.get('DC01')}">
<th:block th:if="${code.itemCd eq affair.affairType1}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.affairType1}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">분야2</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">분야2</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DC02')}"> <th:block th:each="code:${session.commonCode.get('DC02')}">
<th:block th:if="${code.itemCd eq affair.affairType2}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.affairType2}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">분야3</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">분야3</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DC03')}"> <th:block th:each="code:${session.commonCode.get('DC03')}">
<th:block th:if="${code.itemCd eq affair.affairType3}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.affairType3}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">분야4</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">분야4</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:block th:each="code:${session.commonCode.get('DC04')}"> <th:block th:each="code:${session.commonCode.get('DC04')}">
<th:block th:if="${code.itemCd eq affair.affairType4}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq affair.affairType4}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
</div> </div>
<hr> <hr class="my-1">
<div class="row border border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center ">내용</label> class="col-sm-1 col-form-label col-form-label-sm text-center ">내용</label>
<div class="col-sm-11 form-control-sm" id="contentDiv"> <div class="col-sm-11 form-control-sm" id="contentDiv">
<div th:utext="${affair.content}"></div> <div th:utext="${affair.content}"></div>
</div> </div>
</div> </div>
<hr> <hr class="my-1">
<div class="row border border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary 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-11 col-form-label col-form-label-sm text-start" th:text="${affair.hashTags}"></label> <label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${affair.hashTags}"></label>
</div> </div>
<div class="row border border-top-0 border-secondary"> <div class="row">
<label <label
class="col-sm-1 border-end border-secondary 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-11 col-form-label col-form-label-sm text-start" th:text="${affair.etc}"></label> <label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${affair.etc}"></label>
</div> </div>
</div> </div>
@ -137,50 +137,50 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="row"> <div class="row" id="ratingViewDiv">
<div class="col-12" th:unless="${#lists.isEmpty(affair.rateList)}"> <div class="col-12" th:unless="${#lists.isEmpty(affair.rateList)}">
<div class="px-2"> <div class="px-2">
<hr> <hr class="my-1">
<th:block th:each="rate:${affair.rateList}"> <th:block th:each="rate:${affair.rateList}">
<div class="row border-secondary text-center"> <div class="row border-secondary text-center">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center "> <label class="col-sm-1 col-form-label col-form-label-sm text-center ">
<th:block th:each="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq rate.ratingOrgan}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq rate.ratingOrgan}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<div class="col-11"> <div class="col-11">
<div class="row" th:if="${rate.sectionApprv eq null}"> <div class="row" th:if="${rate.sectionApprv eq null}">
<label class="col-sm-8 border-end border-secondary col-form-label col-form-label-sm text-center bg-white">결재정보가 없습니다.</label> <label class="col-sm-8 col-form-label col-form-label-sm text-center bg-white">결재정보가 없습니다.</label>
</div> </div>
<div class="row border-top-0 border-secondary" th:if="${rate.sectionApprv ne null}"> <div class="row border-top-0 border-secondary" th:if="${rate.sectionApprv ne null}">
<label <label
class="col-sm-1 border-end border-secondary 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-1 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}"> <th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq rate.sectionApprv}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq rate.sectionApprv}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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="${rate.sectionNm}"></label> th:text="${rate.sectionNm}"></label>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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="${#temporals.format(rate.sectionApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label> th:text="${#temporals.format(rate.sectionApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label>
</div> </div>
<div class="row border-top-0 border-secondary" <div class="row border-top-0 border-secondary"
th:if="${rate.sectionApprv ne null and !#strings.isEmpty(rate.sectionEtc)}"> th:if="${rate.sectionApprv ne null and !#strings.isEmpty(rate.sectionEtc)}">
<label <label
class="col-sm-1 border-end border-secondary 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-7 border-end border-secondary col-form-label col-form-label-sm text-start" <label class="col-sm-7 col-form-label col-form-label-sm text-start"
th:text="${rate.sectionEtc}"></label> th:text="${rate.sectionEtc}"></label>
</div> </div>
<div class="row border-top-0 border-secondary" th:if="${rate.headApprv ne null}"> <div class="row border-top-0 border-secondary" th:if="${rate.headApprv ne null}">
<th:block th:if="${rate.headApprv eq 'DST006'}"> <th:block th:if="${rate.headApprv eq 'DST006'}">
<label <label
class="col-sm-1 border-end border-secondary 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-1 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('AAR')}"> <th:block th:each="code:${session.commonCode.get('AAR')}">
<th:block th:if="${code.itemCd eq rate.affairRate}" <th:block th:if="${code.itemCd eq rate.affairRate}"
th:text="|${code.itemValue}${rate.organUp eq 'T'?'(상보)':''}|"></th:block> th:text="|${code.itemValue}${rate.organUp eq 'T'?'(상보)':''}|"></th:block>
@ -189,27 +189,27 @@
</th:block> </th:block>
<th:block th:if="${rate.headApprv eq 'DST005'}"> <th:block th:if="${rate.headApprv eq 'DST005'}">
<label <label
class="col-sm-1 border-end border-secondary 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-1 border-end border-secondary col-form-label col-form-label-sm text-start"> <label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}"> <th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq rate.headApprv}" th:text="${code.itemValue}"></th:block> <th:block th:if="${code.itemCd eq rate.headApprv}" th:text="${code.itemValue}"></th:block>
</th:block> </th:block>
</label> </label>
</th:block> </th:block>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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="${rate.headNm}"></label> th:text="${rate.headNm}"></label>
<label <label
class="col-sm-1 border-end border-secondary 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 border-end border-secondary 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="${#temporals.format(rate.headApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label> th:text="${#temporals.format(rate.headApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label>
</div> </div>
<div class="row border-top-0 border-secondary" <div class="row border-top-0 border-secondary"
th:if="${rate.headApprv ne null and !#strings.isEmpty(rate.headEtc)}"> th:if="${rate.headApprv ne null and !#strings.isEmpty(rate.headEtc)}">
<label <label
class="col-sm-1 border-end border-secondary 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-7 border-end border-secondary col-form-label col-form-label-sm text-start" <label class="col-sm-7 col-form-label col-form-label-sm text-start"
th:text="${rate.headEtc}"></label> th:text="${rate.headEtc}"></label>
</div> </div>
</div> </div>
@ -275,21 +275,107 @@
</div> </div>
</div> </div>
</div> </div>
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<!--본청 관리자의 평가 수정 양식-->
<div class="row justify-content-end px-2" id="modifyRatingDiv" data-state="hide" style="display: none">
<hr class="my-1">
<div class="col-12">
<div class="row affairRatingRow" th:each="rate:${affair.rateList}" th:data-ratingorgan="${rate.ratingOrgan}">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq rate.ratingOrgan}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<div class="col-11">
<div class="row">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
<th:block th:if="${#strings.isEmpty(rate.sectionNm)}">계장 결재 없음</th:block>
<th:block th:unless="${#strings.isEmpty(rate.sectionNm)}">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${rate.sectionTitle eq code.itemCd}" th:text="${#strings.concat('계장 ', code.itemValue, ' ', rate.sectionNm)}"></th:block>
</th:block>
</th:block>
</label>
<div class="col-3">
<div class="input-group">
<input type="hidden" class="sectionTitle" th:value="${rate.sectionTitle}">
<input type="hidden" class="sectionNm" th:value="${rate.sectionNm}">
<input type="hidden" class="sectionApprvDt" th:value="${#temporals.format(rate.sectionApprvDt, 'yyyy-MM-dd HH:mm:ss')}">
<select class="form-select form-select-sm sectionApprv w-30">
<option value="">미결재</option>
<option value="DST003" th:selected="${rate.sectionApprv eq 'DST003'}">반려</option>
<option value="DST004" th:selected="${rate.sectionApprv eq 'DST004'}">승인</option>
</select>
<div class="w-70"></div>
</div>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">기타의견</label>
<div class="col-6">
<input type="text" class="form-control form-control-sm sectionEtc" th:value="${rate.sectionEtc}">
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
<th:block th:if="${#strings.isEmpty(rate.headNm)}">부장 결재 없음</th:block>
<th:block th:unless="${#strings.isEmpty(rate.headNm)}">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${rate.headTitle eq code.itemCd}" th:text="${#strings.concat('부장 ', code.itemValue, ' ', rate.headNm)}"></th:block>
</th:block>
</th:block>
</label>
<div class="col-3">
<div class="input-group">
<input type="hidden" class="headTitle" th:value="${rate.headTitle}">
<input type="hidden" class="headNm" th:value="${rate.headNm}">
<input type="hidden" class="headApprvDt" th:value="${#temporals.format(rate.headApprvDt, 'yyyy-MM-dd HH:mm:ss')}">
<select class="form-select form-select-sm headApprv w-30">
<option value="">미결재</option>
<option value="DST005" th:selected="${rate.headApprv eq 'DST005'}">반려</option>
<option value="DST006" th:selected="${rate.headApprv eq 'DST006'}">승인</option>
</select>
<select class="form-select form-select-sm affairRate w-30">
<option value="">평가</option>
<th:block th:each="code:${session.commonCode.get('AAR')}">
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq rate.affairRate}"></option>
</th:block>
</select>
<div class="w-40">
<th:block th:unless="${rate.ratingOrgan eq 'OG001'}">
<label for="organUp" class="form-check-label px-1 pt-1">상보여부</label>
<input type="checkbox" class="organUp" value="T" th:checked="${rate.organUp eq 'T'}">
</th:block>
</div>
</div>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">기타의견</label>
<div class="col-6">
<input type="text" class="form-control form-control-sm headEtc" th:value="${rate.headEtc}">
</div>
</div>
</div>
</div>
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-primary" id="modifyRatingBtn" value="저장">
</div>
</div>
</th:block>
</div> </div>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<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="editAffairBtn">본문 수정</button>
</th:block>
<th:block th:unless="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<!--본청 관리자가 아닌경우-->
<th:block th:unless="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}"> <th:block th:unless="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}">
<!--승인 상태일때는 수정 불가--> <!--승인 상태가 아닐 때-->
<th:block th:if="${userSeq eq affair.wrtUserSeq or accessAuth eq 'ACC003'}"> <th:block th:if="${userSeq eq affair.wrtUserSeq or accessAuth eq 'ACC003'}">
<!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용--> <!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editAffairBtn">수정</button> <button type="button" class="btn btn-warning" id="editAffairBtn">본문 수정</button>
</th:block> </th:block>
</th:block> </th:block>
<th:block th:if="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}">
<!--승인 상태일때 본청 관리자 수정 허용-->
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-warning" id="editAffairBtn">수정</button>
</th:block> </th:block>
</th:block>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div> </div>