@@ -152,7 +152,7 @@ public class QtkCardInfo extends AbstractStringPropertyUUIDEntity { | |||
@NotNull | |||
@Column(name = "DEVICE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ProductDeviceType deviceType;//设备类型 | |||
private SecretKeyType deviceType;//设备类型 | |||
@NotNull | |||
@Column(name = "CARD_TYPE_NEW") | |||
@Enumerated(EnumType.STRING) |
@@ -5,7 +5,7 @@ import cn.com.taiji.core.entity.AbstractStringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.ObuStatus; | |||
import cn.com.taiji.core.entity.dict.basic.ObuType; | |||
import cn.com.taiji.core.entity.dict.basic.ProductDeviceType; | |||
import cn.com.taiji.core.entity.dict.basic.SecretKeyType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -132,7 +132,7 @@ public class QtkObuInfo extends AbstractStringPropertyUUIDEntity { | |||
@NotNull | |||
@Column(name = "DEVICE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ProductDeviceType deviceType;//设备类型 | |||
private SecretKeyType deviceType;//设备类型 | |||
@Size(max = 20) | |||
@Column(name = "CARD_ID") | |||
private String cardId;//ETC卡编号 |
@@ -3,14 +3,14 @@ package cn.com.taiji.core.entity.dict.basic; | |||
/** | |||
* @desc : 设备秘钥类型 | |||
*/ | |||
public enum ProductDeviceType { | |||
public enum SecretKeyType { | |||
TYMY9901("9901通用密钥设备"){}, | |||
FSMY5201("分省密钥5201设备"){}, | |||
XUANZHUANG("选装"){}; | |||
private String name; | |||
ProductDeviceType(String name) { | |||
SecretKeyType(String name) { | |||
this.name = name; | |||
} | |||
@@ -0,0 +1,38 @@ | |||
package cn.com.taiji.core.entity.dict.invw; | |||
/** | |||
* @desc : 库存系统公用申请状态 | |||
*/ | |||
public enum InvApplyStatus { | |||
NEW("新申请",1){}, | |||
COMFIRE("已确认",2){}, | |||
REJECT("已驳回",3){}, | |||
; | |||
private String value; | |||
private int code; | |||
private InvApplyStatus(String value, int code){ | |||
this.value=value; | |||
this.code=code; | |||
} | |||
public static InvApplyStatus fromCode(Integer code){ | |||
for(InvApplyStatus type: InvApplyStatus.values()){ | |||
if(type.getCode()==code){ | |||
return type; | |||
} | |||
} | |||
return null; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
package cn.com.taiji.core.entity.dict.invw; | |||
/** | |||
* @desc : 库存系统公用申请状态 | |||
*/ | |||
public enum InvDeviceStatus { | |||
NEW("在库",1){}, | |||
USED("已使用",2){}, | |||
BROKEN("损坏",3){}, | |||
DELETED("移除",3){}, | |||
; | |||
private String value; | |||
private int code; | |||
private InvDeviceStatus(String value, int code){ | |||
this.value=value; | |||
this.code=code; | |||
} | |||
public static InvDeviceStatus fromCode(Integer code){ | |||
for(InvDeviceStatus type: InvDeviceStatus.values()){ | |||
if(type.getCode()==code){ | |||
return type; | |||
} | |||
} | |||
return null; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
} |
@@ -0,0 +1,37 @@ | |||
package cn.com.taiji.core.entity.dict.invw; | |||
/** | |||
* @desc : 库存类型 | |||
*/ | |||
public enum InventoryType { | |||
CARD("卡",1){}, | |||
OBU("签",2){}, | |||
; | |||
private String value; | |||
private int code; | |||
private InventoryType(String value, int code){ | |||
this.value=value; | |||
this.code=code; | |||
} | |||
public static InventoryType fromCode(Integer code){ | |||
for(InventoryType type: InventoryType.values()){ | |||
if(type.getCode()==code){ | |||
return type; | |||
} | |||
} | |||
return null; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
package cn.com.taiji.core.entity.dict.issue; | |||
/** | |||
* @desc : 订单类型 | |||
*/ | |||
public enum OrderType { | |||
ISSUE("发行",1){}, | |||
AFTERSALE("售后",2){}, | |||
; | |||
private String value; | |||
private int code; | |||
private OrderType(String value, int code){ | |||
this.value=value; | |||
this.code=code; | |||
} | |||
public static OrderType fromCode(Integer code){ | |||
for(OrderType type: OrderType.values()){ | |||
if(type.getCode()==code){ | |||
return type; | |||
} | |||
} | |||
return null; | |||
} | |||
public String getValue() { | |||
return value; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
} |
@@ -0,0 +1,86 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.invw.InvDeviceStatus; | |||
import cn.com.taiji.core.entity.dict.issue.OrderType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 库存卡信息 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_CARD_DETAILS") | |||
public class InvwCardDetails extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "BATCH_ID") | |||
private String batchId;//入库批次编号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "CARD_ID") | |||
private String cardId;//ETC卡设备编号 | |||
@NotNull | |||
@Column(name = "CARD_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private CardType cardType;//ETC卡类型-储值-记账-预存卡等 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//入库时间 | |||
@NotNull | |||
@Column(name = "STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private InvDeviceStatus status;//是否已使用0-手动移除 1-在库 2-已使用 3-报损 | |||
@Column(name = "USE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private OrderType useType;//使用场景1-发行 2-售后 | |||
@Size(max = 32) | |||
@Column(name = "ORDER_NO") | |||
private String orderNo;//订单号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "STORE_CODE") | |||
private String storeCode;//仓库编号 | |||
@NotBlank | |||
@Size(max = 11) | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId;//所属渠道编号 | |||
@Size(max = 19) | |||
@Column(name = "CHANNEL_ID") | |||
private String channelId;//所属网点编号 | |||
@Size(max = 11) | |||
@Column(name = "USE_AGENCY_ID") | |||
private String useAgencyId;//使用渠道编号 | |||
@Size(max = 19) | |||
@Column(name = "USE_CHANNEL_ID") | |||
private String useChannelId;//使用网点编号 | |||
@Column(name = "OUT_TIME") | |||
private LocalDateTime outTime;//出库时间 | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//版本 | |||
@Size(max = 32) | |||
@Column(name = "OPEN_ID") | |||
private String openId;//STATUS为手动移除时记录操作人员 | |||
@Size(max = 255) | |||
@Column(name = "REASON") | |||
private String reason;//报损描述 | |||
} |
@@ -0,0 +1,91 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.ObuType; | |||
import cn.com.taiji.core.entity.dict.invw.InvApplyStatus; | |||
import cn.com.taiji.core.entity.dict.invw.InventoryType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 入库申请表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_ENTER_APPLY") | |||
public class InvwEnterApply extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "STORE_CODE") | |||
private String storeCode;//仓库 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotNull | |||
@Column(name = "INVENTORY_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private InventoryType inventoryType;//库存类型InventoryType | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//设备版本DeviceVersion | |||
@NotNull | |||
@Column(name = "APPLY_COUNT") | |||
private Integer applyCount;//入库数量 | |||
@Column(name = "UNIT_PRICE") | |||
private Long unitPrice;//单价(单位:分) | |||
@Column(name = "TOTAL_PRICE") | |||
private Long totalPrice;//总价(单位:分) | |||
@NotNull | |||
@Column(name = "APPLY_TIME") | |||
private LocalDateTime applyTime;//申请时间 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//插入时间 | |||
@Column(name = "SURE_TIME") | |||
private LocalDateTime sureTime;//确认时间 | |||
@NotNull | |||
@Column(name = "APPLY_STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private InvApplyStatus applyStatus;//申请状态,新申请、确认入库、入库失败(取消入库) | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId;//渠道编号 | |||
@Column(name = "CARD_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private CardType cardType;//卡类型CardType,卡或者单片式OBU时有值 | |||
@Column(name = "OBU_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ObuType obuType;//标签类型ObuType | |||
@Size(max = 255) | |||
@Column(name = "REASON") | |||
private String reason;//失败原因 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "OPEN_ID") | |||
private String openId;//申请人 | |||
@Size(max = 32) | |||
@Column(name = "SURER_ID") | |||
private String surerId;//确认人 | |||
@Size(max = 120) | |||
@Column(name = "FILE_PATH") | |||
private String filePath;//附件地址 | |||
} |
@@ -0,0 +1,48 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.Column; | |||
import javax.persistence.Entity; | |||
import javax.persistence.Table; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 入库申请明细表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_ENTER_APPLY_DETAILS") | |||
public class InvwEnterApplyDetails extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "START_ID") | |||
private String startId;//开始编号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "END_ID") | |||
private String endId;//结束编号 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//入库时间 | |||
@Size(max = 20) | |||
@Column(name = "START_CARD_ID") | |||
private String startCardId;//单片式OBU时有值 | |||
@Size(max = 20) | |||
@Column(name = "END_CARD_ID") | |||
private String endCardId;//单片式OBU时有值 | |||
} |
@@ -0,0 +1,82 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.ObuType; | |||
import cn.com.taiji.core.entity.dict.invw.InvDeviceStatus; | |||
import cn.com.taiji.core.entity.dict.issue.OrderType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 库存卡信息 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_OBU_DETAILS") | |||
public class InvwObuDetails extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "BATCH_ID") | |||
private String batchId;//入库批次编号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotBlank | |||
@Size(max = 16) | |||
@Column(name = "OBU_ID") | |||
private String obuId;//OBU编号 | |||
@Column(name = "OBU_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ObuType obuType;//OBU类型1-单片式 2-双片式 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//入库时间 | |||
@NotNull | |||
@Column(name = "STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private InvDeviceStatus status;//是否已使用1-在库 2-已使用 3-报损 | |||
@Column(name = "USE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private OrderType useType;//使用场景1-发行 2-售后 | |||
@Size(max = 32) | |||
@Column(name = "ORDER_NO") | |||
private String orderNo;//订单号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "STORE_CODE") | |||
private String storeCode;//仓库编号 | |||
@NotBlank | |||
@Size(max = 11) | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId;//所属渠道编号 | |||
@Size(max = 19) | |||
@Column(name = "CHANNEL_ID") | |||
private String channelId;//所属网点编号 | |||
@Size(max = 11) | |||
@Column(name = "USE_AGENCY_ID") | |||
private String useAgencyId;//使用渠道编号 | |||
@Size(max = 19) | |||
@Column(name = "USE_CHANNEL_ID") | |||
private String useChannelId;//使用网点编号 | |||
@Column(name = "OUT_TIME") | |||
private LocalDateTime outTime;//出库时间 | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//版本 | |||
@Size(max = 20) | |||
@Column(name = "CARD_ID") | |||
private String cardId;//ETC卡编号,单片式设备有值 | |||
} |
@@ -0,0 +1,95 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.ObuType; | |||
import cn.com.taiji.core.entity.dict.invw.InvApplyStatus; | |||
import cn.com.taiji.core.entity.dict.invw.InventoryType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 设备回退申请表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_REBACK_APPLY") | |||
public class InvwRebackApply extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "REBACK_STORE_CODE") | |||
private String rebackStoreCode;//回退仓库 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "RECEIVE_STORE_CODE") | |||
private String receiveStoreCode;//接收仓库 | |||
@NotNull | |||
@Column(name = "INVENTORY_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private InventoryType inventoryType;//库存类型InventoryType | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//设备版本DeviceVersion | |||
@NotNull | |||
@Column(name = "REBACK_COUNT") | |||
private Integer rebackCount;//回退数量 | |||
@NotNull | |||
@Column(name = "APPLY_TIME") | |||
private LocalDateTime applyTime;//申请时间 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "OPEN_ID") | |||
private String openId;//申请人 | |||
@Column(name = "RECEIVE_TIME") | |||
private LocalDateTime receiveTime;//接收时间 | |||
@Size(max = 32) | |||
@Column(name = "RECEIVER_ID") | |||
private String receiverId;//接收人 | |||
@NotNull | |||
@Column(name = "APPLY_STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private InvApplyStatus applyStatus;//申请状态,新申请、确认回收、回收失败(取消入库) | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "REBACK__AGENCY_ID") | |||
private String rebackagencyId;//发货渠道编号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "RECEIVE_AGENCY_ID") | |||
private String receiveAgencyId;//接收渠道编号 | |||
@Column(name = "CARD_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private CardType cardType;//卡类型CardType,卡或者单片式OBU时有值 | |||
@Column(name = "OBU_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ObuType obuType;//标签类型ObuType | |||
@Size(max = 255) | |||
@Column(name = "REASON") | |||
private String reason;//失败原因 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//插入时间 | |||
@Size(max = 120) | |||
@Column(name = "FILE_PATH") | |||
private String filePath;//附件地址 | |||
} |
@@ -0,0 +1,48 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.Column; | |||
import javax.persistence.Entity; | |||
import javax.persistence.Table; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 回收申请明细表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_REBACK_APPLY_DETAILS") | |||
public class InvwRebackApplyDetails extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "START_ID") | |||
private String startId;//开始编号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "END_ID") | |||
private String endId;//结束编号 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//入库时间 | |||
@Size(max = 20) | |||
@Column(name = "START_CARD_ID") | |||
private String startCardId;//单片式OBU时有值 | |||
@Size(max = 20) | |||
@Column(name = "END_CARD_ID") | |||
private String endCardId;//单片式OBU时有值 | |||
} |
@@ -0,0 +1,65 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.invw.InventoryType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 盘存明细表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_STOCKTAKING_RESULT") | |||
public class InvwStocktakingResult extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "STORE_CODE") | |||
private String storeCode;//仓库编号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId;//渠道编号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotNull | |||
@Column(name = "INVENTORY_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private InventoryType inventoryType;//库存类型InventoryType | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//设备版本DeviceVersion | |||
@NotNull | |||
@Column(name = "INIT_COUNT") | |||
private Integer initCount;//期初数量 | |||
@NotNull | |||
@Column(name = "ENTER_COUNT") | |||
private Integer enterCount;//入库数量 | |||
@NotNull | |||
@Column(name = "TRANSFER_COUNT") | |||
private Integer transferCount;//出库数量 | |||
@NotNull | |||
@Column(name = "BALANCE_COUNT") | |||
private Integer balanceCount;//结存数量 | |||
@NotNull | |||
@Column(name = "CREATE_TIME") | |||
private LocalDateTime createTime;//数据插入时间 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "MAIN_ID") | |||
private String mainId;//盘存表ID | |||
} |
@@ -0,0 +1,44 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import java.math.BigDecimal; | |||
import java.time.LocalDate; | |||
import java.time.LocalDateTime; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.Digits; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
/** | |||
* 调拨明细信息表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_TRANSFER_DETAILS") | |||
public class InvwTransferDetails extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "DEVICE_ID") | |||
private String deviceId;//设备编号,卡时填卡号,OBU时填签号 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//入库时间 | |||
} |
@@ -0,0 +1,99 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.ObuType; | |||
import cn.com.taiji.core.entity.dict.invw.InvApplyStatus; | |||
import cn.com.taiji.core.entity.dict.invw.InventoryType; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.*; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 调拨信息表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_TRANSFER_INFO") | |||
public class InvwTransferInfo extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "APPLY_NO") | |||
private String applyNo;//申请单号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "SEND_STORE_CODE") | |||
private String sendStoreCode;//发货仓库 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "RECEIVE_STORE_CODE") | |||
private String receiveStoreCode;//接收仓库 | |||
@NotNull | |||
@Column(name = "INVENTORY_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private InventoryType inventoryType;//库存类型InventoryType | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "BRAND") | |||
private String brand;//品牌,字典新建DEVICE_BRAND | |||
@NotNull | |||
@Column(name = "VERSION") | |||
@Enumerated(EnumType.STRING) | |||
private DeviceVersion version;//设备版本DeviceVersion | |||
@NotNull | |||
@Column(name = "APPLY_COUNT") | |||
private Integer applyCount;//入库数量 | |||
@Column(name = "UNIT_PRICE") | |||
private Integer unitPrice;//单价(单位:分) | |||
@Column(name = "TOTAL_PRICE") | |||
private Integer totalPrice;//总价(单位:分) | |||
@NotNull | |||
@Column(name = "APPLY_TIME") | |||
private LocalDateTime applyTime;//申请时间 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "OPEN_ID") | |||
private String openId;//申请人 | |||
@Column(name = "RECEIVE_TIME") | |||
private LocalDateTime receiveTime;//接收时间 | |||
@Size(max = 32) | |||
@Column(name = "RECEIVER_ID") | |||
private String receiverId;//接收人 | |||
@NotNull | |||
@Column(name = "APPLY_STATUS") | |||
@Enumerated(EnumType.STRING) | |||
private InvApplyStatus applyStatus;//申请状态,新申请、确认入库、入库失败(取消入库) | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "SEND_AGENCY_ID") | |||
private String sendAgencyId;//发货渠道编号 | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "RECEIVE_AGENCY_ID") | |||
private String receiveAgencyId;//接收渠道编号 | |||
@Column(name = "CARD_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private CardType cardType;//卡类型CardType,卡或者单片式OBU时有值 | |||
@Column(name = "OBU_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private ObuType obuType;//标签类型ObuType | |||
@Size(max = 255) | |||
@Column(name = "REASON") | |||
private String reason;//失败原因 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//插入时间 | |||
@Size(max = 120) | |||
@Column(name = "FILE_PATH") | |||
private String filePath;//附件地址 | |||
} |
@@ -0,0 +1,58 @@ | |||
package cn.com.taiji.core.entity.invw; | |||
import cn.com.taiji.common.entity.StringPropertyUUIDEntity; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.persistence.Column; | |||
import javax.persistence.Entity; | |||
import javax.persistence.Table; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Size; | |||
import java.time.LocalDateTime; | |||
/** | |||
* 仓库信息表 | |||
* | |||
*/ | |||
@Getter | |||
@Setter | |||
@Entity | |||
@Table(name = "INVW_WAREHOUSE") | |||
public class InvwWarehouse extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 32) | |||
@Column(name = "CODE") | |||
private String code;//仓库编号 | |||
@Size(max = 32) | |||
@Column(name = "PARENT_ID") | |||
private String parentId;//上级仓库ID | |||
@NotBlank | |||
@Size(max = 256) | |||
@Column(name = "NAME") | |||
private String name;//仓库名称 | |||
@NotNull | |||
@Column(name = "LEVEL") | |||
private Integer level;//仓库层级1-3 | |||
@NotNull | |||
@Column(name = "STATUS") | |||
private Integer status;//库存状态0-删除 1-正常 | |||
@Column(name = "UPDATE_TIME") | |||
private LocalDateTime updateTime;//更新时间 | |||
@NotNull | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime;//创建时间 | |||
@NotBlank | |||
@Size(max = 11) | |||
@Column(name = "AGENCY_ID") | |||
private String agencyId;//渠道编号 | |||
@Size(max = 19) | |||
@Column(name = "CHANNEL_ID") | |||
private String channelId;//网点编号,三级有值 | |||
@Column(name = "IS_CHECK") | |||
private Integer isCheck;//库存校验,二级以上有值,0-否,1-是 | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.core.entity.issue; | |||
import cn.com.taiji.core.entity.AbstractStringPropertyUUIDEntity; | |||
import cn.com.taiji.core.entity.dict.basic.ProductDeviceType; | |||
import cn.com.taiji.core.entity.dict.basic.SecretKeyType; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.entity.dict.basic.UserType; | |||
import cn.com.taiji.core.entity.dict.issue.IssueOrderStatus; | |||
@@ -165,7 +165,7 @@ public class IssueOrderinfo extends AbstractStringPropertyUUIDEntity { | |||
private Integer invoiceType;//发票类型 | |||
@Enumerated(EnumType.STRING) | |||
@Column(name = "DEVICE_TYPE", nullable = false) | |||
private ProductDeviceType deviceType;//设备类型 | |||
private SecretKeyType deviceType;//设备类型 | |||
@Column(name = "INSERT_TIME") | |||
private LocalDateTime insertTime; | |||
@Column(name = "UPDATE_TIME") |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwCardDetails; | |||
public interface InvwCardDetailsRepo extends AbstractJpaRepo<InvwCardDetails, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwEnterApplyDetails; | |||
public interface InvwEnterApplyDetailsRepo extends AbstractJpaRepo<InvwEnterApplyDetails, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwEnterApply; | |||
public interface InvwEnterApplyRepo extends AbstractJpaRepo<InvwEnterApply, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwObuDetails; | |||
public interface InvwObuDetailsRepo extends AbstractJpaRepo<InvwObuDetails, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwRebackApplyDetails; | |||
public interface InvwRebackApplyDetailsRepo extends AbstractJpaRepo<InvwRebackApplyDetails, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwRebackApply; | |||
public interface InvwRebackApplyRepo extends AbstractJpaRepo<InvwRebackApply, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwStocktakingResult; | |||
public interface InvwStocktakingResultRepo extends AbstractJpaRepo<InvwStocktakingResult, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwTransferDetails; | |||
public interface InvwTransferDetailsRepo extends AbstractJpaRepo<InvwTransferDetails, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwTransferInfo; | |||
public interface InvwTransferInfoRepo extends AbstractJpaRepo<InvwTransferInfo, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.invw.InvwWarehouse; | |||
public interface InvwWarehouseRepo extends AbstractJpaRepo<InvwWarehouse, String>{ | |||
} |
@@ -0,0 +1,8 @@ | |||
package cn.com.taiji.core.repo.jpa.invw; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
public interface IssueOrderAddressRepo extends AbstractJpaRepo<IssueOrderAddress, String>{ | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwCardDetails; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwCardDetailsPageRequest extends JpaDateTimePageableDataRequest<InvwCardDetails>{ | |||
public InvwCardDetailsPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwCardDetails where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwEnterApply; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwEnterApplyPageRequest extends JpaDateTimePageableDataRequest<InvwEnterApply>{ | |||
public InvwEnterApplyPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwEnterApply where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwObuDetails; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwObuDetailsPageRequest extends JpaDateTimePageableDataRequest<InvwObuDetails>{ | |||
public InvwObuDetailsPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwObuDetails where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwRebackApply; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwRebackApplyPageRequest extends JpaDateTimePageableDataRequest<InvwRebackApply>{ | |||
public InvwRebackApplyPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwRebackApply where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwStocktakingResult; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwStocktakingResultPageRequest extends JpaDateTimePageableDataRequest<InvwStocktakingResult>{ | |||
public InvwStocktakingResultPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwStocktakingResult where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwTransferInfo; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwTransferInfoPageRequest extends JpaDateTimePageableDataRequest<InvwTransferInfo>{ | |||
public InvwTransferInfoPageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwTransferInfo where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package cn.com.taiji.core.repo.request.invw; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDateTimePageableDataRequest; | |||
import cn.com.taiji.core.entity.invw.InvwWarehouse; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class InvwWarehousePageRequest extends JpaDateTimePageableDataRequest<InvwWarehouse>{ | |||
public InvwWarehousePageRequest() { | |||
this.orderBy="id"; | |||
this.desc=true; | |||
} | |||
@Override | |||
public HqlBuilder toSelectHql(){ | |||
HqlBuilder hql = new HqlBuilder("from InvwWarehouse where 1=1 "); | |||
return hql; | |||
} | |||
} |
@@ -3,6 +3,8 @@ package common; | |||
import cn.com.taiji.common.generate.*; | |||
import cn.com.taiji.common.manager.AbstractManager; | |||
import cn.com.taiji.core.entity.dict.basic.*; | |||
import cn.com.taiji.core.entity.dict.invw.InvApplyStatus; | |||
import cn.com.taiji.core.entity.dict.invw.InventoryType; | |||
import org.junit.jupiter.api.Test; | |||
import org.junit.runner.RunWith; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -47,7 +49,7 @@ public class TestCodeManager extends AbstractManager { | |||
GlobalConfigBuilder configBuilder = GlobalConfigBuilder.create(); | |||
configBuilder.setAppName("core"); | |||
configBuilder.setModule("issue"); | |||
configBuilder.setTableName("ISSUE_ORDER_ADDRESS"); | |||
configBuilder.setTableName("INVW_TRANSFER_DETAILS"); | |||
// 生成分页查询request | |||
// configBuilder.setQueryField(List.of("intVal", "name", "mobile", "insertTime1", "insertTime2")); | |||
// configBuilder.setOrderBy("orderIndex"); | |||
@@ -56,19 +58,19 @@ public class TestCodeManager extends AbstractManager { | |||
/* 给字段映射枚举类型、实体(manyToOne),如果是字符串,自动生成枚举 */ | |||
HashMap<String, Object> typeNameMap = new HashMap<>(); | |||
typeNameMap.put("TYPE", CardBlackType.class); | |||
typeNameMap.put("SOURCE_IN", SourceType.class); | |||
typeNameMap.put("SOURCE_OUT", SourceType.class); | |||
typeNameMap.put("CARD_VERSION", DeviceVersion.class); | |||
typeNameMap.put("OBU_VERSION", DeviceVersion.class); | |||
typeNameMap.put("CARD_TYPE_NEW", CardType.class); | |||
typeNameMap.put("INVENTORY_TYPE", InventoryType.class); | |||
typeNameMap.put("VERSION", DeviceVersion.class); | |||
typeNameMap.put("CARD_TYPE", CardType.class); | |||
typeNameMap.put("OBU_TYPE", ObuType.class); | |||
typeNameMap.put("APPLY_STATUS", InvApplyStatus.class); | |||
/*typeNameMap.put("CARD_TYPE_NEW", CardType.class); | |||
typeNameMap.put("CARD_STATUS", CardStatus.class); | |||
typeNameMap.put("OBU_STATUS", ObuStatus.class); | |||
typeNameMap.put("USER_TYPE", UserType.class); | |||
typeNameMap.put("USE_USER_TYPE", UseUserType.class); | |||
typeNameMap.put("CUSTOMER_IDTYPE", IdType.class); | |||
typeNameMap.put("AGENT_IDTYPE", IdType.class); | |||
typeNameMap.put("DEVICE_TYPE", ProductDeviceType.class); | |||
typeNameMap.put("DEVICE_TYPE", ProductDeviceType.class);*/ | |||
/*typeNameMap.put("ORDER_STATUS", OrderStatusEnum.class); | |||
typeNameMap.put("obu_status", ObuStatus.class); | |||
typeNameMap.put("CARD_STATUS", CardStatus.class); |