Commit bd702f5d by 王勇飞

gyq

parent 7809a203
......@@ -18,6 +18,7 @@ class BizOptCtl extends CtlBase {
this.queueUrl = settings.queueUrl();
//this.wdyUrl = settings.wdyUrl();
this.dateUtil = system.getObject("util.dateClient");
this.cacheManager = system.getObject("db.common.cacheManager");
}
/**
......@@ -329,7 +330,7 @@ class BizOptCtl extends CtlBase {
}
/*插入数据信息 */
async insertInfo(nobj, qobj, req) {
async insertInfo(obj, qobj, req) {
var pobj = nobj.d;
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined') {
try {
......
......@@ -139,5 +139,27 @@ class DeliverybillCtl extends CtlBase {
return system.getResult(null, err.message)
}
}
}
module.exports = DeliverybillCtl;
\ No newline at end of file
module.exports = DeliverybillCtl;
// var task = new DeliverybillCtl();
// var obj={
// "deliverId":"1111111"
// }
// task.deliverInfo(obj,{},{}).then(d=>{
// console.log(JSON.stringify(d));
// })
(async () => {
var task = new DeliverybillCtl();
var obj = {
"deliverId":"1111111",
"company1": "华为技术有限公司",
"company2": "中兴通讯股份有限公司",
"keyword1":"用户设备,通信领域,通信技术,设备发送,指示信息,通信系统,通信方法,设备接收,对应关系,基站发送,终端发送,用户体验,配置信息,请求消息,数据传输方法,用户终端,网络侧,移动终端,通信设备,传输方法",
"keyword2":"用户体验,移动终端,用户设备,相关技术,网络侧,终端发送,用户终端,配置信息,指示信息,请求消息,对应关系,传输方法,基站发送,通信系统,数据传输方法,通信领域,通信技术,设备发送,响应消息,发送方法"
};
var d = await task.deliverInfo(obj,{},{})
console.log("dddddd---------" + JSON.stringify(d));
})()
......@@ -19,10 +19,28 @@ class FitaxschemeCtl extends CtlBase {
let res = await this.service.insertInfo(pobj);
return system.getResult("新建方案成功!");
} catch (error) {
console.log("fitaxschemeCtl/insertInfo " + error);
console.log("fitaxschemeCtl/insertInfo---------------------------------------------------------------- " + error);
return system.getResultError("fitaxschemeCtl/insertInfo 新建方案出错!");
}
}
}
module.exports = FitaxschemeCtl;
var task = new FitaxschemeCtl();
var obj={
d:{
"demand_code":"20200728103902194844_book",
"solution_bizid":"22222",
"service_type":"代理记账",
"service_name":"海南省三亚市",
"company_type":"特殊行业",
"buy_duration":2,
"remarks":"SaaS",
"taxpayer_type":"小规模纳税人",
"total_cost":"2222"
}
}
task.insertInfo(obj,{},{}).then(d=>{
console.log(JSON.stringify(d));
})
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class TxCache extends CacheBase {
constructor() {
super();
//this.userDao = system.getObject("db.auth.userDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存缓存腾讯队列信息";
}
prefix() {
return "g_txInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = TxCache;
\ No newline at end of file
......@@ -14,9 +14,9 @@ class BizoptDao extends Dao {
//需要添加公司查询条件
qw["facilitator_id"] = Number(qobj.company_id)
// 为空说明是管理员,不需设置组织结构过滤
if (qobj.opath && qobj.opath != "") {
qw["salesman_opcode"] = { [this.db.Op.like]: `%${qobj.opath}%` }
}
// if (qobj.opath && qobj.opath != "") {
// qw["salesman_opcode"] = { [this.db.Op.like]: `%${qobj.opath}%` }
// }
//不是来自平台前端查询
if (qobj.bizpath && qobj.bizpath.indexOf("pmx") < 0) {
console.log("bizpath-------------" + qobj.bizpath);
......
......@@ -22,8 +22,16 @@ class FitaxschemeDao extends Dao {
* @param {*} t
*/
async insertInfo(qobj, t) {
let obj = this.buildObj(qobj);
return await this.create(obj, t);
try{
let obj = this.buildObj(qobj);
console.log("obj------------------------------" + obj);
return await this.create(obj, t);
}
catch (error){
console.log("error-------------------------" + error);
return error;
}
}
buildObj(qobj) {
......
......@@ -49,7 +49,7 @@ module.exports = (db, DataTypes) => {
}, {
paranoid: false,//假的删除
underscored: true,
version: false,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
......
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