시군구 설정 정보 복사 기능 추가
parent
a4d0587d2f
commit
0adffd5cba
@ -0,0 +1,56 @@
|
|||||||
|
package cokr.xit.backup.web;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import cokr.xit.backup.Backup;
|
||||||
|
import cokr.xit.backup.service.bean.BackupBean;
|
||||||
|
import cokr.xit.foundation.data.DataObject;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class BackupController {
|
||||||
|
@Resource(name = "backupBean")
|
||||||
|
private BackupBean backupBean;
|
||||||
|
|
||||||
|
@GetMapping(name="백업 테이블 및 실사용 테이블 자료 조회", value="/backup/list.do")
|
||||||
|
public ModelAndView getBackupList(String backupTable, String originalTable, String pkName) {
|
||||||
|
ModelAndView mav = new ModelAndView("jsonView");
|
||||||
|
|
||||||
|
List<DataObject> originalDataList = backupBean.getAllList(originalTable, pkName);
|
||||||
|
List<DataObject> backupDataList = backupBean.getAllList(backupTable, originalTable, pkName);
|
||||||
|
|
||||||
|
mav.addObject("originalDataList", originalDataList);
|
||||||
|
mav.addObject("backupDataList", backupDataList);
|
||||||
|
|
||||||
|
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(name="백업 테이블 자료를 사용 테이블로 복사", value="/backup/activate.do")
|
||||||
|
public ModelAndView add(Backup backup) {
|
||||||
|
ModelAndView mav = new ModelAndView("jsonView");
|
||||||
|
|
||||||
|
boolean saved = backupBean.activate(backup);
|
||||||
|
|
||||||
|
mav.addObject("saved", saved);
|
||||||
|
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(name="사용 테이블 자료 삭제 및 백업", value="/backup/deactivate.do")
|
||||||
|
public ModelAndView del(Backup backup) {
|
||||||
|
ModelAndView mav = new ModelAndView("jsonView");
|
||||||
|
|
||||||
|
boolean saved = backupBean.deactivate(backup);
|
||||||
|
|
||||||
|
mav.addObject("saved", saved);
|
||||||
|
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package cokr.xit.copyStng.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||||
|
|
||||||
|
import cokr.xit.foundation.component.AbstractMapper;
|
||||||
|
|
||||||
|
@Mapper("copyStngMapper")
|
||||||
|
public interface CopyStngMapper extends AbstractMapper {
|
||||||
|
|
||||||
|
int copyTask(Map<String, Object> param);
|
||||||
|
|
||||||
|
List<String> selectVltnList(Map<String, Object> param);
|
||||||
|
|
||||||
|
int copyVltn(Map<String, Object> param);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package cokr.xit.copyStng.service.bean;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import cokr.xit.copyStng.dao.CopyStngMapper;
|
||||||
|
import cokr.xit.foundation.AbstractComponent;
|
||||||
|
|
||||||
|
@Component("copyStngBean")
|
||||||
|
public class CopyStngBean extends AbstractComponent {
|
||||||
|
|
||||||
|
@Resource(name = "copyStngMapper")
|
||||||
|
private CopyStngMapper copyStngMapper;
|
||||||
|
|
||||||
|
public boolean copy(String taskSeCd, String srcSgg, String trgtSgg) {
|
||||||
|
Map<String, Object> param = new HashMap<>();
|
||||||
|
param.put("taskSeCd",taskSeCd);
|
||||||
|
param.put("srcSgg",srcSgg);
|
||||||
|
param.put("trgtSgg",trgtSgg);
|
||||||
|
|
||||||
|
copyStngMapper.copyTask(param);
|
||||||
|
|
||||||
|
List<String> vltnCds = copyStngMapper.selectVltnList(param);
|
||||||
|
param.put("vltnCds", vltnCds);
|
||||||
|
int result2 = copyStngMapper.copyVltn(param);
|
||||||
|
if(result2 == vltnCds.size()) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cokr.xit.copyStng.web;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import cokr.xit.copyStng.service.bean.CopyStngBean;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class CopyStngController {
|
||||||
|
|
||||||
|
@Resource(name = "copyStngBean")
|
||||||
|
private CopyStngBean copyStngBean;
|
||||||
|
|
||||||
|
@GetMapping(name="시군구 설정 복사", value="/copyStng/copy.do")
|
||||||
|
public ModelAndView copy(String taskSeCd, String srcSgg, String trgtSgg) {
|
||||||
|
ModelAndView mav = new ModelAndView("jsonView");
|
||||||
|
|
||||||
|
boolean saved = copyStngBean.copy(taskSeCd, srcSgg, trgtSgg);
|
||||||
|
|
||||||
|
mav.addObject("saved", saved);
|
||||||
|
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,230 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cokr.xit.base.code.dao.CodeMapper">
|
||||||
|
|
||||||
|
<resultMap id="categoryRow" type="cokr.xit.base.code.CodeCategory">
|
||||||
|
<result property="id" column="CTGR_ID"/>
|
||||||
|
<result property="name" column="CTGR_NM"/>
|
||||||
|
<result property="description" column="DSCRP"/>
|
||||||
|
<result property="createdAt" column="REG_DT"/>
|
||||||
|
<result property="createdBy" column="RGTR"/>
|
||||||
|
<result property="lastModified" column="MDFCN_DT"/>
|
||||||
|
<result property="modifiedBy" column="MDFR"/>
|
||||||
|
<result property="useYN" column="USE_YN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="groupRow" type="cokr.xit.base.code.CodeGroup">
|
||||||
|
<result property="id" column="GRP_ID"/>
|
||||||
|
<result property="name" column="GRP_NM"/>
|
||||||
|
<result property="categoryID" column="CTGR_ID"/>
|
||||||
|
<result property="description" column="DSCRP"/>
|
||||||
|
<result property="createdAt" column="REG_DT"/>
|
||||||
|
<result property="createdBy" column="RGTR"/>
|
||||||
|
<result property="lastModified" column="MDFCN_DT"/>
|
||||||
|
<result property="modifiedBy" column="MDFR"/>
|
||||||
|
<result property="useYN" column="USE_YN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="codeRow" type="cokr.xit.base.code.CommonCode">
|
||||||
|
<result property="groupID" column="GRP_ID"/>
|
||||||
|
<result property="code" column="CODE"/>
|
||||||
|
<result property="value" column="CODE_VAL"/>
|
||||||
|
<result property="description" column="DSCRP"/>
|
||||||
|
<result property="etc1" column="ETC_1"/>
|
||||||
|
<result property="etc2" column="ETC_2"/>
|
||||||
|
<result property="etc3" column="ETC_3"/>
|
||||||
|
<result property="sortOrder" column="SRT_ORD"/>
|
||||||
|
<result property="createdAt" column="REG_DT"/>
|
||||||
|
<result property="createdBy" column="RGTR"/>
|
||||||
|
<result property="lastModified" column="MDFCN_DT"/>
|
||||||
|
<result property="modifiedBy" column="MDFR"/>
|
||||||
|
<result property="useYN" column="USE_YN"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectCategories"><include refid="utility.paging-prefix" />
|
||||||
|
SELECT *
|
||||||
|
FROM TB_CODE_CTGR
|
||||||
|
WHERE USE_YN = 'Y'
|
||||||
|
<if test="categoryIDs != null"> AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if>
|
||||||
|
<include refid="utility.orderBy" />
|
||||||
|
<include refid="utility.paging-suffix" /></sql>
|
||||||
|
|
||||||
|
<select id="getCategoryList" parameterType="map" resultType="dataobject">/* 코드 카테고리 목록 조회(codeMapper.getCategoryList) */
|
||||||
|
<include refid="selectCategories" /></select>
|
||||||
|
|
||||||
|
<select id="getCategories" parameterType="map" resultMap="categoryRow">/*코드 카테고리 가져오기(codeMapper.getCategories)*/
|
||||||
|
<include refid="selectCategories" /></select>
|
||||||
|
|
||||||
|
<insert id="insertCategory" parameterType="map">/* 코드 카테고리 등록(codeMapper.insertCategory) */
|
||||||
|
INSERT INTO TB_CODE_CTGR (
|
||||||
|
CTGR_ID
|
||||||
|
, CTGR_NM
|
||||||
|
, DSCRP
|
||||||
|
, REG_DT
|
||||||
|
, RGTR
|
||||||
|
, MDFCN_DT
|
||||||
|
, MDFR
|
||||||
|
, USE_YN
|
||||||
|
) VALUES (
|
||||||
|
#{category.id}
|
||||||
|
, #{category.name}
|
||||||
|
, #{category.description}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
, 'Y'
|
||||||
|
)</insert>
|
||||||
|
|
||||||
|
<update id="updateCategory" parameterType="map">/* 코드 카테고리 수정(codeMapper.updateCategory) */
|
||||||
|
UPDATE TB_CODE_CTGR SET
|
||||||
|
CTGR_NM = #{category.name}
|
||||||
|
, DSCRP = #{category.description}
|
||||||
|
, MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
WHERE CTGR_ID = #{category.id}</update>
|
||||||
|
|
||||||
|
<delete id="removeCategories" parameterType="map">/* 코드 카테고리 제거(codeMapper.removeCategories) */
|
||||||
|
UPDATE TB_CODE_CTGR SET
|
||||||
|
MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
, USE_YN = 'N'
|
||||||
|
<if test='categoryIDs != null'>WHERE CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if></delete>
|
||||||
|
|
||||||
|
<sql id="selectGroups"><include refid="utility.paging-prefix" />
|
||||||
|
SELECT *
|
||||||
|
FROM TB_CODE_GRP
|
||||||
|
WHERE USE_YN = 'Y'
|
||||||
|
<if test="categoryIDs != null">AND CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if>
|
||||||
|
<if test="groupIDs != null">AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
|
||||||
|
<include refid="utility.orderBy" />
|
||||||
|
<include refid="utility.paging-suffix" /></sql>
|
||||||
|
|
||||||
|
<select id="getGroupList" parameterType="dataobject" resultType="dataobject">/* 코드그룹 목록 조회(codeMapper.getGroupList) */
|
||||||
|
<include refid="selectGroups" /></select>
|
||||||
|
|
||||||
|
<select id="getGroups" parameterType="map" resultMap="groupRow">/* 코드그룹 가져오기(codeMapper.getGroups) */
|
||||||
|
<include refid="selectGroups" /></select>
|
||||||
|
|
||||||
|
<insert id="insertGroup" parameterType="map">/* 코드그룹 등록(codeMapper.insertGroup) */
|
||||||
|
INSERT INTO TB_CODE_GRP (
|
||||||
|
GRP_ID
|
||||||
|
, GRP_NM
|
||||||
|
, CTGR_ID
|
||||||
|
, DSCRP
|
||||||
|
, REG_DT
|
||||||
|
, RGTR
|
||||||
|
, MDFCN_DT
|
||||||
|
, MDFR
|
||||||
|
, USE_YN
|
||||||
|
) VALUES (
|
||||||
|
#{group.id}
|
||||||
|
, #{group.name}
|
||||||
|
, #{group.categoryID}
|
||||||
|
, #{group.description}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
, 'Y'
|
||||||
|
)</insert>
|
||||||
|
|
||||||
|
<update id="updateGroup" parameterType="map">/* 코드그룹 수정(codeMapper.updateGroup) */
|
||||||
|
UPDATE TB_CODE_GRP SET
|
||||||
|
GRP_NM = #{group.name}
|
||||||
|
, CTGR_ID = #{group.categoryID}
|
||||||
|
, DSCRP = #{group.description}
|
||||||
|
, MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
WHERE GRP_ID = #{group.id}</update>
|
||||||
|
|
||||||
|
<update id="removeGroups" parameterType="map">/*코드그룹 제거(codeMapper.removeGroups) */
|
||||||
|
UPDATE TB_CODE_GRP SET
|
||||||
|
USE_YN = 'N'
|
||||||
|
, MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
<where>
|
||||||
|
<if test="categoryIDs != null">CTGR_ID IN (<foreach collection="categoryIDs" item="categoryID" separator=",">#{categoryID}</foreach>)</if>
|
||||||
|
<if test="groupIDs != null">GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
|
||||||
|
</where></update>
|
||||||
|
|
||||||
|
<sql id="selectCodes"><include refid="utility.paging-prefix" />
|
||||||
|
SELECT *
|
||||||
|
FROM TB_CMN_CODE
|
||||||
|
WHERE USE_YN = 'Y'
|
||||||
|
<if test='groupIDs != null'>AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
|
||||||
|
<if test='codes != null'>AND CODE IN (<foreach collection="codes" item="code" separator=",">#{code}</foreach>)</if>
|
||||||
|
<include refid="utility.orderBy" />
|
||||||
|
<include refid="utility.paging-suffix" /></sql>
|
||||||
|
|
||||||
|
<select id="getCodeList" parameterType="map" resultType="dataobject">/* 그룹별 코드 가져오기(codeMapper.getCodeList) */
|
||||||
|
<include refid="selectCodes" /></select>
|
||||||
|
|
||||||
|
<select id="getCodes" parameterType="map" resultMap="codeRow">/* 코드 가져오기(codeMapper.getCodes) */
|
||||||
|
<include refid="selectCodes" /></select>
|
||||||
|
|
||||||
|
<insert id="insertCode" parameterType="map">/* 코드 등록(codeMapper.insertCode) */
|
||||||
|
INSERT INTO TB_CMN_CODE (
|
||||||
|
GRP_ID
|
||||||
|
, CODE
|
||||||
|
, CODE_VAL
|
||||||
|
, DSCRP
|
||||||
|
, ETC_1
|
||||||
|
, ETC_2
|
||||||
|
, ETC_3
|
||||||
|
, SRT_ORD
|
||||||
|
, REG_DT
|
||||||
|
, RGTR
|
||||||
|
, MDFCN_DT
|
||||||
|
, MDFR
|
||||||
|
, USE_YN
|
||||||
|
) VALUES (
|
||||||
|
#{code.groupID}
|
||||||
|
, #{code.code}
|
||||||
|
, #{code.value}
|
||||||
|
, #{code.description}
|
||||||
|
, #{code.etc1}
|
||||||
|
, #{code.etc2}
|
||||||
|
, #{code.etc3}
|
||||||
|
, #{code.sortOrder}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
,<include refid="utility.now" />
|
||||||
|
, #{currentUser.id}
|
||||||
|
, 'Y'
|
||||||
|
)</insert>
|
||||||
|
|
||||||
|
<update id="updateCode" parameterType="map">/* 코드 수정(codeMapper.updateCode) */
|
||||||
|
UPDATE TB_CMN_CODE SET
|
||||||
|
CODE_VAL = #{code.value}
|
||||||
|
, DSCRP = #{code.description}
|
||||||
|
, ETC_1 = #{code.etc1}
|
||||||
|
, ETC_2 = #{code.etc2}
|
||||||
|
, ETC_3 = #{code.etc3}
|
||||||
|
, MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
WHERE GRP_ID = #{code.groupID}
|
||||||
|
AND CODE = #{code.code}</update>
|
||||||
|
|
||||||
|
<update id="reorderCodes" parameterType="map">/* 코드 정렬순서 변경(codeMapper.reorderCodes) */
|
||||||
|
UPDATE TB_CMN_CODE SET
|
||||||
|
SRT_ORD = CASE CODE<foreach collection="codes" item="code" index="index" separator=" ">
|
||||||
|
WHEN #{code} THEN #{index}</foreach>
|
||||||
|
ELSE SRT_ORD
|
||||||
|
END
|
||||||
|
, MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
WHERE GRP_ID = #{groupID}
|
||||||
|
AND CODE IN (<foreach collection="codes" item="code" separator=",">#{code}</foreach>)</update>
|
||||||
|
|
||||||
|
<update id="removeCodes" parameterType="map">/* 코드 제거(codeMapper.removeCodes) */
|
||||||
|
UPDATE TB_CMN_CODE SET
|
||||||
|
MDFCN_DT =<include refid="utility.now" />
|
||||||
|
, MDFR = #{currentUser.id}
|
||||||
|
, USE_YN = 'N'
|
||||||
|
<where>
|
||||||
|
<if test="groupIDs != null">AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
|
||||||
|
<if test="codes != null">AND CODE IN (<foreach collection="codes" item="code" separator=",">#{code}</foreach>) </if>
|
||||||
|
</where></update>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cokr.xit.copyStng.dao.CopyStngMapper">
|
||||||
|
|
||||||
|
<insert id="copyTask" parameterType="map">
|
||||||
|
INSERT
|
||||||
|
INTO TB_TASK
|
||||||
|
SELECT #{trgtSgg} AS SGG_CD
|
||||||
|
, B.TASK_SE_CD
|
||||||
|
, B.TASK_SE_NM
|
||||||
|
, B.ADVNTCE_DAY_CNT
|
||||||
|
, B.ADVNTCE_RDUCT_RT
|
||||||
|
, B.WKSN_RDUCT_RT
|
||||||
|
, B.FFNLG_ADTN_YMD
|
||||||
|
, B.FFNLG_ADTN_RT
|
||||||
|
, B.FFNLG_INADTN_RT
|
||||||
|
, B.FFNLG_INADTN_MXMM_CNT
|
||||||
|
, B.NXRP_LINK_SE_CD
|
||||||
|
, B.NXRP_LINK_SE_DTL_SN
|
||||||
|
, B.USE_YN
|
||||||
|
, B.REG_DT
|
||||||
|
, B.RGTR
|
||||||
|
, B.MDFCN_DT
|
||||||
|
, B.MDFR
|
||||||
|
FROM TB_TASK B
|
||||||
|
WHERE B.SGG_CD = #{srcSgg}
|
||||||
|
AND B.TASK_SE_CD = #{taskSeCd}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectVltnList" parameterType="map" resultType="string">
|
||||||
|
SELECT A.VLTN_CD
|
||||||
|
FROM TB_VLTN A
|
||||||
|
WHERE A.SGG_CD = #{srcSgg}
|
||||||
|
AND A.TASK_SE_CD = #{taskSeCd}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="copyVltn" parameterType="map">
|
||||||
|
<selectKey resultType="string" keyProperty="vltnId" keyColumn="NEW_ID" order="BEFORE">
|
||||||
|
SELECT
|
||||||
|
LPAD(CAST(IFNULL(MAX(VLTN_ID) + 1, 1) AS INT), 10, '0')
|
||||||
|
AS NEW_ID
|
||||||
|
FROM TB_VLTN
|
||||||
|
</selectKey>
|
||||||
|
INSERT
|
||||||
|
INTO TB_VLTN
|
||||||
|
SELECT (CASE B.VLTN_CD
|
||||||
|
<foreach collection="vltnCds" item="vltnCd" index="index" separator=" ">
|
||||||
|
WHEN #{vltnCd} THEN LPAD(CAST(${vltnId}+${index} AS INT), 10, '0')
|
||||||
|
</foreach>
|
||||||
|
ELSE '' END) AS VLTN_ID
|
||||||
|
, #{trgtSgg} AS SGG_CD
|
||||||
|
, B.TASK_SE_CD
|
||||||
|
, B.VLTN_CD
|
||||||
|
, B.VLTN_ARTCL
|
||||||
|
, B.VLTN_LAW_NM
|
||||||
|
, B.VLTN_LAW1
|
||||||
|
, B.VLTN_LAW2
|
||||||
|
, B.VLTN_LAW_ETC
|
||||||
|
, B.ACNTG_SE_CD
|
||||||
|
, B.ACNTG_SE_NM
|
||||||
|
, B.TXITM_CD
|
||||||
|
, B.TXITM_NM
|
||||||
|
, B.OPER_ITEM_CD
|
||||||
|
, B.OPER_ITEM_NM
|
||||||
|
, B.SPCL_BIZ_CD
|
||||||
|
, B.SPCL_BIZ_NM
|
||||||
|
, B.USE_YN
|
||||||
|
, B.REG_DT
|
||||||
|
, B.RGTR
|
||||||
|
, B.MDFCN_DT
|
||||||
|
, B.MDFR
|
||||||
|
FROM TB_VLTN B
|
||||||
|
WHERE B.SGG_CD = #{srcSgg}
|
||||||
|
AND B.TASK_SE_CD = #{taskSeCd}
|
||||||
|
AND B.VLTN_CD IN (<foreach collection="vltnCds" item="vltnCd" separator=",">#{vltnCd}</foreach>)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,64 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
<form id="frmEdit--${pageName}">
|
||||||
|
<div class="d-flex flex-row justify-content-evenly">
|
||||||
|
<div class="card" style="width:1000px;min-height:200px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">업무</label>
|
||||||
|
<select id="taskSeCd--${pageName}" name="taskSeCd" class="form-select">
|
||||||
|
<c:forEach items="${taskSeCdList}" var="item">
|
||||||
|
<option value="${item.CODE}">${item.CODE_VAL}</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">소스 시군구</label>
|
||||||
|
<select id="srcSgg--${pageName}" name="srcSgg" class="form-select">
|
||||||
|
<c:forEach items="${sggList}" var="item">
|
||||||
|
<option value="${item.SGG_CD}">${item.SGG_NM}</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">타겟 시군구</label>
|
||||||
|
<select id="trgtSgg--${pageName}" name="trgtSgg" class="form-select">
|
||||||
|
<c:forEach items="${sggList}" var="item">
|
||||||
|
<option value="${item.SGG_CD}">${item.SGG_NM}</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<span class="float-end p-4">
|
||||||
|
<button type="button" id="btnCopyStng--${pageName}" class="btn btn-primary">업무,위반 설정 복사</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#btnCopyStng--${pageName}").on("click", function(){
|
||||||
|
|
||||||
|
if($("#srcSgg--${pageName}").val() == $("#trgtSgg--${pageName}").val()){
|
||||||
|
alert("동일한 시군구 선택 불가");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ajax.get({
|
||||||
|
url : wctx.url("copyStng/copy.do"),
|
||||||
|
data : {
|
||||||
|
taskSeCd : $("#taskSeCd--${pageName}").val(),
|
||||||
|
srcSgg : $("#srcSgg--${pageName}").val(),
|
||||||
|
trgtSgg : $("#trgtSgg--${pageName}").val()
|
||||||
|
},
|
||||||
|
success : (resp) => {
|
||||||
|
if(resp.saved){
|
||||||
|
alert('완료');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in New Issue