|
|
@ -765,6 +765,9 @@ public class MaterialController { |
|
|
int codeFlag = ObjectFormatUtil.toInteger(map.get("codeFlag")); |
|
|
int codeFlag = ObjectFormatUtil.toInteger(map.get("codeFlag")); |
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
|
|
|
if(mcode == null){ |
|
|
|
|
|
return new RestResponse(null); |
|
|
|
|
|
} |
|
|
// 根据物料编码获取物料
|
|
|
// 根据物料编码获取物料
|
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
if (material != null) { |
|
|
if (material != null) { |
|
|
@ -802,7 +805,8 @@ public class MaterialController { |
|
|
mp.setSplitInfoList(splitInfoByMid); |
|
|
mp.setSplitInfoList(splitInfoByMid); |
|
|
return new RestResponse(mp); |
|
|
return new RestResponse(mp); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} |
|
|
|
|
|
else { |
|
|
return new RestResponse(null); |
|
|
return new RestResponse(null); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -819,13 +823,17 @@ public class MaterialController { |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
|
|
|
InventoryP mp = null; |
|
|
|
|
|
if(mcode == null){ |
|
|
|
|
|
return new RestResponse(mp); |
|
|
|
|
|
} |
|
|
// 根据物料编码获取物料
|
|
|
// 根据物料编码获取物料
|
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
param.put("mcode", mcode); |
|
|
param.put("mcode", mcode); |
|
|
param.put("codeFlag", 1); |
|
|
param.put("codeFlag", 1); |
|
|
InventoryP mp = null; |
|
|
|
|
|
// 获取物料与条形码的对应关系
|
|
|
// 获取物料与条形码的对应关系
|
|
|
List<MaterialAndBarCode> materialByBarCodeByCondition = materialService.findMaterialByBarCodeByCondition(param); |
|
|
List<MaterialAndBarCode> materialByBarCodeByCondition = materialService.findMaterialByBarCodeByCondition(param); |
|
|
Boolean flag = false; |
|
|
Boolean flag = false; |
|
|
@ -866,18 +874,23 @@ public class MaterialController { |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
|
|
|
|
|
|
|
|
|
InventoryP mp = null; |
|
|
|
|
|
|
|
|
|
|
|
if(mcode == null){ |
|
|
|
|
|
return new RestResponse(mp); |
|
|
|
|
|
} |
|
|
// 根据物料编码获取物料
|
|
|
// 根据物料编码获取物料
|
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
param.put("mcode", mcode); |
|
|
param.put("mcode", mcode); |
|
|
param.put("codeFlag", 1); |
|
|
param.put("codeFlag", 1); |
|
|
InventoryP mp = null; |
|
|
|
|
|
// 获取物料与条形码的对应关系
|
|
|
// 获取物料与条形码的对应关系
|
|
|
List<MaterialAndBarCode> materialByBarCodeByCondition = materialService.findMaterialByBarCodeByCondition(param); |
|
|
List<MaterialAndBarCode> materialByBarCodeByCondition = materialService.findMaterialByBarCodeByCondition(param); |
|
|
Boolean flag = false; |
|
|
boolean flag = false; |
|
|
for (int j = 0; j < depositoryByAdminorg.size(); j++) { |
|
|
for (Depository depository : depositoryByAdminorg) { |
|
|
Depository depository = depositoryByAdminorg.get(j); |
|
|
|
|
|
param.put("mcode", material.getCode()); |
|
|
param.put("mcode", material.getCode()); |
|
|
param.put("depositoryId", depository.getId()); |
|
|
param.put("depositoryId", depository.getId()); |
|
|
// 获取当前仓库下是否有当前物料的库存
|
|
|
// 获取当前仓库下是否有当前物料的库存
|
|
|
@ -976,6 +989,9 @@ public class MaterialController { |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
String qrCode = (String) map.get("qrCode"); |
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
// 根据扫描的二维码获取对应的物料编码
|
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
String mcode = materialService.findMaterialCodeByQrCode(qrCode); |
|
|
|
|
|
if(mcode == null){ |
|
|
|
|
|
return new RestResponse(null); |
|
|
|
|
|
} |
|
|
// 根据物料编码获取物料
|
|
|
// 根据物料编码获取物料
|
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
Material material = materialService.findMaterialByCode(mcode); |
|
|
// 用于标识是否成功获取
|
|
|
// 用于标识是否成功获取
|
|
|
|