|
@@ -57,9 +57,13 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
for(int i = 0; i < listMaterialClass.size(); i++) {
|
|
|
Map<String, Object> map1 = warehousingMapper.getScanNum(listMaterialClass.get(i).getStorageLocationCode(), num);
|
|
|
if(Double.parseDouble(String.valueOf(map1.get("scanNum"))) < Double.parseDouble(String.valueOf(map1.get("storageLocationCapacity")))){
|
|
|
- stringBuffer.append(listMaterialClass.get(i).getStorageLocationCode() + ",");
|
|
|
- int surplusNum = (int) (Double.parseDouble(String.valueOf(map1.get("storageLocationCapacity"))) - Double.parseDouble(String.valueOf(map1.get("scanNum"))) + Double.parseDouble(num));
|
|
|
- listString.add(surplusNum);
|
|
|
+ //查询库存是否同物料同批次存在
|
|
|
+ int countProduc = warehousingMapper.getInventoryProduc(listMaterialClass.get(i).getWllbCode(), producDate, listMaterialClass.get(i).getStorageLocationCode());
|
|
|
+ if(countProduc == 0){
|
|
|
+ stringBuffer.append(listMaterialClass.get(i).getStorageLocationCode() + ",");
|
|
|
+ int surplusNum = (int) (Double.parseDouble(String.valueOf(map1.get("storageLocationCapacity"))) - Double.parseDouble(String.valueOf(map1.get("scanNum"))) + Double.parseDouble(num));
|
|
|
+ listString.add(surplusNum);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
List<StorageLocation> list = warehousingMapper.recommend(stringBuffer.toString());
|