|
|
|
@ -129,7 +129,7 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void customerIssueConfirm(CustomerIssueDto customerIssueDto) throws Exception { |
|
|
|
public List<String> customerIssueConfirm(CustomerIssueDto customerIssueDto) throws Exception { |
|
|
|
// 验证工单状态 |
|
|
|
if(customerIssueDto.getSelectedMaterials() != null && customerIssueDto.getSelectedMaterials().size()>0){ |
|
|
|
boolean b = validateHandingUnitQty(customerIssueDto.getSelectedMaterials()); |
|
|
|
@ -166,7 +166,7 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
subList.add(subDto); |
|
|
|
} |
|
|
|
|
|
|
|
changeAndAddHandlingUnit(customerIssueDto); |
|
|
|
List<String> ids = changeAndAddHandlingUnit(customerIssueDto); |
|
|
|
transCommonRequestDto.setSubList(subList); |
|
|
|
List<TransDetail> out = transHeaderService.genTransAndChangeInventoryStock(transCommonRequestDto, "OUT"); |
|
|
|
|
|
|
|
@ -202,6 +202,8 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
} |
|
|
|
if(BigDecimal.ZERO.compareTo(hu.getQty()) !=0){ |
|
|
|
hu.setInStockFlag("Y"); |
|
|
|
}else{ |
|
|
|
hu.setInStockFlag("N"); |
|
|
|
} |
|
|
|
handlingUnits.add(hu); |
|
|
|
if (material.getIssueQty() != null) { |
|
|
|
@ -211,13 +213,15 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
productionIssueMapper.updateHandingUnit(handlingUnits); |
|
|
|
//返回出库中间表 |
|
|
|
customerIssueMapper.updateCustomerStatus(customerIssueDto.getWorkOrderNo(),customerIssueDto.getSite()); |
|
|
|
|
|
|
|
//调用ifs接口 |
|
|
|
ShipmentCreateDto createDto = new ShipmentCreateDto(); |
|
|
|
createDto.setIfsSiteID(customerIssueDto.getSite()); |
|
|
|
createDto.setIfsShipmentID(customerIssueDto.getWorkOrderNo()); |
|
|
|
createDto.setIfsShipmentType(customerIssueDto.getShipmentType()); |
|
|
|
createDto.setIfsLocationNo(customerIssueDto.getLocationNo()); |
|
|
|
ifsApiIssueAndReturnService.addShipmentCreatePickList(createDto); |
|
|
|
|
|
|
|
return ids; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -470,7 +474,8 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional |
|
|
|
public void changeAndAddHandlingUnit(CustomerIssueDto customerIssueDto){ |
|
|
|
public List<String> changeAndAddHandlingUnit(CustomerIssueDto customerIssueDto){ |
|
|
|
List<String> ids = new ArrayList<>(); |
|
|
|
for(WorkOrderMaterialDto material : customerIssueDto.getSelectedMaterials()){ |
|
|
|
// 修改现有处理单元的数量 |
|
|
|
HandlingUnit handlingUnit = customerIssueMapper.selectHandlingUtil(customerIssueDto.getSite(), material.getLabelCode()); |
|
|
|
@ -554,8 +559,11 @@ public class CustomerIssueServiceImpl implements CustomerIssueService { |
|
|
|
remainderQty.doubleValue(), "SYSTEM", |
|
|
|
"Y", "保存成功" |
|
|
|
); |
|
|
|
|
|
|
|
ids.add(unitId); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return ids; |
|
|
|
} |
|
|
|
} |