SnowflakeIdWorker3rd逻辑还原

This commit is contained in:
gaoqr
2026-08-13 20:07:04 +08:00
parent 42777bc7cd
commit e2fe663ffa
9 changed files with 12 additions and 9 deletions
@@ -569,6 +569,8 @@ public class PlateServiceImpl implements PlateService {
Map<Long, OrderPlanPlateNumAndAreaRespVO> orderGoodsPlanPlateNumAndAreaRespVOMap = new HashMap<>();
Long organId = getUserOrganId();
// 组装新增数据
reqVO.forEach(f -> {
@@ -585,7 +587,7 @@ public class PlateServiceImpl implements PlateService {
// 生成板编号
long obtainingTime = idWorker.obtainingTime();
String plateNo = "1" + obtainingTime + Long.toString(idWorker.nextId()).substring(2);
String plateNo = String.valueOf(organId) + obtainingTime + Long.toString(idWorker.nextId()).substring(2);
String remake1 = f.getRemake1() == null ? "" : f.getRemake1() + ";";
@@ -602,6 +604,7 @@ public class PlateServiceImpl implements PlateService {
plateDOS.add(PlateDO.builder()
.id(plateId)
.orderId(orderId)
.organId(organId)
.name(f.getName())
.plateNo(plateNo)
.type(OrderPlateTypeEnum.SELFINCREASINGBOARD.getType())
@@ -984,7 +984,7 @@ public class ApiTypeRealize {
.id(plateId)
.orderId(orderId)
.name(plate.getString(ProduceApiConstants.BD_BOARD_NAME))
.plateNo("1" + obtainingTime + Long.toString(plateNo).substring(2))
.plateNo(String.valueOf(organId) + obtainingTime + Long.toString(plateNo).substring(2))
.type(type)
.goodsId(plate.getLong(ProduceApiConstants.BD_GOODS_ID))
.splitHeight(BigDecimal.valueOf(plate.getDouble(ProduceApiConstants.BD_SPLIT_HEIGHT)))
@@ -293,7 +293,7 @@ public class ExcelTypeRealize {
.plateNo(combination.getPlateNo())
.goodsId(combination.getGoodId())
.width(BigDecimal.valueOf(Double.parseDouble(combination.getWidth())))
.plateNo("1" + obtainingTime + Long.toString(plateNo).substring(2))
.plateNo(String.valueOf(organId) + obtainingTime + Long.toString(plateNo).substring(2))
.height(BigDecimal.valueOf(Double.parseDouble(combination.getHeight())))
.thickness(BigDecimal.valueOf(Double.parseDouble(combination.getThickness())))
.splitWidth(BigDecimal.valueOf(Double.parseDouble(combination.getSplitWidth())))
@@ -865,7 +865,7 @@ public class XmlTypeRealize {
.organId(organId)
.orderId(orderId)
.name(blockXmlVO.getName())
.plateNo("1" + obtainingTime + Long.toString(plateNo).substring(2))
.plateNo(String.valueOf(organId) + obtainingTime + Long.toString(plateNo).substring(2))
.type(plateType)
.goodsId(goodsId)
.width(BigDecimal.valueOf(Double.parseDouble(blockXmlVO.getWidth())))