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
0ad0b26b
Commit
0ad0b26b
authored
Jan 17, 2024
by
LiuLin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
1b76fed8
00f82778
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
561 additions
and
541 deletions
+561
-541
JgChangeRegistrationUnitDto.java
...s/boot/module/jg/api/dto/JgChangeRegistrationUnitDto.java
+3
-0
JgChangeRegistrationUnit.java
...s/boot/module/jg/api/entity/JgChangeRegistrationUnit.java
+3
-0
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+2
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+14
-0
LocalBadRequest.java
...ejoin/amos/boot/module/jg/biz/config/LocalBadRequest.java
+14
-0
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+2
-2
CmWorkflowServiceImpl.java
...oot/module/jg/biz/service/impl/CmWorkflowServiceImpl.java
+17
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-1
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+81
-93
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+93
-124
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+34
-40
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+10
-10
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+129
-118
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+4
-0
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+2
-6
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+53
-64
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+67
-74
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+8
-3
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+10
-0
urlInfo.json
...s-boot-module-jg-biz/src/main/resources/json/urlInfo.json
+4
-4
EquipmentClassifityEnum.java
...os/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
+10
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgChangeRegistrationUnitDto.java
View file @
0ad0b26b
...
@@ -142,4 +142,7 @@ public class JgChangeRegistrationUnitDto extends BaseDto {
...
@@ -142,4 +142,7 @@ public class JgChangeRegistrationUnitDto extends BaseDto {
@ApiModelProperty
(
value
=
"监管码"
)
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"分类"
)
private
String
equList
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgChangeRegistrationUnit.java
View file @
0ad0b26b
...
@@ -217,6 +217,9 @@ public class JgChangeRegistrationUnit extends BaseEntity {
...
@@ -217,6 +217,9 @@ public class JgChangeRegistrationUnit extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
supervisoryCode
;
private
String
supervisoryCode
;
@TableField
(
exist
=
false
)
private
String
equList
;
/**
/**
*工作流下一节点任务id
*工作流下一节点任务id
*/
*/
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
0ad0b26b
...
@@ -25,6 +25,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -25,6 +25,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Map
<
String
,
Object
>
getUseDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getUseDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getDesDetail
(
@Param
(
"id"
)
String
id
);
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
0ad0b26b
...
@@ -147,5 +147,19 @@
...
@@ -147,5 +147,19 @@
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"getDesDetail"
resultType=
"java.util.Map"
>
select DESIGN_UNIT_CREDIT_CODE as designUnitCreditCode,
DESIGN_UNIT_NAME as designUnitName,
DESIGN_LICENSE_NUM as designLicenseNum,
DESIGN_USE_DATE as designUseDate,
DESIGN_DATE as designDate,
DRAWING_DO as drawingDo,
APPRAISAL_UNIT as appraisalUnit,
APPRAISAL_DATE as appraisalDate,
DESIGN_DOC as designDoc,
DESIGN_STANDARD as designStandard
from idx_biz_jg_design_info
where RECORD = #{id}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/config/LocalBadRequest.java
0 → 100644
View file @
0ad0b26b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
config
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
public
class
LocalBadRequest
extends
BaseException
{
public
LocalBadRequest
(
String
message
)
{
super
(
message
,
com
.
yeejoin
.
amos
.
component
.
robot
.
BadRequest
.
class
.
getSimpleName
(),
message
);
this
.
httpStatus
=
500
;
}
}
\ 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/controller/JgUseRegistrationController.java
View file @
0ad0b26b
...
@@ -38,7 +38,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -38,7 +38,7 @@ public class JgUseRegistrationController 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
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
save
(
map
);
jgUseRegistrationServiceImpl
.
save
(
map
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
...
@@ -72,7 +72,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -72,7 +72,7 @@ public class JgUseRegistrationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteMessage"
)
@PostMapping
(
value
=
"/deleteMessage"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"
批量删除"
,
notes
=
"批量
删除"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"
删除"
,
notes
=
"
删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
id
);
ids
.
add
(
id
);
...
...
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/CmWorkflowServiceImpl.java
View file @
0ad0b26b
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
...
@@ -10,6 +12,7 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
...
@@ -10,6 +12,7 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.List
;
import
java.util.List
;
...
@@ -25,7 +28,13 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
...
@@ -25,7 +28,13 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
List
<
ProcessTaskDTO
>
processTasks
;
List
<
ProcessTaskDTO
>
processTasks
;
try
{
try
{
log
.
info
(
"开始请求工作流启动接口:/start/batch,请求参数:{}"
,
JSONObject
.
toJSONString
(
params
));
log
.
info
(
"开始请求工作流启动接口:/start/batch,请求参数:{}"
,
JSONObject
.
toJSONString
(
params
));
processTasks
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
startForBatch
(
params
));
processTasks
=
Workflow
.
taskV2Client
.
startForBatch
(
params
).
getResult
();
}
catch
(
InnerInvokException
e
)
{
//拦截无审核人异常信息
String
devMessage
=
e
.
getDevMessage
();
devMessage
=
devMessage
.
contains
(
";"
)
?
devMessage
.
split
(
";"
)[
0
]
:
devMessage
;
log
.
error
(
devMessage
);
throw
new
LocalBadRequest
(
devMessage
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流批量启动失败"
,
e
);
log
.
error
(
"调用工作流批量启动失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流批量启动失败"
);
throw
new
RuntimeException
(
"调用工作流批量启动失败"
);
...
@@ -38,7 +47,13 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
...
@@ -38,7 +47,13 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
ProcessTaskDTO
processTaskDTO
;
ProcessTaskDTO
processTaskDTO
;
try
{
try
{
log
.
info
(
"开始请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
log
.
info
(
"开始请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
processTaskDTO
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
completeByTaskFroStandard
(
taskId
,
data
));
processTaskDTO
=
Workflow
.
taskV2Client
.
completeByTaskFroStandard
(
taskId
,
data
).
getResult
();
}
catch
(
InnerInvokException
e
)
{
//拦截无审核人异常信息
String
devMessage
=
e
.
getDevMessage
();
devMessage
=
devMessage
.
contains
(
";"
)
?
devMessage
.
split
(
";"
)[
0
]
:
devMessage
;
log
.
error
(
devMessage
);
throw
new
LocalBadRequest
(
devMessage
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
...
...
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/CommonServiceImpl.java
View file @
0ad0b26b
...
@@ -688,7 +688,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -688,7 +688,7 @@ public class CommonServiceImpl implements ICommonService {
model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
());
model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
());
model
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
model
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
model
.
setStartUserId
(
RequestContext
.
getExeUserId
());
model
.
setStartUserId
(
RequestContext
.
getExeUserId
());
model
.
setStartUser
(
reginParams
.
getUserModel
().
get
User
Name
());
model
.
setStartUser
(
reginParams
.
getUserModel
().
get
Real
Name
());
model
.
setStartUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
model
.
setStartUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
model
.
setStartDate
(
new
Date
());
model
.
setStartDate
(
new
Date
());
model
.
setExecuteUserIds
(
RequestContext
.
getExeUserId
());
model
.
setExecuteUserIds
(
RequestContext
.
getExeUserId
());
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
0ad0b26b
...
@@ -48,7 +48,6 @@ import org.springframework.util.StringUtils;
...
@@ -48,7 +48,6 @@ import org.springframework.util.StringUtils;
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.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
...
@@ -143,28 +142,23 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -143,28 +142,23 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
String
nextUserIds
=
""
;
String
nextUserIds
=
""
;
if
(
"1"
.
equals
(
submitType
))
{
if
(
"1"
.
equals
(
submitType
))
{
// 发起流程
// 发起流程
try
{
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setBusinessKey
(
applyNo
);
dto
.
setBusinessKey
(
applyNo
);
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
// 启动并执行下一步人单位传接收单位的code
// 启动并执行下一步人单位传接收单位的code
dto
.
setNextExecuteUserCompanyCode
(
this
.
getReceiveCompanyCode
(
model
));
dto
.
setNextExecuteUserCompanyCode
(
this
.
getReceiveCompanyCode
(
model
));
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
taskName
[
0
]
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
taskName
[
0
]
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
}
JgChangeRegistrationName
dto
=
new
JgChangeRegistrationName
();
JgChangeRegistrationName
dto
=
new
JgChangeRegistrationName
();
// 字段转换
// 字段转换
...
@@ -219,7 +213,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -219,7 +213,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
// 提交创建待办逻辑
// 提交创建待办逻辑
if
(
"1"
.
equals
(
submitType
))
{
if
(
"1"
.
equals
(
submitType
))
{
//提交时先删除之前的暂存待办数据
//提交时先删除之前的暂存待办数据
commonService
.
deleteTaskModel
(
dto
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTaskModel
(
dto
.
getSequenceNbr
()
+
""
);
// 创建待办
// 创建待办
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCreateDate
(
dto
.
getApplyDate
());
taskModelDto
.
setFlowCreateDate
(
dto
.
getApplyDate
());
...
@@ -256,13 +250,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -256,13 +250,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setChangeCertificate
(
null
);
dto
.
setChangeCertificate
(
null
);
taskModelDto
.
setModel
(
dto
);
taskModelDto
.
setModel
(
dto
);
//摘要 按原有规则组装
//摘要 按原有规则组装
taskModelDto
.
setTaskContent
(
"来自"
+
dto
.
getUseUnitCreditCode
()+
"【"
+
dto
.
getReceiveOrgName
()+
"】的业务办理,【申请单号:"
+
dto
.
getApplyNo
()+
"】
"
);
taskModelDto
.
setTaskContent
(
buildTaskContent
(
dto
)
+
"待提交
"
);
//申请单号
//申请单号
taskModelDto
.
setTaskCode
(
dto
.
getApplyNo
());
taskModelDto
.
setTaskCode
(
dto
.
getApplyNo
());
//业务类型枚举code值
//业务类型枚举code值
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
//业务主键
//业务主键
taskModelDto
.
setRelationId
(
dto
.
getSequenceNbr
()
+
""
);
taskModelDto
.
setRelationId
(
dto
.
getSequenceNbr
()
+
""
);
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
}
}
...
@@ -282,6 +276,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -282,6 +276,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
JgChangeRegistrationNameDto
updateInfo
(
String
submitType
,
JgChangeRegistrationNameDto
jgChangeRegistrationNameDto
,
String
op
)
{
public
JgChangeRegistrationNameDto
updateInfo
(
String
submitType
,
JgChangeRegistrationNameDto
jgChangeRegistrationNameDto
,
String
op
)
{
if
(
Objects
.
isNull
(
jgChangeRegistrationNameDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
jgChangeRegistrationNameDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
...
@@ -295,37 +290,33 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -295,37 +290,33 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
if
(
"1"
.
equals
(
submitType
))
{
if
(
"1"
.
equals
(
submitType
))
{
//发起流程
//发起流程
if
(!
StringUtils
.
hasText
(
jgChangeRegistrationName
.
getInstanceId
()))
{
if
(!
StringUtils
.
hasText
(
jgChangeRegistrationName
.
getInstanceId
()))
{
try
{
List
<
ProcessTaskDTO
>
processTasks
=
new
ArrayList
<>();
List
<
ProcessTaskDTO
>
processTasks
=
new
ArrayList
<>();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setProcessDefinitionKey
(
"unitRename"
);
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
// 启动并执行下一步人单位传接收单位的code
// 启动并执行下一步人单位传接收单位的code
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationName
.
getReceiveOrgCode
());
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationName
.
getReceiveOrgCode
());
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
jgChangeRegistrationName
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgChangeRegistrationName
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgChangeRegistrationName
.
setInstanceId
(
instanceId
);
jgChangeRegistrationName
.
setInstanceId
(
instanceId
);
jgChangeRegistrationName
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListNext
));
jgChangeRegistrationName
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListNext
));
jgChangeRegistrationName
.
setNextTaskId
(
nextTaskId
);
jgChangeRegistrationName
.
setNextTaskId
(
nextTaskId
);
jgChangeRegistrationName
.
setNextExecuteUserIds
(
nextUserIds
);
jgChangeRegistrationName
.
setNextExecuteUserIds
(
nextUserIds
);
jgChangeRegistrationName
.
setAuditStatus
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
());
jgChangeRegistrationName
.
setAuditStatus
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
());
// 创建待办
// 创建待办
createTaskModel
(
jgChangeRegistrationName
,
taskName
,
"1"
,
nextUserIds
);
createTaskModel
(
jgChangeRegistrationName
,
taskName
,
"1"
,
nextUserIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
else
{
}
else
{
// 执行一步
// 执行一步
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgChangeRegistrationName
);
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgChangeRegistrationName
);
...
@@ -392,12 +383,12 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -392,12 +383,12 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
private
String
getPageTypeForReject
(
String
operate
,
String
auditStatus
)
{
private
String
getPageTypeForReject
(
String
operate
,
String
auditStatus
)
{
// 驳回
// 驳回
if
(
"1"
.
equals
(
operate
))
{
if
(
"1"
.
equals
(
operate
))
{
// 且驳回到的节点为使用单位提交 则可编辑
// 且驳回到的节点为使用单位提交 则可编辑
if
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
if
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
){
)
{
// urlInfo.json 文件的 pageType
// urlInfo.json 文件的 pageType
return
"edit"
;
return
"edit"
;
}
}
...
@@ -413,7 +404,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -413,7 +404,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
jgChangeRegistrationName
.
getNextTaskId
());
dto
.
setTaskId
(
jgChangeRegistrationName
.
getNextTaskId
());
dto
.
setComment
(
"提交流程"
);
dto
.
setComment
(
"提交流程"
);
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
...
@@ -476,17 +467,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -476,17 +467,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationName
.
getAuditStatus
());
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationName
.
getAuditStatus
());
jsonObject
.
put
(
"changeCertificate"
,
null
);
jsonObject
.
put
(
"changeCertificate"
,
null
);
// 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑
// 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑
jsonObject
.
put
(
"pageType"
,
this
.
getPageTypeByCurrentNode
(
jgChangeRegistrationName
.
getAuditStatus
()));
jsonObject
.
put
(
"pageType"
,
this
.
getPageTypeByCurrentNode
(
jgChangeRegistrationName
.
getAuditStatus
()));
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
}
private
String
getPageTypeByCurrentNode
(
String
auditStatus
)
{
private
String
getPageTypeByCurrentNode
(
String
auditStatus
)
{
if
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
if
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
){
)
{
// urlInfo.json 文件的 pageType
// urlInfo.json 文件的 pageType
return
"edit"
;
return
"edit"
;
}
else
{
}
else
{
...
@@ -497,45 +488,42 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -497,45 +488,42 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
JgChangeRegistrationName
jgChangeRegistrationName
=
this
.
getBaseMapper
().
selectById
(
id
);
JgChangeRegistrationName
jgChangeRegistrationName
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
jgChangeRegistrationName
.
getNextTaskId
();
String
taskId
=
jgChangeRegistrationName
.
getNextTaskId
();
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
dto
.
setComment
(
comment
);
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgChangeRegistrationName
));
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationName
.
getInstanceStatus
())
&&
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationName
.
getInstanceStatus
())
&&
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())
||
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
())))
{
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
())))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
//执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
processTaskDTO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
dto
.
setVariable
(
map
);
//执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
processTaskDTO
);
}
}
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationName
jgChangeRegistrationName
)
{
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationName
jgChangeRegistrationName
)
{
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
// 执行通过节点,单位code为接收机构单位信息
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
}
if
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
())
if
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getReject
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getReject
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getRollBack
())){
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getRollBack
()))
{
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
}
}
// 2、3级驳回时,单位code为接收单位code
// 2、3级驳回时,单位code为接收单位code
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
}
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
...
...
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 @
0ad0b26b
...
@@ -205,7 +205,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -205,7 +205,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
String
instanceId
=
""
;
String
instanceId
=
""
;
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getSequenceNbr
())
&&
!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getSequenceNbr
())
&&
!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
.
getInstanceId
()))
{
// 如果是旧流程则执行一步
// 如果是旧流程则执行一步
flowExecute
(
jgChangeRegistrationReform
.
getSequenceNbr
(),
jgChangeRegistrationReform
.
getInstanceId
(),
"0"
,
""
);
flowExecute
(
jgChangeRegistrationReform
.
getSequenceNbr
(),
jgChangeRegistrationReform
.
getInstanceId
(),
"0"
,
""
);
// updateExecuteIds(instanceId, jgChangeRegistrationReform.getSequenceNbr(), "0");
// updateExecuteIds(instanceId, jgChangeRegistrationReform.getSequenceNbr(), "0");
...
@@ -234,21 +234,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -234,21 +234,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
ProcessTaskDTO
startByVariable
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
public
ProcessTaskDTO
startByVariable
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
//启动流程
//启动流程
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"renovationRegistrationReviewNew"
);
dto
.
setProcessDefinitionKey
(
"renovationRegistrationReviewNew"
);
dto
.
setBusinessKey
(
"submit"
);
dto
.
setBusinessKey
(
"submit"
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationReform
.
getReceiveOrgCode
());
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationReform
.
getReceiveOrgCode
());
List
<
ActWorkflowStartDTO
>
actWorkflowStartDTOList
=
Arrays
.
asList
(
dto
);
List
<
ActWorkflowStartDTO
>
actWorkflowStartDTOList
=
Arrays
.
asList
(
dto
);
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
actWorkflowBatchDTO
.
setProcess
(
actWorkflowStartDTOList
);
actWorkflowBatchDTO
.
setProcess
(
actWorkflowStartDTOList
);
List
<
ProcessTaskDTO
>
result
=
iCmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
ProcessTaskDTO
>
result
=
iCmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
if
(!
result
.
isEmpty
())
{
if
(!
result
.
isEmpty
())
{
processTaskDTO
=
result
.
get
(
0
);
processTaskDTO
=
result
.
get
(
0
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
processTaskDTO
;
return
processTaskDTO
;
}
}
...
@@ -260,15 +256,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -260,15 +256,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setNextExecutorIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgChangeRegistrationReform
.
setNextExecutorIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgChangeRegistrationReform
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgChangeRegistrationReform
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
String
nextTaskid
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskId
()).
orElse
(
""
);
String
nextTaskid
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskId
()).
orElse
(
""
);
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
if
(!
ObjectUtils
.
isEmpty
(
workflowResultDto
.
getNextTaskCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
workflowResultDto
.
getNextTaskCode
()))
{
taskCode
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskCode
()).
orElse
(
""
);
taskCode
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskCode
()).
orElse
(
""
);
}
}
String
role
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextExecutorRoleIds
()).
orElse
(
""
);
String
role
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextExecutorRoleIds
()).
orElse
(
""
);
if
(
operate
.
equals
(
"startWorkfow"
))
{
if
(
operate
.
equals
(
"startWorkfow"
))
{
role
=
Optional
.
ofNullable
(
workflowResultDto
.
getExecutorRoleIds
()).
orElse
(
""
)+
","
+
Optional
.
ofNullable
(
workflowResultDto
.
getNextExecutorRoleIds
()).
orElse
(
""
);
role
=
Optional
.
ofNullable
(
workflowResultDto
.
getExecutorRoleIds
()).
orElse
(
""
)
+
","
+
Optional
.
ofNullable
(
workflowResultDto
.
getNextExecutorRoleIds
()).
orElse
(
""
);
operate
=
"0"
;
operate
=
"0"
;
instanceId
=
workflowResultDto
.
getInstanceId
();
instanceId
=
workflowResultDto
.
getInstanceId
();
updateTodoAndCreate
=
Boolean
.
FALSE
;
updateTodoAndCreate
=
Boolean
.
FALSE
;
}
}
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCode
))
{
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCode
))
{
...
@@ -291,13 +287,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -291,13 +287,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setPromoter
(
""
);
jgChangeRegistrationReform
.
setPromoter
(
""
);
}
}
if
(
updateTodoAndCreate
)
{
if
(
updateTodoAndCreate
)
{
// 上个代办改为已办
// 上个代办改为已办
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
}
else
{
}
else
{
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
REJECTED
.
getCode
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
REJECTED
.
getCode
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
REJECTED
.
getName
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
REJECTED
.
getName
());
}
}
...
@@ -307,7 +303,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -307,7 +303,13 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
TaskV2Model
taskV2Model
=
commonServiceImpl
.
updateTaskModel
(
map
);
TaskV2Model
taskV2Model
=
commonServiceImpl
.
updateTaskModel
(
map
);
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
taskModelDto
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
if
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getCode
().
equals
(
taskCode
)
&&
"1"
.
equals
(
operate
))
{
taskModelDto
.
setPageType
(
"edit"
);
}
// 创建新的代办
// 创建新的代办
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
commonServiceImpl
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
commonServiceImpl
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
...
@@ -327,7 +329,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -327,7 +329,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
map
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
map
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
map
.
put
(
"relationId"
,
jgChangeRegistrationReform
.
getInstanceId
());
map
.
put
(
"relationId"
,
jgChangeRegistrationReform
.
getInstanceId
());
jgChangeRegistrationReform
.
setNextExecuteUserIds
(
""
);
jgChangeRegistrationReform
.
setNextExecuteUserIds
(
""
);
map
.
put
(
"model"
,
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
map
.
put
(
"model"
,
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
commonServiceImpl
.
updateTaskModel
(
map
);
commonServiceImpl
.
updateTaskModel
(
map
);
}
}
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
...
@@ -336,28 +338,22 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -336,28 +338,22 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectById
(
id
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectById
(
id
);
try
{
String
taskId
=
jgChangeRegistrationReform
.
getNextTaskId
();
// JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
//组装信息
// JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
TaskResultDTO
dto
=
new
TaskResultDTO
();
String
taskId
=
jgChangeRegistrationReform
.
getNextTaskId
();
dto
.
setResultCode
(
"approvalStatus"
);
//组装信息
dto
.
setTaskId
(
taskId
);
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setComment
(
comment
);
dto
.
setResultCode
(
"approvalStatus"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
dto
.
setTaskId
(
taskId
);
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setComment
(
comment
);
//2023年12月27日16点33分 流程状态为起草人撤回或者一级审批驳回时需要将提交时的已同意修改为已提交
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
)
&&
(
jgChangeRegistrationReform
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getRollBack
())
||
jgChangeRegistrationReform
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getReject
())))
{
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
"提交"
);
//2023年12月27日16点33分 流程状态为起草人撤回或者一级审批驳回时需要将提交时的已同意修改为已提交
}
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationReform
)
&&
(
jgChangeRegistrationReform
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getRollBack
())
||
jgChangeRegistrationReform
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getReject
())))
{
dto
.
setVariable
(
map
);
map
.
put
(
"approvalStatus"
,
"提交"
);
dto
.
setNextExecuteUserCompanyCode
(
getNextUserOrgCode
(
operate
,
jgChangeRegistrationReform
));
}
//执行流程
dto
.
setVariable
(
map
);
processTaskDTO
=
iCmWorkflowService
.
complete
(
taskId
,
dto
);
dto
.
setNextExecuteUserCompanyCode
(
getNextUserOrgCode
(
operate
,
jgChangeRegistrationReform
));
//执行流程
processTaskDTO
=
iCmWorkflowService
.
complete
(
taskId
,
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// 更新下一步执行人
// 更新下一步执行人
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
,
operate
,
processTaskDTO
);
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
,
operate
,
processTaskDTO
);
...
@@ -365,8 +361,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -365,8 +361,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
void
withdraw
(
String
instanceId
)
{
public
void
withdraw
(
String
instanceId
)
{
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
);
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReform
>().
eq
(
"instance_id"
,
instanceId
));
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReform
>().
eq
(
"instance_id"
,
instanceId
));
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
instanceId
);
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
instanceId
);
WorkflowResultDto
workflowResultDto
=
conveterProcessTaskDTO2WorkflowResultDto
(
processTaskDTO
);
WorkflowResultDto
workflowResultDto
=
conveterProcessTaskDTO2WorkflowResultDto
(
processTaskDTO
);
String
taskCode
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskCode
()).
orElse
(
""
);
String
taskCode
=
Optional
.
ofNullable
(
workflowResultDto
.
getNextTaskCode
()).
orElse
(
""
);
...
@@ -386,16 +381,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -386,16 +381,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationReform
.
getAuditStatus
());
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationReform
.
getAuditStatus
());
jsonObject
.
put
(
"nextTaskId"
,
jgChangeRegistrationReform
.
getNextTaskId
());
jsonObject
.
put
(
"nextTaskId"
,
jgChangeRegistrationReform
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgChangeRegistrationReform
.
getNextExecutorIds
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgChangeRegistrationReform
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"taskCode"
,
taskCode
);
jsonObject
.
put
(
"pageType"
,
"look"
);
jsonObject
.
put
(
"instanceId"
,
instanceId
);
jsonObject
.
put
(
"pageType"
,
"look"
);
//如果创建人等于当前人则打开编辑页面
//如果创建人等于当前人则打开编辑页面
if
(
taskCode
.
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getCode
()))
{
if
(
taskCode
.
equals
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getCode
()))
{
jsonObject
.
put
(
"pageType"
,
"edit"
);
jsonObject
.
put
(
"pageType"
,
"edit"
);
}
}
jsonObject
.
put
(
"model"
,
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
jsonObject
.
put
(
"model"
,
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
commonServiceImpl
.
rollbackTask
(
instanceId
,
jsonObject
);
commonServiceImpl
.
rollbackTask
(
instanceId
,
jsonObject
);
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
@@ -427,7 +420,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -427,7 +420,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
originalData
=
idxBizJgRegisterInfoService
.
getDetailByRecord
(
equipId
);
originalData
=
idxBizJgRegisterInfoService
.
getDetailByRecord
(
equipId
);
originalDataOther
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equipId
);
originalDataOther
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equipId
);
detail
.
putAll
(
originalDataOther
);
detail
.
putAll
(
originalDataOther
);
detail
.
put
(
"techInfo"
,
originalData
);
detail
.
put
(
"techInfo"
,
originalData
);
}
else
{
}
else
{
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
.
eq
(
"equ_id"
,
equipId
)
...
@@ -484,7 +477,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -484,7 +477,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
String
newData
=
jgRegistrationHistory
.
getChangeData
();
String
newData
=
jgRegistrationHistory
.
getChangeData
();
//将历史数据更新到技术参数表中
//将历史数据更新到技术参数表中
JSONObject
allData
=
JSONObject
.
parseObject
(
newData
);
JSONObject
allData
=
JSONObject
.
parseObject
(
newData
);
Map
<
String
,
Object
>
techInfo
=
(
Map
<
String
,
Object
>)
allData
.
get
(
"techInfo"
);
Map
<
String
,
Object
>
techInfo
=
(
Map
<
String
,
Object
>)
allData
.
get
(
"techInfo"
);
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
techInfo
),
IdxBizJgTechParamsElevator
.
class
);
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
techInfo
),
IdxBizJgTechParamsElevator
.
class
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
"sequenceNbr"
,
"record"
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
"sequenceNbr"
,
"record"
);
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
...
@@ -659,27 +652,37 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -659,27 +652,37 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
*/
*/
public
String
getSummaryInfo
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
public
String
getSummaryInfo
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
return
String
.
format
(
result
,
Optional
.
ofNullable
(
jgChangeRegistrationReform
.
getEquipListName
()).
orElse
(
"无"
),
jgChangeRegistrationReform
.
getSupervisoryCode
(),
jgChangeRegistrationReform
.
getApplyNo
());
return
String
.
format
(
result
,
Optional
.
ofNullable
(
jgChangeRegistrationReform
.
getEquipListName
()).
orElse
(
"无"
),
jgChangeRegistrationReform
.
getSupervisoryCode
(),
jgChangeRegistrationReform
.
getApplyNo
());
}
}
/**
/**
* 构建工作台待办实体类
* 构建工作台待办实体类
*
* @param jgChangeRegistrationReform
* @param jgChangeRegistrationReform
* @param processTaskDTO
* @param processTaskDTO
* @return
* @return
*/
*/
public
TaskModelDto
getTaskModelDtoList
(
JgChangeRegistrationReform
jgChangeRegistrationReform
,
ProcessTaskDTO
processTaskDTO
)
{
public
TaskModelDto
getTaskModelDtoList
(
JgChangeRegistrationReform
jgChangeRegistrationReform
,
ProcessTaskDTO
processTaskDTO
)
{
//设置实体无需字段为空
//设置实体无需字段为空
jgChangeRegistrationReform
.
setTransformationQualityCertificate
(
null
);
jgChangeRegistrationReform
.
setRenovationSupervisioninspectionCertificate
(
null
);
jgChangeRegistrationReform
.
setRegDate
(
null
);
jgChangeRegistrationReform
.
setCreateDate
(
null
);
jgChangeRegistrationReform
.
setAuditPassDate
(
null
);
jgChangeRegistrationReform
.
setInputUnitNo
(
null
);
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
if
(
ObjectUtils
.
isEmpty
(
processTaskDTO
)){
if
(
ObjectUtils
.
isEmpty
(
processTaskDTO
))
{
//taskCode 使用申请单编号
taskModelDto
.
setTaskCode
(
jgChangeRegistrationReform
.
getApplyNo
());
//摘要
taskModelDto
.
setTaskContent
(
getSummaryInfo
(
jgChangeRegistrationReform
));
//任务类型
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getCode
());
//工作流实例id
taskModelDto
.
setRelationId
(
String
.
valueOf
(
jgChangeRegistrationReform
.
getSequenceNbr
()));
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
}
else
{
List
<
WorkflowResultDto
>
workflowResultDtoList
=
commonServiceImpl
.
buildWorkFlowInfo
(
Arrays
.
asList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
conveterProcessTaskDTO2WorkflowResultDto
(
processTaskDTO
);
//工作流创建时间
//工作流创建时间
taskModelDto
.
setFlowCreateDate
(
jgChangeRegistrationReform
.
getCreateDate
());
taskModelDto
.
setFlowCreateDate
(
jgChangeRegistrationReform
.
getCreateDate
());
//工作流返回节点名称
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
//taskCode 使用申请单编号
//taskCode 使用申请单编号
taskModelDto
.
setTaskCode
(
jgChangeRegistrationReform
.
getApplyNo
());
taskModelDto
.
setTaskCode
(
jgChangeRegistrationReform
.
getApplyNo
());
//摘要
//摘要
...
@@ -691,7 +694,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -691,7 +694,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
//任务类型名称
//任务类型名称
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getName
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getName
());
//工作流实例id
//工作流实例id
taskModelDto
.
setRelationId
(
String
.
valueOf
(
jgChangeRegistrationReform
.
getSequenceNbr
()));
taskModelDto
.
setRelationId
(
jgChangeRegistrationReform
.
getInstanceId
());
//执行人id
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
//任务状态code
//任务状态code
taskModelDto
.
setTaskStatus
(
commonServiceImpl
.
getDictionaryCodeByName
(
jgChangeRegistrationReform
.
getStatus
()));
taskModelDto
.
setTaskStatus
(
commonServiceImpl
.
getDictionaryCodeByName
(
jgChangeRegistrationReform
.
getStatus
()));
taskModelDto
.
setFlowStatus
(
taskModelDto
.
getTaskStatus
());
taskModelDto
.
setFlowStatus
(
taskModelDto
.
getTaskStatus
());
...
@@ -705,49 +710,11 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -705,49 +710,11 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
//任务发起人所在单位
//任务发起人所在单位
taskModelDto
.
setStartUserCompanyName
(
jgChangeRegistrationReform
.
getCreateUserCompanyName
());
taskModelDto
.
setStartUserCompanyName
(
jgChangeRegistrationReform
.
getCreateUserCompanyName
());
//任务发起人发起时间
//任务发起人发起时间
taskModelDto
.
setStartDate
(
new
Date
());
taskModelDto
.
setNextExecuteUser
(
jgChangeRegistrationReform
.
getNextExecutorIds
());
taskModelDto
.
setNextExecuteUser
(
jgChangeRegistrationReform
.
getNextExecutorIds
());
//跳转路径
//跳转路径
// taskModelDto.setRoutePath();
// taskModelDto.setRoutePath();
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
}
else
{
List
<
WorkflowResultDto
>
workflowResultDtoList
=
commonServiceImpl
.
buildWorkFlowInfo
(
Arrays
.
asList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
conveterProcessTaskDTO2WorkflowResultDto
(
processTaskDTO
);
//工作流创建时间
taskModelDto
.
setFlowCreateDate
(
jgChangeRegistrationReform
.
getCreateDate
());
//工作流返回节点名称
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
//taskCode 使用申请单编号
taskModelDto
.
setTaskCode
(
jgChangeRegistrationReform
.
getApplyNo
());
//摘要
taskModelDto
.
setTaskContent
(
getSummaryInfo
(
jgChangeRegistrationReform
));
//任务描述-非必填
taskModelDto
.
setTaskDesc
(
null
);
//任务类型
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getCode
());
//任务类型名称
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getName
());
//工作流实例id
taskModelDto
.
setRelationId
(
jgChangeRegistrationReform
.
getInstanceId
());
//执行人id
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
//任务状态code
taskModelDto
.
setTaskStatus
(
commonServiceImpl
.
getDictionaryCodeByName
(
jgChangeRegistrationReform
.
getStatus
()));
taskModelDto
.
setFlowStatus
(
taskModelDto
.
getTaskStatus
());
//任务状态名称
taskModelDto
.
setTaskStatusLabel
(
jgChangeRegistrationReform
.
getStatus
());
taskModelDto
.
setFlowStatusLabel
(
jgChangeRegistrationReform
.
getStatus
());
//任务创建人id
taskModelDto
.
setStartUserId
(
jgChangeRegistrationReform
.
getCreateUserId
());
//任务创建人名称
taskModelDto
.
setStartUser
(
jgChangeRegistrationReform
.
getCreateUserName
());
//任务发起人所在单位
taskModelDto
.
setStartUserCompanyName
(
jgChangeRegistrationReform
.
getCreateUserCompanyName
());
//任务发起人发起时间
taskModelDto
.
setStartDate
(
new
Date
());
taskModelDto
.
setNextExecuteUser
(
jgChangeRegistrationReform
.
getNextExecutorIds
());
//跳转路径
// taskModelDto.setRoutePath();
taskModelDto
.
setModel
(
conveterTaskMessageDTO
(
jgChangeRegistrationReform
));
}
}
return
taskModelDto
;
return
taskModelDto
;
}
}
...
@@ -769,34 +736,35 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -769,34 +736,35 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
/**
/**
* 将jgChangeRegistrationReform转换成TaskModelDto
* 将jgChangeRegistrationReform转换成TaskModelDto
*
* @param jgChangeRegistrationReform
* @param jgChangeRegistrationReform
* @return
* @return
*/
*/
public
TaskMessageDto
conveterTaskMessageDTO
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
public
TaskMessageDto
conveterTaskMessageDTO
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
taskMessageDto
.
setInstanceId
(
jgChangeRegistrationReform
.
getInstanceId
());
taskMessageDto
.
setInstanceId
(
jgChangeRegistrationReform
.
getInstanceId
());
taskMessageDto
.
setStatus
(
jgChangeRegistrationReform
.
getStatus
());
taskMessageDto
.
setStatus
(
jgChangeRegistrationReform
.
getStatus
());
taskMessageDto
.
setAuditStatus
(
jgChangeRegistrationReform
.
getStatus
());
taskMessageDto
.
setAuditStatus
(
jgChangeRegistrationReform
.
getStatus
());
taskMessageDto
.
setPromoter
(
jgChangeRegistrationReform
.
getPromoter
());
taskMessageDto
.
setPromoter
(
jgChangeRegistrationReform
.
getPromoter
());
taskMessageDto
.
setNextExecuteUserIds
(
jgChangeRegistrationReform
.
getNextExecuteUserIds
());
taskMessageDto
.
setNextExecuteUserIds
(
jgChangeRegistrationReform
.
getNextExecuteUserIds
());
taskMessageDto
.
setSequenceNbr
(
jgChangeRegistrationReform
.
getSequenceNbr
());
taskMessageDto
.
setSequenceNbr
(
jgChangeRegistrationReform
.
getSequenceNbr
());
taskMessageDto
.
setNextExecuteIds
(
jgChangeRegistrationReform
.
getNextExecutorIds
());
taskMessageDto
.
setNextExecuteIds
(
jgChangeRegistrationReform
.
getNextExecutorIds
());
return
taskMessageDto
;
return
taskMessageDto
;
}
}
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
// 执行通过节点,单位code为接收机构单位信息
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationReform
.
getReceiveOrgCode
();
return
jgChangeRegistrationReform
.
getReceiveOrgCode
();
}
}
if
(
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getPass
())
if
(
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getPass
())
||
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getReject
())
||
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getReject
())
||
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getRollBack
())){
||
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getRollBack
()))
{
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
return
jgChangeRegistrationReform
.
getUseUnitCreditCode
();
return
jgChangeRegistrationReform
.
getUseUnitCreditCode
();
}
}
// 2、3级驳回时,单位code为接收单位code
// 2、3级驳回时,单位code为接收单位code
return
jgChangeRegistrationReform
.
getReceiveOrgCode
();
return
jgChangeRegistrationReform
.
getReceiveOrgCode
();
}
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationTransferServiceImpl.java
View file @
0ad0b26b
...
@@ -353,29 +353,27 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -353,29 +353,27 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
WorkflowResultDto
workflowResult
=
new
WorkflowResultDto
();
WorkflowResultDto
workflowResult
=
new
WorkflowResultDto
();
JgChangeRegistrationTransfer
transfer
=
this
.
getById
(
id
);
JgChangeRegistrationTransfer
transfer
=
this
.
getById
(
id
);
try
{
String
taskId
=
transfer
.
getNextTaskId
();
String
taskId
=
transfer
.
getNextTaskId
();
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
transfer
));
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
transfer
));
if
(!
ObjectUtils
.
isEmpty
(
transfer
)
&&
(
transfer
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getRollBack
())
||
transfer
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getReject
())))
{
if
(!
ObjectUtils
.
isEmpty
(
transfer
)
&&
(
transfer
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getRollBack
())
||
transfer
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getReject
())))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
//执行流程
ProcessTaskDTO
complete
=
icmWorkflowService
.
complete
(
taskId
,
dto
);
workflowResult
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
complete
)).
get
(
0
);
// 更新下一步执行人
this
.
updateExecuteIds
(
instanceId
,
transfer
,
operate
,
workflowResult
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
//执行流程
ProcessTaskDTO
complete
=
icmWorkflowService
.
complete
(
taskId
,
dto
);
workflowResult
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
complete
)).
get
(
0
);
// 更新下一步执行人
this
.
updateExecuteIds
(
instanceId
,
transfer
,
operate
,
workflowResult
);
}
}
/**
/**
...
@@ -696,6 +694,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -696,6 +694,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
taskModelDto
.
setRelationId
(
instanceId
);
taskModelDto
.
setRelationId
(
instanceId
);
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtil
.
copyProperties
(
jgChangeRegistrationTransfer
,
taskMessageDto
);
BeanUtil
.
copyProperties
(
jgChangeRegistrationTransfer
,
taskMessageDto
);
taskModelDto
.
setPageType
(
this
.
getPageTypeByCurrentNode
(
jgChangeRegistrationTransfer
.
getAuditStatus
()));
taskModelDto
.
setModel
(
taskMessageDto
);
taskModelDto
.
setModel
(
taskMessageDto
);
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
...
@@ -1032,24 +1031,19 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -1032,24 +1031,19 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* 启动工作流
* 启动工作流
*/
*/
private
WorkflowResultDto
startWorkFlork
(
String
receiveOrgCreditCode
)
{
private
WorkflowResultDto
startWorkFlork
(
String
receiveOrgCreditCode
)
{
try
{
ActWorkflowBatchDTO
workflowBatchParams
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
workflowBatchParams
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
workflowList
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
workflowList
=
new
ArrayList
<>();
ActWorkflowStartDTO
workflow
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
workflow
=
new
ActWorkflowStartDTO
();
workflow
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
workflow
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
workflow
.
setBusinessKey
(
"submit"
);
workflow
.
setBusinessKey
(
"submit"
);
workflow
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
workflow
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
//下一节点执行人单位(下节点接收机构code)
//下一节点执行人单位(下节点接收机构code)
workflow
.
setNextExecuteUserCompanyCode
(
receiveOrgCreditCode
);
workflow
.
setNextExecuteUserCompanyCode
(
receiveOrgCreditCode
);
workflowList
.
add
(
workflow
);
workflowList
.
add
(
workflow
);
workflowBatchParams
.
setProcess
(
workflowList
);
workflowBatchParams
.
setProcess
(
workflowList
);
List
<
ProcessTaskDTO
>
processTasks
=
icmWorkflowService
.
startBatch
(
workflowBatchParams
);
List
<
ProcessTaskDTO
>
processTasks
=
icmWorkflowService
.
startBatch
(
workflowBatchParams
);
// 组装工作流返回的数据
// 组装工作流返回的数据
return
commonService
.
buildWorkFlowInfo
(
processTasks
).
get
(
0
);
return
commonService
.
buildWorkFlowInfo
(
processTasks
).
get
(
0
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
}
/**
/**
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
0ad0b26b
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
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.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
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.EquipmentClassifityEnum
;
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.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
...
@@ -504,7 +505,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -504,7 +505,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto
.
setUseInnerCode
(
ValidationUtil
.
isEmpty
(
obj
.
get
(
"USE_INNER_CODE"
))
?
""
:
String
.
valueOf
(
obj
.
get
(
"USE_INNER_CODE"
)));
dto
.
setUseInnerCode
(
ValidationUtil
.
isEmpty
(
obj
.
get
(
"USE_INNER_CODE"
))
?
""
:
String
.
valueOf
(
obj
.
get
(
"USE_INNER_CODE"
)));
dto
.
setEquAddress
((
String
.
valueOf
(
obj
.
get
(
"ADDRESS"
))));
dto
.
setEquAddress
((
String
.
valueOf
(
obj
.
get
(
"ADDRESS"
))));
dto
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
dto
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setUnitChangeRegistrationId
(
applyNo
);
jgRelationEquip
.
setUnitChangeRegistrationId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
nextExecutorUserIds
))
{
if
(!
CollectionUtils
.
isEmpty
(
nextExecutorUserIds
))
{
...
@@ -542,7 +543,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -542,7 +543,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto
.
setFlowCreateDate
(
new
Date
());
dto
.
setFlowCreateDate
(
new
Date
());
dto
.
setTaskName
(
workflowResultDtos
.
get
(
0
).
getNextTaskName
());
dto
.
setTaskName
(
workflowResultDtos
.
get
(
0
).
getNextTaskName
());
dto
.
setFlowCode
(
obj
.
getNextTaskId
());
dto
.
setFlowCode
(
obj
.
getNextTaskId
());
dto
.
setTaskContent
(
"来自"
+
obj
.
getEqu
Type
()+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
);
dto
.
setTaskContent
(
"来自"
+
obj
.
getEqu
List
()+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
);
dto
.
setTaskCode
(
obj
.
getApplyNo
());
dto
.
setTaskCode
(
obj
.
getApplyNo
());
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getCode
());
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getCode
());
dto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
dto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
...
@@ -564,7 +565,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -564,7 +565,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
//行数据
//行数据
dto
.
setModel
(
obj
);
dto
.
setModel
(
obj
);
//摘要 按原有规则组装
//摘要 按原有规则组装
dto
.
setTaskContent
(
"来自"
+
obj
.
getEqu
Type
()+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
);
dto
.
setTaskContent
(
"来自"
+
obj
.
getEqu
List
()+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
);
//申请单号
//申请单号
dto
.
setTaskCode
(
obj
.
getApplyNo
());
dto
.
setTaskCode
(
obj
.
getApplyNo
());
//业务类型枚举code值
//业务类型枚举code值
...
@@ -762,9 +763,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -762,9 +763,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
task
.
setResultCode
(
"approvalStatus"
);
task
.
setResultCode
(
"approvalStatus"
);
task
.
setTaskId
(
taskId
);
task
.
setTaskId
(
taskId
);
task
.
setComment
(
""
);
task
.
setComment
(
""
);
task
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
op
,
dto
));
task
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
op
,
jgChangeRegistrationUnit
));
task
.
setNextExecuteUserCompanyCode
(
dto
.
getReceiveOrgCode
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
map
.
put
(
"approvalStatus"
,
op
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationUnit
.
getInstanceStatus
())
&&
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationUnit
.
getInstanceStatus
())
&&
...
@@ -984,7 +984,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -984,7 +984,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
private
String
buildTaskContent
(
JgChangeRegistrationUnit
obj
)
{
private
String
buildTaskContent
(
JgChangeRegistrationUnit
obj
)
{
return
"来自"
+
obj
.
getEquType
()
+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
;
return
"来自"
+
EquipmentClassifityEnum
.
getNameByCode
(
obj
.
getEquList
())
+
"【"
+
obj
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
obj
.
getApplyNo
()+
"】"
;
}
}
...
@@ -1120,14 +1120,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1120,14 +1120,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationUnit
Dto
jgChangeRegistrationName
)
{
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationUnit
jgChangeRegistrationName
)
{
if
(
"0"
.
equals
(
operate
)){
if
(
"0"
.
equals
(
operate
)){
// 执行通过节点,单位code为接收机构单位信息
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
}
if
(
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getPass
())
if
(
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getPass
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getReject
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getReject
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getRollBack
())){
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getRollBack
())){
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
}
}
...
...
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/JgEnableDisableServiceImpl.java
View file @
0ad0b26b
...
@@ -88,102 +88,97 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -88,102 +88,97 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdate
(
JSONObject
map
,
ReginParams
reginParams
)
{
public
void
saveOrUpdate
(
JSONObject
map
,
ReginParams
reginParams
)
{
JgEnableDisable
jgEnableDisable
=
new
JgEnableDisable
();
JgEnableDisable
jgEnableDisable
=
new
JgEnableDisable
();
if
(!
"null"
.
equals
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))))
{
if
(!
"null"
.
equals
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))))
{
jgEnableDisable
=
this
.
baseMapper
.
selectById
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
jgEnableDisable
=
this
.
baseMapper
.
selectById
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
}
else
{
// 获取申请编号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
getCode
.
get
(
String
.
valueOf
(
map
.
get
(
"businessCode"
))),
1
);
jgEnableDisable
.
setApplyNo
(
listResponseModel
.
getResult
().
get
(
0
));
}
}
jgEnableDisable
.
setCreateDate
(
new
Date
());
jgEnableDisable
.
setCreateDate
(
new
Date
());
String
submit
=
String
.
valueOf
(
map
.
get
(
"submit"
));
String
submit
=
String
.
valueOf
(
map
.
get
(
"submit"
));
String
pageType
=
String
.
valueOf
(
map
.
get
(
"formType"
));
String
pageType
=
String
.
valueOf
(
map
.
get
(
"formType"
));
String
record
=
String
.
valueOf
(
map
.
get
(
"record"
));
String
record
=
String
.
valueOf
(
map
.
get
(
"record"
));
String
businessCode
=
String
.
valueOf
(
map
.
get
(
"businessCod
e"
));
String
businessCode
=
ObjectUtils
.
isEmpty
(
map
.
get
(
"applyType"
))?
String
.
valueOf
(
map
.
get
(
"businessCode"
)):
String
.
valueOf
(
map
.
get
(
"applyTyp
e"
));
// 接收机构
// 接收机构
String
[]
receiveOrgCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
String
[]
receiveOrgCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
List
<
WorkflowResultDto
>
workflowResultList
=
new
ArrayList
<>();
List
<
WorkflowResultDto
>
workflowResultList
=
new
ArrayList
<>();
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
List
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
String
instanceId
=
""
;
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 只调用执行API,返回下个节点信息,用于填充业务字段
if
(
map
.
containsKey
(
"instanceId"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
))){
//组装信息
// 只调用执行API,返回下个节点信息,用于填充业务字段
TaskResultDTO
dto
=
new
TaskResultDTO
();
//组装信息
dto
.
setResultCode
(
"approvalStatus"
);
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setTaskId
(
jgEnableDisable
.
getNextTaskId
());
dto
.
setResultCode
(
"approvalStatus"
);
HashMap
<
String
,
Object
>
commMap
=
new
HashMap
<>();
dto
.
setTaskId
(
jgEnableDisable
.
getNextTaskId
());
if
(
FlowStatusEnum
.
REJECTED
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
())
||
FlowStatusEnum
.
ROLLBACK
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
()))
{
HashMap
<
String
,
Object
>
commMap
=
new
HashMap
<>();
commMap
.
put
(
"approvalStatus"
,
"提交"
);
if
(
FlowStatusEnum
.
REJECTED
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
())
||
FlowStatusEnum
.
ROLLBACK
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
()))
{
//下一节点执行人单位(下节点接收机构code)
commMap
.
put
(
"approvalStatus"
,
"提交"
);
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getUseUnitCreditCode
());
//下一节点执行人单位(下节点接收机构code)
}
else
{
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getReceiveCompanyCode
());
commMap
.
put
(
"approvalStatus"
,
submit
);
}
else
{
//下一节点执行人单位(下节点接收机构code)
commMap
.
put
(
"approvalStatus"
,
submit
);
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getReceiveCompanyCode
());
//下一节点执行人单位(下节点接收机构code)
}
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getUseUnitCreditCode
());
}
dto
.
setVariable
(
commMap
);
processTaskDTO
=
iCmWorkflowService
.
complete
(
jgEnableDisable
.
getNextTaskId
(),
dto
);
// 提取节点等信息
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
if
(!
ObjectUtils
.
isEmpty
(
jgEnableDisable
.
getExecuteSequence
()))
{
dto
.
setVariable
(
commMap
);
jgEnableDisable
.
setExecuteSequence
(
jgEnableDisable
.
getExecuteSequence
()
+
","
+
workflowResultDto
.
getNextExecutorRoleIds
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
complete
(
jgEnableDisable
.
getNextTaskId
(),
dto
);
processTaskDTOS
.
add
(
processTaskDTO
);
// 提取节点等信息
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
workflowResultList
.
add
(
workflowResultDto
);
if
(!
ObjectUtils
.
isEmpty
(
jgEnableDisable
.
getExecuteSequence
()))
{
jgEnableDisable
.
setExecuteSequence
(
jgEnableDisable
.
getExecuteSequence
()
+
","
+
workflowResultDto
.
getNextExecutorRoleIds
());
}
else
{
jgEnableDisable
.
setExecuteSequence
(
workflowResultDto
.
getNextExecutorRoleIds
());
}
jgEnableDisable
.
setEquList
(
"null"
.
equals
(
record
)
?
"null"
:
map
.
get
(
"equListDesc"
).
toString
());
jgEnableDisable
.
setSupervisoryCode
(
"null"
.
equals
(
record
)
?
"null"
:
map
.
get
(
"supervisoryCode"
).
toString
());
jgEnableDisable
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgEnableDisable
.
setNextExecutorIds
(
String
.
join
(
","
,
workflowResultDto
.
getNextExecutorRoleIds
()));
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
jgEnableDisable
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgEnableDisable
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
this
.
baseMapper
.
updateById
(
jgEnableDisable
);
// 上个代办改为已办
HashMap
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
map1
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
map1
.
put
(
"relationId"
,
jgEnableDisable
.
getInstanceId
());
map1
.
put
(
"flowStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
map1
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
TaskV2Model
taskV2Model
=
commonService
.
updateTaskModel
(
map1
);
if
(
ObjectUtils
.
isEmpty
(
taskV2Model
))
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
// 创建新的代办
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgEnableDisable
,
taskMessageDto
);
taskModelDto
.
setModel
(
taskMessageDto
);
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowCode
(
jgEnableDisable
.
getNextTaskId
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
else
{
}
else
{
jgEnableDisable
.
setExecuteSequence
(
workflowResultDto
.
getNextExecutorRoleIds
());
// 启动工作流并返回信息
workflowResultList
=
workFlowInfo
(
submit
,
record
,
receiveOrgCode
[
0
]);
//业务数据组装等
businessData
(
submit
,
reginParams
,
jgEnableDisable
,
map
,
workflowResultList
);
}
}
jgEnableDisable
.
setEquList
(
"null"
.
equals
(
record
)
?
"null"
:
map
.
get
(
"equListDesc"
).
toString
());
jgEnableDisable
.
setSupervisoryCode
(
"null"
.
equals
(
record
)
?
"null"
:
map
.
get
(
"supervisoryCode"
).
toString
());
jgEnableDisable
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgEnableDisable
.
setNextExecutorIds
(
String
.
join
(
","
,
workflowResultDto
.
getNextExecutorRoleIds
()));
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
jgEnableDisable
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgEnableDisable
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
this
.
baseMapper
.
updateById
(
jgEnableDisable
);
// 上个代办改为已办
HashMap
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
map1
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
map1
.
put
(
"relationId"
,
jgEnableDisable
.
getInstanceId
());
map1
.
put
(
"flowStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
map1
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
TaskV2Model
taskV2Model
=
commonService
.
updateTaskModel
(
map1
);
if
(
ObjectUtils
.
isEmpty
(
taskV2Model
))
{
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
jgEnableDisable
),
businessCode
,
Collections
.
singletonList
(
workflowResultDto
),
Boolean
.
TRUE
);
}
else
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
// 创建新的代办
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgEnableDisable
,
taskMessageDto
);
taskModelDto
.
setModel
(
taskMessageDto
);
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
taskModelDto
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowCode
(
jgEnableDisable
.
getNextTaskId
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
else
{
// 获取申请编号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
getCode
.
get
(
String
.
valueOf
(
map
.
get
(
"businessCode"
))),
1
);
jgEnableDisable
.
setApplyNo
(
listResponseModel
.
getResult
().
get
(
0
));
// 启动工作流并返回信息
workflowResultList
=
workFlowInfo
(
submit
,
record
,
receiveOrgCode
[
0
]);
//业务数据组装等
businessData
(
submit
,
reginParams
,
jgEnableDisable
,
map
,
workflowResultList
);
}
}
// 仅保存
// 仅保存
this
.
saveOrUpdate
(
jgEnableDisable
);
if
(
"add"
.
equals
(
pageType
))
{
if
(
"add"
.
equals
(
pageType
))
{
this
.
save
(
jgEnableDisable
);
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
,
Boolean
.
FALSE
);
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
,
Boolean
.
FALSE
);
if
(!
SUBMIT_TYPE_FLOW
.
equals
(
submit
)){
// 暂存任务
buildTaskDraft
(
jgEnableDisable
);
}
}
else
{
}
else
{
// 编辑
// 编辑
jgEnableDisable
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgEnableDisable
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
...
@@ -192,12 +187,18 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -192,12 +187,18 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
}
}
if
(!
SUBMIT_TYPE_FLOW
.
equals
(
submit
)){
// 暂存任务
buildTaskDraft
(
jgEnableDisable
);
}
else
{
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
,
Boolean
.
TRUE
);
}
if
(!
"null"
.
equals
(
record
)){
if
(!
"null"
.
equals
(
record
)){
// 关联设备表
// 关联设备表
JgEnableDisableEq
jgEnableDisableEq
=
new
JgEnableDisableEq
();
JgEnableDisableEq
jgEnableDisableEq
=
new
JgEnableDisableEq
();
jgEnableDisableEq
.
setEquId
(
record
);
jgEnableDisableEq
.
setEquId
(
record
);
jgEnableDisableEq
.
setEnableDisableApplyId
(
jgEnableDisable
.
getSequenceNbr
().
toString
());
jgEnableDisableEq
.
setEnableDisableApplyId
(
jgEnableDisable
.
getSequenceNbr
().
toString
());
jgEnableDisableEqService
.
save
(
jgEnableDisableEq
);
jgEnableDisableEqService
.
save
OrUpdate
(
jgEnableDisableEq
);
}
}
}
}
...
@@ -209,20 +210,24 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -209,20 +210,24 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
private
void
buildTaskDraft
(
JgEnableDisable
jgEnableDisable
)
{
private
void
buildTaskDraft
(
JgEnableDisable
jgEnableDisable
)
{
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
TaskModelDto
dto
=
new
TaskModelDto
();
TaskModelDto
dto
=
new
TaskModelDto
();
//行数据
//行数据
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgEnableDisable
,
taskMessageDto
);
BeanUtils
.
copyProperties
(
jgEnableDisable
,
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
//摘要 按原有规则组装
//摘要 按原有规则组装
dto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
jgEnableDisable
.
getEquList
(),
jgEnableDisable
.
getSequenceNbr
(),
jgEnableDisable
.
getApplyNo
()));
dto
.
setTaskContent
(
//申请单号
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
dto
.
setTaskCode
(
jgEnableDisable
.
getApplyNo
());
ObjectUtils
.
isEmpty
(
jgEnableDisable
.
getEquList
())
?
"null"
:
jgEnableDisable
.
getEquList
(),
//业务类型枚举code值
ObjectUtils
.
isEmpty
(
jgEnableDisable
.
getSupervisoryCode
())
?
"null"
:
jgEnableDisable
.
getSupervisoryCode
(),
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
jgEnableDisable
.
getApplyNo
()));
////业务主键
//申请单号
dto
.
setRelationId
(
jgEnableDisable
.
getSequenceNbr
()
+
""
);
dto
.
setTaskCode
(
jgEnableDisable
.
getApplyNo
());
modelDtos
.
add
(
dto
);
//业务类型枚举code值
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getCode
());
////业务主键
dto
.
setRelationId
(
jgEnableDisable
.
getSequenceNbr
()
+
""
);
modelDtos
.
add
(
dto
);
commonService
.
buildTaskModel
(
modelDtos
);
commonService
.
buildTaskModel
(
modelDtos
);
}
}
...
@@ -242,22 +247,21 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -242,22 +247,21 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
jgEnableDisable
.
setApplyType
(
map
.
getString
(
"applyType"
));
jgEnableDisable
.
setApplyType
(
map
.
getString
(
"applyType"
));
jgEnableDisable
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
jgEnableDisable
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
jgEnableDisable
.
setNextExecuteUserIds
(
workflowResultList
.
get
(
0
).
getNextExecutorUserIds
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
jgEnableDisable
.
setNextExecutorIds
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
());
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
jgEnableDisable
.
setExecuteSequence
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
0
).
getExecutorRoleIds
());
jgEnableDisable
.
setNextExecuteUserIds
(
workflowResultList
.
get
(
0
).
getNextExecutorUserIds
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
jgEnableDisable
.
setNextTaskId
(
workflowResultList
.
get
(
0
).
getNextTaskId
());
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
}
jgEnableDisable
.
setNextExecutorIds
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
());
jgEnableDisable
.
setEquList
(
map
.
get
(
"equListDesc"
).
toString
());
jgEnableDisable
.
setExecuteSequence
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
0
).
getExecutorRoleIds
());
jgEnableDisable
.
setSupervisoryCode
(
map
.
get
(
"supervisoryCode"
).
toString
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
jgEnableDisable
.
setNextTaskId
(
workflowResultList
.
get
(
0
).
getNextTaskId
());
jgEnableDisable
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
}
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
}
else
{
}
else
{
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
()));
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
()));
}
}
jgEnableDisable
.
setEquList
(
String
.
valueOf
(
map
.
get
(
"equListDesc"
)));
jgEnableDisable
.
setSupervisoryCode
(
String
.
valueOf
(
map
.
get
(
"supervisoryCode"
)));
jgEnableDisable
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
jgEnableDisable
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
jgEnableDisable
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
}
}
...
@@ -270,16 +274,17 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -270,16 +274,17 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
String
taskType
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getCode
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getCode
();
String
taskType
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getCode
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getCode
();
String
taskTypeLabel
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getName
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getName
();
String
taskTypeLabel
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getName
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getName
();
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
WorkflowResultDto
workflowResultDto
=
workflowResultList
.
get
(
0
);
list
.
forEach
(
item
->
{
list
.
forEach
(
item
->
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCreateDate
(
item
.
getCreateDate
());
taskModelDto
.
setFlowCreateDate
(
item
.
getCreateDate
());
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
// 工作流API返回
if
(
workflowResultList
.
size
()>
0
){
taskModelDto
.
setTaskName
(
workflowResultList
.
get
(
0
).
getNextTaskName
());
// 工作流API返回
taskModelDto
.
setExecuteUserIds
(
workflowResultList
.
get
(
0
).
getNextExecutorUserIds
());
// 工作流API返回
}
taskModelDto
.
setTaskCode
(
item
.
getApplyNo
());
taskModelDto
.
setTaskCode
(
item
.
getApplyNo
());
taskModelDto
.
setTaskType
(
taskType
);
taskModelDto
.
setTaskType
(
taskType
);
taskModelDto
.
setTaskTypeLabel
(
taskTypeLabel
);
taskModelDto
.
setTaskTypeLabel
(
taskTypeLabel
);
taskModelDto
.
setRelationId
(
item
.
getInstanceId
());
taskModelDto
.
setRelationId
(
item
.
getInstanceId
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
// 工作流API返回
taskModelDto
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowStatus
(
commonService
.
getDictionaryCodeByName
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
// 流程状态枚举
taskModelDto
.
setFlowStatus
(
commonService
.
getDictionaryCodeByName
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
// 流程状态枚举
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
...
@@ -299,7 +304,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -299,7 +304,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()+
""
);
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()+
""
);
}
}
});
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
if
(
bool
){
commonService
.
buildTaskModel
(
taskModelDtoList
);
}
}
}
...
@@ -491,6 +498,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -491,6 +498,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgEnableDisable
));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgEnableDisable
));
jsonObject
.
put
(
"nextExecuteUser"
,
jgEnableDisable
.
getNextExecutorIds
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgEnableDisable
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getCode
());
jsonObject
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
ROLLBACK
.
getName
());
jsonObject
.
put
(
"flowStatus"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
());
commonService
.
rollbackTask
(
jgEnableDisable
.
getInstanceId
(),
jsonObject
);
commonService
.
rollbackTask
(
jgEnableDisable
.
getInstanceId
(),
jsonObject
);
}
}
...
@@ -560,17 +569,19 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -560,17 +569,19 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
Map
<
String
,
Object
>
resultMap
=
this
.
baseMapper
.
getDetail
(
sequenceNbr
);
Map
<
String
,
Object
>
resultMap
=
this
.
baseMapper
.
getDetail
(
sequenceNbr
);
JgEnableDisableEq
jgEnableDisableEq
=
jgEnableDisableEqMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgEnableDisableEq
>().
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
));
JgEnableDisableEq
jgEnableDisableEq
=
jgEnableDisableEqMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgEnableDisableEq
>().
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
));
Map
<
String
,
Object
>
map
=
jgMaintainNoticeMapper
.
getEquipInfoByRecord
(
jgEnableDisableEq
.
getEquId
());
if
(!
ObjectUtils
.
isEmpty
(
jgEnableDisableEq
)){
map
.
put
(
"equListDesc"
,
map
.
get
(
"equList"
));
Map
<
String
,
Object
>
map
=
jgMaintainNoticeMapper
.
getEquipInfoByRecord
(
jgEnableDisableEq
.
getEquId
());
map
.
put
(
"equCategoryDesc"
,
map
.
get
(
"equCategory"
));
map
.
put
(
"equListDesc"
,
map
.
get
(
"equList"
));
map
.
put
(
"equDefineDesc"
,
map
.
get
(
"equDefine"
));
map
.
put
(
"equCategoryDesc"
,
map
.
get
(
"equCategory"
));
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
map
.
put
(
"equDefineDesc"
,
map
.
get
(
"equDefine"
));
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
for
(
String
s
:
fields
)
{
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
if
(
map
.
containsKey
(
s
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
s
)))
for
(
String
s
:
fields
)
{
map
.
put
(
s
,
JSON
.
parseArray
(
map
.
get
(
s
).
toString
()));
if
(
map
.
containsKey
(
s
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
s
)))
map
.
put
(
s
,
JSON
.
parseArray
(
map
.
get
(
s
).
toString
()));
}
resultMap
.
putAll
(
map
);
}
}
resultMap
.
putAll
(
map
);
return
resultMap
;
return
resultMap
;
}
}
...
...
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 @
0ad0b26b
...
@@ -214,6 +214,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -214,6 +214,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param noticeDto 安装告知
* @param noticeDto 安装告知
*/
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
@Transactional
public
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
public
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
...
@@ -729,6 +730,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -729,6 +730,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
@Transactional
public
void
cancel
(
JgInstallationNoticeDto
noticeDto
)
{
public
void
cancel
(
JgInstallationNoticeDto
noticeDto
)
{
JgInstallationNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgInstallationNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
...
@@ -742,6 +744,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -742,6 +744,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgInstallationNotice
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgInstallationNotice
));
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
ROLLBACK
.
getName
());
jsonObject
.
put
(
"flowStatus"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
());
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
}
}
...
...
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 @
0ad0b26b
...
@@ -548,12 +548,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -548,12 +548,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
});
});
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
try
{
List
<
ProcessTaskDTO
>
processTaskDTOS
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
return
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
return
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
0ad0b26b
...
@@ -17,7 +17,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
...
@@ -17,7 +17,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
...
@@ -43,7 +42,6 @@ import org.springframework.util.ObjectUtils;
...
@@ -43,7 +42,6 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
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.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
...
@@ -162,29 +160,25 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -162,29 +160,25 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
}
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
try
{
JgMaintenanceContract
contract
=
this
.
getBaseMapper
().
selectById
(
id
);
JgMaintenanceContract
contract
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
contract
.
getNextTaskId
();
String
taskId
=
contract
.
getNextTaskId
();
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
if
(
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getReject
().
equals
(
contract
.
getStatus
())
||
if
(
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getReject
().
equals
(
contract
.
getStatus
())
||
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getRollBack
().
equals
(
contract
.
getStatus
()))
{
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getRollBack
().
equals
(
contract
.
getStatus
()))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
getNextUserOrgCode
(
operate
,
contract
));
ProcessTaskDTO
complete
=
workflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
complete
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
getNextUserOrgCode
(
operate
,
contract
));
ProcessTaskDTO
complete
=
workflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
complete
);
}
}
public
String
getNextUserOrgCode
(
String
operate
,
JgMaintenanceContract
contract
)
{
public
String
getNextUserOrgCode
(
String
operate
,
JgMaintenanceContract
contract
)
{
...
@@ -267,12 +261,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -267,12 +261,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/
*/
@Transactional
@Transactional
public
void
revocation
(
String
instanceId
)
{
public
void
revocation
(
String
instanceId
)
{
JgMaintenanceContract
contract
=
new
JgMaintenanceContract
();
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
lambda
.
eq
(
JgMaintenanceContract:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
JgMaintenanceContract:
:
getInstanceId
,
instanceId
);
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
contract
=
this
.
getOne
(
lambda
);
JgMaintenanceContract
contract
=
this
.
getOne
(
lambda
);
ProcessTaskDTO
processTaskDTO
=
workflowService
.
rollBack
(
instanceId
);
ProcessTaskDTO
processTaskDTO
=
workflowService
.
rollBack
(
instanceId
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
...
@@ -296,7 +289,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -296,7 +289,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
contract
.
getStatus
()));
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
contract
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
contract
.
getStatus
());
jsonObject
.
put
(
"flowStatusLabel"
,
contract
.
getStatus
());
jsonObject
.
put
(
"
changeCertificate"
,
null
);
jsonObject
.
put
(
"
maintenanceContract"
,
null
);
//不传合同照片附件信息
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
}
...
@@ -304,7 +297,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -304,7 +297,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
* 新增维保合同
* 新增维保合同
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
saveOrSubmit
(
String
submit
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
public
List
<
JgMaintenanceContract
>
saveOrSubmit
(
String
submit
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
JgMaintenanceContractDto
contractDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgMaintenanceContractDto
.
class
);
JgMaintenanceContractDto
contractDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgMaintenanceContractDto
.
class
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
CompanyBo
company
=
reginParams
.
getCompany
();
CompanyBo
company
=
reginParams
.
getCompany
();
...
@@ -314,7 +307,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -314,7 +307,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
WBBA
.
getCode
(),
1
);
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
WBBA
.
getCode
(),
1
);
if
(!
ObjectUtils
.
isEmpty
(
listResponseModel
)
&&
listResponseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
if
(!
ObjectUtils
.
isEmpty
(
listResponseModel
)
&&
listResponseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
log
.
error
(
"告知单获取失败"
);
log
.
error
(
"告知单获取失败"
);
return
false
;
return
null
;
}
}
String
wbApplyNo
=
listResponseModel
.
getResult
().
get
(
0
);
String
wbApplyNo
=
listResponseModel
.
getResult
().
get
(
0
);
contractDto
.
setApplyNo
(
wbApplyNo
);
contractDto
.
setApplyNo
(
wbApplyNo
);
...
@@ -375,38 +368,34 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -375,38 +368,34 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
//新增提交
//新增提交
if
(
StringUtils
.
isEmpty
(
contract
.
getInstanceId
()))
{
if
(
StringUtils
.
isEmpty
(
contract
.
getInstanceId
()))
{
//没有InstanceId需要发起流程
//没有InstanceId需要发起流程
try
{
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
contract
.
getApplyNo
());
dto
.
setBusinessKey
(
contract
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
//下一节点执行人单位(下节点接收机构code)
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
contract
.
getMaintenanceUnitCode
());
dto
.
setNextExecuteUserCompanyCode
(
contract
.
getMaintenanceUnitCode
());
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTasks
=
workflowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
ProcessTaskDTO
>
processTasks
=
workflowService
.
startBatch
(
actWorkflowBatchDTO
);
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
contract
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
contract
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
contract
.
setInstanceId
(
instanceId
);
contract
.
setInstanceId
(
instanceId
);
contract
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListNext
));
contract
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListNext
));
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setNextExecuteUserIds
(
nextUserIds
);
contract
.
setNextExecuteUserIds
(
nextUserIds
);
commonService
.
deleteTaskModel
(
contract
.
getSequenceNbr
()
+
""
);
// 创建待办
// 创建待办
JgMaintenanceContract
bean
=
new
JgMaintenanceContract
();
JgMaintenanceContract
bean
=
new
JgMaintenanceContract
();
BeanUtil
.
copyProperties
(
contract
,
bean
);
BeanUtil
.
copyProperties
(
contract
,
bean
);
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
else
{
}
else
{
// 有InstanceId,执行一步
// 有InstanceId,执行一步
ProcessTaskDTO
processTaskDTO
=
this
.
submit
(
"0"
,
contract
);
ProcessTaskDTO
processTaskDTO
=
this
.
submit
(
"0"
,
contract
);
...
@@ -426,22 +415,22 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -426,22 +415,22 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setNextExecuteUserIds
(
nextUserIds
);
contract
.
setNextExecuteUserIds
(
nextUserIds
);
commonService
.
deleteTaskModel
(
contract
.
getSequenceNbr
()
+
""
);
executeOneStep
(
contract
,
taskName
,
nextUserIds
,
"0"
);
executeOneStep
(
contract
,
taskName
,
nextUserIds
,
"0"
);
}
}
commonService
.
deleteTaskModel
(
contract
.
getSequenceNbr
()+
""
);
}
else
{
}
else
{
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
TaskModelDto
dto
=
new
TaskModelDto
();
TaskModelDto
dto
=
new
TaskModelDto
();
dto
.
setModel
(
contract
);
dto
.
setModel
(
contract
);
dto
.
setTaskContent
(
buildTaskContent
(
contract
));
dto
.
setTaskContent
(
buildTaskContent
(
contract
));
dto
.
setTaskCode
(
contract
.
getApplyNo
());
dto
.
setTaskCode
(
contract
.
getApplyNo
());
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_
COMPANY_CHANGE_REGISTRATION
.
getCode
());
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_
MAINTENANCE_RECORD
.
getCode
());
dto
.
setRelationId
(
contract
.
getSequenceNbr
()
+
""
);
dto
.
setRelationId
(
contract
.
getSequenceNbr
()
+
""
);
modelDtos
.
add
(
dto
);
modelDtos
.
add
(
dto
);
commonService
.
buildTaskModel
(
modelDtos
);
commonService
.
buildTaskModel
(
modelDtos
);
}
}
updateById
(
contract
);
updateById
(
contract
);
return
true
;
return
Collections
.
singletonList
(
contract
)
;
}
}
public
ProcessTaskDTO
submit
(
String
op
,
JgMaintenanceContract
contract
)
{
public
ProcessTaskDTO
submit
(
String
op
,
JgMaintenanceContract
contract
)
{
...
...
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 @
0ad0b26b
...
@@ -50,7 +50,6 @@ import org.springframework.util.StringUtils;
...
@@ -50,7 +50,6 @@ import org.springframework.util.StringUtils;
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.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
...
@@ -202,19 +201,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -202,19 +201,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
list
.
add
(
dto
);
list
.
add
(
dto
);
}
}
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
try
{
processTaskDTOS
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTaskDTOS
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
this
.
buildRoleList
(
processTaskDTOS
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTaskDTOS
,
roleListNext
,
roleListAll
);
instanceId
=
processTaskDTOS
.
get
(
0
).
getProcessInstance
().
getId
();
instanceId
=
processTaskDTOS
.
get
(
0
).
getProcessInstance
().
getId
();
nextTaskId
=
processTaskDTOS
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
nextTaskId
=
processTaskDTOS
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
taskName
[
0
]
=
processTaskDTOS
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
taskName
[
0
]
=
processTaskDTOS
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
this
.
buildRoleList
(
processTaskDTOS
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTaskDTOS
,
roleListNext
,
roleListAll
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
}
List
<
JgScrapCancel
>
list
=
new
ArrayList
<>();
List
<
JgScrapCancel
>
list
=
new
ArrayList
<>();
...
@@ -329,11 +323,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -329,11 +323,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
if
(!
ids
.
isEmpty
())
{
jgScrapCancel
.
setIsDelete
(
true
);
for
(
Long
id
:
ids
)
{
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
in
(
JgScrapCancel:
:
getSequenceNbr
,
ids
);
lambda
.
eq
(
JgScrapCancel:
:
getSequenceNbr
,
id
);
this
.
update
(
jgScrapCancel
,
lambda
);
JgScrapCancel
jgScrapCancel
=
this
.
baseMapper
.
selectOne
(
lambda
);
//删除代办消息
commonService
.
deleteTaskModel
(
jgScrapCancel
.
getInstanceId
());
//更新jgScrapCancel数据
jgScrapCancel
.
setIsDelete
(
true
);
this
.
updateById
(
jgScrapCancel
);
}
}
}
}
public
JgScrapCancelDto
updateInfo
(
String
submitType
,
JgScrapCancelDto
jgScrapCancelDto
,
String
op
)
{
public
JgScrapCancelDto
updateInfo
(
String
submitType
,
JgScrapCancelDto
jgScrapCancelDto
,
String
op
)
{
...
@@ -349,39 +350,35 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -349,39 +350,35 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 发起流程
// 发起流程
if
(!
StringUtils
.
hasText
(
jgScrapCancelDto
.
getInstanceId
()))
{
if
(!
StringUtils
.
hasText
(
jgScrapCancelDto
.
getInstanceId
()))
{
//未进流程直接发起并执行
//未进流程直接发起并执行
try
{
List
<
ProcessTaskDTO
>
processTasks
;
List
<
ProcessTaskDTO
>
processTasks
;
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"scrapCancelNew"
);
dto
.
setProcessDefinitionKey
(
"scrapCancelNew"
);
dto
.
setBusinessKey
(
jgScrapCancelDto
.
getApplyNo
());
dto
.
setBusinessKey
(
jgScrapCancelDto
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setCompleteFirstTask
(
true
);
dto
.
setNextExecuteUserCompanyCode
(
jgScrapCancelDto
.
getReceiveOrgCode
());
dto
.
setNextExecuteUserCompanyCode
(
jgScrapCancelDto
.
getReceiveOrgCode
());
list
.
add
(
dto
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
String
taskName
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
processTasks
,
roleListNext
,
roleListAll
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonService
.
buildWorkFlowInfo
(
processTasks
);
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
jgScrapCancelDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgScrapCancelDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListAll
));
jgScrapCancelDto
.
setInstanceId
(
instanceId
);
jgScrapCancelDto
.
setInstanceId
(
instanceId
);
jgScrapCancelDto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListNext
));
jgScrapCancelDto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListNext
));
jgScrapCancelDto
.
setNextTaskId
(
nextTaskId
);
jgScrapCancelDto
.
setNextTaskId
(
nextTaskId
);
jgScrapCancelDto
.
setNextExecuteUserIds
(
nextUserIds
);
jgScrapCancelDto
.
setNextExecuteUserIds
(
nextUserIds
);
jgScrapCancelDto
.
setAuditStatus
(
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getPass
());
jgScrapCancelDto
.
setAuditStatus
(
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getPass
());
// 创建待办
// 创建待办
JgScrapCancel
bean
=
new
JgScrapCancel
();
JgScrapCancel
bean
=
new
JgScrapCancel
();
BeanUtil
.
copyProperties
(
jgScrapCancelDto
,
bean
);
BeanUtil
.
copyProperties
(
jgScrapCancelDto
,
bean
);
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
()));
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
()));
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
throw
new
BadRequest
(
"提交失败"
+
e
.
getMessage
());
}
}
else
{
}
else
{
// 已经在流程中,执行一步
// 已经在流程中,执行一步
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgScrapCancelDto
.
getNextTaskId
());
ProcessTaskDTO
processTaskDTO
=
submit
(
op
,
jgScrapCancelDto
.
getNextTaskId
());
...
@@ -595,29 +592,25 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -595,29 +592,25 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
@Transactional
@Transactional
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
id
);
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
jgScrapCancel
.
getNextTaskId
();
String
taskId
=
jgScrapCancel
.
getNextTaskId
();
//组装信息
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
map
.
put
(
"approvalStatus"
,
operate
);
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
())
&&
(
jgScrapCancel
.
getInstanceStatus
().
equals
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getReject
())
||
jgScrapCancel
.
getInstanceStatus
().
equals
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getRollBack
())))
{
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
())
&&
(
jgScrapCancel
.
getInstanceStatus
().
equals
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getReject
())
||
jgScrapCancel
.
getInstanceStatus
().
equals
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getRollBack
())))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgScrapCancel
));
//执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
processTaskDTO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgScrapCancel
));
//执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
processTaskDTO
);
}
}
...
...
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/JgTransferNoticeServiceImpl.java
View file @
0ad0b26b
...
@@ -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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -125,11 +126,11 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -125,11 +126,11 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
for
(
String
s
:
fields
)
{
for
(
String
s
:
fields
)
{
if
(
transferNotice
.
containsKey
(
s
))
{
if
(
transferNotice
.
containsKey
(
s
))
{
if
(
"powerOfAttorney"
.
equalsIgnoreCase
(
s
))
{
if
(
"powerOfAttorney"
.
equalsIgnoreCase
(
s
))
{
transferNotice
.
put
(
"powerOfAttorneyList"
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
transferNotice
.
put
(
"powerOfAttorneyList"
,
ObjectUtils
.
isEmpty
(
transferNotice
.
get
(
s
))
?
new
JSONArray
()
:
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
else
if
(
"constructionContract"
.
equalsIgnoreCase
(
s
))
{
}
else
if
(
"constructionContract"
.
equalsIgnoreCase
(
s
))
{
transferNotice
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
transferNotice
.
put
(
"constructionContractList"
,
ObjectUtils
.
isEmpty
(
transferNotice
.
get
(
s
))
?
new
JSONArray
()
:
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
else
{
}
else
{
transferNotice
.
put
(
s
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
transferNotice
.
put
(
s
,
ObjectUtils
.
isEmpty
(
transferNotice
.
get
(
s
))
?
new
JSONArray
()
:
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
}
}
}
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
...
@@ -243,6 +244,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -243,6 +244,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
* @param noticeDto 移装告知
* @param noticeDto 移装告知
*/
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
@Transactional
public
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
)
{
public
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
)
{
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
);
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
...
@@ -623,6 +625,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -623,6 +625,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
@Transactional
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
JgTransferNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgTransferNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
...
@@ -636,6 +639,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -636,6 +639,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgInstallationNotice
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgInstallationNotice
));
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getCode
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
ROLLBACK
.
getName
());
jsonObject
.
put
(
"flowStatus"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
());
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
}
}
...
...
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 @
0ad0b26b
...
@@ -462,6 +462,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -462,6 +462,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject
.
put
(
"nextExecuteUser"
,
data
.
getNextExecuteIds
());
jsonObject
.
put
(
"nextExecuteUser"
,
data
.
getNextExecuteIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"equipId"
,
jgUseRegistrationEq
.
getEquId
());
jsonObject
.
put
(
"equipId"
,
jgUseRegistrationEq
.
getEquId
());
jsonObject
.
put
(
"flowStatus"
,
commonServiceImpl
.
getDictionaryCodeByName
(
jgUseRegistration
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgUseRegistration
.
getStatus
());
if
(!
WorkFlowStatusEnum
.
USE_SUBMIT
.
getCode
().
equals
(
taskCode
))
{
if
(!
WorkFlowStatusEnum
.
USE_SUBMIT
.
getCode
().
equals
(
taskCode
))
{
jsonObject
.
put
(
"pageType"
,
"look"
);
jsonObject
.
put
(
"pageType"
,
"look"
);
}
}
...
@@ -488,22 +490,30 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -488,22 +490,30 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject
.
put
(
"receiveOrgCode"
,
jgUseRegistration
.
getReceiveCompanyCode
()
+
"_"
+
jgUseRegistration
.
getReceiveOrgName
());
jsonObject
.
put
(
"receiveOrgCode"
,
jgUseRegistration
.
getReceiveCompanyCode
()
+
"_"
+
jgUseRegistration
.
getReceiveOrgName
());
jsonObject
.
put
(
"status"
,
jgUseRegistration
.
getStatus
());
jsonObject
.
put
(
"status"
,
jgUseRegistration
.
getStatus
());
jsonObject
.
put
(
"applyNo"
,
jgUseRegistration
.
getApplyNo
());
jsonObject
.
put
(
"applyNo"
,
jgUseRegistration
.
getApplyNo
());
jsonObject
.
remove
(
"submit"
);
jsonObject
.
remove
(
"instanceId"
);
return
jsonObject
;
return
jsonObject
;
}
}
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
Map
<
String
,
Object
>
useDestail
=
this
.
baseMapper
.
getDesDetail
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
inspectDetail
))
{
if
(!
ObjectUtils
.
isEmpty
(
inspectDetail
))
{
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
inspectDetail
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
useDetail
))
{
if
(!
ObjectUtils
.
isEmpty
(
useDetail
))
{
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
useDestail
))
{
detail
.
putAll
(
useDestail
);
}
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
detail
.
put
(
"insUseMaintainExplanin"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"insUseMaintainExplanin"
))));
detail
.
put
(
"insUseMaintainExplanin"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"insUseMaintainExplanin"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
return
detail
;
return
detail
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/json/urlInfo.json
View file @
0ad0b26b
...
@@ -135,19 +135,19 @@
...
@@ -135,19 +135,19 @@
"type"
:
"109"
,
"type"
:
"109"
,
"pageType"
:
"draft"
,
"pageType"
:
"draft"
,
"name"
:
"单位变更登记"
,
"name"
:
"单位变更登记"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1738018156141637633&roleIds={roleIds}&userId={userId}&pageType=edit"
"url"
:
"/mixuap?appId=1742358052905971713&id=1738018156141637633&roleIds={roleIds}&userId={userId}&pageType=edit
&isEdit=true
"
},
},
{
{
"type"
:
"109"
,
"type"
:
"109"
,
"pageType"
:
"look"
,
"pageType"
:
"look"
,
"name"
:
"单位变更登记"
,
"name"
:
"单位变更登记"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=look"
"url"
:
"/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=look
&isEdit=false
"
},
},
{
{
"type"
:
"109"
,
"type"
:
"109"
,
"pageType"
:
"edit"
,
"pageType"
:
"edit"
,
"name"
:
"单位变更登记"
,
"name"
:
"单位变更登记"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=edit"
"url"
:
"/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=edit
&isEdit=true
"
},
},
{
{
"type"
:
"110"
,
"type"
:
"110"
,
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
"type"
:
"111"
,
"type"
:
"111"
,
"name"
:
"改造变更登记"
,
"name"
:
"改造变更登记"
,
"pageType"
:
"draft"
,
"pageType"
:
"draft"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1737
029146837544962&roleIds={roleIds}&userId={userId}&pageType=look
"
"url"
:
"/mixuap?appId=1742358052905971713&id=1737
415710281330690&roleIds={roleIds}&userId={userId}&pageType=edit
"
},
},
{
{
"type"
:
"111"
,
"type"
:
"111"
,
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
View file @
0ad0b26b
...
@@ -39,4 +39,14 @@ public enum EquipmentClassifityEnum {
...
@@ -39,4 +39,14 @@ public enum EquipmentClassifityEnum {
}
}
}
}
public
static
String
getNameByCode
(
String
code
){
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
if
(
value
.
getCode
().
equals
(
code
)){
return
value
.
getName
();
}
}
return
""
;
}
}
}
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