|
@@ -232,17 +232,22 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult<CapacityAuditInfoVo> getCapacityAuditDetail(Long id) {
|
|
|
|
|
|
|
+ public CommonResult<CapacityAuditInfoVo> getCapacityAuditDetail(String id) {
|
|
|
// 查询审核详情
|
|
// 查询审核详情
|
|
|
CapacityAuditInfoVo capacityAuditInfo = capacityAuditInfoMapper.getCapacityAuditById(id);
|
|
CapacityAuditInfoVo capacityAuditInfo = capacityAuditInfoMapper.getCapacityAuditById(id);
|
|
|
if (capacityAuditInfo != null) {
|
|
if (capacityAuditInfo != null) {
|
|
|
|
|
+ String userId = capacityAuditInfo.getApplicantUserId();
|
|
|
|
|
+ List<String> roleNameList = storageMapper.getUserRoleNameListById(userId);
|
|
|
|
|
+ if (roleNameList != null && roleNameList.size() > 0) {
|
|
|
|
|
+ capacityAuditInfo.setRoles(roleNameList);
|
|
|
|
|
+ }
|
|
|
return CommonResult.data(capacityAuditInfo);
|
|
return CommonResult.data(capacityAuditInfo);
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult<String> auditCapacityAudit(Long id, Integer auditState, String rejectReason) {
|
|
|
|
|
|
|
+ public CommonResult<String> auditCapacityAudit(String id, Integer auditState, String rejectReason) {
|
|
|
// 校验申请单
|
|
// 校验申请单
|
|
|
CapacityAuditInfo capacityAuditInfo = capacityAuditInfoMapper.selectById(id);
|
|
CapacityAuditInfo capacityAuditInfo = capacityAuditInfoMapper.selectById(id);
|
|
|
if (capacityAuditInfo == null) {
|
|
if (capacityAuditInfo == null) {
|
|
@@ -258,6 +263,10 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
storageBean.setTotalStorageSize(capacityAuditInfo.getApplicantAfterCapacity());
|
|
storageBean.setTotalStorageSize(capacityAuditInfo.getApplicantAfterCapacity());
|
|
|
int update = storageMapper.updateById(storageBean);
|
|
int update = storageMapper.updateById(storageBean);
|
|
|
if (update > 0) {
|
|
if (update > 0) {
|
|
|
|
|
+ // 修改审核状态
|
|
|
|
|
+ capacityAuditInfo.setAuditTime(new Date());
|
|
|
|
|
+ capacityAuditInfo.setAuditUserId(StpLoginUserUtil.getLoginUser().getId());
|
|
|
|
|
+ capacityAuditInfoMapper.updateById(capacityAuditInfo);
|
|
|
return CommonResult.ok("扩容申请通过,已更新用户存储空间");
|
|
return CommonResult.ok("扩容申请通过,已更新用户存储空间");
|
|
|
} else {
|
|
} else {
|
|
|
return CommonResult.error("扩容申请通过失败");
|
|
return CommonResult.error("扩容申请通过失败");
|