feat: 起草组批量添加接口
This commit is contained in:
+27
@@ -230,6 +230,33 @@ public class PayDraftingGroupSubItemController extends JeroController<PayDraftin
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加
|
||||
*
|
||||
* @param payDraftingGroupSubItem 起草组成员
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "起草组成员-批量添加",operateType = 2)
|
||||
@RequiresPermissions("draftingGroupMember:batchAdd")
|
||||
@ApiOperation(value = "起草组成员-批量添加", notes = "起草组成员-批量添加")
|
||||
@PostMapping(value = "/batchAdd")
|
||||
public Result<?> batchAdd(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
|
||||
String draftingGroupIds = payDraftingGroupSubItem.getDraftingGroupIds();
|
||||
if (StringUtils.isBlank(draftingGroupIds)) {
|
||||
return Result.error("起草组ids不能为空!");
|
||||
}
|
||||
String[] draftingGroupIdsArr = draftingGroupIds.split(",");
|
||||
for (String draftingGroupId : draftingGroupIdsArr) {
|
||||
payDraftingGroupSubItem.setDraftingGroupId(draftingGroupId);
|
||||
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
|
||||
if (!StringUtils.isBlank(msg)) {
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
payDraftingGroupSubItemService.addPayDraftingGroupSubItem(payDraftingGroupSubItem);
|
||||
}
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
|
||||
+6
@@ -428,4 +428,10 @@ public class PayDraftingGroupSubItem implements Serializable {
|
||||
/**审核说明**/
|
||||
@ApiModelProperty(value = "审核说明")
|
||||
private String checkRemark;
|
||||
|
||||
/**起草组ids*/
|
||||
@ApiModelProperty(value = "起草组ids")
|
||||
@TableField(exist = false)
|
||||
private String draftingGroupIds;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user