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
907989c4
Commit
907989c4
authored
Sep 19, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改造变更登记开发
parent
5116dbb5
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
401 additions
and
167 deletions
+401
-167
JgChangeRegistrationReformDto.java
...boot/module/jg/api/dto/JgChangeRegistrationReformDto.java
+10
-0
JgChangeRegistrationReform.java
...boot/module/jg/api/entity/JgChangeRegistrationReform.java
+18
-0
JgChangeRegistrationReformMapper.xml
...ain/resources/mapper/JgChangeRegistrationReformMapper.xml
+1
-0
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+162
-151
IIdxBizJgTechParamsBoilerService.java
...dule/jg/biz/service/IIdxBizJgTechParamsBoilerService.java
+2
-1
IIdxBizJgTechParamsElevatorService.java
...le/jg/biz/service/IIdxBizJgTechParamsElevatorService.java
+2
-1
IIdxBizJgTechParamsLiftingService.java
...ule/jg/biz/service/IIdxBizJgTechParamsLiftingService.java
+2
-1
IIdxBizJgTechParamsPipelineService.java
...le/jg/biz/service/IIdxBizJgTechParamsPipelineService.java
+2
-1
IIdxBizJgTechParamsRidesService.java
...odule/jg/biz/service/IIdxBizJgTechParamsRidesService.java
+2
-1
IIdxBizJgTechParamsRopewayService.java
...ule/jg/biz/service/IIdxBizJgTechParamsRopewayService.java
+2
-1
IIdxBizJgTechParamsVehicleService.java
...ule/jg/biz/service/IIdxBizJgTechParamsVehicleService.java
+2
-1
IIdxBizJgTechParamsVesselService.java
...dule/jg/biz/service/IIdxBizJgTechParamsVesselService.java
+2
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+1
-1
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+183
-6
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+1
-1
EquipmentClassifityEnum.java
...os/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
+9
-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 @
907989c4
...
...
@@ -157,4 +157,14 @@ public class JgChangeRegistrationReformDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
equAddress
;
@ApiModelProperty
(
value
=
"作废原因"
)
private
String
cancelReason
;
@ApiModelProperty
(
value
=
"作废日期"
)
private
Date
cancelDate
;
@ApiModelProperty
(
value
=
"作废人员id"
)
private
String
cancelUserId
;
}
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 @
907989c4
...
...
@@ -259,4 +259,22 @@ public class JgChangeRegistrationReform extends BaseEntity {
*/
@TableField
(
"receive_company_org_code"
)
private
String
receiveCompanyOrgCode
;
/**
* 作废原因
*/
@TableField
(
"cancel_reason"
)
private
String
cancelReason
;
/**
* 作废日期
*/
@TableField
(
"cancel_date"
)
private
Date
cancelDate
;
/**
* 作废人员id
*/
@TableField
(
"cancel_user_id"
)
private
String
cancelUserId
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationReformMapper.xml
View file @
907989c4
...
...
@@ -33,6 +33,7 @@
ur.next_task_id as nextTaskId,
ur.create_user_id as createUserId,
oi.CODE96333 as code96333,
ur.cancel_reason as cancelReason,
(SELECT name from tz_equipment_category ec WHERE ec.code = jri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = jri.EQU_DEFINE) AS equDefine
from tzs_jg_change_registration_reform ur
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationReformController.java
View file @
907989c4
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationReformServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -40,158 +41,168 @@ public class JgChangeRegistrationReformController extends BaseController {
/**
* 新增改造变更登记
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增改造变更登记"
,
notes
=
"新增改造变更登记"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
JSONObject
map
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
save
(
map
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
jgChangeRegistrationReformServiceImpl
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"删除"
,
notes
=
"删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
id
);
jgChangeRegistrationReformServiceImpl
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgChangeRegistrationReformDto
dto
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
reginParams
.
getCompany
().
getLevel
().
equals
(
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
COMPANY_TYPE_COMPANY
);
dto
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setDataType
(
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveOrgCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
Page
<
Map
<
String
,
Object
>>
list
=
jgChangeRegistrationReformServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
list
.
getRecords
().
forEach
(
x
->
x
.
put
(
"companyType"
,
reginParams
.
getCompany
().
getCompanyType
()));
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"currentDocumentId"
)
String
currentDocumentId
,
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getDetail
(
currentDocumentId
,
equipId
));
}
/**
* 改造登记-导出使用登记证
*
* @param response 返回
* @param sequenceNbr 主键
* @param printType 打印类型,0-正常打印,1-套打(默认0)
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增改造变更登记"
,
notes
=
"新增改造变更登记"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
JSONObject
map
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
save
(
map
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
jgChangeRegistrationReformServiceImpl
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"删除"
,
notes
=
"删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
id
);
jgChangeRegistrationReformServiceImpl
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgChangeRegistrationReformDto
dto
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
reginParams
.
getCompany
().
getLevel
().
equals
(
COMPANY_TYPE_COMPANY
)){
dto
.
setDataType
(
COMPANY_TYPE_COMPANY
);
dto
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setDataType
(
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveOrgCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
Page
<
Map
<
String
,
Object
>>
list
=
jgChangeRegistrationReformServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
list
.
getRecords
().
forEach
(
x
->
x
.
put
(
"companyType"
,
reginParams
.
getCompany
().
getCompanyType
()));
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"currentDocumentId"
)
String
currentDocumentId
,
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getDetail
(
currentDocumentId
,
equipId
));
}
/**
* 改造登记-导出使用登记证
* @param response 返回
* @param sequenceNbr 主键
* @param printType 打印类型,0-正常打印,1-套打(默认0)
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造登记-导出使用登记证"
,
notes
=
"改造登记-导出使用登记证"
)
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
value
=
"printType"
,
defaultValue
=
"0"
)
String
printType
){
jgChangeRegistrationReformServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEquDetail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据使用登记证查询设备详情(前端组件默认传参record)"
,
notes
=
"根据使用登记证查询设备详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getEquDetail
(
@RequestParam
String
record
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getEquDetail
(
record
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUseRegistrationCodeData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前企业,某接收机构审批的使用登记证信息"
,
notes
=
"获取当前企业,某接收机构审批的使用登记证信息"
)
public
ResponseModel
<
Page
<
JgUseRegistrationManageDto
>>
getUseRegistrationCodeData
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"EQU_LIST_CODE"
,
required
=
false
)
String
EQU_LIST_CODE
,
@RequestParam
(
value
=
"EQU_CATEGORY_CODE"
,
required
=
false
)
String
EQU_CATEGORY_CODE
,
@RequestParam
(
value
=
"equList"
,
required
=
false
)
String
equList
,
@RequestParam
(
value
=
"receiveCompanyCode"
,
required
=
false
)
String
receiveCompanyCode
,
@RequestParam
(
value
=
"transferType"
,
required
=
false
)
String
transferType
,
@RequestParam
(
value
=
"useRegistrationCode"
,
required
=
false
)
String
useRegistrationCode
,
@RequestParam
(
value
=
"transferCity"
,
required
=
false
)
String
transferCity
)
{
JgUseRegistrationManageDto
dto
=
new
JgUseRegistrationManageDto
();
Page
<
JgUseRegistrationManageDto
>
page
=
new
Page
<
JgUseRegistrationManageDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
info
=
getSelectedOrgInfo
();
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
info
.
getCompany
().
getCompanyType
())
?
info
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
info
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
}
// 新增时使用EQU_LIST_CODE,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
EQU_LIST_CODE
)){
dto
.
setEquListCode
(
EQU_LIST_CODE
);
}
// 流程页面使用equList,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
equList
)){
dto
.
setEquListCode
(
equList
);
}
// 流程页面使用登记证号筛选,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
useRegistrationCode
)){
dto
.
setUseRegistrationCode
(
useRegistrationCode
);
}
// 流程页面使用equList,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
EQU_CATEGORY_CODE
)){
dto
.
setEquCategoryCode
(
EQU_CATEGORY_CODE
);
}
if
(!
ValidationUtil
.
isEmpty
(
receiveCompanyCode
)){
String
[]
codes
=
receiveCompanyCode
.
split
(
"_"
);
if
(!
ValidationUtil
.
isEmpty
(
codes
)){
dto
.
setReceiveCompanyCode
(
codes
[
0
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
transferCity
))
{
String
[]
cityList
=
transferCity
.
split
(
"_"
);
if
(
cityList
.
length
>
1
&&
"0"
.
equals
(
transferType
))
{
dto
.
setCityName
(
cityList
[
1
]);
}
}
dto
.
setCertificateStatus
(
"1"
.
equals
(
transferType
)
?
"已注销"
:
"已登记"
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getUseRegistrationCodeData
(
page
,
dto
));
}
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造登记-导出使用登记证"
,
notes
=
"改造登记-导出使用登记证"
)
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
value
=
"printType"
,
defaultValue
=
"0"
)
String
printType
)
{
jgChangeRegistrationReformServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEquDetail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据使用登记证查询设备详情(前端组件默认传参record)"
,
notes
=
"根据使用登记证查询设备详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getEquDetail
(
@RequestParam
String
record
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getEquDetail
(
record
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUseRegistrationCodeData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前企业,某接收机构审批的使用登记证信息"
,
notes
=
"获取当前企业,某接收机构审批的使用登记证信息"
)
public
ResponseModel
<
Page
<
JgUseRegistrationManageDto
>>
getUseRegistrationCodeData
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"EQU_LIST_CODE"
,
required
=
false
)
String
EQU_LIST_CODE
,
@RequestParam
(
value
=
"EQU_CATEGORY_CODE"
,
required
=
false
)
String
EQU_CATEGORY_CODE
,
@RequestParam
(
value
=
"equList"
,
required
=
false
)
String
equList
,
@RequestParam
(
value
=
"receiveCompanyCode"
,
required
=
false
)
String
receiveCompanyCode
,
@RequestParam
(
value
=
"transferType"
,
required
=
false
)
String
transferType
,
@RequestParam
(
value
=
"useRegistrationCode"
,
required
=
false
)
String
useRegistrationCode
,
@RequestParam
(
value
=
"transferCity"
,
required
=
false
)
String
transferCity
)
{
JgUseRegistrationManageDto
dto
=
new
JgUseRegistrationManageDto
();
Page
<
JgUseRegistrationManageDto
>
page
=
new
Page
<
JgUseRegistrationManageDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
info
=
getSelectedOrgInfo
();
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
info
.
getCompany
().
getCompanyType
())
?
info
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
info
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
}
// 新增时使用EQU_LIST_CODE,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
EQU_LIST_CODE
))
{
dto
.
setEquListCode
(
EQU_LIST_CODE
);
}
// 流程页面使用equList,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
equList
))
{
dto
.
setEquListCode
(
equList
);
}
// 流程页面使用登记证号筛选,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
useRegistrationCode
))
{
dto
.
setUseRegistrationCode
(
useRegistrationCode
);
}
// 流程页面使用equList,适配组件,适配原有表单
if
(!
ObjectUtils
.
isEmpty
(
EQU_CATEGORY_CODE
))
{
dto
.
setEquCategoryCode
(
EQU_CATEGORY_CODE
);
}
if
(!
ValidationUtil
.
isEmpty
(
receiveCompanyCode
))
{
String
[]
codes
=
receiveCompanyCode
.
split
(
"_"
);
if
(!
ValidationUtil
.
isEmpty
(
codes
))
{
dto
.
setReceiveCompanyCode
(
codes
[
0
]);
}
}
if
(!
ObjectUtils
.
isEmpty
(
transferCity
))
{
String
[]
cityList
=
transferCity
.
split
(
"_"
);
if
(
cityList
.
length
>
1
&&
"0"
.
equals
(
transferType
))
{
dto
.
setCityName
(
cityList
[
1
]);
}
}
dto
.
setCertificateStatus
(
"1"
.
equals
(
transferType
)
?
"已注销"
:
"已登记"
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getUseRegistrationCodeData
(
page
,
dto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"改造变更登记作废"
,
notes
=
"改造变更登记作废"
)
@PutMapping
(
value
=
"/cancel/application"
)
public
ResponseModel
<
JgChangeRegistrationReform
>
cancelApplication
(
@RequestBody
JgChangeRegistrationReformDto
registrationReformDto
)
{
JgChangeRegistrationReform
result
=
jgChangeRegistrationReformServiceImpl
.
cancelApplication
(
registrationReformDto
.
getSequenceNbr
(),
registrationReformDto
.
getCancelReason
());
return
ResponseHelper
.
buildResponse
(
result
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsBoilerService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsBoilerService
{
public
interface
IIdxBizJgTechParamsBoilerService
extends
IService
<
IdxBizJgTechParamsBoiler
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsBoiler
boiler
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsElevatorService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsElevatorService
{
public
interface
IIdxBizJgTechParamsElevatorService
extends
IService
<
IdxBizJgTechParamsElevator
>
{
boolean
saveOrUpdateData
(
IdxBizJgTechParamsElevator
techParamsElevator
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsLiftingService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsLiftingService
{
public
interface
IIdxBizJgTechParamsLiftingService
extends
IService
<
IdxBizJgTechParamsLifting
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsLifting
lifting
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsPipelineService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsPipelineService
{
public
interface
IIdxBizJgTechParamsPipelineService
extends
IService
<
IdxBizJgTechParamsPipeline
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsPipeline
pipeline
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsRidesService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsRidesService
{
public
interface
IIdxBizJgTechParamsRidesService
extends
IService
<
IdxBizJgTechParamsRides
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsRides
rides
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsRopewayService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsRopewayService
{
public
interface
IIdxBizJgTechParamsRopewayService
extends
IService
<
IdxBizJgTechParamsRopeway
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsRopeway
ropeway
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsVehicleService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsVehicleService
{
public
interface
IIdxBizJgTechParamsVehicleService
extends
IService
<
IdxBizJgTechParamsVehicle
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsVehicle
vehicle
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgTechParamsVesselService.java
View file @
907989c4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel
;
/**
...
...
@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgTechParamsVesselService
{
public
interface
IIdxBizJgTechParamsVesselService
extends
IService
<
IdxBizJgTechParamsVessel
>
{
void
saveOrUpdateData
(
IdxBizJgTechParamsVessel
vessel
);
...
...
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 @
907989c4
...
...
@@ -1135,7 +1135,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
* @param fieldType 返回字段类型【CamelCase:驼峰命名,“”:纯大写加下划线】
* @return
*/
p
rivate
Map
<
String
,
Object
>
getEquipParamsMap
(
String
record
,
String
fieldType
,
String
equipCode
)
{
p
ublic
Map
<
String
,
Object
>
getEquipParamsMap
(
String
record
,
String
fieldType
,
String
equipCode
)
{
Map
<
String
,
Object
>
objMap
=
new
HashMap
<>();
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equipCode
))
{
...
...
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 @
907989c4
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -17,7 +18,6 @@ import com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationReformService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
...
...
@@ -37,7 +37,9 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -66,6 +68,7 @@ import static java.util.stream.Collectors.toList;
* @date 2023-12-20
*/
@Service
@Slf4j
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
...
...
@@ -129,8 +132,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
@Autowired
private
RedissonClient
redissonClient
;
@Autowired
private
IJgChangeRegistrationTransferService
jgChangeRegistrationTransferService
;
@Autowired
private
IdxBizJgRegisterInfoServiceImpl
jgRegisterInfoService
;
...
...
@@ -144,6 +145,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
@Autowired
private
JgCertificateChangeRecordEqServiceImpl
jgCertificateChangeRecordEqService
;
@Autowired
private
Sequence
sequence
;
/***
* @deprecated 根据查询调教获取分页对象
* @param dto 查询的dto对象
...
...
@@ -153,8 +157,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
*/
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgChangeRegistrationReformDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
RequestContext
.
getExeUserId
());
return
listPage
;
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
RequestContext
.
getExeUserId
());
}
private
void
rollBackForDelRedisData
()
{
...
...
@@ -186,6 +189,16 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
}
private
void
clearDataForCheckEquipRepeatUsed2
(
JgChangeRegistrationReform
data
)
{
LambdaQueryWrapper
<
JgChangeRegistrationReformEq
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
lambda
();
lambda
.
eq
(
JgChangeRegistrationReformEq:
:
getEquipTransferId
,
data
.
getSequenceNbr
());
lambda
.
select
(
JgChangeRegistrationReformEq:
:
getEquId
);
List
<
JgChangeRegistrationReformEq
>
eqList
=
jgChangeRegistrationReformEqMapper
.
selectList
(
lambda
);
List
<
String
>
records
=
eqList
.
stream
().
map
(
JgChangeRegistrationReformEq:
:
getEquId
).
collect
(
toList
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
BUSINESS_TYPE_KEY
).
delDataForCheckEquipRepeatUsed
(
records
,
data
.
getUseUnitCreditCode
());
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
save
(
JSONObject
map
)
{
...
...
@@ -260,6 +273,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
map
));
//设备监管码
jgRegistrationHistory
.
setSupervisoryCode
(
supervisoryCode
);
// 原始的技术参数,在作废时,需要用来恢复之前的数据使用
jgRegistrationHistory
.
setOldData
(
JSONObject
.
toJSONString
(
idxBizJgRegisterInfoService
.
getEquipParamsMap
(
equipId
,
""
,
getEquListCode
(
jgRegistrationHistory
))));
//数据状态
jgChangeRegistrationReform
.
setUseRegistrationCode
(
jgRegistrationHistory
.
getUseRegistrationCode
());
String
equipListName
=
Optional
.
ofNullable
(
map
.
get
(
"equListDesc"
)).
orElse
(
"无"
).
toString
();
...
...
@@ -322,7 +337,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
return
this
.
getBaseMapper
().
getDetailById
(
jgChangeRegistrationReform
.
getSequenceNbr
());
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
e
;
...
...
@@ -496,6 +511,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
.
build
();
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
...
...
@@ -1156,4 +1172,164 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
JgUseRegistrationManageDto
dto
)
{
return
jgUseRegistrationManageService
.
queryForJgUseRegistrationManagePage
(
page
,
dto
,
null
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
JgChangeRegistrationReform
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
// 1.更新为已作废
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getById
(
sequenceNbr
);
String
oldStatus
=
jgChangeRegistrationReform
.
getAuditStatus
();
jgChangeRegistrationReform
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()));
jgChangeRegistrationReform
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()));
jgChangeRegistrationReform
.
setCancelReason
(
cancelReason
);
jgChangeRegistrationReform
.
setCancelDate
(
new
Date
());
jgChangeRegistrationReform
.
setCancelUserId
(
RequestContext
.
getExeUserId
());
jgChangeRegistrationReform
.
setNextExecuteUserIds
(
null
);
jgChangeRegistrationReform
.
setPromoter
(
null
);
this
.
updateById
(
jgChangeRegistrationReform
);
// 2.更新关联的业务
this
.
processElseDataByStatus
(
oldStatus
,
jgChangeRegistrationReform
);
return
jgChangeRegistrationReform
;
}
private
void
processElseDataByStatus
(
String
oldStatus
,
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
switch
(
oldStatus
)
{
case
"使用单位待提交"
:
// do no thing
break
;
case
"已完成"
:
// 1.技术参数恢复原数据
this
.
restoreTechParams
(
jgChangeRegistrationReform
);
break
;
default
:
// 流程中(驳回、撤回等)
// 1.待办任务更新为已完成
this
.
finishedTask
(
jgChangeRegistrationReform
);
// 2.终止流程
iCmWorkflowService
.
stopProcess
(
jgChangeRegistrationReform
.
getInstanceId
(),
jgChangeRegistrationReform
.
getCancelReason
());
// 3.清空redis(缓存的流程中的设备)
this
.
clearDataForCheckEquipRepeatUsed2
(
jgChangeRegistrationReform
);
}
}
private
void
finishedTask
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
HashMap
<
String
,
Object
>
taskMap
=
new
HashMap
<>();
taskMap
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskMap
.
put
(
"flowStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskMap
.
put
(
"relationId"
,
jgChangeRegistrationReform
.
getInstanceId
());
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
jgChangeRegistrationReform
.
setOtherAccessories
(
null
);
BeanUtils
.
copyProperties
(
jgChangeRegistrationReform
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
commonServiceImpl
.
updateTaskModel
(
taskMap
);
}
private
void
restoreTechParams
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgChangeRegistrationReform
.
getApplyNo
()));
if
(
jgRegistrationHistory
==
null
)
{
return
;
}
String
record
=
jgRegistrationHistory
.
getEquId
();
String
equList
=
getEquListCode
(
jgRegistrationHistory
);
String
oldTechInfo
=
jgRegistrationHistory
.
getOldData
();
//将历史数据更新到技术参数表中
EquipmentClassifityEnum
anEnum
=
EquipmentClassifityEnum
.
getOne
(
equList
);
assert
anEnum
!=
null
;
if
(
StringUtils
.
isEmpty
(
oldTechInfo
)
||
anEnum
==
null
)
{
log
.
warn
(
"技术参数为空,无法进行回滚技术参数,单据编号:{}"
,
jgChangeRegistrationReform
.
getApplyNo
());
return
;
}
switch
(
anEnum
)
{
//电梯
case
DT:
IdxBizJgTechParamsElevator
elevator
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsElevator
.
class
);
// 删除
iIdxBizJgTechParamsElevatorService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
IdxBizJgTechParamsElevator:
:
getRecord
,
record
));
// 新插入
elevator
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsElevatorService
.
save
(
elevator
);
break
;
// 厂车
case
CC:
IdxBizJgTechParamsVehicle
vehicle
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsVehicle
.
class
);
// 删除
iIdxBizJgTechParamsVehicleService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsVehicle
>().
eq
(
IdxBizJgTechParamsVehicle:
:
getRecord
,
record
));
// 插入
vehicle
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsVehicleService
.
save
(
vehicle
);
break
;
// 索道
case
KYSD:
IdxBizJgTechParamsRopeway
ropeway
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsRopeway
.
class
);
// 删除
iIdxBizJgTechParamsRopewayService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsRopeway
>().
eq
(
IdxBizJgTechParamsRopeway:
:
getRecord
,
record
));
// 插入
ropeway
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsRopewayService
.
save
(
ropeway
);
break
;
// 游乐设施
case
YLSS:
IdxBizJgTechParamsRides
rides
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsRides
.
class
);
// 删除
iIdxBizJgTechParamsRidesService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsRides
>().
eq
(
IdxBizJgTechParamsRides:
:
getRecord
,
record
));
// 插入
rides
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsRidesService
.
save
(
rides
);
break
;
// 锅炉
case
GL:
IdxBizJgTechParamsBoiler
boiler
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsBoiler
.
class
);
// 删除
iIdxBizJgTechParamsBoilerService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsBoiler
>().
eq
(
IdxBizJgTechParamsBoiler:
:
getRecord
,
record
));
// 插入
boiler
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsBoilerService
.
save
(
boiler
);
break
;
// 压力容器
case
YLRQ:
IdxBizJgTechParamsVessel
vessel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsVessel
.
class
);
// 删除
iIdxBizJgTechParamsVesselService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsVessel
>().
eq
(
IdxBizJgTechParamsVessel:
:
getRecord
,
record
));
// 插入
vessel
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsVesselService
.
save
(
vessel
);
break
;
// 压力管道
case
YLGD:
IdxBizJgTechParamsPipeline
pipeline
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsPipeline
.
class
);
// 删除
iIdxBizJgTechParamsPipelineService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsPipeline
>().
eq
(
IdxBizJgTechParamsPipeline:
:
getRecord
,
record
));
// 插入
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
break
;
// 起重机械
case
QZJX:
IdxBizJgTechParamsLifting
lifting
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
oldTechInfo
),
IdxBizJgTechParamsLifting
.
class
);
// 删除
iIdxBizJgTechParamsLiftingService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsLifting
>().
eq
(
IdxBizJgTechParamsLifting:
:
getRecord
,
record
));
// 插入
lifting
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsLiftingService
.
save
(
lifting
);
break
;
default
:
log
.
warn
(
"un support type of {}"
,
equList
);
}
}
private
String
getEquListCode
(
JgRegistrationHistory
jgRegistrationHistory
)
{
String
record
=
jgRegistrationHistory
.
getEquId
();
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
jgRegisterInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
));
return
idxBizJgRegisterInfo
.
getEquList
();
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
907989c4
...
...
@@ -190,7 +190,7 @@ public class JyjcInspectionResultController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验类型-按照身份查询"
,
notes
=
"
\"
检验类型-按照身份查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验类型-按照身份查询"
,
notes
=
"检验类型-按照身份查询"
)
@GetMapping
(
value
=
"/inspectType/list"
)
public
ResponseModel
<
List
<
DictionarieModel
>>
inspectTypeListByPerson
(){
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
inspectTypeListByPerson
(
getSelectedOrgInfo
()));
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
View file @
907989c4
...
...
@@ -49,4 +49,13 @@ public enum EquipmentClassifityEnum {
}
return
""
;
}
public
static
EquipmentClassifityEnum
getOne
(
String
code
){
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
if
(
value
.
getCode
().
equals
(
code
)){
return
value
;
}
}
return
null
;
}
}
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