Commit 06f681e1 by 蒋勇

d

parent 6ab1b3a5
...@@ -61,13 +61,21 @@ class RptTypeService extends ServiceBase{ ...@@ -61,13 +61,21 @@ class RptTypeService extends ServiceBase{
}}); }});
} }
async queryReport(batchid){ async queryReport(batchid){
var batch=await this.db.models.uploadbatch.findById(batchid);
var rs=await this.db.models.result.findAll({where:{"BatchNo":batchid},attributes:["indexName","status"],raw:true}); var rs=await this.db.models.result.findAll({where:{"BatchNo":batchid},attributes:["indexName","status"],raw:true});
var tmp={}; var tmp={};
rs.forEach((item=>{ rs.forEach((item=>{
tmp[item.indexName]=Number(item.status); tmp[item.indexName]=Number(item.status);
})); }));
var rptdata=await this.apiCallWithoutAk("http://fkrptresult-service/gsb/api/report",tmp); var rptdata=await this.apiCallWithoutAk("http://fkrptresult-service/gsb/api/report",tmp);
return rptdata; var rtn={
batchdate:batch.batchdate,
rptdate:batch.updated_at,
companyName:batch.companyname,
taxCode:batch.companycode,
results:rptdata,
};
return rtn;
} }
async saveRpt(upinfo){ async saveRpt(upinfo){
return this.db.transaction(async t=>{ return this.db.transaction(async t=>{
......
...@@ -228,15 +228,12 @@ class RedisClient { ...@@ -228,15 +228,12 @@ class RedisClient {
} }
module.exports = RedisClient; module.exports = RedisClient;
var client=new RedisClient(); // var client=new RedisClient();
(async ()=>{ // (async ()=>{
await client.rpush("riskmq",JSON.stringify({ // var x=await client.rpop("riskmq");
key:"riskmq", // var m=JSON.parse(x);
content:"mmffddfd" // console.log(m);
})); // })()
console.log("end");
})()
// client.keys('*').then(s=>{ // client.keys('*').then(s=>{
// console.log(s); // console.log(s);
......
...@@ -3,7 +3,7 @@ var settings={ ...@@ -3,7 +3,7 @@ var settings={
host: "43.247.184.32", host: "43.247.184.32",
port: 8967, port: 8967,
password: "Gongsibao2018", password: "Gongsibao2018",
db: 15, db: 2,
}, },
database: { database: {
dbname: "fktaxctl", dbname: "fktaxctl",
......
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