|
@@ -97,24 +97,17 @@ public class StaffServiceImpl implements StaffService {
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> getFormParams(String flowInstanceId) {
|
|
|
- String userId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
CommonResult<IFlowInstance> flowResult = workflowClient.flowInstance(flowInstanceId);
|
|
|
if (flowResult.isSuccess()) {
|
|
|
StaffDO entity = staffDAO.findByInstanceId(flowInstanceId);
|
|
|
if (Objects.isNull(entity)) {
|
|
|
entity = new StaffDO();
|
|
|
entity.setInstanceId(flowInstanceId);
|
|
|
- entity.setUserId(userId);
|
|
|
entity.setCreateTime(LocalDateTime.now());
|
|
|
entity.setFlowStatus(FlowStatusConstants.FLOW_NOT_START);
|
|
|
- CommonResult<AdminUserRespDTO> result = adminUserApi.getUser(userId);
|
|
|
- AdminUserRespDTO dto = result.getCheckedData();
|
|
|
- entity.setNickname(dto.getNickname());
|
|
|
- entity.setDeptId(dto.getDeptId());
|
|
|
- entity.setDeptName(dto.getDeptName());
|
|
|
staffDAO.insert(entity);
|
|
|
}
|
|
|
- return createMap(flowInstanceId, entity, userId);
|
|
|
+ return createMap(entity);
|
|
|
}
|
|
|
return createModelMap();
|
|
|
}
|
|
@@ -135,7 +128,7 @@ public class StaffServiceImpl implements StaffService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private Map<String, Object> createMap(String flowInstanceId, StaffDO entity, String userId) {
|
|
|
+ private Map<String, Object> createMap(StaffDO entity) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("formEntity", entity);
|
|
|
//字典查询
|