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
2874a4ca
Commit
2874a4ca
authored
Dec 26, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
aa1372b4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
272 deletions
+63
-272
fi-taxctl/app/base/api/api.base.js
+2
-1
fi-taxctl/app/base/api/impl/rpt/rptApi.js
+1
-3
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
+14
-10
fi-taxctl/app/base/utils/redisClient.js
+5
-0
fi-taxctl/app/config/localsettings.js
+1
-1
fi-taxctl/app/config/settings.js
+40
-257
No files found.
fi-taxctl/app/base/api/api.base.js
View file @
2874a4ca
...
...
@@ -12,7 +12,8 @@ class APIBase extends DocBase {
async
isExistInNoAuthMainfest
(
gname
,
methodname
)
{
var
fullname
=
gname
+
"."
+
methodname
;
var
lst
=
[
"rpt.saveRptHistory"
"rpt.saveRptHistory"
,
"rpt.saveRpt"
];
var
x
=
lst
.
indexOf
(
fullname
);
return
x
>=
0
;
...
...
fi-taxctl/app/base/api/impl/rpt/rptApi.js
View file @
2874a4ca
...
...
@@ -62,13 +62,11 @@ class RptAPI extends APIBase{
]
}*/
async
saveRpt
(
pobj
,
query
){
var
x
=
await
this
.
rptService
.
saveRpt
(
pobj
);
return
system
.
getResult
(
x
);
}
async
saveRptHistory
(
pobj
,
query
){
console
.
log
(
JSON
.
stringify
(
pobj
));
return
{};
console
.
log
(
JSON
.
stringify
(
pobj
));
var
x
=
await
this
.
rptService
.
saveRptHistory
(
pobj
);
return
system
.
getResult
(
x
);
}
...
...
fi-taxctl/app/base/service/impl/rpt/rpttypeSve.js
View file @
2874a4ca
...
...
@@ -10,6 +10,7 @@ class RptTypeService extends ServiceBase{
var
self
=
this
;
return
this
.
db
.
transaction
(
async
t
=>
{
var
hisarray
=
[];
var
rptid
=
hs
.
rptid
;
var
batchid
=
hs
.
batchid
;
var
batch
=
await
this
.
db
.
models
.
uploadbatch
.
findById
(
batchid
);
var
hisdata
=
hs
.
hisdata
;
...
...
@@ -25,11 +26,12 @@ class RptTypeService extends ServiceBase{
rpttypecode
:
rptcode
,
position
:
hd
.
position
,
valstr
:
hd
.
valstr
,
desc
:
hd
.
desc
desc
:
hd
.
desc
,
uploadrpt_id
:
rptid
};
hisarray
.
push
(
h
);
});
self
.
db
.
rpthistory
.
bulkCreate
(
hisarray
,{
transaction
:
t
});
await
self
.
db
.
models
.
rpthistory
.
bulkCreate
(
hisarray
,{
transaction
:
t
});
return
{};
});
}
...
...
@@ -47,8 +49,8 @@ class RptTypeService extends ServiceBase{
var
batchobj
=
{
batchdate
:
upinfo
.
date
,
companyname
:
upinfo
.
companyName
,
company
C
ode
:
upinfo
.
companyTaxNum
,
name
:
companyn
ame
+
"_"
+
upinfo
.
date
+
"_"
+
upinfo
.
accountingType
,
company
c
ode
:
upinfo
.
companyTaxNum
,
name
:
upinfo
.
companyN
ame
+
"_"
+
upinfo
.
date
+
"_"
+
upinfo
.
accountingType
,
batchstatuscode
:
"parserpt"
,
taxtypecode
:
upinfo
.
valueAddedTax
,
timetypecode
:
upinfo
.
dateType
,
...
...
@@ -57,7 +59,7 @@ class RptTypeService extends ServiceBase{
}
//保存批量
var
batchtemp
=
await
this
.
db
.
models
.
uploadbatch
.
create
(
batchobj
,{
transaction
:
t
});
var
rpt
s
=
[];
var
rpt
result
=
[];
Object
.
keys
(
upinfo
).
forEach
(
k
=>
{
{
if
(
k
.
indexOf
(
"Report"
)
>=
0
){
...
...
@@ -65,7 +67,7 @@ class RptTypeService extends ServiceBase{
rpts
.
forEach
(
rpt
=>
{
var
rptupload
=
{
companyname
:
upinfo
.
companyName
,
company
C
ode
:
upinfo
.
companyTaxNum
,
company
c
ode
:
upinfo
.
companyTaxNum
,
rpttypecode
:
rpt
.
code
,
timetypecode
:
upinfo
.
dateType
,
urlpath
:
rpt
.
url
,
...
...
@@ -73,16 +75,18 @@ class RptTypeService extends ServiceBase{
company_id
:
comp
.
id
,
uploadbatch_id
:
batchtemp
.
id
,
}
rpts
.
push
(
rptupload
);
rptresult
.
push
(
rptupload
);
});
}
}
});
//保存报表
await
this
.
db
.
models
.
uploadrpt
.
bulkCreate
(
rpts
,{
transaction
:
t
});
await
this
.
db
.
models
.
uploadrpt
.
bulkCreate
(
rptresult
,{
transaction
:
t
});
var
lstspts
=
await
this
.
db
.
models
.
uploadrpt
.
findAll
({
where
:{
uploadbatch_id
:
batchtemp
.
id
},
transaction
:
t
});
try
{
r
pts
.
forEach
(
async
(
rpt
)
=>
{
await
this
.
redisClient
.
notifyConsume
(
"k8stask"
,
"docurls"
,
batchtemp
.
id
+
"~"
+
rpt
.
rptdate
+
"~"
+
rpt
.
rpttypecode
+
"~"
+
rpt
.
urlpath
);
lsts
pts
.
forEach
(
async
(
rpt
)
=>
{
await
this
.
redisClient
.
notifyConsume
(
"k8stask"
,
"docurls"
,
rpt
.
id
+
"~"
+
batchtemp
.
id
+
"~"
+
rpt
.
rptdate
+
"~"
+
rpt
.
rpttypecode
+
"~"
+
rpt
.
urlpath
);
});
}
catch
(
e
){
//需要记录要清理的批号历史数据
...
...
fi-taxctl/app/base/utils/redisClient.js
View file @
2874a4ca
...
...
@@ -125,6 +125,11 @@ class RedisClient {
console
.
log
(
channel
+
":"
+
msg
);
return
this
.
client
.
publishAsync
(
channel
,
msg
);
}
async
notifyConsume
(
channel
,
consumetarget
,
val
)
{
await
this
.
client
.
rpush
(
consumetarget
,
val
);
console
.
log
(
"publish--"
+
channel
+
":"
+
consumetarget
);
return
this
.
client
.
publishAsync
(
channel
,
consumetarget
);
}
async
rpush
(
key
,
val
)
{
return
this
.
client
.
rpushAsync
(
key
,
val
);
}
...
...
fi-taxctl/app/config/localsettings.js
View file @
2874a4ca
...
...
@@ -3,7 +3,7 @@ var settings={
host
:
"43.247.184.32"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
9
,
db
:
11
,
},
database
:
{
dbname
:
"fktaxctl"
,
...
...
fi-taxctl/app/config/settings.js
View file @
2874a4ca
var
path
=
require
(
'path'
);
var
ENVINPUT
=
{
DB_HOST
:
process
.
env
.
DB_HOST
,
DB_PORT
:
process
.
env
.
DB_PORT
,
DB_USER
:
process
.
env
.
DB_USER
,
DB_PWD
:
process
.
env
.
DB_PWD
,
REDIS_HOST
:
process
.
env
.
REDIS_HOST
,
REDIS_PORT
:
process
.
env
.
REDIS_PORT
,
REDIS_PWD
:
process
.
env
.
REDIS_PWD
,
REDIS_DB
:
process
.
env
.
FK_REDIS_DB
,
DB_NAME
:
process
.
env
.
FK_DB_NAME
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"dev"
};
var
settings
=
{
env
:
"dev"
,
appKey
:
"
219933cb198246f7951bdfe6fadd694e
"
,
env
:
ENVINPUT
.
APP_ENV
,
appKey
:
"
72349770a73d43d1b519866721ff8107
"
,
paasKey
:
"wx76a324c5d201d1a4"
,
secret
:
"
a1f209004a91433a81a8fbb7b3dc3418
"
,
secret
:
"
c1c1c394fa434cfa93cd5f2db0ed11ed
"
,
//为了直接从应用客户端登录,需要查询出当前用户所在公司
//如果有这个配置,就表示支持从应用自己的客户端登录或注册
companyKey
:
"
1aba765c82f24030bb23d18aeea0f72f
"
,
companyKey
:
"
af4dfb53282d4743866259e0b15b134e
"
,
salt
:
"%iatpD1gcxz7iF#B"
,
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
3003
,
...
...
@@ -14,7 +26,21 @@ var settings = {
if
(
this
.
env
==
"dev"
){
return
"http://p.apps.com:4001/"
;
}
else
{
return
"http://open.gongsibao.com/"
;
return
"https://open.gongsibao.com/"
;
}
},
channelApiUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.61:4003"
;
}
else
{
return
"http://zc-channel-service"
;
}
},
uploadfileossurl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.15:8080"
;
}
else
{
return
"http://localhost:8080"
;
}
},
reqEsAddr
:
function
(){
...
...
@@ -25,243 +51,24 @@ var settings = {
return
"http://43.247.184.94:7200/"
;
}
},
reqEsAddrIc
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
"http://43.247.184.94:9200/"
;
//localsettings.reqEsDevUrl;
}
else
{
return
"http://43.247.184.94:9200/"
;
}
},
apiconfig
:{
imageQueryKey
:
"4S3ypgaRq19bhKwB"
,
MgphoneSearchUrl
:
function
(){
return
settings
.
reqMgAddr
()
+
"phones"
},
xzAllCompanySearchUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_tm_company_op/_search"
;
},
//e签宝签署状态变化完成后跳转boss页面Url地址(拒签、签署完成),在合同模板创建合同 5.4.2指定redirectUrl
eSignBaoRedirectBossUrl
:
function
(){
return
"https://ec.gongsibao.com/h5"
;
},
//e签宝接口Url
eSignBaoUrl
:
function
(){
return
"https://smlo.tsign.cn/opentreaty-service"
;
},
//e签宝银行验证接口Url
eSignBaoBankVerifyUrl
:
function
(){
return
"https://smlo.tsign.cn/openrealname-service"
;
},
//e签宝appId
eSignBaoAppId
:
function
(){
return
"4438757581"
;
},
//e签宝appKey
eSignBaoAppKey
:
function
(){
return
"0d798cdf01ecb31bf9949f319f8d77db"
;
},
//作品版权
icworksCopyrightSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_works_copyright_op/_search"
;
},
//软件版权
icsoftwareCopyrightSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_software_copyright_op/_search"
;
},
//专利查询
paSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_patent_op/_search"
;
},
icmemberSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_member_op/_search"
;
},
icshareholderSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_shareholder_op/_search"
;
},
icinvestSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_invest_op/_search"
;
},
icchangeSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_change_op/_search"
;
},
iccompanynameSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_company_op/_search"
;
},
agencynameSearchUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_agency_company/_search"
;
},
iccompanycodeSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_company_op/_search"
;
},
iccompanyNumSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_company_op/_search"
;
},
icbranchSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_ic_gsb_branch_op/_search"
;
},
magicSearchUrl
:
function
(){
return
settings
.
reqEsAddrIc
()
+
"bigdata_magic_ic_op/_search"
;
},
xzCompanySearchUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_tm_company/_search"
;
},
xzDetailSearchUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_renewals_business/_search"
;
},
byslTmUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_no_accepted_business/_search"
;
},
byslDetailUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_no_accepted_business/_search"
;
},
tmSearchUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_middle_gsb_tm_info/_search"
;
},
tmFlowUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_middle_gsb_tm_flow/_search"
;
},
tmNclUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_bdc_ncl_info/_search"
;
},
agencycompanySearchUrl
:
function
(){
//代理机构名称查询
return
settings
.
reqEsAddr
()
+
"bigdata_agency_company/_search"
;
},
yyDetailSearchUrl
:
function
(){
//商标异议详情查询
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_dissent_business/_search"
;
},
bgDetailSearchUrl
:
function
(){
//商标变更详情查询
return
settings
.
reqEsAddr
()
+
"bigdata_business_gsb_tm_change_business/_search"
;
},
nclUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_bdc_gsb_tm_ncl/_search"
;
},
opLogUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_zc_op_log/_doc?pretty"
;
},
opLogEsIsAdd
:
function
(){
return
1
;
},
qcurl
:
"http://59.110.124.51:8250/qc?detailLink={address}"
,
bzLicenseForTMUrl
:
"http://bigdata.gongsibao.com/api/imghandle/bzLicenseForTM"
,
wtsUrl
:
"http://bigdata.gongsibao.com/api/imghandle/deleForTM"
,
adjustTMSizeUrl
:
"http://bigdata.gongsibao.com/api/imghandle/adjustTMSize"
,
onLineMakeTMUrl
:
"http://bigdata.gongsibao.com/api/imghandle/onLineMakeTM"
,
toblackUrl
:
"https://bigdata.gongsibao.com/api/imghandle/toblack"
,
makeDeleForTMUrl
:
"http://boss.gongsibao.com/api/imghandle/makeDeleForTM"
,
LbsAddressUrl
:
"http://43.247.184.92:8880/lbs/api/addresssearch"
,
//地址查询
LbsLalUrl
:
"http://43.247.184.92:8889/lbs/api/lalsearch"
,
//坐标查询
LbsCityUrl
:
"http://43.247.184.92:8886/lbs/api/cityseicsoftwareCopyrightSearchUrlarch"
,
//城市查询
pdf2wordUrl
:
function
(){
if
(
settings
.
env
==
"dev"
){
return
"http://59.110.125.77:3000/api/pdf2word/pdf2word"
;
}
else
{
return
"http://59.110.125.77:3000/api/pdf2word/pdf2word"
;
}
},
imageQueryUrl
:
function
(){
//商标图像检索
if
(
settings
.
env
==
"dev"
){
return
"http://43.247.184.92:8004/gsb/api/v1"
;
}
else
{
return
"http://43.247.184.92:8004/gsb/api/v1"
;
}
},
tmZntjQueryUrl
:
function
(){
//商标智能推荐
if
(
settings
.
env
==
"dev"
){
return
"http://192.168.18.123:8005/companybusiness?appKey=343aff200d18be6637d&name={companyName}"
;
}
else
{
return
"http://43.247.184.92:8005/companybusiness?appKey=343aff200d18be6637d&name={companyName}"
;
}
},
tmtjdlQueryUrl
:
function
(){
//根据经营范围推荐
if
(
settings
.
env
==
"dev"
){
return
"http://192.168.18.181:7000/companynclone?appKey=343aff200d18be6637d&name={companyName}&tmName={tmName}"
;
}
else
{
return
"http://43.247.184.92:8006/companynclone?appKey=343aff200d18be6637d&name={companyName}&tmName={tmName}"
;
}
},
tmncloneQueryUrl
:
function
(){
//计算通过率
if
(
settings
.
env
==
"dev"
){
return
"http://192.168.18.44:7000/tmnclone?appKey=343aff200d18be6637d&nclonecode={nclonecode}&tmName={tmName}"
;
}
else
{
return
"http://43.247.184.92:8007/tmnclone?appKey=343aff200d18be6637d&nclonecode={nclonecode}&tmName={tmName}"
;
}
},
yunzhanghuApiUrl
:
function
(){
//云帐户提现接口url
return
"https://api-jiesuan.yunzhanghu.com/api/payment/v1/order-realtime"
;
},
yunzhanghuCallbackApiUrl
:
function
(){
//云帐户提现回调接口url
return
"http://bigdata.gongsibao.com/api/banktrade/tradecallback"
;
},
yunzhanghuDealer_id
:
function
(){
//商户平台ID(dealer_id)——自己
return
"27403253"
;
},
yunzhanghuBroker_id
:
function
(){
//代征主体ID(broker_id)
return
"27532644"
;
},
yunzhanghuAppKey
:
function
(){
//云帐户提供的App Key
return
"V5bVuact66Lm55pWKdOTbdQn8XTjP749"
;
},
yunzhanghuDESKey
:
function
(){
//云帐户提供的3DES Key
return
"2GZeq2YnKtiPJpH9S4K4L7lj"
;
},
yunzhanghuQueryAccountsUrl
:
function
(){
//云帐户商户查询余额接口url
return
"https://api-jiesuan.yunzhanghu.com/api/payment/v1/query-accounts"
;
},
yunzhanghuVerifyBankCardUrl
:
function
(){
//云帐户验证银行卡的有效性接口url
return
"https://api-jiesuan.yunzhanghu.com/authentication/verify-bankcard-three-factor"
;
},
yunzhanghuTxXz
:
function
(){
//云帐户提现限制
if
(
settings
.
env
==
"dev"
){
return
"-1"
;
}
else
{
return
"-1"
;
//不受限制
}
},
bossWithdrawApplyingKey
:
function
(){
//提现发放key
return
"3898EFhijklmCDEFGHIJKLMN"
;
},
},
homePage
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
reqHomePageDevUrl
;
}
else
{
return
"http://boss.gongsibao.com/"
;
}
},
authUrl
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
reqAuthUrl
;
}
else
{
return
"http://boss.gongsibao.com/admin"
;
}
},
reqMgAddr
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
reqMgDevUrl
;
}
else
{
return
"mongodb://wdy1:123456@43.247.184.94:27017/"
;
}
},
redis
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
redis
;
}
else
{
return
{
host
:
"xxxxx"
,
port
:
xxxxx
,
password
:
"xxxxx"
,
db
:
xx
,
host
:
ENVINPUT
.
REDIS_HOST
,
port
:
ENVINPUT
.
REDIS_PORT
,
password
:
ENVINPUT
.
REDIS_PWD
,
db
:
ENVINPUT
.
REDIS_DB
,
};
}
},
...
...
@@ -271,11 +78,11 @@ var settings = {
return
localsettings
.
database
;
}
else
{
return
{
dbname
:
"xxxxx"
,
user
:
"xxxx"
,
password
:
"xxxxx"
,
dbname
:
ENVINPUT
.
DB_NAME
,
user
:
ENVINPUT
.
DB_USER
,
password
:
ENVINPUT
.
DB_PWD
,
config
:
{
host
:
'xxxxxx'
,
host
:
ENVINPUT
.
DB_HOST
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
...
...
@@ -292,31 +99,7 @@ var settings = {
},
};
}
},
databasehb
:
function
(){
return
{
dbname
:
'gsb'
,
user
:
'ro'
,
password
:
'Louis@2020'
,
config
:
{
host
:
'59.110.125.77'
,
port
:
'9617'
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
max
:
5
,
min
:
0
,
acquire
:
90000000
,
idle
:
1000000
},
debug
:
false
,
dialectOptions
:{
requestTimeout
:
999999
,
// instanceName:'DEV'
}
//设置MSSQL超时时间
},
};
}
};
settings
.
ENVINPUT
=
ENVINPUT
;
module
.
exports
=
settings
;
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