提交 1ad394a3 authored 作者: huyufan's avatar huyufan

修改BUG

上级 79421ce0
...@@ -213,11 +213,11 @@ public class OrderGoodsStatusLazyComponent implements InitializingBean { ...@@ -213,11 +213,11 @@ public class OrderGoodsStatusLazyComponent implements InitializingBean {
} }
} }
//只更新货单未拉运吨数,已拉运吨数 //只更新货单未拉运吨数,已拉运吨数
orderGoodsDao.updateOrderGoodsSetResidueWeight(childSum, orderGoods.getId()); orderGoodsDao.updateOrderGoodsSetAlreadyWeight(childSum, orderGoods.getId());
orderFeign.rollbackOrderWeight(param); orderFeign.rollbackOrderWeight(param);
} else { } else {
//只更新货单未拉运吨数,已拉运吨数 //只更新货单未拉运吨数,已拉运吨数
orderGoodsDao.updateOrderGoodsSetResidueWeight(childSum, childSum, orderGoods.getId()); orderGoodsDao.updateOrderGoodsSetResidueWeightAndAlreadyWeight(childSum, childSum, orderGoods.getId());
} }
redisTemplate.opsForZSet().remove(RedisConstants.ORDER_GOODS_STATUS_LAZY_LAST_ARRIVE_SEND_TIME, orderGoodsId.getValue()); redisTemplate.opsForZSet().remove(RedisConstants.ORDER_GOODS_STATUS_LAZY_LAST_ARRIVE_SEND_TIME, orderGoodsId.getValue());
} }
......
...@@ -62,9 +62,9 @@ public interface OrderGoodsDao extends BaseDao<OrderGoodsMapper, OrderGoods, Int ...@@ -62,9 +62,9 @@ public interface OrderGoodsDao extends BaseDao<OrderGoodsMapper, OrderGoods, Int
boolean updateOrderGoodsStatusAndRollbackResidueWeightByOrderGoodsNo(Integer orderGoodsId, Integer status); boolean updateOrderGoodsStatusAndRollbackResidueWeightByOrderGoodsNo(Integer orderGoodsId, Integer status);
Integer updateOrderGoodsSetResidueWeight(BigDecimal residueWeight, Integer id); Integer updateOrderGoodsSetAlreadyWeight(BigDecimal alreadyWeight, Integer id);
Integer updateOrderGoodsSetResidueWeight(BigDecimal residueWeight, BigDecimal alreadyWeight, Integer id); Integer updateOrderGoodsSetResidueWeightAndAlreadyWeight(BigDecimal residueWeight, BigDecimal alreadyWeight, Integer id);
OrderGoodsVO findOrderGoodsById(Integer id); OrderGoodsVO findOrderGoodsById(Integer id);
......
...@@ -165,13 +165,13 @@ public class OrderGoodsDaoImpl extends BaseDaoImpl<OrderGoodsMapper, OrderGoods, ...@@ -165,13 +165,13 @@ public class OrderGoodsDaoImpl extends BaseDaoImpl<OrderGoodsMapper, OrderGoods,
} }
@Override @Override
public Integer updateOrderGoodsSetResidueWeight(BigDecimal residueWeight, Integer id) { public Integer updateOrderGoodsSetAlreadyWeight(BigDecimal alreadyWeight, Integer id) {
return baseMapper.updateOrderGoodsSetResidueWeight(residueWeight,id); return baseMapper.updateOrderGoodsSetAlreadyWeight(alreadyWeight,id);
} }
@Override @Override
public Integer updateOrderGoodsSetResidueWeight(BigDecimal residueWeight, BigDecimal alreadyWeight, Integer id) { public Integer updateOrderGoodsSetResidueWeightAndAlreadyWeight(BigDecimal residueWeight, BigDecimal alreadyWeight, Integer id) {
return baseMapper.updateOrderGoodsSetResidueWeight(residueWeight,alreadyWeight,id); return baseMapper.updateOrderGoodsSetResidueWeightAndAlreadyWeight(residueWeight,alreadyWeight,id);
} }
@Override @Override
......
...@@ -56,11 +56,11 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> { ...@@ -56,11 +56,11 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "saveBatchEntity") @SelectProvider(type = OrderGoodsSqlProvider.class, method = "saveBatchEntity")
void saveBatchEntity(List<OrderGoods> orderGoodsList); void saveBatchEntity(List<OrderGoods> orderGoodsList);
@UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoodsSetResidueWeight") @UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoodsSetResidueWeightAndAlreadyWeight")
Integer updateOrderGoodsSetResidueWeight(@Param(value = "residueWeight") BigDecimal residueWeight, @Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value = "id") Integer id); Integer updateOrderGoodsSetResidueWeightAndAlreadyWeight(@Param(value = "residueWeight") BigDecimal residueWeight, @Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value = "id") Integer id);
@UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoodsSetResidueWeight") @UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoodsSetAlreadyWeight")
Integer updateOrderGoodsSetResidueWeight(@Param(value = "residueWeight") BigDecimal residueWeight,@Param(value = "id") Integer id); Integer updateOrderGoodsSetAlreadyWeight(@Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value = "id") Integer id);
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "findOrderGoodsById") @SelectProvider(type = OrderGoodsSqlProvider.class, method = "findOrderGoodsById")
OrderGoodsVO findOrderGoodsById(Integer id); OrderGoodsVO findOrderGoodsById(Integer id);
......
...@@ -174,17 +174,17 @@ public class OrderGoodsSqlProvider { ...@@ -174,17 +174,17 @@ public class OrderGoodsSqlProvider {
return sqlList.toString(); return sqlList.toString();
} }
public String updateOrderGoodsSetResidueWeight(@Param(value ="residueWeight") BigDecimal residueWeight,@Param(value ="id") Integer id){ public String updateOrderGoodsSetAlreadyWeight(@Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value ="id") Integer id){
String sql = new SQL() {{ String sql = new SQL() {{
UPDATE("order_goods") UPDATE("order_goods")
.SET("residue_transport_weight = residue_transport_weight + #{residueWeight}") .SET("already_transport_weight = already_transport_weight + #{residueWeight}")
.WHERE("id = #{id}"); .WHERE("id = #{id}");
}}.toString(); }}.toString();
return sql; return sql;
} }
public String updateOrderGoodsSetResidueWeight(@Param(value ="residueWeight") BigDecimal residueWeight, @Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value ="id") Integer id){ public String updateOrderGoodsSetResidueWeightAndAlreadyWeight(@Param(value ="residueWeight") BigDecimal residueWeight, @Param(value = "alreadyWeight") BigDecimal alreadyWeight,@Param(value ="id") Integer id){
String sql = new SQL() {{ String sql = new SQL() {{
UPDATE("order_goods") UPDATE("order_goods")
.SET("residue_transport_weight = residue_transport_weight + #{residueWeight}") .SET("residue_transport_weight = residue_transport_weight + #{residueWeight}")
......
...@@ -44,27 +44,27 @@ public abstract class GoodsOrderStrategy { ...@@ -44,27 +44,27 @@ public abstract class GoodsOrderStrategy {
throw new ServiceSystemException(ResultEnum.DATA_ERROR,"订单已暂停,无法进行提量"); throw new ServiceSystemException(ResultEnum.DATA_ERROR,"订单已暂停,无法进行提量");
} }
//多个定向单不允许车辆重复 //多个定向单不允许车辆重复
// List<OrderGoodsChildParams> orderGoodsChildParams = orderGoodsParams.getOrderGoodsChildParams(); List<OrderGoodsChildParams> orderGoodsChildParams = orderGoodsParams.getOrderGoodsChildParams();
// Set<String> set = new HashSet<>(); Set<String> set = new HashSet<>();
// for (OrderGoodsChildParams item : orderGoodsChildParams) { for (OrderGoodsChildParams item : orderGoodsChildParams) {
// if(CollectionUtils.isNotEmpty(item.getTruckList())){ if(CollectionUtils.isNotEmpty(item.getTruckList())){
// int lastSize = set.size() + item.getTruckList().size(); int lastSize = set.size() + item.getTruckList().size();
// set.addAll(item.getTruckList()); set.addAll(item.getTruckList());
// if (!Objects.equals(lastSize,set.size() +item.getTruckList().size())) { if (!Objects.equals(lastSize,set.size() +item.getTruckList().size())) {
// throw new ServiceSystemException(ResultEnum.DATA_ERROR,"定向单选择车辆重复"); throw new ServiceSystemException(ResultEnum.DATA_ERROR,"定向单选择车辆重复");
// } }
// } }
// } }
//
// if(CollectionUtils.isNotEmpty(set)){ if(CollectionUtils.isNotEmpty(set)){
// OrderGoodsTruckBindDao orderGoodsTruckBindDao = SpringContextUtils.getBeanByClass(OrderGoodsTruckBindDao.class); OrderGoodsTruckBindDao orderGoodsTruckBindDao = SpringContextUtils.getBeanByClass(OrderGoodsTruckBindDao.class);
// List<OrderGoodsTruckBind> binds = orderGoodsTruckBindDao.judgeTruckIsBindDxOrder(set); List<OrderGoodsTruckBind> binds = orderGoodsTruckBindDao.judgeTruckIsBindDxOrder(set);
// if(CollectionUtils.isNotEmpty(binds)){ if(CollectionUtils.isNotEmpty(binds)){
// List<String> repeatBind = binds.stream().map(OrderGoodsTruckBind::getTruckNo).collect(Collectors.toList()); List<String> repeatBind = binds.stream().map(OrderGoodsTruckBind::getTruckNo).collect(Collectors.toList());
// String trucks = String.join(", ", repeatBind); String trucks = String.join(", ", repeatBind);
// throw new ServiceSystemException(ResultEnum.DATA_ERROR,"已被定向单绑定车辆:"+ trucks); throw new ServiceSystemException(ResultEnum.DATA_ERROR,"已被定向单绑定车辆:"+ trucks);
// } }
// } }
//根据不同的订单类型创建不同的货单 //根据不同的订单类型创建不同的货单
LocalDateTime sendLazyTime = goodsOrderProcess(orderGoodsParams, orderInfo, now); LocalDateTime sendLazyTime = goodsOrderProcess(orderGoodsParams, orderInfo, now);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论