功能优化
This commit is contained in:
parent
3d7a6c03cb
commit
40b9706aae
|
|
@ -83,7 +83,23 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
||||||
if (null != bmQrBoxInfo.getStatus()) {
|
if (null != bmQrBoxInfo.getStatus()) {
|
||||||
bmQrBoxInfo.setStatusList(Arrays.asList(bmQrBoxInfo.getStatus().split(",")));
|
bmQrBoxInfo.setStatusList(Arrays.asList(bmQrBoxInfo.getStatus().split(",")));
|
||||||
}
|
}
|
||||||
return bmQrBoxMapper.find(bmQrBoxInfo);
|
List<BmQrBoxInfo> list = bmQrBoxMapper.find(bmQrBoxInfo);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
if (CollectionUtil.isNotEmpty(bmQrBoxInfo.getStatusList())) {
|
||||||
|
if(bmQrBoxInfo.getStatusList().contains("2") && bmQrBoxInfo.getStatusList().contains("5")) {
|
||||||
|
// 将list中状态为2和5并且devNum大于0的数据过滤出来
|
||||||
|
list = list.stream()
|
||||||
|
// 先判空list中的bmQrBoxInfo1和它的statusList,避免空指针
|
||||||
|
.filter(bmQrBoxInfo1 -> bmQrBoxInfo1 != null
|
||||||
|
&& bmQrBoxInfo1.getStatus() != null
|
||||||
|
&& bmQrBoxInfo1.getDevNum() > 0)
|
||||||
|
.filter(bmQrBoxInfo1 -> "2".equals(bmQrBoxInfo1.getStatus())
|
||||||
|
|| "5".equals(bmQrBoxInfo1.getStatus()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1412,6 +1412,9 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (leaseOutDetails.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) {
|
if (leaseOutDetails.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) {
|
||||||
|
if (leaseOutDetails.getInputNum().compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
|
return AjaxResult.error("出库数量不能小于0");
|
||||||
|
}
|
||||||
// 查询待出库数量
|
// 查询待出库数量
|
||||||
LeaseApplyDetails info = new LeaseApplyDetails();
|
LeaseApplyDetails info = new LeaseApplyDetails();
|
||||||
if (StringUtils.isNotBlank(leaseOutDetails.getPublishTask())) {
|
if (StringUtils.isNotBlank(leaseOutDetails.getPublishTask())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue