FaceRecognition.java 7.71 KB
package com.xmh.es.match.entity;

import com.viontech.keliu.base.BaseModel;
import com.viontech.keliu.util.DateUtil;

import java.util.Date;

public class FaceRecognition extends BaseModel {
    private Long id;

    private Long deviceId;

    private Long channelId;

    private Long gateId;

    private String deviceSerialnum;

    private String channelSerialnum;

    private Short personType;

    private String facePic;

    private Short facePicNum;

    private Short bodyPicNum;

    private String bodyPic;

    private String showbodyPic;

    private Short mood;

    private Short age;

    private Short gender;

    private Short direction;

    private Date counttime;

    private Date countdate;

    private Date modifyTime;

    private Date createTime;

    private Long mallId;

    private Long accountId;

    private String personUnid;

    private Short status;

    private Short faceFeatureType;

    private Short bodyFeatureType;

    private String trackInfo;

    private Integer trackTime;

    private String facePath;

    private String trackPath;

    private Short happyConf;
    /** 历史到店次数 */
    private Short historyArrivalCount;
    /** 今日到店次数 */
    private Short todayArrivalCount;

    private String unid;

    /** 图像质量分 **/
    private Float faceScore;


    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getGateId() {
        return gateId;
    }

    public void setGateId(Long gateId) {
        this.gateId = gateId;
    }


    public String getDeviceSerialnum() {
        return deviceSerialnum;
    }

    public void setDeviceSerialnum(String deviceSerialnum) {
        this.deviceSerialnum = deviceSerialnum;
    }

    public String getChannelSerialnum() {
        return channelSerialnum;
    }

    public void setChannelSerialnum(String channelSerialnum) {
        this.channelSerialnum = channelSerialnum;
    }

    public Short getPersonType() {
        return personType;
    }

    public void setPersonType(Short personType) {
        this.personType = personType;
    }

    public String getFacePic() {
        if (facePic == null) {
            facePic = unid + "-" + DateUtil.format("yyyyMMddHHmmss", counttime) + "-face-0.jpg";
        }
        return facePic;
    }

    public void setFacePic(String facePic) {
        this.facePic = facePic;
    }

    public String getBodyPic() {
        if (bodyPic == null) {
            bodyPic = unid + "-" + DateUtil.format("yyyyMMddHHmmss", counttime) + "-body-0.jpg";
        }
        return bodyPic;
    }

    public void setBodyPic(String bodyPic) {
        this.bodyPic = bodyPic;
    }

    public String getShowbodyPic() {
        return showbodyPic;
    }

    public void setShowbodyPic(String showbodyPic) {
        this.showbodyPic = showbodyPic;
    }

    public Short getMood() {
        return mood;
    }

    public void setMood(Short mood) {
        this.mood = mood;
    }

    public Short getAge() {
        return age;
    }

    public void setAge(Short age) {
        this.age = age;
    }

    public Short getGender() {
        return gender;
    }

    public void setGender(Short gender) {
        this.gender = gender;
    }

    public Short getDirection() {
        return direction;
    }

    public void setDirection(Short direction) {
        this.direction = direction;
    }

    public Date getCounttime() {
        return counttime;
    }

    public void setCounttime(Date counttime) {
        this.counttime = counttime;
    }

    public Date getCountdate() {
        return countdate;
    }

    public void setCountdate(Date countdate) {
        this.countdate = countdate;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getPersonUnid() {
        return personUnid;
    }

    public void setPersonUnid(String personUnid) {
        this.personUnid = personUnid;
    }


    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }


    public String getTrackInfo() {
        return trackInfo;
    }

    public void setTrackInfo(String trackInfo) {
        this.trackInfo = trackInfo;
    }

    public Integer getTrackTime() {
        return trackTime;
    }

    public void setTrackTime(Integer trackTime) {
        this.trackTime = trackTime;
    }

    public Short getHappyConf() {
        return happyConf;
    }

    public void setHappyConf(Short happyConf) {
        this.happyConf = happyConf;
    }

    public Short getHistoryArrivalCount() {
        return historyArrivalCount;
    }

    public void setHistoryArrivalCount(Short historyArrivalCount) {
        this.historyArrivalCount = historyArrivalCount;
    }

    public Short getTodayArrivalCount() {
        return todayArrivalCount;
    }

    public void setTodayArrivalCount(Short todayArrivalCount) {
        this.todayArrivalCount = todayArrivalCount;
    }

    public String getUnid() {
        return unid;
    }

    public void setUnid(String unid) {
        this.unid = unid;
    }

    public Float getFaceScore() {
        return faceScore;
    }

    public void setFaceScore(Float faceScore) {
        this.faceScore = faceScore;
    }

    public Short getFacePicNum() {
        return facePicNum;
    }

    public void setFacePicNum(Short facePicNum) {
        this.facePicNum = facePicNum;
    }

    public Short getBodyPicNum() {
        return bodyPicNum;
    }

    public void setBodyPicNum(Short bodyPicNum) {
        this.bodyPicNum = bodyPicNum;
    }

    public Short getFaceFeatureType() {
        return faceFeatureType;
    }

    public void setFaceFeatureType(Short faceFeatureType) {
        this.faceFeatureType = faceFeatureType;
    }

    public Short getBodyFeatureType() {
        return bodyFeatureType;
    }

    public void setBodyFeatureType(Short bodyFeatureType) {
        this.bodyFeatureType = bodyFeatureType;
    }

    private String getRootPath(String pathType) {
        Date countdate = this.getCountdate();
        if (countdate == null) {
            return "获取轨迹根路径失败。【日期字段无法获取】";
        }
        String yyyyMMdd = DateUtil.format("yyyyMMdd", countdate);
        String channelSerialnum = this.getChannelSerialnum();
        if (channelSerialnum == null) {
            return "获取轨迹根路径失败。【通道序列号字段无法获取】";
        }
        return pathType + "/" + yyyyMMdd + "/" + channelSerialnum + "/";
    }

    public String getFacePath() {
        facePath = getRootPath("face");
        return facePath;
    }

    public String getTrackPath() {
        trackPath = getRootPath("track");
        return trackPath;
    }

    public void setFacePath(String facePath) {
        this.facePath = facePath;
    }

    public void setTrackPath(String trackPath) {
        this.trackPath = trackPath;
    }

}