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
24d166b0
Commit
24d166b0
authored
Oct 28, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reafact(jg): 压力管道管道长度
1.压力管道管道长度调整为字符串/分隔开
parent
9eefcdb4
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
115 additions
and
23 deletions
+115
-23
PipeLengthField.java
...join/amos/boot/biz/common/annotation/PipeLengthField.java
+14
-0
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+35
-5
BizCommonConstant.java
...oin/amos/boot/module/jg/api/common/BizCommonConstant.java
+4
-0
JgChangeRegistrationReformMapper.xml
...ain/resources/mapper/JgChangeRegistrationReformMapper.xml
+1
-0
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+1
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+2
-0
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+1
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+10
-0
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+20
-5
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+1
-1
PressurePipeBasicInformationSummary.ftl
...sources/templates/PressurePipeBasicInformationSummary.ftl
+10
-10
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+2
-0
IdxBizJgTechParamsPipeline.java
...oot/module/ymt/api/entity/IdxBizJgTechParamsPipeline.java
+10
-1
EquipTechParamPipelineMapper.xml
...rc/main/resources/mapper/EquipTechParamPipelineMapper.xml
+1
-0
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+3
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/annotation/PipeLengthField.java
0 → 100644
View file @
24d166b0
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
annotation
;
import
java.lang.annotation.*
;
/**
* @author DELL
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
TYPE
})
@Documented
public
@interface
PipeLengthField
{
String
sourceField
()
default
"pipeLengthText"
;
String
targetField
()
default
"pipeLength"
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
24d166b0
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.biz.config;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.biz.config;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField
;
import
com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField
;
import
com.yeejoin.amos.boot.biz.common.annotation.PipeLengthField
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
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
;
...
@@ -15,7 +16,11 @@ import org.springframework.util.ObjectUtils;
...
@@ -15,7 +16,11 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Objects
;
/**
/**
* @author Dell
* @author Dell
...
@@ -42,17 +47,37 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -42,17 +47,37 @@ public class MetaHandler implements MetaObjectHandler {
@Override
@Override
public
void
insertFill
(
MetaObject
metaObject
)
{
public
void
insertFill
(
MetaObject
metaObject
)
{
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
Class
clazz
=
metaObject
.
getOriginalObject
().
getClass
();
Class
<?>
clazz
=
metaObject
.
getOriginalObject
().
getClass
();
FillCommonUserField
annotation
=
(
FillCommonUserField
)
clazz
.
getAnnotation
(
FillCommonUserField
.
class
);
FillCommonUserField
annotation
=
clazz
.
getAnnotation
(
FillCommonUserField
.
class
);
if
(
annotation
==
null
||
annotation
.
isAutoFill
())
{
if
(
annotation
==
null
||
annotation
.
isAutoFill
())
{
autoFillUser
(
metaObject
,
metaObject
.
getOriginalObject
());
autoFillUser
(
metaObject
,
metaObject
.
getOriginalObject
());
}
}
//如果有上传创建时间,不需要修改
PipeLengthField
pipeLengthField
=
clazz
.
getAnnotation
(
PipeLengthField
.
class
);
// if(metaObject.getValue("createDate")==null){
if
(
pipeLengthField
!=
null
){
// }
processAutoFill
(
metaObject
,
pipeLengthField
);
}
this
.
setFieldValByName
(
"createDate"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"createDate"
,
currentDate
,
metaObject
);
}
}
private
void
processAutoFill
(
MetaObject
metaObject
,
PipeLengthField
pipeLengthField
)
{
Object
sourceValue
=
metaObject
.
getValue
(
pipeLengthField
.
sourceField
());
if
(
sourceValue
!=
null
&&
metaObject
.
hasGetter
(
pipeLengthField
.
sourceField
())
&&
metaObject
.
hasGetter
(
pipeLengthField
.
targetField
()))
{
Object
convertedValue
=
convertValue
(
sourceValue
,
pipeLengthField
);
metaObject
.
setValue
(
pipeLengthField
.
targetField
(),
convertedValue
);
}
}
private
Object
convertValue
(
Object
sourceValue
,
PipeLengthField
pipeLengthField
)
{
// 示例:针对pipeLength的特殊处理
if
(
"pipeLengthText"
.
equals
(
pipeLengthField
.
sourceField
()))
{
return
Arrays
.
stream
(
sourceValue
.
toString
().
split
(
"/"
)).
filter
(
Objects:
:
nonNull
)
.
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
setScale
(
3
,
RoundingMode
.
HALF_UP
).
toPlainString
();
}
// 可扩展其他转换规则
return
sourceValue
;
}
private
void
autoFillUser
(
MetaObject
metaObject
,
Object
entity
)
{
private
void
autoFillUser
(
MetaObject
metaObject
,
Object
entity
)
{
//获取用户信息 以及当前用户登录公司部门,角色
//获取用户信息 以及当前用户登录公司部门,角色
String
userId
=
RequestContext
.
getExeUserId
();
String
userId
=
RequestContext
.
getExeUserId
();
...
@@ -165,5 +190,9 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -165,5 +190,9 @@ public class MetaHandler implements MetaObjectHandler {
AgencyUserModel
agencyUserModel
=
reginParams
.
getUserModel
();
AgencyUserModel
agencyUserModel
=
reginParams
.
getUserModel
();
recInfoUpdate
(
metaObject
,
agencyUserModel
);
recInfoUpdate
(
metaObject
,
agencyUserModel
);
}
}
PipeLengthField
pipeLengthField
=
clazz
.
getAnnotation
(
PipeLengthField
.
class
);
if
(
pipeLengthField
!=
null
){
processAutoFill
(
metaObject
,
pipeLengthField
);
}
}
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/common/BizCommonConstant.java
View file @
24d166b0
...
@@ -13,4 +13,8 @@ public interface BizCommonConstant {
...
@@ -13,4 +13,8 @@ public interface BizCommonConstant {
String
COMPANY_TREE_REDIS_KEY
=
"REGULATOR_UNIT_TREE"
;
String
COMPANY_TREE_REDIS_KEY
=
"REGULATOR_UNIT_TREE"
;
String
EQU_CATEGORY_CYLINDER
=
"2300"
;
String
EQU_CATEGORY_CYLINDER
=
"2300"
;
String
PIPE_LENGTH
=
"pipeLengthText"
;
String
PIPE_LENGTH_SPILT
=
"/"
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationReformMapper.xml
View file @
24d166b0
...
@@ -379,6 +379,7 @@
...
@@ -379,6 +379,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."MEDIUM" medium,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
24d166b0
...
@@ -260,6 +260,7 @@
...
@@ -260,6 +260,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."MEDIUM" medium,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
24d166b0
...
@@ -1119,6 +1119,7 @@
...
@@ -1119,6 +1119,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."MEDIUM" medium,
...
@@ -1189,6 +1190,7 @@
...
@@ -1189,6 +1190,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."MEDIUM" AS medium,
...
...
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 @
24d166b0
...
@@ -732,7 +732,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -732,7 +732,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Map
<
String
,
Object
>>
equData
,
int
current
,
int
size
)
{
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Map
<
String
,
Object
>>
equData
,
int
current
,
int
size
)
{
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength"
,
"pressure"
,
"temperature"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength
Text
"
,
"pressure"
,
"temperature"
,
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"remarks"
};
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"remarks"
};
// 填充有效数据
// 填充有效数据
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
...
...
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 @
24d166b0
...
@@ -842,6 +842,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -842,6 +842,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateBatch
(
inspectionDetectionInfoList
);
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateBatch
(
inspectionDetectionInfoList
);
iIdxBizJgTechParamsPipelineService
.
saveOrUpdateBatch
(
paramsPipelineList
);
iIdxBizJgTechParamsPipelineService
.
saveOrUpdateBatch
(
paramsPipelineList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
projectContraption
.
setPipelineLength
(
paramsPipelineList
.
stream
()
.
map
(
IdxBizJgTechParamsPipeline:
:
getPipeLength
)
.
filter
(
Objects:
:
nonNull
)
.
map
(
BigDecimal:
:
new
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)
.
doubleValue
()
);
idxBizJgProjectContraptionService
.
saveOrUpdateData
(
projectContraption
);
if
(
OPERATESAVE
.
equals
(
operateType
)){
if
(
OPERATESAVE
.
equals
(
operateType
)){
// 记录设备创建履历
// 记录设备创建履历
this
.
createResumePipeline
(
sequenceNbr
,
String
.
format
(
pipelineRoutePath
,
sequenceNbr
+
""
),
company
);
this
.
createResumePipeline
(
sequenceNbr
,
String
.
format
(
pipelineRoutePath
,
sequenceNbr
+
""
),
company
);
...
...
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 @
24d166b0
...
@@ -73,12 +73,15 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -73,12 +73,15 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH_SPILT
;
/**
/**
* 改造告知服务实现类
* 改造告知服务实现类
...
@@ -96,7 +99,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -96,7 +99,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNoticeNew"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNoticeNew"
;
private
static
final
String
TABLE_PAGE_ID
=
"reformNoticeAdd"
;
private
static
final
String
TABLE_PAGE_ID
=
"reformNoticeAdd"
;
public
static
final
String
DEVICE_LIST
=
"deviceList"
;
public
static
final
String
DEVICE_LIST
=
"deviceList"
;
public
static
final
String
PIPE_LENGTH
=
"pipeLength"
;
public
static
final
String
RECORD
=
"record"
;
public
static
final
String
RECORD
=
"record"
;
public
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
public
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
public
static
final
String
PROJECT_CONTRAPTION
=
"projectContraption"
;
public
static
final
String
PROJECT_CONTRAPTION
=
"projectContraption"
;
...
@@ -651,12 +653,25 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -651,12 +653,25 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @return 管道长度变化,正值为增长,负值为减少
* @return 管道长度变化,正值为增长,负值为减少
*/
*/
private
String
calculatePipeLengthChange
(
JSONArray
oldPipData
,
JSONArray
newPipData
)
{
private
String
calculatePipeLengthChange
(
JSONArray
oldPipData
,
JSONArray
newPipData
)
{
double
oldPipLen
=
oldPipData
.
stream
().
mapToDouble
(
item
->
JSONObject
.
parseObject
(
item
.
toString
()).
getDoubleValue
(
PIPE_LENGTH
)).
sum
()
;
double
oldPipLen
=
getPipLen
(
oldPipData
);
;
double
newPipLen
=
newPipData
.
stream
().
mapToDouble
(
item
->
JSONObject
.
parseObject
(
item
.
toString
()).
getDoubleValue
(
PIPE_LENGTH
)).
sum
(
);
double
newPipLen
=
getPipLen
(
newPipData
);
double
change
=
newPipLen
-
oldPipLen
;
double
change
=
newPipLen
-
oldPipLen
;
return
change
==
0
?
"0"
:
String
.
format
(
"%+.2f"
,
change
);
return
change
==
0
?
"0"
:
String
.
format
(
"%+.2f"
,
change
);
}
}
private
static
double
getPipLen
(
JSONArray
oldPipData
)
{
return
oldPipData
.
stream
()
.
map
(
p
->
JSON
.
parseObject
(
p
.
toString
()))
.
filter
(
s
->
StringUtil
.
isNotEmpty
(
s
.
getString
(
PIPE_LENGTH
)))
.
map
(
d
->
Arrays
.
stream
(
d
.
getString
(
PIPE_LENGTH
).
split
(
PIPE_LENGTH_SPILT
))
// 分割字符串
.
map
(
BigDecimal:
:
new
)
// 转 BigDecimal
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
// 分段求和
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
// 全局求和
.
doubleValue
();
}
private
JSONObject
getNowPipJsonData
(
String
projectContraptionId
)
{
private
JSONObject
getNowPipJsonData
(
String
projectContraptionId
)
{
return
new
JSONObject
(
Optional
.
ofNullable
(
idxBizJgProjectContraptionMapper
.
getDetail
(
projectContraptionId
))
return
new
JSONObject
(
Optional
.
ofNullable
(
idxBizJgProjectContraptionMapper
.
getDetail
(
projectContraptionId
))
.
map
(
map
->
{
.
map
(
map
->
{
...
@@ -1120,7 +1135,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1120,7 +1135,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 产品质量合格证明 PRODUCT_QUALIFICATION_CERTIFICATE 其他附件 OTHER_ACCESSORIES 管道总长度
// 产品质量合格证明 PRODUCT_QUALIFICATION_CERTIFICATE 其他附件 OTHER_ACCESSORIES 管道总长度
// String productQualificationCertificate = JSON.toJSONString(newData.get(PRODUCT_QUALIFICATION_CERTIFICATE));
// String productQualificationCertificate = JSON.toJSONString(newData.get(PRODUCT_QUALIFICATION_CERTIFICATE));
// String otherAccessories = JSON.toJSONString(newData.get(OTHER_ACCESSORIES));
// String otherAccessories = JSON.toJSONString(newData.get(OTHER_ACCESSORIES));
double
pipLengthLastSum
=
newPipData
.
stream
().
mapToDouble
(
item
->
JSONObject
.
parseObject
(
item
.
toString
()).
getDoubleValue
(
PIPE_LENGTH
)).
sum
();
double
pipLengthLastSum
=
getPipLen
(
newPipData
);
// 最终转 double
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>()
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>()
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
notice
.
getProjectContraptionId
())
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
notice
.
getProjectContraptionId
())
// .set(IdxBizJgProjectContraption::getProductQualificationCertificate, productQualificationCertificate)
// .set(IdxBizJgProjectContraption::getProductQualificationCertificate, productQualificationCertificate)
...
@@ -1462,7 +1477,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1462,7 +1477,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
JSONArray
alreadyDelPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEL_DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONArray
alreadyDelPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEL_DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONObject
oldData
=
Optional
.
ofNullable
(
JSONObject
.
parseObject
(
registrationHistory
.
getOldData
())).
orElse
(
new
JSONObject
());
JSONObject
oldData
=
Optional
.
ofNullable
(
JSONObject
.
parseObject
(
registrationHistory
.
getOldData
())).
orElse
(
new
JSONObject
());
JSONArray
oldPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
oldData
.
getString
(
DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONArray
oldPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
oldData
.
getString
(
DEVICE_LIST
))).
orElse
(
new
JSONArray
());
double
oldPipLength
=
oldPipData
.
stream
().
mapToDouble
(
item
->
JSON
.
parseObject
(
item
.
toString
()).
getDoubleValue
(
PIPE_LENGTH
)).
sum
(
);
double
oldPipLength
=
getPipLen
(
oldPipData
);
List
<
String
>
oldPipDataRecords
=
oldPipData
.
stream
().
map
(
item
->
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
)).
collect
(
Collectors
.
toList
());
List
<
String
>
oldPipDataRecords
=
oldPipData
.
stream
().
map
(
item
->
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
)).
collect
(
Collectors
.
toList
());
List
<
String
>
nowPipDataRecords
=
idxBizJgProjectContraptionMapper
.
selectEquipList
(
notice
.
getProjectContraptionId
()).
stream
().
map
(
item
->
String
.
valueOf
(
item
.
get
(
"record"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
nowPipDataRecords
=
idxBizJgProjectContraptionMapper
.
selectEquipList
(
notice
.
getProjectContraptionId
()).
stream
().
map
(
item
->
String
.
valueOf
(
item
.
get
(
"record"
))).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
toAddPipData
=
alreadyDelPipData
.
stream
().
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
toAddPipData
=
alreadyDelPipData
.
stream
().
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
...
...
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/JgUseRegistrationServiceImpl.java
View file @
24d166b0
...
@@ -3173,7 +3173,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -3173,7 +3173,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
current
,
int
size
)
{
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
current
,
int
size
)
{
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength"
,
"pressure"
,
"temperature"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength
Text
"
,
"pressure"
,
"temperature"
,
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"remarks"
};
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"remarks"
};
// 填充有效数据
// 填充有效数据
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/PressurePipeBasicInformationSummary.ftl
View file @
24d166b0
...
@@ -1988,7 +1988,7 @@
...
@@ -1988,7 +1988,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
1
}
</w:t>
<w:t>
${pipeLength
Text1!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -2385,7 +2385,7 @@
...
@@ -2385,7 +2385,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
2
}
</w:t>
<w:t>
${pipeLength
Text2!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -2782,7 +2782,7 @@
...
@@ -2782,7 +2782,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
3
}
</w:t>
<w:t>
${pipeLength
Text3!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -3179,7 +3179,7 @@
...
@@ -3179,7 +3179,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
4
}
</w:t>
<w:t>
${pipeLength
Text4!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -3576,7 +3576,7 @@
...
@@ -3576,7 +3576,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
5
}
</w:t>
<w:t>
${pipeLength
Text5!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -3973,7 +3973,7 @@
...
@@ -3973,7 +3973,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
6
}
</w:t>
<w:t>
${pipeLength
Text6!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -4370,7 +4370,7 @@
...
@@ -4370,7 +4370,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
7
}
</w:t>
<w:t>
${pipeLength
Text7!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -4767,7 +4767,7 @@
...
@@ -4767,7 +4767,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
8
}
</w:t>
<w:t>
${pipeLength
Text8!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -5164,7 +5164,7 @@
...
@@ -5164,7 +5164,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
9
}
</w:t>
<w:t>
${pipeLength
Text9!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
@@ -5561,7 +5561,7 @@
...
@@ -5561,7 +5561,7 @@
<w:sz
w:val=
"14"
/>
<w:sz
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
<w:szCs
w:val=
"14"
/>
</w:rPr>
</w:rPr>
<w:t>
${pipeLength
10
}
</w:t>
<w:t>
${pipeLength
Text10!"/"
}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
24d166b0
...
@@ -728,6 +728,7 @@
...
@@ -728,6 +728,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."MEDIUM" medium,
...
@@ -775,6 +776,7 @@
...
@@ -775,6 +776,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."MEDIUM" medium,
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgTechParamsPipeline.java
View file @
24d166b0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.PipeLengthField
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -18,6 +20,7 @@ import lombok.experimental.Accessors;
...
@@ -18,6 +20,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_jg_tech_params_pipeline"
)
@TableName
(
"idx_biz_jg_tech_params_pipeline"
)
@PipeLengthField
public
class
IdxBizJgTechParamsPipeline
extends
TzsBaseEntity
{
public
class
IdxBizJgTechParamsPipeline
extends
TzsBaseEntity
{
...
@@ -96,7 +99,7 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
...
@@ -96,7 +99,7 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
/**
/**
*
*
*/
*/
@TableField
(
"\"PIPE_LENGTH\""
)
@TableField
(
value
=
"\"PIPE_LENGTH\""
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
String
pipeLength
;
private
String
pipeLength
;
/**
/**
...
@@ -167,4 +170,10 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
...
@@ -167,4 +170,10 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
@TableField
(
value
=
"\"WORK_REMARKS\""
)
@TableField
(
value
=
"\"WORK_REMARKS\""
)
private
String
workRemarks
;
private
String
workRemarks
;
/**
* 管道长度斜线分隔多段表示用
*/
@TableField
(
"\"PIPE_LENGTH_TEXT\""
)
private
String
pipeLengthText
;
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/EquipTechParamPipelineMapper.xml
View file @
24d166b0
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
"NOMINAL_DIAMETER",
"NOMINAL_DIAMETER",
"WALL_THICKNESS",
"WALL_THICKNESS",
"PIPE_LENGTH",
"PIPE_LENGTH",
"PIPE_LENGTH_TEXT",
"PRESSURE",
"PRESSURE",
"TEMPERATURE",
"TEMPERATURE",
"MEDIUM",
"MEDIUM",
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
24d166b0
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."MEDIUM" AS medium,
...
@@ -171,6 +172,7 @@
...
@@ -171,6 +172,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."MEDIUM" AS medium,
...
@@ -316,6 +318,7 @@
...
@@ -316,6 +318,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."MEDIUM" AS medium,
...
...
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