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
5d68c1a9
Commit
5d68c1a9
authored
Mar 11, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_test' into develop_tzs_register_test
parents
55edaa13
04e80df8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
5 deletions
+38
-5
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+7
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+7
-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 @
5d68c1a9
...
...
@@ -33,6 +33,10 @@ import java.util.Map;
public
class
IdxBizJgProjectContraptionController
extends
BaseController
{
// 设备基本信息表单id
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
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
;
...
...
@@ -141,8 +145,9 @@ public class IdxBizJgProjectContraptionController extends BaseController {
// 传record的原因是前端组件内部写死了,此处是工程装置表seq
public
ResponseModel
<
Object
>
detailsNotFormId
(
@RequestParam
(
"record"
)
String
sequenceNbr
)
{
Map
<
String
,
Object
>
objectMap
=
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
).
get
(
EQUIP_INFO_FORM_ID
);
Object
pipelineListObj
=
objectMap
.
remove
(
"pipelineList"
);
objectMap
.
put
(
"deviceList"
,
pipelineListObj
);
Object
pipelineListObj
=
objectMap
.
remove
(
PIPELINE_LIST
);
objectMap
.
put
(
DEVICE_LIST
,
pipelineListObj
);
objectMap
.
put
(
"useUnitCreditCode"
,
objectMap
.
get
(
USE_UNIT_CREDIT_CODE
)
+
"_"
+
objectMap
.
get
(
USE_UNIT_NAME
));
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/CommonServiceImpl.java
View file @
5d68c1a9
...
...
@@ -2260,10 +2260,14 @@ public class CommonServiceImpl implements ICommonService {
DateTimeFormatter
inputFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
DateTimeFormatter
outputFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
Pattern
timePattern
=
Pattern
.
compile
(
"\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"
);
//如果是历史无证的修改类型为SP_TT并且枚举没有在登记类型中
if
(
Objects
.
isNull
(
RegistrationTypeEnum
.
getNameByType
(
formData
.
getString
(
"type"
)))
&&
"jg_his_black"
.
equals
(
formData
.
getString
(
"dataSource"
))){
formData
.
put
(
"type"
,
"SP_TT"
);
}
//登记类型
if
(
jsonObject
.
containsKey
(
"type"
)){
formData
.
put
(
"registrationType"
,
RegistrationTypeEnum
.
getNameByType
(
jsonObject
.
getString
(
"type"
)));
if
(
formData
.
containsKey
(
"type"
)){
formData
.
put
(
"registrationType"
,
RegistrationTypeEnum
.
getNameByType
(
formData
.
getString
(
"type"
)));
}
for
(
String
key
:
formData
.
keySet
())
{
if
(
key
.
contains
(
"Date"
)
&&
timePattern
.
matcher
(
formData
.
getString
(
key
)).
matches
()){
...
...
@@ -2318,7 +2322,7 @@ public class CommonServiceImpl implements ICommonService {
.
map
(
obj
->
(
Map
<
String
,
Object
>)
obj
).
collect
(
Collectors
.
toList
());
if
(
manageType
.
equals
(
UNIT
)
&&
!
CollectionUtils
.
isEmpty
(
equips
)){
//管道计算的是管道长度
if
(
formData
.
containsKey
(
"equListCode"
)
&&
formData
.
getString
(
"equListCode"
).
equals
(
"8000"
)){
if
(
"8000"
.
equals
(
formData
.
getString
(
"equListCode"
))
||
"8000"
.
equals
(
formData
.
getString
(
"EQU_LIST_CODE"
)
)){
double
pipeLength
=
equips
.
stream
().
filter
(
Objects:
:
nonNull
)
.
filter
(
map
->
map
.
containsKey
(
"pipeLength"
)
&&
StringUtils
.
isNotEmpty
((
String
)
map
.
get
(
"pipeLength"
)))
.
mapToDouble
(
map
->
Double
.
parseDouble
((
String
)
map
.
get
(
"pipeLength"
)))
...
...
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 @
5d68c1a9
...
...
@@ -228,6 +228,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 业务单据中的设备主键 管道的为record 其他设备为SEQUENCE_NBR
String
equSeq
=
!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
notice
.
getEquListCode
())
?
SEQUENCE_NBR
:
RECORD
;
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
());
this
.
checkRepeatUsed
(
submitType
,
records
,
notice
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
...
@@ -474,6 +476,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"请选择设备!"
);
}
// 管道校验管道编号不重复
this
.
verifyThatThePipeNumberIsUnique
(
equListCode
,
deviceList
);
// 提交时对设备状态进行校验(处理并发问题,一个未被使用的设备同时被多个使用这打开,同时提交发起申请) todo 回滚异常未写
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
this
.
repeatUsedEquipCheck
(
deviceList
,
reginParams
.
getCompany
().
getCompanyCode
());
...
...
@@ -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 旧管道数据
...
...
@@ -1010,6 +1031,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
private
void
delPipDataWithFlowPass
(
List
<
String
>
toDeletePipRecords
)
{
if
(
toDeletePipRecords
.
isEmpty
())
{
return
;
}
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDtoList
=
toDeletePipRecords
.
stream
().
map
(
record
->
new
ESEquipmentCategoryDto
().
setSEQUENCE_NBR
(
record
)
).
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