diff --git a/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/extbpm/process/service/impl/ExtActTaskCcServiceImpl.java b/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/extbpm/process/service/impl/ExtActTaskCcServiceImpl.java index eb67684..226b835 100644 --- a/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/extbpm/process/service/impl/ExtActTaskCcServiceImpl.java +++ b/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/extbpm/process/service/impl/ExtActTaskCcServiceImpl.java @@ -184,6 +184,9 @@ public class ExtActTaskCcServiceImpl extends ServiceImpl add(@RequestBody FixedContact20260730Page fixedContact20260730Page) { FixedContact20260730 fixedContact20260730 = new FixedContact20260730(); org.springframework.beans.BeanUtils.copyProperties(fixedContact20260730Page, fixedContact20260730); + // 必填校验:表单编号、定点联系所领导、主办部门、申请人为创建一条有效记录的基础字段 + if (oConvertUtils.isEmpty(fixedContact20260730.getFormNo()) + || oConvertUtils.isEmpty(fixedContact20260730.getContactLeader()) + || oConvertUtils.isEmpty(fixedContact20260730.getHostDept()) + || oConvertUtils.isEmpty(fixedContact20260730.getApplicant())) { + return Result.error("表单编号、定点联系所领导、主办部门、申请人为必填项"); + } + fixedContact20260730.setBpmStatus(BpmStatus.NOT_START.getCode()); fixedContact20260730Service.saveMain(fixedContact20260730, fixedContact20260730Page.getFixedContactFeedback20260730List()); return Result.OK("添加成功!"); } @@ -132,6 +140,9 @@ public class FixedContact20260730Controller extends JeecgController delete(@RequestParam(name = "id", required = true) String id) { + if (fixedContact20260730Service.getById(id) == null) { + return Result.error("未找到对应数据"); + } fixedContact20260730Service.delMain(id); terminateRelatedProcess(id); return Result.OK("删除成功!");