|
@@ -62,7 +62,6 @@
|
|
|
AND tpi.wh_id = #{whId} ::uuid
|
|
AND tpi.wh_id = #{whId} ::uuid
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 采购明细报表明细条件列 -->
|
|
<!-- 采购明细报表明细条件列 -->
|
|
|
<sql id="Condition_PurDetailReport">
|
|
<sql id="Condition_PurDetailReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -125,7 +124,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 采购明细报表主表条件列 -->
|
|
<!-- 采购明细报表主表条件列 -->
|
|
|
<sql id="Condition_PurReport">
|
|
<sql id="Condition_PurReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -169,7 +167,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 销售明细报表明细条件列 -->
|
|
<!-- 销售明细报表明细条件列 -->
|
|
|
<sql id="Condition_OrdDetailReport">
|
|
<sql id="Condition_OrdDetailReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -242,7 +239,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 销售明细报表主表条件列 -->
|
|
<!-- 销售明细报表主表条件列 -->
|
|
|
<sql id="Condition_OrdReport">
|
|
<sql id="Condition_OrdReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -292,7 +288,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 出库明细报表明细条件列 -->
|
|
<!-- 出库明细报表明细条件列 -->
|
|
|
<sql id="Condition_OutboundDetailReport">
|
|
<sql id="Condition_OutboundDetailReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -358,7 +353,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 出库明细报表主表条件列 -->
|
|
<!-- 出库明细报表主表条件列 -->
|
|
|
<sql id="Condition_OutboundReport">
|
|
<sql id="Condition_OutboundReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -402,7 +396,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 入库明细报表明细条件列 -->
|
|
<!-- 入库明细报表明细条件列 -->
|
|
|
<sql id="Condition_IntoboundDetailReport">
|
|
<sql id="Condition_IntoboundDetailReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -469,7 +462,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 入库明细报表主表条件列 -->
|
|
<!-- 入库明细报表主表条件列 -->
|
|
|
<sql id="Condition_IntoboundReport">
|
|
<sql id="Condition_IntoboundReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -513,7 +505,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 客户收款明细表条件列 -->
|
|
<!-- 客户收款明细表条件列 -->
|
|
|
<sql id="Condition_RecPayDetailReport">
|
|
<sql id="Condition_RecPayDetailReport">
|
|
|
<where>
|
|
<where>
|
|
@@ -549,7 +540,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 采购明细报表主表 -->
|
|
<!-- 采购明细报表主表 -->
|
|
|
<select id="getPurReport" resultType="java.util.Map">
|
|
<select id="getPurReport" resultType="java.util.Map">
|
|
|
select
|
|
select
|
|
@@ -571,6 +561,7 @@
|
|
|
,tpp.return_amt as "returnInAmtSum"
|
|
,tpp.return_amt as "returnInAmtSum"
|
|
|
,tpp.amt_payable as "amtPayable"
|
|
,tpp.amt_payable as "amtPayable"
|
|
|
,tpp.amt_residue as "amtResidue"
|
|
,tpp.amt_residue as "amtResidue"
|
|
|
|
|
+ ,tpp.make_time as "makeTime"
|
|
|
,tpp.remarks
|
|
,tpp.remarks
|
|
|
FROM dkic_b.t_psi_purchase tpp
|
|
FROM dkic_b.t_psi_purchase tpp
|
|
|
Left join dkic_b.t_mst_org tmo on tpp.org_id = tmo.org_id
|
|
Left join dkic_b.t_mst_org tmo on tpp.org_id = tmo.org_id
|
|
@@ -586,7 +577,6 @@
|
|
|
limit #{end} offset #{start}
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 采购明细报表主表Count-->
|
|
<!-- 采购明细报表主表Count-->
|
|
|
<select id="getPurReportCount" resultType="java.lang.Long">
|
|
<select id="getPurReportCount" resultType="java.lang.Long">
|
|
|
SELECT count(1)
|
|
SELECT count(1)
|
|
@@ -600,7 +590,6 @@
|
|
|
left join sys.t_data_kind tdk1 on tdk1.kind_code = tpp.pur_type
|
|
left join sys.t_data_kind tdk1 on tdk1.kind_code = tpp.pur_type
|
|
|
<include refid="Condition_PurReport"/>
|
|
<include refid="Condition_PurReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 采购明细报表明细 -->
|
|
<!-- 采购明细报表明细 -->
|
|
|
<select id="getPurDetailReport" resultType="java.util.Map">
|
|
<select id="getPurDetailReport" resultType="java.util.Map">
|
|
|
select
|
|
select
|
|
@@ -686,7 +675,6 @@
|
|
|
left join sys.t_data_kind tdk3 on tdk3.kind_code = tppi.into_status
|
|
left join sys.t_data_kind tdk3 on tdk3.kind_code = tppi.into_status
|
|
|
<include refid="Condition_PurDetailReport"/>
|
|
<include refid="Condition_PurDetailReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 销售明细报表主表 -->
|
|
<!-- 销售明细报表主表 -->
|
|
|
<select id="getOrderReport" resultType="java.util.Map">
|
|
<select id="getOrderReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -742,7 +730,6 @@
|
|
|
left join sys.t_data_kind as tdk2 on t.order_status = tdk2.kind_code
|
|
left join sys.t_data_kind as tdk2 on t.order_status = tdk2.kind_code
|
|
|
<include refid="Condition_OrdReport"/>
|
|
<include refid="Condition_OrdReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 销售明细报表明细 -->
|
|
<!-- 销售明细报表明细 -->
|
|
|
<select id="getOrderDetailReport" resultType="java.util.Map">
|
|
<select id="getOrderDetailReport" resultType="java.util.Map">
|
|
|
select
|
|
select
|
|
@@ -832,7 +819,6 @@
|
|
|
left join dkic_b.t_psi_outbound as tpo on tpo.from_id=t.order_id
|
|
left join dkic_b.t_psi_outbound as tpo on tpo.from_id=t.order_id
|
|
|
<include refid="Condition_OrdDetailReport"/>
|
|
<include refid="Condition_OrdDetailReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 出库明细报表主表 -->
|
|
<!-- 出库明细报表主表 -->
|
|
|
<select id="getOutboundReport" resultType="java.util.Map">
|
|
<select id="getOutboundReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -856,6 +842,7 @@
|
|
|
t.return_qty as "returnOutQtySum",
|
|
t.return_qty as "returnOutQtySum",
|
|
|
t.return_amt as "returnOutAmtSum",
|
|
t.return_amt as "returnOutAmtSum",
|
|
|
t.out_date as "outDate",
|
|
t.out_date as "outDate",
|
|
|
|
|
+ t.make_time as "makeTime",
|
|
|
t.remarks,
|
|
t.remarks,
|
|
|
makestaff.staff_name as "makeStaffName"
|
|
makestaff.staff_name as "makeStaffName"
|
|
|
FROM dkic_b.t_psi_outbound as t
|
|
FROM dkic_b.t_psi_outbound as t
|
|
@@ -887,7 +874,6 @@
|
|
|
LEFT JOIN sys.t_data_kind tdktype ON tdktype.kind_code = t.out_type
|
|
LEFT JOIN sys.t_data_kind tdktype ON tdktype.kind_code = t.out_type
|
|
|
<include refid="Condition_OutboundReport"/>
|
|
<include refid="Condition_OutboundReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 出库明细报表明细 -->
|
|
<!-- 出库明细报表明细 -->
|
|
|
<select id="getOutboundDetailReport" resultType="java.util.Map">
|
|
<select id="getOutboundDetailReport" resultType="java.util.Map">
|
|
|
select
|
|
select
|
|
@@ -969,7 +955,6 @@
|
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
|
|
|
<include refid="Condition_OutboundDetailReport"/>
|
|
<include refid="Condition_OutboundDetailReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 入库明细报表主表 -->
|
|
<!-- 入库明细报表主表 -->
|
|
|
<select id="getInboundlReport" resultType="java.util.Map">
|
|
<select id="getInboundlReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -994,6 +979,7 @@
|
|
|
t.return_amt as "returnintoAmtSum",
|
|
t.return_amt as "returnintoAmtSum",
|
|
|
t.into_date as "intoDate",
|
|
t.into_date as "intoDate",
|
|
|
tmw.wh_name as "whName",
|
|
tmw.wh_name as "whName",
|
|
|
|
|
+ t.make_time as "makeTime",
|
|
|
t.remarks,
|
|
t.remarks,
|
|
|
makestaff.staff_name as "makeStaffName"
|
|
makestaff.staff_name as "makeStaffName"
|
|
|
FROM dkic_b.t_psi_inbound as t
|
|
FROM dkic_b.t_psi_inbound as t
|
|
@@ -1027,7 +1013,6 @@
|
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = t.wh_id
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = t.wh_id
|
|
|
<include refid="Condition_IntoboundReport"/>
|
|
<include refid="Condition_IntoboundReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 入库明细报表明细 -->
|
|
<!-- 入库明细报表明细 -->
|
|
|
<select id="getInboundDetailReport" resultType="java.util.Map">
|
|
<select id="getInboundDetailReport" resultType="java.util.Map">
|
|
|
select
|
|
select
|
|
@@ -1106,7 +1091,6 @@
|
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
|
|
|
<include refid="Condition_IntoboundDetailReport"/>
|
|
<include refid="Condition_IntoboundDetailReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<!-- 客户收款明细报表主表 -->
|
|
<!-- 客户收款明细报表主表 -->
|
|
|
<select id="getRecPayDetailReport" resultType="java.util.Map">
|
|
<select id="getRecPayDetailReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -1149,7 +1133,6 @@
|
|
|
left join dkic_b.t_mst_money_account tmma on tmma.mac_id = tmrpi.mac_id
|
|
left join dkic_b.t_mst_money_account tmma on tmma.mac_id = tmrpi.mac_id
|
|
|
<include refid="Condition_RecPayDetailReport"/>
|
|
<include refid="Condition_RecPayDetailReport"/>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<sql id="ConditionPurTrackingReport">
|
|
<sql id="ConditionPurTrackingReport">
|
|
|
<where>
|
|
<where>
|
|
|
<if test="cpId != null">
|
|
<if test="cpId != null">
|
|
@@ -1157,7 +1140,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
<!-- 销售跟踪表 列表查询 -->
|
|
<!-- 销售跟踪表 列表查询 -->
|
|
|
<select id="getSalesTrackingReport" resultType="java.util.Map">
|
|
<select id="getSalesTrackingReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -1221,7 +1203,6 @@
|
|
|
limit #{end} offset #{start}
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<sql id="ConditionSalesTrackingReport">
|
|
<sql id="ConditionSalesTrackingReport">
|
|
|
<where>
|
|
<where>
|
|
|
<if test="orderNo != null">
|
|
<if test="orderNo != null">
|
|
@@ -1248,8 +1229,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<!-- 销售明细查询 -->
|
|
<!-- 销售明细查询 -->
|
|
|
<select id="getSalesItemReport" resultType="java.util.Map">
|
|
<select id="getSalesItemReport" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -1299,7 +1278,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
<sql id="ConditionSaleItem">
|
|
<sql id="ConditionSaleItem">
|
|
|
<where>
|
|
<where>
|
|
|
<if test="orderId != null and orderId != ''">
|
|
<if test="orderId != null and orderId != ''">
|
|
@@ -1618,7 +1596,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<select id="getPurTrackingReportCount" resultType="java.lang.Long">
|
|
<select id="getPurTrackingReportCount" resultType="java.lang.Long">
|
|
|
SELECT count(1)
|
|
SELECT count(1)
|
|
|
FROM
|
|
FROM
|