1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- /**
- * Created by chen on 2017/6/29.
- */
- let subSchema = require("../../main/models/bills_sub_schemas");
- let deleteSchema = require('../../../public/models/delete_schema');
- var mongoose = require('mongoose'),
- Schema = mongoose.Schema;
- //下面是临时代码,以后删除
- var gljSchema =new Schema({
- repositoryId: Number,
- ID:Number,
- //以下是基于已有access库
- code: String,
- name: String,
- specs: String,
- unit: String,
- basePrice: Number,
- gljType: Number, //这个是UI显示上的详细分类,对应gljTypeSchema
- gljDistType: String //人工,材料,机械
- },{versionKey:false});
- mongoose.model("std_ration_lib_glj_list",gljSchema,"std_ration_lib_glj_list");
- let rationSchema = new Schema({
- ID: Number,
- projectID: Number,
- billsItemID: Number,
- serialNo: Number,
- libID: Number,
- code: String,
- name: String,
- maskName: String,
- unit: String,
- quantity: String, // Decimal
- programID: Number,
- adjustState: String,
- content: String,
- rationProjName: String,
- comments: String,
- // 费用字段
- fees: [subSchema.feesSchema],
- // 标记字段
- flags: [subSchema.flagsSchema],
- deleteInfo: deleteSchema
- });
- mongoose.model("ration", rationSchema, "ration");
- var coeSchema = mongoose.Schema({
- coeType: String, // 系数类型,指作用范围:
- // 单个(如:111量0.001)、人工类、材料类、机械类、全部(如:定额×0.925)。
- gljID: Number, // 要调整的工料机ID(当coeType=0时有效)
- operator: String, // 运算符(*、+、-、=)
- amount: String, // 调整的量
- _id: false
- });
- var coeListSchema = mongoose.Schema({
- libID: Number, // 所属定额定ID
- ID: Number, // 系数ID(流水号ID)
- name: String, // 名称
- content: String, // 说明
- coes: [coeSchema]
- }, {versionKey: false});
- mongoose.model("std_ration_lib_coe_list",coeListSchema, "std_ration_lib_coe_list");
|