fix:错误代码修复
This commit is contained in:
@@ -91,44 +91,43 @@ public class ReportDocumentMainController extends AbstractFileUploadController i
|
|||||||
return success(reportDocumentMainService.createReportDocumentMain(vo));
|
return success(reportDocumentMainService.createReportDocumentMain(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Resource private BpmProcessInstanceApi bpmProcessInstanceApi;
|
// @Resource private BpmProcessInstanceApi bpmProcessInstanceApi;
|
||||||
|
// @Override
|
||||||
@Override
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// public CommonResult<ReportDocumentMainRespVO> createProcessInstance(ReportDocumentMainSaveReqVO entity) {
|
||||||
public CommonResult<ReportDocumentMainRespVO> createProcessInstance(ReportDocumentMainSaveReqVO entity) {
|
// LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
// Long id = entity.getId();
|
||||||
Long id = entity.getId();
|
// DataFormDO dataForm = getDataForm(id);
|
||||||
DataFormDO dataForm = getDataForm(id);
|
// Long dataCollectionId = dataForm.getDataCollectionId();
|
||||||
Long dataCollectionId = dataForm.getDataCollectionId();
|
// DataCollectionDO dataCollection = dataCollectionService.getDataCollection(dataCollectionId);
|
||||||
DataCollectionDO dataCollection = dataCollectionService.getDataCollection(dataCollectionId);
|
// if(dataCollection == null)
|
||||||
if(dataCollection == null)
|
// throw exception(ErrorCodeConstants.DATA_FORM_EMPTY_COLLECTION_ID);
|
||||||
throw exception(ErrorCodeConstants.DATA_FORM_EMPTY_COLLECTION_ID);
|
// if(ObjectUtils.isEmpty(dataCollection.getFlowKey()))
|
||||||
if(ObjectUtils.isEmpty(dataCollection.getFlowKey()))
|
// throw exception(ErrorCodeConstants.DATA_COLLECTION_EMPTY_WF_KEY);
|
||||||
throw exception(ErrorCodeConstants.DATA_COLLECTION_EMPTY_WF_KEY);
|
// JSONObject formData = new JSONObject();
|
||||||
JSONObject formData = new JSONObject();
|
// if(dataForm.getFormData() != null)
|
||||||
if(dataForm.getFormData() != null)
|
// formData = JSONObject.parseObject(dataForm.getFormData());
|
||||||
formData = JSONObject.parseObject(dataForm.getFormData());
|
// formData.put("mainId", id);
|
||||||
formData.put("mainId", id);
|
// formData.put("applyUser", dataForm.getApplyUser());
|
||||||
formData.put("applyUser", dataForm.getApplyUser());
|
// formData.put("applyUserId", dataForm.getApplyUserId());
|
||||||
formData.put("applyUserId", dataForm.getApplyUserId());
|
// formData.put("applyDepartment", dataForm.getApplyDepartment());
|
||||||
formData.put("applyDepartment", dataForm.getApplyDepartment());
|
// formData.put("applyDepartmentId", dataForm.getApplyDepartmentId());
|
||||||
formData.put("applyDepartmentId", dataForm.getApplyDepartmentId());
|
// formData.put("applyTime", dataForm.getApplyTime());
|
||||||
formData.put("applyTime", dataForm.getApplyTime());
|
// Map<String, Object> variables = formData.toJavaObject(Map.class);
|
||||||
Map<String, Object> variables = formData.toJavaObject(Map.class);
|
// variables.put(BPM_CALLBACK_BEAN_NAME, "dataFormService");
|
||||||
variables.put(BPM_CALLBACK_BEAN_NAME, "dataFormService");
|
// BpmProcessInstanceCreateReqDTO reqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||||
BpmProcessInstanceCreateReqDTO reqDTO = new BpmProcessInstanceCreateReqDTO();
|
// reqDTO.setBusinessKey(String.valueOf(id));
|
||||||
reqDTO.setBusinessKey(String.valueOf(id));
|
// reqDTO.setProcessDefinitionKey(dataCollection.getFlowKey());
|
||||||
reqDTO.setProcessDefinitionKey(dataCollection.getFlowKey());
|
// reqDTO.setVariables(variables);
|
||||||
reqDTO.setVariables(variables);
|
// CommonResult<String> result = bpmProcessInstanceApi.createProcessInstance(loginUser.getId(), reqDTO);
|
||||||
CommonResult<String> result = bpmProcessInstanceApi.createProcessInstance(loginUser.getId(), reqDTO);
|
// if(!result.isSuccess()){
|
||||||
if(!result.isSuccess()){
|
// throw exception0(ERROR_CODE_MODULE_COMMON, result.getMsg());
|
||||||
throw exception0(ERROR_CODE_MODULE_COMMON, result.getMsg());
|
// }
|
||||||
}
|
// String wfInsId = result.getData();
|
||||||
String wfInsId = result.getData();
|
// dataForm.setFlowInstanceId(wfInsId);
|
||||||
dataForm.setFlowInstanceId(wfInsId);
|
// dataFormMapper.updateById(dataForm);
|
||||||
dataFormMapper.updateById(dataForm);
|
// return BeanUtils.toBean(dataForm, DataFormRespVO.class);
|
||||||
return BeanUtils.toBean(dataForm, DataFormRespVO.class);
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/execAddData")
|
@PostMapping("/execAddData")
|
||||||
|
|||||||
Reference in New Issue
Block a user