|
@@ -36,6 +36,7 @@ import org.jeecg.modules.billet.storageCarLog.service.IStorageCarLogService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
@@ -453,6 +454,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public void loadingHandle(LoadingParams loadingParams) {
|
|
|
// 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
|
|
@@ -555,15 +557,17 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
billetBasicInfoList.forEach(x ->{
|
|
|
x.setBelongTable("stacking_and_loading_vehicles");
|
|
|
x.setUpdateTime(new Date());
|
|
|
- x.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
|
|
|
+ x.setBhtcId(loadingParams.getDestinationId());
|
|
|
});
|
|
|
billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
|
|
|
StorageBill storageBill = loadingParams.getStorageBill();
|
|
|
storageBill.setAmountTotal(stackingAndLoadingVehiclesList.size() * 4);
|
|
|
+ storageBill.setDestination(loadingParams.getDestination());
|
|
|
storageBillService.updateById(storageBill);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public void stackDepartHandle(LoadingParams loadingParams) {
|
|
|
// 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
|
|
@@ -658,25 +662,24 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
//5 查询并批量更新钢坯基础信息 belongTable
|
|
|
LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
|
|
|
.eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
|
|
|
- .eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
|
|
|
.in(BilletBasicInfo::getBilletNo, billetNosList);
|
|
|
List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
|
|
|
billetBasicInfoList.forEach(x ->{
|
|
|
x.setBelongTable("stacking_and_loading_vehicles");
|
|
|
- x.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
|
|
|
+ x.setBhtcId(loadingParams.getDestinationId());
|
|
|
});
|
|
|
billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
|
|
|
// 6 更新装运单 storage_bill 新增储运信息
|
|
|
StorageBill storageBill = loadingParams.getStorageBill();
|
|
|
storageBill.setTypeConfigId(loadingParams.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
|
|
|
- storageBill.setDestination(loadingParams.getStorageBill().getDestination());// 目的地
|
|
|
+ storageBill.setDestination(loadingParams.getDestination());// 目的地
|
|
|
storageBill.setAmountTotal(storageBill.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4);
|
|
|
storageBill.setOutTime(new Date());
|
|
|
storageBillService.updateById(storageBill);
|
|
|
// 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
|
|
|
StorageCarLog storageCarLog = new StorageCarLog();
|
|
|
BeanUtils.copyProperties(storageBill, storageCarLog);
|
|
|
- storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
|
|
|
+ storageCarLog.setDestination(loadingParams.getDestination());// 目的地
|
|
|
storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
|
|
|
storageCarLog.setTypeConfigId(billetHotsendTypeConfig.getId()); // 钢坯配置类型ID
|
|
|
storageCarLog.setHeatNo(billetHotsend.getHeatNo());
|
|
@@ -694,6 +697,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public void addStackInfo(LoadingParams loadingParams) {
|
|
|
// 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
|
|
@@ -782,7 +786,6 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
//5 查询并批量更新钢坯基础信息 belongTable
|
|
|
LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
|
|
|
.eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
|
|
|
- .eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
|
|
|
.in(BilletBasicInfo::getBilletNo, billetNosList);
|
|
|
List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
|
|
|
billetBasicInfoList.forEach(x ->{
|