Commit 0211a33b by 蒋勇

Merge branch 'taskexecutor' of gitlab.gongsibao.com:jiangyong/zhichan into taskexecutor

parents d439ccf1 98bd527e
......@@ -52,7 +52,16 @@ async readxls(path) {
var result= await this.ossC.downfile(keystr);
var localpath="/tmp/"+keystr;
var wb= await this.readxls(localpath);
var parserByCode=require("./rptHandler/"+rptCode);
var ind=rptCode.lastIndexOf("_");
var parsefunc=rptCode;
if(ind>=0){
var st2=rptCode.substring(ind+1);
if(st2=="N"){//是非必传的文件
parsefunc=rptCode.substring(0,ind);
}
}
var parserByCode=require("./rptHandler/"+parsefunc);
var rows=await parserByCode(wb);
console.log(JSON.stringify(rows));
this.apiCallWithAk(settings.fkweb(),{
......
var http = require('http');
var server = http.createServer((req,res) => {
//设置 HTTP 头部,状态码是 200,文件类型是 html,字符集是 utf-8
res.writeHead(200,{"Content-Type":"text/html;charset='utf-8'"});
res.write('<h1>Node.js</h1>');
res.end('Hello World\\n');
})
server.listen(3000);//监听端口号是3000的服务器
console.log("end");
\ No newline at end of file
// var http = require('http');
// var server = http.createServer((req,res) => {
// //设置 HTTP 头部,状态码是 200,文件类型是 html,字符集是 utf-8
// res.writeHead(200,{"Content-Type":"text/html;charset='utf-8'"});
// res.write('<h1>Node.js</h1>');
// res.end('Hello World\\n');
// })
// server.listen(3000);//监听端口号是3000的服务器
// console.log("end");
var str="sdfd_xxx";
var ind=str.lastIndexOf("_");
if(ind>=0){
var st2=str.substring(ind+1);
if(st2=="N"){
var st1=str.substring(0,ind);
console.log(st1);
}else{
console.log(str);
}
}
\ No newline at end of file
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