|
@@ -285,6 +285,8 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
|
|
|
public int insertDetailsOfTheRefuelingPlanSpinningBatch(List<DetailsOfTheRefuelingPlanSpinning> detailsOfTheRefuelingPlanSpinning) {
|
|
|
//批量插入修改产线号和批号
|
|
|
List<SaleProducts> saleProductsList=new ArrayList<>();
|
|
|
+ //批量插入修改产线号和批号
|
|
|
+ List<SaleProducts> saleProductsList2=new ArrayList<>();
|
|
|
//改批号,和产线号
|
|
|
detailsOfTheRefuelingPlanSpinning.forEach(item->{
|
|
|
//改产品的线号,批号
|
|
@@ -292,20 +294,15 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
|
|
|
saleProducts.setId(Long.valueOf(item.getProductId()));
|
|
|
saleProducts.setProductionLineNo(item.getMacId());//产线iD
|
|
|
saleProducts.setLotNumber(item.getCurrentLotNumber().toString());//批号
|
|
|
+ //产品对应的信息
|
|
|
+ SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
|
|
|
+ item.setProductTypeName(saleProducts1.getProductName());
|
|
|
+ saleProductsList.add(saleProducts);
|
|
|
if(item.getPlanStatus().equals("1")){
|
|
|
- //产品对应的信息
|
|
|
- SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
|
|
|
- item.setProductTypeName(saleProducts1.getProductName());
|
|
|
- saleProductsList.add(saleProducts);
|
|
|
+ saleProductsList2.add(saleProducts);
|
|
|
}
|
|
|
saleProducts.setOnBoardState(item.getPlanStatus());//状态信息
|
|
|
saleProducts.setProductNumber(Double.valueOf(item.getNumber()));//数量
|
|
|
- if(saleProductsList.size()<=0){
|
|
|
- //产品对应的信息
|
|
|
- SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
|
|
|
- item.setProductTypeName(saleProducts1.getProductName());
|
|
|
- saleProductsList.add(saleProducts);
|
|
|
- }
|
|
|
DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs=new DetailsOfTheRefuelingPlanSpinningLogs();
|
|
|
BeanUtils.copyProperties(item,detailsOfTheRefuelingPlanSpinningLogs);
|
|
|
detailsOfTheRefuelingPlanSpinningLogs.setCreateBy(SecurityUtils.getUsername());
|
|
@@ -315,13 +312,13 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
|
|
|
detailsOfTheRefuelingPlanSpinningLogs.setOrderId(item.getSalesmanId());//订单
|
|
|
detailsOfTheRefuelingPlanSpinningLogs.setOperation("0");
|
|
|
detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
|
|
|
-
|
|
|
});
|
|
|
//更新产线
|
|
|
int i2 = saleProductsMapper.updateSaleProductBatch(saleProductsList);
|
|
|
+ //更新产线
|
|
|
+ int i3= saleProductsMapper.updateSaleProductBatch(saleProductsList2);
|
|
|
return detailsOfTheRefuelingPlanSpinningMapper.insertBatchDetailsOfTheRefuelingPlanSpinning(detailsOfTheRefuelingPlanSpinning);
|
|
|
}
|
|
|
-
|
|
|
@Override
|
|
|
public List<DetailsOfTheRefuelingPlanSpinning> getCurrentProductionLineSuperior(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
|
|
|
return detailsOfTheRefuelingPlanSpinningMapper.getCurrentProductionLineSuperior(detailsOfTheRefuelingPlanSpinning);
|