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
4431f81d
Commit
4431f81d
authored
Dec 18, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
331366d0
3d398870
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
267 additions
and
40 deletions
+267
-40
PieLineDesignChangeDataDto.java
...os/boot/module/jg/api/dto/PieLineDesignChangeDataDto.java
+14
-0
PipelineChangeItemDto.java
...in/amos/boot/module/jg/api/dto/PipelineChangeItemDto.java
+24
-0
ProjectContraptionChangeDataDto.java
...ot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
+50
-0
TechParamsPipelineChangeFieldDto.java
...t/module/jg/api/dto/TechParamsPipelineChangeFieldDto.java
+21
-12
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+2
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+30
-1
BizDataChangeController.java
...oot/module/jg/biz/controller/BizDataChangeController.java
+0
-2
IChangeDataProcessStrategy.java
...oot/module/jg/biz/service/IChangeDataProcessStrategy.java
+1
-1
BatchDataChangeProcessStrategy.java
...e/jg/biz/service/impl/BatchDataChangeProcessStrategy.java
+0
-0
BizDataChangeServiceImpl.java
.../module/jg/biz/service/impl/BizDataChangeServiceImpl.java
+3
-1
CommonEquipDataProcessService.java
...le/jg/biz/service/impl/CommonEquipDataProcessService.java
+22
-19
EquipChangeDataUpdateService.java
...ule/jg/biz/service/impl/EquipChangeDataUpdateService.java
+9
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+2
-2
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+13
-1
PieLineDataChangeServiceImpl.java
...ule/jg/biz/service/impl/PieLineDataChangeServiceImpl.java
+66
-0
UseRegisterUpdateService.java
.../module/jg/biz/service/impl/UseRegisterUpdateService.java
+10
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/PieLineDesignChangeDataDto.java
0 → 100644
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Group
(
value
=
"equip_design_info"
)
public
class
PieLineDesignChangeDataDto
extends
BaseChangeDataDto
{
@FieldDisplayDefine
(
value
=
"设计单位名称"
)
private
String
designUnitName
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/PipelineChangeItemDto.java
0 → 100644
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* 安全追溯-压力管道
*
* @author system_generator
* @date 2023-08-17
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Accessors
(
chain
=
true
)
@Group
(
value
=
"PipelineChangeItemDto"
)
public
class
PipelineChangeItemDto
extends
TechParamsPipelineChangeFieldDto
{
@FieldDisplayDefine
(
value
=
"设计单位名称"
)
private
String
designUnitName
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
0 → 100644
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Group
(
value
=
"idx_biz_jg_project_contraption"
)
@ApiModel
(
value
=
"ProjectContraptionChangeFieldDto"
,
description
=
"管道工程装置表"
)
public
class
ProjectContraptionChangeDataDto
extends
BaseChangeDataDto
{
@FieldDisplayDefine
(
value
=
"主键"
,
isExist
=
false
)
private
String
projectContraptionId
;
private
static
final
long
serialVersionUID
=
1L
;
@FieldDisplayDefine
(
value
=
"工程装置名称"
)
private
String
projectContraption
;
@FieldDisplayDefine
(
value
=
"工程装置编号"
)
private
String
projectContraptionNo
;
@FieldDisplayDefine
(
value
=
"设备品种代码"
)
private
String
equDefineCode
;
@FieldDisplayDefine
(
value
=
"设备品种名称"
)
private
String
equDefine
;
@FieldDisplayDefine
(
value
=
"装置管道总长度(m)"
,
isExist
=
false
)
private
Double
pipelineLength
;
@FieldDisplayDefine
(
value
=
"产品照片附件"
,
type
=
JSON
.
class
)
private
String
productPhoto
;
@FieldDisplayDefine
(
value
=
"其他附件"
,
type
=
JSON
.
class
)
private
String
otherAccessories
;
@FieldDisplayDefine
(
value
=
"产品质量合格证明"
,
type
=
JSON
.
class
)
private
String
productQualificationCertificate
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/TechParamsPipelineChangeFieldDto.java
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
...
...
@@ -12,14 +12,19 @@ import lombok.experimental.Accessors;
* @author system_generator
* @date 2023-08-17
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Accessors
(
chain
=
true
)
@Group
(
value
=
"tech_params_pipeline"
)
public
class
TechParamsPipelineChangeFieldDto
extends
BaseTechParamsFieldDto
{
@FieldDisplayDefine
(
value
=
"管道类别"
)
private
String
pipelineClass
;
@FieldDisplayDefine
(
value
=
"w唯一标识"
,
isExist
=
false
)
private
String
record
;
@FieldDisplayDefine
(
value
=
"管道名称(登记单元)"
)
private
String
pipeName
;
@FieldDisplayDefine
(
value
=
"管道编号"
)
...
...
@@ -39,27 +44,31 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine
(
value
=
"管道长度"
)
private
String
pipeLength
;
@FieldDisplayDefine
(
value
=
"起/始位置"
,
type
=
JSON
.
class
)
private
String
startePosition
;
private
Double
pipeLength
;
@FieldDisplayDefine
(
value
=
"压力"
)
@FieldDisplayDefine
(
value
=
"
设计
压力"
)
private
String
pressure
;
@FieldDisplayDefine
(
value
=
"温度"
)
@FieldDisplayDefine
(
value
=
"
设计
温度"
)
private
String
temperature
;
@FieldDisplayDefine
(
value
=
"介质"
)
@FieldDisplayDefine
(
value
=
"
设计
介质"
)
private
String
medium
;
@FieldDisplayDefine
(
value
=
"工作压力"
)
private
String
workPressure
;
@FieldDisplayDefine
(
value
=
"工作温度"
)
private
String
workTemperature
;
@FieldDisplayDefine
(
value
=
"工作介质"
)
private
String
workMedium
;
@FieldDisplayDefine
(
value
=
"备注"
)
private
String
remarks
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
4431f81d
...
...
@@ -77,6 +77,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@MapKey
(
"records"
)
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipmentForEdit
(
@Param
(
"records"
)
List
<
String
>
records
);
@MapKey
(
"id"
)
List
<
Map
<
String
,
Object
>>
selectEquipList
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
4431f81d
...
...
@@ -604,7 +604,8 @@
(select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategoryName,
ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
ri."PRODUCT_NAME" productName,
-- 历史遗留问题 故 as
pp."PIPE_NAME" as productName,
ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType,
...
...
@@ -675,6 +676,34 @@
</foreach>
ORDER BY ui.REC_DATE DESC
</select>
<select
id=
"queryForUnitPipelineEquipmentForEdit"
resultType=
"java.util.Map"
>
SELECT
ibjtpp."PIPE_NAME" AS pipeName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."WORK_PRESSURE" AS workPressure,
ibjtpp."WORK_TEMPERATURE" AS workTemperature,
ibjtpp."WORK_MEDIUM" AS workMedium,
ibjtpp."REMARKS" AS remarks,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE
ibjui.record in
<foreach
collection=
"records"
item=
"record"
open=
"("
close=
")"
separator=
","
>
#{record}
</foreach>
ORDER BY ibjui.REC_DATE DESC
</select>
<sql
id=
"page-list-vessel"
>
SELECT
ui."USE_UNIT_NAME" useUnitName,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/BizDataChangeController.java
View file @
4431f81d
...
...
@@ -45,6 +45,4 @@ public class BizDataChangeController {
@RequestParam
(
required
=
false
)
String
bizId
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
model
,
bizId
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IChangeDataProcessStrategy.java
View file @
4431f81d
...
...
@@ -17,7 +17,7 @@ public interface IChangeDataProcessStrategy {
List
<
ChangeDataDto
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
);
Map
<
String
,
?
>
getDetail
(
String
applyNo
,
String
bizId
);
Map
<
String
,
Object
>
getDetail
(
String
applyNo
,
String
bizId
);
/**
* 可处理类型
...
...
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/BatchDataChangeProcessStrategy.java
View file @
4431f81d
This diff is collapsed.
Click to expand it.
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/BizDataChangeServiceImpl.java
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData
;
import
com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.api.service.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -11,6 +11,7 @@ import java.util.Map;
@Service
public
class
BizDataChangeServiceImpl
{
/**
* 变更保存
*
...
...
@@ -31,4 +32,5 @@ public class BizDataChangeServiceImpl {
IBizDataChangeHandleStrategy
handleStrategy
=
BizDataHandleStrategyContext
.
getStrategy
(
bizType
);
return
handleStrategy
.
getDetail
(
applyNo
,
model
,
bizId
);
}
}
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/CommonEquipDataProcessService.java
View file @
4431f81d
...
...
@@ -68,7 +68,6 @@ public class CommonEquipDataProcessService {
this
.
equipChangeDataUpdateService
=
equipChangeDataUpdateService
;
}
public
<
T
extends
BaseChangeDataDto
>
T
castMap2Bean
(
Map
<
String
,
Object
>
map
,
Class
<
T
>
clazz
)
{
try
{
T
t
=
clazz
.
newInstance
();
...
...
@@ -80,6 +79,7 @@ public class CommonEquipDataProcessService {
}
public
void
checkValidField
(
String
record
,
BaseChangeDataDto
changeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
// 注册信息
if
(
changeDataDto
instanceof
EquipRegisterChangeDataDto
)
{
...
...
@@ -142,7 +142,7 @@ public class CommonEquipDataProcessService {
}
p
rivate
List
<
ChangeDataDto
>
mergeChangeFields
(
List
<
ChangeDataDto
>
changeDataNew
,
List
<
ChangeDataDto
>
changeDataOld
)
{
p
ublic
List
<
ChangeDataDto
>
mergeChangeFields
(
List
<
ChangeDataDto
>
changeDataNew
,
List
<
ChangeDataDto
>
changeDataOld
)
{
Map
<
String
,
ChangeDataDto
>
oldKv
=
changeDataOld
.
stream
().
collect
(
Collectors
.
toMap
(
ChangeDataDto:
:
getColumnKey
,
Function
.
identity
()));
changeDataNew
.
forEach
(
o
->
{
// 正常不会出现此情况,old数据 大于等于 new 数据的key
...
...
@@ -323,19 +323,7 @@ public class CommonEquipDataProcessService {
// 压力管道
TechParamsPipelineChangeFieldDto
newPipeline
=
new
TechParamsPipelineChangeFieldDto
();
BeanUtil
.
copyProperties
(
JSON
.
parse
(
JSONObject
.
toJSONString
(
changeData
)),
newPipeline
,
true
);
IdxBizJgTechParamsPipeline
techParamsPipeline
=
iIdxBizJgTechParamsPipelineService
.
getOneData
(
record
);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉
TechParamsPipelineChangeFieldDto
oldPipeline
=
BeanUtil
.
copyProperties
(
techParamsPipeline
,
TechParamsPipelineChangeFieldDto
.
class
);
// 字段行转列
List
<
ChangeDataDto
>
newPipelineChangeData
=
this
.
convertBeanField2Column2
(
newPipeline
,
record
);
List
<
ChangeDataDto
>
oldPipelineChangeData
=
this
.
convertBeanField2Column2
(
oldPipeline
,
record
);
// 比对
List
<
ChangeDataDto
>
pipelineChangeFields
=
this
.
mergeChangeFields
(
newPipelineChangeData
,
oldPipelineChangeData
);
// 业务处理
equipChangeDataUpdateService
.
updateTechParamByRecord
(
this
.
buildTableName
(
TechParamsPipelineChangeFieldDto
.
class
),
record
,
pipelineChangeFields
);
// 日志数据记录
allChange
.
addAll
(
pipelineChangeFields
);
savePieLineTechParam
(
record
,
allChange
,
newPipeline
);
break
;
case
KYSD:
// 客运索道
...
...
@@ -360,7 +348,22 @@ public class CommonEquipDataProcessService {
}
}
private
List
<
ChangeDataDto
>
convertBeanField2Column2
(
Object
beanData
,
String
record
)
{
public
void
savePieLineTechParam
(
String
record
,
List
<
ChangeDataDto
>
allChange
,
TechParamsPipelineChangeFieldDto
newPipeline
)
{
IdxBizJgTechParamsPipeline
techParamsPipeline
=
iIdxBizJgTechParamsPipelineService
.
getOneData
(
record
);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉
TechParamsPipelineChangeFieldDto
oldPipeline
=
BeanUtil
.
copyProperties
(
techParamsPipeline
,
TechParamsPipelineChangeFieldDto
.
class
);
// 字段行转列
List
<
ChangeDataDto
>
newPipelineChangeData
=
this
.
convertBeanField2Column2
(
newPipeline
,
record
);
List
<
ChangeDataDto
>
oldPipelineChangeData
=
this
.
convertBeanField2Column2
(
oldPipeline
,
record
);
// 比对
List
<
ChangeDataDto
>
pipelineChangeFields
=
this
.
mergeChangeFields
(
newPipelineChangeData
,
oldPipelineChangeData
);
// 业务处理
equipChangeDataUpdateService
.
updateTechParamByRecord
(
this
.
buildTableName
(
TechParamsPipelineChangeFieldDto
.
class
),
record
,
pipelineChangeFields
);
// 日志数据记录
allChange
.
addAll
(
pipelineChangeFields
);
}
public
List
<
ChangeDataDto
>
convertBeanField2Column2
(
Object
beanData
,
String
changeId
)
{
List
<
ChangeDataDto
>
changeData
=
new
ArrayList
<>();
Group
group
=
beanData
.
getClass
().
getAnnotation
(
Group
.
class
);
Field
[]
fields
=
beanData
.
getClass
().
getDeclaredFields
();
...
...
@@ -374,7 +377,7 @@ public class CommonEquipDataProcessService {
changeDataDto
.
setColumnKey
(
field
.
getName
());
changeDataDto
.
setColumnFamily
(
group
.
value
());
changeDataDto
.
setColumnLabel
(
fieldName
);
changeDataDto
.
setChangeId
(
recor
d
);
changeDataDto
.
setChangeId
(
changeI
d
);
Object
oV
=
field
.
get
(
beanData
);
if
(
oV
instanceof
String
)
{
String
value
=
(
String
)
field
.
get
(
beanData
);
...
...
@@ -395,7 +398,7 @@ public class CommonEquipDataProcessService {
}
p
rivate
List
<
ChangeDataDto
>
buildDesignInfoNew
(
EquipDesignChangeDataDto
changeDataDto
,
String
record
)
{
p
ublic
List
<
ChangeDataDto
>
buildDesignInfoNew
(
Object
changeDataDto
,
String
record
)
{
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
}
...
...
@@ -407,7 +410,7 @@ public class CommonEquipDataProcessService {
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
}
p
rivate
List
<
ChangeDataDto
>
buildDesignInfoOld
(
String
record
)
{
p
ublic
List
<
ChangeDataDto
>
buildDesignInfoOld
(
String
record
)
{
EquipDesignChangeDataDto
changeDataDto
=
new
EquipDesignChangeDataDto
();
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>().
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
));
BeanUtil
.
copyProperties
(
designInfo
,
changeDataDto
);
...
...
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/EquipChangeDataUpdateService.java
View file @
4431f81d
...
...
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
...
...
@@ -191,4 +192,12 @@ public class EquipChangeDataUpdateService {
public
void
checkDesignChangeData
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
)
{
}
public
void
updatePieLineDesignData
(
String
record
,
PieLineDesignChangeDataDto
equipDesignChangeDataDto
)
{
LambdaUpdateWrapper
<
IdxBizJgDesignInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgDesignInfo:
:
getDesignUnitName
,
equipDesignChangeDataDto
.
getDesignUnitName
());
updateWrapper
.
set
(
IdxBizJgDesignInfo:
:
getRecDate
,
new
Date
());
idxBizJgDesignInfoMapper
.
update
(
null
,
updateWrapper
);
}
}
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 @
4431f81d
...
...
@@ -311,8 +311,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
try
{
value
=
field
.
get
(
object
);
// 需要转为jsonArray的字段
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
))
{
value
=
JSON
.
parse
Array
((
String
)
field
.
get
(
object
));
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
)
&&
value
instanceof
String
)
{
value
=
JSON
.
parse
((
String
)
field
.
get
(
object
));
}
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
e
);
...
...
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 @
4431f81d
...
...
@@ -1674,7 +1674,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
commonServiceImpl
.
buildTaskModel
(
list
);
}
p
rivate
String
getEquipListCode
(
String
record
)
{
p
ublic
String
getEquipListCode
(
String
record
)
{
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgRegisterInfo:
:
getEquList
));
if
(
registerInfo
!=
null
){
return
registerInfo
.
getEquList
();
...
...
@@ -3041,6 +3041,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
public
IdxBizJgRegisterInfo
getRegisterInfo
(
JgUseRegistration
jgUseRegistration
)
{
LambdaQueryWrapper
<
JgUseRegistrationEq
>
jgUseRegEqWrapper
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
jgUseRegEqWrapper
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()));
List
<
JgUseRegistrationEq
>
jgUseRegistrationEqList
=
jgRelationEquipMapper
.
selectList
(
jgUseRegEqWrapper
);
if
(!
jgUseRegistrationEqList
.
isEmpty
())
{
String
record
=
jgUseRegistrationEqList
.
get
(
0
).
getEquId
();
return
idxBizJgRegisterInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgRegisterInfo:
:
getEquList
));
}
return
null
;
}
/**
* 处理历史错误单子
*
...
...
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/PieLineDataChangeServiceImpl.java
0 → 100644
View file @
4431f81d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ChangeDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineDesignChangeDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ProjectContraptionChangeDataDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
PieLineDataChangeServiceImpl
{
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
private
final
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionServiceImpl
;
private
final
EquipChangeDataUpdateService
equipChangeDataUpdateService
;
public
PieLineDataChangeServiceImpl
(
CommonEquipDataProcessService
commonEquipDataProcessService
,
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionServiceImpl
,
EquipChangeDataUpdateService
equipChangeDataUpdateService
)
{
this
.
commonEquipDataProcessService
=
commonEquipDataProcessService
;
this
.
idxBizJgProjectContraptionServiceImpl
=
idxBizJgProjectContraptionServiceImpl
;
this
.
equipChangeDataUpdateService
=
equipChangeDataUpdateService
;
}
public
void
update
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoNew
,
List
<
ChangeDataDto
>
allChangeColumns
)
{
// 原有对象行转列
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoOld
=
getOldProjectContratData
(
projectContraptionChangeDataDtoNew
);
List
<
ChangeDataDto
>
newProjectContraptionChangeData
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoNew
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
// 新对象构造行转列
List
<
ChangeDataDto
>
oldProjectContraptionChangeData
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoOld
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
// 数据比对记录变化字段列表
allChangeColumns
.
addAll
(
commonEquipDataProcessService
.
mergeChangeFields
(
newProjectContraptionChangeData
,
oldProjectContraptionChangeData
));
// 数据入库
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraptionChangeDataDtoNew
.
getProjectContraption
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionNo
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
projectContraptionChangeDataDtoNew
.
getPipelineLength
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductPhoto
,
projectContraptionChangeDataDtoNew
.
getProductPhoto
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getOtherAccessories
,
projectContraptionChangeDataDtoNew
.
getOtherAccessories
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductQualificationCertificate
,
projectContraptionChangeDataDtoNew
.
getProductQualificationCertificate
());
idxBizJgProjectContraptionServiceImpl
.
update
(
null
,
updateWrapper
);
}
private
ProjectContraptionChangeDataDto
getOldProjectContratData
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoNew
)
{
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionServiceImpl
.
getById
(
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
return
BeanUtil
.
copyProperties
(
projectContraption
,
ProjectContraptionChangeDataDto
.
class
);
}
public
void
saveDesignForPieLine
(
String
record
,
List
<
ChangeDataDto
>
allChangeColumns
,
PipelineChangeItemDto
pipelineChangeItemDto
)
{
// 1.记录变化的数据对象
PieLineDesignChangeDataDto
pieLineDesignChangeDataDto
=
BeanUtil
.
copyProperties
(
pipelineChangeItemDto
,
PieLineDesignChangeDataDto
.
class
);
// 构造新对象行转列
List
<
ChangeDataDto
>
designInfoNew
=
commonEquipDataProcessService
.
buildDesignInfoNew
(
pieLineDesignChangeDataDto
,
record
);
// 老数据查询行转列
List
<
ChangeDataDto
>
designInfoOld
=
commonEquipDataProcessService
.
buildDesignInfoOld
(
record
);
allChangeColumns
.
addAll
(
commonEquipDataProcessService
.
mergeChangeFields
(
designInfoNew
,
designInfoOld
));
// 2.更新管道的设计单位名称
equipChangeDataUpdateService
.
updatePieLineDesignData
(
record
,
pieLineDesignChangeDataDto
);
}
}
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/UseRegisterUpdateService.java
View file @
4431f81d
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
...
@@ -30,10 +31,13 @@ public class UseRegisterUpdateService {
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
public
UseRegisterUpdateService
(
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
,
JgUseRegistrationServiceImpl
useRegistrationService
,
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
)
{
private
final
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
;
public
UseRegisterUpdateService
(
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
,
JgUseRegistrationServiceImpl
useRegistrationService
,
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
,
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
)
{
this
.
idxBizJgRegisterInfoMapper
=
idxBizJgRegisterInfoMapper
;
this
.
useRegistrationService
=
useRegistrationService
;
this
.
jgRegistrationHistoryService
=
jgRegistrationHistoryService
;
this
.
idxBizJgProjectContraptionService
=
idxBizJgProjectContraptionService
;
}
public
void
updateHisData
(
String
applyNo
)
{
...
...
@@ -82,6 +86,11 @@ public class UseRegisterUpdateService {
});
jsonObject
.
put
(
"equipmentLists"
,
result
);
}
else
{
// 管道逻辑 更新装置、管道有关数据
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionService
.
getById
(
jgUseRegistration
.
getProjectContraptionId
());
jsonObject
.
put
(
"pipelineLength"
,
projectContraption
.
getPipelineLength
());
jsonObject
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
jsonObject
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
jsonObject
.
put
(
"equipmentLists"
,
useRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipment
(
records
));
}
}
...
...
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