wangpengfei
2023-08-17 06c0b03df2955475fe39ff2a793a5f151f4da99f
Merge branch 'master' into fly
6个文件已修改
54 ■■■■■ 已修改文件
api/v1/serviceCollectionPlan.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/index.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceCollectionPlan.go 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/serviceCollectionPlan.go
@@ -31,7 +31,7 @@
        if plan.SourceType == 0 ||
            plan.SourceId == 0 ||
            plan.CollectionType == 0 ||
            plan.CollectionDate.IsZero() ||
            plan.CollectionDate == "" ||
            plan.Amount.IsZero() ||
            plan.Percent.IsZero() ||
            plan.PrincipalId == 0 {
docs/docs.go
@@ -12810,6 +12810,14 @@
                    "description": "服务合同id",
                    "type": "integer"
                },
                "serviceMan": {
                    "description": "服务人员",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.User"
                        }
                    ]
                },
                "serviceManId": {
                    "description": "服务人员",
                    "type": "integer"
docs/swagger.json
@@ -12798,6 +12798,14 @@
                    "description": "服务合同id",
                    "type": "integer"
                },
                "serviceMan": {
                    "description": "服务人员",
                    "allOf": [
                        {
                            "$ref": "#/definitions/model.User"
                        }
                    ]
                },
                "serviceManId": {
                    "description": "服务人员",
                    "type": "integer"
docs/swagger.yaml
@@ -1833,6 +1833,10 @@
      serviceContractId:
        description: 服务合同id
        type: integer
      serviceMan:
        allOf:
        - $ref: '#/definitions/model.User'
        description: 服务人员
      serviceManId:
        description: 服务人员
        type: integer
model/index.go
@@ -87,6 +87,7 @@
        ContactInformation{},
        SalesReturn{},
        SalesRefund{},
        ServiceCollectionPlan{},
    )
    return err
}
model/serviceCollectionPlan.go
@@ -7,28 +7,27 @@
    "fmt"
    "github.com/shopspring/decimal"
    "gorm.io/gorm"
    "time"
)
type (
    // ServiceCollectionPlan 收款计划
    ServiceCollectionPlan struct {
        Id               int                           `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
        CollectionType   int                           `gorm:"collection_type" json:"collectionType"`                                            // 类型(1 计划收款日期 2 项目状态)
        SourceType       constvar.CollectionSourceType `gorm:"source_type" json:"sourceType"`                                                    // 源单类型(1销售明细2服务合同3销售发票)
        SourceId         int                           `gorm:"source_id" json:"sourceId"`                                                        // 源单id
        PrincipalId      int                           `gorm:"principal_id" json:"principalId"`                                                  // 收款负责人ID
        Term             int                           `gorm:"term" json:"term"`                                                                 // 期次
        Percent          decimal.Decimal               `gorm:"percent" json:"percent"`                                                           // 比例
        Amount           decimal.Decimal               `gorm:"amount" json:"amount"`                                                             // 金额
        MoneyType        string                        `gorm:"money_type" json:"moneyType"`                                                      // 币种
        CollectionDate   time.Time                     `gorm:"collection_date" json:"collectionDate"`                                            // 计划收款日期
        Remark           string                        `gorm:"remark" json:"remark"`                                                             // 备注
        Status           constvar.CollectionStatus     `gorm:"status" json:"status"`                                                             // 状态(1未收2部分已收3已收)
        AmountReceivable decimal.Decimal               `gorm:"column:amount_receivable;type:decimal(12,2);comment:应收金额" json:"amountReceivable"` // 应收金额
        AmountReceived   decimal.Decimal               `gorm:"column:amount_received;type:decimal(12,2);comment:已收金额" json:"amountReceived"`     // 已收金额
        AmountTotal      decimal.Decimal               `gorm:"column:amount_total;type:decimal(12,2);comment:总额" json:"amountTotal"`             // 总额
        FileId           int                           `gorm:"file_id" json:"fileId"`                                                            // 附件id
        CollectionType   int                           `gorm:"column:collection_type;type:tinyint;not null;default 0;comment:类型(1 计划收款日期 2 项目状态)" json:"collectionType"` // 类型(1 计划收款日期 2 项目状态)
        SourceType       constvar.CollectionSourceType `gorm:"column:source_type;type:tinyint;not null;default 0;comment:源单类型(1销售明细2服务合同3销售发票)" json:"sourceType"`       // 源单类型(1销售明细2服务合同3销售发票)
        SourceId         int                           `gorm:"column:source_id;type:int;not null;default 0;comment:源单id" json:"sourceId"`                                // 源单id
        PrincipalId      int                           `gorm:"column:principal_id;type:int;not null;default 0;comment:收款负责人ID" json:"principalId"`                       // 收款负责人ID
        Term             int                           `gorm:"column:term;type:tinyint;not null;default 0;comment:期次" json:"term"`                                       // 期次
        Percent          decimal.Decimal               `gorm:"column:percent;type:decimal(5,2);not null;default 0.00;comment:收款比例" gorm:"" json:"percent"`               // 比例
        Amount           decimal.Decimal               `gorm:"column:amount;type:decimal(12,2);not null;default '0.00';comment:金额" gorm:"" json:"amount"`                // 金额
        MoneyType        string                        `gorm:"column:money_type;type:varchar(255);not null;default '';comment:币种" json:"moneyType"`                      // 币种
        CollectionDate   string                        `gorm:"column:collection_date;type:varchar(255);not null;default '';comment:计划收款日期" json:"collectionDate"`        // 计划收款日期
        Remark           string                        `gorm:"column:remark;type:varchar(512);not null;default '';comment:备注" json:"remark"`                             // 备注
        Status           constvar.CollectionStatus     `gorm:"column:status;type:tinyint;not null;default '';comment:状态(1未收2部分已收3已收)" json:"status"`                     // 状态(1未收2部分已收3已收)
        AmountReceivable decimal.Decimal               `gorm:"column:amount_receivable;type:decimal(12,2);comment:应收金额" json:"amountReceivable"`                         // 应收金额
        AmountReceived   decimal.Decimal               `gorm:"column:amount_received;type:decimal(12,2);comment:已收金额" json:"amountReceived"`                             // 已收金额
        AmountTotal      decimal.Decimal               `gorm:"column:amount_total;type:decimal(12,2);comment:总额" json:"amountTotal"`                                     // 总额
        FileId           int                           `gorm:"column:file_id;type:int;comment:附件id" json:"fileId"`                                                       // 附件id
    }
    // ServiceCollectionPlanSearch 收款计划搜索条件