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
5027534b
Commit
5027534b
authored
Feb 11, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
2e47f59c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
6 deletions
+64
-6
fi-taxctl/app/base/api/api.base.js
+3
-1
fi-taxctl/app/base/api/impl/rpt/rptApi.js
+18
-1
fi-taxctl/app/base/db/models/rpt/result.js
+6
-2
fi-taxctl/app/base/db/models/rpt/uploadbatch.js
+4
-0
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
+33
-2
No files found.
fi-taxctl/app/base/api/api.base.js
View file @
5027534b
...
...
@@ -16,7 +16,9 @@ class APIBase extends DocBase {
"rpt.saveRpt"
,
"rpt.queryStatus"
,
"rpt.queryReport"
,
"rpt.queryPosMap"
"rpt.buildWordReport"
,
"rpt.queryPosMap"
,
"rpt.updateTaskRptUrl"
];
var
x
=
lst
.
indexOf
(
fullname
);
return
x
>=
0
;
...
...
fi-taxctl/app/base/api/impl/rpt/rptApi.js
View file @
5027534b
...
...
@@ -79,7 +79,24 @@ class RptAPI extends APIBase{
console
.
log
(
JSON
.
stringify
(
pobj
));
var
x
=
await
this
.
rptService
.
queryStatus
(
pobj
);
return
system
.
getResult
(
x
);
}
}
//{batchid:xxx,rptUrl:xxxx}
async
updateTaskRptUrl
(
pobj
,
query
){
if
(
pobj
){
var
x
=
await
this
.
rptService
.
updateTaskRptUrl
(
pobj
);
return
system
.
getResult
(
x
);
}
else
{
return
system
.
getResult
(
null
);
}
}
async
buildWordReport
(
pobj
,
query
){
if
(
pobj
){
var
x
=
await
this
.
rptService
.
buildWordReport
(
pobj
.
batchid
);
return
system
.
getResult
(
x
);
}
else
{
return
system
.
getResult
(
null
);
}
}
async
queryReport
(
pobj
,
query
){
console
.
log
(
JSON
.
stringify
(
pobj
));
if
(
pobj
){
...
...
fi-taxctl/app/base/db/models/rpt/result.js
View file @
5027534b
...
...
@@ -12,9 +12,13 @@ module.exports = (db, DataTypes) => {
allowNull
:
false
,
},
status
:
{
type
:
DataTypes
.
INTEGER
,
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
}
},
biztype
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
},{
paranoid
:
false
,
//假的删除
underscored
:
true
,
...
...
fi-taxctl/app/base/db/models/rpt/uploadbatch.js
View file @
5027534b
...
...
@@ -76,6 +76,10 @@ module.exports = (db, DataTypes) => {
accountstandardname
:{
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
},
wordrpturl
:{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
}
},{
paranoid
:
true
,
//假的删除
...
...
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
View file @
5027534b
...
...
@@ -163,7 +163,9 @@ class RptTypeService extends ServiceBase{
var
rs
=
await
this
.
db
.
models
.
result
.
findAll
({
where
:{
"BatchNo"
:
batchid
},
attributes
:[
"indexName"
,
"status"
],
raw
:
true
});
var
tmp
=
{};
rs
.
forEach
((
item
=>
{
tmp
[
item
.
indexName
]
=
Number
(
item
.
status
);
if
(
item
.
biztype
==
"ri"
){
tmp
[
item
.
indexName
]
=
Number
(
item
.
status
);
}
}));
var
rptdata
=
await
this
.
apiCallWithoutAk
(
"http://fkrptresult-service/gsb/api/report"
,
tmp
);
if
(
rptdata
){
...
...
@@ -178,7 +180,36 @@ class RptTypeService extends ServiceBase{
}
else
{
return
null
;
}
}
async
updateTaskRptUrl
(
upinfo
){
await
this
.
db
.
models
.
uploadbatch
.
update
({
"wordrpturl"
:
upinfo
.
rptUrl
},{
where
:
{
id
:
upinfo
.
batchid
}});
return
{};
}
//让黄静调用一下
async
buildWordReport
(
batchid
){
var
batch
=
await
this
.
db
.
models
.
uploadbatch
.
findById
(
batchid
);
var
rs
=
await
this
.
db
.
models
.
result
.
findAll
({
where
:{
"BatchNo"
:
batchid
},
attributes
:[
"indexName"
,
"status"
],
raw
:
true
});
var
tmp
=
{};
var
arrayfi
=
[];
rs
.
forEach
((
item
=>
{
if
(
item
.
biztype
==
"ri"
){
tmp
[
item
.
indexName
]
=
Number
(
item
.
status
);
}
else
{
arrayfi
.
push
({
item
[
indexName
]:
item
.
status
});
}
}));
var
paramto
=
{
"Detection_zone"
:
batch
.
batchdate
"CreatTime"
:
batch
.
updated_at
,
"company_name"
:
batch
.
companyname
,
"Task_Num"
:
batch
.
id
,
"fi"
:
arrayfi
,
"ri"
:
tmp
,
}
var
rptdata
=
await
this
.
apiCallWithoutAk
(
"http://fkrptresult-service/gsb/api/report2"
,
paramto
);
//修改
return
{};
}
buildRpt
(
rpt
,
upinfo
,
comp
,
batchtemp
){
var
rptupload
=
{
...
...
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