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
0dd22bb6
Commit
0dd22bb6
authored
Nov 21, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix
parents
1ea2ab6c
132c9620
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
XiAnDataDockServiceImpl.java
...oin/amos/api/openapi/service/XiAnDataDockServiceImpl.java
+35
-35
BaseEquipUsedCheckService.java
...module/jg/biz/service/impl/BaseEquipUsedCheckService.java
+2
-2
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/service/XiAnDataDockServiceImpl.java
View file @
0dd22bb6
...
...
@@ -271,26 +271,26 @@ public class XiAnDataDockServiceImpl {
// 基本信息
checkNotBlank
(
data
.
getEquList
(),
"设备种类不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getEquCategory
(),
"设备类别不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getUseInnerCode
(),
"单位内编号不能为空;"
,
rowError
);
if
(
useInnerCodeList
.
contains
(
data
.
getUseInnerCode
()))
{
rowError
.
append
(
"单位内编号不能重复;"
);
}
checkNotBlank
(
data
.
getProductName
(),
"产品名称不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getEquType
(),
"设备型号不能为空;"
,
rowError
);
//
checkNotBlank(data.getUseInnerCode(), "单位内编号不能为空;", rowError);
//
if (useInnerCodeList.contains(data.getUseInnerCode())) {
//
rowError.append("单位内编号不能重复;");
//
}
//
checkNotBlank(data.getProductName(), "产品名称不能为空;", rowError);
//
checkNotBlank(data.getEquType(), "设备型号不能为空;", rowError);
checkNotBlank
(
data
.
getEquCodeType
(),
"有无设备代码不能为空;"
,
rowError
);
if
(
"1"
.
equals
(
data
.
getEquCodeType
()))
{
checkNotBlank
(
data
.
getEquCode
(),
"设备代码不能为空;"
,
rowError
);
String
equCode
=
data
.
getEquCode
();
if
(
equCode
.
matches
(
"[a-zA-Z0-9]+"
))
{
if
(
equCode
.
length
()
<=
17
)
{
rowError
.
append
(
"设备代码不能小于17位;"
);
}
if
(
equCode
.
length
()
>=
20
)
{
rowError
.
append
(
"设备代码不能大于20位;"
);
}
}
else
{
rowError
.
append
(
"设备代码不能包含特殊字符;"
);
}
//
if (equCode.matches("[a-zA-Z0-9]+")) {
//
if (equCode.length() <= 17) {
//
rowError.append("设备代码不能小于17位;");
//
}
//
if (equCode.length() >= 20) {
//
rowError.append("设备代码不能大于20位;");
//
}
//
} else {
//
rowError.append("设备代码不能包含特殊字符;");
//
}
if
(
equCodeList
.
contains
(
data
.
getEquCode
()))
{
rowError
.
append
(
"设备代码不能重复;"
);
}
...
...
@@ -299,7 +299,7 @@ public class XiAnDataDockServiceImpl {
data
.
setEquCode
(
""
);
}
if
(
isPressurePiping
)
{
// 校验压力管道特有的参数
checkNotBlank
(
data
.
getProjectContraption
(),
"工程(装置)名称不能为空;"
,
rowError
);
//
checkNotBlank(data.getProjectContraption(), "工程(装置)名称不能为空;", rowError);
}
else
{
data
.
setProjectContraption
(
""
);
}
...
...
@@ -361,22 +361,22 @@ public class XiAnDataDockServiceImpl {
Optional
.
ofNullable
(
data
.
getUseUnitCode
()).
ifPresent
(
v
->
checkCreditCode
(
v
,
"使用单位统一社会信用代码格式不正确;"
,
rowError
));
checkNotBlank
(
data
.
getUseUnit
(),
"使用单位名称不能为空;"
,
rowError
);
// 设计信息
checkNotBlank
(
data
.
getDesignUnitCreditCode
(),
"设计单位统一社会信用代码不能为空;"
,
rowError
);
//
checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
Optional
.
ofNullable
(
data
.
getDesignUnitCreditCode
()).
ifPresent
(
v
->
checkCreditCode
(
v
,
"设计单位统一社会信用代码格式不正确;"
,
rowError
));
checkNotBlank
(
data
.
getDesignUnitName
(),
"设计单位名称不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getDesignUseDate
(),
"设计使用年限不能为空;"
,
rowError
);
//
checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
//
checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
Optional
.
ofNullable
(
data
.
getDesignUseDate
()).
ifPresent
(
v
->
checkDateFormatNumber
(
v
,
"设计使用年限不能为数字以外的其他类型;"
,
rowError
));
checkNotBlank
(
data
.
getDesignUseDate
(),
"设计日期不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getDesignDate
()).
ifPresent
(
v
->
checkDateFormatCorrect
(
v
,
"设计日期格式不正确;"
,
rowError
));
//
checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
//
Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
Optional
.
ofNullable
(
data
.
getAppraisalDate
()).
ifPresent
(
v
->
checkDateFormatCorrect
(
v
,
"设计文件鉴定日期格式不正确;"
,
rowError
));
// 制造信息
checkNotBlank
(
data
.
getProduceUnitCreditCode
(),
"制造单位统一社会信用代码不能为空;"
,
rowError
);
//
checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
Optional
.
ofNullable
(
data
.
getProduceUnitCreditCode
()).
ifPresent
(
v
->
checkCreditCode
(
v
,
"制造单位统一社会信用代码格式不正确;"
,
rowError
));
checkNotBlank
(
data
.
getProduceUnitName
(),
"制造单位名称不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getProduceLicenseNum
(),
"制造许可编号不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getFactoryNum
(),
"出厂编号/产品编码不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getProduceDate
(),
"制造日期不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getProduceDate
()).
ifPresent
(
v
->
checkDateFormatCorrect
(
v
,
"制造日期格式不正确;"
,
rowError
));
//
checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
//
checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
//
checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
//
checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
//
Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确;", rowError));
}
/**
...
...
@@ -478,9 +478,9 @@ public class XiAnDataDockServiceImpl {
* @param rowError
*/
private
void
YLRQTechnicalParamsCheck
(
XiAnEquipInfoExcelDto
data
,
StringBuilder
rowError
)
{
checkNotBlank
(
data
.
getSingleBottleVolume
(),
"单瓶容积不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getChargingMedium
(),
"充装介质不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getNominalWorkingPressure
(),
"公称工作压力不能为空;"
,
rowError
);
//
checkNotBlank(data.getSingleBottleVolume(), "单瓶容积不能为空;", rowError);
//
checkNotBlank(data.getChargingMedium(), "充装介质不能为空;", rowError);
//
checkNotBlank(data.getNominalWorkingPressure(), "公称工作压力不能为空;", rowError);
}
/**
...
...
@@ -490,14 +490,14 @@ public class XiAnDataDockServiceImpl {
* @param rowError
*/
private
void
YLGDTechnicalParamsCheck
(
XiAnEquipInfoExcelDto
data
,
StringBuilder
rowError
)
{
checkNotBlank
(
data
.
getWallThickness_YLGD
(),
"公称壁厚不能为空;"
,
rowError
);
//
checkNotBlank(data.getWallThickness_YLGD(), "公称壁厚不能为空;", rowError);
checkNotBlank
(
data
.
getNominalDiameter
(),
"公称直径不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPipeLength
(),
"管道长度不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPressure
(),
"压力不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getMedium_YLGD
(),
"介质不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getTemperature_YLGD
(),
"温度不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPipelineNumber
(),
"管道编号不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getDeviceLevel_YLGD
(),
"管道级别不能为空;"
,
rowError
);
//
checkNotBlank(data.getTemperature_YLGD(), "温度不能为空;", rowError);
//
checkNotBlank(data.getPipelineNumber(), "管道编号不能为空;", rowError);
//
checkNotBlank(data.getDeviceLevel_YLGD(), "管道级别不能为空;", rowError);
Optional
.
ofNullable
(
data
.
getStartePosition
()).
ifPresent
(
v
->
{
if
(
v
.
split
(
"-"
).
length
<=
1
)
{
rowError
.
append
(
"起/始位置 (经纬度)格式不正确"
);
...
...
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/BaseEquipUsedCheckService.java
View file @
0dd22bb6
...
...
@@ -48,7 +48,7 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
if
(
equipListOfUsed
!=
null
&&
equipListOfUsed
.
contains
(
record
))
{
String
joinedEquipInUse
=
String
.
join
(
","
,
equipInUseList
);
log
.
error
(
"设备已被其他流程使用,不允许重复提交,设备ID:{},在流程中申请单:{}"
,
record
,
joinedEquipInUse
);
throw
new
BadRequest
(
"设备已被其他流程使用,不允许重复提交
!,设备ID: "
+
record
+
" ,在流程中申请单:"
+
joinedEquipInUse
+
"
,请联系管理员!"
);
throw
new
BadRequest
(
"设备已被其他流程使用,不允许重复提交,请联系管理员!"
);
}
if
(
equipListOfUsed
==
null
||
equipListOfUsed
.
isEmpty
())
{
equipListOfUsed
=
new
TreeSet
<>();
...
...
@@ -80,7 +80,7 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
if
(
equipListOfUsed
!=
null
&&
equipListOfUsed
.
contains
(
record
))
{
String
joinedEquipInUse
=
String
.
join
(
","
,
equipInUseList
);
log
.
error
(
"使用登记证已被其他流程使用,不允许重复提交,设备ID:{},在流程中申请单:{}"
,
record
,
joinedEquipInUse
);
throw
new
BadRequest
(
"使用登记证已被其他流程使用,不允许重复提交
!,设备ID: "
+
record
+
" ,在流程中申请单:"
+
joinedEquipInUse
+
"
,请联系管理员!"
);
throw
new
BadRequest
(
"使用登记证已被其他流程使用,不允许重复提交,请联系管理员!"
);
}
if
(
equipListOfUsed
==
null
||
equipListOfUsed
.
isEmpty
())
{
equipListOfUsed
=
new
TreeSet
<>();
...
...
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