Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etax-income-api
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
caoxiaohong
etax-income-api
Commits
927b3bff
Commit
927b3bff
authored
Apr 22, 2025
by
ddx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志管理页面
parent
c6e7ee8b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
358 additions
and
4 deletions
+358
-4
etax-income-controller/src/main/java/com/sxc/etaxincome/controller/JxSampleController.java
+46
-4
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/business/ICreateTestCaseManager.java
+20
-0
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/business/impl/CreateTestCaseManager.java
+52
-0
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/model/report/ManagementTestRealTax.java
+30
-0
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/model/report/ManagementTestRealToken.java
+63
-0
etax-income-server/src/main/webapp/management-query-real-token-page.html
+57
-0
etax-income-server/src/main/webapp/scripts/management-query-real-token-page.js
+90
-0
No files found.
etax-income-controller/src/main/java/com/sxc/etaxincome/controller/JxSampleController.java
View file @
927b3bff
...
...
@@ -16,10 +16,7 @@ import com.sxc.etaxincome.common.util.ETaxPureNetUtil;
import
com.sxc.etaxincome.criteria.IncomeQueryCriteria
;
import
com.sxc.etaxincome.criteria.IncomeRealTaxnoQueryCriteria
;
import
com.sxc.etaxincome.criteria.IncomeTaxnoReportQueryCriteria
;
import
com.sxc.etaxincome.domain.business.IExceptionManager
;
import
com.sxc.etaxincome.domain.business.IIncomeService
;
import
com.sxc.etaxincome.domain.business.IQueryManager
;
import
com.sxc.etaxincome.domain.business.ISysManageManager
;
import
com.sxc.etaxincome.domain.business.*
;
import
com.sxc.etaxincome.domain.command.analysis.IAnalysisCommand
;
import
com.sxc.etaxincome.domain.infrastructure.IEtaxConfigService
;
import
com.sxc.etaxincome.domain.model.report.*
;
...
...
@@ -84,6 +81,9 @@ public class JxSampleController {
private
ISysManageManager
sysManageManager
;
@Autowired
private
IExceptionManager
exceptionManager
;
@Autowired
private
ICreateTestCaseManager
createTestCaseManager
;
@NacosValue
(
value
=
"${income.taxUser.request.query.list.url}"
,
autoRefreshed
=
true
)
private
String
incomeTaxUserRequestQueryListUrl
;
...
...
@@ -121,6 +121,10 @@ public class JxSampleController {
private
String
incomeRequestQueryRealTokenIdUrl
;
@NacosValue
(
value
=
"${income.request.clean.real.token.id.url}"
,
autoRefreshed
=
true
)
private
String
incomeRequestCleanRealTokenIdUrl
;
@NacosValue
(
value
=
"${income.request.test.real.token.id.url}"
,
autoRefreshed
=
true
)
private
String
incomeRequestTestRealTokenIdUrl
;
@NacosValue
(
value
=
"${income.request.test.real.core.url}"
,
autoRefreshed
=
true
)
private
String
incomeRequestTestRealCoreUrl
;
@GetMapping
(
"/jx-analysis-hourly"
)
public
String
jxAnalysisHourly
(
String
username
,
String
startDate
,
String
endDate
)
{
...
...
@@ -934,6 +938,44 @@ public class JxSampleController {
}
}
@GetMapping
(
"/management/test/real/token/createTestRequest"
)
public
String
testRealTokenById
(
String
applyId
,
String
rtype
)
{
RequestConfig
requestConfig
=
RequestConfig
.
builder
()
.
contentType
(
"form"
)
.
method
(
"GET"
)
.
charset
(
StandardCharsets
.
UTF_8
.
toString
())
.
retryTimes
(
1
)
.
build
();
try
{
String
response
=
ETaxPureNetUtil
.
postResponseString
(
incomeRequestTestRealTokenIdUrl
+
this
.
appendParamTokenId
(
applyId
),
null
,
null
,
requestConfig
,
new
ResponseCarrier
());
log
.
info
(
"test real log token with id response:{}"
,
response
);
ManagementTestRealToken
managementTestRealToken
=
JSON
.
parseObject
(
response
,
ManagementTestRealToken
.
class
);
return
createTestCaseManager
.
createReqeustTestParams
(
managementTestRealToken
,
rtype
);
}
catch
(
Exception
e
)
{
log
.
error
(
"test real log token with id error:"
,
e
);
return
"{}"
;
}
}
@PostMapping
(
"/management/test/real/token/testRequest"
)
public
String
testRealToken
(
ManagementTestRealTax
managementTestRealTax
)
{
try
{
String
reqUrl
=
incomeRequestTestRealCoreUrl
;
log
.
info
(
"query testRequest request url {} page param:{}"
,
reqUrl
,
JSONUtil
.
toString
(
managementTestRealTax
));
Map
<
String
,
Object
>
paramMap
=
Maps
.
newHashMap
();
paramMap
.
put
(
"rtype"
,
managementTestRealTax
.
getRtype
());
paramMap
.
put
(
"proxy"
,
managementTestRealTax
.
getProxy
());
paramMap
.
put
(
"signPriority"
,
managementTestRealTax
.
getSignPriority
());
paramMap
.
put
(
"data"
,
JSON
.
toJSON
(
managementTestRealTax
.
getData
()));
String
response
=
HttpUtil
.
post
(
incomeRequestTestRealCoreUrl
,
paramMap
);
log
.
info
(
"query testRequest request page response:{}"
,
response
);
return
response
;
}
catch
(
Exception
e
)
{
log
.
error
(
"query testRequest request page error:"
,
e
);
return
"{}"
;
}
}
@GetMapping
(
"/get-dqdm"
)
public
String
getDqdm
(
String
taxno
)
{
return
etaxConfigService
.
getArea
(
taxno
);
...
...
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/business/ICreateTestCaseManager.java
0 → 100644
View file @
927b3bff
package
com
.
sxc
.
etaxincome
.
domain
.
business
;
import
com.sxc.etaxincome.domain.model.report.ManagementTestRealToken
;
import
java.util.Map
;
/**
* @ProjectName: etax-income-api
* @Package: com.sxc.etaxincome.domain.business
* @ClassName: ICreateTestCaseService
* @Author: ddx
* @Description:
* @Date: 2025-04-18 15:11
* @Version: 1.0
*/
public
interface
ICreateTestCaseManager
{
String
createReqeustTestParams
(
ManagementTestRealToken
managementTestRealToken
,
String
rtype
);
}
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/business/impl/CreateTestCaseManager.java
0 → 100644
View file @
927b3bff
package
com
.
sxc
.
etaxincome
.
domain
.
business
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Maps
;
import
com.sxc.etaxincome.domain.model.report.ManagementTestRealToken
;
import
com.sxc.framework.common.date.DateUtils
;
import
com.sxc.framework.common.identity.UUIDGenerator
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
com.sxc.etaxincome.domain.business.ICreateTestCaseManager
;
import
java.util.Map
;
/**
* @ProjectName: etax-income-api
* @Package: com.sxc.etaxincome.domain.business.impl
* @ClassName: CreateTestCaseManager
* @Author: ddx
* @Description:
* @Date: 2025-04-18 15:18
* @Version: 1.0
*/
@Slf4j
@Service
public
class
CreateTestCaseManager
implements
ICreateTestCaseManager
{
public
String
createReqeustTestParams
(
ManagementTestRealToken
managementTestRealToken
,
String
rtype
)
{
Map
<
String
,
Object
>
urlParams
=
Maps
.
newHashMap
();
urlParams
.
put
(
"rtype"
,
rtype
);
urlParams
.
put
(
"proxy"
,
managementTestRealToken
.
getProxyIp
());
Map
<
String
,
Object
>
dataParams
=
Maps
.
newHashMap
();
dataParams
.
put
(
"token"
,
managementTestRealToken
.
getToken
());
dataParams
.
put
(
"dqdm"
,
managementTestRealToken
.
getZoneCode
());
dataParams
.
put
(
"requestId"
,
UUIDGenerator
.
generate
());
if
(
rtype
.
equals
(
"0111"
))
{
dataParams
.
put
(
"cert"
,
managementTestRealToken
.
getTaxno
());
dataParams
.
put
(
"rq_q"
,
DateUtils
.
getDate
(
"yyyy-MM-dd"
));
dataParams
.
put
(
"rq_z"
,
DateUtils
.
getDate
(
"yyyy-MM-dd"
));
dataParams
.
put
(
"type"
,
"0"
);
dataParams
.
put
(
"sEcho"
,
"1"
);
dataParams
.
put
(
"iDisplayLength"
,
"50"
);
}
else
if
(
rtype
.
equals
(
"0920"
))
{
dataParams
.
put
(
"nsrsbh"
,
managementTestRealToken
.
getTaxno
());
}
urlParams
.
put
(
"data"
,
JSON
.
toJSON
(
dataParams
));
return
JSON
.
toJSONString
(
urlParams
);
}
}
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/model/report/ManagementTestRealTax.java
0 → 100644
View file @
927b3bff
package
com
.
sxc
.
etaxincome
.
domain
.
model
.
report
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Date
;
/**
* @ProjectName: etax-income-api
* @Package: com.sxc.etaxincome.domain.model.report
* @ClassName: ManagementTestRealToken
* @Author: ddx
* @Description:
* @Date: 2025-04-18 14:35
* @Version: 1.0
*/
@Slf4j
@Data
public
class
ManagementTestRealTax
{
private
String
rtype
;
private
String
proxy
;
private
String
signPriority
;
private
String
data
;
}
etax-income-domain/src/main/java/com/sxc/etaxincome/domain/model/report/ManagementTestRealToken.java
0 → 100644
View file @
927b3bff
package
com
.
sxc
.
etaxincome
.
domain
.
model
.
report
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Date
;
/**
* @ProjectName: etax-income-api
* @Package: com.sxc.etaxincome.domain.model.report
* @ClassName: ManagementTestRealToken
* @Author: ddx
* @Description:
* @Date: 2025-04-18 14:35
* @Version: 1.0
*/
@Slf4j
@Data
public
class
ManagementTestRealToken
{
private
String
taxno
;
private
String
token
;
private
String
tokenStatus
;
private
Date
reqDate
;
private
Date
resDate
;
private
String
keyCode
;
private
String
secert
;
private
String
zoneCode
;
private
String
userCode
;
private
String
serverNo
;
private
Integer
times
;
private
String
isValid
;
private
String
ipServerNo
;
private
Integer
lostTime
;
private
String
remarks
;
private
String
timeFlag
;
private
String
resContext
;
private
String
loginType
;
private
String
loginTaxno
;
private
String
secretMd5
;
private
String
errorCode
;
private
String
errorMessage
;
private
String
proxyIp
;
private
String
taxLoginName
;
}
etax-income-server/src/main/webapp/management-query-real-token-page.html
View file @
927b3bff
...
...
@@ -181,6 +181,63 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<div
class=
"modal fade"
id=
"paramModal"
role=
"dialog"
aria-labelledby=
"serverModalLabel"
aria-hidden=
"false"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
id=
"paramModalLabel"
>
Api Test
</h4>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"changeRequest('0920')"
>
登录有效性
</button>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"changeRequest('0111')"
>
权限有效性
</button>
<button
type=
"button"
class=
"btn btn-info"
onclick=
"executeRequest()"
>
执行
</button>
<button
type=
"button"
class=
"btn btn-warning"
data-dismiss=
"modal"
>
关闭
</button>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"box-body"
>
<div
class=
"form-group"
id=
"proxyServerGroup"
>
<label
class=
"col-sm-3 control-label"
>
代理:
</label>
<div
class=
"col-sm-9"
>
<input
class=
"form-control"
id=
"proxy"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
rtype:
</label>
<div
class=
"col-sm-9"
>
<input
class=
"form-control"
id=
"rtype"
value=
""
>
<input
type=
"hidden"
id=
"applyId"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
参数:
</label>
<div
class=
"col-sm-9"
>
<textarea
class=
"form-control"
id=
"paramIn"
cols=
"60"
rows=
"8"
></textarea>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"box-body"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
返回值:
</label>
<div
class=
"col-sm-9"
>
<textarea
class=
"form-control"
id=
"paramOut"
cols=
"60"
rows=
"16"
></textarea>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</body>
</html>
etax-income-server/src/main/webapp/scripts/management-query-real-token-page.js
View file @
927b3bff
...
...
@@ -118,6 +118,18 @@ function queryPageList() {
{
field
:
'errorMessage'
,
title
:
'异常信息'
},
{
field
:
'taxLoginName'
,
title
:
'登录名'
},
{
field
:
'lostTime'
,
title
:
'耗时ms'
},
{
field
:
''
,
title
:
'检测'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
applyId
=
row
[
"id"
];
var
token
=
row
[
"token"
];
if
(
token
!=
undefined
&&
token
!=
""
)
{
var
viewButton
=
'<a class="edit ml10" href="javascript:openTestSampleModal(
\'
'
+
applyId
+
'
\'
);">检测</a>'
;
return
viewButton
;
}
else
{
return
"--"
;
}
}
},
{
field
:
''
,
title
:
'短信'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
reqDate
=
row
[
"reqDate"
];
var
areaCode
=
row
[
"zoneCode"
];
...
...
@@ -285,6 +297,84 @@ function querySmsPageList(cellphone, areaCode, userCode, reqDate) {
});
}
function
openTestSampleModal
(
applyId
)
{
$
(
'#paramModal'
).
modal
(
'show'
);
$
(
"#applyId"
).
val
(
applyId
);
$
(
"#rtype"
).
val
(
'0920'
);
getRequest
();
}
function
getRequest
()
{
var
applyId
=
$
(
"#applyId"
).
val
();
var
rtype
=
$
(
"#rtype"
).
val
();
var
url
=
"jxSample/management/test/real/token/createTestRequest"
;
$
.
ajax
({
type
:
"GET"
,
url
:
url
,
data
:
{
"applyId"
:
applyId
,
"rtype"
:
rtype
},
dataType
:
"json"
,
contentType
:
"application/json"
,
async
:
false
,
success
:
function
(
response
)
{
$
(
'#rtype'
).
val
(
response
.
rtype
);
$
(
'#proxy'
).
val
(
response
.
proxy
);
var
jsonFormat
=
JSON
.
stringify
(
response
.
data
,
null
,
'
\
t'
);
$
(
'#paramIn'
).
val
(
jsonFormat
);
},
error
:
function
(
e
)
{
alert
(
"操作失败."
);
},
complete
:
function
(
e
)
{
;
}
});
}
function
changeRequest
(
rtype
)
{
$
(
"#rtype"
).
val
(
rtype
);
$
(
"#paramOut"
).
val
(
''
);
getRequest
();
}
function
executeRequest
()
{
executeHandle
();
}
function
executeHandle
()
{
var
rtype
=
$
(
"#rtype"
).
val
();
var
data
=
$
(
"#paramIn"
).
val
();
var
proxyServer
=
$
(
"#proxy"
).
val
();
$
(
"#paramOut"
).
val
(
"正在处理中..."
);
$
.
ajax
({
type
:
"POST"
,
url
:
"jxSample/management/test/real/token/testRequest"
,
data
:
{
"rtype"
:
rtype
,
"data"
:
data
,
"proxy"
:
proxyServer
,
"signPriority"
:
"jx_ss"
},
dataType
:
"json"
,
contentType
:
"application/x-www-form-urlencoded"
,
async
:
false
,
success
:
function
(
response
)
{
var
jsonFormat
=
JSON
.
stringify
(
response
,
null
,
'
\
t'
);
$
(
"#paramOut"
).
val
(
jsonFormat
);
},
error
:
function
(
e
)
{
alert
(
"查询失败."
);
$
(
"#paramOut"
).
val
(
''
);
},
complete
:
function
(
e
)
{
;
}
});
}
function
initAllUsernameList
(
usernameId
)
{
var
username
=
$
(
"#"
+
usernameId
).
val
();
if
(
username
==
""
)
{
...
...
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