Commit fa903c92 by Sxy

Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax

parents eb660546 87ff6cd6
......@@ -5,16 +5,16 @@ class FitaxschemeDao extends Dao {
super(Dao.getModelName(FitaxschemeDao));
}
/**
*查询
*@param {*} qobj
*/
async findInfo(qobj) {
let obj = {
"demand_code": qobj.demand_code,// 需求编码
/**
*查询
*@param {*} qobj
*/
async findInfo(qobj) {
let obj = {
"demand_code": qobj.demand_code,// 需求编码
}
return await this.findOne(obj);
}
return await this.findOne(obj);
}
/**
* 插入方案信息
......@@ -23,16 +23,26 @@ class FitaxschemeDao extends Dao {
* @param {*} t
*/
async insertInfo(qobj, t) {
try{
try {
let obj = this.buildObj(qobj);
console.log("obj------------------------------" + obj);
return await this.create(obj, t);
}
catch (error){
catch (error) {
console.log("error-------------------------" + error);
return error;
}
}
/**
*更新方案编号
*@param {*} qobj
* @param {*} t
*/
async updateInfo(qobj, t) {
let obj = this.buildObj(qobj);
let whereObj = { "demand_code": obj.demand_code };
return await this.updateByWhere(obj, whereObj, t);
}
buildObj(qobj) {
......@@ -69,7 +79,7 @@ class FitaxschemeDao extends Dao {
return obj;
}
async findInfoByBizid(qobj){
async findInfoByBizid(qobj) {
let obj = {
"solution_bizid": qobj.bizId
}
......
......@@ -22,5 +22,12 @@ class FitaxschemeService extends ServiceBase {
async findInfoByBizid(qobj){
return await this.dao.findInfoByBizid(qobj);
}
async updateInfo(qobj) {//更新方案信息
var self = this;
return await self.db.transaction(async function (t) {
return await self.dao.updateInfo(qobj, t);
})
}
}
module.exports = FitaxschemeService;
\ No newline at end of file
......@@ -380,7 +380,7 @@ class System {
static async queueOper(obj) {
if (obj.pushUrl && obj.actionType && obj.messageBody) {
try {
var exec = this.getObject("util.execClient");
var rc = this.getObject("util.execClient");
var reqUrl = settings.queueUrl;
var param = {
actionType: "produceData",
......@@ -401,7 +401,7 @@ class System {
param.requestId = obj.requestId;
}
var result = await exec.execPost(param, reqUrl);
var result = await rc.execPost(param, reqUrl);
var j = JSON.parse(result.stdout);
if (j.status == 1) {
return this.getResult(j);
......
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