Commit a06ac430 by 蒋勇

d

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