|
|
@@ -28,9 +28,11 @@ var SecondCount int = 0
|
|
|
|
|
|
// SpotPriceOrder 定价明细
|
|
|
type SpotPriceOrder struct {
|
|
|
- Price float64 `json:"price" binding:"required"` // 价格
|
|
|
- Qty float64 `json:"qty" binding:"required"` // 数量
|
|
|
- Amount float64 `json:"amount" binding:"required"` // 金额
|
|
|
+ Price float64 `json:"price" binding:"required"` // 价格
|
|
|
+ Qty float64 `json:"qty" binding:"required"` // 数量
|
|
|
+ Amount float64 `json:"amount" binding:"required"` // 金额
|
|
|
+ DeliveryStartDate string `json:"deliverystartdate" binding:"required"` // 交收开始日期
|
|
|
+ DeliveryEndDate string `json:"deliveryendtdate" binding:"required"` // 交收结束日期
|
|
|
}
|
|
|
|
|
|
// SpotPointOrder 点价明细
|
|
|
@@ -433,29 +435,29 @@ func QuerySpotContractAppleForm(c *gin.Context) {
|
|
|
|
|
|
// QuerySpotContractInfoReq 查询合同明细请求.
|
|
|
type QuerySpotContractInfoReq struct {
|
|
|
- Accountids string `form:"accountids" binding:"required"` // 资金账号ID列表,逗号分隔.
|
|
|
- ContractType int32 `form:"contracttype" binding:"required"` // 合同类型,1为采购合同 -1为销售合同.
|
|
|
- ContractMode int32 `form:"contractmode" binding:"required"` // 合同模式,1为普通合同 2为回购销售合同.
|
|
|
- Status int32 `form:"status"` // 合同状态,0-履约中 1-已完成.
|
|
|
+ Accountids string `form:"accountids" binding:"required"` // 资金账号ID列表,逗号分隔.
|
|
|
+ ContractType int32 `form:"contracttype" binding:"required"` // 合同类型,1为采购合同 -1为销售合同.
|
|
|
+ ContractMode int32 `form:"contractmode" binding:"required"` // 合同模式,1为普通合同 2为回购销售合同.
|
|
|
+ Status int32 `form:"status"` // 合同状态,0-履约中 1-已完成.
|
|
|
}
|
|
|
|
|
|
// QuerySpotContractInfoRsp 查询合同明细响应.
|
|
|
type QuerySpotContractInfoRsp struct {
|
|
|
- SpotContractID string `json:"spotcontractid"` // 合同ID
|
|
|
- CustomerName string `json:"customername"` // 若合同类型为采购合同,表示采购方ID;若合同类型为销售合同,表示销售方ID.
|
|
|
- AccountID int64 `json:"accountid"` // 表示交易员ID.
|
|
|
- MatchCustomerName string `json:"matchcustomername"` // 若合同类型为采购合同,表示销售方;若合同类型为销售合同,表示采购方ID.
|
|
|
- MatchAccountID int64 `json:"matchaccountid"` // 表示业务员ID.
|
|
|
- WRStandardName string `json:"wrstandardname"` // 表示商品ID.
|
|
|
- TotalQty float64 `json:"totalqty"` // 表示合同量.
|
|
|
- PricedQty float64 `json:"priceqty"` // 表示定价量.
|
|
|
- UnPricedQty float64 `json:"unpricedqty"` // 表示未定价量.
|
|
|
- DeliveryQty float64 `json:"deliveryqty"` // 表示交收量.
|
|
|
- CurDeliveryQty float64 `json:"curdeliveryqty"` // 表示未交收量.
|
|
|
- SignDate string `json:"signdate"` // 表示签订日期.
|
|
|
- DeliveryGoodsID string `json:"deliverygoodsid"` // 表示品种ID.
|
|
|
- RelatedBizID string `json:"relatedbizid"` // 表示业务ID.
|
|
|
- Status int32 `json:"status"` // 表示状态,0-履约中 1-已完成.
|
|
|
+ SpotContractID string `json:"spotcontractid"` // 合同ID
|
|
|
+ CustomerName string `json:"customername"` // 若合同类型为采购合同,表示采购方ID;若合同类型为销售合同,表示销售方ID.
|
|
|
+ AccountID int64 `json:"accountid"` // 表示交易员ID.
|
|
|
+ MatchCustomerName string `json:"matchcustomername"` // 若合同类型为采购合同,表示销售方;若合同类型为销售合同,表示采购方ID.
|
|
|
+ MatchAccountID int64 `json:"matchaccountid"` // 表示业务员ID.
|
|
|
+ WRStandardName string `json:"wrstandardname"` // 表示商品ID.
|
|
|
+ TotalQty float64 `json:"totalqty"` // 表示合同量.
|
|
|
+ PricedQty float64 `json:"priceqty"` // 表示定价量.
|
|
|
+ UnPricedQty float64 `json:"unpricedqty"` // 表示未定价量.
|
|
|
+ DeliveryQty float64 `json:"deliveryqty"` // 表示交收量.
|
|
|
+ CurDeliveryQty float64 `json:"curdeliveryqty"` // 表示未交收量.
|
|
|
+ SignDate string `json:"signdate"` // 表示签订日期.
|
|
|
+ DeliveryGoodsID string `json:"deliverygoodsid"` // 表示品种ID.
|
|
|
+ RelatedBizID string `json:"relatedbizid"` // 表示业务ID.
|
|
|
+ Status int32 `json:"status"` // 表示状态,0-履约中 1-已完成.
|
|
|
}
|
|
|
|
|
|
// QuerySpotContractDetail 查询合同详细信息.
|
|
|
@@ -498,18 +500,18 @@ func QuerySpotContractDetail(c *gin.Context) {
|
|
|
// 查询数据.
|
|
|
type spotContractDetail struct {
|
|
|
models.Erms3Spotcontractdetail `xorm:"extends"`
|
|
|
- Areauserid int64 `json:"areauserid" xorm:"AREAUSERID"` // 所属机构
|
|
|
- Accountid int64 `json:"accountid" xorm:"ACCOUNTID"` // 资金账户ID
|
|
|
- Customeruserid int64 `json:"customeruserid" xorm:"CUSTOMERUSERID"` // 客户ID
|
|
|
- Customeraccountid int64 `json:"customeraccountid" xorm:"CUSTOMERACCOUNTID"` // 客户资金账户ID
|
|
|
- Signdate time.Time `json:"signdate" xorm:"SIGNDATE"` // 签订日期
|
|
|
- Closestatus int32 `json:"closestatus" xorm:"CLOSESTATUS"` // 完结状态 - 0:未完结 1:已完结
|
|
|
- Relatedbizid string `json:"relatedbizid" xorm:"RELATEDBIZID"` // 关联业务ID
|
|
|
- Goodunit string `json:"goodunit" xorm:"'GOODUNIT'"` // 报价单位
|
|
|
- Wrstandardcode string `json:"wrstandardcode" xorm:"'WRSTANDARDCODE'"` // 仓单标准代码
|
|
|
- Wrstandardname string `json:"wrstandardname" xorm:"'WRSTANDARDNAME'"` // 仓单标准名称
|
|
|
- Deliverygoodscode string `json:"deliverygoodscode" xorm:"'DELIVERYGOODSCODE'"` // 交割商品代码
|
|
|
- Deliverygoodsname string `json:"deliverygoodsname" xorm:"'DELIVERYGOODSNAME'"` // 交割商品名称
|
|
|
+ Areauserid int64 `json:"areauserid" xorm:"AREAUSERID"` // 所属机构
|
|
|
+ Accountid int64 `json:"accountid" xorm:"ACCOUNTID"` // 资金账户ID
|
|
|
+ Customeruserid int64 `json:"customeruserid" xorm:"CUSTOMERUSERID"` // 客户ID
|
|
|
+ Customeraccountid int64 `json:"customeraccountid" xorm:"CUSTOMERACCOUNTID"` // 客户资金账户ID
|
|
|
+ Signdate time.Time `json:"signdate" xorm:"SIGNDATE"` // 签订日期
|
|
|
+ Closestatus int32 `json:"closestatus" xorm:"CLOSESTATUS"` // 完结状态 - 0:未完结 1:已完结
|
|
|
+ Relatedbizid string `json:"relatedbizid" xorm:"RELATEDBIZID"` // 关联业务ID
|
|
|
+ Goodunit string `json:"goodunit" xorm:"'GOODUNIT'"` // 报价单位
|
|
|
+ Wrstandardcode string `json:"wrstandardcode" xorm:"'WRSTANDARDCODE'"` // 仓单标准代码
|
|
|
+ Wrstandardname string `json:"wrstandardname" xorm:"'WRSTANDARDNAME'"` // 仓单标准名称
|
|
|
+ Deliverygoodscode string `json:"deliverygoodscode" xorm:"'DELIVERYGOODSCODE'"` // 交割商品代码
|
|
|
+ Deliverygoodsname string `json:"deliverygoodsname" xorm:"'DELIVERYGOODSNAME'"` // 交割商品名称
|
|
|
}
|
|
|
|
|
|
datas := make([]spotContractDetail, 0)
|
|
|
@@ -547,7 +549,7 @@ to_char(ERMS3_BIZTRADEDETAIL.RELATEDBIZID) RELATEDBIZID, ENUMDICITEM.ENUMDICNAME
|
|
|
}
|
|
|
|
|
|
arrayids := make([]int64, 0, len(userids))
|
|
|
- for k, _ :=range userids {
|
|
|
+ for k, _ := range userids {
|
|
|
arrayids = append(arrayids, k)
|
|
|
}
|
|
|
|