领料接口优化
This commit is contained in:
parent
e7633b78c5
commit
461460f19c
|
|
@ -177,15 +177,15 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
||||||
|
|
||||||
// 判断库存是否足够
|
// 判断库存是否足够
|
||||||
private boolean checkStorageIsEnough(LeaseOutDetails record) {
|
private boolean checkStorageIsEnough(LeaseOutDetails record) {
|
||||||
if (record.getManageType() == MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId()) {
|
if (record.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) {
|
||||||
LeaseApplyDetails details = leaseOutDetailsMapper.getOutboundNum(record);
|
LeaseApplyDetails details = leaseOutDetailsMapper.getOutboundNum(record);
|
||||||
if (details == null) {
|
if (details == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (record.getManageType() == MaTypeManageTypeEnum.CODE_DEVICE.getTypeId()) {
|
} else if (record.getManageType().equals(MaTypeManageTypeEnum.CODE_DEVICE.getTypeId())) {
|
||||||
if (!(Objects.equals(0, record.getMaId()) || record.getMaId() == null)) {
|
if (!(Objects.equals(0, record.getMaId()) || record.getMaId() == null)) {
|
||||||
String status = machineMapper.getMachineStatus(record);
|
String status = machineMapper.getMachineStatus(record);
|
||||||
if (String.valueOf(MaMachineStatusEnum.IN_STORE.getStatus()).equals(status)) {
|
if (!String.valueOf(MaMachineStatusEnum.IN_STORE.getStatus()).equals(status)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue