Commit b0a60d60 authored by Smile's avatar Smile

集运基础功能代码及sql代码

parent bda47b28
drop table if exists ecw_cons;
create table ecw_cons
(
id bigint not null,
cons_num varchar(64) comment '包裹编号',
customer_id bigint comment '发件客户ID',
customer_number varchar(50) comment '发件客户编号',
transport_id int comment '运输方式,来自字典的值',
order_id bigint comment '订单ID,关联订单表',
platform_id bigint comment '平台ID,关联平台表数据,为后面系统对接预留字段',
platform_order_sn varchar(50) comment '平台订单号',
need_inspect int comment '是否需要验货,0否,1是',
inspect_status int comment '验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货',
status int comment '包裹状态,来自字典表,cons_status',
express_id bigint comment '快递公司ID,对应快递公司表',
express_no varchar(30) comment '快递单号',
ware_id bigint comment '仓库ID,关联ecw_warehouse表',
area_id bigint comment '库域ID,关联ecw_warehouse_area表',
position_id bigint comment '仓位ID,关联ecw_warehouse_area_position',
warehouse_line_id bigint comment '线路ID',
worth decimal(15,2) comment '货值',
worth_currency int default 3 comment '货值单位,默认为3,人民币',
wat_etime datetime comment '预计到仓时间',
wat_time datetime,
signed bit not null default '0' comment '是否被签收,0未签收,1已签收',
signer bigint comment '签收人',
signed_time datetime comment '签收时间',
signed_remarks varchar(255) comment '签收备注',
sum_quantity int comment '数量',
op_source int(3) default 1 comment '区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端',
consignee_city_id bigint comment '目的城市ID,关联ecw_region表ID',
consignee_country_id bigint comment '目的国ID,关联ecw_region表ID',
consignee_warehouse_id bigint comment '目的仓ID,关联ecw_warehouse表ID',
consignee_address varchar(255),
remarks varchar(255) comment '备注',
is_pickout int default 0 comment '是否已拣出,0否,1是',
deleted bit default 0,
creator varchar(32),
update_time datetime,
create_time datetime,
updater varchar(32),
primary key (id)
);
alter table ecw_cons comment '集运包裹主表';
drop table if exists ecw_cons_item;
create table ecw_cons_item
(
id bigint not null,
cons_id bigint not null,
prod_id bigint comment '商品ID',
brand bigint comment '品牌',
brand_type tinyint comment '来自字典表,brand_type 0 无牌 1 有牌 2 中性',
material varchar(255) comment '材质',
quantity decimal(15,2) comment '数量',
inspection_num int comment '验货件数',
inspection_unit char(10) comment '验货商品单位',
inspection_quantity decimal(15,2) comment '验货数量',
inspection_prod_attr_ids varchar(50) comment '验货商品特性(可选多个特性ID)',
inspection_box_gauge char(100) comment '验货商品箱规',
inspection_volume decimal(15,2) comment '验货体积',
inspection_weight decimal(15,2) comment '验货重量',
inspection_worth decimal(15,2) comment '验货货值',
inspection_worth_currency int comment '验货商品货值单位,关联货币表',
inspection_usage_ids varchar(32) comment '验货商品用途',
inspection_json json comment '验货明细',
warehouse_id bigint comment '仓库id',
area_id bigint comment '库域ID',
position_id bigint comment '库位ID',
deleted bit not null default '0',
creator varchar(32) not null,
create_time datetime not null,
updater varchar(32),
update_time datetime,
primary key (id)
);
alter table ecw_cons_item comment '集运包裹明细表';
...@@ -28,6 +28,10 @@ public class ConsDO extends BaseDO { ...@@ -28,6 +28,10 @@ public class ConsDO extends BaseDO {
* *
*/ */
private Long customerId; private Long customerId;
/**
* 包裹编号
*/
private String consNum;
/** /**
* 客户编号 * 客户编号
*/ */
...@@ -64,6 +68,10 @@ public class ConsDO extends BaseDO { ...@@ -64,6 +68,10 @@ public class ConsDO extends BaseDO {
* 快递单号 * 快递单号
*/ */
private String expressNo; private String expressNo;
/**
* 验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货
*/
private Integer inspectStatus;
/** /**
* 仓库ID * 仓库ID
*/ */
...@@ -140,6 +148,10 @@ public class ConsDO extends BaseDO { ...@@ -140,6 +148,10 @@ public class ConsDO extends BaseDO {
* *
*/ */
private String consigneeAddress; private String consigneeAddress;
/**
* 是否已拣出,0否,1是
*/
private Integer isPickout;
} }
...@@ -22,27 +22,39 @@ public interface ConsMapper extends AbstractMapper<ConsDO> { ...@@ -22,27 +22,39 @@ public interface ConsMapper extends AbstractMapper<ConsDO> {
if (object instanceof ConsQueryVO) { if (object instanceof ConsQueryVO) {
ConsQueryVO vo = (ConsQueryVO)object; ConsQueryVO vo = (ConsQueryVO)object;
return selectPage(page, new LambdaQuery<ConsDO>() return selectPage(page, new LambdaQuery<ConsDO>()
.eqIfPresent(ConsDO::getCustomerId, vo.getCustomerId()) .eqIfPresent(ConsDO::getCustomerId, vo.getCustomerId())
.eqIfPresent(ConsDO::getCustomerNumber, vo.getCustomerNumber()) .eqIfPresent(ConsDO::getConsNum, vo.getConsNum())
.eqIfPresent(ConsDO::getTransportId, vo.getTransportId()) .eqIfPresent(ConsDO::getCustomerNumber, vo.getCustomerNumber())
.eqIfPresent(ConsDO::getOrderId, vo.getOrderId()) .eqIfPresent(ConsDO::getTransportId, vo.getTransportId())
.eqIfPresent(ConsDO::getPlatformId, vo.getPlatformId()) .eqIfPresent(ConsDO::getOrderId, vo.getOrderId())
.eqIfPresent(ConsDO::getPlatformOrderSn, vo.getPlatformOrderSn()) .eqIfPresent(ConsDO::getPlatformId, vo.getPlatformId())
.eqIfPresent(ConsDO::getStatus, vo.getStatus()) .eqIfPresent(ConsDO::getPlatformOrderSn, vo.getPlatformOrderSn())
.eqIfPresent(ConsDO::getExpressId, vo.getExpressId()) .eqIfPresent(ConsDO::getNeedInspect, vo.getNeedInspect())
.eqIfPresent(ConsDO::getExpressNo, vo.getExpressNo()) .eqIfPresent(ConsDO::getStatus, vo.getStatus())
.eqIfPresent(ConsDO::getWareId, vo.getWareId()) .eqIfPresent(ConsDO::getExpressId, vo.getExpressId())
.eqIfPresent(ConsDO::getWorth, vo.getWorth()) .eqIfPresent(ConsDO::getExpressNo, vo.getExpressNo())
.eqIfPresent(ConsDO::getWorthCurrency, vo.getWorthCurrency()) .eqIfPresent(ConsDO::getInspectStatus, vo.getInspectStatus())
.betweenIfPresent(ConsDO::getWatEtime, vo.getBeginWatEtime(), vo.getEndWatEtime()) .eqIfPresent(ConsDO::getWareId, vo.getWareId())
.betweenIfPresent(ConsDO::getWatTime, vo.getBeginWatTime(), vo.getEndWatTime()) .eqIfPresent(ConsDO::getWorth, vo.getWorth())
.eqIfPresent(ConsDO::getSigned, vo.getSigned()) .eqIfPresent(ConsDO::getWorthCurrency, vo.getWorthCurrency())
.betweenIfPresent(ConsDO::getSignedTime, vo.getBeginSignedTime(), vo.getEndSignedTime()) .eqIfPresent(ConsDO::getAreaId, vo.getAreaId())
.eqIfPresent(ConsDO::getSignedRemarks, vo.getSignedRemarks()) .betweenIfPresent(ConsDO::getWatEtime, vo.getBeginWatEtime(), vo.getEndWatEtime())
.eqIfPresent(ConsDO::getSumQuantity, vo.getSumQuantity()) .eqIfPresent(ConsDO::getPositionId, vo.getPositionId())
.eqIfPresent(ConsDO::getOpSource, vo.getOpSource()) .betweenIfPresent(ConsDO::getWatTime, vo.getBeginWatTime(), vo.getEndWatTime())
.eqIfPresent(ConsDO::getRemarks, vo.getRemarks()) .eqIfPresent(ConsDO::getWarehouseLineId, vo.getWarehouseLineId())
.betweenIfPresent(ConsDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime()) .eqIfPresent(ConsDO::getSigned, vo.getSigned())
.betweenIfPresent(ConsDO::getSignedTime, vo.getBeginSignedTime(), vo.getEndSignedTime())
.eqIfPresent(ConsDO::getSignedRemarks, vo.getSignedRemarks())
.eqIfPresent(ConsDO::getSumQuantity, vo.getSumQuantity())
.eqIfPresent(ConsDO::getOpSource, vo.getOpSource())
.eqIfPresent(ConsDO::getSigner, vo.getSigner())
.eqIfPresent(ConsDO::getRemarks, vo.getRemarks())
.betweenIfPresent(ConsDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime())
.eqIfPresent(ConsDO::getConsigneeCityId, vo.getConsigneeCityId())
.eqIfPresent(ConsDO::getConsigneeCountryId, vo.getConsigneeCountryId())
.eqIfPresent(ConsDO::getConsigneeWarehouseId, vo.getConsigneeWarehouseId())
.eqIfPresent(ConsDO::getConsigneeAddress, vo.getConsigneeAddress())
.eqIfPresent(ConsDO::getIsPickout, vo.getIsPickout())
.orderByDesc(ConsDO::getId)); .orderByDesc(ConsDO::getId));
} }
...@@ -53,27 +65,39 @@ public interface ConsMapper extends AbstractMapper<ConsDO> { ...@@ -53,27 +65,39 @@ public interface ConsMapper extends AbstractMapper<ConsDO> {
if (object instanceof ConsQueryVO) { if (object instanceof ConsQueryVO) {
ConsQueryVO vo = (ConsQueryVO)object; ConsQueryVO vo = (ConsQueryVO)object;
return selectList(new LambdaQuery<ConsDO>() return selectList(new LambdaQuery<ConsDO>()
.eqIfPresent(ConsDO::getCustomerId, vo.getCustomerId()) .eqIfPresent(ConsDO::getCustomerId, vo.getCustomerId())
.eqIfPresent(ConsDO::getCustomerNumber, vo.getCustomerNumber()) .eqIfPresent(ConsDO::getConsNum, vo.getConsNum())
.eqIfPresent(ConsDO::getTransportId, vo.getTransportId()) .eqIfPresent(ConsDO::getCustomerNumber, vo.getCustomerNumber())
.eqIfPresent(ConsDO::getOrderId, vo.getOrderId()) .eqIfPresent(ConsDO::getTransportId, vo.getTransportId())
.eqIfPresent(ConsDO::getPlatformId, vo.getPlatformId()) .eqIfPresent(ConsDO::getOrderId, vo.getOrderId())
.eqIfPresent(ConsDO::getPlatformOrderSn, vo.getPlatformOrderSn()) .eqIfPresent(ConsDO::getPlatformId, vo.getPlatformId())
.eqIfPresent(ConsDO::getStatus, vo.getStatus()) .eqIfPresent(ConsDO::getPlatformOrderSn, vo.getPlatformOrderSn())
.eqIfPresent(ConsDO::getExpressId, vo.getExpressId()) .eqIfPresent(ConsDO::getNeedInspect, vo.getNeedInspect())
.eqIfPresent(ConsDO::getExpressNo, vo.getExpressNo()) .eqIfPresent(ConsDO::getStatus, vo.getStatus())
.eqIfPresent(ConsDO::getWareId, vo.getWareId()) .eqIfPresent(ConsDO::getExpressId, vo.getExpressId())
.eqIfPresent(ConsDO::getWorth, vo.getWorth()) .eqIfPresent(ConsDO::getExpressNo, vo.getExpressNo())
.eqIfPresent(ConsDO::getWorthCurrency, vo.getWorthCurrency()) .eqIfPresent(ConsDO::getInspectStatus, vo.getInspectStatus())
.betweenIfPresent(ConsDO::getWatEtime, vo.getBeginWatEtime(), vo.getEndWatEtime()) .eqIfPresent(ConsDO::getWareId, vo.getWareId())
.betweenIfPresent(ConsDO::getWatTime, vo.getBeginWatTime(), vo.getEndWatTime()) .eqIfPresent(ConsDO::getWorth, vo.getWorth())
.eqIfPresent(ConsDO::getSigned, vo.getSigned()) .eqIfPresent(ConsDO::getWorthCurrency, vo.getWorthCurrency())
.betweenIfPresent(ConsDO::getSignedTime, vo.getBeginSignedTime(), vo.getEndSignedTime()) .eqIfPresent(ConsDO::getAreaId, vo.getAreaId())
.eqIfPresent(ConsDO::getSignedRemarks, vo.getSignedRemarks()) .betweenIfPresent(ConsDO::getWatEtime, vo.getBeginWatEtime(), vo.getEndWatEtime())
.eqIfPresent(ConsDO::getSumQuantity, vo.getSumQuantity()) .eqIfPresent(ConsDO::getPositionId, vo.getPositionId())
.eqIfPresent(ConsDO::getOpSource, vo.getOpSource()) .betweenIfPresent(ConsDO::getWatTime, vo.getBeginWatTime(), vo.getEndWatTime())
.eqIfPresent(ConsDO::getRemarks, vo.getRemarks()) .eqIfPresent(ConsDO::getWarehouseLineId, vo.getWarehouseLineId())
.betweenIfPresent(ConsDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime()) .eqIfPresent(ConsDO::getSigned, vo.getSigned())
.betweenIfPresent(ConsDO::getSignedTime, vo.getBeginSignedTime(), vo.getEndSignedTime())
.eqIfPresent(ConsDO::getSignedRemarks, vo.getSignedRemarks())
.eqIfPresent(ConsDO::getSumQuantity, vo.getSumQuantity())
.eqIfPresent(ConsDO::getOpSource, vo.getOpSource())
.eqIfPresent(ConsDO::getSigner, vo.getSigner())
.eqIfPresent(ConsDO::getRemarks, vo.getRemarks())
.betweenIfPresent(ConsDO::getCreateTime, vo.getBeginCreateTime(), vo.getEndCreateTime())
.eqIfPresent(ConsDO::getConsigneeCityId, vo.getConsigneeCityId())
.eqIfPresent(ConsDO::getConsigneeCountryId, vo.getConsigneeCountryId())
.eqIfPresent(ConsDO::getConsigneeWarehouseId, vo.getConsigneeWarehouseId())
.eqIfPresent(ConsDO::getConsigneeAddress, vo.getConsigneeAddress())
.eqIfPresent(ConsDO::getIsPickout, vo.getIsPickout())
.orderByDesc(ConsDO::getId)); .orderByDesc(ConsDO::getId));
} }
......
...@@ -23,6 +23,10 @@ public class ConsBackVO { ...@@ -23,6 +23,10 @@ public class ConsBackVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private Long customerId; private Long customerId;
@ExcelProperty("包裹编号")
@ApiModelProperty(value = "包裹编号")
private String consNum;
@ExcelProperty("客户编号") @ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户编号")
private String customerNumber; private String customerNumber;
...@@ -63,6 +67,10 @@ public class ConsBackVO { ...@@ -63,6 +67,10 @@ public class ConsBackVO {
@ApiModelProperty(value = "快递单号") @ApiModelProperty(value = "快递单号")
private String expressNo; private String expressNo;
@ExcelProperty("验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货")
@ApiModelProperty(value = "验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货")
private Integer inspectStatus;
@ExcelProperty("仓库ID") @ExcelProperty("仓库ID")
@ApiModelProperty(value = "仓库ID") @ApiModelProperty(value = "仓库ID")
private Long wareId; private Long wareId;
...@@ -147,4 +155,8 @@ public class ConsBackVO { ...@@ -147,4 +155,8 @@ public class ConsBackVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private String consigneeAddress; private String consigneeAddress;
@ExcelProperty("是否已拣出,0否,1是")
@ApiModelProperty(value = "是否已拣出,0否,1是")
private Integer isPickout;
} }
...@@ -18,6 +18,9 @@ public class ConsBaseVO { ...@@ -18,6 +18,9 @@ public class ConsBaseVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private Long customerId; private Long customerId;
@ApiModelProperty(value = "包裹编号")
private String consNum;
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户编号")
private String customerNumber; private String customerNumber;
...@@ -45,6 +48,9 @@ public class ConsBaseVO { ...@@ -45,6 +48,9 @@ public class ConsBaseVO {
@ApiModelProperty(value = "快递单号") @ApiModelProperty(value = "快递单号")
private String expressNo; private String expressNo;
@ApiModelProperty(value = "验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货")
private Integer inspectStatus;
@ApiModelProperty(value = "仓库ID") @ApiModelProperty(value = "仓库ID")
private Long wareId; private Long wareId;
...@@ -106,4 +112,8 @@ public class ConsBaseVO { ...@@ -106,4 +112,8 @@ public class ConsBaseVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private String consigneeAddress; private String consigneeAddress;
@ApiModelProperty(value = "是否已拣出,0否,1是")
private Integer isPickout;
} }
...@@ -14,6 +14,9 @@ public class ConsQueryVO { ...@@ -14,6 +14,9 @@ public class ConsQueryVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private Long customerId; private Long customerId;
@ApiModelProperty(value = "包裹编号")
private String consNum;
@ApiModelProperty(value = "客户编号") @ApiModelProperty(value = "客户编号")
private String customerNumber; private String customerNumber;
...@@ -41,6 +44,9 @@ public class ConsQueryVO { ...@@ -41,6 +44,9 @@ public class ConsQueryVO {
@ApiModelProperty(value = "快递单号") @ApiModelProperty(value = "快递单号")
private String expressNo; private String expressNo;
@ApiModelProperty(value = "验货状态,来自字典表cons_inspect_status ,0 未开始,1验货中、2完成验货")
private Integer inspectStatus;
@ApiModelProperty(value = "仓库ID") @ApiModelProperty(value = "仓库ID")
private Long wareId; private Long wareId;
...@@ -121,4 +127,7 @@ public class ConsQueryVO { ...@@ -121,4 +127,7 @@ public class ConsQueryVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private String consigneeAddress; private String consigneeAddress;
@ApiModelProperty(value = "是否已拣出,0否,1是")
private Integer isPickout;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment