parent
65b11a3eec
commit
212ce118a4
@ -0,0 +1,35 @@
|
|||||||
|
package com.ssf.mysqloracletest.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TSlryRyjbxxGjxx {
|
||||||
|
|
||||||
|
private String GJXXID;
|
||||||
|
private String GJLX;
|
||||||
|
private String KEY1;
|
||||||
|
private String VALUE1;
|
||||||
|
private String KEY2;
|
||||||
|
private String VALUE2;
|
||||||
|
private String KEY3;
|
||||||
|
private String VALUE3;
|
||||||
|
private String KEY4;
|
||||||
|
private String VALUE4;
|
||||||
|
private String KEY5;
|
||||||
|
private String VALUE5;
|
||||||
|
private String KEY6;
|
||||||
|
private String VALUE6;
|
||||||
|
private String KEY7;
|
||||||
|
private String VALUE7;
|
||||||
|
private String GJSJ;
|
||||||
|
private String RYWKSJ;
|
||||||
|
private String ZDRYSFZH;
|
||||||
|
private String ZDRYXM;
|
||||||
|
private String KEY8;
|
||||||
|
private String VALUE8;
|
||||||
|
private String DWBH;
|
||||||
|
private String JDZB;
|
||||||
|
private String WDZB;
|
||||||
|
private String SF;
|
||||||
|
private String RQ;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.ssf.mysqloracletest.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssf.mysqloracletest.domain.TSlryRyjbxxGjxx;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Mapper
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
* @Entity com.ssf.mysqloracletest.domain.VSySydwCyry
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TSlryRyjbxxGjxxOracleMapper extends BaseMapper<TSlryRyjbxxGjxx> {
|
||||||
|
public int countSlry();
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryList(Map map);
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryListByTime(Map map);
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getRealTimeRecording(String maxTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ssf.mysqloracletest.mapper;
|
||||||
|
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersUserRecord;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitImpUserRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_user_record(非法狩猎人员人脸记录表)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-12-08 22:41:49
|
||||||
|
* @Entity com.ssf.mysqloracletest.domain.TransitHuntersUserRecord
|
||||||
|
*/
|
||||||
|
public interface TransitHuntersUserRecordMapper extends BaseMapper<TransitHuntersUserRecord> {
|
||||||
|
|
||||||
|
public TransitHuntersUserRecord selectMaxTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ssf.mysqloracletest.mapper;
|
||||||
|
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersUserRecord;
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersVehicleRecord;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_vehicle_record(非法狩猎人员车辆记录表)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-12-08 22:41:59
|
||||||
|
* @Entity com.ssf.mysqloracletest.domain.TransitHuntersVehicleRecord
|
||||||
|
*/
|
||||||
|
public interface TransitHuntersVehicleRecordMapper extends BaseMapper<TransitHuntersVehicleRecord> {
|
||||||
|
|
||||||
|
public TransitHuntersVehicleRecord selectMaxTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.ssf.mysqloracletest.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssf.mysqloracletest.domain.TSlryRyjbxxGjxx;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_Slry】的数据库操作Service
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
public interface TSlryRyjbxxGjxxOracleService extends IService<TSlryRyjbxxGjxx> {
|
||||||
|
public int countSlry();
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryList(Map map);
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryListByTime(Map map);
|
||||||
|
|
||||||
|
public List<TSlryRyjbxxGjxx> getRealTimeRecording(String maxTime);
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.ssf.mysqloracletest.service;
|
||||||
|
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersUserRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_user_record(非法狩猎人员人脸记录表)】的数据库操作Service
|
||||||
|
* @createDate 2023-12-08 22:41:49
|
||||||
|
*/
|
||||||
|
public interface TransitHuntersUserRecordService extends IService<TransitHuntersUserRecord> {
|
||||||
|
|
||||||
|
public Long selectMaxTime();
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.ssf.mysqloracletest.service;
|
||||||
|
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersVehicleRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_vehicle_record(非法狩猎人员车辆记录表)】的数据库操作Service
|
||||||
|
* @createDate 2023-12-08 22:41:59
|
||||||
|
*/
|
||||||
|
public interface TransitHuntersVehicleRecordService extends IService<TransitHuntersVehicleRecord> {
|
||||||
|
|
||||||
|
public Long selectMaxTime();
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.ssf.mysqloracletest.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssf.mysqloracletest.domain.TSlryRyjbxxGjxx;
|
||||||
|
import com.ssf.mysqloracletest.mapper.TSlryRyjbxxGjxxOracleMapper;
|
||||||
|
import com.ssf.mysqloracletest.service.TSlryRyjbxxGjxxOracleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【Slry】的数据库操作Service实现
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@DS("oracleSydz")
|
||||||
|
public class TSlryRyjbxxGjxxOracleServiceImpl extends ServiceImpl<TSlryRyjbxxGjxxOracleMapper, TSlryRyjbxxGjxx>
|
||||||
|
implements TSlryRyjbxxGjxxOracleService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TSlryRyjbxxGjxxOracleMapper oracleMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int countSlry() {
|
||||||
|
return oracleMapper.countSlry();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryList(Map map) {
|
||||||
|
return oracleMapper.getSlryList(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TSlryRyjbxxGjxx> getSlryListByTime(Map map) {
|
||||||
|
return oracleMapper.getSlryListByTime(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TSlryRyjbxxGjxx> getRealTimeRecording(String time) {
|
||||||
|
return oracleMapper.getRealTimeRecording(time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.ssf.mysqloracletest.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersUserRecord;
|
||||||
|
import com.ssf.mysqloracletest.mapper.TransitImpUserRecordMapper;
|
||||||
|
import com.ssf.mysqloracletest.service.TransitHuntersUserRecordService;
|
||||||
|
import com.ssf.mysqloracletest.mapper.TransitHuntersUserRecordMapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_user_record(非法狩猎人员人脸记录表)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-12-08 22:41:49
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@DS("mysql")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class TransitHuntersUserRecordServiceImpl extends ServiceImpl<TransitHuntersUserRecordMapper, TransitHuntersUserRecord>
|
||||||
|
implements TransitHuntersUserRecordService{
|
||||||
|
|
||||||
|
private final TransitHuntersUserRecordMapper mapper;
|
||||||
|
|
||||||
|
public Long selectMaxTime(){
|
||||||
|
if (mapper.selectMaxTime() == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return mapper.selectMaxTime().getPassTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.ssf.mysqloracletest.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssf.mysqloracletest.domain.TransitHuntersVehicleRecord;
|
||||||
|
import com.ssf.mysqloracletest.mapper.TransitHuntersUserRecordMapper;
|
||||||
|
import com.ssf.mysqloracletest.service.TransitHuntersVehicleRecordService;
|
||||||
|
import com.ssf.mysqloracletest.mapper.TransitHuntersVehicleRecordMapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【transit_hunters_vehicle_record(非法狩猎人员车辆记录表)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-12-08 22:41:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@DS("mysql")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class TransitHuntersVehicleRecordServiceImpl extends ServiceImpl<TransitHuntersVehicleRecordMapper, TransitHuntersVehicleRecord>
|
||||||
|
implements TransitHuntersVehicleRecordService{
|
||||||
|
|
||||||
|
private final TransitHuntersVehicleRecordMapper mapper;
|
||||||
|
|
||||||
|
public Long selectMaxTime(){
|
||||||
|
if (mapper.selectMaxTime() == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return mapper.selectMaxTime().getPassTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,155 @@
|
|||||||
|
package com.ssf.mysqloracletest.task;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.ssf.mysqloracletest.domain.*;
|
||||||
|
import com.ssf.mysqloracletest.service.*;
|
||||||
|
import com.ssf.mysqloracletest.utils.ConfigParam;
|
||||||
|
import com.ssf.mysqloracletest.utils.NumKit;
|
||||||
|
import com.ssf.mysqloracletest.utils.StringKit;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户数据接入
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class TSlryRyjbxxGjxxTask {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(TSlryRyjbxxGjxxTask.class);
|
||||||
|
|
||||||
|
|
||||||
|
String pattern = "yyyyMMddHHmmss";
|
||||||
|
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
|
||||||
|
|
||||||
|
private final TSlryRyjbxxGjxxOracleService tSlryRyjbxxGjxxOracleService;
|
||||||
|
|
||||||
|
private final TransitHuntersUserRecordService transitHuntersUserRecordService;
|
||||||
|
|
||||||
|
private final TransitHuntersVehicleRecordService transitHuntersVehicleRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 连云港 对接海康平台获取人员基础数据
|
||||||
|
* //
|
||||||
|
*/
|
||||||
|
@Scheduled(initialDelay = 100, fixedDelay = 3000)
|
||||||
|
public void translgry() {
|
||||||
|
|
||||||
|
if (!"true".equals(ConfigParam.SlrySwitch)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
long currentTimeMillis = System.currentTimeMillis();
|
||||||
|
// Convert long to DateTime
|
||||||
|
DateTime currentDateTime = DateUtil.date(currentTimeMillis);
|
||||||
|
String currentFormattedDate = null;
|
||||||
|
Long maxTime1 = transitHuntersUserRecordService.selectMaxTime();
|
||||||
|
Long maxTime = transitHuntersVehicleRecordService.selectMaxTime();
|
||||||
|
if (maxTime1 == null && maxTime == null) {
|
||||||
|
// 获取当前时间的格式化字符串
|
||||||
|
currentFormattedDate = currentDateTime.toString("yyyyMMddHHmmss");
|
||||||
|
System.out.println("Current Formatted Date: " + currentFormattedDate);
|
||||||
|
} else {
|
||||||
|
if (maxTime1 <= maxTime) {
|
||||||
|
currentFormattedDate = maxTime1.toString();
|
||||||
|
} else {
|
||||||
|
currentFormattedDate = maxTime.toString();
|
||||||
|
}
|
||||||
|
System.out.println("库中的最大时间" + currentFormattedDate);
|
||||||
|
}
|
||||||
|
System.out.println("最大时间" + currentFormattedDate);
|
||||||
|
// 获取1年后的时间
|
||||||
|
DateTime oneYearLaterDateTime = currentDateTime.offset(DateField.YEAR, 1);
|
||||||
|
String oneYearLaterFormattedDate = oneYearLaterDateTime.toString("yyyyMMddHHmmss");
|
||||||
|
System.out.println("1 Year Later Formatted Date: " + oneYearLaterFormattedDate);
|
||||||
|
Map slryMap = new HashMap();
|
||||||
|
slryMap.put("maxTime", currentFormattedDate);
|
||||||
|
slryMap.put("minTime", oneYearLaterFormattedDate);
|
||||||
|
List<TSlryRyjbxxGjxx> list = tSlryRyjbxxGjxxOracleService.getSlryListByTime(slryMap);
|
||||||
|
try {
|
||||||
|
for (TSlryRyjbxxGjxx slry : list) {
|
||||||
|
if ("03".equals(slry.getGJLX())) {
|
||||||
|
TransitHuntersUserRecord transitHuntersUserRecord = new TransitHuntersUserRecord();
|
||||||
|
transitHuntersUserRecord.setDeviceCode(slry.getDWBH());
|
||||||
|
transitHuntersUserRecord.setLongitude(NumKit.checkBigDecimal(slry.getJDZB()));
|
||||||
|
transitHuntersUserRecord.setLatitude(NumKit.checkBigDecimal(slry.getWDZB()));
|
||||||
|
transitHuntersUserRecord.setDeviceAddress(slry.getVALUE1());
|
||||||
|
transitHuntersUserRecord.setGlobalPic(slry.getVALUE4());
|
||||||
|
transitHuntersUserRecord.setPlatePic(slry.getVALUE3());
|
||||||
|
transitHuntersUserRecord.setSimilarity(slry.getVALUE2());
|
||||||
|
transitHuntersUserRecord.setUserName(slry.getZDRYXM());
|
||||||
|
transitHuntersUserRecord.setIdCard(slry.getZDRYSFZH());
|
||||||
|
transitHuntersUserRecord.setPassTime(NumKit.checkLong(slry.getGJSJ()));
|
||||||
|
transitHuntersUserRecord.setPartitionField(dateFormat.parse(slry.getGJSJ()));
|
||||||
|
TransitHuntersUserRecord one = transitHuntersUserRecordService.lambdaQuery().eq(TransitHuntersUserRecord::getGlobalPic, slry.getVALUE4()).one();
|
||||||
|
if (one == null) {
|
||||||
|
boolean save = transitHuntersUserRecordService.save(transitHuntersUserRecord);
|
||||||
|
if (save) {
|
||||||
|
logger.info("Slry-" + slry.getGJXXID() + ":插入成功");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UpdateWrapper<TransitHuntersUserRecord> wrapper = new UpdateWrapper<>();
|
||||||
|
wrapper.eq("global_pic", slry.getVALUE4());
|
||||||
|
boolean update = transitHuntersUserRecordService.update(transitHuntersUserRecord, wrapper);
|
||||||
|
if (update) {
|
||||||
|
logger.info("Slry-" + slry.getGJXXID() + ":更新成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("02".equals(slry.getGJLX())) {
|
||||||
|
TransitHuntersVehicleRecord transitHuntersVehicleRecord = new TransitHuntersVehicleRecord();
|
||||||
|
transitHuntersVehicleRecord.setDeviceCode(slry.getDWBH());
|
||||||
|
transitHuntersVehicleRecord.setLongitude(NumKit.checkBigDecimal(slry.getJDZB()));
|
||||||
|
transitHuntersVehicleRecord.setLatitude(NumKit.checkBigDecimal(slry.getWDZB()));
|
||||||
|
transitHuntersVehicleRecord.setDeviceAddress(slry.getVALUE1());
|
||||||
|
transitHuntersVehicleRecord.setPlateNo(slry.getVALUE2());
|
||||||
|
transitHuntersVehicleRecord.setGlobalPic(slry.getVALUE5());
|
||||||
|
transitHuntersVehicleRecord.setPlatePic(slry.getVALUE4());
|
||||||
|
transitHuntersVehicleRecord.setOwnerName(slry.getZDRYXM());
|
||||||
|
transitHuntersVehicleRecord.setIdCard(slry.getZDRYSFZH());
|
||||||
|
transitHuntersVehicleRecord.setPassTime(NumKit.checkLong(slry.getGJSJ()));
|
||||||
|
transitHuntersVehicleRecord.setPartitionField(dateFormat.parse(slry.getGJSJ()));
|
||||||
|
TransitHuntersVehicleRecord one = transitHuntersVehicleRecordService.lambdaQuery().eq(TransitHuntersVehicleRecord::getGlobalPic, slry.getVALUE5()).one();
|
||||||
|
if (one == null) {
|
||||||
|
boolean save = transitHuntersVehicleRecordService.save(transitHuntersVehicleRecord);
|
||||||
|
if (save) {
|
||||||
|
logger.info("Slry-" + slry.getGJXXID() + ":插入成功");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UpdateWrapper<TransitHuntersVehicleRecord> wrapper = new UpdateWrapper<>();
|
||||||
|
wrapper.eq("global_pic", slry.getVALUE5());
|
||||||
|
boolean update = transitHuntersVehicleRecordService.update(transitHuntersVehicleRecord, wrapper);
|
||||||
|
if (update) {
|
||||||
|
logger.info("Slry-" + slry.getGJXXID() + ":更新成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.info("Lgrys:" + StringKit.getTrace(e));
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (
|
||||||
|
Exception e) {
|
||||||
|
logger.info(StringKit.getTrace(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?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.ssf.mysqloracletest.mapper.TSlryRyjbxxGjxxOracleMapper">
|
||||||
|
|
||||||
|
<select id="countSlry" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from SYX_JWSZPT.T_SLRY_RYJBXX_GJXX
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.TSlryRyjbxxGjxx">
|
||||||
|
|
||||||
|
<result property="GJXXID" column="GJXXID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="GJLX" column="GJLX" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY1" column="KEY1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE1" column="VALUE1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY2" column="KEY2" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE2" column="VALUE2" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY3" column="KEY3" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE3" column="VALUE3" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY4" column="KEY4" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE4" column="VALUE4" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY5" column="KEY5" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE5" column="VALUE5" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY6" column="KEY6" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE6" column="VALUE6" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY7" column="KEY7" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE7" column="VALUE7" jdbcType="VARCHAR"/>
|
||||||
|
<result property="GJSJ" column="GJSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="RYWKSJ" column="RYWKSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZDRYSFZH" column="ZDRYSFZH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZDRYXM" column="ZDRYXM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="KEY8" column="KEY8" jdbcType="VARCHAR"/>
|
||||||
|
<result property="VALUE8" column="VALUE8" jdbcType="VARCHAR"/>
|
||||||
|
<result property="DWBH" column="DWBH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="JDZB" column="JDZB" jdbcType="VARCHAR"/>
|
||||||
|
<result property="WDZB" column="WDZB" jdbcType="VARCHAR"/>
|
||||||
|
<result property="SF" column="SF" jdbcType="VARCHAR"/>
|
||||||
|
<result property="RQ" column="RQ" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getSlryList" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||||
|
SELECT t2.*
|
||||||
|
FROM (SELECT ROWNUM rn, t1.* FROM (SELECT * FROM SYX_JWSZPT.T_SLRY_RYJBXX_GJXX) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2
|
||||||
|
WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSlryListByTime" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM SYX_JWSZPT.T_SLRY_RYJBXX_GJXX where GJSJ <![CDATA[ >= ]]> #{maxTime} and GJSJ <![CDATA[ <= ]]> #{minTime}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getRealTimeRecording" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM SYX_JWSZPT.T_SLRY_RYJBXX_GJXX where GJSJ >#{maxTime}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,33 @@
|
|||||||
|
<?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.ssf.mysqloracletest.mapper.TransitHuntersUserRecordMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.TransitHuntersUserRecord">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="longitude" column="longitude" jdbcType="DECIMAL"/>
|
||||||
|
<result property="latitude" column="latitude" jdbcType="DECIMAL"/>
|
||||||
|
<result property="deviceAddress" column="device_address" jdbcType="VARCHAR"/>
|
||||||
|
<result property="globalPic" column="global_pic" jdbcType="VARCHAR"/>
|
||||||
|
<result property="platePic" column="plate_pic" jdbcType="VARCHAR"/>
|
||||||
|
<result property="similarity" column="similarity" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="idCard" column="id_card" jdbcType="VARCHAR"/>
|
||||||
|
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||||
|
<result property="passTime" column="pass_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="partitionField" column="partition_field" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="isActive" column="is_active" jdbcType="TINYINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectMaxTime" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM transit_hunters_user_record
|
||||||
|
ORDER BY pass_time desc limit 1;
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?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.ssf.mysqloracletest.mapper.TransitHuntersVehicleRecordMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.TransitHuntersVehicleRecord">
|
||||||
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||||
|
<result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="longitude" column="longitude" jdbcType="DECIMAL"/>
|
||||||
|
<result property="latitude" column="latitude" jdbcType="DECIMAL"/>
|
||||||
|
<result property="deviceAddress" column="device_address" jdbcType="VARCHAR"/>
|
||||||
|
<result property="plateNo" column="plate_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="globalPic" column="global_pic" jdbcType="VARCHAR"/>
|
||||||
|
<result property="platePic" column="plate_pic" jdbcType="VARCHAR"/>
|
||||||
|
<result property="similarity" column="similarity" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ownerName" column="owner_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="idCard" column="id_card" jdbcType="VARCHAR"/>
|
||||||
|
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||||
|
<result property="passTime" column="pass_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="partitionField" column="partition_field" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="isActive" column="is_active" jdbcType="TINYINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectMaxTime" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM transit_hunters_vehicle_record
|
||||||
|
ORDER BY pass_time desc limit 1;
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue