Commit 5b2a033e by 王昆

gsb

parent 460f6e7d
......@@ -20,9 +20,11 @@ class MerchantCtl extends CtlBase {
//数据概览
async dataSummarize(qobj){
var params = qobj || {};
var date = this.getMonthDays(params);
if (params.month) {
let date = this.getMonthDays(params.month);
params.signBegin =date[0];
params.signEnd =date[date.length-1];
}
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.dataSummarize(params);
......@@ -36,10 +38,13 @@ class MerchantCtl extends CtlBase {
//首页图表
async dataChart(qobj){
var params = qobj || {};
var date = this.getMonthDays(params);
if (params.month) {
let date = this.getMonthDays(params.month);
params.signBegin =date[0];
params.signEnd =date[date.length-1];
}
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.dataChart(params);
return system.getResult2(page);
......@@ -62,9 +67,12 @@ class MerchantCtl extends CtlBase {
//统计商户报表 详情
async commercialList(qobj){
var params = qobj || {};
var date = this.getMonthDays(params);
if (params.month) {
let date = this.getMonthDays(params.month);
params.signBegin =date[0];
params.signEnd =date[date.length-1];
}
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.commercialList(params);
return system.getResult2(page);
......@@ -90,9 +98,11 @@ class MerchantCtl extends CtlBase {
//统计报表 个人 图表
async commercialCountToChares(qobj){
var params = qobj || {};
var date = this.getMonthDays(params);
if (params.month) {
let date = this.getMonthDays(params.month);
params.signBegin =date[0];
params.signEnd =date[date.length-1];
}
try {
var page = await this.service.commercialCountToChares(params);
return system.getResult2(page);
......
......@@ -15,7 +15,7 @@ class electroniccontractDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
......
......@@ -15,7 +15,7 @@ class LoadDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
......
......@@ -15,7 +15,7 @@ class RecruitDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
......
......@@ -14,7 +14,7 @@ class TaxinfoDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
......@@ -32,7 +32,7 @@ class TaxinfoDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
......
......@@ -14,13 +14,12 @@ class TransactioninDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
for (var item of list) {
result[item.company_name] = item.num || 0;
result[item.company_name] = item.amount || 0;
}
return result;
}
......@@ -34,12 +33,13 @@ class TransactioninDao extends Dao {
let list = await this.customQuery(sql, {companyNames: companyNames});
if(list || list.length == 0) {
if(!list || list.length == 0) {
return result;
}
for (var item of list) {
result[item.company_name] = item.amount || 0;
// result[item.company_name] = item.amount || 0;
result[item.company_name] = parseFloat((item.amount || 0).toFixed(2));
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment