Browse Source

调整 棒线 定尺

guoqiang 6 months ago
parent
commit
c85a7a81a2

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

@@ -352,7 +352,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			baseMapper.insert(billetHotsend);
 			billetHotsend.setId(billetHotsend.getId());
 			operateLogService.add(billetHotsend,null,BilletHotsend.class);
-			result.put("success", "新增钢坯热送成功!");
+			result.put("success", "新增钢坯热送成功!");
 			return result;
 		}else {
 			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
@@ -406,7 +406,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒一信息
 			RollClubOne rollClubOne = new RollClubOne();
 			BeanUtils.copyProperties(billetHotsend, rollClubOne);
-			rollClubOne.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubOne.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubOne.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubOne.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubOne.setBlankOutput();// 出坯量
 //			rollClubOne.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollClubOne> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -416,6 +418,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubOne::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubOne rollClubOne1 = rollClubOneService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubOne1)){
+				rollClubOne.setCreateDate(new Date());
 				rollClubOne.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubOneService.save(rollClubOne);
 			}else {
@@ -444,7 +447,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒一信息
 			RollClubTwo rollClubTwo = new RollClubTwo();
 			BeanUtils.copyProperties(billetHotsend, rollClubTwo);
-			rollClubTwo.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubTwo.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubTwo.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubTwo.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubTwo.setBlankOutput();// 出坯量
 //			rollClubTwo.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollClubTwo> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -454,6 +459,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubTwo::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubTwo rollClubTwo1 = rollClubTwoService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubTwo1)){
+				rollClubTwo.setCreateDate(new Date());
 				rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubTwoService.save(rollClubTwo);
 			}else {
@@ -485,7 +491,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			RollClubThree rollClubThree = new RollClubThree();
 			BeanUtils.copyProperties(billetHotsend, rollClubThree);
 
-			rollClubThree.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubThree.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubThree.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubThree.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
 
@@ -496,6 +504,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubThree::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubThree rollClubThree1 = rollClubThreeService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubThree1)){
+				rollClubThree.setCreateDate(new Date());
 				rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubThreeService.save(rollClubThree);
 			}else {
@@ -528,7 +537,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable())){
 			RollHeight rollHeight = new RollHeight();
 			BeanUtils.copyProperties(billetHotsend, rollHeight);
-			rollHeight.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollHeight.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollHeight.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollHeight.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollHeight> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -538,6 +549,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollHeight::getShiftGroup, billetHotsend.getShiftGroup());
 			RollHeight rollHeight1 = rollHeightService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollHeight1)){
+				rollHeight.setCreateDate(new Date());
 				rollHeight.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollHeightService.save(rollHeight);
 			}else {
@@ -569,7 +581,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			RollOutShipp rollOutShipp = new RollOutShipp();
 			BeanUtils.copyProperties(billetHotsend, rollOutShipp);
 
-			rollOutShipp.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollOutShipp.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollOutShipp.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollOutShipp.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollOutShipp.setBlankOutput();// 出坯量
 //			rollOutShipp.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollOutShipp> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -579,6 +593,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollOutShipp::getShiftGroup, billetHotsend.getShiftGroup());
 			RollOutShipp rollOutShipp1 = rollOutShippService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollOutShipp1)){
+				rollOutShipp.setCreateDate(new Date());
 				rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollOutShippService.save(rollOutShipp);
 			}else {
@@ -778,7 +793,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒一信息
 			RollClubOne rollClubOne = new RollClubOne();
 			BeanUtils.copyProperties(billetHotsend, rollClubOne);
-			rollClubOne.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubOne.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubOne.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubOne.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 			LambdaQueryWrapper<RollClubOne> queryWrapper1 = new LambdaQueryWrapper<>();
 			queryWrapper1.eq(RollClubOne::getCcmNo, billetHotsend.getCcmNo())
 					.eq(RollClubOne::getHeatNo, billetHotsend.getHeatNo())
@@ -786,6 +803,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubOne::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubOne rollClubOne1 = rollClubOneService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubOne1)){
+				rollClubOne.setCreateDate(new Date());
 				rollClubOne.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubOneService.save(rollClubOne);
 			}else {
@@ -814,7 +832,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒二信息
 			RollClubTwo rollClubTwo = new RollClubTwo();
 			BeanUtils.copyProperties(billetHotsend, rollClubTwo);
-			rollClubTwo.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubTwo.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubTwo.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubTwo.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubTwo.setBlankOutput();// 出坯量
 //			rollClubTwo.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollClubTwo> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -824,6 +844,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubTwo::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubTwo rollClubTwo1 = rollClubTwoService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubTwo1)){
+				rollClubTwo.setCreateDate(new Date());
 				rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubTwoService.save(rollClubTwo);
 			}else {
@@ -854,7 +875,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			RollClubThree rollClubThree = new RollClubThree();
 			BeanUtils.copyProperties(billetHotsend, rollClubThree);
 
-			rollClubThree.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollClubThree.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollClubThree.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollClubThree.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
 
@@ -865,6 +888,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollClubThree::getShiftGroup, billetHotsend.getShiftGroup());
 			RollClubThree rollClubThree1 = rollClubThreeService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollClubThree1)){
+				rollClubThree.setCreateDate(new Date());
 				rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollClubThreeService.save(rollClubThree);
 			}else {
@@ -896,7 +920,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable())){
 			RollHeight rollHeight = new RollHeight();
 			BeanUtils.copyProperties(billetHotsend, rollHeight);
-			rollHeight.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollHeight.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollHeight.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollHeight.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollHeight> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -906,6 +932,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollHeight::getShiftGroup, billetHotsend.getShiftGroup());
 			RollHeight rollHeight1 = rollHeightService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollHeight1)){
+				rollHeight.setCreateDate(new Date());
 				rollHeight.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollHeightService.save(rollHeight);
 			}else {
@@ -936,7 +963,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
 			RollOutShipp rollOutShipp = new RollOutShipp();
 			BeanUtils.copyProperties(billetHotsend, rollOutShipp);
-			rollOutShipp.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+			rollOutShipp.setSize(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getLength())); //定尺
+			rollOutShipp.setSteel(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getGrade())); //钢种
+			rollOutShipp.setSpec(String.valueOf(rollClubCommonList.stream().findFirst().orElse(null).getSpec())); //规格
 //			rollOutShipp.setBlankOutput();// 出坯量
 //			rollOutShipp.setDecideWeight();// 定重
 			LambdaQueryWrapper<RollOutShipp> queryWrapper1 = new LambdaQueryWrapper<>();
@@ -946,6 +975,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(RollOutShipp::getShiftGroup, billetHotsend.getShiftGroup());
 			RollOutShipp rollOutShipp1 = rollOutShippService.getOne(queryWrapper1);
 			if (oConvertUtils.isEmpty(rollOutShipp1)){
+				rollOutShipp.setCreateDate(new Date());
 				rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
 				rollOutShippService.save(rollOutShipp);
 			}else {