Browse Source

备货库位零担扫描数量限制、异常工单调整

chenglong
汤建军 12 months ago
parent
commit
5140c60b8c
  1. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  2. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.java
  3. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml
  4. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java
  5. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java
  6. 34
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  7. 25
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

3
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -45,6 +45,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@ -150,9 +151,11 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
List<AftersalesProcessingMoneyVO> processingMoneyEntityList = new ArrayList<>();
list.forEach( i ->{
BigDecimal bigDecimal = i.getMoney().setScale(2);
String value = DictBizCache.getValue(DictBizConstant.RESULT_HANDLING, i.getResultType());
AftersalesProcessingMoneyVO processingMoneyVO = new AftersalesProcessingMoneyVO();
BeanUtil.copyProperties(i,processingMoneyVO);
processingMoneyVO.setMoney(bigDecimal);
processingMoneyVO.setResultTypeName(value);
processingMoneyEntityList.add(processingMoneyVO);
});

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.java

@ -35,4 +35,12 @@ public interface WarehouseTrayTypeMapper extends BaseMapper<WarehouseTrayTypeEnt
void updateStockByTrayTypeId(@Param("orderTotalNum")Integer orderTotalNum, @Param("enterNum") Integer enterNum, @Param("trayTypeId") Long trayTypeId);
List<OrderPackageInfoVO> findOrderPackageList(@Param("list")List<String> orderPackageList);
/**
* 查询零担订单
* @param orderId
* @param warehouseId
* @return
*/
TrayTypeDataListVO getZeroOrderByOrderId(@Param("orderId")Long orderId,@Param("warehouseId") Long warehouseId);
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml

@ -102,6 +102,17 @@
#{item}
</foreach>
</select>
<select id="getZeroOrderByOrderId" resultType="com.logpm.warehouse.vo.TrayTypeDataListVO">
select ldsa.id dataId,
ldsa.waybill_number waybillNo,
ldsa.order_code dataCode,
ldsa.hand_quantity orderTotalNum
from logpm_distribution_stock_article ldsa
where ldsa.is_deleted = 0
and ldsa.is_zero = 1
and ldsa.id = #{orderId}
and ldsa.warehouse_id = #{warehouseId}
</select>
</mapper>

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java

@ -104,4 +104,13 @@ public interface IWarehouseTrayTypeService extends BaseService<WarehouseTrayType
R syncOldTrayData(String trayCode, String trayType, List<String> orderPackageCodes, Long warehouseId);
R findTrayData(String trayCode, Long warehouseId);
/**
* 查询零担订单库内使用情况
* @param orderId
* @param warehouseId
* @return
*/
Integer getZeroOrderByOrderId(Long orderId, Long warehouseId);
}

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java

@ -22,6 +22,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.vo.UpDownStockupAreaVO;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.UpShelfZeroOrderDTO;
import com.logpm.warehouse.dto.UpStockupAreaPackageDTO;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.entity.WarehouseUpdownStockupAreaEntity;
@ -101,4 +102,12 @@ public interface IWarehouseUpdownStockupAreaService extends BaseService<Warehous
*/
R scanZeroStockArticle(String zeroStockArticleCode,Long warehouseId);
/**
* 零担订单进行备货区库位上架
* @param upShelfZeroOrderDTOS
* @param allocationId
* @param id
* @return
*/
R upShelfZeroOrder(List<UpShelfZeroOrderDTO> upShelfZeroOrderDTOS, Long allocationId, Long id);
}

34
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -3130,6 +3130,40 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return R.data(map);
}
/**
* @param orderId
* @param warehouseId
* @return
*/
@Override
public Integer getZeroOrderByOrderId(Long orderId, Long warehouseId) {
TrayTypeDataListVO zeroOrderByWaybillCode = baseMapper.getZeroOrderByOrderId(orderId,warehouseId);
// Long orderId = trayTypeDataListVO.getDataId();
//总数
Integer orderTotalNum = zeroOrderByWaybillCode.getOrderTotalNum();
//
Integer residueNum = orderTotalNum;
//查询该零担的库位数据
List<PositionVO> updownGoodsEntities = warehouseUpdownGoodsService.getUpdownGoodsByZeroOrderId(orderId,warehouseId);
//查询在托盘上还未进行上架的零担订单信息
List<PositionVO> trayGoodsEntities = warehouseTrayGoodsService.getTrayGoodsByZeroOrderIdNoAllocationId(orderId,warehouseId);
updownGoodsEntities.addAll(trayGoodsEntities);
for (PositionVO positionVO:updownGoodsEntities){
Integer num = positionVO.getNum();
residueNum = residueNum - num;
}
if (residueNum == 0){
//无可用数量,说明该零担订单此时处于上架和在托的情况
return 0;
}else if (residueNum > 0){
return residueNum;
}else {
//出现脏数据的情况
log.error("此零担订单数据错误,需要维护数据,订单ID:{}",orderId);
return -1;
}
}
private void saveOrderInfo(String orderCode, Integer oldWarehouseId, Long newWarehouseId) {

25
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

@ -33,6 +33,7 @@ import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.distribution.feign.IDistributionStockListClient;
import com.logpm.distribution.vo.UpDownStockupAreaVO;
import com.logpm.warehouse.bean.Resp;
import com.logpm.warehouse.dto.*;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.UpStockupAreaPackageDTO;
@ -529,7 +530,31 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
log.error(method+"查询零担订单失败");
return R.fail("请扫描正确订单");
}
//查询该零担订单是否具备有在备货库位上架的条件
Integer a = warehouseTrayTypeService.getZeroOrderByOrderId(upDownStockupZeroByOrderCodeAndWarehouseId.getOrderId(),warehouseId);
if (a > 0){
return R.data(upDownStockupZeroByOrderCodeAndWarehouseId);
}else if (a == 0){
return R.fail(403,"请先对该订单进行下架操作");
}else {
log.error(method+"此订单数量异常");
return R.fail(403,"数据异常");
}
}
/**
* @param upShelfZeroOrderDTOS
* @param allocationId
* @param id
* @return
*/
@Override
public R upShelfZeroOrder(List<UpShelfZeroOrderDTO> upShelfZeroOrderDTOS, Long allocationId, Long id) {
//这里目前的上架方式仅仅是进行订单自编码的上架方式和托盘暂时没有绑定关系
//这里进行上架需要进行上架
return null;
}
private WarehouseUpdownStockupAreaEntity createdNewUpShelfInventory(Long allocationId, Long warehouseId, UpShelfStockDTO upShelfStockDTO, WarehouseUpdownStockupAreaEntity updownTypeEntity, Long goodsAreaId, BasicdataGoodsAreaEntity goodsAreaEntity, Long goodsShelfId, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity) {

Loading…
Cancel
Save