维修管理优化 完善记录信息

This commit is contained in:
syruan 2024-11-21 17:20:57 +08:00
parent 7a74c72329
commit aa1727f025
1 changed files with 10 additions and 0 deletions

View File

@ -174,6 +174,10 @@ public class RepairServiceImpl implements RepairService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult submitRepairApply(@NotNull(message = "参数不能为空") RepairApplyRecord bean) { public AjaxResult submitRepairApply(@NotNull(message = "参数不能为空") RepairApplyRecord bean) {
if (bean == null || bean.getRepairType() == null) {
return AjaxResult.error("维修方式参数不能为空");
}
// 获取维修详情记录待维修已维修报废的数量 // 获取维修详情记录待维修已维修报废的数量
RepairTaskDetails details = repairMapper.getById(bean.getId()); RepairTaskDetails details = repairMapper.getById(bean.getId());
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
@ -356,6 +360,9 @@ public class RepairServiceImpl implements RepairService {
} }
if (Objects.equals(manageTypeByCode, bean.getManageType())) { if (Objects.equals(manageTypeByCode, bean.getManageType())) {
// 物资管理方式--编码管理 // 物资管理方式--编码管理
if (bean.getRepairType() == null) {
continue;
}
// 根据维修方式更新维修数量报废数量 // 根据维修方式更新维修数量报废数量
switch (bean.getRepairType()) { switch (bean.getRepairType()) {
case inRepairType: { case inRepairType: {
@ -389,6 +396,9 @@ public class RepairServiceImpl implements RepairService {
if (bean.getId() == null) { if (bean.getId() == null) {
throw new ServiceException("请完善参数维修详情ID为空!"); throw new ServiceException("请完善参数维修详情ID为空!");
} }
if (bean.getRepairType() == null) {
continue;
}
// 处理配件--数量管理--内部维修 // 处理配件--数量管理--内部维修
if (CollectionUtil.isNotEmpty(bean.getNumberInRepairPartList())) { if (CollectionUtil.isNotEmpty(bean.getNumberInRepairPartList())) {