fix issue
This commit is contained in:
parent
7e9edd003e
commit
41a39c28ff
|
|
@ -279,8 +279,15 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
//判断(ma_type 设备规格表)中的库存够不够出库的
|
||||
MaType maType = leaseOutDetailsMapper.selectByTypeId(record);
|
||||
if (maType != null) {
|
||||
if (maType.getNum() == null || maType.getNum().compareTo(BigDecimal.valueOf(record.getOutNum())) < 0) {
|
||||
return 0;
|
||||
if ("0".equals(maType.getManageType())) {
|
||||
int count = leaseOutDetailsMapper.getCountOfCodeMachine(record);
|
||||
if (BigDecimal.valueOf(count).compareTo(BigDecimal.valueOf(record.getOutNum())) < 0) {
|
||||
return 0;
|
||||
}
|
||||
} else if ("1".equals(maType.getManageType())) {
|
||||
if (maType.getNum() == null || maType.getNum().compareTo(BigDecimal.valueOf(record.getOutNum())) < 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue