Commit 00497c42 authored by honghy's avatar honghy

订单明细多语言

parent 1993a145
package cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn; package cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper; import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery;
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.orderWarehouseIn.OrderWarehouseInDO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO; import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInBackItemVO; import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInBackItemVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInQueryVO; import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInQueryVO;
...@@ -15,6 +14,8 @@ import org.apache.ibatis.annotations.Param; ...@@ -15,6 +14,8 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType; import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* 入仓货物详情 Mapper * 入仓货物详情 Mapper
* @author yanghao * @author yanghao
...@@ -77,13 +78,13 @@ public interface OrderWarehouseInMapper extends AbstractMapper<OrderWarehouseInD ...@@ -77,13 +78,13 @@ public interface OrderWarehouseInMapper extends AbstractMapper<OrderWarehouseInD
@ResultType(OrderItemBackVO.class) @ResultType(OrderItemBackVO.class)
@Select("SELECT wi.* ," + @Select("SELECT wi.* ," +
"GROUP_CONCAT(DISTINCT dict.label) as specificationType ," + " CASE #{lang} WHEN 1 THEN GROUP_CONCAT(DISTINCT dict.label_en) WHEN 2 THEN GROUP_CONCAT(DISTINCT dict.label_fr) ELSE GROUP_CONCAT(DISTINCT dict.label) END as specificationType," +
"GROUP_CONCAT(DISTINCT spe.label) as warehouseType ," + " CASE #{lang} WHEN 1 THEN GROUP_CONCAT(DISTINCT spe.label_en) WHEN 2 THEN GROUP_CONCAT(DISTINCT spe.label_fr) ELSE GROUP_CONCAT(DISTINCT spe.label) END as warehouseType," +
"GROUP_CONCAT(wi.remark) as warehouseRecordRemark " + "GROUP_CONCAT(wi.remark) as warehouseRecordRemark " +
"FROM ecw_order_warehouse_in wi LEFT JOIN system_dict_data dict ON dict.dict_type = 'packaging_type' AND dict.`value` = wi.unit " + "FROM ecw_order_warehouse_in wi LEFT JOIN system_dict_data dict ON dict.dict_type = 'packaging_type' AND dict.`value` = wi.unit " +
"LEFT JOIN system_dict_data spe ON spe.dict_type = 'warehousing_specification_type' AND spe.`value` = wi.specification_type " + "LEFT JOIN system_dict_data spe ON spe.dict_type = 'warehousing_specification_type' AND spe.`value` = wi.specification_type " +
"where 1 = 1 AND wi.deleted = 0 and wi.order_id = #{orderId} and wi.order_item_id = #{orderItemId} order by id asc") "where 1 = 1 AND wi.deleted = 0 and wi.order_id = #{orderId} and wi.order_item_id = #{orderItemId} order by id asc")
OrderItemBackVO getWarehouseInByItemIdAndOrderId(@Param("orderId") Long orderId, @Param("orderItemId") Long orderItemId); OrderItemBackVO getWarehouseInByItemIdAndOrderId(@Param("orderId") Long orderId, @Param("orderItemId") Long orderItemId, @Param("lang") Integer lang);
} }
...@@ -900,7 +900,7 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -900,7 +900,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
item.setQQuantity(BigDecimal.ZERO.toString()); item.setQQuantity(BigDecimal.ZERO.toString());
} }
//入仓类型,多个用逗号分隔 //入仓类型,多个用逗号分隔
OrderItemBackVO warehouseInDO = orderWarehouseInMapper.getWarehouseInByItemIdAndOrderId(item.getOrderId(), item.getOrderItemId()); OrderItemBackVO warehouseInDO = orderWarehouseInMapper.getWarehouseInByItemIdAndOrderId(item.getOrderId(), item.getOrderItemId(), I18nMessage.getLang());
if (Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseType())) { if (Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseType())) {
item.setWarehouseType(warehouseInDO.getWarehouseType()); item.setWarehouseType(warehouseInDO.getWarehouseType());
} }
......
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