Merge branch 'master' of https://dev.azure.com/DBNTech/ForeignAffairs/_git/ForeignAffairs
commit
4ca14a3b06
|
|
@ -3,8 +3,11 @@ package com.dbnt.faisp.main.fpiMgt.monitoring;
|
||||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||||
import com.dbnt.faisp.main.fpiMgt.affairPlan.model.PlanApprv;
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.model.PlanApprv;
|
||||||
import com.dbnt.faisp.main.fpiMgt.affairPlan.model.PlanBoard;
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.model.PlanBoard;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.intelligenceNetwork.model.OperationPlan;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationApprv;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationApprv;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResult;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultApprv;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.service.MonitoringService;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.service.MonitoringService;
|
||||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -109,7 +112,7 @@ public class MonitoringController { // 첩보수집활동 > 해양외사모니
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/designationEditModal")
|
@GetMapping("/designationEditModal")
|
||||||
public ModelAndView planEditModal(@AuthenticationPrincipal UserInfo loginUser, MonitoringDesignation md){
|
public ModelAndView designationEditModal(@AuthenticationPrincipal UserInfo loginUser, MonitoringDesignation md){
|
||||||
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/designationEditModal");
|
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/designationEditModal");
|
||||||
if(md.getMdKey()!=null){
|
if(md.getMdKey()!=null){
|
||||||
md = monitoringService.selectDesignation(md.getMdKey());
|
md = monitoringService.selectDesignation(md.getMdKey());
|
||||||
|
|
@ -155,5 +158,146 @@ public class MonitoringController { // 첩보수집활동 > 해양외사모니
|
||||||
return monitoringService.designationStateChange(apprv);
|
return monitoringService.designationStateChange(apprv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/resultList/{type}")
|
||||||
|
public ModelAndView resultList(@AuthenticationPrincipal UserInfo loginUser,@PathVariable("type") String type, MonitoringResult mr){
|
||||||
|
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/resultList");
|
||||||
|
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/monitoring/resultList/all").get(0).getAccessAuth();
|
||||||
|
if(type.equals("all")) {
|
||||||
|
switch (accessAuth){
|
||||||
|
case "ACC001": // 조회
|
||||||
|
case "ACC002": // 작성 // 자신이 작성한 문서만 열람가능
|
||||||
|
mr.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
break;
|
||||||
|
case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능
|
||||||
|
mr.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}else if(type.equals("stay") || type.equals("commit")) {
|
||||||
|
switch (accessAuth){
|
||||||
|
case "ACC001": // 조회
|
||||||
|
case "ACC002": // 작성 // 자신의 관서 내에서 작성한 문서만 열람가능
|
||||||
|
mr.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
break;
|
||||||
|
case "ACC003": // 관리 // 자신 외 하위 기관에서 작성한 문서 열람가능
|
||||||
|
mr.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//결재권한 확인
|
||||||
|
String apprvAuth = authMgtService.selectApprovalConfigList(loginUser.getUserSeq(), "/monitoring/resultList/all").get(0).getApprovalAuth();
|
||||||
|
if(type.equals("stay")) {
|
||||||
|
if(apprvAuth==null) {
|
||||||
|
if(!accessAuth.equals("ACC003")){
|
||||||
|
mr.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
mr.setUserType("normalStayList");
|
||||||
|
}else{
|
||||||
|
mr.setUserType("managerStayList");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
mav.addObject("userNm", loginUser.getUserNm());
|
||||||
|
switch (apprvAuth){
|
||||||
|
case "APC004": // 계장대행
|
||||||
|
case "APC003": // 계장 // 결재대기 문서 조회
|
||||||
|
mr.setMrState("DST002");
|
||||||
|
break;
|
||||||
|
case "APC002": // 부장대행
|
||||||
|
case "APC001": // 부장 // 계장승인 문서 조회
|
||||||
|
mr.setMrState("DST004");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if(type.equals("commit")){
|
||||||
|
if(apprvAuth==null) {
|
||||||
|
if(!accessAuth.equals("ACC003")){
|
||||||
|
mr.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
mr.setUserType("normalCommitList");
|
||||||
|
}else{
|
||||||
|
mr.setUserType("managerCommitList");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
switch (apprvAuth) {
|
||||||
|
case "APC004": // 계장대행
|
||||||
|
case "APC003": // 계장 // 계장반려, 계장승인 문서 조회
|
||||||
|
mr.setUserType("sectionCommitList");
|
||||||
|
break;
|
||||||
|
case "APC002": // 부장대행
|
||||||
|
case "APC001": // 부장 // 부장반려, 부장승인 문서 조회
|
||||||
|
mr.setUserType("headCommitList");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
mav.addObject("apprvAuth", apprvAuth);
|
||||||
|
mr.setQueryInfo();
|
||||||
|
mav.addObject("mrList", monitoringService.selectResultList(mr));
|
||||||
|
mr.setContentCnt(monitoringService.selectResultListCnt(mr));
|
||||||
|
mr.setPaginationInfo();
|
||||||
|
mav.addObject("type", type);
|
||||||
|
mav.addObject("searchUrl", "/monitoring/resultList/"+type);
|
||||||
|
mav.addObject("searchParams", mr);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/resultEditModal")
|
||||||
|
public ModelAndView resultEditModal(@AuthenticationPrincipal UserInfo loginUser, MonitoringResult mr){
|
||||||
|
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/resultEditModal");
|
||||||
|
if(mr.getMrKey()!=null){
|
||||||
|
mr = monitoringService.selectResult(mr.getMrKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
mav.addObject("mr", mr);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/designationListModal")
|
||||||
|
public ModelAndView designationListModal(@AuthenticationPrincipal UserInfo loginUser, MonitoringDesignation md){
|
||||||
|
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/designationListModal");
|
||||||
|
md.setFirstIndex(0);
|
||||||
|
md.setRowCnt(9999);
|
||||||
|
mav.addObject("designationList", monitoringService.selectDesignationList(md));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/saveResult")
|
||||||
|
public Integer saveResult(@AuthenticationPrincipal UserInfo loginUser,MonitoringResult mr,
|
||||||
|
MultipartHttpServletRequest request, @RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){
|
||||||
|
mr.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||||
|
if(mr.getMrKey() == null) {
|
||||||
|
mr.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
mr.setWrtPart(loginUser.getOfcCd());
|
||||||
|
mr.setWrtUserGrd(loginUser.getTitleCd());
|
||||||
|
mr.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
mr.setWrtUserNm(loginUser.getUserNm());
|
||||||
|
mr.setWrtDt(LocalDateTime.now());
|
||||||
|
}
|
||||||
|
return monitoringService.saveResult(mr,deleteFileSeq);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/resultViewModal")
|
||||||
|
public ModelAndView resultViewModal(@AuthenticationPrincipal UserInfo loginUser, MonitoringResult mr){
|
||||||
|
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/monitoring/resultViewModal");
|
||||||
|
mr = monitoringService.selectResult(mr.getMrKey());
|
||||||
|
mav.addObject("mr", mr);
|
||||||
|
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||||
|
//메뉴권한 확인
|
||||||
|
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/monitoring/resultList/all").get(0).getAccessAuth());
|
||||||
|
mav.addObject("apprvAuth", authMgtService.selectApprovalConfigList(loginUser.getUserSeq(), "/monitoring/resultList/all").get(0).getApprovalAuth());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/resultStateChange")
|
||||||
|
public Integer resultStateChange(@AuthenticationPrincipal UserInfo loginUser, MonitoringResultApprv apprv){
|
||||||
|
apprv.setUserSeq(loginUser.getUserSeq());
|
||||||
|
apprv.setUserGrd(loginUser.getTitleCd());
|
||||||
|
apprv.setUserNm(loginUser.getUserNm());
|
||||||
|
apprv.setSaveDt(LocalDateTime.now());
|
||||||
|
return monitoringService.resultStateChange(apprv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.dbnt.faisp.main.fpiMgt.monitoring.mapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResult;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -13,5 +14,9 @@ public interface MonitoringMapper {
|
||||||
|
|
||||||
Integer selectDesignationListCnt(MonitoringDesignation md);
|
Integer selectDesignationListCnt(MonitoringDesignation md);
|
||||||
|
|
||||||
|
List<MonitoringResult> selectResultList(MonitoringResult mr);
|
||||||
|
|
||||||
|
Integer selectResultListCnt(MonitoringResult mr);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.model;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.BaseModel;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.affair.model.AffairFile;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.model.PlanApprv;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "monitoring_result")
|
||||||
|
public class MonitoringResult extends BaseModel {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "mr_key")
|
||||||
|
private Integer mrKey;
|
||||||
|
@Column(name = "md_key")
|
||||||
|
private Integer mdKey;
|
||||||
|
@Column(name = "mr_title")
|
||||||
|
private String mrTitle;
|
||||||
|
@Column(name = "mr_sdate")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate mrSdate;
|
||||||
|
@Column(name = "mr_edate")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate mrEdate;
|
||||||
|
@Column(name = "mr_price")
|
||||||
|
private Integer mrPrice;
|
||||||
|
@Column(name = "mr_state")
|
||||||
|
private String mrState;
|
||||||
|
@Column(name = "wrt_organ")
|
||||||
|
private String wrtOrgan;
|
||||||
|
@Column(name = "wrt_part")
|
||||||
|
private String wrtPart;
|
||||||
|
@Column(name = "wrt_user_seq")
|
||||||
|
private Integer wrtUserSeq;
|
||||||
|
@Column(name = "wrt_user_grd")
|
||||||
|
private String wrtUserGrd;
|
||||||
|
@Column(name = "wrt_user_nm")
|
||||||
|
private String wrtUserNm;
|
||||||
|
@Column(name = "wrt_dt")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private LocalDateTime wrtDt;
|
||||||
|
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private Integer fileCnt;
|
||||||
|
@Transient
|
||||||
|
private String userType;
|
||||||
|
@Transient
|
||||||
|
private MonitoringDesignation md;
|
||||||
|
@Transient
|
||||||
|
private List<MonitoringResultApprv> apprvList;
|
||||||
|
@Transient
|
||||||
|
private List<MonitoringResultFile> fileList;
|
||||||
|
@Transient
|
||||||
|
private List<MonitoringResultInfo> resultInfoList;
|
||||||
|
@Transient
|
||||||
|
private List<MultipartFile> multipartFileList;
|
||||||
|
@Transient
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate mdDt;
|
||||||
|
@Transient
|
||||||
|
private String mdName;
|
||||||
|
@Transient
|
||||||
|
private String mdRank;
|
||||||
|
@Transient
|
||||||
|
private String mdNationality;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.model;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "monitoring_result_apprv")
|
||||||
|
@IdClass(MonitoringResultApprv.MonitoringResultApprvId.class)
|
||||||
|
public class MonitoringResultApprv {
|
||||||
|
@Id
|
||||||
|
@Column(name = "mr_key")
|
||||||
|
private Integer mrKey;
|
||||||
|
@Id
|
||||||
|
@Column(name = "apprv_seq")
|
||||||
|
private Integer apprvSeq;
|
||||||
|
@Column(name = "state")
|
||||||
|
private String state;
|
||||||
|
@Column(name = "user_seq")
|
||||||
|
private Integer userSeq;
|
||||||
|
@Column(name = "user_grd")
|
||||||
|
private String userGrd;
|
||||||
|
@Column(name = "user_nm")
|
||||||
|
private String userNm;
|
||||||
|
@Column(name = "etc")
|
||||||
|
private String etc;
|
||||||
|
@Column(name = "save_dt")
|
||||||
|
private LocalDateTime saveDt;
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class MonitoringResultApprvId implements Serializable {
|
||||||
|
private Integer mrKey;
|
||||||
|
private Integer apprvSeq;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.model;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.FileInfo;
|
||||||
|
import lombok.*;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "monitoring_result_file")
|
||||||
|
@IdClass(MonitoringResultFile.MonitoringResultFileId.class)
|
||||||
|
public class MonitoringResultFile extends FileInfo {
|
||||||
|
@Id
|
||||||
|
@Column(name = "mr_key")
|
||||||
|
private Integer mrKey;
|
||||||
|
@Id
|
||||||
|
@Column(name = "file_seq")
|
||||||
|
private Integer fileSeq;
|
||||||
|
@Column(name = "orig_nm")
|
||||||
|
private String origNm;
|
||||||
|
@Column(name = "conv_nm")
|
||||||
|
private String convNm;
|
||||||
|
@Column(name = "file_extn")
|
||||||
|
private String fileExtn;
|
||||||
|
@Column(name = "file_size")
|
||||||
|
private String fileSize;
|
||||||
|
@Column(name = "save_path")
|
||||||
|
private String savePath;
|
||||||
|
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class MonitoringResultFileId implements Serializable {
|
||||||
|
private Integer mrKey;
|
||||||
|
private Integer fileSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.model;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "monitoring_result_info")
|
||||||
|
@IdClass(MonitoringResultInfo.MonitoringResultInfoId.class)
|
||||||
|
public class MonitoringResultInfo {
|
||||||
|
@Id
|
||||||
|
@Column(name = "mr_key")
|
||||||
|
private Integer mrKey;
|
||||||
|
@Id
|
||||||
|
@Column(name = "info_seq")
|
||||||
|
private Integer infoSeq;
|
||||||
|
@Column(name = "contact_date")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate contactDate;
|
||||||
|
@Column(name = "contact_stime")
|
||||||
|
private String contactStime;
|
||||||
|
@Column(name = "contact_etime")
|
||||||
|
private String contactEtime;
|
||||||
|
@Column(name = "contact_info")
|
||||||
|
private String contactInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "MonitoringResultInfo [mrKey=" + mrKey + ", infoSeq=" + infoSeq + ", contactDate=" + contactDate
|
||||||
|
+ ", contactStime=" + contactStime + ", contactEtime=" + contactEtime + ", contactInfo=" + contactInfo
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class MonitoringResultInfoId implements Serializable {
|
||||||
|
private Integer mrKey;
|
||||||
|
private Integer infoSeq;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultApprv;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
public interface MonitoringResultApprvRepository extends JpaRepository<MonitoringResultApprv, MonitoringResultApprv.MonitoringResultApprvId> {
|
||||||
|
|
||||||
|
List<MonitoringResultApprv> findByMrKey(Integer mrKey);
|
||||||
|
|
||||||
|
Optional<MonitoringResultApprv> findTopByMrKeyOrderByApprvSeqDesc(Integer mrKey);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultFile;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
public interface MonitoringResultFileRepository extends JpaRepository<MonitoringResultFile, MonitoringResultFile.MonitoringResultFileId> {
|
||||||
|
|
||||||
|
List<MonitoringResultFile> findByMrKey(Integer mrKey);
|
||||||
|
|
||||||
|
Optional<MonitoringResultFile> findTopByMrKeyOrderByFileSeqDesc(Integer mrKey);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultInfo;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
public interface MonitoringResultInfoRepository extends JpaRepository<MonitoringResultInfo, MonitoringResultInfo.MonitoringResultInfoId> {
|
||||||
|
|
||||||
|
void deleteByMrKey(Integer mrKey);
|
||||||
|
|
||||||
|
List<MonitoringResultInfo> findByMrKey(Integer mrKey);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.dbnt.faisp.main.fpiMgt.monitoring.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResult;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
public interface MonitoringResultRepository extends JpaRepository<MonitoringResult, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -13,14 +13,23 @@ import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanApprvRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanBoardRepository;
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanBoardRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanFileRepository;
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanFileRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanMainInfoRepository;
|
import com.dbnt.faisp.main.fpiMgt.affairPlan.repository.PlanMainInfoRepository;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.affairResult.model.ResultInfo;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.mapper.MonitoringMapper;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.mapper.MonitoringMapper;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignation;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationApprv;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationApprv;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationFile;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationFile;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationFile.monitoringDesignationFileId;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringDesignationFile.monitoringDesignationFileId;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResult;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultApprv;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultFile;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.model.MonitoringResultInfo;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationApprvRepository;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationApprvRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationFileRepository;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationFileRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationRepository;
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringDesignationRepository;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringResultApprvRepository;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringResultFileRepository;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringResultInfoRepository;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.monitoring.repository.MonitoringResultRepository;
|
||||||
import com.dbnt.faisp.main.userInfo.model.UserAlarm;
|
import com.dbnt.faisp.main.userInfo.model.UserAlarm;
|
||||||
import com.dbnt.faisp.main.userInfo.service.UserAlarmService;
|
import com.dbnt.faisp.main.userInfo.service.UserAlarmService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -41,6 +50,10 @@ public class MonitoringService extends BaseService {
|
||||||
private final MonitoringDesignationApprvRepository monitoringDesignationApprvRepository;
|
private final MonitoringDesignationApprvRepository monitoringDesignationApprvRepository;
|
||||||
private final MonitoringDesignationFileRepository monitoringDesignationFileRepository;
|
private final MonitoringDesignationFileRepository monitoringDesignationFileRepository;
|
||||||
private final MonitoringDesignationRepository monitoringDesignationRepository;
|
private final MonitoringDesignationRepository monitoringDesignationRepository;
|
||||||
|
private final MonitoringResultRepository monitoringResultRepository;
|
||||||
|
private final MonitoringResultApprvRepository monitoringResultApprvRepository;
|
||||||
|
private final MonitoringResultFileRepository monitoringResultFileRepository;
|
||||||
|
private final MonitoringResultInfoRepository monitoringResultInfoRepository;
|
||||||
private final MonitoringMapper monitoringMapper;
|
private final MonitoringMapper monitoringMapper;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -140,6 +153,112 @@ public class MonitoringService extends BaseService {
|
||||||
return monitoringDesignationFileRepository.findById(new monitoringDesignationFileId(parentKey,fileSeq)).orElse(null);
|
return monitoringDesignationFileRepository.findById(new monitoringDesignationFileId(parentKey,fileSeq)).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public Integer saveResult(MonitoringResult mr, List<Integer> deleteFileSeq) {
|
||||||
|
Integer mrKey = monitoringResultRepository.save(mr).getMrKey();
|
||||||
|
if(deleteFileSeq != null && deleteFileSeq.size()>0){
|
||||||
|
deleteResultFile(mrKey, deleteFileSeq);
|
||||||
|
}
|
||||||
|
if(mr.getMultipartFileList()!=null){
|
||||||
|
saveResultUploadFiles(mrKey, mr.getMultipartFileList());
|
||||||
|
}
|
||||||
|
if (mr.getResultInfoList() != null){
|
||||||
|
saveResultInfoList(mrKey, mr.getResultInfoList());
|
||||||
|
}
|
||||||
|
if(mr.getMrState().equals("DST002")){
|
||||||
|
//작성완료일 때 계장 결재 사용자에게 알림 발송.
|
||||||
|
userAlarmService.sendAlarmToApprvUser(mrKey, mr.getWrtOrgan(), "APC003", 37, "해양외사 모니터링 모니터링보고에 결재대기 문서가 있습니다.");
|
||||||
|
userAlarmService.sendAlarmToApprvUser(mrKey, mr.getWrtOrgan(), "APC004", 37, "해양외사 모니터링 모니터링보고에 결재대기 문서가 있습니다.");
|
||||||
|
}
|
||||||
|
return mrKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteResultFile(Integer mrKey, List<Integer> deleteFileSeq) {
|
||||||
|
List<MonitoringResultFile> resultFileList = monitoringResultFileRepository.findByMrKey(mrKey);
|
||||||
|
for(MonitoringResultFile file: resultFileList){
|
||||||
|
if(deleteFileSeq.contains(file.getFileSeq())){
|
||||||
|
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
|
||||||
|
monitoringResultFileRepository.delete(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveResultUploadFiles(Integer mrKey, List<MultipartFile> multipartFileList){
|
||||||
|
MonitoringResultFile lastFileInfo = monitoringResultFileRepository.findTopByMrKeyOrderByFileSeqDesc(mrKey).orElse(null);
|
||||||
|
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
||||||
|
for(MultipartFile file : multipartFileList){
|
||||||
|
String saveName = UUID.randomUUID().toString();
|
||||||
|
String path = locationPath+monitoringPath;
|
||||||
|
saveFile(file, new File(path+File.separator+saveName));
|
||||||
|
|
||||||
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
int extnIdx = originalFilename.lastIndexOf(".");
|
||||||
|
MonitoringResultFile fileInfo = new MonitoringResultFile();
|
||||||
|
fileInfo.setMrKey(mrKey);
|
||||||
|
fileInfo.setFileSeq(fileSeq++);
|
||||||
|
fileInfo.setOrigNm(originalFilename.substring(0, extnIdx));
|
||||||
|
fileInfo.setFileExtn(originalFilename.substring(extnIdx+1));
|
||||||
|
fileInfo.setConvNm(saveName);
|
||||||
|
fileInfo.setFileSize(calculationSize(file.getSize()));
|
||||||
|
fileInfo.setSavePath(path);
|
||||||
|
monitoringResultFileRepository.save(fileInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveResultInfoList(Integer mrKey, List<MonitoringResultInfo> resultInfoList){
|
||||||
|
monitoringResultInfoRepository.deleteByMrKey(mrKey);
|
||||||
|
for(MonitoringResultInfo info: resultInfoList){
|
||||||
|
info.setMrKey(mrKey);
|
||||||
|
}
|
||||||
|
monitoringResultInfoRepository.saveAll(resultInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MonitoringResult> selectResultList(MonitoringResult mr) {
|
||||||
|
return monitoringMapper.selectResultList(mr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer selectResultListCnt(MonitoringResult mr) {
|
||||||
|
return monitoringMapper.selectResultListCnt(mr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MonitoringResult selectResult(Integer mrKey) {
|
||||||
|
MonitoringResult savedReslut = monitoringResultRepository.findById(mrKey).orElse(null);
|
||||||
|
if (savedReslut != null) {
|
||||||
|
savedReslut.setMd(monitoringDesignationRepository.findById(savedReslut.getMdKey()).orElse(null));
|
||||||
|
savedReslut.setResultInfoList(monitoringResultInfoRepository.findByMrKey(mrKey));
|
||||||
|
savedReslut.setFileList(monitoringResultFileRepository.findByMrKey(mrKey));
|
||||||
|
savedReslut.setApprvList(monitoringResultApprvRepository.findByMrKey(mrKey));
|
||||||
|
}
|
||||||
|
return savedReslut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer resultStateChange(MonitoringResultApprv apprv) {
|
||||||
|
MonitoringResult saveResult = monitoringResultRepository.findById(apprv.getMrKey()).orElse(null);
|
||||||
|
saveResult.setMrState(apprv.getState());
|
||||||
|
MonitoringResultApprv lastApprv = monitoringResultApprvRepository.findTopByMrKeyOrderByApprvSeqDesc(apprv.getMrKey()).orElse(null);
|
||||||
|
apprv.setApprvSeq(lastApprv==null?1:lastApprv.getApprvSeq()+1);
|
||||||
|
monitoringResultApprvRepository.save(apprv);
|
||||||
|
|
||||||
|
switch (apprv.getState()){
|
||||||
|
case "DST004":
|
||||||
|
// 계장승인시 부장 결재권자에게 알림 발송.
|
||||||
|
userAlarmService.sendAlarmToApprvUser(saveResult.getMrKey(), saveResult.getWrtOrgan(), "APC001", 37, "해양외사 모니터링 모니터링보고에 결재대기 문서가 있습니다.");
|
||||||
|
userAlarmService.sendAlarmToApprvUser(saveResult.getMrKey(), saveResult.getWrtOrgan(), "APC002", 37, "해양외사 모니터링 모니터링보고에 결재대기 문서가 있습니다.");
|
||||||
|
break;
|
||||||
|
case "DST003":
|
||||||
|
case "DST005":
|
||||||
|
// 반려시 작성자에게 반려 알림 발송
|
||||||
|
userAlarmService.sendAlarmToWrtUser(saveResult.getMrKey(), saveResult.getWrtUserSeq(), 36, saveResult.getMrTitle()+" 문서가 반려되었습니다.");
|
||||||
|
break;
|
||||||
|
case "DST006":
|
||||||
|
// 부장승인시 작성자에게 승인 알림 발송
|
||||||
|
userAlarmService.sendAlarmToWrtUser(saveResult.getMrKey(), saveResult.getWrtUserSeq(), 36, saveResult.getMrTitle()+" 문서가 승인되었습니다.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return apprv.getMrKey();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,4 +97,106 @@
|
||||||
from monitoring_designation md
|
from monitoring_designation md
|
||||||
<include refid="selectDesignationListWhere"></include>
|
<include refid="selectDesignationListWhere"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="selectResultListWhere">
|
||||||
|
<if test='wrtUserSeq != null and wrtUserSeq != ""'>
|
||||||
|
and mr.wrt_user_seq = #{wrtUserSeq}
|
||||||
|
</if>
|
||||||
|
<if test='wrtUserNm != null and wrtUserNm != ""'>
|
||||||
|
and mr.wrt_user_nm like '%'||#{wrtUserNm}||'%'
|
||||||
|
</if>
|
||||||
|
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||||||
|
and mr.wrt_organ = #{wrtOrgan}
|
||||||
|
</if>
|
||||||
|
<if test='mrTitle != null and mrTitle != ""'>
|
||||||
|
and mr.mr_title like '%'||#{mrTitle}||'%'
|
||||||
|
</if>
|
||||||
|
<if test='mrState != null and mrState != ""'>
|
||||||
|
and mr.mr_state = #{mrState}
|
||||||
|
</if>
|
||||||
|
<if test='dateSelector == "wrtDt"'>
|
||||||
|
<if test='startDate != null and startDate != ""'>
|
||||||
|
and mr.wrt_dt >= #{startDate}::date
|
||||||
|
</if>
|
||||||
|
<if test='endDate != null and endDate != ""'>
|
||||||
|
and mr.wrt_dt <= #{endDate}::date+1
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test="downOrganCdList != null">
|
||||||
|
and mr.wrt_organ in
|
||||||
|
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
||||||
|
#{organCd}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test='userType != null and userType != ""'>
|
||||||
|
<if test='userType == "normalStayList"'>
|
||||||
|
and mr_state in ('DST002', 'DST004')
|
||||||
|
</if>
|
||||||
|
<if test='userType == "normalCommitList"'>
|
||||||
|
and mr_state in ('DST003', 'DST005', 'DST006')
|
||||||
|
</if>
|
||||||
|
<if test='userType == "sectionCommitList"'>
|
||||||
|
and mr_state in ('DST003', 'DST004', 'DST005', 'DST006')
|
||||||
|
</if>
|
||||||
|
<if test='userType == "headCommitList"'>
|
||||||
|
and mr_state in ('DST003', 'DST005', 'DST006')
|
||||||
|
</if>
|
||||||
|
<if test='userType == "managerStayList"'>
|
||||||
|
and mr_state in ('DST002', 'DST004')
|
||||||
|
</if>
|
||||||
|
<if test='userType == "managerCommitList"'>
|
||||||
|
and mr_state in ('DST003', 'DST005', 'DST006')
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectResultList" resultType="MonitoringResult" parameterType="MonitoringResult">
|
||||||
|
select mr_key,
|
||||||
|
mr_title,
|
||||||
|
mr_sdate,
|
||||||
|
mr_edate,
|
||||||
|
md_dt,
|
||||||
|
md_name,
|
||||||
|
md_nationality,
|
||||||
|
md_rank,
|
||||||
|
mr.wrt_user_seq,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_organ) as wrt_organ,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_part) as wrt_part,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_user_grd) as wrt_user_grd,
|
||||||
|
mr.wrt_user_nm,
|
||||||
|
mr.wrt_dt,
|
||||||
|
(select item_value from code_mgt where item_cd = mr_state) as mr_state
|
||||||
|
from monitoring_result mr,
|
||||||
|
monitoring_designation md
|
||||||
|
where mr.md_key = md.md_key
|
||||||
|
<include refid="selectResultListWhere"></include>
|
||||||
|
order by mr_key desc
|
||||||
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectResultListCnt" resultType="Integer" parameterType="MonitoringResult">
|
||||||
|
select count(*)
|
||||||
|
from(
|
||||||
|
select mr_key,
|
||||||
|
mr_title,
|
||||||
|
mr_sdate,
|
||||||
|
mr_edate,
|
||||||
|
md_dt,
|
||||||
|
md_name,
|
||||||
|
md_nationality,
|
||||||
|
md_rank,
|
||||||
|
mr.wrt_user_seq,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_organ) as wrt_organ,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_part) as wrt_part,
|
||||||
|
(select item_value from code_mgt where item_cd = mr.wrt_user_grd) as wrt_user_grd,
|
||||||
|
mr.wrt_user_nm,
|
||||||
|
mr.wrt_dt,
|
||||||
|
(select item_value from code_mgt where item_cd = mr_state) as mr_state
|
||||||
|
from monitoring_result mr,
|
||||||
|
monitoring_designation md
|
||||||
|
where mr.md_key = md.md_key
|
||||||
|
<include refid="selectResultListWhere"></include>
|
||||||
|
order by mr_key desc
|
||||||
|
)a
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -0,0 +1,204 @@
|
||||||
|
$(function(){
|
||||||
|
$("#dateSelectorDiv").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#allTab', function (){
|
||||||
|
location.href = "/monitoring/resultList/all";
|
||||||
|
})
|
||||||
|
$(document).on('click', '#stayTab', function (){
|
||||||
|
location.href = "/monitoring/resultList/stay";
|
||||||
|
})
|
||||||
|
$(document).on('click', '#commitTab', function (){
|
||||||
|
location.href = "/monitoring/resultList/commit";
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#addBtn', function (){
|
||||||
|
getResultEditModal(null);
|
||||||
|
})
|
||||||
|
|
||||||
|
function getResultEditModal(mrKey){
|
||||||
|
$.ajax({
|
||||||
|
url: '/monitoring/resultEditModal',
|
||||||
|
data: {mrKey: mrKey},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#resultEditModalContent").empty().append(html)
|
||||||
|
$("#mrSdate,#mrEdate").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
setUploadDiv();
|
||||||
|
$("#resultEditModal").modal('show');
|
||||||
|
},
|
||||||
|
error:function(e){
|
||||||
|
ajaxErrorAction(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#designationListModalBtn', function (){
|
||||||
|
//const opKey = $("input[name=opKey]").val();
|
||||||
|
$.ajax({
|
||||||
|
url: '/monitoring/designationListModal',
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#designationListModalContent").empty().append(html);
|
||||||
|
//if(opKey != ""){
|
||||||
|
// $(".rowChkBox[value="+opKey+"]").prop("checked", true);
|
||||||
|
// }
|
||||||
|
$("#designationListModal").modal('show');
|
||||||
|
},
|
||||||
|
error:function(e){
|
||||||
|
ajaxErrorAction(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#getDesignationBtn', function (){
|
||||||
|
if($(".rowChkBox:checked").length < 1){
|
||||||
|
alert("정보협력자를 선택해주세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($(".rowChkBox:checked").length > 1){
|
||||||
|
alert("한명만 선택해주세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const opKey = $(".rowChkBox:checked").val();
|
||||||
|
const tr= $(".rowChkBox:checked").parents(".designationTr");
|
||||||
|
$("#mdDt").val(tr.find(".mdDt").val());
|
||||||
|
$("#mdName").val(tr.find(".mdName").val());
|
||||||
|
$("#mdNationality").val(tr.find(".mdNationality").val());
|
||||||
|
$("#mdRank").val(tr.find(".mdRank").val());
|
||||||
|
$("input[name=mdKey]").val(tr.find(".rowChkBox").val());
|
||||||
|
$("#designationListModal").modal("hide");
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#resultInfoAddBtn', function (){
|
||||||
|
const childCommentDiv = $(this).parents(".resultInfoRow");
|
||||||
|
const infoFm = $("#infoFmOrigin").children().clone()
|
||||||
|
$("#resultInfoRow").append(infoFm);
|
||||||
|
infoFm.find(".contactDate").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#editBtn', function (){
|
||||||
|
$("#resultViewModal").modal('hide');
|
||||||
|
getResultEditModal($(this).attr("data-mrkey"));
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#saveBtn', function (){
|
||||||
|
if(confirm("저장하시겠습니까?")){
|
||||||
|
saveResult('DST002');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#saveTempBtn', function (){
|
||||||
|
if(confirm("임시저장 하시겠습니까?")){
|
||||||
|
saveResult('DST001');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function saveResult(mrState){
|
||||||
|
contentFade("in");
|
||||||
|
const formData = new FormData($("#resultEditForm")[0]);
|
||||||
|
for(const file of files) {
|
||||||
|
if(!file.isDelete)
|
||||||
|
formData.append('uploadFiles', file, file.name);
|
||||||
|
}
|
||||||
|
$(".text-decoration-line-through").each(function (idx, el){
|
||||||
|
formData.append('fileSeq', $(el).attr("data-fileseq"));
|
||||||
|
})
|
||||||
|
formData.append('mrState', mrState);
|
||||||
|
|
||||||
|
$.each($("#resultInfoRow").find(".infoRow"), function (idx, div){
|
||||||
|
// const position = $(div).find(".normalSailorPosition").val();
|
||||||
|
// let sailorKey = $(div).find(".sailorKey").val();
|
||||||
|
// if(sailorKey!==undefined){
|
||||||
|
// formData.append('sailorList['+(idx)+'].sailorKey', sailorKey);
|
||||||
|
// }
|
||||||
|
formData.append('resultInfoList['+(idx)+'].infoSeq', idx+1);
|
||||||
|
formData.append('resultInfoList['+(idx)+'].contactDate', $(div).find(".contactDate").val());
|
||||||
|
formData.append('resultInfoList['+(idx)+'].contactStime', $(div).find(".contactStime").val());
|
||||||
|
formData.append('resultInfoList['+(idx)+'].contactEtime', $(div).find(".contactEtime").val());
|
||||||
|
formData.append('resultInfoList['+(idx)+'].contactInfo', $(div).find(".contactInfo").val());
|
||||||
|
|
||||||
|
});
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
url : "/monitoring/saveResult",
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success : function(result) {
|
||||||
|
alert("저장되었습니다.");
|
||||||
|
contentFade("out");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("저장에 실패하였습니다.")
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '.resultTr', function (){
|
||||||
|
getResultViewModal(Number($(this).find(".mrKey").val()));
|
||||||
|
})
|
||||||
|
|
||||||
|
function getResultViewModal(mrKey){
|
||||||
|
$.ajax({
|
||||||
|
url: '/monitoring/resultViewModal',
|
||||||
|
data: {mrKey: mrKey},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#resultViewModalBody").empty().append(html)
|
||||||
|
$("#resultViewModal").modal('show');
|
||||||
|
},
|
||||||
|
error:function(e){
|
||||||
|
ajaxErrorAction(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '.apprvBtn', function (){
|
||||||
|
$("#viewModalApprvValue").val($(this).attr("data-planstate"));
|
||||||
|
const approval = $(this).val();
|
||||||
|
if(confirm(approval+"하시겠습니까?")){
|
||||||
|
const formData = new FormData($("#apprvForm")[0]);
|
||||||
|
contentFade("in")
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
url : "/monitoring/resultStateChange",
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
beforeSend: function (xhr){
|
||||||
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
|
},
|
||||||
|
success : function(result) {
|
||||||
|
alert(approval+"되었습니다");
|
||||||
|
getResultViewModal(result);
|
||||||
|
contentFade("out");
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert(approval+"처리를 실패하였습니다.");
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title text-white" id="affairListModalLabel">모니터링대상 목록</h5>
|
||||||
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="affairListBody">
|
||||||
|
<table class="table table-sm table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>제목</th>
|
||||||
|
<th>대상지정일</th>
|
||||||
|
<th>성명</th>
|
||||||
|
<th>국적</th>
|
||||||
|
<th>소속·계급</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="designationTr" th:each="md:${designationList}">
|
||||||
|
<th:block>
|
||||||
|
<input type="hidden" class="mdDt" th:value="${md.mdDt}">
|
||||||
|
<input type="hidden" class="mdName" th:value="${md.mdName}">
|
||||||
|
<input type="hidden" class="mdNationality" th:value="${md.mdNationality}">
|
||||||
|
<input type="hidden" class="mdRank" th:value="${md.mdRank}">
|
||||||
|
</th:block>
|
||||||
|
<td><input type="checkbox" class="rowChkBox" th:value="${md.mdKey}"></td>
|
||||||
|
<td th:text="${md.mdTitle}"></td>
|
||||||
|
<td th:text="${md.mdDt}"></td>
|
||||||
|
<td th:text="${md.mdName}"></td>
|
||||||
|
<td th:text="${md.mdNationality}"></td>
|
||||||
|
<td th:text="${md.mdRank}"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
|
<div class="col-auto">
|
||||||
|
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-primary" id="getDesignationBtn">불러오기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,188 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title text-white" id="affairEditModalLabel" th:text="${mr.mrKey eq null?'모니터링 결과보고 작성':'모니터링 결과보고 수정'}"></h5>
|
||||||
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="affairEditBody">
|
||||||
|
<form action="#" method="post" id="resultEditForm">
|
||||||
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
<input type="hidden" name="mrKey" th:value="${mr.mrKey}">
|
||||||
|
<input type="hidden" name="mdKey" th:value="${mr.mdKey}">
|
||||||
|
<input type="hidden" name="wrtOrgan" th:value="${mr.wrtOrgan}">
|
||||||
|
<input type="hidden" name="wrtPart" th:value="${mr.wrtPart}">
|
||||||
|
<input type="hidden" name="wrtUserSeq" th:value="${mr.wrtUserSeq}">
|
||||||
|
<input type="hidden" name="wrtUserGrd" th:value="${mr.wrtUserGrd}">
|
||||||
|
<input type="hidden" name="wrtUserNm" th:value="${mr.wrtUserNm}">
|
||||||
|
<input type="hidden" name="wrtDt" th:value="${#temporals.format(mr.wrtDt, 'yyyy-MM-dd HH:mm')}">
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="작성자 자동입력" readonly>
|
||||||
|
</div>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성일</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="작성일 자동입력" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">기간</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mrSdate" name="mrSdate" th:value="${mr.mrSdate}">
|
||||||
|
</div>
|
||||||
|
~
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mrEdate" name="mrEdate" th:value="${mr.mrEdate}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mrTitle" name="mrTitle" th:value="${mr.mrTitle}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<h6 class="text-center">모니터링<br>대상</h6>
|
||||||
|
<div class="text-end">
|
||||||
|
<input type="button" class="btn btn-sm btn-outline-primary" id="designationListModalBtn" value="불러오기">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:if="${mr.mrKey eq null}">
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label for="opName" class="col-sm-1 col-form-label col-form-label-sm text-center">대상지정일</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdDt" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opName" class="col-sm-1 col-form-label col-form-label-sm text-center">성명</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdName" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opBirth" class="col-sm-1 col-form-label col-form-label-sm text-center">국적</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdNationality" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opPosition" class="col-sm-1 col-form-label col-form-label-sm text-center">소속·계급</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdRank" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${mr.mrKey eq null}">
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label for="opName" class="col-sm-1 col-form-label col-form-label-sm text-center">대상지정일</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdDt" th:value="${mr.md.mdDt}" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opName" class="col-sm-1 col-form-label col-form-label-sm text-center">성명</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdName" th:value="${mr.md.mdName}" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opBirth" class="col-sm-1 col-form-label col-form-label-sm text-center">국적</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdNationality" th:value="${mr.md.mdNationality}" disabled>
|
||||||
|
</div>
|
||||||
|
<label for="opPosition" class="col-sm-1 col-form-label col-form-label-sm text-center">소속·계급</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="mdRank" th:value="${mr.md.mdRank}" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1 justify-content-center">
|
||||||
|
<label for="resultInfoRow" class="col-sm-1 col-form-label col-form-label-sm text-center">활동내용</label>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">접촉 일시</div>
|
||||||
|
<div class="col-5">접촉 내용</div>
|
||||||
|
<div class="col-1"></div>
|
||||||
|
</div>
|
||||||
|
<hr class="my-1">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 resultInfoRow" id="resultInfoRow">
|
||||||
|
<th:block th:each="info:${mr.resultInfoList}">
|
||||||
|
<div class="row my-1 infoRow">
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="text" class="form-control form-control-sm contactDate" th:value="${info.contactDate}" placeholder="YYYY-MM-DD" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="col-1">
|
||||||
|
<input type="text" class="form-control form-control-sm contactStime" th:value="${info.contactStime}" placeholder="00:00">
|
||||||
|
</div>
|
||||||
|
<div class="col-1">
|
||||||
|
<input type="text" class="form-control form-control-sm contactEtime" th:value="${info.contactEtime}" placeholder="00:00">
|
||||||
|
</div>
|
||||||
|
<div class="col-5">
|
||||||
|
<textarea class="contactInfo" rows="4" cols="44" 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">
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-primary" id="resultInfoAddBtn"><i class="bi bi-plus-lg"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<label for="fireExtensionReason" class="col-sm-1 col-form-label col-form-label-sm text-center">집행예산</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="mrPrice" name="mrPrice" th:value="${mr.mrPrice}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="fileInputer" class="col-sm-1 col-form-label col-form-label-sm text-center">증빙자료</label>
|
||||||
|
<div class="col-sm-11" style="min-height: 70px;">
|
||||||
|
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||||
|
<th:block th:if="${#arrays.isEmpty(mr.fileList)}">
|
||||||
|
<br>파일을 업로드 해주세요.
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${#arrays.isEmpty(mr.fileList)}">
|
||||||
|
<div class='row-col-6' th:each="file:${mr.fileList}">
|
||||||
|
<span th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn} ${file.fileSize}|"></span>
|
||||||
|
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="d-none" id="infoFmOrigin">
|
||||||
|
<div class="row my-1 infoRow" id="infoFm">
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="text" class="form-control form-control-sm contactDate" placeholder="YYYY-MM-DD" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="col-1">
|
||||||
|
<input type="text" class="form-control form-control-sm contactStime" placeholder="00:00">
|
||||||
|
</div>
|
||||||
|
<div class="col-1">
|
||||||
|
<input type="text" class="form-control form-control-sm contactEtime" placeholder="00:00">
|
||||||
|
</div>
|
||||||
|
<div class="col-5">
|
||||||
|
<textarea class="contactInfo" rows="4" cols="44"></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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
|
<div class="col-auto">
|
||||||
|
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
|
layout:decorate="~{layout/layout}">
|
||||||
|
<th:block layout:fragment="script">
|
||||||
|
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/monitoring/result.js}"></script>
|
||||||
|
</th:block>
|
||||||
|
<div layout:fragment="content">
|
||||||
|
<main>
|
||||||
|
<input type="hidden" id="menuKey" value="36">
|
||||||
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
<div class="col-auto"><h4>모니터링 보고</h4></div>
|
||||||
|
<div class="col-auto"><p class="mb-0 mt-2">첩보수집활동 > 해양외사 모니터링 > 모니터링 보고</p></div>
|
||||||
|
</div>
|
||||||
|
<div class="row mx-0">
|
||||||
|
<div class="col-12 card bg-light text-center">
|
||||||
|
<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="${type eq 'all'?' active':''}" id="allTab" data-bs-toggle="tab" type="button" role="tab">전체 목록</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" th:classappend="${type eq 'stay'?' active':''}" id="stayTab" data-bs-toggle="tab" type="button" role="tab">결재대기목록</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" th:classappend="${type eq 'commit'?' active':''}" id="commitTab" data-bs-toggle="tab" type="button" role="tab">결재처리목록</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content bg-white border border-top-0 p-2" id="planContent">
|
||||||
|
<!-- <form method="get" th:action="${searchUrl}">
|
||||||
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
|
<div class="row justify-content-between py-1">
|
||||||
|
<div class="col-auto">
|
||||||
|
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
||||||
|
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||||
|
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-11">
|
||||||
|
<div class="row justify-content-end pb-1" th:if="${accessAuth eq 'ACC003'}">
|
||||||
|
<div class="col-2">
|
||||||
|
<select class="form-select form-select-sm" name="wrtOrgan">
|
||||||
|
<option value="">관서 선택</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
|
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-end">
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="제목" name="mdTitle" th:value="${searchParams.mdTitle}">
|
||||||
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
<select class="form-select form-select-sm" name="mdState">
|
||||||
|
<option value="">상태 선택</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.mdState}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="input-group input-daterange" id="dateSelectorDiv">
|
||||||
|
<select class="form-select form-select-sm w-30" name="dateSelector">
|
||||||
|
<option value="">조건선택</option>
|
||||||
|
<option value="mdDt" th:selected="${searchParams.dateSelector eq 'mdDt'}">시행일</option>
|
||||||
|
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||||
|
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-1 d-grid gap-2">
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form> -->
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<table class="table table-sm table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr class="table-secondary">
|
||||||
|
<th rowspan="2">순번</th>
|
||||||
|
<th rowspan="2">제목</th>
|
||||||
|
<th rowspan="2">사업기간</th>
|
||||||
|
<th colspan="4">대상자</th>
|
||||||
|
<th rowspan="2">관서</th>
|
||||||
|
<th rowspan="2">부서</th>
|
||||||
|
<th rowspan="2">작성자</th>
|
||||||
|
<th rowspan="2">작성일시</th>
|
||||||
|
<th rowspan="2">상태</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>대상지정일</th>
|
||||||
|
<th>성명</th>
|
||||||
|
<th>국적</th>
|
||||||
|
<th>계급</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="table-group-divider">
|
||||||
|
<tr class="resultTr" th:each="list, cnt:${mrList}">
|
||||||
|
<td th:text="${cnt.count}"></td>
|
||||||
|
<td th:text="${list.mrTitle}"></td>
|
||||||
|
<td th:text="|${list.mrSdate}~${list.mrEdate}|"></td>
|
||||||
|
<td th:text="${list.mdDt}"></td>
|
||||||
|
<td th:text="${list.mdName}"></td>
|
||||||
|
<td th:text="${list.mdNationality}"></td>
|
||||||
|
<td th:text="${list.mdRank}"></td>
|
||||||
|
<td th:text="${list.wrtOrgan}"></td>
|
||||||
|
<td th:text="${list.wrtPart}"></td>
|
||||||
|
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
|
||||||
|
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
<td th:text="${list.mrState}"></td>
|
||||||
|
<th:block>
|
||||||
|
<input type="hidden" class="mrKey" th:value="${list.mrKey}">
|
||||||
|
</th:block>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
<div class="col-auto"></div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination mb-0">
|
||||||
|
<th:block th:if="${searchParams.pageIndex>3}">
|
||||||
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||||
|
<a class="page-link" href="#" aria-label="Previous">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||||
|
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||||
|
<a class="page-link" href="#" th:text="${num}"></a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||||
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||||
|
<a class="page-link" href="#" aria-label="Next">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="modal fade" id="resultEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planEditModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="resultEditModalContent">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="designationListModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="affairListModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="designationListModalContent">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="resultViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planViewModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="resultViewModalBody">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title text-white" id="affairViewModalLabel">해양 외사 모니터링 대상자 지정 보고 열람</h5>
|
||||||
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<input type="hidden" name="affairKey" id="viewModalAffairKey">
|
||||||
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation" th:if="${#lists.size(mr.fileList)>0}">
|
||||||
|
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(mr.fileList), ')')}"></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<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="row mb-1">
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:if="${commonCode.itemCd eq mr.wrtUserGrd}" th:text="|${commonCode.itemValue} ${mr.wrtUserNm}|"></label>
|
||||||
|
</th:block>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성일</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(mr.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">상태</label>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:if="${commonCode.itemCd eq mr.mrState}" th:text="${commonCode.itemValue}"></label>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<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="${mr.mrTitle}"></label>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1"><h6 class="text-center">모니터링 대상자</h6></div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">대상지정일</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${mr.md.mdDt}"></label>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">성명</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${mr.md.mdName}"></label>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">국적</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${mr.md.mdNationality}"></label>
|
||||||
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">소속/계급<br>(직위)</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${mr.md.mdRank}"></label>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1 justify-content-center">
|
||||||
|
<label for="resultInfoRow" class="col-sm-1 col-form-label col-form-label-sm text-center">활동내용</label>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 text-center">접촉 일시</div>
|
||||||
|
<div class="col-5 text-center">접촉 내용</div>
|
||||||
|
</div>
|
||||||
|
<hr class="my-1">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 resultInfoRow" id="resultInfoRow">
|
||||||
|
<th:block th:each="info:${mr.resultInfoList}">
|
||||||
|
<div class="row my-1 infoRow">
|
||||||
|
<div class="col-4 text-center">
|
||||||
|
<div th:text="|${info.contactDate} ${info.contactStime}~${info.contactEtime}"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-5">
|
||||||
|
<div th:utext="${info.contactInfo}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<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 th:text="|${mr.mrPrice}원|"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>파일명</th>
|
||||||
|
<th>사이즈</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<th:block th:if="${#lists.isEmpty(mr.fileList)}">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">파일이 없습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${#lists.isEmpty(mr.fileList)}">
|
||||||
|
<th:block th:each="file:${mr.fileList}">
|
||||||
|
<tr class="fileInfoTr">
|
||||||
|
<td><a href="#" class="fileDownLink" data-board="designation"
|
||||||
|
th:data-parentkey="${file.mrKey}" 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 class="row">
|
||||||
|
<div class="col-12" th:unless="${#lists.isEmpty(mr.apprvList)}">
|
||||||
|
<hr>
|
||||||
|
<th:block th:each="apprv:${mr.apprvList}">
|
||||||
|
<div class="row">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-center" th:if="${commonCode.itemCd eq apprv.state}" th:text="|결재결과: ${commonCode.itemValue}|"></label>
|
||||||
|
</th:block>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||||
|
<th:block th:if="${commonCode.itemCd eq apprv.userGrd}" th:text="|결제자: ${commonCode.itemValue} ${apprv.userNm}|"></th:block>
|
||||||
|
</th:block>
|
||||||
|
</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
|
||||||
|
<th:block th:text="|기타의견: ${apprv.etc}|"></th:block>
|
||||||
|
</label>
|
||||||
|
<label class="col-sm-2 col-form-label col-form-label-sm text-center">
|
||||||
|
<th:block th:text="|결제일시: ${#temporals.format(apprv.saveDt, 'yyyy-MM-dd HH:mm:ss')}|"></th:block>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12" th:if="${(apprvAuth eq 'APC003' or apprvAuth eq 'APC004') and mr.mrState eq 'DST002'
|
||||||
|
or (apprvAuth eq 'APC001' or apprvAuth eq 'APC002') and mr.mrState eq 'DST004'}">
|
||||||
|
<form action="#" method="post" id="apprvForm">
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-10">
|
||||||
|
<input type="hidden" name="mrKey" th:value="${mr.mrKey}">
|
||||||
|
<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-planstate="${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-planstate="${apprvAuth eq 'APC004'||apprvAuth eq 'APC003'?'DST003':'DST005'}" value="반려">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
|
<div class="col-auto">
|
||||||
|
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<th:block th:unless="${mr.mrState eq 'DST004' or mr.mrState eq 'DST006'}"><!--승인 상태일때는 수정 불가 -->
|
||||||
|
<th:block th:if="${userSeq eq mr.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
||||||
|
<button type="button" class="btn btn-warning" th:data-mrkey="${mr.mrKey}" id="editBtn">수정</button>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mx-0">
|
<div class="row mx-0">
|
||||||
<div class="col-12 card bg-light">
|
<div class="col-12 card bg-lightB-card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row justify-content-start">
|
<div class="row justify-content-start">
|
||||||
<!-- 탭 메뉴 -->
|
<!-- 탭 메뉴 -->
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
</th:block>
|
</th:block>
|
||||||
<div layout:fragment="content">
|
<div layout:fragment="content">
|
||||||
<main>
|
<main>
|
||||||
<h4>마이페이지</h4>
|
<div class="d-inline align-middle"><i class="bi bi-square-fill"></i></div>
|
||||||
|
<h5 class="d-inline align-middle"> 마이페이지</h5>
|
||||||
<div class="row mx-0">
|
<div class="row mx-0">
|
||||||
<div class="col-12 card bg-light">
|
<div class="col-12 card bg-lightB-card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue