|
|
@ -310,7 +310,7 @@ public class MaterialController { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/findMatrialById") |
|
|
@GetMapping("/findMatrialById") |
|
|
public RestResponse findMatrialById(@RequestParam(value = "mid", required = false) String mid, @RequestParam(value = "type", required = false) String type, HttpServletRequest request) { |
|
|
public RestResponse findMaterialById(@RequestParam(value = "mid", required = false) String mid, @RequestParam(value = "type", required = false) String type, HttpServletRequest request) { |
|
|
String token = request.getHeader("user-token"); |
|
|
String token = request.getHeader("user-token"); |
|
|
if (token == null) { |
|
|
if (token == null) { |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
token = (String) request.getSession().getAttribute("userToken"); |
|
|
@ -323,9 +323,9 @@ public class MaterialController { |
|
|
|
|
|
|
|
|
Material materialById = materialService.findMaterialById(ObjectFormatUtil.toInteger(mid)); |
|
|
Material materialById = materialService.findMaterialById(ObjectFormatUtil.toInteger(mid)); |
|
|
String mcode = materialById.getCode(); |
|
|
String mcode = materialById.getCode(); |
|
|
|
|
|
Inventory inventoryById = null; |
|
|
if ("out".equals(type)) { |
|
|
if ("out".equals(type)) { |
|
|
Inventory inventoryById = materialService.findInventoryById(ObjectFormatUtil.toInteger(mid)); |
|
|
inventoryById = materialService.findInventoryById(ObjectFormatUtil.toInteger(mid)); |
|
|
mcode = inventoryById.getCode(); |
|
|
mcode = inventoryById.getCode(); |
|
|
} |
|
|
} |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
List<PlaceP> placePList = new ArrayList<>(); |
|
|
@ -350,7 +350,12 @@ public class MaterialController { |
|
|
} |
|
|
} |
|
|
tempDepositoryID = (List<Integer>) CollectionUtils.union(depositoryIdList, tempDepositoryID); |
|
|
tempDepositoryID = (List<Integer>) CollectionUtils.union(depositoryIdList, tempDepositoryID); |
|
|
List<Depository> depositoryByIds = depositoryService.findDepositoryByIds(tempDepositoryID); |
|
|
List<Depository> depositoryByIds = depositoryService.findDepositoryByIds(tempDepositoryID); |
|
|
InventoryP materialP = inventoryPS.get(0); |
|
|
InventoryP materialP = null; |
|
|
|
|
|
if (inventoryById != null) { |
|
|
|
|
|
materialP = new InventoryP(inventoryById); |
|
|
|
|
|
} else { |
|
|
|
|
|
materialP = inventoryPS.get(0); |
|
|
|
|
|
} |
|
|
materialP.setMaterialAndBarCodeList(materialByBarCodeByCondition); |
|
|
materialP.setMaterialAndBarCodeList(materialByBarCodeByCondition); |
|
|
List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(materialP.getMid()); |
|
|
List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(materialP.getMid()); |
|
|
materialP.setSplitInfoList(splitInfoByMid); |
|
|
materialP.setSplitInfoList(splitInfoByMid); |
|
|
|