万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

250 lines
19 KiB

2 years ago
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.sales.mapper.SalesAccountReconciliationMapper">
<resultMap type="SalesAccountReconciliation" id="SalesAccountReconciliationResult">
<result property="salesFinishId" column="sales_finish_id" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="salesOrderNumber" column="sales_order_number" />
<result property="appointmentNumber" column="appointment_number" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="paymentTerms" column="payment_terms" />
<result property="deliveryConditions" column="delivery_conditions" />
<result property="deliveryMethod" column="delivery_method" />
<result property="orderReceivingMode" column="order_receiving_mode" />
<result property="customerContact" column="customer_contact" />
<result property="customerFactory" column="customer_factory" />
<result property="contactNumber" column="contact_number" />
<result property="businessMembers" column="business_members" />
<result property="customerFax" column="customer_fax" />
<result property="deliveryAddress" column="delivery_address" />
<result property="orderReceivingTime" column="order_receiving_time" />
<result property="billingTime" column="billing_time" />
<result property="customerRemarks" column="customer_remarks" />
<result property="currentInventory" column="current_inventory" />
<result property="creditLimit" column="credit_limit" />
<result property="unpaidAmount" column="unpaid_amount" />
<result property="availableCredit" column="available_credit" />
<result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" />
<result property="totalAmount" column="total_amount" />
<result property="modificationTime" column="modification_time" />
<result property="confirmTime" column="confirm_time" />
<result property="confirmNo" column="confirm_no" />
<result property="confirmName" column="confirm_name" />
<result property="auditNo" column="audit_no" />
<result property="auditName" column="audit_name" />
<result property="auditTime" column="audit_time" />
<result property="auditRemarks" column="audit_remarks" />
<result property="nationalTaxBill" column="national_tax_bill" />
<result property="finishProductCode" column="finish_product_code" />
<result property="finishProductName" column="finish_product_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="stockUnitWeight" column="stock_unit_weight" />
<result property="processPrice" column="process_price" />
<result property="productQuantity" column="product_quantity" />
<result property="amountMoney" column="amount_money" />
<result property="deliveryTime" column="delivery_time" />
<result property="line" column="line" />
<result property="versionNumber" column="version_number" />
<result property="salesExplain" column="sales_explain" />
<result property="customerUseOrNot" column="customer_use_or_not" />
<result property="customerUseQuantity" column="customer_use_quantity" />
<result property="customerUseRemarks" column="customer_use_remarks" />
<result property="accountReconciliationOrNot" column="account_reconciliation_or_not" />
<result property="accountReconciliationPerson" column="account_reconciliation_person" />
<result property="accountReconciliationTime" column="account_reconciliation_time" />
</resultMap>
<!-- <sql id="selectSalesAccountReconciliationVo">-->
<!-- select sales_order_code, sales_order_number, appointment_number, enterprise_code, enterprise_name, payment_terms, delivery_conditions, delivery_method, order_receiving_mode, customer_contact, customer_factory, contact_number, business_members, customer_fax, delivery_address, order_receiving_time, billing_time, customer_remarks, current_inventory, credit_limit, unpaid_amount, available_credit, confirm_tax, tax_rate, total_amount, modification_time, confirm_time, confirm_no, confirm_name, audit_no, audit_name, audit_time, audit_remarks, customer_use_or_not, account_reconciliation_or_not, account_reconciliation_person, account_reconciliation_time, national_tax_bill, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, stock_unit_weight, process_price, product_quantity, amount_money, delivery_time, line, version_number, sales_explain from sales_account_reconciliation-->
<!-- </sql>-->
<sql id="selectSalesAccountReconciliationVo">
select sales_finish_id, sso.sales_order_code AS sales_order_code,sso.sales_order_number AS sales_order_number, appointment_number, sso.enterprise_code AS enterprise_code, sso.enterprise_name AS enterprise_name,
payment_terms, delivery_conditions, delivery_method, order_receiving_mode, customer_contact, customer_factory,
contact_number, business_members, customer_fax, delivery_address, order_receiving_time, billing_time, customer_remarks,
current_inventory, credit_limit, unpaid_amount, available_credit, confirm_tax, tax_rate, total_amount, modification_time,
confirm_time, confirm_no, confirm_name, audit_no, audit_time, audit_remarks, national_tax_bill,finish_product_code, finish_product_name,
specification_model, type_machine, inventory_unit, stock_unit_weight, process_price, product_quantity, amount_money,
delivery_time, line, version_number, sales_explain, customer_use_or_not, customer_use_quantity, customer_use_remarks,
account_reconciliation_or_not, account_reconciliation_person, account_reconciliation_time
FROM sys_sales_order sso,sys_sales_finish ssf
WHERE sso.sales_order_code = ssf.sales_order_code AND sso.sales_order_number = ssf.sales_order_number
</sql>
<select id="selectSalesAccountReconciliationList" parameterType="SalesAccountReconciliation" resultMap="SalesAccountReconciliationResult">
<include refid="selectSalesAccountReconciliationVo"/>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and sso.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and sso.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and sso.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerUseOrNot != null and customerUseOrNot != ''"> and customer_use_or_not = #{customerUseOrNot}</if>
<if test="accountReconciliationOrNot != null and accountReconciliationOrNot != ''"> and account_reconciliation_or_not = #{accountReconciliationOrNot}</if>
<if test="nationalTaxBill != null and nationalTaxBill != ''"> and national_tax_bill = #{nationalTaxBill}</if>
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if>
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if>
</select>
<!-- -->
<!-- <select id="selectSalesAccountReconciliationById" parameterType="String" resultMap="SalesAccountReconciliationResult">-->
<!-- <include refid="selectSalesAccountReconciliationVo"/>-->
<!-- where sales_order_code = #{salesOrderCode}-->
<!-- </select>-->
<!-- -->
<!-- <insert id="insertSalesAccountReconciliation" parameterType="SalesAccountReconciliation">-->
<!-- insert into sales_account_reconciliation-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="salesOrderCode != null">sales_order_code,</if>-->
<!-- <if test="salesOrderNumber != null">sales_order_number,</if>-->
<!-- <if test="appointmentNumber != null">appointment_number,</if>-->
<!-- <if test="enterpriseCode != null">enterprise_code,</if>-->
<!-- <if test="enterpriseName != null">enterprise_name,</if>-->
<!-- <if test="paymentTerms != null">payment_terms,</if>-->
<!-- <if test="deliveryConditions != null">delivery_conditions,</if>-->
<!-- <if test="deliveryMethod != null">delivery_method,</if>-->
<!-- <if test="orderReceivingMode != null">order_receiving_mode,</if>-->
<!-- <if test="customerContact != null">customer_contact,</if>-->
<!-- <if test="customerFactory != null">customer_factory,</if>-->
<!-- <if test="contactNumber != null">contact_number,</if>-->
<!-- <if test="businessMembers != null">business_members,</if>-->
<!-- <if test="customerFax != null">customer_fax,</if>-->
<!-- <if test="deliveryAddress != null">delivery_address,</if>-->
<!-- <if test="orderReceivingTime != null">order_receiving_time,</if>-->
<!-- <if test="billingTime != null">billing_time,</if>-->
<!-- <if test="customerRemarks != null">customer_remarks,</if>-->
<!-- <if test="currentInventory != null">current_inventory,</if>-->
<!-- <if test="creditLimit != null">credit_limit,</if>-->
<!-- <if test="unpaidAmount != null">unpaid_amount,</if>-->
<!-- <if test="availableCredit != null">available_credit,</if>-->
<!-- <if test="confirmTax != null">confirm_tax,</if>-->
<!-- <if test="taxRate != null">tax_rate,</if>-->
<!-- <if test="totalAmount != null">total_amount,</if>-->
<!-- <if test="modificationTime != null">modification_time,</if>-->
<!-- <if test="confirmTime != null">confirm_time,</if>-->
<!-- <if test="confirmNo != null">confirm_no,</if>-->
<!-- <if test="confirmName != null">confirm_name,</if>-->
<!-- <if test="auditNo != null">audit_no,</if>-->
<!-- <if test="auditName != null">audit_name,</if>-->
<!-- <if test="auditTime != null">audit_time,</if>-->
<!-- <if test="auditRemarks != null">audit_remarks,</if>-->
<!-- <if test="customerUseOrNot != null">customer_use_or_not,</if>-->
<!-- <if test="accountReconciliationOrNot != null">account_reconciliation_or_not,</if>-->
<!-- <if test="accountReconciliationPerson != null">account_reconciliation_person,</if>-->
<!-- <if test="accountReconciliationTime != null">account_reconciliation_time,</if>-->
<!-- <if test="nationalTaxBill != null">national_tax_bill,</if>-->
<!-- <if test="finishProductCode != null">finish_product_code,</if>-->
<!-- <if test="finishProductName != null">finish_product_name,</if>-->
<!-- <if test="specificationModel != null">specification_model,</if>-->
<!-- <if test="typeMachine != null">type_machine,</if>-->
<!-- <if test="inventoryUnit != null">inventory_unit,</if>-->
<!-- <if test="stockUnitWeight != null">stock_unit_weight,</if>-->
<!-- <if test="processPrice != null">process_price,</if>-->
<!-- <if test="productQuantity != null">product_quantity,</if>-->
<!-- <if test="amountMoney != null">amount_money,</if>-->
<!-- <if test="deliveryTime != null">delivery_time,</if>-->
<!-- <if test="line != null">line,</if>-->
<!-- <if test="versionNumber != null">version_number,</if>-->
<!-- <if test="salesExplain != null">sales_explain,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="salesOrderCode != null">#{salesOrderCode},</if>-->
<!-- <if test="salesOrderNumber != null">#{salesOrderNumber},</if>-->
<!-- <if test="appointmentNumber != null">#{appointmentNumber},</if>-->
<!-- <if test="enterpriseCode != null">#{enterpriseCode},</if>-->
<!-- <if test="enterpriseName != null">#{enterpriseName},</if>-->
<!-- <if test="paymentTerms != null">#{paymentTerms},</if>-->
<!-- <if test="deliveryConditions != null">#{deliveryConditions},</if>-->
<!-- <if test="deliveryMethod != null">#{deliveryMethod},</if>-->
<!-- <if test="orderReceivingMode != null">#{orderReceivingMode},</if>-->
<!-- <if test="customerContact != null">#{customerContact},</if>-->
<!-- <if test="customerFactory != null">#{customerFactory},</if>-->
<!-- <if test="contactNumber != null">#{contactNumber},</if>-->
<!-- <if test="businessMembers != null">#{businessMembers},</if>-->
<!-- <if test="customerFax != null">#{customerFax},</if>-->
<!-- <if test="deliveryAddress != null">#{deliveryAddress},</if>-->
<!-- <if test="orderReceivingTime != null">#{orderReceivingTime},</if>-->
<!-- <if test="billingTime != null">#{billingTime},</if>-->
<!-- <if test="customerRemarks != null">#{customerRemarks},</if>-->
<!-- <if test="currentInventory != null">#{currentInventory},</if>-->
<!-- <if test="creditLimit != null">#{creditLimit},</if>-->
<!-- <if test="unpaidAmount != null">#{unpaidAmount},</if>-->
<!-- <if test="availableCredit != null">#{availableCredit},</if>-->
<!-- <if test="confirmTax != null">#{confirmTax},</if>-->
<!-- <if test="taxRate != null">#{taxRate},</if>-->
<!-- <if test="totalAmount != null">#{totalAmount},</if>-->
<!-- <if test="modificationTime != null">#{modificationTime},</if>-->
<!-- <if test="confirmTime != null">#{confirmTime},</if>-->
<!-- <if test="confirmNo != null">#{confirmNo},</if>-->
<!-- <if test="confirmName != null">#{confirmName},</if>-->
<!-- <if test="auditNo != null">#{auditNo},</if>-->
<!-- <if test="auditName != null">#{auditName},</if>-->
<!-- <if test="auditTime != null">#{auditTime},</if>-->
<!-- <if test="auditRemarks != null">#{auditRemarks},</if>-->
<!-- <if test="customerUseOrNot != null">#{customerUseOrNot},</if>-->
<!-- <if test="accountReconciliationOrNot != null">#{accountReconciliationOrNot},</if>-->
<!-- <if test="accountReconciliationPerson != null">#{accountReconciliationPerson},</if>-->
<!-- <if test="accountReconciliationTime != null">#{accountReconciliationTime},</if>-->
<!-- <if test="nationalTaxBill != null">#{nationalTaxBill},</if>-->
<!-- <if test="finishProductCode != null">#{finishProductCode},</if>-->
<!-- <if test="finishProductName != null">#{finishProductName},</if>-->
<!-- <if test="specificationModel != null">#{specificationModel},</if>-->
<!-- <if test="typeMachine != null">#{typeMachine},</if>-->
<!-- <if test="inventoryUnit != null">#{inventoryUnit},</if>-->
<!-- <if test="stockUnitWeight != null">#{stockUnitWeight},</if>-->
<!-- <if test="processPrice != null">#{processPrice},</if>-->
<!-- <if test="productQuantity != null">#{productQuantity},</if>-->
<!-- <if test="amountMoney != null">#{amountMoney},</if>-->
<!-- <if test="deliveryTime != null">#{deliveryTime},</if>-->
<!-- <if test="line != null">#{line},</if>-->
<!-- <if test="versionNumber != null">#{versionNumber},</if>-->
<!-- <if test="salesExplain != null">#{salesExplain},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<update id="updateSalesAccountReconciliation" parameterType="SalesAccountReconciliation">
update sys_sales_finish
<trim prefix="SET" suffixOverrides=",">
<if test="salesOrderNumber != null">sales_order_number = #{salesOrderNumber},</if>
<if test="appointmentNumber != null">appointment_number = #{appointmentNumber},</if>
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="stockUnitWeight != null">stock_unit_weight = #{stockUnitWeight},</if>
<if test="processPrice != null">process_price = #{processPrice},</if>
<if test="productQuantity != null">product_quantity = #{productQuantity},</if>
<if test="amountMoney != null">amount_money = #{amountMoney},</if>
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
<if test="line != null">line = #{line},</if>
<if test="versionNumber != null">version_number = #{versionNumber},</if>
<if test="salesExplain != null">sales_explain = #{salesExplain},</if>
<if test="customerUseOrNot != null">customer_use_or_not = #{customerUseOrNot},</if>
<if test="customerUseQuantity != null">customer_use_quantity = #{customerUseQuantity},</if>
<if test="customerUseRemarks != null">customer_use_remarks = #{customerUseRemarks},</if>
<if test="accountReconciliationOrNot != null">account_reconciliation_or_not = #{accountReconciliationOrNot},</if>
<if test="accountReconciliationPerson != null">account_reconciliation_person = #{accountReconciliationPerson},</if>
<if test="accountReconciliationTime != null">account_reconciliation_time = #{accountReconciliationTime},</if>
</trim>
where sales_finish_id = #{salesFinishId}
</update>
<!-- <delete id="deleteSalesAccountReconciliationById" parameterType="String">-->
<!-- delete from sales_account_reconciliation where sales_order_code = #{salesOrderCode}-->
<!-- </delete>-->
<!-- <delete id="deleteSalesAccountReconciliationByIds" parameterType="String">-->
<!-- delete from sales_account_reconciliation where sales_order_code in -->
<!-- <foreach item="salesOrderCode" collection="array" open="(" separator="," close=")">-->
<!-- #{salesOrderCode}-->
<!-- </foreach>-->
<!-- </delete>-->
</mapper>