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
ac1fb4cc
Commit
ac1fb4cc
authored
Jul 10, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):工程装置编号校验
parent
744cc4b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+28
-3
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
ac1fb4cc
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
...
@@ -23,6 +24,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...
@@ -23,6 +24,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipRequestParamsDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
...
@@ -142,7 +144,6 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -142,7 +144,6 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
private
JgUseRegistrationManageServiceImpl
registrationManageService
;
private
JgUseRegistrationManageServiceImpl
registrationManageService
;
@Autowired
@Autowired
private
CommonMapper
commonMapper
;
private
CommonMapper
commonMapper
;
@Autowired
@Autowired
private
EventPublisher
eventPublisher
;
private
EventPublisher
eventPublisher
;
...
@@ -188,6 +189,25 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -188,6 +189,25 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
}
}
/**
/**
* 检查本单位下工程装置名称和工程装置编号是不是一一对应的
* 不对应抛出异常
*
* @param paramsDto
*/
void
checkTheUnitProConMatching
(
EquipRequestParamsDto
paramsDto
)
{
Integer
existsConflictNum
=
this
.
lambdaQuery
().
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
paramsDto
.
getCompanyCode
()).
eq
(
IdxBizJgProjectContraption:
:
getUseUnitName
,
paramsDto
.
getCompanyName
())
.
eq
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
Boolean
.
TRUE
)
.
eq
(
IdxBizJgProjectContraption:
:
getIsDelete
,
Boolean
.
FALSE
)
.
and
(
wrapper
->
wrapper
.
ne
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
paramsDto
.
getProjectContraptionNo
()).
eq
(
IdxBizJgProjectContraption:
:
getProjectContraption
,
paramsDto
.
getProjectContraption
())
.
or
().
eq
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
paramsDto
.
getProjectContraptionNo
()).
ne
(
IdxBizJgProjectContraption:
:
getProjectContraption
,
paramsDto
.
getProjectContraption
())
)
.
count
();
if
(
existsConflictNum
>
0
)
{
throw
new
BadRequest
(
"工程装置名称或编号与本单位下的已存在的数据冲突!"
);
}
}
/**
* 根据工程装置seq物理删除装置表数据和对应设备信息(数据库+es)
* 根据工程装置seq物理删除装置表数据和对应设备信息(数据库+es)
*
*
* @param sequenceNbr 工程装置表seq
* @param sequenceNbr 工程装置表seq
...
@@ -765,6 +785,11 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -765,6 +785,11 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
public
IdxBizJgProjectContraption
saveFirstMergeProjectContraption
(
IdxBizJgProjectContraptionDto
model
)
{
public
IdxBizJgProjectContraption
saveFirstMergeProjectContraption
(
IdxBizJgProjectContraptionDto
model
)
{
// 单位类型
// 单位类型
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
this
.
checkTheUnitProConMatching
(
EquipRequestParamsDto
.
builder
()
.
projectContraptionNo
(
model
.
getProjectContraptionNo
())
.
projectContraption
(
model
.
getProjectContraption
())
.
companyCode
(
MapUtil
.
getStr
(
companyInfoMap
,
"creditCode"
))
.
build
());
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
model
),
IdxBizJgProjectContraption
.
class
);
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
model
),
IdxBizJgProjectContraption
.
class
);
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquListCode
());
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquListCode
());
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquCategoryCode
());
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquCategoryCode
());
...
@@ -779,8 +804,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -779,8 +804,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
projectContraption
.
setEquCategoryName
(
equCategoryName
);
projectContraption
.
setEquCategoryName
(
equCategoryName
);
projectContraption
.
setEquDefineName
(
equDefineName
);
projectContraption
.
setEquDefineName
(
equDefineName
);
projectContraption
.
setPipelineLength
(
0.0
);
projectContraption
.
setPipelineLength
(
0.0
);
projectContraption
.
setUseUnitName
(
companyInfoMap
.
get
(
"companyName"
).
toString
(
));
projectContraption
.
setUseUnitName
(
MapUtil
.
getStr
(
companyInfoMap
,
"companyName"
));
projectContraption
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
(
));
projectContraption
.
setUseUnitCreditCode
(
MapUtil
.
getStr
(
companyInfoMap
,
"creditCode"
));
this
.
saveOrUpdateData
(
projectContraption
);
this
.
saveOrUpdateData
(
projectContraption
);
return
projectContraption
;
return
projectContraption
;
}
}
...
...
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