Merge branch 'master' of http://118.219.150.34:50501/DBNT/FAISP
commit
f93ac028d5
|
|
@ -87,7 +87,8 @@ public class SecurityConfig{
|
|||
"/affair/**",
|
||||
"/affairResult/**",
|
||||
"/faStatistics/**",
|
||||
"/translator/**"
|
||||
"/translator/**",
|
||||
"/faisp/**"
|
||||
).hasRole(Role.USER.name()) // USER 접근 허용
|
||||
.antMatchers(
|
||||
"/authMgt/**",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
|
@ -27,28 +28,20 @@ public class FishingBoatController {
|
|||
private final CodeMgtService codeMgtService;
|
||||
|
||||
@RequestMapping("/fishingBoat")
|
||||
public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, FishingBoat fishingBoat) {
|
||||
public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus) {
|
||||
ModelAndView mav = new ModelAndView("faStatistics/fishingBoat/fishingBoatMgt");
|
||||
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/fishingBoat").get(0).getAccessAuth();
|
||||
|
||||
mav.addObject("accessAuth", accessAuth);
|
||||
|
||||
fishingBoat.setQueryInfo();
|
||||
/*List<ProcessResult> processResultList = processResultService.selectProcessResultList(fishingBoat);
|
||||
crackdownStatus.setQueryInfo();
|
||||
List<CrackdownStatus> crackdownStatusList = fishingBoatService.selectCrackdownStatusList(crackdownStatus);
|
||||
|
||||
for (ProcessResult pr:processResultList) {
|
||||
pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey()));
|
||||
pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey()));
|
||||
pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey()));
|
||||
}
|
||||
|
||||
mav.addObject("processResultList", processResultList);
|
||||
fishingBoat.setContentCnt(processResultService.selectProcessResultListCnt(fishingBoat));
|
||||
*/
|
||||
fishingBoat.setPaginationInfo();
|
||||
mav.addObject("searchParams", fishingBoat);
|
||||
mav.addObject("crackdownStatusList", crackdownStatusList);
|
||||
crackdownStatus.setContentCnt(fishingBoatService.selectCrackdownStatusListCnt(crackdownStatus));
|
||||
crackdownStatus.setPaginationInfo();
|
||||
mav.addObject("searchParams", crackdownStatus);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository;
|
|||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.ViolationVersion;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface ViolationVersionRepository extends JpaRepository<ViolationVersion, ViolationVersion.ViolationVersionId> {
|
||||
import java.util.Optional;
|
||||
|
||||
public interface ViolationVersionRepository extends JpaRepository<ViolationVersion, ViolationVersion.ViolationVersionId> {
|
||||
Optional<ViolationVersion> findTop1ByFbKeyOrderByVersionNoDesc(Integer fbKey);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,15 +8,18 @@ import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.C
|
|||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoatVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.ViolationVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResult;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResultVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.Sailor;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorVersion;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.*;
|
||||
import com.fasterxml.jackson.databind.util.BeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
|
@ -31,8 +34,16 @@ public class FishingBoatService extends BaseService {
|
|||
private final ViolationRepository violationRepository;
|
||||
private final ViolationVersionRepository violationVersionRepository;
|
||||
private final ProcessResultRepository processResultRepository;
|
||||
private final ProcessResultVersionRepository processResultVersionRepository;
|
||||
private final SailorRepository sailorRepository;
|
||||
private final SailorVersionRepository sailorVersionRepository;
|
||||
|
||||
public List<CrackdownStatus> selectCrackdownStatusList(CrackdownStatus crackdownStatus){
|
||||
return crackdownStatusMapper.selectCrackdownStatusList(crackdownStatus);
|
||||
}
|
||||
public Integer selectCrackdownStatusListCnt(CrackdownStatus crackdownStatus){
|
||||
return crackdownStatusMapper.selectCrackdownStatusListCnt(crackdownStatus);
|
||||
}
|
||||
public CrackdownStatus selectCrackdownStatus(Integer cdsKey) {
|
||||
CrackdownStatus crackdownStatus = crackdownStatusRepository.findById(cdsKey).orElse(null);
|
||||
crackdownStatus.setFishingBoat(fishingBoatRepository.findByCdsKey(cdsKey).orElse(new FishingBoat()));
|
||||
|
|
@ -52,10 +63,13 @@ public class FishingBoatService extends BaseService {
|
|||
Integer cdsKey, fbKey;
|
||||
if (crackdownStatus.getCdsKey()==null || crackdownStatus.getCdsKey().equals(0)){
|
||||
// 최초 등록시 단속현황, 처리현황, 선원정보를 같이 등록.
|
||||
// 단속현황, 단속현황버전 저장.
|
||||
cdsKey = crackdownStatusRepository.save(crackdownStatus).getCdsKey();
|
||||
CrackdownStatusVersion crackdownStatusVersion = new CrackdownStatusVersion();
|
||||
BeanUtils.copyProperties(crackdownStatus, crackdownStatusVersion);
|
||||
crackdownStatusVersion.setVersionNo(1);
|
||||
crackdownStatusVersionRepository.save(crackdownStatusVersion);
|
||||
// 어선정보, 어선정보버전 저장.
|
||||
FishingBoat fishingBoat = crackdownStatus.getFishingBoat();
|
||||
fishingBoat.setCdsKey(cdsKey);
|
||||
fbKey = fishingBoatRepository.save(fishingBoat).getFbKey();
|
||||
|
|
@ -63,28 +77,69 @@ public class FishingBoatService extends BaseService {
|
|||
BeanUtils.copyProperties(fishingBoat, fishingBoatVersion);
|
||||
fishingBoatVersion.setVersionNo(1);
|
||||
fishingBoatVersionRepository.save(fishingBoatVersion);
|
||||
// 위반사항, 위반사항버전 저장.
|
||||
List<Violation> violationList = crackdownStatus.getViolationList();
|
||||
List<ViolationVersion> violationVersionList = new ArrayList<>();
|
||||
int i = 1;
|
||||
for(Violation violation: violationList){
|
||||
violation.setViolationKey(i++);
|
||||
violation.setFbKey(fbKey);
|
||||
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(1);
|
||||
violationVersionList.add(violationVersion);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
// 처리현황, 처리현황버전 저장.
|
||||
ProcessResult processResult = crackdownStatus.getProcessResult();
|
||||
ProcessResultVersion processResultVersion = new ProcessResultVersion();
|
||||
processResult.setCdsKey(cdsKey);
|
||||
BeanUtils.copyProperties(processResult, processResultVersion);
|
||||
processResultVersion.setVersionNo(1);
|
||||
Integer prKey = processResultRepository.save(processResult).getPrKey();
|
||||
processResultVersion.setPrKey(prKey);
|
||||
processResultVersionRepository.save(processResultVersion);
|
||||
// 선원정보, 선원정보버전 저장.
|
||||
List<Sailor> sailorList = crackdownStatus.getSailorList();
|
||||
List<SailorVersion> sailorVersionList = new ArrayList<>();
|
||||
i = 1;
|
||||
for(Sailor sailor: sailorList){
|
||||
sailor.setSailorKey(i++);
|
||||
sailor.setFbKey(fbKey);
|
||||
|
||||
SailorVersion sailorVersion = new SailorVersion();
|
||||
BeanUtils.copyProperties(sailor, sailorVersion);
|
||||
sailorVersion.setVersionNo(1);
|
||||
sailorVersionList.add(sailorVersion);
|
||||
}
|
||||
sailorRepository.saveAll(sailorList);
|
||||
sailorVersionRepository.saveAll(sailorVersionList);
|
||||
}else{
|
||||
// 업데이트시에는 어선정보만 수정.
|
||||
cdsKey = crackdownStatus.getCdsKey();
|
||||
FishingBoatVersion lastVersion = fishingBoatVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(crackdownStatus.getFishingBoat().getFbKey()).orElse(null);
|
||||
int versionNo = lastVersion.getVersionNo();
|
||||
FishingBoat fishingBoat = crackdownStatus.getFishingBoat();
|
||||
FishingBoatVersion newInfo = new FishingBoatVersion();
|
||||
|
||||
fbKey = fishingBoatRepository.save(crackdownStatus.getFishingBoat()).getFbKey();
|
||||
BeanUtils.copyProperties(fishingBoat, newInfo);
|
||||
FishingBoatVersion lastFishingBoatVersion = fishingBoatVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(crackdownStatus.getFishingBoat().getFbKey()).orElse(null);
|
||||
newInfo.setVersionNo(lastFishingBoatVersion.getVersionNo()+1);
|
||||
fishingBoatRepository.save(fishingBoat);
|
||||
fishingBoatVersionRepository.save(newInfo);
|
||||
// 위반사항
|
||||
List<Violation> violationList = crackdownStatus.getViolationList();
|
||||
List<ViolationVersion> violationVersionList = new ArrayList<>();
|
||||
int i=1;
|
||||
ViolationVersion lastViolationVersion = violationVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(fishingBoat.getFbKey()).orElse(null);
|
||||
for(Violation violation: violationList){
|
||||
violation.setViolationKey(i);
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(lastViolationVersion.getVersionNo()+1);
|
||||
violationVersionList.add(violationVersion);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
}
|
||||
return cdsKey;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
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.service.CodeMgtService;
|
||||
import com.dbnt.faisp.main.fipTarget.model.PartInfo;
|
||||
import com.dbnt.faisp.main.fipTarget.model.ShipInfo;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfoHistory;
|
||||
import com.dbnt.faisp.main.userInfo.service.UserInfoService;
|
||||
import com.dbnt.faisp.util.ParamMap;
|
||||
import com.dbnt.faisp.util.Utils;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
|
@ -23,15 +31,44 @@ public class FaispController {
|
|||
private final AuthMgtService authMgtService;
|
||||
private final CodeMgtService codeMgtService;
|
||||
private final UserInfoService userInfoService;
|
||||
private final KwmsService kwmsService;
|
||||
|
||||
|
||||
@GetMapping("/policeList")
|
||||
public ModelAndView partInfoList(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo, HttpServletResponse response) {
|
||||
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<UserInfo> policeList= userInfoService.selectPoliceList(userInfo);
|
||||
|
||||
try {
|
||||
Utils.policelistToExcel(policeList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||
} catch (IOException e) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
|
||||
|
|
@ -41,13 +78,13 @@ public class FaispController {
|
|||
userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo));
|
||||
userInfo.setPaginationInfo();
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
mav.addObject("userSatus", userInfo.getUserStatus());
|
||||
mav.addObject("userStatus", userInfo.getUserStatus());
|
||||
mav.addObject("searchParams", userInfo);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/policeEditModal")
|
||||
public ModelAndView menuEditModal(UserInfo userInfo){
|
||||
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"));
|
||||
|
|
@ -57,9 +94,56 @@ public class FaispController {
|
|||
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> userInfo){
|
||||
return userInfoService.updateUserCompanion(userInfo);
|
||||
}
|
||||
|
||||
@PostMapping("/syncUserInfoToKwms")
|
||||
@ResponseBody
|
||||
public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List<UserInfo> 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 "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class MyInfoController {
|
|||
@PostMapping("/updateSelf")
|
||||
public void updateSelf(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo) {
|
||||
userInfo.setUserSeq(loginUser.getUserSeq());
|
||||
userInfoService.updateUserInfo(userInfo);
|
||||
userInfoService.updateUserInfo(loginUser,userInfo);
|
||||
}
|
||||
|
||||
@PostMapping("/syncSelfToKwms")
|
||||
|
|
@ -67,7 +67,7 @@ public class MyInfoController {
|
|||
UserInfo kwmsInfo = kwmsService.selectEmpInfo(userInfo.getDicCode());
|
||||
if(kwmsInfo!= null){
|
||||
kwmsInfo.setUserSeq(loginUser.getUserSeq());
|
||||
userInfoService.updateUserInfo(kwmsInfo);
|
||||
userInfoService.updateUserInfo(loginUser,kwmsInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.userInfo.mapper;
|
|||
|
||||
import com.dbnt.faisp.main.userInfo.model.DashboardConfig;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfoHistory;
|
||||
import com.dbnt.faisp.util.ParamMap;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
@ -21,4 +22,8 @@ public interface UserInfoMapper {
|
|||
List<UserInfo> selectPoliceList(UserInfo userInfo);
|
||||
|
||||
Integer selectPoliceListCnt(UserInfo userInfo);
|
||||
|
||||
List<UserInfoHistory> selectPoliceHisList(UserInfoHistory userInfoHistory);
|
||||
|
||||
UserInfoHistory selectpoliceHistoryView(UserInfoHistory userInfoHistory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,12 @@ public class UserInfo extends BaseModel implements UserDetails{
|
|||
private String positionName;
|
||||
@Transient
|
||||
private String departmentName;
|
||||
@Transient
|
||||
private String organNm;
|
||||
@Transient
|
||||
private String excel;
|
||||
@Transient
|
||||
private String rownum;
|
||||
|
||||
@Transient
|
||||
private List<AccessConfig> accessConfigList;
|
||||
|
|
|
|||
|
|
@ -11,5 +11,7 @@ public interface UserInfoHistoryRepository extends JpaRepository<UserInfoHistory
|
|||
|
||||
UserInfoHistory findByUserSeq(Integer userSeq);
|
||||
|
||||
UserInfoHistory findTopByUserSeqOrderByVersionNoDesc(Integer userSeq);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.dbnt.faisp.main.userInfo.repository;
|
|||
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
|
@ -12,4 +14,7 @@ public interface UserInfoRepository extends JpaRepository<UserInfo, Integer> {
|
|||
Optional<UserInfo> findByUserSeq(Integer userSeq);
|
||||
|
||||
Optional<UserInfo> findByDicCode(String dicCode);
|
||||
|
||||
@Query(value = "SELECT user_status FROM user_info WHERE user_seq=:userSeq", nativeQuery = true)
|
||||
String getUserStatus(@Param("userSeq") Integer userSeq);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.userInfo.service;
|
|||
|
||||
import com.dbnt.faisp.config.Role;
|
||||
import com.dbnt.faisp.main.fipTarget.model.PartInfo;
|
||||
import com.dbnt.faisp.main.fipTarget.model.ShipInfo;
|
||||
import com.dbnt.faisp.main.userInfo.mapper.UserInfoMapper;
|
||||
import com.dbnt.faisp.main.userInfo.model.DashboardConfig;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
|
|
@ -12,6 +13,8 @@ import com.dbnt.faisp.main.userInfo.repository.UserInfoRepository;
|
|||
import com.dbnt.faisp.util.ParamMap;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
|
|
@ -82,7 +85,7 @@ public class UserInfoService implements UserDetailsService {
|
|||
return result.getUserId();
|
||||
}
|
||||
@Transactional
|
||||
public void updateUserInfo(UserInfo userInfo){
|
||||
public void updateUserInfo(UserInfo loginUser,UserInfo userInfo){
|
||||
UserInfo savedInfo = userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
|
||||
if(savedInfo!=null){
|
||||
if(userInfo.getDicCode()!=null){
|
||||
|
|
@ -145,6 +148,45 @@ public class UserInfoService implements UserDetailsService {
|
|||
if(userInfo.getUserStatus()!=null){
|
||||
savedInfo.setUserStatus(userInfo.getUserStatus());
|
||||
}
|
||||
userInfoRepository.save(savedInfo);
|
||||
UserInfoHistory dbHis = userInfoHistoryRepository.findTopByUserSeqOrderByVersionNoDesc(savedInfo.getUserSeq());
|
||||
if(dbHis != null) {
|
||||
UserInfoHistory hisTmp = new UserInfoHistory();
|
||||
hisTmp.setUserSeq(savedInfo.getUserSeq());
|
||||
hisTmp.setVersionNo(dbHis.getVersionNo()+1);
|
||||
hisTmp.setDicCode(savedInfo.getDicCode());
|
||||
hisTmp.setUserId(savedInfo.getUserId());
|
||||
hisTmp.setUserNm(savedInfo.getUserNm());
|
||||
hisTmp.setBirthDate(savedInfo.getBirthDate());
|
||||
hisTmp.setSex(savedInfo.getSex());
|
||||
hisTmp.setEmail(savedInfo.getEmail());
|
||||
hisTmp.setPhoneNo(savedInfo.getPhoneNo());
|
||||
hisTmp.setAreaCd(savedInfo.getAreaCd());
|
||||
hisTmp.setOgCd(savedInfo.getOgCd());
|
||||
hisTmp.setOfcCd(savedInfo.getOfcCd());
|
||||
hisTmp.setTitleCd(savedInfo.getTitleCd());
|
||||
hisTmp.setGroupCd(savedInfo.getGroupCd());
|
||||
hisTmp.setSeriesCd(savedInfo.getSeriesCd());
|
||||
hisTmp.setOfcHeadYn(savedInfo.getOfcHeadYn());
|
||||
hisTmp.setHiringCd(savedInfo.getHiringCd());
|
||||
hisTmp.setEmployCd(savedInfo.getEmployCd());
|
||||
hisTmp.setOutturnCd(savedInfo.getOutturnCd());
|
||||
hisTmp.setWorkCd(savedInfo.getWorkCd());
|
||||
hisTmp.setJobInCd(savedInfo.getJobInCd());
|
||||
hisTmp.setLanguageCd(savedInfo.getLanguageCd());
|
||||
hisTmp.setPoliceInDate(savedInfo.getPoliceInDate());
|
||||
hisTmp.setOrganInDate(savedInfo.getOrganInDate());
|
||||
hisTmp.setOfcInDate(savedInfo.getOfcInDate());
|
||||
hisTmp.setTitleInDate(savedInfo.getTitleInDate());
|
||||
hisTmp.setUserStatus(savedInfo.getUserStatus());
|
||||
hisTmp.setWrtOrgan(loginUser.getOgCd());
|
||||
hisTmp.setWrtPart(loginUser.getOfcCd());
|
||||
hisTmp.setWrtTitle(loginUser.getTitleCd());
|
||||
hisTmp.setWrtUserSeq(loginUser.getUserSeq());
|
||||
hisTmp.setWrtNm(loginUser.getUserNm());
|
||||
hisTmp.setWrtDt(LocalDateTime.now());
|
||||
userInfoHistoryRepository.save(hisTmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -238,4 +280,15 @@ public class UserInfoService implements UserDetailsService {
|
|||
public Integer selectPoliceListCnt(UserInfo userInfo) {
|
||||
return userInfoMapper.selectPoliceListCnt(userInfo);
|
||||
}
|
||||
|
||||
public List<UserInfoHistory> selectPoliceHisList(UserInfoHistory userInfoHistory) {
|
||||
return userInfoMapper.selectPoliceHisList(userInfoHistory);
|
||||
}
|
||||
|
||||
public UserInfoHistory selectpoliceHistoryView(UserInfoHistory userInfoHistory) {
|
||||
return userInfoMapper.selectpoliceHistoryView(userInfoHistory);
|
||||
}
|
||||
public String selectuserStatus(UserInfoHistory userInfoHistory) {
|
||||
return userInfoRepository.getUserStatus(userInfoHistory.getUserSeq());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
|
|
@ -63,8 +64,8 @@ public class userMgtController {
|
|||
}
|
||||
|
||||
@PostMapping("/updateUserInfo")
|
||||
public void updateUserInfo(UserInfo userInfo) {
|
||||
userInfoService.updateUserInfo(userInfo);
|
||||
public void updateUserInfo(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo) {
|
||||
userInfoService.updateUserInfo(loginUser,userInfo);
|
||||
}
|
||||
|
||||
@PostMapping("/userDelete")
|
||||
|
|
@ -76,12 +77,12 @@ public class userMgtController {
|
|||
|
||||
@PostMapping("/syncUserInfoToKwms")
|
||||
@ResponseBody
|
||||
public String syncUserInfoToKwms(@RequestBody List<UserInfo> infoList){
|
||||
public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List<UserInfo> infoList){
|
||||
for(UserInfo info: infoList){
|
||||
UserInfo kwmsInfo = kwmsService.selectEmpInfo(info.getDicCode());
|
||||
if(kwmsInfo!=null){
|
||||
kwmsInfo.setUserSeq(info.getUserSeq());
|
||||
userInfoService.updateUserInfo(kwmsInfo);
|
||||
userInfoService.updateUserInfo(loginUser,kwmsInfo);
|
||||
}
|
||||
}
|
||||
if(infoList.size()==1){
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ import com.dbnt.faisp.main.equip.model.CellPhone;
|
|||
import com.dbnt.faisp.main.equip.model.UseList;
|
||||
import com.dbnt.faisp.main.fipTarget.model.PartInfo;
|
||||
import com.dbnt.faisp.main.fipTarget.model.PartWork;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeanWrapper;
|
||||
import org.springframework.beans.BeanWrapperImpl;
|
||||
|
|
@ -974,5 +976,98 @@ public class Utils {
|
|||
return emptyNames.toArray(result);
|
||||
}
|
||||
|
||||
public static void policelistToExcel(List<UserInfo> policeList, HttpServletResponse response, String[] headers,
|
||||
String[] headerNames, String[] columnType, String sheetName, String excelFileName) throws IOException {
|
||||
if(Utils.isNotEmpty(policeList)) {
|
||||
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
|
||||
XSSFWorkbook wb = new XSSFWorkbook();
|
||||
Sheet sheet = wb.createSheet(sheetName);
|
||||
Row headerRow = sheet.createRow(0);
|
||||
CellStyle cellStyle1 = wb.createCellStyle(); //쉼표들어간 숫자 양식
|
||||
CellStyle cellStyle2 = wb.createCellStyle(); //숫자양식
|
||||
CellStyle headerStyle3 = wb.createCellStyle();
|
||||
|
||||
XSSFDataFormat format = wb.createDataFormat();
|
||||
cellStyle1.setAlignment(HorizontalAlignment.CENTER);
|
||||
cellStyle2.setDataFormat(format.getFormat("#,##0"));
|
||||
cellStyle2.setAlignment(HorizontalAlignment.CENTER);
|
||||
headerStyle3.setBorderTop(BorderStyle.THIN);
|
||||
headerStyle3.setBorderBottom(BorderStyle.THIN);
|
||||
headerStyle3.setBorderLeft(BorderStyle.THIN);
|
||||
headerStyle3.setBorderRight(BorderStyle.THIN);
|
||||
headerStyle3.setAlignment(HorizontalAlignment.CENTER);
|
||||
headerStyle3.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
headerStyle3.setFillForegroundColor((short)3);
|
||||
headerStyle3.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||
headerStyle3.setWrapText(true);
|
||||
//로우그리기
|
||||
for(int i=0; i<policeList.size(); i++) {
|
||||
ParamMap rowData = new ParamMap();
|
||||
Row row = sheet.createRow(i+1);
|
||||
rowData.set("rownum", policeList.get(i).getRownum());
|
||||
rowData.set("title_cd", policeList.get(i).getTitleCd());
|
||||
rowData.set("user_nm", policeList.get(i).getUserNm());
|
||||
rowData.set("organ_nm", policeList.get(i).getOrganNm());
|
||||
rowData.set("ofc_cd", policeList.get(i).getOfcCd());
|
||||
if(policeList.get(i).getBirthDate() != null) {
|
||||
rowData.set("birth_date", policeList.get(i).getBirthDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}else {
|
||||
rowData.set("birth_date", "");
|
||||
}
|
||||
rowData.set("sex", policeList.get(i).getSex());
|
||||
if(policeList.get(i).getPoliceInDate() != null) {
|
||||
rowData.set("police_in_date", policeList.get(i).getPoliceInDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}else {
|
||||
rowData.set("police_in_date", "");
|
||||
}
|
||||
if(policeList.get(i).getTitleInDate() != null) {
|
||||
rowData.set("title_in_date", policeList.get(i).getTitleInDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}else {
|
||||
rowData.set("title_in_date", "");
|
||||
}
|
||||
if(policeList.get(i).getOfcInDate() != null) {
|
||||
rowData.set("ofc_in_date", policeList.get(i).getOfcInDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}else {
|
||||
rowData.set("ofc_in_date", "");
|
||||
}
|
||||
rowData.set("outturn_cd", policeList.get(i).getOutturnCd());
|
||||
rowData.set("job_in_cd", policeList.get(i).getJobInCd());
|
||||
rowData.set("wrt_dt", policeList.get(i).getWrtDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")));
|
||||
for(int j=0; j<headers.length; j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
if(columnType[j].equalsIgnoreCase("Int")) {
|
||||
cell.setCellValue(rowData.getInt(headers[j]));
|
||||
cell.setCellStyle(cellStyle2);
|
||||
} else if(columnType[j].equalsIgnoreCase("String")) {
|
||||
cell.setCellValue(rowData.getString(headers[j]));
|
||||
cell.setCellStyle(cellStyle1);
|
||||
} else {
|
||||
cell.setCellValue(rowData.getString(headers[j]));
|
||||
cell.setCellStyle(cellStyle1);
|
||||
}
|
||||
}
|
||||
}
|
||||
//헤더
|
||||
for(int j=0; j<headerNames.length; j++) {
|
||||
Cell cell = headerRow.createCell(j);
|
||||
cell.setCellValue(headerNames[j]);
|
||||
cell.setCellStyle(headerStyle3);
|
||||
sheet.autoSizeColumn(j);
|
||||
sheet.setColumnWidth(j, (sheet.getColumnWidth(j)) + 1024);
|
||||
}
|
||||
//엑셀이름 한글깨짐방지
|
||||
String outputFileName = new String(excelFileName.getBytes("UTF-8"), "8859_1");
|
||||
|
||||
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
||||
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+outputFileName+"_"+Utils.getTimeStampString("yyyyMMdd_HHmm")+".xlsx\""));
|
||||
|
||||
wb.write(response.getOutputStream());
|
||||
wb.close();
|
||||
} else {
|
||||
createNoDataAlert(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,11 +88,21 @@
|
|||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="ogCd != null and ogCd != ''">
|
||||
and og_cd = #{ogCd}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
and sex = #{sex}
|
||||
</if>
|
||||
<if test="userNm != null and userNm != ''">
|
||||
and user_nm like '%'||#{userNm}||'%'
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectPoliceList" resultType="UserInfo" parameterType="UserInfo">
|
||||
select user_seq,
|
||||
select (ROW_NUMBER() OVER(order by user_nm desc)) AS rownum,
|
||||
user_seq,
|
||||
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
|
||||
user_nm,
|
||||
og_cd,
|
||||
|
|
@ -108,8 +118,10 @@
|
|||
wrt_dt
|
||||
from user_info
|
||||
<include refid="selectPoliceListWhere"></include>
|
||||
order by user_seq desc
|
||||
order by rownum desc
|
||||
<if test='excel != "Y"'>
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPoliceListCnt" resultType="Integer" parameterType="UserInfo">
|
||||
|
|
@ -134,4 +146,42 @@
|
|||
order by user_seq desc
|
||||
) a
|
||||
</select>
|
||||
|
||||
<select id="selectPoliceHisList" resultType="UserInfoHistory" parameterType="UserInfoHistory">
|
||||
select user_seq,
|
||||
version_no,
|
||||
(select item_value from code_mgt where item_cd = wrt_organ) as wrt_organ,
|
||||
(select item_value from code_mgt where item_cd = wrt_part) as wrt_part,
|
||||
(select item_value from code_mgt where item_cd = wrt_title) as wrt_title,
|
||||
wrt_nm,
|
||||
wrt_dt
|
||||
from user_info_history
|
||||
where user_seq = #{userSeq}
|
||||
order by version_no desc
|
||||
</select>
|
||||
|
||||
<select id="selectpoliceHistoryView" resultType="UserInfoHistory" parameterType="UserInfoHistory">
|
||||
select user_seq,
|
||||
version_no,
|
||||
dic_code,
|
||||
user_id,
|
||||
user_nm,
|
||||
phone_no,
|
||||
email,
|
||||
(select item_value from code_mgt where item_cd = sex) as sex,
|
||||
birth_date,
|
||||
police_in_date,
|
||||
(select item_value from code_mgt where item_cd = og_cd) as og_cd,
|
||||
organ_in_date,
|
||||
ofc_cd,
|
||||
ofc_in_date,
|
||||
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
|
||||
title_in_date,
|
||||
(select item_value from code_mgt where item_cd = outturn_cd) as outturn_cd,
|
||||
(select item_value from code_mgt where item_cd = series_cd) as series_cd,
|
||||
(select item_value from code_mgt where item_cd = language_cd) as language_cd
|
||||
from user_info_history
|
||||
where user_seq = #{userSeq}
|
||||
and version_no = #{versionNo}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -205,9 +205,26 @@ function departmentDynamicOption(targetTagName, code, defaultOptionName='') {
|
|||
$(targetTagName).empty();
|
||||
let option = '';
|
||||
organConfigList.forEach(function (organConfig) {
|
||||
if (organConfig.parentOrgan != null && organConfig.organType != 'OGC002' && organConfig.parentOrgan == code) {
|
||||
if (organConfig.parentOrgan != null && organConfig.organType !== 'OGC002' && organConfig.parentOrgan === code) {
|
||||
option += '<option value="' + organConfig.organCd + '">' + organConfig.organNm + '</option>';
|
||||
}
|
||||
});
|
||||
$(targetTagName).append('<option value="">' + defaultOptionName + '선택</option>' + option);
|
||||
}
|
||||
|
||||
function dateTimeCalc(startDateTime, endDateTime) {
|
||||
if (startDateTime !== '' &&endDateTime !== '' && startDateTime !== undefined && endDateTime !== undefined) {
|
||||
const startDate = new Date(startDateTime);
|
||||
const endDate = new Date(endDateTime);
|
||||
|
||||
let diffTime = endDate.getTime() - startDate.getTime();
|
||||
|
||||
const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
|
||||
const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
|
||||
|
||||
return day + '일' + hour + '시간' + minute + '분';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -504,20 +504,3 @@ function getToday() {
|
|||
var date = new Date();
|
||||
var year = date.getFullYear();
|
||||
}
|
||||
|
||||
function dateTimeCalc(startDateTime, endDateTime) {
|
||||
if (startDateTime != '' &&endDateTime != '' && startDateTime != undefined && endDateTime != undefined) {
|
||||
const startDate = new Date(startDateTime);
|
||||
const endDate = new Date(endDateTime);
|
||||
|
||||
let diffTime = endDate.getTime() - startDate.getTime();
|
||||
|
||||
const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
|
||||
const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
|
||||
|
||||
return day + '일' + hour + '시간' + minute + '분';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,11 +125,12 @@ function getFishingBoatEditModal(cdsKey){
|
|||
});
|
||||
$(".dateTimeSelector").datetimepicker({
|
||||
format:'Y-m-d H:i',
|
||||
lang:'kr'
|
||||
lang:'kr',
|
||||
step:20
|
||||
});
|
||||
$(".timeSelector").datetimepicker({
|
||||
datepicker:false,
|
||||
format:'H:i',
|
||||
format:'H시간i분',
|
||||
lang:'kr',
|
||||
step:20
|
||||
});
|
||||
|
|
@ -231,7 +232,7 @@ function saveFishingBoatInfo(saveYn){
|
|||
success : function() {
|
||||
alert("저장되었습니다.");
|
||||
contentFade("out");
|
||||
// location.reload();
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("저장에 실패하였습니다.");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
$(document).on('click', '.policeTr', function (){
|
||||
$(document).on('click', '.policeTr', function (event){
|
||||
const target = event.target;
|
||||
if(!(target.className === "checkBoxTd" ||$(target).parents("td").length>0)){
|
||||
const userSeq = (Number($(this).find(".userSeq").val()));
|
||||
console.log(userSeq);
|
||||
showModal(userSeq);
|
||||
}
|
||||
});
|
||||
|
||||
function showModal(userSeq){
|
||||
|
|
@ -10,6 +12,84 @@ function showModal(userSeq){
|
|||
data: {userSeq: userSeq},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#policeEditModalContent").empty().append(html);
|
||||
$(".dateSelector").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko",
|
||||
autoclose: true
|
||||
});
|
||||
$("#policeEditModal").modal('show');
|
||||
},
|
||||
error:function(){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '#syncToKwmsBtn', function (){
|
||||
const dicCode = $("#dicCode").val();
|
||||
if(!dicCode){
|
||||
alert("공무원식별번호가 없습니다.")
|
||||
}else{
|
||||
syncUserInfoToKwms([{
|
||||
userSeq: $("#userSeq").val(),
|
||||
dicCode: dicCode
|
||||
}]);
|
||||
}
|
||||
})
|
||||
|
||||
function syncUserInfoToKwms(userList){
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "/faisp/syncUserInfoToKwms",
|
||||
data : JSON.stringify(userList),
|
||||
contentType: 'application/json',
|
||||
beforeSend: function (xhr){
|
||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||
},
|
||||
success : function(data) {
|
||||
if(userList.length===1){
|
||||
showModal(userList[0].userSeq);
|
||||
}
|
||||
alert("갱신 되었습니다.");
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("갱신에 실패하였습니다");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).on('click', '#updateBtn', function (){
|
||||
if(confirm("수정하시겠습니까?")){
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#userInfoUpdate")[0]);
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : formData,
|
||||
url : "/faisp/updateUserInfo",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success : function(data) {
|
||||
alert("수정되었습니다.");
|
||||
contentFade("out");
|
||||
showModal(data);
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("수정에 실패하였습니다.");
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '#historyTab', function (){
|
||||
const userSeq = (Number($(this).data('userseq')));
|
||||
$.ajax({
|
||||
url: '/faisp/policeHistory',
|
||||
data: {userSeq: userSeq},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#policeEditModalContent").empty().append(html);
|
||||
$("#policeEditModal").modal('show');
|
||||
|
|
@ -18,5 +98,143 @@ function showModal(userSeq){
|
|||
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '#editTab', function (){
|
||||
const userSeq = (Number($(this).data('userseq')));
|
||||
showModal(userSeq);
|
||||
})
|
||||
|
||||
$(document).on('click', '.historyInfoTr', function (){
|
||||
$(this).find('.hisChk').prop('checked',true)
|
||||
if($(this).find('.hisChk').prop('checked')){
|
||||
$('.hisChk').prop('checked',false);
|
||||
$(this).find('.hisChk').prop('checked',true)
|
||||
}
|
||||
$.ajax({
|
||||
url: '/faisp/policeHistoryView',
|
||||
data: {
|
||||
userSeq: Number($(this).find(".userSeq").val()),
|
||||
versionNo : Number($(this).find(".verNo").val())
|
||||
},
|
||||
type: 'GET',
|
||||
dataType:"json",
|
||||
success: function(data){
|
||||
$('#vDicCode').val(data.dicCode);
|
||||
$('#vUserId').val(data.userId);
|
||||
$('#vUserNm').val(data.userNm);
|
||||
$('#vPhone').val(data.phoneNo);
|
||||
$('#vEmail').val(data.email);
|
||||
$('#vSex').val(data.sex);
|
||||
$('#vBirth').val(data.birthDate);
|
||||
$('#vPoliceInDate').val(data.policeInDate);
|
||||
$('#vOgCd').val(data.ogCd);
|
||||
$('#vOrganInDate').val(data.organInDate);
|
||||
$('#vOfcCd').val(data.ofcCd);
|
||||
$('#vOfcInDate').val(data.ofcInDate);
|
||||
$('#vTitleCd').val(data.titleCd);
|
||||
$('#vTitleInDate').val(data.titleInDate);
|
||||
$('#vOutturnCd').val(data.outturnCd);
|
||||
$('#vSeriesCd').val(data.seriesCd);
|
||||
$('#vLanguageCd').val(data.languageCd);
|
||||
},
|
||||
error:function(){
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$(document).on('click', '#previousTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/policeList?userStatus="+userStatus;
|
||||
})
|
||||
|
||||
$(document).on('click', '#presentTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/policeList?userStatus="+userStatus;
|
||||
})
|
||||
$(document).on('click', '#notPoliceTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/policeList?userStatus="+userStatus;
|
||||
})
|
||||
|
||||
$(document).on('click', '#outBtn', function (){
|
||||
if($('input:checkbox[name=policeChk]:checked').length < 1){
|
||||
alert("전출대상을 선택해주세요")
|
||||
return false;
|
||||
}
|
||||
if(confirm("선택한 대상을 전출처리 하시겠습니까?")){
|
||||
const checkArr = [];
|
||||
$('input:checkbox[name=policeChk]:checked').each(function (idx, el){
|
||||
checkArr.push({});
|
||||
const target = $(el);
|
||||
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
|
||||
checkArr[idx].userStatus = "USC006"
|
||||
})
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "/faisp/policeStatusUpdate",
|
||||
data : JSON.stringify(checkArr),
|
||||
contentType: 'application/json',
|
||||
beforeSend: function (xhr){
|
||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||
},
|
||||
success : function(data) {
|
||||
alert(data+"건이 전출 처리되었습니다.");
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("전출처리에 실패하였습니다");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '#inBtn', function (){
|
||||
if($('input:checkbox[name=policeChk]:checked').length < 1){
|
||||
alert("전입대상을 선택해주세요")
|
||||
return false;
|
||||
}
|
||||
if(confirm("선택한 대상을 전입처리 하시겠습니까?")){
|
||||
const checkArr = [];
|
||||
$('input:checkbox[name=policeChk]:checked').each(function (idx, el){
|
||||
checkArr.push({});
|
||||
const target = $(el);
|
||||
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
|
||||
checkArr[idx].userStatus = "USC003"
|
||||
})
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "/faisp/policeStatusUpdate",
|
||||
data : JSON.stringify(checkArr),
|
||||
contentType: 'application/json',
|
||||
beforeSend: function (xhr){
|
||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||
},
|
||||
success : function(data) {
|
||||
alert(data+"건이 전입 처리되었습니다.");
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("전입처리에 실패하였습니다");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
$(document).ready( function() {
|
||||
$('#chk-all').click( function() {
|
||||
$('.policeCheckBox').prop('checked',this.checked);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#goExcel', function (){
|
||||
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
||||
$('input[name=excel]').val('Y');
|
||||
$('#searchFm').submit();
|
||||
$('input[name=excel]').val('');
|
||||
}else{
|
||||
false;
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -216,10 +216,9 @@ $(document).on('click', '.historyInfoTr', function (){
|
|||
$('#hOwnerNm').val(data.ownerNm);
|
||||
$('#hShipNm').val(data.shipNm);
|
||||
$('#hShipWeight').val(data.shipWeight);
|
||||
$('#hSusong').val('여객 : '+data.passengerCnt+'명'+'\n'+'화물 : '+data.freightCnt+'TEU')
|
||||
$('#hSusong').val('여객 : '+data.passengerCnt+'명'+'\n'+'화물 : '+data.freightCnt+'TEU');
|
||||
$('#hOperationCnt').val(data.operationCnt);
|
||||
$('#hCloseYn').val(data.closeYn);
|
||||
console.log(data);
|
||||
},
|
||||
error:function(){
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ function getEditModal(publicKey, publicType){
|
|||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#editContent").empty().append(html)
|
||||
$("#content").summernote({
|
||||
/*$("#content").summernote({
|
||||
lang:'ko-KR',
|
||||
height: 350,
|
||||
disableDragAndDrop: true,
|
||||
|
|
@ -92,7 +92,7 @@ function getEditModal(publicKey, publicType){
|
|||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['table', ['table']]
|
||||
]
|
||||
});
|
||||
});*/
|
||||
setUploadDiv();
|
||||
$("#editModal").modal('show');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,6 +25,19 @@ $(document).on('click', '#approvalBtn', function (){
|
|||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '#notPoliceBtn', function (){
|
||||
if(confirm("선택한 대상을 비외사경찰승인 처리 하시겠습니까?")){
|
||||
const checkArr = [];
|
||||
$('input:checkbox[name=userChk]:checked').each(function (idx, el){
|
||||
checkArr.push({});
|
||||
const target = $(el);
|
||||
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
|
||||
checkArr[idx].userStatus = "USC007"
|
||||
})
|
||||
userApproval(checkArr);
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '.statusBtn', function (){
|
||||
const userInfoList = [];
|
||||
userInfoList.push({
|
||||
|
|
|
|||
|
|
@ -134,8 +134,7 @@
|
|||
<div class="row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<th:block th:if="${searchParams.userStatus eq 'USC002'}">
|
||||
<input type="button" class="btn btn-success" value="승인" id="approvalBtn">
|
||||
<input type="button" class="btn btn-warning" value="반려" id="companionBtn">
|
||||
<input type="button" class="btn btn-danger" value="반려" id="companionBtn">
|
||||
</th:block>
|
||||
<th:block th:if="${searchParams.userStatus eq 'USC003'}">
|
||||
<button type="button" class="btn btn-info" id="syncToKwmsAllBtn">인사시스템 정보 불러오기</button>
|
||||
|
|
@ -166,7 +165,12 @@
|
|||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<th:block th:if="${searchParams.userStatus eq 'USC002'}">
|
||||
<input type="button" class="btn btn-success" value="외사경찰 승인" id="approvalBtn">
|
||||
<input type="button" class="btn btn-warning" value="비외사경찰 승인" id="notPoliceBtn">
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<h5 class="modal-title">수정이력</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row mx-0">
|
||||
<div class="col-100 card text-center">
|
||||
<div class="card-body">
|
||||
|
|
@ -91,6 +92,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<h5 class="modal-title">수정이력</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row mx-0">
|
||||
<div class="col-100 card text-center">
|
||||
<div class="card-body">
|
||||
|
|
@ -74,6 +75,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
|
|
|
|||
|
|
@ -351,6 +351,8 @@
|
|||
</div>
|
||||
<input type="hidden" class="processResultInfo" name="processResult.warrantReqTakeTime" id="warrantReqTake">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="isIvsgtStop" class="col-sm-1 col-form-label col-form-label-sm text-center">수사중지 여부</label>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-select form-select-sm processResultInfo" id="isIvsgtStop" name="processResult.isIvsgtStop">
|
||||
|
|
@ -359,12 +361,12 @@
|
|||
<option value="N">X</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="evictionDt" 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 processResultInfo dateSelector" id="evictionDt" name="processResult.evictionDt" placeholder="0000-00-00" th:value="${crackdownStatus.processResult.evictionDt}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="directHandoverDt" 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 processResultInfo dateSelector" id="directHandoverDt" name="processResult.directHandoverDt" placeholder="0000-00-00" th:value="${crackdownStatus.processResult.directHandoverDt}">
|
||||
|
|
@ -376,8 +378,6 @@
|
|||
<input type="text" class="form-control form-control-sm processResultInfo" id="handoverSeaPointLat" name="processResult.handoverSeaPointLat" placeholder="000-00.00E" th:value="${crackdownStatus.processResult.handoverSeaPointLat}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="handoverBoat" 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 processResultInfo" id="handoverBoat" name="processResult.handoverBoat" th:value="${crackdownStatus.processResult.handoverBoat}">
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
<th></th>
|
||||
<th>나포일시</th>
|
||||
<th>나포해점</th>
|
||||
<th>사건담당<br>경찰서</th>
|
||||
<th>사건담당기관</th>
|
||||
<th>단속경찰서</th>
|
||||
<th>단속함정</th>
|
||||
<th>선명</th>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="menuEditModalLabel">외사경찰 수정</h5>
|
||||
<h5 class="modal-title" th:text="${userInfo.userStatus eq 'USC003' ? '現 외사경찰 상세' : userInfo.userStatus eq 'USC006' ? '前 외사경찰 상세' : userInfo.userStatus eq 'USC007' ? '非 외사경찰 상세' : null}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="editTab" th:data-userseq="${userInfo.userSeq}" data-bs-toggle="tab" type="button" role="tab">현황 상세</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="historyTab" th:data-userseq="${userInfo.userSeq}" data-bs-toggle="tab" type="button" role="tab">수정이력</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="modal-body">
|
||||
<form id="userInfoUpdate" action="#" method="post">
|
||||
<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="userSeq" id="userSeq" class="userSeq" th:value="${userInfo.userSeq}">
|
||||
<input type="hidden" name="userStatus" th:value="${userInfo.userStatus}">
|
||||
<div class="mb-3 mt-3 row">
|
||||
|
|
@ -85,7 +96,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label>
|
||||
<label for="titleCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-select form-select-sm" id="titleCd" name="titleCd">
|
||||
<option value="">--선택--</option>
|
||||
|
|
@ -134,7 +145,7 @@
|
|||
</div>
|
||||
<div class="modal-footer row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<th:block th:if="${userInfo.userStatus eq 'USC003'}">
|
||||
<th:block th:if="${accessAuth eq 'ACC003'}">
|
||||
<button type="button" class="btn btn-info" id="syncToKwmsBtn" th:disabled="${#strings.isEmpty(userInfo.dicCode)}">인사시스템 정보 불러오기</button>
|
||||
<th:block th:if="${#strings.isEmpty(userInfo.dicCode)}">
|
||||
<label for="syncToKwmsBtn" style="font-size: 12px">공무원식별번호가 필요합니다.</label>
|
||||
|
|
@ -143,7 +154,7 @@
|
|||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-warning" id="updateBtn">수정</button>
|
||||
<button type="button" class="btn btn-warning" id="updateBtn" th:if="${accessAuth eq 'ACC003'}">수정</button>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" th:text="${userStatus eq 'USC003' ? '現 외사경찰 상세' : userStatus eq 'USC006' ? '前 외사경찰 상세' : userStatus eq 'USC007' ? '非 외사경찰 상세' : null}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="editTab" th:data-userseq="${policeList[0].userSeq}" data-bs-toggle="tab" type="button" role="tab">현황 상세</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="historyTab" th:data-userseq="${policeList[0].userSeq}" data-bs-toggle="tab" type="button" role="tab">수정이력</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row mx-0">
|
||||
<div class="col-100 card text-center">
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-striped" id="categoryTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>작성자</th>
|
||||
<th>등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="overflow-scroll">
|
||||
<tr class="historyInfoTr" th:each="list:${policeList}">
|
||||
<td>
|
||||
<input type="checkbox" class="hisChk">
|
||||
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
|
||||
<input type="hidden" class="verNo" th:value="${list.versionNo}">
|
||||
</td>
|
||||
<td th:text="|${list.wrtTitle} ${list.wrtNm}|"></td>
|
||||
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8" id="valueDiv">
|
||||
<div class="mb-3 mt-3 row">
|
||||
<label for="dicCode" class="col-sm-2 col-form-label col-form-label-sm text-center ">공무원식별번호</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vDicCode"readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="userId" class="col-sm-2 col-form-label col-form-label-sm text-center ">아이디</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vUserId"readonly>
|
||||
</div>
|
||||
<label for="userNm" class="col-sm-2 col-form-label col-form-label-sm text-center">이름</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vUserNm" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="phoneNo" class="col-sm-2 col-form-label col-form-label-sm text-center">휴대전화</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vPhone"readonly>
|
||||
</div>
|
||||
<label for="email" class="col-sm-2 col-form-label col-form-label-sm text-center">이메일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vEmail" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">성별</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vSex"readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="birthDate" class="col-sm-2 col-form-label col-form-label-sm text-center">생년월일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vBirth"readonly>
|
||||
</div>
|
||||
<label for="policeInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">해양경찰배명일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vPoliceInDate"readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">관서</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vOgCd" readonly>
|
||||
</div>
|
||||
<label for="organInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현관서전입일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vOrganInDate" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="ofcCd" class="col-sm-2 col-form-label col-form-label-sm text-center">부서</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vOfcCd"readonly>
|
||||
</div>
|
||||
<label for="ofcInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현부서임용일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vOfcInDate" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vTitleCd" readonly>
|
||||
</div>
|
||||
<label for="titleInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현계급임용일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vTitleInDate" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="outturnCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경과</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vOutturnCd" readonly>
|
||||
</div>
|
||||
<label for="seriesCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직별</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vSeriesCd" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어특채</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="vLanguageCd" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
<h4>現 외사경찰 현황</h4>
|
||||
<h4 th:text="${userStatus eq 'USC003' ? '現 외사경찰 현황' : userStatus eq 'USC006' ? '前 외사경찰 현황' : userStatus eq 'USC007' ? '非 외사경찰 현황' : null}"></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">
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
<div class="card-body">
|
||||
<form id="searchFm" method="get" th:action="@{/faisp/policeList}">
|
||||
<input type="hidden" name="excel">
|
||||
<input type="hidden" name="userStatus" th:value="${userStatus}">
|
||||
<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">
|
||||
|
|
@ -31,21 +32,26 @@
|
|||
<div class="row justify-content-end pe-3 py-1">
|
||||
<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="mgtOrgan">
|
||||
<option value="">관서</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" name="detailType">
|
||||
<option value="">성별</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
||||
<select class="form-select form-select-sm" name="ogCd">
|
||||
<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="${searchParams.ogCd eq commonCode.itemCd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="이름" name="useNo">
|
||||
<select class="form-select form-select-sm" name="sex">
|
||||
<option value="">성별</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.sex eq commonCode.itemCd}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="이름" name="userNm" th:value="${searchParams.userNm}">
|
||||
</div>
|
||||
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||
</div>
|
||||
|
|
@ -56,13 +62,13 @@
|
|||
<div class="col-12">
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="affairTab" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
|
||||
<button class="nav-link" id="presentTab" th:classappend="${userStatus eq 'USC003'?' active':''}" data-userstatus="USC003" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="stayTab" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
|
||||
<button class="nav-link" id="previousTab" th:classappend="${userStatus eq 'USC006'?' active':''}" data-userstatus="USC006" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="commitTab" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
|
||||
<button class="nav-link" id="notPoliceTab" th:classappend="${userStatus eq 'USC007'?' active':''}" data-userstatus="USC007" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="card">
|
||||
|
|
@ -85,7 +91,12 @@
|
|||
<th>외사경력</th>
|
||||
<th>입직<br>경로</th>
|
||||
<th>최종<br>수정일</th>
|
||||
<th>전출<input type="checkbox"></th>
|
||||
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
|
||||
<th>전출<input type="checkbox" id="chk-all"></th>
|
||||
</th:block>
|
||||
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
|
||||
<th>전입<input type="checkbox" id="chk-all"></th>
|
||||
</th:block>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
|
|
@ -93,10 +104,10 @@
|
|||
<th:block>
|
||||
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
|
||||
</th:block>
|
||||
<td th:text="${list.userSeq}"></td>
|
||||
<td th:text="${list.rownum}"></td>
|
||||
<td th:text="${list.titleCd}"></td>
|
||||
<td th:text="${list.userNm}"></td>
|
||||
<td th:text="${list.ogCd}"></td>
|
||||
<td th:text="${list.organNm}"></td>
|
||||
<td th:text="${list.ofcCd}"></td>
|
||||
<td th:text="${list.birthDate}"></td>
|
||||
<td th:text="${list.sex}"></td>
|
||||
|
|
@ -107,7 +118,12 @@
|
|||
<td></td>
|
||||
<td th:text="${list.jobInCd}"></td>
|
||||
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
|
||||
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
|
||||
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
|
||||
</th:block>
|
||||
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
|
||||
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
|
||||
</th:block>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -141,7 +157,8 @@
|
|||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-success"id="addPvre" th:if="${accessAuth eq 'ACC003'}">전출</button>
|
||||
<button type="button" class="btn btn-success" id="outBtn" th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">전출</button>
|
||||
<button type="button" class="btn btn-success" id="inBtn" th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">전입</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -156,12 +173,7 @@
|
|||
<div class="modal fade" id="policeEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content" id="policeEditModalContent">
|
||||
<div class="modal-header">
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="tab-content border border-top-0" id="configCellPhone">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<title>해양경찰청 외사종합포털</title>
|
||||
|
||||
<!--bootstrap-->
|
||||
|
|
@ -34,6 +35,9 @@
|
|||
<!--summernote-->
|
||||
<script type="text/javascript" th:src="@{/vendor/summernote-0.8.18-dist/summernote-lite.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/vendor/summernote-0.8.18-dist/lang/summernote-ko-KR.min.js}"></script>
|
||||
<!--namo cross editor-->
|
||||
<script type="text/javascript" th:src="@{http://118.219.150.34:50571/Crosseditor/js/namo_scripteditor.js}"></script>
|
||||
|
||||
<!--sheetJs(excel)-->
|
||||
<script type="text/javascript" th:src="@{/vendor/excel/FileSaver.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/vendor/excel/xlsx.full.min.js}"></script>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@
|
|||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type='text' id="content" name='content' th:utext="${info.content}"></textarea>
|
||||
<script type="text/javascript">
|
||||
var CrossEditor = new NamoSE('content');
|
||||
CrossEditor.EditorStart();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
|
|
|
|||
Loading…
Reference in New Issue