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
a3e7c243
Commit
a3e7c243
authored
Dec 22, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
e6c00c7e
292078e0
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
1404 additions
and
781 deletions
+1404
-781
JgChangeRegistrationReformDto.java
...boot/module/jg/api/dto/JgChangeRegistrationReformDto.java
+1
-1
JgEquipTransferDto.java
...ejoin/amos/boot/module/jg/api/dto/JgEquipTransferDto.java
+21
-0
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+7
-0
JgMaintainNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgMaintainNoticeDto.java
+20
-0
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+8
-0
JgChangeRegistrationReform.java
...boot/module/jg/api/entity/JgChangeRegistrationReform.java
+13
-0
JgEquipTransfer.java
...ejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
+21
-0
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+8
-0
JgMaintainNotice.java
...join/amos/boot/module/jg/api/entity/JgMaintainNotice.java
+20
-0
JgReformNotice.java
...eejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
+11
-0
MaintainTypeEnum.java
...ejoin/amos/boot/module/jg/api/enums/MaintainTypeEnum.java
+0
-37
UseStatusEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
+8
-8
WorkFlowStatusEnum.java
...oin/amos/boot/module/jg/api/enums/WorkFlowStatusEnum.java
+67
-0
IJgEquipTransferService.java
...s/boot/module/jg/api/service/IJgEquipTransferService.java
+1
-1
WorkFlowFeignService.java
...os/boot/module/jg/flc/api/fegin/WorkFlowFeignService.java
+0
-5
JgEquipTransferMapper.xml
...g-api/src/main/resources/mapper/JgEquipTransferMapper.xml
+48
-8
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+15
-11
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+74
-64
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+20
-10
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+5
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+14
-5
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+3
-3
JgEquipTransferByWorkFlowController.java
...g/biz/controller/JgEquipTransferByWorkFlowController.java
+4
-13
JgEquipTransferController.java
...t/module/jg/biz/controller/JgEquipTransferController.java
+39
-14
JgInstallationByWorkFlowController.java
...jg/biz/controller/JgInstallationByWorkFlowController.java
+2
-0
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+1
-1
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+3
-1
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+222
-115
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+7
-18
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+34
-13
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+176
-112
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+200
-144
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+3
-106
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+160
-66
JyjcInspectionApplicationMapper.java
...dule/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
+2
-0
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+3
-0
JyjcOpeningApplicationRequstDto.java
...odule/jyjc/api/model/JyjcOpeningApplicationRequstDto.java
+2
-2
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+7
-2
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+2
-2
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+3
-0
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+22
-5
TzsServiceFeignClient.java
...mos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
+65
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+14
-8
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+46
-3
IdxBizJgRegisterInfoMapper.java
...oot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
+1
-1
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 @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -110,7 +111,6 @@ public class JgChangeRegistrationReformDto extends BaseDto {
...
@@ -110,7 +111,6 @@ public class JgChangeRegistrationReformDto extends BaseDto {
@ApiModelProperty
(
value
=
"任务发起人id"
)
@ApiModelProperty
(
value
=
"任务发起人id"
)
private
String
promoter
;
private
String
promoter
;
private
List
<
String
>
roleIds
;
private
List
<
String
>
roleIds
;
private
String
dataType
;
private
String
dataType
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgEquipTransferDto.java
View file @
a3e7c243
...
@@ -89,4 +89,25 @@ public class JgEquipTransferDto extends BaseDto {
...
@@ -89,4 +89,25 @@ public class JgEquipTransferDto extends BaseDto {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备品种"
)
private
String
equDefine
;
@ApiModelProperty
(
value
=
"设备出厂编号"
)
private
String
factoryNum
;
@ApiModelProperty
(
value
=
"设备注册代码"
)
private
String
equRegisterCode
;
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"单位内编号"
)
private
String
useInnerCode
;
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
concatenatedAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
View file @
a3e7c243
...
@@ -236,4 +236,11 @@ public class JgInstallationNoticeDto extends BaseDto {
...
@@ -236,4 +236,11 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
instanceStatus
;
private
String
instanceStatus
;
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
equAddress
;
@ApiModelProperty
(
value
=
"办理日期"
)
private
Date
handleDate
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgMaintainNoticeDto.java
View file @
a3e7c243
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -31,6 +33,7 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -31,6 +33,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"告知日期"
)
@ApiModelProperty
(
value
=
"告知日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
noticeDate
;
private
Date
noticeDate
;
@ApiModelProperty
(
value
=
"告知状态"
)
@ApiModelProperty
(
value
=
"告知状态"
)
...
@@ -58,6 +61,8 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -58,6 +61,8 @@ public class JgMaintainNoticeDto extends BaseDto {
private
String
executeSequence
;
private
String
executeSequence
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
createDate
;
private
Date
createDate
;
@ApiModelProperty
(
value
=
"创建人id "
)
@ApiModelProperty
(
value
=
"创建人id "
)
...
@@ -74,6 +79,7 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -74,6 +79,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"受理完成日期"
)
@ApiModelProperty
(
value
=
"受理完成日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
acceptDate
;
private
Date
acceptDate
;
@ApiModelProperty
(
value
=
"施工区域-省"
)
@ApiModelProperty
(
value
=
"施工区域-省"
)
...
@@ -93,6 +99,7 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -93,6 +99,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"计划施工日期"
)
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
planDate
;
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
@@ -183,4 +190,17 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -183,4 +190,17 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"节点执行人"
)
@ApiModelProperty
(
value
=
"节点执行人"
)
private
String
promoter
;
private
String
promoter
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equListCode
;
@ApiModelProperty
(
value
=
"设备类别名称"
)
private
String
equCategory
;
private
List
<
String
>
roleIds
;
private
String
dataType
;
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
View file @
a3e7c243
...
@@ -79,6 +79,8 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -79,6 +79,8 @@ public class JgReformNoticeDto extends BaseDto {
private
String
instanceStatus
;
private
String
instanceStatus
;
@ApiModelProperty
(
value
=
"受理完成日期"
)
@ApiModelProperty
(
value
=
"受理完成日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
acceptDate
;
private
Date
acceptDate
;
@ApiModelProperty
(
value
=
"施工区域-省"
)
@ApiModelProperty
(
value
=
"施工区域-省"
)
...
@@ -153,6 +155,12 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -153,6 +155,12 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"是否西咸"
)
@ApiModelProperty
(
value
=
"是否西咸"
)
private
String
isXixian
;
private
String
isXixian
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equListCode
;
@ApiModelProperty
(
value
=
"设备类别名称"
)
private
String
equCategory
;
/* ---------------- -------------- */
/* ---------------- -------------- */
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
...
...
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 @
a3e7c243
...
@@ -202,4 +202,17 @@ public class JgChangeRegistrationReform extends BaseEntity {
...
@@ -202,4 +202,17 @@ public class JgChangeRegistrationReform extends BaseEntity {
@TableField
(
value
=
"promoter"
)
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
private
String
promoter
;
/**
* 改造质量证明材料
*/
@TableField
(
value
=
"transformation_quality_certificate"
)
private
String
transformationQualityCertificate
;
/**
*改造监督检验证书
*/
@TableField
(
value
=
"renovation_supervisioninspection_certificate"
)
private
String
renovationSupervisioninspectionCertificate
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
View file @
a3e7c243
...
@@ -142,4 +142,25 @@ public class JgEquipTransfer extends BaseEntity {
...
@@ -142,4 +142,25 @@ public class JgEquipTransfer extends BaseEntity {
@TableField
(
value
=
"instance_roles"
)
@TableField
(
value
=
"instance_roles"
)
private
String
instanceRoles
;
private
String
instanceRoles
;
@TableField
(
exist
=
false
)
private
String
equCategory
;
@TableField
(
exist
=
false
)
private
String
equDefine
;
@TableField
(
exist
=
false
)
private
String
factoryNum
;
@TableField
(
exist
=
false
)
private
String
equRegisterCode
;
@TableField
(
exist
=
false
)
private
String
supervisoryCode
;
@TableField
(
exist
=
false
)
private
String
useInnerCode
;
@TableField
(
exist
=
false
)
private
String
concatenatedAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgInstallationNotice.java
View file @
a3e7c243
...
@@ -378,4 +378,12 @@ public class JgInstallationNotice extends BaseEntity {
...
@@ -378,4 +378,12 @@ public class JgInstallationNotice extends BaseEntity {
@TableField
(
"instance_status"
)
@TableField
(
"instance_status"
)
private
String
instanceStatus
;
private
String
instanceStatus
;
@TableField
(
"equ_address"
)
private
String
equAddress
;
@TableField
(
"handle_date"
)
private
Date
handleDate
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgMaintainNotice.java
View file @
a3e7c243
...
@@ -293,4 +293,24 @@ public class JgMaintainNotice extends BaseEntity {
...
@@ -293,4 +293,24 @@ public class JgMaintainNotice extends BaseEntity {
@TableField
(
value
=
"promoter"
)
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
private
String
promoter
;
/**
* 设备类别
*/
@TableField
(
value
=
"equ_list_code"
)
private
String
equListCode
;
/**
* 设备类别名称
*/
@TableField
(
value
=
"equ_category"
)
private
String
equCategory
;
/**
* 状态
*/
@TableField
(
"status"
)
private
String
status
;
@TableField
(
"next_execute_ids"
)
private
String
nextExecuteIds
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
View file @
a3e7c243
...
@@ -298,4 +298,15 @@ public class JgReformNotice extends BaseEntity {
...
@@ -298,4 +298,15 @@ public class JgReformNotice extends BaseEntity {
*/
*/
@TableField
(
"status"
)
@TableField
(
"status"
)
private
String
status
;
private
String
status
;
/**
* 设备类别
*/
@TableField
(
value
=
"equ_list_code"
)
private
String
equListCode
;
/**
* 设备类别名称
*/
@TableField
(
value
=
"equ_category"
)
private
String
equCategory
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintainTypeEnum.java
deleted
100644 → 0
View file @
e6c00c7e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
/**
* 办理状态枚举
*/
public
enum
MaintainTypeEnum
{
GENERAL
(
1
,
"一般维修"
),
PRIORITY
(
2
,
"重点维修"
);
private
final
int
code
;
private
final
String
name
;
MaintainTypeEnum
(
int
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
String
getNameByType
(
Long
code
)
{
String
name
=
null
;
for
(
MaintainTypeEnum
enumOne
:
MaintainTypeEnum
.
values
())
{
if
(
enumOne
.
getCode
()
==
code
)
{
name
=
enumOne
.
getName
();
break
;
}
}
return
name
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
View file @
a3e7c243
...
@@ -3,9 +3,6 @@ package com.yeejoin.amos.boot.module.jg.api.enums;
...
@@ -3,9 +3,6 @@ package com.yeejoin.amos.boot.module.jg.api.enums;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 使用登记状态西悉尼
* 使用登记状态西悉尼
*/
*/
...
@@ -13,11 +10,10 @@ import java.util.Map;
...
@@ -13,11 +10,10 @@ import java.util.Map;
@AllArgsConstructor
@AllArgsConstructor
public
enum
UseStatusEnum
{
public
enum
UseStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位提交已撤回"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
);
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
,
""
,
""
);
private
final
String
name
;
private
final
String
name
;
...
@@ -26,6 +22,10 @@ public enum UseStatusEnum {
...
@@ -26,6 +22,10 @@ public enum UseStatusEnum {
private
final
String
pass
;
private
final
String
pass
;
private
final
String
reject
;
private
final
String
rollBack
;
public
static
UseStatusEnum
getMessage
(
String
name
){
public
static
UseStatusEnum
getMessage
(
String
name
){
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/WorkFlowStatusEnum.java
0 → 100644
View file @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 使用登记状态西悉尼
*/
@Getter
@AllArgsConstructor
public
enum
WorkFlowStatusEnum
{
/**
* 使用登记流程
*/
USE_SUBMIT
(
"使用单位提交"
,
"useSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位提交已撤回"
),
USE_RECEIVE
(
"一级受理"
,
"useReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
USE_PRELIMINARY
(
"二级受理"
,
"usePreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
USE_REEXAMINE
(
"三级受理"
,
"useReexamine"
,
"三级待受理"
,
""
,
""
),
/**
* 维保流程
*/
MAIN_SUBMIT
(
"使用单位提交"
,
"mainSubmit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
MAIN_RECEIVE
(
"维保单位审核确认"
,
"mainReceive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位撤回"
),
MAIN_PRELIMINARY
(
"监管单位审核"
,
"mainPreliminary"
,
"监管单位待受理"
,
""
,
""
),
/**
* 电梯注销
*/
CANCEL_SUBMIT
(
"使用单位提交"
,
"cancelSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位提交已撤回"
),
CANCEL_RECEIVE
(
"一级受理"
,
"cancelReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
CANCEL_PRELIMINARY
(
"二级受理"
,
"cancelPreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
CANCEL_REEXAMINE
(
"三级受理"
,
"cancelReexamine"
,
"三级待受理"
,
""
,
""
),
/**
* 改造登记流程
*/
CHANGE_SUBMIT
(
"使用单位提交"
,
"changeSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位提交已撤回"
),
CHANGE_RECEIVE
(
"一级受理"
,
"changeReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
CHANGE_PRELIMINARY
(
"二级受理"
,
"changePreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
CHANGE_REEXAMINE
(
"三级受理"
,
"changeReexamine"
,
"三级待受理"
,
""
,
""
);
private
final
String
name
;
private
final
String
code
;
private
final
String
pass
;
private
final
String
reject
;
private
final
String
rollBack
;
public
static
WorkFlowStatusEnum
getMessage
(
String
code
){
for
(
WorkFlowStatusEnum
constants
:
values
())
{
if
(
constants
.
getCode
().
equals
(
code
))
{
return
constants
;
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgEquipTransferService.java
View file @
a3e7c243
...
@@ -33,7 +33,7 @@ public interface IJgEquipTransferService extends IService<JgEquipTransfer> {
...
@@ -33,7 +33,7 @@ public interface IJgEquipTransferService extends IService<JgEquipTransfer> {
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return 设备移交详情
* @return 设备移交详情
*/
*/
Map
<
String
,
Map
<
String
,
Object
>
>
queryBySequenceNbr
(
Long
sequenceNbr
);
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
);
/**
/**
* 保存设备移交接口
* 保存设备移交接口
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/WorkFlowFeignService.java
View file @
a3e7c243
...
@@ -2,15 +2,10 @@ package com.yeejoin.amos.boot.module.jg.flc.api.fegin;
...
@@ -2,15 +2,10 @@ package com.yeejoin.amos.boot.module.jg.flc.api.fegin;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.VerifyCodeAuthModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
import
java.util.Map
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEquipTransferMapper.xml
View file @
a3e7c243
...
@@ -22,9 +22,49 @@
...
@@ -22,9 +22,49 @@
jet.execute_sequence AS executeSequence,
jet.execute_sequence AS executeSequence,
jet.instance_status AS instanceStatus,
jet.instance_status AS instanceStatus,
jet.accept_date AS acceptDate,
jet.accept_date AS acceptDate,
jet.task_name AS taskName
jet.task_name AS taskName,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_define AS equDefine,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum,
di.design_use_date AS designUseDate,
di.design_date AS designDate,
di.drawing_do AS drawingDo,
di.appraisal_unit AS appraisalUnit,
di.appraisal_date AS appraisalDate,
di.design_doc AS designDoc,
di.design_standard AS designStandard,
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_name AS produceUnitName,
fi.produce_license_num AS produceLicenseNum,
fi.factory_num AS factoryNum,
fi.produce_date AS produceDate,
fi.imported AS imported,
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone,
CONCAT(ui.PROVINCE_NAME,'', ui.CITY_NAME, ' ', ui.COUNTY_NAME, ' ', ui.ADDRESS, ' ', ui.street_name) AS concatenatedAddress,
ui.USE_INNER_CODE AS useInnerCode,
oi.SUPERVISORY_CODE AS supervisoryCode
FROM
FROM
tzs_jg_equip_transfer jet
tzs_jg_equip_transfer jet
LEFT JOIN tzs_jg_equip_transfer_eq ete ON ete.equip_transfer_id = jet.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ete.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = ete.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = ete.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = ete.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = ete.equ_id
LEFT JOIN idx_biz_jg_other_info oi ON oi.record = ete.equ_id
<where>
<where>
jet.is_delete = false
jet.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
@@ -67,7 +107,7 @@
...
@@ -67,7 +107,7 @@
jet.execute_sequence AS executeSequence,
jet.execute_sequence AS executeSequence,
jet.instance_status AS instanceStatus,
jet.instance_status AS instanceStatus,
jet.accept_date AS acceptDate,
jet.accept_date AS acceptDate,
jet.task_name AS taskName
jet.task_name AS taskName
,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.equ_define AS equDefine,
ri.equ_define AS equDefine,
...
@@ -104,12 +144,12 @@
...
@@ -104,12 +144,12 @@
ui.ADDRESS AS useUnitAddress
ui.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_equip_transfer jet
tzs_jg_equip_transfer jet
LEFT JOIN tzs_jg_equip_transfer_eq ete ON r
e.equip_transfer_id = jet.sequence_nbr
LEFT JOIN tzs_jg_equip_transfer_eq ete ON et
e.equip_transfer_id = jet.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ete.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ete.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = ete.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = ete.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = ete.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = ete.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = ete.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = ete.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = ete.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = ete.equ_id
WHERE
WHERE
jet.sequence_nbr = #{sequenceNbr}
jet.sequence_nbr = #{sequenceNbr}
LIMIT 1
LIMIT 1
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
a3e7c243
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
isn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
isn.region_no AS regionNo,
isn.region_no AS regionNo,
isn.install_start_date AS installStartDate,
isn.address AS address,
isn.address AS address,
isn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName,
isn.install_unit_name AS installUnitName,
...
@@ -21,6 +22,9 @@
...
@@ -21,6 +22,9 @@
isn.promoter,
isn.promoter,
isn.next_execute_ids AS nextExecuteIds,
isn.next_execute_ids AS nextExecuteIds,
isn.instance_status AS instanceStatus,
isn.instance_status AS instanceStatus,
isn.equ_address AS equAddress,
isn.handle_date AS handleDate,
isn.equ_list AS equList,
isn.notice_report_url AS noticeReportUrl
isn.notice_report_url AS noticeReportUrl
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
...
@@ -30,14 +34,14 @@
...
@@ -30,14 +34,14 @@
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
</if>
</if>
<if
test=
"param.receiveOrg
Name != null and param.receiveOrgNam
e != ''"
>
<if
test=
"param.receiveOrg
CreditCode != null and param.receiveOrgCreditCod
e != ''"
>
AND isn.receive_org_
name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
AND isn.receive_org_
credit_code = #{param.receiveOrgCreditCode}
</if>
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND isn.use_unit_
name LIKE CONCAT('%', #{param.useUnitName}, '%')
AND isn.use_unit_
credit_code = #{param.useUnitName}
</if>
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND isn.install_unit_
name LIKE CONCAT('%', #{param.installUnitName}, '%')
AND isn.install_unit_
credit_code = #{param.installUnitName}
</if>
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND isn.notice_status = #{param.noticeStatus}
AND isn.notice_status = #{param.noticeStatus}
...
@@ -45,13 +49,14 @@
...
@@ -45,13 +49,14 @@
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND isn.receive_org_credit_code = #{orgCode}
AND isn.receive_org_credit_code = #{orgCode}
AND isn.instance_id is not null
</if>
</if>
<if
test=
"type == 'enterprise'"
>
<if
test=
"type == 'enterprise'"
>
AND isn.install_unit_credit_code = #{orgCode}
AND isn.install_unit_credit_code = #{orgCode}
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
isn.
rec
_date DESC
isn.
create
_date DESC
</select>
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
@@ -62,6 +67,7 @@
...
@@ -62,6 +67,7 @@
isn.province_name AS provinceName,
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.county_name AS countyName,
isn.street_name AS streetName,
isn.address AS address,
isn.address AS address,
isn.install_start_date AS installStartDate,
isn.install_start_date AS installStartDate,
isn.install_license_no AS installLicenseNo,
isn.install_license_no AS installLicenseNo,
...
@@ -98,12 +104,9 @@
...
@@ -98,12 +104,9 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ei.legal_person AS safetyManager,
ui.phone AS safetyManagerPhone,
ei.legal_phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ei.address AS address
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
@@ -112,6 +115,7 @@
...
@@ -112,6 +115,7 @@
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
WHERE
isn.sequence_nbr = #{sequenceNbr}
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
LIMIT 1
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
a3e7c243
...
@@ -8,94 +8,102 @@
...
@@ -8,94 +8,102 @@
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
select
select
tjmn.sequence_nbr AS sequenceNbr,
isn.sequence_nbr AS sequenceNbr,
tjmn.apply_no AS applyNo,
isn.apply_no AS applyNo,
tjmn.notice_date AS noticeDate,
isn.notice_date AS noticeDate,
tjmn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
tjmn.address AS address,
isn.address AS address,
tjmn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
isn.install_unit_name AS installUnitName,
tjmn.province,
isn.province,
tjmn.city,
isn.city,
tjmn.county,
isn.county,
tjmn.factory_use_site_street,
isn.factory_use_site_street,
tjmn.street_name,
isn.street_name,
tjmn.street,
isn.street,
tjmn.maintain_type,
isn.maintain_type,
tjmn.plan_date,
isn.plan_date,
tjmn.notice_report_url,
isn.notice_report_url,
tjmn.province_name AS provinceName,
isn.province_name AS provinceName,
tjmn.city_name AS cityName,
isn.city_name AS cityName,
tjmn.county_name AS countyName,
isn.county_name AS countyName,
tjmn.promoter,
isn.promoter,
tjmn.instance_id AS instanceId
isn.equ_category AS equCategory,
isn.equ_list_code AS equListCode,
isn.instance_id AS instanceId,
isn.accept_date AS acceptDate
FROM
FROM
tzs_jg_maintain_notice
tjm
n
tzs_jg_maintain_notice
is
n
<where>
<where>
tjm
n.is_delete = 0
is
n.is_delete = 0
<if
test=
"param != null "
>
<if
test=
"param != null "
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND
tjm
n.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
AND
is
n.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
</if>
</if>
<if
test=
"param.receiveOrg
Name != null and param.receiveOrgNam
e != ''"
>
<if
test=
"param.receiveOrg
Code != null and param.receiveOrgCod
e != ''"
>
AND
tjmn.receive_org_name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
AND
isn.receive_org_code = #{param.receiveOrgCode}
</if>
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND
tjm
n.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
AND
is
n.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
</if>
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND
tjm
n.install_unit_name LIKE CONCAT('%', #{param.installUnitName}, '%')
AND
is
n.install_unit_name LIKE CONCAT('%', #{param.installUnitName}, '%')
</if>
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND
tjm
n.notice_status = #{param.noticeStatus}
AND
is
n.notice_status = #{param.noticeStatus}
</if>
</if>
<if
test=
"param.maintainType != null and param.maintainType != ''"
>
<if
test=
"param.maintainType != null and param.maintainType != ''"
>
AND
tjm
n.maintain_type = #{param.maintainType}
AND
is
n.maintain_type = #{param.maintainType}
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (
tjmn.notice_status in ('6612', '6613', '6614
') )
AND (
isn.notice_status in ('6612', '6614', '6616
') )
AND
tjm
n.receive_org_code = #{orgCode}
AND
is
n.receive_org_code = #{orgCode}
</if>
</if>
<if
test=
"type == 'enterprise'"
>
<if
test=
"type == 'enterprise'"
>
AND
tjm
n.install_unit_credit_code = #{orgCode}
AND
is
n.install_unit_credit_code = #{orgCode}
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
tjmn.notice_date
DESC
isn.apply_no
DESC
</select>
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
select
tjmn.sequence_nbr AS sequenceNbr,
isn.sequence_nbr AS sequenceNbr,
tjmn.apply_no AS applyNo,
isn.apply_no AS applyNo,
tjmn.notice_date AS noticeDate,
isn.notice_date AS noticeDate,
tjmn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
tjmn.address AS address,
isn.address AS address,
tjmn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
isn.install_unit_name AS installUnitName,
tjmn.province,
isn.province,
tjmn.city,
isn.city,
tjmn.county,
isn.county,
tjmn.factory_use_site_street AS factoryUseSiteStreet,
isn.factory_use_site_street AS factoryUseSiteStreet,
tjmn.street_name AS streetName,
isn.street_name AS streetName,
tjmn.street,
isn.street,
tjmn.maintain_type AS maintainType,
isn.maintain_type AS maintainType,
tjmn.plan_date AS planDate,
isn.notice_report_url AS noticeReportUrl,
tjmn.notice_report_url AS noticeReportUrl,
isn.province_name AS provinceName,
tjmn.province_name AS provinceName,
isn.city_name AS cityName,
tjmn.city_name AS cityName,
isn.county_name AS countyName,
tjmn.county_name AS countyName,
isn.instance_id AS instanceId,
tjmn.instance_id AS instanceId,
isn.promoter,
tjmn.promoter,
isn.equ_category AS equCategory,
isn.equ_list_code AS equListCode,
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_type AS equType,
ri.equ_code AS equRegisterCode,
ri.equ_price AS equPrice,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_credit_code AS designUnitCreditCode,
...
@@ -111,7 +119,8 @@
...
@@ -111,7 +119,8 @@
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_name AS produceUnitName,
fi.produce_unit_name AS produceUnitName,
fi.produce_license_num AS produceLicenseNum,
fi.produce_license_num AS produceLicenseNum,
fi.factory_num AS factoryNum,
fi.FACTORY_NUM AS produceCode,
fi.FACTORY_NUM AS factoryNum,
fi.produce_date AS produceDate,
fi.produce_date AS produceDate,
fi.imported AS imported,
fi.imported AS imported,
fi.produce_country AS produceCountry,
fi.produce_country AS produceCountry,
...
@@ -119,21 +128,22 @@
...
@@ -119,21 +128,22 @@
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone
,
ei.legal_person AS safetyManager
,
ui.PROVINCE_NAME AS useUnitProvinceNam
e,
ei.legal_phone AS safetyManagerPhon
e,
ui.CITY_NAME AS useUnitCityName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.COUNTY_NAME AS useUnitCountyName,
u
i.ADDRESS AS useUnitAddress
e
i.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_maintain_notice
tjm
n
tzs_jg_maintain_notice
is
n
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id =
tjm
n.sequence_nbr
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id =
is
n.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
WHERE
tjm
n.sequence_nbr = #{sequenceNbr}
is
n.sequence_nbr = #{sequenceNbr}
LIMIT 1
LIMIT 1
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
a3e7c243
...
@@ -26,7 +26,11 @@
...
@@ -26,7 +26,11 @@
isn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
isn.next_execute_ids as nextExecuteIds,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.promoter,
isn.notice_report_url
isn.notice_report_url,
isn.accept_date,
isn.equ_list_code,
isn.equ_category,
isn.create_user_id
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
<where>
<where>
...
@@ -38,6 +42,9 @@
...
@@ -38,6 +42,9 @@
<if
test=
"param.receiveOrgName != null and param.receiveOrgName != ''"
>
<if
test=
"param.receiveOrgName != null and param.receiveOrgName != ''"
>
AND isn.receive_org_name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
AND isn.receive_org_name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
</if>
</if>
<if
test=
"param.receiveOrgCode != null and param.receiveOrgCode != ''"
>
AND isn.receive_org_code = #{param.receiveOrgCode}
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND isn.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
AND isn.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
</if>
</if>
...
@@ -49,16 +56,15 @@
...
@@ -49,16 +56,15 @@
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND
isn.notice_status in ('6612', '6613', '6614'
)
AND
(isn.notice_status in ('6612', '6613', '6614', '6616')
)
AND isn.receive_org_code = #{orgCode}
AND isn.receive_org_code = #{orgCode}
<!-- AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )-->
</if>
</if>
<if
test=
"type == 'enterprise'"
>
<if
test=
"type == 'enterprise'"
>
AND isn.install_unit_credit_code = #{orgCode}
AND isn.install_unit_credit_code = #{orgCode}
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
isn.
notice_date
DESC
isn.
apply_no
DESC
</select>
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
@@ -82,10 +88,16 @@
...
@@ -82,10 +88,16 @@
isn.next_execute_ids as nextExecuteIds,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.promoter,
isn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
<!-- isn.install_start_date AS installLicenseExpirationDate,-->
<!-- isn.install_license_no AS installLicenseNo,-->
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone,
ri.equ_code AS equRegisterCode,
ri.equ_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
fi.FACTORY_NUM AS produceCode,
ri.product_name AS productName,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_type AS equType,
...
@@ -111,12 +123,9 @@
...
@@ -111,12 +123,9 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ei.legal_person AS safetyManager,
ui.phone AS safetyManagerPhone,
ei.legal_phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ei.ADDRESS AS useUnitAddress
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
@@ -125,6 +134,7 @@
...
@@ -125,6 +134,7 @@
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
WHERE
isn.sequence_nbr = #{sequenceNbr}
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
LIMIT 1
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
a3e7c243
...
@@ -55,14 +55,18 @@
...
@@ -55,14 +55,18 @@
<!-- <if test="dto.useUnitName != null and dto.useUnitName != ''">-->
<!-- <if test="dto.useUnitName != null and dto.useUnitName != ''">-->
<!-- and use.USE_UNIT_NAME like concat('%',#{dto.useUnitName},'%')-->
<!-- and use.USE_UNIT_NAME like concat('%',#{dto.useUnitName},'%')-->
<!-- </if>-->
<!-- </if>-->
<!-- -->
<if
test=
"roleIds != null and dto.type == 'supervision'"
>
<if
test=
"roleIds != null and dto.type == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
ur.
audit
_status like concat('%',#{role},'%')
ur.
instance
_status like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"dto.type == 'supervision'"
>
<if
test=
"dto.type == 'supervision'"
>
AND ur.receive_org_code = #{orgCode}
AND ur.receive_org_code = #{orgCode}
</if>
</if>
<if
test=
"dto.type == 'enterprise' "
>
and ur.use_unit_code = #{orgCode}
</if>
<!-- <if test="dto.type == 'enterprise'">-->
<!-- <if test="dto.type == 'enterprise'">-->
<!-- AND use.USE_UNIT_CREDIT_CODE = #{orgCode}-->
<!-- AND use.USE_UNIT_CREDIT_CODE = #{orgCode}-->
<!-- </if>-->
<!-- </if>-->
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,7 +21,7 @@ import java.util.Arrays;
...
@@ -23,7 +21,7 @@ import java.util.Arrays;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.
function.Function
;
import
java.util.
Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -103,7 +101,15 @@ public class CommonController extends BaseController {
...
@@ -103,7 +101,15 @@ public class CommonController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserInfoSplit"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询安全管理员的基本信息"
,
notes
=
"查询安全管理员的基本信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfoSplit
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
if
(
sequenceNbr
.
contains
(
"_"
))
{
sequenceNbr
=
sequenceNbr
.
split
(
"_"
)[
0
];
}
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
/**
/**
* 查询企业的基本信息
* 查询企业的基本信息
*
*
...
@@ -133,10 +139,13 @@ public class CommonController extends BaseController {
...
@@ -133,10 +139,13 @@ public class CommonController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程状态枚举列表"
,
notes
=
"流程状态枚举列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程状态枚举列表"
,
notes
=
"流程状态枚举列表"
)
@GetMapping
(
value
=
"/flow-status/list"
)
@GetMapping
(
value
=
"/flow-status/list"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectForFlowStatusList
()
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectForFlowStatusList
()
{
return
ResponseHelper
.
buildResponse
(
Arrays
.
stream
(
FlowStatusEnum
.
values
()).
map
(
this
::
mapPointTypeToMap
).
collect
(
Collectors
.
toList
()));
return
ResponseHelper
.
buildResponse
(
Arrays
.
stream
(
FlowStatusEnum
.
values
()).
map
(
this
::
mapPointTypeToMap
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
()));
}
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
())
{
return
null
;
}
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
record
.
put
(
"key"
,
e
.
getCode
());
record
.
put
(
"key"
,
e
.
getCode
());
record
.
put
(
"label"
,
e
.
getName
());
record
.
put
(
"label"
,
e
.
getName
());
...
...
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 @
a3e7c243
...
@@ -55,7 +55,7 @@ public class JgChangeRegistrationReformController extends BaseController {
...
@@ -55,7 +55,7 @@ public class JgChangeRegistrationReformController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
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"
))
,
true
);
jgChangeRegistrationReformServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -114,8 +114,8 @@ public class JgChangeRegistrationReformController extends BaseController {
...
@@ -114,8 +114,8 @@ public class JgChangeRegistrationReformController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
@GetMapping
(
value
=
"/getDetail"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"
id"
)
String
i
d
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"
currentDocumentId"
)
String
currentDocumentId
,
@RequestParam
(
"equipId"
)
String
equipI
d
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getDetail
(
i
d
));
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getDetail
(
currentDocumentId
,
equipI
d
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEquipTransferByWorkFlowController.java
View file @
a3e7c243
...
@@ -31,8 +31,6 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
...
@@ -31,8 +31,6 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
@Autowired
@Autowired
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
/**
/**
* 受理
* 受理
*
*
...
@@ -41,10 +39,7 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
...
@@ -41,10 +39,7 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交受理"
,
notes
=
"设备移交受理"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交受理"
,
notes
=
"设备移交受理"
)
public
ResponseModel
<
JgEquipTransferDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
public
ResponseModel
<
JgEquipTransferDto
>
accept
(
@RequestBody
JgEquipTransferDto
jgEquipTransferDto
,
String
op
)
{
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
equipTransferInfo
=
(
LinkedHashMap
)
model1
.
get
(
TABLE_PAGE_ID
);
JgEquipTransferDto
jgEquipTransferDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipTransferInfo
),
JgEquipTransferDto
.
class
);
jgEquipTransferServiceImpl
.
accept
(
jgEquipTransferDto
,
op
);
jgEquipTransferServiceImpl
.
accept
(
jgEquipTransferDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -57,13 +52,9 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
...
@@ -57,13 +52,9 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel"
)
@PostMapping
(
value
=
"/cancel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交撤销"
,
notes
=
"设备移交撤销"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交撤销"
,
notes
=
"设备移交撤销"
)
public
ResponseModel
<
JgEquipTransferDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
public
ResponseModel
<
JgEquipTransferDto
>
cancel
(
@RequestBody
JgEquipTransferDto
jgEquipTransferDto
)
{
JgEquipTransferDto
equipTransferInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
TABLE_PAGE_ID
)),
JgEquipTransferDto
.
class
,
true
);
jgEquipTransferServiceImpl
.
cancel
(
jgEquipTransferDto
);
if
(
Objects
.
isNull
(
equipTransferInfo
))
{
return
ResponseHelper
.
buildResponse
(
null
);
throw
new
IllegalArgumentException
(
"参数equipTransferInfo不能为空"
);
}
jgEquipTransferServiceImpl
.
cancel
(
equipTransferInfo
);
return
ResponseHelper
.
buildResponse
(
equipTransferInfo
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEquipTransferController.java
View file @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
c
n.hutool.core.bean.BeanUtil
;
import
c
om.yeejoin.amos.boot.module.jg.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -11,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -11,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.*
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -31,8 +35,6 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -31,8 +35,6 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RequestMapping
(
value
=
"/jg-equip-transfer"
)
@RequestMapping
(
value
=
"/jg-equip-transfer"
)
public
class
JgEquipTransferController
extends
BaseController
{
public
class
JgEquipTransferController
extends
BaseController
{
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
@Autowired
@Autowired
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
...
@@ -44,19 +46,17 @@ public class JgEquipTransferController extends BaseController {
...
@@ -44,19 +46,17 @@ public class JgEquipTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增设备移交"
,
notes
=
"新增设备移交"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增设备移交"
,
notes
=
"新增设备移交"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgEquipTransferDto
>
modelMap
)
{
public
ResponseModel
<
Object
>
save
(
@RequestParam
(
"submitType"
)
String
submitType
,
@RequestBody
JgEquipTransferDto
model
)
{
jgEquipTransferServiceImpl
.
saveOrUpdateModel
(
submitType
,
model
Map
.
get
(
TABLE_PAGE_ID
)
,
getSelectedOrgInfo
());
jgEquipTransferServiceImpl
.
saveOrUpdateModel
(
submitType
,
model
,
getSelectedOrgInfo
());
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update"
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新设备移交"
,
notes
=
"根据sequenceNbr更新设备移交"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新设备移交"
,
notes
=
"根据sequenceNbr更新设备移交"
)
public
ResponseModel
<
JgEquipTransferDto
>
updateBySequenceNbr
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
modelMap
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
public
ResponseModel
<
JgEquipTransferDto
>
updateBySequenceNbr
(
@RequestParam
(
"submitType"
)
String
submitType
,
JgEquipTransferDto
equipTransferDto
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
modelMap
.
get
(
TABLE_PAGE_ID
)),
JgEquipTransferDto
.
class
,
true
);
@RequestBody
JgEquipTransferDto
equipTransferDto
,
if
(
Objects
.
isNull
(
equipTransferDto
))
{
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
throw
new
IllegalArgumentException
(
"参数equipTransferDto不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
updateEquipTransfer
(
submitType
,
equipTransferDto
,
op
));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
updateEquipTransfer
(
submitType
,
equipTransferDto
,
op
));
}
}
...
@@ -68,7 +68,7 @@ public class JgEquipTransferController extends BaseController {
...
@@ -68,7 +68,7 @@ public class JgEquipTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/delete"
)
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除设备移交"
,
notes
=
"根据sequenceNbr删除设备移交"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除设备移交"
,
notes
=
"根据sequenceNbr删除设备移交"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
removeById
(
sequenceNbr
));
}
}
...
@@ -81,7 +81,7 @@ public class JgEquipTransferController extends BaseController {
...
@@ -81,7 +81,7 @@ public class JgEquipTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"批量删除设备移交"
,
notes
=
"批量删除设备移交"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"批量删除设备移交"
,
notes
=
"批量删除设备移交"
)
public
ResponseModel
<
Object
>
deleteBySequenceNbr
(
@RequestParam
String
ids
)
{
public
ResponseModel
<
Object
>
deleteBySequenceNbr
(
@RequestParam
(
"ids"
)
String
ids
)
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
throw
new
RuntimeException
(
"请选择需要删除的行!"
);
throw
new
RuntimeException
(
"请选择需要删除的行!"
);
}
}
...
@@ -97,7 +97,7 @@ public class JgEquipTransferController extends BaseController {
...
@@ -97,7 +97,7 @@ public class JgEquipTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/details"
)
@GetMapping
(
value
=
"/details"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个设备移交"
,
notes
=
"根据sequenceNbr查询单个设备移交"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个设备移交"
,
notes
=
"根据sequenceNbr查询单个设备移交"
)
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
Long
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
...
@@ -113,10 +113,35 @@ public class JgEquipTransferController extends BaseController {
...
@@ -113,10 +113,35 @@ public class JgEquipTransferController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备移交分页查询"
,
notes
=
"设备移交分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备移交分页查询"
,
notes
=
"设备移交分页查询"
)
public
ResponseModel
<
Page
<
JgEquipTransferDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
JgEquipTransferDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
@ApiParam
(
value
=
"类型:
enterprise-企业端、supervision-监管端"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"enterprise
"
)
String
type
,
@ApiParam
(
value
=
"类型:
useUnit-使用单位、installUnit-施工单位"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"useUnit
"
)
String
type
,
@RequestBody
(
required
=
false
)
JgEquipTransferDto
dto
)
{
@RequestBody
(
required
=
false
)
JgEquipTransferDto
dto
)
{
Page
<
JgEquipTransfer
>
page
=
new
Page
<>(
current
,
size
);
Page
<
JgEquipTransfer
>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryForJgEquipTransferPage
(
page
,
dto
,
type
,
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryForJgEquipTransferPage
(
page
,
dto
,
type
,
getSelectedOrgInfo
()));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCodeAndName"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录用户所在公司code和公司名称"
,
notes
=
"获取当前登录用户所在公司code和公司名称"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCodeAndName
()
{
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
())
{
throw
new
BaseException
(
"未指定人员归属单位信息"
);
}
String
companyType
=
companyModels
.
get
(
0
).
getCompanyType
();
String
companyCode
=
companyModels
.
get
(
0
).
getCompanyCode
();
String
companyName
=
companyModels
.
get
(
0
).
getCompanyName
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
"个人主体"
.
equals
(
companyType
)){
map
.
put
(
"useUnitName"
,
companyName
.
split
(
"_"
)[
1
]);
map
.
put
(
"useUnitCreditCode"
,
companyCode
.
split
(
"_"
)[
1
]);
map
.
put
(
"companyType"
,
"person"
);
}
else
{
map
.
put
(
"useUnitName"
,
companyName
);
map
.
put
(
"useUnitCreditCode"
,
companyCode
);
map
.
put
(
"companyType"
,
"company"
);
}
return
ResponseHelper
.
buildResponse
(
map
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationByWorkFlowController.java
View file @
a3e7c243
...
@@ -80,8 +80,10 @@ public class JgInstallationByWorkFlowController {
...
@@ -80,8 +80,10 @@ public class JgInstallationByWorkFlowController {
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理安装告知流程
// TODO 受理安装告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
String
opinion
=
(
String
)
model
.
get
(
"opinion"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"installationInfo"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"installationInfo"
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
jgInstallationNoticeDto
.
setProcessAdvice
(
opinion
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
a3e7c243
...
@@ -80,7 +80,7 @@ public class JgInstallationNoticeController extends BaseController {
...
@@ -80,7 +80,7 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/delete"
)
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除安装告知"
,
notes
=
"根据sequenceNbr删除安装告知"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除安装告知"
,
notes
=
"根据sequenceNbr删除安装告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
removeById
(
sequenceNbr
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
a3e7c243
...
@@ -47,7 +47,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -47,7 +47,7 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
))
,
true
);
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
...
...
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 @
a3e7c243
...
@@ -861,7 +861,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -861,7 +861,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
result
.
put
(
underscoreFieldName
.
toUpperCase
(),
value
);
if
(!
ValidationUtil
.
isEmpty
(
value
)){
result
.
put
(
underscoreFieldName
.
toUpperCase
(),
value
);
}
}
}
return
result
;
return
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/impl/JgChangeRegistrationReformServiceImpl.java
View file @
a3e7c243
...
@@ -9,14 +9,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -9,14 +9,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
Use
StatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
WorkFlow
StatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
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.IJgChangeRegistrationReformService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
...
@@ -26,6 +26,7 @@ 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.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
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.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
...
@@ -43,7 +44,6 @@ import java.util.ArrayList;
...
@@ -43,7 +44,6 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* 改造变更登记服务实现类
* 改造变更登记服务实现类
...
@@ -54,6 +54,8 @@ import java.util.stream.Collectors;
...
@@ -54,6 +54,8 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
@Autowired
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
@Autowired
WorkFlowFeignService
workFlowFeginService
;
WorkFlowFeignService
workFlowFeginService
;
@Autowired
@Autowired
...
@@ -101,36 +103,58 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -101,36 +103,58 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
@Transactional
@Transactional
public
void
save
(
JSONObject
map
)
{
public
void
save
(
JSONObject
map
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"
equipI
d"
));
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"
recor
d"
));
// 更新使用信息
// 更新使用信息
useInfoMapper
.
update
(
useInfo
,
lambda
);
useInfoMapper
.
update
(
useInfo
,
lambda
);
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
BeanUtil
.
copyProperties
(
map
,
inspectionDetectionInfo
);
BeanUtil
.
copyProperties
(
map
,
inspectionDetectionInfo
);
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"
equipI
d"
));
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"
recor
d"
));
// 更新检验检测信息
// 更新检验检测信息
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
// 使用登记信息
// 使用登记信息
JgChangeRegistrationReform
jgChangeRegistrationReform
=
new
JgChangeRegistrationReform
();
JgChangeRegistrationReform
jgChangeRegistrationReform
=
new
JgChangeRegistrationReform
();
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
otherLambda
.
eq
(
OtherInfo:
:
getRecord
,
map
.
get
(
"
equipI
d"
));
otherLambda
.
eq
(
OtherInfo:
:
getRecord
,
map
.
get
(
"
recor
d"
));
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
jgChangeRegistrationReform
.
setUseUnitName
(
useInfo
.
getUseUnitName
());
jgChangeRegistrationReform
.
setUseUnitName
(
useInfo
.
getUseUnitName
());
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"transformationQualityCertificate"
))){
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
jgChangeRegistrationReform
.
setTransformationQualityCertificate
(
JSONObject
.
toJSONString
(
map
.
get
(
"transformationQualityCertificate"
)));
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"renovationSupervisioninspectionCertificate"
)))
{
jgChangeRegistrationReform
.
setRenovationSupervisioninspectionCertificate
(
JSONObject
.
toJSONString
(
map
.
get
(
"renovationSupervisioninspectionCertificate"
)));
}
// 使用单位提交
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
}
else
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
}
else
{
jgChangeRegistrationReform
.
setInspectUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
}
if
(
map
.
containsKey
(
"receiveCompanyCode"
))
{
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
String
.
valueOf
(
map
.
getString
(
"receiveCompanyCode"
)));
}
else
{
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
"610000"
);
}
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
//使用登记编号
//使用登记编号
jgRegistrationHistory
.
setUseRegistrationCode
(
idxBizJgRegisterInfoMapper
.
getUseOrgCodeByEquip
(
map
.
get
(
"
equipI
d"
).
toString
()));
jgRegistrationHistory
.
setUseRegistrationCode
(
idxBizJgRegisterInfoMapper
.
getUseOrgCodeByEquip
(
map
.
get
(
"
recor
d"
).
toString
()));
//登记类别
//登记类别
jgRegistrationHistory
.
setRegistrationClass
(
"改造登记"
);
jgRegistrationHistory
.
setRegistrationClass
(
"改造登记"
);
//设备id
//设备id
jgRegistrationHistory
.
setEquId
(
map
.
get
(
"
equipI
d"
).
toString
());
jgRegistrationHistory
.
setEquId
(
map
.
get
(
"
recor
d"
).
toString
());
//修改数据
//修改数据
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
map
));
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
map
));
//设备监管码
//设备监管码
...
@@ -141,18 +165,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -141,18 +165,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
null
);
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
null
);
jgChangeRegistrationReform
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgChangeRegistrationReform
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
jgRegistrationHistory
.
setSequenceNbr
(
jgRegistrationHistoryMapper
.
getSequenceNbrByEquidAndDocumentId
(
map
.
get
(
"
equipId"
).
toString
(),
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgRegistrationHistory
.
setSequenceNbr
(
jgRegistrationHistoryMapper
.
getSequenceNbrByEquidAndDocumentId
(
map
.
get
(
"
record"
).
toString
(),
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
}
else
{
}
else
{
// 业务管理设备信息保存
// 业务管理设备信息保存
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
new
JgChangeRegistrationReformEq
();
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
new
JgChangeRegistrationReformEq
();
jgChangeRegistrationReformEq
.
setEquId
(
map
.
get
(
"equipId"
).
toString
());
jgChangeRegistrationReformEq
.
setEquId
(
map
.
get
(
"record"
).
toString
());
// jgRelationEquip.setBusinessType(String.valueOf(BusinessTypeEnum.USAGE_REGISTRATION.getCode()));
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
GZBG
.
getCode
(),
1
);
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
GZBG
.
getCode
(),
1
);
jgChangeRegistrationReform
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
jgChangeRegistrationReform
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
jgChangeRegistrationReform
.
setAuditStatus
(
"待提交"
);
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getPass
()
);
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getPass
());
this
.
save
(
jgChangeRegistrationReform
);
this
.
save
(
jgChangeRegistrationReform
);
jgChangeRegistrationReformEq
.
setEquipTransferId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgChangeRegistrationReformEq
.
setEquipTransferId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgChangeRegistrationReformEqMapper
.
insert
(
jgChangeRegistrationReformEq
);
jgChangeRegistrationReformEqMapper
.
insert
(
jgChangeRegistrationReformEq
);
...
@@ -168,20 +191,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -168,20 +191,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
else
{
}
else
{
// 启动并执行流程
// 启动并执行流程
instanceId
=
startByVariable
();
instanceId
=
startByVariable
();
jgChangeRegistrationReform
.
setInstanceStatus
(
"1460532889249755137"
);
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
.
getSequenceNbr
(),
"0"
);
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
"91610131628001738N"
);
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
"610000"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
// 执行流程
String
status
=
flowExecute
(
jgChangeRegistrationReform
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
true
);
flowExecute
(
jgChangeRegistrationReform
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
);
jgChangeRegistrationReform
.
setAuditStatus
(
"已提交"
);
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
.
getSequenceNbr
(),
"0"
);
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
}
}
jgChangeRegistrationReform
.
setInstanceId
(
instanceId
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
}
}
}
}
...
@@ -201,30 +218,22 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -201,30 +218,22 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
return
instanceId
;
return
instanceId
;
}
}
public
String
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
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
role
=
""
;
String
task
Name
=
"流程结束"
;
String
task
Code
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
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
);
// 查询下节点任务
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
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
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
...
@@ -236,47 +245,135 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -236,47 +245,135 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
role
=
String
.
join
(
","
,
roleList
);
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCode
))
{
if
(
update
)
{
role
=
String
.
join
(
","
,
roleList
);
Boolean
rollBack
=
"1"
.
equals
(
operate
)
?
true
:
false
;
updateStatus
(
id
,
instanceId
,
taskName
,
role
,
rollBack
);
}
return
role
;
}
public
void
updateStatus
(
Long
id
,
String
instanceId
,
String
taskName
,
String
role
,
Boolean
rollBack
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
LambdaQueryWrapper
<
JgChangeRegistrationReform
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReform
>().
lambda
();
lambda
.
eq
(
JgChangeRegistrationReform:
:
getSequenceNbr
,
id
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
jgChangeRegistrationReform
.
setStatus
(
taskName
);
jgChangeRegistrationReform
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
//交换历史数据与新增数据
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
jgChangeRegistrationReform
.
getSupervisoryCode
());
}
else
{
jgChangeRegistrationReform
.
setNextExecutorIds
(
role
);
jgChangeRegistrationReform
.
setNextExecutorIds
(
role
);
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationReform
.
setInstanceId
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceStatus
()))
{
jgChangeRegistrationReform
.
setInstanceStatus
(
jgChangeRegistrationReform
.
getInstanceStatus
()
+
","
+
role
);
jgChangeRegistrationReform
.
setInstanceStatus
(
jgChangeRegistrationReform
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
}
else
{
jgChangeRegistrationReform
.
setInstanceStatus
(
role
);
jgChangeRegistrationReform
.
setInstanceStatus
(
role
);
}
}
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
if
(
"0"
.
equals
(
operate
))
{
jgChangeRegistrationReform
.
setStatus
(
message
.
getPass
());
// 通过操作
}
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
if
(
rollBack
)
{
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
this
.
getBaseMapper
().
update
(
jgChangeRegistrationReform
,
lambda
);
}
else
{
this
.
getBaseMapper
().
updatePromoter
(
jgChangeRegistrationReform
.
getSequenceNbr
());
// 驳回操作
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setPromoter
(
null
);
}
}
else
{
}
else
{
this
.
getBaseMapper
().
update
(
jgChangeRegistrationReform
,
lambda
);
jgChangeRegistrationReform
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
jgChangeRegistrationReform
.
getSupervisoryCode
());
}
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
}
// public String flowExecute(Long id, String instanceId, String operate, String comment, Boolean update) {
// String role = "";
// String taskName = "流程结束";
// ArrayList<String> roleList = new ArrayList<>();
// 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);
// // 查询下节点任务
// 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");
// taskName = nextTask.getString("name");
// 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();
// }
// role = String.join(",", roleList);
// if (update) {
// Boolean rollBack = "1".equals(operate) ? true : false;
// updateStatus(id, instanceId, taskName, role, rollBack);
// }
// return role;
// }
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
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
();
}
}
// 更新下一步执行人
updateExecuteIds
(
instanceId
,
id
,
operate
);
}
}
// public void updateStatus(Long id, String instanceId, String taskName, String role, Boolean rollBack) {
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// LambdaQueryWrapper<JgChangeRegistrationReform> lambda = new QueryWrapper<JgChangeRegistrationReform>().lambda();
// lambda.eq(JgChangeRegistrationReform::getSequenceNbr, id);
// JgChangeRegistrationReform jgChangeRegistrationReform = this.getBaseMapper().selectOne(lambda);
// if ("流程结束".equals(taskName)) {
// JgChangeRegistrationReformEq jgChangeRegistrationReformEq = jgChangeRegistrationReformEqMapper.selectOne(new QueryWrapper<JgChangeRegistrationReformEq>().eq("equip_transfer_id", jgChangeRegistrationReform.getSequenceNbr()));
// jgChangeRegistrationReform.setStatus("已完成");
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.COMPLETE.getName());
//
// //交换历史数据与新增数据
// updateTechparamsByEquIdAndCurrentDoucumentId(jgChangeRegistrationReformEq.getEquId(), jgChangeRegistrationReform.getSequenceNbr().toString(), jgChangeRegistrationReform.getSupervisoryCode());
// } else {
// jgChangeRegistrationReform.setNextExecutorIds(role);
// jgChangeRegistrationReform.setPromoter(reginParams.getUserModel().getUserId());
// if (!ObjectUtils.isEmpty(jgChangeRegistrationReform.getInstanceStatus())) {
// jgChangeRegistrationReform.setInstanceStatus(jgChangeRegistrationReform.getInstanceStatus() + "," + role);
// } else {
// jgChangeRegistrationReform.setInstanceStatus(role);
// }
// }
// if (rollBack) {
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.getMessage(taskName).getReject());
// this.getBaseMapper().update(jgChangeRegistrationReform, lambda);
// this.getBaseMapper().updatePromoter(jgChangeRegistrationReform.getSequenceNbr());
// } else {
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.getMessage(taskName).getPass());
// this.getBaseMapper().update(jgChangeRegistrationReform, lambda);
// }
// }
public
void
withdraw
(
String
instanceId
)
{
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskCode
=
""
;
JgChangeRegistrationReform
jgChangeRegistrationReform
=
new
JgChangeRegistrationReform
();
JgChangeRegistrationReform
jgChangeRegistrationReform
=
new
JgChangeRegistrationReform
();
LambdaQueryWrapper
<
JgChangeRegistrationReform
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReform
>().
lambda
();
LambdaQueryWrapper
<
JgChangeRegistrationReform
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationReform
>().
lambda
();
lambda
.
eq
(
JgChangeRegistrationReform:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
JgChangeRegistrationReform:
:
getInstanceId
,
instanceId
);
...
@@ -285,9 +382,12 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -285,9 +382,12 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
workFlowFeginService
.
rollBack
(
instanceId
);
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
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
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
...
@@ -299,14 +399,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -299,14 +399,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
task
Nam
e
))
{
if
(!
ObjectUtils
.
isEmpty
(
task
Cod
e
))
{
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getRollBack
()
);
jgChangeRegistrationReform
.
setStatus
(
message
.
getPass
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getRollBack
());
}
}
String
join
=
String
.
join
(
","
,
roleList
);
String
join
=
String
.
join
(
","
,
roleList
);
JgChangeRegistrationReform
jgChangeRegistrationReform1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
this
.
updateStatus
(
jgChangeRegistrationReform1
.
getSequenceNbr
(),
instanceId
,
taskName
,
join
,
true
);
jgChangeRegistrationReform
.
setNextExecutorIds
(
join
);
this
.
update
(
jgChangeRegistrationReform
,
lambda
);
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
@@ -322,23 +423,25 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -322,23 +423,25 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReformEqMapper
.
update
(
jgChangeRegistrationReformEq
,
lambda1
);
jgChangeRegistrationReformEqMapper
.
update
(
jgChangeRegistrationReformEq
,
lambda1
);
}
}
public
Map
<
String
,
Object
>
getDetail
(
String
id
)
{
public
Map
<
String
,
Object
>
getDetail
(
String
currentDocumentId
,
String
equipId
)
{
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectById
(
currentDocumentId
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgChangeRegistrationReform
),
Map
.
class
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
Map
<
String
,
Object
>
originalData
=
new
HashMap
<>();
if
(
detail
.
get
(
"status"
).
equals
(
"已完成"
)){
}
else
{
if
((
detail
.
get
(
"status"
).
equals
(
"已完成"
)
||
detail
.
get
(
"status"
).
equals
(
"流程结束"
)))
{
originalData
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equipId
);
originalData
.
remove
(
"sequenceNbr"
);
detail
.
put
(
"transformationQualityCertificate"
,
JSONObject
.
parse
(
detail
.
get
(
"transformationQualityCertificate"
).
toString
()));
detail
.
put
(
"renovationSupervisioninspectionCertificate"
,
JSONObject
.
parse
(
detail
.
get
(
"renovationSupervisioninspectionCertificate"
).
toString
()));
}
else
{
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
.
eq
(
"current_document_id"
,
currentDocumentId
)
.
eq
(
"registration_class"
,
"改造登记"
));
originalData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
(),
Map
.
class
);
originalData
.
remove
(
"sequenceNbr"
);
}
}
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
originalData
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
detail
.
put
(
"insUseMaintainExplanin"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"insUseMaintainExplanin"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
return
detail
;
return
detail
;
}
}
...
@@ -357,56 +460,60 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -357,56 +460,60 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
/**
/**
* 流程完成之后互换数据并更新设备状态
* 流程完成之后互换数据并更新设备状态
*
* @param equipId
* @param equipId
* @param currentDocumentId
* @param currentDocumentId
*/
*/
public
void
updateTechparamsByEquIdAndCurrentDoucumentId
(
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
public
void
updateTechparamsByEquIdAndCurrentDoucumentId
(
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
String
newUseRegistrationCertificateNumber
=
getCode
(
supervisoryCode
);
String
newUseRegistrationCertificateNumber
=
getCode
(
supervisoryCode
);
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
.
eq
(
"equ_id"
,
equipId
)
.
eq
(
"current_document_id"
,
currentDocumentId
)
.
eq
(
"current_document_id"
,
currentDocumentId
)
.
eq
(
"registration_class"
,
"改造登记"
));
.
eq
(
"registration_class"
,
"改造登记"
));
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
)&&!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
))
{
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
)
&&
!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
))
{
//历史数据
//历史数据
String
historyData
=
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
);
String
historyData
=
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
);
//当前数据
//当前数据
String
newData
=
jgRegistrationHistory
.
getChangeData
();
String
newData
=
jgRegistrationHistory
.
getChangeData
();
//将历史数据更新到技术参数表中
//将历史数据更新到技术参数表中
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
newData
,
IdxBizJgTechParamsElevator
.
class
);
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
newData
,
IdxBizJgTechParamsElevator
.
class
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
"sequenceNbr"
,
"record"
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
"sequenceNbr"
,
"record"
);
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
//将历史数据回填到历史记录表中
//将历史数据回填到历史记录表中
jgRegistrationHistory
.
setChangeData
(
historyData
);
jgRegistrationHistory
.
setChangeData
(
historyData
);
jgRegistrationHistory
.
setStatus
(
"history"
);
jgRegistrationHistory
.
setStatus
(
"history"
);
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
makeEquipmentsInvalid
(
equipId
,
currentDocumentId
);
makeEquipmentsInvalid
(
equipId
,
currentDocumentId
);
//更新使用注册登记证编号
//更新使用注册登记证编号
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equipId
,
newUseRegistrationCertificateNumber
);
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equipId
,
newUseRegistrationCertificateNumber
);
//es中的编号信息
//es中的编号信息
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"USE_ORG_CODE"
,
newUseRegistrationCertificateNumber
);
map1
.
put
(
"USE_ORG_CODE"
,
newUseRegistrationCertificateNumber
);
resultMap
.
put
(
equipId
,
map1
);
resultMap
.
put
(
equipId
,
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
}
}
}
}
/*
/*
* 获取电梯的原始技术参数
* 获取电梯的原始技术参数
* @param equipId
* @param equipId
*/
*/
public
Map
<
String
,
Object
>
getOriginalTechParams
(
String
equipId
)
{
public
Map
<
String
,
Object
>
getOriginalTechParams
(
String
equipId
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
))
{
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgTechParamsElevator
))
{
result
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
),
Map
.
class
);
result
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
),
Map
.
class
);
result
.
remove
(
"sequenceNbr"
);
result
.
remove
(
"sequenceNbr"
);
}
}
return
result
;
return
result
;
}
}
/**
/**
* 参数为监管码
* 参数为监管码
*
* @param supervisoryCode
* @param supervisoryCode
* @return
* @return
*/
*/
...
...
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/JgEquipTransferServiceImpl.java
View file @
a3e7c243
...
@@ -160,8 +160,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
...
@@ -160,8 +160,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setApplyStatus
(
taskName
[
0
]);
dto
.
setApplyStatus
(
taskName
[
0
]);
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgEquipTransferEq
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgEquipTransferEq
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgEquipTransferEq
.
setEquipTransferId
(
applyNo
);
jgEquipTransferEq
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
...
@@ -187,15 +185,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
...
@@ -187,15 +185,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
private
void
convertField
(
JgEquipTransferDto
model
)
{
private
void
convertField
(
JgEquipTransferDto
model
)
{
if
(
null
==
model
)
if
(
null
==
model
)
return
;
return
;
// 分割单位
String
useUnitId
=
model
.
getUseUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
String
[]
useUnitList
=
useUnitId
.
split
(
"_"
);
if
(
useUnitList
.
length
>
1
)
{
model
.
setUseUnitCreditCode
(
useUnitList
[
0
]);
model
.
setUseUnitName
(
useUnitList
[
1
]);
}
}
// 分割接收机构
// 分割接收机构
String
installUnitId
=
model
.
getInstallUnitCreditCode
();
String
installUnitId
=
model
.
getInstallUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
installUnitId
))
{
if
(!
ObjectUtils
.
isEmpty
(
installUnitId
))
{
...
@@ -287,7 +276,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
...
@@ -287,7 +276,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
}
}
@Override
@Override
public
Map
<
String
,
Map
<
String
,
Object
>
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
JgEquipTransfer
equipTransfer
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
JgEquipTransfer
equipTransfer
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
equipTransfer
))
{
if
(
Objects
.
isNull
(
equipTransfer
))
{
...
@@ -305,11 +294,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
...
@@ -305,11 +294,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
handleJsonArrayFields
(
equipTransferInfo
,
fields
);
handleJsonArrayFields
(
equipTransferInfo
,
fields
);
handleJsonArrayFields
(
equipmentInfos
.
get
(
0
),
fields
);
handleJsonArrayFields
(
equipmentInfos
.
get
(
0
),
fields
);
Map
<
String
,
Map
<
String
,
Object
>>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
result
.
put
(
"installationInfo"
,
equipTransferInfo
);
resultMap
.
put
(
"transferInfo"
,
equipmentInfos
.
get
(
0
));
result
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
return
result
;
equipTransferInfo
.
forEach
((
key
,
value
)
->
resultMap
.
computeIfAbsent
(
key
,
k
->
value
));
return
resultMap
;
}
}
@Override
@Override
...
@@ -320,8 +309,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
...
@@ -320,8 +309,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
private
Map
<
String
,
Object
>
createEquipTransferInfo
(
JgEquipTransfer
equipTransfer
)
{
private
Map
<
String
,
Object
>
createEquipTransferInfo
(
JgEquipTransfer
equipTransfer
)
{
Map
<
String
,
Object
>
equipTransferInfo
=
new
HashMap
<>(
BeanUtil
.
beanToMap
(
equipTransfer
));
Map
<
String
,
Object
>
equipTransferInfo
=
new
HashMap
<>(
BeanUtil
.
beanToMap
(
equipTransfer
));
equipTransferInfo
.
put
(
"useUnitCreditCode"
,
equipTransfer
.
getUseUnitCreditCode
()
+
"_"
+
equipTransfer
.
getUseUnitName
());
//
equipTransferInfo.put("useUnitCreditCode", equipTransfer.getUseUnitCreditCode() + "_" + equipTransfer.getUseUnitName());
equipTransferInfo
.
put
(
"installUnitCreditCode"
,
equipTransfer
.
getInstallUnitCreditCode
()
+
"_"
+
equipTransfer
.
getInstallUnitName
());
//
equipTransferInfo.put("installUnitCreditCode", equipTransfer.getInstallUnitCreditCode() + "_" + equipTransfer.getInstallUnitName());
return
equipTransferInfo
;
return
equipTransferInfo
;
}
}
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
a3e7c243
...
@@ -37,6 +37,8 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
...
@@ -37,6 +37,8 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -319,21 +321,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -319,21 +321,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"
produceCode"
));
// TODO: 制造
编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"
factoryNum"
));
// TODO: 出厂
编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"
fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"county
Name"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"
installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"street
Name"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
getValue
.
apply
(
"installType"
)
);
// TODO: 施工类别
placeholders
.
put
(
"installType"
,
"安装告知"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
getValue
.
apply
(
"installLicenseNo"
));
placeholders
.
put
(
"installLicenseNo"
,
getValue
.
apply
(
"installLicenseNo"
));
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"
installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
// TODO: 施工单位地址
placeholders
.
put
(
"
fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"
useUnitProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"useUnitA
ddress"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"
a
ddress"
));
// 生成二维码
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
...
@@ -458,7 +460,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -458,7 +460,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"
提交流程
"
);
dto
.
setComment
(
""
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
map
.
put
(
"approvalStatus"
,
"0"
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
...
@@ -498,6 +500,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -498,6 +500,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setEquList
((
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
))));
dto
.
setEntrustingUnitName
(
dto
.
getUseUnitName
());
StringBuffer
buffer
=
new
StringBuffer
();
buffer
.
append
(
dto
.
getProvinceName
()).
append
(
dto
.
getCityName
()).
append
(
dto
.
getCountyName
()).
append
(
dto
.
getAddress
());
dto
.
setEquAddress
(
buffer
.
toString
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
...
@@ -630,7 +637,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -630,7 +637,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getProcessAdvice
()))
{
dto
.
setComment
(
notice
.
getProcessAdvice
());
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
...
@@ -664,10 +673,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -664,10 +673,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
}
}
@Transactional
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
userId
=
RequestContext
.
getExeUserId
();
String
userId
=
RequestContext
.
getExeUserId
();
JgInstallationNotice
jgInstallationNotice
=
this
.
jgInstallationNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
JgInstallationNotice
jgInstallationNotice
=
this
.
jgInstallationNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
jgInstallationNotice
.
setProcessAdvice
(
dto
.
getProcessAdvice
());
// 组装设备注册代码
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
String
ym
=
null
;
...
@@ -706,7 +717,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -706,7 +717,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"
0"
:
jgInstallationNotice
.
getIsXixian
()
);
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"
null"
:
jgInstallationNotice
.
getIsXixian
().
equals
(
"0"
)
?
"null"
:
"1"
);
Map
<
String
,
Object
>
mapCode
;
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
mapCode
=
code
.
getResult
();
...
@@ -716,18 +727,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -716,18 +727,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
supervisoryCodeInfo
.
setStatus
(
"1"
);
supervisoryCodeInfo
.
setStatus
(
"1"
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
jgInstallationNotice
.
getSequenceNbr
());
jgInstallationNotice
.
setHandleDate
(
new
Date
());
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
// 更新其他业务表
// 更新其他业务表
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
}
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgRegistrationInfo
.
setEquCode
(
deviceRegistrationCode
);
tzsJgRegistrationInfo
.
setEquCode
(
deviceRegistrationCode
);
jgInstallationNotice
.
setEquRegisterCode
(
deviceRegistrationCode
);
jgInstallationNotice
.
setEquRegisterCode
(
deviceRegistrationCode
);
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
()
);
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
()
);
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
...
@@ -735,6 +749,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -735,6 +749,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
generateInstallationNoticeReport
(
jgInstallationNotice
.
getSequenceNbr
());
}
});
}
else
{
}
else
{
jgInstallationNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
jgInstallationNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getInstanceStatus
()))
{
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
a3e7c243
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -10,7 +11,6 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...
@@ -10,7 +11,6 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto
;
...
@@ -22,7 +22,6 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService;
...
@@ -22,7 +22,6 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
@@ -94,6 +93,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -94,6 +93,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
@Autowired
@Autowired
IDataDictionaryService
dataDictionaryService
;
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
public
static
byte
[]
file2byte
(
File
file
)
{
public
static
byte
[]
file2byte
(
File
file
)
{
...
@@ -127,8 +129,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -127,8 +129,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
notice
.
getConstructionContract
()));
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
notice
.
getConstructionContract
()));
maintainInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
maintainInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
maintainInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
maintainInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
maintainInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
maintainInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
maintainInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
maintainInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
ityName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
maintainInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
ounty
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
maintainInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
maintainInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
maintainInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
maintainInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitCreditCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitCreditCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitName
()))
{
...
@@ -163,10 +166,11 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -163,10 +166,11 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
public
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
)
{
public
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
String
[]
taskName
=
new
String
[]{
"流程结束"
};
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 字段转换
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
// 发起流程
// 发起流程
...
@@ -178,36 +182,31 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -178,36 +182,31 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
noticeDto
.
setInstanceId
(
instanceId
);
// 查询下节点任务
getNext
(
roleListFirst
,
instanceId
,
taskName
);
noticeDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"JgMaintainNoticeServiceImpl.updateMaintainNotice启动失败:{}"
,
e
);
log
.
error
(
"JgMaintainNoticeServiceImpl.updateMaintainNotice启动失败:{}"
,
e
);
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JgMaintainNotice
notice
=
new
JgMaintainNotice
();
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
BeanUtils
.
copyProperties
(
noticeDto
,
notice
);
String
taskId
=
dataObject
.
getString
(
"id"
);
boolean
submit
=
submit
(
notice
,
op
);
//组装信息
if
(
submit
)
{
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
// 查询下节点任务
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
getNext
(
roleListSecond
,
notice
.
getInstanceId
(),
taskName
);
taskResultDTO
.
setTaskId
(
taskId
);
notice
.
setStatus
(
taskName
[
0
]);
taskResultDTO
.
setComment
(
"提交流程"
);
if
(!
ObjectUtils
.
isEmpty
(
notice
.
getInstanceStatus
()))
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
notice
.
setInstanceStatus
(
notice
.
getInstanceStatus
()
+
","
+
roleListSecond
);
map
.
put
(
"approvalStatus"
,
op
);
}
else
{
taskResultDTO
.
setVariable
(
map
);
notice
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
//执行流程
AjaxResult
ajaxResult1
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgMaintainNotice
bean
=
new
JgMaintainNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
bean
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgMaintainNoticeMapper
.
updateById
(
bean
);
}
}
}
catch
(
Exception
e
)
{
notice
.
setPromoter
(
RequestContext
.
getExeUserId
());
log
.
error
(
"JgMaintainNoticeServiceImpl.updateMaintainNotice执行失败:{}"
,
e
);
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
throw
new
RuntimeException
(
e
);
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
updateById
(
notice
);
}
}
}
else
{
}
else
{
JgMaintainNotice
bean
=
new
JgMaintainNotice
();
JgMaintainNotice
bean
=
new
JgMaintainNotice
();
...
@@ -218,8 +217,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -218,8 +217,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
@Autowired
IDataDictionaryService
dataDictionaryService
;
/**
/**
* 分页查询
* 分页查询
*
*
...
@@ -289,14 +286,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -289,14 +286,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
*/
*/
@Override
@Override
public
String
generateMaintainNoticeReport
(
Long
sequenceNbr
)
{
public
String
generateMaintainNoticeReport
(
Long
sequenceNbr
)
{
if
(
Objects
.
isNull
(
sequenceNbr
))
if
(
Objects
.
isNull
(
sequenceNbr
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
JgMaintainNotice
jgMaintainNotice
=
this
.
getById
(
sequenceNbr
);
}
JgMaintainNotice
JgMaintainNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
if
(
Objects
.
isNull
(
jgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
if
(
Objects
.
isNull
(
JgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
Map
<
String
,
Object
>
maintain
=
informationList
.
get
(
0
);
}
Function
<
String
,
String
>
getValue
=
key
->
maintain
.
getOrDefault
(
key
,
""
).
toString
();
Map
<
String
,
Object
>
installation
=
informationList
.
get
(
0
);
Function
<
String
,
String
>
getValue
=
key
->
installation
.
getOrDefault
(
key
,
""
).
toString
();
// 组装模板变量
// 组装模板变量
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
...
@@ -304,18 +303,18 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -304,18 +303,18 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
placeholders
.
put
(
"applyNo"
,
getValue
.
apply
(
"applyNo"
));
placeholders
.
put
(
"applyNo"
,
getValue
.
apply
(
"applyNo"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
""
);
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
)
);
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号
- 设备出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
""
);
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
)
);
placeholders
.
put
(
"installType"
,
"
"
);
placeholders
.
put
(
"installType"
,
"
维修"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
""
);
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
""
);
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
...
@@ -328,6 +327,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -328,6 +327,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
try
{
try
{
pdfFile
=
this
.
wordToPdf
(
"installation-notification-report.ftl"
,
placeholders
);
pdfFile
=
this
.
wordToPdf
(
"installation-notification-report.ftl"
,
placeholders
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"word转pdf失败:{}"
,
e
);
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
// 上传pdf至文件服务器
// 上传pdf至文件服务器
...
@@ -336,11 +336,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -336,11 +336,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
try
{
try
{
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
"JgMaintainNoticeServiceImpl.generateMaintainNoticeReport删除临时文件失败:{}"
,
e
);
log
.
error
(
"删除临时文件失败:{}"
,
e
);
throw
new
RuntimeException
(
e
);
}
}
//更新到数据库
//
更新到数据库
j
gMaintainNotice
.
setNoticeReportUrl
(
url
);
J
gMaintainNotice
.
setNoticeReportUrl
(
url
);
this
.
updateById
(
j
gMaintainNotice
);
this
.
updateById
(
J
gMaintainNotice
);
return
url
;
return
url
;
}
}
...
@@ -378,43 +379,81 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -378,43 +379,81 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgMaintainNoticeDto
>
jgMaintainNoticeDtoMap
,
ReginParams
reginParams
)
{
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgMaintainNoticeDto
>
jgMaintainNoticeDtoMap
,
ReginParams
reginParams
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgMaintainNoticeDto
model
=
jgMaintainNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
JgMaintainNoticeDto
model
=
jgMaintainNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
// 字段转换
convertField
(
model
);
convertField
(
model
);
// 获取告知设备列表
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
return
;
return
;
}
// 获取告知单号
// 获取告知单号
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
WXGZ
.
getCode
(),
deviceList
.
size
());
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
WXGZ
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
return
;
}
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
// 判断当前是否为提交
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// 发起流程
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++
)
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setCompleteFirstTask
(
true
);
//
dto.setCompleteFirstTask(true);
list
.
add
(
dto
);
list
.
add
(
dto
);
}
}
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
try
{
try
{
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
for
(
Object
obj
:
returnList
)
{
for
(
Object
obj
:
returnList
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
String
instanceId
=
jsonObject
.
getString
(
"id"
);
instanceIdList
.
add
(
instanceId
);
// 查询下节点任务
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
}
// 推动下一个节点
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
dto
.
setVariable
(
map
);
// 执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
}
else
{
log
.
error
(
"提交失败"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"JgMaintainNoticeServiceImpl.saveNotice发起流程失败"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
List
<
JgMaintainNotice
>
list
=
new
ArrayList
<>();
List
<
JgMaintainNotice
>
list
=
new
ArrayList
<>();
List
<
JgMaintainNoticeEq
>
equipList
=
new
ArrayList
<>();
List
<
JgMaintainNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
...
@@ -425,6 +464,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -425,6 +464,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
String
applyNo
=
applyNoList
.
get
(
i
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setNoticeDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
...
@@ -432,20 +477,39 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -432,20 +477,39 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
}
else
{
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
jgMaintainNoticeMapper
.
insertBatchSomeColumn
(
list
);
jgMaintainNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgMaintainNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgMaintainNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgMaintainNotice
>
collect
=
list
.
stream
().
filter
(
jgMaintainNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
j
gMaintainNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
List
<
JgMaintainNotice
>
collect
=
list
.
stream
().
filter
(
JgMaintainNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
J
gMaintainNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
void
getNext
(
ArrayList
<
String
>
roleListFirst
,
String
instanceId
,
String
[]
taskName
)
{
AjaxResult
aj
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
aj
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
))
{
String
nextTaskId
=
taskNoAuth
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
taskName
[
0
]
=
taskNoAuth
.
getString
(
"name"
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleListFirst
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
}
private
void
convertField
(
JgMaintainNoticeDto
model
)
{
private
void
convertField
(
JgMaintainNoticeDto
model
)
{
...
@@ -475,6 +539,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -475,6 +539,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model
.
setCityName
(
cityList
[
1
]);
model
.
setCityName
(
cityList
[
1
]);
}
}
}
}
String
county
=
model
.
getCounty
();
String
county
=
model
.
getCounty
();
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
String
[]
countyList
=
county
.
split
(
"_"
);
...
@@ -509,6 +574,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -509,6 +574,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
}
}
String
constructionManager
=
model
.
getConstructionManagerId
();
if
(!
ObjectUtils
.
isEmpty
(
constructionManager
))
{
String
[]
constructionManagerList
=
constructionManager
.
split
(
"_"
);
if
(
constructionManagerList
.
length
>
1
)
{
model
.
setConstructionManagerId
(
constructionManagerList
[
0
]);
model
.
setConstructionManager
(
constructionManagerList
[
1
]);
}
}
String
inspectUnitId
=
model
.
getInspectionUnitCreditCode
();
String
inspectUnitId
=
model
.
getInspectionUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
inspectUnitId
))
{
if
(!
ObjectUtils
.
isEmpty
(
inspectUnitId
))
{
String
[]
inspectUnitIdList
=
inspectUnitId
.
split
(
"_"
);
String
[]
inspectUnitIdList
=
inspectUnitId
.
split
(
"_"
);
...
@@ -519,14 +594,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -519,14 +594,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
}
}
private
String
convertImageUrl
(
List
<
Map
<
String
,
String
>>
urlList
)
{
String
urls
=
""
;
if
(!
CollectionUtils
.
isEmpty
(
urlList
))
{
urls
=
urlList
.
stream
().
map
(
map
->
map
.
get
(
"url"
)).
collect
(
Collectors
.
joining
(
","
));
}
return
urls
;
}
public
boolean
submit
(
JgMaintainNotice
notice
,
String
op
)
{
public
boolean
submit
(
JgMaintainNotice
notice
,
String
op
)
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
notice
.
getInstanceId
());
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
notice
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
...
@@ -555,73 +622,69 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -555,73 +622,69 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
public
void
cancel
(
JgMaintainNoticeDto
noticeDto
)
{
public
void
cancel
(
JgMaintainNoticeDto
noticeDto
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgMaintainNotice
jgMaintainNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgMaintainNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
if
(
ajaxResult
.
getStatus
()
==
200
)
{
if
(
ajaxResult
.
getStatus
()
==
200
)
{
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
getNext
(
roleList
,
noticeDto
.
getInstanceId
(),
taskName
);
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
jgInstallationNotice
.
setStatus
(
taskName
[
0
]);
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
updateById
(
jgInstallationNotice
);
}
}
}
}
@Transactional
@Transactional
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
userId
=
RequestContext
.
getExeUserId
();
JgMaintainNotice
jgMaintainNotice
=
this
.
jgMaintainNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
JgMaintainNotice
jgMaintainNotice
=
this
.
jgMaintainNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 组装设备注册代码
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
String
ym
=
null
;
try
{
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
log
.
error
(
"
JgMaintainNoticeServiceImpl.accept
日期转换失败:{}"
,
e
);
log
.
error
(
"日期转换失败:{}"
,
e
);
}
}
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
queryWrapper
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgMaintainNoticeEq
jgRelationEquip
=
jgMaintainNoticeEqMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgMaintainNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
jgMaintainNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgMaintainNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
// map.put("isXiXian", jgMaintainNotice.getIsXixian() == null ? "0" : jgMaintainNotice.getIsXixian());
// Map<String, Object> mapCode;
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// mapCode = code.getResult();
// LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
// queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode, mapCode.get("superviseCode").toString());
// SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
boolean
submit
=
submit
(
jgMaintainNotice
,
op
);
boolean
submit
=
submit
(
jgMaintainNotice
,
op
);
if
(
submit
)
{
if
(
submit
)
{
getNext
(
roleList
,
dto
.
getInstanceId
(),
taskName
);
jgMaintainNotice
.
setStatus
(
taskName
[
0
]);
if
(
"0"
.
equals
(
op
))
{
if
(
"0"
.
equals
(
op
))
{
jgMaintainNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(
roleList
.
size
()
==
0
)
{
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
this
.
generateMaintainNoticeReport
(
jgMaintainNotice
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
// // 更新其他业务表
JgMaintainNoticeEq
jgRelationEquip
=
jgMaintainNoticeEqMapper
.
selectOne
(
queryWrapper
);
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
// jgMaintainNotice.setEquRegisterCode(deviceRegistrationCode);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgMaintainNotice
.
getCity
()).
append
(
ym
);
// jgMaintainNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
map
.
put
(
"cityCode"
,
jgMaintainNotice
.
getCity
());
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
map
.
put
(
"countyCode"
,
jgMaintainNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
generateMaintainNoticeReport
(
jgMaintainNotice
.
getSequenceNbr
());
jgMaintainNotice
.
setPromoter
(
""
);
}
else
{
jgMaintainNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgMaintainNotice
.
getInstanceStatus
()))
{
jgMaintainNotice
.
setInstanceStatus
(
jgMaintainNotice
.
getInstanceStatus
()
+
","
+
String
.
join
(
","
,
roleList
));
}
else
{
jgMaintainNotice
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
jgMaintainNotice
.
setPromoter
(
userId
);
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
}
else
{
}
else
{
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgMaintainNotice
.
setPromoter
(
""
);
jgMaintainNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
jgMaintainNoticeMapper
.
updatePromoter
(
jgMaintainNotice
.
getSequenceNbr
());
}
}
updateById
(
jgMaintainNotice
);
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
}
}
}
}
}
}
\ 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/JgReformNoticeServiceImpl.java
View file @
a3e7c243
...
@@ -2,12 +2,13 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,12 +2,13 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
...
@@ -36,6 +37,7 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
...
@@ -36,6 +37,7 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -45,22 +47,13 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -45,22 +47,13 @@ import org.springframework.web.multipart.MultipartFile;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -88,10 +81,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -88,10 +81,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
EquipmentCategoryMapper
equipmentCategoryMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
@Autowired
JgReformNoticeEqMapper
J
gReformNoticeEqMapper
;
JgReformNoticeEqMapper
j
gReformNoticeEqMapper
;
@Autowired
@Autowired
private
JgReformNoticeMapper
J
gReformNoticeMapper
;
private
JgReformNoticeMapper
j
gReformNoticeMapper
;
@Autowired
@Autowired
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
// @Autowired
// @Autowired
...
@@ -130,7 +123,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -130,7 +123,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Override
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
// 改造告知信息
JgReformNotice
notice
=
J
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
JgReformNotice
notice
=
j
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
return
null
;
}
}
...
@@ -138,7 +131,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -138,7 +131,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
i
tyName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
installationInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
oun
tyName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
// installationInfo.put("receiveOrgCreditCode", notice.getReceiveOrgCode() + "_" + notice.getReceiveOrgName());
// installationInfo.put("receiveOrgCreditCode", notice.getReceiveOrgCode() + "_" + notice.getReceiveOrgName());
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
...
@@ -152,7 +145,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -152,7 +145,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
...
@@ -161,6 +154,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -161,6 +154,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
}
}
installationInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
...
@@ -177,8 +171,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -177,8 +171,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
String
[]
taskName
=
new
String
[]{
"流程结束"
};
// 字段转换
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
// 发起流程
// 发起流程
...
@@ -190,45 +187,38 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -190,45 +187,38 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
noticeDto
.
setInstanceId
(
instanceId
);
// 查询下节点任务
getNext
(
roleListFirst
,
instanceId
,
taskName
);
noticeDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JgReformNotice
notice
=
new
JgReformNotice
();
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
BeanUtils
.
copyProperties
(
noticeDto
,
notice
);
String
taskId
=
dataObject
.
getString
(
"id"
);
// 组装信息
boolean
submit
=
submit
(
notice
,
op
);
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
if
(
submit
)
{
taskResultDTO
.
setTaskId
(
taskId
);
// 查询下节点任务
taskResultDTO
.
setComment
(
"提交流程"
);
getNext
(
roleListSecond
,
notice
.
getInstanceId
(),
taskName
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
notice
.
setStatus
(
taskName
[
0
]);
map
.
put
(
"approvalStatus"
,
op
);
if
(!
ObjectUtils
.
isEmpty
(
notice
.
getInstanceStatus
()))
{
taskResultDTO
.
setVariable
(
map
);
notice
.
setInstanceStatus
(
notice
.
getInstanceStatus
()
+
","
+
roleListSecond
);
// 执行流程
}
else
{
AjaxResult
ajaxResult1
;
notice
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
bean
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNoticeMapper
.
updateById
(
bean
);
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
if
(
rollBack
)
{
JgReformNoticeMapper
.
updatePromoter
(
noticeDto
.
getSequenceNbr
());
}
}
}
}
catch
(
Exception
e
)
{
notice
.
setPromoter
(
RequestContext
.
getExeUserId
());
log
.
error
(
"提交失败:{}"
,
e
);
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
notice
);
}
}
}
else
{
}
else
{
JgReformNotice
bean
=
new
JgReformNotice
();
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
J
gReformNoticeMapper
.
updateById
(
bean
);
j
gReformNoticeMapper
.
updateById
(
bean
);
}
}
return
noticeDto
;
return
noticeDto
;
}
}
...
@@ -246,7 +236,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -246,7 +236,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
JgReformNotice
>
noticePage
=
J
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgReformNotice
>
noticePage
=
j
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
...
@@ -307,7 +297,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -307,7 +297,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
JgReformNotice
JgReformNotice
=
this
.
getById
(
sequenceNbr
);
JgReformNotice
JgReformNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
}
}
...
@@ -323,21 +313,21 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -323,21 +313,21 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
""
);
// TODO: 制造
编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号 - 设备出厂
编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
""
);
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
)
);
placeholders
.
put
(
"installType"
,
""
);
// TODO: 施工类别
placeholders
.
put
(
"installType"
,
"
改造
"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
""
);
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
""
);
// TODO: 施工单位地址
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
)
);
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnit
ProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"useUnit
Address"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
...
@@ -405,6 +395,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -405,6 +395,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgReformNoticeDto
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgReformNoticeDto
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgReformNoticeDto
model
=
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
JgReformNoticeDto
model
=
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
// 字段转换
convertField
(
model
);
convertField
(
model
);
...
@@ -421,6 +413,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -421,6 +413,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
;
return
;
}
}
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
// 判断当前是否为提交
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
@@ -433,7 +427,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -433,7 +427,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setCompleteFirstTask
(
true
);
//
dto.setCompleteFirstTask(true);
list
.
add
(
dto
);
list
.
add
(
dto
);
}
}
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
@@ -444,14 +438,42 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -444,14 +438,42 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
for
(
Object
obj
:
returnList
for
(
Object
obj
:
returnList
)
{
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
String
instanceId
=
jsonObject
.
getString
(
"id"
);
instanceIdList
.
add
(
instanceId
);
// 查询下节点任务
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
}
// 推动下一个节点
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
dto
.
setVariable
(
map
);
// 执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
}
else
{
log
.
error
(
"提交失败"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNoticeEq
>
equipList
=
new
ArrayList
<>();
List
<
JgReformNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
...
@@ -462,22 +484,32 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -462,22 +484,32 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
String
applyNo
=
applyNoList
.
get
(
i
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setNoticeDate
(
new
Date
());
dto
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_DEFINE"
)));
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setEntrustingUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setEntrustingUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
}
else
{
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
J
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
j
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgReformNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgReformNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgReformNotice
>
collect
=
list
.
stream
().
filter
(
JgReformNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgReformNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
List
<
JgReformNotice
>
collect
=
list
.
stream
().
filter
(
JgReformNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgReformNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
...
@@ -485,10 +517,26 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -485,10 +517,26 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
J
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
j
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
}
void
getNext
(
ArrayList
<
String
>
roleListFirst
,
String
instanceId
,
String
[]
taskName
)
{
AjaxResult
aj
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
aj
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
))
{
String
nextTaskId
=
taskNoAuth
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
taskName
[
0
]
=
taskNoAuth
.
getString
(
"name"
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleListFirst
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
private
void
convertField
(
JgReformNoticeDto
model
)
{
private
void
convertField
(
JgReformNoticeDto
model
)
{
// 处理图片
// 处理图片
// if (!ValidationUtil.isEmpty(model.getProxyStatementAttachmentList())) {
// if (!ValidationUtil.isEmpty(model.getProxyStatementAttachmentList())) {
...
@@ -554,7 +602,14 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -554,7 +602,14 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
}
}
String
constructionManagerId
=
model
.
getConstructionManagerId
();
if
(!
ObjectUtils
.
isEmpty
(
constructionManagerId
))
{
String
[]
constructionManagerIdList
=
constructionManagerId
.
split
(
"_"
);
if
(
constructionManagerIdList
.
length
>
1
)
{
model
.
setConstructionManagerId
(
constructionManagerIdList
[
0
]);
model
.
setConstructionManager
(
constructionManagerIdList
[
1
]);
}
}
// String inspectUnitId = model.getInspectUnitId();
// String inspectUnitId = model.getInspectUnitId();
// if (!ObjectUtils.isEmpty(inspectUnitId)) {
// if (!ObjectUtils.isEmpty(inspectUnitId)) {
// String[] inspectUnitIdList = inspectUnitId.split("_");
// String[] inspectUnitIdList = inspectUnitId.split("_");
...
@@ -602,20 +657,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -602,20 +657,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
public
void
cancel
(
JgReformNoticeDto
noticeDto
)
{
public
void
cancel
(
JgReformNoticeDto
noticeDto
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgReformNotice
JgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgReformNotice
jgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
if
(
ajaxResult
.
getStatus
()
==
200
)
{
if
(
ajaxResult
.
getStatus
()
==
200
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
getNext
(
roleList
,
noticeDto
.
getInstanceId
(),
taskName
);
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgReformNotice
.
setStatus
(
taskName
[
0
]);
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgReformNotice
.
setPromoter
(
""
);
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
}
}
}
}
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgReformNotice
JgReformNotice
=
this
.
JgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
String
userId
=
RequestContext
.
getExeUserId
();
JgReformNotice
jgReformNotice
=
this
.
jgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 组装设备注册代码
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
String
ym
=
null
;
...
@@ -625,83 +684,81 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -625,83 +684,81 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
log
.
error
(
"日期转换失败:{}"
,
e
);
log
.
error
(
"日期转换失败:{}"
,
e
);
}
}
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgReformNoticeEq
jgRelationEquip
=
JgReformNoticeEqMapper
.
selectOne
(
queryWrapper
);
boolean
submit
=
submit
(
jgReformNotice
,
op
);
// LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
// queryWrapper1.eq(OtherInfo::getRecord, jgRelationEquip.getEquId());
// OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgReformNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
JgReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
JgReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
JgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
JgReformNotice
.
getIsXixian
());
// Map<String, Object> mapCode;
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// mapCode = code.getResult();
//
// LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
// queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode, mapCode.get("superviseCode").toString());
// SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
boolean
submit
=
submit
(
JgReformNotice
,
op
);
if
(
submit
)
{
if
(
submit
)
{
getNext
(
roleList
,
dto
.
getInstanceId
(),
taskName
);
jgReformNotice
.
setStatus
(
taskName
[
0
]);
if
(
"0"
.
equals
(
op
))
{
if
(
"0"
.
equals
(
op
))
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
if
(
roleList
.
size
()
==
0
)
{
this
.
generateInstallationNoticeReport
(
JgReformNotice
.
getSequenceNbr
());
// 更新其他业务表
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
JgReformNoticeEq
jgRelationEquip
=
jgReformNoticeEqMapper
.
selectOne
(
queryWrapper
);
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// JgReformNotice.setEquRegisterCode(deviceRegistrationCode);
// LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
// JgReformNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// queryWrapper1.eq(OtherInfo::getRecord, jgRelationEquip.getEquId());
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgReformNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
jgReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
jgReformNotice
.
getIsXixian
());
// Map<String, Object> mapCode;
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// mapCode = code.getResult();
//
// LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
// queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode, mapCode.get("superviseCode").toString());
// SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
jgReformNotice
.
setAcceptDate
(
new
Date
());
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
jgReformNotice
.
getSequenceNbr
());
// 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// jgInstallationNotice.setEquRegisterCode(deviceRegistrationCode);
// jgInstallationNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// Map<String,Map<String,Object>> objMap = new HashMap<>();
// Map<String,Object> map1 =new HashMap<>();
// map1.put("CODE96333",tzsJgOtherInfo.getCode96333() );
// map1.put("EQU_CODE",tzsJgRegistrationInfo.getEquCode() );
// map1.put("SUPERVISORY_CODE",tzsJgOtherInfo.getSupervisoryCode());
// objMap.put(tzsJgOtherInfo.getRecord(),map1);
jgReformNotice
.
setPromoter
(
""
);
// tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
else
{
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgReformNotice
.
getInstanceStatus
()))
{
jgReformNotice
.
setInstanceStatus
(
jgReformNotice
.
getInstanceStatus
()
+
","
+
String
.
join
(
","
,
roleList
));
}
else
{
jgReformNotice
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
jgReformNotice
.
setPromoter
(
userId
);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
}
else
{
}
else
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgReformNotice
.
setPromoter
(
""
);
// JgReformNotice.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
if
(
rollBack
)
{
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
}
}
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
}
}
// // 组装监管码
// String division = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// division = "X";
// } else {
// //生成监管码前缀
// Map<String, Object> divisionMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCounty());
// division = ObjectUtils.isEmpty(divisionMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCity()).get("code").toString() : divisionMap.get("code").toString();
// }
//
// // 组装96333码
// String prefix = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// prefix = EquipmentCategoryEnum.XXCSM.getValue();
// } else {
// Map<String, Object> elevatorMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCounty());
// prefix = ObjectUtils.isEmpty(elevatorMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCity()).get("code").toString() : elevatorMap.get("code").toString();
// }
}
}
}
}
\ 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/JgScrapCancelServiceImpl.java
View file @
a3e7c243
...
@@ -239,111 +239,6 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -239,111 +239,6 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
// public String flowExecute(Long id,String instanceId, String operate, String comment, Boolean update) {
// String role = "";
// String taskName = "流程结束";
// ArrayList<String> roleList = new ArrayList<>();
// 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);
// // 查询下节点任务
// 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");
// taskName = nextTask.getString("name");
// 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();
// }
// role= String.join(",", roleList);
// if (update) {
// Boolean rollBack = "1".equals(operate) ? true : false;
// updateStatus(id,instanceId, taskName, role, rollBack);
// }
// return role;
// }
//
//
// public void updateStatus(Long id , String instanceId, String taskName, String role, Boolean rollBack) {
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// LambdaQueryWrapper<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda();
// lambda.eq(JgScrapCancel::getSequenceNbr, id);
// JgScrapCancel jgScrapCancel = this.getBaseMapper().selectOne(lambda);
// if ("流程结束".equals(taskName)) {
// jgScrapCancel.setStatus(taskName);
// jgScrapCancel.setAuditStatus(CancelWorkFlowStatusEnum.COMPLETE.getName());
//
//
// LambdaQueryWrapper<JgScrapCancelEq> lambdaEq = new QueryWrapper<JgScrapCancelEq>().lambda();
// lambdaEq.eq(JgScrapCancelEq::getEquipTransferId, id);
// JgScrapCancelEq jgScrapCancelEq = jgScrapCancelEqMapper.selectOne(lambdaEq);
//
// ResponseModel<String> responseModel = tzsServiceFeignClient.useRegistrationCode(idxBizJgOtherInfoMapper.getSupervisoryCodeByEquipmentCode(jgScrapCancelEq.getEquId()));
// String newUseRegistrationCertificateNumber=responseModel.getResult().split("-")[0];
//
// Map<String,Map<String,Object>> resultMap = new HashMap<>();
// Map<String,Object> map1 =new HashMap<>();
// map1.put("USE_ORG_CODE",newUseRegistrationCertificateNumber );
// if (CancelTypeEnum.SCRAPPED.getCode().equals(jgScrapCancel.getCancelType())) {
// IdxBizJgUseInfo idxBizJgUseInfo = new IdxBizJgUseInfo();
// idxBizJgUseInfo.setEquState(String.valueOf(EquimentEnum.BAOFEI.getCode()));
// LambdaQueryWrapper<IdxBizJgUseInfo> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(IdxBizJgUseInfo::getRecord, jgScrapCancelEq.getEquId());
// idxBizJgUseInfoMapper.update(idxBizJgUseInfo, wrapper);
// map1.put("EQU_STATE", String.valueOf(EquimentEnum.BAOFEI.getCode()));
// } else {
// SuperviseInfo superviseInfo = new SuperviseInfo();
// superviseInfo.setOrgBranchCode("");
// superviseInfo.setOrgBranchName("");
// LambdaQueryWrapper<SuperviseInfo> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(SuperviseInfo::getRecord, jgScrapCancelEq.getEquId());
// superviseInfoMapper.update(superviseInfo, wrapper);
// map1.put("ORG_BRANCH_CODE", "");
// map1.put("ORG_BRANCH_NAME", "");
// }
// resultMap.put(jgScrapCancelEq.getEquId(), map1);
// tzsServiceFeignClient.commonUpdateEsDataByIds(resultMap);
// } else {
// jgScrapCancel.setNextExecuteIds(role);
// jgScrapCancel.setPromoter(reginParams.getUserModel().getUserId());
// if (!ObjectUtils.isEmpty(jgScrapCancel.getInstanceStatus())) {
// jgScrapCancel.setInstanceStatus(jgScrapCancel.getInstanceStatus() + "," + role);
// } else {
// jgScrapCancel.setInstanceStatus(role);
// }
// }
// CancelWorkFlowStatusEnum message = CancelWorkFlowStatusEnum.getMessage(taskName);
// assert message != null;
// if (rollBack){
// jgScrapCancel.setAuditStatus(message.getRollBack());
// this.getBaseMapper().update(jgScrapCancel, lambda);
// this.getBaseMapper().updatePromoter(jgScrapCancel.getSequenceNbr());
// }else {
// jgScrapCancel.setAuditStatus(message.getPass());
// this.getBaseMapper().update(jgScrapCancel, lambda);
// }
// }
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
jgScrapCancel
.
setIsDelete
(
true
);
jgScrapCancel
.
setIsDelete
(
true
);
...
@@ -386,9 +281,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -386,9 +281,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
if
(
submit
)
{
if
(
submit
)
{
// 查询下节点任务
// 查询下节点任务
getNext
(
roleListSecond
,
jgScrapCancel
.
getInstanceId
(),
taskName
);
getNext
(
roleListSecond
,
jgScrapCancel
.
getInstanceId
(),
taskName
);
String
join
=
String
.
join
(
","
,
roleListSecond
);
jgScrapCancel
.
setStatus
(
taskName
[
0
]);
jgScrapCancel
.
setStatus
(
taskName
[
0
]);
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
roleListSecond
);
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
join
);
}
else
{
}
else
{
jgScrapCancel
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
jgScrapCancel
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
a3e7c243
...
@@ -14,7 +14,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
...
@@ -14,7 +14,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
Use
StatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
WorkFlow
StatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
...
@@ -24,10 +24,12 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo;
...
@@ -24,10 +24,12 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
...
@@ -38,7 +40,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -38,7 +40,6 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -71,7 +72,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -71,7 +72,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
TzsServiceFeignClient
tzsServiceFeignClient
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
return
listPage
;
}
}
...
@@ -83,6 +85,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -83,6 +85,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Transactional
@Transactional
public
void
save
(
JSONObject
map
)
{
public
void
save
(
JSONObject
map
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
...
@@ -104,11 +107,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -104,11 +107,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setUseUnitName
(
useInfo
.
getUseUnitName
());
jgUseRegistration
.
setUseUnitName
(
useInfo
.
getUseUnitName
());
jgUseRegistration
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgUseRegistration
.
setUseUnitCreditCode
(
useInfo
.
getUseUnitCreditCode
());
jgUseRegistration
.
setUseUnitCreditCode
(
"91610131628001738N"
);
if
(
map
.
containsKey
(
"receiveCompanyCode"
))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
))){
jgUseRegistration
.
setReceiveCompanyCode
(
String
.
valueOf
(
map
.
getString
(
"receiveCompanyCode"
)));
}
else
{
jgUseRegistration
.
setReceiveCompanyCode
(
"610000"
);
}
// 使用单位提交
jgUseRegistration
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
))){
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
jgUseRegistration
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
jgUseRegistration
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
}
}
...
@@ -122,11 +131,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -122,11 +131,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 业务管理设备信息保存
// 业务管理设备信息保存
JgUseRegistrationEq
jgRelationEquip
=
new
JgUseRegistrationEq
();
JgUseRegistrationEq
jgRelationEquip
=
new
JgUseRegistrationEq
();
jgRelationEquip
.
setEquId
(
map
.
get
(
"equipId"
).
toString
());
jgRelationEquip
.
setEquId
(
map
.
get
(
"equipId"
).
toString
());
// jgRelationEquip.setBusinessType(String.valueOf(BusinessTypeEnum.USAGE_REGISTRATION.getCode()));
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
jgUseRegistration
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
jgUseRegistration
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
jgUseRegistration
.
setAuditStatus
(
"待提交"
);
jgUseRegistration
.
setAuditStatus
(
"待提交"
);
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
SUBMIT
.
getPass
());
jgUseRegistration
.
setStatus
(
WorkFlowStatusEnum
.
USE_
SUBMIT
.
getPass
());
this
.
save
(
jgUseRegistration
);
this
.
save
(
jgUseRegistration
);
jgRelationEquip
.
setEquipTransferId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquipTransferId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
jgRelationEquipMapper
.
insert
(
jgRelationEquip
);
jgRelationEquipMapper
.
insert
(
jgRelationEquip
);
...
@@ -139,19 +147,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -139,19 +147,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
else
{
}
else
{
// 启动并执行流程
// 启动并执行流程
instanceId
=
startByVariable
();
instanceId
=
startByVariable
();
jgUseRegistration
.
setInstanceStatus
(
"1460532889249755137"
);
// jgUseRegistration.setInstanceStatus("1460532889249755137");
jgUseRegistration
.
setReceiveCompanyCode
(
"610000"
);
// jgUseRegistration.setReceiveCompanyCode("610000");
updateExecuteIds
(
instanceId
,
jgUseRegistration
.
getSequenceNbr
(),
"0"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
// 执行流程
String
status
=
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
true
);
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
);
jgUseRegistration
.
setAuditStatus
(
"已提交"
);
// 更新数据信息
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
RECEIVE
.
getPass
()
);
updateExecuteIds
(
instanceId
,
jgUseRegistration
.
getSequenceNbr
(),
"0"
);
}
}
jgUseRegistration
.
setInstanceId
(
instanceId
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
}
}
}
}
...
@@ -170,30 +176,66 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -170,30 +176,66 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
instanceId
;
return
instanceId
;
}
}
public
String
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
// public String flowExecute(Long id,String instanceId, String operate, String comment, Boolean update) {
// String role = "";
// String taskName = "流程结束";
// ArrayList<String> roleList = new ArrayList<>();
// 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);
// // 查询下节点任务
// 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");
// taskName = nextTask.getString("name");
// 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();
// }
// role= String.join(",", roleList);
// if (update) {
// Boolean rollBack = "1".equals(operate) ? true : false;
// updateStatus(id,instanceId, taskName, role, rollBack);
// }
// return role;
// }
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
role
=
""
;
String
task
Name
=
"流程结束"
;
String
task
Code
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
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
);
// 查询下节点任务
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
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
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
...
@@ -205,43 +247,90 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -205,43 +247,90 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
role
=
String
.
join
(
","
,
roleList
);
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCode
))
{
if
(
update
)
{
role
=
String
.
join
(
","
,
roleList
);
Boolean
rollBack
=
"1"
.
equals
(
operate
)
?
true
:
false
;
updateStatus
(
id
,
instanceId
,
taskName
,
role
,
rollBack
);
}
return
role
;
}
public
void
updateStatus
(
Long
id
,
String
instanceId
,
String
taskName
,
String
role
,
Boolean
rollBack
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
id
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
jgUseRegistration
.
setStatus
(
taskName
);
jgUseRegistration
.
setAuditStatus
(
"已完成"
);
}
else
{
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setInstanceId
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
}
else
{
jgUseRegistration
.
setInstanceStatus
(
role
);
jgUseRegistration
.
setInstanceStatus
(
role
);
}
}
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
if
(
"0"
.
equals
(
operate
))
{
jgUseRegistration
.
setStatus
(
message
.
getPass
());
// 通过操作
jgUseRegistration
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
}
else
{
// 驳回操作
jgUseRegistration
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgUseRegistration
.
setPromoter
(
null
);
}
}
else
{
jgUseRegistration
.
setStatus
(
taskCode
);
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getSupervisoryCode
()))
{
// 生成使用登记证编号
jgUseRegistration
.
setUseRegistrationCode
(
getCode
(
jgUseRegistration
.
getSupervisoryCode
()));
}
}
}
if
(
rollBack
){
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
this
.
getBaseMapper
().
updatePromoter
(
jgUseRegistration
.
getSequenceNbr
());
}
}
else
{
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
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
();
}
}
// 更新下一步执行人
updateExecuteIds
(
instanceId
,
id
,
operate
);
}
}
// public void updateStatus(Long id , String instanceId, String taskName, String role, Boolean rollBack) {
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// LambdaQueryWrapper<JgUseRegistration> lambda = new QueryWrapper<JgUseRegistration>().lambda();
// lambda.eq(JgUseRegistration::getSequenceNbr, id);
// JgUseRegistration jgUseRegistration = this.getBaseMapper().selectOne(lambda);
// if ("流程结束".equals(taskName)) {
// jgUseRegistration.setStatus(taskName);
// jgUseRegistration.setAuditStatus("已完成");
// } else {
// jgUseRegistration.setNextExecuteIds(role);
// jgUseRegistration.setPromoter(reginParams.getUserModel().getUserId());
// if (!ObjectUtils.isEmpty(jgUseRegistration.getInstanceStatus())) {
// jgUseRegistration.setInstanceStatus(jgUseRegistration.getInstanceStatus() + "," + role);
// } else {
// jgUseRegistration.setInstanceStatus(role);
// }
// UseStatusEnum message = UseStatusEnum.getMessage(taskName);
// jgUseRegistration.setStatus(message.getPass());
// }
// if (rollBack){
// this.getBaseMapper().update(jgUseRegistration, lambda);
// this.getBaseMapper().updatePromoter(jgUseRegistration.getSequenceNbr());
// }else {
// this.getBaseMapper().update(jgUseRegistration, lambda);
// }
// }
public
void
withdraw
(
String
instanceId
)
{
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskCode
=
""
;
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
...
@@ -250,28 +339,32 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -250,28 +339,32 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
workFlowFeginService
.
rollBack
(
instanceId
);
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
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
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
if
(((
Map
<?,
?>
)
datum
).
containsKey
(
"groupId"
))
{
roleList
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
roleList
.
add
(((
Map
<?,
?>
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
taskName
))
{
if
(!
ObjectUtils
.
isEmpty
(
taskCode
))
{
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
jgUseRegistration
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
String
join
=
String
.
join
(
","
,
roleList
);
JgUseRegistration
jgUseRegistration1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
jgUseRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
this
.
updateStatus
(
jgUseRegistration1
.
getSequenceNbr
(),
instanceId
,
taskName
,
join
,
true
);
jgUseRegistration
.
setNextExecuteIds
(
join
);
this
.
update
(
jgUseRegistration
,
lambda
);
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
@@ -299,6 +392,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -299,6 +392,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 参数为监管码
* 参数为监管码
*
* @param supervisoryCode
* @param supervisoryCode
* @return
* @return
*/
*/
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
View file @
a3e7c243
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEqui
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEqui
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -19,6 +20,7 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
...
@@ -19,6 +20,7 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
public
Page
<
JyjcInspectionApplicationModel
>
queryForDataList
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
applicationUnitName
,
String
equipClassify
,
String
inspectionUnitCode
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
);
public
Page
<
JyjcInspectionApplicationModel
>
queryForDataList
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
applicationUnitName
,
String
equipClassify
,
String
inspectionUnitCode
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
);
// public Page<JyjcInspectionApplicationModel> queryForDataList( Page<JyjcInspectionApplication> page, String applicationNo, String inspectionClassify, String applicationUnitCode,String applicationUnitName, String equipClassify, String inspectionUnitCode,String inspectionUnitName, String applicationDate, String acceptDate, String inspectionChargePerson, String status , String bizType, List<String> roleIds);
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
@Param
(
"equipClassify"
)
String
equipClassify
);
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
@Param
(
"equipClassify"
)
String
equipClassify
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
a3e7c243
...
@@ -149,4 +149,7 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -149,4 +149,7 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"报检单位"
)
@ApiModelProperty
(
value
=
"报检单位"
)
private
String
applicationUnitName
;
private
String
applicationUnitName
;
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationRequstDto.java
View file @
a3e7c243
...
@@ -44,6 +44,6 @@ public class JyjcOpeningApplicationRequstDto {
...
@@ -44,6 +44,6 @@ public class JyjcOpeningApplicationRequstDto {
@ApiModelProperty
(
value
=
"申请时间"
)
@ApiModelProperty
(
value
=
"申请时间"
)
private
String
applyTime
;
private
String
applyTime
;
@ApiModelProperty
(
value
=
"supervision: 监管; enterprise: 企业"
)
private
String
type
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
a3e7c243
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
and inspection_unit_code in (select use_code from tz_base_enterprise_info where use_unit like concat('%',#{inspectionUnitName},'%'))
and inspection_unit_code in (select use_code from tz_base_enterprise_info where use_unit like concat('%',#{inspectionUnitName},'%'))
</if>
</if>
<if
test=
"inspectionUnitCode != null and inspectionUnitCode != ''"
>
<if
test=
"inspectionUnitCode != null and inspectionUnitCode != ''"
>
and inspection_unit_code = #{inspectionUnitCode}
and inspection_unit_code = #{inspectionUnitCode}
and status != '6610'
</if>
</if>
<if
test=
"applicationUnitCode != null and applicationUnitCode != ''"
>
<if
test=
"applicationUnitCode != null and applicationUnitCode != ''"
>
and application_unit_code = #{applicationUnitCode}
and application_unit_code = #{applicationUnitCode}
...
@@ -73,8 +73,13 @@
...
@@ -73,8 +73,13 @@
<if
test=
"bizType != null and bizType != ''"
>
<if
test=
"bizType != null and bizType != ''"
>
and biz_type = #{bizType}
and biz_type = #{bizType}
</if>
</if>
<!-- <if test="roleIds.size()>0">-->
<!-- <foreach collection="roleIds" item="item" separator="or">-->
<!-- and workflow_role like concat('%',#{item},'%')-->
<!-- </foreach>-->
<!-- </if>-->
</where>
</where>
order by tzjia.application_
date
desc
order by tzjia.application_
no
desc
</select>
</select>
<select
id=
"listByCategory"
<select
id=
"listByCategory"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel"
>
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel"
>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
a3e7c243
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.rectification, res.remark,
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.rectification, res.remark,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name, equ_code, use_inner_code, ibjri.equ_list,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name, equ_code, use_inner_code, ibjri.equ_list,
tec1.name equ_list_name, ibjri.equ_category
tec1.name equ_list_name, ibjri.equ_category
, ibjoi.SUPERVISORY_CODE supervisoryCode
, use_org_code, res.equ_define, ibjui.ADDRESS equUseAddress, bei.use_unit inspectionUnitName, bei1.use_unit applicationUnitName, cdb.name inspectionTypeName
, use_org_code, res.equ_define, ibjui.ADDRESS equUseAddress, bei.use_unit inspectionUnitName, bei1.use_unit applicationUnitName, cdb.name inspectionTypeName
from tz_jyjc_inspection_result res
from tz_jyjc_inspection_result res
-- left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.supervisory_code
left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.record
left join idx_biz_jg_use_info ibjui on ibjui.record = res.equip_unicode
left join idx_biz_jg_use_info ibjui on ibjui.record = res.equip_unicode
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
left join tz_equipment_category tec on ibjri.equ_category = tec.code
left join tz_equipment_category tec on ibjri.equ_category = tec.code
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
a3e7c243
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
<if
test=
"applyStartTime != '' and applyStartTime != null"
>
<if
test=
"applyStartTime != '' and applyStartTime != null"
>
and apply_time
>
=#{applyStartTime}
and apply_time
>
=#{applyStartTime}
</if>
</if>
<if
test=
"jyjcOpeningApplicationRequstDto.type == 'supervision'"
>
and status not in ('6610')
</if>
</where>
</where>
order by sequence_nbr desc
order by sequence_nbr desc
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionApplicationController.java
View file @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
...
@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -50,8 +53,16 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -50,8 +53,16 @@ public class JyjcInspectionApplicationController extends BaseController {
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
model
.
put
(
"applicationUnitCode"
,
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
model
.
put
(
"applicationUnitCode"
,
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
if
(
model
.
get
(
"operationType"
).
toString
().
equals
(
"2"
)
||
model
.
get
(
"operationType"
).
toString
().
equals
(
"0"
)){
if
(
null
==
model
.
get
(
"equip"
)
||
model
.
getJSONArray
(
"equip"
).
size
()
<
1
){
return
CommonResponseUtil
.
failure
(
"未选择报检设备时不可提交"
);
}
}
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
save
(
model
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
save
(
model
));
}
}
...
@@ -133,14 +144,16 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -133,14 +144,16 @@ public class JyjcInspectionApplicationController extends BaseController {
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
@RequestParam
(
required
=
false
)
String
status
,
@RequestParam
(
required
=
false
)
String
roles
,
String
bizType
)
{
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
inspectionUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
inspectionUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
List
<
String
>
roleIds
=
StrUtil
.
split
(
roles
,
","
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
}
}
...
@@ -158,14 +171,18 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -158,14 +171,18 @@ public class JyjcInspectionApplicationController extends BaseController {
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
applicationDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
acceptDate
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
inspectionChargePerson
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
@RequestParam
(
required
=
false
)
String
roles
,
@RequestParam
(
required
=
false
)
String
status
,
String
bizType
)
{
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
Page
<
JyjcInspectionApplication
>
page
=
new
Page
<
JyjcInspectionApplication
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
applicationUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
applicationUnitCode
=
reginParams
.
getCompany
().
getCompanyCode
();
List
<
String
>
roleIds
=
StrUtil
.
split
(
roles
,
","
);
// return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.queryForJyjcInspectionApplicationPage(page,applicationNo,inspectionClassify,applicationUnitCode,equipClassify,inspectionUnitCode,applicationUnitName,inspectionUnitName,applicationDate,acceptDate,inspectionChargePerson,status,bizType,roleIds));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
queryForJyjcInspectionApplicationPage
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
equipClassify
,
inspectionUnitCode
,
applicationUnitName
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
));
}
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
0 → 100644
View file @
a3e7c243
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-YMT"
,
path
=
"/ymt"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsServiceFeignClient
{
/**
* 创建监管码及96333
*
* @param map 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
createCode
(
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 创建监管码及96333
*
* @param paramMap 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/commonUpdateEsData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
);
/**
* 申请单编号生成
* @param type 参考ApplicationFormTypeEnum中的枚举
* @param batchSize batchSize
* @return List
*/
@RequestMapping
(
value
=
"/generate-code/applicationFormCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
applicationFormCode
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"batchSize"
)
int
batchSize
);
/**
* 生成设备注册编码
* @param key 16位
* @return 生成设备注册编码(20位)
*/
@RequestMapping
(
value
=
"/generate-code/deviceRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
deviceRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
/**
* 使用登记证生成
* @param key 起11陕C
* @return 生成使用登记证编号(13位,起11陕C00001(23))
*/
@RequestMapping
(
value
=
"/generate-code/useRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
useRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
a3e7c243
...
@@ -95,8 +95,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -95,8 +95,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
)
{
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
//开启报检流程工作流
//接口通用 部分页面按钮无法分开配置类型 所以根据业务情况 将带有工作流实例id的数据 接口类型设置为2 走编辑逻辑
JyjcInspectionApplicationModel
model
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
obj
),
JyjcInspectionApplicationModel
.
class
);
JyjcInspectionApplicationModel
model
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
obj
),
JyjcInspectionApplicationModel
.
class
);
if
(
CharSequenceUtil
.
isNotEmpty
(
model
.
getProcessInstanceId
())
&&
model
.
getOperationType
().
equals
(
"0"
)){
if
(
CharSequenceUtil
.
isNotEmpty
(
model
.
getProcessInstanceId
())
&&
model
.
getOperationType
().
equals
(
"0"
)){
model
.
setOperationType
(
"2"
);
model
.
setOperationType
(
"2"
);
...
@@ -109,6 +108,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -109,6 +108,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
dto
.
setProcessDefinitionKey
(
model
.
getProcessKey
());
dto
.
setProcessDefinitionKey
(
model
.
getProcessKey
());
dto
.
setBusinessKey
(
buildOrderNo
());
dto
.
setBusinessKey
(
buildOrderNo
());
try
{
try
{
//开启报检流程工作流
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
startByVariable
(
dto
);
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
startByVariable
(
dto
);
String
id
=
((
Map
)
ajaxResult
.
getResult
()).
get
(
"id"
).
toString
();
String
id
=
((
Map
)
ajaxResult
.
getResult
()).
get
(
"id"
).
toString
();
model
.
setProcessInstanceId
(
id
);
model
.
setProcessInstanceId
(
id
);
...
@@ -130,7 +130,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -130,7 +130,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()));
//6611 对应数据字典 检验流程状态 待受理
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()));
//6611 对应数据字典 检验流程状态 待受理
}
else
if
(
model
.
getOperationType
().
equals
(
"1"
))
{
}
else
if
(
model
.
getOperationType
().
equals
(
"1"
))
{
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
...
@@ -145,7 +144,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -145,7 +144,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setApplicationNo
(
codes
.
get
(
0
));
model
.
setApplicationNo
(
codes
.
get
(
0
));
model
.
setApplicationDate
(
new
Date
());
model
.
setApplicationDate
(
new
Date
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -168,6 +166,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -168,6 +166,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// endregion
// endregion
if
(
null
==
model
.
getSequenceNbr
()){
if
(
null
==
model
.
getSequenceNbr
()){
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
model
=
this
.
createWithModel
(
model
);
model
=
this
.
createWithModel
(
model
);
}
else
{
}
else
{
model
=
this
.
updateWithModel
(
model
);
model
=
this
.
updateWithModel
(
model
);
...
@@ -293,9 +292,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -293,9 +292,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String
applicationDate
,
String
applicationDate
,
String
acceptDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
inspectionChargePerson
,
String
status
,
String
bizType
)
{
String
status
,
String
bizType
)
{
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
// return this.getBaseMapper().queryForDataList(page, applicationNo, inspectionClassify, applicationUnitCode, applicationUnitName, equipClassify, inspectionUnitCode, inspectionUnitName, applicationDate, acceptDate, inspectionChargePerson, status, bizType,roleIds);
return
this
.
getBaseMapper
().
queryForDataList
(
page
,
applicationNo
,
inspectionClassify
,
applicationUnitCode
,
applicationUnitName
,
equipClassify
,
inspectionUnitCode
,
inspectionUnitName
,
applicationDate
,
acceptDate
,
inspectionChargePerson
,
status
,
bizType
);
}
}
...
@@ -505,10 +505,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -505,10 +505,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
entity
.
setWorkflowRole
(
role
);
entity
.
setWorkflowRole
(
role
);
}
}
entity
.
setStatus
(
status
);
entity
.
setStatus
(
status
);
entity
.
setAcceptDate
(
new
Date
());
//此处自己撤销也赋予了办理日期 存在问题 与驳回 通过区分处理
this
.
updateById
(
entity
);
if
(
rollBack
)
{
if
(
rollBack
)
{
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
}
}
//逻辑变更为 通过后才对办理时间赋值
if
(
status
.
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())){
entity
.
setAcceptDate
(
new
Date
());
}
this
.
updateById
(
entity
);
}
}
}
}
\ 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/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
a3e7c243
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
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.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstD
...
@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstD
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
...
@@ -48,6 +50,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -48,6 +50,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
...
@@ -69,6 +72,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -69,6 +72,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
@Autowired
private
ICreateCodeService
createCodeService
;
private
ICreateCodeService
createCodeService
;
@Autowired
@Autowired
private
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
@Resource
(
type
=
JyjcBaseMapper
.
class
)
@Resource
(
type
=
JyjcBaseMapper
.
class
)
...
@@ -141,6 +146,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -141,6 +146,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
// ResponseModel<Map<String, Object>> result = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -190,12 +196,45 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -190,12 +196,45 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
entity
.
setStatus
(
status
);
entity
.
setStatus
(
status
);
entity
.
setStatusName
(
FlowStatusEnum
.
getNameByType
(
Long
.
parseLong
(
status
)));
entity
.
setStatusName
(
FlowStatusEnum
.
getNameByType
(
Long
.
parseLong
(
status
)));
// region 更新其他的数据为已作废
if
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()).
equals
(
status
))
{
doDiscard
(
entity
.
getUnitCode
(),
entity
.
getSequenceNbr
());
entity
.
setAcceptDate
(
new
Date
());
}
// endregion
this
.
updateById
(
entity
);
this
.
updateById
(
entity
);
if
(
rollBack
)
{
if
(
rollBack
)
{
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
this
.
getBaseMapper
().
updatePromoter
(
entity
.
getSequenceNbr
());
}
}
}
}
/**
* 完成的时候废弃其他的
*
*
* @param unitCode unitCode
* @param sequenceNbr sequenceNbr
* @return {@link Boolean}
* @author yangyang
* @throws
* @date 2023/12/22 09:23
*/
public
Boolean
doDiscard
(
String
unitCode
,
Long
sequenceNbr
)
{
if
(
StringUtils
.
isBlank
(
unitCode
)
||
sequenceNbr
==
null
)
{
return
false
;
}
List
<
Long
>
ids
=
this
.
lambdaQuery
().
select
(
JyjcOpeningApplication:
:
getSequenceNbr
)
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
unitCode
)
.
list
().
stream
().
filter
(
o
->
o
.
getSequenceNbr
().
compareTo
(
sequenceNbr
)
!=
0
)
.
map
(
JyjcOpeningApplication:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
ids
))
{
return
false
;
}
UpdateWrapper
<
JyjcOpeningApplication
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
set
(
"status"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()).
set
(
"status_name"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()).
in
(
"SEQUENCE_NBR"
,
ids
);
return
this
.
update
(
updateWrapper
);
}
/**
/**
* 分页查询
* 分页查询
...
@@ -220,6 +259,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -220,6 +259,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
}
// 设置为监管端
jyjcOpeningApplicationRequstDto
.
setType
(
"supervision"
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
}
}
...
@@ -237,6 +278,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -237,6 +278,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
}
jyjcOpeningApplicationRequstDto
.
setType
(
"enterprise"
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationRequstDto
,
applyStartTime
,
applyEndTime
);
}
}
...
@@ -298,6 +340,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -298,6 +340,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 获取检验人员信息
// 获取检验人员信息
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
true
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
userInfos
))
{
if
(!
ValidationUtil
.
isEmpty
(
userInfos
))
{
// List<String> codes = userInfos.stream()
// List<String> codes = userInfos.stream()
...
@@ -414,9 +457,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -414,9 +457,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
}
}
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
if
(
ObjectUtils
.
isEmpty
(
jyjcOpeningApplication
.
getAcceptDate
())){
//
if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){
jyjcOpeningApplication
.
setAcceptDate
(
new
Date
());
//
jyjcOpeningApplication.setAcceptDate(new Date());
}
//
}
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
}
}
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
View file @
a3e7c243
...
@@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Select;
...
@@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Select;
*/
*/
public
interface
IdxBizJgRegisterInfoMapper
extends
BaseMapper
<
IdxBizJgRegisterInfo
>
{
public
interface
IdxBizJgRegisterInfoMapper
extends
BaseMapper
<
IdxBizJgRegisterInfo
>
{
@Select
(
"select
use_org_code from idx_biz_jg_register_info where record
= #{equipCode}"
)
@Select
(
"select
\"USE_ORG_CODE\" from idx_biz_jg_register_info where \"RECORD\"
= #{equipCode}"
)
String
getUseOrgCodeByEquip
(
@Param
(
"equipCode"
)
String
equipCode
);
String
getUseOrgCodeByEquip
(
@Param
(
"equipCode"
)
String
equipCode
);
@Select
(
"update idx_biz_jg_register_info set \"USE_ORG_CODE\" = #{useOrgCode} where \"RECORD\" = #{equipCode}"
)
@Select
(
"update idx_biz_jg_register_info set \"USE_ORG_CODE\" = #{useOrgCode} where \"RECORD\" = #{equipCode}"
)
...
...
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