Commit 7edeb56f by 李宏达

Merge branch 'ipop-web' of gitlab.gongsibao.com:jiangyong/zhichan into ipop-web

parents a80d57a5 373ce68b
...@@ -14,8 +14,85 @@ class PatentycCtl extends CtlBase { ...@@ -14,8 +14,85 @@ class PatentycCtl extends CtlBase {
async patentrank(pobj,obj,req){ async patentrank(pobj,obj,req){
var result = await this.service.patentrank(obj); var result = await this.service.patentrank(obj);
return System.getResult2(result,null); return System.getResult2(result,null);
} }
//对比分析
async webInsight(pobj,obj,req){
if (obj.type && obj.type != 'undefined'){
var result = await this.service.webInsight(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
else{
return System.getErrResult2("参数type不能为空");
}
}
//智能组合分析-上传数据
async ezReportUploadData(pobj,obj,req){
try{
var result = await this.service.ezReportUploadData(obj);
if (result){
return System.getResult2(result);//"result":true,"uid":"735f9cd0-c103-11ea-9ecd-1d1c3e85a974"}
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
//智能组合分析-判断报告是否生成,用于轮询
async ReadyReport(pobj,obj,req){
if (obj.uid && obj.uid != 'undefined'){
try{
var result = await this.service.ezReadyReport(obj);
if (result == 1){
return System.getResult2(result);
}
else{
return System.getResult2("报告尚未生成");
}
}
catch(error){
return System.getErrResult2(error);
}
}
else{
return System.getErrResult2("参数uid不能为空");
}
}
//智能组合分析-获取报告
async ezGetReport(pobj,obj,req){
if (obj.uid && obj.uid != 'undefined' && obj.type && obj.type != 'undefined'){
try{
var result = await this.service.ezGetReport(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
else{
return System.getErrResult2("参数type和uid不能为空");
}
}
//专利价值评价报告 //专利价值评价报告
async obtainreport(pobj,obj,req){ async obtainreport(pobj,obj,req){
var result = await this.service.obtainreport(obj); var result = await this.service.obtainreport(obj);
...@@ -1310,3 +1387,22 @@ class PatentycCtl extends CtlBase { ...@@ -1310,3 +1387,22 @@ class PatentycCtl extends CtlBase {
} }
module.exports = PatentycCtl; module.exports = PatentycCtl;
// var task = new PatentycCtl();
// var obj = {
// "uid": "667b8300-c101-11ea-98dd-3142bd90eec4",
// "type": "html"
// };
// var d = task.ezGetReport({},obj,{})
// console.log("dddddd---------" + JSON.stringify(d));
// (async ()=>{
// var task = new PatentycCtl();
// var obj = {
// "uid": "735f9cd0-c103-11ea-9ecd-1d1c3e85a974",
// "type": "html"
// };
// var d = await task.ezGetReport({},obj,{})
// console.log("dddddd---------" + JSON.stringify(d));
// })()
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11,7 +11,9 @@ class ExecClient { ...@@ -11,7 +11,9 @@ class ExecClient {
async exec(cmd) { async exec(cmd) {
//await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值 //await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获 //异常需要try/catch自己捕获或外部catch捕获
const {stdout, stderr} = await exec(cmd); const {stdout, stderr} = await exec(cmd,{
maxBuffer: 40960 * 1024
});
return {stdout, stderr}; return {stdout, stderr};
} }
...@@ -49,7 +51,9 @@ class ExecClient { ...@@ -49,7 +51,9 @@ class ExecClient {
async execGet(subData, url) { async execGet(subData, url) {
let cmd = this.FetchGetCmd(subData, url); let cmd = this.FetchGetCmd(subData, url);
console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
console.log(cmd); console.log(cmd);
console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
var result = await this.exec(cmd); var result = await this.exec(cmd);
return result; return result;
} }
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
"gulp-tap": "^1.0.1", "gulp-tap": "^1.0.1",
"imagemin-pngquant": "^7.0.0", "imagemin-pngquant": "^7.0.0",
"merge-stream": "^2.0.0", "merge-stream": "^2.0.0",
"minimist": "^1.2.0" "minimist": "^1.2.0",
"soap": "^0.31.0"
} }
} }
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