|
|
|
@ -93,6 +93,8 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
|
|
|
|
|
private IBasicdataWarehouseService basicdataWarehouseService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Long ids; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -331,7 +333,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public R insertallocation(BasicdataGoodsShelfDTO basicdataGoodsShelfDTO) { |
|
|
|
|
//这里需要根据货架的列数和层数进行货位信息的生成
|
|
|
|
|
Integer rowNum = basicdataGoodsShelfDTO.getRowNum();//列
|
|
|
|
|
Integer rowNum = basicdataGoodsShelfDTO.getRowNum();//列
|
|
|
|
|
log.info("列>>>>>>>>>>{}", rowNum); |
|
|
|
|
Integer storeyNum = basicdataGoodsShelfDTO.getStoreyNum();//行
|
|
|
|
|
log.info("行>>>>>>>>>>{}", storeyNum); |
|
|
|
@ -349,6 +351,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
.eq(BasicdataGoodsAllocationEntity::getIsDeleted, 0) |
|
|
|
|
.eq(BasicdataGoodsAllocationEntity::getGoodsShelfId, basicdataGoodsShelfDTO.getId()) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (basicdataGoodsAllocationEntities.size() <= 0) { |
|
|
|
|
ArrayList<BasicdataGoodsAllocationEntity> arrayList = new ArrayList<>(); |
|
|
|
|
for (Integer i = 0; i < rowNum; i++) { |
|
|
|
@ -366,6 +369,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(layer + "-" + row); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
String code = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "5"); |
|
|
|
|
String allocationCode = basicdataGoodsShelfDTO.getGoodsShelfName()+"-" + basicdataGoodsAllocationEntity.getColumnNum() + "-" + basicdataGoodsAllocationEntity.getLayerNum() ; |
|
|
|
|
basicdataGoodsAllocationEntity.setQrCode(allocationCode); |
|
|
|
|
// basicdataGoodsAllocationEntity.setAllocationStatuc("1");
|
|
|
|
|
// basicdataGoodsAllocationEntity.setEnableStatus("1");
|
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
@ -433,6 +439,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + k); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
// String code = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "5");
|
|
|
|
|
String allocationCode = basicdataGoodsShelfDTO.getGoodsShelfName()+"-" + basicdataGoodsAllocationEntity.getColumnNum() + "-" + basicdataGoodsAllocationEntity.getLayerNum() ; |
|
|
|
|
basicdataGoodsAllocationEntity.setQrCode(allocationCode); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -475,6 +484,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(i + "-" + k); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
// String code = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "5");
|
|
|
|
|
String allocationCode = basicdataGoodsShelfDTO.getGoodsShelfName()+"-" + basicdataGoodsAllocationEntity.getColumnNum() + "-" + basicdataGoodsAllocationEntity.getLayerNum() ; |
|
|
|
|
basicdataGoodsAllocationEntity.setQrCode(allocationCode); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -523,6 +535,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + i); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
// String code = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "5");
|
|
|
|
|
String allocationCode = basicdataGoodsShelfDTO.getGoodsShelfName()+"-" + basicdataGoodsAllocationEntity.getColumnNum() + "-" + basicdataGoodsAllocationEntity.getLayerNum() ; |
|
|
|
|
basicdataGoodsAllocationEntity.setQrCode(allocationCode); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -619,6 +634,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + i); |
|
|
|
|
// String code = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "5");
|
|
|
|
|
String allocationCode = basicdataGoodsShelfDTO.getGoodsShelfName()+"-" + basicdataGoodsAllocationEntity.getColumnNum() + "-" + basicdataGoodsAllocationEntity.getLayerNum() ; |
|
|
|
|
basicdataGoodsAllocationEntity.setQrCode(allocationCode); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|