Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tax-sys-nacos
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
tax-sys-nacos
Commits
f007cc14
Commit
f007cc14
authored
Feb 19, 2024
by
ddx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加全部重置按钮
parent
a4d0c29c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
21 deletions
+36
-21
tax-common/src/main/java/com/yxcheng/token/common/model/InvoiceFileTaxBatchManageReq.java
+1
-0
tax-common/src/main/java/com/yxcheng/token/common/model/TokenInfo.java
+1
-0
tax-file-face/file-face-integration/src/main/java/com/tax/file/integration/token/TokenClient.java
+3
-2
tax-file-face/file-face-service/src/main/java/com/tax/file/service/impl/InvoiceFileServiceImpl.java
+4
-3
tax-token/token-dao/src/main/java/com/tax/token/mapper/TkTokenMapper.java
+3
-1
tax-token/token-dao/src/main/java/com/tax/token/mapper/TkTokenMapper.xml
+11
-3
tax-token/token-service/src/main/java/com/tax/token/service/api/TkTokenService.java
+1
-1
tax-token/token-service/src/main/java/com/tax/token/service/impl/TkTokenServiceImpl.java
+3
-3
tax-token/token-web/src/main/java/com/tax/token/web/controller/TokenController.java
+4
-3
tax-token/token-web/src/test/java/com/yxcheng/token/web/controller/test/TokenUnitTest.java
+5
-5
No files found.
tax-common/src/main/java/com/yxcheng/token/common/model/InvoiceFileTaxBatchManageReq.java
View file @
f007cc14
...
...
@@ -17,6 +17,7 @@ public class InvoiceFileTaxBatchManageReq implements Serializable {
private
static
final
long
serialVersionUID
=
191691175092676480L
;
private
String
userCode
;
private
String
errorCode
;
private
String
zoneCode
;
private
List
<
InvoiceFileTaxBatchManageFunctionReq
>
functionList
;
}
tax-common/src/main/java/com/yxcheng/token/common/model/TokenInfo.java
View file @
f007cc14
...
...
@@ -18,4 +18,5 @@ import lombok.*;
public
class
TokenInfo
{
private
String
taxno
;
private
String
zoneCode
;
private
String
userCode
;
}
tax-file-face/file-face-integration/src/main/java/com/tax/file/integration/token/TokenClient.java
View file @
f007cc14
...
...
@@ -16,6 +16,7 @@ import java.util.List;
@Service
public
interface
TokenClient
{
@RequestMapping
(
value
=
"/client/selectTokenListByErrorCode"
,
method
=
RequestMethod
.
POST
,
consumes
=
{
"application/json;charset=UTF-8"
})
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
@RequestParam
(
value
=
"userCode"
,
required
=
true
)
String
userCode
,
@RequestParam
(
value
=
"errorCode"
,
required
=
true
)
String
errorCode
);
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
@RequestParam
(
value
=
"userCode"
)
String
userCode
,
@RequestParam
(
value
=
"errorCode"
)
String
errorCode
,
@RequestParam
(
value
=
"zoneCode"
)
String
zoneCode
);
}
tax-file-face/file-face-service/src/main/java/com/tax/file/service/impl/InvoiceFileServiceImpl.java
View file @
f007cc14
...
...
@@ -1192,7 +1192,8 @@ public class InvoiceFileServiceImpl implements InvoiceFileService {
@Override
public
JsonResult
<
String
>
batchTaxManage
(
InvoiceFileTaxBatchManageReq
invoiceFileTaxBatchManageReq
)
{
JsonResult
jsonResult
=
new
JsonResult
();
List
<
TokenInfo
>
errorTokenList
=
tokenClient
.
selectTokenListByErrorCode
(
invoiceFileTaxBatchManageReq
.
getUserCode
(),
invoiceFileTaxBatchManageReq
.
getErrorCode
());
List
<
TokenInfo
>
errorTokenList
=
tokenClient
.
selectTokenListByErrorCode
(
invoiceFileTaxBatchManageReq
.
getUserCode
(),
invoiceFileTaxBatchManageReq
.
getErrorCode
(),
invoiceFileTaxBatchManageReq
.
getZoneCode
());
int
rightNum
=
0
;
for
(
TokenInfo
errorToken:
errorTokenList
)
{
...
...
@@ -1204,11 +1205,11 @@ public class InvoiceFileServiceImpl implements InvoiceFileService {
invoiceFileReq
.
setTaxno
(
errorToken
.
getTaxno
());
invoiceFileReq
.
setZoneCode
(
errorToken
.
getZoneCode
());
invoiceFileReq
.
setFunctionList
(
functionList
);
invoiceFileReq
.
setAccessKeyID
(
invoiceFileTaxBatchManageReq
.
getUserCode
());
invoiceFileReq
.
setAccessKeyID
(
errorToken
.
getUserCode
());
invoiceFileReq
.
setSignatureNonce
(
uuidFlag
);
JsonResult
<
String
>
manageResult
=
taxManage
(
invoiceFileReq
);
log
.
info
(
uuidFlag
+
"
taxManage
"
+
manageResult
);
log
.
info
(
uuidFlag
+
"
batchTaxManage
"
+
manageResult
);
if
(
manageResult
.
isSuccess
())
{
rightNum
++;
}
...
...
tax-token/token-dao/src/main/java/com/tax/token/mapper/TkTokenMapper.java
View file @
f007cc14
...
...
@@ -99,5 +99,6 @@ public interface TkTokenMapper {
int
updateTokenInfo
(
TkToken
record
);
List
<
TkToken
>
selectTokenListByErrorCode
(
@Param
(
"userCode"
)
String
userCode
,
@Param
(
"errorCode"
)
String
errorCode
);
List
<
TkToken
>
selectTokenListByErrorCode
(
@Param
(
"userCode"
)
String
userCode
,
@Param
(
"errorCode"
)
String
errorCode
,
@Param
(
"zoneCode"
)
String
zoneCode
);
}
\ No newline at end of file
tax-token/token-dao/src/main/java/com/tax/token/mapper/TkTokenMapper.xml
View file @
f007cc14
...
...
@@ -543,8 +543,15 @@
FROM
tk_token t
WHERE
t.user_code = #{userCode,jdbcType=VARCHAR}
and t.error_code = #{errorCode,jdbcType=VARCHAR}
AND t.is_valid = '0'
t.is_valid = '0'
<if
test=
"userCode != null and userCode !=''"
>
and t.user_code = #{userCode,jdbcType=VARCHAR}
</if>
<if
test=
"errorCode != null and errorCode !=''"
>
and t.error_code = #{errorCode,jdbcType=VARCHAR}
</if>
<if
test=
"zoneCode != null and zoneCode !=''"
>
and t.zone_code = #{zoneCode,jdbcType=VARCHAR}
</if>
</select>
</mapper>
\ No newline at end of file
tax-token/token-service/src/main/java/com/tax/token/service/api/TkTokenService.java
View file @
f007cc14
...
...
@@ -51,7 +51,7 @@ public interface TkTokenService {
JsonResult
<
String
>
queryTokenInfo
(
String
optType
,
String
userCode
,
String
taxno
);
List
<
TokenInfo
>
selectTokenListByErrorCode
(
String
userCode
,
String
errorCode
);
List
<
TokenInfo
>
selectTokenListByErrorCode
(
String
userCode
,
String
errorCode
,
String
zoneCode
);
boolean
checkTokenRealRequestCount
(
String
userCode
,
String
taxno
);
...
...
tax-token/token-service/src/main/java/com/tax/token/service/impl/TkTokenServiceImpl.java
View file @
f007cc14
...
...
@@ -970,12 +970,12 @@ public class TkTokenServiceImpl implements TkTokenService {
return
result
;
}
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
String
userCode
,
String
errorCode
)
{
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
String
userCode
,
String
errorCode
,
String
zoneCode
)
{
List
<
TokenInfo
>
showTokenList
=
Lists
.
newArrayList
();
List
<
TkToken
>
errorTokenList
=
tkTokenMapper
.
selectTokenListByErrorCode
(
userCode
,
errorCode
);
List
<
TkToken
>
errorTokenList
=
tkTokenMapper
.
selectTokenListByErrorCode
(
userCode
,
errorCode
,
zoneCode
);
if
(
null
!=
errorTokenList
&&
errorTokenList
.
size
()>
0
)
{
for
(
TkToken
token:
errorTokenList
)
{
showTokenList
.
add
(
TokenInfo
.
builder
().
taxno
(
token
.
getTaxno
()).
zoneCode
(
token
.
getZoneCode
()).
build
());
showTokenList
.
add
(
TokenInfo
.
builder
().
taxno
(
token
.
getTaxno
()).
zoneCode
(
token
.
getZoneCode
()).
userCode
(
token
.
getUserCode
()).
build
());
}
}
logger
.
info
(
"selectTokenListByErrorCode number is "
+
showTokenList
.
size
());
...
...
tax-token/token-web/src/main/java/com/tax/token/web/controller/TokenController.java
View file @
f007cc14
...
...
@@ -214,9 +214,10 @@ public class TokenController extends BaseClientController {
@RequestMapping
(
value
=
"/selectTokenListByErrorCode"
)
@LogT
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
@RequestParam
(
value
=
"userCode"
,
required
=
true
)
String
userCode
,
@RequestParam
(
value
=
"errorCode"
,
required
=
true
)
String
errorCode
){
return
tokenService
.
selectTokenListByErrorCode
(
userCode
,
errorCode
);
public
List
<
TokenInfo
>
selectTokenListByErrorCode
(
@RequestParam
(
value
=
"userCode"
)
String
userCode
,
@RequestParam
(
value
=
"errorCode"
)
String
errorCode
,
@RequestParam
(
value
=
"zoneCode"
)
String
zoneCode
){
return
tokenService
.
selectTokenListByErrorCode
(
userCode
,
errorCode
,
zoneCode
);
}
}
tax-token/token-web/src/test/java/com/yxcheng/token/web/controller/test/TokenUnitTest.java
View file @
f007cc14
...
...
@@ -13,8 +13,8 @@ import java.util.Map;
public
class
TokenUnitTest
{
// static String host = "http://47.94.208.133:8762";
static
String
host
=
"http://127.0.0.1:8762"
;
//
static String host = "https://api.xfapiao.com";
//
static String host = "http://127.0.0.1:8762";
static
String
host
=
"https://api.xfapiao.com"
;
String
accessKeyID
=
"eyongyou"
;
static
String
accessKeySecret
=
"yongyou!@#566ccd"
;
...
...
@@ -173,8 +173,8 @@ public class TokenUnitTest {
param
.
put
(
"taxno"
,
"91440101MA5CRHH33W"
);
param
.
put
(
"zoneCode"
,
"4400"
);
param
.
put
(
"site"
,
"4400"
);
param
.
put
(
"target"
,
"4400"
);
//
param.put("site","4400");
//
param.put("target","4400");
Map
userparam
=
new
HashMap
<>();
...
...
@@ -184,7 +184,7 @@ public class TokenUnitTest {
userparam
.
put
(
"userType"
,
"办税人"
);
userparam
.
put
(
"password"
,
"Fanny123456"
);
//
param.put("userInfoJson",userparam);
param
.
put
(
"userInfoJson"
,
userparam
);
System
.
out
.
println
(
url
);
System
.
out
.
println
(
JSON
.
toJSONString
(
param
));
ResponseContent
ret
=
HttpHelper
.
postJsonEntity
(
url
,
JSON
.
toJSONString
(
param
));
...
...
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