Commit a2fd3ba9 by wangkai

driver不补数据å›接口

parent 8f5107bd
Manifest-Version: 1.0
Main-Class: com.hikcreate.update_hbase.UpdateHbaseApplication
/*
package com.hikcreate.update_hbase.controller; package com.hikcreate.update_hbase.controller;
import com.hikcreate.update_hbase.service.DmsmpService; import com.hikcreate.update_hbase.service.DmsmpService;
...@@ -7,9 +8,11 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -7,9 +8,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
*/
/** /**
* 放管服的预警点 * 放管服的预警点
*/ *//*
@RestController @RestController
@RequestMapping("/dmsmp") @RequestMapping("/dmsmp")
public class DmsmpController { public class DmsmpController {
...@@ -18,78 +21,97 @@ public class DmsmpController { ...@@ -18,78 +21,97 @@ public class DmsmpController {
private DmsmpService dmsmpService; private DmsmpService dmsmpService;
/** */
/**
* 临时号牌:同一机动车车辆四次临牌办理 * 临时号牌:同一机动车车辆四次临牌办理
* @param times 次数 * @param times 次数
*/ *//*
@GetMapping("/tempplate") @GetMapping("/tempplate")
public void tempplateWarn(@RequestParam("times") Integer times){ public void tempplateWarn(@RequestParam("times") Integer times){
dmsmpService.tempplateWarn(times); dmsmpService.tempplateWarn(times);
} }
/**
* 所有人和车牌都改变预警
*/ */
/**
* 所有人和车牌都改变预警
*//*
@GetMapping("/plateAndSyrChange") @GetMapping("/plateAndSyrChange")
public void plateAndSyrChange(){ public void plateAndSyrChange(){
dmsmpService.plateAndSyrChange(0); dmsmpService.plateAndSyrChange(0);
} }
/**
* 共同所有人
*/ */
/**
* 共同所有人
*//*
@GetMapping("/commonSyr") @GetMapping("/commonSyr")
public void commonSyr(){ public void commonSyr(){
dmsmpService.commonSyr(0); dmsmpService.commonSyr(0);
} }
/**
* 姓名和身份证号码同时改变
*/ */
/**
* 姓名和身份证号码同时改变
*//*
@GetMapping("/drvNameAndCard") @GetMapping("/drvNameAndCard")
public void drvNameAndCard(){ public void drvNameAndCard(){
dmsmpService.drvNameAndCard(0); dmsmpService.drvNameAndCard(0);
} }
/**
* 制证后推办
*/ */
/**
* 制证后推办
*//*
@GetMapping("/certicateQuit") @GetMapping("/certicateQuit")
public void certicateQuit(){ public void certicateQuit(){
dmsmpService.certicateQuit(0); dmsmpService.certicateQuit(0);
} }
/**
* 同一所有人多次变更号牌
*/ */
/**
* 同一所有人多次变更号牌
*//*
@GetMapping("/hisSyrPlateChangeMany") @GetMapping("/hisSyrPlateChangeMany")
public void hisSyrPlateChangeMany(){ public void hisSyrPlateChangeMany(){
dmsmpService.syrPlateChangeMany(0); dmsmpService.syrPlateChangeMany(0);
} }
/**
*车辆短期解押
*/ */
/**
*车辆短期解押
*//*
@GetMapping("/getHisMortgageCancel") @GetMapping("/getHisMortgageCancel")
public void getHisMortgageCancel(){ public void getHisMortgageCancel(){
dmsmpService.getHisMortgageCancel(0); dmsmpService.getHisMortgageCancel(0);
} }
/**
*退办业务短期办结
*/ */
/**
*退办业务短期办结
*//*
@GetMapping("/getHisRetireDealAgain") @GetMapping("/getHisRetireDealAgain")
public void getHisRetireDealAgain(){ public void getHisRetireDealAgain(){
dmsmpService.getHisRetireDealAgain(0); dmsmpService.getHisRetireDealAgain(0);
} }
/**
* 同步残疾人车辆:规则---审批通过,符合条件,核发通过
*/ */
/**
* 同步残疾人车辆:规则---审批通过,符合条件,核发通过
*//*
@GetMapping("/synDeformedproposer") @GetMapping("/synDeformedproposer")
public void synDeformedproposer(){ public void synDeformedproposer(){
dmsmpService.synDeformedproposer(0); dmsmpService.synDeformedproposer(0);
} }
} }
*/
...@@ -2,6 +2,8 @@ package com.hikcreate.update_hbase.controller; ...@@ -2,6 +2,8 @@ package com.hikcreate.update_hbase.controller;
import com.hikcreate.update_hbase.service.DriverService; import com.hikcreate.update_hbase.service.DriverService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -16,4 +18,15 @@ public class DriverController { ...@@ -16,4 +18,15 @@ public class DriverController {
void insertDriver(String idcard) { void insertDriver(String idcard) {
driverService.insertDriver2Hbase(idcard); driverService.insertDriver2Hbase(idcard);
} }
@RequestMapping("/insertDriverByMonth")
void insertDriverByMonth(String month){
driverService.insertDriver2HbaseByMonth(month);
}
@RequestMapping("/insertDriverByRange")
void insertDriverHbaseByRang(String startDate,String endDate){
driverService.insertDriverHbaseByRang(startDate,endDate);
}
} }
/*
package com.hikcreate.update_hbase.controller; package com.hikcreate.update_hbase.controller;
...@@ -26,83 +27,101 @@ public class OracleToHbaseController { ...@@ -26,83 +27,101 @@ public class OracleToHbaseController {
@Autowired @Autowired
private EveryDayScheduleService everyDayScheduleService; private EveryDayScheduleService everyDayScheduleService;
/**
* 从Oracle导入全量机动车索引数据到hbase
*/ */
/**
* 从Oracle导入全量机动车索引数据到hbase
*//*
@RequestMapping(path = "/insertVehicleIndex/all") @RequestMapping(path = "/insertVehicleIndex/all")
public void insertVehicleIndexAll() { public void insertVehicleIndexAll() {
vehicleIndexService.listVehIndexall(); vehicleIndexService.listVehIndexall();
} }
/**
* 从Oracle导入昨日机动车索引数据到hbase
*/ */
/**
* 从Oracle导入昨日机动车索引数据到hbase
*//*
@RequestMapping(path = "/insertVehicleIndex/yesterday") @RequestMapping(path = "/insertVehicleIndex/yesterday")
public void insertVehicleIndexYesterday() { public void insertVehicleIndexYesterday() {
vehicleIndexService.listVehIndexyesterday(); vehicleIndexService.listVehIndexyesterday();
} }
/**
* 从Oracle导入全量违法索引数据到hbase
*/ */
/**
* 从Oracle导入全量违法索引数据到hbase
*//*
@RequestMapping(path = "/insertVioIndex/all") @RequestMapping(path = "/insertVioIndex/all")
public void insertVioIndexAll() { public void insertVioIndexAll() {
vioIndexService.listVioIndexAll(); vioIndexService.listVioIndexAll();
} }
/**
* 从Oracle导入昨日违法索引数据到hbase
*/ */
/**
* 从Oracle导入昨日违法索引数据到hbase
*//*
@RequestMapping(path = "/insertVioIndex/yesterday") @RequestMapping(path = "/insertVioIndex/yesterday")
public void insertVioIndexYesterday() { public void insertVioIndexYesterday() {
vioIndexService.listVioIndexYesterday(); vioIndexService.listVioIndexYesterday();
} }
/** */
/**
* 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka * 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka
* *
* @param days 天 * @param days 天
*/ *//*
@RequestMapping(path = "/insertVio/DaysAgo") @RequestMapping(path = "/insertVio/DaysAgo")
public void insertVioDaysAgo(@RequestParam("days") int days) { public void insertVioDaysAgo(@RequestParam("days") int days) {
everyDayScheduleService.getViolationData(days); everyDayScheduleService.getViolationData(days);
} }
/** */
/**
* 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka * 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka
* *
* @param days 天 * @param days 天
*/ *//*
@RequestMapping(path = "/insertVeh/DaysAgo") @RequestMapping(path = "/insertVeh/DaysAgo")
public void insertVehDaysAgo(@RequestParam("days") int days) { public void insertVehDaysAgo(@RequestParam("days") int days) {
everyDayScheduleService.getVehicleData(days); everyDayScheduleService.getVehicleData(days);
} }
/** */
/**
* 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka * 从Oracle导入几天前的当日数据 ep:days=1 表示导入昨日数据,插入hbase ,发Kafka
* *
* @param days 天 * @param days 天
*/ *//*
@RequestMapping(path = "/insertDrv/DaysAgo") @RequestMapping(path = "/insertDrv/DaysAgo")
public void insertDrvDaysAgo(@RequestParam("days") int days) { public void insertDrvDaysAgo(@RequestParam("days") int days) {
everyDayScheduleService.getDrivinglicenseData(days); everyDayScheduleService.getDrivinglicenseData(days);
} }
/** */
/**
* 从Oracle导入 days天前的当日数据 * 从Oracle导入 days天前的当日数据
* *
* @param days 天 * @param days 天
*/ *//*
@RequestMapping(path = "/insertDrvFlow/DaysAgo") @RequestMapping(path = "/insertDrvFlow/DaysAgo")
public void insertDrvFlowDaysAgo(@RequestParam("days") int days) { public void insertDrvFlowDaysAgo(@RequestParam("days") int days) {
everyDayScheduleService.getDrvFlowDayData(days); everyDayScheduleService.getDrvFlowDayData(days);
} }
/**
* 导入全量的驾驶证业务流水索引
*/ */
/**
* 导入全量的驾驶证业务流水索引
*//*
@RequestMapping(path = "/insertDrvFlow/All") @RequestMapping(path = "/insertDrvFlow/All")
public void insertDrvFlowIndexAll() { public void insertDrvFlowIndexAll() {
everyDayScheduleService.getDrvFlowIndexAll(); everyDayScheduleService.getDrvFlowIndexAll();
...@@ -115,3 +134,4 @@ public class OracleToHbaseController { ...@@ -115,3 +134,4 @@ public class OracleToHbaseController {
} }
*/
...@@ -2,11 +2,10 @@ package com.hikcreate.update_hbase.controller; ...@@ -2,11 +2,10 @@ package com.hikcreate.update_hbase.controller;
import com.hikcreate.update_hbase.service.SurveilService; import com.hikcreate.update_hbase.service.SurveilService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author yulong shu * @author yulong shu
...@@ -27,10 +26,9 @@ public class SurveilCOntroller { ...@@ -27,10 +26,9 @@ public class SurveilCOntroller {
@Autowired @Autowired
SurveilService surServiceBatch; SurveilService surServiceBatch;
@RequestMapping("/insertDataOrc2EsBatch") @GetMapping("/insertDataOrc2EsBatch")
public void insertDataOrc2EsBatch(@RequestParam("day") String day){ public ResponseEntity insertDataOrc2EsBatch(@RequestParam("day") String day){
surServiceBatch.insertDataOrc2EsBatch(day); surServiceBatch.insertDataOrc2EsBatch(day);
return new ResponseEntity("complete", HttpStatus.OK);
} }
} }
/*
package com.hikcreate.update_hbase.controller; package com.hikcreate.update_hbase.controller;
import antlr.ASdebug.IASDebugStream; import antlr.ASdebug.IASDebugStream;
...@@ -60,9 +61,12 @@ public class UpdateHbaseController { ...@@ -60,9 +61,12 @@ public class UpdateHbaseController {
everyDayScheduleService.getDrivinglicenseData(5); everyDayScheduleService.getDrivinglicenseData(5);
return new ResponseEntity("complete", HttpStatus.OK); return new ResponseEntity("complete", HttpStatus.OK);
} }
/* @RequestMapping("/putDriverById") */
/* @RequestMapping("/putDriverById")
public ResponseEntity putDriverById(@RequestParam("ids") String... ids){ public ResponseEntity putDriverById(@RequestParam("ids") String... ids){
updateHbaseService.insertDriverById(ids); updateHbaseService.insertDriverById(ids);
return new ResponseEntity("complete",HttpStatus.OK); return new ResponseEntity("complete",HttpStatus.OK);
}*/ }*//*
} }
*/
...@@ -3,7 +3,10 @@ package com.hikcreate.update_hbase.controller; ...@@ -3,7 +3,10 @@ package com.hikcreate.update_hbase.controller;
import com.hikcreate.update_hbase.service.SurveilService; import com.hikcreate.update_hbase.service.SurveilService;
import com.hikcreate.update_hbase.service.ViolationService; import com.hikcreate.update_hbase.service.ViolationService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -24,8 +27,9 @@ public class ViolationController { ...@@ -24,8 +27,9 @@ public class ViolationController {
System.out.println("ids"+ids); System.out.println("ids"+ids);
violationService.imDataOracle2EsById(ids); violationService.imDataOracle2EsById(ids);
} }
@RequestMapping("/insertViolation2EsByDte") @GetMapping("/insertViolation2EsByDte")
public void insertViolation2EsByDte(@RequestParam("start") String start,@RequestParam("end") String end){ public ResponseEntity insertViolation2EsByDte(@RequestParam("start") String start,@RequestParam("end") String end){
violationService.insertViolation2EsByDte(start, end); violationService.insertViolation2EsByDte(start, end);
}; return new ResponseEntity("complete", HttpStatus.OK);
}
} }
...@@ -32,6 +32,14 @@ public interface BokanMapper { ...@@ -32,6 +32,14 @@ public interface BokanMapper {
@DBSource(name = "bokang") @DBSource(name = "bokang")
@Select({ @Select({
"<script>", "<script>",
"select a.*,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0206' and DMZ=a.JZQX and ROWNUM=1) jzqx_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(ZT,'A','正常 '),'B','超分 '),'C','转出 '),'D','暂扣 '),'E','撤销 '),'F','吊销 '),'G','注销 '),'H','违法未处理 '),'I','事故未处理 '),'J','停止使用 '),'K','扣押 '),'L','锁定 '),'M','逾期未换证 '),'N','延期换证 '),'P','延期体检 '),'R','注销可恢复 '),'S','逾期未审验 '),'T','延期审验 '),'U','扣留 ') zt_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0002' and DMZ=a.LY and ROWNUM=1) ly_value,(select sc.jxmc from ZCKJ.VM_JG_EXAM_SCHOOLINFO sc where sc.JXDM=a.JXMC and ROWNUM=1) jxmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.XZQH and ROWNUM=1) xzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0051' and DMZ=a.XZQJ and ROWNUM=1) xzqj_value,(select BMMC from ZCKJ.VM_FRM_DEPARTMENT_CODE depart where depart.GLBM=a.GLBM and ROWNUM=1) glbm_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(xgzl,'A','身份证明 '),'B','机动车驾驶证申请表 '),'C','身体条件证明 '),'D','原驾驶证 '),'E','复员转业退伍证明 '),'F','驾驶证中文翻译文本 '),'G','居住、暂住证明 '),'H','准考证明 '),'I','科目一考试成绩表 '),'J','科目二考试成绩表 '),'K','科目三考试成绩表 '),'L','驾校培训证明 '),'N','驾证注销证明 '),'P','裁决文件 '),'Q','代理人身份证明 '),'R','身份证号码变更证明 '),'S','接受教育凭证 '),'T','机动车驾驶人身体情况申报表 '),'U','从业单位出具的证明 '),'V','县级公安机关出具的无犯罪、吸毒行为记录证明原件 '),'W','内地居民往来港澳通行证 '),'X','大陆居民往来台湾通行证 '),'Y','军车驾驶员基本信息登记表 '),'Z','其它材料 ') xgzl_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='2019' and DMZ=a.SFZMMC and ROWNUM=1) sfzmmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0211' and DMZ=a.HMCD and ROWNUM=1) hmcd_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0035' and DMZ=a.XB and ROWNUM=1) xb_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0031' and DMZ=a.GJ and ROWNUM=1) gj_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.djzsxzqh and ROWNUM=1) djzsxzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.lxzsxzqh and ROWNUM=1) lxzsxzqh_value from zckj.VM_DRIVINGLICENSE_GY a where GXSJ is not null and to_char(GXSJ,'YYYY-MM')<![CDATA[ = ]]>#{month} order by GXSJ desc",
"</script>"
})
List<Driver> insertDriver2HbaseByMonth(@Param("month") String month);
@DBSource(name = "bokang")
@Select({
"<script>",
"select wfbh , jdslb , jdsbh , wsjyw , 'null' , 'null' , 'null' , fzjg , 'null' , dsr , zsxzqh , zsxxdz , dh , lxfs , clfl , hpzl , hphm , jdcsyr , syxz , jtfs , substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) wfsj, xzqh , dllx , glxzdj , wfdd , lddm , ddms , ddjdwz , wfdz , wfxw , 'null' , fkje , scz , bzz , 'null' , zqmj , jkfs , 'null' , 'null' , cljg , cljgmc , 'null' , clsj , jkbj , jkrq , pzbh , 'null' , jllx , lrr , lrsj , 'null' , 'null' , 'null' , cldxbj , 'null' , zdjlbj , 'null' , xrms , dkbj , 'null' , zdbj , jsjg , fsjg , gxsj , bz , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , ylzz1 , ylzz2 , ylzz3 , ylzz4 , ylzz5 , ylzz6 , ylzz7 , ylzz8 , cjfs , 'null' , 'null' , 'null' , 'null' , 'null' , clyt , xcfw , dzzb , 'null' , 'null' , 'null' , ylzz11 , ylzz12 , ylzz13 , ylzz14 , ylzz15 , ylzz16 , ylzz17 , ylzz18 , xh , cjjg , cjjgmc , fdjh , clsbdh , csys , clpp , tzsh , tzbj , tzrq , clbj , qzclbj , jbr , ydclbj , spdz , sbbh,HPHM || '#' || HPZL || '#' || substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) || '#' || WFXW || '#' || WFDD esid,HPHM || '#' || HPZL || '#' || substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) || '#' || WFXW || '#' || WFDD id from ZCKJ.VIO_SURVEIL where GXSJ is not null and GXSJ<![CDATA[ > ]]>to_date(#{GXTIME}, 'YYYY-MM-DD HH24:MI:SS') order by GXSJ desc", "select wfbh , jdslb , jdsbh , wsjyw , 'null' , 'null' , 'null' , fzjg , 'null' , dsr , zsxzqh , zsxxdz , dh , lxfs , clfl , hpzl , hphm , jdcsyr , syxz , jtfs , substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) wfsj, xzqh , dllx , glxzdj , wfdd , lddm , ddms , ddjdwz , wfdz , wfxw , 'null' , fkje , scz , bzz , 'null' , zqmj , jkfs , 'null' , 'null' , cljg , cljgmc , 'null' , clsj , jkbj , jkrq , pzbh , 'null' , jllx , lrr , lrsj , 'null' , 'null' , 'null' , cldxbj , 'null' , zdjlbj , 'null' , xrms , dkbj , 'null' , zdbj , jsjg , fsjg , gxsj , bz , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , 'null' , ylzz1 , ylzz2 , ylzz3 , ylzz4 , ylzz5 , ylzz6 , ylzz7 , ylzz8 , cjfs , 'null' , 'null' , 'null' , 'null' , 'null' , clyt , xcfw , dzzb , 'null' , 'null' , 'null' , ylzz11 , ylzz12 , ylzz13 , ylzz14 , ylzz15 , ylzz16 , ylzz17 , ylzz18 , xh , cjjg , cjjgmc , fdjh , clsbdh , csys , clpp , tzsh , tzbj , tzrq , clbj , qzclbj , jbr , ydclbj , spdz , sbbh,HPHM || '#' || HPZL || '#' || substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) || '#' || WFXW || '#' || WFDD esid,HPHM || '#' || HPZL || '#' || substr(to_char(wfsj,'yyyy-mm-dd hh24:mi:ss'),0,19) || '#' || WFXW || '#' || WFDD id from ZCKJ.VIO_SURVEIL where GXSJ is not null and GXSJ<![CDATA[ > ]]>to_date(#{GXTIME}, 'YYYY-MM-DD HH24:MI:SS') order by GXSJ desc",
"</script>" "</script>"
}) })
......
...@@ -11,4 +11,6 @@ import java.util.List; ...@@ -11,4 +11,6 @@ import java.util.List;
public interface DriverHBMapper { public interface DriverHBMapper {
@DBSource(name = "bokang") @DBSource(name = "bokang")
List<Driver> getDriverById(@Param("ids") List<String> ids); List<Driver> getDriverById(@Param("ids") List<String> ids);
List<Driver> getDriverByDate(@Param("start") String start,@Param("end") String end);
List<Driver> insertDriver2HbaseByMonth(@Param("month") String month);
} }
...@@ -32,6 +32,10 @@ public interface OracleDao { ...@@ -32,6 +32,10 @@ public interface OracleDao {
"from ZCKJ.VM_DRIVINGLICENSE_GY a where sfzmhm=#{idcard}") "from ZCKJ.VM_DRIVINGLICENSE_GY a where sfzmhm=#{idcard}")
Driver getDriverByIdcard(String idcard); Driver getDriverByIdcard(String idcard);
/** /**
* 违法violation * 违法violation
* *
...@@ -76,6 +80,19 @@ public interface OracleDao { ...@@ -76,6 +80,19 @@ public interface OracleDao {
List<Driver> getDaysAgoDrv(@Param("DAYS") int days); List<Driver> getDaysAgoDrv(@Param("DAYS") int days);
/** /**
* 驾驶证
*
* @param startDate,endDate 某个时间范围的数据
* @return 当天的离线增量和实时表增量去重后结果
*/
@DBSource(name = "bokang")
@Select({
"<script>",
"select a.*,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0206' and DMZ=a.JZQX and ROWNUM=1) jzqx_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(ZT,'A','正常 '),'B','超分 '),'C','转出 '),'D','暂扣 '),'E','撤销 '),'F','吊销 '),'G','注销 '),'H','违法未处理 '),'I','事故未处理 '),'J','停止使用 '),'K','扣押 '),'L','锁定 '),'M','逾期未换证 '),'N','延期换证 '),'P','延期体检 '),'R','注销可恢复 '),'S','逾期未审验 '),'T','延期审验 '),'U','扣留 ') zt_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0002' and DMZ=a.LY and ROWNUM=1) ly_value,(select sc.jxmc from ZCKJ.VM_JG_EXAM_SCHOOLINFO sc where sc.JXDM=a.JXMC and ROWNUM=1) jxmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.XZQH and ROWNUM=1) xzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0051' and DMZ=a.XZQJ and ROWNUM=1) xzqj_value,(select BMMC from ZCKJ.VM_FRM_DEPARTMENT_CODE depart where depart.GLBM=a.GLBM and ROWNUM=1) glbm_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(xgzl,'A','身份证明 '),'B','机动车驾驶证申请表 '),'C','身体条件证明 '),'D','原驾驶证 '),'E','复员转业退伍证明 '),'F','驾驶证中文翻译文本 '),'G','居住、暂住证明 '),'H','准考证明 '),'I','科目一考试成绩表 '),'J','科目二考试成绩表 '),'K','科目三考试成绩表 '),'L','驾校培训证明 '),'N','驾证注销证明 '),'P','裁决文件 '),'Q','代理人身份证明 '),'R','身份证号码变更证明 '),'S','接受教育凭证 '),'T','机动车驾驶人身体情况申报表 '),'U','从业单位出具的证明 '),'V','县级公安机关出具的无犯罪、吸毒行为记录证明原件 '),'W','内地居民往来港澳通行证 '),'X','大陆居民往来台湾通行证 '),'Y','军车驾驶员基本信息登记表 '),'Z','其它材料 ') xgzl_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='2019' and DMZ=a.SFZMMC and ROWNUM=1) sfzmmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0211' and DMZ=a.HMCD and ROWNUM=1) hmcd_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0035' and DMZ=a.XB and ROWNUM=1) xb_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0031' and DMZ=a.GJ and ROWNUM=1) gj_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.djzsxzqh and ROWNUM=1) djzsxzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.lxzsxzqh and ROWNUM=1) lxzsxzqh_value from zckj.VM_DRIVINGLICENSE_GY a where GXSJ is not null and to_char(GXSJ,'YYYY-MM-DD')<![CDATA[ >= ]]>#{startDate} and to_char(GXSJ,'YYYY-MM-DD')<![CDATA[ <= ]]>#{endDate}",
"</script>"
})
List<Driver>insertDriverHbaseByRang(@Param("startDate") String startDate,@Param("endDate")String endDate);
/**
* 驾驶证业务流水表 * 驾驶证业务流水表
* *
* @param updateTime 上次更新时间 * @param updateTime 上次更新时间
......
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.DmsmpService; import com.hikcreate.update_hbase.service.DmsmpService;
...@@ -10,70 +11,87 @@ public class DmsmpSchedule { ...@@ -10,70 +11,87 @@ public class DmsmpSchedule {
@Autowired @Autowired
private DmsmpService dmsmpService; private DmsmpService dmsmpService;
/**
* 临时号牌办理次数预警
*/ */
/**
* 临时号牌办理次数预警
*//*
@Scheduled(cron = "0 10 9 * * ?") @Scheduled(cron = "0 10 9 * * ?")
public void tempPlateWarn(){ public void tempPlateWarn(){
dmsmpService.tempplateWarn(4); dmsmpService.tempplateWarn(4);
} }
/**
* 制证后退办预警
*/ */
/**
* 制证后退办预警
*//*
// @Scheduled(cron = "0 13 9 * * ?") // @Scheduled(cron = "0 13 9 * * ?")
public void certicateQuit(){ public void certicateQuit(){
dmsmpService.certicateQuit(5); dmsmpService.certicateQuit(5);
} }
/**
* 共同所有人变更次数预警
*/ */
/**
* 共同所有人变更次数预警
*//*
// @Scheduled(cron = "0 15 9 * * ?") // @Scheduled(cron = "0 15 9 * * ?")
public void commonSyr(){ public void commonSyr(){
dmsmpService.commonSyr(5); dmsmpService.commonSyr(5);
} }
/**
* 驾驶证名称和身份证明号码同时变化预警
*/ */
/**
* 驾驶证名称和身份证明号码同时变化预警
*//*
// @Scheduled(cron = "0 17 9 * * ?") // @Scheduled(cron = "0 17 9 * * ?")
public void drvNameAndCard(){ public void drvNameAndCard(){
dmsmpService.drvNameAndCard(5); dmsmpService.drvNameAndCard(5);
} }
/**
* 号牌号码和所有人同时变化预警
*/ */
/**
* 号牌号码和所有人同时变化预警
*//*
// @Scheduled(cron = "0 17 9 * * ?") // @Scheduled(cron = "0 17 9 * * ?")
public void plateAndSyrChange(){ public void plateAndSyrChange(){
dmsmpService.plateAndSyrChange(10); dmsmpService.plateAndSyrChange(10);
} }
/**
* 同一所有人多次变更号牌
*/ */
/**
* 同一所有人多次变更号牌
*//*
// @Scheduled(cron = "0 19 9 * * ?") // @Scheduled(cron = "0 19 9 * * ?")
public void syrPlateChangeMany(){ public void syrPlateChangeMany(){
dmsmpService.syrPlateChangeMany(5); dmsmpService.syrPlateChangeMany(5);
} }
/**
* 车辆短期解押
*/ */
/**
* 车辆短期解押
*//*
// @Scheduled(cron = "0 21 9 * * ?") // @Scheduled(cron = "0 21 9 * * ?")
public void getHisMortgageCancel(){ public void getHisMortgageCancel(){
dmsmpService.getHisMortgageCancel(5); dmsmpService.getHisMortgageCancel(5);
} }
/**
* 退办业务短期办结
*/ */
/**
* 退办业务短期办结
*//*
// @Scheduled(cron = "0 23 9 * * ?") // @Scheduled(cron = "0 23 9 * * ?")
public void getHisRetireDealAgain(){ public void getHisRetireDealAgain(){
dmsmpService.getHisRetireDealAgain(5); dmsmpService.getHisRetireDealAgain(5);
} }
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.EveryDayScheduleService; import com.hikcreate.update_hbase.service.EveryDayScheduleService;
...@@ -10,25 +11,31 @@ public class EveryDayScheduleTask { ...@@ -10,25 +11,31 @@ public class EveryDayScheduleTask {
@Autowired @Autowired
private EveryDayScheduleService everyDayScheduleService; private EveryDayScheduleService everyDayScheduleService;
/**
* 机动车 每天
*/ */
/**
* 机动车 每天
*//*
@Scheduled(cron = "0 30 06 * * ?") @Scheduled(cron = "0 30 06 * * ?")
public void putVehTOHbase() { public void putVehTOHbase() {
everyDayScheduleService.getVehicleData(5); everyDayScheduleService.getVehicleData(5);
} }
/**
* 违法 每天
*/ */
/**
* 违法 每天
*//*
@Scheduled(cron = "0 30 06 * * ?") @Scheduled(cron = "0 30 06 * * ?")
public void putVioToHbase() { public void putVioToHbase() {
everyDayScheduleService.getViolationData(1); everyDayScheduleService.getViolationData(1);
} }
/**
* 驾驶证 每天
*/ */
/**
* 驾驶证 每天
*//*
@Scheduled(cron = "0 30 6 * * ?") @Scheduled(cron = "0 30 6 * * ?")
public void putDrivinglicense() { public void putDrivinglicense() {
everyDayScheduleService.getDrivinglicenseData(5); everyDayScheduleService.getDrivinglicenseData(5);
...@@ -36,3 +43,4 @@ public class EveryDayScheduleTask { ...@@ -36,3 +43,4 @@ public class EveryDayScheduleTask {
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.UpdateEsAcdService; import com.hikcreate.update_hbase.service.UpdateEsAcdService;
...@@ -37,3 +38,4 @@ public class UpdateEs { ...@@ -37,3 +38,4 @@ public class UpdateEs {
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.UpdateHbaseService; import com.hikcreate.update_hbase.service.UpdateHbaseService;
...@@ -20,33 +21,41 @@ public class UpdateHbase { ...@@ -20,33 +21,41 @@ public class UpdateHbase {
private int threadNum; private int threadNum;
/**
* 机动车调度
*/ */
/**
* 机动车调度
*//*
@Scheduled(cron = "0 3/20 * * * ?") @Scheduled(cron = "0 3/20 * * * ?")
public void vehicleUpdateHbase(){ public void vehicleUpdateHbase(){
updateHbaseService.vehicleUpdateHbase(null); updateHbaseService.vehicleUpdateHbase(null);
} }
/**
* 违法调度
*/ */
/**
* 违法调度
*//*
@Scheduled(cron = "0 0/20 * * * ?") @Scheduled(cron = "0 0/20 * * * ?")
public void vioUpdateHbase(){ public void vioUpdateHbase(){
updateHbaseService.vioUpdateHbase(null); updateHbaseService.vioUpdateHbase(null);
} }
/**
* 驾驶人调度
*/ */
/**
* 驾驶人调度
*//*
@Scheduled(cron = "0 3/20 * * * ?") @Scheduled(cron = "0 3/20 * * * ?")
public void driverUpdateHbase(){ public void driverUpdateHbase(){
updateHbaseService.driverUpdateHbase(null); updateHbaseService.driverUpdateHbase(null);
} }
/**
* 违法每天
*/ */
/**
* 违法每天
*//*
@Scheduled(cron = "0 0 8 * * ?") @Scheduled(cron = "0 0 8 * * ?")
public void toEsVio() { public void toEsVio() {
for(int i=0;i<threadNum;i++){ for(int i=0;i<threadNum;i++){
...@@ -57,3 +66,4 @@ public class UpdateHbase { ...@@ -57,3 +66,4 @@ public class UpdateHbase {
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.VehFlowService; import com.hikcreate.update_hbase.service.VehFlowService;
...@@ -18,3 +19,4 @@ public class VehFlowSchedule { ...@@ -18,3 +19,4 @@ public class VehFlowSchedule {
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.VehicleService; import com.hikcreate.update_hbase.service.VehicleService;
...@@ -11,9 +12,11 @@ public class VehSchedule { ...@@ -11,9 +12,11 @@ public class VehSchedule {
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
/**
* 机动车每天同步
*/ */
/**
* 机动车每天同步
*//*
@Scheduled(cron = "0 0 7 * * ?") @Scheduled(cron = "0 0 7 * * ?")
public void vehDay(){ public void vehDay(){
try { try {
...@@ -26,3 +29,4 @@ public class VehSchedule { ...@@ -26,3 +29,4 @@ public class VehSchedule {
} }
*/
/*
package com.hikcreate.update_hbase.schedule; package com.hikcreate.update_hbase.schedule;
import com.hikcreate.update_hbase.service.SurveilService; import com.hikcreate.update_hbase.service.SurveilService;
...@@ -22,9 +23,11 @@ public class VioSchedule { ...@@ -22,9 +23,11 @@ public class VioSchedule {
private SurveilService surveilService; private SurveilService surveilService;
/**
* 违法删除数据每天同步
*/ */
/**
* 违法删除数据每天同步
*//*
@Scheduled(cron = "0 0 11 * * ?") @Scheduled(cron = "0 0 11 * * ?")
public void vioDelDay(){ public void vioDelDay(){
vioEsService.vioDelDay(); vioEsService.vioDelDay();
...@@ -33,20 +36,25 @@ public class VioSchedule { ...@@ -33,20 +36,25 @@ public class VioSchedule {
/**
* violation表ES数据同步:vm_vio_violation,vm_vio_violation_his,vm_vio_violation_del,vio_violation
*/ */
/**
* violation表ES数据同步:vm_vio_violation,vm_vio_violation_his,vm_vio_violation_del,vio_violation
*//*
@Scheduled(cron = "0 0 8 * * ?") @Scheduled(cron = "0 0 8 * * ?")
public void violationDay(){ public void violationDay(){
violationService.violationDay(5); violationService.violationDay(5);
} }
/**
* surveil表数据同步:vm_vio_surveil,vm_vio_surveil_his,vm_vio_surveil_del,vio_surveil
*/ */
/**
* surveil表数据同步:vm_vio_surveil,vm_vio_surveil_his,vm_vio_surveil_del,vio_surveil
*//*
@Scheduled(cron = "0 0 7 * * ?") @Scheduled(cron = "0 0 7 * * ?")
public void surveilDay(){ public void surveilDay(){
surveilService.surveilDay(5); surveilService.surveilDay(5);
} }
} }
*/
...@@ -8,4 +8,7 @@ package com.hikcreate.update_hbase.service; ...@@ -8,4 +8,7 @@ package com.hikcreate.update_hbase.service;
public interface DriverService { public interface DriverService {
void insertDriver2Hbase(String idcard); void insertDriver2Hbase(String idcard);
void insertDriver2HbaseByMonth(String month);
void insertDriverHbaseByRang(String startDate,String endDate);
} }
/*
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -32,11 +33,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -32,11 +33,13 @@ public class DmsmpServiceImpl implements DmsmpService {
@Value("${app.kafka.dmsmp.topic}") @Value("${app.kafka.dmsmp.topic}")
private String dmsmpTopic; private String dmsmpTopic;
/** */
/**
* 临时号牌预警 * 临时号牌预警
* *
* @param times * @param times
*/ *//*
@Override @Override
public void tempplateWarn(int times) { public void tempplateWarn(int times) {
//查询昨天正好办理第四次的车辆的信息 //查询昨天正好办理第四次的车辆的信息
...@@ -55,9 +58,11 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -55,9 +58,11 @@ public class DmsmpServiceImpl implements DmsmpService {
} }
} }
/**
* 所有人和车牌都改变
*/ */
/**
* 所有人和车牌都改变
*//*
@Override @Override
public void plateAndSyrChange(int day) { public void plateAndSyrChange(int day) {
List<String> xhList = dmsmpMapper.getPlateAndSyrChangeXh(); List<String> xhList = dmsmpMapper.getPlateAndSyrChangeXh();
...@@ -116,11 +121,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -116,11 +121,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("plateAndSyrChange over ---------------------"); System.out.println("plateAndSyrChange over ---------------------");
} }
/** */
/**
* 共同所有人 * 共同所有人
* *
* @param day * @param day
*/ *//*
@Override @Override
public void commonSyr(int day) { public void commonSyr(int day) {
List<CommonSyr> commonSyrList = new ArrayList<>(); List<CommonSyr> commonSyrList = new ArrayList<>();
...@@ -178,11 +185,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -178,11 +185,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("commonSyr over ---------------------"); System.out.println("commonSyr over ---------------------");
} }
/** */
/**
* 姓名和身份证号同时变更 * 姓名和身份证号同时变更
* *
* @param day * @param day
*/ *//*
@Override @Override
public void drvNameAndCard(int day) { public void drvNameAndCard(int day) {
List<String> dabhList = dmsmpMapper.getHisDrvNameCardChangeDabh(); List<String> dabhList = dmsmpMapper.getHisDrvNameCardChangeDabh();
...@@ -219,11 +228,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -219,11 +228,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("drvNameAndCard over ---------------------"); System.out.println("drvNameAndCard over ---------------------");
} }
/** */
/**
* 制证后退办 * 制证后退办
* *
* @param day * @param day
*/ *//*
@Override @Override
public void certicateQuit(int day) { public void certicateQuit(int day) {
if (day == 0) { if (day == 0) {
...@@ -260,11 +271,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -260,11 +271,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("certicateQuit over ---------------------"); System.out.println("certicateQuit over ---------------------");
} }
/** */
/**
* 同一所有人多次变更号牌 * 同一所有人多次变更号牌
* *
* @param day * @param day
*/ *//*
@Override @Override
public void syrPlateChangeMany(int day) { public void syrPlateChangeMany(int day) {
List<SyrPlateChangeMany> syrPlateChangeManyList = dmsmpMapper.getAllSyrPlateChangeMany(); List<SyrPlateChangeMany> syrPlateChangeManyList = dmsmpMapper.getAllSyrPlateChangeMany();
...@@ -288,11 +301,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -288,11 +301,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("syrPlateChangeMany over ---------------------"); System.out.println("syrPlateChangeMany over ---------------------");
} }
/** */
/**
* 车辆短期解押 * 车辆短期解押
* *
* @param day * @param day
*/ *//*
@Override @Override
public void getHisMortgageCancel(int day) { public void getHisMortgageCancel(int day) {
List<MortgageCancel> mortgageCancelList = dmsmpMapper.getHisMortgageCancel(); List<MortgageCancel> mortgageCancelList = dmsmpMapper.getHisMortgageCancel();
...@@ -322,11 +337,13 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -322,11 +337,13 @@ public class DmsmpServiceImpl implements DmsmpService {
System.out.println("车辆短期解押 over ---------------------"); System.out.println("车辆短期解押 over ---------------------");
} }
/** */
/**
* 退办业务短期办结 * 退办业务短期办结
* *
* @param day * @param day
*/ *//*
@Override @Override
public void getHisRetireDealAgain(int day) { public void getHisRetireDealAgain(int day) {
Map<String, String> ztMap = new HashMap<>(); Map<String, String> ztMap = new HashMap<>();
...@@ -382,10 +399,12 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -382,10 +399,12 @@ public class DmsmpServiceImpl implements DmsmpService {
} }
/** */
/**
* 同步残疾人车辆代码::规则---审批通过,符合条件,核发通过 * 同步残疾人车辆代码::规则---审批通过,符合条件,核发通过
* @param day * @param day
*/ *//*
@Override @Override
public void synDeformedproposer(int day) { public void synDeformedproposer(int day) {
List<Deformedproposer> deformedproposerList=null; List<Deformedproposer> deformedproposerList=null;
...@@ -401,3 +420,4 @@ public class DmsmpServiceImpl implements DmsmpService { ...@@ -401,3 +420,4 @@ public class DmsmpServiceImpl implements DmsmpService {
} }
} }
*/
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import com.hikcreate.update_hbase.dao.BokanMapper;
import com.hikcreate.update_hbase.dao.DriverHBMapper;
import com.hikcreate.update_hbase.dao.OracleDao; import com.hikcreate.update_hbase.dao.OracleDao;
import com.hikcreate.update_hbase.entity.Driver; import com.hikcreate.update_hbase.entity.*;
import com.hikcreate.update_hbase.service.DriverService; import com.hikcreate.update_hbase.service.DriverService;
import com.hikcreate.update_hbase.utils.EsUtils;
import com.hikcreate.update_hbase.utils.HbaseEntityUtil; import com.hikcreate.update_hbase.utils.HbaseEntityUtil;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.Cell;
...@@ -41,13 +44,70 @@ public class DriverServiceImpl implements DriverService { ...@@ -41,13 +44,70 @@ public class DriverServiceImpl implements DriverService {
private static Table driverIndexTable; private static Table driverIndexTable;
@Autowired @Autowired
private OracleDao oracleDao; private OracleDao oracleDao;
@Autowired
private DriverHBMapper driverMapper;
@Autowired
private BokanMapper bokmp;
private EsUtils esUtils;
private void openHbaseCon() { private void openHbaseCon() {
hbaseConf = HBaseConfiguration.create(); hbaseConf = HBaseConfiguration.create();
hbaseConf.set("hbase.zookeeper.property.clientPort", hbaseAddress); hbaseConf.set("hbase.zookeeper.property.clientPort", hbaseAddress);
hbaseConf.set("hbase.zookeeper.quorum", hbaseZkQuorum); hbaseConf.set("hbase.zookeeper.quorum", hbaseZkQuorum);
} }
/*
*根据月份补数据
* 2021-09-05
* kaiwang
* */
@Override
public void insertDriver2HbaseByMonth(String month){
String rowkey;
Put put;
openHbaseCon();
Table driverTable = null;
Table driverIndexTable = null;
try {
hbaseConn = ConnectionFactory.createConnection(hbaseConf);
driverTable = hbaseConn.getTable(TableName.valueOf(driverTableStr));
driverIndexTable = hbaseConn.getTable(TableName.valueOf(driverIndexTableStr));
List<Driver> driverList = bokmp.insertDriver2HbaseByMonth(month);
if (driverList.size() > 0) {
for (Driver driver : driverList) {
driver.setXm(driver.getXm().trim());
driver.setSfzmhm(driver.getSfzmhm().trim());
rowkey = (driver.getSfzmhm() == null ? "null" : driver.getSfzmhm());
Get get = new Get(rowkey.getBytes());
get.addColumn(Bytes.toBytes("info"), Bytes.toBytes("gxsj"));
get.setCheckExistenceOnly(true);
Result result = driverTable.get(get);
if (result.size() > 0) {
for (Cell cell : result.rawCells()) {
String colName = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
if ("gxsj".equals(colName) && value.length() > 18 && driver.getGxsj().length() > 18
&& !(driver.getGxsj().substring(0, 19).compareTo(value.substring(0, 19)) > 0)) {
return;
}
}
}
put = new Put(rowkey.getBytes());
put = HbaseEntityUtil.getHbaseEntityPut(driver, put);
driverTable.put(put);
Put put1 = new Put((driver.getDabh() == null ? "null" : driver.getDabh()).getBytes());
put1.addColumn("key_fam".getBytes(), "keyone".getBytes(), rowkey.getBytes());
driverIndexTable.put(put1);
System.out.println(month+":driver数据更新完毕!");
//String json = getJsonString(driver, rowkey, driver.getDabh() == null ? "null" : driver.getDabh());
//kafkaTemplate.send(diverTopic, json);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
closeHbase();
}
}
@Override @Override
public void insertDriver2Hbase(String idcard) { public void insertDriver2Hbase(String idcard) {
String rowkey; String rowkey;
...@@ -118,4 +178,59 @@ public class DriverServiceImpl implements DriverService { ...@@ -118,4 +178,59 @@ public class DriverServiceImpl implements DriverService {
} }
} }
} }
/*
*同步driver一段时间范围的数据到hbase
* kaiwang
* 2021-09-07
* */
@Override
public void insertDriverHbaseByRang(String startDate,String endDate){
String rowkey;
Put put;
openHbaseCon();
Table driverTable = null;
Table driverIndexTable = null;
try {
hbaseConn = ConnectionFactory.createConnection(hbaseConf);
driverTable = hbaseConn.getTable(TableName.valueOf(driverTableStr));
driverIndexTable = hbaseConn.getTable(TableName.valueOf(driverIndexTableStr));
List<Driver> driverList = oracleDao.insertDriverHbaseByRang(startDate,endDate);
if (driverList.size() > 0) {
for (Driver driver : driverList) {
driver.setXm(driver.getXm().trim());
driver.setSfzmhm(driver.getSfzmhm().trim());
rowkey = (driver.getSfzmhm() == null ? "null" : driver.getSfzmhm());
Get get = new Get(rowkey.getBytes());
get.addColumn(Bytes.toBytes("info"), Bytes.toBytes("gxsj"));
get.setCheckExistenceOnly(true);
Result result = driverTable.get(get);
if (result.size() > 0) {
for (Cell cell : result.rawCells()) {
String colName = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
if ("gxsj".equals(colName) && value.length() > 18 && driver.getGxsj().length() > 18
&& !(driver.getGxsj().substring(0, 19).compareTo(value.substring(0, 19)) > 0)) {
return;
}
}
}
put = new Put(rowkey.getBytes());
put = HbaseEntityUtil.getHbaseEntityPut(driver, put);
driverTable.put(put);
Put put1 = new Put((driver.getDabh() == null ? "null" : driver.getDabh()).getBytes());
put1.addColumn("key_fam".getBytes(), "keyone".getBytes(), rowkey.getBytes());
driverIndexTable.put(put1);
System.out.println(startDate+"-"+endDate+":driver数据更新完毕!");
//String json = getJsonString(driver, rowkey, driver.getDabh() == null ? "null" : driver.getDabh());
//kafkaTemplate.send(diverTopic, json);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
closeHbase();
}
}
} }
/*
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -84,10 +85,12 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -84,10 +85,12 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
private String vioIndexTableStr; private String vioIndexTableStr;
*/
/* @Value("${es.drvflow.index}") /* @Value("${es.drvflow.index}")
private String drvFlowIndex; private String drvFlowIndex;
@Value("${es.drvflow.type}") @Value("${es.drvflow.type}")
private String drvFlowType;*/ private String drvFlowType;*//*
@Value("${app.kafka.driver.topic}") @Value("${app.kafka.driver.topic}")
private String diverTopic; private String diverTopic;
@Value("${app.kafka.vio.topic}") @Value("${app.kafka.vio.topic}")
...@@ -102,11 +105,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -102,11 +105,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
private DrvFlowRepository drvFlowRepository; private DrvFlowRepository drvFlowRepository;
/** */
/**
* 违法 * 违法
* *
* @param days 抽取几天前的当天数据?days=1 就是昨天的数据 * @param days 抽取几天前的当天数据?days=1 就是昨天的数据
*/ *//*
@Override @Override
public void getViolationData(int days) { public void getViolationData(int days) {
openHbaseCon(); openHbaseCon();
...@@ -185,11 +190,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -185,11 +190,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
} }
/** */
/**
* 机动车 * 机动车
* *
* @param days 抽取几天前的当天数据?days=1 就是昨天的数据 * @param days 抽取几天前的当天数据?days=1 就是昨天的数据
*/ *//*
@Override @Override
public void getVehicleData(int days) { public void getVehicleData(int days) {
String rowkey; String rowkey;
...@@ -237,11 +244,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -237,11 +244,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
/** */
/**
* 驾驶证 * 驾驶证
* *
* @param days 抽取几天前的当天数据?days=1 就是昨天的数据 * @param days 抽取几天前的当天数据?days=1 就是昨天的数据
*/ *//*
@Override @Override
public void getDrivinglicenseData(int days) { public void getDrivinglicenseData(int days) {
String rowkey; String rowkey;
...@@ -306,11 +315,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -306,11 +315,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
} }
/** */
/**
* 按天导入drvFlow数据 * 按天导入drvFlow数据
* *
* @param days 天 * @param days 天
*/ *//*
@Override @Override
public void getDrvFlowDayData(int days) { public void getDrvFlowDayData(int days) {
String rowkey; String rowkey;
...@@ -341,13 +352,15 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -341,13 +352,15 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
/** */
/**
* @param drvFlowList 查询结果列表 * @param drvFlowList 查询结果列表
* @param count 插入总数 * @param count 插入总数
* @param num 查询总数 * @param num 查询总数
* @throws IOException * @throws IOException
* @throws IllegalAccessException * @throws IllegalAccessException
*/ *//*
private void processDrvflow(List<DrvFlow> drvFlowList, int count, int num) throws IOException, IllegalAccessException { private void processDrvflow(List<DrvFlow> drvFlowList, int count, int num) throws IOException, IllegalAccessException {
int flag; int flag;
String rowkey; String rowkey;
...@@ -394,10 +407,12 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -394,10 +407,12 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
} }
/** */
/**
* 每二十分钟查询导入drvflow数据 * 每二十分钟查询导入drvflow数据
* @param day 天 * @param day 天
*/ *//*
@Override @Override
public void getDrvFlowMinuData(String day) { public void getDrvFlowMinuData(String day) {
//flag=0:不插入,flag=1:插入hbase并发kafka并写索引表, //flag=0:不插入,flag=1:插入hbase并发kafka并写索引表,
...@@ -426,11 +441,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -426,11 +441,13 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
/** */
/**
* drvflow对象插入es * drvflow对象插入es
* *
* @param drvFlow * @param drvFlow
*/ *//*
private void drvFlow2Es(DrvFlow drvFlow) { private void drvFlow2Es(DrvFlow drvFlow) {
Optional<DrvFlow> drvFlowById = drvFlowRepository.findById(drvFlow.getId()); Optional<DrvFlow> drvFlowById = drvFlowRepository.findById(drvFlow.getId());
if (drvFlowById.isPresent()) { if (drvFlowById.isPresent()) {
...@@ -442,9 +459,11 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -442,9 +459,11 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
drvFlowRepository.save(drvFlow); drvFlowRepository.save(drvFlow);
} }
/**
* 把drvflow索引hbase表全量插入
*/ */
/**
* 把drvflow索引hbase表全量插入
*//*
@Override @Override
public void getDrvFlowIndexAll() { public void getDrvFlowIndexAll() {
List<DrvFlow> drvFlowList = oracleDao.getAllDrvFlow(); List<DrvFlow> drvFlowList = oracleDao.getAllDrvFlow();
...@@ -540,3 +559,4 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService { ...@@ -540,3 +559,4 @@ public class EveryDayScheduleServiceImpl implements EveryDayScheduleService {
} }
*/
/*
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.clients.producer.ProducerRecord;
...@@ -7,11 +8,13 @@ import org.slf4j.LoggerFactory; ...@@ -7,11 +8,13 @@ import org.slf4j.LoggerFactory;
import org.springframework.kafka.support.ProducerListener; import org.springframework.kafka.support.ProducerListener;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
*/
/** /**
* @author lifuyi * @author lifuyi
* @date ${Date} * @date ${Date}
* @description * @description
*/ *//*
@Component @Component
public class KafkaSendResultHandler implements ProducerListener { public class KafkaSendResultHandler implements ProducerListener {
private static final Logger log = LoggerFactory.getLogger(KafkaSendResultHandler.class); private static final Logger log = LoggerFactory.getLogger(KafkaSendResultHandler.class);
...@@ -26,3 +29,4 @@ public class KafkaSendResultHandler implements ProducerListener { ...@@ -26,3 +29,4 @@ public class KafkaSendResultHandler implements ProducerListener {
log.info("Message send error : " + producerRecord.toString()); log.info("Message send error : " + producerRecord.toString());
} }
} }
*/
...@@ -53,18 +53,7 @@ public class SurveilServiceImpl implements SurveilService { ...@@ -53,18 +53,7 @@ public class SurveilServiceImpl implements SurveilService {
try { try {
List<Surveil> list = surveilMapper.insertSurveilBatch(day); List<Surveil> list = surveilMapper.insertSurveilBatch(day);
System.out.println("list size:" + list.size()); System.out.println("list size:" + list.size());
if (list.size() == 0) { surveilRepository.saveAll(list);
System.out.println("当天没有数据");
} else {
for (Surveil surveil : list) {
Optional<Surveil> byId = surveilRepository.findById(surveil.getWfbh());
if (byId.isPresent() && byId.get().getGxsj().compareTo(surveil.getGxsj()) >= 0) {
continue;
} else {
surveilRepository.save(surveil);
}
}
}
} }
catch(Exception e){ catch(Exception e){
e.printStackTrace(); e.printStackTrace();
......
/*
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import com.hikcreate.update_hbase.Repo.AcdAllRepository; import com.hikcreate.update_hbase.Repo.AcdAllRepository;
...@@ -40,10 +41,12 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService { ...@@ -40,10 +41,12 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService {
@Value("${app.kafka.acd_human.topic}") @Value("${app.kafka.acd_human.topic}")
private String acdHumanTopic; private String acdHumanTopic;
/** */
/**
* 事故每天调度 * 事故每天调度
* @param i * @param i
*/ *//*
@Override @Override
public void AcdEsDay(int i) { public void AcdEsDay(int i) {
//查询三个事故表中前10天数据 //查询三个事故表中前10天数据
...@@ -85,9 +88,11 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService { ...@@ -85,9 +88,11 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService {
} }
/**
* 事故定时调度
*/ */
/**
* 事故定时调度
*//*
@Override @Override
public void AcdEs20Min() { public void AcdEs20Min() {
//获取时间 //获取时间
...@@ -109,10 +114,12 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService { ...@@ -109,10 +114,12 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService {
}).start(); }).start();
} }
/** */
/**
* 事故人员每天调度 * 事故人员每天调度
* @param pastDay * @param pastDay
*/ *//*
@Override @Override
public void AcdHumanDay(int pastDay) { public void AcdHumanDay(int pastDay) {
List<AcdHuman> acdHumanList= acdDao.getIncreAcdHuman(pastDay); List<AcdHuman> acdHumanList= acdDao.getIncreAcdHuman(pastDay);
...@@ -139,3 +146,4 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService { ...@@ -139,3 +146,4 @@ public class UpdateEsAcdServiceImpl implements UpdateEsAcdService {
} }
} }
*/
/*
package com.hikcreate.update_hbase.service.impl; package com.hikcreate.update_hbase.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -140,11 +141,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -140,11 +141,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
return resultJson.toString(); return resultJson.toString();
} }
/** */
/**
* 驾驶人 * 驾驶人
* *
* @param day * @param day
*/ *//*
@Override @Override
public synchronized void driverUpdateHbase(String day) { public synchronized void driverUpdateHbase(String day) {
String rowkey; String rowkey;
...@@ -196,11 +199,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -196,11 +199,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
esUtils.closeHbaseCon(hbaseConn); esUtils.closeHbaseCon(hbaseConn);
} }
} }
/** */
/**
* 驾驶人数据插入 * 驾驶人数据插入
* *
* @param ids * @param ids
*/ *//*
@Override @Override
public synchronized void insertDriverById(String... ids) { public synchronized void insertDriverById(String... ids) {
String rowkey; String rowkey;
...@@ -244,11 +249,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -244,11 +249,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
} }
} }
/** */
/**
* 违法 * 违法
* *
* @param day * @param day
*/ *//*
@Override @Override
public synchronized void vioUpdateHbase(String day) { public synchronized void vioUpdateHbase(String day) {
try { try {
...@@ -303,13 +310,15 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -303,13 +310,15 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
} }
} }
/** */
/**
* 删除hbase指定列 * 删除hbase指定列
* *
* @param family * @param family
* @param tableStr * @param tableStr
* @param col * @param col
*/ *//*
@Override @Override
public void delColumn(String tableStr, String family, String col) { public void delColumn(String tableStr, String family, String col) {
try { try {
...@@ -380,11 +389,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -380,11 +389,13 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
public static void main(String[] args) { public static void main(String[] args) {
*/
/* while (true){ /* while (true){
Scanner input=new Scanner(System.in); Scanner input=new Scanner(System.in);
int n=input.nextInt(); int n=input.nextInt();
System.out.println(getNum(n)); System.out.println(getNum(n));
}*/ }*//*
System.out.println(UUID.randomUUID().toString().replaceAll("-","")); System.out.println(UUID.randomUUID().toString().replaceAll("-",""));
System.out.println("2020-03-09 08:05:14.000".substring(11, 16)); System.out.println("2020-03-09 08:05:14.000".substring(11, 16));
...@@ -402,3 +413,4 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService { ...@@ -402,3 +413,4 @@ public class UpdateHbaseServiceImpl implements UpdateHbaseService {
} }
} }
*/
...@@ -17,6 +17,10 @@ import org.springframework.stereotype.Component; ...@@ -17,6 +17,10 @@ import org.springframework.stereotype.Component;
import java.util.*; import java.util.*;
@Component @Component
public class ViolationServiceImpl implements ViolationService { public class ViolationServiceImpl implements ViolationService {
...@@ -91,19 +95,19 @@ public class ViolationServiceImpl implements ViolationService { ...@@ -91,19 +95,19 @@ public class ViolationServiceImpl implements ViolationService {
*指定时间段同步到violation数据到es *指定时间段同步到violation数据到es
*/ */
@Override @Override
public void insertViolation2EsByDte(String start,String end){ public void insertViolation2EsByDte(String start,String end) {
try { try {
List<Violation> list = violationMapper.getVmViolation(start, end); List<Violation> list = violationMapper.getVmViolation(start, end);
for (Violation violation : list) { violationRepository.saveAll(list);
/*for (Violation violation : list) {
Optional<Violation> byId = violationRepository.findById(violation.getWfbh()); Optional<Violation> byId = violationRepository.findById(violation.getWfbh());
if (byId.isPresent() && byId.get().getGxsj().compareTo(violation.getGxsj()) >= 0) { if (byId.isPresent() && byId.get().getGxsj().compareTo(violation.getGxsj()) >= 0) {
continue; continue;
} else { } else {
violationRepository.save(violation); violationRepository.save(violation);
} }
} }*/
} } catch (Exception e) {
catch(Exception e){
e.printStackTrace(); e.printStackTrace();
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="toEsData-0.0.1-SNAPSHOT" level="project" />
</component>
</module>
\ No newline at end of file
...@@ -41,7 +41,7 @@ spring.redis.sentinel.nodes[2] = 172.16.25.48:26379 ...@@ -41,7 +41,7 @@ spring.redis.sentinel.nodes[2] = 172.16.25.48:26379
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
server.port=8090 server.port=9070
thread.num=10 thread.num=10
......
<?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="com.hikcreate.update_hbase.dao.DriverHBMapper">
<select id="insertDriver2HbaseByMonth" resultType="com.hikcreate.update_hbase.entity.Driver">
select a.*,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0206' and DMZ=a.JZQX and ROWNUM=1) jzqx_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(ZT,'A','正常 '),'B','超分 '),'C','转出 '),'D','暂扣 '),'E','撤销 '),'F','吊销 '),'G','注销 '),'H','违法未处理 '),'I','事故未处理 '),'J','停止使用 '),'K','扣押 '),'L','锁定 '),'M','逾期未换证 '),'N','延期换证 '),'P','延期体检 '),'R','注销可恢复 '),'S','逾期未审验 '),'T','延期审验 '),'U','扣留 ') zt_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0002' and DMZ=a.LY and ROWNUM=1) ly_value,(select sc.jxmc from ZCKJ.VM_JG_EXAM_SCHOOLINFO sc where sc.JXDM=a.JXMC and ROWNUM=1) jxmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.XZQH and ROWNUM=1) xzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0051' and DMZ=a.XZQJ and ROWNUM=1) xzqj_value,(select BMMC from ZCKJ.VM_FRM_DEPARTMENT_CODE depart where depart.GLBM=a.GLBM and ROWNUM=1) glbm_value,regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(xgzl,'A','身份证明 '),'B','机动车驾驶证申请表 '),'C','身体条件证明 '),'D','原驾驶证 '),'E','复员转业退伍证明 '),'F','驾驶证中文翻译文本 '),'G','居住、暂住证明 '),'H','准考证明 '),'I','科目一考试成绩表 '),'J','科目二考试成绩表 '),'K','科目三考试成绩表 '),'L','驾校培训证明 '),'N','驾证注销证明 '),'P','裁决文件 '),'Q','代理人身份证明 '),'R','身份证号码变更证明 '),'S','接受教育凭证 '),'T','机动车驾驶人身体情况申报表 '),'U','从业单位出具的证明 '),'V','县级公安机关出具的无犯罪、吸毒行为记录证明原件 '),'W','内地居民往来港澳通行证 '),'X','大陆居民往来台湾通行证 '),'Y','军车驾驶员基本信息登记表 '),'Z','其它材料 ') xgzl_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='2019' and DMZ=a.SFZMMC and ROWNUM=1) sfzmmc_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='02' and DMLB='0211' and DMZ=a.HMCD and ROWNUM=1) hmcd_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0035' and DMZ=a.XB and ROWNUM=1) xb_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='00' and DMLB='0031' and DMZ=a.GJ and ROWNUM=1) gj_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.djzsxzqh and ROWNUM=1) djzsxzqh_value,(select DMSM1 from ZCKJ.FRM_CODE where XTLB='90' and DMLB='9005' and DMZ=a.lxzsxzqh and ROWNUM=1) lxzsxzqh_value from zckj.VM_DRIVINGLICENSE_GY a where GXSJ is not null and to_char(GXSJ,'yyyy-mm')<![CDATA[ >= ]]> #{month} order by GXSJ desc
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="toEsData-0.0.1-SNAPSHOT" level="project" />
</component>
</module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment