|
@@ -2726,7 +2726,7 @@ func (r *GzcjbsorderfileM) GetDataByPage() (interface{}, error, int, int, int) {
|
|
|
|
|
|
|
|
// GzbsfworderM 保税服务单据表
|
|
// GzbsfworderM 保税服务单据表
|
|
|
type GzbsfworderM struct {
|
|
type GzbsfworderM struct {
|
|
|
- ORDERID int64 `json:"orderid" xorm:"ORDERID"` // 单据ID(804+Unix秒时间戳(10位)+xxxxxx)
|
|
|
|
|
|
|
+ ORDERID string `json:"orderid" xorm:"ORDERID"` // 单据ID(804+Unix秒时间戳(10位)+xxxxxx)
|
|
|
USERID int64 `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
|
|
USERID int64 `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
|
|
|
ACCOUNTID int64 `json:"accountid" xorm:"ACCOUNTID"` // 资金账户ID
|
|
ACCOUNTID int64 `json:"accountid" xorm:"ACCOUNTID"` // 资金账户ID
|
|
|
ORDERSN string `json:"ordersn" xorm:"ORDERSN"` // 单据流水号 - yymm000 - yy表示年份,mm表示月份,年份、月份以两位数表示;000表示流水序号,序号不足三位以0补全
|
|
ORDERSN string `json:"ordersn" xorm:"ORDERSN"` // 单据流水号 - yymm000 - yy表示年份,mm表示月份,年份、月份以两位数表示;000表示流水序号,序号不足三位以0补全
|
|
@@ -2773,7 +2773,39 @@ func (r *GzbsfworderM) calc() {
|
|
|
func (r *GzbsfworderM) buildSql() string {
|
|
func (r *GzbsfworderM) buildSql() string {
|
|
|
var sqlId utils.SQLVal = `
|
|
var sqlId utils.SQLVal = `
|
|
|
SELECT
|
|
SELECT
|
|
|
- t.*,
|
|
|
|
|
|
|
+ to_char(t.ORDERID) ORDERID,
|
|
|
|
|
+ t.USERID,
|
|
|
|
|
+ t.ACCOUNTID,
|
|
|
|
|
+ t.ORDERSN,
|
|
|
|
|
+ t.ORDERNO,
|
|
|
|
|
+ t.ORDERDATE,
|
|
|
|
|
+ t.COMPANYNAMECN,
|
|
|
|
|
+ t.COMPANYNAMEEN,
|
|
|
|
|
+ t.ADDRESSCN,
|
|
|
|
|
+ t.ADDRESSEN,
|
|
|
|
|
+ t.CONTACTNAME,
|
|
|
|
|
+ t.CONTACTPHONENO,
|
|
|
|
|
+ t.CONTACTFAX,
|
|
|
|
|
+ t.ORIGINCOUNTRY,
|
|
|
|
|
+ t.TOTALNETWEIGTHCT,
|
|
|
|
|
+ t.TOTALNETWEIGHTGM,
|
|
|
|
|
+ t.TOTALGROSSWEIGHTGM,
|
|
|
|
|
+ t.TOTALAMOUNT,
|
|
|
|
|
+ t.GZBSSTATUS,
|
|
|
|
|
+ t.HANDLESTATUS,
|
|
|
|
|
+ t.EXECUTESTATUS,
|
|
|
|
|
+ t.TAXMARGIN,
|
|
|
|
|
+ t.ADVANCEAMOUNT,
|
|
|
|
|
+ t.SETTLEAMOUNT,
|
|
|
|
|
+ t.CREATETIME,
|
|
|
|
|
+ t.TOTALNUMBER,
|
|
|
|
|
+ t.GZBSDELIVERYTYPE,
|
|
|
|
|
+ t.OTHERLOGISTICS,
|
|
|
|
|
+ t.WEIGHTRANGE,
|
|
|
|
|
+ t.SHAPERANGE,
|
|
|
|
|
+ t.COLORRANGE,
|
|
|
|
|
+ t.CONTENTRANGE,
|
|
|
|
|
+ t.CLOSEDTRADEDATE,
|
|
|
CAST((t.TOTALAMOUNT / t.TOTALNETWEIGTHCT) AS DECIMAL(13,2)) PRICEPER,
|
|
CAST((t.TOTALAMOUNT / t.TOTALNETWEIGTHCT) AS DECIMAL(13,2)) PRICEPER,
|
|
|
e1.ENUMDICNAME GZBSSTATUSDISPLAY
|
|
e1.ENUMDICNAME GZBSSTATUSDISPLAY
|
|
|
FROM GZ_BSFWOrder t
|
|
FROM GZ_BSFWOrder t
|
|
@@ -2801,8 +2833,8 @@ func (r *GzbsfworderM) GetDataByPage() (interface{}, error, int, int, int) {
|
|
|
|
|
|
|
|
// GzbsfworderdetailM 保税服务单据明细表
|
|
// GzbsfworderdetailM 保税服务单据明细表
|
|
|
type GzbsfworderdetailM struct {
|
|
type GzbsfworderdetailM struct {
|
|
|
- ORDERDETAILID int64 `json:"orderdetailid" xorm:"ORDERDETAILID"` // 单据明细ID(805+Unix秒时间戳(10位)+xxxxxx)
|
|
|
|
|
- ORDERID int64 `json:"orderid" xorm:"ORDERID" form:"orderid"` // 单据ID(804+Unix秒时间戳(10位)+xxxxxx)
|
|
|
|
|
|
|
+ ORDERDETAILID string `json:"orderdetailid" xorm:"ORDERDETAILID"` // 单据明细ID(805+Unix秒时间戳(10位)+xxxxxx)
|
|
|
|
|
+ ORDERID string `json:"orderid" xorm:"ORDERID" form:"orderid"` // 单据ID(804+Unix秒时间戳(10位)+xxxxxx)
|
|
|
ORDERINDEX int32 `json:"orderindex" xorm:"ORDERINDEX"` // 顺序
|
|
ORDERINDEX int32 `json:"orderindex" xorm:"ORDERINDEX"` // 顺序
|
|
|
NETWEIGTHCT float64 `json:"netweigthct" xorm:"NETWEIGTHCT"` // 净重(克拉)
|
|
NETWEIGTHCT float64 `json:"netweigthct" xorm:"NETWEIGTHCT"` // 净重(克拉)
|
|
|
NETWEIGTHGM float64 `json:"netweigthgm" xorm:"NETWEIGTHGM"` // 净重(克)
|
|
NETWEIGTHGM float64 `json:"netweigthgm" xorm:"NETWEIGTHGM"` // 净重(克)
|
|
@@ -2827,13 +2859,25 @@ func (r *GzbsfworderdetailM) calc() {
|
|
|
func (r *GzbsfworderdetailM) buildSql() string {
|
|
func (r *GzbsfworderdetailM) buildSql() string {
|
|
|
var sqlId utils.SQLVal = `
|
|
var sqlId utils.SQLVal = `
|
|
|
SELECT
|
|
SELECT
|
|
|
- t.*
|
|
|
|
|
|
|
+ to_char(t.ORDERDETAILID) ORDERDETAILID,
|
|
|
|
|
+ to_char(t.ORDERID) ORDERID,
|
|
|
|
|
+ t.ORDERINDEX,
|
|
|
|
|
+ t.NETWEIGTHCT,
|
|
|
|
|
+ t.NETWEIGTHGM,
|
|
|
|
|
+ t.GROSSWEIGHTGM,
|
|
|
|
|
+ t.TOTALAMOUNT,
|
|
|
|
|
+ t.PERPRICE,
|
|
|
|
|
+ t.ORDERCONTENT,
|
|
|
|
|
+ t.COLORINFO,
|
|
|
|
|
+ t.REMARK,
|
|
|
|
|
+ t.CREATETIME,
|
|
|
|
|
+ t.GZCJSHAPE
|
|
|
FROM GZ_BSFWOrderDetail t
|
|
FROM GZ_BSFWOrderDetail t
|
|
|
LEFT JOIN GZ_BSFWOrder d ON t.orderid = d.orderid AND d.userid = %v
|
|
LEFT JOIN GZ_BSFWOrder d ON t.orderid = d.orderid AND d.userid = %v
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
`
|
|
`
|
|
|
sqlId.FormatParam(r.USERID)
|
|
sqlId.FormatParam(r.USERID)
|
|
|
- sqlId.AndEx("t.orderid", r.ORDERID, r.ORDERID > 0)
|
|
|
|
|
|
|
+ sqlId.AndEx("t.orderid", r.ORDERID, r.ORDERID != "")
|
|
|
sqlId.OrderBy("t.ORDERINDEX")
|
|
sqlId.OrderBy("t.ORDERINDEX")
|
|
|
|
|
|
|
|
sqlId.Page(r.Page, r.PageSize)
|
|
sqlId.Page(r.Page, r.PageSize)
|