process.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  27. //名字
  28. Type string `bson:"type,omitempty" json:"type"`
  29. //规格(质量要求)
  30. Norm string `bson:"norm,omitempty" json:"norm"`
  31. //数量
  32. Count int `bson:"count,omitempty" json:"count"`
  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. type ProcessData struct {
  44. Id string `bson:"id,omitempty" json:"id"`
  45. //所有工艺
  46. ProcessInfo *Process `bson:"crafts,omitempty" json:"crafts"`
  47. Supplier *SupplierPriceVo `bson:"supplier,omitempty" json:"supplier"`
  48. BatchCount int `bson:"batchCount,omitempty" json:"batchCount"` //拼版数量
  49. BatchSizeWidth int `bson:"batchSizeWidth,omitempty" json:"batchSizeWidth"` //平板尺寸
  50. BatchSizeHeight int `bson:"batchSizeHeight,omitempty" json:"batchSizeHeight"` //平板尺寸
  51. BillId string `bson:"billId,omitempty" json:"billId"`
  52. Remark string `bson:"remark,omitempty" json:"remark"` //备注
  53. //确认收货数量
  54. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  55. }