|
@@ -112,6 +112,9 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
@Resource
|
|
|
TBSopInfoService tbSopInfoService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TBCrmService tbCrmService;
|
|
|
+
|
|
|
/**
|
|
|
* 根据deploymentId查找processDefinitionId
|
|
|
*
|
|
@@ -137,7 +140,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
DeploymentBuilder builder = repositoryService.createDeployment();
|
|
|
ZipInputStream zip = new ZipInputStream(file.getInputStream());
|
|
|
builder.addZipInputStream(zip);
|
|
|
- return formPropertiesGet(builder.deploy().getId(), null, null, true);
|
|
|
+ return formPropertiesGet(builder.deploy().getId(), null, null, true, null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -157,10 +160,10 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
ClassPathResource resource = new ClassPathResource(tfCustomTypeEnum.getFileName());
|
|
|
ZipInputStream zip = new ZipInputStream(resource.getInputStream());
|
|
|
builder.addZipInputStream(zip);
|
|
|
- Map<String, Object> mapData = formPropertiesGet(builder.deploy().getId(), null, null, true);
|
|
|
+ Map<String, Object> mapData = formPropertiesGet(builder.deploy().getId(), null, null, true, null);
|
|
|
map.put(tfCustomTypeEnum.name(), mapData);
|
|
|
} else {
|
|
|
- Map<String, Object> mapData = formPropertiesGet(tfCustomFlowList.get(0).getFlowDeploymentId(), null, null, true);
|
|
|
+ Map<String, Object> mapData = formPropertiesGet(tfCustomFlowList.get(0).getFlowDeploymentId(), null, null, true, null);
|
|
|
map.put(tfCustomTypeEnum.name(), mapData);
|
|
|
}
|
|
|
}
|
|
@@ -412,6 +415,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
* @param flowId
|
|
|
* @param taskId
|
|
|
* @param dynamicTable
|
|
|
+ * @param crmNo
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
@@ -419,7 +423,8 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
public Map<String, Object> formPropertiesGet(String flowDeploymentId,
|
|
|
Long flowId,
|
|
|
Long taskId,
|
|
|
- Boolean dynamicTable) throws Exception {
|
|
|
+ Boolean dynamicTable,
|
|
|
+ String crmNo) throws Exception {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
FlowResult flowResult = null;
|
|
|
TFCustomFlow tfCustomFlow = null;
|
|
@@ -469,6 +474,12 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
}
|
|
|
map.put(SystemConstant.FLOW_DEPLOYMENT_ID, tfCustomFlow.getFlowDeploymentId());
|
|
|
map.put(SystemConstant.ID, tfCustomFlow.getId());
|
|
|
+ if (Objects.nonNull(crmNo)) {
|
|
|
+ CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(null, crmNo);
|
|
|
+ if (Objects.nonNull(crmProjectResult)) {
|
|
|
+ map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
|
+ }
|
|
|
+ }
|
|
|
return map;
|
|
|
}
|
|
|
|
|
@@ -721,6 +732,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
if (Objects.isNull(flowId) && Objects.isNull(code)) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("流程id和流程编码必须有一个不能为空");
|
|
|
}
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
TFCustomFlowEntity tfCustomFlowEntity = null;
|
|
|
if (Objects.nonNull(flowId)) {
|
|
|
tfCustomFlowEntity = tfCustomFlowEntityService.getOne(new QueryWrapper<TFCustomFlowEntity>().lambda().eq(TFCustomFlowEntity::getFlowId, flowId));
|
|
@@ -769,7 +781,11 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return new FlowViewResult(flowId, tfFlowApprove.getStatus(), String.valueOf(tfFlowApprove.getId()), taskIdList, flowTaskHistoryList, currFlowTaskResult, flowApproveHistoryList);
|
|
|
+ CrmProjectResult crmProjectResult = null;
|
|
|
+ if (Objects.nonNull(tfCustomFlowEntity.getCrmNo())) {
|
|
|
+ crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
|
|
|
+ }
|
|
|
+ return new FlowViewResult(flowId, tfFlowApprove.getStatus(), tfCustomFlowEntity.getCode(), taskIdList, flowTaskHistoryList, currFlowTaskResult, flowApproveHistoryList, crmProjectResult);
|
|
|
}
|
|
|
|
|
|
/**
|