<?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.system.mapper.PaidMoneyMapper">
|
|
<resultMap type="com.ruoyi.system.domain.PaidMoney" id="PaidMoneyResult">
|
<result property="id" column="id" />
|
<result property="paidMoneyClass" column="PaidMoneyClass" />
|
<result property="serviceOrdIDDt" column="ServiceOrdIDDt" />
|
<result property="dispatchOrdIDDt" column="DispatchOrdIDDt" />
|
<result property="paidMoney" column="PaidMoney" />
|
<result property="paidMoneyType" column="PaidMoneyType" />
|
<result property="paidMoneyMono" column="PaidMoneyMono" />
|
<result property="paidMoneyTime" column="PaidMoneyTime" />
|
<result property="paidMoneyOaID" column="PaidMoneyOaID" />
|
<result property="paidMoneyUnitID" column="PaidMoneyUnitID" />
|
<result property="paidMoneyAPID" column="PaidMoney_AP_ID" />
|
<result property="paidMoneyAPTime" column="PaidMoney_AP_Time" />
|
<result property="paidMoneyAPCheck" column="PaidMoney_AP_Check" />
|
<result property="paidMoneyTimestamp" column="PaidMoneyTimestamp" />
|
</resultMap>
|
|
<sql id="selectPaidMoneyVo">
|
select id, PaidMoneyClass, ServiceOrdIDDt, DispatchOrdIDDt, PaidMoney, PaidMoneyType,
|
PaidMoneyMono, PaidMoneyTime, PaidMoneyOaID, PaidMoneyUnitID, PaidMoney_AP_ID,
|
PaidMoney_AP_Time, PaidMoney_AP_Check, PaidMoneyTimestamp
|
from PaidMoney
|
</sql>
|
|
<select id="selectById" parameterType="Long" resultMap="PaidMoneyResult">
|
<include refid="selectPaidMoneyVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectByOrderIds" resultMap="PaidMoneyResult">
|
<include refid="selectPaidMoneyVo"/>
|
where ServiceOrdIDDt = #{serviceOrdIDDt}
|
<if test="dispatchOrdIDDt != null">
|
and DispatchOrdIDDt = #{dispatchOrdIDDt}
|
</if>
|
order by PaidMoneyTime desc
|
</select>
|
|
<insert id="insert" parameterType="com.ruoyi.system.domain.PaidMoney" useGeneratedKeys="true" keyProperty="id">
|
insert into PaidMoney
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="paidMoneyClass != null and paidMoneyClass != ''">PaidMoneyClass,</if>
|
<if test="serviceOrdIDDt != null">ServiceOrdIDDt,</if>
|
<if test="dispatchOrdIDDt != null">DispatchOrdIDDt,</if>
|
<if test="paidMoney != null">PaidMoney,</if>
|
<if test="paidMoneyType != null">PaidMoneyType,</if>
|
<if test="paidMoneyMono != null and paidMoneyMono != ''">PaidMoneyMono,</if>
|
<if test="paidMoneyTime != null">PaidMoneyTime,</if>
|
<if test="paidMoneyOaID != null">PaidMoneyOaID,</if>
|
<if test="paidMoneyUnitID != null">PaidMoneyUnitID,</if>
|
<if test="paidMoneyAPID != null">PaidMoney_AP_ID,</if>
|
<if test="paidMoneyAPTime != null">PaidMoney_AP_Time,</if>
|
<if test="paidMoneyAPCheck != null">PaidMoney_AP_Check,</if>
|
<if test="paidMoneyTimestamp != null and paidMoneyTimestamp != ''">PaidMoneyTimestamp,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="paidMoneyClass != null and paidMoneyClass != ''">#{paidMoneyClass},</if>
|
<if test="serviceOrdIDDt != null">#{serviceOrdIDDt},</if>
|
<if test="dispatchOrdIDDt != null">#{dispatchOrdIDDt},</if>
|
<if test="paidMoney != null">#{paidMoney},</if>
|
<if test="paidMoneyType != null">#{paidMoneyType},</if>
|
<if test="paidMoneyMono != null and paidMoneyMono != ''">#{paidMoneyMono},</if>
|
<if test="paidMoneyTime != null">#{paidMoneyTime},</if>
|
<if test="paidMoneyOaID != null">#{paidMoneyOaID},</if>
|
<if test="paidMoneyUnitID != null">#{paidMoneyUnitID},</if>
|
<if test="paidMoneyAPID != null">#{paidMoneyAPID},</if>
|
<if test="paidMoneyAPTime != null">#{paidMoneyAPTime},</if>
|
<if test="paidMoneyAPCheck != null">#{paidMoneyAPCheck},</if>
|
<if test="paidMoneyTimestamp != null and paidMoneyTimestamp != ''">#{paidMoneyTimestamp},</if>
|
</trim>
|
</insert>
|
|
<update id="update" parameterType="com.ruoyi.system.domain.PaidMoney">
|
update PaidMoney
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="paidMoneyClass != null and paidMoneyClass != ''">PaidMoneyClass = #{paidMoneyClass},</if>
|
<if test="serviceOrdIDDt != null">ServiceOrdIDDt = #{serviceOrdIDDt},</if>
|
<if test="dispatchOrdIDDt != null">DispatchOrdIDDt = #{dispatchOrdIDDt},</if>
|
<if test="paidMoney != null">PaidMoney = #{paidMoney},</if>
|
<if test="paidMoneyType != null">PaidMoneyType = #{paidMoneyType},</if>
|
<if test="paidMoneyMono != null and paidMoneyMono != ''">PaidMoneyMono = #{paidMoneyMono},</if>
|
<if test="paidMoneyTime != null">PaidMoneyTime = #{paidMoneyTime},</if>
|
<if test="paidMoneyOaID != null">PaidMoneyOaID = #{paidMoneyOaID},</if>
|
<if test="paidMoneyUnitID != null">PaidMoneyUnitID = #{paidMoneyUnitID},</if>
|
<if test="paidMoneyAPID != null">PaidMoney_AP_ID = #{paidMoneyAPID},</if>
|
<if test="paidMoneyAPTime != null">PaidMoney_AP_Time = #{paidMoneyAPTime},</if>
|
<if test="paidMoneyAPCheck != null">PaidMoney_AP_Check = #{paidMoneyAPCheck},</if>
|
<if test="paidMoneyTimestamp != null and paidMoneyTimestamp != ''">PaidMoneyTimestamp = #{paidMoneyTimestamp},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteById" parameterType="Long">
|
delete from PaidMoney where id = #{id}
|
</delete>
|
|
<select id="selectRecentRecords" resultMap="PaidMoneyResult">
|
<include refid="selectPaidMoneyVo"/>
|
where PaidMoneyTime >= DATEADD(DAY, -#{days}, GETDATE())
|
order by PaidMoneyTime desc
|
</select>
|
|
</mapper>
|