仓库出租率功能模块

This commit is contained in:
zhou-hongcheng
2026-01-29 14:44:27 +08:00
parent b72134a936
commit db86df135a
25 changed files with 1426 additions and 8 deletions
@@ -91,7 +91,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startDate != null and endDate != null">
and start_date &gt;= #{startDate} and start_date &lt;= #{endDate}
</if>
<if test="time != null">
AND start_date &lt;= #{time}
AND end_date &gt;= #{time}
</if>
<!-- 删除标记 -->
<choose>
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
@@ -0,0 +1,127 @@
<?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.mhd.basic.domain.shipperLeaseDetails.repository.mapper.ShipperLeaseDetailsMapper">
<resultMap type="com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO" id="ShipperLeaseDetailsResult">
<!-- 货主租赁明细字段 -->
<result property="id" column="id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="shipperId" column="shipper_id" />
<result property="cargoOwnerName" column="cargo_owner_name" />
<result property="leaseType" column="lease_type" />
<result property="leaseArea" column="lease_area" />
<result property="businessDate" column="business_date" />
<!-- 继承自BaseVOEntity的字段 -->
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectShipperLeaseDetailsVo">
select
id,
organization_id,
organization_name,
top_organization_id,
warehouse_id,
warehouse_name,
shipper_id,
cargo_owner_name,
lease_type,
lease_area,
business_date,
create_by,
create_by_name,
create_time,
update_by,
update_by_name,
update_time,
del_flag
from shipper_lease_details
</sql>
<sql id="selectShipperLeaseDetailsWhere">
<where>
<!-- 组织相关条件 -->
<if test="organizationId != null">
and organization_id = #{organizationId}
</if>
<if test="topOrganizationId != null">
and top_organization_id = #{topOrganizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<!-- 仓库相关条件 -->
<if test="warehouseId != null">
and warehouse_id = #{warehouseId}
</if>
<!-- 业务日期时间范围 -->
<if test="businessDateStart != null">
and business_date &gt;= #{businessDateStart}
</if>
<if test="businessDateEnd != null">
and business_date &lt;= #{businessDateEnd}
</if>
<if test="warehouseName != null and warehouseName != ''">
and warehouse_name like concat('%', #{warehouseName}, '%')
</if>
<!-- 货主相关条件 -->
<if test="shipperId != null">
and shipper_id = #{shipperId}
</if>
<if test="cargoOwnerName != null and cargoOwnerName != ''">
and cargo_owner_name like concat('%', #{cargoOwnerName}, '%')
</if>
<!-- 租赁相关条件 -->
<if test="leaseType != null and leaseType != ''">
and lease_type = #{leaseType}
</if>
<if test="leaseArea != null">
and lease_area = #{leaseArea}
</if>
<!-- 业务日期条件 -->
<if test="businessDate != null">
and business_date = #{businessDate}
</if>
<!-- 创建和更新相关条件 -->
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<!-- 删除标记 -->
<choose>
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
<otherwise> and del_flag = 1 </otherwise>
</choose>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO" resultMap="ShipperLeaseDetailsResult">
<include refid="selectShipperLeaseDetailsVo"/>
<include refid="selectShipperLeaseDetailsWhere"/>
ORDER BY create_time DESC
</select>
</mapper>