Commit fe13d35d by 赵庆

gsb

parent e93881c8
var system = require("../../../system") var system = require("../../../system")
const CtlBase = require("../../ctl.base"); const CtlBase = require("../../ctl.base");
class CompanysCtl extends CtlBase { class ElectronicContractCtl extends CtlBase {
constructor() { constructor() {
super("all", CtlBase.getServiceName(CompanysCtl)); super("all", CtlBase.getServiceName(ElectronicContractCtl));
} }
async allList(qobj){ async allList(qobj){
...@@ -20,4 +20,4 @@ class CompanysCtl extends CtlBase { ...@@ -20,4 +20,4 @@ class CompanysCtl extends CtlBase {
} }
module.exports = CompanysCtl; module.exports = ElectronicContractCtl;
\ No newline at end of file \ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class LoadCtl extends CtlBase {
constructor() {
super("all", CtlBase.getServiceName(LoadCtl));
}
async allList(qobj){
var params = qobj.search || {};
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.signPage(params);
return system.getResult2(page);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
}
}
}
module.exports = LoadCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class MerchantCtl extends CtlBase {
constructor() {
super("all", CtlBase.getServiceName(MerchantCtl));
}
async allList(qobj){
var params = qobj.search || {};
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.signPage(params);
return system.getResult2(page);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
}
}
}
module.exports = MerchantCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class RecruitCtl extends CtlBase {
constructor() {
super("all", CtlBase.getServiceName(RecruitCtl));
}
async allList(qobj){
var params = qobj.search || {};
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.signPage(params);
return system.getResult2(page);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
}
}
}
module.exports = RecruitCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class TaxinfoCtl extends CtlBase {
constructor() {
super("all", CtlBase.getServiceName(TaxinfoCtl));
}
async allList(qobj){
var params = qobj.search || {};
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.signPage(params);
return system.getResult2(page);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
}
}
}
module.exports = TaxinfoCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class TransactioninCtl extends CtlBase {
constructor() {
super("all", CtlBase.getServiceName(TransactioninCtl));
}
async allList(qobj){
var params = qobj.search || {};
this.doTimeCondition(params, ["signBegin", "signEnd"]);
try {
var page = await this.service.signPage(params);
return system.getResult2(page);
} catch (e) {
console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试");
}
}
}
module.exports = TransactioninCtl;
\ No newline at end of file
const system = require("../../../system"); const system = require("../../../system");
const Dao = require("../../dao.base"); const Dao = require("../../dao.base");
class CompanysDao extends Dao { class electroniccontractDao extends Dao {
constructor() { constructor() {
super(Dao.getModelName(CompanysDao)); super(Dao.getModelName(electroniccontractDao));
} }
} }
module.exports = CompanysDao; module.exports = electroniccontractDao;
\ No newline at end of file \ No newline at end of file
const system = require("../../../system");
const Dao = require("../../dao.base");
class LoadDao extends Dao {
constructor() {
super(Dao.getModelName(LoadDao));
}
}
module.exports = LoadDao;
\ No newline at end of file
const system = require("../../../system");
const Dao = require("../../dao.base");
class MerchantDao extends Dao {
constructor() {
super(Dao.getModelName(MerchantDao));
}
}
module.exports = MerchantDao;
\ No newline at end of file
const system = require("../../../system");
const Dao = require("../../dao.base");
class RecruitDao extends Dao {
constructor() {
super(Dao.getModelName(RecruitDao));
}
}
module.exports = RecruitDao;
\ No newline at end of file
const system = require("../../../system");
const Dao = require("../../dao.base");
class TaxinfoDao extends Dao {
constructor() {
super(Dao.getModelName(TaxinfoDao));
}
}
module.exports = TaxinfoDao;
\ No newline at end of file
const system = require("../../../system");
const Dao = require("../../dao.base");
class TransactioninDao extends Dao {
constructor() {
super(Dao.getModelName(TransactioninDao));
}
}
module.exports = TransactioninDao;
\ No newline at end of file
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('electroniccontract', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
company_name: {
type: DataTypes.STRING(255),
allowNull: true
},
usc_code: {
type: DataTypes.STRING(255),
allowNull: true
},
name: {
type: DataTypes.STRING(255),
allowNull: true
},
id_no: {
type: DataTypes.STRING(255),
allowNull: true
},
phone_no: {
type: DataTypes.STRING(255),
allowNull: true
},
bank_no: {
type: DataTypes.STRING(255),
allowNull: true
},
completed_date: {
type: DataTypes.STRING(255),
allowNull: true
},
file_url: {
type: DataTypes.STRING(255),
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: true
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
version: {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
},
redundance_1: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_2: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_3: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_4: {
type: DataTypes.STRING(255),
allowNull: true
}
}, {
tableName: 'electronic_contract_info'
});
};
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('load', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
company_name: {
type: DataTypes.STRING(255),
allowNull: true
},
usc_code: {
type: DataTypes.STRING(255),
allowNull: true
},
name: {
type: DataTypes.STRING(255),
allowNull: true
},
workload: {
type: DataTypes.STRING(255),
allowNull: true
},
compre_salary: {
type: DataTypes.DECIMAL,
allowNull: true
},
affirm_time: {
type: DataTypes.DECIMAL,
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: true
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
version: {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
},
redundance_1: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_2: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_3: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_4: {
type: DataTypes.STRING(255),
allowNull: true
}
}, {
tableName: 'load_info'
});
};
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) { module.exports = function(sequelize, DataTypes) {
return sequelize.define('companys', { return sequelize.define('merchant', {
id: { id: {
type: DataTypes.INTEGER(11), type: DataTypes.INTEGER(11),
allowNull: false, allowNull: false,
...@@ -10,35 +12,39 @@ module.exports = function(sequelize, DataTypes) { ...@@ -10,35 +12,39 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.STRING(255), type: DataTypes.STRING(255),
allowNull: true allowNull: true
}, },
type: { usc_code: {
type: DataTypes.INTEGER(1),
allowNull: true
},
linkman: {
type: DataTypes.STRING(255), type: DataTypes.STRING(255),
allowNull: true allowNull: true
}, },
type: {
type: DataTypes.CHAR(2),
allowNull: false
},
link_man: {
type: DataTypes.STRING(32),
allowNull: false
},
link_no: { link_no: {
type: DataTypes.STRING(255), type: DataTypes.STRING(20),
allowNull: true allowNull: true
}, },
link_email: { link_email: {
type: DataTypes.STRING(255), type: DataTypes.STRING(50),
allowNull: true allowNull: true
}, },
bank_account_name: { bank_account_name: {
type: DataTypes.STRING(255), type: DataTypes.STRING(30),
allowNull: true allowNull: false
}, },
open_bank: { bank_no: {
type: DataTypes.STRING(255), type: DataTypes.STRING(30),
allowNull: true allowNull: false
}, },
bank_account: { open_bank: {
type: DataTypes.STRING(255), type: DataTypes.STRING(255),
allowNull: true allowNull: false
}, },
company_nameA: { sign_body: {
type: DataTypes.STRING(255), type: DataTypes.STRING(255),
allowNull: true allowNull: true
}, },
...@@ -64,9 +70,26 @@ module.exports = function(sequelize, DataTypes) { ...@@ -64,9 +70,26 @@ module.exports = function(sequelize, DataTypes) {
}, },
version: { version: {
type: DataTypes.INTEGER(11), type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
},
redundance_1: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_2: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_3: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_4: {
type: DataTypes.STRING(255),
allowNull: true allowNull: true
} }
}, { }, {
tableName: 'tb_companys', tableName: 'merchant_info'
}); });
}; };
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('recruit', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
company_name: {
type: DataTypes.STRING(255),
allowNull: true
},
recruit_name: {
type: DataTypes.STRING(255),
allowNull: true
},
publish_date: {
type: DataTypes.DATE,
allowNull: true
},
phone_no: {
type: DataTypes.INTEGER(11),
allowNull: true
},
recruit_count: {
type: DataTypes.INTEGER(11),
allowNull: true
},
pay_type: {
type: DataTypes.INTEGER(11),
allowNull: true
},
age_range: {
type: DataTypes.STRING(255),
allowNull: true
},
compre_salary: {
type: DataTypes.BIGINT,
allowNull: true
},
work_address: {
type: DataTypes.STRING(255),
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: true
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
version: {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
}
}, {
tableName: 'recruit_info'
});
};
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('taxinfo', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
name: {
type: DataTypes.STRING(255),
allowNull: true
},
id_no: {
type: DataTypes.STRING(30),
allowNull: true
},
actual_amount: {
type: DataTypes.STRING(20),
allowNull: true
},
income_tax: {
type: DataTypes.STRING(20),
allowNull: true
},
tax_time: {
type: DataTypes.DATE,
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: true
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
version: {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
}
}, {
tableName: 'tax_info'
});
};
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('transactionin', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
company_name: {
type: DataTypes.STRING(255),
allowNull: true
},
id_name: {
type: DataTypes.STRING(20),
allowNull: true
},
id_no: {
type: DataTypes.STRING(50),
allowNull: true
},
bank_no: {
type: DataTypes.STRING(50),
allowNull: true
},
actual_amount: {
type: DataTypes.STRING(20),
allowNull: true
},
transaction_time: {
type: DataTypes.DATE,
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: true
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
deleted_at: {
type: DataTypes.DATE,
allowNull: true
},
version: {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
},
redundance_1: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_2: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_3: {
type: DataTypes.STRING(255),
allowNull: true
},
redundance_4: {
type: DataTypes.STRING(255),
allowNull: true
}
}, {
tableName: 'transaction_info'
});
};
...@@ -2,9 +2,9 @@ const system = require("../../../system"); ...@@ -2,9 +2,9 @@ const system = require("../../../system");
const ServiceBase = require("../../sve.base"); const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings"); const settings = require("../../../../config/settings");
class CompanysService extends ServiceBase { class ElectronicContractService extends ServiceBase {
constructor() { constructor() {
super("all", ServiceBase.getDaoName(CompanysService)); super("all", ServiceBase.getDaoName(ElectronicContractService));
} }
async signPage(params) { async signPage(params) {
...@@ -21,7 +21,7 @@ class CompanysService extends ServiceBase { ...@@ -21,7 +21,7 @@ class CompanysService extends ServiceBase {
var orderby = [ var orderby = [
["id", 'desc'] ["id", 'desc']
]; ];
var attributes = [`id`, `company_name`, `type`, `linkman`, `link_no`, `link_email`, `bank_account_name`, `open_bank`, `bank_account`, `company_nameA`, `begin_time`, `invalid_time`]; var attributes = [`id`, `company_name`, `name`, `id_no`, `phone_no`, `bank_no`, `completed_date`, `file_url`, `sign_body`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes); var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) { if (page && page.rows) {
for (var row of page.rows) { for (var row of page.rows) {
...@@ -33,4 +33,4 @@ class CompanysService extends ServiceBase { ...@@ -33,4 +33,4 @@ class CompanysService extends ServiceBase {
} }
module.exports = CompanysService; module.exports = ElectronicContractService;
\ No newline at end of file \ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class LoadService extends ServiceBase {
constructor() {
super("all", ServiceBase.getDaoName(LoadService));
}
async signPage(params) {
var currentPage = Number(params.currentPage || 0);
var pageSize = Number(params.pageSize || 10);
var where = {};
if (params.company_name) {
where.company_name = {
[this.db.Op.like]: "%" + params.company_name + "%"
};
}
this.addWhereTime(where, 'begin_time', params.signBegin, params.signEnd, true);
var orderby = [
["id", 'desc']
];
var attributes = [`id`, `company_name`, `name`, `phone_no`, `id_no`, `bankno`, `workload`, `compre_salary`, `affirm_time`, `sign_body`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) {
for (var row of page.rows) {
this.handleDate(row, ["begin_time", "invalid_time"]);
}
}
return page;
}
}
module.exports = LoadService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class MerchantService extends ServiceBase {
constructor() {
super("all", ServiceBase.getDaoName(MerchantService));
}
async signPage(params) {
var currentPage = Number(params.currentPage || 0);
var pageSize = Number(params.pageSize || 10);
var where = {};
if (params.company_name) {
where.company_name = {
[this.db.Op.like]: "%" + params.company_name + "%"
};
}
this.addWhereTime(where, 'begin_time', params.signBegin, params.signEnd, true);
var orderby = [
["id", 'desc']
];
var attributes = [`id`, `company_name`, `type`, `link_man`, `link_no`, `link_email`, `bank_account_name`, `bank_no`, `open_bank`, `sign_body`, `begin_time`, `invalid_time`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) {
for (var row of page.rows) {
this.handleDate(row, ["begin_time", "invalid_time"]);
}
}
return page;
}
}
module.exports = MerchantService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class RecruitService extends ServiceBase {
constructor() {
super("all", ServiceBase.getDaoName(RecruitService));
}
async signPage(params) {
var currentPage = Number(params.currentPage || 0);
var pageSize = Number(params.pageSize || 10);
var where = {};
if (params.company_name) {
where.company_name = {
[this.db.Op.like]: "%" + params.company_name + "%"
};
}
this.addWhereTime(where, 'begin_time', params.signBegin, params.signEnd, true);
var orderby = [
["id", 'desc']
];
var attributes = [`id`, `company_name`, `recruit_name`, `publish_date`, `phone_no`, `recruit_count`, `pay_type`, `age_range`, `compre_salary`, `work_address`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) {
for (var row of page.rows) {
this.handleDate(row, ["begin_time", "invalid_time"]);
}
}
return page;
}
}
module.exports = RecruitService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TaxinfoService extends ServiceBase {
constructor() {
super("all", ServiceBase.getDaoName(TaxinfoService));
}
async signPage(params) {
var currentPage = Number(params.currentPage || 0);
var pageSize = Number(params.pageSize || 10);
var where = {};
if (params.id_no) {
where.id_no = {
[this.db.Op.like]: "%" + params.id_no + "%"
};
}
this.addWhereTime(where, 'begin_time', params.signBegin, params.signEnd, true);
var orderby = [
["id", 'desc']
];
var attributes = [`id`, `company_name`, `name`, `id_no`, `actual_amount`, `income_tax`, `tax_time`, `sign_body`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) {
for (var row of page.rows) {
this.handleDate(row, ["begin_time", "invalid_time"]);
}
}
return page;
}
}
module.exports = TaxinfoService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TransactioninService extends ServiceBase {
constructor() {
super("all", ServiceBase.getDaoName(TransactioninService));
}
async signPage(params) {
var currentPage = Number(params.currentPage || 0);
var pageSize = Number(params.pageSize || 10);
var where = {};
if (params.company_name) {
where.company_name = {
[this.db.Op.like]: "%" + params.company_name + "%"
};
}
this.addWhereTime(where, 'begin_time', params.signBegin, params.signEnd, true);
var orderby = [
["id", 'desc']
];
var attributes = [`id`, `company_name`, `id_name`, `id_no`, `bank_no`, `actual_amount`, `transaction_time`, `sign_body`];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) {
for (var row of page.rows) {
this.handleDate(row, ["begin_time", "invalid_time"]);
}
}
return page;
}
}
module.exports = TransactioninService;
\ No newline at end of file
...@@ -6,11 +6,11 @@ var settings={ ...@@ -6,11 +6,11 @@ var settings={
db:10, db:10,
}, },
database:{ database:{
dbname : "bpo_stat", dbname : "stat",
user: "write", user: "root",
password: "write", password: "!@#Qaz741",
config: { config: {
host: '192.168.18.237', host: 'rm-2ze5muw8tb37i3ig4lo.mysql.rds.aliyuncs.com',
port: 3306, port: 3306,
// host: '43.247.184.35', // host: '43.247.184.35',
// port: 8899,s // port: 8899,s
......
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