Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a06ac430
Commit
a06ac430
authored
Feb 10, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
e8d38ea3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
+20
-1
fi-taxctl/app/base/test2.js
+10
-2
No files found.
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
View file @
a06ac430
...
...
@@ -11,7 +11,7 @@ class RptTypeService extends ServiceBase{
this
.
countMap
=
{};
//按照报表类型编码顺序号计数
this
.
posMap
=
{};
//位置映射编码--兼容初始公式
this
.
codeMap
=
{};
//编码映射位置,检查是否是否需要新增编码
this
.
cacheModiRptDate
=
{};
}
async
queryPosMap
(){
if
(
Object
.
keys
(
this
.
posMap
).
length
==
0
){
...
...
@@ -76,6 +76,21 @@ class RptTypeService extends ServiceBase{
nposition
:
hd
.
position
,
};
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
]){
var
rptcodetmp
=
""
;
...
...
@@ -128,6 +143,10 @@ 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
});
...
...
fi-taxctl/app/base/test2.js
View file @
a06ac430
var
x
=
isNaN
(
"2"
)
console
.
log
(
x
);
// var x=isNaN("2")
// 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{
// constructor(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment