|
@@ -8,14 +8,18 @@ import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
|
|
|
import org.jeecg.modules.billet.billetHotsend.mapper.RulerDefaultConfigMapper;
|
|
|
import org.jeecg.modules.billet.billetHotsend.service.IBilletHotsendBaseService;
|
|
|
import org.jeecg.modules.billet.billetHotsend.service.IRulerDefaultConfigService;
|
|
|
+import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
|
|
|
+import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
|
|
|
import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneService;
|
|
|
import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeService;
|
|
|
import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoService;
|
|
|
import org.jeecg.modules.billet.rollHeight.service.IRollHeightService;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
|
|
|
+import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingUpLog;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.mapper.StackingAndLoadingVehiclesMapper;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingAndLoadingVehiclesService;
|
|
|
+import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingUpLogService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.LoadingParams;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.SavVo;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.StorageBill;
|
|
@@ -59,11 +63,15 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
private IRollHeightService rollHeightService;
|
|
|
@Autowired
|
|
|
private IRollOutShippService rollOutShippService;
|
|
|
+ @Autowired
|
|
|
+ private IBilletHotsendTypeConfigService billetHotsendTypeConfigService;
|
|
|
+ @Autowired
|
|
|
+ private IStackingUpLogService stackingUpLogService;
|
|
|
|
|
|
@Override
|
|
|
- public List<List<StackingAndLoadingVehicles>> getListBySatck(String stack) {
|
|
|
+ public List<List<StackingAndLoadingVehicles>> getListBySatck(String typeConfigId) {
|
|
|
LambdaQueryWrapper<StackingAndLoadingVehicles> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(StackingAndLoadingVehicles::getStackAddr, stack).isNull(StackingAndLoadingVehicles::getCarNum);
|
|
|
+ wrapper.eq(StackingAndLoadingVehicles::getTypeConfigId, typeConfigId);
|
|
|
List<StackingAndLoadingVehicles> list = baseMapper.selectList(wrapper);
|
|
|
Boolean isNotNull = oConvertUtils.listIsNotEmpty(list);
|
|
|
List<List<StackingAndLoadingVehicles>> res = new ArrayList<>();
|
|
@@ -84,7 +92,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
sav.set(new StackingAndLoadingVehicles());
|
|
|
sav.get().setLayer(layer);
|
|
|
sav.get().setAddress(adddress);
|
|
|
- sav.get().setStackAddr(stack);
|
|
|
+ sav.get().setStackAddr(typeConfigId);
|
|
|
}
|
|
|
savs.add(sav.get());
|
|
|
}
|
|
@@ -404,6 +412,59 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
return stackingAndLoadingVehicles;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void saveUpperStacking(LoadingParams loadingParams) {
|
|
|
+ // 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
+ BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
|
|
|
+ // 保存 钢坯上垛后信息至 公共容器
|
|
|
+ List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = loadingParams.getStackingAndLoadingVehiclesList();
|
|
|
+ stackingAndLoadingVehiclesList.forEach(x ->{
|
|
|
+ StackingAndLoadingVehicles stackingAndLoadingVehicles = new StackingAndLoadingVehicles();
|
|
|
+ BeanUtils.copyProperties(x, stackingAndLoadingVehicles);
|
|
|
+ stackingAndLoadingVehicles.setStackAddr(billetHotsendTypeConfig.getTypeName());
|
|
|
+ stackingAndLoadingVehicles.setTypeConfigId(billetHotsendTypeConfig.getId());
|
|
|
+ baseMapper.insert(stackingAndLoadingVehicles);
|
|
|
+ });
|
|
|
+ // 保存上垛信息日志
|
|
|
+ List<StackingUpLog> stackingUpLogList = new ArrayList<>();
|
|
|
+ stackingAndLoadingVehiclesList.forEach(y ->{
|
|
|
+ StackingUpLog stackingUpLog = new StackingUpLog();
|
|
|
+ BeanUtils.copyProperties(y, stackingUpLog);
|
|
|
+ stackingUpLog.setBilletNo(y.getBilletNos());
|
|
|
+ stackingUpLog.setCreateDate(new Date());
|
|
|
+ });
|
|
|
+ stackingUpLogService.saveBatch(stackingUpLogList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StackingAndLoadingVehicles> getListByTypeConfigId(String typeConfigId) {
|
|
|
+ LambdaQueryWrapper<StackingAndLoadingVehicles> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(StackingAndLoadingVehicles::getTypeConfigId, typeConfigId);
|
|
|
+ return baseMapper.selectList(queryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void loadingHandle(LoadingParams loadingParams) {
|
|
|
+ // 1 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
+
|
|
|
+ // 2 先移除 堆垛公共容器中的记录 stacking_and_loading_vehicles
|
|
|
+
|
|
|
+ // 3 保存 下垛日志 stacking_down_log
|
|
|
+
|
|
|
+ // 4 保存或更新 钢坯热送基础信息 billet_hotsend
|
|
|
+
|
|
|
+ // 5 根据所属表 保存对应的棒线和对象信息,明细信息 roll_club_two、roll_club_two_details、roll_club_three、roll_club_three_details、roll_out_shipp、roll_out_shipp_details
|
|
|
+
|
|
|
+ // 6 更新装运单 storage_bill 《保存:不操作装运单》
|
|
|
+
|
|
|
+ // 7 发车后,新增钢坯堆垛储运信息 storage_car_log
|
|
|
+
|
|
|
+ // 8 更新钢坯基础信息 billet_basic_info
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public void addStorageBill(List<StackingAndLoadingVehicles> savs,String castMachine,String carNum,String destination){
|
|
|
StorageBillModel storageBillModel = storageBillModelService.getOne(new LambdaQueryWrapper<StorageBillModel>().eq(StorageBillModel::getCastMachine,castMachine));
|
|
|
Integer carTimes = 0;
|