fix : 시군구명 입력 추가

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

@ -21,10 +21,4 @@ public class CctvBusOnlyCrackDownFactory extends ExtrInterfaceDataFactory<CctvCr
.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 sggCd;
/**
*
*/
private String sggNm;
/**
*
*/
private String instCd;
/**
*
*/

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

@ -62,4 +62,6 @@ public interface XitFrameCodeMapper {
public String instCdToSggCd(String instCd) 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 getSggNm(String sggCd);
}

@ -238,4 +238,15 @@ public class XitFrameCodeServiceBean extends AbstractServiceBean implements XitF
}
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) {
//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 (
file_link_id
, sgg_cd
, sgg_nm
, inst_cd
, sys_se_cd
, crdn_se_cd
, inpt_se_cd
@ -88,6 +90,8 @@
) VALUES (
#{fileLinkId}
, #{sggCd}
, #{sggNm}
, #{instCd}
, #{sysSeCd}
, #{crdnSeCd}
, #{inptSeCd}
@ -144,8 +148,11 @@
, vhrno
, crdn_stts_cd
, crdn_reg_se_cd
, del_yn
, reg_dt
, rgtr
, mdfcn_dt
, mdfr
) SELECT #{crdnId}
, file_link_id
, sgg_cd
@ -169,6 +176,9 @@
, vhrno
, #{crdnSttsCd} -- 단속:10, 서손:11
, #{crdnRegSeCd}
, 'N'
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
FROM tb_crdn_file_link

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

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

Loading…
Cancel
Save