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
2d4f8393
Commit
2d4f8393
authored
Sep 23, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_bugfix' into develop_tzs_register
parents
6f4ec3e8
5f8aa960
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
43 deletions
+144
-43
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+45
-20
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+96
-20
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+1
-1
EquipTechParamPipeline.java
...os/boot/module/ymt/api/entity/EquipTechParamPipeline.java
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
2d4f8393
...
...
@@ -2845,26 +2845,51 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()))
{
String
useRegistrationCode
=
equipInfoDto
.
getUseOrgCode
();
String
key
=
useRegistrationCode
.
substring
(
0
,
5
);
if
(
redisUtils
.
hasKey
(
key
)){
String
extractedValue
=
useRegistrationCode
.
substring
(
5
,
10
);
String
extractedYearStr
=
useRegistrationCode
.
substring
(
useRegistrationCode
.
indexOf
(
'('
)
+
1
,
useRegistrationCode
.
indexOf
(
')'
));
int
currentYearLastTwoDigits
=
LocalDate
.
now
().
getYear
()
%
100
;
try
{
int
extractedNumber
=
Integer
.
parseInt
(
extractedValue
);
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
String
currentSequenceStr
=
valueOps
.
get
(
key
);
assert
currentSequenceStr
!=
null
;
int
redisNumber
=
Integer
.
parseInt
(
currentSequenceStr
);
int
extractedYear
=
Integer
.
parseInt
(
extractedYearStr
);
if
(
extractedNumber
>
redisNumber
&&
currentYearLastTwoDigits
==
extractedYear
)
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
//使用登记证编号判断是否使用未来系统生成编号
String
key
=
useRegistrationCode
.
length
()
>=
5
?
useRegistrationCode
.
substring
(
0
,
5
)
:
useRegistrationCode
;
List
<
String
>
prefixes
=
Collections
.
unmodifiableList
(
Arrays
.
asList
(
"容"
,
"锅"
,
"管"
,
"瓶"
,
"梯"
,
"起"
,
"索"
,
"游"
,
"车"
));
//容15鲁G00302(12)
if
(
useRegistrationCode
.
length
()
==
14
&&
prefixes
.
stream
().
anyMatch
(
key:
:
startsWith
)
&&
redisUtils
.
hasKey
(
useRegistrationCode
.
substring
(
0
,
5
)))
{
String
prefix
=
useRegistrationCode
.
substring
(
0
,
3
);
// 如果 prefix 不等于 "瓶31" 或 "瓶32" 则继续执行逻辑
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
String
currentSequenceStr
=
valueOps
.
get
(
key
);
if
(
Stream
.
of
(
"瓶31"
,
"瓶32"
).
noneMatch
(
prefix:
:
equals
)
&&
currentSequenceStr
!=
null
)
{
String
extractedValue
=
useRegistrationCode
.
substring
(
5
,
10
);
String
extractedYearStr
=
useRegistrationCode
.
substring
(
useRegistrationCode
.
indexOf
(
'('
)
+
1
,
useRegistrationCode
.
indexOf
(
')'
));
int
currentYearLastTwoDigits
=
LocalDate
.
now
().
getYear
()
%
100
;
try
{
// 提取年份
int
extractedYear
=
Integer
.
parseInt
(
extractedYearStr
);
if
(
currentYearLastTwoDigits
==
extractedYear
){
if
(
Character
.
isLetter
(
extractedValue
.
charAt
(
0
)))
{
// 提取字母部分并比较
char
extractedLetter
=
extractedValue
.
charAt
(
0
);
int
extractedNumber
=
Integer
.
parseInt
(
extractedValue
.
substring
(
1
));
// 提取数字部分
// 提取 Redis 中的字母和数字部分
char
redisLetter
=
currentSequenceStr
.
charAt
(
0
);
//redis中不是字母开头,输入的是字母开头
if
(!
Character
.
isLetter
(
redisLetter
)
)
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
int
redisNumber
=
Integer
.
parseInt
(
currentSequenceStr
.
substring
(
1
));
// 比较字母和数字
if
((
extractedLetter
>
redisLetter
||
(
extractedLetter
==
redisLetter
&&
extractedNumber
>
redisNumber
)))
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
else
{
// 如果首字符不是字母,直接进行字符串比较
if
(
extractedValue
.
compareTo
(
currentSequenceStr
)
>
0
)
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
}
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"数据格式错误"
);
}
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"数据格式错误"
);
}
}
}
...
...
@@ -3297,7 +3322,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Optional
.
ofNullable
(
data
.
getProduceDate
()).
ifPresent
(
v
->
checkDateFormatCorrect
(
v
,
"制造日期格式不正确;"
,
result
));
checkNotBlank
(
data
.
getInspectOrgName
(),
"检测机构名称不能为空;"
,
result
);
checkNotBlank
(
data
.
getInspectOrgCode
(),
"检测机构代码不能为空;"
,
result
);
checkInspectOrg
(
data
.
getInspectOrgCode
(),
result
);
//checkInspectOrg(data.getInspectOrgCode(), result);//查询检验检测机构
checkNotBlank
(
data
.
getInspectStaff
(),
"检测人员名称不能为空;"
,
result
);
checkNotBlank
(
data
.
getInspectDate
(),
"检测日期不能为空;"
,
result
);
checkDateFormatCorrect
(
data
.
getInspectDate
(),
"检测日期格式不正确;"
,
result
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
2d4f8393
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
2d4f8393
...
...
@@ -405,7 +405,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 设置检验、检测资质信息
setBaseUnitLicences
(
unitCode
,
jyjcOpeningApplicationModel
,
true
);
// 设置检验、检测人员信息
setJYJCUserList
(
unitCode
,
jyjcOpeningApplicationModel
,
false
,
jyjcOpeningApplicationModel
.
getOpenBizType
()
);
setJYJCUserList
(
unitCode
,
jyjcOpeningApplicationModel
,
false
,
"jy,jc"
);
}
else
{
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
jyjcOpeningApplicationModel
.
setResultType
(
"input"
);
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/EquipTechParamPipeline.java
View file @
2d4f8393
...
...
@@ -81,13 +81,13 @@ public class EquipTechParamPipeline extends AbstractEquipBaseEntity {
*/
@TableField
(
value
=
"\"NOMINAL_DIAMETER\""
)
private
BigDecimal
nominalDiameter
;
private
String
nominalDiameter
;
/**
* * 公称壁厚
*/
@TableField
(
value
=
"\"WALL_THICKNESS\""
)
private
BigDecimal
wallThickness
;
private
String
wallThickness
;
/**
* * 管道长度 (单位:m)
*/
...
...
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