出库优化
This commit is contained in:
parent
040b69d594
commit
0a6f204afc
|
|
@ -206,6 +206,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
if (StringUtils.isNotBlank(publishTask)) {
|
if (StringUtils.isNotBlank(publishTask)) {
|
||||||
// 根据领用批次查询领用详情
|
// 根据领用批次查询领用详情
|
||||||
details = leaseApplyDetailsMapper.getDetailsPublish(leaseApplyInfo);
|
details = leaseApplyDetailsMapper.getDetailsPublish(leaseApplyInfo);
|
||||||
|
}
|
||||||
if (!CollectionUtils.isEmpty(details)) {
|
if (!CollectionUtils.isEmpty(details)) {
|
||||||
for (LeaseApplyDetails detail : details) {
|
for (LeaseApplyDetails detail : details) {
|
||||||
// 根据parent_id和type_id查询出库数量
|
// 根据parent_id和type_id查询出库数量
|
||||||
|
|
@ -217,11 +218,6 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
} else {
|
} else {
|
||||||
detail.setStatus("1");
|
detail.setStatus("1");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (details.size()>0){
|
|
||||||
for (LeaseApplyDetails detail : details){
|
|
||||||
//查询类型的库存和总待出库数量
|
//查询类型的库存和总待出库数量
|
||||||
LeaseApplyDetails pendingOutNum = mapper.selectPendingOutNum(detail);
|
LeaseApplyDetails pendingOutNum = mapper.selectPendingOutNum(detail);
|
||||||
detail.setPendingOutNum(pendingOutNum.getPendingOutNum());
|
detail.setPendingOutNum(pendingOutNum.getPendingOutNum());
|
||||||
|
|
@ -1753,20 +1749,20 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
return AjaxResult.error("该设备已出库,请勿重复操作");
|
return AjaxResult.error("该设备已出库,请勿重复操作");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (leaseOutDetails.getManageType().equals(MaTypeManageTypeEnum.CODE_DEVICE.getTypeId())) {
|
|
||||||
if (leaseOutDetails.getParentId() != null) {
|
|
||||||
List<LeaseApplyDetails> detailsList = leaseApplyDetailsMapper.getLeaseMaCode(leaseOutDetails);
|
|
||||||
if (!CollectionUtils.isEmpty(detailsList)) {
|
|
||||||
return AjaxResult.error("该设备已出库,请勿重复操作");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (LeaseOutDetails bean : leaseOutRequestVo.getLeaseOutDetailsList()) {
|
for (LeaseOutDetails bean : leaseOutRequestVo.getLeaseOutDetailsList()) {
|
||||||
if (Objects.isNull(bean)) {
|
if (Objects.isNull(bean)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (bean.getManageType().equals(MaTypeManageTypeEnum.CODE_DEVICE.getTypeId())) {
|
||||||
|
if (bean.getParentId() != null) {
|
||||||
|
List<LeaseApplyDetails> detailsList = leaseApplyDetailsMapper.getLeaseMaCode(bean);
|
||||||
|
if (!CollectionUtils.isEmpty(detailsList)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 默认设置领料单位为非班组
|
// 默认设置领料单位为非班组
|
||||||
bean.setLeaseUnitIsTeam(false);
|
bean.setLeaseUnitIsTeam(false);
|
||||||
// 根据现在的领料发布出库单位ID来判断类型是否是班组
|
// 根据现在的领料发布出库单位ID来判断类型是否是班组
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue