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
9bb97721
Commit
9bb97721
authored
Dec 24, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
9e723c32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletions
+32
-1
fi-taxctl/app/base/api/impl/rpt/rptApi.js
+4
-0
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
+28
-1
No files found.
fi-taxctl/app/base/api/impl/rpt/rptApi.js
View file @
9bb97721
...
...
@@ -65,6 +65,10 @@ class RptAPI extends APIBase{
var
x
=
await
this
.
rptService
.
saveRpt
(
pobj
);
return
system
.
getResult
(
x
);
}
async
saveRptHistory
(
pobj
,
query
){
var
x
=
await
this
.
rptService
.
saveRptHistory
(
pobj
);
return
system
.
getResult
(
x
);
}
exam
(){
return
"xxx"
;
}
...
...
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
View file @
9bb97721
...
...
@@ -6,6 +6,33 @@ class RptTypeService extends ServiceBase{
super
(
"auth"
,
ServiceBase
.
getDaoName
(
RptTypeService
));
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
async
saveRptHistory
(
hs
){
var
self
=
this
;
return
this
.
db
.
transaction
(
async
t
=>
{
var
hisarray
=
[];
var
batchid
=
hs
.
batchid
;
var
batch
=
await
this
.
db
.
models
.
uploadbatch
.
findById
(
batchid
);
var
hisdata
=
hs
.
hisdata
;
var
rptdate
=
hs
.
rptdate
;
var
rptcode
=
hs
.
rptcode
;
hisdata
.
forEach
(
hd
=>
{
var
h
=
{
companycode
:
batch
.
companycode
,
companyname
:
batch
.
companyname
,
timetypecode
:
batch
.
timetypecode
,
batchdate
:
batch
.
batchdate
,
dateym
:
rptdate
,
rpttypecode
:
rptcode
,
position
:
hd
.
position
,
valstr
:
hd
.
valstr
,
desc
:
hd
.
desc
};
hisarray
.
push
(
h
);
});
self
.
db
.
rpthistory
.
bulkCreate
(
hisarray
,{
transaction
:
t
});
return
{};
});
}
async
saveRpt
(
upinfo
){
return
this
.
db
.
transaction
(
async
t
=>
{
//构建批量对象
...
...
@@ -55,7 +82,7 @@ class RptTypeService extends ServiceBase{
await
this
.
db
.
models
.
uploadrpt
.
bulkCreate
(
rpts
,{
transaction
:
t
});
try
{
rpts
.
forEach
((
rpt
)
=>
{
await
this
.
redisClient
.
notifyConsume
(
"k8stask"
,
"docurls"
,
rpt
.
rpttypecode
+
"~"
+
rpt
.
urlpath
);
await
this
.
redisClient
.
notifyConsume
(
"k8stask"
,
"docurls"
,
rpt
.
rpt
date
+
"~"
+
rpt
.
rpt
typecode
+
"~"
+
rpt
.
urlpath
);
});
}
catch
(
e
){
//需要记录要清理的批号历史数据
...
...
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