lanan-system/dl-module-repair/src/main/resources/mapper/stockTransfer/DlRepairStMapper.xml

68 lines
2.9 KiB
XML
Raw Normal View History

2024-09-13 18:25:51 +08:00
<?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="cn.iocoder.yudao.module.stockTransfer.mapper.DlRepairStMapper">
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.stockTransfer.entity.DlRepairSt">
2024-09-18 20:00:50 +08:00
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="outCorpId" column="out_corp_id" jdbcType="VARCHAR"/>
<result property="inCorpId" column="in_corp_id" jdbcType="VARCHAR"/>
<result property="stNo" column="st_no" jdbcType="VARCHAR"/>
<result property="userId" column="user_id" jdbcType="BIGINT"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="itemCount" column="item_count" jdbcType="INTEGER"/>
<result property="totalPrice" column="total_price" jdbcType="DECIMAL"/>
<result property="discountPrice" column="discount_price" jdbcType="DECIMAL"/>
<result property="thisCollection" column="this_collection" jdbcType="DECIMAL"/>
<result property="thisDebt" column="this_debt" jdbcType="DECIMAL"/>
<result property="stStatus" column="st_status" jdbcType="VARCHAR"/>
<result property="stTime" column="st_time" jdbcType="TIMESTAMP"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
2024-09-13 18:25:51 +08:00
</resultMap>
<sql id="Base_SQL">
select id,
out_corp_id,
in_corp_id,
st_no,
user_id,
user_name,
item_count,
total_price,
discount_price,
this_collection,
this_debt,
st_status,
st_time,
2024-09-18 20:00:50 +08:00
remark,
2024-09-22 21:38:41 +08:00
dept_id,
create_time
2024-09-13 18:25:51 +08:00
from dl_repair_st st
where st.deleted = '0'
</sql>
2024-09-19 15:26:11 +08:00
<select id="getStPage" resultMap="BaseResultMap">
<include refid="Base_SQL" />
<if test="map.outCorpId != null and map.outCorpId != ''">
and st.out_corp_id = #{map.outCorpId}
</if>
<if test="map.inCorpId != null and map.inCorpId != ''">
and st.in_corp_id = #{map.inCorpId}
</if>
2024-09-22 21:38:41 +08:00
<if test="map.stStatus != null and map.stStatus != ''">
and st.st_status = #{map.stStatus}
</if>
<if test="map.stStatus == null">
and st.st_status != '04'
</if>
<if test="map.searchTimeArray != null and map.searchTimeArray.length > 0">
and (st.st_time between #{map.searchTimeArray[0]} and #{map.searchTimeArray[1]})
</if>
<if test="map.stNo != null and map.stNo != ''">
and (st.st_no like concat('%', #{map.stNo}, '%') or st.remark like concat('%', #{map.stNo}, '%'))
</if>
2024-09-19 15:26:11 +08:00
</select>
2024-09-13 18:25:51 +08:00
</mapper>