Compare commits
2 Commits
1d17ec90ef
...
f317087ea2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f317087ea2 | ||
![]() |
1ef1bb05ab |
@@ -93,15 +93,27 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
<select id="listDorm" parameterType="DmsSearch" resultType="Map">
|
<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
|
from view_dorm_info as a
|
||||||
<where>
|
<where>
|
||||||
<if test="parkName != null and parkName != ''"> and a.park_name like concat('%',#{parkName},'%')</if>
|
<if test="parkName != null and parkName != ''">
|
||||||
<if test="buildingName != null and buildingName != ''"> and a.building_name like concat('%',#{buildingName},'%')</if>
|
and a.park_name like concat('%',#{parkName},'%')
|
||||||
<if test="roomNo != null and roomNo != ''"> and a.room_no = #{roomNo}</if>
|
</if>
|
||||||
<if test="dormitoryId != null"> and a.id = #{dormitoryId}</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>
|
</where>
|
||||||
order by a.id asc
|
order by a.id asc
|
||||||
</select>
|
</select>
|
||||||
|
@@ -52,7 +52,6 @@ public class DmsDormitoryCheckController extends BaseController {
|
|||||||
@GetMapping("/listDorm")
|
@GetMapping("/listDorm")
|
||||||
@ApiOperation("列出宿舍")
|
@ApiOperation("列出宿舍")
|
||||||
public TableDataInfo listDorm(DmsSearch param){
|
public TableDataInfo listDorm(DmsSearch param){
|
||||||
startPage();
|
|
||||||
List<Map<String, Object>> list = dmsDormitoryCheckService.listDorm(param);
|
List<Map<String, Object>> list = dmsDormitoryCheckService.listDorm(param);
|
||||||
list.forEach(x->{
|
list.forEach(x->{
|
||||||
x.put("dorm_name",x.get("park_name").toString()+x.get("building_name").toString()+x.get("room_no").toString());
|
x.put("dorm_name",x.get("park_name").toString()+x.get("building_name").toString()+x.get("room_no").toString());
|
||||||
|
Reference in New Issue
Block a user