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
ad70da8e
Commit
ad70da8e
authored
Jan 19, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
1ae9c3cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
+23
-13
No files found.
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
View file @
ad70da8e
...
@@ -96,6 +96,19 @@ class RptTypeService extends ServiceBase{
...
@@ -96,6 +96,19 @@ class RptTypeService extends ServiceBase{
}
}
}
}
buildRpt
(
rpt
,
upinfo
,
comp
,
batchtemp
){
var
rptupload
=
{
companyname
:
upinfo
.
companyName
,
companycode
:
upinfo
.
companyTaxNum
,
rpttypecode
:
rpt
.
code
,
timetypecode
:
upinfo
.
dateType
,
urlpath
:
rpt
.
url
,
rptdate
:
rpt
.
date
?
rpt
.
date
:
'toparse'
,
company_id
:
comp
.
id
,
uploadbatch_id
:
batchtemp
.
id
,
}
return
rptupload
;
}
async
saveRpt
(
upinfo
){
async
saveRpt
(
upinfo
){
return
this
.
db
.
transaction
(
async
t
=>
{
return
this
.
db
.
transaction
(
async
t
=>
{
//构建批量对象
//构建批量对象
...
@@ -117,6 +130,7 @@ class RptTypeService extends ServiceBase{
...
@@ -117,6 +130,7 @@ class RptTypeService extends ServiceBase{
timetypecode
:
upinfo
.
dateType
,
timetypecode
:
upinfo
.
dateType
,
accountstandardcode
:
upinfo
.
accountingType
,
accountstandardcode
:
upinfo
.
accountingType
,
company_id
:
comp
.
id
,
company_id
:
comp
.
id
,
// userkey:null
}
}
//保存批量
//保存批量
var
batchtemp
=
await
this
.
db
.
models
.
uploadbatch
.
create
(
batchobj
,{
transaction
:
t
});
var
batchtemp
=
await
this
.
db
.
models
.
uploadbatch
.
create
(
batchobj
,{
transaction
:
t
});
...
@@ -125,20 +139,16 @@ class RptTypeService extends ServiceBase{
...
@@ -125,20 +139,16 @@ class RptTypeService extends ServiceBase{
{
{
if
(
k
.
indexOf
(
"Report"
)
>=
0
){
if
(
k
.
indexOf
(
"Report"
)
>=
0
){
var
rpts
=
upinfo
[
k
];
var
rpts
=
upinfo
[
k
];
rpts
.
forEach
(
rpt
=>
{
var
esrpts
=
rpts
[
"essential"
];
var
rptupload
=
{
var
unesrpts
=
rpts
[
"unessential"
];
companyname
:
upinfo
.
companyName
,
esrpts
.
forEach
(
rpt
=>
{
companycode
:
upinfo
.
companyTaxNum
,
var
tmprpt
=
this
.
buildRpt
(
rpt
,
upinfo
,
comp
,
batchtemp
);
rpttypecode
:
rpt
.
code
,
rptresult
.
push
(
tmprpt
);
timetypecode
:
upinfo
.
dateType
,
urlpath
:
rpt
.
url
,
rptdate
:
rpt
.
date
,
company_id
:
comp
.
id
,
uploadbatch_id
:
batchtemp
.
id
,
}
rptresult
.
push
(
rptupload
);
});
});
unesrpts
.
forEach
(
rpt
=>
{
var
tmprpt
=
this
.
buildRpt
(
rpt
,
upinfo
,
comp
,
batchtemp
);
rptresult
.
push
(
tmprpt
);
});
}
}
}
}
});
});
...
...
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