diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/model/CodeMgt.java b/src/main/java/com/dbnt/faisp/main/codeMgt/model/CodeMgt.java index 476cdc60..1930c216 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/model/CodeMgt.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/model/CodeMgt.java @@ -6,6 +6,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; import java.io.Serializable; +import java.util.Comparator; @Getter @Setter diff --git a/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java b/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java index a29d4fc8..aeabb7ca 100644 --- a/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java +++ b/src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java @@ -3,6 +3,7 @@ package com.dbnt.faisp.main.userInfo; import com.dbnt.faisp.kwms.service.KwmsService; import com.dbnt.faisp.main.authMgt.service.AuthMgtService; +import com.dbnt.faisp.main.codeMgt.model.CodeMgt; import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; import com.dbnt.faisp.main.fipTarget.model.PartInfo; import com.dbnt.faisp.main.fipTarget.model.ShipInfo; @@ -15,6 +16,8 @@ import com.dbnt.faisp.util.Utils; import lombok.RequiredArgsConstructor; import java.io.IOException; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import javax.servlet.http.HttpServletResponse; @@ -32,118 +35,165 @@ public class FaispController { private final CodeMgtService codeMgtService; private final UserInfoService userInfoService; private final KwmsService kwmsService; - - @GetMapping("/policeList") - public ModelAndView policeList(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo, HttpServletResponse response) { - ModelAndView mav = new ModelAndView("faisp/policeList"); - userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); - if(userInfo.getUserStatus() == null) { - userInfo.setUserStatus("USC003"); - } - //엑셀다운 - if(userInfo.getExcel() != null && userInfo.getExcel().equals("Y")){ - String[] headers = { "rownum", "title_cd", "user_nm", "organ_nm", "ofc_cd", "birth_date", "sex", "police_in_date", "title_in_date", "ofc_in_date", "outturn_cd","", "job_in_cd", "wrt_dt"}; - String[] headerNames = { "순번", "계급","성명", "청", "현부서"+System.lineSeparator()+"과", "생년월일","성별", "최초"+System.lineSeparator()+"임용", "현 계급"+System.lineSeparator()+"임용", "현 부서"+System.lineSeparator()+"임용", "수사경과"+System.lineSeparator()+"보유여부", "외사경력", "입직"+System.lineSeparator()+"경로","최종"+System.lineSeparator()+"수정일"}; - String[] columnType = {"String", "String", "String","String", "String", "String", "String", "String", "String", "String", "String", "String","String", "String"}; - String sheetName =""; - String excelFileName=""; - if(userInfo.getUserStatus().equals("USC003")) { - sheetName = "現 외사경찰 현황"; - excelFileName = "現 외사경찰 현황"; - } - if(userInfo.getUserStatus().equals("USC006")) { - sheetName = "前 외사경찰 현황"; - excelFileName = "前 외사경찰 현황"; - } - if(userInfo.getUserStatus().equals("USC007")) { - sheetName = "非 외사경찰 현황"; - excelFileName = "非 외사경찰 현황"; - } - List policeList= userInfoService.selectPoliceList(userInfo); - try { - Utils.policelistToExcel(policeList, response, headers, headerNames, columnType, sheetName, excelFileName); - } catch (IOException e) { - - } - return null; - } + @GetMapping("/policeList") + public ModelAndView policeList(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response) { + ModelAndView mav = new ModelAndView("faisp/policeList"); + userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); + if(userInfo.getUserStatus() == null) { + userInfo.setUserStatus("USC003"); + } + //엑셀다운 + if(userInfo.getExcel() != null && userInfo.getExcel().equals("Y")){ + String[] headers = { "rownum", "title_cd", "user_nm", "organ_nm", "ofc_cd", "birth_date", "sex", "police_in_date", "title_in_date", "ofc_in_date", "outturn_cd","", "job_in_cd", "wrt_dt"}; + String[] headerNames = { "순번", "계급","성명", "청", "현부서"+System.lineSeparator()+"과", "생년월일","성별", "최초"+System.lineSeparator()+"임용", "현 계급"+System.lineSeparator()+"임용", "현 부서"+System.lineSeparator()+"임용", "수사경과"+System.lineSeparator()+"보유여부", "외사경력", "입직"+System.lineSeparator()+"경로","최종"+System.lineSeparator()+"수정일"}; + String[] columnType = {"String", "String", "String","String", "String", "String", "String", "String", "String", "String", "String", "String","String", "String"}; + String sheetName =""; + String excelFileName=""; + if(userInfo.getUserStatus().equals("USC003")) { + sheetName = "現 외사경찰 현황"; + excelFileName = "現 외사경찰 현황"; + } + if(userInfo.getUserStatus().equals("USC006")) { + sheetName = "前 외사경찰 현황"; + excelFileName = "前 외사경찰 현황"; + } + if(userInfo.getUserStatus().equals("USC007")) { + sheetName = "非 외사경찰 현황"; + excelFileName = "非 외사경찰 현황"; + } + List policeList= userInfoService.selectPoliceList(userInfo); - //메뉴권한 확인 - String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); - mav.addObject("accessAuth", accessAuth); - userInfo.setQueryInfo(); - mav.addObject("policeList", userInfoService.selectPoliceList(userInfo)); - userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo)); - userInfo.setPaginationInfo(); - mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); - mav.addObject("userStatus", userInfo.getUserStatus()); - mav.addObject("searchParams", userInfo); - return mav; - } - - @GetMapping("/policeEditModal") - public ModelAndView policeEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){ - ModelAndView mav = new ModelAndView("/faisp/policeEditModal"); - mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG")); - mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC")); - mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT")); - mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC")); - mav.addObject("seriesList", codeMgtService.selectCodeMgtList("SRC")); - mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG")); - mav.addObject("statusList", codeMgtService.selectCodeMgtList("USC")); - - //메뉴권한 확인 - String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); - mav.addObject("accessAuth", accessAuth); - mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq())); - return mav; - } - - @PostMapping("/updateUserInfo") - public int updateUserInfo(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo) { - userInfoService.updateUserInfo(loginUser,userInfo); - return userInfo.getUserSeq(); - } - - @GetMapping("/policeHistory") - public ModelAndView policeHistory(@AuthenticationPrincipal UserInfo loginUser,UserInfoHistory userInfoHistory){ - ModelAndView mav = new ModelAndView("/faisp/policeHistory"); - mav.addObject("userStatus", userInfoService.selectuserStatus(userInfoHistory)); - mav.addObject("policeList", userInfoService.selectPoliceHisList(userInfoHistory)); + try { + Utils.policelistToExcel(policeList, response, headers, headerNames, columnType, sheetName, excelFileName); + } catch (IOException e) { - return mav; - } - - @GetMapping("/policeHistoryView") - @ResponseBody - public UserInfoHistory policeHistoryView(UserInfoHistory userInfoHistory){ - return userInfoService.selectpoliceHistoryView(userInfoHistory); - } - - @PostMapping("/policeStatusUpdate") - @ResponseBody - public int userCompanion(@RequestBody List userInfo){ - return userInfoService.updateUserCompanion(userInfo); - } - - @PostMapping("/syncUserInfoToKwms") - @ResponseBody - public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List infoList){ - for(UserInfo info: infoList){ - UserInfo kwmsInfo = kwmsService.selectEmpInfo(info.getDicCode()); - if(kwmsInfo!=null){ - kwmsInfo.setUserSeq(info.getUserSeq()); - userInfoService.updateUserInfo(loginUser,kwmsInfo); - } - } - if(infoList.size()==1){ - return infoList.get(0).getUserSeq().toString(); - }else{ - return ""; - } - } - + } + return null; + } + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + userInfo.setQueryInfo(); + mav.addObject("policeList", userInfoService.selectPoliceList(userInfo)); + userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo)); + userInfo.setPaginationInfo(); + mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); + mav.addObject("userStatus", userInfo.getUserStatus()); + mav.addObject("searchParams", userInfo); + return mav; + } + + @GetMapping("/policeEditModal") + public ModelAndView policeEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){ + ModelAndView mav = new ModelAndView("/faisp/policeEditModal"); + mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG")); + mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC")); + mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT")); + mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC")); + mav.addObject("seriesList", codeMgtService.selectCodeMgtList("SRC")); + mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG")); + mav.addObject("statusList", codeMgtService.selectCodeMgtList("USC")); + + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq())); + return mav; + } + + @PostMapping("/updateUserInfo") + public int updateUserInfo(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo) { + userInfoService.updateUserInfo(loginUser,userInfo); + return userInfo.getUserSeq(); + } + + @GetMapping("/policeHistory") + public ModelAndView policeHistory(@AuthenticationPrincipal UserInfo loginUser,UserInfoHistory userInfoHistory){ + ModelAndView mav = new ModelAndView("/faisp/policeHistory"); + mav.addObject("userStatus", userInfoService.selectuserStatus(userInfoHistory)); + mav.addObject("policeList", userInfoService.selectPoliceHisList(userInfoHistory)); + + return mav; + } + + @GetMapping("/policeHistoryView") + @ResponseBody + public UserInfoHistory policeHistoryView(UserInfoHistory userInfoHistory){ + return userInfoService.selectpoliceHistoryView(userInfoHistory); + } + + @PostMapping("/policeStatusUpdate") + @ResponseBody + public int userCompanion(@RequestBody List userInfo){ + return userInfoService.updateUserCompanion(userInfo); + } + + @PostMapping("/syncUserInfoToKwms") + @ResponseBody + public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List infoList){ + for(UserInfo info: infoList){ + UserInfo kwmsInfo = kwmsService.selectEmpInfo(info.getDicCode()); + if(kwmsInfo!=null){ + kwmsInfo.setUserSeq(info.getUserSeq()); + userInfoService.updateUserInfo(loginUser,kwmsInfo); + } + } + if(infoList.size()==1){ + return infoList.get(0).getUserSeq().toString(); + }else{ + return ""; + } + } + + @GetMapping("/personnelStatus") + public ModelAndView personnelStatus(@AuthenticationPrincipal UserInfo loginUser){ + ModelAndView mav = new ModelAndView("faisp/personnelStatus"); + List jtList = codeMgtService.selectCodeMgtList("JT"); + jtList.sort((o1, o2) -> o2.getItemCd().compareTo(o1.getItemCd())); + mav.addObject("jtList", jtList); + return mav; + } + @GetMapping("/careerMgt") + public ModelAndView careerMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){ + ModelAndView mav = new ModelAndView("faisp/careerMgt"); + userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); + if(userInfo.getUserStatus() == null) { + userInfo.setUserStatus("USC003"); + } + + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + userInfo.setQueryInfo(); + mav.addObject("policeList", userInfoService.selectPoliceList(userInfo)); + userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo)); + userInfo.setPaginationInfo(); + mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); + mav.addObject("userStatus", userInfo.getUserStatus()); + mav.addObject("searchParams", userInfo); + return mav; + } + @GetMapping("/educationMgt") + public ModelAndView educationMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){ + ModelAndView mav = new ModelAndView("faisp/educationMgt"); + userInfo.setDownOrganCdList(loginUser.getDownOrganCdList()); + if(userInfo.getUserStatus() == null) { + userInfo.setUserStatus("USC003"); + } + + //메뉴권한 확인 + String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth(); + mav.addObject("accessAuth", accessAuth); + userInfo.setQueryInfo(); + mav.addObject("policeList", userInfoService.selectPoliceList(userInfo)); + userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo)); + userInfo.setPaginationInfo(); + mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); + mav.addObject("userStatus", userInfo.getUserStatus()); + mav.addObject("searchParams", userInfo); + return mav; + } } diff --git a/src/main/resources/templates/faisp/careerMgt.html b/src/main/resources/templates/faisp/careerMgt.html new file mode 100644 index 00000000..8569acf7 --- /dev/null +++ b/src/main/resources/templates/faisp/careerMgt.html @@ -0,0 +1,177 @@ + + + + + +
+
+

외사경찰 경력 현황

+ + +
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
순번계급성명현부서
생년월일성별외사경력수사경력정보경력보안경력국제경력최종
수정일
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+ + + + +
+ \ No newline at end of file diff --git a/src/main/resources/templates/faisp/educationMgt.html b/src/main/resources/templates/faisp/educationMgt.html new file mode 100644 index 00000000..0b1673a2 --- /dev/null +++ b/src/main/resources/templates/faisp/educationMgt.html @@ -0,0 +1,179 @@ + + + + + +
+
+

외사경찰 교육 현황

+ + +
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
순번계급성명현부서
생년월일성별고등학교전문대대학교석사박사전공최종
수정일
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+ + + + +
+ \ No newline at end of file diff --git a/src/main/resources/templates/faisp/personnelStatus.html b/src/main/resources/templates/faisp/personnelStatus.html new file mode 100644 index 00000000..eb18a403 --- /dev/null +++ b/src/main/resources/templates/faisp/personnelStatus.html @@ -0,0 +1,153 @@ + + + + + +
+
+

외사경찰 정원/현원 현황

+ + +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
관서정원현원과부족수정일
정원현원
cntcntcnt정원현원cntcntcntcntcntcntcntcntcntcntcntcntcntcnt
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ \ No newline at end of file diff --git a/src/main/resources/templates/faisp/policeList.html b/src/main/resources/templates/faisp/policeList.html index 123008f8..4de59c70 100644 --- a/src/main/resources/templates/faisp/policeList.html +++ b/src/main/resources/templates/faisp/policeList.html @@ -7,159 +7,167 @@
-

+

-
-
- - - -
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
- -
- -
-
-
-
+
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
순번계급성명현부서
생년월일성별최초
임용
현 계급
임용
현 부서
임용
수사경과
보유여부
외사경력입직
경로
최종
수정일
전출전입
-
-
-
-
-
- + +
+
+
+
+
+
+ + + +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
순번계급성명현부서
생년월일성별최초
임용
현 계급
임용
현 부서
임용
수사경과
보유여부
외사경력입직
경로
최종
수정일
전출전입
+
+
+
+
+
+
+ +
+
+ + +
-
- - -
@@ -170,10 +178,10 @@
-