feat: 工作组批量添加接口
This commit is contained in:
+30
@@ -416,6 +416,36 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
|||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量添加
|
||||||
|
*
|
||||||
|
* @param payWorkingGroupSubItem 工作组成员
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "工作组成员-批量添加",operateType = 2)
|
||||||
|
@RequiresPermissions("workingGroupMember:batchAdd")
|
||||||
|
@ApiOperation(value = "工作组成员-批量添加", notes = "工作组成员-批量添加")
|
||||||
|
@PostMapping(value = "/batchAdd")
|
||||||
|
public Result<?> batchAdd(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
|
||||||
|
String workingGroupIds = payWorkingGroupSubItem.getWorkingGroupIds();
|
||||||
|
if (StringUtils.isBlank(workingGroupIds)) {
|
||||||
|
return Result.error("工作组ids不能为空!");
|
||||||
|
}
|
||||||
|
String[] workingGroupIdsArr = workingGroupIds.split(",");
|
||||||
|
for (String workingGroupId : workingGroupIdsArr) {
|
||||||
|
if (StringUtils.isBlank(workingGroupId)) {
|
||||||
|
return Result.error("工作组id不能为空!");
|
||||||
|
}
|
||||||
|
payWorkingGroupSubItem.setWorkingGroupId(workingGroupId);
|
||||||
|
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
|
||||||
|
if (!StringUtils.isBlank(msg)) {
|
||||||
|
return Result.error(msg.toString());
|
||||||
|
}
|
||||||
|
payWorkingGroupSubItemService.addPayWorkingGroupSubItem(payWorkingGroupSubItem);
|
||||||
|
}
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
|
|||||||
+4
@@ -610,4 +610,8 @@ public class PayWorkingGroupSubItem implements Serializable {
|
|||||||
@ApiModelProperty(value = "预计到账结束的日期")
|
@ApiModelProperty(value = "预计到账结束的日期")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String estimatedArrivalEndDate;
|
private String estimatedArrivalEndDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工作组ids 多个以逗号分隔")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String workingGroupIds;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user