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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
251 additions
and
37 deletions
+251
-37
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
+0
-0
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
;
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.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
/**
/**
...
@@ -12,14 +12,19 @@ import lombok.experimental.Accessors;
...
@@ -12,14 +12,19 @@ import lombok.experimental.Accessors;
* @author system_generator
* @author system_generator
* @date 2023-08-17
* @date 2023-08-17
*/
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@Group
(
value
=
"tech_params_pipeline"
)
@Group
(
value
=
"tech_params_pipeline"
)
public
class
TechParamsPipelineChangeFieldDto
extends
BaseTechParamsFieldDto
{
public
class
TechParamsPipelineChangeFieldDto
extends
BaseTechParamsFieldDto
{
@FieldDisplayDefine
(
value
=
"管道类别"
)
@FieldDisplayDefine
(
value
=
"w唯一标识"
,
isExist
=
false
)
private
String
pipelineClass
;
private
String
record
;
@FieldDisplayDefine
(
value
=
"管道名称(登记单元)"
)
private
String
pipeName
;
@FieldDisplayDefine
(
value
=
"管道编号"
)
@FieldDisplayDefine
(
value
=
"管道编号"
)
...
@@ -39,27 +44,31 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
...
@@ -39,27 +44,31 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine
(
value
=
"管道长度"
)
@FieldDisplayDefine
(
value
=
"管道长度"
)
private
String
pipeLength
;
private
Double
pipeLength
;
@FieldDisplayDefine
(
value
=
"起/始位置"
,
type
=
JSON
.
class
)
private
String
startePosition
;
@FieldDisplayDefine
(
value
=
"压力"
)
@FieldDisplayDefine
(
value
=
"
设计
压力"
)
private
String
pressure
;
private
String
pressure
;
@FieldDisplayDefine
(
value
=
"温度"
)
@FieldDisplayDefine
(
value
=
"
设计
温度"
)
private
String
temperature
;
private
String
temperature
;
@FieldDisplayDefine
(
value
=
"介质"
)
@FieldDisplayDefine
(
value
=
"
设计
介质"
)
private
String
medium
;
private
String
medium
;
@FieldDisplayDefine
(
value
=
"工作压力"
)
private
String
workPressure
;
@FieldDisplayDefine
(
value
=
"工作温度"
)
private
String
workTemperature
;
@FieldDisplayDefine
(
value
=
"工作介质"
)
private
String
workMedium
;
@FieldDisplayDefine
(
value
=
"备注"
)
@FieldDisplayDefine
(
value
=
"备注"
)
private
String
remarks
;
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> {
...
@@ -77,6 +77,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@MapKey
(
"records"
)
@MapKey
(
"records"
)
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipmentForEdit
(
@Param
(
"records"
)
List
<
String
>
records
);
@MapKey
(
"id"
)
@MapKey
(
"id"
)
List
<
Map
<
String
,
Object
>>
selectEquipList
(
@Param
(
"id"
)
Long
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 @@
...
@@ -675,6 +675,34 @@
</foreach>
</foreach>
ORDER BY ui.REC_DATE DESC
ORDER BY ui.REC_DATE DESC
</select>
</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"
>
<sql
id=
"page-list-vessel"
>
SELECT
SELECT
ui."USE_UNIT_NAME" useUnitName,
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 {
...
@@ -45,6 +45,4 @@ public class BizDataChangeController {
@RequestParam
(
required
=
false
)
String
bizId
)
{
@RequestParam
(
required
=
false
)
String
bizId
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
model
,
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 {
...
@@ -17,7 +17,7 @@ public interface IChangeDataProcessStrategy {
List
<
ChangeDataDto
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
);
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
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 @
a8e181b3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
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.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.api.service.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -11,6 +11,7 @@ import java.util.Map;
...
@@ -11,6 +11,7 @@ import java.util.Map;
@Service
@Service
public
class
BizDataChangeServiceImpl
{
public
class
BizDataChangeServiceImpl
{
/**
/**
* 变更保存
* 变更保存
*
*
...
@@ -31,4 +32,5 @@ public class BizDataChangeServiceImpl {
...
@@ -31,4 +32,5 @@ public class BizDataChangeServiceImpl {
IBizDataChangeHandleStrategy
handleStrategy
=
BizDataHandleStrategyContext
.
getStrategy
(
bizType
);
IBizDataChangeHandleStrategy
handleStrategy
=
BizDataHandleStrategyContext
.
getStrategy
(
bizType
);
return
handleStrategy
.
getDetail
(
applyNo
,
model
,
bizId
);
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 {
...
@@ -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
()));
Map
<
String
,
ChangeDataDto
>
oldKv
=
changeDataOld
.
stream
().
collect
(
Collectors
.
toMap
(
ChangeDataDto:
:
getColumnKey
,
Function
.
identity
()));
changeDataNew
.
forEach
(
o
->
{
changeDataNew
.
forEach
(
o
->
{
// 正常不会出现此情况,old数据 大于等于 new 数据的key
// 正常不会出现此情况,old数据 大于等于 new 数据的key
...
@@ -323,19 +323,7 @@ public class CommonEquipDataProcessService {
...
@@ -323,19 +323,7 @@ public class CommonEquipDataProcessService {
// 压力管道
// 压力管道
TechParamsPipelineChangeFieldDto
newPipeline
=
new
TechParamsPipelineChangeFieldDto
();
TechParamsPipelineChangeFieldDto
newPipeline
=
new
TechParamsPipelineChangeFieldDto
();
BeanUtil
.
copyProperties
(
JSON
.
parse
(
JSONObject
.
toJSONString
(
changeData
)),
newPipeline
,
true
);
BeanUtil
.
copyProperties
(
JSON
.
parse
(
JSONObject
.
toJSONString
(
changeData
)),
newPipeline
,
true
);
savePieLineTechParam
(
record
,
allChange
,
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
);
break
;
break
;
case
KYSD:
case
KYSD:
// 客运索道
// 客运索道
...
@@ -360,7 +348,22 @@ public class CommonEquipDataProcessService {
...
@@ -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
<>();
List
<
ChangeDataDto
>
changeData
=
new
ArrayList
<>();
Group
group
=
beanData
.
getClass
().
getAnnotation
(
Group
.
class
);
Group
group
=
beanData
.
getClass
().
getAnnotation
(
Group
.
class
);
Field
[]
fields
=
beanData
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
beanData
.
getClass
().
getDeclaredFields
();
...
@@ -374,7 +377,7 @@ public class CommonEquipDataProcessService {
...
@@ -374,7 +377,7 @@ public class CommonEquipDataProcessService {
changeDataDto
.
setColumnKey
(
field
.
getName
());
changeDataDto
.
setColumnKey
(
field
.
getName
());
changeDataDto
.
setColumnFamily
(
group
.
value
());
changeDataDto
.
setColumnFamily
(
group
.
value
());
changeDataDto
.
setColumnLabel
(
fieldName
);
changeDataDto
.
setColumnLabel
(
fieldName
);
changeDataDto
.
setChangeId
(
recor
d
);
changeDataDto
.
setChangeId
(
changeI
d
);
Object
oV
=
field
.
get
(
beanData
);
Object
oV
=
field
.
get
(
beanData
);
if
(
oV
instanceof
String
)
{
if
(
oV
instanceof
String
)
{
String
value
=
(
String
)
field
.
get
(
beanData
);
String
value
=
(
String
)
field
.
get
(
beanData
);
...
@@ -395,7 +398,7 @@ public class CommonEquipDataProcessService {
...
@@ -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
);
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
}
}
...
@@ -407,7 +410,7 @@ public class CommonEquipDataProcessService {
...
@@ -407,7 +410,7 @@ public class CommonEquipDataProcessService {
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
}
}
p
rivate
List
<
ChangeDataDto
>
buildDesignInfoOld
(
String
record
)
{
p
ublic
List
<
ChangeDataDto
>
buildDesignInfoOld
(
String
record
)
{
EquipDesignChangeDataDto
changeDataDto
=
new
EquipDesignChangeDataDto
();
EquipDesignChangeDataDto
changeDataDto
=
new
EquipDesignChangeDataDto
();
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>().
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
));
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>().
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
));
BeanUtil
.
copyProperties
(
designInfo
,
changeDataDto
);
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;
...
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -191,4 +192,12 @@ public class EquipChangeDataUpdateService {
...
@@ -191,4 +192,12 @@ public class EquipChangeDataUpdateService {
public
void
checkDesignChangeData
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
)
{
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
...
@@ -311,8 +311,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
try
{
try
{
value
=
field
.
get
(
object
);
value
=
field
.
get
(
object
);
// 需要转为jsonArray的字段
// 需要转为jsonArray的字段
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
))
{
if
(!
ValidationUtil
.
isEmpty
(
strToJsonArrayFields
)
&&
Arrays
.
asList
(
strToJsonArrayFields
).
contains
(
underscoreFieldName
)
&&
value
instanceof
String
)
{
value
=
JSON
.
parse
Array
((
String
)
field
.
get
(
object
));
value
=
JSON
.
parse
((
String
)
field
.
get
(
object
));
}
}
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
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
...
@@ -1642,7 +1642,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
commonServiceImpl
.
buildTaskModel
(
list
);
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
));
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgRegisterInfo:
:
getEquList
));
if
(
registerInfo
!=
null
){
if
(
registerInfo
!=
null
){
return
registerInfo
.
getEquList
();
return
registerInfo
.
getEquList
();
...
@@ -3007,6 +3007,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -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