久出未归,久居未出更新

develop
hanrenchun 6 months ago
parent a5caa7b050
commit 829e5e2ee5

@ -0,0 +1,166 @@
package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
* @TableName model_longtimein_user_info
*/
@TableName(value ="model_longtimein_user_info")
@Data
public class ModelLongtimeinUserInfo implements Serializable {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
*
*/
private String placeCode;
/**
*
*/
private String placeName;
/**
*
*/
private String gridCode;
/**
*
*/
private String gridName;
/**
*
*/
private String buildingCode;
/**
*
*/
private String buildingName;
/**
*
*/
private String unitCode;
/**
*
*/
private String unitName;
/**
*
*/
private String homeCode;
/**
*
*/
private String homeName;
/**
*
*/
private String userName;
/**
*
*/
private String userPic;
/**
*
*/
private Integer identityType;
/**
*
*/
private String idcard;
/**
*
*/
private String phone;
/**
*
*/
private Integer caringLabel;
/**
*
*/
private Long lastTime;
/**
*
*/
private Integer homeDays;
/**
*
*/
private Date createtime;
/**
*
*/
private Integer createby;
/**
*
*/
private Date updatetime;
/**
*
*/
private Integer updateby;
/**
* 0:,1:
*/
private Integer isactive;
/**
* c1
*/
private String c1;
/**
* c2
*/
private String c2;
/**
* c3
*/
private String c3;
/**
* c4
*/
private String c4;
/**
* c5
*/
private String c5;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,166 @@
package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
* @TableName model_longtimeout_user_info
*/
@TableName(value ="model_longtimeout_user_info")
@Data
public class ModelLongtimeoutUserInfo implements Serializable {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
*
*/
private String placeCode;
/**
*
*/
private String placeName;
/**
*
*/
private String gridCode;
/**
*
*/
private String gridName;
/**
*
*/
private String buildingCode;
/**
*
*/
private String buildingName;
/**
*
*/
private String unitCode;
/**
*
*/
private String unitName;
/**
*
*/
private String homeCode;
/**
*
*/
private String homeName;
/**
*
*/
private String userName;
/**
*
*/
private String userPic;
/**
*
*/
private Integer identityType;
/**
*
*/
private String idcard;
/**
*
*/
private String phone;
/**
*
*/
private Integer caringLabel;
/**
*
*/
private Long lastTime;
/**
*
*/
private Integer leaveDays;
/**
*
*/
private Date createtime;
/**
*
*/
private Integer createby;
/**
*
*/
private Date updatetime;
/**
*
*/
private Integer updateby;
/**
* 0:,1:
*/
private Integer isactive;
/**
* c1
*/
private String c1;
/**
* c2
*/
private String c2;
/**
* c3
*/
private String c3;
/**
* c4
*/
private String c4;
/**
* c5
*/
private String c5;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,21 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author 28758
* @description model_longtimein_user_info()Mapper
* @createDate 2024-03-21 09:47:58
* @Entity com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo
*/
@Mapper
public interface ModelLongtimeinUserInfoMapper extends BaseMapper<ModelLongtimeinUserInfo> {
public void cleanModelLongtimeinUserInfo();
}

@ -0,0 +1,21 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author 28758
* @description model_longtimeout_user_info()Mapper
* @createDate 2024-03-21 09:48:19
* @Entity com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo
*/
@Mapper
public interface ModelLongtimeoutUserInfoMapper extends BaseMapper<ModelLongtimeoutUserInfo> {
void cleanModelLongtimeoutUserInfo();
}

@ -0,0 +1,13 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author 28758
* @description model_longtimein_user_info()Service
* @createDate 2024-03-21 09:47:58
*/
public interface ModelLongtimeinUserInfoService extends IService<ModelLongtimeinUserInfo> {
}

@ -0,0 +1,13 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author 28758
* @description model_longtimeout_user_info()Service
* @createDate 2024-03-21 09:48:19
*/
public interface ModelLongtimeoutUserInfoService extends IService<ModelLongtimeoutUserInfo> {
}

@ -0,0 +1,24 @@
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.ModelLongtimeinUserInfo;
import com.ssf.mysqloracletest.service.ModelLongtimeinUserInfoService;
import com.ssf.mysqloracletest.mapper.ModelLongtimeinUserInfoMapper;
import org.springframework.stereotype.Service;
/**
* @author 28758
* @description model_longtimein_user_info()Service
* @createDate 2024-03-21 09:47:58
*/
@Service
@DS("mysql")
public class ModelLongtimeinUserInfoServiceImpl extends ServiceImpl<ModelLongtimeinUserInfoMapper, ModelLongtimeinUserInfo>
implements ModelLongtimeinUserInfoService{
}

@ -0,0 +1,24 @@
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.ModelLongtimeoutUserInfo;
import com.ssf.mysqloracletest.service.ModelLongtimeoutUserInfoService;
import com.ssf.mysqloracletest.mapper.ModelLongtimeoutUserInfoMapper;
import org.springframework.stereotype.Service;
/**
* @author 28758
* @description model_longtimeout_user_info()Service
* @createDate 2024-03-21 09:48:19
*/
@Service
@DS("mysql")
public class ModelLongtimeoutUserInfoServiceImpl extends ServiceImpl<ModelLongtimeoutUserInfoMapper, ModelLongtimeoutUserInfo>
implements ModelLongtimeoutUserInfoService{
}

@ -0,0 +1,168 @@
package com.ssf.mysqloracletest.task;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.ssf.mysqloracletest.domain.BasePlaceInfo;
import com.ssf.mysqloracletest.domain.BaseUserInfo;
import com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo;
import com.ssf.mysqloracletest.domain.TransitUserRecord;
import com.ssf.mysqloracletest.mapper.ModelLongtimeinUserInfoMapper;
import com.ssf.mysqloracletest.service.BasePlaceInfoService;
import com.ssf.mysqloracletest.service.BaseUserInfoService;
import com.ssf.mysqloracletest.service.ModelLongtimeinUserInfoService;
import com.ssf.mysqloracletest.service.TransitUserRecordService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.DateTool;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@RequiredArgsConstructor
public class ModelLongtimeinUserTask {
private static final Logger logger = LoggerFactory.getLogger(ModelLongtimeinUserTask.class);
@Resource
DateTool dateTool;
private final BasePlaceInfoService basePlaceInfoService;
private final ModelLongtimeinUserInfoMapper modelLongtimeinUserInfoMapper;
private final ModelLongtimeinUserInfoService modelLongtimeinUserInfoService;
private final BaseUserInfoService baseUserInfoService;
private final TransitUserRecordService transitUserRecordService;
@Scheduled(initialDelay = 100, fixedDelay = 3000)
// @Scheduled(cron = "0 0 0 * * ?") // 每天凌晨执行
public void goalPersonLongTimeNotOut() {
if (!"true".equals(ConfigParam.PersonLongTimeNotOutSwitch)) {
return;
}
String nearlyDays = "30";
String inDays = "30";
logger.info("goalPersonLongTimeNotOut 人员分析 久居未出住户 nearlyDays:" + nearlyDays + ", inDays:" + inDays + ", threadName:" + Thread.currentThread().getName());
if (StringUtils.isBlank(nearlyDays) || StringUtils.isBlank(inDays)) {
return;
}
try {
Integer.parseInt(inDays);
Integer.parseInt(nearlyDays);
nearlyDays = nearlyDays.trim();
} catch (Exception ex) {
return;
}
List<BasePlaceInfo> villageBaseInfos = basePlaceInfoService.queryVillageInfos();
if (CollectionUtils.isEmpty(villageBaseInfos)) {
return;
}
long inDaysLong = Integer.parseInt(inDays) * 24 * 60 * 60L;
// 清空临时结果表为入数据做准备
modelLongtimeinUserInfoMapper.cleanModelLongtimeinUserInfo();
String villageCode = "";
for (BasePlaceInfo villageBaseInfo : villageBaseInfos) {
villageCode = villageBaseInfo.getPlaceCode();
if (StringUtils.isBlank(villageCode)) {
continue;
}
List<BaseUserInfo> villageUserInfos = queryVillageUserInfos(villageCode);
if (CollectionUtils.isEmpty(villageUserInfos)) {
return;
}
List<ModelLongtimeinUserInfo> modelLongtimeInUserInfos = new ArrayList<>();
for (BaseUserInfo villageUserInfo : villageUserInfos) {
if (StringUtils.isBlank(villageUserInfo.getIdCard())) {
continue;
}
// 1.查询人脸抓拍记录表最新一条方向字段非2
Map<String, Object> map = new HashMap<>();
map.put("startTime", dateTool.getDayStart(Integer.parseInt(nearlyDays)));
map.put("endTime", dateTool.getDayEnd(1));
map.put("placeCode", villageCode);
map.put("idCard", villageUserInfo.getIdCard());
List<TransitUserRecord> villageUserRecords = transitUserRecordService
.lambdaQuery().eq(TransitUserRecord::getIdCard,villageUserInfo.getIdCard())
.eq(TransitUserRecord::getPlaceCode,villageCode)
.between(TransitUserRecord::getPartitionField,dateTool.getDayStart(Integer.parseInt(nearlyDays)),dateTool.getDayEnd(1))
.orderByDesc(TransitUserRecord::getPassTime)
.list();
try {
if (CollectionUtils.isNotEmpty(villageUserRecords)) {
TransitUserRecord villageUserRecord = villageUserRecords.get(0);
if (null == villageUserRecord.getDirection() || villageUserRecord.getDirection() != 2) {
if (System.currentTimeMillis() / 1000 - villageUserRecord.getPassTime() - inDaysLong > 0) {
ModelLongtimeinUserInfo modelLongtimeinUserInfo = new ModelLongtimeinUserInfo();
modelLongtimeinUserInfo.setPlaceCode(villageUserInfo.getPlaceCode());
modelLongtimeinUserInfo.setPlaceName(villageUserInfo.getPlaceName());
modelLongtimeinUserInfo.setGridCode(villageUserInfo.getGridCode());
modelLongtimeinUserInfo.setGridName(villageUserInfo.getGridName());
modelLongtimeinUserInfo.setBuildingCode(villageUserInfo.getBuildingCode());
modelLongtimeinUserInfo.setBuildingName(villageUserInfo.getBuildingName());
modelLongtimeinUserInfo.setUnitCode(villageUserInfo.getUnitCode());
modelLongtimeinUserInfo.setUnitName(villageUserInfo.getUnitName());
modelLongtimeinUserInfo.setHomeCode(villageUserInfo.getHomeCode());
modelLongtimeinUserInfo.setHomeName(villageUserInfo.getHomeName());
modelLongtimeinUserInfo.setUserName(villageUserInfo.getUserName());
modelLongtimeinUserInfo.setUserPic(villageUserRecord.getGlobalPic());
modelLongtimeinUserInfo.setIdcard(villageUserInfo.getIdCard());
modelLongtimeinUserInfo.setPhone(villageUserInfo.getPhone());
modelLongtimeinUserInfo.setLastTime(villageUserRecord.getPassTime());
modelLongtimeinUserInfo.setHomeDays(getInOutDays(villageUserRecord.getPassTime()));
modelLongtimeinUserInfo.setC1(villageUserRecord.getDeviceAddress());
modelLongtimeInUserInfos.add(modelLongtimeinUserInfo);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
// 3.久居未出住户入库
if (modelLongtimeInUserInfos.size() > 0) {
for (ModelLongtimeinUserInfo modelLongtimeinUserInfo : modelLongtimeInUserInfos){
modelLongtimeinUserInfoService.save(modelLongtimeinUserInfo);
}
}
villageUserInfos.clear();
modelLongtimeInUserInfos.clear();
}
logger.info("goalPersonLongTimeNotOut 人员分析 久居未出住户 结束, 时间:" + dateTool.getDateTime(System.currentTimeMillis() / 1000));
}
private List<BaseUserInfo> queryVillageUserInfos(String villageCode) {
BaseUserInfo villageUserInfo = new BaseUserInfo();
villageUserInfo.setPlaceCode(villageCode);
List<BaseUserInfo> villageUserInfos = baseUserInfoService.lambdaQuery()
.isNotNull(BaseUserInfo::getIdCard)
.eq(BaseUserInfo::getPlaceCode,villageCode).list();
if (CollectionUtils.isEmpty(villageUserInfos)) {
return new ArrayList<>();
}
return villageUserInfos;
}
public int getInOutDays(long time) {
int l = Integer.parseInt(String.valueOf((System.currentTimeMillis() / 1000 - time)));
int r = l % (3600 * 24);
l = l / (3600 * 24);
if (r > 0) {
return (l + 1);
} else {
return l;
}
}
}

@ -0,0 +1,171 @@
package com.ssf.mysqloracletest.task;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.ssf.mysqloracletest.domain.BasePlaceInfo;
import com.ssf.mysqloracletest.domain.BaseUserInfo;
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
import com.ssf.mysqloracletest.domain.TransitUserRecord;
import com.ssf.mysqloracletest.mapper.ModelLongtimeoutUserInfoMapper;
import com.ssf.mysqloracletest.service.BasePlaceInfoService;
import com.ssf.mysqloracletest.service.BaseUserInfoService;
import com.ssf.mysqloracletest.service.ModelLongtimeoutUserInfoService;
import com.ssf.mysqloracletest.service.TransitUserRecordService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.DateTool;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@RequiredArgsConstructor
public class ModelLongtimeoutUserTask {
private static final Logger logger = LoggerFactory.getLogger(ModelLongtimeoutUserTask.class);
@Resource
DateTool dateTool;
private final BasePlaceInfoService basePlaceInfoService;
private final BaseUserInfoService baseUserInfoService;
private final TransitUserRecordService transitUserRecordService;
private final ModelLongtimeoutUserInfoService modelLongtimeoutUserInfoService;
private final ModelLongtimeoutUserInfoMapper modelLongtimeoutUserInfoMapper;
@Scheduled(initialDelay = 100, fixedDelay = 3000)
// @Scheduled(cron = "0 0 0 * * ?") // 每天凌晨执行
public void goalPersonLongTimeNotBack() {
if (!"true".equals(ConfigParam.PersonLongTimeNotBackSwitch)) {
return;
}
String nearlyDays = "30";
String leaveDays = "30";
logger.info("goalPersonLongTimeNotBack 人员分析 久出未归住户 nearlyDays:" + nearlyDays + ", leaveDays:" + leaveDays + ", threadName:" + Thread.currentThread().getName());
if (StringUtils.isBlank(nearlyDays)
|| StringUtils.isBlank(leaveDays)) {
return;
}
try {
Integer.parseInt(leaveDays);
Integer.parseInt(nearlyDays);
nearlyDays = nearlyDays.trim();
} catch (Exception ex) {
return;
}
List<BasePlaceInfo> villageBaseInfos = basePlaceInfoService.queryVillageInfos();
if (CollectionUtils.isEmpty(villageBaseInfos)) {
return;
}
long leaveDaysLong = Integer.parseInt(leaveDays) * 24 * 60 * 60L;
//清空临时结果表为入数据做准备
modelLongtimeoutUserInfoMapper.cleanModelLongtimeoutUserInfo();
String villageCode = "";
for (BasePlaceInfo villageBaseInfo : villageBaseInfos) {
villageCode = villageBaseInfo.getPlaceCode();
if (StringUtils.isBlank(villageCode)) {
continue;
}
List<BaseUserInfo> villageUserInfos = queryVillageUserInfos(villageCode);
if (CollectionUtils.isEmpty(villageUserInfos)) {
return;
}
List<ModelLongtimeoutUserInfo> modelLongtimeOutUserInfos = new ArrayList<>();
for (BaseUserInfo villageUserInfo : villageUserInfos) {
if (StringUtils.isBlank(villageUserInfo.getIdCard())) {
continue;
}
// 1.查询人脸抓拍记录表最新一条(方向字段没有的不算)
Map<String, Object> map = new HashMap<>();
map.put("startTime", dateTool.getDayStart(Integer.parseInt(nearlyDays)));
map.put("endTime", dateTool.getDayEnd(1));
map.put("villageCode", villageCode);
map.put("idCard", villageUserInfo.getIdCard());
//根据身份证号查询一条最新有进出的抓拍数据
List<TransitUserRecord> villageUserRecords = transitUserRecordService
.lambdaQuery().eq(TransitUserRecord::getIdCard,villageUserInfo.getIdCard())
.eq(TransitUserRecord::getPlaceCode,villageCode)
.between(TransitUserRecord::getPartitionField,dateTool.getDayStart(Integer.parseInt(nearlyDays)),dateTool.getDayEnd(1))
.orderByDesc(TransitUserRecord::getPassTime)
.list();
try {
if (CollectionUtils.isNotEmpty(villageUserRecords)) {
TransitUserRecord villageUserRecord = villageUserRecords.get(0);
//获取最新一条,如果方向为出,则进一步模型分析(久出未归)
if (null == villageUserRecord.getDirection() || villageUserRecord.getDirection() != 1) {
if (System.currentTimeMillis() / 1000 - villageUserRecord.getPassTime() - leaveDaysLong > 0) {
ModelLongtimeoutUserInfo modelLongtimeoutUserInfo = new ModelLongtimeoutUserInfo();
modelLongtimeoutUserInfo.setPlaceCode(villageUserInfo.getPlaceCode());
modelLongtimeoutUserInfo.setPlaceName(villageUserInfo.getPlaceName());
modelLongtimeoutUserInfo.setGridCode(villageUserInfo.getGridCode());
modelLongtimeoutUserInfo.setGridName(villageUserInfo.getGridName());
modelLongtimeoutUserInfo.setBuildingCode(villageUserInfo.getBuildingCode());
modelLongtimeoutUserInfo.setBuildingName(villageUserInfo.getBuildingName());
modelLongtimeoutUserInfo.setUnitCode(villageUserInfo.getUnitCode());
modelLongtimeoutUserInfo.setUnitName(villageUserInfo.getUnitName());
modelLongtimeoutUserInfo.setHomeCode(villageUserInfo.getHomeCode());
modelLongtimeoutUserInfo.setHomeName(villageUserInfo.getHomeName());
modelLongtimeoutUserInfo.setUserName(villageUserInfo.getUserName());
modelLongtimeoutUserInfo.setUserPic(villageUserRecord.getGlobalPic());
modelLongtimeoutUserInfo.setIdcard(villageUserInfo.getIdCard());
modelLongtimeoutUserInfo.setPhone(villageUserInfo.getPhone());
modelLongtimeoutUserInfo.setLastTime(villageUserRecord.getPassTime());
modelLongtimeoutUserInfo.setLeaveDays(getInOutDays(villageUserRecord.getPassTime()));
modelLongtimeoutUserInfo.setC1(villageUserRecord.getDeviceAddress());
modelLongtimeOutUserInfos.add(modelLongtimeoutUserInfo);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
// 3.久出未归住户入库
if (modelLongtimeOutUserInfos.size() > 0) {
for (ModelLongtimeoutUserInfo modelLongtimeoutUserInfo : modelLongtimeOutUserInfos){
modelLongtimeoutUserInfoService.save(modelLongtimeoutUserInfo);
}
}
villageUserInfos.clear();
modelLongtimeOutUserInfos.clear();
}
logger.info("goalPersonLongTimeNotBack 人员分析 久出未归住户 结束, 时间:" + dateTool.getDateTime(System.currentTimeMillis() / 1000));
}
private List<BaseUserInfo> queryVillageUserInfos(String villageCode) {
BaseUserInfo villageUserInfo = new BaseUserInfo();
villageUserInfo.setPlaceCode(villageCode);
List<BaseUserInfo> villageUserInfos = baseUserInfoService.lambdaQuery()
.isNotNull(BaseUserInfo::getIdCard)
.eq(BaseUserInfo::getPlaceCode,villageCode).list();
if (CollectionUtils.isEmpty(villageUserInfos)) {
return new ArrayList<>();
}
return villageUserInfos;
}
public int getInOutDays(long time) {
int l = Integer.parseInt(String.valueOf((System.currentTimeMillis() / 1000 - time)));
int r = l % (3600 * 24);
l = l / (3600 * 24);
if (r > 0) {
return (l + 1);
} else {
return l;
}
}
}

@ -33,7 +33,7 @@ import java.util.Map;
public class NotFoundUserTask { public class NotFoundUserTask {
private static final Logger logger = LoggerFactory.getLogger(AlarmInfoTask.class); private static final Logger logger = LoggerFactory.getLogger(NotFoundUserTask.class);
@Resource @Resource
DateTool dateTool; DateTool dateTool;

@ -58,6 +58,8 @@ public class ConfigParam {
public static String VehicleSwitch = PropertiesUtil.queryPropertiesByKey("VehicleSwitch"); public static String VehicleSwitch = PropertiesUtil.queryPropertiesByKey("VehicleSwitch");
public static String NotFoundUserTaskSwitch = PropertiesUtil.queryPropertiesByKey("NotFoundUserTaskSwitch"); public static String NotFoundUserTaskSwitch = PropertiesUtil.queryPropertiesByKey("NotFoundUserTaskSwitch");
public static String PersonSuspectedTaskSwitch = PropertiesUtil.queryPropertiesByKey("PersonSuspectedTaskSwitch"); public static String PersonSuspectedTaskSwitch = PropertiesUtil.queryPropertiesByKey("PersonSuspectedTaskSwitch");
public static String PersonLongTimeNotOutSwitch = PropertiesUtil.queryPropertiesByKey("PersonLongTimeNotOutSwitch");
public static String PersonLongTimeNotBackSwitch = PropertiesUtil.queryPropertiesByKey("PersonLongTimeNotBackSwitch");
} }

@ -0,0 +1,55 @@
<?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.ModelLongtimeinUserInfoMapper">
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="placeCode" column="place_code" jdbcType="VARCHAR"/>
<result property="placeName" column="place_name" jdbcType="VARCHAR"/>
<result property="gridCode" column="grid_code" jdbcType="VARCHAR"/>
<result property="gridName" column="grid_name" jdbcType="VARCHAR"/>
<result property="buildingCode" column="building_code" jdbcType="VARCHAR"/>
<result property="buildingName" column="building_name" jdbcType="VARCHAR"/>
<result property="unitCode" column="unit_code" jdbcType="VARCHAR"/>
<result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
<result property="homeCode" column="home_code" jdbcType="VARCHAR"/>
<result property="homeName" column="home_name" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="userPic" column="user_pic" jdbcType="VARCHAR"/>
<result property="identityType" column="identity_type" jdbcType="TINYINT"/>
<result property="idcard" column="idcard" jdbcType="VARCHAR"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/>
<result property="caringLabel" column="caring_label" jdbcType="TINYINT"/>
<result property="lastTime" column="last_time" jdbcType="BIGINT"/>
<result property="homeDays" column="home_days" jdbcType="INTEGER"/>
<result property="createtime" column="createtime" jdbcType="TIMESTAMP"/>
<result property="createby" column="createby" jdbcType="INTEGER"/>
<result property="updatetime" column="updatetime" jdbcType="TIMESTAMP"/>
<result property="updateby" column="updateby" jdbcType="INTEGER"/>
<result property="isactive" column="isactive" jdbcType="TINYINT"/>
<result property="c1" column="c1" jdbcType="VARCHAR"/>
<result property="c2" column="c2" jdbcType="VARCHAR"/>
<result property="c3" column="c3" jdbcType="VARCHAR"/>
<result property="c4" column="c4" jdbcType="VARCHAR"/>
<result property="c5" column="c5" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,place_code,place_name,
grid_code,grid_name,building_code,
building_name,unit_code,unit_name,
home_code,home_name,user_name,
user_pic,identity_type,idcard,
phone,caring_label,last_time,
home_days,createtime,createby,
updatetime,updateby,isactive,
c1,c2,c3,
c4,c5
</sql>
<update id="cleanModelLongtimeinUserInfo">
truncate table model_longtimein_user_info
</update>
</mapper>

@ -0,0 +1,56 @@
<?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.ModelLongtimeoutUserInfoMapper">
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="placeCode" column="place_code" jdbcType="VARCHAR"/>
<result property="placeName" column="place_name" jdbcType="VARCHAR"/>
<result property="gridCode" column="grid_code" jdbcType="VARCHAR"/>
<result property="gridName" column="grid_name" jdbcType="VARCHAR"/>
<result property="buildingCode" column="building_code" jdbcType="VARCHAR"/>
<result property="buildingName" column="building_name" jdbcType="VARCHAR"/>
<result property="unitCode" column="unit_code" jdbcType="VARCHAR"/>
<result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
<result property="homeCode" column="home_code" jdbcType="VARCHAR"/>
<result property="homeName" column="home_name" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="userPic" column="user_pic" jdbcType="VARCHAR"/>
<result property="identityType" column="identity_type" jdbcType="TINYINT"/>
<result property="idcard" column="idcard" jdbcType="VARCHAR"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/>
<result property="caringLabel" column="caring_label" jdbcType="TINYINT"/>
<result property="lastTime" column="last_time" jdbcType="BIGINT"/>
<result property="leaveDays" column="leave_days" jdbcType="INTEGER"/>
<result property="createtime" column="createtime" jdbcType="TIMESTAMP"/>
<result property="createby" column="createby" jdbcType="INTEGER"/>
<result property="updatetime" column="updatetime" jdbcType="TIMESTAMP"/>
<result property="updateby" column="updateby" jdbcType="INTEGER"/>
<result property="isactive" column="isactive" jdbcType="TINYINT"/>
<result property="c1" column="c1" jdbcType="VARCHAR"/>
<result property="c2" column="c2" jdbcType="VARCHAR"/>
<result property="c3" column="c3" jdbcType="VARCHAR"/>
<result property="c4" column="c4" jdbcType="VARCHAR"/>
<result property="c5" column="c5" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,place_code,place_name,
grid_code,grid_name,building_code,
building_name,unit_code,unit_name,
home_code,home_name,user_name,
user_pic,identity_type,idcard,
phone,caring_label,last_time,
leave_days,createtime,createby,
updatetime,updateby,isactive,
c1,c2,c3,
c4,c5
</sql>
<update id="cleanModelLongtimeoutUserInfo">
truncate table model_longtimeout_user_info
</update>
</mapper>
Loading…
Cancel
Save