Просмотр исходного кода

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost into 1.0.0_online

zhongzewei 7 лет назад
Родитель
Сommit
27eb8c80a1
3 измененных файлов с 31 добавлено и 30 удалено
  1. 13 13
      config/config.js
  2. 16 16
      config/db/db_manager.js
  3. 2 1
      modules/ration_glj/facade/glj_calculate_facade.js

+ 13 - 13
config/config.js

@@ -10,23 +10,23 @@ module.exports = {
             pass:'smartcost3850888',
             auth: {
                 "authdb": "admin"
-              },
+            },
             connectTimeoutMS: 50000,
             useMongoClient: true
         }
     },
     test_auth: {
-            server: "120.78.150.216",
-            port: "27017",
-            options:{
-                user:'smartcost',
-                pass:'smartcost3850888',
-                auth: {
-                    "authdb": "scConstruct"
-                },
-                connectTimeoutMS: 20000,
-                useMongoClient: true
-            }
+        server: "120.78.150.216",
+        port: "27017",
+        options:{
+            user:'smartcost',
+            pass:'smartcost3850888',
+            auth: {
+                "authdb": "scConstruct"
+            },
+            connectTimeoutMS: 20000,
+            useMongoClient: true
+        }
     },
     pp:{  server: "172.18.111.231",
         port: "27017",
@@ -76,7 +76,7 @@ module.exports = {
     getLicenseKey:function (env = "local") {
         let me = this;
         if (me[env].LicenseKey){
-           return  me[env].LicenseKey;
+            return  me[env].LicenseKey;
         }else {
             return me.defaultLicenseKey;
         }

+ 16 - 16
config/db/db_manager.js

@@ -11,29 +11,29 @@ module.exports = {
         var dbURL = 'mongodb://' + server + ":" + port + '/' + dbName;
         return mg.createConnection(dbURL);
         /*/
-        if (port) {
-            mg.connect('mongodb://' + server + ":" + port + '/' + dbName);
-        } else {
-            mg.connect('mongodb://' + server + '/' + dbName);
-        }
-        return mg;
-        //*/
+         if (port) {
+         mg.connect('mongodb://' + server + ":" + port + '/' + dbName);
+         } else {
+         mg.connect('mongodb://' + server + '/' + dbName);
+         }
+         return mg;
+         //*/
     },
     getQAConnection: function(dbName) {
         //*/
         return mg.createConnection("mongodb://192.168.1.184:60666/" + dbName);
         /*/
-        mg.connect('mongodb://192.168.1.184:60666/' + dbName);
-        return mg;
-        //*/
+         mg.connect('mongodb://192.168.1.184:60666/' + dbName);
+         return mg;
+         //*/
     },
     getLocalConnection: function(dbName) {
         //*/
         return mg.createConnection("mongodb://localhost/" + dbName);
         /*/
-        mg.connect('mongodb://localhost:27017/' + dbName);
-        return mg;
-        //*/
+         mg.connect('mongodb://localhost:27017/' + dbName);
+         return mg;
+         //*/
     },
     getCfgConnection: function(dbName) {
         var config = require("../config.js");
@@ -42,9 +42,9 @@ module.exports = {
         var dbURL = 'mongodb://' + config.current.server + ":" + config.current.port + '/' + dbName;
         return mg.createConnection(dbURL);
         /*/
-        mg.connect('mongodb://' + config.current.server + ":" + config.current.port + '/' + dbName);
-        return mg;
-        //*/
+         mg.connect('mongodb://' + config.current.server + ":" + config.current.port + '/' + dbName);
+         return mg;
+         //*/
     },
     connect:function (env="local") {
         var config = require("../config.js");

+ 2 - 1
modules/ration_glj/facade/glj_calculate_facade.js

@@ -166,7 +166,8 @@ async function calculateQuantityPerGLJ(glj,gljList,coeList,assList,adjustState,n
                 quantity = calculateQuantityByCustomerCoes(quantity,customerCoe,glj,decimal);
             }
             result.doc.quantity =scMathUtil.roundToString(quantity,decimal);
-            glj.quantity = quantity;//这里保存中间过程计算出来的消耗量,后面处理“+*”操作符时要用到
+            //2019-01-03 需求修改中间过程的价格不参与计算
+            //glj.quantity = quantity;//这里保存中间过程计算出来的消耗量,后面处理“+*”操作符时要用到
         }
         generateAdjustState(glj,coeList,adjustState,gljList,result.doc.quantity);
         return result;