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
c6bab10a
Commit
c6bab10a
authored
Mar 11, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.改造告知-校验管道编号不重复;
2.改造告知-使用单位未回显;
parent
1752420f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+8
-3
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+24
-0
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/controller/IdxBizJgProjectContraptionController.java
View file @
c6bab10a
...
@@ -33,7 +33,11 @@ import java.util.Map;
...
@@ -33,7 +33,11 @@ import java.util.Map;
public
class
IdxBizJgProjectContraptionController
extends
BaseController
{
public
class
IdxBizJgProjectContraptionController
extends
BaseController
{
// 设备基本信息表单id
// 设备基本信息表单id
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
@Autowired
public
static
final
String
PIPELINE_LIST
=
"pipelineList"
;
public
static
final
String
DEVICE_LIST
=
"deviceList"
;
public
static
final
String
USE_UNIT_CREDIT_CODE
=
"USE_UNIT_CREDIT_CODE"
;
public
static
final
String
USE_UNIT_NAME
=
"USE_UNIT_NAME"
;
@Autowired
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionServiceImpl
;
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionServiceImpl
;
/**
/**
...
@@ -141,8 +145,9 @@ public class IdxBizJgProjectContraptionController extends BaseController {
...
@@ -141,8 +145,9 @@ public class IdxBizJgProjectContraptionController extends BaseController {
// 传record的原因是前端组件内部写死了,此处是工程装置表seq
// 传record的原因是前端组件内部写死了,此处是工程装置表seq
public
ResponseModel
<
Object
>
detailsNotFormId
(
@RequestParam
(
"record"
)
String
sequenceNbr
)
{
public
ResponseModel
<
Object
>
detailsNotFormId
(
@RequestParam
(
"record"
)
String
sequenceNbr
)
{
Map
<
String
,
Object
>
objectMap
=
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
).
get
(
EQUIP_INFO_FORM_ID
);
Map
<
String
,
Object
>
objectMap
=
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
).
get
(
EQUIP_INFO_FORM_ID
);
Object
pipelineListObj
=
objectMap
.
remove
(
"pipelineList"
);
Object
pipelineListObj
=
objectMap
.
remove
(
PIPELINE_LIST
);
objectMap
.
put
(
"deviceList"
,
pipelineListObj
);
objectMap
.
put
(
DEVICE_LIST
,
pipelineListObj
);
objectMap
.
put
(
"useUnitCreditCode"
,
objectMap
.
get
(
USE_UNIT_CREDIT_CODE
)
+
"_"
+
objectMap
.
get
(
USE_UNIT_NAME
));
return
ResponseHelper
.
buildResponse
(
objectMap
);
return
ResponseHelper
.
buildResponse
(
objectMap
);
}
}
...
...
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/JgReformNoticeServiceImpl.java
View file @
c6bab10a
...
@@ -228,6 +228,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -228,6 +228,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 业务单据中的设备主键 管道的为record 其他设备为SEQUENCE_NBR
// 业务单据中的设备主键 管道的为record 其他设备为SEQUENCE_NBR
String
equSeq
=
!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
notice
.
getEquListCode
())
?
SEQUENCE_NBR
:
RECORD
;
String
equSeq
=
!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
notice
.
getEquListCode
())
?
SEQUENCE_NBR
:
RECORD
;
List
<
Map
<
String
,
Object
>>
deviceList
=
noticeDto
.
getDeviceList
();
List
<
Map
<
String
,
Object
>>
deviceList
=
noticeDto
.
getDeviceList
();
// 管道校验管道编号不重复
this
.
verifyThatThePipeNumberIsUnique
(
notice
.
getEquListCode
(),
deviceList
);
List
<
String
>
records
=
deviceList
.
stream
().
filter
(
item
->
!
Objects
.
isNull
(
item
.
get
(
RECORD
))).
map
(
equ
->
String
.
valueOf
(
equ
.
get
(
RECORD
))).
collect
(
Collectors
.
toList
());
List
<
String
>
records
=
deviceList
.
stream
().
filter
(
item
->
!
Objects
.
isNull
(
item
.
get
(
RECORD
))).
map
(
equ
->
String
.
valueOf
(
equ
.
get
(
RECORD
))).
collect
(
Collectors
.
toList
());
this
.
checkRepeatUsed
(
submitType
,
records
,
notice
);
this
.
checkRepeatUsed
(
submitType
,
records
,
notice
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
@@ -474,6 +476,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -474,6 +476,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"请选择设备!"
);
throw
new
BadRequest
(
"请选择设备!"
);
}
}
// 管道校验管道编号不重复
this
.
verifyThatThePipeNumberIsUnique
(
equListCode
,
deviceList
);
// 提交时对设备状态进行校验(处理并发问题,一个未被使用的设备同时被多个使用这打开,同时提交发起申请) todo 回滚异常未写
// 提交时对设备状态进行校验(处理并发问题,一个未被使用的设备同时被多个使用这打开,同时提交发起申请) todo 回滚异常未写
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
this
.
repeatUsedEquipCheck
(
deviceList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
deviceList
,
reginParams
.
getCompany
().
getCompanyCode
());
...
@@ -570,6 +574,23 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -570,6 +574,23 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
/**
/**
* 压力管道校验管道编号不能重复
*
* @param equListCode 设备种类
* @param deviceList 设备列表
*/
public
void
verifyThatThePipeNumberIsUnique
(
String
equListCode
,
List
<
Map
<
String
,
Object
>>
deviceList
)
{
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equListCode
))
{
if
(!
CollectionUtils
.
isEmpty
(
deviceList
)
&&
deviceList
.
size
()
!=
deviceList
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"pipelineNumber"
))
.
distinct
()
.
count
())
{
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
}
}
}
/**
* 计算管道长度变化 正值为增长,负值为减少
* 计算管道长度变化 正值为增长,负值为减少
*
*
* @param oldPipData 旧管道数据
* @param oldPipData 旧管道数据
...
@@ -1010,6 +1031,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1010,6 +1031,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
private
void
delPipDataWithFlowPass
(
List
<
String
>
toDeletePipRecords
)
{
private
void
delPipDataWithFlowPass
(
List
<
String
>
toDeletePipRecords
)
{
if
(
toDeletePipRecords
.
isEmpty
())
{
return
;
}
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDtoList
=
toDeletePipRecords
.
stream
().
map
(
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDtoList
=
toDeletePipRecords
.
stream
().
map
(
record
->
new
ESEquipmentCategoryDto
().
setSEQUENCE_NBR
(
record
)
record
->
new
ESEquipmentCategoryDto
().
setSEQUENCE_NBR
(
record
)
).
collect
(
Collectors
.
toList
());
).
collect
(
Collectors
.
toList
());
...
...
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