|
|
@ -176,14 +176,19 @@ public class MaterialController { |
|
|
Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId")); |
|
|
Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId")); |
|
|
// 获取当前仓库下所有可见的仓库
|
|
|
// 获取当前仓库下所有可见的仓库
|
|
|
List<Integer> allChildDepositoryById = depositoryService.findAllChildDepositoryById(depositoryId, userToken); |
|
|
List<Integer> allChildDepositoryById = depositoryService.findAllChildDepositoryById(depositoryId, userToken); |
|
|
|
|
|
if (allChildDepositoryById.size() > 0) { |
|
|
map.put("depositoryIds", allChildDepositoryById); |
|
|
map.put("depositoryIds", allChildDepositoryById); |
|
|
map.remove("depositoryId"); |
|
|
map.remove("depositoryId"); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
if (map.containsKey("materialTypeId")) { |
|
|
if (map.containsKey("materialTypeId")) { |
|
|
Long materialTypeId = ObjectFormatUtil.toLong(map.get("materialTypeId")); |
|
|
Long materialTypeId = ObjectFormatUtil.toLong(map.get("materialTypeId")); |
|
|
List<Long> childForMaterialTypeByParent = materialTypeService.findChildForMaterialTypeByParent(materialTypeId); |
|
|
List<Long> childForMaterialTypeByParent = materialTypeService.findChildForMaterialTypeByParent(materialTypeId); |
|
|
|
|
|
if (childForMaterialTypeByParent.size() > 0) { |
|
|
map.put("materialTypeIds", childForMaterialTypeByParent); |
|
|
map.put("materialTypeIds", childForMaterialTypeByParent); |
|
|
map.remove("materialTypeId"); |
|
|
map.remove("materialTypeId"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
list = materialService.findInventory(map); |
|
|
list = materialService.findInventory(map); |
|
|
total = materialService.findInventoryCount(map); |
|
|
total = materialService.findInventoryCount(map); |
|
|
@ -624,8 +629,7 @@ public class MaterialController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return new RestResponse(); |
|
|
return new RestResponse(); |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
return CrudUtil.insertHandle(-1, 0); |
|
|
return CrudUtil.insertHandle(-1, 0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -667,6 +671,7 @@ public class MaterialController { |
|
|
return CrudUtil.insertHandle(-1, 0); |
|
|
return CrudUtil.insertHandle(-1, 0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping("/getTemporaryValueForMaterial") |
|
|
@PostMapping("/getTemporaryValueForMaterial") |
|
|
public RestResponse getTemporaryValueForMaterial(@RequestBody Map<String, Object> map, HttpServletRequest request) { |
|
|
public RestResponse getTemporaryValueForMaterial(@RequestBody Map<String, Object> map, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
|