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
6682bc4c
Commit
6682bc4c
authored
Dec 20, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
223af8e0
2f9265fc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
29 deletions
+135
-29
JgChangeRegistrationReformDto.java
...boot/module/jg/api/dto/JgChangeRegistrationReformDto.java
+1
-1
JgChangeRegistrationReform.java
...boot/module/jg/api/entity/JgChangeRegistrationReform.java
+2
-2
JgRegistrationHistoryMapper.java
...oot/module/jg/api/mapper/JgRegistrationHistoryMapper.java
+5
-2
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+116
-23
IdxBizJgOtherInfoMapper.java
...s/boot/module/ymt/api/mapper/IdxBizJgOtherInfoMapper.java
+4
-1
IdxBizJgRegisterInfoMapper.java
...oot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
+7
-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/JgChangeRegistrationReformDto.java
View file @
6682bc4c
...
@@ -100,7 +100,7 @@ public class JgChangeRegistrationReformDto extends BaseDto {
...
@@ -100,7 +100,7 @@ public class JgChangeRegistrationReformDto extends BaseDto {
private
String
receiveCompanyCode
;
private
String
receiveCompanyCode
;
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
private
String
nextExecut
e
Ids
;
private
String
nextExecut
or
Ids
;
@ApiModelProperty
(
value
=
"改造告知申请id"
)
@ApiModelProperty
(
value
=
"改造告知申请id"
)
private
String
reformNoticeId
;
private
String
reformNoticeId
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgChangeRegistrationReform.java
View file @
6682bc4c
...
@@ -192,8 +192,8 @@ public class JgChangeRegistrationReform extends BaseEntity {
...
@@ -192,8 +192,8 @@ public class JgChangeRegistrationReform extends BaseEntity {
/**
/**
* 下一执行节点ids
* 下一执行节点ids
*/
*/
@TableField
(
"next_execut
e
_ids"
)
@TableField
(
"next_execut
or
_ids"
)
private
String
nextExecut
e
Ids
;
private
String
nextExecut
or
Ids
;
/**
/**
* 任务发起人id
* 任务发起人id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgRegistrationHistoryMapper.java
View file @
6682bc4c
...
@@ -2,13 +2,16 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
...
@@ -2,13 +2,16 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
/**
/**
*
Mapper 接口
* Mapper 接口
*
*
* @author system_generator
* @author system_generator
* @date 2023-12-20
* @date 2023-12-20
*/
*/
public
interface
JgRegistrationHistoryMapper
extends
BaseMapper
<
JgRegistrationHistory
>
{
public
interface
JgRegistrationHistoryMapper
extends
BaseMapper
<
JgRegistrationHistory
>
{
@Select
(
"select sequence_nbr from jg_registration_history where equ_id = #{equid} and current_document_id = #{documentId}"
)
Long
getSequenceNbrByEquidAndDocumentId
(
@Param
(
"equid"
)
String
equid
,
@Param
(
"documentId"
)
String
documentId
);
}
}
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 @
6682bc4c
...
@@ -12,20 +12,17 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -12,20 +12,17 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationReformService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationReformService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
@@ -38,11 +35,13 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
...
@@ -38,11 +35,13 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* 改造变更登记服务实现类
* 改造变更登记服务实现类
...
@@ -51,7 +50,14 @@ import java.util.Map;
...
@@ -51,7 +50,14 @@ import java.util.Map;
* @date 2023-12-20
* @date 2023-12-20
*/
*/
@Service
@Service
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
@Autowired
WorkFlowFeignService
workFlowFeginService
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
@Autowired
private
UseInfoMapper
useInfoMapper
;
private
UseInfoMapper
useInfoMapper
;
@Autowired
@Autowired
...
@@ -66,22 +72,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -66,22 +72,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
//移装登记关系表
//移装登记关系表
@Autowired
@Autowired
private
JgChangeRegistrationTransferEqMapper
jgChangeRegistrationTransferEqMapper
;
private
JgChangeRegistrationTransferEqMapper
jgChangeRegistrationTransferEqMapper
;
@Autowired
private
IdxBizJgTechParamsElevatorMapper
idxBizJgTechParamsElevatorMapper
;
@Autowired
private
JgRegistrationHistoryMapper
jgRegistrationHistoryMapper
;
//使用登记关系表mapper
//使用登记关系表mapper
@Autowired
@Autowired
private
JgUseRegistrationEqMapper
jgUseRegistrationEqMapper
;
private
JgUseRegistrationEqMapper
jgUseRegistrationEqMapper
;
@Autowired
@Autowired
WorkFlowFeignService
workFlowFeginService
;
private
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
@Autowired
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
private
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
return
listPage
;
}
}
...
@@ -89,6 +99,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -89,6 +99,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
return
this
.
baseMapper
.
getEquipListPage
(
page
,
factoryNum
,
equList
,
equCategory
);
return
this
.
baseMapper
.
getEquipListPage
(
page
,
factoryNum
,
equList
,
equCategory
);
}
}
@Transactional
@Transactional
public
void
save
(
JSONObject
map
)
{
public
void
save
(
JSONObject
map
)
{
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
...
@@ -114,12 +125,25 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -114,12 +125,25 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
//使用登记编号
jgRegistrationHistory
.
setUseRegistrationCode
(
idxBizJgRegisterInfoMapper
.
getUseOrgCodeByEquip
(
map
.
get
(
"equipId"
).
toString
()));
//登记类别
jgRegistrationHistory
.
setRegistrationClass
(
"改造登记"
);
//设备id
jgRegistrationHistory
.
setEquId
(
map
.
get
(
"equipId"
).
toString
());
//修改数据
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
map
));
//设备监管码
jgRegistrationHistory
.
setSupervisoryCode
(
supervisoryCode
);
//数据状态
jgRegistrationHistory
.
setStatus
(
"new"
);
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
null
);
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
null
);
jgChangeRegistrationReform
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgChangeRegistrationReform
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
jgRegistrationHistory
.
setSequenceNbr
(
jgRegistrationHistoryMapper
.
getSequenceNbrByEquidAndDocumentId
(
map
.
get
(
"equipId"
).
toString
(),
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
}
else
{
}
else
{
// 业务管理设备信息保存
// 业务管理设备信息保存
...
@@ -133,6 +157,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -133,6 +157,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
this
.
save
(
jgChangeRegistrationReform
);
this
.
save
(
jgChangeRegistrationReform
);
jgChangeRegistrationReformEq
.
setEquipTransferId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgChangeRegistrationReformEq
.
setEquipTransferId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgChangeRegistrationReformEqMapper
.
insert
(
jgChangeRegistrationReformEq
);
jgChangeRegistrationReformEqMapper
.
insert
(
jgChangeRegistrationReformEq
);
//当前单据id
jgRegistrationHistory
.
setCurrentDocumentId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgRegistrationHistoryMapper
.
insert
(
jgRegistrationHistory
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
...
@@ -156,6 +183,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -156,6 +183,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setInstanceId
(
instanceId
);
jgChangeRegistrationReform
.
setInstanceId
(
instanceId
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
}
}
}
}
...
@@ -223,12 +251,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -223,12 +251,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
lambda
.
eq
(
JgChangeRegistrationReform:
:
getSequenceNbr
,
id
);
lambda
.
eq
(
JgChangeRegistrationReform:
:
getSequenceNbr
,
id
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
if
(
"流程结束"
.
equals
(
taskName
))
{
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
jgChangeRegistrationReform
.
setStatus
(
taskName
);
jgChangeRegistrationReform
.
setStatus
(
taskName
);
jgChangeRegistrationReform
.
setAuditStatus
(
"已完成"
);
jgChangeRegistrationReform
.
setAuditStatus
(
"已完成"
);
makeEquipmentsInvalid
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
//交换历史数据与新增数据
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
}
else
{
}
else
{
jgChangeRegistrationReform
.
setNextExecut
e
Ids
(
role
);
jgChangeRegistrationReform
.
setNextExecut
or
Ids
(
role
);
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceStatus
()))
{
jgChangeRegistrationReform
.
setInstanceStatus
(
jgChangeRegistrationReform
.
getInstanceStatus
()
+
","
+
role
);
jgChangeRegistrationReform
.
setInstanceStatus
(
jgChangeRegistrationReform
.
getInstanceStatus
()
+
","
+
role
);
...
@@ -286,11 +315,20 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -286,11 +315,20 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
LambdaQueryWrapper
<
JgChangeRegistrationReform
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReform
>().
lambda
();
LambdaQueryWrapper
<
JgChangeRegistrationReform
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReform
>().
lambda
();
lambda
.
in
(
JgChangeRegistrationReform:
:
getSequenceNbr
,
ids
);
lambda
.
in
(
JgChangeRegistrationReform:
:
getSequenceNbr
,
ids
);
this
.
update
(
jgChangeRegistrationReform
,
lambda
);
this
.
update
(
jgChangeRegistrationReform
,
lambda
);
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
new
JgChangeRegistrationReformEq
();
jgChangeRegistrationReformEq
.
setIsDelete
(
true
);
LambdaQueryWrapper
<
JgChangeRegistrationReformEq
>
lambda1
=
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
lambda
();
lambda1
.
in
(
JgChangeRegistrationReformEq:
:
getEquipTransferId
,
ids
);
jgChangeRegistrationReformEqMapper
.
update
(
jgChangeRegistrationReformEq
,
lambda1
);
}
}
public
Map
<
String
,
Object
>
getDetail
(
String
id
)
{
public
Map
<
String
,
Object
>
getDetail
(
String
id
)
{
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
if
(
detail
.
get
(
""
).
equals
(
"已完成"
)){
}
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
...
@@ -304,13 +342,67 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -304,13 +342,67 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
/**
/**
* 批量设置设备无效(使用登记、移装登记、改造登记)
* 批量设置设备无效(使用登记、移装登记、改造登记)
* @param equipmentId 装备id
*
* @param equipmentId 装备id
* @param currentDocumentId 当前文档id
* @param currentDocumentId 当前文档id
*/
*/
public
void
makeEquipmentsInvalid
(
String
equipmentId
,
String
currentDocumentId
){
public
void
makeEquipmentsInvalid
(
String
equipmentId
,
String
currentDocumentId
)
{
jgChangeRegistrationReformEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
jgChangeRegistrationReformEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
jgChangeRegistrationTransferEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
jgChangeRegistrationTransferEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
jgUseRegistrationEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
jgUseRegistrationEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equipmentId
,
currentDocumentId
);
}
/**
* 流程完成之后互换数据并更新设备状态
* @param equipId
* @param currentDocumentId
*/
public
void
updateTechparamsByEquIdAndCurrentDoucumentId
(
String
equipId
,
String
currentDocumentId
){
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
idxBizJgOtherInfoMapper
.
getSupervisoryCodeByEquipmentCode
(
equipId
));
String
newUseRegistrationCertificateNumber
=
responseModel
.
getResult
().
split
(
"-"
)[
0
];
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
.
eq
(
"current_document_id"
,
currentDocumentId
)
.
eq
(
"registration_class"
,
"改造登记"
));
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
)&&!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
)){
//历史数据
String
historyData
=
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
);
//当前数据
String
newData
=
jgRegistrationHistory
.
getChangeData
();
//将历史数据更新到技术参数表中
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
newData
,
IdxBizJgTechParamsElevator
.
class
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
new
String
[]{
"SEQUENCE_NBR"
,
"RECORD"
});
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
//将历史数据回填到历史记录表中
jgRegistrationHistory
.
setChangeData
(
historyData
);
jgRegistrationHistory
.
setStatus
(
"history"
);
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
makeEquipmentsInvalid
(
equipId
,
currentDocumentId
);
//更新使用注册登记证编号
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equipId
,
newUseRegistrationCertificateNumber
);
//es中的编号信息
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"USE_ORG_CODE"
,
newUseRegistrationCertificateNumber
);
resultMap
.
put
(
equipId
,
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
}
}
}
/*
* 获取电梯的原始技术参数
* @param equipId
*/
public
Map
<
String
,
Object
>
getOriginalTechParams
(
String
equipId
){
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
)){
result
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
),
Map
.
class
);
result
.
remove
(
"sequenceNbr"
);
}
return
result
;
}
}
}
\ 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/IdxBizJgOtherInfoMapper.java
View file @
6682bc4c
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
/**
/**
* 安全追溯-其他信息表 Mapper 接口
* 安全追溯-其他信息表 Mapper 接口
...
@@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-08-17
* @date 2023-08-17
*/
*/
public
interface
IdxBizJgOtherInfoMapper
extends
BaseMapper
<
IdxBizJgOtherInfo
>
{
public
interface
IdxBizJgOtherInfoMapper
extends
BaseMapper
<
IdxBizJgOtherInfo
>
{
@Select
(
"select SUPERVISORY_CODE from idx_biz_jg_other_info where record = #{equipmentCode}"
)
String
getSupervisoryCodeByEquipmentCode
(
@Param
(
"equipmentCode"
)
String
equipmentCode
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
View file @
6682bc4c
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
/**
/**
* 注册登记信息表 Mapper 接口
* 注册登记信息表 Mapper 接口
...
@@ -11,4 +13,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +13,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
IdxBizJgRegisterInfoMapper
extends
BaseMapper
<
IdxBizJgRegisterInfo
>
{
public
interface
IdxBizJgRegisterInfoMapper
extends
BaseMapper
<
IdxBizJgRegisterInfo
>
{
@Select
(
"select use_org_code from idx_biz_jg_register_info where record = #{equipCode}"
)
String
getUseOrgCodeByEquip
(
@Param
(
"equipCode"
)
String
equipCode
);
@Select
(
"updateidx_biz_jg_register_info set use_org_code = #{useOrgCode} where record = #{equipCode}"
)
Boolean
updateUseOrgCodeByEquip
(
@Param
(
"equipCode"
)
String
equipCode
,
@Param
(
"useOrgCode"
)
String
useOrgCode
);
}
}
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