장비단속파일 레이아웃 관리 추가

main
이범준 9 months ago
parent e99ddf4219
commit c3ecc836ba

@ -10,4 +10,5 @@ public class RemoteSystemInfo {
String id; String id;
String pw; String pw;
String osType; String osType;
String workPath;
} }

@ -32,9 +32,51 @@ public interface CrdnStngMapper extends AbstractMapper {
*/ */
List<String> selectStdgCdListByStdgNm(Map<String, Object> map); List<String> selectStdgCdListByStdgNm(Map<String, Object> map);
/** .
* @param query
* @return
*/
List<DataObject> selectLinkFileLayoutMetadataList(CrdnQuery query);
/** . /** .
* @param ID
* @return
*/
DataObject selectLinkFileLayoutMetadataInfo(String fileLayoutId);
/** .
* @param map
* @return
*/
int insertCrdnFileLayout(Map<String, Object> map);
/** .
* @param map
* @return
*/
int insertFtpInfo(Map<String, Object> map);
/** .
* @param map
* @return
*/
int updateCrdnFileLayout(Map<String, Object> map);
/** .
* @param map
* @return
*/
int updateFtpInfo(Map<String, Object> map);
/** .
* @param map
* @return
*/
int deleteCrdnFileLayout(Map<String, Object> map);
/** .
* @param query * @param query
* @return * @return
*/ */
List<LayoutDescriptor> selectLinkFileLayoutMetadata(CrdnQuery query); List<LayoutDescriptor> selectLinkFileLayoutMetadata(CrdnQuery query);
@ -43,4 +85,5 @@ public interface CrdnStngMapper extends AbstractMapper {
* @return ftp * @return ftp
*/ */
DataObject selectRemoteInfo(String fileLayoutId); DataObject selectRemoteInfo(String fileLayoutId);
} }

@ -32,13 +32,13 @@ public interface CrdnTeamMapper extends AbstractMapper {
/** .<br /> /** .<br />
* @param team * @param team
* @return * @return
*/ */
int insertTeamInfo(Team team); int insertTeamInfo(Team team);
/** .<br /> /** .<br />
* @param team * @param team
* @return * @return
*/ */
int updateTeamInfo(Team team); int updateTeamInfo(Team team);

@ -2,6 +2,7 @@ package cokr.xit.fims.crdn.service;
import java.util.List; import java.util.List;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.ExmptnVhcl; import cokr.xit.fims.crdn.ExmptnVhcl;
import cokr.xit.fims.crdn.Team; import cokr.xit.fims.crdn.Team;
@ -10,7 +11,37 @@ import cokr.xit.foundation.data.DataObject;
public interface CrdnStngService { public interface CrdnStngService {
/** . /** .
* @param query
* @return
*/
List<DataObject> getLinkFileLayoutMetadataList(CrdnQuery query);
/** .
* @param fileLayoutId ID
* @return
*/
DataObject getLinkFileLayoutMetadataInfo(String fileLayoutId);
/** .
* @param layoutDescriptor , remoteSystemInfo
* @return
*/
String createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo);
/** .
* @param layoutDescriptor , remoteSystemInfo
* @return
*/
String updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo);
/** .
* @param fileLayoutId ID
* @return
*/
String removeLinkFileLayoutMetadata(String fileLayoutId);
/** .
* @param sggCd , taskSeCd , instCd , deptCd * @param sggCd , taskSeCd , instCd , deptCd
* @return * @return
*/ */

@ -8,6 +8,7 @@ import org.assertj.core.util.Arrays;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.ExmptnVhcl; import cokr.xit.fims.crdn.ExmptnVhcl;
@ -401,7 +402,93 @@ public class CrdnStngBean extends AbstractComponent {
} }
/** . /** .
* @param query
* @return
*/
public List<DataObject> getLinkFileLayoutMetadataList(CrdnQuery query) {
query.setOrderBy("FILE_LAYOUT_ID");
return crdnStngMapper.selectLinkFileLayoutMetadataList(query);
}
/** .
* @param fileLayoutId ID
* @return
*/
public DataObject getLinkFileLayoutMetadataInfo(String fileLayoutId) {
return crdnStngMapper.selectLinkFileLayoutMetadataInfo(fileLayoutId);
}
/** .
* @param layoutDescriptor , remoteSystemInfo
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
DataObject params = new DataObject();
params.set("currentUser", currentUser());
params.set("layoutDescriptor", layoutDescriptor);
params.set("remoteSystemInfo", remoteSystemInfo);
int effected = 0;
effected += crdnStngMapper.insertCrdnFileLayout(params);
effected += crdnStngMapper.insertFtpInfo(params);
if(effected != 2) {
throw new RuntimeException("[F]레이아웃 등록 중 오류가 발생하였습니다.");
}
return true;
}
/** .
* @param layoutDescriptor , remoteSystemInfo
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
DataObject params = new DataObject();
params.set("currentUser", currentUser());
params.set("layoutDescriptor", layoutDescriptor);
params.set("remoteSystemInfo", remoteSystemInfo);
int effected = 0;
effected += crdnStngMapper.updateCrdnFileLayout(params);
DataObject remoteInfo = crdnStngMapper.selectRemoteInfo(layoutDescriptor.getFileLayoutId());
if(remoteInfo == null) {
effected += crdnStngMapper.insertFtpInfo(params);
} else {
effected += crdnStngMapper.updateFtpInfo(params);
}
if(effected != 2) {
throw new RuntimeException("[F]레이아웃 수정 중 오류가 발생하였습니다.");
}
return true;
}
/** .
* @param fileLayoutId ID
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean removeLinkFileLayoutMetadata(String fileLayoutId) {
DataObject params = new DataObject();
params.set("currentUser", currentUser());
params.set("fileLayoutId", fileLayoutId);
int effected = crdnStngMapper.deleteCrdnFileLayout(params);
if(effected != 1) {
return false;
}
return true;
}
/** .
* @param query * @param query
* @return * @return
*/ */
@ -571,7 +658,4 @@ public class CrdnStngBean extends AbstractComponent {
return exmptnVhclMapper.selectExemptionVehicleHistoryList(exmptnVhclId); return exmptnVhclMapper.selectExemptionVehicleHistoryList(exmptnVhclId);
} }
} }

@ -6,6 +6,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.ExmptnVhcl; import cokr.xit.fims.crdn.ExmptnVhcl;
import cokr.xit.fims.crdn.Team; import cokr.xit.fims.crdn.Team;
@ -20,6 +21,31 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
@Resource(name="crdnStngBean") @Resource(name="crdnStngBean")
protected CrdnStngBean crdnStngBean; protected CrdnStngBean crdnStngBean;
@Override
public List<DataObject> getLinkFileLayoutMetadataList(CrdnQuery query) {
return crdnStngBean.getLinkFileLayoutMetadataList(query);
}
@Override
public DataObject getLinkFileLayoutMetadataInfo(String fileLayoutId) {
return crdnStngBean.getLinkFileLayoutMetadataInfo(fileLayoutId);
}
@Override
public String createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return crdnStngBean.createLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo) ? "[S]" : "[F]";
}
@Override
public String updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return crdnStngBean.updateLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo) ? "[S]" : "[F]";
}
@Override
public String removeLinkFileLayoutMetadata(String fileLayoutId) {
return crdnStngBean.removeLinkFileLayoutMetadata(fileLayoutId) ? "[S]" : "[F]";
}
@Override @Override
public List<LayoutDescriptor> getLinkFileLayoutMetadata(String sggCd, String taskSeCd, String instCd, String deptCd) { public List<LayoutDescriptor> getLinkFileLayoutMetadata(String sggCd, String taskSeCd, String instCd, String deptCd) {
CrdnQuery query = new CrdnQuery(); CrdnQuery query = new CrdnQuery();

@ -0,0 +1,163 @@
package cokr.xit.fims.crdn.web;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor;
import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.foundation.data.DataObject;
/** .<br />
* { }/crdn/crdn01 .
* @author leebj
*/
public class Crdn01Controller extends ApplicationController {
public static final String CLASS_URL = "/crdn/crdn01";
public class METHOD_URL {
public static final String
linkFileLayoutMain = "/010/main.do",
getLinkFileLayoutMetadataList = "/010/list.do",
getLinkFileLayoutMetadataInfo = "/020/info.do",
createLinkFileLayoutMetadata = "/020/create.do",
updateLinkFileLayoutMetadata = "/020/update.do",
removeLinkFileLayoutMetadata = "/020/remove.do"
;
}
@Resource(name = "stngBean")
private StngBean stngBean;
@Resource(name = "userMapper")
private UserMapper userMapper;
@Resource(name = "crdnStngService")
private CrdnStngService crdnStngService;
/** .
* @return fims/crdn/crdn01010-main
*/
public ModelAndView linkFileLayoutMain() {
ModelAndView mav = new ModelAndView();
mav.setViewName("fims/crdn/crdn01010-main");
mav.addObject("pageName", "crdn01010");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM002", "FIM003","FIM054");
mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM003List", commonCodes.get("FIM003"));
mav.addObject("FIM054List", commonCodes.get("FIM054"));
mav.addObject("TaskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054")));
addCodes(commonCodes, mav, "FIM002", "FIM003");
return mav;
}
/** .<br />
* {@link CrdnStngService#getLinkFileLayoutMetadataList(CmmnQuery)}
* @param query
* @return jsonView
*/
public ModelAndView getLinkFileLayoutMetadataList(CrdnQuery query) {
ModelAndView mav = new ModelAndView("jsonView");
setFetchSize(query);
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String sggCd = currentUser.getOrgID();
query.setSggCd(sggCd);
List<DataObject> list = crdnStngService.getLinkFileLayoutMetadataList(query);
return setCollectionInfo(mav, list,"","");
}
/** .<br />
* @param query
* @return jsonView
*/
public ModelAndView getLinkFileLayoutMetadataInfo(HttpServletRequest hReq, String fileLayoutId) {
boolean json = jsonResponse();
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/crdn/crdn01020-info");
mav.addObject("pageName", "crdn01020");
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String sggCd = currentUser.getOrgID();
mav.addObject("sggCd", sggCd);
DataObject info = new DataObject();
if(!ifEmpty(fileLayoutId, ()->"").equals("")) {
info = crdnStngService.getLinkFileLayoutMetadataInfo(fileLayoutId);
} else {
info = null;
}
mav.addObject("layoutInfo", json ? info : toJson(info));
String urlTaskSeCd = hReq.getServletPath().split("/")[1];
mav.addObject("taskSeCd", urlTaskSeCd);
return mav;
}
/** .<br />
* @param
* @return jsonView
*/
public ModelAndView createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = crdnStngService.createLinkFileLayoutMetadata(layoutDescriptor,remoteSystemInfo);
if(rtnMsg.contains("[S]")) {
saved = true;
}
mav.addObject("saved", saved);
return mav;
}
/** .<br />
* @param
* @return jsonView
*/
public ModelAndView updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = crdnStngService.updateLinkFileLayoutMetadata(layoutDescriptor,remoteSystemInfo);
if(rtnMsg.contains("[S]")) {
saved = true;
}
mav.addObject("saved", saved);
return mav;
}
/** .<br />
* @param fileLayoutId ID
* @return jsonView
*/
public ModelAndView removeLinkFileLayoutMetadata(String fileLayoutId) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = crdnStngService.removeLinkFileLayoutMetadata(fileLayoutId);
if(rtnMsg.contains("[S]")) {
saved = true;
}
mav.addObject("saved", saved);
return mav;
}
}

@ -165,7 +165,7 @@ public class Crdn05Controller extends ApplicationController {
for(int i=0; i < layoutDescriptors.size(); i++) { for(int i=0; i < layoutDescriptors.size(); i++) {
DataObject remoteInfo = crdnStngMapper.selectRemoteInfo(layoutDescriptors.get(i).getFileLayoutId()); DataObject remoteInfo = crdnStngMapper.selectRemoteInfo(layoutDescriptors.get(i).getFileLayoutId());
if(remoteInfo == null) { if(remoteInfo == null || remoteInfo.string("REMOTE_IP").equals("")) {
continue; continue;
} }

@ -7,10 +7,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.ExmptnVhcl; import cokr.xit.fims.crdn.ExmptnVhcl;
import cokr.xit.fims.crdn.Team; import cokr.xit.fims.crdn.Team;
import cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.excl.CrdnReReg; import cokr.xit.fims.excl.CrdnReReg;
import cokr.xit.fims.excl.LevyExcl; import cokr.xit.fims.excl.LevyExcl;
@ -191,6 +193,42 @@ public class BpvController {
} }
@Controller
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 관리 업무", value=CLASS_URL+Crdn01Controller.CLASS_URL)
class Crdn01Controller extends cokr.xit.fims.crdn.web.Crdn01Controller {
@Override
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 목록 조회", value=METHOD_URL.getLinkFileLayoutMetadataList)
public ModelAndView getLinkFileLayoutMetadataList(CrdnQuery query) {
return super.getLinkFileLayoutMetadataList(query);
}
@Override
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 상세정보 조회", value=METHOD_URL.getLinkFileLayoutMetadataInfo)
public ModelAndView getLinkFileLayoutMetadataInfo(HttpServletRequest hReq, String fileLayoutId) {
return super.getLinkFileLayoutMetadataInfo(hReq, fileLayoutId);
}
@Override
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 등록", value=METHOD_URL.createLinkFileLayoutMetadata)
public ModelAndView createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.createLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 수정", value=METHOD_URL.updateLinkFileLayoutMetadata)
public ModelAndView updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.updateLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="전용차로과태료업무 장비단속파일 레이아웃 삭제", value=METHOD_URL.removeLinkFileLayoutMetadata)
public ModelAndView removeLinkFileLayoutMetadata(String fileLayoutId) {
return super.removeLinkFileLayoutMetadata(fileLayoutId);
}
}
@Controller @Controller
@RequestMapping(name="전용차로과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL) @RequestMapping(name="전용차로과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL)
class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller {

@ -104,6 +104,20 @@ public class CmnController {
} }
} }
@Controller
@RequestMapping(name="장비단속 레이아웃 설정 관리", value=Crdn01Controller.CLASS_URL)
class Crdn01Controller extends cokr.xit.fims.crdn.web.Crdn01Controller {
/** .
* @return fims/crdn/crdn01010-main
*/
@Override
@RequestMapping(name="장비단속 레이아웃 설정 관리 메인", value=METHOD_URL.linkFileLayoutMain)
public ModelAndView linkFileLayoutMain() {
return super.linkFileLayoutMain();
}
}
@Controller @Controller
@RequestMapping(name="단속 자료 검사", value=Crdn02Controller.CLASS_URL) @RequestMapping(name="단속 자료 검사", value=Crdn02Controller.CLASS_URL)
class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller {

@ -8,8 +8,10 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.cmmn.PrintOption; import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.epst.EpostGdcc; import cokr.xit.fims.epst.EpostGdcc;
import cokr.xit.fims.epst.EpostQuery; import cokr.xit.fims.epst.EpostQuery;
@ -208,6 +210,42 @@ public class DpvController {
} }
@Controller
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 관리 업무", value=CLASS_URL+Crdn01Controller.CLASS_URL)
class Crdn01Controller extends cokr.xit.fims.crdn.web.Crdn01Controller {
@Override
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 목록 조회", value=METHOD_URL.getLinkFileLayoutMetadataList)
public ModelAndView getLinkFileLayoutMetadataList(CrdnQuery query) {
return super.getLinkFileLayoutMetadataList(query);
}
@Override
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 상세정보 조회", value=METHOD_URL.getLinkFileLayoutMetadataInfo)
public ModelAndView getLinkFileLayoutMetadataInfo(HttpServletRequest hReq, String fileLayoutId) {
return super.getLinkFileLayoutMetadataInfo(hReq, fileLayoutId);
}
@Override
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 등록", value=METHOD_URL.createLinkFileLayoutMetadata)
public ModelAndView createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.createLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 수정", value=METHOD_URL.updateLinkFileLayoutMetadata)
public ModelAndView updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.updateLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="장애인과태료업무 장비단속파일 레이아웃 삭제", value=METHOD_URL.removeLinkFileLayoutMetadata)
public ModelAndView removeLinkFileLayoutMetadata(String fileLayoutId) {
return super.removeLinkFileLayoutMetadata(fileLayoutId);
}
}
@Controller @Controller
@RequestMapping(name="장애인과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL) @RequestMapping(name="장애인과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL)
class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller {

@ -7,8 +7,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.excl.CrdnReReg; import cokr.xit.fims.excl.CrdnReReg;
import cokr.xit.fims.excl.LevyExcl; import cokr.xit.fims.excl.LevyExcl;
@ -189,6 +191,42 @@ public class EcaController {
} }
@Controller
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 관리 업무", value=CLASS_URL+Crdn01Controller.CLASS_URL)
class Crdn01Controller extends cokr.xit.fims.crdn.web.Crdn01Controller {
@Override
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 목록 조회", value=METHOD_URL.getLinkFileLayoutMetadataList)
public ModelAndView getLinkFileLayoutMetadataList(CrdnQuery query) {
return super.getLinkFileLayoutMetadataList(query);
}
@Override
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 상세정보 조회", value=METHOD_URL.getLinkFileLayoutMetadataInfo)
public ModelAndView getLinkFileLayoutMetadataInfo(HttpServletRequest hReq, String fileLayoutId) {
return super.getLinkFileLayoutMetadataInfo(hReq, fileLayoutId);
}
@Override
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 등록", value=METHOD_URL.createLinkFileLayoutMetadata)
public ModelAndView createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.createLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 수정", value=METHOD_URL.updateLinkFileLayoutMetadata)
public ModelAndView updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.updateLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="전기차과태료업무 장비단속파일 레이아웃 삭제", value=METHOD_URL.removeLinkFileLayoutMetadata)
public ModelAndView removeLinkFileLayoutMetadata(String fileLayoutId) {
return super.removeLinkFileLayoutMetadata(fileLayoutId);
}
}
@Controller @Controller
@RequestMapping(name="전기차과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL) @RequestMapping(name="전기차과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL)
class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller {

@ -7,9 +7,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.cmmn.ftp.RemoteSystemInfo;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.Team; import cokr.xit.fims.crdn.Team;
import cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.excl.CrdnReReg; import cokr.xit.fims.excl.CrdnReReg;
import cokr.xit.fims.excl.LevyExcl; import cokr.xit.fims.excl.LevyExcl;
@ -190,6 +192,42 @@ public class PvsController {
} }
@Controller
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 관리 업무", value=CLASS_URL+Crdn01Controller.CLASS_URL)
class Crdn01Controller extends cokr.xit.fims.crdn.web.Crdn01Controller {
@Override
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 목록 조회", value=METHOD_URL.getLinkFileLayoutMetadataList)
public ModelAndView getLinkFileLayoutMetadataList(CrdnQuery query) {
return super.getLinkFileLayoutMetadataList(query);
}
@Override
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 상세정보 조회", value=METHOD_URL.getLinkFileLayoutMetadataInfo)
public ModelAndView getLinkFileLayoutMetadataInfo(HttpServletRequest hReq, String fileLayoutId) {
return super.getLinkFileLayoutMetadataInfo(hReq, fileLayoutId);
}
@Override
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 등록", value=METHOD_URL.createLinkFileLayoutMetadata)
public ModelAndView createLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.createLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 수정", value=METHOD_URL.updateLinkFileLayoutMetadata)
public ModelAndView updateLinkFileLayoutMetadata(LayoutDescriptor layoutDescriptor, RemoteSystemInfo remoteSystemInfo) {
return super.updateLinkFileLayoutMetadata(layoutDescriptor, remoteSystemInfo);
}
@Override
@RequestMapping(name="주정차과태료업무 장비단속파일 레이아웃 삭제", value=METHOD_URL.removeLinkFileLayoutMetadata)
public ModelAndView removeLinkFileLayoutMetadata(String fileLayoutId) {
return super.removeLinkFileLayoutMetadata(fileLayoutId);
}
}
@Controller @Controller
@RequestMapping(name="주정차과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL) @RequestMapping(name="주정차과태료업무 단속자료검사 업무", value=CLASS_URL+Crdn02Controller.CLASS_URL)
class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller { class Crdn02Controller extends cokr.xit.fims.crdn.web.Crdn02Controller {

@ -46,6 +46,198 @@ SELECT STDG_CD
AND SUBSTR(STDG_CD,1,5) = #{sggCd} AND SUBSTR(STDG_CD,1,5) = #{sggCd}
</select> </select>
<select id="selectLinkFileLayoutMetadataList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataObject">
/* 연계파일 레이아웃 목록 조회(crdnStngMapper.selectLinkFileLayoutMetadataList) */
<include refid="utility.paging-prefix"/>
SELECT A.FILE_LAYOUT_ID
, GET_CODE_NM('FIM054', A.TASK_SE_CD) AS TASK_SE_NM
, (SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_CD = A.DEPT_CD) AS DEPT_NM
, (CASE A.DATA_FILE_SE
WHEN 'TXT'
THEN '텍스트파일 포함'
WHEN 'JPG'
THEN '텍스트파일 미포함'
WHEN 'BIN'
THEN '단일 바이너리 파일'
ELSE '' END
) AS DATA_FILE_SE_NM
, A.ENT_NM
, B.LINK_ENT_NM
FROM TB_CRDN_FILE_LAYOUT A
LEFT OUTER JOIN TB_FTP_INFO B ON (A.FILE_LAYOUT_ID = B.FILE_LAYOUT_ID)
WHERE A.USE_YN = 'Y'
AND A.TASK_SE_CD = #{taskSeCd}
AND A.SGG_CD = #{sggCd}
<include refid="utility.sortBy" />
<include refid="utility.paging-suffix"/>
</select>
<select id="selectLinkFileLayoutMetadataInfo" parameterType="string" resultType="dataObject">
/* 연계파일 레이아웃 상세 조회(crdnStngMapper.selectLinkFileLayoutMetadataInfo) */
SELECT A.FILE_LAYOUT_ID
, A.SGG_CD
, A.TASK_SE_CD
, A.INST_CD
, A.DEPT_CD
, A.DATA_FILE_SE
, A.FILE_NM_SZ
, A.FILE_NM_SE_TYPE
, A.FILE_NM_LAYOUT
, A.DATA_SE_TYPE1
, A.DATA_LAYOUT1
, A.DATA_SE_TYPE2
, A.DATA_LAYOUT2
, A.FILE_TNOCS
, A.LINK_FILE_PATH
, A.ENT_NM
, A.SAME_ITEMS
, A.INCREASE_ITEM
, A.INCREASE_TYPE
, B.FILE_LAYOUT_ID
, B.REMOTE_IP
, B.REMOTE_ID
, B.REMOTE_PASSWORD
, B.REMOTE_OS
, B.REMOTE_WORK_PATH
, B.LINK_ENT_NM
FROM TB_CRDN_FILE_LAYOUT A
LEFT OUTER JOIN TB_FTP_INFO B ON (A.FILE_LAYOUT_ID = B.FILE_LAYOUT_ID)
WHERE A.USE_YN = 'Y'
AND A.FILE_LAYOUT_ID = #{fileLayoutId}
</select>
<insert id="insertCrdnFileLayout" parameterType="map">
/* 연계파일 레이아웃 등록(crdnStngMapper.insertCrdnFileLayout) */
<selectKey resultType="string" keyProperty="layoutDescriptor.fileLayoutId" keyColumn="NEW_ID" order="BEFORE">
SELECT
LPAD(CAST(IFNULL(MAX(FILE_LAYOUT_ID) + 1, 1) AS INT), 10, '0')
AS NEW_ID
FROM TB_CRDN_FILE_LAYOUT
</selectKey>
INSERT
INTO TB_CRDN_FILE_LAYOUT (
FILE_LAYOUT_ID
, SGG_CD
, TASK_SE_CD
, INST_CD
, DEPT_CD
, DATA_FILE_SE
, FILE_NM_SZ
, FILE_NM_SE_TYPE
, FILE_NM_LAYOUT
, DATA_SE_TYPE1
, DATA_LAYOUT1
, DATA_SE_TYPE2
, DATA_LAYOUT2
, FILE_TNOCS
, LINK_FILE_PATH
, ENT_NM
, SAME_ITEMS
, INCREASE_ITEM
, INCREASE_TYPE
, USE_YN
, REG_DT
, RGTR
, MDFCN_DT
, MDFR
) VALUES (
#{layoutDescriptor.fileLayoutId}
, #{layoutDescriptor.sggCd}
, #{layoutDescriptor.taskSeCd}
, #{layoutDescriptor.instCd}
, #{layoutDescriptor.deptCd}
, #{layoutDescriptor.fileGroup}
, #{layoutDescriptor.fileNameLength}
, #{layoutDescriptor.fileNameSeperator}
, #{layoutDescriptor.fileNameItmes}
, #{layoutDescriptor.contentSeperator}
, #{layoutDescriptor.contentItems}
, #{layoutDescriptor.contentSecondSeperator}
, #{layoutDescriptor.secondSeperatorStarterItems}
, #{layoutDescriptor.countPerFileGroup}
, #{layoutDescriptor.linkFileLocation}
, #{layoutDescriptor.enterpriseName}
, #{layoutDescriptor.sameItemsInFileGroup}
, #{layoutDescriptor.increaseItemInFileGroup}
, #{layoutDescriptor.increaseTypeInFileGroup}
, 'Y'
, <include refid="utility.now" />
, #{currentUser.id}
, <include refid="utility.now" />
, #{currentUser.id}
)
</insert>
<insert id="insertFtpInfo" parameterType="map">
/* 파일연계 원격지 정보 등록(crdnStngMapper.insertFtpInfo) */
INSERT
INTO TB_FTP_INFO (
FILE_LAYOUT_ID
, REMOTE_IP
, REMOTE_ID
, REMOTE_PASSWORD
, REMOTE_OS
, REMOTE_WORK_PATH
, LINK_ENT_NM
) VALUES (
#{layoutDescriptor.fileLayoutId}
, #{remoteSystemInfo.ip}
, #{remoteSystemInfo.id}
, #{remoteSystemInfo.pw}
, #{remoteSystemInfo.osType}
, #{remoteSystemInfo.workPath}
, #{layoutDescriptor.linkEnterpriseName}
)
</insert>
<update id="updateCrdnFileLayout" parameterType="map">
/* 연계파일 레이아웃 수정(crdnStngMapper.updateCrdnFileLayout) */
UPDATE TB_CRDN_FILE_LAYOUT
SET SGG_CD = #{layoutDescriptor.sggCd}
, TASK_SE_CD = #{layoutDescriptor.taskSeCd}
, INST_CD = #{layoutDescriptor.instCd}
, DEPT_CD = #{layoutDescriptor.deptCd}
, DATA_FILE_SE = #{layoutDescriptor.fileGroup}
, FILE_NM_SZ = #{layoutDescriptor.fileNameLength}
, FILE_NM_SE_TYPE = #{layoutDescriptor.fileNameSeperator}
, FILE_NM_LAYOUT = #{layoutDescriptor.fileNameItmes}
, DATA_SE_TYPE1 = #{layoutDescriptor.contentSeperator}
, DATA_LAYOUT1 = #{layoutDescriptor.contentItems}
, DATA_SE_TYPE2 = #{layoutDescriptor.contentSecondSeperator}
, DATA_LAYOUT2 = #{layoutDescriptor.secondSeperatorStarterItems}
, FILE_TNOCS = #{layoutDescriptor.countPerFileGroup}
, LINK_FILE_PATH = #{layoutDescriptor.linkFileLocation}
, ENT_NM = #{layoutDescriptor.enterpriseName}
, SAME_ITEMS = #{layoutDescriptor.sameItemsInFileGroup}
, INCREASE_ITEM = #{layoutDescriptor.increaseItemInFileGroup}
, INCREASE_TYPE = #{layoutDescriptor.increaseTypeInFileGroup}
, MDFCN_DT = <include refid="utility.now" />
, MDFR = #{currentUser.id}
WHERE FILE_LAYOUT_ID = #{layoutDescriptor.fileLayoutId}
</update>
<update id="updateFtpInfo" parameterType="map">
/* 파일연계 원격지 정보 수정(crdnStngMapper.updateFtpInfo) */
UPDATE TB_FTP_INFO
SET REMOTE_IP = #{remoteSystemInfo.ip}
, REMOTE_ID = #{remoteSystemInfo.id}
, REMOTE_PASSWORD = #{remoteSystemInfo.pw}
, REMOTE_OS = #{remoteSystemInfo.osType}
, REMOTE_WORK_PATH = #{remoteSystemInfo.workPath}
, LINK_ENT_NM = #{layoutDescriptor.linkEnterpriseName}
WHERE FILE_LAYOUT_ID = #{layoutDescriptor.fileLayoutId}
</update>
<update id="deleteCrdnFileLayout" parameterType="map">
/* 연계파일 레이아웃 삭제(crdnStngMapper.deleteCrdnFileLayout) */
UPDATE TB_CRDN_FILE_LAYOUT
SET USE_YN = 'N'
, MDFCN_DT = <include refid="utility.now" />
, MDFR = #{currentUser.id}
WHERE FILE_LAYOUT_ID = #{fileLayoutId}
</update>
<resultMap id="descriptorRow" type="cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor"> <resultMap id="descriptorRow" type="cokr.xit.fims.crdn.receive.eqpmnt.LayoutDescriptor">
<result property="fileLayoutId" column="FILE_LAYOUT_ID" /> <!-- 파일 레이아웃 ID --> <result property="fileLayoutId" column="FILE_LAYOUT_ID" /> <!-- 파일 레이아웃 ID -->
<result property="sggCd" column="SGG_CD" /> <!-- 시군구 코드 --> <result property="sggCd" column="SGG_CD" /> <!-- 시군구 코드 -->

@ -0,0 +1,334 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="pageKorName" scope="request">장비단속레이아웃 관리</c:set>
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120" title="검색">
검색
</button>
</span>
</div>
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<label class="form-label fw-bold form-search-title">업무구분</label>
<span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item">
<label>
<input name="taskSeCd" type="radio" value="${item.code}"
class="form-check-input" alt="업무구분"
onchange="pageObject['${pageName}'].fnResetAndChangeBiz(this.value);">
${item.value}
</label>
</c:forEach>
</span>
</div>
<div class="col-6">
</div>
<div class="col-6">
</div>
<div class="col-6">
</div>
<div class="col-6">
</div>
<div class="col-6">
</div>
</div>
</div>
</form>
<div>
<div id="gridbuttonArea--${pageName}" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<label id="layoutPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="layoutPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" class="btn btn-primary w-px-120"
id="btnAdd--${pageName}" title="추가">
추가
</button>
</span>
</div>
</div>
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr id="layoutThead--${pageName}">
<th style="width: 80px;">No.</th>
<th style="width: 160px;">업무명</th>
<th style="width: 240px;">부서명</th>
<th style="width: 240px;">파일형식</th>
<th style="width: 160px;">업체명</th>
<th style="width: 160px;">업체명(연계)</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody id="layoutTbody--${pageName}">
</tbody>
<template id="layoutRow--${pageName}">
<tr data-key="{FILE_LAYOUT_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TASK_SE_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEPT_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DATA_FILE_SE_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{ENT_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{LINK_ENT_NM}</td>
<td class="dummy-td cmn"></td>
</tr>
</template>
<template id="layoutNotFound--${pageName}">
<tr>
<td valign="top" colspan="7" class="dataTables_empty text-center">
레이아웃 정보를 찾지 못했습니다.
</td>
</tr>
</template>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.layoutControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.LAYOUT_ID : "",
urls : {
load : "",
getInfo : ""
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
$P.layoutControl.defaultFetchSize = FETCH_XS;
$P.layoutControl.untilPageNum = 0;
$P.layoutControl.beforeCurrent = null;
/**************************************************************************
* Dataset.on
**************************************************************************/
$P.layoutControl.dataset.onDatasetChange = (obj) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.layoutControl.dataset, t.found, t.notFound, t.replacer);
$P.renderLayoutList(obj["Total"], $P.layoutControl.dataset.length, trs);
Apply.fromDataset.paging($P.layoutControl.dataset, obj, "layoutPaging--${pageName}");
};
$P.layoutControl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.layoutControl.dataset, dataItem, $("#layoutTbody--${pageName}")[0]);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.layoutControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do");
$P.layoutControl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do");
$P.fnReset();
}
$P.fnReset = () => {
var searchForm = $("#frmSearch--${pageName}");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='hidden']").val("");
searchForm.find("input[type='text']").val("");
$P.layoutControl.dataset.setData([]);
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = $P.layoutControl.defaultFetchSize;
return data;
}
$P.searchLayoutList = () => {
$P.layoutControl.query = $P.getParams();
$P.layoutControl.load(1);
}
$P.scrollLayoutList = () => {
$P.layoutControl.load($P.layoutControl.query.pageNum + 1);
}
$P.refreshLayoutList = () => {
if($P.layoutControl.query.pageNum == null){
return;
}
$P.layoutControl.untilPageNum = $P.layoutControl.query.pageNum;
$P.layoutControl.query.fetchSize = $P.layoutControl.defaultFetchSize * $P.layoutControl.query.pageNum;
$P.layoutControl.load(1);
}
$P.getGridTemplate = () => {
var notFound = [document.getElementById("layoutNotFound--${pageName}").innerHTML];
var found = document.getElementById("layoutRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickLayoutList('" + dataItem.getValue("FILE_LAYOUT_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickLayoutList('" + dataItem.getValue("FILE_LAYOUT_ID") + "');");
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderLayoutList = (total, listLength, trs) => {
var noMore = (total == listLength);
var initScroll = ($P.layoutControl.query.pageNum < 2) && ($P.layoutControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
if($P.layoutControl.untilPageNum != 0){
$P.layoutControl.query.fetchSize = $P.layoutControl.defaultFetchSize;
$P.layoutControl.query.pageNum = $P.layoutControl.untilPageNum;
$P.layoutControl.untilPageNum = 0;
}
}
$P.clickLayoutList = (dataKey) => {
if(dataKey == ""){
return;
}
$("#layoutTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.layoutControl.dataset, dataKey);
}
$P.dblclickLayoutList = (dataKey) => {
$P.getInfo(dataKey);
}
$P.createLayout = () => {
$P.getInfo();
}
$P.getInfo = (fileLayoutId) => {
var params = {};
if(fileLayoutId != null){
params.fileLayoutId = fileLayoutId;
}
ajax.get({
url : $P.layoutControl.urls.getInfo,
data : params,
success : (resp) => {
dialog.open({
id : "layoutInfoDialog",
title : "레이아웃 정보",
size : "xl",
content : resp,
init : () => {
var parentRes = new Object();
var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) {
if($P.provide[reqKey]){
parentRes[reqKey] = $P.provide[reqKey];
} else {
parentRes[reqKey] = function(){};
}
}
pageObject.parentRes.push(parentRes);
setDialogZindex();
}
});
}
});
}
$P.provide = {
"refreshList" : function(){
$P.refreshLayoutList();
},
};
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchLayoutList());
$('#btnAdd--${pageName}').on('click', () => $P.createLayout());
$('#btnDel--${pageName}').on('click', () => $P.removeLayout());
/**************************************************************************
* 초기화
**************************************************************************/
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollLayoutList);
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
});
</script>

@ -0,0 +1,363 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="pageKorName" scope="request">장비단속레이아웃 상세</c:set>
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<form id="frmEdit--${pageName}" name="frmEdit">
<div class="card my-2">
<div class="card-header">
<h5>파일 레이아웃</h5>
</div>
<div class="card-body">
<input type="hidden" id="fileLayoutId--${pageName}" name="fileLayoutId" data-map="FILE_LAYOUT_ID" />
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" id="instCd--${pageName}" name="instCd" data-map="INST_CD" />
<input type="hidden" id="deptCd--${pageName}" name="deptCd" data-map="DEPT_CD" />
<div class="row g-1">
<div class="col-md-4">
<label for="fileGroup--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end required">
자료 파일 구분
</label>
<select id="fileGroup--${pageName}" name="fileGroup" data-map="DATA_FILE_SE"
class="form-select" required>
<option value="">선택</option>
<option value="TXT">텍스트파일 포함</option>
<option value="JPG">텍스트파일 미포함</option>
<option value="BIN">단일 바이너리 파일</option>
</select>
</div>
<div class="col-md-4">
<label for="fileNameLength--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
파일명 길이
</label>
<input type="text" id="fileNameLength--${pageName}" name="fileNameLength" data-map="FILE_NM_SZ"
class="form-control w-px-70" maxlength="4" data-maxlengthb="4" />
</div>
<div class="col-md-4">
<label for="enterpriseName--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
업체명
</label>
<input type="text" id="enterpriseName--${pageName}" name="enterpriseName" data-map="ENT_NM"
class="form-control" maxlength="100" data-maxlengthb="100" />
</div>
<div class="col-md-2">
<label for="fileNameSeperator--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
파일명 구분 유형
</label>
<select id="fileNameSeperator--${pageName}" name="fileNameSeperator" data-map="FILE_NM_SE_TYPE"
class="form-select">
<option value=""></option>
<option value="_">언더바</option>
</select>
</div>
<div class="col-md-10">
<label for="fileNameItmes--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
파일명 형식
</label>
<input type="text" id="fileNameItmes--${pageName}" name="fileNameItmes" data-map="FILE_NM_LAYOUT"
class="form-control w-100" maxlength="500" data-maxlengthb="500" />
</div>
<div class="col-md-2">
<label for="contentSeperator--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
자료 구분 유형1
</label>
<select id="contentSeperator--${pageName}" name="contentSeperator" data-map="DATA_SE_TYPE1"
class="form-select">
<option value=""></option>
<option value=",">콤마</option>
<option value="byte">바이트</option>
</select>
</div>
<div class="col-md-10">
<label for="contentItems--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
자료 형식1
</label>
<input type="text" id="contentItems--${pageName}" name="contentItems" data-map="DATA_LAYOUT1"
class="form-control w-100" maxlength="500" data-maxlengthb="500" />
</div>
<div class="col-md-2">
<label for="contentSecondSeperator--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
자료 구분 유형2
</label>
<select id="contentSecondSeperator--${pageName}" name="contentSecondSeperator" data-map="DATA_SE_TYPE2"
class="form-select">
<option value=""></option>
<option value=",">콤마</option>
<option value="LineBreak">줄바꿈문자</option>
</select>
</div>
<div class="col-md-10">
<label for="secondSeperatorStarterItems--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
자료 형식2
</label>
<input type="text" id="secondSeperatorStarterItems--${pageName}" name="secondSeperatorStarterItems" data-map="DATA_LAYOUT2"
class="form-control w-100" maxlength="500" data-maxlengthb="500" />
</div>
<div class="col-md-2">
<label for="countPerFileGroup--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
파일 총 건수
</label>
<input type="text" id="countPerFileGroup--${pageName}" name="countPerFileGroup" data-map="FILE_TNOCS"
class="form-control w-50" maxlength="2" data-maxlengthb="2" />
</div>
<div class="col-md-10">
<label for="linkFileLocation--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
연계 파일 경로
</label>
<input type="text" id="linkFileLocation--${pageName}" name="linkFileLocation" data-map="LINK_FILE_PATH"
class="form-control w-100" maxlength="200" data-maxlengthb="200" />
</div>
<div class="col-md-9">
<label for="sameItemsInFileGroup--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
동일 항목
</label>
<input type="text" id="sameItemsInFileGroup--${pageName}" name="sameItemsInFileGroup" data-map="SAME_ITEMS"
class="form-control w-px-600" maxlength="300" data-maxlengthb="300" />
</div>
<div class="col-md-9">
<label for="increaseItemInFileGroup--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
증가 항목
</label>
<input type="text" id="increaseItemInFileGroup--${pageName}" name="increaseItemInFileGroup" data-map="INCREASE_ITEM"
class="form-control w-px-600" maxlength="300" data-maxlengthb="300" />
</div>
<div class="col-md-3">
<label for="increaseTypeInFileGroup--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
증가 형식
</label>
<select id="increaseTypeInFileGroup--${pageName}" name="increaseTypeInFileGroup" data-map="INCREASE_TYPE"
class="form-select">
<option value=""></option>
<option value="number">숫자</option>
<option value="alphabet">영문자</option>
</select>
</div>
</div>
</div>
</div>
<div class="card my-2">
<div class="card-header">
<h5>파일전송 연계 정보</h5>
</div>
<div class="card-body">
<div class="row g-1">
<div class="col-md-6">
<label for="linkEnterpriseName--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
업체명(연계)
</label>
<input type="text" id="linkEnterpriseName--${pageName}" name="linkEnterpriseName" data-map="LINK_ENT_NM"
class="form-control" maxlength="100" data-maxlengthb="100" />
</div>
<div class="col-md-6">
<label for="ip--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
아이피
</label>
<input type="text" id="ip--${pageName}" name="ip" data-map="REMOTE_IP"
class="form-control" maxlength="100" data-maxlengthb="100" />
</div>
<div class="col-md-6">
<label for="id--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
아이디
</label>
<input type="text" id="id--${pageName}" name="id" data-map="REMOTE_ID"
class="form-control" maxlength="100" data-maxlengthb="100" />
</div>
<div class="col-md-6">
<label for="pw--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
패스워드
</label>
<input type="text" id="pw--${pageName}" name="pw" data-map="REMOTE_PASSWORD"
class="form-control" maxlength="100" data-maxlengthb="100" />
</div>
<div class="col-md-2">
<label for="osType--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
운영체제
</label>
<select id="osType--${pageName}" name="osType" data-map="REMOTE_OS"
class="form-select w-100">
<option value=""></option>
<option value="linux">리눅스</option>
<option value="windows">윈도우</option>
</select>
</div>
<div class="col-md-10">
<label for="workPath--${pageName}"
class="w-px-130 bg-lighter pe-2 ps-2 col-form-label text-sm-start">
파일경로
</label>
<input type="text" id="workPath--${pageName}" name="workPath" data-map="REMOTE_WORK_PATH"
class="form-control w-100" maxlength="100" data-maxlengthb="100" />
</div>
</div>
</div>
</div>
<div class="row m-3">
<div class="col-md-12">
<span class="float-end">
<button type="button" id="btnSave--${pageName}" class="btn btn-primary">저장</button>
<button type="button" id="btnDelete--${pageName}" class="btn btn-primary">삭제</button>
</span>
</div>
</div>
</form>
</div>
</div>
<script>
pageObject["${pageName}"] = {};
pageObject["${pageName}"].provided = {};
pageObject.childReq = [];
pageObject.childReq.push({
refreshList : function(){ },
});
$(document).ready(function(){
var $P = pageObject["${pageName}"];
if(pageObject.parentRes.length > 0){
$P.provided = pageObject.parentRes.pop();
} else {
$P.provided = pageObject.childReq.pop();
}
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
$P.layoutControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.FILE_LAYOUT_ID : "",
urls : {
create : wctx.url("/${taskSeCd}/crdn/crdn01/020/create.do"),
update : wctx.url("/${taskSeCd}/crdn/crdn01/020/update.do"),
remove : wctx.url("/${taskSeCd}/crdn/crdn01/020/remove.do")
},
formats: {
}
});
/**************************************************************************
* Dataset.on
**************************************************************************/
$P.layoutControl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){
return;
}
$P.formFields.set(dataItem);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnSave = () => {
if(!customValidate($("#frmEdit--${pageName}").find("input,select,textarea"))) return;
var info = $P.formFields.get();
var create = $P.layoutControl.dataset.empty;
ajax.post({
url : create ? $P.layoutControl.urls.create : $P.layoutControl.urls.update,
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("layoutInfoDialog");
dialog.alert({
content:"저장되었습니다.",
init : () => {
setDialogZindex();
focusClose();
},
onClose : () => $P.provided.refreshList()
});
}
}
});
}
$P.fnRemove = () => {
var info = $P.formFields.get();
ajax.post({
url : $P.layoutControl.urls.remove,
data : {
fileLayoutId : info.fileLayoutId
},
success : (resp) => {
if(resp.saved){
dialog.close("layoutInfoDialog");
dialog.alert({
content:"삭제되었습니다.",
init : () => {
setDialogZindex();
focusClose();
},
onClose : () => $P.provided.refreshList()
});
}
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$("#btnSave--${pageName}").on('click', () => $P.fnSave());
$("#btnDelete--${pageName}").on('click', () => $P.fnRemove());
/**************************************************************************
* 초기화
**************************************************************************/
var layoutInfo = ${layoutInfo};
if(layoutInfo != null){
$P.layoutControl.dataset.setData([layoutInfo]);
} else {
$P.layoutControl.dataset.setData([]);
$("#sggCd--${pageName}").val(MY_INFO.info.sggCd);
$("#instCd--${pageName}").val(MY_INFO.info.instCd);
$("#deptCd--${pageName}").val(MY_INFO.info.deptCd);
$("#taskSeCd--${pageName}").val("${taskSeCd}");
$("#btnDelete--${pageName}").attr("hidden","hidden");
}
});
</script>

@ -167,7 +167,7 @@
<template id="selectStngButtonsTemplate"> <template id="selectStngButtonsTemplate">
<span class="row g-3" style="display: flex;flex-direction:column"> <span class="row g-3" style="display: flex;flex-direction:column">
<button type="button" class="btn btn-xl btn-primary">수신단속파일(장비) 서식 설정</button> <button type="button" class="btn btn-xl btn-primary" onclick="fnOpenEqmCrdnLayoutStngDialog();">수신단속파일(장비) 서식 설정</button>
<button type="button" class="btn btn-xl btn-primary" onclick="fnOpenOtptStngDialog();">출력물 서식 설정</button> <button type="button" class="btn btn-xl btn-primary" onclick="fnOpenOtptStngDialog();">출력물 서식 설정</button>
<button type="button" class="btn btn-xl btn-primary" onclick="fnOpenExtrStngDialog();">pdf 고지서 정보 추출 설정</button> <button type="button" class="btn btn-xl btn-primary" onclick="fnOpenExtrStngDialog();">pdf 고지서 정보 추출 설정</button>
</span> </span>
@ -182,6 +182,7 @@ function fnOpenTempFileUploadWindow(){
); );
} }
/*--------------------- 설정 선택 다이얼로그 표시 ---------------------*/
function fnOpenSelectStngDialog(){ function fnOpenSelectStngDialog(){
dialog.open({ dialog.open({
id : "selectStngDialog", id : "selectStngDialog",
@ -193,6 +194,7 @@ function fnOpenSelectStngDialog(){
}); });
} }
/*--------------------- 출력물 설정 메인 화면 표시 ---------------------*/
function fnOpenOtptStngDialog(){ function fnOpenOtptStngDialog(){
dialog.close("selectStngDialog"); dialog.close("selectStngDialog");
@ -206,24 +208,25 @@ function fnOpenOtptStngDialog(){
success : (resp) => { success : (resp) => {
dialog.open({ dialog.open({
id : dialogId id : dialogId,
, title : "출력설정" title : "출력설정",
, size : "xxl" size : "xxl",
, content : resp content : resp,
, init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId); $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
$("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd); $("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd);
} },
, onClose : () => { } onClose : () => { }
}); });
} }
}); });
} }
/*--------------------- PDF자료 추출 설정 메인 화면 표시 ---------------------*/
function fnOpenExtrStngDialog(){ function fnOpenExtrStngDialog(){
dialog.close("selectStngDialog"); dialog.close("selectStngDialog");
@ -236,23 +239,54 @@ function fnOpenExtrStngDialog(){
success : (resp) => { success : (resp) => {
dialog.open({ dialog.open({
id : dialogId id : dialogId,
, title : "PDF자료 추출 설정" title : "PDF자료 추출 설정",
, size : "xxl" size : "xxl",
, content : resp content : resp,
, init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId); $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
$("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd); $("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd);
},
onClose : () => { }
});
} }
, onClose : () => { } });
}
/*--------------------- 장비단속레이아웃 설정 메인 화면 표시 ---------------------*/
function fnOpenEqmCrdnLayoutStngDialog(){
dialog.close("selectStngDialog");
var url = wctx.url("/crdn/crdn01/010/main.do");
var dialogId = "eqmCrdnLayoutStngDialog";
ajax.post({
url : url,
data : {},
success : (resp) => {
dialog.open({
id : dialogId,
title : "장비단속 레이아웃 설정",
size : "xxl",
content : resp,
init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
$("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd);
},
onClose : () => { }
}); });
} }
}); });
} }
function fnOpenMyInfo(){ function fnOpenMyInfo(){
window.open( window.open(
wctx.url("/user/openMyInfo.do") wctx.url("/user/openMyInfo.do")

Loading…
Cancel
Save