process.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package model
  2. import (
  3. "time"
  4. "go.mongodb.org/mongo-driver/bson/primitive"
  5. )
  6. // 工序管理 用于选择模板
  7. type Process struct {
  8. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  9. Name string `bson:"name,omitempty" json:"name"`
  10. Unit string `bson:"unit,omitempty" json:"unit"`
  11. Norm string `bson:"norm,omitempty" json:"norm"`
  12. Price float64 `bson:"price,omitempty" json:"price"`
  13. // 分类
  14. Category string `bson:"category,omitempty" json:"category"`
  15. // 单个工艺备注
  16. Remark string `bson:"remark,omitempty" json:"remark"`
  17. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  18. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  19. }
  20. // 算到采购单里面
  21. type ProcessBill struct {
  22. //名字
  23. Name string `bson:"name,omitempty" json:"name"`
  24. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  25. //名字
  26. Type string `bson:"type,omitempty" json:"type"`
  27. //规格(质量要求)
  28. Norm string `bson:"norm,omitempty" json:"norm"`
  29. //数量
  30. Count int `bson:"count,omitempty" json:"count"`
  31. // 下单数量
  32. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  33. // 单位
  34. Unit string `bson:"unit,omitempty" json:"unit"`
  35. //单价
  36. Price float64 `bson:"price,omitempty" json:"price"`
  37. // 金额
  38. //备注
  39. Remark string `bson:"remark,omitempty" json:"remark"`
  40. //交货时间
  41. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  42. //确认收货数量
  43. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  44. }
  45. type ProcessData struct {
  46. Id string `bson:"id,omitempty" json:"id"`
  47. //所有工艺
  48. ProcessInfo *Process `bson:"processInfo,omitempty" json:"processInfo"`
  49. Supplier *SupplierPriceVo `bson:"supplier,omitempty" json:"supplier"`
  50. BillId string `bson:"billId,omitempty" json:"billId"`
  51. Remark string `bson:"remark,omitempty" json:"remark"` //备注
  52. // 实际金额
  53. RealPrice float64 `bson:"realPrice,omitempty" json:"realPrice"`
  54. // 下单数量
  55. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  56. //确认收货数量
  57. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  58. }