Commit 8f5fb78a authored by liuzeheng's avatar liuzeheng

始发仓多选

parent b55f6755
......@@ -646,12 +646,12 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List<OrderBackPageVO> orderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
List<OrderBackPageVO> orderList1(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryDTO query);
List<OrderBackPageVO> myOrderPageList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryDTO query);
long orderCount(@Param("query") OrderQueryVO query);
long orderCount1(@Param("query") OrderQueryDTO query);
long myOrderCount(@Param("query") OrderQueryDTO query);
List<OrderExcelVO> exportOrderExcelList(@Param("start")int start, @Param("size") int size,@Param("query") OrderQueryVO query);
......
......@@ -881,11 +881,12 @@ public class OrderQueryServiceImpl implements OrderQueryService {
query.setLang(I18nMessage.getLang());
}
IPage<OrderBackPageVO> mpPage = MyBatisUtils.buildPage(page);
long total = orderMapper.orderCount1(query);
log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<OrderBackPageVO> list = orderMapper.orderList1(start, size, query);
List<OrderBackPageVO> list = orderMapper.myOrderPageList(start, size, query);
long total = orderMapper.myOrderCount(query);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
......
......@@ -763,7 +763,7 @@
limit #{start}, #{size}
</select>
<select id="orderList1" resultType="cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO">
<select id="myOrderPageList" resultType="cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO" parameterType="cn.iocoder.yudao.module.order.dto.OrderQueryDTO">
select o.order_id,
o.package_type as advance_type,
o.package_remarks,
......@@ -915,7 +915,7 @@
<include refid="orderQuery"/>
</select>
<select id="orderCount1" resultType="java.lang.Long">
<select id="myOrderCount" resultType="java.lang.Long">
select count(1)
from ecw_order o
left join ecw_order_departure de on de.order_id = o.order_id
......@@ -945,10 +945,7 @@
<sql id="myOrderQuery">
<if test="query.type != null and query.type != '' and query.type.size()>0 ">
<if test="query.type != null and query.type != '' and query.type.size()>1 ">
<!-- AND o.type in-->
<!-- <foreach item='type' collection='query.type' open='(' separator=',' close=')'>-->
<!-- ${type}-->
<!-- </foreach>-->
AND (1 !=1
<foreach item='type' index="index" collection='query.type' >
<if test="type == 0 ">
......@@ -988,9 +985,7 @@
<if test="query.pdaDestWareIds != null and query.pdaDestWareIds != '' ">
AND FIND_IN_SET(ew_dest.`id`, #{query.pdaDestWareIds})
</if>
<!-- <if test="query.isExternalWarehouse != null">-->
<!-- AND o.`is_external_warehouse` = #{query.isExternalWarehouse}-->
<!-- </if>-->
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()>0">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()==1 ">
......@@ -1055,9 +1050,7 @@
<if test="query.salesmanId != null ">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ))
</if>
<!-- <if test="query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<if test="query.customsType != null and query.customsType.size()>0">
......@@ -1076,9 +1069,7 @@
</if>
</if>
<!-- <if test="query.productRecord != null">-->
<!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<if test="query.productRecord != null and query.productRecord.size()>0">
......@@ -1369,38 +1360,38 @@
or pb.`title_zh` = #{query.notEqProdKey} or pb.`title_en` = #{query.notEqProdKey})
))
</if>
<if test="query.startWarehouseId != null and query.destWarehouseId !=null and query.destWarehouseId.size() !=0 ">
<if test="query.startWarehouseId !=null and query.destWarehouseId !=null ">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
<foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{warehouseId}
</foreach>
and whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
<foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId}
</foreach>
))
</if>
<if test="query.startWarehouseId != null and query.destWarehouseId =null ">
<if test="query.startWarehouseId !=null and query.destWarehouseId==null">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
<foreach item='warehouseId' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{warehouseId}
</foreach>
))
</if>
<if test="query.startWarehouseId = null and query.destWarehouseId !=null and query.destWarehouseId.size() != 0 ">
<if test="query.startWarehouseId ==null and query.destWarehouseId !=null ">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
<foreach item='destWarehouseId' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId}
</foreach>
......
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