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
753869a7
Commit
753869a7
authored
Jan 13, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 压力管道后续业务
1.压力管道改造告知适配 2.改造变更登记适配
parent
7e7e2322
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
54 deletions
+100
-54
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+0
-22
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+22
-1
PieLineDataChangeServiceImpl.java
.../biz/edit/process/equip/PieLineDataChangeServiceImpl.java
+2
-1
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+42
-0
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+1
-0
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+16
-27
IdxBizJgProjectContraptionMapper.java
...dule/ymt/api/mapper/IdxBizJgProjectContraptionMapper.java
+3
-0
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+14
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/IdxBizJgProjectContraptionController.java
View file @
753869a7
...
@@ -35,9 +35,7 @@ import java.util.Map;
...
@@ -35,9 +35,7 @@ import java.util.Map;
@RequestMapping
(
value
=
"/idx-biz-jg-project-contraption"
)
@RequestMapping
(
value
=
"/idx-biz-jg-project-contraption"
)
public
class
IdxBizJgProjectContraptionController
extends
BaseController
{
public
class
IdxBizJgProjectContraptionController
extends
BaseController
{
// 设备基本信息表单id
// 设备基本信息表单id
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
public
static
final
String
PIPELINE_LIST
=
"pipelineList"
;
public
static
final
String
PIPELINE_LIST
=
"pipelineList"
;
public
static
final
String
DEVICE_LIST
=
"deviceList"
;
public
static
final
String
USE_UNIT_CREDIT_CODE
=
"USE_UNIT_CREDIT_CODE"
;
public
static
final
String
USE_UNIT_CREDIT_CODE
=
"USE_UNIT_CREDIT_CODE"
;
public
static
final
String
USE_UNIT_NAME
=
"USE_UNIT_NAME"
;
public
static
final
String
USE_UNIT_NAME
=
"USE_UNIT_NAME"
;
@Autowired
@Autowired
...
@@ -133,26 +131,6 @@ public class IdxBizJgProjectContraptionController extends BaseController {
...
@@ -133,26 +131,6 @@ public class IdxBizJgProjectContraptionController extends BaseController {
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
));
}
}
/**
* 根据sequenceNbr查询详情-不包裹设备表单Id
*
* @param sequenceNbr 主键
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/detailsNotFormId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个管道工程装置表"
,
notes
=
"根据sequenceNbr查询单个管道工程装置表"
)
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"result.useUnitCreditCode"
,
targetField
=
"result.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
// 传record的原因是前端组件内部写死了,此处是工程装置表seq
public
ResponseModel
<
Object
>
detailsNotFormId
(
@RequestParam
(
"record"
)
String
sequenceNbr
)
{
Map
<
String
,
Object
>
objectMap
=
idxBizJgProjectContraptionServiceImpl
.
details
(
sequenceNbr
).
get
(
EQUIP_INFO_FORM_ID
);
Object
pipelineListObj
=
objectMap
.
remove
(
PIPELINE_LIST
);
objectMap
.
put
(
DEVICE_LIST
,
pipelineListObj
);
objectMap
.
put
(
"useUnitCreditCode"
,
objectMap
.
get
(
USE_UNIT_CREDIT_CODE
)
+
"_"
+
objectMap
.
get
(
USE_UNIT_NAME
));
return
ResponseHelper
.
buildResponse
(
objectMap
);
}
/**
/**
* 根据sequenceNbr分页查询管道信息
* 根据sequenceNbr分页查询管道信息
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
753869a7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgReformNoticeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgReformNoticeServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -56,7 +58,7 @@ public class JgReformNoticeController extends BaseController {
...
@@ -56,7 +58,7 @@ public class JgReformNoticeController extends BaseController {
* 更新
* 更新
*
*
* @param submitType 更新或提交
* @param submitType 更新或提交
* @param
installationInfo
改造告知信息
* @param
noticeMap
改造告知信息
* @param op 参数
* @param op 参数
* @return JgReformNoticeDto
* @return JgReformNoticeDto
*/
*/
...
@@ -150,4 +152,23 @@ public class JgReformNoticeController extends BaseController {
...
@@ -150,4 +152,23 @@ public class JgReformNoticeController extends BaseController {
JgReformNotice
result
=
jgReformNoticeService
.
cancelApplication
(
dto
.
getSequenceNbr
(),
dto
.
getCancelReason
());
JgReformNotice
result
=
jgReformNoticeService
.
cancelApplication
(
dto
.
getSequenceNbr
(),
dto
.
getCancelReason
());
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
/**
* 根据sequenceNbr查询详情-不包裹设备表单Id
*
* @param sequenceNbr 主键
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/detailsNotFormId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个管道工程装置表"
,
notes
=
"根据sequenceNbr查询单个管道工程装置表"
)
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"result.useUnitCreditCode"
,
targetField
=
"result.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
// 传record的原因是前端组件内部写死了,此处是工程装置表seq
public
ResponseModel
<
Object
>
detailsNotFormId
(
@RequestParam
(
"record"
)
String
sequenceNbr
)
{
Map
<
String
,
Object
>
objectMap
=
jgReformNoticeService
.
detailsForReformNotice
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
objectMap
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/PieLineDataChangeServiceImpl.java
View file @
753869a7
...
@@ -336,6 +336,7 @@ public class PieLineDataChangeServiceImpl {
...
@@ -336,6 +336,7 @@ public class PieLineDataChangeServiceImpl {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
public
void
updatePipelineLength
(
String
projectContraptionId
)
{
public
void
updatePipelineLength
(
String
projectContraptionId
)
{
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
wrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionId
);
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionId
);
...
@@ -348,7 +349,7 @@ public class PieLineDataChangeServiceImpl {
...
@@ -348,7 +349,7 @@ public class PieLineDataChangeServiceImpl {
* @param projectContraptionId 装置id
* @param projectContraptionId 装置id
* @return 长度
* @return 长度
*/
*/
p
rivate
Double
calTotalPieLineLength
(
String
projectContraptionId
)
{
p
ublic
Double
calTotalPieLineLength
(
String
projectContraptionId
)
{
List
<
String
>
records
=
useInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
List
<
String
>
records
=
useInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
).
and
(
wrapper
->
wrapper
.
isNull
(
IdxBizJgUseInfo:
:
getEquState
).
or
().
ne
(
IdxBizJgUseInfo:
:
getEquState
,
EquipmentEnum
.
BAOFEI
.
getCode
()))
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
).
and
(
wrapper
->
wrapper
.
isNull
(
IdxBizJgUseInfo:
:
getEquState
).
or
().
ne
(
IdxBizJgUseInfo:
:
getEquState
,
EquipmentEnum
.
BAOFEI
.
getCode
()))
.
select
(
IdxBizJgUseInfo:
:
getRecord
)).
stream
()
.
select
(
IdxBizJgUseInfo:
:
getRecord
)).
stream
()
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgProjectContraptionServiceImplService.java
View file @
753869a7
...
@@ -608,6 +608,48 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -608,6 +608,48 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
return
resultMap
;
return
resultMap
;
}
}
public
Map
<
String
,
Object
>
detailsForReformNotice
(
String
sequenceNbr
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
ObjectUtils
.
isEmpty
(
sequenceNbr
))
{
return
resultMap
;
}
var
baseMapper
=
this
.
getBaseMapper
();
return
Optional
.
ofNullable
(
baseMapper
.
getDetail
(
sequenceNbr
))
.
map
(
map
->
{
commonService
.
convertStringToJsonobject
(
map
,
jsonFields
);
map
.
put
(
"unitType"
,
company
.
getCompanyType
());
map
.
put
(
"pipelineList"
,
this
.
getPipelineListWithBf
(
sequenceNbr
));
return
map
;
})
.
orElse
(
Collections
.
emptyMap
());
}
/**
* 查询非作废状态的管道
* @param sequenceNbr 装置id
* @return 非作废状态的管道列表
*/
private
List
<
Map
<
String
,
Object
>>
getPipelineListWithBf
(
String
sequenceNbr
)
{
List
<
Map
<
String
,
Object
>>
pipelineList
=
baseMapper
.
selectEquipListWithOutBf
(
sequenceNbr
);
pipelineList
.
forEach
(
p
->
{
try
{
p
.
put
(
"equStateName"
,
Optional
.
ofNullable
(
p
.
get
(
"equState"
))
.
map
(
Object:
:
toString
)
.
filter
(
org
.
apache
.
commons
.
lang3
.
StringUtils
::
isNotEmpty
)
.
map
(
Integer:
:
parseInt
)
.
map
(
EquipmentEnum
.
getName
::
get
)
.
orElse
(
"待用"
)
);
}
catch
(
NumberFormatException
e
)
{
p
.
put
(
"equStateName"
,
"待用"
);
}
});
return
pipelineList
;
}
private
List
<
Map
<
String
,
Object
>>
getPipelineList
(
String
sequenceNbr
)
{
private
List
<
Map
<
String
,
Object
>>
getPipelineList
(
String
sequenceNbr
)
{
List
<
Map
<
String
,
Object
>>
pipelineList
=
baseMapper
.
selectEquipList
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
baseMapper
.
selectEquipList
(
sequenceNbr
);
pipelineList
.
forEach
(
p
->
{
pipelineList
.
forEach
(
p
->
{
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
753869a7
...
@@ -867,6 +867,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -867,6 +867,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
useInfoLambdaUpdateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
useInfoLambdaUpdateWrapper
=
new
LambdaUpdateWrapper
<>();
useInfoLambdaUpdateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
item
.
getString
(
"record"
));
useInfoLambdaUpdateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
item
.
getString
(
"record"
));
useInfoLambdaUpdateWrapper
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
true
);
useInfoLambdaUpdateWrapper
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
true
);
useInfoLambdaUpdateWrapper
.
set
(
IdxBizJgUseInfo:
:
getEquState
,
EquipmentEnum
.
ZAIYONG
.
getCode
());
idxBizJgUseInfoService
.
update
(
useInfoLambdaUpdateWrapper
);
idxBizJgUseInfoService
.
update
(
useInfoLambdaUpdateWrapper
);
}
}
// 更新装置的汇总的管道长度-非报废状态的
// 更新装置的汇总的管道长度-非报废状态的
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
View file @
753869a7
...
@@ -37,6 +37,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
...
@@ -37,6 +37,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.PieLineDataChangeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
...
@@ -82,6 +83,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -82,6 +83,7 @@ import java.util.concurrent.TimeUnit;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
.
IdxBizJgProjectContraptionController
.*;
/**
/**
* 改造告知服务实现类
* 改造告知服务实现类
...
@@ -104,22 +106,16 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -104,22 +106,16 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
static
final
String
PROJECT_CONTRAPTION
=
"projectContraption"
;
public
static
final
String
PROJECT_CONTRAPTION
=
"projectContraption"
;
public
static
final
String
EQU_LIST_CODE
=
"EQU_LIST_CODE"
;
public
static
final
String
EQU_LIST_CODE
=
"EQU_LIST_CODE"
;
public
static
final
String
EQU_CATEGORY_CODE
=
"EQU_CATEGORY_CODE"
;
public
static
final
String
EQU_CATEGORY_CODE
=
"EQU_CATEGORY_CODE"
;
public
static
final
String
EQUIP_INFO
=
"equipInfo"
;
public
static
final
String
PROJECT_CONTRAPTION_ID
=
"projectContraptionId"
;
public
static
final
String
PROJECT_CONTRAPTION_ID
=
"projectContraptionId"
;
public
static
final
String
PRODUCT_PHOTO
=
"PRODUCT_PHOTO"
;
public
static
final
String
PRODUCT_PHOTO
=
"PRODUCT_PHOTO"
;
public
static
final
String
PRODUCT_QUALIFICATION_CERTIFICATE
=
"PRODUCT_QUALIFICATION_CERTIFICATE"
;
private
final
PieLineDataChangeServiceImpl
pieLineDataChangeService
;
public
static
final
String
OTHER_ACCESSORIES
=
"OTHER_ACCESSORIES"
;
public
static
final
String
DEL_DEVICE_LIST
=
"delDeviceList"
;
public
static
final
String
DEL_DEVICE_LIST
=
"delDeviceList"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
// 西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
// 咸阳行政区划code
private
static
final
String
XIAN_YANG
=
"610400"
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
JgReformNoticeEqMapper
jgReformNoticeEqMapper
;
private
final
JgReformNoticeEqMapper
jgReformNoticeEqMapper
;
private
final
JgReformNoticeEqServiceImpl
jgReformNoticeEqService
;
private
final
JgReformNoticeEqServiceImpl
jgReformNoticeEqService
;
private
final
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
private
final
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
private
final
OtherInfoMapper
otherInfoMapper
;
private
final
TzsServiceFeignClient
tzsServiceFeignClient
;
private
final
TzsServiceFeignClient
tzsServiceFeignClient
;
private
final
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
private
final
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
private
final
RedisUtils
redisUtils
;
private
final
RedisUtils
redisUtils
;
...
@@ -152,6 +148,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -152,6 +148,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Autowired
@Autowired
private
CodeUtil
codeUtil
;
private
CodeUtil
codeUtil
;
@Autowired
private
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionServiceImplService
;
@ResultFieldMapping
({
@ResultFieldMapping
({
...
@@ -1105,8 +1103,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1105,8 +1103,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
JSONObject
newData
=
JSONObject
.
parseObject
(
registrationHistory
.
getChangeData
());
JSONObject
newData
=
JSONObject
.
parseObject
(
registrationHistory
.
getChangeData
());
JSONArray
newPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONArray
newPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONArray
delPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEL_DEVICE_LIST
))).
orElse
(
new
JSONArray
());
JSONArray
delPipData
=
Optional
.
ofNullable
(
JSONArray
.
parseArray
(
newData
.
getString
(
DEL_DEVICE_LIST
))).
orElse
(
new
JSONArray
());
// JSONObject oldData = JSONObject.parseObject(registrationHistory.getOldData());
// JSONArray oldPipData = JSONArray.parseArray(oldData.getString(DEVICE_LIST));
// 1.1更新工程装置中的【管道信息】增加减少或修改管道信息
// 1.1更新工程装置中的【管道信息】增加减少或修改管道信息
List
<
JSONObject
>
toUpdatePipData
=
newPipData
.
stream
().
filter
(
item
->
!
StringUtils
.
isEmpty
(
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
))).
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
toUpdatePipData
=
newPipData
.
stream
().
filter
(
item
->
!
StringUtils
.
isEmpty
(
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
))).
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
toAddPipData
=
newPipData
.
stream
().
filter
(
item
->
StringUtils
.
isEmpty
(
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
))).
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
toAddPipData
=
newPipData
.
stream
().
filter
(
item
->
StringUtils
.
isEmpty
(
JSON
.
parseObject
(
item
.
toString
()).
getString
(
RECORD
))).
map
(
item
->
JSON
.
parseObject
(
item
.
toString
())).
collect
(
Collectors
.
toList
());
...
@@ -1114,25 +1110,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1114,25 +1110,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
this
.
addPipDataWithFlowPass
(
toAddPipData
,
notice
);
this
.
addPipDataWithFlowPass
(
toAddPipData
,
notice
);
this
.
updatePipDataWithFlowPass
(
toUpdatePipData
);
this
.
updatePipDataWithFlowPass
(
toUpdatePipData
);
this
.
delPipDataWithFlowPass
(
toDeletePipRecords
);
this
.
delPipDataWithFlowPass
(
toDeletePipRecords
);
// 1.2更新工程装置中的【基本信息】 + 【使用信息】 + 管道长度等
// 1.2更新工程装置中的管道长度
// List<String> lastAllRecords = new ArrayList<>();
// lastAllRecords.addAll(toUpdatePipRecords);
// lastAllRecords.addAll(toAddPipDataRecords);
// lastAllRecords.forEach(record -> {
// 产品照片 PRODUCT_PHOTO
// String productPhoto = JSON.toJSONString(newData.get(PRODUCT_PHOTO));
// idxBizJgRegisterInfoService.update(new LambdaUpdateWrapper<IdxBizJgRegisterInfo>().set(IdxBizJgRegisterInfo::getProductPhoto, productPhoto).eq(IdxBizJgRegisterInfo::getRecord, record));
// });
// 产品质量合格证明 PRODUCT_QUALIFICATION_CERTIFICATE 其他附件 OTHER_ACCESSORIES 管道总长度
// String productQualificationCertificate = JSON.toJSONString(newData.get(PRODUCT_QUALIFICATION_CERTIFICATE));
// String otherAccessories = JSON.toJSONString(newData.get(OTHER_ACCESSORIES));
double
pipLengthLastSum
=
PipLenCalUtils
.
getPipLen
(
newPipData
);
// 最终转 double
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>()
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>()
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
notice
.
getProjectContraptionId
())
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
notice
.
getProjectContraptionId
())
// .set(IdxBizJgProjectContraption::getProductQualificationCertificate, productQualificationCertificate)
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
pieLineDataChangeService
.
calTotalPieLineLength
(
notice
.
getProjectContraptionId
()))
// .set(IdxBizJgProjectContraption::getOtherAccessories, otherAccessories)
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
pipLengthLastSum
)
.
set
(
IdxBizJgProjectContraption:
:
getPipeLengthChanged
,
notice
.
getPipeLengthChanged
());
.
set
(
IdxBizJgProjectContraption:
:
getPipeLengthChanged
,
notice
.
getPipeLengthChanged
());
idxBizJgProjectContraptionMapper
.
update
(
null
,
updateWrapper
);
idxBizJgProjectContraptionMapper
.
update
(
null
,
updateWrapper
);
}
}
...
@@ -1561,4 +1542,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1561,4 +1542,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
idxBizJgConstructionInfo
;
return
idxBizJgConstructionInfo
;
}
}
public
Map
<
String
,
Object
>
detailsForReformNotice
(
String
sequenceNbr
)
{
Map
<
String
,
Object
>
res
=
idxBizJgProjectContraptionServiceImplService
.
detailsForReformNotice
(
sequenceNbr
);
Object
pipelineListObj
=
res
.
remove
(
PIPELINE_LIST
);
res
.
put
(
DEVICE_LIST
,
pipelineListObj
);
res
.
put
(
"useUnitCreditCode"
,
res
.
get
(
USE_UNIT_CREDIT_CODE
)
+
"_"
+
res
.
get
(
USE_UNIT_NAME
));
return
res
;
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgProjectContraptionMapper.java
View file @
753869a7
...
@@ -125,4 +125,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
...
@@ -125,4 +125,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
* @return 被引用次数 > 0 则设备不可删除
* @return 被引用次数 > 0 则设备不可删除
*/
*/
List
<
CountDto
>
countContraptionInUseTimesForDeleteBatch
(
@Param
(
"projectContraptionIdList"
)
List
<
String
>
projectContraptionIdList
);
List
<
CountDto
>
countContraptionInUseTimesForDeleteBatch
(
@Param
(
"projectContraptionIdList"
)
List
<
String
>
projectContraptionIdList
);
List
<
Map
<
String
,
Object
>>
selectEquipListWithOutBf
(
String
sequenceNbr
);
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
753869a7
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
ibjpc.SEQUENCE_NBR = #{sequenceNbr}
ibjpc.SEQUENCE_NBR = #{sequenceNbr}
</select>
</select>
<s
elect
id=
"selectEquipList"
resultType=
"java.util.Map"
>
<s
ql
id=
"equip-list"
>
SELECT ibjtpp."PIPE_NAME" AS pipeName,
SELECT ibjtpp."PIPE_NAME" AS pipeName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
...
@@ -80,12 +80,23 @@
...
@@ -80,12 +80,23 @@
ibjui."EQU_STATE" as equState,
ibjui."EQU_STATE" as equState,
ibjui.project_contraption_id AS projectContraptionId
ibjui.project_contraption_id AS projectContraptionId
FROM idx_biz_jg_use_info ibjui
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_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
</sql>
<select
id=
"selectEquipList"
resultType=
"java.util.Map"
>
<include
refid=
"equip-list"
></include>
WHERE ibjui.project_contraption_id = #{sequenceNbr}
WHERE ibjui.project_contraption_id = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
ORDER BY ibjtpp.REC_DATE ASC
</select>
</select>
<select
id=
"selectEquipListWithOutBf"
resultType=
"java.util.Map"
>
<include
refid=
"equip-list"
></include>
WHERE ibjui.project_contraption_id = #{sequenceNbr}
and (ibjui."EQU_STATE" is null or ibjui."EQU_STATE"
<![CDATA[ <> ]]>
'3')
ORDER BY ibjtpp.REC_DATE ASC
</select>
<resultMap
id=
"projectContraptionResultMap"
type=
"java.util.Map"
>
<resultMap
id=
"projectContraptionResultMap"
type=
"java.util.Map"
>
<result
property=
"project_contraption_id"
column=
"project_contraption_id"
/>
<result
property=
"project_contraption_id"
column=
"project_contraption_id"
/>
<result
property=
"inUseNumber"
column=
"inUseNumber"
javaType=
"java.lang.Integer"
/>
<result
property=
"inUseNumber"
column=
"inUseNumber"
javaType=
"java.lang.Integer"
/>
...
...
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