|
|
@ -574,7 +574,16 @@ public class ProductionReturnServiceImpl implements ProductionReturnService { |
|
|
if(onunit == null){ |
|
|
if(onunit == null){ |
|
|
partInStock = ifsApiIssueAndReturnService.getAnInventoryPartInStock(request.getSite(), request.getPartNo()); |
|
|
partInStock = ifsApiIssueAndReturnService.getAnInventoryPartInStock(request.getSite(), request.getPartNo()); |
|
|
if(partInStock == null || partInStock.size() == 0){ |
|
|
if(partInStock == null || partInStock.size() == 0){ |
|
|
throw new Exception("无法获取物料信息"); |
|
|
|
|
|
|
|
|
//throw new Exception("无法获取物料信息"); |
|
|
|
|
|
//todo 目前一些物料没有入库信息,所以使用当前时间作为入库时间 |
|
|
|
|
|
newReceiveDate = new Date(); |
|
|
|
|
|
newManufactureDate = new Date(); |
|
|
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
|
|
calendar.setTime(new Date()); |
|
|
|
|
|
calendar.add(Calendar.YEAR, 2); |
|
|
|
|
|
Date datePlusTwoYears = calendar.getTime(); |
|
|
|
|
|
newExpireData = datePlusTwoYears; |
|
|
|
|
|
newEngChgLevel = "1"; |
|
|
}else{ |
|
|
}else{ |
|
|
newReceiveDate = sdf.parse(partInStock.get(0).getReceiptDate()); |
|
|
newReceiveDate = sdf.parse(partInStock.get(0).getReceiptDate()); |
|
|
newManufactureDate = sdf.parse(partInStock.get(0).getReceiptDate()); |
|
|
newManufactureDate = sdf.parse(partInStock.get(0).getReceiptDate()); |
|
|
|