Browse Source

Merge remote-tracking branch 'origin/dev' into pre-production

visual
汤建军 3 months ago
parent
commit
71099b6f1f
  1. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java
  2. 33
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataGoodsAllocationClient.java
  3. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java
  4. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java
  5. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java
  6. 28
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataGoodsAllocationClient.java
  7. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml
  8. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java
  9. 58
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java
  10. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  12. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java
  13. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java
  14. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseConfigService.java
  15. 39
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java
  16. 52
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

5
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataGoodsAllocationEntity.java

@ -129,6 +129,11 @@ public class BasicdataGoodsAllocationEntity extends TenantEntity {
*/
@ApiModelProperty(value = "旧库位码")
private String oldQrCode;
/**
* 旧库位码
*/
@ApiModelProperty(value = "旧库位码")
private Integer isDefault;

33
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataGoodsAllocationClient.java

@ -75,4 +75,37 @@ public interface IBasicdataGoodsAllocationClient {
@PostMapping(API_PREFIX+"/updateListAllocationStatus")
void updateListAllocationStatus(@RequestParam List<Long> updateAllocationIds, @RequestParam String allocationStatus);
/**
* 查询默认库位
* @param warehouseId
* @return
*/
@GetMapping(API_PREFIX+"/findDefaultGoodsAllocation")
BasicdataGoodsAllocationEntity findDefaultGoodsAllocation(@RequestParam Long warehouseId);
/**
* 通过QRCode查询库位
* @param warehouseId
* @param defaultAllocation
* @return
*/
@GetMapping(API_PREFIX+"/findEntityByQrCode")
BasicdataGoodsAllocationEntity findEntityByQrCode(@RequestParam Long warehouseId,@RequestParam String defaultAllocation);
/**
* 开启默认库位
* @param id
* @return
*/
@GetMapping(API_PREFIX+"/openDefaultAllocation")
boolean openDefaultAllocation(@RequestParam Long id);
/**
* 关闭默认库位
* @param warehouseId
* @return
*/
@GetMapping(API_PREFIX+"/closeDefaultAllocation")
boolean closeDefaultAllocation(@RequestParam Long id);
}

12
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java

@ -33,6 +33,18 @@ public class WarehouseConfigEntity extends TenantEntity {
@ApiModelProperty(value = "是否自动释放")
private Integer isAutoRelease;
/**
* 库存品是否自动上架
*/
@ApiModelProperty(value = "库存品是否自动上架")
private Integer isAutoWarehouse;
/**
* 默认库位
*/
@ApiModelProperty(value = "默认库位")
private String defaultAllocation;
/**
* 预留1
*/

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java

@ -64,4 +64,5 @@ public interface IWarehouseGoodsAllocationClient {
@GetMapping(TOP+ "/findByAllocationQrCode")
WarehouseGoodsAllocationEntity findByAllocationQrCode(@RequestParam String positions);
}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java

@ -126,6 +126,16 @@ public class BasicdataGoodsAllocationController extends BladeController {
return R.status(basicdataGoodsAllocationService.updateGoodsAllocation(basicdataGoodsAllocationDto));
}
/**
* 货位 修改
*/
@PostMapping("/updateDefault")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入BasicdataGoodsAllocation")
public R updateDefault(@Valid @RequestBody BasicdataGoodsAllocationDTO basicdataGoodsAllocationDto) {
return basicdataGoodsAllocationService.updateDefaultGoodsAllocation(basicdataGoodsAllocationDto);
}
/**
* 货位 新增或修改
*/

28
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataGoodsAllocationClient.java

@ -19,9 +19,11 @@ package com.logpm.basicdata.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity;
import com.logpm.basicdata.service.IBasicdataGoodsAllocationService;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -122,4 +124,30 @@ public class BasicdataGoodsAllocationClient implements IBasicdataGoodsAllocation
BasicdataGoodsAllocationService.update(updateWrapper);
}
@Override
public BasicdataGoodsAllocationEntity findDefaultGoodsAllocation(Long warehouseId) {
return BasicdataGoodsAllocationService.getOne(Wrappers.<BasicdataGoodsAllocationEntity>query().lambda()
.eq(BasicdataGoodsAllocationEntity::getWarehouseId,warehouseId)
.eq(BasicdataGoodsAllocationEntity::getIsDefault, Integer.parseInt(IsOrNoConstant.yes.getValue()))
);
}
@Override
public BasicdataGoodsAllocationEntity findEntityByQrCode(Long warehouseId, String defaultAllocation) {
return BasicdataGoodsAllocationService.getOne(Wrappers.<BasicdataGoodsAllocationEntity>query().lambda()
.eq(BasicdataGoodsAllocationEntity::getWarehouseId,warehouseId)
.eq(BasicdataGoodsAllocationEntity::getQrCode, defaultAllocation)
);
}
@Override
public boolean openDefaultAllocation(Long id) {
return BasicdataGoodsAllocationService.openDefaultAllocation(id);
}
@Override
public boolean closeDefaultAllocation(Long id) {
return BasicdataGoodsAllocationService.closeDefaultAllocation(id);
}
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml

@ -99,6 +99,7 @@
goods_area.headline AS goodsAreaName,
warehouse.name AS warehouseName,
goods_area.area_type AS area_type,
goods_allocation.is_default,
CASE goods_area.area_type
WHEN 1 THEN '备货库位'
WHEN 2 THEN '存储库位'

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java

@ -131,4 +131,25 @@ public interface IBasicdataGoodsAllocationService extends BaseService<BasicdataG
* @return
*/
BasicdataGoodsAllocationEntity findStockUpAllocationById(Long warehouseId, Long stockUpAllocationId);
/**
* 修改默认库位
* @param basicdataGoodsAllocationDto
* @return
*/
R updateDefaultGoodsAllocation(BasicdataGoodsAllocationDTO basicdataGoodsAllocationDto);
/**
* 开启默认库位
* @param id
* @return
*/
boolean openDefaultAllocation(Long id);
/**
* 关闭默认库位
* @param id
* @return
*/
boolean closeDefaultAllocation(Long id);
}

58
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java

@ -38,9 +38,12 @@ import com.logpm.basicdata.vo.BasicdataGoodsAllocationVO;
import com.logpm.basicdata.vo.BasicdataNodeVO;
import com.logpm.basicdata.vo.FreightSpaceVO;
import com.logpm.basicdata.vo.WarehouseAllocationInfoVO;
import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.feign.IWarehouseConfigClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
@ -88,6 +91,8 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl<Basicda
private final BladeRedis bladeRedis;
private final IWarehouseConfigClient warehouseConfigClient;
@Override
public IPage<BasicdataGoodsAllocationVO> selectBasicdataGoodsAllocationPage(IPage<BasicdataGoodsAllocationVO> page, BasicdataGoodsAllocationVO BasicdataGoodsAllocation) {
@ -372,4 +377,57 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl<Basicda
return baseMapper.findStockUpAllocationById(warehouseId,stockUpAllocationId);
}
@Override
public R updateDefaultGoodsAllocation(BasicdataGoodsAllocationDTO basicdataGoodsAllocationDto) {
if (Objects.isNull(basicdataGoodsAllocationDto.getIsDefault())){
return R.fail("缺少必要参数IsDefault");
}
if (Objects.isNull(basicdataGoodsAllocationDto.getId())){
return R.fail("缺少必要参数Id");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)){
return R.fail(403,"未授权!!!");
}
Integer isDefault = basicdataGoodsAllocationDto.getIsDefault();
Long goodsAllocationDtoId = basicdataGoodsAllocationDto.getId();
if (Integer.parseInt(IsOrNoConstant.no.getValue()) == isDefault){
//此时检验是否开启了默认入库
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(myCurrentWarehouse.getId());
int a = warehouseConfig.getIsAutoWarehouse() != null ? warehouseConfig.getIsAutoWarehouse() : 0;
if ( Integer.parseInt(IsOrNoConstant.yes.getValue()) == a ){
//开启自动入库必须开启一个默认库位
return R.fail("自动入库开启必须开启默认库位");
}
}
BasicdataGoodsAllocationEntity basicdataGoodsAllocationEntity = new BasicdataGoodsAllocationEntity();
basicdataGoodsAllocationEntity.setId(goodsAllocationDtoId);
basicdataGoodsAllocationEntity.setIsDefault(isDefault);
//开启默认库位先进行所有的默认库位关闭
this.update(Wrappers.<BasicdataGoodsAllocationEntity>update().lambda()
.eq(BasicdataGoodsAllocationEntity::getWarehouseId,myCurrentWarehouse.getId())
.ne(BasicdataGoodsAllocationEntity::getId,goodsAllocationDtoId)
.set(BasicdataGoodsAllocationEntity::getIsDefault,Integer.parseInt(IsOrNoConstant.no.getValue()))
);
return R.status(this.updateById(basicdataGoodsAllocationEntity));
}
@Override
public boolean openDefaultAllocation(Long id) {
BasicdataGoodsAllocationDTO basicdataGoodsAllocationDTO = new BasicdataGoodsAllocationDTO();
basicdataGoodsAllocationDTO.setId(id);
basicdataGoodsAllocationDTO.setIsDefault(Integer.parseInt(IsOrNoConstant.yes.getValue()));
R r = this.updateDefaultGoodsAllocation(basicdataGoodsAllocationDTO);
return r.isSuccess();
}
@Override
public boolean closeDefaultAllocation(Long id) {
BasicdataGoodsAllocationDTO basicdataGoodsAllocationDTO = new BasicdataGoodsAllocationDTO();
basicdataGoodsAllocationDTO.setId(id);
basicdataGoodsAllocationDTO.setIsDefault(Integer.parseInt(IsOrNoConstant.no.getValue()));
R r = this.updateDefaultGoodsAllocation(basicdataGoodsAllocationDTO);
return r.isSuccess();
}
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -987,11 +987,11 @@
#{wIitem}
</foreach>
</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and ldpl.waybill_number =
#{param.waybillNumber}
<if test="param.waybillNumber != null and param.waybillNumber != ''">and ldpl.waybill_number LIKE CONCAT('%',#{param.waybillNumber},'%')
</if>
<if test="param.orderCode != null and param.orderCode != ''">and ldsa.order_code = #{param.orderCode}</if>
<if test="param.mallName != null and param.mallName != ''">and ldsa.mall_name = #{param.mallName}</if>
<if test="param.orderCode != null and param.orderCode != ''">and ldsa.order_code LIKE CONCAT('%',#{param.orderCode},'%') </if>
<if test="param.mallName != null and param.mallName != ''">and ldsa.mall_name LIKE CONCAT('%',#{param.mallName},'%') </if>
<if test="param.typeService != null and param.typeService != ''">and ldsa.type_service =
#{param.typeService}
</if>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -470,10 +470,12 @@
<where>
lad.is_deleted = 0
and lad.warehouse_id = #{param.warehouseId}
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">and lad.pick_up_time between
#{param.pickUpTimeStart} and #{param.pickUpTimeEnd}
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">
AND DATE_FORMAT(lad.pick_up_time,'%y%m%d') between
DATE_FORMAT(#{param.pickUpTimeStart},'%y%m%d') and DATE_FORMAT(#{param.pickUpTimeEnd},'%y%m%d')
</if>
<if test="param.conditions != null and param.conditions == 10" >and lad.conditions in (10,20)</if>
<if test="param.conditions != null and param.conditions == 10" >
and lad.conditions in (10,20)</if>
</where>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java

@ -97,7 +97,9 @@ public class WarehouseConfigController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入warehouseWaybill")
public R update(@Valid @RequestBody WarehouseConfigEntity warehouseConfigEntity) {
return R.status(warehouseConfigService.updateById(warehouseConfigEntity));
return warehouseConfigService.updateWarehouseConfigEntity(warehouseConfigEntity);
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java

@ -78,4 +78,5 @@ public class WarehouseGoodsAllocationClient implements IWarehouseGoodsAllocation
.eq(WarehouseGoodsAllocationEntity::getQrCode,positions)
).get(0);
}
}

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseConfigService.java

@ -3,8 +3,15 @@ package com.logpm.warehouse.service;
import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.entity.WarehouseLog;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IWarehouseConfigService extends BaseService<WarehouseConfigEntity> {
/**
* 修改仓库配置
* @param warehouseConfigEntity
* @return
*/
R updateWarehouseConfigEntity(WarehouseConfigEntity warehouseConfigEntity);
}

39
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java

@ -1,16 +1,24 @@
package com.logpm.warehouse.service.impl;
import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity;
import com.logpm.basicdata.feign.IBasicdataGoodsAllocationClient;
import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseLog;
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient;
import com.logpm.warehouse.mapper.WarehouseConfigMapper;
import com.logpm.warehouse.mapper.WarehouseLogMapper;
import com.logpm.warehouse.service.IWarehouseConfigService;
import com.logpm.warehouse.service.IWarehouseLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Slf4j
@AllArgsConstructor
@Service
@ -18,5 +26,36 @@ public class WarehouseConfigServiceImpl extends BaseServiceImpl<WarehouseConfigM
private final WarehouseConfigMapper warehouseConfigMapper;
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient;
@Override
public R updateWarehouseConfigEntity(WarehouseConfigEntity warehouseConfigEntity) {
boolean flag = false;
if (warehouseConfigEntity.getIsAutoWarehouse() == Integer.parseInt(IsOrNoConstant.yes.getValue())) {
//要求先开启默认库位
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.findEntityByQrCode(warehouseConfigEntity.getWarehouseId(), warehouseConfigEntity.getDefaultAllocation());
if (Objects.isNull(goodsAllocationEntity)) {
return R.fail("查询库位信息失败,请输入正确的库位名称!!!");
}
//进行默认库位的开启
flag = basicdataGoodsAllocationClient.openDefaultAllocation(goodsAllocationEntity.getId());
if (flag) {
return R.status(this.updateById(warehouseConfigEntity));
}
} else {
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.findEntityByQrCode(warehouseConfigEntity.getWarehouseId(), warehouseConfigEntity.getDefaultAllocation());
if (Objects.isNull(goodsAllocationEntity)) {
return R.fail("查询库位信息失败,请输入正确的库位名称!!!");
}
this.updateById(warehouseConfigEntity);
//关闭配置进行默认库位的清理
flag = basicdataGoodsAllocationClient.closeDefaultAllocation(goodsAllocationEntity.getId());
warehouseConfigEntity.setDefaultAllocation("");
return R.status(flag);
}
return R.fail("未知错误!!!");
}
}

52
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -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());

Loading…
Cancel
Save