|
|
|
@ -28,14 +28,8 @@ import com.logpm.basic.entity.BasicMaterialEntity;
|
|
|
|
|
import com.logpm.basic.entity.BasicPrintTemplateEntity; |
|
|
|
|
import com.logpm.basic.feign.IBasicMaterialClient; |
|
|
|
|
import com.logpm.basic.feign.IBasicPrintTemplateClient; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataClientEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStoreBrandEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataTrayEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataClientClient; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataStoreBrandClient; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataTrayClient; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
|
import com.logpm.basicdata.entity.*; |
|
|
|
|
import com.logpm.basicdata.feign.*; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockListEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockListInfoEntity; |
|
|
|
|
import com.logpm.distribution.feign.IDistributionStockListClient; |
|
|
|
@ -45,11 +39,13 @@ import com.logpm.distribution.vo.print.PrintPreviewVO;
|
|
|
|
|
import com.logpm.warehouse.dto.NoDataStockListDTO; |
|
|
|
|
import com.logpm.warehouse.dto.UpShelfStockDTO; |
|
|
|
|
import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseConfigEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWarehousingDetailEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; |
|
|
|
|
import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel; |
|
|
|
|
import com.logpm.warehouse.excel.WarehousingEntryDetailExcel; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseConfigClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient; |
|
|
|
|
import com.logpm.warehouse.mapper.WarehouseWarehousingEntryMapper; |
|
|
|
|
import com.logpm.warehouse.service.IWarehouseTrayTypeService; |
|
|
|
@ -61,6 +57,7 @@ import lombok.AllArgsConstructor;
|
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
import org.springblade.common.constant.DistributionTypeConstant; |
|
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
|
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.TemplateUtil; |
|
|
|
@ -109,6 +106,8 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
|
|
|
|
|
private final IWarehouseTrayTypeService warehouseTrayTypeService; |
|
|
|
|
private final IBasicPrintTemplateClient basicPrintTemplateClient; |
|
|
|
|
private final IUserClient userClient; |
|
|
|
|
private final IWarehouseConfigClient warehouseConfigClient; |
|
|
|
|
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -522,11 +521,6 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
|
|
|
|
|
R<List<DictBiz>> distriType = dictBizClient.getList("distribution_type"); |
|
|
|
|
if (ObjectUtils.isNotNull(distriType)) { |
|
|
|
|
List<DictBiz> data1 = distriType.getData(); |
|
|
|
|
// data1.forEach( a ->{
|
|
|
|
|
// if(o.getServiceType().equals(a.getDictValue())){
|
|
|
|
|
// entryEntity.setServiceType(a.getDictKey()); //仓库名称
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
DictBiz dictBiz = data1.stream().filter(da -> { |
|
|
|
|
return o.getServiceType().equals(da.getDictValue()); |
|
|
|
|
}).findAny().get(); |
|
|
|
@ -544,6 +538,28 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
|
|
|
|
|
// System.out.println(">>>>>>>>>>>+++++"+k+v);
|
|
|
|
|
WarehouseWarehousingEntryEntity entryEntity = JSON.parseObject(k, WarehouseWarehousingEntryEntity.class); |
|
|
|
|
// WarehouseWarehousingEntryEntity entryEntity = JSONObject.parseObject(JSONObject.toJSONString(k), WarehouseWarehousingEntryEntity.class);
|
|
|
|
|
|
|
|
|
|
Integer isAutoWarehouse; |
|
|
|
|
if (!Objects.isNull(entryEntity.getWarehouseId())){ |
|
|
|
|
//查询是否开启自动上架配置
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(entryEntity.getWarehouseId()); |
|
|
|
|
if (!Objects.isNull(warehouseConfig)){ |
|
|
|
|
isAutoWarehouse = warehouseConfig.getIsAutoWarehouse() != null ? warehouseConfig.getIsAutoWarehouse() : 0; |
|
|
|
|
} else { |
|
|
|
|
isAutoWarehouse = 0; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
isAutoWarehouse = 0; |
|
|
|
|
} |
|
|
|
|
if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == isAutoWarehouse){ |
|
|
|
|
//查询默认备货库位
|
|
|
|
|
BasicdataGoodsAllocationEntity defaultGoodsAllocation = basicdataGoodsAllocationClient.findDefaultGoodsAllocation(entryEntity.getWarehouseId()); |
|
|
|
|
if (!Objects.isNull(defaultGoodsAllocation)){ |
|
|
|
|
if (Objects.isNull(entryEntity.getPositions())){ |
|
|
|
|
entryEntity.setPositions(defaultGoodsAllocation.getQrCode()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.save(entryEntity); |
|
|
|
|
List<WarehouseWarehousingDetailEntity> detailEntityList = new ArrayList<>(); |
|
|
|
|
v.forEach(i -> { |
|
|
|
@ -580,6 +596,16 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
|
|
|
|
|
detail.setTrayName(basicdataTrayEntity.getPalletName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == isAutoWarehouse){ |
|
|
|
|
//库位
|
|
|
|
|
WarehouseGoodsAllocationEntity warehouseGoodsAllocationEntity = warehouseGoodsAllocationClient.findByAllocationQrCode(entryEntity.getPositions()); |
|
|
|
|
if (Func.isNotEmpty(warehouseGoodsAllocationEntity)) { |
|
|
|
|
detail.setLoadingType(1); |
|
|
|
|
detail.setAllocationId(warehouseGoodsAllocationEntity.getId()); |
|
|
|
|
detail.setAllocationName(warehouseGoodsAllocationEntity.getQrCode()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//品牌
|
|
|
|
|
BasicdataStoreBrandEntity brandList = basicdataStoreBrandClient.getBrandList(entryEntity.getClientId(), i.getBrandName()); |
|
|
|
|