|
|
|
@ -39,6 +39,7 @@ import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.log4j.Log4j; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
import org.springblade.common.utils.FileUtil; |
|
|
|
|
import org.springblade.common.utils.QRCodeUtil; |
|
|
|
|
import org.springblade.common.utils.TemplateUtil; |
|
|
|
@ -154,6 +155,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
log.info("当前登陆人>>>>>>>>>>>>{}",user); |
|
|
|
|
String shelfCode =basicdataGoodsShelfDTO.getGoodsAreaName(); |
|
|
|
|
basicdataGoodsShelfEntity.setQrCode(shelfCode); |
|
|
|
|
basicdataGoodsShelfEntity.setWarehouseId(1687637854291722242L); |
|
|
|
|
result = this.save(basicdataGoodsShelfEntity); |
|
|
|
|
//这里需要根据货架的列数和层数进行货位信息的生成
|
|
|
|
|
// Integer rowNum = basicdataGoodsShelfEntity.getRowNum();
|
|
|
|
@ -320,6 +322,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
log.info("列>>>>>>>>>>{}",rowNum); |
|
|
|
|
Integer storeyNum = basicdataGoodsShelfDTO.getStoreyNum();//行
|
|
|
|
|
log.info("行>>>>>>>>>>{}",storeyNum); |
|
|
|
|
Long ck = 1687637854291722242l; |
|
|
|
|
//查询租户对应的库位码前缀规则
|
|
|
|
|
// String allocationCode = basicTenantCodeClient.shelfCode(user.getTenantId(),"5");
|
|
|
|
|
//判断新增货位
|
|
|
|
@ -343,6 +346,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName( layer+ "-" + row); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
// basicdataGoodsAllocationEntity.setAllocationStatuc("1");
|
|
|
|
|
// basicdataGoodsAllocationEntity.setEnableStatus("1");
|
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
@ -394,6 +398,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + k); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -408,6 +413,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + k); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -448,6 +454,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(i + "-" + k); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -494,6 +501,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + i); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -586,6 +594,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAreaId(basicdataGoodsShelfDTO.getGoodsAreaId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsShelfId(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
basicdataGoodsAllocationEntity.setGoodsAllocationName(z + "-" + i); |
|
|
|
|
basicdataGoodsAllocationEntity.setWarehouseId(ck); |
|
|
|
|
arrayList.add(basicdataGoodsAllocationEntity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -603,7 +612,8 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static Integer getLayerNum(List<BasicdataGoodsAllocationEntity> products, String ColumnNum) { |
|
|
|
|
@NotNull |
|
|
|
|
static Integer getLayerNum(@NotNull List<BasicdataGoodsAllocationEntity> products, String ColumnNum) { |
|
|
|
|
return products.stream() |
|
|
|
|
.filter(e -> e.getColumnNum().equals(ColumnNum)) |
|
|
|
|
.mapToInt(BasicdataGoodsAllocationEntity::getLayerNum) |
|
|
|
|