@@ -0,0 +1,45 @@ | |||
package cn.com.taiji.core.entity.comm; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.OcrType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import java.time.LocalDateTime; | |||
/** | |||
* OCR结果 | |||
* @author : qiubh | |||
* @date : 2025-04-30 | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "COMMON_OCR_RESULT") | |||
public class OcrResult extends StringPropertyUUIDEntity { | |||
@Column(name = "URL") | |||
private String url;// 图片url | |||
@Column(name = "RESULT") | |||
private String result;// 识别结果 | |||
@Column(name = "CREATE_TIME") | |||
private LocalDateTime createTime;// 入库时间 | |||
/** | |||
* id_back: 身份证背页 | |||
* id_front: 身份证前页 | |||
* vehicle_license_front: 行驶证前页 | |||
* vehicle_license_back: 行驶证背页 | |||
* bank_card:银行卡 | |||
* business_license:营业执照 | |||
*/ | |||
@Column(name = "OCR_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private OcrType ocrType;// 类型 | |||
@Column(name = "CODE") | |||
private String code; | |||
@Column(name = "OCR_SERVICE_TYPE") | |||
private Integer ocrServiceType=1;// 1-百度 2-太极 | |||
@Column(name = "RESULT_ID") | |||
private String resultId; | |||
} |
@@ -0,0 +1,48 @@ | |||
package cn.com.taiji.core.entity.dict; | |||
/** | |||
* OCR类型 | |||
*/ | |||
public enum OcrType { | |||
id_front("身份证-人像面", 1), | |||
id_back("身份证-国徽面", 2), | |||
vehicle_license_front("行驶证-主页", 3), | |||
vehicle_license_back("行驶证-副页", 4), | |||
business_license("营业执照", 5), | |||
; | |||
private String value; | |||
private int code; | |||
OcrType(String value, Integer code) { | |||
this.value = value; | |||
this.code = code; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public void setValue(String value) { | |||
this.value = value; | |||
} | |||
public static OcrType findByCode(int code) { | |||
for (OcrType type : OcrType.values()) { | |||
if (type.code == code) { | |||
return type; | |||
} | |||
} | |||
return null; | |||
} | |||
} |
@@ -8,7 +8,7 @@ import lombok.Getter; | |||
public enum SourceType { | |||
WECHAT( "九州ETC小程序", "69af303ba2eb4608a099163f0d2a5dbd"), | |||
SERVICE_HALL("线上营业厅-APP", "3e4b3a53cf0f4172b23dccd95d3e99a0"), | |||
SERVICE_HALL("APP", "3e4b3a53cf0f4172b23dccd95d3e99a0"), | |||
WEB("后台PC端", "713b5ffba6b04fbd8480d46f625cef51"), | |||
H5("H5页面", "431bfdc8b9c645e0b293b85d6ce1948n"), | |||
ALI("支付宝小程序", "601052a249c04155831710b577cb796d"), |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.comm; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.comm.OcrResult; | |||
public interface OcrResultRepo extends AbstractJpaRepo<OcrResult, String>{ | |||
} |