Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
c318e73a
Commit
c318e73a
authored
Oct 31, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.业务审批通过更新证时,更新证版本号及原因
parent
5b3b8bde
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
CertDetailServiceImpl.java
...ot/module/app/biz/service/impl/CertDetailServiceImpl.java
+19
-4
application.properties
...t-module-jg-biz/src/main/resources/application.properties
+4
-2
application-dev.properties
...spatrol-biz/src/main/resources/application-dev.properties
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-biz/src/main/java/com/yeejoin/amos/boot/module/app/biz/service/impl/CertDetailServiceImpl.java
View file @
c318e73a
...
...
@@ -10,7 +10,6 @@ import com.yeejoin.amos.boot.module.common.api.enums.CertificateStatusEnum;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Map
;
@Service
...
...
@@ -34,9 +33,11 @@ public class CertDetailServiceImpl {
}
private
void
setDefaultFieldForOld
(
CertInfoRequestParam
requestParam
)
{
// 兼容老数据,默认版本号为1
if
(
StringUtils
.
isBlank
(
requestParam
.
getVersion
()))
{
requestParam
.
setVersion
(
AESUtil
.
encrypt
(
"1"
));
}
// 兼容老数据,默认类型为使用登记证,扩展预览字段
if
(
StringUtils
.
isBlank
(
requestParam
.
getCertType
()))
{
requestParam
.
setCertType
(
AESUtil
.
encrypt
(
"useCert"
));
}
...
...
@@ -51,9 +52,11 @@ public class CertDetailServiceImpl {
if
(
jgUseRegistrationManage
.
getVersion
()
==
null
)
{
jgUseRegistrationManage
.
setVersion
(
1
);
}
// 版本号变化后 则扫码为旧证 进行业务提示
if
(!
jgUseRegistrationManage
.
getVersion
().
toString
().
equals
(
version
))
{
throw
new
AuthException
(
this
.
buildErrorInfo
(
jgUseRegistrationManage
));
}
// 注销业务后,则提示证已注销
if
(
CertificateStatusEnum
.
YIZHUXIAO
.
getName
().
equals
(
jgUseRegistrationManage
.
getCertificateStatus
()))
{
throw
new
AuthException
(
"此证已注销!"
);
}
...
...
@@ -64,7 +67,13 @@ public class CertDetailServiceImpl {
return
"由于办理"
+
jgUseRegistrationManage
.
getChangeReason
()
+
"业务导致该证注销, 请联系监管单位进行换证!"
;
}
private
String
deCodeByAES
(
@NotBlank
(
message
=
"证类型不能为空!"
)
String
data
)
{
/**
* aes 解密
*
* @param data 被解密字段
* @return 解密后数据
*/
private
String
deCodeByAES
(
String
data
)
{
try
{
return
AESUtil
.
decrypt
(
data
);
}
catch
(
Exception
e
)
{
...
...
@@ -72,8 +81,8 @@ public class CertDetailServiceImpl {
}
}
private
String
deCodeCertNo
(
@NotBlank
(
message
=
"证唯一标识不能为空!"
)
String
certNo
)
{
// 老数据兼容支持
private
String
deCodeCertNo
(
String
certNo
)
{
// 老数据兼容支持
,原有已经发出的使用登记证及使用标志的二维码仅为applyNo,老数据不进行解密验证
if
(
certNo
.
startsWith
(
"SYDJ"
)
||
certNo
.
startsWith
(
"YZBG"
))
{
return
certNo
;
}
...
...
@@ -84,6 +93,12 @@ public class CertDetailServiceImpl {
}
}
/**
* 使用策略模式进行,不同类型证详情的业务处理
*
* @param jgUseRegistrationManage 证信息
* @return 管理方式:vehicle-车用气瓶;set-台套类设备;unit-单位办理类设备
*/
private
String
getManageType
(
JgUseRegistrationManageDto
jgUseRegistrationManage
)
{
// 分3类:单位办理方式[unit](气瓶、压力管道)、台套办理方式[set](7大类,不包含压力管道)、车用气瓶[vehicle](压力容器->气瓶)
String
regType
=
jgUseRegistrationManage
.
getRegType
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/application.properties
View file @
c318e73a
...
...
@@ -165,4 +165,6 @@ tzs.WxApp.grant-type=authorization_code
amos.wechat.robot.user
=
we_robot
amos.wechat.robot.password
=
a1234567
feign.okhttp.enabled
=
true
\ No newline at end of file
feign.okhttp.enabled
=
true
#二维码前缀,用来
qrcode.prefix
=
https://sxtzsb.sxsei.com:19435/tzs
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/application-dev.properties
View file @
c318e73a
eureka.client.service
Url.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@
172.16.10.243:10001/eureka/
eureka.client.service
-url.defaultZone
=
http://
172.16.10.243:10001/eureka/
eureka.client.registry-fetch-interval-seconds
=
5
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
...
...
@@ -203,5 +203,5 @@ logging.level.org.elasticsearch=error
amos.system.user.user-name
=
admin_tzs
amos.system.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO
_WEB
amos.system.user.product
=
STUDIO_APP
_WEB
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