|
@@ -103,7 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="getListForReceipt" parameterType="BizOutsourcedOrderDetail" resultMap="BizOutsourcedOrderDetailResult">
|
|
<select id="getListForReceipt" parameterType="BizOutsourcedOrderDetail" resultMap="BizOutsourcedOrderDetailResult">
|
|
SELECT
|
|
SELECT
|
|
t1.*,
|
|
t1.*,
|
|
- case when (select count(1) from biz_daywork_carrier bdc where daywork_id = t1.daywork_id and bdc.deleted = 0 and bdc.is_changed = 0) > 0 then 0 else 1 end as unbind
|
|
|
|
|
|
+ case when (select count(1) from biz_daywork_carrier bdc where daywork_id = t1.daywork_id and bdc.deleted = 0 and bdc.is_changed = 0) > 0 then 0 else 1 end as unbind,
|
|
|
|
+ (select group_concat(carrier_code) from biz_daywork_carrier bdc where daywork_id = t1.daywork_id and bdc.deleted = 0 and bdc.is_changed = 0) current_carriers
|
|
FROM biz_outsourced_order_detail t1 left join biz_outsourced_order t2 on t1.master_id = t2.id
|
|
FROM biz_outsourced_order_detail t1 left join biz_outsourced_order t2 on t1.master_id = t2.id
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
t1.deleted = 0 and t2.deleted = 0 and t2.is_submit = 1
|
|
t1.deleted = 0 and t2.deleted = 0 and t2.is_submit = 1
|
|
@@ -148,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="getIdsForInterReturn" resultType="java.lang.Long" parameterType="cn.ezhizao.project.business.domain.BizOutsourcedOrderDetail">
|
|
<select id="getIdsForInterReturn" resultType="java.lang.Long" parameterType="cn.ezhizao.project.business.domain.BizOutsourcedOrderDetail">
|
|
select t1.id from biz_outsourced_order_detail t1 left join biz_outsourced_order t2 on t1.master_id = t2.id
|
|
select t1.id from biz_outsourced_order_detail t1 left join biz_outsourced_order t2 on t1.master_id = t2.id
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
- t1.deleted = 0 and t2.deleted = 0 and t2.is_submit = 1 and not exists (select 1 from biz_daywork_item di where di.deleted = 0 and di.daywork_id = t1.daywork_id and process_step_number = (select process_step_number from biz_outsourced_order_detail_process t3 where t3.detail_id = t1.id order by process_step_number desc limit 1))
|
|
|
|
|
|
+ t1.deleted = 0 and t2.deleted = 0 and t2.is_submit = 1 and not exists (select 1 from biz_daywork_item di where di.deleted = 0 and di.daywork_id = t1.daywork_id and process_step_number = (select process_step_number from biz_outsourced_order_detail_process t3 where t3.detail_id = t1.id and t3.deleted = 0 order by process_step_number desc limit 1))
|
|
<if test="isInnerOutsource != null"> and t2.is_inner_outsource = #{isInnerOutsource}</if>
|
|
<if test="isInnerOutsource != null"> and t2.is_inner_outsource = #{isInnerOutsource}</if>
|
|
<if test="supplierId != null "> AND t1.supplier_id = #{supplierId}</if>
|
|
<if test="supplierId != null "> AND t1.supplier_id = #{supplierId}</if>
|
|
</trim>
|
|
</trim>
|