申领单删除BUG解决

highway
wws 1 year ago
parent 31d87a16e4
commit 41079dee1e

@ -154,6 +154,7 @@ public class EquSpareApplyServiceImpl implements IEquSpareApplyService {
// 校验
for (String id : applyIds) {
EquSpareApply apply = equSpareApplyMapper.selectEquSpareApplyByApplyId(id);
int checkNull = 0;
if (apply.getWorkCode() != null) {
if (!apply.getWorkCode().isEmpty()) {
EquRepairWorkOrder workOrder = equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkCode(apply.getWorkCode());
@ -162,7 +163,7 @@ public class EquSpareApplyServiceImpl implements IEquSpareApplyService {
check = false;
}
}else {
return error(500,"未查询到对应维修工单信息!删除失败!");
checkNull++;
}
EquOrder order = equOrderMapper.selectEquOrderByOrderCode(apply.getWorkCode());
if (order != null) {
@ -170,11 +171,15 @@ public class EquSpareApplyServiceImpl implements IEquSpareApplyService {
check = false;
}
}else {
return error(500,"未查询到对应保养工单信息!删除失败!");
checkNull++;
}
}
}
if (checkNull == 2) {
return error(500,"关联单号信息为空!删除失败!");
}
if (check) {
// 回填数据
sparePartsLedgerMapper.updateSpareNumAdd(apply);

Loading…
Cancel
Save