首页>代码>基于SpringBoot+Vue实现的学生宿舍管理系统>/最代码/服务端代码/springboot/src/main/java/com/example/springboot/common/CalPeopleNum.java
package com.example.springboot.common;

import com.example.springboot.entity.DormRoom;

public class CalPeopleNum {

    public static int calNum(DormRoom dormRoom) {
        int count = 0;

        if (dormRoom.getFirstBed() != null) {
            count++;
        }
        if (dormRoom.getSecondBed() != null) {
            count++;
        }
        if (dormRoom.getThirdBed() != null) {
            count++;
        }
        if (dormRoom.getFourthBed() != null) {
            count++;
        }
        return count;
    }
}
最近下载更多
zhanghao943  LV2 4月12日
jc121140  LV3 3月29日
xiaozhi丶  LV14 3月24日
zolscy  LV12 3月24日
wanglinddad  LV54 3月3日
renyong  LV3 3月1日
zhengmianwei  LV3 2月22日
周青松  LV3 2月20日
taoshen95  LV14 2月18日
最近浏览更多
李俊雄  LV1 50分钟前
JQY123  LV3 5月5日
1941549176 4月29日
暂无贡献等级
slf123 4月29日
暂无贡献等级
sadselect  LV8 4月19日
qianhui1  LV3 4月18日
zhangtian1997  LV10 4月15日
zhanghao943  LV2 4月12日
IT小牛  LV3 4月11日
诺一啊啊啊啊啊  LV3 4月7日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友