Browse Source

Merge branch 'master' into lg-dev

guoqiang 7 months ago
parent
commit
ead37fddf8

+ 8 - 14
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/controller/BilletHotsendBaseController.java

@@ -179,6 +179,14 @@ public class BilletHotsendBaseController extends JeecgController<BilletHotsend,
         return Result.OK("新增成功!");
     }
 
+    @AutoLog(value = "高线新增")
+    @ApiOperation(value="高线新增", notes="高线新增")
+    @PostMapping(value = "/addHeight")
+    public Result<?> addHeight(@RequestBody BilletHotsend billetHotsend) {
+        billetHotsendBaseService.addHeight(billetHotsend);
+        return Result.OK("新增成功!");
+    }
+
    /**
    * 导出excel
    *
@@ -219,21 +227,7 @@ public class BilletHotsendBaseController extends JeecgController<BilletHotsend,
 
    public BilletHotsend getNew(String cast){
        BilletHotsend billetHotsendBase = new BilletHotsend();
-//       billetHotsendBase.setCreateDate(new Date());
-//       billetHotsendBase.setFurnaceNum((furnace++).toString());
-//       billetHotsendBase.setShiftGroup((int)(Math.random()*4)+"");
-//       billetHotsendBase.setShift((int)(Math.random()*2)+"");
-//       billetHotsendBase.setSize((int)(Math.random()*16)+"");
-//       billetHotsendBase.setSteel("HBK-9527");
-//       billetHotsendBase.setSpec((int)(Math.random()*7)+"");
        billetHotsendBase.setIsUpd(false);
-//       billetHotsendBase.setCc(Math.random());
-//       billetHotsendBase.setSi(Math.random());
-//       billetHotsendBase.setMn(Math.random());
-//       billetHotsendBase.setSs(Math.random());
-//       billetHotsendBase.setPp(Math.random());
-//       billetHotsendBase.setVv(Math.random());
-//       billetHotsendBase.setNb(Math.random());
        billetHotsendBase.setCastMachine(cast);
        return billetHotsendBase;
    }

+ 2 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/IBilletHotsendBaseService.java

@@ -18,4 +18,6 @@ public interface IBilletHotsendBaseService extends IService<BilletHotsend> {
 	void updateDesc(BilletHotsend billetHotsendVo);
 
     void addOne(BilletHotsend billetHotsend);
+
+    void addHeight(BilletHotsend billetHotsend);
 }

+ 60 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/impl/BilletHotsendBaseServiceImpl.java

@@ -8,6 +8,10 @@ import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
 import org.jeecg.modules.billet.billetHotsend.mapper.BilletHotsendBaseMapper;
 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.rollHeight.entity.RollHeight;
+import org.jeecg.modules.billet.rollHeight.service.IRollHeightService;
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.jeecg.modules.billet.storageBill.entity.StorageBillModel;
 import org.jeecg.modules.billet.storageBill.service.IStorageBillModelService;
@@ -38,7 +42,10 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 	private IStorageBillService storageBillService;
 	@Autowired
 	private IStorageBillModelService storageBillModelService;
-
+	@Autowired
+	private IRollClubOneService rollClubOneService;
+	@Autowired
+	private IRollHeightService rollHeightService;
 
 	@Override
 	public void updateDesc(BilletHotsend billetHotsend) {
@@ -181,6 +188,58 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		storageBillModelService.updateById(storageBillModel);
 		storageBillService.save(storageBill);
 		baseMapper.insert(billetHotsend);
+		RollClubOne rollClubOne = new RollClubOne();
+		rollClubOne.setFurnaceNum(billetHotsend.getFurnaceNum());
+		rollClubOne.setCastMachine(billetHotsend.getCastMachine());
+		rollClubOne.setShift(last.getShift());
+		rollClubOne.setShiftGroup(last.getShiftGroup());
+		rollClubOne.setSize(billetHotsend.getSizeOne());
+		rollClubOne.setSteel(billetHotsend.getSteel());
+		rollClubOne.setSpec(billetHotsend.getSpec());
+		rollClubOne.setAmountTotal(billetHotsend.getAmountTotal());
+		rollClubOne.setCreateDate(new Date());
+		rollClubOneService.save(rollClubOne);
+	}
+
+	@Override
+	public void addHeight(BilletHotsend billetHotsend) {
+		RulerDefaultConfig last = rulerDefaultConfigService.getLast(billetHotsend.getCastMachine());
+		StorageBillModel storageBillModel = storageBillModelService.getOne(new LambdaQueryWrapper<StorageBillModel>().eq(StorageBillModel::getCastMachine,billetHotsend.getCastMachine()));
+		billetHotsend.setAmountTotal(StringUtil.isNullOrEmpty(billetHotsend.getAmountOne())?(StringUtil.isNullOrEmpty(billetHotsend.getAmountHeight())?0:Integer.valueOf(billetHotsend.getAmountHeight())):Integer.valueOf(billetHotsend.getAmountOne()));
+		StorageBill storageBill = new StorageBill();
+		storageBill.setAmountTotal(billetHotsend.getAmountTotal());
+		storageBill.setCastMachine(billetHotsend.getCastMachine());
+		storageBill.setAmountOne(billetHotsend.getAmountTotal());
+		storageBill.setCarNum("辊道");
+		storageBill.setLibrary("2");
+		storageBill.setBtype("0");
+		storageBill.setSize(billetHotsend.getSizeHeight());
+		storageBill.setSpec(billetHotsend.getSpec());
+		if(last!=null){
+			billetHotsend.setFurnaceNum(last.getPourHeats());
+			billetHotsend.setBz("5");
+			billetHotsend.setShift(last.getShift());
+			billetHotsend.setShiftGroup(last.getShiftGroup());
+			storageBill.setShift(last.getShift());
+			storageBill.setShiftGroup(last.getShiftGroup());
+			storageBill.setHeatsOne(last.getPourHeats());
+		}
+		storageBillModel.setAmountTotal(storageBillModel.getAmountTotal()+storageBill.getAmountTotal());
+		storageBillModel.setShiftProduct(storageBillModel.getShiftProduct()+storageBill.getAmountTotal());
+		storageBillModelService.updateById(storageBillModel);
+		storageBillService.save(storageBill);
+		baseMapper.insert(billetHotsend);
+		RollHeight rollHeight = new RollHeight();
+		rollHeight.setFurnaceNum(billetHotsend.getFurnaceNum());
+		rollHeight.setCastMachine(billetHotsend.getCastMachine());
+		rollHeight.setShift(last.getShift());
+		rollHeight.setShiftGroup(last.getShiftGroup());
+		rollHeight.setSize(billetHotsend.getSizeHeight());
+		rollHeight.setSteel(billetHotsend.getSteel());
+		rollHeight.setSpec(billetHotsend.getSpec());
+		rollHeight.setAmountTotal(billetHotsend.getAmountTotal());
+		rollHeight.setCreateDate(new Date());
+		rollHeightService.save(rollHeight);
 	}
 
 

+ 4 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubOne/entity/RollClubOne.java

@@ -81,6 +81,7 @@ public class RollClubOne implements Serializable {
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
     private String spec;
     /**定重*/
     @Excel(name = "定重", width = 15)
@@ -126,9 +127,9 @@ public class RollClubOne implements Serializable {
     @Excel(name = "是否已编辑", width = 15)
     @ApiModelProperty(value = "是否已编辑")
     private Boolean isUpd;
-    /**castMachine*/
-    @Excel(name = "castMachine", width = 15)
-    @ApiModelProperty(value = "castMachine")
+    /**铸机*/
+    @Excel(name = "铸机", width = 15)
+    @ApiModelProperty(value = "铸机")
     private String castMachine;
     /**棒一支数*/
     @Excel(name = "棒一支数", width = 15)

+ 4 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubThree/entity/RollClubThree.java

@@ -81,6 +81,7 @@ public class RollClubThree implements Serializable {
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
     private String spec;
     /**定重*/
     @Excel(name = "定重", width = 15)
@@ -126,9 +127,9 @@ public class RollClubThree implements Serializable {
     @Excel(name = "是否已编辑", width = 15)
     @ApiModelProperty(value = "是否已编辑")
     private Boolean isUpd;
-    /**castMachine*/
-    @Excel(name = "castMachine", width = 15)
-    @ApiModelProperty(value = "castMachine")
+    /**铸机*/
+    @Excel(name = "铸机", width = 15)
+    @ApiModelProperty(value = "铸机")
     private String castMachine;
     /**棒一支数*/
     @Excel(name = "棒一支数", width = 15)

+ 4 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubTwo/entity/RollClubTwo.java

@@ -81,6 +81,7 @@ public class RollClubTwo implements Serializable {
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
     private String spec;
     /**定重*/
     @Excel(name = "定重", width = 15)
@@ -126,9 +127,9 @@ public class RollClubTwo implements Serializable {
     @Excel(name = "是否已编辑", width = 15)
     @ApiModelProperty(value = "是否已编辑")
     private Boolean isUpd;
-    /**castMachine*/
-    @Excel(name = "castMachine", width = 15)
-    @ApiModelProperty(value = "castMachine")
+    /**铸机*/
+    @Excel(name = "铸机", width = 15)
+    @ApiModelProperty(value = "铸机")
     private String castMachine;
     /**棒一支数*/
     @Excel(name = "棒一支数", width = 15)

+ 4 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/entity/RollHeight.java

@@ -81,6 +81,7 @@ public class RollHeight implements Serializable {
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
     private String spec;
     /**定重*/
     @Excel(name = "定重", width = 15)
@@ -126,9 +127,9 @@ public class RollHeight implements Serializable {
     @Excel(name = "是否已编辑", width = 15)
     @ApiModelProperty(value = "是否已编辑")
     private Boolean isUpd;
-    /**castMachine*/
-    @Excel(name = "castMachine", width = 15)
-    @ApiModelProperty(value = "castMachine")
+    /**铸机*/
+    @Excel(name = "铸机", width = 15)
+    @ApiModelProperty(value = "铸机")
     private String castMachine;
     /**棒一支数*/
     @Excel(name = "棒一支数", width = 15)

+ 4 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollOutShipp/entity/RollOutShipp.java

@@ -81,6 +81,7 @@ public class RollOutShipp implements Serializable {
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
     private String spec;
     /**定重*/
     @Excel(name = "定重", width = 15)
@@ -126,9 +127,9 @@ public class RollOutShipp implements Serializable {
     @Excel(name = "是否已编辑", width = 15)
     @ApiModelProperty(value = "是否已编辑")
     private Boolean isUpd;
-    /**castMachine*/
-    @Excel(name = "castMachine", width = 15)
-    @ApiModelProperty(value = "castMachine")
+    /**铸机*/
+    @Excel(name = "铸机", width = 15)
+    @ApiModelProperty(value = "铸机")
     private String castMachine;
     /**棒一支数*/
     @Excel(name = "棒一支数", width = 15)

+ 93 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/service/impl/StackingAndLoadingVehiclesServiceImpl.java

@@ -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;
+            }
+        }
+    }
+
 }

+ 22 - 0
zgztBus/钢坯业务.md

@@ -0,0 +1,22 @@
+**钢坯业务流程**
+
+新增棒一  只发生在五号铸机 ,钢坯直接切割完成后直接通过热送辊道棒一运输至轧钢棒一,生成钢坯热送单炉支数传递单、钢坯装运单以及轧钢棒一记录,该记录会根据炉次、钢种、规格、定尺、热冷坯类型来决定生成几条记录,热冷坯类型则通过距离钢坯生产时间是否超过30分种来决定,超过则为冷坯,否则为热坯,热坯步骤字段为热送,冷坯为冷送
+
+新增高线  只发生在六号铸机,分为两种情况,一种未经过堆垛,由高线直接运输,一种则是运输堆垛上的钢坯,同样生成钢坯热送单炉支数传递单、钢坯装运单以及轧钢高线记录,规则照上
+
+垛位装车  钢坯通过行车(天车)放置在车辆上,钢坯可能来自堆垛,也可能是切割后直接装车,点击发车后生成钢坯热送单炉支数传递单、钢坯装运单以及轧钢(棒二、棒三、外运,根据目的地来定)记录,规则照上,但热坯步骤字段为热装,冷坯为冷装
+
+堆垛起垛按钮   在堆垛界面选择一个或多个位置后点击起垛可以将钢坯放置该位置,一个位置为四根钢坯,生成一条钢坯热送单炉支数传递单记录,同样根据炉次、钢种、规格、定尺来决定生成几条记录,步骤为起垛
+
+堆垛删除按钮   在堆垛界面选择一个或多个位置后点击起垛可以将钢坯移除该位置,生成一条钢坯热送单炉支数传递单记录,同样根据炉次、钢种、规格、定尺来决定生成几条记录,步骤为删除
+
+堆垛保存按钮   修改堆垛上钢坯的炉次、钢种、规格、定尺后点击保存至数据库
+
+堆垛发车按钮  选中钢坯后点击发车,则将选中钢坯放置车位上的车辆中,并将所在堆垛、堆垛位置保存至stackAddr字段中用于垛位装车中的返回按钮逻辑
+
+垛位装车返回按钮  选中钢坯后点击返回,则将选中钢坯放置在堆垛上,堆垛位置则根据堆垛发车时的stackaddr字段来获取
+
+垛位装车删除、保存逻辑同堆垛一致
+
+注意事项:5号机对应501堆垛     6号机对应601、602、604以及步进冷床
+