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
b95ef913
Commit
b95ef913
authored
Dec 22, 2023
by
liufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加:移装变更流程代码
parent
53ff7bb1
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1108 additions
and
128 deletions
+1108
-128
JgChangeRegistrationTransferDto.java
...ot/module/jg/api/dto/JgChangeRegistrationTransferDto.java
+46
-32
JgChangeRegistrationTransfer.java
...ot/module/jg/api/entity/JgChangeRegistrationTransfer.java
+5
-4
JgChangeRegistrationTransferMapper.java
...ule/jg/api/mapper/JgChangeRegistrationTransferMapper.java
+9
-0
IJgChangeRegistrationTransferEqService.java
...g/api/service/IJgChangeRegistrationTransferEqService.java
+10
-0
IJgChangeRegistrationTransferService.java
.../jg/api/service/IJgChangeRegistrationTransferService.java
+22
-1
IJgRegistrationHistoryService.java
.../module/jg/api/service/IJgRegistrationHistoryService.java
+9
-0
JgChangeRegistrationTransferMapper.xml
...n/resources/mapper/JgChangeRegistrationTransferMapper.xml
+58
-0
JgChangeRegistrationTransferController.java
...iz/controller/JgChangeRegistrationTransferController.java
+66
-34
IIdxBizJgConstructionInfoService.java
...dule/jg/biz/service/IIdxBizJgConstructionInfoService.java
+1
-1
IIdxBizJgInspectionDetectionInfoService.java
.../biz/service/IIdxBizJgInspectionDetectionInfoService.java
+1
-2
IIdxBizJgMainPartsService.java
...boot/module/jg/biz/service/IIdxBizJgMainPartsService.java
+1
-2
IIdxBizJgMaintenanceRecordInfoService.java
...jg/biz/service/IIdxBizJgMaintenanceRecordInfoService.java
+1
-2
IIdxBizJgProtectionDevicesService.java
...ule/jg/biz/service/IIdxBizJgProtectionDevicesService.java
+1
-2
IdxBizJgConstructionInfoServiceImpl.java
...biz/service/impl/IdxBizJgConstructionInfoServiceImpl.java
+15
-3
IdxBizJgInspectionDetectionInfoServiceImpl.java
...vice/impl/IdxBizJgInspectionDetectionInfoServiceImpl.java
+16
-5
IdxBizJgMainPartsServiceImpl.java
...ule/jg/biz/service/impl/IdxBizJgMainPartsServiceImpl.java
+6
-3
IdxBizJgMaintenanceRecordInfoServiceImpl.java
...ervice/impl/IdxBizJgMaintenanceRecordInfoServiceImpl.java
+14
-3
IdxBizJgProtectionDevicesServiceImpl.java
...iz/service/impl/IdxBizJgProtectionDevicesServiceImpl.java
+6
-3
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+64
-24
JgChangeRegistrationTransferEqServiceImpl.java
...rvice/impl/JgChangeRegistrationTransferEqServiceImpl.java
+28
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+696
-6
JgRegistrationHistoryServiceImpl.java
...jg/biz/service/impl/JgRegistrationHistoryServiceImpl.java
+31
-0
IdxBizJgUseInfo.java
...join/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
+2
-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/JgChangeRegistrationTransferDto.java
View file @
b95ef913
...
...
@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 移装变更登记登记
...
...
@@ -14,98 +16,110 @@ import java.util.Date;
* @date 2023-12-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgChangeRegistrationTransferDto"
,
description
=
"移装变更登记登记"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgChangeRegistrationTransferDto"
,
description
=
"移装变更登记登记"
)
public
class
JgChangeRegistrationTransferDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"设备监管码"
)
@ApiModelProperty
(
value
=
"设备监管码"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"使用单位名称"
)
@ApiModelProperty
(
value
=
"使用单位名称"
)
private
String
useUnitName
;
@ApiModelProperty
(
value
=
"申请编号"
)
@ApiModelProperty
(
value
=
"申请编号"
)
private
String
applyNo
;
@ApiModelProperty
(
value
=
"办理状态"
)
@ApiModelProperty
(
value
=
"办理状态"
)
private
String
auditStatus
;
@ApiModelProperty
(
value
=
"登记机构"
)
@ApiModelProperty
(
value
=
"登记机构"
)
private
String
receiveOrgName
;
@ApiModelProperty
(
value
=
"检验单位"
)
@ApiModelProperty
(
value
=
"检验单位"
)
private
String
inspectUnitName
;
@ApiModelProperty
(
value
=
"检验结果照片"
)
@ApiModelProperty
(
value
=
"检验结果照片"
)
private
String
inspectResultPhoto
;
@ApiModelProperty
(
value
=
"检验结果"
)
@ApiModelProperty
(
value
=
"检验结果"
)
private
String
inspectResult
;
@ApiModelProperty
(
value
=
"终审通过时间"
)
@ApiModelProperty
(
value
=
"终审通过时间"
)
private
Date
auditPassDate
;
@ApiModelProperty
(
value
=
"登记类别"
)
@ApiModelProperty
(
value
=
"登记类别"
)
private
String
regType
;
@ApiModelProperty
(
value
=
"注册登记日期"
)
@ApiModelProperty
(
value
=
"注册登记日期"
)
private
Date
regDate
;
@ApiModelProperty
(
value
=
"注册登记人员ID"
)
@ApiModelProperty
(
value
=
"注册登记人员ID"
)
private
String
regPersonId
;
@ApiModelProperty
(
value
=
"注册登记人员"
)
@ApiModelProperty
(
value
=
"注册登记人员"
)
private
String
regPersonName
;
@ApiModelProperty
(
value
=
"安装单位名称"
)
@ApiModelProperty
(
value
=
"安装单位名称"
)
private
String
installUnitName
;
@ApiModelProperty
(
value
=
"状态"
)
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"创建人ID"
)
@ApiModelProperty
(
value
=
"创建人ID"
)
private
String
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"录入单位统一信用代码"
)
@ApiModelProperty
(
value
=
"录入单位统一信用代码"
)
private
String
inputUnitNo
;
@ApiModelProperty
(
value
=
"使用登记编号"
)
@ApiModelProperty
(
value
=
"使用登记编号"
)
private
String
useRegistrationCode
;
@ApiModelProperty
(
value
=
"流程实例id"
)
@ApiModelProperty
(
value
=
"流程实例id"
)
private
String
instanceId
;
@ApiModelProperty
(
value
=
"使用单位统一信用代码"
)
@ApiModelProperty
(
value
=
"使用单位统一信用代码"
)
private
String
useUnitCreditCode
;
@ApiModelProperty
(
value
=
"检验机构统一信用代码"
)
@ApiModelProperty
(
value
=
"检验机构统一信用代码"
)
private
String
inspectUnitCreditCode
;
@ApiModelProperty
(
value
=
"流程执行顺序标识"
)
@ApiModelProperty
(
value
=
"流程执行顺序标识"
)
private
String
executeSequence
;
@ApiModelProperty
(
value
=
"登记机构代码"
)
@ApiModelProperty
(
value
=
"登记机构代码"
)
private
String
receiveOrgCode
;
@ApiModelProperty
(
value
=
"登记机构公司代码"
)
@ApiModelProperty
(
value
=
"登记机构公司代码"
)
private
String
receiveCompanyCode
;
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
private
String
nextExecutorIds
;
@ApiModelProperty
(
value
=
"移装告知申请id"
)
@ApiModelProperty
(
value
=
"移装告知申请id"
)
private
String
reformNoticeId
;
@ApiModelProperty
(
value
=
"任务发起人id"
)
private
String
executorUserId
;
@ApiModelProperty
(
value
=
"任务发起人id"
)
private
String
promoter
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
@ApiModelProperty
(
value
=
"当前登录人角色Ids"
)
private
List
<
String
>
roleIds
;
private
String
dataType
;
private
String
unitCode
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgChangeRegistrationTransfer.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -121,13 +122,13 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
/**
* 创建人ID
*/
@TableField
(
"create_user_id"
)
@TableField
(
value
=
"create_user_id"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
String
createUserId
;
/**
* 创建时间
*/
@TableField
(
"create_date"
)
@TableField
(
value
=
"create_date"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
Date
createDate
;
/**
...
...
@@ -193,7 +194,7 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
/**
* 任务发起人id
*/
@TableField
(
"
executor_user_id
"
)
private
String
executorUserId
;
@TableField
(
"
promoter
"
)
private
String
promoter
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgChangeRegistrationTransferMapper.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 移装变更登记登记 Mapper 接口
...
...
@@ -11,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
JgChangeRegistrationTransferMapper
extends
BaseMapper
<
JgChangeRegistrationTransfer
>
{
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
Page
<
Map
<
String
,
Object
>>
getListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dto"
)
JgChangeRegistrationTransferDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationTransferEqService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq
;
/**
* 移装变更登记设备关系表接口类
*
...
...
@@ -9,4 +12,11 @@ package com.yeejoin.amos.boot.module.jg.api.service;
*/
public
interface
IJgChangeRegistrationTransferEqService
{
boolean
saveOrUpdateTransferEqData
(
JgChangeRegistrationTransferEq
transferEq
);
JgChangeRegistrationTransferEq
getDetailByEquipTransferId
(
String
transferId
);
JgChangeRegistrationTransferEq
getDetailByEquIdAndTransferId
(
String
equipId
,
String
equipTransferId
);
boolean
updateDate
(
JgChangeRegistrationTransferEq
eq
,
LambdaQueryWrapper
<
JgChangeRegistrationTransferEq
>
eqWapper
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationTransferService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
java.util.Map
;
/**
* 移装变更登记登记接口类
*
* @author system_generator
* @date 2023-12-20
*/
public
interface
IJgChangeRegistrationTransferService
{
public
interface
IJgChangeRegistrationTransferService
extends
IService
<
JgChangeRegistrationTransfer
>
{
boolean
updateTransfer
(
String
submitType
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
);
boolean
createTransfer
(
String
submitType
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
);
boolean
deleteBatchBySequenceNbrs
(
Long
[]
sequenceNbrs
);
Map
<
String
,
Map
<
String
,
Object
>>
getTransferDetail
(
String
sequenceNbr
,
String
equipId
);
Page
<
Map
<
String
,
Object
>>
queryListForPage
(
Page
<
Map
<
String
,
Object
>>
page
,
JgChangeRegistrationTransferDto
params
);
void
flowExecute
(
Long
sequenceNbr
,
String
instanceId
,
String
operate
,
String
comment
,
boolean
update
);
void
revocation
(
String
instanceId
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgRegistrationHistoryService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
/**
* 接口类
*
...
...
@@ -9,4 +13,9 @@ package com.yeejoin.amos.boot.module.jg.api.service;
*/
public
interface
IJgRegistrationHistoryService
{
boolean
saveOrUpdateHistoryData
(
JgRegistrationHistory
history
);
JgRegistrationHistory
getDteailByRecord
(
String
record
,
String
currentDocumentId
);
boolean
updateDate
(
JgRegistrationHistory
transfer
,
LambdaQueryWrapper
<
JgRegistrationHistory
>
historyWapper
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationTransferMapper.xml
View file @
b95ef913
...
...
@@ -2,4 +2,62 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferMapper"
>
<update
id=
"updatePromoter"
>
UPDATE tzs_jg_change_registration_reform set promoter = null
where sequence_nbr = #{id}
</update>
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
select crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
crt.status,
crt.receive_org_name as receiveOrgName,
crt.apply_no as applyNo,
crt.next_executor_ids AS nextExecutorIds,
crt.promoter,
crt.rec_date as recDate,
crt.instance_id as instanceId,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as allAddress,
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
<where>
and crt.is_delete = 0
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
and jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if
test=
"dto.auditStatus != null and dto.auditStatus != ''"
>
and crt.audit_status = #{dto.auditStatus}
</if>
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
and crt.use_unit_name like concat('%',#{dto.useUnitName},'%')
</if>
<if
test=
"roleIds != null and dto.dataType == 'jg'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
crt.execute_sequence like concat('%',#{role},'%')
</foreach>
</if>
<if
test=
"dto.dataType == 'jg' "
>
and crt.receive_company_code = #{dto.unitCode}
</if>
<if
test=
"dto.dataType == 'company' "
>
and crt.use_unit_credit_code = #{dto.unitCode}
</if>
</where>
order by crt.rec_date desc
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationTransferController.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationTransferServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -27,9 +35,10 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@Api
(
tags
=
"移装变更登记登记Api"
)
@RequestMapping
(
value
=
"/jg-change-registration-transfer"
)
public
class
JgChangeRegistrationTransferController
extends
BaseController
{
private
static
final
String
TABLE_PAGE_ID
=
"changeRegistrationTransfer"
;
@Autowired
JgChangeRegistrationTransferServiceImpl
jgChangeRegistrationTransferServiceImpl
;
IJgChangeRegistrationTransferService
jgChangeRegistrationTransferService
;
/**
* 新增移装变更登记登记
...
...
@@ -39,36 +48,70 @@ public class JgChangeRegistrationTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增移装变更登记登记"
,
notes
=
"新增移装变更登记登记"
)
public
ResponseModel
<
JgChangeRegistrationTransferDto
>
save
(
@RequestBody
JgChangeRegistrationTransferDto
model
)
{
model
=
jgChangeRegistrationTransferServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
public
ResponseModel
<
Boolean
>
save
(
@RequestParam
(
value
=
"submitType"
,
required
=
false
)
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
if
(
ValidationUtil
.
isEmpty
(
tableData
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
String
equId
=
(
String
)
tableData
.
get
(
"record"
);
if
(
ValidationUtil
.
isEmpty
(
equId
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferService
.
createTransfer
(
submitType
,
map
,
reginParams
));
}
/**
* 根据sequenceNbr更新
*
* @param s
equenceNbr 主键
* @param s
ubmitType
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/
{sequenceNbr}
"
)
@PutMapping
(
value
=
"/
update
"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新移装变更登记登记"
,
notes
=
"根据sequenceNbr更新移装变更登记登记"
)
public
ResponseModel
<
JgChangeRegistrationTransferDto
>
updateBySequenceNbrJgChangeRegistrationTransfer
(
@RequestBody
JgChangeRegistrationTransferDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferServiceImpl
.
updateWithModel
(
model
));
public
ResponseModel
<
Boolean
>
updateBySequenceNbr
(
@RequestParam
(
value
=
"submitType"
,
required
=
false
)
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
if
(
ValidationUtil
.
isEmpty
(
tableData
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
String
equId
=
(
String
)
tableData
.
get
(
"sequenceNbr"
);
if
(
ValidationUtil
.
isEmpty
(
equId
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferService
.
updateTransfer
(
submitType
,
map
,
reginParams
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationTransferService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/revocation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationTransferService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 根据sequenceNbr
删除
* 根据sequenceNbrs批量
删除
*
* @param sequenceNbr
主键
* @param sequenceNbrs
主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}
"
)
@DeleteMapping
(
value
=
"/deteteBatch
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除移装变更登记登记"
,
notes
=
"根据sequenceNbr删除移装变更登记登记"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferServiceImpl
.
removeById
(
sequenceNbr
));
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"sequenceNbrs"
)
Long
[]
sequenceNbrs
){
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferService
.
deleteBatchBySequenceNbrs
(
sequenceNbrs
));
}
/**
...
...
@@ -78,10 +121,11 @@ public class JgChangeRegistrationTransferController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/
{sequenceNbr}
"
)
@GetMapping
(
value
=
"/
detail
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个移装变更登记登记"
,
notes
=
"根据sequenceNbr查询单个移装变更登记登记"
)
public
ResponseModel
<
JgChangeRegistrationTransferDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferServiceImpl
.
queryBySeq
(
sequenceNbr
));
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
String
sequenceNbr
,
@RequestParam
String
equipId
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferService
.
getTransferDetail
(
sequenceNbr
,
equipId
));
}
/**
...
...
@@ -94,23 +138,11 @@ public class JgChangeRegistrationTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"移装变更登记登记分页查询"
,
notes
=
"移装变更登记登记分页查询"
)
public
ResponseModel
<
Page
<
JgChangeRegistrationTransferDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
JgChangeRegistrationTransferDto
>
page
=
new
Page
<
JgChangeRegistrationTransferDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferServiceImpl
.
queryForJgChangeRegistrationTransferPage
(
page
));
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JgChangeRegistrationTransferDto
params
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferService
.
queryListForPage
(
page
,
params
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"移装变更登记登记列表全部数据查询"
,
notes
=
"移装变更登记登记列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
JgChangeRegistrationTransferDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationTransferServiceImpl
.
queryForJgChangeRegistrationTransferList
());
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgConstructionInfoService.java
View file @
b95ef913
...
...
@@ -12,5 +12,5 @@ public interface IIdxBizJgConstructionInfoService {
boolean
saveOrUpdateData
(
IdxBizJgConstructionInfo
constructionInfo
);
IdxBizJgConstructionInfo
getOneData
(
String
record
);
IdxBizJgConstructionInfo
queryNewestDetailByRecord
(
String
record
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgInspectionDetectionInfoService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
/**
...
...
@@ -13,5 +12,5 @@ public interface IIdxBizJgInspectionDetectionInfoService {
boolean
saveOrUpdateData
(
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
);
IdxBizJgInspectionDetectionInfo
getOneData
(
String
record
);
IdxBizJgInspectionDetectionInfo
queryNewestDetailByRecord
(
String
record
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgMainPartsService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMainParts
;
import
java.util.List
;
...
...
@@ -15,5 +14,5 @@ public interface IIdxBizJgMainPartsService {
boolean
saveOrUpdateBatchData
(
List
<
IdxBizJgMainParts
>
mainPartsList
);
IdxBizJgMainParts
getOneData
(
String
record
);
List
<
IdxBizJgMainParts
>
queryListByRecord
(
String
record
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgMaintenanceRecordInfoService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
/**
...
...
@@ -13,5 +12,5 @@ public interface IIdxBizJgMaintenanceRecordInfoService {
boolean
saveOrUpdateData
(
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
);
IdxBizJgMaintenanceRecordInfo
getOneData
(
String
record
);
IdxBizJgMaintenanceRecordInfo
queryNewestDetailByRecord
(
String
record
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgProtectionDevicesService.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProtectionDevices
;
import
java.util.List
;
...
...
@@ -15,5 +14,5 @@ public interface IIdxBizJgProtectionDevicesService {
boolean
saveOrUpdateBatchData
(
List
<
IdxBizJgProtectionDevices
>
protectionDevicesList
);
IdxBizJgProtectionDevices
getOneData
(
String
record
);
List
<
IdxBizJgProtectionDevices
>
queryListByRecord
(
String
record
);
}
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/IdxBizJgConstructionInfoServiceImpl.java
View file @
b95ef913
...
...
@@ -5,9 +5,13 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoServ
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgConstructionInfoMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 施工信息表服务实现类
*
...
...
@@ -21,8 +25,15 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon
return
this
.
saveOrUpdate
(
constructionInfo
);
}
@Override
public
IdxBizJgConstructionInfo
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgConstructionInfo
>().
eq
(
"RECORD"
,
record
));
//查询最新的记录
public
IdxBizJgConstructionInfo
queryNewestDetailByRecord
(
String
record
)
{
IdxBizJgConstructionInfo
result
=
new
IdxBizJgConstructionInfo
();
QueryWrapper
<
IdxBizJgConstructionInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
IdxBizJgConstructionInfo:
:
getRecord
,
record
).
orderByDesc
(
IdxBizJgConstructionInfo:
:
getUscDate
);
List
<
IdxBizJgConstructionInfo
>
constructionInfoList
=
list
(
queryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
constructionInfoList
)){
BeanUtils
.
copyProperties
(
constructionInfoList
.
get
(
0
),
result
);;
}
return
result
;
}
}
\ No newline at end of file
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/IdxBizJgInspectionDetectionInfoServiceImpl.java
View file @
b95ef913
...
...
@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionI
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgInspectionDetectionInfoMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
...
...
@@ -17,14 +19,22 @@ import java.util.List;
* @date 2023-08-17
*/
@Service
public
class
IdxBizJgInspectionDetectionInfoServiceImpl
extends
BaseService
<
IdxBizJgInspectionDetectionInfoDto
,
IdxBizJgInspectionDetectionInfo
,
IdxBizJgInspectionDetectionInfoMapper
>
implements
IIdxBizJgInspectionDetectionInfoService
{
public
class
IdxBizJgInspectionDetectionInfoServiceImpl
extends
BaseService
<
IdxBizJgInspectionDetectionInfoDto
,
IdxBizJgInspectionDetectionInfo
,
IdxBizJgInspectionDetectionInfoMapper
>
implements
IIdxBizJgInspectionDetectionInfoService
{
public
boolean
saveOrUpdateData
(
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
){
public
boolean
saveOrUpdateData
(
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
)
{
return
this
.
saveOrUpdate
(
inspectionDetectionInfo
);
}
@Override
public
IdxBizJgInspectionDetectionInfo
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>().
eq
(
"RECORD"
,
record
));
//查询最新的记录
public
IdxBizJgInspectionDetectionInfo
queryNewestDetailByRecord
(
String
record
)
{
IdxBizJgInspectionDetectionInfo
result
=
new
IdxBizJgInspectionDetectionInfo
();
QueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
IdxBizJgInspectionDetectionInfo:
:
getRecord
,
record
).
orderByDesc
(
IdxBizJgInspectionDetectionInfo:
:
getInspectDate
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
list
(
queryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfoList
))
{
BeanUtils
.
copyProperties
(
inspectionDetectionInfoList
.
get
(
0
),
result
);
}
return
result
;
}
}
\ No newline at end of file
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/IdxBizJgMainPartsServiceImpl.java
View file @
b95ef913
...
...
@@ -23,8 +23,10 @@ public class IdxBizJgMainPartsServiceImpl extends BaseService<IdxBizJgMainPartsD
return
this
.
saveOrUpdateBatch
(
mainPartsList
);
}
@Override
public
IdxBizJgMainParts
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgMainParts
>().
eq
(
"RECORD"
,
record
));
public
List
<
IdxBizJgMainParts
>
queryListByRecord
(
String
record
)
{
QueryWrapper
<
IdxBizJgMainParts
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
IdxBizJgMainParts:
:
getRecord
,
record
).
orderByDesc
(
IdxBizJgMainParts:
:
getRecDate
);
return
list
(
queryWrapper
);
}
}
\ No newline at end of file
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/IdxBizJgMaintenanceRecordInfoServiceImpl.java
View file @
b95ef913
...
...
@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgMaintenanceRecordInf
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgMaintenanceRecordInfoMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
...
...
@@ -23,9 +25,17 @@ public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBiz
return
this
.
saveOrUpdate
(
maintenanceRecordInfo
);
}
@Override
public
IdxBizJgMaintenanceRecordInfo
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgMaintenanceRecordInfo
>().
eq
(
"RECORD"
,
record
));
//查询最新的记录
public
IdxBizJgMaintenanceRecordInfo
queryNewestDetailByRecord
(
String
record
)
{
IdxBizJgMaintenanceRecordInfo
result
=
new
IdxBizJgMaintenanceRecordInfo
();
QueryWrapper
<
IdxBizJgMaintenanceRecordInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
IdxBizJgMaintenanceRecordInfo:
:
getRecord
,
record
).
orderByDesc
(
IdxBizJgMaintenanceRecordInfo:
:
getInformEnd
);
List
<
IdxBizJgMaintenanceRecordInfo
>
maintenanceRecordInfoList
=
list
(
queryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfoList
)){
BeanUtils
.
copyProperties
(
maintenanceRecordInfoList
.
get
(
0
),
result
);
}
return
result
;
}
}
\ No newline at end of file
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/IdxBizJgProtectionDevicesServiceImpl.java
View file @
b95ef913
...
...
@@ -23,8 +23,10 @@ public class IdxBizJgProtectionDevicesServiceImpl extends BaseService<IdxBizJgPr
return
this
.
saveOrUpdateBatch
(
protectionDevicesList
);
}
@Override
public
IdxBizJgProtectionDevices
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgProtectionDevices
>().
eq
(
"RECORD"
,
record
));
public
List
<
IdxBizJgProtectionDevices
>
queryListByRecord
(
String
record
)
{
QueryWrapper
<
IdxBizJgProtectionDevices
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
IdxBizJgProtectionDevices:
:
getRecord
,
record
).
orderByDesc
(
IdxBizJgProtectionDevices:
:
getRecDate
);
return
list
(
queryWrapper
);
}
}
\ No newline at end of file
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 @
b95ef913
...
...
@@ -12,6 +12,11 @@ import com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMainPartsDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProtectionDevicesDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
...
...
@@ -25,6 +30,7 @@ import org.elasticsearch.action.search.SearchRequest;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.common.recycler.Recycler
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
...
...
@@ -271,8 +277,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
putAll
(
factoryInfoMap
);
}
}
//施工信息
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
getOneData
(
record
);
//施工信息
【一对多,暂时只取最新一条数据】
IdxBizJgConstructionInfo
constructionInfo
=
iIdxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
))
{
Map
<
String
,
Object
>
constructionInfoMap
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
)){
...
...
@@ -321,8 +327,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
putAll
(
registerInfoMap
);
}
}
//维保备案
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
getOneData
(
record
);
//维保备案
【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
maintenanceRecordInfo
))
{
Map
<
String
,
Object
>
maintenanceRecordInfoMap
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
)){
...
...
@@ -366,8 +372,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap
.
putAll
(
otherInfoMap
);
}
}
//检验检测
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
getOneData
(
record
);
//检验检测
【一对多,暂时只取最新一条数据】
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
Map
<
String
,
Object
>
inspectionDetectionInfoMap
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
)){
...
...
@@ -409,34 +415,68 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//压力管道
//起重机械
//主要零部件
IdxBizJgMainParts
mainParts
=
iIdxBizJgMainPartsService
.
getOneData
(
record
);
//主要零部件
【一对多,查出多条数据】
List
<
IdxBizJgMainParts
>
mainParts
=
iIdxBizJgMainPartsService
.
queryListByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
mainParts
))
{
Map
<
String
,
Object
>
mainParts
Map
=
null
;
Map
<
String
,
Object
>
mainParts
ResultMap
=
new
HashMap
<>()
;
if
(!
ValidationUtil
.
isEmpty
(
fieldType
)){
mainPartsMap
=
Bean
.
BeantoMap
(
mainParts
);
mainPartsMap
.
put
(
"mainpartsSeq"
,
mainParts
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
IdxBizJgMainParts
mainPart
:
mainParts
){
Map
<
String
,
Object
>
mainPartsMap
=
null
;
mainPartsMap
=
Bean
.
BeantoMap
(
mainPart
);
mainPartsMap
.
put
(
"mainpartsSeq"
,
mainPart
.
getSequenceNbr
());
list
.
add
(
mainPartsMap
);
}
if
(!
ValidationUtil
.
isEmpty
(
list
)){
mainPartsResultMap
.
put
(
"mainparts"
,
list
);
}
}
else
{
mainPartsMap
=
convertCamelToUnderscore
(
mainParts
,
null
);
mainPartsMap
.
put
(
"MAINPARTS_SEQ"
,
mainParts
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
IdxBizJgMainParts
mainPart
:
mainParts
){
Map
<
String
,
Object
>
mainPartsMap
=
null
;
mainPartsMap
=
convertCamelToUnderscore
(
mainPart
,
null
);
mainPartsMap
.
put
(
"MAINPARTS_SEQ"
,
mainPart
.
getSequenceNbr
());
list
.
add
(
mainPartsMap
);
}
if
(!
mainPartsMap
.
isEmpty
())
{
objMap
.
putAll
(
mainPartsMap
);
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
mainPartsResultMap
.
put
(
"MAINPARTS"
,
list
);
}
}
//安全附件
IdxBizJgProtectionDevices
protectionDevices
=
iIdxBizJgProtectionDevicesService
.
getOneData
(
record
);
if
(!
mainPartsResultMap
.
isEmpty
())
{
objMap
.
putAll
(
mainPartsResultMap
);
}
}
//安全附件【一对多,查出多条数据】
List
<
IdxBizJgProtectionDevices
>
protectionDevices
=
iIdxBizJgProtectionDevicesService
.
queryListByRecord
(
record
);
if
(!
ValidationUtil
.
isEmpty
(
protectionDevices
))
{
Map
<
String
,
Object
>
protectionDevicesMap
=
null
;
Map
<
String
,
Object
>
protectionDevicesResultMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
fieldType
)){
protectionDevicesMap
=
Bean
.
BeantoMap
(
protectionDevices
);
protectionDevicesMap
.
put
(
"protectiondevicesSeq"
,
protectionDevices
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
IdxBizJgProtectionDevices
protectionDevice
:
protectionDevices
){
Map
<
String
,
Object
>
protectionDeviceMap
=
null
;
protectionDeviceMap
=
Bean
.
BeantoMap
(
protectionDevice
);
protectionDeviceMap
.
put
(
"protectiondevicesSeq"
,
protectionDevice
.
getSequenceNbr
());
list
.
add
(
protectionDeviceMap
);
}
if
(!
ValidationUtil
.
isEmpty
(
list
)){
protectionDevicesResultMap
.
put
(
"protectionDevices"
,
list
);
}
}
else
{
protectionDevicesMap
=
convertCamelToUnderscore
(
protectionDevices
,
null
);
protectionDevicesMap
.
put
(
"PROTECTIONDEVICES_SEQ"
,
protectionDevices
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
IdxBizJgProtectionDevices
protectionDevice
:
protectionDevices
){
Map
<
String
,
Object
>
protectionDeviceMap
=
null
;
protectionDeviceMap
=
convertCamelToUnderscore
(
protectionDevice
,
null
);
protectionDeviceMap
.
put
(
"PROTECTIONDEVICES_SEQ"
,
protectionDevice
.
getSequenceNbr
());
list
.
add
(
protectionDeviceMap
);
}
if
(!
ValidationUtil
.
isEmpty
(
list
)){
protectionDevicesResultMap
.
put
(
"PROTECTIONDEVICES"
,
list
);
}
}
if
(!
protectionDevicesMap
.
isEmpty
())
{
objMap
.
putAll
(
protectionDevicesMap
);
if
(!
protectionDevices
Result
Map
.
isEmpty
())
{
objMap
.
putAll
(
protectionDevices
Result
Map
);
}
}
return
objMap
;
...
...
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/JgChangeRegistrationTransferEqServiceImpl.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferEqDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
/**
...
...
@@ -30,4 +34,26 @@ public class JgChangeRegistrationTransferEqServiceImpl extends BaseService<JgCha
public
List
<
JgChangeRegistrationTransferEqDto
>
queryForJgChangeRegistrationTransferEqList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 新增移装设备关系表
* @param transferEq
*/
public
boolean
saveOrUpdateTransferEqData
(
JgChangeRegistrationTransferEq
transferEq
)
{
return
this
.
saveOrUpdate
(
transferEq
);
}
public
JgChangeRegistrationTransferEq
getDetailByEquipTransferId
(
String
equipTransferId
)
{
return
this
.
getOne
(
new
QueryWrapper
<
JgChangeRegistrationTransferEq
>().
eq
(
"equip_transfer_id"
,
equipTransferId
));
}
public
JgChangeRegistrationTransferEq
getDetailByEquIdAndTransferId
(
String
equipId
,
String
equipTransferId
)
{
return
this
.
getOne
(
new
QueryWrapper
<
JgChangeRegistrationTransferEq
>().
eq
(
"equ_id"
,
equipId
).
eq
(
"equip_transfer_id"
,
equipTransferId
));
}
public
boolean
updateDate
(
JgChangeRegistrationTransferEq
eq
,
LambdaQueryWrapper
<
JgChangeRegistrationTransferEq
>
eqWapper
)
{
return
this
.
update
(
eq
,
eqWapper
);
}
}
\ No newline at end of file
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/JgChangeRegistrationTransferServiceImpl.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
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.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 移装变更登记登记服务实现类
...
...
@@ -16,18 +72,651 @@ import java.util.List;
* @date 2023-12-20
*/
@Service
public
class
JgChangeRegistrationTransferServiceImpl
extends
BaseService
<
JgChangeRegistrationTransferDto
,
JgChangeRegistrationTransfer
,
JgChangeRegistrationTransferMapper
>
implements
IJgChangeRegistrationTransferService
{
public
class
JgChangeRegistrationTransferServiceImpl
extends
BaseService
<
JgChangeRegistrationTransferDto
,
JgChangeRegistrationTransfer
,
JgChangeRegistrationTransferMapper
>
implements
IJgChangeRegistrationTransferService
{
private
static
final
String
PROCESS_DEFINITION_KEY
=
"changeRegistrationTransfer"
;
private
static
final
String
TABLE_PAGE_ID
=
"changeRegistrationTransfer"
;
@Autowired
private
IJgChangeRegistrationTransferEqService
jgChangeRegistrationTransferEqService
;
@Autowired
private
IJgRegistrationHistoryService
jgRegistrationHistoryService
;
@Autowired
private
IIdxBizJgUseInfoService
useInfoService
;
@Autowired
private
IdxBizJgUseInfoServiceImpl
idxBizJgUseInfoService
;
@Autowired
private
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
RestHighLevelClient
restHighLevelClient
;
@Autowired
WorkFlowFeignService
workFlowFeginService
;
@Autowired
RedisUtils
redisUtils
;
//改造登记关系表mapper
@Autowired
private
JgChangeRegistrationReformEqMapper
jgChangeRegistrationReformEqMapper
;
//移装登记关系表
@Autowired
private
JgChangeRegistrationTransferEqMapper
jgChangeRegistrationTransferEqMapper
;
//使用登记关系表mapper
@Autowired
private
JgUseRegistrationEqMapper
jgUseRegistrationEqMapper
;
@Autowired
private
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
@Autowired
private
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
/**
* 新增移装变更登记
*
* @param submitType
* @param map
* @return
*/
public
boolean
createTransfer
(
String
submitType
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
CompanyBo
company
=
reginParams
.
getCompany
();
String
sequenceNbr
=
(
String
)
tableData
.
get
(
"sequenceNbr"
);
String
equId
=
(
String
)
tableData
.
get
(
"record"
);
String
receiveOrgCode
=
(
String
)
tableData
.
get
(
"receiveOrgCode"
);
String
receiveOrgName
=
""
;
String
supervisoryCode
=
""
;
//移装变更数据
JgChangeRegistrationTransfer
oldTransfer
=
new
JgChangeRegistrationTransfer
();
//移装变更设备关联数据
JgChangeRegistrationTransferEq
oldTransferEq
=
new
JgChangeRegistrationTransferEq
();
//移装变更历史记录表
JgRegistrationHistory
oldHistory
=
new
JgRegistrationHistory
();
//设备使用信息
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
if
(!
ValidationUtil
.
isEmpty
(
receiveOrgCode
))
{
String
[]
receiveOrgCodeList
=
receiveOrgCode
.
split
(
"_"
);
if
(
receiveOrgCodeList
.
length
>
1
)
{
receiveOrgCode
=
receiveOrgCodeList
[
0
];
receiveOrgName
=
receiveOrgCodeList
[
1
];
}
}
//查询申请单号
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
YZBG
.
getCode
(),
1
);
//有sequenceNbr代表修改数据
if
(!
ValidationUtil
.
isEmpty
(
sequenceNbr
))
{
//查询移装变更记录
oldTransfer
=
this
.
getById
(
sequenceNbr
);
//查询关系表
oldTransferEq
=
jgChangeRegistrationTransferEqService
.
getDetailByEquipTransferId
(
sequenceNbr
);
//查询历史记录表
if
(!
ValidationUtil
.
isEmpty
(
oldTransferEq
))
{
oldHistory
=
jgRegistrationHistoryService
.
getDteailByRecord
(
oldTransferEq
.
getEquId
(),
sequenceNbr
);
useInfo
=
idxBizJgUseInfoService
.
getOneData
(
oldTransferEq
.
getEquId
());
}
}
//申请编号
oldTransfer
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
//登记类别
oldTransfer
.
setRegType
(
"移装登记"
);
//注册登记日期
oldTransfer
.
setRegDate
(
new
Date
());
//使用机构
oldTransfer
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
oldTransfer
.
setUseUnitName
(
company
.
getCompanyName
());
//录入单位统一信用代码
oldTransfer
.
setInputUnitNo
(
company
.
getCompanyCode
());
//登记机构代码
//登记机构公司代码
if
(!
ValidationUtil
.
isEmpty
(
receiveOrgCode
))
{
oldTransfer
.
setReceiveOrgCode
(
receiveOrgCode
);
oldTransfer
.
setReceiveCompanyCode
(
receiveOrgCode
);
}
else
{
oldTransfer
.
setReceiveOrgCode
(
"610000"
);
oldTransfer
.
setReceiveCompanyCode
(
"610000"
);
}
//登记机构
if
(!
ValidationUtil
.
isEmpty
(
receiveOrgName
))
{
oldTransfer
.
setReceiveOrgName
(
receiveOrgName
);
}
//办理状态
oldTransfer
.
setAuditStatus
(
"待提交"
);
oldTransfer
.
setStatus
(
UseStatusEnum
.
SUBMIT
.
getPass
());
//es种查询设备信息
SearchRequest
request
=
new
SearchRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
trackTotalHits
(
true
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
boolMust
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"SEQUENCE_NBR"
,
equId
));
builder
.
query
(
boolMust
);
request
.
source
(
builder
);
try
{
//ES中的数据
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
for
(
org
.
elasticsearch
.
search
.
SearchHit
hit
:
response
.
getHits
().
getHits
())
{
System
.
out
.
println
(
hit
);
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
hit
);
JSONObject
dto2
=
jsonObject
.
getJSONObject
(
"sourceAsMap"
);
//设备监管码
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"SUPERVISORY_CODE"
)))
{
supervisoryCode
=
(
String
)
dto2
.
get
(
"SUPERVISORY_CODE"
);
oldTransfer
.
setSupervisoryCode
(
supervisoryCode
);
}
//使用登记编号 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"USE_REGISTRATION_CODE"
)))
{
oldTransfer
.
setUseRegistrationCode
((
String
)
dto2
.
get
(
"USE_REGISTRATION_CODE"
));
}
//检验机构统一信用代码 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"INSPECT_UNIT_CREDIT_CODE"
)))
{
oldTransfer
.
setInspectUnitCreditCode
((
String
)
dto2
.
get
(
"INSPECT_UNIT_CREDIT_CODE"
));
}
//检验单位 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"INSPECT_UNIT_NAME"
)))
{
oldTransfer
.
setInspectUnitName
((
String
)
dto2
.
get
(
"INSPECT_UNIT_NAME"
));
}
//检验结果照片 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"INSPECT_RESULT_PHOTO"
)))
{
oldTransfer
.
setInspectResultPhoto
((
String
)
dto2
.
get
(
"INSPECT_RESULT_PHOTO"
));
}
//检验结果 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"INSPECT_RESULT"
)))
{
oldTransfer
.
setInspectResult
((
String
)
dto2
.
get
(
"INSPECT_RESULT"
));
}
//安装单位名称 X
if
(!
ValidationUtil
.
isEmpty
(
dto2
.
get
(
"INSTALL_UNIT_NAME"
)))
{
oldTransfer
.
setSupervisoryCode
((
String
)
dto2
.
get
(
"INSTALL_UNIT_NAME"
));
}
}
//保存【移装变更登记】基本信息
if
(!
ValidationUtil
.
isEmpty
(
oldTransfer
))
{
this
.
saveOrUpdate
(
oldTransfer
);
}
//保存设备关联表
oldTransferEq
.
setEquipTransferId
(
oldTransfer
.
getSequenceNbr
().
toString
());
oldTransferEq
.
setEquId
(
equId
);
jgChangeRegistrationTransferEqService
.
saveOrUpdateTransferEqData
(
oldTransferEq
);
//新增历史记录表
oldHistory
.
setRegistrationClass
(
"移装登记"
);
//保存变更新数据
oldHistory
.
setChangeData
(
JSON
.
toJSONString
(
tableData
));
//保存变更旧数据
oldHistory
.
setOldData
(
JSON
.
toJSONString
(
useInfo
));
//设备监管码
oldHistory
.
setSupervisoryCode
(
supervisoryCode
);
oldHistory
.
setEquId
(
equId
);
oldHistory
.
setCurrentDocumentId
(
oldTransfer
.
getSequenceNbr
().
toString
());
oldHistory
.
setStatus
(
"new"
);
jgRegistrationHistoryService
.
saveOrUpdateHistoryData
(
oldHistory
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
//发起流程
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
}
else
{
// 启动并执行流程
instanceId
=
startByVariable
();
this
.
updateExecuteIds
(
instanceId
,
oldTransfer
.
getSequenceNbr
(),
"0"
);
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 修改数据信息
this
.
updateExecuteIds
(
instanceId
,
oldTransfer
.
getSequenceNbr
(),
"0"
);
// 默认执行流程
this
.
flowExecute
(
oldTransfer
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
false
);
}
}
return
true
;
}
/**
* 修改移装变更登记
*
* @param map
* @return
*/
public
boolean
updateTransfer
(
String
submitType
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
return
this
.
createTransfer
(
submitType
,
map
,
reginParams
);
}
/**
* 执行流程
*
* @param id
* @param instanceId
* @param operate
* @param comment
* @param update
*/
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
boolean
update
)
{
try
{
JSONObject
task
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskMessage
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
task
.
get
(
"data"
)));
String
taskId
=
taskMessage
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// 更新下一步执行人
this
.
updateExecuteIds
(
instanceId
,
id
,
operate
);
}
/**
* 流程撤回
*
* @param instanceId
*/
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskCode
=
""
;
JgChangeRegistrationTransfer
jgTransfer
=
new
JgChangeRegistrationTransfer
();
LambdaQueryWrapper
<
JgChangeRegistrationTransfer
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationTransfer
>().
lambda
();
lambda
.
eq
(
JgChangeRegistrationTransfer:
:
getInstanceId
,
instanceId
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
<?,
?>)
datum
).
containsKey
(
"groupId"
))
{
roleList
.
add
(((
Map
<?,
?>)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
taskCode
))
{
jgTransfer
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
jgTransfer
.
setPromoter
(
""
);
jgTransfer
.
setNextExecutorIds
(
join
);
this
.
update
(
jgTransfer
,
lambda
);
}
/**
* 批量删除
*
* @param sequenceNbrs
* @return
*/
public
boolean
deleteBatchBySequenceNbrs
(
Long
[]
sequenceNbrs
)
{
if
(
Objects
.
isNull
(
sequenceNbrs
)
||
sequenceNbrs
.
length
==
0
)
{
return
false
;
}
try
{
//删除移装变更信息
JgChangeRegistrationTransfer
transfer
=
new
JgChangeRegistrationTransfer
();
transfer
.
setIsDelete
(
true
);
LambdaQueryWrapper
<
JgChangeRegistrationTransfer
>
transferWapper
=
new
QueryWrapper
<
JgChangeRegistrationTransfer
>().
lambda
();
transferWapper
.
in
(
JgChangeRegistrationTransfer:
:
getSequenceNbr
,
Arrays
.
asList
(
sequenceNbrs
));
this
.
update
(
transfer
,
transferWapper
);
//删除关联表信息
JgChangeRegistrationTransferEq
eq
=
new
JgChangeRegistrationTransferEq
();
transfer
.
setIsDelete
(
true
);
LambdaQueryWrapper
<
JgChangeRegistrationTransferEq
>
eqWapper
=
new
QueryWrapper
<
JgChangeRegistrationTransferEq
>().
lambda
();
eqWapper
.
in
(
JgChangeRegistrationTransferEq:
:
getEquipTransferId
,
Arrays
.
asList
(
sequenceNbrs
));
jgChangeRegistrationTransferEqService
.
updateDate
(
eq
,
eqWapper
);
//删除历史表
JgRegistrationHistory
history
=
new
JgRegistrationHistory
();
history
.
setIsDelete
(
true
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
historyWapper
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
historyWapper
.
in
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
Arrays
.
asList
(
sequenceNbrs
));
jgRegistrationHistoryService
.
updateDate
(
history
,
historyWapper
);
}
catch
(
Exception
e
)
{
return
false
;
}
return
true
;
}
/**
* 根据设备Id查询详情
*
* @param equipId 设备Id
* @return
*/
public
Map
<
String
,
Map
<
String
,
Object
>>
getTransferDetail
(
String
sequenceNbr
,
String
equipId
)
{
Map
<
String
,
Map
<
String
,
Object
>>
pageDataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultDataMap
=
new
HashMap
<>();
//移装变更详情
JgChangeRegistrationTransfer
transferById
=
this
.
getById
(
sequenceNbr
);
if
(!
ValidationUtil
.
isEmpty
(
transferById
))
{
Map
<
String
,
Object
>
transferToMap
=
Bean
.
BeantoMap
(
transferById
);
resultDataMap
.
putAll
(
transferToMap
);
}
//判断流程是否执行完成,
// 1、未执行完成时查询历史表
// 2、执行完成后查询使用信息表
if
(!
ValidationUtil
.
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
(),
transferById
.
getStatus
()))
{
JgRegistrationHistory
historyData
=
jgRegistrationHistoryService
.
getDteailByRecord
(
equipId
,
transferById
.
getSequenceNbr
().
toString
());
if
(!
ValidationUtil
.
isEmpty
(
historyData
))
{
JSONObject
newPosition
=
JSON
.
parseObject
(
historyData
.
getChangeData
());
String
record
=
newPosition
.
getString
(
"record"
);
String
receiveOrgCode
=
newPosition
.
getString
(
"receiveOrgCode"
);
String
equCode
=
newPosition
.
getString
(
"equCode"
);
String
province
=
newPosition
.
getString
(
"province"
);
String
city
=
newPosition
.
getString
(
"city"
);
String
county
=
newPosition
.
getString
(
"county"
);
String
street
=
newPosition
.
getString
(
"street"
);
String
address
=
newPosition
.
getString
(
"address"
);
String
longitudeLatitude
=
newPosition
.
getString
(
"longitudeLatitude"
);
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
resultDataMap
.
put
(
"record"
,
record
);
}
if
(!
ObjectUtils
.
isEmpty
(
equCode
))
{
resultDataMap
.
put
(
"equCode"
,
equCode
);
}
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgCode
))
{
resultDataMap
.
put
(
"receiveOrgCode"
,
receiveOrgCode
);
}
// 分割省市区街道字段
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
resultDataMap
.
put
(
"province"
,
province
);
}
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
resultDataMap
.
put
(
"city"
,
city
);
}
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
resultDataMap
.
put
(
"county"
,
county
);
}
if
(!
ObjectUtils
.
isEmpty
(
street
))
{
resultDataMap
.
put
(
"street"
,
street
);
}
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
resultDataMap
.
put
(
"address"
,
address
);
}
if
(!
ObjectUtils
.
isEmpty
(
longitudeLatitude
))
{
resultDataMap
.
put
(
"longitudeLatitude"
,
JSON
.
parseObject
(
longitudeLatitude
));
}
}
}
else
{
//设备注册信息
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoService
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
equipId
));
//使用信息详情
IdxBizJgUseInfo
useInfoByRecord
=
idxBizJgUseInfoService
.
getOneData
(
equipId
);
if
(!
ValidationUtil
.
isEmpty
(
useInfoByRecord
))
{
Map
<
String
,
Object
>
useInfoToMap
=
Bean
.
BeantoMap
(
useInfoByRecord
);
resultDataMap
.
put
(
"record"
,
useInfoByRecord
.
getRecord
());
resultDataMap
.
putAll
(
useInfoToMap
);
// 省市区街道字段
resultDataMap
.
put
(
"province"
,
useInfoByRecord
.
getProvince
()
+
"_"
+
useInfoByRecord
.
getProvinceName
());
resultDataMap
.
put
(
"city"
,
useInfoByRecord
.
getCity
()
+
"_"
+
useInfoByRecord
.
getCityName
());
resultDataMap
.
put
(
"county"
,
useInfoByRecord
.
getCounty
()
+
"_"
+
useInfoByRecord
.
getCountyName
());
resultDataMap
.
put
(
"street"
,
useInfoByRecord
.
getFactoryUseSiteStreet
()+
"_"
+
useInfoByRecord
.
getStreetName
());
resultDataMap
.
put
(
"address"
,
useInfoByRecord
.
getAddress
());
if
(!
ObjectUtils
.
isEmpty
(
useInfoByRecord
.
getLongitudeLatitude
()))
{
resultDataMap
.
put
(
"longitudeLatitude"
,
JSON
.
parseObject
(
useInfoByRecord
.
getLongitudeLatitude
()));
}
}
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
resultDataMap
.
put
(
"equCode"
,
registerInfo
.
getEquCode
());
}
resultDataMap
.
put
(
"receiveOrgCode"
,
transferById
.
getReceiveOrgCode
()+
"_"
+
transferById
.
getReceiveOrgName
());
}
if
(!
resultDataMap
.
isEmpty
())
{
pageDataMap
.
put
(
TABLE_PAGE_ID
,
resultDataMap
);
}
return
pageDataMap
;
}
/**
* 分页查询
*
* @param page
* @param params
* @return
*/
public
Page
<
JgChangeRegistrationTransferDto
>
queryForJgChangeRegistrationTransferPage
(
Page
<
JgChangeRegistrationTransferDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
public
Page
<
Map
<
String
,
Object
>>
queryListForPage
(
Page
<
Map
<
String
,
Object
>>
page
,
JgChangeRegistrationTransferDto
params
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
params
,
params
.
getRoleIds
());
return
listPage
;
}
//启动流程
public
String
startByVariable
()
{
String
instanceId
=
""
;
//启动流程
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"submit"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
instanceId
;
}
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
""
;
String
taskCode
=
"已完成"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgChangeRegistrationTransfer
jgChangeRegistrationTransfer
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleList
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
"已完成"
.
equals
(
taskCode
))
{
role
=
String
.
join
(
","
,
roleList
);
jgChangeRegistrationTransfer
.
setNextExecutorIds
(
role
);
jgChangeRegistrationTransfer
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationTransfer
.
setInstanceId
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationTransfer
.
getExecuteSequence
()))
{
jgChangeRegistrationTransfer
.
setExecuteSequence
(
jgChangeRegistrationTransfer
.
getExecuteSequence
()
+
","
+
role
);
}
else
{
jgChangeRegistrationTransfer
.
setExecuteSequence
(
role
);
}
if
(
"0"
.
equals
(
operate
))
{
// 通过操作
jgChangeRegistrationTransfer
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
}
else
{
// 驳回操作
jgChangeRegistrationTransfer
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationTransfer
.
setPromoter
(
""
);
}
}
else
{
jgChangeRegistrationTransfer
.
setStatus
(
taskCode
);
//流程执行完成后,更新设备使用信息
this
.
updateByFlowEnd
(
sequenceNbr
.
toString
());
}
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationTransfer
);
}
/**
* 流程结束后需要更新的数据
*
* @param sequenceNbr 移装变更单Id
*/
public
void
updateByFlowEnd
(
String
sequenceNbr
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgChangeRegistrationTransferEq
transferEq
=
jgChangeRegistrationTransferEqService
.
getDetailByEquipTransferId
(
sequenceNbr
);
if
(!
ValidationUtil
.
isEmpty
(
transferEq
))
{
JgChangeRegistrationTransfer
updateData
=
new
JgChangeRegistrationTransfer
();
updateData
.
setSequenceNbr
(
Long
.
valueOf
(
transferEq
.
getEquipTransferId
()));
//audit_pass_date 终审通过时间
updateData
.
setAuditPassDate
(
new
Date
());
//reg_person_id 注册登记人员ID
updateData
.
setRegPersonId
(
reginParams
.
getUserModel
().
getUserId
());
//reg_person_name 注册登记人员
updateData
.
setRegPersonName
(
reginParams
.
getUserModel
().
getUserName
());
//补充移装变更表
this
.
updateTransferByBaseInfo
(
updateData
);
//替换历史数据表
this
.
replacementHistoryData
(
transferEq
.
getEquId
(),
sequenceNbr
);
//修改告知书状态,置为废弃
this
.
updataInvalidStatusByHistory
(
transferEq
.
getEquId
(),
transferEq
.
getEquipTransferId
());
//更新使用注册登记证编号及ES中的信息
this
.
updataRegisterInfoAndEsData
(
transferEq
.
getEquId
());
}
}
/**
* 列表查询 示例
* 替换历史数据表
*
* @param record 设备Id
* @param sequenceNbr 当前单据Id
*/
public
List
<
JgChangeRegistrationTransferDto
>
queryForJgChangeRegistrationTransferList
()
{
return
this
.
queryForList
(
""
,
false
);
public
void
replacementHistoryData
(
String
record
,
String
sequenceNbr
)
{
//查询修改后的新数据
JgRegistrationHistory
newData
=
jgRegistrationHistoryService
.
getDteailByRecord
(
record
,
sequenceNbr
);
//查询设备旧数据
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOneData
(
record
);
// 更新设备移装位置使用信息
if
(!
ValidationUtil
.
isEmpty
(
newData
))
{
JSONObject
newPosition
=
JSON
.
parseObject
(
newData
.
getChangeData
());
String
province
=
newPosition
.
getString
(
"province"
);
String
city
=
newPosition
.
getString
(
"city"
);
String
county
=
newPosition
.
getString
(
"county"
);
String
street
=
newPosition
.
getString
(
"street"
);
String
address
=
newPosition
.
getString
(
"address"
);
String
longitudeLatitude
=
newPosition
.
getString
(
"longitudeLatitude"
);
// 分割省市区街道字段
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
useInfo
.
setProvince
(
provinceList
[
0
]);
useInfo
.
setProvinceName
(
provinceList
[
1
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
useInfo
.
setCity
(
cityList
[
0
]);
useInfo
.
setCityName
(
cityList
[
1
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
useInfo
.
setCounty
(
countyList
[
0
]);
useInfo
.
setCountyName
(
countyList
[
1
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
street
))
{
String
[]
streetList
=
street
.
split
(
"_"
);
if
(
streetList
.
length
>
1
)
{
useInfo
.
setFactoryUseSiteStreet
(
streetList
[
0
]);
useInfo
.
setStreetName
(
streetList
[
1
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
useInfo
.
setAddress
(
address
);
}
if
(!
ObjectUtils
.
isEmpty
(
longitudeLatitude
))
{
useInfo
.
setLongitudeLatitude
(
longitudeLatitude
);
}
useInfoService
.
saveOrUpdateData
(
useInfo
);
}
}
/**
* 修改告知书状态,置为废弃
*
* @param equId 设备id
* @param equipTransferId 当前告知单Id
*/
public
void
updataInvalidStatusByHistory
(
String
equId
,
String
equipTransferId
)
{
jgChangeRegistrationReformEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equId
,
equipTransferId
);
jgChangeRegistrationTransferEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equId
,
equipTransferId
);
jgUseRegistrationEqMapper
.
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
equId
,
equipTransferId
);
}
/**
* 更新使用注册登记证编号及ES中的信息
*
* @param equId 设备id
*/
public
void
updataRegisterInfoAndEsData
(
String
equId
)
{
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
idxBizJgOtherInfoMapper
.
getSupervisoryCodeByEquipmentCode
(
equId
));
String
newUseRegistrationCertificateNumber
=
responseModel
.
getResult
().
split
(
"-"
)[
0
];
//更新使用注册登记证编号
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equId
,
newUseRegistrationCertificateNumber
);
//es中的编号信息
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"USE_ORG_CODE"
,
newUseRegistrationCertificateNumber
);
resultMap
.
put
(
equId
,
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
}
//更新移装变更基本信息
public
void
updateTransferByBaseInfo
(
JgChangeRegistrationTransfer
model
)
{
this
.
saveOrUpdate
(
model
);
}
}
\ No newline at end of file
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/JgRegistrationHistoryServiceImpl.java
View file @
b95ef913
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService
;
...
...
@@ -30,4 +32,32 @@ public class JgRegistrationHistoryServiceImpl extends BaseService<JgRegistration
public
List
<
JgRegistrationHistoryDto
>
queryForJgRegistrationHistoryList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 新增或移装变更历史数据
* @param history
*/
public
boolean
saveOrUpdateHistoryData
(
JgRegistrationHistory
history
)
{
return
this
.
saveOrUpdate
(
history
);
}
/**
* 根据指定参数查询历史数据详情
* @param currentDocumentId
* @return
*/
public
JgRegistrationHistory
getDteailByRecord
(
String
record
,
String
currentDocumentId
)
{
return
this
.
getOne
(
new
QueryWrapper
<
JgRegistrationHistory
>().
eq
(
"equ_id"
,
record
).
eq
(
"current_document_id"
,
currentDocumentId
));
}
/**
* 修改历史数据
* @param history
* @param historyWapper
* @return
*/
public
boolean
updateDate
(
JgRegistrationHistory
history
,
LambdaQueryWrapper
<
JgRegistrationHistory
>
historyWapper
)
{
return
this
.
update
(
history
,
historyWapper
);
}
}
\ 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/entity/IdxBizJgUseInfo.java
View file @
b95ef913
...
...
@@ -221,4 +221,6 @@ public class IdxBizJgUseInfo extends TzsBaseEntity {
@TableField
(
"\"IS_NOT_XIXIAN\""
)
private
String
isNotXiXian
;
@TableField
(
"\"STREET_NAME\""
)
private
String
streetName
;
}
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