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
65c03d01
Commit
65c03d01
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
c46c4aef
28abc6f8
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
161 additions
and
28 deletions
+161
-28
JgEnableDisableMapper.xml
...g-api/src/main/resources/mapper/JgEnableDisableMapper.xml
+2
-0
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+1
-1
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+1
-1
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+6
-3
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+53
-9
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+1
-0
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+49
-14
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+29
-0
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+1
-0
urlInfo.json
...s-boot-module-jg-biz/src/main/resources/json/urlInfo.json
+18
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEnableDisableMapper.xml
View file @
65c03d01
...
...
@@ -64,6 +64,8 @@
concat(use."PROVINCE_NAME", use."CITY_NAME", use."COUNTY_NAME", use."ADDRESS",
use.STREET_NAME) as fullAddress,
jri.EQU_CODE as equCode,
jed.audit_status as auditStatus,
jed.apply_no as applyNo,
jed.apply_type as applyType,
jed.remark,
use.RECORD as record,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
65c03d01
...
...
@@ -36,7 +36,7 @@
</if>
<if
test=
"type != 'company'"
>
AND isn.instance_id is not null
AND isn.receive_
org
_code = #{orgCode}
AND isn.receive_
company
_code = #{orgCode}
</if>
<if
test=
"type == 'company'"
>
AND isn.install_unit_credit_code = #{orgCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
65c03d01
...
...
@@ -64,8 +64,8 @@
<if
test=
"roleIds != null and dto.type == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
ur.instance_status like concat('%',#{role},'%')
</foreach>
or ur.create_user_id = #{dto.createUserId}
</foreach>
</if>
<if
test=
"dto.type == 'supervision'"
>
AND ur.receive_org_code = #{orgCode}
...
...
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 @
65c03d01
...
...
@@ -1084,6 +1084,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
TaskModelDto
modelDto
=
new
TaskModelDto
();
BeanUtil
.
copyProperties
(
taskV2Model
,
modelDto
);
modelDto
.
setNextExecuteUser
(
jgChangeRegistrationName
.
getNextExecutorIds
());
if
(
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())){
modelDto
.
setPageType
(
"edit"
);
}
TaskMessageDto
obj
=
new
TaskMessageDto
();
obj
.
setInstanceId
(
jgChangeRegistrationName
.
getInstanceId
());
obj
.
setStatus
(
jgChangeRegistrationName
.
getStatus
());
...
...
@@ -1122,9 +1125,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationName
.
getReceiveOrgCode
();
}
if
(
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getPass
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getReject
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
RECEIVE
.
getRollBack
())){
if
(
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getPass
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getReject
())
||
jgChangeRegistrationName
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_
SUBMIT
.
getRollBack
())){
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
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 @
65c03d01
...
...
@@ -96,6 +96,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
String
pageType
=
String
.
valueOf
(
map
.
get
(
"formType"
));
String
record
=
String
.
valueOf
(
map
.
get
(
"record"
));
String
businessCode
=
String
.
valueOf
(
map
.
get
(
"businessCode"
));
// 接收机构
String
[]
receiveOrgCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
List
<
WorkflowResultDto
>
workflowResultList
=
new
ArrayList
<>();
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
...
...
@@ -111,9 +113,14 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
HashMap
<
String
,
Object
>
commMap
=
new
HashMap
<>();
if
(
FlowStatusEnum
.
REJECTED
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
())
||
FlowStatusEnum
.
ROLLBACK
.
getName
().
equals
(
jgEnableDisable
.
getAuditStatus
()))
{
commMap
.
put
(
"approvalStatus"
,
"提交"
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getUseUnitCreditCode
());
}
else
{
commMap
.
put
(
"approvalStatus"
,
submit
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
jgEnableDisable
.
getReceiveCompanyCode
());
}
dto
.
setVariable
(
commMap
);
processTaskDTO
=
iCmWorkflowService
.
complete
(
jgEnableDisable
.
getNextTaskId
(),
dto
);
// 提取节点等信息
...
...
@@ -124,8 +131,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
else
{
jgEnableDisable
.
setExecuteSequence
(
workflowResultDto
.
getNextExecutorRoleIds
());
}
jgEnableDisable
.
setEquList
(
map
.
get
(
"equListDesc"
).
toString
());
jgEnableDisable
.
setSupervisoryCode
(
map
.
get
(
"supervisoryCode"
).
toString
());
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
()));
...
...
@@ -142,7 +149,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
TaskV2Model
taskV2Model
=
commonService
.
updateTaskModel
(
map1
);
if
(
ObjectUtils
.
isEmpty
(
taskV2Model
))
{
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
jgEnableDisable
),
businessCode
,
Collections
.
singletonList
(
workflowResultDto
));
buildTask
(
Collections
.
singletonList
(
jgEnableDisable
),
businessCode
,
Collections
.
singletonList
(
workflowResultDto
)
,
Boolean
.
TRUE
);
}
else
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
...
...
@@ -163,7 +170,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
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
);
workflowResultList
=
workFlowInfo
(
submit
,
record
,
receiveOrgCode
[
0
]
);
//业务数据组装等
businessData
(
submit
,
reginParams
,
jgEnableDisable
,
map
,
workflowResultList
);
}
...
...
@@ -172,7 +179,11 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
// 仅保存
if
(
"add"
.
equals
(
pageType
))
{
this
.
save
(
jgEnableDisable
);
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
);
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
,
Boolean
.
FALSE
);
if
(!
SUBMIT_TYPE_FLOW
.
equals
(
submit
)){
// 暂存任务
buildTaskDraft
(
jgEnableDisable
);
}
}
else
{
// 编辑
jgEnableDisable
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
...
...
@@ -181,22 +192,49 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
}
if
(!
"null"
.
equals
(
record
)){
// 关联设备表
JgEnableDisableEq
jgEnableDisableEq
=
new
JgEnableDisableEq
();
jgEnableDisableEq
.
setEquId
(
record
);
jgEnableDisableEq
.
setEnableDisableApplyId
(
jgEnableDisable
.
getSequenceNbr
().
toString
());
jgEnableDisableEqService
.
save
(
jgEnableDisableEq
);
}
}
/**
* 暂存任务生成待办
* @param jgEnableDisable 业务信息
*/
private
void
buildTaskDraft
(
JgEnableDisable
jgEnableDisable
)
{
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
TaskModelDto
dto
=
new
TaskModelDto
();
//行数据
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgEnableDisable
,
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
//摘要 按原有规则组装
dto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
jgEnableDisable
.
getEquList
(),
jgEnableDisable
.
getSequenceNbr
(),
jgEnableDisable
.
getApplyNo
()));
//申请单号
dto
.
setTaskCode
(
jgEnableDisable
.
getApplyNo
());
//业务类型枚举code值
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
////业务主键
dto
.
setRelationId
(
jgEnableDisable
.
getSequenceNbr
()
+
""
);
modelDtos
.
add
(
dto
);
commonService
.
buildTaskModel
(
modelDtos
);
}
/**
* 组装业务数据
*/
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgEnableDisable
jgEnableDisable
,
JSONObject
map
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
// 接收机构
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
jgEnableDisable
.
setApplyDate
(
new
Date
());
jgEnableDisable
.
setReceive
Org
Code
(
splitMaintenanceUnitCode
[
0
]);
jgEnableDisable
.
setReceive
Company
Code
(
splitMaintenanceUnitCode
[
0
]);
jgEnableDisable
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
jgEnableDisable
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgEnableDisable
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
...
@@ -222,14 +260,13 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
jgEnableDisable
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
jgEnableDisable
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
}
/**
* 插入代办
*/
private
void
buildTask
(
List
<
JgEnableDisable
>
list
,
String
businessCode
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
private
void
buildTask
(
List
<
JgEnableDisable
>
list
,
String
businessCode
,
List
<
WorkflowResultDto
>
workflowResultList
,
Boolean
bool
)
{
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
();
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
...
...
@@ -257,6 +294,10 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
taskModelDto
.
setNextExecuteUser
(
item
.
getExecuteSequence
());
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(),
item
.
getApplyNo
()));
taskModelDtoList
.
add
(
taskModelDto
);
if
(
bool
)
{
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
}
...
...
@@ -293,7 +334,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
* @param record 设备record
* @return 工作流返回相关数据
*/
private
List
<
WorkflowResultDto
>
workFlowInfo
(
String
submitType
,
String
record
)
{
private
List
<
WorkflowResultDto
>
workFlowInfo
(
String
submitType
,
String
record
,
String
receiveOrgCode
)
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
...
...
@@ -301,6 +342,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
record
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setNextExecuteUserCompanyCode
(
receiveOrgCode
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -394,6 +436,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
REJECTED
.
getName
());
taskModelDto
.
setFlowCode
(
workflowResultDto
.
getNextTaskId
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
taskModelDto
.
setPageType
(
"edit"
);
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
jgEnableDisable
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
...
...
@@ -424,6 +467,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
commMap
.
put
(
"approvalStatus"
,
op
);
workDto
.
setVariable
(
commMap
);
workDto
.
setComment
(
opinion
);
workDto
.
setNextExecuteUserCompanyCode
(
"1"
.
equals
(
op
)
?
jgEnableDisable
.
getUseUnitCreditCode
()
:
jgEnableDisable
.
getReceiveCompanyCode
());
processTaskDTO
=
iCmWorkflowService
.
complete
(
jgEnableDisable
.
getNextTaskId
(),
workDto
);
// 提取节点等信息
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
...
...
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 @
65c03d01
...
...
@@ -252,6 +252,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
workflowResultDto
.
getNextExecutorRoleIds
()));
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
notice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
notice
.
setInstanceId
(
workflowResultDto
.
getInstanceId
());
this
.
updateById
(
notice
);
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
),
Boolean
.
TRUE
);
...
...
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 @
65c03d01
...
...
@@ -13,10 +13,7 @@ import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
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.mapper.JgMaintainNoticeEqMapper
;
...
...
@@ -46,6 +43,7 @@ import org.springframework.util.StringUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
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
java.text.ParseException
;
...
...
@@ -176,6 +174,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
noticeDto
.
getSequenceNbr
().
toString
());
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
notice
.
getReceiveCompanyCode
());
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTaskDTO
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
).
get
(
0
);
...
...
@@ -193,7 +193,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgMaintainNoticeMapper
.
updateById
(
notice
);
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
));
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
)
,
Boolean
.
TRUE
);
}
else
{
// 只调用执行API,返回下个节点信息,用于填充业务字段
//组装信息
...
...
@@ -206,6 +206,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
else
{
commMap
.
put
(
"approvalStatus"
,
op
);
}
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
notice
.
getReceiveCompanyCode
());
dto
.
setVariable
(
commMap
);
processTaskDTO
=
cmWorkflowService
.
complete
(
notice
.
getNextTaskId
(),
dto
);
// 提取节点等信息
...
...
@@ -232,7 +234,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
TaskV2Model
taskV2Model
=
commonService
.
updateTaskModel
(
map
);
if
(
ObjectUtils
.
isEmpty
(
taskV2Model
))
{
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
));
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
)
,
Boolean
.
FALSE
);
}
else
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
...
...
@@ -401,8 +403,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
log
.
error
(
" 获取告知设备列表"
);
throw
new
RuntimeException
();
throw
new
BadRequest
(
"请选择设备"
);
}
// 获取告知单号
ResponseModel
<
List
<
String
>>
applyNoResult
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
WXGZ
.
getCode
(),
deviceList
.
size
());
...
...
@@ -413,7 +414,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
List
<
String
>
applyNoList
=
applyNoResult
.
getResult
();
List
<
WorkflowResultDto
>
workflowResultDtoList
=
workFlowInfo
(
submitType
,
deviceList
);
List
<
WorkflowResultDto
>
workflowResultDtoList
=
workFlowInfo
(
submitType
,
deviceList
,
model
.
getReceiveCompanyCode
()
);
List
<
JgMaintainNotice
>
list
=
new
ArrayList
<>();
List
<
JgMaintainNoticeEq
>
equipList
=
new
ArrayList
<>();
...
...
@@ -454,7 +455,10 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
});
jgMaintainNoticeMapper
.
insertBatchSomeColumn
(
list
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
buildTask
(
list
,
workflowResultDtoList
);
buildTask
(
list
,
workflowResultDtoList
,
Boolean
.
TRUE
);
}
else
{
// 暂存任务
buildTaskDraft
(
list
);
}
List
<
JgMaintainNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
...
...
@@ -465,12 +469,35 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
/**
* 暂存任务生成待办
* @param list 业务信息
*/
private
void
buildTaskDraft
(
List
<
JgMaintainNotice
>
list
)
{
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
list
.
forEach
(
obj
->
{
TaskModelDto
dto
=
new
TaskModelDto
();
//行数据
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
obj
,
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
//摘要 按原有规则组装
dto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
obj
.
getEquList
(),
obj
.
getSupervisoryCode
(),
obj
.
getApplyNo
()));
//申请单号
dto
.
setTaskCode
(
obj
.
getApplyNo
());
//业务类型枚举code值
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
////业务主键
dto
.
setRelationId
(
obj
.
getSequenceNbr
()
+
""
);
modelDtos
.
add
(
dto
);
});
commonService
.
buildTaskModel
(
modelDtos
);
}
/**
* 插入代办
*/
private
void
buildTask
(
List
<
JgMaintainNotice
>
list
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
private
void
buildTask
(
List
<
JgMaintainNotice
>
list
,
List
<
WorkflowResultDto
>
workflowResultList
,
Boolean
bool
)
{
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
WorkflowResultDto
workflowResultDto
=
workflowResultList
.
get
(
0
);
list
.
forEach
(
item
->
{
...
...
@@ -496,12 +523,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDto
.
setNextExecuteUser
(
item
.
getNextExecuteIds
());
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(),
item
.
getApplyNo
()));
taskModelDtoList
.
add
(
taskModelDto
);
if
(
bool
)
{
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
}
private
List
<
WorkflowResultDto
>
workFlowInfo
(
String
submitType
,
List
<
Map
<
String
,
Object
>>
deviceList
)
{
private
List
<
WorkflowResultDto
>
workFlowInfo
(
String
submitType
,
List
<
Map
<
String
,
Object
>>
deviceList
,
String
receiveCompanyCode
)
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
...
...
@@ -510,6 +541,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
item
.
get
(
"SEQUENCE_NBR"
).
toString
());
//下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
receiveCompanyCode
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
list
.
add
(
dto
);
});
...
...
@@ -601,7 +634,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceive
Org
Code
(
receiveOrgIdList
[
0
]);
model
.
setReceive
Company
Code
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
...
...
@@ -773,6 +806,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
REJECTED
.
getName
());
taskModelDto
.
setFlowCode
(
workflowResultDto
.
getNextTaskId
());
taskModelDto
.
setNextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
());
taskModelDto
.
setPageType
(
"edit"
);
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
jgMaintainNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
...
...
@@ -789,6 +823,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
taskResultDTO
.
setNextExecuteUserCompanyCode
(
"1"
.
equals
(
op
)
?
jgMaintainNotice
.
getInstallUnitCreditCode
()
:
jgMaintainNotice
.
getReceiveCompanyCode
());
taskResultDTO
.
setVariable
(
map
);
return
taskResultDTO
;
}
...
...
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 @
65c03d01
...
...
@@ -463,6 +463,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
taskMessageDto
);
modelDto
.
setModel
(
taskMessageDto
);
modelDto
.
setPageType
(
this
.
getPageTypeForReject
(
operate
,
jgScrapCancelDto
.
getAuditStatus
()));
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
}
...
...
@@ -470,6 +471,21 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
return
commonService
.
getDictionaryCodeByName
(
auditStatus
);
}
private
String
getPageTypeForReject
(
String
operate
,
String
auditStatus
)
{
// 驳回
if
(
"1"
.
equals
(
operate
))
{
// 且驳回到的节点为使用单位提交 则可编辑
if
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
)
{
return
"edit"
;
}
return
"look"
;
}
return
"look"
;
}
private
TaskV2Model
updateTaskModel
(
JgScrapCancelDto
jgScrapCancelDto
,
String
operate
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
...
...
@@ -557,6 +573,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jsonObject
.
put
(
"taskType"
,
businessTypeJudgment
(
jgScrapCancel
.
getCancelType
()).
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgScrapCancel
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgScrapCancel
.
getAuditStatus
());
// 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑
jsonObject
.
put
(
"pageType"
,
this
.
getPageTypeByCurrentNode
(
jgScrapCancel
.
getAuditStatus
()));
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
...
...
@@ -564,6 +582,17 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
return
commonService
.
getDictionaryCodeByName
(
auditStatus
);
}
private
String
getPageTypeByCurrentNode
(
String
auditStatus
)
{
if
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getPass
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getReject
().
equals
(
auditStatus
)
||
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getRollBack
().
equals
(
auditStatus
)
)
{
return
"edit"
;
}
else
{
return
"look"
;
}
}
@Transactional
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
...
...
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 @
65c03d01
...
...
@@ -283,6 +283,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
workflowResultDto
.
getNextExecutorRoleIds
()));
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
notice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
notice
.
setInstanceId
(
workflowResultDto
.
getInstanceId
());
jgTransferNoticeMapper
.
updateById
(
notice
);
// 如果为保存并提交,则创建代办
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
),
Boolean
.
TRUE
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/json/urlInfo.json
View file @
65c03d01
...
...
@@ -49,6 +49,12 @@
},
{
"type"
:
"104"
,
"pageType"
:
"draft"
,
"name"
:
"维修告知"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1736722439125102594&roleIds={roleIds}&userId={userId}&formType=edit"
},
{
"type"
:
"104"
,
"pageType"
:
"look"
,
"name"
:
"维修告知"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1736722439125102594&roleIds={roleIds}&userId={userId}&formType=look"
...
...
@@ -181,6 +187,12 @@
},
{
"type"
:
"112-1"
,
"pageType"
:
"draft"
,
"name"
:
"设备启用"
,
"url"
:
"mixuap?appId=1742358052905971713&id=1737383754143395841&roleIds={roleIds}&userId={userId}&formType=edit"
},
{
"type"
:
"112-1"
,
"pageType"
:
"look"
,
"name"
:
"设备启用"
,
"url"
:
"mixuap?appId=1742358052905971713&id=1737383754143395841&roleIds={roleIds}&userId={userId}&formType=look"
...
...
@@ -193,6 +205,12 @@
},
{
"type"
:
"112-2"
,
"pageType"
:
"draft"
,
"name"
:
"设备停用"
,
"url"
:
"mixuap?appId=1742358052905971713&id=1737383754143395841&roleIds={roleIds}&userId={userId}&formType=edit"
},
{
"type"
:
"112-2"
,
"pageType"
:
"look"
,
"name"
:
"设备停用"
,
"url"
:
"mixuap?appId=1742358052905971713&id=1737383754143395841&roleIds={roleIds}&userId={userId}&formType=look"
...
...
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