瀏覽代碼

我的库存增加条件判断

zhou.xiaoning 3 年之前
父節點
當前提交
90928c51fb
共有 4 個文件被更改,包括 11 次插入14 次删除
  1. 3 3
      docs/docs.go
  2. 3 3
      docs/swagger.json
  3. 4 3
      docs/swagger.yaml
  4. 1 5
      models/guangzuan.go

+ 3 - 3
docs/docs.go

@@ -31240,7 +31240,7 @@ const docTemplate = `{
             "type": "object",
             "properties": {
                 "accountname": {
-                    "description": "useraccount",
+                    "description": "[对手方]账户名称(机构名称)",
                     "type": "string"
                 },
                 "amount": {
@@ -31288,7 +31288,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "performanceplanid": {
-                    "description": "PerformancePlan",
+                    "description": "履约计划ID(130+yyMMddHHmmss+xxxx)",
                     "type": "string"
                 },
                 "performancestatus": {
@@ -31332,7 +31332,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "steptypeid": {
-                    "description": "PerformanceStep",
+                    "description": "履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“",
                     "type": "integer"
                 },
                 "warehousenamedisplay": {

+ 3 - 3
docs/swagger.json

@@ -31231,7 +31231,7 @@
             "type": "object",
             "properties": {
                 "accountname": {
-                    "description": "useraccount",
+                    "description": "[对手方]账户名称(机构名称)",
                     "type": "string"
                 },
                 "amount": {
@@ -31279,7 +31279,7 @@
                     "type": "integer"
                 },
                 "performanceplanid": {
-                    "description": "PerformancePlan",
+                    "description": "履约计划ID(130+yyMMddHHmmss+xxxx)",
                     "type": "string"
                 },
                 "performancestatus": {
@@ -31323,7 +31323,7 @@
                     "type": "string"
                 },
                 "steptypeid": {
-                    "description": "PerformanceStep",
+                    "description": "履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“",
                     "type": "integer"
                 },
                 "warehousenamedisplay": {

+ 4 - 3
docs/swagger.yaml

@@ -11351,7 +11351,7 @@ definitions:
   models.MyPerformanc:
     properties:
       accountname:
-        description: useraccount
+        description: '[对手方]账户名称(机构名称)'
         type: string
       amount:
         description: 履约金额
@@ -11388,7 +11388,7 @@ definitions:
         description: 买方支付方式 - 1:冻结 2:扣款
         type: integer
       performanceplanid:
-        description: PerformancePlan
+        description: 履约计划ID(130+yyMMddHHmmss+xxxx)
         type: string
       performancestatus:
         description: 履约状态 -  1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败
@@ -11423,7 +11423,8 @@ definitions:
         description: 尺寸
         type: string
       steptypeid:
-        description: PerformanceStep
+        description: 履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票
+          8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“
         type: integer
       warehousenamedisplay:
         type: string

+ 1 - 5
models/guangzuan.go

@@ -209,7 +209,7 @@ func (r *MyWRPosition) buildSql() string {
 	INNER JOIN WRFactorType ft ON t.wrfactortypeid = ft.wrfactortypeid
 	INNER JOIN View_GZ_WRStandard_Ex_Query wr ON ft.wrstandardid = wr.wrstandardid
 	LEFT JOIN WRTrade_OrderDetail od ON od.wrstandardid = wr.wrstandardid and od.wrtradeorderstatus in (3,7)
-	WHERE t.userid = %v
+	WHERE t.qty > 0 AND t.userid = %v
 	`
 
 	sqlId.FormatParam(r.WRUSERID)
@@ -1832,7 +1832,6 @@ func (r *GZGoods) GetDataEx() (interface{}, error) {
 
 // MyPerformanc 我的履约
 type MyPerformanc struct {
-	// PerformancePlan
 	PERFORMANCEPLANID        string  `json:"performanceplanid" xorm:"PERFORMANCEPLANID1"`              // 履约计划ID(130+yyMMddHHmmss+xxxx)
 	RELATEDORDERID           string  `json:"relatedorderid" xorm:"RELATEDORDERID1"`                    // 关联单号(履约类型的关联单号)
 	AMOUNT                   float64 `json:"amount" xorm:"AMOUNT"`                                     // 履约金额
@@ -1850,14 +1849,11 @@ type MyPerformanc struct {
 	SELLERINFO               string  `json:"sellerinfo" xorm:"SELLERINFO"`                             // 卖方联系信息 - 存JSON字符串, 根据枚举‘SellerContactInfo',显示\隐藏字段,若数据不为JSON,则直接显示{    "ContactInfo": "xxxxxxxx"}
 	BUYACCOUNTID             int64   `json:"buyaccountid" xorm:"BUYACCOUNTID"`                         // 买方账号
 
-	// PerformanceStep
 	STEPTYPEID int32 `json:"steptypeid" xorm:"STEPTYPEID"` // 履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“
 	REMAINDAYS int32 `json:"remaindays" xorm:"REMAINDAYS"` // 剩余天数
 
-	// useraccount
 	ACCOUNTNAME string `json:"accountname" xorm:"ACCOUNTNAME"` // [对手方]账户名称(机构名称)
 
-	// View_GZ_WRStandard_Ex_Query
 	ZSALLPROPERTIES            string  `json:"-" xorm:"ZSALLPROPERTIES" form:"zsallproperties"`              // 商品(查询字段-模糊查询)
 	ZSCATEGORYDISPLAY          string  `json:"zscategorydisplay" xorm:"ZSCATEGORYDISPLAY"`                   //
 	ZSCURRENCYTYPEDISPLAY      string  `json:"zscurrencytypedisplay" xorm:"ZSCURRENCYTYPEDISPLAY"`           //