处理批量提交时的审批情况

This commit is contained in:
syruan 2026-01-29 16:59:17 +08:00
parent 39d1168a1e
commit 74f21c68aa
1 changed files with 3 additions and 3 deletions

View File

@ -141,7 +141,7 @@ public class WarehousingServiceImpl implements WarehousingService {
* @return
*/
@Override
@ApprovalRequired(businessType = "EQUIPMENT_PUT", businessIdExpr = "#result['data']", businessDataExpr = "#ids")
@ApprovalRequired(businessType = "EQUIPMENT_PUT", businessIdExpr = "#ids", businessDataExpr = "#ids")
public AjaxResult batchSubmission(Integer[] ids) {
try {
// 1. 空值/空数组校验提前终止无效请求
@ -155,8 +155,8 @@ public class WarehousingServiceImpl implements WarehousingService {
}
}
Integer num = mapper.batchSubmission(ids);
// 返回第一个ID作为业务ID用于审批流
return num > 0 ? AjaxResult.success("批量提交成功,等待审批", ids[0]) : AjaxResult.error("批量提交失败");
// 返回所有ID数组用于审批流
return num > 0 ? AjaxResult.success("批量提交成功,等待审批", ids) : AjaxResult.error("批量提交失败");
} catch (Exception e) {
log.error(e.getMessage());
return AjaxResult.error("批量提交失败:" + e.getMessage());