解决物品申领出现申领成功但是“申领”按钮不消失问题

dev
a15234804788@163.com 3 years ago
parent 5092706f3d
commit a7a3188256
  1. 6
      lab-service/lab-capital/src/main/java/org/springblade/lims/goods/service/impl/ApplyServiceImpl.java

@ -209,6 +209,10 @@ public class ApplyServiceImpl extends BaseServiceImpl<ApplyMapper, Apply> implem
wrapper.eq(ApplyDetail::getApplyId, apply.getId());
// 条件查询申领相关物品信息
List<ApplyDetail> details = applyDetailService.list(wrapper);
if (details.size() == 0){//如果申领详情表中无数据,说明这个申领的详情数据可能被删掉了,但是由于申请通过之后就会减库存,所以直接将申请表设置为已完成就行了
apply.setStatus(4);
}else{
// 申领单修改状态
for (ApplyDetail detail : details) {
// 如果归还时间不为null
@ -221,6 +225,8 @@ public class ApplyServiceImpl extends BaseServiceImpl<ApplyMapper, Apply> implem
apply.setStatus(4);
}
}
}
// 修改申领单
return this.updateById(apply);
}

Loading…
Cancel
Save