|
@@ -327,4 +327,97 @@
|
|
|
AND a.VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectCountIncomeNew" resultType="java.lang.String" parameterType="java.util.Map">
|
|
|
+ select IFNULL(CAST(SUM(PIF_ORDERAMOUT) AS DECIMAL(15,2)), 0.00)
|
|
|
+ from vm_payment_inf, vm_order_inf
|
|
|
+ where PIF_STATUS = '1'
|
|
|
+ and (PIF_PAYTYPE in ('91', '92') or PIF_TRANSTYPE = '00')
|
|
|
+ and PIF_TRANFLOWNO = VOI_ID
|
|
|
+ <if test="nowDate != null and nowDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{nowDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="yesDate != null and yesDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{yesDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="weekDate != null and weekDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="branchId != null and branchId != ''">
|
|
|
+ AND VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="equipmentId != null and equipmentId != ''">
|
|
|
+ AND VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <!--成本-->
|
|
|
+ <select id="selectPredictIncomeNew" resultType="java.lang.String" parameterType="java.util.Map">
|
|
|
+ SELECT IFNULL(CAST(SUM(VCI_COST_PRICE) AS DECIMAL(15,2)), 0.00)
|
|
|
+ FROM vm_order_details a
|
|
|
+ join vm_order_inf vo on vo.VOI_ID = a.VOD_ORDER_ID
|
|
|
+ join vm_payment_inf b on PIF_TRANFLOWNO = VOD_ORDER_ID
|
|
|
+ left join vm_pro_equ_rel c on c.VCI_ID = a.VOD_PRO_EQU_REL_ID
|
|
|
+ WHERE PIF_STATUS = '1' and VOI_PAY_MODE != '93'
|
|
|
+ <if test="nowDate != null and nowDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{nowDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="yesDate != null and yesDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{yesDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="weekDate != null and weekDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="branchId != null and branchId != ''">
|
|
|
+ AND VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="equipmentId != null and equipmentId != ''">
|
|
|
+ AND vo.VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectorderNew" resultType="java.lang.String" parameterType="java.util.Map">
|
|
|
+ SELECT IFNULL(CAST(SUM(VCI_COST_PRICE) AS DECIMAL(15,2)), 0.00)
|
|
|
+ FROM vm_order_details a
|
|
|
+ join vm_order_inf vo on vo.VOI_ID = a.VOD_ORDER_ID
|
|
|
+ join vm_payment_inf b on PIF_TRANFLOWNO = VOD_ORDER_ID
|
|
|
+ left join vm_pro_equ_rel c on c.VCI_ID = a.VOD_PRO_EQU_REL_ID
|
|
|
+ WHERE PIF_STATUS = '1'
|
|
|
+ <if test="nowDate != null and nowDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{nowDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="yesDate != null and yesDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) = #{yesDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="weekDate != null and weekDate != ''">
|
|
|
+ and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="branchId != null and branchId != ''">
|
|
|
+ AND VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="equipmentId != null and equipmentId != ''">
|
|
|
+ AND vo.VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="queryOrderNum" resultType="java.lang.String" parameterType="java.util.Map">
|
|
|
+ SELECT count(1)
|
|
|
+ FROM vm_order_details a
|
|
|
+ join vm_order_inf vo on vo.VOI_ID = a.VOD_ORDER_ID
|
|
|
+ WHERE VOI_STATE = '00'
|
|
|
+ <if test="nowDate != null and nowDate != ''">
|
|
|
+ and substr(VOI_CREATE_TIME,1,8) = #{nowDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="yesDate != null and yesDate != ''">
|
|
|
+ and substr(VOI_CREATE_TIME,1,8) = #{yesDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="weekDate != null and weekDate != ''">
|
|
|
+ and substr(VOI_CREATE_TIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="branchId != null and branchId != ''">
|
|
|
+ AND VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="equipmentId != null and equipmentId != ''">
|
|
|
+ AND vo.VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|