|
@@ -0,0 +1,254 @@
|
|
|
+package com.pavis.ctr.audit.project.domain;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
+import com.pavis.ctr.audit.common.constant.Constants;
|
|
|
+import com.pavis.ctr.audit.common.utils.DateUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author semi
|
|
|
+ * @create 2023-05-05 15:20
|
|
|
+ */
|
|
|
+public class OcrTrip {
|
|
|
+
|
|
|
+ @TableId
|
|
|
+ private String uploadId;
|
|
|
+
|
|
|
+ private String shopName;
|
|
|
+
|
|
|
+ private String o2oShopName;
|
|
|
+
|
|
|
+ private String branchShopName;
|
|
|
+
|
|
|
+ private String purchaseDate;
|
|
|
+
|
|
|
+ private String totalSpend;
|
|
|
+
|
|
|
+ private String basket;
|
|
|
+
|
|
|
+ private String tripNumber;
|
|
|
+
|
|
|
+ private String address;
|
|
|
+
|
|
|
+ private String phone;
|
|
|
+
|
|
|
+ private String pay;
|
|
|
+
|
|
|
+ private String specPayValue;
|
|
|
+
|
|
|
+ private String offer;
|
|
|
+
|
|
|
+ private String member;
|
|
|
+
|
|
|
+ private String globalProb;
|
|
|
+
|
|
|
+ private String dateDir;
|
|
|
+
|
|
|
+ private String fileName;
|
|
|
+
|
|
|
+ private String sTripPhotoId;
|
|
|
+
|
|
|
+ private String photoNo;
|
|
|
+
|
|
|
+ private String userId;
|
|
|
+
|
|
|
+ @TableField(exist = false)
|
|
|
+ private String errReason;
|
|
|
+
|
|
|
+ public String getUploadId() {
|
|
|
+ return uploadId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUploadId(String uploadId) {
|
|
|
+ this.uploadId = uploadId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getShopName() {
|
|
|
+ return shopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setShopName(String shopName) {
|
|
|
+ this.shopName = shopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getO2oShopName() {
|
|
|
+ return o2oShopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setO2oShopName(String o2oShopName) {
|
|
|
+ this.o2oShopName = o2oShopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getBranchShopName() {
|
|
|
+ return branchShopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBranchShopName(String branchShopName) {
|
|
|
+ this.branchShopName = branchShopName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPurchaseDate() {
|
|
|
+ return purchaseDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPurchaseDate(String purchaseDate) {
|
|
|
+ this.purchaseDate = purchaseDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTotalSpend() {
|
|
|
+ return totalSpend;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTotalSpend(String totalSpend) {
|
|
|
+ this.totalSpend = totalSpend;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getBasket() {
|
|
|
+ return basket;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBasket(String basket) {
|
|
|
+ this.basket = basket;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTripNumber() {
|
|
|
+ return tripNumber;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTripNumber(String tripNumber) {
|
|
|
+ this.tripNumber = tripNumber;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getAddress() {
|
|
|
+ return address;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAddress(String address) {
|
|
|
+ this.address = address;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPhone() {
|
|
|
+ return phone;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPhone(String phone) {
|
|
|
+ this.phone = phone;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPay() {
|
|
|
+ return pay;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPay(String pay) {
|
|
|
+ this.pay = pay;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getSpecPayValue() {
|
|
|
+ return specPayValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSpecPayValue(String specPayValue) {
|
|
|
+ this.specPayValue = specPayValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getOffer() {
|
|
|
+ return offer;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOffer(String offer) {
|
|
|
+ this.offer = offer;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getMember() {
|
|
|
+ return member;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMember(String member) {
|
|
|
+ this.member = member;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getGlobalProb() {
|
|
|
+ return globalProb;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGlobalProb(String globalProb) {
|
|
|
+ this.globalProb = globalProb;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDateDir() {
|
|
|
+ return dateDir;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDateDir(String dateDir) {
|
|
|
+ this.dateDir = dateDir;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getFileName() {
|
|
|
+ return fileName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setFileName(String fileName) {
|
|
|
+ this.fileName = fileName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getsTripPhotoId() {
|
|
|
+ return sTripPhotoId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setsTripPhotoId(String sTripPhotoId) {
|
|
|
+ this.sTripPhotoId = sTripPhotoId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPhotoNo() {
|
|
|
+ return photoNo;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPhotoNo(String photoNo) {
|
|
|
+ this.photoNo = photoNo;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getUserId() {
|
|
|
+ return userId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUserId(String userId) {
|
|
|
+ this.userId = userId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setErrReason(String errReason) {
|
|
|
+ this.errReason = errReason;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getErrReason() {
|
|
|
+ // 缺少商品明细,优先级1
|
|
|
+ if (StringUtils.isNotBlank(this.errReason)) {
|
|
|
+ return this.errReason;
|
|
|
+ }
|
|
|
+ // 多渠道上传,优先级2
|
|
|
+ if (StringUtils.equals(Constants.MULTI_UPLOAD_MARK, this.globalProb)) {
|
|
|
+ return Constants.MULTI_UPLOAD;
|
|
|
+ }
|
|
|
+ // 购买日期超过28天
|
|
|
+ if (StringUtils.isNotBlank(this.purchaseDate)) {
|
|
|
+ Date now = new Date();
|
|
|
+ Date purDate = DateUtils.parseDate(this.purchaseDate);
|
|
|
+ if (DateUtils.differentDaysByMillisecond(now, purDate) > Constants.INVALID_DAYS) {
|
|
|
+ return Constants.INVALID_PURCHASE_DATE;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(this.purchaseDate) && StringUtils.isBlank(this.totalSpend)) {
|
|
|
+ // 购买日期和总金额都为空
|
|
|
+ return Constants.LACK_ALL;
|
|
|
+ } else if (StringUtils.isBlank(this.totalSpend)) {
|
|
|
+ // 总金额为空,优先级3
|
|
|
+ return Constants.LACK_TOTAL_SPEND;
|
|
|
+ } else if (StringUtils.isBlank(this.purchaseDate)) {
|
|
|
+ // 购买日期为空,优先级4
|
|
|
+ return Constants.LACK_PURCHASE_DATE;
|
|
|
+ }
|
|
|
+ return this.errReason;
|
|
|
+ }
|
|
|
+}
|