|
@@ -8,6 +8,16 @@ 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.rollClubOne.entity.RollClubOne;
|
|
|
+import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneService;
|
|
|
+import org.jeecg.modules.billet.rollClubThree.entity.RollClubThree;
|
|
|
+import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeService;
|
|
|
+import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwo;
|
|
|
+import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoService;
|
|
|
+import org.jeecg.modules.billet.rollHeight.entity.RollHeight;
|
|
|
+import org.jeecg.modules.billet.rollHeight.service.IRollHeightService;
|
|
|
+import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShipp;
|
|
|
+import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.mapper.StackingAndLoadingVehiclesMapper;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingAndLoadingVehiclesService;
|
|
@@ -46,6 +56,16 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
private IStorageBillService storageBillService;
|
|
|
@Autowired
|
|
|
private IStorageBillModelService storageBillModelService;
|
|
|
+ @Autowired
|
|
|
+ private IRollClubOneService rollClubOneService;
|
|
|
+ @Autowired
|
|
|
+ private IRollClubTwoService rollClubTwoService;
|
|
|
+ @Autowired
|
|
|
+ private IRollClubThreeService rollClubThreeService;
|
|
|
+ @Autowired
|
|
|
+ private IRollHeightService rollHeightService;
|
|
|
+ @Autowired
|
|
|
+ private IRollOutShippService rollOutShippService;
|
|
|
|
|
|
@Override
|
|
|
public List<List<StackingAndLoadingVehicles>> getListBySatck(String stack) {
|
|
@@ -173,6 +193,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
break;
|
|
|
}
|
|
|
addStorageBill(loadingParams.getSavs(),loadingParams.getCastMachine(),loadingParams.getCarNum(),destination);
|
|
|
+ addRolling(loadingParams);
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -383,6 +404,11 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
addStorageBill(savVo.getSavs(),castMachine,"辊道","2");
|
|
|
RulerDefaultConfig last = rulerDefaultConfigService.getLast("6");
|
|
|
last.setOutAmount((oConvertUtils.isEmpty(last.getOutAmount())?0:last.getOutAmount())+savVo.getSavs().size()*4);
|
|
|
+ LoadingParams loadingParams = new LoadingParams();
|
|
|
+ loadingParams.setSavs(savVo.getSavs());
|
|
|
+ loadingParams.setCastMachine("6");
|
|
|
+ loadingParams.setDestination("3");
|
|
|
+ addRolling(loadingParams);
|
|
|
rulerDefaultConfigService.updateById(last);
|
|
|
}
|
|
|
|
|
@@ -467,4 +493,71 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void addRolling(LoadingParams loadingParams) {
|
|
|
+ RulerDefaultConfig last = rulerDefaultConfigService.getLast(loadingParams.getCastMachine());
|
|
|
+ if(oConvertUtils.listIsNotEmpty(loadingParams.getSavs())){
|
|
|
+ HashMap<String, RollClubOne> rollingMap = new HashMap<>();
|
|
|
+ for (StackingAndLoadingVehicles sav : loadingParams.getSavs()) {
|
|
|
+ RollClubOne rollClubOne = rollingMap.get(sav.getSize() + "-" + sav.getSpec() + "-" + sav.getSteel() + "-" + sav.getFurnaceNum());
|
|
|
+ if(oConvertUtils.isEmpty(rollClubOne)){
|
|
|
+ rollClubOne = new RollClubOne();
|
|
|
+ rollClubOne.setFurnaceNum(sav.getFurnaceNum());
|
|
|
+ rollClubOne.setCastMachine(loadingParams.getCastMachine());
|
|
|
+ rollClubOne.setShift(last.getShift());
|
|
|
+ rollClubOne.setShiftGroup(last.getShiftGroup());
|
|
|
+ rollClubOne.setSize(sav.getSize());
|
|
|
+ rollClubOne.setSteel(sav.getSteel());
|
|
|
+ rollClubOne.setSpec(sav.getSpec());
|
|
|
+ rollClubOne.setAmountTotal(0);
|
|
|
+ rollClubOne.setCreateDate(new Date());
|
|
|
+ rollingMap.put(sav.getSize() + "-" + sav.getSpec() + "-" + sav.getSteel() + "-" + sav.getFurnaceNum(),rollClubOne);
|
|
|
+ }
|
|
|
+ rollClubOne.setAmountTotal(rollClubOne.getAmountTotal()+4);
|
|
|
+ }
|
|
|
+ ArrayList<RollClubOne> rollClubOnes = new ArrayList<>(rollingMap.values());
|
|
|
+ switch (loadingParams.getDestination()){
|
|
|
+ case "0":
|
|
|
+ rollClubOneService.saveBatch(rollClubOnes);
|
|
|
+ break;
|
|
|
+ case "1":
|
|
|
+ ArrayList<RollClubTwo> rollClubTwos = new ArrayList<>();
|
|
|
+ rollClubOnes.forEach(rollClubOne -> {
|
|
|
+ RollClubTwo rollClubTwo = new RollClubTwo();
|
|
|
+ BeanUtils.copyProperties(rollClubOne,rollClubTwo);
|
|
|
+ rollClubTwos.add(rollClubTwo);
|
|
|
+ });
|
|
|
+ rollClubTwoService.saveBatch(rollClubTwos);
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ ArrayList<RollClubThree> rollClubThrees = new ArrayList<>();
|
|
|
+ rollClubOnes.forEach(rollClubOne -> {
|
|
|
+ RollClubThree rollClubThree = new RollClubThree();
|
|
|
+ BeanUtils.copyProperties(rollClubOne,rollClubThree);
|
|
|
+ rollClubThrees.add(rollClubThree);
|
|
|
+ });
|
|
|
+ rollClubThreeService.saveBatch(rollClubThrees);
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ ArrayList<RollHeight> rollHeights = new ArrayList<>();
|
|
|
+ rollClubOnes.forEach(rollClubOne -> {
|
|
|
+ RollHeight rollHeight = new RollHeight();
|
|
|
+ BeanUtils.copyProperties(rollClubOne,rollHeight);
|
|
|
+ rollHeights.add(rollHeight);
|
|
|
+ });
|
|
|
+ rollHeightService.saveBatch(rollHeights);
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ ArrayList<RollOutShipp> rollOutShipps = new ArrayList<>();
|
|
|
+ rollClubOnes.forEach(rollClubOne -> {
|
|
|
+ RollOutShipp rollOutShipp = new RollOutShipp();
|
|
|
+ BeanUtils.copyProperties(rollClubOne,rollOutShipp);
|
|
|
+ rollOutShipps.add(rollOutShipp);
|
|
|
+ });
|
|
|
+ rollOutShippService.saveBatch(rollOutShipps);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|