|
@@ -2,4 +2,124 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.PurchaseClosingReportMapper">
|
|
|
|
|
|
+
|
|
|
+ <!-- 获得采购入库统计总数 -->
|
|
|
+ <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
+ SELECT
|
|
|
+ COUNT(id)
|
|
|
+ FROM purchase_closing_report
|
|
|
+ WHERE
|
|
|
+ delete_flag = '0'
|
|
|
+ AND comp_id = #{compId}
|
|
|
+ <if test="businessKeys != null and businessKeys.size > 0">
|
|
|
+ and(
|
|
|
+ <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
|
+ id = #{businessValue}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="statusSet != null and statusSet.size > 0">
|
|
|
+ or (
|
|
|
+ <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
|
|
|
+ t1.status_flag =
|
|
|
+ <if test="statusId != null">
|
|
|
+ #{statusId}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
+ <if test="searchType == 1">
|
|
|
+ AND status_flag = '1'
|
|
|
+ </if>
|
|
|
+ <if test="searchType == 2">
|
|
|
+ AND amount_ing_payable-amount_ed_payable>0
|
|
|
+ </if>
|
|
|
+ <if test="searchType == 3">
|
|
|
+ AND amount_ing_payable-amount_ed_payable=0
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="contractNo != null and contractNo != ''">
|
|
|
+ contract_no = #{contractNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <!-- 获得采购入库统计列表 -->
|
|
|
+ <select id="getListByCondition" parameterType="Map"
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.PurchaseReceiptReport">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ comp_id as compId,
|
|
|
+ contract_no as contractNo,
|
|
|
+ goods_name as goodsName,
|
|
|
+ position_number as positionnumber,
|
|
|
+ tran_car_no as tranCarNo,
|
|
|
+ car_no as carNo,
|
|
|
+ warehousing_date as warehousingDate,
|
|
|
+ water_content as waterContent,
|
|
|
+ protein,
|
|
|
+ settlement_price as settlementPrice,
|
|
|
+ net_weight as netWeight,
|
|
|
+ carry_over_weight as carryOverWeight,
|
|
|
+ deduction_amount AS deductionAmount,
|
|
|
+ deduction_items AS deductionItems,
|
|
|
+ amount_ing_payable as amountIngPayable,
|
|
|
+ amount_ed_payable as amountEdPayable,
|
|
|
+ amount_not_payable as amountNotPayable,
|
|
|
+ payment_screenshot as paymentScreenshot,
|
|
|
+ payment_date as paymentDate,
|
|
|
+ already_invoice as alreadyInvoice,
|
|
|
+ customer_name as customerName,
|
|
|
+ invoice_type as invoiceType,
|
|
|
+ warehouse_name as warehouseName,
|
|
|
+ unit_price as unitPrice,
|
|
|
+ basis_price as basisPrice,
|
|
|
+ unloading_charge as unloading_charge,
|
|
|
+ invoice_fee as invoiceFee,
|
|
|
+ replen,
|
|
|
+ carry_forward as carryForward,
|
|
|
+ status,
|
|
|
+ status_flag as statusFlag,
|
|
|
+ approve_status approveStatus,
|
|
|
+ customer_confirmation_status_flag as customerConfirmationStatusFlag,
|
|
|
+ workflow_id as workflowId
|
|
|
+ FROM purchase_closing_report
|
|
|
+ WHERE
|
|
|
+ delete_flag = '0'
|
|
|
+ AND comp_id = #{compId}
|
|
|
+ <if test="businessKeys != null and businessKeys.size > 0">
|
|
|
+ and(
|
|
|
+ <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
|
+ id = #{businessValue}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="statusSet != null and statusSet.size > 0">
|
|
|
+ or (
|
|
|
+ <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
|
|
|
+ t1.status_flag =
|
|
|
+ <if test="statusId != null">
|
|
|
+ #{statusId}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
+ <if test="searchType == 1">
|
|
|
+ AND status_flag = '1'
|
|
|
+ </if>
|
|
|
+ <if test="searchType == 2">
|
|
|
+ AND amount_ing_payable-amount_ed_payable>0
|
|
|
+ </if>
|
|
|
+ <if test="searchType == 3">
|
|
|
+ AND amount_ing_payable-amount_ed_payable=0
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="contractNo != null and contractNo != ''">
|
|
|
+ contract_no = #{contractNo}
|
|
|
+ </if>
|
|
|
+ ORDER BY update_date DESC
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|