Commit 2e47f59c by 蒋勇

d

parent dd63e965
......@@ -11,7 +11,7 @@ class RptTypeService extends ServiceBase{
this.countMap={};//按照报表类型编码顺序号计数
this.posMap={};//位置映射编码--兼容初始公式
this.codeMap={};//编码映射位置,检查是否是否需要新增编码
this.cacheModiRptDate={};
// this.cacheModiRptDate={};
}
async queryPosMap(){
if(Object.keys(this.posMap).length==0){
......@@ -58,7 +58,7 @@ class RptTypeService extends ServiceBase{
});
}
}
var cacheModiRptDate=[];
hisdata.forEach(hd=>{
var pposition=md5(hd.desc);
var h={
......@@ -79,14 +79,12 @@ class RptTypeService extends ServiceBase{
//判断报表编码是否含有_N,如果有,那么就按照报表id去修改报表中的日期字段
if(rptcode.indexOf("_N")>=0){
if(!this.cacheModiRptDate[batchid]){
this.cacheModiRptDate[batchid]=[];
}
var tmps= batchid+"~"+rptid;
//判断是否修改过日期
if(this.cacheModiRptDate[batchid].indexOf(rptid)<0){
if(cacheModiRptDate.indexOf(tmps)<0){
//按照报表ID修改日期 ""
self.db.models.uploadrpt.update({"rptdate":rptdate},{ where: { id: rptid }, transaction: t })
this.cacheModiRptDate[batchid].push(rptid);
cacheModiRptDate.push(tmps);
}
}
......@@ -143,10 +141,6 @@ class RptTypeService extends ServiceBase{
}));
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>sended...........");
self.redisClient.delete("batch"+batchid);
//清空批报表缓存
if(this.cacheModiRptDate[batchid]){
delete this.cacheModiRptDate[batchid]
}
//改变批的状态为解析完毕
batch.batchstatuscode="calc";
await batch.save({transaction:t});
......
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