stdRation_ration.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * Created by Zhong on 2018/3/22.
  3. */
  4. /*定额库-定额*/
  5. const mongoose = require('mongoose');
  6. const Schema = mongoose.Schema;
  7. const rationGljItemSchema = new Schema({
  8. gljId: Number,
  9. consumeAmt: Number,
  10. proportion: Number //配合比,暂时无需使用,默认0
  11. }, { _id: false });
  12. const rationAssItemSchema = new Schema({
  13. name: String,
  14. assistID: Number,
  15. assistCode: String,
  16. stdValue: String,
  17. stepValue: String,
  18. decimal: Number,
  19. carryBit: String,
  20. minValue: String,
  21. maxValue: String,
  22. paramName:String,//参数名称
  23. param:String,//参数
  24. thirdRationCode:String//第三定额
  25. }, { _id: false });
  26. //定额安装增加费用
  27. const rationInstSchema = new Schema({
  28. feeItemId: String,
  29. sectionId: String
  30. },{_id: false});
  31. const rationItemSchema = new Schema({
  32. ID:{type: Number,index: true},
  33. code: String,
  34. name: String,
  35. unit: String,
  36. basePrice: Number,
  37. labourPrice: Number,
  38. materialPrice: Number,
  39. machinePrice: Number,
  40. sectionId: {type: Number,index: true},
  41. rationRepId: Number,
  42. caption: String,
  43. feeType: Number,
  44. jobContent: String,
  45. annotation: String,
  46. manageFeeRate:String,//管理费费率
  47. rationGljList: [rationGljItemSchema],
  48. rationCoeList: Array,
  49. rationAssList: [rationAssItemSchema],
  50. rationInstList: [rationInstSchema],
  51. rationTemplateList : [new Schema({
  52. rationID:Number,
  53. type: String,
  54. billsLocation: String
  55. }, { _id: false })]
  56. });
  57. mongoose.model('std_ration_lib_ration_items', rationItemSchema, 'std_ration_lib_ration_items');