stdRation_ration.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. lossRateID: String,
  12. lossRateNo: Number,
  13. lossRateName: String,
  14. lossRate: Number,
  15. }, { _id: false });
  16. const rationAssItemSchema = new Schema({
  17. name: String,
  18. assistID: Number,
  19. assistCode: String,
  20. stdValue: String,
  21. stepValue: String,
  22. decimal: Number,
  23. carryBit: String,
  24. minValue: String,
  25. maxValue: String,
  26. paramName: String,//参数名称
  27. param: String,//参数
  28. thirdRationCode: String//第三定额
  29. }, { _id: false });
  30. //定额安装增加费用
  31. const rationInstSchema = new Schema({
  32. feeItemId: String,
  33. sectionId: String
  34. }, { _id: false });
  35. const rationItemSchema = new Schema({
  36. ID: Number,
  37. code: String,
  38. name: String,
  39. unit: String,
  40. basePrice: Number,
  41. labourPrice: Number,
  42. materialPrice: Number,
  43. machinePrice: Number,
  44. sectionId: Number,
  45. rationRepId: { type: Number, index: true },
  46. caption: String,
  47. feeType: Number,
  48. jobContent: String,
  49. annotation: String,
  50. manageFeeRate: String, // 管理费费率
  51. rationGljList: [rationGljItemSchema],
  52. rationCoeList: Array,
  53. rationAssList: [rationAssItemSchema],
  54. rationInstList: [rationInstSchema],
  55. rationTemplateList: {
  56. type: Array,
  57. default: []
  58. },
  59. jobContentText: String,//默认的工作内容
  60. manageFee1: Number, // 1类地区管理费
  61. manageFee2: Number, // 2类地区管理费
  62. manageFee3: Number, // 3类地区管理费
  63. manageFee4: Number, // 4类地区管理费
  64. isDeleted: { type: Boolean, default: false }
  65. });
  66. mongoose.model('std_ration_lib_ration_items', rationItemSchema, 'std_ration_lib_ration_items');