446 lines
20 KiB
XML
446 lines
20 KiB
XML
<?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.sip.mapper.OmsFinanceChargeMapper">
|
|
|
|
<resultMap type="OmsFinanceCharge" id="OmsFinanceChargeResult">
|
|
<id property="id" column="id" />
|
|
<result property="orderCode" column="order_code" />
|
|
<result property="bizChargeDate" column="biz_charge_date" />
|
|
<result property="financeChargeDate" column="finance_charge_date" />
|
|
<result property="incomeWithTaxTotal" column="income_with_tax_total" />
|
|
<result property="incomeWithoutTaxTotal" column="income_without_tax_total" />
|
|
<result property="costSoftwareWithoutTax" column="cost_software_without_tax" />
|
|
<result property="costSoftwareWithTax" column="cost_software_with_tax" />
|
|
<result property="costHardwareWithoutTax" column="cost_hardware_without_tax" />
|
|
<result property="costHardwareWithTax" column="cost_hardware_with_tax" />
|
|
<result property="costSoftwareMaintWithoutTax" column="cost_software_maint_without_tax" />
|
|
<result property="costSoftwareMaintWithTax" column="cost_software_maint_with_tax" />
|
|
<result property="costHardwareMaintWithoutTax" column="cost_hardware_maint_without_tax" />
|
|
<result property="costHardwareMaintWithTax" column="cost_hardware_maint_with_tax" />
|
|
<result property="costProvinceServiceWithTax" column="cost_province_service_with_tax" />
|
|
<result property="costProvinceServiceWithoutTax" column="cost_province_service_without_tax" />
|
|
<result property="costOtherWithTax" column="cost_other_with_tax" />
|
|
<result property="costOtherWithoutTax" column="cost_other_without_tax" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="chargeStatus" column="charge_status" />
|
|
</resultMap>
|
|
|
|
<sql id="selectOmsFinanceChargeVo">
|
|
select t1.id, t1.order_code, t1.biz_charge_date, t1.finance_charge_date,
|
|
t1.income_with_tax_total, t1.income_without_tax_total,
|
|
t1.cost_software_without_tax, t1.cost_software_with_tax,
|
|
t1.cost_hardware_without_tax, t1.cost_hardware_with_tax,
|
|
t1.cost_software_maint_without_tax, t1.cost_software_maint_with_tax,
|
|
t1.cost_hardware_maint_without_tax, t1.cost_hardware_maint_with_tax,
|
|
t1.cost_province_service_with_tax, t1.cost_province_service_without_tax,
|
|
t1.cost_other_with_tax, t1.cost_other_without_tax,
|
|
t1.remark, t1.create_time, t1.update_time,t1.update_by, t1.charge_status
|
|
,t3.project_code,t3.project_name,t2.order_channel,t2.supplier,t2.partner_code,t4.partner_name
|
|
from oms_finance_charge t1
|
|
left join project_order_info t2 on t1.order_code=t2.order_code
|
|
left join project_info t3 on t2.project_id=t3.id
|
|
left join partner_info t4 on t2.partner_code=t4.partner_code
|
|
</sql>
|
|
|
|
<select id="selectOmsFinanceChargeById" parameterType="Long" resultMap="OmsFinanceChargeResult">
|
|
<include refid="selectOmsFinanceChargeVo"/>
|
|
where t1.id = #{id}
|
|
</select>
|
|
|
|
<select id="selectOmsFinanceChargeList" parameterType="OmsFinanceCharge" resultMap="OmsFinanceChargeResult">
|
|
<include refid="selectOmsFinanceChargeVo"/>
|
|
<where>
|
|
<if test="orderCode != null and orderCode != ''">
|
|
and t1.order_code = #{orderCode}
|
|
</if>
|
|
<if test="bizChargeDate != null">
|
|
and t1.biz_charge_date = #{bizChargeDate}
|
|
</if>
|
|
<if test="financeChargeDate != null">
|
|
and t1.finance_charge_date = #{financeChargeDate}
|
|
</if>
|
|
<if test="incomeWithTaxTotal != null">
|
|
and t1.income_with_tax_total = #{incomeWithTaxTotal}
|
|
</if>
|
|
<if test="incomeWithoutTaxTotal != null">
|
|
and t1.income_without_tax_total = #{incomeWithoutTaxTotal}
|
|
</if>
|
|
<if test="costSoftwareWithoutTax != null">
|
|
and t1.cost_software_without_tax = #{costSoftwareWithoutTax}
|
|
</if>
|
|
<if test="costSoftwareWithTax != null">
|
|
and t1.cost_software_with_tax = #{costSoftwareWithTax}
|
|
</if>
|
|
<if test="costHardwareWithoutTax != null">
|
|
and t1.cost_hardware_without_tax = #{costHardwareWithoutTax}
|
|
</if>
|
|
<if test="costHardwareWithTax != null">
|
|
and t1.cost_hardware_with_tax = #{costHardwareWithTax}
|
|
</if>
|
|
<if test="costSoftwareMaintWithoutTax != null">
|
|
and t1.cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax}
|
|
</if>
|
|
<if test="costSoftwareMaintWithTax != null">
|
|
and t1.cost_software_maint_with_tax = #{costSoftwareMaintWithTax}
|
|
</if>
|
|
<if test="costHardwareMaintWithoutTax != null">
|
|
and t1.cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax}
|
|
</if>
|
|
<if test="costHardwareMaintWithTax != null">
|
|
and t1.cost_hardware_maint_with_tax = #{costHardwareMaintWithTax}
|
|
</if>
|
|
<if test="costProvinceServiceWithTax != null">
|
|
and t1.cost_province_service_with_tax = #{costProvinceServiceWithTax}
|
|
</if>
|
|
<if test="costProvinceServiceWithoutTax != null">
|
|
and t1.cost_province_service_without_tax = #{costProvinceServiceWithoutTax}
|
|
</if>
|
|
<if test="costOtherWithTax != null">
|
|
and t1.cost_other_with_tax = #{costOtherWithTax}
|
|
</if>
|
|
<if test="costOtherWithoutTax != null">
|
|
and t1.cost_other_without_tax = #{costOtherWithoutTax}
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
and t1.remark like concat('%', #{remark}, '%')
|
|
</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">
|
|
and t1.charge_status = #{chargeStatus}
|
|
</if>
|
|
<if test="chargeStatusList != null and chargeStatusList.size>0">
|
|
and t1.charge_status in (
|
|
<foreach collection="chargeStatusList" item="chargeStatus" separator=",">
|
|
#{chargeStatus}
|
|
</foreach>
|
|
)
|
|
</if>
|
|
<if test="projectCode != null and projectCode != ''">
|
|
and t3.project_code = #{projectCode}
|
|
</if>
|
|
<if test="projectName != null and projectName != ''">
|
|
and t3.project_name like concat('%', #{projectName}, '%')
|
|
</if>
|
|
<if test="partnerName != null and partnerName != ''">
|
|
and t4.partner_name like concat('%', #{partnerName}, '%')
|
|
</if>
|
|
<if test="params.startUpdateTime !=null or params.endUpdateTime !=null">
|
|
<choose>
|
|
<when test="params.startUpdateTime !=null and params.endUpdateTime !=null">
|
|
and t1.update_time between #{params.startUpdateTime} and #{params.endUpdateTime}
|
|
</when>
|
|
<when test="params.startUpdateTime !=null">
|
|
and t1.update_time <![CDATA[ >= ]]> #{params.startUpdateTime}
|
|
</when>
|
|
<when test="params.endUpdateTime !=null">
|
|
and t1.update_time <![CDATA[ <= ]]> #{params.endUpdateTime}
|
|
</when>
|
|
</choose>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<insert id="insertOmsFinanceCharge" parameterType="OmsFinanceCharge" useGeneratedKeys="true" keyProperty="id">
|
|
insert into oms_finance_charge
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderCode != null and orderCode != ''">
|
|
order_code,
|
|
</if>
|
|
<if test="bizChargeDate != null">
|
|
biz_charge_date,
|
|
</if>
|
|
<if test="financeChargeDate != null">
|
|
finance_charge_date,
|
|
</if>
|
|
<if test="incomeWithTaxTotal != null">
|
|
income_with_tax_total,
|
|
</if>
|
|
<if test="incomeWithoutTaxTotal != null">
|
|
income_without_tax_total,
|
|
</if>
|
|
<if test="costSoftwareWithoutTax != null">
|
|
cost_software_without_tax,
|
|
</if>
|
|
<if test="costSoftwareWithTax != null">
|
|
cost_software_with_tax,
|
|
</if>
|
|
<if test="costHardwareWithoutTax != null">
|
|
cost_hardware_without_tax,
|
|
</if>
|
|
<if test="costHardwareWithTax != null">
|
|
cost_hardware_with_tax,
|
|
</if>
|
|
<if test="costSoftwareMaintWithoutTax != null">
|
|
cost_software_maint_without_tax,
|
|
</if>
|
|
<if test="costSoftwareMaintWithTax != null">
|
|
cost_software_maint_with_tax,
|
|
</if>
|
|
<if test="costHardwareMaintWithoutTax != null">
|
|
cost_hardware_maint_without_tax,
|
|
</if>
|
|
<if test="costHardwareMaintWithTax != null">
|
|
cost_hardware_maint_with_tax,
|
|
</if>
|
|
<if test="costProvinceServiceWithTax != null">
|
|
cost_province_service_with_tax,
|
|
</if>
|
|
<if test="costProvinceServiceWithoutTax != null">
|
|
cost_province_service_without_tax,
|
|
</if>
|
|
<if test="costOtherWithTax != null">
|
|
cost_other_with_tax,
|
|
</if>
|
|
<if test="costOtherWithoutTax != null">
|
|
cost_other_without_tax,
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark,
|
|
</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">
|
|
charge_status,
|
|
</if>
|
|
create_time,
|
|
update_time
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderCode != null and orderCode != ''">
|
|
#{orderCode},
|
|
</if>
|
|
<if test="bizChargeDate != null">
|
|
#{bizChargeDate},
|
|
</if>
|
|
<if test="financeChargeDate != null">
|
|
#{financeChargeDate},
|
|
</if>
|
|
<if test="incomeWithTaxTotal != null">
|
|
#{incomeWithTaxTotal},
|
|
</if>
|
|
<if test="incomeWithoutTaxTotal != null">
|
|
#{incomeWithoutTaxTotal},
|
|
</if>
|
|
<if test="costSoftwareWithoutTax != null">
|
|
#{costSoftwareWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareWithTax != null">
|
|
#{costSoftwareWithTax},
|
|
</if>
|
|
<if test="costHardwareWithoutTax != null">
|
|
#{costHardwareWithoutTax},
|
|
</if>
|
|
<if test="costHardwareWithTax != null">
|
|
#{costHardwareWithTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithoutTax != null">
|
|
#{costSoftwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithTax != null">
|
|
#{costSoftwareMaintWithTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithoutTax != null">
|
|
#{costHardwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithTax != null">
|
|
#{costHardwareMaintWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithTax != null">
|
|
#{costProvinceServiceWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithoutTax != null">
|
|
#{costProvinceServiceWithoutTax},
|
|
</if>
|
|
<if test="costOtherWithTax != null">
|
|
#{costOtherWithTax},
|
|
</if>
|
|
<if test="costOtherWithoutTax != null">
|
|
#{costOtherWithoutTax},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
#{remark},
|
|
</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">
|
|
#{chargeStatus},
|
|
</if>
|
|
now(),
|
|
now()
|
|
</trim>
|
|
on duplicate key update charge_status=values(charge_status)
|
|
</insert>
|
|
|
|
<update id="updateOmsFinanceCharge" parameterType="OmsFinanceCharge">
|
|
update oms_finance_charge
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderCode != null and orderCode != ''">
|
|
order_code = #{orderCode},
|
|
</if>
|
|
<if test="bizChargeDate != null">
|
|
biz_charge_date = #{bizChargeDate},
|
|
</if>
|
|
<if test="financeChargeDate != null">
|
|
finance_charge_date = #{financeChargeDate},
|
|
</if>
|
|
<if test="incomeWithTaxTotal != null">
|
|
income_with_tax_total = #{incomeWithTaxTotal},
|
|
</if>
|
|
<if test="incomeWithoutTaxTotal != null">
|
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
|
</if>
|
|
<if test="costSoftwareWithoutTax != null">
|
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareWithTax != null">
|
|
cost_software_with_tax = #{costSoftwareWithTax},
|
|
</if>
|
|
<if test="costHardwareWithoutTax != null">
|
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
|
</if>
|
|
<if test="costHardwareWithTax != null">
|
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithoutTax != null">
|
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithTax != null">
|
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithoutTax != null">
|
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithTax != null">
|
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithTax != null">
|
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithoutTax != null">
|
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
|
</if>
|
|
<if test="costOtherWithTax != null">
|
|
cost_other_with_tax = #{costOtherWithTax},
|
|
</if>
|
|
<if test="costOtherWithoutTax != null">
|
|
cost_other_without_tax = #{costOtherWithoutTax},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark = #{remark},
|
|
</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">
|
|
charge_status = #{chargeStatus},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
update_time = now()
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
<update id="updateOmsFinanceChargeByOrderCode">
|
|
update oms_finance_charge
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="bizChargeDate != null">
|
|
biz_charge_date = #{bizChargeDate},
|
|
</if>
|
|
<if test="financeChargeDate != null">
|
|
finance_charge_date = #{financeChargeDate},
|
|
</if>
|
|
<if test="incomeWithTaxTotal != null">
|
|
income_with_tax_total = #{incomeWithTaxTotal},
|
|
</if>
|
|
<if test="incomeWithoutTaxTotal != null">
|
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
|
</if>
|
|
<if test="costSoftwareWithoutTax != null">
|
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareWithTax != null">
|
|
cost_software_with_tax = #{costSoftwareWithTax},
|
|
</if>
|
|
<if test="costHardwareWithoutTax != null">
|
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
|
</if>
|
|
<if test="costHardwareWithTax != null">
|
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithoutTax != null">
|
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costSoftwareMaintWithTax != null">
|
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithoutTax != null">
|
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
|
</if>
|
|
<if test="costHardwareMaintWithTax != null">
|
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithTax != null">
|
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
|
</if>
|
|
<if test="costProvinceServiceWithoutTax != null">
|
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
|
</if>
|
|
<if test="costOtherWithTax != null">
|
|
cost_other_with_tax = #{costOtherWithTax},
|
|
</if>
|
|
<if test="costOtherWithoutTax != null">
|
|
cost_other_without_tax = #{costOtherWithoutTax},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark = #{remark},
|
|
</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">
|
|
charge_status = #{chargeStatus},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
update_time = now()
|
|
</trim>
|
|
where order_code = #{orderCode}
|
|
</update>
|
|
<update id="returnApplyBiz">
|
|
update oms_finance_charge
|
|
set charge_status=#{chargeStatus},
|
|
biz_charge_date=null,
|
|
update_time=now()
|
|
where order_code = #{orderCode}
|
|
</update>
|
|
<update id="revoke">
|
|
update oms_finance_charge set
|
|
finance_charge_date = #{financeChargeDate},
|
|
income_with_tax_total = #{incomeWithTaxTotal},
|
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
|
cost_software_with_tax = #{costSoftwareWithTax},
|
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
|
cost_other_with_tax = #{costOtherWithTax},
|
|
cost_other_without_tax = #{costOtherWithoutTax},
|
|
remark = #{remark},
|
|
charge_status = #{chargeStatus},
|
|
update_by = #{updateBy},
|
|
update_time = now()
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteOmsFinanceChargeById" parameterType="Long">
|
|
delete from oms_finance_charge where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteOmsFinanceChargeByIds" parameterType="String">
|
|
delete from oms_finance_charge where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |