维修管理优化 完善记录信息
This commit is contained in:
parent
7a74c72329
commit
aa1727f025
|
|
@ -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())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue