jiHyung 2022-10-19 18:01:19 +09:00
commit f85c38c194
40 changed files with 1449 additions and 455 deletions

View File

@ -7,8 +7,6 @@ import com.dbnt.faisp.equip.model.Equip;
import com.dbnt.faisp.equip.model.EquipLog;
import com.dbnt.faisp.equip.model.UseList;
import com.dbnt.faisp.equip.service.EquipService;
import com.dbnt.faisp.fipTarget.model.PartInfo;
import com.dbnt.faisp.fipTarget.service.FipTargetService;
import com.dbnt.faisp.organMgt.service.OrganConfigService;
import com.dbnt.faisp.userInfo.model.UserInfo;
import com.dbnt.faisp.userInfo.service.UserInfoService;
@ -42,7 +40,6 @@ public class EquipController {
private final EquipService equipService;
private final AuthMgtService authMgtService;
private final OrganConfigService organConfigService;
private final FipTargetService fipTargetService;
private final UserInfoService userInfoService;
@GetMapping("/equipStatus")
@ -142,7 +139,6 @@ public class EquipController {
@PostMapping("/epuipDelete")
public void epuipDelete(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<Equip> equip){
equipService.equipDelete(equip,loginUser);
}
@GetMapping("/getEquipImg")
@ -296,7 +292,22 @@ public class EquipController {
ModelAndView mav = new ModelAndView("equip/pvreUseList");
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
useList.setUseType("PVRE");
//엑셀다운
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
String sheetName = "휴대용 녹화장비 사용 대장";
String excelFileName = "휴대용 녹화장비 사용 대장";
List<UseList> useExcelList= equipService.selectUseList(useList);
try {
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
} catch (IOException e) {
}
return null;
}
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
@ -304,21 +315,27 @@ public class EquipController {
mav.addObject("useList", equipService.selectUseList(useList));
useList.setContentCnt(equipService.selectUseListCnt(useList));
useList.setPaginationInfo();
mav.addObject("organList", equipService.selectOrganList(useList));
mav.addObject("searchParams", useList);
return mav;
}
@GetMapping("/pvreEditModal")
public ModelAndView pvreEditModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
ModelAndView mav = new ModelAndView("equip/pvreEditModal");
@GetMapping("/useEditModal")
public ModelAndView useEditModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
ModelAndView mav = new ModelAndView("equip/useEditModal");
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
mav.addObject("organList", equipService.selectOrganList(useList));
mav.addObject("userOrgan", loginUser.getOgCd());
mav.addObject("useType", "PVRE");
mav.addObject("useType", useList.getUseType());
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
String accessAuth;
if(useList.getUseType().equals("PVRE")) {
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
}else if(useList.getUseType().equals("QIR")) {
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
}
return mav;
}
@ -332,6 +349,85 @@ public class EquipController {
equipService.saveUse(useList);
}
@GetMapping("/useModifyModal")
public ModelAndView useModifyModal(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
ModelAndView mav = new ModelAndView("equip/useModifyModal");
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
mav.addObject("organList", equipService.selectOrganList(useList));
mav.addObject("info", equipService.selectUseInfo(useList));
//메뉴권한 확인
String accessAuth;
if(useList.getUseType().equals("PVRE")) {
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/pvreUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
}else if(useList.getUseType().equals("QIR")) {
accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
}
return mav;
}
@PostMapping("/updateUse")
public UseList uadateUse(@AuthenticationPrincipal UserInfo loginUser,UseList useList){
useList.setWrtOrgan(loginUser.getOgCd());
useList.setWrtPart(loginUser.getOfcCd());
useList.setWrtUserSeq(loginUser.getUserSeq());
useList.setWrtNm(loginUser.getUserId());
useList.setWrtDt(LocalDateTime.now());
return equipService.updateUse(useList);
}
@GetMapping("/useHistory")
public ModelAndView useHistory(@AuthenticationPrincipal UserInfo loginUser,UseList useList) {
ModelAndView mav = new ModelAndView("equip/useHistory");
mav.addObject("infoList", equipService.selectUseInfoList(useList));
return mav;
}
@GetMapping("/HistoryView")
@ResponseBody
public UseList HistoryView(UseList useList){
return equipService.selectUseInfo(useList);
}
@PostMapping("/useDelete")
public void useDelete(@RequestBody List<UseList> useList){
equipService.useDelete(useList);
}
@GetMapping("/qirUseList")
public ModelAndView qirUseList(@AuthenticationPrincipal UserInfo loginUser,UseList useList,HttpServletResponse response) {
ModelAndView mav = new ModelAndView("equip/qirUseList");
useList.setDownOrganCdList(loginUser.getDownOrganCdList());
useList.setUseType("QIR");
//엑셀다운
if(useList.getExcel() != null && useList.getExcel().equals("Y")){
String[] headers = { "use_no", "sosok", "use_dt", "detail_type_name", "people_cnt", "description", "wrt_dt"};
String[] headerNames = { "연번", "경찰서","사용일시", "사용사유", "사용인원", "비고", "최종수정일"};
String[] columnType = { "String", "String","String", "String", "int", "String", "String"};
String sheetName = "방역조사실 사용대장";
String excelFileName = "방역조사실 사용대장";
List<UseList> useExcelList= equipService.selectUseList(useList);
try {
Utils.useListToExcel(useExcelList, response, headers, headerNames, columnType, sheetName, excelFileName);
} catch (IOException e) {
}
return null;
}
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/equip/qirUseList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
useList.setQueryInfo();
mav.addObject("useList", equipService.selectUseList(useList));
useList.setContentCnt(equipService.selectUseListCnt(useList));
useList.setPaginationInfo();
mav.addObject("searchParams", useList);
mav.addObject("organList", equipService.selectOrganList(useList));
return mav;
}

View File

@ -45,6 +45,9 @@ public interface EquipMapper {
Integer selectUseListCnt(UseList useList);
UseList selectUseInfo(UseList useList);
}

View File

@ -16,7 +16,6 @@ import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@Getter
@ -41,7 +40,8 @@ public class UseList extends BaseModel implements Serializable{
@Column(name = "use_type")
private String useType;
@Column(name = "use_dt")
private String useDt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate useDt;
@Column(name = "detail_type")
private String detailType;
@Column(name = "detail_self")
@ -67,12 +67,25 @@ public class UseList extends BaseModel implements Serializable{
@Transient
private String excel;
@Transient
private String sosok;
@Transient
private String year;
@Transient
private String detailTypeName;
@Override
public String toString() {
return "UseList [mgtOrgan=" + mgtOrgan + ", useNo=" + useNo + ", versionNo=" + versionNo + ", useType=" + useType
+ ", useDt=" + useDt + ", detailType=" + detailType + ", detailSelf=" + detailSelf + ", peopleCnt="
+ peopleCnt + ", description=" + description + ", wrtOrgan=" + wrtOrgan + ", wrtPart=" + wrtPart
+ ", wrtUserGrd=" + wrtUserGrd + ", wrtUserSeq=" + wrtUserSeq + ", wrtNm=" + wrtNm + ", wrtDt=" + wrtDt
+ ", excel=" + excel + ", sosok=" + sosok + ", year=" + year + ", detailTypeName=" + detailTypeName + "]";
}
@Embeddable
@Data
@NoArgsConstructor

View File

@ -2,12 +2,18 @@ package com.dbnt.faisp.equip.repository;
import com.dbnt.faisp.equip.model.UseList;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UseListRepository extends JpaRepository<UseList, UseList.UseListId> {
List<UseList> findByMgtOrganAndUseNoAndUseTypeOrderByVersionNoDesc(String mgtOrgan, String useNo, String useType);
void deleteByMgtOrganAndUseNoAndUseType(String mgtOrgan, String useNo, String useType);

View File

@ -9,6 +9,7 @@ import com.dbnt.faisp.equip.model.EquipFile;
import com.dbnt.faisp.equip.model.EquipFile.EquipFileId;
import com.dbnt.faisp.equip.model.EquipLog;
import com.dbnt.faisp.equip.model.UseList;
import com.dbnt.faisp.equip.model.UseList.UseListId;
import com.dbnt.faisp.equip.repository.CellPhoneRepository;
import com.dbnt.faisp.equip.repository.EquipFileRepository;
import com.dbnt.faisp.equip.repository.EquipLogRepository;
@ -352,6 +353,44 @@ public class EquipService {
return equipMapper.selectUseListCnt(useList);
}
public UseList selectUseInfo(UseList useList) {
return equipMapper.selectUseInfo(useList);
}
@Transactional
public UseList updateUse(UseList useList) {
UseList dbUseList = useListRepository
.findById(new UseListId(useList.getMgtOrgan(),useList.getUseNo(),useList.getVersionNo(),useList.getUseType())).orElse(null);
UseList useTmp = new UseList();
useTmp.setMgtOrgan(dbUseList.getMgtOrgan());
useTmp.setUseNo(dbUseList.getUseNo());
useTmp.setVersionNo(dbUseList.getVersionNo()+1);
useTmp.setUseType(dbUseList.getUseType());
useTmp.setUseDt(useList.getUseDt());
useTmp.setDetailType(useList.getDetailType());
useTmp.setDetailSelf(useList.getDetailSelf());
useTmp.setPeopleCnt(useList.getPeopleCnt());
useTmp.setDescription(useList.getDescription());
useTmp.setWrtOrgan(useList.getWrtOrgan());
useTmp.setWrtPart(useList.getWrtPart());
useTmp.setWrtUserSeq(useList.getWrtUserSeq());
useTmp.setWrtNm(useList.getWrtNm());
useTmp.setWrtDt(useList.getWrtDt());
return useListRepository.save(useTmp);
}
public List<UseList> selectUseInfoList(UseList useList) {
return useListRepository.findByMgtOrganAndUseNoAndUseTypeOrderByVersionNoDesc(useList.getMgtOrgan(),useList.getUseNo(),useList.getUseType());
}
@Transactional
public void useDelete(List<UseList> useList) {
for(UseList use:useList) {
useListRepository.deleteByMgtOrganAndUseNoAndUseType(use.getMgtOrgan(),use.getUseNo(),use.getUseType());
}
}
}

View File

@ -13,6 +13,7 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.HashSet;
@ -31,22 +32,66 @@ public class UserInfo extends BaseModel implements UserDetails{
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "user_seq")
private Integer userSeq;
@Column(name = "dic_code")
private String dicCode;
@Column(name = "user_id")
private String userId;
@Column(name = "passwd")
private String password;
@Column(name = "user_nm")
private String userNm;
@Column(name = "og_cd")
private String ogCd;
@Column(name = "ofc_cd")
private String ofcCd;
@Column(name = "birth_date")
private LocalDate birthDate;
@Column(name = "sex")
private String sex;
@Column(name = "email")
private String email;
@Column(name = "phone_no")
private String phoneNo;
@Column(name = "area_cd")
private String areaCd;
@Column(name = "login_chk")
private String loginChk;
@Column(name = "fail_cnt")
private Integer failCnt;
@Column(name = "user_role")
private String userRole;
@Column(name = "user_status")
private String userStatus;
@Column(name = "og_cd")
private String ogCd;
@Column(name = "ofc_cd")
private String ofcCd;
@Column(name = "title_cd")
private String titleCd;
@Column(name = "wrt_dt")
private LocalDateTime wrtDt;
@Column(name = "group_cd")
private String groupCd;
@Column(name = "series_cd")
private String seriesCd;
@Column(name = "ofc_head_yn")
private String ofcHeadYn;
@Column(name = "hiring_cd")
private String hiringCd;
@Column(name = "employ_cd")
private String employCd;
@Column(name = "outturn_cd")
private String outturnCd;
@Column(name = "work_cd")
private String workCd;
@Column(name = "job_in_cd")
private String jobInCd;
@Column(name = "language_cd")
private String languageCd;
@Column(name = "police_in_date")
private LocalDate policeInDate;
@Column(name = "organ_in_date")
private LocalDate organInDate;
@Column(name = "ofc_in_date")
private LocalDate ofcInDate;
@Column(name = "title_in_date")
private LocalDate titleInDate;
@Transient
private String modifyPassword;

View File

@ -26,6 +26,7 @@ import org.apache.poi.xssf.usermodel.XSSFDataFormat;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.dbnt.faisp.equip.model.CellPhone;
import com.dbnt.faisp.equip.model.UseList;
import com.dbnt.faisp.fipTarget.model.PartInfo;
import com.dbnt.faisp.fipTarget.model.PartWork;
@ -750,6 +751,116 @@ public class Utils {
}
public static void useListToExcel(List<UseList> useExcelList, HttpServletResponse response, String[] headers,
String[] headerNames, String[] columnType, String sheetName, String excelFileName) throws IOException {
if(Utils.isNotEmpty(useExcelList)) {
// 메모리에 100개의 행을 유지합니다. 행의 수가 넘으면 디스크에 적습니다.
XSSFWorkbook wb = new XSSFWorkbook();
Sheet sheet = wb.createSheet(sheetName);
Row headerRow = sheet.createRow(0);
CellStyle cellStyle1 = wb.createCellStyle(); //쉼표들어간 숫자 양식
CellStyle cellStyle2 = wb.createCellStyle(); //숫자양식
CellStyle headerStyle = wb.createCellStyle(); //숫자양식
CellStyle headerStyle2 = wb.createCellStyle();
CellStyle headerStyle3 = wb.createCellStyle();
XSSFDataFormat format = wb.createDataFormat();
cellStyle1.setAlignment(HorizontalAlignment.CENTER);
cellStyle2.setDataFormat(format.getFormat("#,##0"));
cellStyle2.setAlignment(HorizontalAlignment.CENTER);
headerStyle2.setBorderTop(BorderStyle.THIN);
headerStyle2.setBorderBottom(BorderStyle.THIN);
headerStyle2.setBorderLeft(BorderStyle.THIN);
headerStyle2.setBorderRight(BorderStyle.THIN);
headerStyle2.setAlignment(HorizontalAlignment.CENTER);
headerStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
headerStyle2.setFillForegroundColor((short)3);
headerStyle2.setFillForegroundColor(IndexedColors.LIME.getIndex());
headerStyle.setAlignment(HorizontalAlignment.CENTER);
headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
headerStyle.setFillForegroundColor((short)3);
headerStyle.setFillForegroundColor(IndexedColors.LIME.getIndex());
headerStyle3.setBorderTop(BorderStyle.THIN);
headerStyle3.setBorderBottom(BorderStyle.THIN);
headerStyle3.setBorderLeft(BorderStyle.THIN);
headerStyle3.setBorderRight(BorderStyle.THIN);
headerStyle3.setAlignment(HorizontalAlignment.CENTER);
headerStyle3.setFillPattern(FillPatternType.SOLID_FOREGROUND);
headerStyle3.setFillForegroundColor((short)3);
headerStyle3.setFillForegroundColor(IndexedColors.LIME.getIndex());
//로우그리기
for(int i=0; i<useExcelList.size(); i++) {
ParamMap rowData = new ParamMap();
Row row = sheet.createRow(i+1);
rowData.set("use_no", useExcelList.get(i).getUseNo());
rowData.set("sosok", useExcelList.get(i).getSosok());
if(useExcelList.get(i).getUseDt() != null) {
rowData.set("use_dt", useExcelList.get(i).getUseDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
}else {
rowData.set("use_dt", "");
}
if(useExcelList.get(i).getDetailType().equals("PVREUSE007") || useExcelList.get(i).getDetailType().equals("QIRUSE006")) {
rowData.set("detail_type_name", useExcelList.get(i).getDetailSelf());
}else {
rowData.set("detail_type_name", useExcelList.get(i).getDetailTypeName());
}
rowData.set("people_cnt", useExcelList.get(i).getPeopleCnt());
rowData.set("description", useExcelList.get(i).getDescription());
rowData.set("wrt_dt", useExcelList.get(i).getWrtDt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")));
for(int j=0; j<headers.length; j++) {
Cell cell = row.createCell(j);
if(columnType[j].equalsIgnoreCase("Int")) {
cell.setCellValue(rowData.getInt(headers[j]));
cell.setCellStyle(cellStyle2);
} else if(columnType[j].equalsIgnoreCase("String")) {
cell.setCellValue(rowData.getString(headers[j]));
cell.setCellStyle(cellStyle1);
} else {
cell.setCellValue(rowData.getString(headers[j]));
cell.setCellStyle(cellStyle1);
}
}
}
//헤더
for(int j=0; j<headerNames.length; j++) {
Cell cell = headerRow.createCell(j);
cell.setCellValue(headerNames[j]);
cell.setCellStyle(headerStyle3);
sheet.autoSizeColumn(j);
sheet.setColumnWidth(j, (sheet.getColumnWidth(j)) + 1024);
}
//엑셀이름 한글깨짐방지
String outputFileName = new String(excelFileName.getBytes("KSC5601"), "8859_1");
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
response.setHeader("Content-Disposition", String.format("attachment; filename=\""+outputFileName+"_"+Utils.getTimeStampString("yyyyMMdd_HHmm")+".xlsx\""));
wb.write(response.getOutputStream());
wb.close();
} else {
response.setHeader("Content-Type", "text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
out.write("<html lang=\"ko\">");
out.write("<head>");
out.write("<script type=\"text/javascript\">");
out.write("alert('데이터가 없습니다.');");
out.write("history.back(-1);");
out.write("</script>");
out.write("</head>");
out.write("</html>");
out.flush();
out.close();
}
}

View File

@ -414,7 +414,9 @@
#{item}
</foreach>
order by cm.wrt_dt desc
<if test='excel != "Y"'>
limit #{rowCnt} offset #{firstIndex}
</if>
</select>
<select id="selectCellPhoneListCnt" resultType="int" parameterType="CellPhone">
@ -472,8 +474,38 @@
limit 1
</select>
<sql id="searchUseList">
<if test='mgtOrgan != null and mgtOrgan != ""'>
and ul.mgt_organ = #{mgtOrgan}
</if>
<if test='useNo != null and useNo != ""'>
and ul.use_no like '%'||#{useNo}||'%'
</if>
<if test='detailType != null and detailType != ""'>
and ul.detail_type = #{detailType}
</if>
<if test='dateSelector == "useDt"'>
<if test='startDate != null and startDate != ""'>
and ul.use_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and ul.use_dt &lt;= #{endDate}::date+1
</if>
</if>
<if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'>
and ul.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and ul.wrt_dt &lt;= #{endDate}::date+1
</if>
</if>
</sql>
<select id="selectUseList" resultType="UseList" parameterType="UseList">
select (select item_value from code_mgt where item_cd = mgt_organ) as mgt_organ,
select (select item_value from code_mgt where item_cd = ul.mgt_organ) as sosok,
ul.mgt_organ,
ul.use_type,
ul.use_no,
ul.version_no,
use_dt,
@ -484,54 +516,97 @@
description,
wrt_dt
from use_list ul,
(select use_no,max(version_no) as lastVer from use_list
(select use_no,max(version_no) as lastVer,mgt_organ,use_type from use_list
where use_type = #{useType}
and mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
group by use_no) b
group by use_no,use_type,mgt_organ) b
where ul.use_no = b.use_no
and ul.version_no = b.lastVer
and use_type = #{useType}
and mgt_organ in
and ul.mgt_organ = b.mgt_organ
and ul.use_type = b.use_type
and ul.use_type = #{useType}
and ul.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
<include refid="searchUseList"></include>
order by ul.use_no desc
<if test='excel != "Y"'>
limit #{rowCnt} offset #{firstIndex}
</if>
</select>
<select id="selectUseListCnt" resultType="Integer" parameterType="UseList">
select count(*)
from(
select mgt_organ,
select (select item_value from code_mgt where item_cd = ul.mgt_organ) as sosok,
ul.mgt_organ,
ul.use_type,
ul.use_no,
ul.version_no,
use_dt,
(select item_value from code_mgt where item_cd = detail_type) as detail_type,
(select item_value from code_mgt where item_cd = detail_type) as detail_type_name,
detail_type,
detail_self,
people_cnt,
description,
wrt_dt
from use_list ul,
(select use_no,max(version_no) as lastVer from use_list
(select use_no,max(version_no) as lastVer,mgt_organ,use_type from use_list
where use_type = #{useType}
and mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
group by use_no) b
group by use_no,use_type,mgt_organ) b
where ul.use_no = b.use_no
and ul.version_no = b.lastVer
and use_type = #{useType}
and mgt_organ in
and ul.mgt_organ = b.mgt_organ
and ul.use_type = b.use_type
and ul.use_type = #{useType}
and ul.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
<include refid="searchUseList"></include>
order by ul.use_no desc
) a
</select>
<select id="selectUseInfo" resultType="UseList" parameterType="UseList">
select (select item_value from code_mgt where item_cd = mgt_organ) as sosok,
use_type,
mgt_organ,
ul.use_no,
ul.version_no,
use_dt,
(select item_value from code_mgt where item_cd = detail_type) as detail_type_name,
detail_type,
detail_self,
people_cnt,
description,
wrt_dt
from use_list ul,
(select use_no,max(version_no) as lastVer from use_list
where use_no = #{useNo}
<if test='versionNo != null and versionNo != ""'>
and version_no = #{versionNo}
</if>
and use_type = #{useType}
and mgt_organ = #{mgtOrgan}
group by use_no) b
where ul.use_no = b.use_no
and ul.version_no = b.lastVer
and ul.use_no = #{useNo}
<if test='versionNo != null and versionNo != ""'>
and version_no = #{versionNo}
</if>
and use_type = #{useType}
and mgt_organ = #{mgtOrgan}
</select>
</mapper>

View File

@ -4,39 +4,41 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dbnt.faisp.userInfo.mapper.UserInfoMapper">
<sql id="selectUserInfoWhere">
<where>
<choose>
<when test="userStatus != null and userStatus != ''">
user_status = #{userStatus}
</when>
<otherwise>
user_status != 'D'
</otherwise>
</choose>
<if test="userId != null and userId != ''">
and user_id like '%'||#{userId}||'%'
</if>
<if test="userNm != null and userNm != ''">
and user_nm like '%'||#{userNm}||'%'
</if>
<if test="ogCd != null and ogCd != ''">
and og_cd = #{ogCd}
</if>
<if test="ofcCd != null and ofcCd != ''">
and ofc_cd = #{ofcCd}
</if>
</where>
</sql>
<select id="selectUserInfoList" resultType="UserInfo" parameterType="UserInfo">
select user_seq,
user_id,
user_nm,
address,
user_role,
detail_addr,
email,
og_cd,
ofc_cd,
wrt_dt
from user_info
where
<choose>
<when test="userStatus != null and userStatus != ''">
user_status = #{userStatus}
</when>
<otherwise>
user_status != 'D'
</otherwise>
</choose>
<if test="userId != null and userId != ''">
and user_id like '%'||#{userId}||'%'
</if>
<if test="userNm != null and userNm != ''">
and user_nm like '%'||#{userNm}||'%'
</if>
<if test="ogCd != null and ogCd != ''">
and og_cd = #{ogCd}
</if>
<if test="ofcCd != null and ofcCd != ''">
and ofc_cd = #{ofcCd}
</if>
<include refid="selectUserInfoWhere"></include>
order by og_cd, ofc_cd desc
limit #{rowCnt} offset #{firstIndex}
</select>
@ -44,27 +46,7 @@
<select id="selectUserInfoListCnt" resultType="int" parameterType="UserInfo">
select count(*)
from user_info
where
<choose>
<when test="userStatus != null and userStatus != ''">
user_status = #{userStatus}
</when>
<otherwise>
user_status != 'D'
</otherwise>
</choose>
<if test="userId != null and userId != ''">
and user_id like '%'||#{userId}||'%'
</if>
<if test="userNm != null and userNm != ''">
and user_nm like '%'||#{userNm}||'%'
</if>
<if test="ogCd != null and ogCd != ''">
and og_cd = #{ogCd}
</if>
<if test="ofcCd != null and ofcCd != ''">
and ofc_cd = #{ofcCd}
</if>
<include refid="selectUserInfoWhere"></include>
</select>
<select id="selectManagerList" resultType="com.dbnt.faisp.util.ParamMap" parameterType="com.dbnt.faisp.util.ParamMap">

View File

@ -1,3 +1,5 @@
let files = [];
function contentFade(action){
if(action === "in"){
$("#fadeDiv").show()

View File

@ -64,15 +64,6 @@ $(document).on('click', '.cellPhoneTr', function (event){
}
});
$(document).on('click', '.affairTr', function (event){
const target = event.target;
if(!(target.className === "apprvTd" || $(target).parents(".apprvTd").length>0)){
$(".trChkBox").prop("checked", false);
$(this).find(".trChkBox").prop("checked", true);
getAffairViewModal(Number($(this).find(".affairKey").val()));
}
})
function showModal(phoneKey){
$.ajax({
url: '/equip/cellPhoneEditModal',

View File

@ -1,56 +0,0 @@
$(document).on('click', '#addPvre', function (){
$.ajax({
url: '/equip/pvreEditModal',
type: 'GET',
dataType:"html",
success: function(html){
$("#pvreEditModalContent").empty().append(html);
$("#pvreEditModal").modal('show');
$("#useDt").datepicker({
format: "mm-dd",
language: "ko"
});
$('#detailSelf').hide();
},
error:function(){
}
});
})
$(document).on('click', '#saveUse', function (){
if(confirm("저장하시겠습니까?")){
document.getElementById("mgtOrgan").disabled = false;
contentFade("in");
const formData = new FormData($("#useFm")[0]);
$.ajax({
type : 'POST',
data : formData,
url : "/equip/saveUse",
processData: false,
contentType: false,
success : function(result) {
alert("저장되었습니다.");
contentFade("out");
location.reload();
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.")
contentFade("out");
}
})
}
})
$(document).on('change', '#detailType', function (){
if($(this).val() == 'USE007'){
$('#detailSelf').show();
}else{
$('#detailSelf').hide();
$('#detailSelf').val('');
}
});

View File

@ -0,0 +1,271 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
})
$(document).on('click', '#addPvre', function (){
const useType = "PVRE";
showEditModal(useType);
})
$(document).on('click', '#addQir', function (){
const useType = "QIR";
showEditModal(useType);
})
function showEditModal(useType){
$.ajax({
url: '/equip/useEditModal',
data: {useType: useType},
type: 'GET',
dataType:"html",
success: function(html){
$("#useEditModalContent").empty().append(html);
$("#useEditModal").modal('show');
$("#useDt").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
$('#detailSelf').hide();
},
error:function(){
}
});
}
$(document).on('click', '#saveUse', function (){
if($('#mgtOrgan').val() == ""){
alert("사용관서를 선택해주세요.");
$('#mgtOrgan').focus();
return false;
}
if(confirm("저장하시겠습니까?")){
document.getElementById("mgtOrgan").disabled = false;
contentFade("in");
const formData = new FormData($("#useFm")[0]);
$.ajax({
type : 'POST',
data : formData,
url : "/equip/saveUse",
processData: false,
contentType: false,
success : function(result) {
alert("저장되었습니다.");
contentFade("out");
location.reload();
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.")
contentFade("out");
}
})
}
})
$(document).on('change', '#detailType', function (){
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
$('#detailSelf').show();
}else{
$('#detailSelf').hide();
$('#detailSelf').val('');
}
});
$(document).on('click', '.useTr', function (event){
const target = event.target;
if(!(target.className === "useChk" ||$(target).parents("td").length>0)){
const useNo = $(target).parent('tr').data("useno");
const useType = $(target).parent('tr').data("usetype");
const mgtOrgan = $(target).parent('tr').data("mgtorgan");
showMdifyModal(useNo,useType,mgtOrgan);
}
});
function showMdifyModal(useNo,useType,mgtOrgan){
$.ajax({
url: '/equip/useModifyModal',
data: {useNo: useNo,
useType: useType,
mgtOrgan: mgtOrgan},
type: 'GET',
dataType:"html",
success: function(html){
$("#useEditModalContent").empty().append(html);
$("#useEditModal").modal('show');
$("#mUseDt").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
if($('#mDetailType').val() != 'PVREUSE007' && $('#mDetailType').val() != 'QIRUSE006'){
$('#mDetailSelf').hide();
}else{
$('#mDetailSelf').show();
}
},
error:function(){
}
});
}
$(document).on('change', '#mDetailType', function (){
if($(this).val() == 'PVREUSE007' || $(this).val() == 'QIRUSE006'){
$('#mDetailSelf').show();
}else{
$('#mDetailSelf').hide();
$('#mDetailSelf').val('');
}
});
$(document).on('click', '#updateUse', function (){
if(confirm("수정하시겠습니까?")){
document.getElementById("mMgtOrgan").disabled = false;
contentFade("in");
const formData = new FormData($("#useUpdateFm")[0]);
$.ajax({
type : 'POST',
data : formData,
url : "/equip/updateUse",
processData: false,
contentType: false,
success : function(data) {
alert("수정되었습니다.");
contentFade("out");
showMdifyModal(data.useNo,data.useType,data.mgtOrgan);
},
error : function(xhr, status) {
alert("수정에 실패하였습니다.")
contentFade("out");
}
})
}
})
$(document).on('click', '#historyBtn', function (){
if($('input:checkbox[name=useChk]:checked').length < 1){
alert("게시물을 선택해주세요")
return false;
}
if($('input:checkbox[name=useChk]:checked').length > 1){
alert("한개만 선택해주세요")
return false;
}
const target = $('input:checkbox[name=useChk]:checked');
const useNo = $(target).parent().parent('tr').data("useno");
const useType = $(target).parent().parent('tr').data("usetype");
const mgtOrgan = $(target).parent().parent('tr').data("mgtorgan");
$.ajax({
url: '/equip/useHistory',
data: {useNo: useNo,
useType: useType,
mgtOrgan: mgtOrgan},
type: 'GET',
dataType:"html",
success: function(html){
$("#useEditModalContent").empty().append(html);
$("#useEditModal").modal('show');
$('#vDetailSelf').hide();
},
error:function(){
}
});
})
$(document).on('click', '.historyTr', function (event){
const target = event.target;
$(this).find('.hisChk').prop('checked',true)
if($(this).find('.hisChk').prop('checked')){
$('.hisChk').prop('checked',false);
$(this).find('.hisChk').prop('checked',true)
}
$.ajax({
url: '/equip/HistoryView',
data: {
useNo: $(target).parents('tr').data("useno"),
versionNo : Number($(target).parents('tr').data("verno")),
useType : $(target).parents('tr').data("usetype"),
mgtOrgan : $(target).parents('tr').data("mgtorgan")
},
type: 'GET',
dataType:"json",
success: function(data){
$('#vSosok').val(data.sosok);
$('#vUseDt').val(data.useDt);
$('#vDetailType').val(data.detailTypeName);
if(data.detailType != 'PVREUSE007' && data.detailType != 'QIRUSE006'){
$('#vDetailSelf').hide();
$('#vDetailSelf').val('');
}else{
$('#vDetailSelf').show();
$('#vDetailSelf').val(data.detailSelf);
}
$('#vCnt').val(data.peopleCnt);
$('#vDescription').val(data.description);
},
error:function(){
}
});
})
$(document).on('click', '#deleteUse', function (){
if($('input:checkbox[name=useChk]:checked').length < 1){
alert("삭제할 게시물을 선택해주세요")
return false;
}
if(confirm("선택한 대상을 삭제처리 하시겠습니까?")){
const checkArr = [];
$('input:checkbox[name=useChk]:checked').each(function (idx, el){
checkArr.push({});
const target = $(el);
checkArr[idx].useNo = target.parents('tr').data("useno");
checkArr[idx].mgtOrgan = target.parents('tr').data("mgtorgan");
checkArr[idx].useType = target.parents('tr').data("usetype");
})
deleteUse(checkArr);
}
})
function deleteUse(checkArr){
$.ajax({
type : 'POST',
url : "/equip/useDelete",
data : JSON.stringify(checkArr),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("삭제처리 되었습니다.");
location.reload();
},
error : function(xhr, status) {
alert("삭제처리에 실패하였습니다");
}
})
}
$(document).on('click', '#goExcel', function (){
if(confirm("엑셀로 다운로드 하시겠습니까?")){
$('input[name=excel]').val('Y');
$('#searchFm').submit();
$('input[name=excel]').val('');
}else{
false;
}
})
$(document).ready( function() {
$('#chk-all').click( function() {
$('.useCheckBox').prop('checked',this.checked);
});
});
$(document).on('click', '#closeModal', function (){
location.reload();
})

View File

@ -1,4 +1,3 @@
let files = [];
$(document).on('click', '#addPartInfo', function (){
$.ajax({

View File

@ -1,4 +1,3 @@
let files = [];
$(document).on('click', '#addPartWork', function (){
$.ajax({

View File

@ -1,4 +1,3 @@
let files = [];
$(document).ready(function(){
$(".table_id").each(function(){

View File

@ -1,4 +1,3 @@
let files = [];
$(function(){
$("#dateSelectorDiv").datepicker({
@ -18,8 +17,11 @@ $(document).on('click', '#commitTab', function (){
$(document).on('click', '.affairTr', function (event){
const target = event.target;
if(!(target.className === "apprvTd" || $(target).parents(".apprvTd").length>0)){
$(".trChkBox").prop("checked", false);
$(this).find(".trChkBox").prop("checked", true);
const chkBox = $(this).find(".rowChkBox");
if(chkBox.length>0){
$(".trChkBox").prop("checked", false);
chkBox[0].checked = !chkBox[0].checked;
}
getAffairViewModal(Number($(this).find(".affairKey").val()));
}
})

View File

@ -1,4 +1,3 @@
let files = [];
$(function(){
$("#dateSelectorDiv").datepicker({
@ -56,8 +55,11 @@ $(document).on('click', '#saveTempBtn', function (){
})
$(document).on('click', '.planTr', function (){
$(".trChkBox").prop("checked", false);
$(this).find(".trChkBox").prop("checked", true);
const chkBox = $(this).find(".rowChkBox");
if(chkBox.length>0){
$(".trChkBox").prop("checked", false);
chkBox[0].checked = !chkBox[0].checked;
}
getPlanViewModal(Number($(this).find(".planKey").val()));
})

View File

@ -1,4 +1,3 @@
let files = [];
$(function(){
$("#dateSelectorDiv").datepicker({
@ -66,10 +65,6 @@ $(document).on('click', '#affairModalBtn', function (){
});
}
})
$(document).on('click', '.affairTr', function (){
const chkBox = $(this).find(".rowChkBox");
chkBox[0].checked = !chkBox[0].checked;
})
$(document).on('click', '#getAffairBtn', function (){
let affairListTbody = "";
$.each($(".rowChkBox:checked"), function (idx, chkBox){
@ -153,8 +148,11 @@ $(document).on('click', '#saveTempBtn', function (){
})
$(document).on('click', '.resultTr', function (){
$(".trChkBox").prop("checked", false);
$(this).find(".trChkBox").prop("checked", true);
const chkBox = $(this).find(".rowChkBox");
if(chkBox.length>0){
$(".trChkBox").prop("checked", false);
chkBox[0].checked = !chkBox[0].checked;
}
getResultViewModal(Number($(this).find(".resultKey").val()));
})

View File

@ -1,4 +1,3 @@
let files = [];
$(document).on('click', '#addBoardBtn', function (){
getEditModal(null, "PLB002")

View File

@ -1,4 +1,3 @@
let files = [];
$(function(){
$("#dateSelectorDiv").datepicker({
@ -11,10 +10,10 @@ $(document).on('click', '#addNoticeBtn', function (){
getEditModal(null, "PLB001")
})
$(document).on('click', '.planTr', function (){
$(document).on('click', '.noticeTr', function (){
$(".trChkBox").prop("checked", false);
$(this).find(".trChkBox").prop("checked", true);
getViewModal(Number($(this).find(".planKey").val()), "PLB001");
getViewModal(Number($(this).find(".publicKey").val()), "PLB001");
})
$(document).on('click', '#saveBtn', function (){

View File

@ -1,4 +1,3 @@
let files = [];
$(function(){
$("#dateSelectorDiv").datepicker({

View File

@ -1,4 +1,3 @@
let files = [];
$(document).on('click', '#addReferenceBtn', function (){
getEditModal(null, "PLB003")

View File

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">등록</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
@ -44,7 +43,7 @@
<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" class="form-control storedYear" name="storedYear">
<input type="text" class="form-control storedYear" name="storedYear" readonly>
</div>
</div>
<div class="row mb-3">

View File

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<main class="pt-3">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="modal-header">
@ -99,5 +98,4 @@
</div>
</div>
</div>
</main>
</html>

View File

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">수정</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
@ -47,7 +46,7 @@
<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" class="form-control mStoredYear" name="storedYear" th:value="${equInfo.storedYear}">
<input type="text" class="form-control mStoredYear" name="storedYear" th:value="${equInfo.storedYear}" readonly>
</div>
</div>
<div class="row mb-3">

View File

@ -3,7 +3,7 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/equip/pvre.js}"></script>
<script type="text/javascript" th:src="@{/js/equip/use.js}"></script>
</th:block>
<div layout:fragment="content">
<main class="pt-3">
@ -13,7 +13,7 @@
<div class="row mx-0">
<div class="col-12 card text-center">
<div class="card-body">
<form id="searchFm" method="get" th:action="@{/equip/cellPhoneList}">
<form id="searchFm" method="get" th:action="@{/equip/pvreUseList}">
<input type="hidden" name="excel">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1">
@ -25,13 +25,40 @@
</select>
</div>
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<input type="text" class="form-control form-control-sm">
<div class="row justify-content-end">
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="mgtOrgan">
<option value="">경찰서</option>
<th:block th:each="organList:${organList}">
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq searchParams.mgtOrgan}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="연번" name="useNo" th:value="${searchParams.useNo}">
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="detailType">
<option value="">사용사유</option>
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.detailType}"></option>
</th:block>
</select>
</div>
<div class="col-4">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm" name="dateSelector">
<option value="">조건선택</option>
<option value="useDt" th:selected="${searchParams.dateSelector eq 'useDt'}">사용일</option>
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">최종수정일</option>
</select>
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div>
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<button id="goExcel">엑셀다운</button>
@ -43,7 +70,7 @@
<table class="table table-striped">
<thead>
<tr>
<th> <input type="checkbox" id="chk-all" class="equInfoCheckBox"></th>
<th> <input type="checkbox" id="chk-all" class="useCheckBox"></th>
<th>연번</th>
<th>경찰서</th>
<th>사용일시</th>
@ -54,13 +81,13 @@
</tr>
</thead>
<tbody>
<tr class="cellPhoneTr" th:each="list:${useList}">
<td><input type="checkbox" name="cpChk" class="cellPhoneCheckBox"></td>
<tr class="useTr" th:each="list:${useList}" th:data-useNo="${list.useNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
<td class="useChk"><input type="checkbox" name="useChk" class="useCheckBox"></td>
<td th:text="${list.useNo}"></td>
<td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.sosok}"></td>
<td th:text="${list.useDt}"></td>
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'USE007'}"></td>
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'USE007'}"></td>
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'PVREUSE007'}"></td>
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'PVREUSE007'}"></td>
<td th:text="${list.peopleCnt}"></td>
<td th:text="${list.description}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
@ -97,8 +124,9 @@
</div>
</div>
<div class="col-auto">
<button type="button" class="btn btn-danger"id="deleteCellPhone" th:if="${accessAuth eq 'ACC003'}">삭제</button>
<button type="button" class="btn btn-danger"id="deleteUse" th:if="${accessAuth eq 'ACC003'}">삭제</button>
<button type="button" class="btn btn-success"id="addPvre" th:unless="${accessAuth eq 'ACC001'}">등록</button>
<button type="button" class="btn btn-success"id="historyBtn">수정이력</button>
</div>
</div>
</div>
@ -109,9 +137,9 @@
</div>
</main>
<div class="modal fade" id="pvreEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
<div class="modal fade" id="useEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="pvreEditModalContent">
<div class="modal-content" id="useEditModalContent">
<div class="modal-header">
</div>
<div class="modal-body">

View File

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/equip/use.js}"></script>
</th:block>
<div layout:fragment="content">
<main class="pt-3">
<h4>방역조사실 사용대장</h4>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row mx-0">
<div class="col-12 card text-center">
<div class="card-body">
<form id="searchFm" method="get" th:action="@{/equip/qirUseList}">
<input type="hidden" name="excel">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1">
<div class="col-auto">
<select class="form-select" name="rowCnt" id="rowCnt">
<th:block th:each="num : ${#numbers.sequence(1,5)}">
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="mgtOrgan">
<option value="">경찰서</option>
<th:block th:each="organList:${organList}">
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq searchParams.mgtOrgan}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="연번" name="useNo" th:value="${searchParams.useNo}">
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="detailType">
<option value="">사용사유</option>
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.detailType}"></option>
</th:block>
</select>
</div>
<div class="col-4">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm" name="dateSelector">
<option value="">조건선택</option>
<option value="useDt" th:selected="${searchParams.dateSelector eq 'useDt'}">사용일</option>
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">최종수정일</option>
</select>
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div>
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<button id="goExcel">엑셀다운</button>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th> <input type="checkbox" id="chk-all" class="useCheckBox"></th>
<th>연번</th>
<th>경찰서</th>
<th>사용일시</th>
<th>사용사유</th>
<th>사용인원</th>
<th>비고</th>
<th>최종수정일</th>
</tr>
</thead>
<tbody>
<tr class="useTr" th:each="list:${useList}" th:data-useNo="${list.useNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
<td class="useChk"><input type="checkbox" name="useChk" class="useCheckBox"></td>
<td th:text="${list.useNo}"></td>
<td th:text="${list.sosok}"></td>
<td th:text="${list.useDt}"></td>
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'QIRUSE006'}"></td>
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'QIRUSE006'}"></td>
<td th:text="${list.peopleCnt}"></td>
<td th:text="${list.description}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
<div class="row justify-content-center">
<div class="col-auto">
<nav aria-label="Page navigation">
<ul class="pagination">
<th:block th:if="${searchParams.pageIndex>3}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
</th:block>
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex==num?'active':''}">
<a class="page-link" href="#" th:text="${num}"></a>
</li>
</th:block>
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</nav>
</div>
</div>
<div class="col-auto">
<button type="button" class="btn btn-danger"id="deleteUse" th:if="${accessAuth eq 'ACC003'}">삭제</button>
<button type="button" class="btn btn-success"id="addQir" th:unless="${accessAuth eq 'ACC001'}">등록</button>
<button type="button" class="btn btn-success"id="historyBtn">수정이력</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="useEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="useEditModalContent">
<div class="modal-header">
</div>
<div class="modal-body">
<div class="tab-content border border-top-0" id="configCellPhone">
</div>
</div>
</div>
</div>
</div>
</div>
</html>

View File

@ -3,10 +3,10 @@
<div class="modal-header">
<th:block th:if="${useType eq 'PVRE'}">
<h5 class="modal-title" id="menuEditModalLabel" th:if="${useType eq 'PVRE'}">휴대용 녹화장비 사용대장 등록</h5>
<h5 class="modal-title" id="menuEditModalLabel">휴대용 녹화장비 사용대장 등록</h5>
</th:block>
<th:block th:if="${useType eq 'QIR'}">
<h5 class="modal-title" id="menuEditModalLabel" th:if="${useType eq 'PVRE'}">방역조사실 사용대장 등록</h5>
<h5 class="modal-title" id="menuEditModalLabel">방역조사실 사용대장 등록</h5>
</th:block>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
@ -30,7 +30,7 @@
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용일시</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="useDt" name="useDt">
<input type="text" class="form-control" id="useDt" name="useDt" readonly>
</div>
</div>
<div class="mb-3 row">
@ -38,9 +38,16 @@
<div class="col-sm-3">
<select class="form-select form-select-sm" id="detailType" name="detailType">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('USE')}">
<th:block th:if="${useType eq 'PVRE'}">
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</th:block>
<th:block th:if="${useType eq 'QIR'}">
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</th:block>
</select>
<input type="text" class="form-control" id="detailSelf" name="detailSelf">
</div>

View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="modal-header">
<h5 class="modal-title">수정이력</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="row mx-0">
<div class="col-100 card text-center">
<div class="card-body">
<div class="row">
</div>
<div class="row justify-content-start">
<div class="col-4">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-striped" id="categoryTable">
<thead>
<tr>
<th></th>
<th>작성자</th>
<th>등록일</th>
</tr>
</thead>
<tbody class="overflow-scroll">
<tr class="historyTr" th:each="list:${infoList}" th:data-useNo="${list.useNo}" th:data-verNo="${list.versionNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
<td>
<input type="checkbox" class="hisChk">
</td>
<td th:text="${list.wrtNm}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-8" id="valueDiv">
<div class="row mb-3">
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용관서</label>
<div class="col-sm-6">
<input type="text" id="vSosok" disabled>
</div>
</div>
<div class="row mb-3">
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용일시</label>
<div class="col-sm-6">
<input type="text" id="vUseDt" disabled>
</div>
</div>
<div class="row mb-3">
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용사유</label>
<div class="col-sm-6">
<input type="text" id="vDetailType" disabled>
<input type="text" id="vDetailSelf" disabled>
</div>
</div>
<div class="row mb-3">
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">사용인원</label>
<div class="col-sm-6">
<input type="text" id="vCnt" disabled>
</div>
</div>
<div class="row mb-3">
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-6">
<input type="text" id="vDescription" disabled>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer justify-content-between">
<div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
</html>

View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<th:block th:if="${info.useType eq 'PVRE'}">
<h5 class="modal-title" id="menuEditModalLabel">휴대용 녹화장비 사용대장 수정</h5>
</th:block>
<th:block th:if="${info.useType eq 'QIR'}">
<h5 class="modal-title" id="menuEditModalLabel">방역조사실 사용대장 수정</h5>
</th:block>
<button type="button" class="btn-close" id="closeModal" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="useUpdateFm" method="post">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="useNo" th:value="${info.useNo}">
<input type="hidden" name="useType" th:value="${info.useType}">
<input type="hidden" name="versionNo" th:value="${info.versionNo}">
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용관서</label>
<div class="col-sm-3">
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" disabled>
<option value="">선택</option>
<th:block th:each="organList:${organList}">
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq info.mgtOrgan}"></option>
</th:block>
</select>
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용일시</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="mUseDt" name="useDt" th:value="${info.useDt}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용사유</label>
<div class="col-sm-3">
<select class="form-select form-select-sm" id="mDetailType" name="detailType">
<option value="">선택</option>
<th:block th:if="${info.useType eq 'PVRE'}">
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
</th:block>
</th:block>
<th:block th:if="${info.useType eq 'QIR'}">
<th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
</th:block>
</th:block>
</select>
<input type="text" class="form-control" id="mDetailSelf" name="detailSelf" th:value="${info.detailSelf}">
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">사용인원</label>
<div class="col-sm-4">
<input type="number" class="form-control" id="mPeopleCnt" name="peopleCnt" th:value="${info.peopleCnt}">
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="mDescription" name="description" th:value="${info.description}">
</div>
</div>
</form>
</div>
<div class="modal-footer justify-content-between">
<div class="col-auto">
<button type="button" class="btn btn-secondary" id="closeModal" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="updateUse">수정</button>
</div>
</div>
</html>

View File

@ -1,25 +1,36 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">외사경찰 견문관리</div>
<div class="col-auto"><a href="/affair/affairMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/affair/affairMgt.js}"></script>
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">외사경찰 견문관리</div>
<div class="col-auto"><a href="/affair/affairMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="affairTr" th:each="affair:${affairList}">
<input type="hidden" class="affairKey" th:value="${affair.affairKey}">
<td th:text="${affair.title}"></td>
<td th:text="${#temporals.format(affair.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="affairTr" th:each="affair:${affairList}">
<td th:text="${affair.title}"></td>
<td th:text="${#temporals.format(affair.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
<div class="modal fade" id="affairViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="affairViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="affairViewBody">
</div>
</div>
</div>
</html>

View File

@ -1,25 +1,36 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">월간계획</div>
<div class="col-auto"><a href="/affairPlan/planMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/plan/planMgt.js}"></script>
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">월간계획</div>
<div class="col-auto"><a href="/affairPlan/planMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="plan:${planList}">
<input type="hidden" class="planKey" th:value="${plan.planKey}">
<td th:text="${plan.contentTitle}"></td>
<td th:text="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="plan:${planList}">
<td th:text="${plan.contentTitle}"></td>
<td th:text="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
<div class="modal fade" id="planViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="planViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="planViewBody">
</div>
</div>
</div>
</html>

View File

@ -1,25 +1,36 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">청산보고서</div>
<div class="col-auto"><a href="/affairResult/resultMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/result/resultMgt.js}"></script>
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">청산보고서</div>
<div class="col-auto"><a href="/affairResult/resultMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="resultTr" th:each="result:${resultList}">
<input type="hidden" class="resultKey" th:value="${result.resultKey}">
<td th:text="${result.resultTitle}"></td>
<td th:text="${#temporals.format(result.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="resultTr" th:each="result:${resultList}">
<td th:text="${result.resultTitle}"></td>
<td th:text="${#temporals.format(result.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
<div class="modal fade" id="resultViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="resultViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="resultViewBody">
</div>
</div>
</div>
</html>

View File

@ -60,5 +60,6 @@
<div id="fadeDiv" style="display: none;">
<div class="p-5 rounded"><h1>저장중입니다.</h1></div>
</div>
<th:block layout:fragment="modal"></th:block>
</body>
</html>

View File

@ -12,30 +12,12 @@
<div class="col-12 card">
<div class="card-body">
<div class="row">
<div class="col-4 py-1">
<div class="card" id="subPage0">
</div>
</div>
<div class="col-4 py-1">
<div class="card" id="subPage1">
</div>
</div>
<div class="col-4 py-1">
<div class="card" id="subPage2">
</div>
</div>
<div class="col-4 py-1">
<div class="card" id="subPage3">
</div>
</div>
<div class="col-4 py-1">
<div class="card" id="subPage4">
</div>
</div>
<div class="col-4 py-1">
<div class="card" id="subPage5">
</div>
</div>
<div class="col-4 py-1" id="subPage0"></div>
<div class="col-4 py-1" id="subPage1"></div>
<div class="col-4 py-1" id="subPage2"></div>
<div class="col-4 py-1" id="subPage3"></div>
<div class="col-4 py-1" id="subPage4"></div>
<div class="col-4 py-1" id="subPage5"></div>
</div>
</div>
</div>

View File

@ -70,8 +70,8 @@
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="notice:${noticeList}">
<input type="hidden" class="planKey" th:value="${notice.publicKey}">
<tr class="noticeTr" th:each="notice:${noticeList}">
<input type="hidden" class="publicKey" th:value="${notice.publicKey}">
<td><input type="checkbox" class="trChkBox"></td>
<td th:text="${notice.title}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">

View File

@ -1,27 +1,39 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">공지사항</div>
<div class="col-auto"><a href="/publicBoard/noticePage" class="link-dark"><i class="bi bi-list"></i></a></div>
<script type="text/javascript" th:src="@{/js/publicBoard/publicBoard.js}"></script>
<script type="text/javascript" th:src="@{/js/publicBoard/notice.js}"></script>
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">공지사항</div>
<div class="col-auto"><a href="/publicBoard/noticePage" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성자</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="noticeTr" th:each="notice:${noticeList}">
<input type="hidden" class="publicKey" th:value="${notice.publicKey}">
<td th:text="${notice.title}"></td>
<td th:text="${notice.wrtUserNm}"></td>
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성자</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="notice:${noticeList}">
<td th:text="${notice.title}"></td>
<td th:text="${notice.wrtUserNm}"></td>
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
<div class="modal fade" id="viewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="viewContent">
</div>
</div>
</div>
</html>

View File

@ -13,7 +13,7 @@
<div class="row mx-0">
<div class="col-12 card text-center">
<div class="card-body">
<form id="searchFm" method="get" th:action="@{/translator/info}">
<form id="searchFm" method="get" th:action="@{/translator/info}">
<input type="hidden" name="excel">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1">
@ -24,32 +24,32 @@
</th:block>
</select>
</div>
<div class="col-auto">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" name="dmlYn">
<option value="">-해촉 선택-</option>
<option value="O" th:selected="${'O' eq searchParams.dmlYn}">O</option>
<option value="X" th:selected="${'X' eq searchParams.dmlYn}">X</option>
</select>
<option value="">-해촉 선택-</option>
<option value="O" th:selected="${'O' eq searchParams.dmlYn}">O</option>
<option value="X" th:selected="${'X' eq searchParams.dmlYn}">X</option>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="ogdp1">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.ogdp1}"></option>
</th:block>
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.ogdp1}"></option>
</th:block>
</select>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="trLang">
<option value="">언어 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('LGG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trLang}"></option>
</th:block>
</select>
<select class="form-select form-select-sm" name="trLang">
<option value="">언어 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('LGG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trLang}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="trName" th:value="${searchParams.trName}" placeholder="성명">
@ -59,29 +59,29 @@
</div>
</div>
<div class="row justify-content-between py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" id="trVisa" name="trVisa">
<option value="">비자 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VISA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trVisa}"></option>
</th:block>
</select>
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" id="trVisa" name="trVisa">
<option value="">비자 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VISA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trVisa}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" id="trNny" name="trNny">
<option value="">국적선택</option>
<th:block th:each="commonCode:${session.commonCode.get('NNY')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trNny}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control" id="aptDt" name="aptDt" th:value="${searchParams.aptDt}" placeholder="위촉일">
</div>
</div>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" id="trNny" name="trNny">
<option value="">국적선택</option>
<th:block th:each="commonCode:${session.commonCode.get('NNY')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.trNny}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control" id="aptDt" name="aptDt" th:value="${searchParams.aptDt}" placeholder="위촉일">
</div>
</div>
</div>
</div>
</form>
<div class="row justify-content-start">
@ -89,8 +89,8 @@
<div class="card">
<div class="card-body">
<div class="row">
<input type="hidden" id="selectedKey">
<input type="hidden" id="selectedVerNo">
<input type="hidden" id="selectedKey">
<input type="hidden" id="selectedVerNo">
<table class="table table-striped">
<thead>
<tr>
@ -112,31 +112,29 @@
</thead>
<tbody>
<tr class="userInfoTr" data-bs-toggle="dropdown" aria-expanded="false" th:each="trInfo:${translatorList}">
<th:block>
<input type="hidden" class="trKey" th:value="${trInfo.translatorKey}">
<input type="hidden" class="verNo" th:value="${trInfo.versionNo}">
</th:block>
<td>
<p class="m-0" th:text="${trInfo.translatorKey}"></p>
<ul class="dropdown-menu">
<li><a class="dropdown-item careerInfo" href="#">경력관리</a></li>
<li><a class="dropdown-item translatorInfo" href="#">인적사항</a></li>
</ul>
</td>
<td th:text="${trInfo.ogdp1}"></td>
<td th:text="${trInfo.trLang}"></td>
<td th:text="${trInfo.trCareer}"></td>
<td th:text="${trInfo.trName}"></td>
<td th:text="${trInfo.trAge}"></td>
<td th:text="${trInfo.trSex}"></td>
<td th:text="${trInfo.trNny}"></td>
<td th:text="${trInfo.trEdu}"></td>
<td th:text="${trInfo.trCft}"></td>
<td th:text="${trInfo.trVisa}"></td>
<td th:if="${trInfo.dmlYn == 'O'}"></td>
<td th:unless="${trInfo.dmlYn == 'O'}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
<input type="hidden" class="trKey" th:value="${trInfo.translatorKey}">
<input type="hidden" class="verNo" th:value="${trInfo.versionNo}">
<td>
<p class="m-0" th:text="${trInfo.translatorKey}"></p>
<ul class="dropdown-menu">
<li><a class="dropdown-item careerInfo" href="#">경력관리</a></li>
<li><a class="dropdown-item translatorInfo" href="#">인적사항</a></li>
</ul>
</td>
<td th:text="${trInfo.ogdp1}"></td>
<td th:text="${trInfo.trLang}"></td>
<td th:text="${trInfo.trCareer}"></td>
<td th:text="${trInfo.trName}"></td>
<td th:text="${trInfo.trAge}"></td>
<td th:text="${trInfo.trSex}"></td>
<td th:text="${trInfo.trNny}"></td>
<td th:text="${trInfo.trEdu}"></td>
<td th:text="${trInfo.trCft}"></td>
<td th:text="${trInfo.trVisa}"></td>
<td th:if="${trInfo.dmlYn == 'O'}"></td>
<td th:unless="${trInfo.dmlYn == 'O'}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
</tr>
</tbody>
</table>
@ -167,9 +165,9 @@
</ul>
</nav>
<div class="col-auto">
<button data-bs-toggle="modal" data-bs-target="#translatorInsertModal" th:unless="${accessAuth eq 'ACC001'}">등록</button>
<button id="goExcel">엑셀다운</button>
</div>
<button data-bs-toggle="modal" data-bs-target="#translatorInsertModal" th:unless="${accessAuth eq 'ACC001'}">등록</button>
<button id="goExcel">엑셀다운</button>
</div>
</div>
</div>
</div>
@ -189,30 +187,30 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form id="translatorInsert" action="#" method="post">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">관서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="ogdp1" name="ogdp1" th:disabled="${accessAuth ne 'ACC003'}">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq userOrgan}"></option>
</th:block>
<select class="form-select form-select-sm" id="ogdp1" name="ogdp1" th:disabled="${accessAuth ne 'ACC003'}">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq userOrgan}"></option>
</th:block>
</select>
</th:block>
</select>
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">언어</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="lang" name="trLang">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('LGG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('LGG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">경력</label>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">경력</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="trCareer" name="trCareer">
</div>
@ -225,13 +223,13 @@
<label for="ofcCd" class="col-sm-1 col-form-label text-center">성별</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="trSex">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">연락처</label>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">연락처</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="trPhone" name="trPhone">
</div>
@ -239,25 +237,25 @@
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">국적</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="trNny" name="trNny">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('NNY')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
<select class="form-select form-select-sm" id="trNny" name="trNny">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('NNY')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">나이</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="trAge" name="trAge">
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">학력</label>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">학력</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" name="trEdu">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('EDU')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('EDU')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
</div>
</div>
<div class="mb-3 row">
@ -268,43 +266,41 @@
<label for="ofcCd" class="col-sm-1 col-form-label text-center">비자</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="trVisa" name="trVisa">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VISA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VISA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
</th:block>
</select>
</div>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">위촉일</label>
<label for="ofcCd" class="col-sm-1 col-form-label text-center">위촉일</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="aptDt" name="aptDt">
<input type="text" class="form-control" id="aptDt" name="aptDt">
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">해촉</label>
<label for="ogCd" class="col-sm-2 col-form-label text-center">해촉</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="dmlYn" name="dmlYn">
<option value="">선택</option>
<option value="O">O</option>
<option value="X">X</option>
</select>
<select class="form-select form-select-sm" id="dmlYn" name="dmlYn">
<option value="">선택</option>
<option value="O">O</option>
<option value="X">X</option>
</select>
</div>
</div>
<div class="mb-3 row">
<label for="tel" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-4">
<textarea class="form-control" id="remark" name="remark"></textarea>
</div>
</div>
</form>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" id="closeModalBtn">닫기</button>
<button type="button" class="btn btn-primary" id="saveBtn">등록</button>
</div>
<div class="mb-3 row">
<label for="tel" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-4">
<textarea class="form-control" id="remark" name="remark"></textarea>
</div>
</div>
</form>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" id="closeModalBtn">닫기</button>
<button type="button" class="btn btn-primary" id="saveBtn">등록</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="translatorEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="authEditModalContent">
@ -313,7 +309,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="KeyValue">
</div>
</div>
<div class="modal-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
@ -329,8 +325,6 @@
</div>
</div>
</div>
<div class="modal fade" id="translatorCareerModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="authEditModalContent">
@ -345,7 +339,5 @@
</div>
</div>
</div>
</div>
</html>

View File

@ -1,31 +1,84 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">민간통역인현황</div>
<div class="col-auto"><a href="/translator/info" class="link-dark"><i class="bi bi-list"></i></a></div>
<script type="text/javascript" th:src="@{/js/translator/translator.js}"></script>
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">민간통역인현황</div>
<div class="col-auto"><a href="/translator/info" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<input type="hidden" id="selectedKey">
<input type="hidden" id="selectedVerNo">
<table class="table table-striped">
<thead>
<tr>
<th>관서명</th>
<th>언어</th>
<th>성명</th>
<th>위촉일</th>
<th>연락처</th>
</tr>
</thead>
<tbody>
<tr class="userInfoTr" data-bs-toggle="dropdown" aria-expanded="false" th:each="trInfo:${translatorList}">
<input type="hidden" class="trKey" th:value="${trInfo.translatorKey}">
<input type="hidden" class="verNo" th:value="${trInfo.versionNo}">
<td>
<p class="m-0" th:text="${trInfo.ogdp1}"></p>
<ul class="dropdown-menu">
<li><a class="dropdown-item careerInfo" href="#">경력관리</a></li>
<li><a class="dropdown-item translatorInfo" href="#">인적사항</a></li>
</ul>
</td>
<td th:text="${trInfo.trLang}"></td>
<td th:text="${trInfo.trName}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-body">
<table class="table table-striped">
<thead>
<tr>
<th>관서명</th>
<th>언어</th>
<th>성명</th>
<th>위촉일</th>
<th>연락처</th>
</tr>
</thead>
<tbody>
<tr class="userInfoTr" th:each="trInfo:${translatorList}">
<td th:text="${trInfo.ogdp1}"></td>
<td th:text="${trInfo.trLang}"></td>
<td th:text="${trInfo.trName}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
</tr>
</tbody>
</table>
<div class="modal fade" id="translatorEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">통역인 정보</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="KeyValue">
</div>
<div class="modal-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="accessTab" data-bs-toggle="tab" data-bs-target="#accessTabPanel" type="button" role="tab" aria-controls="accessTabPanel" aria-selected="true">인적사항</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="approvalTab" data-bs-toggle="tab" data-bs-target="#approvalTabPanel" type="button" role="tab" aria-controls="approvalTabPanel" aria-selected="false">수정이력</button>
</li>
</ul>
<div class="tab-content border border-top-0" id="configInfo">
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="translatorCareerModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5>경력현황</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="tab-content border border-top-0" id="careerView">
</div>
</div>
</div>
</div>
</div>
</html>