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
a8e181b3
Commit
a8e181b3
authored
Dec 17, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.压力管道编辑功能接口开发
parent
9b2737d9
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
352 additions
and
83 deletions
+352
-83
PieLineDesignChangeDataDto.java
...os/boot/module/jg/api/dto/PieLineDesignChangeDataDto.java
+14
-0
PipelineChangeItemDto.java
...in/amos/boot/module/jg/api/dto/PipelineChangeItemDto.java
+22
-0
ProjectContraptionChangeDataDto.java
...ot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
+48
-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
+28
-0
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
+101
-46
BizDataChangeServiceImpl.java
.../module/jg/biz/service/impl/BizDataChangeServiceImpl.java
+3
-1
CommonEquipDataProcessService.java
...le/jg/biz/service/impl/CommonEquipDataProcessService.java
+21
-18
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
+67
-0
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 @
a8e181b3
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 @
a8e181b3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* 安全追溯-压力管道
*
* @author system_generator
* @date 2023-08-17
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Accessors
(
chain
=
true
)
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 @
a8e181b3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ProjectContraptionChangeFieldDto"
,
description
=
"管道工程装置表"
)
public
class
ProjectContraptionChangeDataDto
extends
BaseChangeDataDto
{
@FieldDisplayDefine
(
value
=
"主键"
,
isExist
=
false
)
private
Long
sequenceNbr
;
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 @
a8e181b3
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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
...
...
@@ -675,6 +675,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 ui.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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
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.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IChangeDataProcessStrategy
;
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.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -32,86 +38,135 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
private
final
JgUseRegistrationServiceImpl
useRegistrationService
;
private
final
Jg
RegistrationHistoryServiceImpl
jgRegistrationHistory
Service
;
private
final
Jg
UseRegistrationEqServiceImpl
useRegistrationEq
Service
;
private
final
JgUseRegistrationMapper
jgUseRegistrationMapper
;
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
public
BatchDataChangeProcessStrategy
(
JgUseRegistrationServiceImpl
useRegistrationService
,
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
,
JgUseRegistrationMapper
jgUseRegistrationMapper
,
CommonEquipDataProcessService
commonEquipDataProcessService
)
{
private
final
PieLineDataChangeServiceImpl
pieLineDataChangeService
;
private
final
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
;
public
BatchDataChangeProcessStrategy
(
JgUseRegistrationServiceImpl
useRegistrationService
,
JgUseRegistrationEqServiceImpl
useRegistrationEqService
,
JgUseRegistrationMapper
jgUseRegistrationMapper
,
CommonEquipDataProcessService
commonEquipDataProcessService
,
PieLineDataChangeServiceImpl
pieLineDataChangeService
,
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
)
{
this
.
useRegistrationService
=
useRegistrationService
;
this
.
jgRegistrationHistoryService
=
jgRegistrationHistory
Service
;
this
.
useRegistrationEqService
=
useRegistrationEq
Service
;
this
.
jgUseRegistrationMapper
=
jgUseRegistrationMapper
;
this
.
commonEquipDataProcessService
=
commonEquipDataProcessService
;
this
.
pieLineDataChangeService
=
pieLineDataChangeService
;
this
.
idxBizJgProjectContraptionService
=
idxBizJgProjectContraptionService
;
}
@Override
public
List
<
ChangeDataDto
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
)
{
JSONObject
data
=
(
JSONObject
)
changeData
;
JSONArray
equips
=
data
.
getJSONArray
(
RequestChangeData
.
multiDataKey
);
List
<
MultiChangeItemData
>
items
=
equips
.
toJavaList
(
MultiChangeItemData
.
class
);
List
<
ChangeDataDto
>
allChangeColumns
=
new
ArrayList
<>();
// 校验
items
.
forEach
(
item
->
{
String
record
=
item
.
getRecord
();
Map
<
String
,
Object
>
itemData
=
item
.
getDetail
();
if
(
itemData
!=
null
)
{
EquipRegisterChangeDataDto
registerChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipDesignChangeDataDto
.
class
);
// 前置检验
commonEquipDataProcessService
.
checkValidField
(
record
,
registerChangeDataDto
,
null
,
null
,
null
);
commonEquipDataProcessService
.
checkValidField
(
record
,
factoryChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
commonEquipDataProcessService
.
checkValidField
(
record
,
designChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
JgUseRegistration
jgUseRegistration
=
useRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
eq
(
JgUseRegistration:
:
getApplyNo
,
defaultChangeId
));
// 判断是压力管道还是气瓶
IdxBizJgRegisterInfo
jgRegisterInfo
=
useRegistrationService
.
getRegisterInfo
(
jgUseRegistration
);
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
jgRegisterInfo
.
getEquList
()))
{
// 管道逻辑
List
<
PipelineChangeItemDto
>
items
=
equips
.
toJavaList
(
PipelineChangeItemDto
.
class
);
// 1.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
changeData
,
ProjectContraptionChangeDataDto
.
class
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
// 2.使用登记表的装置名称更新
jgUseRegistration
.
setProjectContraption
(
projectContraptionChangeDataDto
.
getProjectContraption
());
useRegistrationService
.
updateById
(
jgUseRegistration
);
// 设备技术参数入库前校验,约束:同一个装置下的管道编号不能重复
if
(
items
.
size
()
!=
items
.
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getPipelineNumber
).
distinct
().
count
())
{
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
}
});
// 入库
items
.
forEach
(
item
->
{
String
record
=
item
.
getRecord
();
Map
<
String
,
Object
>
itemData
=
item
.
getDetail
();
if
(
itemData
!=
null
)
{
EquipRegisterChangeDataDto
registerChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipDesignChangeDataDto
.
class
);
commonEquipDataProcessService
.
buildChangeFields
(
record
,
designChangeDataDto
,
factoryChangeDataDto
,
registerChangeDataDto
,
allChangeColumns
);
// 设备制造、设计、注册信息业务处理落库
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
registerChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
factoryChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
designChangeDataDto
);
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerChangeDataDto
,
record
,
itemData
,
allChangeColumns
);
}
});
// 3.管道信息入库保存
items
.
forEach
(
item
->
{
String
record
=
item
.
getRecord
();
// 设计信息更新
pieLineDataChangeService
.
saveDesignForPieLine
(
record
,
allChangeColumns
,
item
);
// 技术参数入库保存
commonEquipDataProcessService
.
savePieLineTechParam
(
record
,
allChangeColumns
,
item
);
});
}
else
{
// 气瓶逻辑
List
<
MultiChangeItemData
>
items
=
equips
.
toJavaList
(
MultiChangeItemData
.
class
);
// 校验
items
.
forEach
(
item
->
{
String
record
=
item
.
getRecord
();
Map
<
String
,
Object
>
itemData
=
item
.
getDetail
();
if
(
itemData
!=
null
)
{
EquipRegisterChangeDataDto
registerChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipDesignChangeDataDto
.
class
);
// 前置检验
commonEquipDataProcessService
.
checkValidField
(
record
,
registerChangeDataDto
,
null
,
null
,
null
);
commonEquipDataProcessService
.
checkValidField
(
record
,
factoryChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
commonEquipDataProcessService
.
checkValidField
(
record
,
designChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
}
});
// 入库
items
.
forEach
(
item
->
{
String
record
=
item
.
getRecord
();
Map
<
String
,
Object
>
itemData
=
item
.
getDetail
();
if
(
itemData
!=
null
)
{
EquipRegisterChangeDataDto
registerChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipDesignChangeDataDto
.
class
);
commonEquipDataProcessService
.
buildChangeFields
(
record
,
designChangeDataDto
,
factoryChangeDataDto
,
registerChangeDataDto
,
allChangeColumns
);
// 设备制造、设计、注册信息业务处理落库
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
registerChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
factoryChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
designChangeDataDto
);
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerChangeDataDto
,
record
,
itemData
,
allChangeColumns
);
}
});
}
// 单位办理不能修改设备品种,如果修改无法保证单据下的所有设备都一致
return
allChangeColumns
;
}
private
void
calTotalPieLineLength
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
PipelineChangeItemDto
>
items
)
{
projectContraptionChangeDataDto
.
setPipelineLength
(
items
.
stream
().
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
mapToDouble
(
TechParamsPipelineChangeFieldDto:
:
getPipeLength
).
sum
());
}
@Override
public
Map
<
String
,
List
<
Map
<
String
,
Object
>>
>
getDetail
(
String
applyNo
,
String
bizId
)
{
Map
<
String
,
List
<
Map
<
String
,
Object
>>
>
result
=
new
HashMap
<>();
public
Map
<
String
,
Object
>
getDetail
(
String
applyNo
,
String
bizId
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
JgUseRegistration
jgUseRegistration
=
useRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
.
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
).
select
(
BaseEntity:
:
getSequenceNbr
));
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgUseRegistration
.
getSequenceNbr
());
lambda
.
eq
(
JgRegistrationHistory:
:
getIsDelete
,
false
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
jsonObject
.
get
(
"equipmentLists"
);
List
<
String
>
records
=
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"record"
)).
collect
(
toList
());
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
jgUseRegistration
.
getSequenceNbr
());
lambda
.
select
(
JgUseRegistrationEq:
:
getEquId
);
List
<
JgUseRegistrationEq
>
eqs
=
useRegistrationEqService
.
getBaseMapper
().
selectList
(
lambda
);
List
<
String
>
records
=
eqs
.
stream
().
map
(
JgUseRegistrationEq:
:
getEquId
).
collect
(
toList
());
IdxBizJgRegisterInfo
registerInfo
=
useRegistrationService
.
getRegisterInfo
(
jgUseRegistration
);
List
<
Map
<
String
,
Object
>>
tableData
;
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfo
.
getEquCategory
(
)))
{
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
tableData
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipment
(
records
);
tableData
.
forEach
(
i
->
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
))));
}
else
{
tableData
=
jgUseRegistrationMapper
.
queryForUnitPipelineEquipment
(
records
);
IdxBizJgProjectContraption
idxBizJgProjectContraption
=
idxBizJgProjectContraptionService
.
getById
(
jgUseRegistration
.
getProjectContraptionId
());
Map
<
String
,
Object
>
map
=
IdxBizJgRegisterInfoServiceImpl
.
convertCamelToUnderscore
(
idxBizJgProjectContraption
,
IdxBizJgProjectContraptionServiceImpl
.
jsonFields
);
result
.
putAll
(
map
);
tableData
=
jgUseRegistrationMapper
.
queryForUnitPipelineEquipmentForEdit
(
records
);
}
result
.
put
(
"tableData"
,
tableData
);
return
result
;
}
private
Map
<
String
,
Object
>
cast2UnderCase
(
Map
<
String
,
Object
>
re
)
{
// 由于历史遗留问题,和前端保存统一,要转成大写下滑线驼峰
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
re
.
forEach
((
k
,
v
)
->
{
result
.
put
(
CharSequenceUtil
.
toUnderlineCase
(
k
).
toUpperCase
(),
v
);
});
return
result
;
}
@Override
public
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
()
{
...
...
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 @
a8e181b3
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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
...
...
@@ -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 @
a8e181b3
...
...
@@ -1642,7 +1642,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
();
...
...
@@ -3007,6 +3007,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 @
a8e181b3
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
.
getSequenceNbr
()
+
""
);
// 新对象构造行转列
List
<
ChangeDataDto
>
oldProjectContraptionChangeData
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoOld
,
projectContraptionChangeDataDtoNew
.
getSequenceNbr
()
+
""
);
// 数据比对记录变化字段列表
allChangeColumns
.
addAll
(
commonEquipDataProcessService
.
mergeChangeFields
(
newProjectContraptionChangeData
,
oldProjectContraptionChangeData
));
// 数据入库
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionChangeDataDtoNew
.
getSequenceNbr
());
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
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductPhoto
,
projectContraptionChangeDataDtoNew
.
getProductPhoto
());
idxBizJgProjectContraptionServiceImpl
.
update
(
null
,
updateWrapper
);
}
private
ProjectContraptionChangeDataDto
getOldProjectContratData
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoNew
)
{
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionServiceImpl
.
getById
(
projectContraptionChangeDataDtoNew
.
getSequenceNbr
());
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
);
}
}
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