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
038b1c4a
Commit
038b1c4a
authored
Feb 02, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检验检测转办功能
parent
7aea2d82
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
220 additions
and
11 deletions
+220
-11
JyjcInspectionApplication.java
...oot/module/jyjc/api/entity/JyjcInspectionApplication.java
+4
-1
JyjcOpeningApplication.java
...s/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
+3
-0
JyjcBaseMapper.java
...join/amos/boot/module/jyjc/api/mapper/JyjcBaseMapper.java
+4
-0
JyjcInspectionApplicationMapper.java
...dule/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
+1
-1
JyjcOpeningApplicationMapper.java
.../module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
+3
-1
JyjcInspectionApplicationModel.java
...module/jyjc/api/model/JyjcInspectionApplicationModel.java
+4
-4
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+3
-0
TaskMessageDto.java
...ejoin/amos/boot/module/jyjc/api/model/TaskMessageDto.java
+1
-0
JyjcBaseMapper.xml
...ule-jyjc-api/src/main/resources/mapper/JyjcBaseMapper.xml
+14
-0
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+2
-0
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+2
-0
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+36
-0
ICmWorkflowService.java
...amos/boot/module/jyjc/biz/service/ICmWorkflowService.java
+6
-0
TaskModelServiceImpl.java
...os/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
+65
-0
CmWorkflowServiceImpl.java
...t/module/jyjc/biz/service/impl/CmWorkflowServiceImpl.java
+38
-0
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+17
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+7
-2
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+10
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcInspectionApplication.java
View file @
038b1c4a
...
...
@@ -143,7 +143,7 @@ public class JyjcInspectionApplication extends BaseEntity {
/**
* 工作流实例ID
*/
@TableField
(
"
process_
instance_id"
)
@TableField
(
"instance_id"
)
private
String
processInstanceId
;
/**
...
...
@@ -197,4 +197,7 @@ public class JyjcInspectionApplication extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
@TableField
(
value
=
"transfer_to_user_ids"
)
private
String
transferToUserIds
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
View file @
038b1c4a
...
...
@@ -132,4 +132,7 @@ public class JyjcOpeningApplication extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
@TableField
(
value
=
"transfer_to_user_ids"
)
private
String
transferToUserIds
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcBaseMapper.java
View file @
038b1c4a
...
...
@@ -17,4 +17,8 @@ public interface JyjcBaseMapper {
@MapKey
(
value
=
"code"
)
List
<
Map
<
String
,
String
>>
selectDataDictionaryList
(
List
<
String
>
codes
);
String
selectBusinessData
(
String
tableName
,
String
instanceId
,
String
key
);
void
updateBusinessData
(
String
tableName
,
String
assignee
,
String
transferToUserIds
,
String
instanceId
,
String
nextTaskId
,
String
key
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
View file @
038b1c4a
...
...
@@ -26,5 +26,5 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
void
updatePromoter
(
@org
.
apache
.
ibatis
.
annotations
.
Param
(
"id"
)
Long
id
);
Page
<
JyjcInspectionApplicationModel
>
selectForPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionApplication
>
page
,
@Param
(
"jyjcInspectionApplicationModel"
)
JyjcInspectionApplicationModel
jyjcInspectionApplicationModel
,
@Param
(
"identity"
)
String
identity
,
@Param
(
"currentApplicationUnitCode"
)
String
currentApplicationUnitCode
,
@Param
(
"currentInspectionUnitCode"
)
String
currentInspectionUnitCode
);
Page
<
JyjcInspectionApplicationModel
>
selectForPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionApplication
>
page
,
@Param
(
"jyjcInspectionApplicationModel"
)
JyjcInspectionApplicationModel
jyjcInspectionApplicationModel
,
@Param
(
"identity"
)
String
identity
,
@Param
(
"currentApplicationUnitCode"
)
String
currentApplicationUnitCode
,
@Param
(
"currentInspectionUnitCode"
)
String
currentInspectionUnitCode
,
@Param
(
"currentUserId"
)
String
currentUserId
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
View file @
038b1c4a
...
...
@@ -18,7 +18,9 @@ import java.util.List;
public
interface
JyjcOpeningApplicationMapper
extends
BaseMapper
<
JyjcOpeningApplication
>
{
Page
<
JyjcOpeningApplicationModel
>
selectJyjcOpeningApplicationList
(
@Param
(
"page"
)
Page
<
JyjcOpeningApplication
>
page
,
@Param
(
"jyjcOpeningApplicationRequstDto"
)
JyjcOpeningApplicationRequstDto
jyjcOpeningApplicationRequstDto
,
@Param
(
"applyStartTime"
)
String
applyStartTime
,
@Param
(
"applyendTime"
)
String
applyendTime
);
@Param
(
"jyjcOpeningApplicationRequstDto"
)
JyjcOpeningApplicationRequstDto
jyjcOpeningApplicationRequstDto
,
@Param
(
"applyStartTime"
)
String
applyStartTime
,
@Param
(
"currentUserId"
)
String
currentUserId
,
@Param
(
"applyendTime"
)
String
applyendTime
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionApplicationModel.java
View file @
038b1c4a
...
...
@@ -157,11 +157,11 @@ public class JyjcInspectionApplicationModel extends BaseModel {
private
String
instanceId
;
public
String
getInstanceId
()
{
return
this
.
processInstanceId
;
public
String
get
Process
InstanceId
()
{
return
this
.
instanceId
!=
null
?
this
.
instanceId
:
this
.
processInstanceId
;
}
public
void
set
InstanceId
(
String
i
nstanceId
)
{
this
.
instanceId
=
this
.
processInstanceId
;
public
void
set
ProcessInstanceId
(
String
processI
nstanceId
)
{
this
.
processInstanceId
=
processInstanceId
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
038b1c4a
...
...
@@ -125,4 +125,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
@ApiModelProperty
(
"是否监管"
)
private
String
identityType
;
@ApiModelProperty
(
"转办人"
)
private
String
transferToUserIds
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/TaskMessageDto.java
View file @
038b1c4a
...
...
@@ -65,4 +65,5 @@ public class TaskMessageDto {
String
inspectionUnitCode
;
String
bizType
;
String
nextTaskId
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcBaseMapper.xml
View file @
038b1c4a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper"
>
<update
id=
"updateBusinessData"
>
update ${tableName}
set transfer_to_user_ids = #{transferToUserIds},
next_execute_user_ids = #{assignee},
next_task_id = #{nextTaskId}
where ${key} = #{instanceId}
</update>
<select
id=
"selectBaseUnitLicenceList"
parameterType=
"map"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto"
>
select * from tz_base_unit_licence
...
...
@@ -24,4 +31,11 @@
</select>
<select
id=
"selectBusinessData"
resultType=
"java.lang.String"
>
select transfer_to_user_ids
from ${tableName}
where ${key} = #{instanceId}
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
038b1c4a
...
...
@@ -136,6 +136,8 @@
1=2
</otherwise>
</choose>
OR (tzjia.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
</where>
order by tzjia.application_no desc
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
038b1c4a
...
...
@@ -31,6 +31,8 @@
<if
test=
"jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null"
>
and a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode}
</if>
OR (a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
</where>
order by sequence_nbr desc
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
View file @
038b1c4a
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.EquipRegularlyRemindServicelmpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
...
...
@@ -35,6 +36,8 @@ public class CommonController extends BaseController {
@Autowired
CommonserviceImpl
commonserviceImpl
;
@Autowired
TaskModelServiceImpl
taskModelService
;
@Autowired
EquipRegularlyRemindServicelmpl
equipRegularlyRemindServicelmpl
;
/**
...
...
@@ -49,6 +52,13 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getUserInfosByUnitCode
(
unitCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getBizUserInfosByUnitCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验业务办理人员列表"
,
notes
=
"根据公司的unitCode获取检测检验人员列表"
)
public
ResponseModel
<
List
<
TzsUserInfo
>>
getBizUserInfosByUnitCode
(
@RequestParam
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getBizUserInfosByUnitCode
(
unitCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getUserPhonesByPersonCode"
)
...
...
@@ -120,4 +130,30 @@ public class CommonController extends BaseController {
}
/**
* 公共转办接口
* /common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/bj/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transferBJ
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
map
.
put
(
"key"
,
"instance_id"
);
Object
result
=
taskModelService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 公共转办接口
* /common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/kt/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transferKT
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
map
.
put
(
"key"
,
"workflow_prostance_id"
);
Object
result
=
taskModelService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/ICmWorkflowService.java
View file @
038b1c4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
...
...
@@ -14,5 +15,10 @@ public interface ICmWorkflowService {
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
reject
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
rollBack
(
String
processInstanceId
);
ProcessTaskDTO
assign
(
FlowTaskVo
taskVo
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
View file @
038b1c4a
...
...
@@ -10,14 +10,17 @@ import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CmWorkflowServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -27,6 +30,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.UnsupportedEncodingException
;
import
java.lang.reflect.Field
;
...
...
@@ -47,6 +51,12 @@ public class TaskModelServiceImpl {
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
urlInfo
;
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
JyjcBaseMapper
jyjcBaseMapper
;
public
void
deleteTaskModel
(
String
id
)
{
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
id
).
getResult
();
...
...
@@ -448,4 +458,59 @@ public class TaskModelServiceImpl {
});
return
workflowResultDtoList
;
}
public
Object
transfer
(
Map
<
String
,
Object
>
map
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"nextTaskId"
))
||
map
.
get
(
"nextTaskId"
)
==
null
)
{
throw
new
BadRequest
(
"nextTaskId不能为空"
);
}
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
))
||
map
.
get
(
"instanceId"
)
==
null
)
{
throw
new
BadRequest
(
"instanceId不能为空"
);
}
String
taskId
=
map
.
get
(
"nextTaskId"
).
toString
();
String
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
String
tableName
=
map
.
get
(
"tableName"
).
toString
();
String
assignee
=
map
.
get
(
"assignee"
).
toString
();
FlowTaskVo
flowTaskVo
=
new
FlowTaskVo
();
flowTaskVo
.
setTaskId
(
taskId
);
flowTaskVo
.
setAssignee
(
assignee
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
assign
(
flowTaskVo
);
//修改待办
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
instanceId
).
getResult
();
List
<
TaskV2Model
>
collect
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
if
(
collect
==
null
||
collect
.
size
()
==
0
)
{
return
null
;
}
TaskV2Model
taskV2Model
=
collect
.
get
(
0
);
taskV2Model
.
setExecuteUserIds
(
RequestContext
.
getExeUserId
());
taskV2Model
.
setTaskStatus
(
FlowStatusEnum
.
TO_BE_TRANSFER
.
getCode
());
taskV2Model
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_TRANSFER
.
getName
());
taskV2Model
.
setEndUserId
(
RequestContext
.
getExeUserId
());
taskV2Model
.
setEndDate
(
new
Date
());
String
routhPath
=
taskV2Model
.
getRoutePath
().
replace
(
"nextExecuteUserIds"
,
"executeUserId"
)
+
"&nextExecuteUserIds="
+
assignee
;
taskV2Model
.
setRoutePath
(
routhPath
);
Systemctl
.
taskV2Client
.
update
(
taskV2Model
,
taskV2Model
.
getSequenceNbr
());
//创建新待办
taskV2Model
.
setExecuteUserIds
(
assignee
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
taskV2Model
.
setFlowCode
(
nextTaskId
);
String
routhPath1
=
routhPath
.
replace
(
"nextTaskId"
,
"nextTask"
)
+
"&nextTaskId="
+
nextTaskId
;
taskV2Model
.
setCreateDate
(
new
Date
());
taskV2Model
.
setRoutePath
(
routhPath1
);
taskV2Model
.
setTaskStatus
(
0
);
taskV2Model
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskV2Model
.
setEndUserId
(
null
);
taskV2Model
.
setEndDate
(
null
);
taskV2Model
.
setSequenceNbr
(
null
);
Systemctl
.
taskV2Client
.
create
(
taskV2Model
);
String
key
=
map
.
get
(
"key"
).
toString
();
String
id
=
jyjcBaseMapper
.
selectBusinessData
(
tableName
,
instanceId
,
key
);
id
=
ObjectUtils
.
isEmpty
(
id
)
?
assignee
:
id
+
","
+
assignee
;
//修改业务数据
jyjcBaseMapper
.
updateBusinessData
(
tableName
,
assignee
,
id
,
instanceId
,
nextTaskId
,
key
);
return
Boolean
.
TRUE
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CmWorkflowServiceImpl.java
View file @
038b1c4a
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -62,8 +63,45 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
}
@Override
public
ProcessTaskDTO
reject
(
String
taskId
,
TaskResultDTO
data
)
{
ProcessTaskDTO
processTaskDTO
;
try
{
log
.
info
(
"开始请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
processTaskDTO
=
Workflow
.
taskV2Client
.
reject
(
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
)
{
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
}
return
processTaskDTO
;
}
@Override
public
ProcessTaskDTO
rollBack
(
String
processInstanceId
)
{
log
.
info
(
"开始请求工作流撤回接口:/rollBack/standard/{processInstanceId},请求参数:{}"
,
processInstanceId
);
return
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
rollBackTask
(
processInstanceId
));
}
@Override
public
ProcessTaskDTO
assign
(
FlowTaskVo
taskVo
)
{
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
try
{
log
.
info
(
"开始请求工作流转办任务接口:/assign/{taskVo},请求参数:{},{}"
,
taskVo
);
processTaskDTO
=
Workflow
.
taskV2Client
.
assign
(
taskVo
).
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
)
{
log
.
error
(
"调用工作流转办任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流转办任务接口失败"
);
}
return
processTaskDTO
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
View file @
038b1c4a
...
...
@@ -16,11 +16,15 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
...
...
@@ -35,6 +39,9 @@ public class CommonserviceImpl {
@Value
(
"${jyjc.user-post:6615}"
)
private
String
jyjcUserPost
;
@Value
(
"${jyjc.user-post:6616}"
)
private
String
jyjcBizUserPost
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
...
...
@@ -65,6 +72,16 @@ public class CommonserviceImpl {
return
userInfos
;
}
public
List
<
TzsUserInfo
>
getBizUserInfosByUnitCode
(
String
unitCode
)
{
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
like
(
"post"
,
jyjcBizUserPost
);
userInfoQueryWrapper
.
isNotNull
(
"amos_user_id"
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
false
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
return
userInfos
;
}
public
List
<
TzsUserInfo
>
getUserPhonesByPersonCode
(
String
personCode
)
{
List
<
String
>
ids
=
StrUtil
.
split
(
personCode
,
","
);
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
038b1c4a
...
...
@@ -153,6 +153,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextExcuteIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorRoleIds
();
model
.
setProcessInstanceId
(
instanceId
);
model
.
setInstanceId
(
instanceId
);
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
model
.
setWorkflowRole
(
model
.
getWorkflowRole
()
+
","
+
nextExcuteIds
);
}
else
{
...
...
@@ -218,6 +219,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
ta
.
setNextTaskId
(
model
.
getNextTaskId
());
dto
.
setModel
(
ta
);
//摘要 按原有规则组装
dto
.
setTaskContent
(
"来自"
+
model
.
getEquList
()+
"【"
+
model
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
model
.
getApplicationNo
()+
"】"
);
...
...
@@ -421,6 +423,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
currentApplicationUnitCode
=
null
;
String
currentInspectionUnitCode
=
null
;
if
(
ValidationUtil
.
isEmpty
(
companyType
)){
...
...
@@ -438,7 +441,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
currentApplicationUnitCode
=
companyCode
;
currentInspectionUnitCode
=
companyCode
;
}
Page
<
JyjcInspectionApplicationModel
>
resultPage
=
this
.
getBaseMapper
().
selectForPage
(
page
,
model
,
identity
,
currentApplicationUnitCode
,
currentInspectionUnitCode
);
Page
<
JyjcInspectionApplicationModel
>
resultPage
=
this
.
getBaseMapper
().
selectForPage
(
page
,
model
,
identity
,
currentApplicationUnitCode
,
currentInspectionUnitCode
,
currentUserId
);
return
resultPage
;
}
...
...
@@ -658,7 +661,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
task
.
setVariable
(
map
);
//执行流程
task
.
setNextExecuteUserCompanyCode
(
entity
.
getInspectionUnitCode
());
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
task
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
reject
(
taskId
,
task
);
String
taskCode
=
FlowStatusEnum
.
TO_SUBMITTED
.
getName
();
String
taskName1
=
""
;
String
nextTaskId
=
""
;
...
...
@@ -855,6 +858,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setInspectionUnitCode
(
model
.
getInspectionUnitCode
());
ta
.
setNextTaskId
(
model
.
getNextTaskId
());
ta
.
setBizType
(
model
.
getBizType
());
dto
.
setModel
(
ta
);
dto
.
setFlowCreateDate
(
new
Date
());
...
...
@@ -906,6 +910,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
TaskMessageDto
obj
=
new
TaskMessageDto
();
obj
.
setInstanceId
(
model
.
getProcessInstanceId
());
obj
.
setStatus
(
model
.
getStatus
());
obj
.
setNextTaskId
(
model
.
getNextTaskId
());
obj
.
setPromoter
(
model
.
getPromoter
());
obj
.
setNextExecuteUserIds
(
model
.
getNextExecuteUserIds
());
obj
.
setSequenceNbr
(
model
.
getSequenceNbr
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
038b1c4a
...
...
@@ -339,6 +339,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationRequstDto
dto
)
{
ReginParams
reginParams
=
commonserviceImpl
.
getReginParamsOfCurrentUser
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
level
=
reginParams
.
getCompany
().
getLevel
();
if
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
level
))
{
dto
.
setType
(
"enterprise"
);
...
...
@@ -353,7 +354,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
applyEndTime
);
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
currentUserId
,
applyEndTime
);
for
(
JyjcOpeningApplicationModel
record
:
result
.
getRecords
())
{
record
.
setIdentityType
(
dto
.
getType
());
}
...
...
@@ -539,7 +540,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
ProcessTaskDTO
complete
=
cmWorkflowService
.
complete
(
data
.
getNextTaskId
(),
dto
);
ProcessTaskDTO
complete
=
new
ProcessTaskDTO
();
if
(
"0"
.
equals
(
op
)){
complete
=
cmWorkflowService
.
complete
(
data
.
getNextTaskId
(),
dto
);
}
else
{
complete
=
cmWorkflowService
.
reject
(
data
.
getNextTaskId
(),
dto
);
}
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
processTaskDTOS
.
add
(
complete
);
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
...
...
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