Commit 11a4da75 by 翁国栋

管理员添加附件

parent 3bf10e80
......@@ -1327,4 +1327,32 @@ public class SpmkController {
drafts.deleteById();
return ResultUtil.data("删除成功");
}
@PostMapping(value = "/add_files")
@ApiOperation(value = "添加附件", httpMethod = "POST", notes = "添加附件")
@Log(title = "审批-添加附件", businessType = BusinessType.OTHER)
public Result<Object> addFiles(@CurrentUser UserBean userBean,@RequestBody ApprovingDto approvingDto) {
QyzxEmpEntAsso ent = QyzxEmpEntAsso.builder().build().selectOne(new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode()).eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
if(ent != null) {
if(ent.getUserType() == 2) {
return ResultUtil.error("暂无权限");
}
}
SpmkApproveDetailSummary ad = SpmkApproveDetailSummary.builder().build().selectOne(new QueryWrapper<SpmkApproveDetailSummary>()
.lambda()
.select(SpmkApproveDetailSummary::getId,
SpmkApproveDetailSummary::getRequestData,
SpmkApproveDetailSummary::getFroms,
SpmkApproveDetailSummary::getFlowChildren)
.eq(SpmkApproveDetailSummary::getId, approvingDto.getAsId()));
// 审批详情 审批时添加 附件
try {
if(RequestDataUtils.addFileList(ad,approvingDto.getFileList())){
ad.updateById();
}
} catch (Exception e) {
e.printStackTrace();
}
return ResultUtil.data("添加附件成功");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment