|
@@ -128,6 +128,23 @@ func AddSpotContractApply(c *gin.Context) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 根据合同类型,确定买卖房
|
|
|
|
|
+ var areauserid int32
|
|
|
|
|
+ var accountid int64
|
|
|
|
|
+ var customeruserid int32
|
|
|
|
|
+ var customeraccountid int64
|
|
|
|
|
+ if req.ContractType == 1 {
|
|
|
|
|
+ areauserid = req.AreaUserID
|
|
|
|
|
+ accountid = req.AccountID
|
|
|
|
|
+ customeruserid = req.CustomerUserID
|
|
|
|
|
+ customeraccountid = req.CustomerAccountID
|
|
|
|
|
+ } else {
|
|
|
|
|
+ areauserid = req.CustomerUserID
|
|
|
|
|
+ accountid = req.CustomerAccountID
|
|
|
|
|
+ customeruserid = req.AreaUserID
|
|
|
|
|
+ customeraccountid = req.AccountID
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 生成申请ID
|
|
// 生成申请ID
|
|
|
spotcontractid := GenSpotContractID()
|
|
spotcontractid := GenSpotContractID()
|
|
|
|
|
|
|
@@ -155,10 +172,10 @@ func AddSpotContractApply(c *gin.Context) {
|
|
|
TradeDate: tradedate,
|
|
TradeDate: tradedate,
|
|
|
ContractNo: req.ContractNo,
|
|
ContractNo: req.ContractNo,
|
|
|
ContractType: req.ContractType,
|
|
ContractType: req.ContractType,
|
|
|
- AreaUserID: req.AreaUserID,
|
|
|
|
|
- AccountID: req.AccountID,
|
|
|
|
|
- CustomerUserID: req.CustomerUserID,
|
|
|
|
|
- CustomerAccountID: req.CustomerAccountID,
|
|
|
|
|
|
|
+ AreaUserID: areauserid,
|
|
|
|
|
+ AccountID: accountid,
|
|
|
|
|
+ CustomerUserID: customeruserid,
|
|
|
|
|
+ CustomerAccountID: customeraccountid,
|
|
|
SignDate: req.SignDate,
|
|
SignDate: req.SignDate,
|
|
|
ContractAttachment: req.ContractAttachment,
|
|
ContractAttachment: req.ContractAttachment,
|
|
|
OriMargin: req.OriMargin,
|
|
OriMargin: req.OriMargin,
|