fix : 시군구명 입력 추가

main
이범준 1 year ago
parent 520cfb00e1
commit 139f47ed5c

@ -21,10 +21,4 @@ public class CctvBusOnlyCrackDownFactory extends ExtrInterfaceDataFactory<CctvCr
.carModel("dkkdkd").build(); .carModel("dkkdkd").build();
} }
// @Override
// public CctvCrackdownDTO.BusOnly createDTO() {
// return CctvCrackdownDTO.BusOnly.builder()
// .carModel("dkkdkd").build();
// }
} }

@ -105,9 +105,17 @@ public class CctvCrackdownDTO {
*/ */
private String crdnId; private String crdnId;
/** /**
* *
*/ */
private String sggCd; private String sggCd;
/**
*
*/
private String sggNm;
/**
*
*/
private String instCd;
/** /**
* *
*/ */

@ -137,6 +137,8 @@ public class EcCctvCrackdownServiceBean extends AbstractServiceBean implements E
extrDTO.setSysSeCd(getUserInfo().getOrgnztId()); extrDTO.setSysSeCd(getUserInfo().getOrgnztId());
extrDTO.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode())); extrDTO.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()));
extrDTO.setSggNm(xitFrameCodeService.getSggNm(extrDTO.getSggCd()));
extrDTO.setInstCd(getUserInfo().getPstinstCode());
if(records.size() >= 3){ if(records.size() >= 3){
extrDTO.setCrdnSeCd(FimsConst.CrdnSeCd.CCTV_DRV.getCode()); extrDTO.setCrdnSeCd(FimsConst.CrdnSeCd.CCTV_DRV.getCode());
@ -189,11 +191,15 @@ public class EcCctvCrackdownServiceBean extends AbstractServiceBean implements E
ExtnlInterfaceUtils.parseFileBusonlyToObject(busOnlyDTO, filePath + "/" + fi.getFileNm(), ExtnlInterfaceUtils.parseFileBusonlyToObject(busOnlyDTO, filePath + "/" + fi.getFileNm(),
uploadRoot + uploadTempPath); uploadRoot + uploadTempPath);
String sggCd = xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode());
// 외부연계 테이블 생성 // 외부연계 테이블 생성
CctvCrackdownDTO.ExtrlRegltCntc extrDTO = CctvCrackdownDTO.ExtrlRegltCntc CctvCrackdownDTO.ExtrlRegltCntc extrDTO = CctvCrackdownDTO.ExtrlRegltCntc
.builder() .builder()
.sysSeCd(getUserInfo().getOrgnztId()) .sysSeCd(getUserInfo().getOrgnztId())
.sggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode())) .sggCd(sggCd)
.sggNm(xitFrameCodeService.getSggNm(sggCd))
.instCd(getUserInfo().getPstinstCode())
.vhrno(busOnlyDTO.getVhrno()) .vhrno(busOnlyDTO.getVhrno())
//.crndDongNm(mdInfos[1]) //.crndDongNm(mdInfos[1])
//.crdnPlc(mdInfos[2]) //.crdnPlc(mdInfos[2])
@ -329,6 +335,7 @@ public class EcCctvCrackdownServiceBean extends AbstractServiceBean implements E
.gpsY(metaFileInfos.size() >= 3? metaFileInfos.get(2).trim() : null) .gpsY(metaFileInfos.size() >= 3? metaFileInfos.get(2).trim() : null)
.crdnYmd(metaFileNames[0].substring(0,8)) .crdnYmd(metaFileNames[0].substring(0,8))
.crdnBzentyCd(metaFileNames[1]) .crdnBzentyCd(metaFileNames[1])
.crdnEqpmntNo(metaFileNames[2]) .crdnEqpmntNo(metaFileNames[2])
.rgtr(getUserInfo().getUniqId()) .rgtr(getUserInfo().getUniqId())
@ -358,7 +365,6 @@ public class EcCctvCrackdownServiceBean extends AbstractServiceBean implements E
.rgtr(getUserInfo().getUniqId()) .rgtr(getUserInfo().getUniqId())
.linkId(extrDTO.getFileLinkId()) .linkId(extrDTO.getFileLinkId())
.sysSeCd(extrDTO.getSysSeCd()) .sysSeCd(extrDTO.getSysSeCd())
.crdnInptSeCd(extrDTO.getInptSeCd())
.build(); .build();
} }

@ -62,4 +62,6 @@ public interface XitFrameCodeMapper {
public String instCdToSggCd(String instCd) throws SQLException; public String instCdToSggCd(String instCd) throws SQLException;
public String sggCdToInstCd(String sggCd) throws SQLException; public String sggCdToInstCd(String sggCd) throws SQLException;
String getSggNm(String sggCd) throws SQLException;
} }

@ -103,4 +103,5 @@ public interface XitFrameCodeService {
*/ */
public String sggCdToInstCd(String sggCd); public String sggCdToInstCd(String sggCd);
public String getSggNm(String sggCd);
} }

@ -238,4 +238,15 @@ public class XitFrameCodeServiceBean extends AbstractServiceBean implements XitF
} }
return result; return result;
} }
@Override
public String getSggNm(String sggCd) {
String result;
try {
result = xitFrameCodeMapper.getSggNm(sggCd);
} catch (SQLException e) {
throw new RuntimeException(String.format("시군구명 조회 실패: %s", e.getMessage()));
}
return result;
}
} }

@ -345,8 +345,7 @@ public class ExtnlInterfaceUtils {
} }
public static void main(String[] args) { public static void main(String[] args) {
//String path = "D:\\project_data\\fims\\01. 연계\\02. CCTV\\CCTV 샘플자료\\버스전용차로\\2017072013465031.F0002";
//parseFileBusonlyToObject(new CctvCrackdownDTO.BusOnly(), path, "");
} }
} }

@ -67,6 +67,8 @@
INTO tb_crdn_file_link ( INTO tb_crdn_file_link (
file_link_id file_link_id
, sgg_cd , sgg_cd
, sgg_nm
, inst_cd
, sys_se_cd , sys_se_cd
, crdn_se_cd , crdn_se_cd
, inpt_se_cd , inpt_se_cd
@ -88,6 +90,8 @@
) VALUES ( ) VALUES (
#{fileLinkId} #{fileLinkId}
, #{sggCd} , #{sggCd}
, #{sggNm}
, #{instCd}
, #{sysSeCd} , #{sysSeCd}
, #{crdnSeCd} , #{crdnSeCd}
, #{inptSeCd} , #{inptSeCd}
@ -144,8 +148,11 @@
, vhrno , vhrno
, crdn_stts_cd , crdn_stts_cd
, crdn_reg_se_cd , crdn_reg_se_cd
, del_yn
, reg_dt , reg_dt
, rgtr , rgtr
, mdfcn_dt
, mdfr
) SELECT #{crdnId} ) SELECT #{crdnId}
, file_link_id , file_link_id
, sgg_cd , sgg_cd
@ -169,6 +176,9 @@
, vhrno , vhrno
, #{crdnSttsCd} -- 단속:10, 서손:11 , #{crdnSttsCd} -- 단속:10, 서손:11
, #{crdnRegSeCd} , #{crdnRegSeCd}
, 'N'
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') , DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr} , #{rgtr}
FROM tb_crdn_file_link FROM tb_crdn_file_link

@ -125,8 +125,11 @@
, vhcl_nm , vhcl_nm
, etc_cn , etc_cn
, crdn_stts_cd , crdn_stts_cd
, del_yn
, reg_dt , reg_dt
, rgtr , rgtr
, mdfcn_dt
, mdfr
) VALUES ( ) VALUES (
#{crdnId} #{crdnId}
, #{sggCd} , #{sggCd}
@ -143,6 +146,9 @@
, #{vhclNm} , #{vhclNm}
, #{etcCn} , #{etcCn}
, #{crdnSttsCd} , #{crdnSttsCd}
, 'N'
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') , DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr} , #{rgtr}
) )

@ -96,4 +96,10 @@
FROM TB_SGG_INFO FROM TB_SGG_INFO
WHERE SGG_CD = #{sggCd} WHERE SGG_CD = #{sggCd}
</select> </select>
<select id="getSggNm" resultType="java.lang.String">
SELECT INST_NM
FROM TB_SGG_INFO
WHERE SGG_CD = #{sggCd}
</select>
</mapper> </mapper>

Loading…
Cancel
Save