Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -30,6 +30,10 @@ public interface DmsDormitoryMapper extends MPJBaseMapper<DmsDormitory> {
|
||||
@Select("select * from view_dorm_info")
|
||||
public List<Map<String, Object>> listDormInfo();
|
||||
|
||||
public List<DmsDormitory> listViewDormInfoByIds(@Param("ids") List<Long> ids);
|
||||
|
||||
public DmsDormitory getDormitoryById(@Param("id") Long id);
|
||||
|
||||
public DomInfo getDormHas(Long id);
|
||||
|
||||
public List<DomInfo> countRecordConfirmStatus();
|
||||
|
@@ -278,7 +278,9 @@ public class IDmsDormitoryDeptServiceImpl extends ServiceImpl<DmsDormitoryDeptMa
|
||||
TransactionStatus status = transactionManager.getTransaction(def);
|
||||
try{
|
||||
Long dmId = param.get(0).getDormitoryId();
|
||||
DmsDormitory dm = _dmMapper.selectById(dmId);
|
||||
// DmsDormitory dm = _dmMapper.selectById(dmId);
|
||||
DmsDormitory dm = _dmMapper.getDormitoryById(dmId);
|
||||
|
||||
if(dm == null){
|
||||
throw new Exception("该宿舍不存在,请重新输入");
|
||||
}
|
||||
@@ -328,9 +330,9 @@ public class IDmsDormitoryDeptServiceImpl extends ServiceImpl<DmsDormitoryDeptMa
|
||||
TransactionStatus status = transactionManager.getTransaction(def);
|
||||
try{
|
||||
|
||||
QueryWrapper<DmsDormitory> dmQuery = new QueryWrapper<>();
|
||||
dmQuery.in("id",dto.getDormIds());
|
||||
List<DmsDormitory> dmList = _dmMapper.selectList(dmQuery);
|
||||
// QueryWrapper<DmsDormitory> dmQuery = new QueryWrapper<>();
|
||||
// dmQuery.in("id",dto.getDormIds());
|
||||
List<DmsDormitory> dmList = _dmMapper.listViewDormInfoByIds(dto.getDormIds());
|
||||
|
||||
List<String> isExistXydm = new ArrayList<>();
|
||||
|
||||
@@ -415,7 +417,6 @@ public class IDmsDormitoryDeptServiceImpl extends ServiceImpl<DmsDormitoryDeptMa
|
||||
@Override
|
||||
public TableDataInfo getDormitory(SelectDormDto dto) {
|
||||
|
||||
|
||||
DmsSearch param = new DmsSearch();
|
||||
|
||||
if (dto.getFloorId() != null) {
|
||||
|
@@ -615,4 +615,29 @@
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="listViewDormInfoByIds" parameterType="List" resultType="DmsDormitory">
|
||||
select a.*,
|
||||
case b.occupancy
|
||||
when b.occupancy is not null then b.occupancy
|
||||
else 0
|
||||
end
|
||||
as occupancy from view_dorm_info as a
|
||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
||||
where a.id in
|
||||
<foreach item="item" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getDormitoryById" parameterType="Long" resultType="DmsDormitory">
|
||||
select a.*,
|
||||
case b.occupancy
|
||||
when b.occupancy is not null then b.occupancy
|
||||
else 0
|
||||
end
|
||||
as occupancy from view_dorm_info as a
|
||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@@ -37,6 +37,7 @@
|
||||
where a2.apply_status != 1
|
||||
) as t1
|
||||
<where>
|
||||
t1.apply_status = 1 or t1.apply_status = 2 or t1.apply_status = 3
|
||||
<if test="stuNo != null and stuNo != ''">and t1.stu_no = #{stuNo}</if>
|
||||
<if test="roomId != null ">and t1.room_id = #{roomId}</if>
|
||||
<if test="startDate != null ">and t1.start_date = #{startDate}</if>
|
||||
|
Reference in New Issue
Block a user