Explorar o código

查采购/销售合同接口增加品牌和型号字段

zou.yingbin %!s(int64=4) %!d(string=hai) anos
pai
achega
3b148577c5
Modificáronse 4 ficheiros con 54 adicións e 0 borrados
  1. 16 0
      docs/docs.go
  2. 16 0
      docs/swagger.json
  3. 12 0
      docs/swagger.yaml
  4. 10 0
      models/ermcp.go

+ 16 - 0
docs/docs.go

@@ -11914,6 +11914,10 @@ var doc = `{
                     "description": "审核时间",
                     "type": "string"
                 },
+                "brandname": {
+                    "description": "品牌名称",
+                    "type": "string"
+                },
                 "contracctstatus": {
                     "description": "合同状态- 0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回",
                     "type": "integer"
@@ -11994,6 +11998,10 @@ var doc = `{
                     "description": "保证金",
                     "type": "number"
                 },
+                "modelname": {
+                    "description": "型号名称",
+                    "type": "string"
+                },
                 "payamount": {
                     "description": "已收付额(收款或付款)",
                     "type": "number"
@@ -12054,10 +12062,18 @@ var doc = `{
                     "description": "合同ID",
                     "type": "string"
                 },
+                "spotgoodsbrandid": {
+                    "description": "现货品牌ID",
+                    "type": "integer"
+                },
                 "spotgoodsdesc": {
                     "description": "商品型号(商品规格)",
                     "type": "string"
                 },
+                "spotgoodsmodelid": {
+                    "description": "现货型号ID",
+                    "type": "integer"
+                },
                 "startdate": {
                     "description": "点价开始日",
                     "type": "string"

+ 16 - 0
docs/swagger.json

@@ -11898,6 +11898,10 @@
                     "description": "审核时间",
                     "type": "string"
                 },
+                "brandname": {
+                    "description": "品牌名称",
+                    "type": "string"
+                },
                 "contracctstatus": {
                     "description": "合同状态- 0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回",
                     "type": "integer"
@@ -11978,6 +11982,10 @@
                     "description": "保证金",
                     "type": "number"
                 },
+                "modelname": {
+                    "description": "型号名称",
+                    "type": "string"
+                },
                 "payamount": {
                     "description": "已收付额(收款或付款)",
                     "type": "number"
@@ -12038,10 +12046,18 @@
                     "description": "合同ID",
                     "type": "string"
                 },
+                "spotgoodsbrandid": {
+                    "description": "现货品牌ID",
+                    "type": "integer"
+                },
                 "spotgoodsdesc": {
                     "description": "商品型号(商品规格)",
                     "type": "string"
                 },
+                "spotgoodsmodelid": {
+                    "description": "现货型号ID",
+                    "type": "integer"
+                },
                 "startdate": {
                     "description": "点价开始日",
                     "type": "string"

+ 12 - 0
docs/swagger.yaml

@@ -3767,6 +3767,9 @@ definitions:
       audittime:
         description: 审核时间
         type: string
+      brandname:
+        description: 品牌名称
+        type: string
       contracctstatus:
         description: 合同状态- 0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
         type: integer
@@ -3827,6 +3830,9 @@ definitions:
       margin:
         description: 保证金
         type: number
+      modelname:
+        description: 型号名称
+        type: string
       payamount:
         description: 已收付额(收款或付款)
         type: number
@@ -3872,9 +3878,15 @@ definitions:
       spotcontractid:
         description: 合同ID
         type: string
+      spotgoodsbrandid:
+        description: 现货品牌ID
+        type: integer
       spotgoodsdesc:
         description: 商品型号(商品规格)
         type: string
+      spotgoodsmodelid:
+        description: 现货型号ID
+        type: integer
       startdate:
         description: 点价开始日
         type: string

+ 10 - 0
models/ermcp.go

@@ -200,6 +200,10 @@ type ErmcpModel struct {
 	SELLUSERID         int64   `json:"-"  xorm:"'SELLUSERID'"`                          // 销售方ID
 	AUDITTIME          string  `json:"audittime"  xorm:"'AUDITTIME'"`                   // 审核时间
 	CREATETIME         string  `json:"createtime"  xorm:"'CREATETIME'"`                 // 创建时间
+	SPOTGOODSMODELID   int32   `json:"spotgoodsmodelid"  xorm:"'SPOTGOODSMODELID'"`     // 现货型号ID
+	SPOTGOODSBRANDID   int32   `json:"spotgoodsbrandid"  xorm:"'SPOTGOODSBRANDID'"`     // 现货品牌ID
+	BRANDNAME          string  `json:"brandname"  xorm:"'brandname'"`                   // 品牌名称
+	MODELNAME          string  `json:"modelname"  xorm:"'modelname'"`                   // 型号名称
 }
 
 func (r *ErmcpModel) calc() {
@@ -251,11 +255,15 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
 		"       to_char(t.contractattachment) attachment," +
 		"       t.margin," +
 		"       t.contractmargin," +
+		"       t.SPOTGOODSMODELID," +
+		"       t.SPOTGOODSBRANDID," +
 		"       u.accountname," +
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
 		"       g2.goodscode," +
 		"       g2.goodsname," +
+		"       gb.brandname," +
+		"       gm.modelname," +
 		"       e.enumdicname," +
 		"       t.contracttype," +
 		"       t.pricedamount + t.pricedqty * t.pricemove as pricedamount," +
@@ -275,6 +283,8 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
 		"    on t.deliverygoodsid = g.deliverygoodsid" +
 		"  left join goods g2" +
 		"    on t.goodsid = g2.goodsid" +
+		"  left join spotgoodsbrand gb on t.spotgoodsbrandid=gb.brandid" +
+		"  left join spotgoodsmodel gm on t.spotgoodsmodelid=gm.modelid" +
 		"  left join wrstandard wr" +
 		"    on t.wrstandardid = wr.wrstandardid" +
 		"  left join enumdicitem e" +