|
@@ -357,10 +357,10 @@
|
|
|
any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
|
|
any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuName != null and skuName != ''">
|
|
<if test="skuName != null and skuName != ''">
|
|
|
- AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
|
|
|
|
+ AND tpoi.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuModel != null and skuModel != ''">
|
|
<if test="skuModel != null and skuModel != ''">
|
|
|
- AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
|
|
|
|
+ AND tpoi.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="brandName != null and brandName != ''">
|
|
<if test="brandName != null and brandName != ''">
|
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|
|
@@ -444,10 +444,10 @@
|
|
|
any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
|
|
any(#{goodsBrandList,typeHandler=UuidListTypeHandler})
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuName != null and skuName != ''">
|
|
<if test="skuName != null and skuName != ''">
|
|
|
- AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
|
|
|
|
+ AND tpii.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuModel != null and skuModel != ''">
|
|
<if test="skuModel != null and skuModel != ''">
|
|
|
- AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
|
|
|
|
+ AND tpii.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="brandName != null and brandName != ''">
|
|
<if test="brandName != null and brandName != ''">
|
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|
|
@@ -1073,6 +1073,9 @@
|
|
|
,concat(sys.f_remove_zero(tpoi.out_qty),tmgu.unit_name) as "outQtyPiece"
|
|
,concat(sys.f_remove_zero(tpoi.out_qty),tmgu.unit_name) as "outQtyPiece"
|
|
|
,sys.f_remove_zero(tpoi.out_qty) as "outQty"
|
|
,sys.f_remove_zero(tpoi.out_qty) as "outQty"
|
|
|
,tpoi.out_amt as "outAmt"
|
|
,tpoi.out_amt as "outAmt"
|
|
|
|
|
+ ,tpoi.fact_amt as "factAmt"
|
|
|
|
|
+ ,tpoi.disc_amt as "discAmt"
|
|
|
|
|
+ ,tpoi.discount as "discount"
|
|
|
,sys.f_remove_zero(tpoi.return_qty) as "returnQty"
|
|
,sys.f_remove_zero(tpoi.return_qty) as "returnQty"
|
|
|
,tpoi.return_amt as "returnAmt"
|
|
,tpoi.return_amt as "returnAmt"
|
|
|
,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
|
|
,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
|
|
@@ -1124,8 +1127,8 @@
|
|
|
,tpi.into_date as "outDate"
|
|
,tpi.into_date as "outDate"
|
|
|
,tpi.remarks
|
|
,tpi.remarks
|
|
|
,makestaff.staff_name as "makeStaffName"
|
|
,makestaff.staff_name as "makeStaffName"
|
|
|
- ,tmgs.sku_name as "skuName"
|
|
|
|
|
- ,tmgs.sku_model as "skuModel"
|
|
|
|
|
|
|
+ ,tpii.sku_name as "skuName"
|
|
|
|
|
+ ,tpii.sku_model as "skuModel"
|
|
|
,tmgs.sku_spec as "skuSpec"
|
|
,tmgs.sku_spec as "skuSpec"
|
|
|
,tpii.non_std_code as "nonStdCode"
|
|
,tpii.non_std_code as "nonStdCode"
|
|
|
,tmgb.short_name as "shortName"
|
|
,tmgb.short_name as "shortName"
|
|
@@ -1139,6 +1142,9 @@
|
|
|
,concat(sys.f_remove_zero(abs(tpii.into_qty)),tmgu.unit_name) as "outQtyPiece"
|
|
,concat(sys.f_remove_zero(abs(tpii.into_qty)),tmgu.unit_name) as "outQtyPiece"
|
|
|
,sys.f_remove_zero(tpii.into_qty) as "outQty"
|
|
,sys.f_remove_zero(tpii.into_qty) as "outQty"
|
|
|
,tpii.into_amt as "outAmt"
|
|
,tpii.into_amt as "outAmt"
|
|
|
|
|
+ ,tpii.into_amt+tpii.intoing_amt as "factAmt"
|
|
|
|
|
+ ,0.00 as "discAmt"
|
|
|
|
|
+ ,0.00 as "discount"
|
|
|
,sys.f_remove_zero(tpii.return_qty) as "returnQty"
|
|
,sys.f_remove_zero(tpii.return_qty) as "returnQty"
|
|
|
,tpii.return_amt as "returnAmt"
|
|
,tpii.return_amt as "returnAmt"
|
|
|
,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,abs(tpii.intoing_box),abs(tpii.intoing_piece)) as "outingBoxPiece"
|
|
,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,abs(tpii.intoing_box),abs(tpii.intoing_piece)) as "outingBoxPiece"
|
|
@@ -1514,8 +1520,8 @@
|
|
|
t.item_index AS "itemIndex",
|
|
t.item_index AS "itemIndex",
|
|
|
t.sku_id AS "skuId",
|
|
t.sku_id AS "skuId",
|
|
|
tmgs.sku_code as "skuCode",
|
|
tmgs.sku_code as "skuCode",
|
|
|
- tmgs.sku_model as "skuModel",
|
|
|
|
|
- tmgs.sku_name as "skuName",
|
|
|
|
|
|
|
+ t.sku_model as "skuModel",
|
|
|
|
|
+ t.sku_name as "skuName",
|
|
|
tmgb.brand_name AS "brandName",
|
|
tmgb.brand_name AS "brandName",
|
|
|
t.item_qty AS "itemQty",
|
|
t.item_qty AS "itemQty",
|
|
|
sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
@@ -1546,11 +1552,11 @@
|
|
|
dkic_b.f_box_piece ( tmgus.unit_name, tmgu.unit_name, T.BOX, T.piece ) AS "boxPiece"
|
|
dkic_b.f_box_piece ( tmgus.unit_name, tmgu.unit_name, T.BOX, T.piece ) AS "boxPiece"
|
|
|
FROM dkic_b.t_psi_order_item as t
|
|
FROM dkic_b.t_psi_order_item as t
|
|
|
inner join dkic_b.t_psi_order tpo on tpo.order_id = t.order_id
|
|
inner join dkic_b.t_psi_order tpo on tpo.order_id = t.order_id
|
|
|
- inner join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
|
|
|
|
|
|
|
+ left join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
|
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = t.wh_id
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = t.wh_id
|
|
|
left join dkic_b.t_mst_customer tmc on tmc.cus_id = tpo.cus_id
|
|
left join dkic_b.t_mst_customer tmc on tmc.cus_id = tpo.cus_id
|
|
|
LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
|
|
LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
|
|
|
- left join sys.t_data_kind as tdk3 on tpo.out_status = tdk3.kind_code
|
|
|
|
|
|
|
+ left join sys.t_data_kind as tdk3 on t.out_status = tdk3.kind_code
|
|
|
LEFT JOIN dkic_b.t_mst_unit AS tmgu ON tmgs.unit_id = tmgu.unit_id
|
|
LEFT JOIN dkic_b.t_mst_unit AS tmgu ON tmgs.unit_id = tmgu.unit_id
|
|
|
LEFT JOIN dkic_b.t_mst_unit AS tmgus ON tmgs.sub_unit_id = tmgus.unit_id
|
|
LEFT JOIN dkic_b.t_mst_unit AS tmgus ON tmgs.sub_unit_id = tmgus.unit_id
|
|
|
<include refid="ConditionSaleItem"/>
|
|
<include refid="ConditionSaleItem"/>
|
|
@@ -1627,10 +1633,10 @@
|
|
|
AND tpo.make_time < #{makeTimeEnd}::timestamp with time zone + interval '1 day'
|
|
AND tpo.make_time < #{makeTimeEnd}::timestamp with time zone + interval '1 day'
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuName != null and skuName != ''">
|
|
<if test="skuName != null and skuName != ''">
|
|
|
- AND tmgs.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
|
|
|
|
+ AND t.sku_name like concat('%', my_ex.likequery(#{skuName}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="skuModel != null and skuModel != ''">
|
|
<if test="skuModel != null and skuModel != ''">
|
|
|
- AND tmgs.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
|
|
|
|
+ AND t.sku_model like concat('%', my_ex.likequery(#{skuModel}) , '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="brandName != null and brandName != ''">
|
|
<if test="brandName != null and brandName != ''">
|
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|
|
AND tmgb.brand_name like concat('%', my_ex.likequery(#{brandName}) , '%')
|