외사장비 모달 수정 완료
첩보수집활동 모달 작업 시작.
parent
3df21b009a
commit
c30d94f9d4
|
|
@ -2,10 +2,7 @@ package com.dbnt.faisp.main.equip;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||||
import com.dbnt.faisp.main.equip.model.CellPhone;
|
import com.dbnt.faisp.main.equip.model.*;
|
||||||
import com.dbnt.faisp.main.equip.model.Equip;
|
|
||||||
import com.dbnt.faisp.main.equip.model.EquipLog;
|
|
||||||
import com.dbnt.faisp.main.equip.model.UseList;
|
|
||||||
import com.dbnt.faisp.main.equip.service.EquipService;
|
import com.dbnt.faisp.main.equip.service.EquipService;
|
||||||
import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
|
import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
|
||||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||||
|
|
@ -56,7 +53,7 @@ public class EquipController {
|
||||||
@GetMapping("/equipEditModal")
|
@GetMapping("/equipEditModal")
|
||||||
public ModelAndView equipEditModal(@AuthenticationPrincipal UserInfo loginUser) {
|
public ModelAndView equipEditModal(@AuthenticationPrincipal UserInfo loginUser) {
|
||||||
ModelAndView mav = new ModelAndView("equip/equipEditModal");
|
ModelAndView mav = new ModelAndView("equip/equipEditModal");
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/equipStatus").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/equipStatus").get(0).getAccessAuth();
|
||||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
mav.addObject("userOrgan", loginUser.getOgCd());
|
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||||
|
|
@ -75,12 +72,12 @@ public class EquipController {
|
||||||
|
|
||||||
@PostMapping("/saveEquip")
|
@PostMapping("/saveEquip")
|
||||||
public void saveEquip(@AuthenticationPrincipal UserInfo loginUser,Equip equip, MultipartHttpServletRequest request){
|
public void saveEquip(@AuthenticationPrincipal UserInfo loginUser,Equip equip, MultipartHttpServletRequest request){
|
||||||
equip.setWrtNm(loginUser.getUserNm());
|
equip.setWrtNm(loginUser.getUserNm());
|
||||||
equip.setWrtOrgan(loginUser.getOgCd());
|
equip.setWrtOrgan(loginUser.getOgCd());
|
||||||
equip.setWrtPart(loginUser.getOfcCd());
|
equip.setWrtPart(loginUser.getOfcCd());
|
||||||
equip.setWrtTitle(loginUser.getTitleCd());
|
equip.setWrtTitle(loginUser.getTitleCd());
|
||||||
equip.setWrtDt(LocalDateTime.now());
|
equip.setWrtDt(LocalDateTime.now());
|
||||||
equipService.saveEquip(equip,request);
|
equipService.saveEquip(equip,request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/List")
|
@GetMapping("/List")
|
||||||
|
|
@ -118,13 +115,13 @@ public class EquipController {
|
||||||
@PostMapping("/updateEquip")
|
@PostMapping("/updateEquip")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public int updateEquip(@AuthenticationPrincipal UserInfo loginUser,Equip equip, MultipartHttpServletRequest request){
|
public int updateEquip(@AuthenticationPrincipal UserInfo loginUser,Equip equip, MultipartHttpServletRequest request){
|
||||||
equip.setWrtNm(loginUser.getUserNm());
|
equip.setWrtNm(loginUser.getUserNm());
|
||||||
equip.setWrtOrgan(loginUser.getOgCd());
|
equip.setWrtOrgan(loginUser.getOgCd());
|
||||||
equip.setWrtPart(loginUser.getOfcCd());
|
equip.setWrtPart(loginUser.getOfcCd());
|
||||||
equip.setWrtTitle(loginUser.getTitleCd());
|
equip.setWrtTitle(loginUser.getTitleCd());
|
||||||
equip.setWrtDt(LocalDateTime.now());
|
equip.setWrtDt(LocalDateTime.now());
|
||||||
int result = equipService.updateEquip(equip,request);
|
int result = equipService.updateEquip(equip,request);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/historyView")
|
@GetMapping("/historyView")
|
||||||
|
|
@ -142,43 +139,43 @@ 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")
|
||||||
public void getThumbImage(Equip equip , HttpServletResponse response) throws Exception {
|
public void getThumbImage(Equip equip , HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
Equip dbImg = equipService.selectEquipInfo(equip);
|
EquipFile dbImg = equipService.selectEquipFile(equip);
|
||||||
|
|
||||||
String realFile = dbImg.getFilePath()+"/"+ dbImg.getConvNm();
|
String realFile = dbImg.getFilePath()+"/"+ dbImg.getConvNm();
|
||||||
String fileNm = dbImg.getConvNm();
|
String fileNm = dbImg.getConvNm();
|
||||||
|
|
||||||
|
|
||||||
BufferedOutputStream out = null;
|
BufferedOutputStream out = null;
|
||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
response.setContentType("image/jpeg;charset=UTF-8");
|
response.setContentType("image/jpeg;charset=UTF-8");
|
||||||
response.setHeader("Content-Disposition", "inline;filename=" + fileNm);
|
response.setHeader("Content-Disposition", "inline;filename=" + fileNm);
|
||||||
File file = new File(realFile);
|
File file = new File(realFile);
|
||||||
// File file = new File(realFile + "/" + fileNm);
|
// File file = new File(realFile + "/" + fileNm);
|
||||||
if(file.exists()){
|
if(file.exists()){
|
||||||
in = new FileInputStream(file);
|
in = new FileInputStream(file);
|
||||||
out = new BufferedOutputStream(response.getOutputStream());
|
out = new BufferedOutputStream(response.getOutputStream());
|
||||||
int len;
|
int len;
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
while ((len = in.read(buf)) > 0) {
|
while ((len = in.read(buf)) > 0) {
|
||||||
out.write(buf, 0, len);
|
out.write(buf, 0, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if(out != null){ out.flush(); }
|
if(out != null){ out.flush(); }
|
||||||
if(out != null){ out.close(); }
|
if(out != null){ out.close(); }
|
||||||
if(in != null){ in.close(); }
|
if(in != null){ in.close(); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/Log")
|
@GetMapping("/Log")
|
||||||
public ModelAndView equipLog(@AuthenticationPrincipal UserInfo loginUser,EquipLog equipLog) {
|
public ModelAndView equipLog(@AuthenticationPrincipal UserInfo loginUser,EquipLog equipLog) {
|
||||||
|
|
@ -195,43 +192,43 @@ public class EquipController {
|
||||||
|
|
||||||
@GetMapping("/statusExcelDown")
|
@GetMapping("/statusExcelDown")
|
||||||
public void statisticsExcelDown(Model model,HttpServletResponse response, Equip equip) {
|
public void statisticsExcelDown(Model model,HttpServletResponse response, Equip equip) {
|
||||||
String[] headers = { "rownum","equ_type", "item_value", "total", "cnt_bon", "cnt_center", "cnt_incheon", "cnt_pyeongtaek", "cnt_taean","cnt_boryeong","cnt_west","cnt_mokpo","cnt_buan",
|
String[] headers = { "rownum","equ_type", "item_value", "total", "cnt_bon", "cnt_center", "cnt_incheon", "cnt_pyeongtaek", "cnt_taean","cnt_boryeong","cnt_west","cnt_mokpo","cnt_buan",
|
||||||
"cnt_gunsan","cnt_yusu","cnt_wando","cnt_south","cnt_ulsan","cnt_busan","cnt_changwon","cnt_tongyong","cnt_sacheon","cnt_east","cnt_sokcho","cnt_donghe",
|
"cnt_gunsan","cnt_yusu","cnt_wando","cnt_south","cnt_ulsan","cnt_busan","cnt_changwon","cnt_tongyong","cnt_sacheon","cnt_east","cnt_sokcho","cnt_donghe",
|
||||||
"cnt_ulgin","cnt_pohang","cnt_jeju","cnt_jejuseo","cnt_seoguipo"};
|
"cnt_ulgin","cnt_pohang","cnt_jeju","cnt_jejuseo","cnt_seoguipo"};
|
||||||
String[] headerNames = { "", "", "", "", "", "중부", "", "","","","서해","","","","","","남해","","","","","","동해","","","","","제주","",""};
|
String[] headerNames = { "", "", "", "", "", "중부", "", "","","","서해","","","","","","남해","","","","","","동해","","","","","제주","",""};
|
||||||
String[] headerNames2 = { "연번", "분류", "세부분류", "총계", "본청", "청", "인천서", "평택서","태안서","보령서","청","목포서","부안서","군산서","여수서","완도서","청","울산서","부산서","창원서","통영서","서천서","청","속초서","동해서","울진서","포항서","청","제주서","서귀포서"};
|
String[] headerNames2 = { "연번", "분류", "세부분류", "총계", "본청", "청", "인천서", "평택서","태안서","보령서","청","목포서","부안서","군산서","여수서","완도서","청","울산서","부산서","창원서","통영서","서천서","청","속초서","동해서","울진서","포항서","청","제주서","서귀포서"};
|
||||||
String[] columnType = { "int", "String", "String", "int", "int", "int", "int", "int","int","int","int","int","int","int","int","int","int","int","int","int",
|
String[] columnType = { "int", "String", "String", "int", "int", "int", "int", "int","int","int","int","int","int","int","int","int","int","int","int","int",
|
||||||
"int","int","int","int","int","int","int","int","int","int"};
|
"int","int","int","int","int","int","int","int","int","int"};
|
||||||
String sheetName = "외사장비현황";
|
String sheetName = "외사장비현황";
|
||||||
String excelFileName = "외사장비현황";
|
String excelFileName = "외사장비현황";
|
||||||
List<ParamMap> equStatusList = equipService.selectEquipStatus(equip);
|
List<ParamMap> equStatusList = equipService.selectEquipStatus(equip);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Utils.downEquipStatusExcel(equStatusList, response, headers, headerNames,headerNames2, columnType, sheetName, excelFileName);
|
Utils.downEquipStatusExcel(equStatusList, response, headers, headerNames,headerNames2, columnType, sheetName, excelFileName);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
model.addAttribute("message", "엑셀다운로드 중 오류가 발생했습니다.");
|
model.addAttribute("message", "엑셀다운로드 중 오류가 발생했습니다.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/cellPhoneList")
|
@GetMapping("/cellPhoneList")
|
||||||
public ModelAndView cellPhoneList(@AuthenticationPrincipal UserInfo loginUser,CellPhone cellPhone,HttpServletResponse response) {
|
public ModelAndView cellPhoneList(@AuthenticationPrincipal UserInfo loginUser,CellPhone cellPhone,HttpServletResponse response) {
|
||||||
ModelAndView mav = new ModelAndView("equip/cellPhoneList");
|
ModelAndView mav = new ModelAndView("equip/cellPhoneList");
|
||||||
cellPhone.setDownOrganCdList(loginUser.getDownOrganCdList());
|
cellPhone.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
//엑셀다운
|
//엑셀다운
|
||||||
if(cellPhone.getExcel() != null && cellPhone.getExcel().equals("Y")){
|
if(cellPhone.getExcel() != null && cellPhone.getExcel().equals("Y")){
|
||||||
String[] headers = { "phone_key", "sosok", "tel_no", "user_nm", "ext_mail", "webex_no", "katalk_id"};
|
String[] headers = { "phone_key", "sosok", "tel_no", "user_nm", "ext_mail", "webex_no", "katalk_id"};
|
||||||
String[] headerNames = { "연번", "소속","전화번호", "사용자(관리자)", "등록 외부메일", "웹엑스 미팅번호", "카카오톡 ID"};
|
String[] headerNames = { "연번", "소속","전화번호", "사용자(관리자)", "등록 외부메일", "웹엑스 미팅번호", "카카오톡 ID"};
|
||||||
String[] columnType = { "int", "String","String", "String", "String", "String", "String", "Stiring"};
|
String[] columnType = { "int", "String","String", "String", "String", "String", "String", "Stiring"};
|
||||||
String sheetName = "업무용 휴대전화 현황";
|
String sheetName = "업무용 휴대전화 현황";
|
||||||
String excelFileName = "업무용 휴대전화 현황";
|
String excelFileName = "업무용 휴대전화 현황";
|
||||||
List<CellPhone> cellPhoneList= equipService.selectCellPhoneList(cellPhone);
|
List<CellPhone> cellPhoneList= equipService.selectCellPhoneList(cellPhone);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Utils.cellPhoneListToExcel(cellPhoneList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
Utils.cellPhoneListToExcel(cellPhoneList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/cellPhoneList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/cellPhoneList").get(0).getAccessAuth();
|
||||||
|
|
@ -250,21 +247,21 @@ public class EquipController {
|
||||||
ModelAndView mav = new ModelAndView("equip/cellPhoneEditModal");
|
ModelAndView mav = new ModelAndView("equip/cellPhoneEditModal");
|
||||||
|
|
||||||
if(cellPhone.getPhoneKey() != null) {
|
if(cellPhone.getPhoneKey() != null) {
|
||||||
cellPhone = equipService.selectCellPhoneInfo(cellPhone.getPhoneKey());
|
cellPhone = equipService.selectCellPhoneInfo(cellPhone.getPhoneKey());
|
||||||
ParamMap param = new ParamMap();
|
ParamMap param = new ParamMap();
|
||||||
param.put("downOrganCdList", organConfigService.selectDownOrganListWhereUserOgCd(cellPhone.getMgtOrgan()));
|
param.put("downOrganCdList", organConfigService.selectDownOrganListWhereUserOgCd(cellPhone.getMgtOrgan()));
|
||||||
mav.addObject("managerList", userInfoService.selectManagerList(param));
|
mav.addObject("managerList", userInfoService.selectManagerList(param));
|
||||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cellPhone.getPhoneKey() == null) {
|
if(cellPhone.getPhoneKey() == null) {
|
||||||
cellPhone.setWrtOrgan(loginUser.getOgCd());
|
cellPhone.setWrtOrgan(loginUser.getOgCd());
|
||||||
cellPhone.setWrtPart(loginUser.getOfcCd());
|
cellPhone.setWrtPart(loginUser.getOfcCd());
|
||||||
cellPhone.setWrtTitle(loginUser.getTitleCd());
|
cellPhone.setWrtTitle(loginUser.getTitleCd());
|
||||||
cellPhone.setWrtUserSeq(loginUser.getUserSeq());
|
cellPhone.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
cellPhone.setWrtNm(loginUser.getUserNm());
|
cellPhone.setWrtNm(loginUser.getUserNm());
|
||||||
}
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/cellPhoneList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/cellPhoneList").get(0).getAccessAuth();
|
||||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
mav.addObject("userOrgan", loginUser.getOgCd());
|
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||||
|
|
@ -284,13 +281,13 @@ public class EquipController {
|
||||||
|
|
||||||
@PostMapping("/saveCellPhone")
|
@PostMapping("/saveCellPhone")
|
||||||
public Integer saveCellPhone (@AuthenticationPrincipal UserInfo loginUser,CellPhone cellPhone){
|
public Integer saveCellPhone (@AuthenticationPrincipal UserInfo loginUser,CellPhone cellPhone){
|
||||||
cellPhone.setWrtDt(LocalDateTime.now());
|
cellPhone.setWrtDt(LocalDateTime.now());
|
||||||
return equipService.saveCellPhone(cellPhone);
|
return equipService.saveCellPhone(cellPhone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/deleteCellPhone")
|
@PostMapping("/deleteCellPhone")
|
||||||
public void deleteCellPhone(@RequestBody List<CellPhone> cellPhone){
|
public void deleteCellPhone(@RequestBody List<CellPhone> cellPhone){
|
||||||
equipService.deleteCellPhone(cellPhone);
|
equipService.deleteCellPhone(cellPhone);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,19 +298,19 @@ public class EquipController {
|
||||||
useList.setUseType("PVRE");
|
useList.setUseType("PVRE");
|
||||||
//엑셀다운
|
//엑셀다운
|
||||||
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
||||||
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
||||||
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
||||||
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
||||||
String sheetName = "휴대용 녹화장비 사용 대장";
|
String sheetName = "휴대용 녹화장비 사용 대장";
|
||||||
String excelFileName = "휴대용 녹화장비 사용 대장";
|
String excelFileName = "휴대용 녹화장비 사용 대장";
|
||||||
List<UseList> useExcelList= equipService.selectUseList(useList);
|
List<UseList> useExcelList= equipService.selectUseList(useList);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
|
|
@ -334,27 +331,27 @@ public class EquipController {
|
||||||
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", useList.getUseType());
|
mav.addObject("useType", useList.getUseType());
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth;
|
String accessAuth;
|
||||||
if(useList.getUseType().equals("PVRE")) {
|
if(useList.getUseType().equals("PVRE")) {
|
||||||
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
}else if(useList.getUseType().equals("QIR")) {
|
}else if(useList.getUseType().equals("QIR")) {
|
||||||
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
}
|
}
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/saveUse")
|
@PostMapping("/saveUse")
|
||||||
public void saveUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
|
public void saveUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
|
||||||
useList.setWrtOrgan(loginUser.getOgCd());
|
useList.setWrtOrgan(loginUser.getOgCd());
|
||||||
useList.setWrtPart(loginUser.getOfcCd());
|
useList.setWrtPart(loginUser.getOfcCd());
|
||||||
useList.setWrtTitle(loginUser.getTitleCd());
|
useList.setWrtTitle(loginUser.getTitleCd());
|
||||||
useList.setWrtUserSeq(loginUser.getUserSeq());
|
useList.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
useList.setWrtNm(loginUser.getUserNm());
|
useList.setWrtNm(loginUser.getUserNm());
|
||||||
useList.setWrtDt(LocalDateTime.now());
|
useList.setWrtDt(LocalDateTime.now());
|
||||||
equipService.saveUse(useList);
|
equipService.saveUse(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/useModifyModal")
|
@GetMapping("/useModifyModal")
|
||||||
|
|
@ -366,27 +363,27 @@ public class EquipController {
|
||||||
mav.addObject("wrtUserSeq", equipService.selectFirstWrtUserSeq(useList));
|
mav.addObject("wrtUserSeq", equipService.selectFirstWrtUserSeq(useList));
|
||||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||||
|
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth;
|
String accessAuth;
|
||||||
if(useList.getUseType().equals("PVRE")) {
|
if(useList.getUseType().equals("PVRE")) {
|
||||||
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
}else if(useList.getUseType().equals("QIR")) {
|
}else if(useList.getUseType().equals("QIR")) {
|
||||||
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
}
|
}
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/updateUse")
|
@PostMapping("/updateUse")
|
||||||
public UseList uadateUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
|
public UseList uadateUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
|
||||||
useList.setWrtOrgan(loginUser.getOgCd());
|
useList.setWrtOrgan(loginUser.getOgCd());
|
||||||
useList.setWrtPart(loginUser.getOfcCd());
|
useList.setWrtPart(loginUser.getOfcCd());
|
||||||
useList.setWrtTitle(loginUser.getTitleCd());
|
useList.setWrtTitle(loginUser.getTitleCd());
|
||||||
useList.setWrtUserSeq(loginUser.getUserSeq());
|
useList.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
useList.setWrtNm(loginUser.getUserNm());
|
useList.setWrtNm(loginUser.getUserNm());
|
||||||
useList.setWrtDt(LocalDateTime.now());
|
useList.setWrtDt(LocalDateTime.now());
|
||||||
return equipService.updateUse(useList);
|
return equipService.updateUse(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/useHistory")
|
@GetMapping("/useHistory")
|
||||||
|
|
@ -404,7 +401,7 @@ public class EquipController {
|
||||||
|
|
||||||
@PostMapping("/useDelete")
|
@PostMapping("/useDelete")
|
||||||
public void useDelete(@RequestBody List<UseList> useList){
|
public void useDelete(@RequestBody List<UseList> useList){
|
||||||
equipService.useDelete(useList);
|
equipService.useDelete(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/qirUseList")
|
@GetMapping("/qirUseList")
|
||||||
|
|
@ -414,19 +411,19 @@ public class EquipController {
|
||||||
useList.setUseType("QIR");
|
useList.setUseType("QIR");
|
||||||
//엑셀다운
|
//엑셀다운
|
||||||
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
|
||||||
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
|
||||||
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
|
||||||
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
|
||||||
String sheetName = "방역조사실 사용대장";
|
String sheetName = "방역조사실 사용대장";
|
||||||
String excelFileName = "방역조사실 사용대장";
|
String excelFileName = "방역조사실 사용대장";
|
||||||
List<UseList> useExcelList= equipService.selectUseList(useList);
|
List<UseList> useExcelList= equipService.selectUseList(useList);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
|
||||||
|
|
|
||||||
|
|
@ -36,376 +36,363 @@ import java.util.*;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class EquipService {
|
public class EquipService {
|
||||||
@Value("${file.dir}")
|
@Value("${file.dir}")
|
||||||
protected String fileDir;
|
protected String fileDir;
|
||||||
@Value("${file.dir.equip}")
|
@Value("${file.dir.equip}")
|
||||||
protected String equ;
|
protected String equ;
|
||||||
|
|
||||||
private final EquipRepository equipRepository;
|
private final EquipRepository equipRepository;
|
||||||
private final EquipFileRepository equipFileRepository;
|
private final EquipFileRepository equipFileRepository;
|
||||||
private final EquipLogRepository equipLogRepository;
|
private final EquipLogRepository equipLogRepository;
|
||||||
private final CellPhoneRepository cellPhoneRepository;
|
private final CellPhoneRepository cellPhoneRepository;
|
||||||
private final UseListRepository useListRepository;
|
private final UseListRepository useListRepository;
|
||||||
private final EquipMapper equipMapper;
|
private final EquipMapper equipMapper;
|
||||||
|
|
||||||
SimpleDateFormat Date = new SimpleDateFormat("yyyy");
|
SimpleDateFormat Date = new SimpleDateFormat("yyyy");
|
||||||
String year = Date.format(new Date());
|
String year = Date.format(new Date());
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveEquip(Equip equip, MultipartHttpServletRequest request) {
|
public void saveEquip(Equip equip, MultipartHttpServletRequest request) {
|
||||||
Equip dbEquip = equipRepository.findFirstByOrderByEquKeyDesc();
|
Equip dbEquip = equipRepository.findFirstByOrderByEquKeyDesc();
|
||||||
try {
|
try {
|
||||||
if(dbEquip == null) {
|
if(dbEquip == null) {
|
||||||
equip.setEquKey(1);
|
equip.setEquKey(1);
|
||||||
equip.setVersionNo(1);
|
equip.setVersionNo(1);
|
||||||
equipRepository.save(equip);
|
equipRepository.save(equip);
|
||||||
} else {
|
} else {
|
||||||
equip.setEquKey(dbEquip.getEquKey()+1);
|
equip.setEquKey(dbEquip.getEquKey()+1);
|
||||||
equip.setVersionNo(1);
|
equip.setVersionNo(1);
|
||||||
equipRepository.save(equip);
|
equipRepository.save(equip);
|
||||||
}
|
}
|
||||||
saveFile(equip,request);
|
saveFile(equip,request);
|
||||||
EquipLog equLog = new EquipLog();
|
EquipLog equLog = new EquipLog();
|
||||||
equLog.setEquType(equip.getEquType());
|
equLog.setEquType(equip.getEquType());
|
||||||
equLog.setDetailType(equip.getDetailType());
|
equLog.setDetailType(equip.getDetailType());
|
||||||
equLog.setElContents("입력");
|
equLog.setElContents("입력");
|
||||||
equLog.setWrtNm(equip.getWrtNm());
|
equLog.setWrtNm(equip.getWrtNm());
|
||||||
equLog.setWrtOrgan(equip.getWrtOrgan());
|
equLog.setWrtOrgan(equip.getWrtOrgan());
|
||||||
equLog.setWrtPart(equip.getWrtPart());
|
equLog.setWrtPart(equip.getWrtPart());
|
||||||
equLog.setWrtTitle(equip.getWrtTitle());
|
equLog.setWrtTitle(equip.getWrtTitle());
|
||||||
equLog.setWrtDt(equip.getWrtDt());
|
equLog.setWrtDt(equip.getWrtDt());
|
||||||
equipLogRepository.save(equLog);
|
equipLogRepository.save(equLog);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception {
|
public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception {
|
||||||
try {
|
try {
|
||||||
String path = fileDir+equ;
|
String path = fileDir+equ;
|
||||||
String FileSize;
|
String FileSize;
|
||||||
File dir = new File(path);
|
File dir = new File(path);
|
||||||
if(!dir.exists()) dir.mkdir();
|
if(!dir.exists()) dir.mkdir();
|
||||||
//파일등록
|
//파일등록
|
||||||
List<MultipartFile> mFiles = mRequest.getFiles("file");
|
List<MultipartFile> mFiles = mRequest.getFiles("file");
|
||||||
for(int i = 0; i < mFiles.size(); i++) {
|
for(int i = 0; i < mFiles.size(); i++) {
|
||||||
MultipartFile mFile = mFiles.get(i);
|
MultipartFile mFile = mFiles.get(i);
|
||||||
FileSize = calculationSize(mFile.getSize());
|
FileSize = calculationSize(mFile.getSize());
|
||||||
if(!"".equals(mFile.getOriginalFilename())){
|
if(!"".equals(mFile.getOriginalFilename())){
|
||||||
String fileName = mFile.getOriginalFilename();
|
String fileName = mFile.getOriginalFilename();
|
||||||
if(fileName.contains("\\")){
|
if(fileName.contains("\\")){
|
||||||
String notSecuredFileName = fileName.substring(fileName.lastIndexOf("\\") +1);
|
String notSecuredFileName = fileName.substring(fileName.lastIndexOf("\\") +1);
|
||||||
fileName = ("".equals(notSecuredFileName) || null == notSecuredFileName) ? fileName : notSecuredFileName;
|
fileName = ("".equals(notSecuredFileName) || null == notSecuredFileName) ? fileName : notSecuredFileName;
|
||||||
};
|
};
|
||||||
|
|
||||||
String fileExt = Utils.getFileExtention(fileName);
|
String fileExt = Utils.getFileExtention(fileName);
|
||||||
String saveName = Utils.generationSaveName() + "." + fileExt;
|
String saveName = Utils.generationSaveName() + "." + fileExt;
|
||||||
FileCopyUtils.copy(mFile.getBytes(), new File(path, saveName));
|
FileCopyUtils.copy(mFile.getBytes(), new File(path, saveName));
|
||||||
|
|
||||||
EquipFile equipFile = new EquipFile();
|
EquipFile equipFile = new EquipFile();
|
||||||
equipFile.setEquKey(equip.getEquKey());
|
equipFile.setEquKey(equip.getEquKey());
|
||||||
equipFile.setVersionNo(equip.getVersionNo());
|
equipFile.setVersionNo(equip.getVersionNo());
|
||||||
equipFile.setOrigNm(fileName);
|
equipFile.setOrigNm(fileName);
|
||||||
equipFile.setConvNm(saveName);
|
equipFile.setConvNm(saveName);
|
||||||
equipFile.setFileExtn(fileExt);
|
equipFile.setFileExtn(fileExt);
|
||||||
equipFile.setFilePath(path);
|
equipFile.setFilePath(path);
|
||||||
equipFile.setFileSize(FileSize);
|
equipFile.setFileSize(FileSize);
|
||||||
|
|
||||||
equipFileRepository.save(equipFile);
|
equipFileRepository.save(equipFile);
|
||||||
} else {
|
} else {
|
||||||
EquipFile equipFile = new EquipFile();
|
EquipFile equipFile = new EquipFile();
|
||||||
equipFile.setEquKey(equip.getEquKey());
|
equipFile.setEquKey(equip.getEquKey());
|
||||||
equipFile.setVersionNo(equip.getVersionNo());
|
equipFile.setVersionNo(equip.getVersionNo());
|
||||||
equipFileRepository.save(equipFile);
|
equipFileRepository.save(equipFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private String calculationSize(double fileSize){
|
private String calculationSize(double fileSize){
|
||||||
String[] units = {"bytes", "KB", "MB", "GB", "TB", "PB"};
|
String[] units = {"bytes", "KB", "MB", "GB", "TB", "PB"};
|
||||||
double unitSelector = Math.floor(Math.log(fileSize)/Math.log(1024));
|
double unitSelector = Math.floor(Math.log(fileSize)/Math.log(1024));
|
||||||
if(fileSize>0){
|
if(fileSize>0){
|
||||||
return Math.round((fileSize/Math.pow(1024, unitSelector))*100)/100d+" "+units[(int)unitSelector];
|
return Math.round((fileSize/Math.pow(1024, unitSelector))*100)/100d+" "+units[(int)unitSelector];
|
||||||
}else{
|
}else{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ParamMap> selectEquipStatus(Equip equip) {
|
public List<ParamMap> selectEquipStatus(Equip equip) {
|
||||||
return equipMapper.selectEquipStatus(equip);
|
return equipMapper.selectEquipStatus(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Equip> selectEquipList(Equip equip) {
|
public List<Equip> selectEquipList(Equip equip) {
|
||||||
return equipMapper.selectEquipList(equip);
|
return equipMapper.selectEquipList(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer selectEquipListCnt(Equip equip) {
|
public Integer selectEquipListCnt(Equip equip) {
|
||||||
return equipMapper.selectEquipListCnt(equip);
|
return equipMapper.selectEquipListCnt(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Equip selectEquipInfo(Equip equip) {
|
public Equip selectEquipInfo(Equip equip) {
|
||||||
return equipMapper.selectEquipInfo(equip);
|
return equipMapper.selectEquipInfo(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public int updateEquip(Equip equip, MultipartHttpServletRequest request) {
|
public int updateEquip(Equip equip, MultipartHttpServletRequest request) {
|
||||||
try {
|
try {
|
||||||
Equip dbEquip = equipRepository.findById(new EquipId(equip.getEquKey(), equip.getVersionNo())).orElse(null);
|
Equip dbEquip = equipRepository.findById(new EquipId(equip.getEquKey(), equip.getVersionNo())).orElse(null);
|
||||||
Equip equipTmp = new Equip();
|
Equip equipTmp = new Equip();
|
||||||
equipTmp.setEquKey(dbEquip.getEquKey());
|
equipTmp.setEquKey(dbEquip.getEquKey());
|
||||||
equipTmp.setVersionNo(dbEquip.getVersionNo()+1);
|
equipTmp.setVersionNo(dbEquip.getVersionNo()+1);
|
||||||
equipTmp.setMgtOrgan(equip.getMgtOrgan());
|
equipTmp.setMgtOrgan(equip.getMgtOrgan());
|
||||||
equipTmp.setEquType(equip.getEquType());
|
equipTmp.setEquType(equip.getEquType());
|
||||||
equipTmp.setDetailType(equip.getDetailType());
|
equipTmp.setDetailType(equip.getDetailType());
|
||||||
equipTmp.setStoredYear(equip.getStoredYear());
|
equipTmp.setStoredYear(equip.getStoredYear());
|
||||||
equipTmp.setItemQty(equip.getItemQty());
|
equipTmp.setItemQty(equip.getItemQty());
|
||||||
equipTmp.setItemCondition(equip.getItemCondition());
|
equipTmp.setItemCondition(equip.getItemCondition());
|
||||||
equipTmp.setNote(equip.getNote());
|
equipTmp.setNote(equip.getNote());
|
||||||
equipTmp.setWrtOrgan(equip.getWrtOrgan());
|
equipTmp.setWrtOrgan(equip.getWrtOrgan());
|
||||||
equipTmp.setWrtPart(equip.getWrtPart());
|
equipTmp.setWrtPart(equip.getWrtPart());
|
||||||
equipTmp.setWrtTitle(equip.getWrtTitle());
|
equipTmp.setWrtTitle(equip.getWrtTitle());
|
||||||
equipTmp.setWrtNm(equip.getWrtNm());
|
equipTmp.setWrtNm(equip.getWrtNm());
|
||||||
equipTmp.setWrtDt(equip.getWrtDt());
|
equipTmp.setWrtDt(equip.getWrtDt());
|
||||||
equipRepository.save(equipTmp);
|
equipRepository.save(equipTmp);
|
||||||
updateFile(equip,equipTmp,request);
|
updateFile(equip,equipTmp,request);
|
||||||
EquipLog equLog = new EquipLog();
|
EquipLog equLog = new EquipLog();
|
||||||
equLog.setEquType(equip.getEquType());
|
equLog.setEquType(equip.getEquType());
|
||||||
equLog.setDetailType(equip.getDetailType());
|
equLog.setDetailType(equip.getDetailType());
|
||||||
equLog.setElContents("수정");
|
equLog.setElContents("수정");
|
||||||
equLog.setWrtNm(equip.getWrtNm());
|
equLog.setWrtNm(equip.getWrtNm());
|
||||||
equLog.setWrtOrgan(equip.getWrtOrgan());
|
equLog.setWrtOrgan(equip.getWrtOrgan());
|
||||||
equLog.setWrtDt(equip.getWrtDt());
|
equLog.setWrtDt(equip.getWrtDt());
|
||||||
equLog.setWrtPart(equip.getWrtPart());
|
equLog.setWrtPart(equip.getWrtPart());
|
||||||
equLog.setWrtTitle(equip.getWrtTitle());
|
equLog.setWrtTitle(equip.getWrtTitle());
|
||||||
equipLogRepository.save(equLog);
|
equipLogRepository.save(equLog);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return equip.getEquKey();
|
return equip.getEquKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateFile(Equip equip,Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception {
|
public void updateFile(Equip equip, Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception {
|
||||||
try {
|
try {
|
||||||
String path = fileDir+equ;
|
String path = fileDir+equ;
|
||||||
String FileSize;
|
String FileSize;
|
||||||
File dir = new File(path);
|
File dir = new File(path);
|
||||||
if(!dir.exists()) dir.mkdir();
|
if(!dir.exists()) dir.mkdir();
|
||||||
|
|
||||||
//이미지 삭제했을경우
|
//파일등록
|
||||||
if(equip.getDeleteFileKey() != null) {
|
List<MultipartFile> mFiles = mRequest.getFiles("file");
|
||||||
EquipFile equFile = new EquipFile();
|
for(int i = 0; i < mFiles.size(); i++) {
|
||||||
equFile.setEquKey(equip.getDeleteFileKey());
|
MultipartFile mFile = mFiles.get(i);
|
||||||
equFile.setVersionNo(equip.getDeleteFileVnum());
|
FileSize = calculationSize(mFile.getSize());
|
||||||
EquipFile dbEquFile = equipFileRepository.findById(new EquipFileId(equFile.getEquKey(), equFile.getVersionNo())).orElse(null);
|
if(!"".equals(mFile.getOriginalFilename())){
|
||||||
if(dbEquFile != null) {
|
String fileName = mFile.getOriginalFilename();
|
||||||
File file = new File(dbEquFile.getFilePath(), dbEquFile.getConvNm());
|
if(fileName.contains("\\")){
|
||||||
|
String notSecuredFileName = fileName.substring(fileName.lastIndexOf("\\") +1);
|
||||||
|
fileName = ("".equals(notSecuredFileName) || null == notSecuredFileName) ? fileName : notSecuredFileName;
|
||||||
|
};
|
||||||
|
|
||||||
if(file.exists()) {
|
String fileExt = Utils.getFileExtention(fileName);
|
||||||
|
String saveName = Utils.generationSaveName() + "." + fileExt;
|
||||||
|
FileCopyUtils.copy(mFile.getBytes(), new File(path, saveName));
|
||||||
|
|
||||||
file.delete();
|
EquipFile equipFile = new EquipFile();
|
||||||
}
|
equipFile.setEquKey(equipTmp.getEquKey());
|
||||||
}
|
equipFile.setVersionNo(equipTmp.getVersionNo());
|
||||||
}
|
equipFile.setOrigNm(fileName);
|
||||||
//파일등록
|
equipFile.setConvNm(saveName);
|
||||||
List<MultipartFile> mFiles = mRequest.getFiles("file");
|
equipFile.setFileExtn(fileExt);
|
||||||
for(int i = 0; i < mFiles.size(); i++) {
|
equipFile.setFilePath(path);
|
||||||
MultipartFile mFile = mFiles.get(i);
|
equipFile.setFileSize(FileSize);
|
||||||
FileSize = calculationSize(mFile.getSize());
|
|
||||||
if(!"".equals(mFile.getOriginalFilename())){
|
|
||||||
String fileName = mFile.getOriginalFilename();
|
|
||||||
if(fileName.contains("\\")){
|
|
||||||
String notSecuredFileName = fileName.substring(fileName.lastIndexOf("\\") +1);
|
|
||||||
fileName = ("".equals(notSecuredFileName) || null == notSecuredFileName) ? fileName : notSecuredFileName;
|
|
||||||
};
|
|
||||||
|
|
||||||
String fileExt = Utils.getFileExtention(fileName);
|
equipFileRepository.save(equipFile);
|
||||||
String saveName = Utils.generationSaveName() + "." + fileExt;
|
} else if(equip.getNoUpdateImg() != null) {
|
||||||
FileCopyUtils.copy(mFile.getBytes(), new File(path, saveName));
|
EquipFile equipFile = new EquipFile();
|
||||||
|
equipFile.setEquKey(equipTmp.getEquKey());
|
||||||
|
equipFile.setVersionNo(equipTmp.getVersionNo());
|
||||||
|
EquipFile dbEquFile = equipFileRepository.findById(new EquipFileId(equip.getEquKey(), equip.getVersionNo())).orElse(null);
|
||||||
|
equipFile.setOrigNm(dbEquFile.getOrigNm());
|
||||||
|
equipFile.setConvNm(dbEquFile.getConvNm());
|
||||||
|
equipFile.setFileExtn(dbEquFile.getFileExtn());
|
||||||
|
equipFile.setFilePath(dbEquFile.getFilePath());
|
||||||
|
equipFile.setFileSize(dbEquFile.getFileSize());
|
||||||
|
equipFileRepository.save(equipFile);
|
||||||
|
} else {
|
||||||
|
EquipFile equipFile = new EquipFile();
|
||||||
|
equipFile.setEquKey(equipTmp.getEquKey());
|
||||||
|
equipFile.setVersionNo(equipTmp.getVersionNo());
|
||||||
|
equipFileRepository.save(equipFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EquipFile equipFile = new EquipFile();
|
public ParamMap selectEduType(Equip equip) {
|
||||||
equipFile.setEquKey(equipTmp.getEquKey());
|
return equipMapper.selectEduType(equip);
|
||||||
equipFile.setVersionNo(equipTmp.getVersionNo());
|
}
|
||||||
equipFile.setOrigNm(fileName);
|
|
||||||
equipFile.setConvNm(saveName);
|
|
||||||
equipFile.setFileExtn(fileExt);
|
|
||||||
equipFile.setFilePath(path);
|
|
||||||
equipFile.setFileSize(FileSize);
|
|
||||||
|
|
||||||
equipFileRepository.save(equipFile);
|
public List<Equip> selectHistoryList(Equip equip) {
|
||||||
} else if(equip.getNoUpdateImg() != null) {
|
return equipMapper.selectHistoryList(equip);
|
||||||
EquipFile equipFile = new EquipFile();
|
}
|
||||||
equipFile.setEquKey(equipTmp.getEquKey());
|
|
||||||
equipFile.setVersionNo(equipTmp.getVersionNo());
|
|
||||||
EquipFile dbEquFile = equipFileRepository.findById(new EquipFileId(equip.getEquKey(), equip.getVersionNo())).orElse(null);
|
|
||||||
equipFile.setOrigNm(dbEquFile.getOrigNm());
|
|
||||||
equipFile.setConvNm(dbEquFile.getConvNm());
|
|
||||||
equipFile.setFileExtn(dbEquFile.getFileExtn());
|
|
||||||
equipFile.setFilePath(dbEquFile.getFilePath());
|
|
||||||
equipFile.setFileSize(dbEquFile.getFileSize());
|
|
||||||
equipFileRepository.save(equipFile);
|
|
||||||
} else {
|
|
||||||
EquipFile equipFile = new EquipFile();
|
|
||||||
equipFile.setEquKey(equipTmp.getEquKey());
|
|
||||||
equipFile.setVersionNo(equipTmp.getVersionNo());
|
|
||||||
equipFileRepository.save(equipFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ParamMap selectEduType(Equip equip) {
|
public Equip selectHistoryDetail(Equip equip) {
|
||||||
return equipMapper.selectEduType(equip);
|
return equipMapper.selectHistoryDetail(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Equip> selectHistoryList(Equip equip) {
|
@Transactional
|
||||||
return equipMapper.selectHistoryList(equip);
|
public void equipDelete(List<Equip> equip,UserInfo loginUser) {
|
||||||
}
|
for(Equip equ: equip) {
|
||||||
|
//파일삭제
|
||||||
|
Equip dbEquip = equipMapper.selectEquipInfo(equ);
|
||||||
|
if(dbEquip.getOrigNm() != null) {
|
||||||
|
File file = new File(dbEquip.getFilePath(), dbEquip.getConvNm());
|
||||||
|
|
||||||
public Equip selectHistoryDetail(Equip equip) {
|
if(file.exists()) {
|
||||||
return equipMapper.selectHistoryDetail(equip);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
file.delete();
|
||||||
public void equipDelete(List<Equip> equip,UserInfo loginUser) {
|
}
|
||||||
for(Equip equ: equip) {
|
}
|
||||||
//파일삭제
|
equipRepository.deleteByEquKey(equ.getEquKey());
|
||||||
Equip dbEquip = equipMapper.selectEquipInfo(equ);
|
equipFileRepository.deleteByEquKey(equ.getEquKey());
|
||||||
if(dbEquip.getOrigNm() != null) {
|
EquipLog equLog = new EquipLog();
|
||||||
File file = new File(dbEquip.getFilePath(), dbEquip.getConvNm());
|
equLog.setEquType(dbEquip.getEquType());
|
||||||
|
equLog.setDetailType(dbEquip.getDetailType());
|
||||||
|
equLog.setElContents("삭제");
|
||||||
|
equLog.setWrtNm(loginUser.getUserNm());
|
||||||
|
equLog.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
equLog.setWrtPart(loginUser.getOfcCd());
|
||||||
|
equLog.setWrtTitle(loginUser.getTitleCd());
|
||||||
|
equLog.setWrtDt(LocalDateTime.now());
|
||||||
|
equipLogRepository.save(equLog);
|
||||||
|
}
|
||||||
|
|
||||||
if(file.exists()) {
|
}
|
||||||
|
|
||||||
file.delete();
|
public List<EquipLog> selectEquipLogList(EquipLog equipLog) {
|
||||||
}
|
return equipMapper.selectEquipLogList(equipLog);
|
||||||
}
|
}
|
||||||
equipRepository.deleteByEquKey(equ.getEquKey());
|
|
||||||
equipFileRepository.deleteByEquKey(equ.getEquKey());
|
|
||||||
EquipLog equLog = new EquipLog();
|
|
||||||
equLog.setEquType(dbEquip.getEquType());
|
|
||||||
equLog.setDetailType(dbEquip.getDetailType());
|
|
||||||
equLog.setElContents("삭제");
|
|
||||||
equLog.setWrtNm(loginUser.getUserNm());
|
|
||||||
equLog.setWrtOrgan(loginUser.getOgCd());
|
|
||||||
equLog.setWrtPart(loginUser.getOfcCd());
|
|
||||||
equLog.setWrtTitle(loginUser.getTitleCd());
|
|
||||||
equLog.setWrtDt(LocalDateTime.now());
|
|
||||||
equipLogRepository.save(equLog);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
public Integer selectEquipLogListCnt(EquipLog equipLog) {
|
||||||
|
return equipMapper.selectEquipLogListCnt(equipLog);
|
||||||
|
}
|
||||||
|
|
||||||
public List<EquipLog> selectEquipLogList(EquipLog equipLog) {
|
public String selectEquipFirstUserSeq(Equip equip) {
|
||||||
return equipMapper.selectEquipLogList(equipLog);
|
return equipMapper.selectEquipFirstUserSeq(equip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer selectEquipLogListCnt(EquipLog equipLog) {
|
@Transactional
|
||||||
return equipMapper.selectEquipLogListCnt(equipLog);
|
public Integer saveCellPhone(CellPhone cellPhone) {
|
||||||
}
|
return cellPhoneRepository.save(cellPhone).getPhoneKey();
|
||||||
|
}
|
||||||
|
|
||||||
public String selectEquipFirstUserSeq(Equip equip) {
|
public List<CellPhone> selectCellPhoneList(CellPhone cellPhone) {
|
||||||
return equipMapper.selectEquipFirstUserSeq(equip);
|
return equipMapper.selectCellPhoneList(cellPhone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
public Integer selectCellPhoneListCnt(CellPhone cellPhone) {
|
||||||
public Integer saveCellPhone(CellPhone cellPhone) {
|
return equipMapper.selectCellPhoneListCnt(cellPhone);
|
||||||
return cellPhoneRepository.save(cellPhone).getPhoneKey();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public List<CellPhone> selectCellPhoneList(CellPhone cellPhone) {
|
public CellPhone selectCellPhoneInfo(Integer phoneKey) {
|
||||||
return equipMapper.selectCellPhoneList(cellPhone);
|
return cellPhoneRepository.findById(phoneKey).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer selectCellPhoneListCnt(CellPhone cellPhone) {
|
@Transactional
|
||||||
return equipMapper.selectCellPhoneListCnt(cellPhone);
|
public void deleteCellPhone(List<CellPhone> cellPhone) {
|
||||||
}
|
cellPhoneRepository.deleteAll(cellPhone);
|
||||||
|
}
|
||||||
|
|
||||||
public CellPhone selectCellPhoneInfo(Integer phoneKey) {
|
public List<ParamMap> selectOrganList(UseList useList) {
|
||||||
return cellPhoneRepository.findById(phoneKey).orElse(null);
|
return equipMapper.selectOrganList(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void deleteCellPhone(List<CellPhone> cellPhone) {
|
public void saveUse(UseList useList) {
|
||||||
cellPhoneRepository.deleteAll(cellPhone);
|
useList.setYear(year);
|
||||||
}
|
Integer useNo = equipMapper.selectLastUseNo(useList);
|
||||||
|
if(useNo == null) {
|
||||||
|
useList.setUseNo(year+"-001");
|
||||||
|
useList.setVersionNo(1);
|
||||||
|
} else {
|
||||||
|
useList.setUseNo(year+"-"+String.format("%03d", useNo+1));
|
||||||
|
useList.setVersionNo(1);
|
||||||
|
}
|
||||||
|
useListRepository.save(useList);
|
||||||
|
|
||||||
public List<ParamMap> selectOrganList(UseList useList) {
|
}
|
||||||
return equipMapper.selectOrganList(useList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
public List<UseList> selectUseList(UseList useList) {
|
||||||
public void saveUse(UseList useList) {
|
return equipMapper.selectUseList(useList);
|
||||||
useList.setYear(year);
|
}
|
||||||
Integer useNo = equipMapper.selectLastUseNo(useList);
|
|
||||||
if(useNo == null) {
|
|
||||||
useList.setUseNo(year+"-001");
|
|
||||||
useList.setVersionNo(1);
|
|
||||||
} else {
|
|
||||||
useList.setUseNo(year+"-"+String.format("%03d", useNo+1));
|
|
||||||
useList.setVersionNo(1);
|
|
||||||
}
|
|
||||||
useListRepository.save(useList);
|
|
||||||
|
|
||||||
}
|
public Integer selectUseListCnt(UseList useList) {
|
||||||
|
return equipMapper.selectUseListCnt(useList);
|
||||||
|
}
|
||||||
|
|
||||||
public List<UseList> selectUseList(UseList useList) {
|
public UseList selectUseInfo(UseList useList) {
|
||||||
return equipMapper.selectUseList(useList);
|
return equipMapper.selectUseInfo(useList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer selectUseListCnt(UseList useList) {
|
@Transactional
|
||||||
return equipMapper.selectUseListCnt(useList);
|
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.setWrtTitle(useList.getWrtTitle());
|
||||||
|
useTmp.setWrtUserSeq(useList.getWrtUserSeq());
|
||||||
|
useTmp.setWrtNm(useList.getWrtNm());
|
||||||
|
useTmp.setWrtDt(useList.getWrtDt());
|
||||||
|
return useListRepository.save(useTmp);
|
||||||
|
|
||||||
public UseList selectUseInfo(UseList useList) {
|
}
|
||||||
return equipMapper.selectUseInfo(useList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
public List<UseList> selectUseHistoryList(UseList useList) {
|
||||||
public UseList updateUse(UseList useList) {
|
return equipMapper.selectUseHistoryList(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.setWrtTitle(useList.getWrtTitle());
|
|
||||||
useTmp.setWrtUserSeq(useList.getWrtUserSeq());
|
|
||||||
useTmp.setWrtNm(useList.getWrtNm());
|
|
||||||
useTmp.setWrtDt(useList.getWrtDt());
|
|
||||||
return useListRepository.save(useTmp);
|
|
||||||
|
|
||||||
}
|
@Transactional
|
||||||
|
public void useDelete(List<UseList> useList) {
|
||||||
public List<UseList> selectUseHistoryList(UseList useList) {
|
for(UseList use:useList) {
|
||||||
return equipMapper.selectUseHistoryList(useList);
|
useListRepository.deleteByMgtOrganAndUseNoAndUseType(use.getMgtOrgan(),use.getUseNo(),use.getUseType());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Transactional
|
|
||||||
public void useDelete(List<UseList> useList) {
|
|
||||||
for(UseList use:useList) {
|
|
||||||
useListRepository.deleteByMgtOrganAndUseNoAndUseType(use.getMgtOrgan(),use.getUseNo(),use.getUseType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer selectFirstWrtUserSeq(UseList useList) {
|
|
||||||
return useListRepository.getWrtUserSeq(useList.getMgtOrgan(),useList.getUseNo(),useList.getUseType());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public Integer selectFirstWrtUserSeq(UseList useList) {
|
||||||
|
return useListRepository.getWrtUserSeq(useList.getMgtOrgan(),useList.getUseNo(),useList.getUseType());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public EquipFile selectEquipFile(Equip equip) {
|
||||||
|
return equipFileRepository.findById(new EquipFileId(equip.getEquKey(), equip.getVersionNo())).orElse(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,9 +96,6 @@
|
||||||
.pl-15{
|
.pl-15{
|
||||||
padding-left: 15%;
|
padding-left: 15%;
|
||||||
}
|
}
|
||||||
.pl-23{
|
|
||||||
padding-left: 23%;
|
|
||||||
}
|
|
||||||
.w-30{
|
.w-30{
|
||||||
width: 30%!important;
|
width: 30%!important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".table_id").each(function(){
|
$(".table_id").each(function(){
|
||||||
var rows = $(".table_id:contains('"+$(this).text()+"')");
|
var rows = $(".table_id:contains('"+$(this).text()+"')");
|
||||||
|
|
||||||
if(rows.length > 1){
|
if(rows.length > 1){
|
||||||
rows.eq(0).attr("rowspan", rows.length);
|
rows.eq(0).attr("rowspan", rows.length);
|
||||||
rows.not(":eq(0)").remove();
|
rows.not(":eq(0)").remove();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#addEquip', function (){
|
$(document).on('click', '#addEquip', function (){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/equipEditModal',
|
url: '/equip/equipEditModal',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
|
|
@ -33,13 +33,13 @@ $(document).on('click', '#addEquip', function (){
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('change', '#equType', function (){
|
$(document).on('change', '#equType', function (){
|
||||||
const equType = $(this).val();
|
const equType = $(this).val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/equipTypeSelecBox',
|
url: '/equip/equipTypeSelecBox',
|
||||||
data: {
|
data: {
|
||||||
equType,
|
equType,
|
||||||
},
|
},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
|
|
@ -52,234 +52,234 @@ $(document).on('change', '#equType', function (){
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#saveEquip', function (){
|
$(document).on('click', '#saveEquip', function (){
|
||||||
if($('#mgtOrgan').val() == ''){
|
if($('#mgtOrgan').val() == ''){
|
||||||
alert("관리처를 선택해주세요.");
|
alert("관리처를 선택해주세요.");
|
||||||
$('#mgtOrgan').focus();
|
$('#mgtOrgan').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('#equType').val() == ''){
|
if($('#equType').val() == ''){
|
||||||
alert("분류를 선택해주세요.");
|
alert("분류를 선택해주세요.");
|
||||||
$('#equType').focus();
|
$('#equType').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('#detailType').val() == ''){
|
if($('#detailType').val() == ''){
|
||||||
alert("세부분류를 선택해주세요.");
|
alert("세부분류를 선택해주세요.");
|
||||||
$('#detailType').focus();
|
$('#detailType').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('#itemQty').val() == ''){
|
if($('#itemQty').val() == ''){
|
||||||
alert("수량을 입력해주세요.");
|
alert("수량을 입력해주세요.");
|
||||||
$('#itemQty').focus();
|
$('#itemQty').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("저장하시겠습니까?")){
|
||||||
document.getElementById("mgtOrgan").disabled = false;
|
document.getElementById("mgtOrgan").disabled = false;
|
||||||
let ajaxUrl = "/equip/saveEquip";
|
let ajaxUrl = "/equip/saveEquip";
|
||||||
const formData = new FormData($("#equipEditForm")[0]);
|
const formData = new FormData($("#equipEditForm")[0]);
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : formData,
|
data : formData,
|
||||||
url : ajaxUrl,
|
url : ajaxUrl,
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function() {
|
success : function() {
|
||||||
alert("저장되었습니다.");
|
alert("저장되었습니다.");
|
||||||
location.reload();
|
location.reload();
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("저장에 실패하였습니다.")
|
alert("저장에 실패하였습니다.")
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#equUpdateBtn', function (){
|
$(document).on('click', '#equUpdateBtn', function (){
|
||||||
if($('input:checkbox[name=equChk]:checked').length < 1){
|
if($('input:checkbox[name=equChk]:checked').length < 1){
|
||||||
alert("게시물을 선택해주세요")
|
alert("게시물을 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('input:checkbox[name=equChk]:checked').length > 1){
|
if($('input:checkbox[name=equChk]:checked').length > 1){
|
||||||
alert("한개만 선택해주세요")
|
alert("한개만 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const target = $('input:checkbox[name=equChk]:checked');
|
const target = $('input:checkbox[name=equChk]:checked');
|
||||||
const equKey = Number(target.parents('tr').find('.equKey').val());
|
const equKey = Number(target.parents('tr').find('.equKey').val());
|
||||||
showUpdateModal(equKey);
|
showUpdateModal(equKey);
|
||||||
})
|
})
|
||||||
|
|
||||||
function showUpdateModal(equKey){
|
function showUpdateModal(equKey){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/updatePage',
|
url: '/equip/updatePage',
|
||||||
data: {equKey: equKey},
|
data: {equKey: equKey},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
$("#equipEditModalContent").empty().append(html)
|
$("#equipModifyModalContent").empty().append(html)
|
||||||
$("#equipModifyModal").modal('show');
|
$("#equipModifyModal").modal('show');
|
||||||
$(".mStoredYear").datepicker({
|
$(".mStoredYear").datepicker({
|
||||||
minViewMode: 'years',
|
minViewMode: 'years',
|
||||||
format: "yyyy",
|
format: "yyyy",
|
||||||
language: "ko",
|
language: "ko",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#addImgBtn', function (){
|
$(document).on('click', '#addImgBtn', function (){
|
||||||
$("#imgUpload").remove();
|
$("#imgUpload").remove();
|
||||||
$("#addImgBtn").hide();
|
$("#addImgBtn").hide();
|
||||||
$("#imgUpdate").show();
|
$("#imgUpdate").show();
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function deleteImg(equKey,versionNo){
|
function deleteImg(equKey,versionNo){
|
||||||
$('#equipModifyForm').append('<input type="hidden" name="deleteFileKey" value="'+equKey+'">',
|
$('#equipModifyForm').append('<input type="hidden" name="deleteFileKey" value="'+equKey+'">',
|
||||||
'<input type="hidden" name="deleteFileVnum" value="'+versionNo+'">');
|
'<input type="hidden" name="deleteFileVnum" value="'+versionNo+'">');
|
||||||
$("#imgUpload").remove();
|
$("#imgUpload").remove();
|
||||||
$("#deleteImgBtn").hide();
|
$("#deleteImgBtn").hide();
|
||||||
$("#imgUpdate").show();
|
$("#imgUpdate").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#updateEquip', function (){
|
$(document).on('click', '#updateEquip', function (){
|
||||||
if($('#mMgtOrgan').val() == ''){
|
if($('#mMgtOrgan').val() == ''){
|
||||||
alert("관리처를 선택해주세요.");
|
alert("관리처를 선택해주세요.");
|
||||||
$('#mMgtOrgan').focus();
|
$('#mMgtOrgan').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('#mItemQty').val() == ''){
|
if($('#mItemQty').val() == ''){
|
||||||
alert("수량을 입력해주세요.");
|
alert("수량을 입력해주세요.");
|
||||||
$('#mItemQty').focus();
|
$('#mItemQty').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(confirm("수정하시겠습니까?")){
|
if(confirm("수정하시겠습니까?")){
|
||||||
document.getElementById("mMgtOrgan").disabled = false;
|
document.getElementById("mMgtOrgan").disabled = false;
|
||||||
let ajaxUrl = "/equip/updateEquip";
|
let ajaxUrl = "/equip/updateEquip";
|
||||||
const formData = new FormData($("#equipModifyForm")[0]);
|
const formData = new FormData($("#equipModifyForm")[0]);
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : formData,
|
data : formData,
|
||||||
url : ajaxUrl,
|
url : ajaxUrl,
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
alert("수정되었습니다.");
|
alert("수정되었습니다.");
|
||||||
showUpdateModal(data);
|
showUpdateModal(data);
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("수정에 실패하였습니다.")
|
alert("수정에 실패하였습니다.")
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#historyBtn', function (){
|
$(document).on('click', '#historyBtn', function (){
|
||||||
if($('input:checkbox[name=equChk]:checked').length < 1){
|
if($('input:checkbox[name=equChk]:checked').length < 1){
|
||||||
alert("게시물을 선택해주세요")
|
alert("장비를 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('input:checkbox[name=equChk]:checked').length > 1){
|
if($('input:checkbox[name=equChk]:checked').length > 1){
|
||||||
alert("한개만 선택해주세요")
|
alert("한개만 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const target = $('input:checkbox[name=equChk]:checked');
|
const target = $('input:checkbox[name=equChk]:checked');
|
||||||
const equKey = Number(target.parents('tr').find('.equKey').val());
|
const equKey = Number(target.parents('tr').find('.equKey').val());
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/historyView',
|
url: '/equip/historyView',
|
||||||
data: {equKey: equKey},
|
data: {equKey: equKey},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
$("#configEqu").empty().append(html)
|
$("#equipHistoryModalContent").empty().append(html)
|
||||||
$("#equipModifyModal").modal('show');
|
$("#equipHistoryModal").modal('show');
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '.historyInfoTr', function (){
|
$(document).on('click', '.historyInfoTr', function (){
|
||||||
$(this).find('.hisChk').prop('checked',true)
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
if($(this).find('.hisChk').prop('checked')){
|
if($(this).find('.hisChk').prop('checked')){
|
||||||
$('.hisChk').prop('checked',false);
|
$('.hisChk').prop('checked',false);
|
||||||
$(this).find('.hisChk').prop('checked',true)
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/HistoryDetail',
|
url: '/equip/HistoryDetail',
|
||||||
data: {
|
data: {
|
||||||
equKey : Number($(this).find(".equKey").val()),
|
equKey : Number($(this).find(".equKey").val()),
|
||||||
versionNo : Number($(this).find(".verNo").val())
|
versionNo : Number($(this).find(".verNo").val())
|
||||||
},
|
},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$('#vSosok').val(data.sosok);
|
$('#vSosok').val(data.sosok);
|
||||||
$('#vEquType').val(data.equType);
|
$('#vEquType').val(data.equType);
|
||||||
$('#vDetailType').val(data.detailType);
|
$('#vDetailType').val(data.detailType);
|
||||||
$('#vStoredYear').val(data.storedYear);
|
$('#vStoredYear').val(data.storedYear);
|
||||||
$('#vItemQty').val(data.itemQty);
|
$('#vItemQty').val(data.itemQty);
|
||||||
$('#vItemCondition').val(data.itemCondition);
|
$('#vItemCondition').val(data.itemCondition);
|
||||||
$('#vNote').val(data.note);
|
$('#vNote').val(data.note);
|
||||||
$('#vImgName').val(data.origNm);
|
$('#vImgName').attr("src", "/equip/getEquipImg?equKey="+data.equKey+"&versionNo="+data.versionNo);
|
||||||
|
$('#vImgName').show();
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
},
|
}
|
||||||
error:function(){
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#equDeleteBtn', function (){
|
$(document).on('click', '#equDeleteBtn', function (){
|
||||||
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
||||||
const checkArr = [];
|
const checkArr = [];
|
||||||
$('input:checkbox[name=equChk]:checked').each(function (idx, el){
|
$('input:checkbox[name=equChk]:checked').each(function (idx, el){
|
||||||
checkArr.push({});
|
checkArr.push({});
|
||||||
const target = $(el);
|
const target = $(el);
|
||||||
checkArr[idx].equKey = Number(target.parents('tr').find('.equKey').val());
|
checkArr[idx].equKey = Number(target.parents('tr').find('.equKey').val());
|
||||||
})
|
})
|
||||||
deleteEquip(checkArr);
|
deleteEquip(checkArr);
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#deleteEquip', function (){
|
$(document).on('click', '#deleteEquip', function (){
|
||||||
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
||||||
const checkArr = [];
|
const checkArr = [];
|
||||||
checkArr.push({});
|
checkArr.push({});
|
||||||
checkArr[0].equKey = Number($('#mEquKey').val());
|
checkArr[0].equKey = Number($('#mEquKey').val());
|
||||||
deleteEquip(checkArr);
|
deleteEquip(checkArr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function deleteEquip(checkArr){
|
function deleteEquip(checkArr){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : "/equip/epuipDelete",
|
url : "/equip/epuipDelete",
|
||||||
data : JSON.stringify(checkArr),
|
data : JSON.stringify(checkArr),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
beforeSend: function (xhr){
|
beforeSend: function (xhr){
|
||||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
},
|
},
|
||||||
success : function() {
|
success : function() {
|
||||||
alert("삭제처리 되었습니다.");
|
alert("삭제처리 되었습니다.");
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("삭제처리에 실패하였습니다");
|
alert("삭제처리에 실패하였습니다");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
|
|
@ -289,13 +289,13 @@ $(document).ready( function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#statusExcel', function (){
|
$(document).on('click', '#statusExcel', function (){
|
||||||
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
||||||
location.href='/equip/statusExcelDown'
|
location.href='/equip/statusExcelDown'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '.modalCloseBtn', function (){
|
$(document).on('click', '.modalCloseBtn', function (){
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,19 +7,19 @@ $(function(){
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#addPvre', function (){
|
$(document).on('click', '#addPvre', function (){
|
||||||
const useType = "PVRE";
|
const useType = "PVRE";
|
||||||
showEditModal(useType);
|
showEditModal(useType);
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#addQir', function (){
|
$(document).on('click', '#addQir', function (){
|
||||||
const useType = "QIR";
|
const useType = "QIR";
|
||||||
showEditModal(useType);
|
showEditModal(useType);
|
||||||
})
|
})
|
||||||
|
|
||||||
function showEditModal(useType){
|
function showEditModal(useType){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/useEditModal',
|
url: '/equip/useEditModal',
|
||||||
data: {useType: useType},
|
data: {useType: useType},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
|
|
@ -39,59 +39,59 @@ function showEditModal(useType){
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#saveUse', function (){
|
$(document).on('click', '#saveUse', function (){
|
||||||
if($('#mgtOrgan').val() == ""){
|
if($('#mgtOrgan').val() == ""){
|
||||||
alert("사용관서를 선택해주세요.");
|
alert("사용관서를 선택해주세요.");
|
||||||
$('#mgtOrgan').focus();
|
$('#mgtOrgan').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("저장하시겠습니까?")){
|
||||||
document.getElementById("mgtOrgan").disabled = false;
|
document.getElementById("mgtOrgan").disabled = false;
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#useFm")[0]);
|
const formData = new FormData($("#useFm")[0]);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : formData,
|
data : formData,
|
||||||
url : "/equip/saveUse",
|
url : "/equip/saveUse",
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
alert("저장되었습니다.");
|
alert("저장되었습니다.");
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("저장에 실패하였습니다.")
|
alert("저장에 실패하였습니다.")
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('change', '#detailType', function (){
|
$(document).on('change', '#detailType', function (){
|
||||||
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
||||||
$('#detailSelf').show();
|
$('#detailSelf').show();
|
||||||
}else{
|
}else{
|
||||||
$('#detailSelf').hide();
|
$('#detailSelf').hide();
|
||||||
$('#detailSelf').val('');
|
$('#detailSelf').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.useTr', function (event){
|
$(document).on('click', '.useTr', function (event){
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
if(!(target.className === "useChk" ||$(target).parents("td").length>0)){
|
if(!(target.className === "useChk" ||$(target).parents("td").length>0)){
|
||||||
const useNo = $(target).parent('tr').data("useno");
|
const useNo = $(target).parent('tr').data("useno");
|
||||||
const useType = $(target).parent('tr').data("usetype");
|
const useType = $(target).parent('tr').data("usetype");
|
||||||
const mgtOrgan = $(target).parent('tr').data("mgtorgan");
|
const mgtOrgan = $(target).parent('tr').data("mgtorgan");
|
||||||
showMdifyModal(useNo,useType,mgtOrgan);
|
showModifyModal(useNo,useType,mgtOrgan);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function showMdifyModal(useNo,useType,mgtOrgan){
|
function showModifyModal(useNo,useType,mgtOrgan){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/useModifyModal',
|
url: '/equip/useModifyModal',
|
||||||
data: {useNo: useNo,
|
data: {useNo: useNo,
|
||||||
useType: useType,
|
useType: useType,
|
||||||
mgtOrgan: mgtOrgan},
|
mgtOrgan: mgtOrgan},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
|
|
@ -103,10 +103,10 @@ function showMdifyModal(useNo,useType,mgtOrgan){
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
if($('#mDetailType').val() != 'PVREUSE007' && $('#mDetailType').val() != 'QIRUSE006'){
|
if($('#mDetailType').val() != 'PVREUSE007' && $('#mDetailType').val() != 'QIRUSE006'){
|
||||||
$('#mDetailSelf').hide();
|
$('#mDetailSelf').hide();
|
||||||
}else{
|
}else{
|
||||||
$('#mDetailSelf').show();
|
$('#mDetailSelf').show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
|
|
@ -115,100 +115,100 @@ function showMdifyModal(useNo,useType,mgtOrgan){
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('change', '#mDetailType', function (){
|
$(document).on('change', '#mDetailType', function (){
|
||||||
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
|
||||||
$('#mDetailSelf').show();
|
$('#mDetailSelf').show();
|
||||||
}else{
|
}else{
|
||||||
$('#mDetailSelf').hide();
|
$('#mDetailSelf').hide();
|
||||||
$('#mDetailSelf').val('');
|
$('#mDetailSelf').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#updateUse', function (){
|
$(document).on('click', '#updateUse', function (){
|
||||||
|
|
||||||
if(confirm("수정하시겠습니까?")){
|
if(confirm("수정하시겠습니까?")){
|
||||||
document.getElementById("mMgtOrgan").disabled = false;
|
document.getElementById("mMgtOrgan").disabled = false;
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#useUpdateFm")[0]);
|
const formData = new FormData($("#useUpdateFm")[0]);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : formData,
|
data : formData,
|
||||||
url : "/equip/updateUse",
|
url : "/equip/updateUse",
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
alert("수정되었습니다.");
|
alert("수정되었습니다.");
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
showMdifyModal(data.useNo,data.useType,data.mgtOrgan);
|
showModifyModal(data.useNo,data.useType,data.mgtOrgan);
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("수정에 실패하였습니다.")
|
alert("수정에 실패하였습니다.")
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#historyBtn', function (){
|
$(document).on('click', '#historyBtn', function (){
|
||||||
if($('input:checkbox[name=useChk]:checked').length < 1){
|
if($('input:checkbox[name=useChk]:checked').length < 1){
|
||||||
alert("게시물을 선택해주세요")
|
alert("게시물을 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($('input:checkbox[name=useChk]:checked').length > 1){
|
if($('input:checkbox[name=useChk]:checked').length > 1){
|
||||||
alert("한개만 선택해주세요")
|
alert("한개만 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const target = $('input:checkbox[name=useChk]:checked');
|
const target = $('input:checkbox[name=useChk]:checked');
|
||||||
const useNo = $(target).parent().parent('tr').data("useno");
|
const useNo = $(target).parent().parent('tr').data("useno");
|
||||||
const useType = $(target).parent().parent('tr').data("usetype");
|
const useType = $(target).parent().parent('tr').data("usetype");
|
||||||
const mgtOrgan = $(target).parent().parent('tr').data("mgtorgan");
|
const mgtOrgan = $(target).parent().parent('tr').data("mgtorgan");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/useHistory',
|
url: '/equip/useHistory',
|
||||||
data: {useNo: useNo,
|
data: {useNo: useNo,
|
||||||
useType: useType,
|
useType: useType,
|
||||||
mgtOrgan: mgtOrgan},
|
mgtOrgan: mgtOrgan},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
$("#useEditModalContent").empty().append(html);
|
$("#useEditModalContent").empty().append(html);
|
||||||
$("#useEditModal").modal('show');
|
$("#useEditModal").modal('show');
|
||||||
$('#vDetailSelf').hide();
|
$('#vDetailSelf').hide();
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '.historyTr', function (event){
|
$(document).on('click', '.historyTr', function (event){
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
$(this).find('.hisChk').prop('checked',true)
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
if($(this).find('.hisChk').prop('checked')){
|
if($(this).find('.hisChk').prop('checked')){
|
||||||
$('.hisChk').prop('checked',false);
|
$('.hisChk').prop('checked',false);
|
||||||
$(this).find('.hisChk').prop('checked',true)
|
$(this).find('.hisChk').prop('checked',true)
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/equip/HistoryView',
|
url: '/equip/HistoryView',
|
||||||
data: {
|
data: {
|
||||||
useNo: $(target).parents('tr').data("useno"),
|
useNo: $(target).parents('tr').data("useno"),
|
||||||
versionNo : Number($(target).parents('tr').data("verno")),
|
versionNo : Number($(target).parents('tr').data("verno")),
|
||||||
useType : $(target).parents('tr').data("usetype"),
|
useType : $(target).parents('tr').data("usetype"),
|
||||||
mgtOrgan : $(target).parents('tr').data("mgtorgan")
|
mgtOrgan : $(target).parents('tr').data("mgtorgan")
|
||||||
},
|
},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$('#vSosok').val(data.sosok);
|
$('#vSosok').val(data.sosok);
|
||||||
$('#vUseDt').val(data.useDt);
|
$('#vUseDt').val(data.useDt);
|
||||||
$('#vDetailType').val(data.detailTypeName);
|
$('#vDetailType').val(data.detailTypeName);
|
||||||
if(data.detailType != 'PVREUSE007' && data.detailType != 'QIRUSE006'){
|
if(data.detailType != 'PVREUSE007' && data.detailType != 'QIRUSE006'){
|
||||||
$('#vDetailSelf').hide();
|
$('#vDetailSelf').hide();
|
||||||
$('#vDetailSelf').val('');
|
$('#vDetailSelf').val('');
|
||||||
}else{
|
}else{
|
||||||
$('#vDetailSelf').show();
|
$('#vDetailSelf').show();
|
||||||
$('#vDetailSelf').val(data.detailSelf);
|
$('#vDetailSelf').val(data.detailSelf);
|
||||||
}
|
}
|
||||||
$('#vCnt').val(data.peopleCnt);
|
$('#vCnt').val(data.peopleCnt);
|
||||||
$('#vDescription').val(data.description);
|
$('#vDescription').val(data.description);
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
|
|
@ -217,50 +217,50 @@ $(document).on('click', '.historyTr', function (event){
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#deleteUse', function (){
|
$(document).on('click', '#deleteUse', function (){
|
||||||
if($('input:checkbox[name=useChk]:checked').length < 1){
|
if($('input:checkbox[name=useChk]:checked').length < 1){
|
||||||
alert("삭제할 게시물을 선택해주세요")
|
alert("삭제할 게시물을 선택해주세요")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
|
||||||
const checkArr = [];
|
const checkArr = [];
|
||||||
$('input:checkbox[name=useChk]:checked').each(function (idx, el){
|
$('input:checkbox[name=useChk]:checked').each(function (idx, el){
|
||||||
checkArr.push({});
|
checkArr.push({});
|
||||||
const target = $(el);
|
const target = $(el);
|
||||||
checkArr[idx].useNo = target.parents('tr').data("useno");
|
checkArr[idx].useNo = target.parents('tr').data("useno");
|
||||||
checkArr[idx].mgtOrgan = target.parents('tr').data("mgtorgan");
|
checkArr[idx].mgtOrgan = target.parents('tr').data("mgtorgan");
|
||||||
checkArr[idx].useType = target.parents('tr').data("usetype");
|
checkArr[idx].useType = target.parents('tr').data("usetype");
|
||||||
})
|
})
|
||||||
deleteUse(checkArr);
|
deleteUse(checkArr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function deleteUse(checkArr){
|
function deleteUse(checkArr){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : "/equip/useDelete",
|
url : "/equip/useDelete",
|
||||||
data : JSON.stringify(checkArr),
|
data : JSON.stringify(checkArr),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
beforeSend: function (xhr){
|
beforeSend: function (xhr){
|
||||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
},
|
},
|
||||||
success : function() {
|
success : function() {
|
||||||
alert("삭제처리 되었습니다.");
|
alert("삭제처리 되었습니다.");
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("삭제처리에 실패하였습니다");
|
alert("삭제처리에 실패하였습니다");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#goExcel', function (){
|
$(document).on('click', '#goExcel', function (){
|
||||||
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
if(confirm("엑셀로 다운로드 하시겠습니까?")){
|
||||||
$('input[name=excel]').val('Y');
|
$('input[name=excel]').val('Y');
|
||||||
$('#searchFm').submit();
|
$('#searchFm').submit();
|
||||||
$('input[name=excel]').val('');
|
$('input[name=excel]').val('');
|
||||||
}else{
|
}else{
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
|
|
@ -270,5 +270,5 @@ $(document).ready( function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#closeModal', function (){
|
$(document).on('click', '#closeModal', function (){
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<input type="hidden" name="wrtTitle" th:value="${info.wrtTitle}">
|
<input type="hidden" name="wrtTitle" th:value="${info.wrtTitle}">
|
||||||
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
||||||
<input type="hidden" name="wrtNm" th:value="${info.wrtNm}">
|
<input type="hidden" name="wrtNm" th:value="${info.wrtNm}">
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-4 col-form-label text-center">사용자</label>
|
<label for="ogCd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용자</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" id="pUserSeq" name="pUserSeq">
|
<select class="form-select form-select-sm" id="pUserSeq" name="pUserSeq">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
|
|
@ -51,34 +51,34 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">전화번호</label>
|
<label for="cat1Cd" 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" id="telNo" name="telNo" th:value="${info.telNo}" placeholder="EX: 010-0000-0000">
|
<input type="text" class="form-control form-control-sm" id="telNo" name="telNo" th:value="${info.telNo}" placeholder="EX: 010-0000-0000">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<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" id="extMail" name="extMail" th:value="${info.extMail}" placeholder="EX: test@test.com">
|
<input type="text" class="form-control form-control-sm" id="extMail" name="extMail" th:value="${info.extMail}" placeholder="EX: test@test.com">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">웹엑스<br>미팅번호</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" id="webexNo" name="webexNo" th:value="${info.webexNo}">
|
<input type="text" class="form-control form-control-sm" id="webexNo" name="webexNo" th:value="${info.webexNo}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">카카오톡 ID</label>
|
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">카카오톡 ID</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control" id="katalkId" name="katalkId" th:value="${info.katalkId}">
|
<input type="text" class="form-control form-control-sm" id="katalkId" name="katalkId" th:value="${info.katalkId}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-1">
|
||||||
<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" id="description" name="description" th:value="${info.description}">
|
<input type="text" class="form-control form-control-sm" id="description" name="description" th:value="${info.description}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,8 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div class="modal fade" id="cellPhoneEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
<div class="modal fade" id="cellPhoneEditModal" 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-dialog-scrollable">
|
||||||
<div class="modal-content" id="cellPhoneEditModalContent">
|
<div class="modal-content" id="cellPhoneEditModalContent">
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="tab-content bg-white border border-top-0" id="configCellPhone">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!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 bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white" id="menuEditModalLabel">등록</h5>
|
<h5 class="modal-title text-white" id="menuEditModalLabel">장비 등록</h5>
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
@ -43,13 +43,13 @@
|
||||||
<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" readonly>
|
<input type="text" class="form-control form-control-sm storedYear" name="storedYear" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="number" class="form-control" id="itemQty" name="itemQty" placeholder="수량 직접입력">
|
<input type="number" class="form-control form-control-sm" id="itemQty" name="itemQty" placeholder="수량 직접입력">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
|
|
@ -66,13 +66,13 @@
|
||||||
<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" name="note">
|
<input type="text" class="form-control form-control-sm" name="note">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="file" class="form-control" name="file" accept="image/gif,image/jpeg,image/png">
|
<input type="file" class="form-control form-control-sm" name="file" accept="image/gif,image/jpeg,image/png">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -1,103 +1,93 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
<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 bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white">수정이력</h5>
|
<h5 class="modal-title text-white">수정이력</h5>
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body text-center">
|
||||||
<div class="row mx-0">
|
<div class="card">
|
||||||
<div class="col-100 card text-center">
|
<div class="card-body">
|
||||||
<div class="card-body">
|
<div class="row justify-content-start">
|
||||||
<div class="row">
|
<div class="col-4">
|
||||||
</div>
|
<table class="table table-sm table-hover table-bordered" id="categoryTable">
|
||||||
<div class="row justify-content-start">
|
<thead>
|
||||||
<div class="col-4">
|
<tr class="table-secondary">
|
||||||
<div class="card">
|
<th></th>
|
||||||
<div class="card-body">
|
<th>작성자</th>
|
||||||
<div class="row">
|
<th>등록일</th>
|
||||||
<table class="table table-sm table-hover table-bordered" id="categoryTable">
|
</tr>
|
||||||
<thead>
|
</thead>
|
||||||
<tr class="table-secondary">
|
<tbody class="table-group-divider overflow-scroll">
|
||||||
<th></th>
|
<tr class="historyInfoTr" th:each="equInfo:${equList}">
|
||||||
<th>작성자</th>
|
<td><input type="checkbox" class="hisChk">
|
||||||
<th>등록일</th>
|
<input type="hidden" class="equKey" th:value="${equInfo.equKey}">
|
||||||
</tr>
|
<input type="hidden" class="verNo" th:value="${equInfo.versionNo}" >
|
||||||
</thead>
|
</td>
|
||||||
<tbody class="table-group-divider overflow-scroll">
|
<td th:text="|${equInfo.wrtTitle} ${equInfo.wrtNm}|"></td>
|
||||||
<tr class="historyInfoTr" th:each="equInfo:${equList}">
|
<td th:text="${#temporals.format(equInfo.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||||
<td><input type="checkbox" class="hisChk">
|
</tr>
|
||||||
<input type="hidden" class="equKey" th:value="${equInfo.equKey}">
|
</tbody>
|
||||||
<input type="hidden" class="verNo" th:value="${equInfo.versionNo}" >
|
</table>
|
||||||
</td>
|
</div>
|
||||||
<td th:text="|${equInfo.wrtTitle} ${equInfo.wrtNm}|"></td>
|
<div class="col-8" id="valueDiv">
|
||||||
<td th:text="${#temporals.format(equInfo.wrtDt, 'yyyy-MM-dd')}"></td>
|
<div class="row mb-3">
|
||||||
</tr>
|
<label for="vSosok" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
||||||
</tbody>
|
<div class="col-sm-6">
|
||||||
</table>
|
<input type="text" class="form-control form-control-sm" id="vSosok" readonly>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8" id="valueDiv">
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
<label for="vEquType" 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" id="vSosok" readonly>
|
<input type="text" class="form-control form-control-sm" id="vEquType" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">분류</label>
|
<label for="vDetailType" 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" id="vEquType" readonly>
|
<input type="text" class="form-control form-control-sm" id="vDetailType" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">세부분류</label>
|
<label for="vStoredYear" 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" id="vDetailType" readonly>
|
<input type="text" class="form-control form-control-sm" id="vStoredYear" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="vItemQty" 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" id="vStoredYear" readonly>
|
<input type="text" class="form-control form-control-sm" id="vItemQty" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="vItemCondition" 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" id="vItemQty" readonly>
|
<input type="text" class="form-control form-control-sm" id="vItemCondition" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">상태</label>
|
<label for="vNote" 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" id="vItemCondition" readonly>
|
<input type="text" class="form-control form-control-sm" id="vNote" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="vImgName" 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" id="vNote" readonly>
|
<img id="vImgName" src="" alt="첨부이미지" style="width: 100%; height: 100%; display: none;" />
|
||||||
</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="vImgName" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="modal-footer justify-content-between bg-light">
|
|
||||||
<div class="col-auto">
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -13,24 +13,31 @@
|
||||||
<div class="row mx-0">
|
<div class="row mx-0">
|
||||||
<div class="col-12 card bg-light text-center">
|
<div class="col-12 card bg-light text-center">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form method="get" th:action="@{/equip/List}">
|
<div class="row justify-content-between py-1">
|
||||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
<div class="col-auto">
|
||||||
<input type="hidden" name="detailType" th:value="${searchParams.detailType}">
|
<form method="get" th:action="@{/equip/List}">
|
||||||
<div class="row justify-content-between py-1">
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
<div class="col-auto">
|
<input type="hidden" name="detailType" th:value="${searchParams.detailType}">
|
||||||
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
<div class="col-row">
|
||||||
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
<div class="col-auto">
|
||||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
|
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
||||||
</th:block>
|
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||||
</select>
|
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
|
||||||
</div>
|
</th:block>
|
||||||
<div class="col-auto">
|
</select>
|
||||||
<div class="row justify-content-end">
|
</div>
|
||||||
<input type="submit" class="btn btn-sm btn-primary col-auto d-none" id="searchBtn" value="검색">
|
<div class="col-auto">
|
||||||
|
<div class="row justify-content-end">
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary col-auto d-none" id="searchBtn" value="검색">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="col-auto">
|
||||||
|
<a class="btn btn-info" href="/equip/equipStatus">돌아가기</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row justify-content-start">
|
<div class="row justify-content-start">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
@ -113,15 +120,15 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div class="modal fade" id="equipModifyModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
<div class="modal fade" id="equipModifyModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="equipModifyModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="equipModifyModalContent">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="equipHistoryModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="equipHistoryModalLabel" 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="equipEditModalContent">
|
<div class="modal-content" id="equipHistoryModalContent">
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="tab-content border bg-white border-top-0" id="configEqu">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!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 bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white" id="menuEditModalLabel">수정</h5>
|
<h5 class="modal-title text-white" id="menuEditModalLabel">장비 수정</h5>
|
||||||
<button type="button" class="btn-close modalCloseBtn f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close modalCloseBtn f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
@ -11,89 +11,93 @@
|
||||||
<input type="hidden" id="mEquKey" name="equKey" th:value="${equInfo.equKey}">
|
<input type="hidden" id="mEquKey" name="equKey" th:value="${equInfo.equKey}">
|
||||||
<input type="hidden" name="versionNo" th:value="${equInfo.versionNo}">
|
<input type="hidden" name="versionNo" th:value="${equInfo.versionNo}">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
<label for="mMgtOrgan" class="col-sm-4 col-form-label col-form-label-sm text-center">관리처</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.mgtOrgan}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.mgtOrgan}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">분류</label>
|
<label for="equType" class="col-sm-4 col-form-label col-form-label-sm text-center">분류</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" id="equType" name="equType">
|
<select class="form-select form-select-sm" id="equType" name="equType">
|
||||||
<option value="">-분류 선택-</option>
|
<option value="">-분류 선택-</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('IT')}">
|
<th:block th:each="commonCode:${session.commonCode.get('IT')}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.equType}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.equType}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">세부분류</label>
|
<label for="detailType" class="col-sm-4 col-form-label col-form-label-sm text-center">세부분류</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<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(equInfo.equType)}">
|
<th:block th:each="commonCode:${session.commonCode.get(equInfo.equType)}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.detailType}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.detailType}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="storedYear" 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}" readonly>
|
<input type="text" class="form-control form-control-sm mStoredYear" id="storedYear" name="storedYear" th:value="${equInfo.storedYear}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="mItemQty" 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="number" class="form-control" id="mItemQty" name="itemQty" th:value="${equInfo.itemQty}" placeholder="수량 직접입력">
|
<input type="number" class="form-control form-control-sm" id="mItemQty" name="itemQty" th:value="${equInfo.itemQty}" placeholder="수량 직접입력">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">상태</label>
|
<label for="itemCondition" class="col-sm-4 col-form-label col-form-label-sm text-center">상태</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" name="itemCondition">
|
<select class="form-select form-select-sm" id="itemCondition" name="itemCondition">
|
||||||
<option value="">상태 선택</option>
|
<option value="">상태 선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('ITCON')}">
|
<th:block th:each="commonCode:${session.commonCode.get('ITCON')}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.itemCondition}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${equInfo.itemCondition}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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="note" 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" name="note" th:value="${equInfo.note}">
|
<input type="text" class="form-control form-control-sm" id="note" name="note" th:value="${equInfo.note}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">장비사진</label>
|
<label for="imgUpload" class="col-sm-4 col-form-label col-form-label-sm text-center">장비사진</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div id="imgUpload">
|
<div id="imgUpload">
|
||||||
<input type="text" name="noUpdateImg" class="form-control" th:value="${equInfo.origNm}" readonly th:if="${not #strings.isEmpty(equInfo.origNm)}">
|
<input type="text" name="noUpdateImg" class="form-control form-control-sm" th:value="${equInfo.origNm}" readonly th:if="${not #strings.isEmpty(equInfo.origNm)}">
|
||||||
<input type="text" class="form-control" value="등록된 사진이 없습니다." readonly th:if="${#strings.isEmpty(equInfo.origNm)}">
|
<input type="text" class="form-control form-control-sm" value="등록된 사진이 없습니다." readonly th:if="${#strings.isEmpty(equInfo.origNm)}">
|
||||||
</div>
|
</div>
|
||||||
<div id="imgUpdate" style="display:none">
|
<div id="imgUpdate" style="display:none">
|
||||||
<input type="file" class="form-control" name="file" accept="image/gif,image/jpeg,image/png">
|
<input type="file" class="form-control form-control-sm" name="file" accept="image/gif,image/jpeg,image/png">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1">
|
<div class="col-sm-1">
|
||||||
<input type="button" class="btn btn-danger" id="deleteImgBtn" value="X" th:if="${not #strings.isEmpty(equInfo.origNm)}" th:attr="onclick=|deleteImg('${equInfo.equKey}','${equInfo.versionNo}')|">
|
<button type="button" class="btn btn-sm btn-danger" id="deleteImgBtn" th:if="${not #strings.isEmpty(equInfo.origNm)}" th:attr="onclick=|deleteImg('${equInfo.equKey}','${equInfo.versionNo}')|">
|
||||||
<input type="button" class="btn btn-primary" id="addImgBtn" value="+" th:if="${#strings.isEmpty(equInfo.origNm)}">
|
<i class="bi bi-x"></i>
|
||||||
</div>
|
</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="addImgBtn" th:if="${#strings.isEmpty(equInfo.origNm)}">
|
||||||
|
<i class="bi bi-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer justify-content-between bg-light">
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button type="button" class="btn btn-secondary modalCloseBtn" data-bs-dismiss="modal">닫기</button>
|
<button type="button" class="btn btn-secondary modalCloseBtn" data-bs-dismiss="modal">닫기</button>
|
||||||
<button type="button" class="btn btn-danger" id="deleteEquip" th:if="${accessAuth eq 'ACC003'} or ${wrtUserSeq eq userSeq}">삭제</button>
|
<button type="button" class="btn btn-danger" id="deleteEquip" th:if="${accessAuth eq 'ACC003'} or ${wrtUserSeq eq userSeq}">삭제</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button type="button" class="btn btn-warning" id="updateEquip" th:if="${accessAuth eq 'ACC003'} or ${wrtUserSeq eq userSeq}">수정</button>
|
<button type="button" class="btn btn-warning" id="updateEquip" th:if="${accessAuth eq 'ACC003'} or ${wrtUserSeq eq userSeq}">수정</button>
|
||||||
|
|
|
||||||
|
|
@ -126,14 +126,8 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div class="modal fade" id="equipEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
<div class="modal fade" id="equipEditModal" 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-dialog-scrollable">
|
||||||
<div class="modal-content" id="equipEditModalContent">
|
<div class="modal-content" id="equipEditModalContent">
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="tab-content bg-white border border-top-0" id="configInfo">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
<option value="">-세부분류 선택-</option>
|
<option value="">-세부분류 선택-</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get(equType)}">
|
<th:block th:each="commonCode:${session.commonCode.get(equType)}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -142,14 +142,8 @@
|
||||||
</main>
|
</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 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-dialog-scrollable">
|
||||||
<div class="modal-content" id="useEditModalContent">
|
<div class="modal-content" id="useEditModalContent">
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="tab-content bg-white border border-top-0" id="configCellPhone">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -142,14 +142,8 @@
|
||||||
</main>
|
</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 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-dialog-scrollable">
|
||||||
<div class="modal-content" id="useEditModalContent">
|
<div class="modal-content" id="useEditModalContent">
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="tab-content bg-white border border-top-0" id="configCellPhone">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,63 +2,63 @@
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white" id="menuEditModalLabel" th:text="${useType eq 'PVRE'?'휴대용 녹화장비 사용대장 등록':'방역조사실 사용대장 등록'}"></h5>
|
<h5 class="modal-title text-white" id="menuEditModalLabel" th:text="${useType eq 'PVRE'?'휴대용 녹화장비 사용대장 등록':'방역조사실 사용대장 등록'}"></h5>
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body pl-23">
|
<div class="modal-body">
|
||||||
<form id="useFm" method="post">
|
<form id="useFm" method="post">
|
||||||
<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}"/>
|
||||||
<input type="hidden" name="useType" th:value="${useType}">
|
<input type="hidden" name="useType" th:value="${useType}">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용관서</label>
|
<label for="mgtOrgan" class="col-sm-4 col-form-label col-form-label-sm text-center">사용관서</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6">
|
||||||
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="organList:${organList}">
|
<th:block th:each="organList:${organList}">
|
||||||
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq userOrgan}"></option>
|
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq userOrgan}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용일시</label>
|
<label for="useDt" class="col-sm-4 col-form-label col-form-label-sm text-center">사용일시</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control" id="useDt" name="useDt" readonly>
|
<input type="text" class="form-control form-control-sm" id="useDt" name="useDt" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용사유</label>
|
<label for="detailType" class="col-sm-4 col-form-label col-form-label-sm text-center">사용사유</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6">
|
||||||
<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:if="${useType eq 'PVRE'}">
|
<th:block th:if="${useType eq 'PVRE'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
|
<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:block th:if="${useType eq 'QIR'}">
|
<th:block th:if="${useType eq 'QIR'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
|
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
|
||||||
<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>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control" id="detailSelf" name="detailSelf">
|
<input type="text" class="form-control form-control-sm" id="detailSelf" name="detailSelf">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용인원</label>
|
<label for="peopleCnt" class="col-sm-4 col-form-label col-form-label-sm text-center">사용인원</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6">
|
||||||
<input type="number" class="form-control" id="peopleCnt" name="peopleCnt">
|
<input type="number" class="form-control form-control-sm" id="peopleCnt" name="peopleCnt">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">비고</label>
|
<label for="description" class="col-sm-4 col-form-label col-form-label-sm text-center">비고</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control" id="description" name="description">
|
<input type="text" class="form-control form-control-sm" id="description" name="description">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer justify-content-between bg-light">
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
|
|
|
||||||
|
|
@ -7,62 +7,62 @@
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close f-invert" id="closeModal" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" id="closeModal" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body pl-23">
|
<div class="modal-body">
|
||||||
<form id="useUpdateFm" method="post">
|
<form id="useUpdateFm" method="post">
|
||||||
<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}"/>
|
||||||
<input type="hidden" name="useNo" th:value="${info.useNo}">
|
<input type="hidden" name="useNo" th:value="${info.useNo}">
|
||||||
<input type="hidden" name="useType" th:value="${info.useType}">
|
<input type="hidden" name="useType" th:value="${info.useType}">
|
||||||
<input type="hidden" name="versionNo" th:value="${info.versionNo}">
|
<input type="hidden" name="versionNo" th:value="${info.versionNo}">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용관서</label>
|
<label for="mMgtOrgan" class="col-sm-4 col-form-label col-form-label-sm text-center">사용관서</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6 ">
|
||||||
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" disabled>
|
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" disabled>
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="organList:${organList}">
|
<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>
|
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq info.mgtOrgan}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용일시</label>
|
<label for="mUseDt" class="col-sm-4 col-form-label col-form-label-sm text-center">사용일시</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6 ">
|
||||||
<input type="text" class="form-control" id="mUseDt" name="useDt" th:value="${info.useDt}" readonly>
|
<input type="text" class="form-control form-control-sm" id="mUseDt" name="useDt" th:value="${info.useDt}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용사유</label>
|
<label for="mDetailType" class="col-sm-4 col-form-label col-form-label-sm text-center">사용사유</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6 ">
|
||||||
<select class="form-select form-select-sm" id="mDetailType" name="detailType">
|
<select class="form-select form-select-sm" id="mDetailType" name="detailType">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:if="${info.useType eq 'PVRE'}">
|
<th:block th:if="${info.useType eq 'PVRE'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
|
<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>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:if="${info.useType eq 'QIR'}">
|
<th:block th:if="${info.useType eq 'QIR'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
|
<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>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control" id="mDetailSelf" name="detailSelf" th:value="${info.detailSelf}">
|
<input type="text" class="form-control form-control-sm" id="mDetailSelf" name="detailSelf" th:value="${info.detailSelf}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">사용인원</label>
|
<label for="mPeopleCnt" class="col-sm-4 col-form-label col-form-label-sm text-center">사용인원</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6 ">
|
||||||
<input type="number" class="form-control" id="mPeopleCnt" name="peopleCnt" th:value="${info.peopleCnt}">
|
<input type="number" class="form-control form-control-sm" id="mPeopleCnt" name="peopleCnt" th:value="${info.peopleCnt}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="ogCd" class="col-sm-3 col-form-label text-center">비고</label>
|
<label for="mDescription" class="col-sm-4 col-form-label col-form-label-sm text-center">비고</label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-6 ">
|
||||||
<input type="text" class="form-control" id="mDescription" name="description" th:value="${info.description}">
|
<input type="text" class="form-control form-control-sm" id="mDescription" name="description" th:value="${info.description}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer justify-content-between bg-light">
|
<div class="modal-footer justify-content-between bg-light">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue