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
e327f438
Commit
e327f438
authored
Aug 07, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加96333码唯一校验
parent
b5722f2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+19
-4
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 @
e327f438
...
...
@@ -41,10 +41,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
...
...
@@ -126,6 +123,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
MANAGE_TYPE
=
"manageType"
;
// 设备代码
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
// 96333识别码
private
static
final
String
CODE96333
=
"CODE96333"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
FACTORY_NUM
=
"FACTORY_NUM"
;
// 新增设备是否复制而来
...
...
@@ -172,6 +171,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
OtherInfoMapper
otherInfoMapper
;
@Autowired
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
@Autowired
IIdxBizJgDesignInfoService
iIdxBizJgDesignInfoService
;
...
...
@@ -307,6 +308,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkEquCodeUniqueness
(
equipmentInfoForm
);
// 车用气瓶业务里面的 产品编号 校验唯一性(产品编号在车用气瓶范围内全局唯一)
checkFactoryNumUniqueness
(
equipmentInfoForm
);
// 96333码 字段的唯一性校验
check96333Code
(
equipmentInfoForm
);
}
catch
(
Exception
e
)
{
handleError
(
e
,
null
);
}
...
...
@@ -352,6 +355,18 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
throw
new
BadRequest
(
"设备代码已存在,请重新输入!"
);
}
}
private
void
check96333Code
(
LinkedHashMap
equipmentInfoForm
)
{
if
(!
ObjectUtils
.
isEmpty
(
equipmentInfoForm
.
get
(
CODE96333
))){
// 根据96333码检查唯一性
LambdaQueryWrapper
<
OtherInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OtherInfo:
:
getCode96333
,
equipmentInfoForm
.
get
(
CODE96333
));
wrapper
.
ne
(!
ObjectUtils
.
isEmpty
(
equipmentInfoForm
.
get
(
SEQUENCE_NBR
)),
OtherInfo:
:
getSequenceNbr
,
equipmentInfoForm
.
get
(
SEQUENCE_NBR
));
Integer
count
=
otherInfoMapper
.
selectCount
(
wrapper
);
if
(
count
>
0
)
{
throw
new
BadRequest
(
"96333码已存在,请确认后重新输入!"
);
}
}
}
private
void
checkFactoryNumUniqueness
(
LinkedHashMap
equipmentInfoForm
)
{
// 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
...
...
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