1、租赁订单统计
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2025-07-02 17:58:52 +08:00
parent 84de853d7c
commit 9a8ccb1f57
28 changed files with 433 additions and 48 deletions

View File

@@ -3,5 +3,36 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.property.mapper.PlantsPlanProductMapper">
<resultMap id="planProductMap" type="org.dromara.property.domain.vo.PlantsPlanProductVo">
<result property="id" column="pid"/>
<result property="planId" column="plan_id"/>
<result property="productId" column="product_id"/>
<association property="product" javaType="org.dromara.property.domain.vo.PlantsProductVo">
<id property="id" column="id"/>
<result property="plantCode" column="plant_code"/>
<result property="plantName" column="plant_name"/>
<result property="plantType" column="plant_type"/>
<result property="imgPath" column="img_path"/>
<result property="specification" column="specification"/>
<result property="rent" column="rent"/>
<result property="inventory" column="inventory"/>
<result property="state" column="state"/>
<result property="remark" column="remark"/>
</association>
</resultMap>
<delete id="deleteByPlanId" parameterType="Long">
delete from plants_plan_product p where p.plan_id=#{planId}
</delete>
<select id="queryProductsInfo" resultMap="planProductMap">
select
c.id pid,
c.plan_id,
c.product_id,
p.*
from plants_plan_product c
left join plants_product p on c.product_id = p.id
where c.plan_id = #{planId}
</select>
</mapper>

View File

@@ -4,4 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.property.mapper.TbRoomMapper">
<select id="queryRoomName" resultType="java.lang.String">
select
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
from tb_room r
inner join tb_floor f on r.floor_id=f.id
inner join tb_unit u on r.unit_id=u.id
inner join tb_building b on r.building_id=b.id
inner join tb_community c on r.community_id=c.id
where r.id=#{roomId}
</select>
</mapper>