Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
59ce95451b
  1. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  2. 85
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  3. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -260,6 +260,12 @@ public class DistributionDeliveryListEntity extends TenantEntity {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remarks; private String remarks;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String clineName;

85
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -48,6 +48,7 @@ import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeStatusConstant; import org.springblade.common.constant.stockup.StockupTypeStatusConstant;
import org.springblade.common.utils.CommonUtil; import org.springblade.common.utils.CommonUtil;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -705,17 +706,41 @@ public class DistributionStockupAppController extends BladeController {
} }
//判断是否可以继续备货 //判断是否可以继续备货
DistributionStockListEntity byId = iDistributionStockListService.getById(stockListId); DistributionStockListEntity byId = iDistributionStockListService.getById(stockListId);
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); List<WarehouseUpdownGoodsEntity> locationInformation ;
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); if(byId.getSourceType().equals("2")){
warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch()); //导入
warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId()); WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
warehouseUpdownGoodsEntity.setAssociationId(byId.getMaterialId()); warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
warehouseUpdownGoodsEntity.setAssociationType("4"); warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch());
warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId()); warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId());
List<WarehouseUpdownGoodsEntity> locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); warehouseUpdownGoodsEntity.setAssociationId(byId.getMaterialId());
if(locationInformation.isEmpty()){ warehouseUpdownGoodsEntity.setAssociationType("4");
return Resp.scanFail("当前货位的库存品已为零,请更换货位继续!!", "当前货位的库存品已为零,请更换货位继续!!"); warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId());
locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
if(locationInformation.isEmpty()){
return Resp.scanFail("当前货位的库存品已为零,请更换货位继续!!", "当前货位的库存品已为零,请更换货位继续!!");
}
}else{
//查询包件信息
List<DistributionParcelListEntity> list = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getOrderPackageCode, packetBarCode)
.eq(DistributionParcelListEntity::getOrderCode, byId.getIncomingBatch())
.eq(DistributionParcelListEntity::getWarehouseId, byId.getWarehouseId())
);
if(ObjectUtils.isNotNull(list) && list.size() > 1){
throw new ServiceException("查询到重复包条信息!!");
}
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
warehouseUpdownGoodsEntity.setAssociationId(list.get(0).getId());
warehouseUpdownGoodsEntity.setAssociationType("4");
warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId());
locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
if(locationInformation.isEmpty()){
return Resp.scanFail("当前货位没有该包件信息!!", "当前货位没有该包件信息!!");
}
} }
Integer i = distributionStockupService.selectPackagePrint(stockupDTO); Integer i = distributionStockupService.selectPackagePrint(stockupDTO);
switch (i) { switch (i) {
case 1: case 1:
@ -750,20 +775,32 @@ public class DistributionStockupAppController extends BladeController {
// warehouseUpdownGoodsEntity.setAssociationType("4"); // warehouseUpdownGoodsEntity.setAssociationType("4");
// WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); // WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
if(!locationInformation.isEmpty()){ if(!locationInformation.isEmpty()){
entity.setAllocationTitle(locationInformation.get(0).getPositionCode()); if(byId.getServiceType().equals("2")){
entity.setAllocationId(stockupDTO.getAllocationId()); //导入下架
//todo 待下架操作 entity.setAllocationTitle(locationInformation.get(0).getPositionCode());
JSONObject jsonObject = new JSONObject(); entity.setAllocationId(stockupDTO.getAllocationId());
jsonObject.put("marketId",byId.getMarketId()); //todo 待下架操作
jsonObject.put("materialCode",byId.getMarketCode()); JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId",byId.getWarehouseId()); jsonObject.put("marketId",byId.getMarketId());
jsonObject.put("incomingBatch",byId.getIncomingBatch()); jsonObject.put("materialCode",byId.getMarketCode());
jsonObject.put("enterNum",1); jsonObject.put("warehouseId",byId.getWarehouseId());
jsonObject.put("allocationId",stockupDTO.getAllocationId()); jsonObject.put("incomingBatch",byId.getIncomingBatch());
List<JSONObject> list = new ArrayList<>(); jsonObject.put("enterNum",1);
list.add(jsonObject); jsonObject.put("allocationId",stockupDTO.getAllocationId());
R r = warehouseUpdownTypeClient.downStock(list); List<JSONObject> list = new ArrayList<>();
log.debug("下架状态:{}",r.getMsg()); list.add(jsonObject);
R r = warehouseUpdownTypeClient.downStock(list);
if(r.getCode() != 200){
log.debug("##########"+r.getMsg());
return Resp.scanFail("下架失败,请联系管理员!!","下架失败,请联系管理员!!");
}
}else{
R r = warehouseUpdownTypeClient.downPackage(packetBarCode, byId.getWarehouseId());
if(r.getCode() != 200){
log.debug("##########"+r.getMsg());
return Resp.scanFail("下架失败,请联系管理员!!","下架失败,请联系管理员!!");
}
}
}else{ }else{
return Resp.scanFail("本货位的物料已为0,请更换货位继续!!","本货位的物料已为0,请更换货位继续!!"); return Resp.scanFail("本货位的物料已为0,请更换货位继续!!","本货位的物料已为0,请更换货位继续!!");
} }

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -190,8 +190,7 @@
WHERE WHERE
lddl.id = lds.delivery_id lddl.id = lds.delivery_id
) scannedNumber ) scannedNumber
FROM FROM logpm_distribution_delivery_list lddl
logpm_distribution_delivery_list lddl
<where> <where>
lddl.is_deleted = 0 lddl.is_deleted = 0
<if test="param.trainNumber != null and param.trainNumber!=''"> <if test="param.trainNumber != null and param.trainNumber!=''">

Loading…
Cancel
Save