|
@@ -17,15 +17,15 @@ import (
|
|
|
type Order struct {
|
|
type Order struct {
|
|
|
Id int `orm:"column(ID);size(11);auto;pk"`
|
|
Id int `orm:"column(ID);size(11);auto;pk"`
|
|
|
T_pid int `orm:"index;size(256);null"` // Account.Company 绑定公司
|
|
T_pid int `orm:"index;size(256);null"` // Account.Company 绑定公司
|
|
|
- ChildPid string `orm:"index;size(256);null"` //子公司id
|
|
|
|
|
|
|
+ ChildPid string `orm:"index;size(256);null"` // 收货单位 Address.Id
|
|
|
T_orderid string `orm:"size(256);null"` // 订单号
|
|
T_orderid string `orm:"size(256);null"` // 订单号
|
|
|
T_outorderid string `orm:"size(256);null"` // 出库订单号
|
|
T_outorderid string `orm:"size(256);null"` // 出库订单号
|
|
|
WaybillNo string `orm:"size(256);null"` //运单号
|
|
WaybillNo string `orm:"size(256);null"` //运单号
|
|
|
T_sn string `orm:"size(256);null"` // 设备sn
|
|
T_sn string `orm:"size(256);null"` // 设备sn
|
|
|
DeviceType string `orm:"size(256);null"` // 设备类型
|
|
DeviceType string `orm:"size(256);null"` // 设备类型
|
|
|
T_receiving string `orm:"size(256);null"` // 收货单位
|
|
T_receiving string `orm:"size(256);null"` // 收货单位
|
|
|
- ShippingUnit string `orm:"size(256);null"` //发货单位
|
|
|
|
|
- ShippingName string `orm:"size(256);null"` //发货单位名称
|
|
|
|
|
|
|
+ ShippingUnit string `orm:"size(256);null"` // 发货单位 Address.Id
|
|
|
|
|
+ ShippingName string `orm:"size(256);null"` // 发货单位名称
|
|
|
T_start_Ut time.Time `orm:"type(timestamp);null;"` // 起运时间
|
|
T_start_Ut time.Time `orm:"type(timestamp);null;"` // 起运时间
|
|
|
T_end_Ut time.Time `orm:"type(timestamp);null;"` // 到达时间
|
|
T_end_Ut time.Time `orm:"type(timestamp);null;"` // 到达时间
|
|
|
EstimateEndTime time.Time `orm:"type(timestamp);null;"` // 预计到达时间
|
|
EstimateEndTime time.Time `orm:"type(timestamp);null;"` // 预计到达时间
|
|
@@ -254,8 +254,8 @@ func Read_Order_List(T_pid int, page int, page_z int, order, sn, startTime, endT
|
|
|
} else {
|
|
} else {
|
|
|
offset = int64((page - 1) * page_z)
|
|
offset = int64((page - 1) * page_z)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- cond := orm.NewCondition().And("T_pid", T_pid).Or("child_pid", T_pid)
|
|
|
|
|
|
|
+ cond2 := orm.NewCondition()
|
|
|
|
|
+ cond := orm.NewCondition().And("T_pid", T_pid).OrCond(cond2.And("child_pid", T_pid).And("IsExpatriate", 1))
|
|
|
cond1 := orm.NewCondition().AndCond(cond)
|
|
cond1 := orm.NewCondition().AndCond(cond)
|
|
|
if len(order) > 0 {
|
|
if len(order) > 0 {
|
|
|
cond1 = cond1.And("T_orderid__icontains", order)
|
|
cond1 = cond1.And("T_orderid__icontains", order)
|