|
@@ -1068,7 +1068,7 @@
|
|
<if test="beginDate != null and beginDate != ''">and f_bsdate >= #{beginDate}</if>
|
|
<if test="beginDate != null and beginDate != ''">and f_bsdate >= #{beginDate}</if>
|
|
<if test="endDate != null and endDate != ''">and f_bsdate < #{endDate}</if>
|
|
<if test="endDate != null and endDate != ''">and f_bsdate < #{endDate}</if>
|
|
<if test="external != null and external != ''">
|
|
<if test="external != null and external != ''">
|
|
- and f_corpid = (select f_corpid from t_customer_contact where f_tel = #{external})
|
|
|
|
|
|
+ and f_corpid = (select f_pid from t_customer_contact where f_tel = #{external})
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -1077,9 +1077,9 @@
|
|
select datediff(date_format(now(),'%Y-%m-%d'),date_format(min(f_bsdate),'%Y-%m-%d')) as days
|
|
select datediff(date_format(now(),'%Y-%m-%d'),date_format(min(f_bsdate),'%Y-%m-%d')) as days
|
|
from t_whgenleg
|
|
from t_whgenleg
|
|
where
|
|
where
|
|
- f_grossweightblc > 0
|
|
|
|
|
|
+ f_grossweightblc > 5
|
|
<if test="external != null and external != ''">
|
|
<if test="external != null and external != ''">
|
|
- and f_corpid = (select f_corpid from t_customer_contact where f_tel = #{external})
|
|
|
|
|
|
+ and f_corpid = (select f_pid from t_customer_contact where f_tel = #{external})
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1088,16 +1088,19 @@
|
|
tw.f_mblno as fMblno,
|
|
tw.f_mblno as fMblno,
|
|
tg.f_name as goodsName,
|
|
tg.f_name as goodsName,
|
|
tw.f_bsdate as fBsdate,
|
|
tw.f_bsdate as fBsdate,
|
|
|
|
+ tc.f_name as customerName,
|
|
round(tw.f_grossweightblc / 1000, 2) as fGrossweight
|
|
round(tw.f_grossweightblc / 1000, 2) as fGrossweight
|
|
from t_whgenleg tw
|
|
from t_whgenleg tw
|
|
- left join t_goods tg ON tg.f_id = tw.f_goodsid
|
|
|
|
|
|
+ left join t_goods tg on tg.f_id = tw.f_goodsid
|
|
|
|
+ left join t_corps tc on tw.f_corpid = tc.f_id
|
|
where
|
|
where
|
|
- tw.f_grossweightblc > 0
|
|
|
|
- and datediff(date_format(now(),'%Y-%m-%d'),date_format(tw.f_bsdate,'%Y-%m-%d')) > 60
|
|
|
|
|
|
+ tw.f_qtyD != 0
|
|
|
|
+ and tw.f_qtyblc != 0
|
|
|
|
+ and datediff(date_format(now(),'%Y-%m-%d'),date_format(tw.f_bsdate,'%Y-%m-%d')) > 180
|
|
<if test="external != null and external != ''">
|
|
<if test="external != null and external != ''">
|
|
- and tw.f_corpid = (select f_corpid from t_customer_contact where f_tel = #{external})
|
|
|
|
|
|
+ and tw.f_corpid = (select f_pid from t_customer_contact where f_tel = #{external})
|
|
</if>
|
|
</if>
|
|
- order by tw.f_bsdate desc
|
|
|
|
|
|
+ order by tw.f_bsdate
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|