Commit 29c93304 authored by liuzeheng's avatar liuzeheng

pda手机扫描装箱

parent a5c5cfda
...@@ -4384,7 +4384,9 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -4384,7 +4384,9 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List<OrderDO> getAirRefreshOrderPrice(@Param("transportIdList") List<Integer> transportIdList); List<OrderDO> getAirRefreshOrderPrice(@Param("transportIdList") List<Integer> transportIdList);
@ResultType(String.class)
@Select({"SELECT order_id FROM ecw_order WHERE deleted = 0 AND order_no = #{orderNo} "})
Long getOrderIdByOrderNo(@Param("orderNo") String orderNo);
@Update("update ecw_order set sum_cartons_num_prev_packed = sum_num, sum_quantity_all_prev_packed = sum_quantity, sum_weight_prev_packed = sum_weight, sum_volume_prev_packed = sum_volume where order_id = #{orderId}") @Update("update ecw_order set sum_cartons_num_prev_packed = sum_num, sum_quantity_all_prev_packed = sum_quantity, sum_weight_prev_packed = sum_weight, sum_volume_prev_packed = sum_volume where order_id = #{orderId}")
void updateSumDataPrevPacked(@Param("orderId") Long orderId); void updateSumDataPrevPacked(@Param("orderId") Long orderId);
......
...@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.order.vo.order.OrderCreateReqVO; ...@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.order.vo.order.OrderCreateReqVO;
import cn.iocoder.yudao.module.order.vo.order.OrderUpdateReqVO; import cn.iocoder.yudao.module.order.vo.order.OrderUpdateReqVO;
import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseInVO; import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseInVO;
import cn.iocoder.yudao.module.product.dto.FeeDto; import cn.iocoder.yudao.module.product.dto.FeeDto;
import org.apache.ibatis.annotations.Param;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.Collection; import java.util.Collection;
...@@ -348,4 +349,6 @@ public interface OrderService extends IService<OrderDO> { ...@@ -348,4 +349,6 @@ public interface OrderService extends IService<OrderDO> {
* @param orderId * @param orderId
*/ */
void updateSumDataPrevPacked(Long orderId); void updateSumDataPrevPacked(Long orderId);
Long getOrderIdByOrderNo( String orderNo);
} }
...@@ -5694,4 +5694,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5694,4 +5694,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
public void updateSumDataPrevPacked(Long orderId) { public void updateSumDataPrevPacked(Long orderId) {
orderMapper.updateSumDataPrevPacked(orderId); orderMapper.updateSumDataPrevPacked(orderId);
} }
@Override
public Long getOrderIdByOrderNo(String orderNo){
return orderMapper.getOrderIdByOrderNo(orderNo);
}
} }
...@@ -230,6 +230,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI ...@@ -230,6 +230,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
orderCreateReqVO.setOrderId(createReqVO.getOrderId()); orderCreateReqVO.setOrderId(createReqVO.getOrderId());
boxPkgOrderService.createBoxPkgOrder(orderCreateReqVO); boxPkgOrderService.createBoxPkgOrder(orderCreateReqVO);
} }
}else if(createReqVO.getType()==2){ //装箱
System.out.print("");
} }
//查找这个是否已经装了 //查找这个是否已经装了
......
...@@ -72,4 +72,6 @@ public interface BoxPkgOrderService extends IService<BoxPkgOrderDO> { ...@@ -72,4 +72,6 @@ public interface BoxPkgOrderService extends IService<BoxPkgOrderDO> {
void deleteRelateByOrderIds(Long shipmentId,List<Long> orderIds); void deleteRelateByOrderIds(Long shipmentId,List<Long> orderIds);
Map<String, Integer> getMergeOrderQualityByPkgIds(List<Long> pkgIds); Map<String, Integer> getMergeOrderQualityByPkgIds(List<Long> pkgIds);
String scanOrderNoCreate(BoxPkgOrderScanCodeVO createReqVO);
} }
package cn.iocoder.yudao.module.shipment.service.boxPkgOrder; package cn.iocoder.yudao.module.shipment.service.boxPkgOrder;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.log.Log;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService; import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO; import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.service.order.OrderItemService; import cn.iocoder.yudao.module.order.service.order.OrderItemService;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.shipment.convert.BoxPkgOrderConvert; import cn.iocoder.yudao.module.shipment.convert.BoxPkgOrderConvert;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO; import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxMergePkgDO; import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxMergePkgDO;
...@@ -21,7 +24,9 @@ import cn.iocoder.yudao.module.shipment.service.boxMergePkg.BoxMergePkgService; ...@@ -21,7 +24,9 @@ import cn.iocoder.yudao.module.shipment.service.boxMergePkg.BoxMergePkgService;
import cn.iocoder.yudao.module.shipment.service.boxOrderCheckInfo.BoxOrderCheckInfoService; import cn.iocoder.yudao.module.shipment.service.boxOrderCheckInfo.BoxOrderCheckInfoService;
import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderCreateReqVO; import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderCreateReqVO;
import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderQueryVO; import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderQueryVO;
import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderScanCodeVO;
import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderUpdateReqVO; import cn.iocoder.yudao.module.shipment.vo.boxPkgOrder.BoxPkgOrderUpdateReqVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -47,7 +52,7 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B ...@@ -47,7 +52,7 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
@Resource @Resource
private BoxPkgOrderMapper boxPkgOrderMapper; private BoxPkgOrderMapper boxPkgOrderMapper;
@Resource @Resource
private OrderItemService orderItemService; private OrderItemService orderItemService;
...@@ -62,6 +67,10 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B ...@@ -62,6 +67,10 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
@Lazy @Lazy
private BoxOrderCheckInfoService boxOrderCheckInfoService; private BoxOrderCheckInfoService boxOrderCheckInfoService;
@Resource
private OrderService orderService ;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String createBoxPkgOrder(BoxPkgOrderCreateReqVO createReqVO) { public String createBoxPkgOrder(BoxPkgOrderCreateReqVO createReqVO) {
...@@ -70,6 +79,22 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B ...@@ -70,6 +79,22 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
return "success"; return "success";
} }
@Override
@Transactional(rollbackFor = Exception.class)
public String scanOrderNoCreate(BoxPkgOrderScanCodeVO createReqVO){
BoxPkgOrderCreateReqVO vo = new BoxPkgOrderCreateReqVO();
Long orderId = orderService.getOrderIdByOrderNo(createReqVO.getOrderNo());
vo.setOrderId(orderId);
BoxMergePkgDO boxMergePkgDO = boxMergePkgService.selectOne(new LambdaQueryWrapperX<BoxMergePkgDO>().eq(BoxMergePkgDO::getPkgNum,createReqVO.getPkgNum()));
vo.setPkgId(boxMergePkgDO.getId()) ;
if(vo.getOrderId()!=null && vo.getPkgId()!=null){//订单和包裹id 不为空,调用装箱方法
this.create(vo);
}
// 返回
return "success";
}
private void create(BoxPkgOrderCreateReqVO createReqVO) { private void create(BoxPkgOrderCreateReqVO createReqVO) {
checkMergePkgStatus(createReqVO.getPkgId()); checkMergePkgStatus(createReqVO.getPkgId());
......
package cn.iocoder.yudao.module.shipment.vo.boxPkgOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
*
*/
@ApiModel("扫码对未装箱数据进行装箱 Request VO")
@Data
@ToString(callSuper = true)
public class BoxPkgOrderScanCodeVO {
@ApiModelProperty("订单编号")
private String orderNo ;
@ApiModelProperty("合宝箱编号")
private String pkgNum ;
}
...@@ -38,6 +38,17 @@ public class BoxPkgOrderController { ...@@ -38,6 +38,17 @@ public class BoxPkgOrderController {
return success(boxPkgOrderService.createBoxPkgOrder(createReqVO)); return success(boxPkgOrderService.createBoxPkgOrder(createReqVO));
} }
/**
* pda手机扫描装箱
* @param createReqVO
* @return
*/
@PostMapping("/scanOrderNoCreate")
@ApiOperation("扫码对未装箱数据进行装箱")
public CommonResult<String> scanOrderNoCreate(@RequestBody BoxPkgOrderScanCodeVO createReqVO){
return success(boxPkgOrderService.scanOrderNoCreate(createReqVO));
}
@PostMapping("/createBatch") @PostMapping("/createBatch")
@ApiOperation("批量创建合包订单") @ApiOperation("批量创建合包订单")
//@PreAuthorize("@ss.hasPermission('ecw:box-pkg-order:create')") //@PreAuthorize("@ss.hasPermission('ecw:box-pkg-order:create')")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment