Selaa lähdekoodia

套保计划增加审核人、备注等字段

zou.yingbin 4 vuotta sitten
vanhempi
commit
4edd20ab01
4 muutettua tiedostoa jossa 280 lisäystä ja 9 poistoa
  1. 95 2
      docs/docs.go
  2. 95 2
      docs/swagger.json
  3. 71 2
      docs/swagger.yaml
  4. 19 3
      models/ermcp3.go

+ 95 - 2
docs/docs.go

@@ -8725,7 +8725,7 @@ var doc = `{
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjPickGoods"
+                                "$ref": "#/definitions/models.QhjMgrPickGoods"
                             }
                         }
                     },
@@ -16074,6 +16074,10 @@ var doc = `{
                     "description": "跟单员登录代码",
                     "type": "string"
                 },
+                "merusername": {
+                    "description": "跟单员名称",
+                    "type": "string"
+                },
                 "price": {
                     "description": "价格\\暂定价 [1:一口价、3:暂定价]",
                     "type": "number"
@@ -16106,6 +16110,10 @@ var doc = `{
                     "description": "业务员登录代码",
                     "type": "string"
                 },
+                "saleusername": {
+                    "description": "业务员名称",
+                    "type": "string"
+                },
                 "sellnickname": {
                     "description": "采购方昵称",
                     "type": "string"
@@ -17235,6 +17243,22 @@ var doc = `{
                     "description": "用户ID",
                     "type": "integer"
                 },
+                "auditid": {
+                    "description": "审核id",
+                    "type": "integer"
+                },
+                "auditname": {
+                    "description": "审核人名称",
+                    "type": "string"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 1-管理端 2-终端",
+                    "type": "integer"
+                },
                 "audittime": {
                     "description": "审核时间",
                     "type": "string"
@@ -18018,7 +18042,7 @@ var doc = `{
                     "type": "string"
                 },
                 "enumdicname": {
-                    "description": "单位名称(现货商品)",
+                    "description": "单位名称",
                     "type": "string"
                 },
                 "floatpl": {
@@ -25356,6 +25380,75 @@ var doc = `{
                 }
             }
         },
+        "models.QhjMgrPickGoods": {
+            "type": "object",
+            "properties": {
+                "enumdicname": {
+                    "description": "单位名称(提货商品)",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品id",
+                    "type": "integer"
+                },
+                "imageaddress": {
+                    "description": "图片",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifiername": {
+                    "description": "修改人名称",
+                    "type": "string"
+                },
+                "modifysrc": {
+                    "description": "修改来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsdesc": {
+                    "description": "描述",
+                    "type": "string"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsstatus": {
+                    "description": "状态 - 1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "pickupratio": {
+                    "description": "提货系数",
+                    "type": "number"
+                },
+                "preparedays": {
+                    "description": "备货期(天)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrPositionRsp": {
             "type": "object",
             "properties": {

+ 95 - 2
docs/swagger.json

@@ -8709,7 +8709,7 @@
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjPickGoods"
+                                "$ref": "#/definitions/models.QhjMgrPickGoods"
                             }
                         }
                     },
@@ -16058,6 +16058,10 @@
                     "description": "跟单员登录代码",
                     "type": "string"
                 },
+                "merusername": {
+                    "description": "跟单员名称",
+                    "type": "string"
+                },
                 "price": {
                     "description": "价格\\暂定价 [1:一口价、3:暂定价]",
                     "type": "number"
@@ -16090,6 +16094,10 @@
                     "description": "业务员登录代码",
                     "type": "string"
                 },
+                "saleusername": {
+                    "description": "业务员名称",
+                    "type": "string"
+                },
                 "sellnickname": {
                     "description": "采购方昵称",
                     "type": "string"
@@ -17219,6 +17227,22 @@
                     "description": "用户ID",
                     "type": "integer"
                 },
+                "auditid": {
+                    "description": "审核id",
+                    "type": "integer"
+                },
+                "auditname": {
+                    "description": "审核人名称",
+                    "type": "string"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 1-管理端 2-终端",
+                    "type": "integer"
+                },
                 "audittime": {
                     "description": "审核时间",
                     "type": "string"
@@ -18002,7 +18026,7 @@
                     "type": "string"
                 },
                 "enumdicname": {
-                    "description": "单位名称(现货商品)",
+                    "description": "单位名称",
                     "type": "string"
                 },
                 "floatpl": {
@@ -25340,6 +25364,75 @@
                 }
             }
         },
+        "models.QhjMgrPickGoods": {
+            "type": "object",
+            "properties": {
+                "enumdicname": {
+                    "description": "单位名称(提货商品)",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品id",
+                    "type": "integer"
+                },
+                "imageaddress": {
+                    "description": "图片",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifiername": {
+                    "description": "修改人名称",
+                    "type": "string"
+                },
+                "modifysrc": {
+                    "description": "修改来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsdesc": {
+                    "description": "描述",
+                    "type": "string"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsstatus": {
+                    "description": "状态 - 1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "pickupratio": {
+                    "description": "提货系数",
+                    "type": "number"
+                },
+                "preparedays": {
+                    "description": "备货期(天)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrPositionRsp": {
             "type": "object",
             "properties": {

+ 71 - 2
docs/swagger.yaml

@@ -3855,6 +3855,9 @@ definitions:
       meruserlogincode:
         description: 跟单员登录代码
         type: string
+      merusername:
+        description: 跟单员名称
+        type: string
       price:
         description: 价格\暂定价 [1:一口价、3:暂定价]
         type: number
@@ -3879,6 +3882,9 @@ definitions:
       saleuserlogincode:
         description: 业务员登录代码
         type: string
+      saleusername:
+        description: 业务员名称
+        type: string
       sellnickname:
         description: 采购方昵称
         type: string
@@ -4717,6 +4723,18 @@ definitions:
       areauserid:
         description: 用户ID
         type: integer
+      auditid:
+        description: 审核id
+        type: integer
+      auditname:
+        description: 审核人名称
+        type: string
+      auditremark:
+        description: 审核备注
+        type: string
+      auditsrc:
+        description: 审核来源 1-管理端 2-终端
+        type: integer
       audittime:
         description: 审核时间
         type: string
@@ -5299,7 +5317,7 @@ definitions:
         description: 结束交易日
         type: string
       enumdicname:
-        description: 单位名称(现货商品)
+        description: 单位名称
         type: string
       floatpl:
         description: 浮动损益
@@ -10788,6 +10806,57 @@ definitions:
         description: 用户名称
         type: string
     type: object
+  models.QhjMgrPickGoods:
+    properties:
+      enumdicname:
+        description: 单位名称(提货商品)
+        type: string
+      goodsid:
+        description: 商品id
+        type: integer
+      imageaddress:
+        description: 图片
+        type: string
+      modifierid:
+        description: 修改人
+        type: integer
+      modifiername:
+        description: 修改人名称
+        type: string
+      modifysrc:
+        description: 修改来源 - 1:管理端 2:终端
+        type: integer
+      pickupgoodsagreeunit:
+        description: 合约乘数
+        type: number
+      pickupgoodsdesc:
+        description: 描述
+        type: string
+      pickupgoodsid:
+        description: 提货商品ID
+        type: string
+      pickupgoodsname:
+        description: 提货商品名称
+        type: string
+      pickupgoodsstatus:
+        description: 状态 - 1:正常 2:停用 3:注销
+        type: integer
+      pickupgoodsunitid:
+        description: 单位ID
+        type: integer
+      pickupratio:
+        description: 提货系数
+        type: number
+      preparedays:
+        description: 备货期(天)
+        type: integer
+      remark:
+        description: 备注
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+    type: object
   models.QhjMgrPositionRsp:
     properties:
       accountid:
@@ -20661,7 +20730,7 @@ paths:
           description: OK
           schema:
             items:
-              $ref: '#/definitions/models.QhjPickGoods'
+              $ref: '#/definitions/models.QhjMgrPickGoods'
             type: array
         "500":
           description: Internal Server Error

+ 19 - 3
models/ermcp3.go

@@ -1889,6 +1889,10 @@ type Ermcp3HedgePlan struct {
 	TRADEUSERID       int64   `json:"tradeuserid"  xorm:"'TRADEUSERID'"`             // 交易用户id
 	CURRENCYID        int32   `json:"currencyid"  xorm:"'CURRENCYID'"`               // 币种id
 	WRUNITID          int32   `json:"wrunitid"  xorm:"'WRUNITID'"`                   // 品类单位id
+	AUDITID           int64   `json:"auditid"  xorm:"'auditid'"`                     // 审核id
+	AUDITSRC          int32   `json:"auditsrc"  xorm:"'AUDITSRC'"`                   // 审核来源 1-管理端 2-终端
+	AUDITREMARK       string  `json:"auditremark"  xorm:"'auditremark'"`             // 审核备注
+	AUDITNAME         string  `json:"auditname"  xorm:"'AUDITNAME'"`                 // 审核人名称
 
 	WRUNITIDNAME  string `json:"wrunitidame"`   // 品类单位名称
 	TRADEUSERNAME string `json:"tradeusername"` // 交易用户名称
@@ -1904,6 +1908,11 @@ func (r *Ermcp3HedgePlan) calc() {
 	if r.WRUNITID > 0 {
 		r.WRUNITIDNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
 	}
+	if r.AUDITSRC == 1 {
+		if r.AUDITNAME == "" && r.AUDITID > 0 {
+			r.AUDITNAME = mtpcache.GetSystemmangerLoginCode(r.AUDITID)
+		}
+	}
 }
 
 func (r *Ermcp3HedgePlan) buildSql(status string) string {
@@ -1931,12 +1940,19 @@ func (r *Ermcp3HedgePlan) buildSql(status string) string {
 		"       t.accountid," +
 		"       t.tradeuserid," +
 		"       t.currencyid," +
-		"       ta.accountname taaccountname" +
+		"       t.auditid," +
+		"       t.auditsrc," +
+		"       t.auditremark," +
+		"       ta.accountname taaccountname," +
+		"       l.accountname auditname" +
 		"  from ermcp_hedgeplan t" +
 		"  left join deliverygoods g" +
 		"    on t.deliverygoodsid = g.deliverygoodsid" +
-		"  left join wrstandard w on t.wrstandardid=w.wrstandardid" +
-		"  left join taaccount ta on t.accountid=ta.accountid" +
+		"  left join wrstandard w" +
+		"    on t.wrstandardid = w.wrstandardid" +
+		"  left join taaccount ta" +
+		"    on t.accountid = ta.accountid" +
+		"  left join loginaccount l on t.auditid=l.loginid" +
 		" where t.hedgeplanstatus in (%v)"
 
 	if r.UserType == 0 {