공지사항 페이지 작업중.
parent
b81c6db3f3
commit
51c97c2905
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.dbnt.faisp.config;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum BoardType {
|
||||||
|
NOTICE("NOTICE"),
|
||||||
|
BOARD("BOARD"),
|
||||||
|
FILES("FILES"),
|
||||||
|
QNA("Q&A");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
}
|
||||||
|
|
@ -62,6 +62,7 @@ public class SecurityConfig{
|
||||||
.antMatchers(
|
.antMatchers(
|
||||||
"/dashboard",
|
"/dashboard",
|
||||||
"/refreshSession",
|
"/refreshSession",
|
||||||
|
"/publicBoard/**",
|
||||||
"/fpiMgt/**"
|
"/fpiMgt/**"
|
||||||
).hasRole(Role.USER.name()) // USER 접근 허용
|
).hasRole(Role.USER.name()) // USER 접근 허용
|
||||||
.antMatchers(
|
.antMatchers(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.dbnt.faisp.publicBoard;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.BoardType;
|
||||||
|
import com.dbnt.faisp.config.Role;
|
||||||
|
import com.dbnt.faisp.fpiMgt.monthPlan.model.PlanBoard;
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicBoard;
|
||||||
|
import com.dbnt.faisp.publicBoard.service.PublicBoardService;
|
||||||
|
import com.dbnt.faisp.userInfo.model.UserInfo;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/publicBoard")
|
||||||
|
public class PublicBoardController {
|
||||||
|
private final PublicBoardService publicBoardService;
|
||||||
|
|
||||||
|
@GetMapping("/noticePage")
|
||||||
|
public ModelAndView organMgtPage(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) {
|
||||||
|
ModelAndView mav = new ModelAndView("publicBoard/notice");
|
||||||
|
publicBoard.setQueryInfo();
|
||||||
|
publicBoard.setPublicType(BoardType.NOTICE.getValue());
|
||||||
|
if(loginUser.getAuthorities().contains(Role.SUB_ADMIN)){
|
||||||
|
publicBoard.setOrganCdList(loginUser.getOrganCdList());
|
||||||
|
}
|
||||||
|
mav.addObject("noticeList", publicBoardService.selectContentList(publicBoard));
|
||||||
|
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||||
|
publicBoard.setPaginationInfo();
|
||||||
|
mav.addObject("searchParams", publicBoard);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/editModal")
|
||||||
|
public ModelAndView editModal(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard){
|
||||||
|
ModelAndView mav = new ModelAndView("publicBoard/editModal");
|
||||||
|
if(publicBoard.getPublicKey()!=null){
|
||||||
|
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||||
|
}else{
|
||||||
|
publicBoard.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
publicBoard.setWrtPart(loginUser.getOfcCd());
|
||||||
|
publicBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
publicBoard.setWrtUserNm(loginUser.getUserNm());
|
||||||
|
publicBoard.setWrtDt(LocalDateTime.now());
|
||||||
|
}
|
||||||
|
mav.addObject("info", publicBoard);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/planViewModal")
|
||||||
|
public ModelAndView planViewModal(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard){
|
||||||
|
ModelAndView mav = new ModelAndView("publicBoard/viewModal");
|
||||||
|
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||||
|
mav.addObject("info", publicBoard);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.mapper;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicBoard;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface PublicBoardMapper {
|
||||||
|
List<PublicBoard> selectContentList(PublicBoard publicBoard);
|
||||||
|
|
||||||
|
Integer selectContentListCnt(PublicBoard publicBoard);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.model;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.BaseModel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "public_board")
|
||||||
|
public class PublicBoard extends BaseModel {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "public_key")
|
||||||
|
private Integer publicKey;
|
||||||
|
@Column(name = "public_type")
|
||||||
|
private String publicType;
|
||||||
|
@Column(name = "title")
|
||||||
|
private String title;
|
||||||
|
@Column(name = "content")
|
||||||
|
private String content;
|
||||||
|
@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_nm")
|
||||||
|
private String wrtUserNm;
|
||||||
|
@Column(name = "wrt_dt")
|
||||||
|
private LocalDateTime wrtDt;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.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 = "public_board_comment")
|
||||||
|
@IdClass(PublicBoardComment.PublicBoardCommentId.class)
|
||||||
|
public class PublicBoardComment {
|
||||||
|
@Id
|
||||||
|
@Column(name = "public_key")
|
||||||
|
private Integer publicKey;
|
||||||
|
@Id
|
||||||
|
@Column(name = "comment_key")
|
||||||
|
private Integer commentKey;
|
||||||
|
@Column(name = "public_type")
|
||||||
|
private String public_type;
|
||||||
|
@Column(name = "content")
|
||||||
|
private String content;
|
||||||
|
@Column(name = "wrt_organ")
|
||||||
|
private String wrtOrgan;
|
||||||
|
@Column(name = "wrt_part")
|
||||||
|
private String wrtPart;
|
||||||
|
@Column(name = "wrt_user_seq")
|
||||||
|
private String wrtUserSeq;
|
||||||
|
@Column(name = "wrt_user_nm")
|
||||||
|
private String wrtUserNm;
|
||||||
|
@Column(name = "wrt_dt")
|
||||||
|
private LocalDateTime wrtDt;
|
||||||
|
@Column(name = "parent_comment")
|
||||||
|
private Integer parentComment;
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class PublicBoardCommentId implements Serializable {
|
||||||
|
private Integer publicKey;
|
||||||
|
private Integer commentKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.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 = "plan_file")
|
||||||
|
@IdClass(PublicFile.PublicFileId.class)
|
||||||
|
public class PublicFile extends FileInfo {
|
||||||
|
@Id
|
||||||
|
@Column(name = "public_key")
|
||||||
|
private Integer publicKey;
|
||||||
|
@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 PublicFileId implements Serializable {
|
||||||
|
private Integer publicKey;
|
||||||
|
private Integer fileSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicBoardComment;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface PublicBoardCommentRepository extends JpaRepository<PublicBoardComment, PublicBoardComment.PublicBoardCommentId> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicBoard;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface PublicBoardRepository extends JpaRepository<PublicBoard, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.repository;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicFile;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface PublicFileRepository extends JpaRepository<PublicFile, PublicFile.PublicFileId> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.dbnt.faisp.publicBoard.service;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.publicBoard.mapper.PublicBoardMapper;
|
||||||
|
import com.dbnt.faisp.publicBoard.model.PublicBoard;
|
||||||
|
import com.dbnt.faisp.publicBoard.repository.PublicBoardCommentRepository;
|
||||||
|
import com.dbnt.faisp.publicBoard.repository.PublicBoardRepository;
|
||||||
|
import com.dbnt.faisp.publicBoard.repository.PublicFileRepository;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PublicBoardService {
|
||||||
|
private final PublicBoardRepository publicBoardRepository;
|
||||||
|
private final PublicBoardCommentRepository publicBoardCommentRepository;
|
||||||
|
private final PublicFileRepository publicFileRepository;
|
||||||
|
private final PublicBoardMapper publicBoardMapper;
|
||||||
|
|
||||||
|
public List<PublicBoard> selectContentList(PublicBoard publicBoard) {
|
||||||
|
return publicBoardMapper.selectContentList(publicBoard);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer selectContentListCnt(PublicBoard publicBoard) {
|
||||||
|
return publicBoardMapper.selectContentListCnt(publicBoard);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PublicBoard selectPublicBoard(Integer publicKey) {
|
||||||
|
return publicBoardRepository.findById(publicKey).orElse(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -31,8 +31,8 @@ public class TranslatorController {
|
||||||
private final AuthMgtService authMgtService;
|
private final AuthMgtService authMgtService;
|
||||||
private final TranslatorService translatorSevice;
|
private final TranslatorService translatorSevice;
|
||||||
private final OrganConfigService organConfigService;
|
private final OrganConfigService organConfigService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
public ModelAndView translatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator,HttpServletResponse response) {
|
public ModelAndView translatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator,HttpServletResponse response) {
|
||||||
ModelAndView mav = new ModelAndView("translator/translator");
|
ModelAndView mav = new ModelAndView("translator/translator");
|
||||||
|
|
@ -42,23 +42,23 @@ public class TranslatorController {
|
||||||
translator.setOrganCdList(organConfigService.selectOrganListWhereUserOgCd(loginUser.getOgCd()));
|
translator.setOrganCdList(organConfigService.selectOrganListWhereUserOgCd(loginUser.getOgCd()));
|
||||||
//엑셀다운
|
//엑셀다운
|
||||||
if(translator.getExcel() != null && translator.getExcel().equals("Y")){
|
if(translator.getExcel() != null && translator.getExcel().equals("Y")){
|
||||||
String[] headers = { "translator_key", "ogdp1", "tr_lang", "tr_career", "tr_name", "tr_age", "tr_nny", "tr_edu", "tr_cft", "dml_yn", "apt_dt", "tr_phone"};
|
String[] headers = { "translator_key", "ogdp1", "tr_lang", "tr_career", "tr_name", "tr_age", "tr_nny", "tr_edu", "tr_cft", "dml_yn", "apt_dt", "tr_phone"};
|
||||||
String[] headerNames = { "연번", "관서명", "언어", "경력", "성명", "나이", "국적", "학력", "자격증", "해촉", "위촉일", "연락처" };
|
String[] headerNames = { "연번", "관서명", "언어", "경력", "성명", "나이", "국적", "학력", "자격증", "해촉", "위촉일", "연락처" };
|
||||||
String[] columnType = { "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String"};
|
String[] columnType = { "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String"};
|
||||||
String sheetName = "민간 통역인 현황";
|
String sheetName = "민간 통역인 현황";
|
||||||
String excelFileName = "민간 통역인 현황";
|
String excelFileName = "민간 통역인 현황";
|
||||||
List<ParamMap> translatorInfoList= translatorSevice.selectTranslatorListEx(translator);
|
List<ParamMap> translatorInfoList= translatorSevice.selectTranslatorListEx(translator);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Utils.listToExcel(translatorInfoList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
Utils.listToExcel(translatorInfoList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(params).get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(params).get(0).getAccessAuth();
|
||||||
|
|
||||||
mav.addObject("mgtOrganList", loginUser.getOrganCdList());
|
mav.addObject("mgtOrganList", loginUser.getOrganCdList());
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
translator.setQueryInfo();
|
translator.setQueryInfo();
|
||||||
|
|
@ -68,14 +68,14 @@ public class TranslatorController {
|
||||||
mav.addObject("searchParams", translator);
|
mav.addObject("searchParams", translator);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/insertTranslatorInfo")
|
@PostMapping("/insertTranslatorInfo")
|
||||||
public String insertTranslatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator) {
|
public String insertTranslatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator) {
|
||||||
translator.setWrtNm(loginUser.getUserId());
|
translator.setWrtNm(loginUser.getUserId());
|
||||||
translator.setWrtOrgan(loginUser.getOgCd());
|
translator.setWrtOrgan(loginUser.getOgCd());
|
||||||
return translatorSevice.insertTranslatorInfo(translator);
|
return translatorSevice.insertTranslatorInfo(translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/translatorEditModal")
|
@GetMapping("/translatorEditModal")
|
||||||
public ModelAndView translatorEditModal(@AuthenticationPrincipal UserInfo loginUser,Translator translator){
|
public ModelAndView translatorEditModal(@AuthenticationPrincipal UserInfo loginUser,Translator translator){
|
||||||
ModelAndView mav = new ModelAndView("translator/translatorEditModal");
|
ModelAndView mav = new ModelAndView("translator/translatorEditModal");
|
||||||
|
|
@ -88,28 +88,28 @@ public class TranslatorController {
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/updateTranslatorInfo")
|
@PostMapping("/updateTranslatorInfo")
|
||||||
public void updatetranslatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator) {
|
public void updatetranslatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator) {
|
||||||
translator.setWrtNm(loginUser.getUserId());
|
translator.setWrtNm(loginUser.getUserId());
|
||||||
translator.setWrtOrgan(loginUser.getOgCd());
|
translator.setWrtOrgan(loginUser.getOgCd());
|
||||||
translatorSevice.updatetranslatorInfo(translator);
|
translatorSevice.updatetranslatorInfo(translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/revisionHistory")
|
@GetMapping("/revisionHistory")
|
||||||
public ModelAndView revisionHistory(Translator translator){
|
public ModelAndView revisionHistory(Translator translator){
|
||||||
ModelAndView mav = new ModelAndView("translator/translatorHistory");
|
ModelAndView mav = new ModelAndView("translator/translatorHistory");
|
||||||
mav.addObject("HistoryList", translatorSevice.selectHistoryList(translator));
|
mav.addObject("HistoryList", translatorSevice.selectHistoryList(translator));
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/HistoryView")
|
@GetMapping("/HistoryView")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Translator HistoryView(Translator translator){
|
public Translator HistoryView(Translator translator){
|
||||||
|
|
||||||
return translatorSevice.HistoryView(translator);
|
return translatorSevice.HistoryView(translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/careerView")
|
@GetMapping("/careerView")
|
||||||
public ModelAndView careerView(@AuthenticationPrincipal UserInfo loginUser,TranslatorCrr translatorCrr){
|
public ModelAndView careerView(@AuthenticationPrincipal UserInfo loginUser,TranslatorCrr translatorCrr){
|
||||||
ModelAndView mav = new ModelAndView("translator/translatorCareerModal");
|
ModelAndView mav = new ModelAndView("translator/translatorCareerModal");
|
||||||
|
|
@ -124,34 +124,34 @@ public class TranslatorController {
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/careerInsertPage")
|
@GetMapping("/careerInsertPage")
|
||||||
public ModelAndView careerInsertPage(TranslatorCrr translatorCrr){
|
public ModelAndView careerInsertPage(TranslatorCrr translatorCrr){
|
||||||
ModelAndView mav = new ModelAndView("translator/translatorCareerInsert");
|
ModelAndView mav = new ModelAndView("translator/translatorCareerInsert");
|
||||||
mav.addObject("trKey", translatorCrr.getTranslatorKey());
|
mav.addObject("trKey", translatorCrr.getTranslatorKey());
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/insertTranslatorCareer")
|
@PostMapping("/insertTranslatorCareer")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public int insertTranslatorCareer(@RequestBody List<TranslatorCrr> translatorCrr){
|
public int insertTranslatorCareer(@RequestBody List<TranslatorCrr> translatorCrr){
|
||||||
int trKey = translatorSevice.insertTranslatorCareer(translatorCrr);
|
int trKey = translatorSevice.insertTranslatorCareer(translatorCrr);
|
||||||
return trKey;
|
return trKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/deleteCareer")
|
@PostMapping("/deleteCareer")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public int deleteCareer(@RequestBody TranslatorCrr translatorCrr) {
|
public int deleteCareer(@RequestBody TranslatorCrr translatorCrr) {
|
||||||
int trKey = translatorSevice.deleteCareer(translatorCrr);
|
int trKey = translatorSevice.deleteCareer(translatorCrr);
|
||||||
return trKey;
|
return trKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/deleteTranslatorInfo")
|
@PostMapping("/deleteTranslatorInfo")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void deleteTranslatorInfo(@RequestBody int trKey) {
|
public void deleteTranslatorInfo(@RequestBody int trKey) {
|
||||||
translatorSevice.deleteTranslatorInfo(trKey);
|
translatorSevice.deleteTranslatorInfo(trKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/statisticsLang")
|
@GetMapping("/statisticsLang")
|
||||||
public ModelAndView statisticsLang() {
|
public ModelAndView statisticsLang() {
|
||||||
ModelAndView mav = new ModelAndView("translator/translatorStatisticsLang");
|
ModelAndView mav = new ModelAndView("translator/translatorStatisticsLang");
|
||||||
|
|
@ -159,8 +159,8 @@ public class TranslatorController {
|
||||||
mav.addObject("total", translatorSevice.selectStatisticsLangTotal());
|
mav.addObject("total", translatorSevice.selectStatisticsLangTotal());
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.dbnt.faisp.publicBoard.mapper.PublicBoardMapper">
|
||||||
|
<sql id="selectContentListWhere">
|
||||||
|
<where>
|
||||||
|
<if test='publicType != null and publicType != ""'>
|
||||||
|
and a.public_type = #{publicType}
|
||||||
|
</if>
|
||||||
|
<if test='startDate != null and startDate != ""'>
|
||||||
|
and a.wrt_dt >= #{startDate}::date
|
||||||
|
</if>
|
||||||
|
<if test='endDate != null and endDate != ""'>
|
||||||
|
and a.wrt_dt <= #{endDate}::date
|
||||||
|
</if>
|
||||||
|
<if test="organCdList != null">
|
||||||
|
and a.wrt_organ in
|
||||||
|
<foreach collection="organCdList" item="organCd" separator="," open="(" close=")">
|
||||||
|
#{organCd}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<select id="selectContentList" resultType="PublicBoard" parameterType="PublicBoard">
|
||||||
|
select a.public_key,
|
||||||
|
a.public_type,
|
||||||
|
a.title,
|
||||||
|
a.content,
|
||||||
|
a.wrt_organ,
|
||||||
|
a.wrt_part,
|
||||||
|
a.wrt_user_nm,
|
||||||
|
a.wrt_user_seq,
|
||||||
|
a.wrt_dt,
|
||||||
|
b.fileCnt,
|
||||||
|
c.commentCnt
|
||||||
|
from public_board a
|
||||||
|
left outer join (select public_key,
|
||||||
|
count(file_seq) as fileCnt
|
||||||
|
from public_file
|
||||||
|
group by public_key) b
|
||||||
|
on a.public_key = b.public_key
|
||||||
|
left outer join (select public_key,
|
||||||
|
count(comment_key) as commentCnt
|
||||||
|
from public_board_comment
|
||||||
|
group by public_key) c
|
||||||
|
on a.public_key = c.public_key
|
||||||
|
<include refid="selectContentListWhere"></include>
|
||||||
|
order by public_key desc
|
||||||
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
</select>
|
||||||
|
<select id="selectContentListCnt" resultType="int" parameterType="PublicBoard">
|
||||||
|
select count(*)
|
||||||
|
from public_board a
|
||||||
|
<include refid="selectContentListWhere"></include>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<div sec:authorize="isAuthenticated()">
|
<div sec:authorize="isAuthenticated()">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark"><i class="bi bi-bell-fill"></i></a></li>
|
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark"><i class="bi bi-bell-fill"></i></a></li>
|
||||||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">공지사항</a></li>
|
<li class="nav-item"><a href="/publicBoard/noticePage" class="nav-link p-1 link-dark">공지사항</a></li>
|
||||||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">게시판</a></li>
|
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">게시판</a></li>
|
||||||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">자료실</a></li>
|
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">자료실</a></li>
|
||||||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">Q&A</a></li>
|
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark">Q&A</a></li>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||||
|
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/affairPlan.js}"></script>-->
|
||||||
|
</th:block>
|
||||||
|
<div layout:fragment="content">
|
||||||
|
<main class="pt-3">
|
||||||
|
<h4>공지사항</h4>
|
||||||
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
<div class="row mx-0">
|
||||||
|
<div class="col-12 card text-center">
|
||||||
|
<div class="card-body">
|
||||||
|
<form method="get" th:action="@{/fpiMgt/monthPlanPage}">
|
||||||
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
|
<div class="row justify-content-between pe-3 py-1">
|
||||||
|
<div class="col-auto">
|
||||||
|
<select class="form-select" 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-auto">
|
||||||
|
<!--<div class="row justify-content-end">
|
||||||
|
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
|
||||||
|
<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-auto">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.contentTitle}">
|
||||||
|
</div>
|
||||||
|
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<select class="form-select form-select-sm" name="planState">
|
||||||
|
<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.planState}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||||
|
<select class="form-select form-select-sm" name="dateSelector">
|
||||||
|
<option value="">조건선택</option>
|
||||||
|
<option value="planDt" th:selected="${searchParams.dateSelector eq 'planDt'}">시행일</option>
|
||||||
|
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>제목</th>
|
||||||
|
<th>시행일자</th>
|
||||||
|
<th>관서</th>
|
||||||
|
<th>부서</th>
|
||||||
|
<th>작성자</th>
|
||||||
|
<th>작성일시</th>
|
||||||
|
<th>첨부파일</th>
|
||||||
|
<th>상태</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!--<tr class="planTr" th:each="plan:${planList}">
|
||||||
|
<input type="hidden" class="planKey" th:value="${plan.planKey}">
|
||||||
|
<td><input type="checkbox" class="trChkBox"></td>
|
||||||
|
<td th:text="${plan.contentTitle}"></td>
|
||||||
|
<td th:text="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}"></td>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
|
<td th:if="${plan.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||||
|
<td th:if="${plan.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||||
|
</th:block>
|
||||||
|
<td th:text="${plan.wrtUserNm}"></td>
|
||||||
|
<td th:text="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
<td th:text="${plan.fileCnt eq null?'파일 없음':#strings.concat(plan.fileCnt,' 건')}"></td>
|
||||||
|
<td th:if="${plan.planState eq 'DST001'}">임시저장</td>
|
||||||
|
<td th:if="${plan.planState eq 'DST002'}">결재대기</td>
|
||||||
|
<td th:if="${plan.planState eq 'DST003'}">계장반려</td>
|
||||||
|
<td th:if="${plan.planState eq 'DST004'}">계장결재</td>
|
||||||
|
<td th:if="${plan.planState eq 'DST005'}">부장반려</td>
|
||||||
|
<td th:if="${plan.planState eq 'DST006'}">부장결재</td>
|
||||||
|
</tr>-->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
<div class="col-auto"></div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<nav aria-label="Page navigation">
|
||||||
|
<ul class="pagination">
|
||||||
|
<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="addNoticeBtn" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="modal fade" id="noticeEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="noticeEditModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="noticeEditContent">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="noticeViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="noticeViewModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="noticeViewContent">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue