Forráskód Böngészése

更新文档说明

zhou.yingan 5 éve
szülő
commit
355d9868ce
4 módosított fájl, 20 hozzáadás és 14 törlés
  1. 11 5
      controllers/erms3/spotContract.go
  2. 3 3
      docs/docs.go
  3. 3 3
      docs/swagger.json
  4. 3 3
      docs/swagger.yaml

+ 11 - 5
controllers/erms3/spotContract.go

@@ -434,8 +434,8 @@ func QuerySpotContractAppleForm(c *gin.Context) {
 // QuerySpotContractInfoReq 查询合同明细请求.
 type QuerySpotContractInfoReq struct {
 	Accountids string `form:"accountids" binding:"required"` // 资金账号ID列表,逗号分隔.
-	ContractType int32 `form:"contracttype" binding:"required"` // 合同类型,1-采购合同 2-销售合同.
-	ContractMode int32 `form:"contractmode" binding:"required"` // 合同模式,1-普通合同 2-回购销售合同.
+	ContractType int32 `form:"contracttype" binding:"required"` // 合同类型,1为采购合同 -1为销售合同.
+	ContractMode int32 `form:"contractmode" binding:"required"` // 合同模式,1为普通合同 2为回购销售合同.
 	Status int32 `form:"status"` // 合同状态,0-履约中 1-已完成.
 }
 
@@ -463,9 +463,9 @@ type QuerySpotContractInfoRsp struct {
 // @Produce json
 // @Security ApiKeyAuth
 // @Param accountids query string true "资金账号ID列表,用逗号分隔"
-// @Param contracttype query int true "合同类型,1-采购合同 2-销售合同"
-// @Param contractmode query int true "合同模式,1-普通合同 2-回购销售合同"
-// @Param status query int true "状态,0-履约中 1-已完成"
+// @Param contracttype query int true "合同类型,1为采购合同 -1为销售合同"
+// @Param contractmode query int true "合同模式,1为普通合同 2为回购销售合同"
+// @Param status query int true "状态,0为履约中 1为已完成"
 // @Success 200 {array} QuerySpotContractInfoRsp
 // @Failure 500 {object} app.Response
 // @Router /Erms3/QuerySpotContractDetail [get]
@@ -534,6 +534,12 @@ to_char(ERMS3_BIZTRADEDETAIL.RELATEDBIZID) RELATEDBIZID, ENUMDICITEM.ENUMDICNAME
 		return
 	}
 
+	if len(datas) == 0 {
+		appG.Response(http.StatusOK, e.SUCCESS, nil)
+
+		return
+	}
+
 	userids := make(map[int64]struct{})
 	for i := range datas {
 		userids[datas[i].Areauserid] = struct{}{}

+ 3 - 3
docs/docs.go

@@ -893,21 +893,21 @@ var doc = `{
                     },
                     {
                         "type": "integer",
-                        "description": "合同类型,1-采购合同 2-销售合同",
+                        "description": "合同类型,1为采购合同 -1为销售合同",
                         "name": "contracttype",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "合同模式,1-普通合同 2-回购销售合同",
+                        "description": "合同模式,1为普通合同 2为回购销售合同",
                         "name": "contractmode",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "状态,0-履约中 1-已完成",
+                        "description": "状态,0为履约中 1为已完成",
                         "name": "status",
                         "in": "query",
                         "required": true

+ 3 - 3
docs/swagger.json

@@ -877,21 +877,21 @@
                     },
                     {
                         "type": "integer",
-                        "description": "合同类型,1-采购合同 2-销售合同",
+                        "description": "合同类型,1为采购合同 -1为销售合同",
                         "name": "contracttype",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "合同模式,1-普通合同 2-回购销售合同",
+                        "description": "合同模式,1为普通合同 2为回购销售合同",
                         "name": "contractmode",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "状态,0-履约中 1-已完成",
+                        "description": "状态,0为履约中 1为已完成",
                         "name": "status",
                         "in": "query",
                         "required": true

+ 3 - 3
docs/swagger.yaml

@@ -4685,17 +4685,17 @@ paths:
         name: accountids
         required: true
         type: string
-      - description: 合同类型,1-采购合同 2-销售合同
+      - description: 合同类型,1为采购合同 -1为销售合同
         in: query
         name: contracttype
         required: true
         type: integer
-      - description: 合同模式,1-普通合同 2-回购销售合同
+      - description: 合同模式,1为普通合同 2为回购销售合同
         in: query
         name: contractmode
         required: true
         type: integer
-      - description: 状态,0-履约中 1-已完成
+      - description: 状态,0为履约中 1为已完成
         in: query
         name: status
         required: true