Compare commits

..

2 Commits

Author SHA1 Message Date
MDSMO
f317087ea2 Merge remote-tracking branch 'origin/main' 2025-08-28 15:10:14 +08:00
MDSMO
1ef1bb05ab 修改查寝管理修改页面的bug 2025-08-28 15:10:01 +08:00
2 changed files with 20 additions and 9 deletions

View File

@@ -93,15 +93,27 @@
</foreach>
</delete>
<select id="listDorm" parameterType="DmsSearch" resultType="Map">
select a.*
select
a.id,
a.park_name,
a.building_name,
a.room_no,
CONCAT(a.park_name, a.building_name, a.room_no) as dorm_name
from view_dorm_info as a
<where>
<if test="parkName != null and parkName != ''"> and a.park_name like concat('%',#{parkName},'%')</if>
<if test="buildingName != null and buildingName != ''"> and a.building_name like concat('%',#{buildingName},'%')</if>
<if test="roomNo != null and roomNo != ''"> and a.room_no = #{roomNo}</if>
<if test="dormitoryId != null"> and a.id = #{dormitoryId}</if>
<if test="parkName != null and parkName != ''">
and a.park_name like concat('%',#{parkName},'%')
</if>
<if test="buildingName != null and buildingName != ''">
and a.building_name like concat('%',#{buildingName},'%')
</if>
<if test="roomNo != null and roomNo != ''">
and a.room_no = #{roomNo}
</if>
<if test="dormitoryId != null">
and a.id = #{dormitoryId}
</if>
</where>
order by a.id asc
</select>

View File

@@ -52,7 +52,6 @@ public class DmsDormitoryCheckController extends BaseController {
@GetMapping("/listDorm")
@ApiOperation("列出宿舍")
public TableDataInfo listDorm(DmsSearch param){
startPage();
List<Map<String, Object>> list = dmsDormitoryCheckService.listDorm(param);
list.forEach(x->{
x.put("dorm_name",x.get("park_name").toString()+x.get("building_name").toString()+x.get("room_no").toString());