zhangweicheng 7 年之前
父節點
當前提交
5a597bb9ce

+ 0 - 193
modules/all_models/ration_glj_temp.js

@@ -1,193 +0,0 @@
-/**
- * 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 rationAssItemSchema = mongoose.Schema({
-    name: String,
-    assistID: Number,
-    assistCode: String,
-    stdValue: Number,
-    actualValue:Number,
-    stepValue: String,
-    decimal: Number,
-    carryBit: String,
-    minValue: String,
-    maxValue: String
-}, { _id: false });
-
-
-/*var gljSchema =new Schema({
- repositoryId: Number,
- ID:Number,
- //以下是基于已有access库
- code: String,
- name: String,
- specs: String,
- unit: String,
- basePrice: Number,
- gljType: Number, //这个是UI显示上的详细分类,对应gljTypeSchema
- shortName: String,  //人工,材料,机械
- gljClass:Number
- },{versionKey:false});
-
- mongoose.model("std_ration_lib_glj_list",gljSchema,"std_ration_lib_glj_list");*/
-
-
-let rationSchema = new Schema({
-    // 公用属性部分
-    ID: String,
-    projectID: Number,
-    billsItemID: String,
-    serialNo: Number,
-    code: String,
-    name: String,
-    unit: String,
-    quantity: String,
-    contain:String,//含量
-    quantityEXP:String,//工程量表达式
-    programID: Number,
-    marketUnitFee: String,
-    marketTotalFee: String,
-    fees: [subSchema.feesSchema],
-    deleteInfo: deleteSchema,
-    type: Number,                               // 1 定额、2 量价、3 工料机定额
-    subType: Number,                            // 子类型:1人工、201材料、301机械、4主材、5设备
-    installationKey:String,//用来记录安装增加费的关联字段
-
-    // 定额特有属性:
-    libID: Number,
-    maskName: String,
-    caption: String,
-    isFromDetail:{type: Number,default:0},       // 1 true 2 false
-    adjustState: String,
-    rationProjName: String,
-    comments: String,                           // 说明
-    flags: [subSchema.flagsSchema],             // 标记字段
-    rationAssList: [rationAssItemSchema],
-    content: String,                            // 工作内容
-    ruleText: String,                            // 计算规则
-
-    //工料机特有属性
-    projectGLJID:Number,  //项目工料机ID
-    GLJID:Number,//工料机库ID
-    original_code:String, //原始编码
-    specs:String,//规格型号
-    shortName:String,//缩写
-    customQuantity:String,//自定义消耗
-    from:{type: String,default:'std'}//std, cpt  来自标准工料机库、补充工料机库
-
-},{versionKey:false});
-
-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");
-
-var rationGljItemSchema = mongoose.Schema({
-    gljId: Number,
-    consumeAmt: Number,
-    proportion: Number //配合比,暂时无需使用,默认0
-}, { _id: false });
-
-var rationAssItemSchema = mongoose.Schema({
-    name: String,
-    assistID: Number,
-    assistCode: String,
-    stdValue: String,
-    stepValue: String,
-    decimal: Number,
-    carryBit: String,
-    minValue: String,
-    maxValue: String
-}, { _id: false });
-
-//定额安装增加费用
-let rationInstSchema = mongoose.Schema({
-    feeItemId: String,
-    sectionId: String
-},{_id: false});
-
-var rationItemSchema = mongoose.Schema({
-    ID:Number,
-    code: String,
-    name: String,
-    unit: String,
-    basePrice: Number,
-    sectionId: Number,
-    rationRepId: Number,
-    caption: String,
-    feeType: Number,
-    jobContent: String,
-    annotation: String,
-    rationGljList: [rationGljItemSchema],
-    rationCoeList: Array,
-    rationAssList: [rationAssItemSchema],
-    rationInstList: [rationInstSchema]
-});
-mongoose.model("std_ration_lib_ration_items",rationItemSchema, "std_ration_lib_ration_items");
-
-let billsSchema = new Schema({
-    ID: String,
-    ParentID: Number,
-    NextSiblingID: Number,
-    projectID: Number,
-    serialNo: Number,
-    chapterID: Number,
-    billsLibId: Number,//清单库ID
-    code: String,
-    fullCode: String,
-    type:Number,
-    isAdd:{type: Number,default:0},//1 true 0 false是否新增
-    name: String,
-    unit: String,
-    quantity: String, // Decimal
-    feeRateID:String,
-    feeRate:String,
-    isFromDetail:{type: Number,default:0},//1 true 2 false
-    programID: Number,
-    comments: String,
-    // 调价
-    xs_Labour: String, // Decimal
-    xs_Material: String, // Decimal
-    xs_Machine: String, // Decimal
-    xs_FeeRate: String, // Decimal
-    xs_LabourPrice: String, // Decimal
-    xs_MaterialPrice: String, // Decimal
-    xs_MachinePrice: String, // Decimal
-    isTender_Labour: Boolean,
-    isTender_Material: Boolean,
-    isTender_Machine: Boolean,
-    tenderTargetPrice: String, // Decimal
-    tenderTargetUnitPrice: String, // Decimal
-    tenderTargetUnitPrice: String, // Decimal
-    // 费用字段
-    fees: [subSchema.feesSchema],
-    // 标记字段
-    flags: [subSchema.flagsSchema],
-    deleteInfo: deleteSchema,
-    installationKey:String//用来记录安装增加费的关联字段
-});
-
-mongoose.model("bills", billsSchema);

+ 1 - 1
modules/all_models/stdRation_coe.js

@@ -22,4 +22,4 @@ const coeListSchema = new Schema({
     coes: [coeSchema]
 }, {versionKey: false});
 
-mongoose.model('std_ration_lib_coe_list', coeListSchema);
+mongoose.model('std_ration_lib_coe_list', coeListSchema,'std_ration_lib_coe_list');

+ 2 - 1
public/cache/std_glj_type_util.js

@@ -1,8 +1,9 @@
 /**
  * Created by Tony on 2017/7/6.
  */
+let mongoose = require('mongoose');
 let cacheUtil = require('./cacheUtil');
-let std_glj_type_mdl = require('../models/std_glj_types');
+let std_glj_type_mdl = mongoose.model("std_glj_type");
 
 const STD_GLJ_GRP = 'std_glj_grp';
 

+ 0 - 15
public/models/delete_schema.js

@@ -1,15 +0,0 @@
-/**
- * Created by Mai on 2017/4/17.
- */
-
-var mongoose = require("mongoose");
-var Schema = mongoose.Schema;
-
-
-var deleteSchema = new Schema({
-    deleted: Boolean,
-    deleteDateTime: Date,
-    deleteBy: Number // userID
-});
-
-module.exports = deleteSchema;

+ 0 - 5
public/models/std_glj_types.js

@@ -1,5 +0,0 @@
-/**
- * Created by Tony on 2017/7/6.
- */
-let mongoose = require('mongoose');
-module.exports = mongoose.model("std_glj_type");

+ 0 - 2
server.js

@@ -20,8 +20,6 @@ dbm.connect();
 fileUtils.getGlobbedFiles('./modules/all_models/*.js').forEach(function(modelPath) {
     require(path.resolve(modelPath));
 })
-//暂时引入其它模块的model
-require('./modules/fee_rates/models/fee_rates');
 
 //引入报表模块
 fileUtils.getGlobbedFiles('./modules/reports/models/*.js').forEach(function(modelPath) {