|
@@ -753,8 +753,8 @@
|
|
|
leg.f_corpid AS fCorpIds,
|
|
|
corp.f_name AS fCorpid,
|
|
|
leg.f_shipper AS fShipper,
|
|
|
- <if test="isCntrno != null and isCntrno != 2 ">ware.f_warehouse_information AS fWarehouseids,</if>
|
|
|
- <if test="isCntrno != null and isCntrno == 2 ">ware.f_name AS fWarehouseids,</if>
|
|
|
+ <if test="isCntrno != 2 ">ware.f_warehouse_information AS fWarehouseids,</if>
|
|
|
+ <if test="isCntrno == 2 ">ware.f_name AS fWarehouseids,</if>
|
|
|
area.f_name AS fWarehouseLocationids,
|
|
|
leg.f_originalbillno AS fOriginalbillno,
|
|
|
leg.f_warehouse_locationid AS fWarehouseLocationid,
|
|
@@ -793,8 +793,8 @@
|
|
|
LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
|
|
|
LEFT JOIN t_customer_contact tc ON tc.f_pid = corp.f_id
|
|
|
LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
|
|
|
- <if test="isCntrno != null and isCntrno != 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid</if>
|
|
|
- <if test="isCntrno != null and isCntrno == 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouseid</if>
|
|
|
+ <if test="isCntrno != 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid</if>
|
|
|
+ <if test="isCntrno == 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouseid</if>
|
|
|
LEFT JOIN sys_dict_data dict ON dict.dict_value = leg.f_business_type
|
|
|
LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
|
|
|
LEFT JOIN sys_dict_data dict1 ON dict1.dict_value = leg.f_trademodeid
|
|
@@ -843,10 +843,10 @@
|
|
|
<if test="isCntrno == null">
|
|
|
GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid
|
|
|
</if>
|
|
|
- <if test="isCntrno != null and isCntrno == 1 ">
|
|
|
+ <if test="isCntrno == 1 ">
|
|
|
GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_cntrno
|
|
|
</if>
|
|
|
- <if test="isCntrno != null and isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid</if>
|
|
|
+ <if test="isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid</if>
|
|
|
</where>
|
|
|
${params.dataScope}
|
|
|
order by leg.f_bsdate desc
|