Merge branch 'master' of http://118.219.150.34:50501/DBNT/FAISP
commit
7cab96cb55
|
|
@ -7,8 +7,6 @@ import com.dbnt.faisp.equip.model.Equip;
|
||||||
import com.dbnt.faisp.equip.model.EquipLog;
|
import com.dbnt.faisp.equip.model.EquipLog;
|
||||||
import com.dbnt.faisp.equip.model.UseList;
|
import com.dbnt.faisp.equip.model.UseList;
|
||||||
import com.dbnt.faisp.equip.service.EquipService;
|
import com.dbnt.faisp.equip.service.EquipService;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
|
||||||
import com.dbnt.faisp.fipTarget.service.FipTargetService;
|
|
||||||
import com.dbnt.faisp.organMgt.service.OrganConfigService;
|
import com.dbnt.faisp.organMgt.service.OrganConfigService;
|
||||||
import com.dbnt.faisp.userInfo.model.UserInfo;
|
import com.dbnt.faisp.userInfo.model.UserInfo;
|
||||||
import com.dbnt.faisp.userInfo.service.UserInfoService;
|
import com.dbnt.faisp.userInfo.service.UserInfoService;
|
||||||
|
|
@ -42,7 +40,6 @@ public class EquipController {
|
||||||
private final EquipService equipService;
|
private final EquipService equipService;
|
||||||
private final AuthMgtService authMgtService;
|
private final AuthMgtService authMgtService;
|
||||||
private final OrganConfigService organConfigService;
|
private final OrganConfigService organConfigService;
|
||||||
private final FipTargetService fipTargetService;
|
|
||||||
private final UserInfoService userInfoService;
|
private final UserInfoService userInfoService;
|
||||||
|
|
||||||
@GetMapping("/equipStatus")
|
@GetMapping("/equipStatus")
|
||||||
|
|
@ -142,7 +139,6 @@ public class EquipController {
|
||||||
@PostMapping("/epuipDelete")
|
@PostMapping("/epuipDelete")
|
||||||
public void epuipDelete(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<Equip> equip){
|
public void epuipDelete(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<Equip> equip){
|
||||||
equipService.equipDelete(equip,loginUser);
|
equipService.equipDelete(equip,loginUser);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getEquipImg")
|
@GetMapping("/getEquipImg")
|
||||||
|
|
@ -296,7 +292,22 @@ public class EquipController {
|
||||||
ModelAndView mav = new ModelAndView("equip/pvreUseList");
|
ModelAndView mav = new ModelAndView("equip/pvreUseList");
|
||||||
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
useList.setUseType("PVRE");
|
useList.setUseType("PVRE");
|
||||||
|
//엑셀다운
|
||||||
|
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
||||||
|
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
||||||
|
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
||||||
|
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
||||||
|
String sheetName = "휴대용 녹화장비 사용 대장";
|
||||||
|
String excelFileName = "휴대용 녹화장비 사용 대장";
|
||||||
|
List<UseList> useExcelList= equipService.selectUseList(useList);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
@ -304,21 +315,27 @@ public class EquipController {
|
||||||
mav.addObject("useList", equipService.selectUseList(useList));
|
mav.addObject("useList", equipService.selectUseList(useList));
|
||||||
useList.setContentCnt(equipService.selectUseListCnt(useList));
|
useList.setContentCnt(equipService.selectUseListCnt(useList));
|
||||||
useList.setPaginationInfo();
|
useList.setPaginationInfo();
|
||||||
|
mav.addObject("organList", equipService.selectOrganList(useList));
|
||||||
mav.addObject("searchParams", useList);
|
mav.addObject("searchParams", useList);
|
||||||
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/pvreEditModal")
|
@GetMapping("/useEditModal")
|
||||||
public ModelAndView pvreEditModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
|
public ModelAndView useEditModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
|
||||||
ModelAndView mav = new ModelAndView("equip/pvreEditModal");
|
ModelAndView mav = new ModelAndView("equip/useEditModal");
|
||||||
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
mav.addObject("organList", equipService.selectOrganList(useList));
|
mav.addObject("organList", equipService.selectOrganList(useList));
|
||||||
mav.addObject("userOrgan", loginUser.getOgCd());
|
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||||
mav.addObject("useType", "PVRE");
|
mav.addObject("useType", useList.getUseType());
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
String accessAuth;
|
||||||
mav.addObject("accessAuth", accessAuth);
|
if(useList.getUseType().equals("PVRE")) {
|
||||||
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
}else if(useList.getUseType().equals("QIR")) {
|
||||||
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
}
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,6 +348,85 @@ public class EquipController {
|
||||||
useList.setWrtDt(LocalDateTime.now());
|
useList.setWrtDt(LocalDateTime.now());
|
||||||
equipService.saveUse(useList);
|
equipService.saveUse(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/useModifyModal")
|
||||||
|
public ModelAndView useModifyModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
|
||||||
|
ModelAndView mav = new ModelAndView("equip/useModifyModal");
|
||||||
|
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
mav.addObject("organList", equipService.selectOrganList(useList));
|
||||||
|
mav.addObject("info", equipService.selectUseInfo(useList));
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth;
|
||||||
|
if(useList.getUseType().equals("PVRE")) {
|
||||||
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
}else if(useList.getUseType().equals("QIR")) {
|
||||||
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
}
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateUse")
|
||||||
|
public UseList uadateUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
|
||||||
|
useList.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
useList.setWrtPart(loginUser.getOfcCd());
|
||||||
|
useList.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
useList.setWrtNm(loginUser.getUserId());
|
||||||
|
useList.setWrtDt(LocalDateTime.now());
|
||||||
|
return equipService.updateUse(useList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/useHistory")
|
||||||
|
public ModelAndView useHistory(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
|
||||||
|
ModelAndView mav = new ModelAndView("equip/useHistory");
|
||||||
|
mav.addObject("infoList", equipService.selectUseInfoList(useList));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/HistoryView")
|
||||||
|
@ResponseBody
|
||||||
|
public UseList HistoryView(UseList useList){
|
||||||
|
return equipService.selectUseInfo(useList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/useDelete")
|
||||||
|
public void useDelete(@RequestBody List<UseList> useList){
|
||||||
|
equipService.useDelete(useList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/qirUseList")
|
||||||
|
public ModelAndView qirUseList(@AuthenticationPrincipal UserInfo loginUser,UseList useList,HttpServletResponse response) {
|
||||||
|
ModelAndView mav = new ModelAndView("equip/qirUseList");
|
||||||
|
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
useList.setUseType("QIR");
|
||||||
|
//엑셀다운
|
||||||
|
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
||||||
|
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
||||||
|
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
||||||
|
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
||||||
|
String sheetName = "방역조사실 사용대장";
|
||||||
|
String excelFileName = "방역조사실 사용대장";
|
||||||
|
List<UseList> useExcelList= equipService.selectUseList(useList);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
useList.setQueryInfo();
|
||||||
|
mav.addObject("useList", equipService.selectUseList(useList));
|
||||||
|
useList.setContentCnt(equipService.selectUseListCnt(useList));
|
||||||
|
useList.setPaginationInfo();
|
||||||
|
mav.addObject("searchParams", useList);
|
||||||
|
mav.addObject("organList", equipService.selectOrganList(useList));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ public interface EquipMapper {
|
||||||
|
|
||||||
Integer selectUseListCnt(UseList useList);
|
Integer selectUseListCnt(UseList useList);
|
||||||
|
|
||||||
|
UseList selectUseInfo(UseList useList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import javax.persistence.*;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
@ -41,7 +40,8 @@ public class UseList extends BaseModel implements Serializable{
|
||||||
@Column(name = "use_type")
|
@Column(name = "use_type")
|
||||||
private String useType;
|
private String useType;
|
||||||
@Column(name = "use_dt")
|
@Column(name = "use_dt")
|
||||||
private String useDt;
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate useDt;
|
||||||
@Column(name = "detail_type")
|
@Column(name = "detail_type")
|
||||||
private String detailType;
|
private String detailType;
|
||||||
@Column(name = "detail_self")
|
@Column(name = "detail_self")
|
||||||
|
|
@ -67,12 +67,25 @@ public class UseList extends BaseModel implements Serializable{
|
||||||
@Transient
|
@Transient
|
||||||
private String excel;
|
private String excel;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String sosok;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private String year;
|
private String year;
|
||||||
@Transient
|
@Transient
|
||||||
private String detailTypeName;
|
private String detailTypeName;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "UseList [mgtOrgan=" + mgtOrgan + ", useNo=" + useNo + ", versionNo=" + versionNo + ", useType=" + useType
|
||||||
|
+ ", useDt=" + useDt + ", detailType=" + detailType + ", detailSelf=" + detailSelf + ", peopleCnt="
|
||||||
|
+ peopleCnt + ", description=" + description + ", wrtOrgan=" + wrtOrgan + ", wrtPart=" + wrtPart
|
||||||
|
+ ", wrtUserGrd=" + wrtUserGrd + ", wrtUserSeq=" + wrtUserSeq + ", wrtNm=" + wrtNm + ", wrtDt=" + wrtDt
|
||||||
|
+ ", excel=" + excel + ", sosok=" + sosok + ", year=" + year + ", detailTypeName=" + detailTypeName + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Embeddable
|
@Embeddable
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,18 @@ package com.dbnt.faisp.equip.repository;
|
||||||
|
|
||||||
import com.dbnt.faisp.equip.model.UseList;
|
import com.dbnt.faisp.equip.model.UseList;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface UseListRepository extends JpaRepository<UseList, UseList.UseListId> {
|
public interface UseListRepository extends JpaRepository<UseList, UseList.UseListId> {
|
||||||
|
|
||||||
|
List<UseList> findByMgtOrganAndUseNoAndUseTypeOrderByVersionNoDesc(String mgtOrgan, String useNo, String useType);
|
||||||
|
|
||||||
|
void deleteByMgtOrganAndUseNoAndUseType(String mgtOrgan, String useNo, String useType);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.dbnt.faisp.equip.model.EquipFile;
|
||||||
import com.dbnt.faisp.equip.model.EquipFile.EquipFileId;
|
import com.dbnt.faisp.equip.model.EquipFile.EquipFileId;
|
||||||
import com.dbnt.faisp.equip.model.EquipLog;
|
import com.dbnt.faisp.equip.model.EquipLog;
|
||||||
import com.dbnt.faisp.equip.model.UseList;
|
import com.dbnt.faisp.equip.model.UseList;
|
||||||
|
import com.dbnt.faisp.equip.model.UseList.UseListId;
|
||||||
import com.dbnt.faisp.equip.repository.CellPhoneRepository;
|
import com.dbnt.faisp.equip.repository.CellPhoneRepository;
|
||||||
import com.dbnt.faisp.equip.repository.EquipFileRepository;
|
import com.dbnt.faisp.equip.repository.EquipFileRepository;
|
||||||
import com.dbnt.faisp.equip.repository.EquipLogRepository;
|
import com.dbnt.faisp.equip.repository.EquipLogRepository;
|
||||||
|
|
@ -351,6 +352,44 @@ public class EquipService {
|
||||||
public Integer selectUseListCnt(UseList useList) {
|
public Integer selectUseListCnt(UseList useList) {
|
||||||
return equipMapper.selectUseListCnt(useList);
|
return equipMapper.selectUseListCnt(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UseList selectUseInfo(UseList useList) {
|
||||||
|
return equipMapper.selectUseInfo(useList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public UseList updateUse(UseList useList) {
|
||||||
|
UseList dbUseList = useListRepository
|
||||||
|
.findById(new UseListId(useList.getMgtOrgan(),useList.getUseNo(),useList.getVersionNo(),useList.getUseType())).orElse(null);
|
||||||
|
UseList useTmp = new UseList();
|
||||||
|
useTmp.setMgtOrgan(dbUseList.getMgtOrgan());
|
||||||
|
useTmp.setUseNo(dbUseList.getUseNo());
|
||||||
|
useTmp.setVersionNo(dbUseList.getVersionNo()+1);
|
||||||
|
useTmp.setUseType(dbUseList.getUseType());
|
||||||
|
useTmp.setUseDt(useList.getUseDt());
|
||||||
|
useTmp.setDetailType(useList.getDetailType());
|
||||||
|
useTmp.setDetailSelf(useList.getDetailSelf());
|
||||||
|
useTmp.setPeopleCnt(useList.getPeopleCnt());
|
||||||
|
useTmp.setDescription(useList.getDescription());
|
||||||
|
useTmp.setWrtOrgan(useList.getWrtOrgan());
|
||||||
|
useTmp.setWrtPart(useList.getWrtPart());
|
||||||
|
useTmp.setWrtUserSeq(useList.getWrtUserSeq());
|
||||||
|
useTmp.setWrtNm(useList.getWrtNm());
|
||||||
|
useTmp.setWrtDt(useList.getWrtDt());
|
||||||
|
return useListRepository.save(useTmp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<UseList> selectUseInfoList(UseList useList) {
|
||||||
|
return useListRepository.findByMgtOrganAndUseNoAndUseTypeOrderByVersionNoDesc(useList.getMgtOrgan(),useList.getUseNo(),useList.getUseType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void useDelete(List<UseList> useList) {
|
||||||
|
for(UseList use:useList) {
|
||||||
|
useListRepository.deleteByMgtOrganAndUseNoAndUseType(use.getMgtOrgan(),use.getUseNo(),use.getUseType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import org.apache.poi.xssf.usermodel.XSSFDataFormat;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
import com.dbnt.faisp.equip.model.CellPhone;
|
import com.dbnt.faisp.equip.model.CellPhone;
|
||||||
|
import com.dbnt.faisp.equip.model.UseList;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
import com.dbnt.faisp.fipTarget.model.PartInfo;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartWork;
|
import com.dbnt.faisp.fipTarget.model.PartWork;
|
||||||
|
|
||||||
|
|
@ -749,6 +750,116 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void useListToExcel(List<UseList> useExcelList, HttpServletResponse response, String[] headers,
|
||||||
|
String[] headerNames, String[] columnType, String sheetName, String excelFileName) throws IOException {
|
||||||
|
if(Utils.isNotEmpty(useExcelList)) {
|
||||||
|
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
|
||||||
|
XSSFWorkbook wb = new XSSFWorkbook();
|
||||||
|
Sheet sheet = wb.createSheet(sheetName);
|
||||||
|
Row headerRow = sheet.createRow(0);
|
||||||
|
CellStyle cellStyle1 = wb.createCellStyle(); //쉼표들어간 숫자 양식
|
||||||
|
CellStyle cellStyle2 = wb.createCellStyle(); //숫자양식
|
||||||
|
CellStyle headerStyle = wb.createCellStyle(); //숫자양식
|
||||||
|
CellStyle headerStyle2 = wb.createCellStyle();
|
||||||
|
CellStyle headerStyle3 = wb.createCellStyle();
|
||||||
|
|
||||||
|
XSSFDataFormat format = wb.createDataFormat();
|
||||||
|
cellStyle1.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
cellStyle2.setDataFormat(format.getFormat("#,##0"));
|
||||||
|
cellStyle2.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle2.setBorderTop(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderBottom(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderLeft(BorderStyle.THIN);
|
||||||
|
headerStyle2.setBorderRight(BorderStyle.THIN);
|
||||||
|
headerStyle2.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
headerStyle2.setFillForegroundColor((short)3);
|
||||||
|
headerStyle2.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||||
|
headerStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
|
headerStyle.setFillForegroundColor((short)3);
|
||||||
|
headerStyle.setFillForegroundColor(IndexedColors.LIME.getIndex());
|
||||||
|
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());
|
||||||
|
//로우그리기
|
||||||
|
for(int i=0; i<useExcelList.size(); i++) {
|
||||||
|
ParamMap rowData = new ParamMap();
|
||||||
|
Row row = sheet.createRow(i+1);
|
||||||
|
rowData.set("use_no", useExcelList.get(i).getUseNo());
|
||||||
|
rowData.set("sosok", useExcelList.get(i).getSosok());
|
||||||
|
if(useExcelList.get(i).getUseDt() != null) {
|
||||||
|
rowData.set("use_dt", useExcelList.get(i).getUseDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
}else {
|
||||||
|
rowData.set("use_dt", "");
|
||||||
|
}
|
||||||
|
if(useExcelList.get(i).getDetailType().equals("PVREUSE007") || useExcelList.get(i).getDetailType().equals("QIRUSE006")) {
|
||||||
|
rowData.set("detail_type_name", useExcelList.get(i).getDetailSelf());
|
||||||
|
}else {
|
||||||
|
rowData.set("detail_type_name", useExcelList.get(i).getDetailTypeName());
|
||||||
|
}
|
||||||
|
rowData.set("people_cnt", useExcelList.get(i).getPeopleCnt());
|
||||||
|
rowData.set("description", useExcelList.get(i).getDescription());
|
||||||
|
rowData.set("wrt_dt", useExcelList.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("KSC5601"), "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 {
|
||||||
|
response.setHeader("Content-Type", "text/html; charset=UTF-8");
|
||||||
|
PrintWriter out = response.getWriter();
|
||||||
|
|
||||||
|
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
|
||||||
|
out.write("<html lang=\"ko\">");
|
||||||
|
out.write("<head>");
|
||||||
|
out.write("<script type=\"text/javascript\">");
|
||||||
|
out.write("alert('데이터가 없습니다.');");
|
||||||
|
out.write("history.back(-1);");
|
||||||
|
out.write("</script>");
|
||||||
|
out.write("</head>");
|
||||||
|
out.write("</html>");
|
||||||
|
|
||||||
|
out.flush();
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,9 @@
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
order by cm.wrt_dt desc
|
order by cm.wrt_dt desc
|
||||||
|
<if test='excel != "Y"'>
|
||||||
limit #{rowCnt} offset #{firstIndex}
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCellPhoneListCnt" resultType="int" parameterType="CellPhone">
|
<select id="selectCellPhoneListCnt" resultType="int" parameterType="CellPhone">
|
||||||
|
|
@ -472,8 +474,38 @@
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="searchUseList">
|
||||||
|
<if test='mgtOrgan != null and mgtOrgan != ""'>
|
||||||
|
and ul.mgt_organ = #{mgtOrgan}
|
||||||
|
</if>
|
||||||
|
<if test='useNo != null and useNo != ""'>
|
||||||
|
and ul.use_no like '%'||#{useNo}||'%'
|
||||||
|
</if>
|
||||||
|
<if test='detailType != null and detailType != ""'>
|
||||||
|
and ul.detail_type = #{detailType}
|
||||||
|
</if>
|
||||||
|
<if test='dateSelector == "useDt"'>
|
||||||
|
<if test='startDate != null and startDate != ""'>
|
||||||
|
and ul.use_dt >= #{startDate}::date
|
||||||
|
</if>
|
||||||
|
<if test='endDate != null and endDate != ""'>
|
||||||
|
and ul.use_dt <= #{endDate}::date+1
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test='dateSelector == "wrtDt"'>
|
||||||
|
<if test='startDate != null and startDate != ""'>
|
||||||
|
and ul.wrt_dt >= #{startDate}::date
|
||||||
|
</if>
|
||||||
|
<if test='endDate != null and endDate != ""'>
|
||||||
|
and ul.wrt_dt <= #{endDate}::date+1
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="selectUseList" resultType="UseList" parameterType="UseList">
|
<select id="selectUseList" resultType="UseList" parameterType="UseList">
|
||||||
select (select item_value from code_mgt where item_cd = mgt_organ) as mgt_organ,
|
select (select item_value from code_mgt where item_cd = ul.mgt_organ) as sosok,
|
||||||
|
ul.mgt_organ,
|
||||||
|
ul.use_type,
|
||||||
ul.use_no,
|
ul.use_no,
|
||||||
ul.version_no,
|
ul.version_no,
|
||||||
use_dt,
|
use_dt,
|
||||||
|
|
@ -484,54 +516,97 @@
|
||||||
description,
|
description,
|
||||||
wrt_dt
|
wrt_dt
|
||||||
from use_list ul,
|
from use_list ul,
|
||||||
(select use_no,max(version_no) as lastVer from use_list
|
(select use_no,max(version_no) as lastVer,mgt_organ,use_type from use_list
|
||||||
where use_type = #{useType}
|
where use_type = #{useType}
|
||||||
and mgt_organ in
|
and mgt_organ in
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
group by use_no) b
|
group by use_no,use_type,mgt_organ) b
|
||||||
where ul.use_no = b.use_no
|
where ul.use_no = b.use_no
|
||||||
and ul.version_no = b.lastVer
|
and ul.version_no = b.lastVer
|
||||||
and use_type = #{useType}
|
and ul.mgt_organ = b.mgt_organ
|
||||||
and mgt_organ in
|
and ul.use_type = b.use_type
|
||||||
|
and ul.use_type = #{useType}
|
||||||
|
and ul.mgt_organ in
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
<include refid="searchUseList"></include>
|
||||||
order by ul.use_no desc
|
order by ul.use_no desc
|
||||||
|
<if test='excel != "Y"'>
|
||||||
limit #{rowCnt} offset #{firstIndex}
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUseListCnt" resultType="Integer" parameterType="UseList">
|
<select id="selectUseListCnt" resultType="Integer" parameterType="UseList">
|
||||||
select count(*)
|
select count(*)
|
||||||
from(
|
from(
|
||||||
select mgt_organ,
|
select (select item_value from code_mgt where item_cd = ul.mgt_organ) as sosok,
|
||||||
|
ul.mgt_organ,
|
||||||
|
ul.use_type,
|
||||||
ul.use_no,
|
ul.use_no,
|
||||||
ul.version_no,
|
ul.version_no,
|
||||||
use_dt,
|
use_dt,
|
||||||
(select item_value from code_mgt where item_cd = detail_type) as detail_type,
|
(select item_value from code_mgt where item_cd = detail_type) as detail_type_name,
|
||||||
|
detail_type,
|
||||||
detail_self,
|
detail_self,
|
||||||
people_cnt,
|
people_cnt,
|
||||||
description,
|
description,
|
||||||
wrt_dt
|
wrt_dt
|
||||||
from use_list ul,
|
from use_list ul,
|
||||||
(select use_no,max(version_no) as lastVer from use_list
|
(select use_no,max(version_no) as lastVer,mgt_organ,use_type from use_list
|
||||||
where use_type = #{useType}
|
where use_type = #{useType}
|
||||||
and mgt_organ in
|
and mgt_organ in
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
group by use_no) b
|
group by use_no,use_type,mgt_organ) b
|
||||||
where ul.use_no = b.use_no
|
where ul.use_no = b.use_no
|
||||||
and ul.version_no = b.lastVer
|
and ul.version_no = b.lastVer
|
||||||
and use_type = #{useType}
|
and ul.mgt_organ = b.mgt_organ
|
||||||
and mgt_organ in
|
and ul.use_type = b.use_type
|
||||||
|
and ul.use_type = #{useType}
|
||||||
|
and ul.mgt_organ in
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
<include refid="searchUseList"></include>
|
||||||
order by ul.use_no desc
|
order by ul.use_no desc
|
||||||
) a
|
) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUseInfo" resultType="UseList" parameterType="UseList">
|
||||||
|
select (select item_value from code_mgt where item_cd = mgt_organ) as sosok,
|
||||||
|
use_type,
|
||||||
|
mgt_organ,
|
||||||
|
ul.use_no,
|
||||||
|
ul.version_no,
|
||||||
|
use_dt,
|
||||||
|
(select item_value from code_mgt where item_cd = detail_type) as detail_type_name,
|
||||||
|
detail_type,
|
||||||
|
detail_self,
|
||||||
|
people_cnt,
|
||||||
|
description,
|
||||||
|
wrt_dt
|
||||||
|
from use_list ul,
|
||||||
|
(select use_no,max(version_no) as lastVer from use_list
|
||||||
|
where use_no = #{useNo}
|
||||||
|
<if test='versionNo != null and versionNo != ""'>
|
||||||
|
and version_no = #{versionNo}
|
||||||
|
</if>
|
||||||
|
and use_type = #{useType}
|
||||||
|
and mgt_organ = #{mgtOrgan}
|
||||||
|
group by use_no) b
|
||||||
|
where ul.use_no = b.use_no
|
||||||
|
and ul.version_no = b.lastVer
|
||||||
|
and ul.use_no = #{useNo}
|
||||||
|
<if test='versionNo != null and versionNo != ""'>
|
||||||
|
and version_no = #{versionNo}
|
||||||
|
</if>
|
||||||
|
and use_type = #{useType}
|
||||||
|
and mgt_organ = #{mgtOrgan}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -64,15 +64,6 @@ $(document).on('click', '.cellPhoneTr', function (event){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.affairTr', function (event){
|
|
||||||
const target = event.target;
|
|
||||||
if(!(target.className === "apprvTd" || $(target).parents(".apprvTd").length>0)){
|
|
||||||
$(".trChkBox").prop("checked", false);
|
|
||||||
$(this).find(".trChkBox").prop("checked", true);
|
|
||||||
getAffairViewModal(Number($(this).find(".affairKey").val()));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function showModal(phoneKey){
|
function showModal(phoneKey){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/cellPhoneEditModal',
|
url: '/equip/cellPhoneEditModal',
|
||||||
|
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
|
|
||||||
$(document).on('click', '#addPvre', function (){
|
|
||||||
$.ajax({
|
|
||||||
url: '/equip/pvreEditModal',
|
|
||||||
type: 'GET',
|
|
||||||
dataType:"html",
|
|
||||||
success: function(html){
|
|
||||||
$("#pvreEditModalContent").empty().append(html);
|
|
||||||
$("#pvreEditModal").modal('show');
|
|
||||||
$("#useDt").datepicker({
|
|
||||||
format: "mm-dd",
|
|
||||||
language: "ko"
|
|
||||||
});
|
|
||||||
$('#detailSelf').hide();
|
|
||||||
},
|
|
||||||
error:function(){
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('click', '#saveUse', function (){
|
|
||||||
|
|
||||||
if(confirm("저장하시겠습니까?")){
|
|
||||||
document.getElementById("mgtOrgan").disabled = false;
|
|
||||||
contentFade("in");
|
|
||||||
const formData = new FormData($("#useFm")[0]);
|
|
||||||
$.ajax({
|
|
||||||
type : 'POST',
|
|
||||||
data : formData,
|
|
||||||
url : "/equip/saveUse",
|
|
||||||
processData: false,
|
|
||||||
contentType: false,
|
|
||||||
success : function(result) {
|
|
||||||
alert("저장되었습니다.");
|
|
||||||
contentFade("out");
|
|
||||||
location.reload();
|
|
||||||
},
|
|
||||||
error : function(xhr, status) {
|
|
||||||
alert("저장에 실패하였습니다.")
|
|
||||||
contentFade("out");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('change', '#detailType', function (){
|
|
||||||
if($(this).val() == 'USE007'){
|
|
||||||
$('#detailSelf').show();
|
|
||||||
}else{
|
|
||||||
$('#detailSelf').hide();
|
|
||||||
$('#detailSelf').val('');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
@ -0,0 +1,271 @@
|
||||||
|
$(function(){
|
||||||
|
$("#dateSelectorDiv").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#addPvre', function (){
|
||||||
|
const useType = "PVRE";
|
||||||
|
showEditModal(useType);
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#addQir', function (){
|
||||||
|
const useType = "QIR";
|
||||||
|
showEditModal(useType);
|
||||||
|
})
|
||||||
|
|
||||||
|
function showEditModal(useType){
|
||||||
|
$.ajax({
|
||||||
|
url: '/equip/useEditModal',
|
||||||
|
data: {useType: useType},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#useEditModalContent").empty().append(html);
|
||||||
|
$("#useEditModal").modal('show');
|
||||||
|
$("#useDt").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko"
|
||||||
|
});
|
||||||
|
$('#detailSelf').hide();
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#saveUse', function (){
|
||||||
|
if($('#mgtOrgan').val() == ""){
|
||||||
|
alert("사용관서를 선택해주세요.");
|
||||||
|
$('#mgtOrgan').focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(confirm("저장하시겠습니까?")){
|
||||||
|
document.getElementById("mgtOrgan").disabled = false;
|
||||||
|
contentFade("in");
|
||||||
|
const formData = new FormData($("#useFm")[0]);
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
url : "/equip/saveUse",
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success : function(result) {
|
||||||
|
alert("저장되었습니다.");
|
||||||
|
contentFade("out");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("저장에 실패하였습니다.")
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('change', '#detailType', function (){
|
||||||
|
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
||||||
|
$('#detailSelf').show();
|
||||||
|
}else{
|
||||||
|
$('#detailSelf').hide();
|
||||||
|
$('#detailSelf').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.useTr', function (event){
|
||||||
|
const target = event.target;
|
||||||
|
if(!(target.className === "useChk" ||$(target).parents("td").length>0)){
|
||||||
|
const useNo = $(target).parent('tr').data("useno");
|
||||||
|
const useType = $(target).parent('tr').data("usetype");
|
||||||
|
const mgtOrgan = $(target).parent('tr').data("mgtorgan");
|
||||||
|
showMdifyModal(useNo,useType,mgtOrgan);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function showMdifyModal(useNo,useType,mgtOrgan){
|
||||||
|
$.ajax({
|
||||||
|
url: '/equip/useModifyModal',
|
||||||
|
data: {useNo: useNo,
|
||||||
|
useType: useType,
|
||||||
|
mgtOrgan: mgtOrgan},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#useEditModalContent").empty().append(html);
|
||||||
|
$("#useEditModal").modal('show');
|
||||||
|
$("#mUseDt").datepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
language: "ko"
|
||||||
|
});
|
||||||
|
if($('#mDetailType').val() != 'PVREUSE007' && $('#mDetailType').val() != 'QIRUSE006'){
|
||||||
|
$('#mDetailSelf').hide();
|
||||||
|
}else{
|
||||||
|
$('#mDetailSelf').show();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('change', '#mDetailType', function (){
|
||||||
|
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
||||||
|
$('#mDetailSelf').show();
|
||||||
|
}else{
|
||||||
|
$('#mDetailSelf').hide();
|
||||||
|
$('#mDetailSelf').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#updateUse', function (){
|
||||||
|
|
||||||
|
if(confirm("수정하시겠습니까?")){
|
||||||
|
document.getElementById("mMgtOrgan").disabled = false;
|
||||||
|
contentFade("in");
|
||||||
|
const formData = new FormData($("#useUpdateFm")[0]);
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
url : "/equip/updateUse",
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success : function(data) {
|
||||||
|
alert("수정되었습니다.");
|
||||||
|
contentFade("out");
|
||||||
|
showMdifyModal(data.useNo,data.useType,data.mgtOrgan);
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("수정에 실패하였습니다.")
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#historyBtn', function (){
|
||||||
|
if($('input:checkbox[name=useChk]:checked').length < 1){
|
||||||
|
alert("게시물을 선택해주세요")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($('input:checkbox[name=useChk]:checked').length > 1){
|
||||||
|
alert("한개만 선택해주세요")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const target = $('input:checkbox[name=useChk]:checked');
|
||||||
|
const useNo = $(target).parent().parent('tr').data("useno");
|
||||||
|
const useType = $(target).parent().parent('tr').data("usetype");
|
||||||
|
const mgtOrgan = $(target).parent().parent('tr').data("mgtorgan");
|
||||||
|
$.ajax({
|
||||||
|
url: '/equip/useHistory',
|
||||||
|
data: {useNo: useNo,
|
||||||
|
useType: useType,
|
||||||
|
mgtOrgan: mgtOrgan},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#useEditModalContent").empty().append(html);
|
||||||
|
$("#useEditModal").modal('show');
|
||||||
|
$('#vDetailSelf').hide();
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '.historyTr', function (event){
|
||||||
|
const target = event.target;
|
||||||
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
|
if($(this).find('.hisChk').prop('checked')){
|
||||||
|
$('.hisChk').prop('checked',false);
|
||||||
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: '/equip/HistoryView',
|
||||||
|
data: {
|
||||||
|
useNo: $(target).parents('tr').data("useno"),
|
||||||
|
versionNo : Number($(target).parents('tr').data("verno")),
|
||||||
|
useType : $(target).parents('tr').data("usetype"),
|
||||||
|
mgtOrgan : $(target).parents('tr').data("mgtorgan")
|
||||||
|
},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"json",
|
||||||
|
success: function(data){
|
||||||
|
$('#vSosok').val(data.sosok);
|
||||||
|
$('#vUseDt').val(data.useDt);
|
||||||
|
$('#vDetailType').val(data.detailTypeName);
|
||||||
|
if(data.detailType != 'PVREUSE007' && data.detailType != 'QIRUSE006'){
|
||||||
|
$('#vDetailSelf').hide();
|
||||||
|
$('#vDetailSelf').val('');
|
||||||
|
}else{
|
||||||
|
$('#vDetailSelf').show();
|
||||||
|
$('#vDetailSelf').val(data.detailSelf);
|
||||||
|
}
|
||||||
|
$('#vCnt').val(data.peopleCnt);
|
||||||
|
$('#vDescription').val(data.description);
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#deleteUse', function (){
|
||||||
|
if($('input:checkbox[name=useChk]:checked').length < 1){
|
||||||
|
alert("삭제할 게시물을 선택해주세요")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
||||||
|
const checkArr = [];
|
||||||
|
$('input:checkbox[name=useChk]:checked').each(function (idx, el){
|
||||||
|
checkArr.push({});
|
||||||
|
const target = $(el);
|
||||||
|
checkArr[idx].useNo = target.parents('tr').data("useno");
|
||||||
|
checkArr[idx].mgtOrgan = target.parents('tr').data("mgtorgan");
|
||||||
|
checkArr[idx].useType = target.parents('tr').data("usetype");
|
||||||
|
})
|
||||||
|
deleteUse(checkArr);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function deleteUse(checkArr){
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
url : "/equip/useDelete",
|
||||||
|
data : JSON.stringify(checkArr),
|
||||||
|
contentType: 'application/json',
|
||||||
|
beforeSend: function (xhr){
|
||||||
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
|
},
|
||||||
|
success : function() {
|
||||||
|
alert("삭제처리 되었습니다.");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("삭제처리에 실패하였습니다");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#goExcel', function (){
|
||||||
|
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
||||||
|
$('input[name=excel]').val('Y');
|
||||||
|
$('#searchFm').submit();
|
||||||
|
$('input[name=excel]').val('');
|
||||||
|
}else{
|
||||||
|
false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).ready( function() {
|
||||||
|
$('#chk-all').click( function() {
|
||||||
|
$('.useCheckBox').prop('checked',this.checked);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#closeModal', function (){
|
||||||
|
location.reload();
|
||||||
|
})
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="menuEditModalLabel">등록</h5>
|
<h5 class="modal-title" id="menuEditModalLabel">등록</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
|
@ -44,7 +43,7 @@
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">취득연도</label>
|
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">취득연도</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control storedYear" name="storedYear">
|
<input type="text" class="form-control storedYear" name="storedYear" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
<main class="pt-3">
|
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -99,5 +98,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="menuEditModalLabel">수정</h5>
|
<h5 class="modal-title" id="menuEditModalLabel">수정</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
|
@ -47,7 +46,7 @@
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">취득연도</label>
|
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">취득연도</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control mStoredYear" name="storedYear" th:value="${equInfo.storedYear}">
|
<input type="text" class="form-control mStoredYear" name="storedYear" th:value="${equInfo.storedYear}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
layout:decorate="~{layout/layout}">
|
layout:decorate="~{layout/layout}">
|
||||||
<th:block layout:fragment="script">
|
<th:block layout:fragment="script">
|
||||||
<script type="text/javascript" th:src="@{/js/equip/pvre.js}"></script>
|
<script type="text/javascript" th:src="@{/js/equip/use.js}"></script>
|
||||||
</th:block>
|
</th:block>
|
||||||
<div layout:fragment="content">
|
<div layout:fragment="content">
|
||||||
<main class="pt-3">
|
<main class="pt-3">
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="row mx-0">
|
<div class="row mx-0">
|
||||||
<div class="col-12 card text-center">
|
<div class="col-12 card text-center">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form id="searchFm" method="get" th:action="@{/equip/cellPhoneList}">
|
<form id="searchFm" method="get" th:action="@{/equip/pvreUseList}">
|
||||||
<input type="hidden" name="excel">
|
<input type="hidden" name="excel">
|
||||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
<div class="row justify-content-between pe-3 py-1">
|
<div class="row justify-content-between pe-3 py-1">
|
||||||
|
|
@ -25,13 +25,40 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="row justify-content-end">
|
<div class="row justify-content-end">
|
||||||
<div class="col-auto">
|
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
|
||||||
<input type="text" class="form-control form-control-sm">
|
<select class="form-select form-select-sm" name="mgtOrgan">
|
||||||
|
<option value="">경찰서</option>
|
||||||
|
<th:block th:each="organList:${organList}">
|
||||||
|
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq searchParams.mgtOrgan}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="연번" name="useNo" th:value="${searchParams.useNo}">
|
||||||
|
</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}" th:selected="${commonCode.itemCd eq searchParams.detailType}"></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="useDt" th:selected="${searchParams.dateSelector eq 'useDt'}">사용일</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>
|
||||||
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<button id="goExcel">엑셀다운</button>
|
<button id="goExcel">엑셀다운</button>
|
||||||
|
|
@ -43,7 +70,7 @@
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> <input type="checkbox" id="chk-all" class="equInfoCheckBox"></th>
|
<th> <input type="checkbox" id="chk-all" class="useCheckBox"></th>
|
||||||
<th>연번</th>
|
<th>연번</th>
|
||||||
<th>경찰서</th>
|
<th>경찰서</th>
|
||||||
<th>사용일시</th>
|
<th>사용일시</th>
|
||||||
|
|
@ -54,13 +81,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="cellPhoneTr" th:each="list:${useList}">
|
<tr class="useTr" th:each="list:${useList}" th:data-useNo="${list.useNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
|
||||||
<td><input type="checkbox" name="cpChk" class="cellPhoneCheckBox"></td>
|
<td class="useChk"><input type="checkbox" name="useChk" class="useCheckBox"></td>
|
||||||
<td th:text="${list.useNo}"></td>
|
<td th:text="${list.useNo}"></td>
|
||||||
<td th:text="${list.mgtOrgan}"></td>
|
<td th:text="${list.sosok}"></td>
|
||||||
<td th:text="${list.useDt}"></td>
|
<td th:text="${list.useDt}"></td>
|
||||||
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'USE007'}"></td>
|
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'PVREUSE007'}"></td>
|
||||||
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'USE007'}"></td>
|
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'PVREUSE007'}"></td>
|
||||||
<td th:text="${list.peopleCnt}"></td>
|
<td th:text="${list.peopleCnt}"></td>
|
||||||
<td th:text="${list.description}"></td>
|
<td th:text="${list.description}"></td>
|
||||||
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
|
@ -97,8 +124,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button type="button" class="btn btn-danger"id="deleteCellPhone" th:if="${accessAuth eq 'ACC003'}">삭제</button>
|
<button type="button" class="btn btn-danger"id="deleteUse" th:if="${accessAuth eq 'ACC003'}">삭제</button>
|
||||||
<button type="button" class="btn btn-success"id="addPvre" th:unless="${accessAuth eq 'ACC001'}">등록</button>
|
<button type="button" class="btn btn-success"id="addPvre" th:unless="${accessAuth eq 'ACC001'}">등록</button>
|
||||||
|
<button type="button" class="btn btn-success"id="historyBtn">수정이력</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -109,9 +137,9 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div class="modal fade" id="pvreEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
<div class="modal fade" id="useEditModal" 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-dialog modal-lg modal-dialog-scrollable">
|
||||||
<div class="modal-content" id="pvreEditModalContent">
|
<div class="modal-content" id="useEditModalContent">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
|
layout:decorate="~{layout/layout}">
|
||||||
|
<th:block layout:fragment="script">
|
||||||
|
<script type="text/javascript" th:src="@{/js/equip/use.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 id="searchFm" method="get" th:action="@{/equip/qirUseList}">
|
||||||
|
<input type="hidden" name="excel">
|
||||||
|
<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==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="mgtOrgan">
|
||||||
|
<option value="">경찰서</option>
|
||||||
|
<th:block th:each="organList:${organList}">
|
||||||
|
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq searchParams.mgtOrgan}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" class="form-control form-control-sm" placeholder="연번" name="useNo" th:value="${searchParams.useNo}">
|
||||||
|
</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('QIRUSE')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.detailType}"></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="useDt" th:selected="${searchParams.dateSelector eq 'useDt'}">사용일</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>
|
||||||
|
<button id="goExcel">엑셀다운</button>
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th> <input type="checkbox" id="chk-all" class="useCheckBox"></th>
|
||||||
|
<th>연번</th>
|
||||||
|
<th>경찰서</th>
|
||||||
|
<th>사용일시</th>
|
||||||
|
<th>사용사유</th>
|
||||||
|
<th>사용인원</th>
|
||||||
|
<th>비고</th>
|
||||||
|
<th>최종수정일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="useTr" th:each="list:${useList}" th:data-useNo="${list.useNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
|
||||||
|
<td class="useChk"><input type="checkbox" name="useChk" class="useCheckBox"></td>
|
||||||
|
<td th:text="${list.useNo}"></td>
|
||||||
|
<td th:text="${list.sosok}"></td>
|
||||||
|
<td th:text="${list.useDt}"></td>
|
||||||
|
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'QIRUSE006'}"></td>
|
||||||
|
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'QIRUSE006'}"></td>
|
||||||
|
<td th:text="${list.peopleCnt}"></td>
|
||||||
|
<td th:text="${list.description}"></td>
|
||||||
|
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<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==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>
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-danger"id="deleteUse" th:if="${accessAuth eq 'ACC003'}">삭제</button>
|
||||||
|
<button type="button" class="btn btn-success"id="addQir" th:unless="${accessAuth eq 'ACC001'}">등록</button>
|
||||||
|
<button type="button" class="btn btn-success"id="historyBtn">수정이력</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="modal fade" id="useEditModal" 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="useEditModalContent">
|
||||||
|
<div class="modal-header">
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="tab-content border border-top-0" id="configCellPhone">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<th:block th:if="${useType eq 'PVRE'}">
|
<th:block th:if="${useType eq 'PVRE'}">
|
||||||
<h5 class="modal-title" id="menuEditModalLabel" th:if="${useType eq 'PVRE'}">휴대용 녹화장비 사용대장 등록</h5>
|
<h5 class="modal-title" id="menuEditModalLabel">휴대용 녹화장비 사용대장 등록</h5>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:if="${useType eq 'QIR'}">
|
<th:block th:if="${useType eq 'QIR'}">
|
||||||
<h5 class="modal-title" id="menuEditModalLabel" th:if="${useType eq 'PVRE'}">방역조사실 사용대장 등록</h5>
|
<h5 class="modal-title" id="menuEditModalLabel">방역조사실 사용대장 등록</h5>
|
||||||
</th:block>
|
</th:block>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용일시</label>
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용일시</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="text" class="form-control" id="useDt" name="useDt">
|
<input type="text" class="form-control" id="useDt" name="useDt" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
|
|
@ -38,9 +38,16 @@
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<select class="form-select form-select-sm" id="detailType" name="detailType">
|
<select class="form-select form-select-sm" id="detailType" name="detailType">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('USE')}">
|
<th:block th:if="${useType eq 'PVRE'}">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${useType eq 'QIR'}">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control" id="detailSelf" name="detailSelf">
|
<input type="text" class="form-control" id="detailSelf" name="detailSelf">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
<!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">수정이력</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="row mx-0">
|
||||||
|
<div class="col-100 card text-center">
|
||||||
|
<div class="card-body">
|
||||||
|
<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="historyTr" th:each="list:${infoList}" th:data-useNo="${list.useNo}" th:data-verNo="${list.versionNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" class="hisChk">
|
||||||
|
</td>
|
||||||
|
<td th:text="${list.wrtNm}"></td>
|
||||||
|
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8" id="valueDiv">
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용관서</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" id="vSosok" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용일시</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" id="vUseDt" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용사유</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" id="vDetailType" disabled>
|
||||||
|
<input type="text" id="vDetailSelf" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용인원</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" id="vCnt" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">비고</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" id="vDescription" disabled>
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<th:block th:if="${info.useType eq 'PVRE'}">
|
||||||
|
<h5 class="modal-title" id="menuEditModalLabel">휴대용 녹화장비 사용대장 수정</h5>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${info.useType eq 'QIR'}">
|
||||||
|
<h5 class="modal-title" id="menuEditModalLabel">방역조사실 사용대장 수정</h5>
|
||||||
|
</th:block>
|
||||||
|
<button type="button" class="btn-close" id="closeModal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="useUpdateFm" 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="useNo" th:value="${info.useNo}">
|
||||||
|
<input type="hidden" name="useType" th:value="${info.useType}">
|
||||||
|
<input type="hidden" name="versionNo" th:value="${info.versionNo}">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용관서</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" disabled>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<th:block th:each="organList:${organList}">
|
||||||
|
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq info.mgtOrgan}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용일시</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="mUseDt" name="useDt" th:value="${info.useDt}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용사유</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<select class="form-select form-select-sm" id="mDetailType" name="detailType">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<th:block th:if="${info.useType eq 'PVRE'}">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:if="${info.useType eq 'QIR'}">
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
|
||||||
|
</th:block>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
<input type="text" class="form-control" id="mDetailSelf" name="detailSelf" th:value="${info.detailSelf}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용인원</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="number" class="form-control" id="mPeopleCnt" name="peopleCnt" th:value="${info.peopleCnt}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">비고</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="mDescription" name="description" th:value="${info.description}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-secondary" id="closeModal" data-bs-dismiss="modal">닫기</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="updateUse">수정</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue