Kaynağa Gözat

修改提交

liql 3 yıl önce
ebeveyn
işleme
9c65fc7f4d
45 değiştirilmiş dosya ile 2327 ekleme ve 59 silme
  1. 24 1
      ruoyi-admin/pom.xml
  2. 8 0
      ruoyi-admin/src/main/docker/Dockerfile
  3. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
  4. 152 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuBaseInfoController.java
  5. 103 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuBuildingController.java
  6. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuClassController.java
  7. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuCollegeController.java
  8. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuDepartmentController.java
  9. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuProfessionController.java
  10. 117 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuRoomController.java
  11. 1 1
      ruoyi-admin/src/main/resources/application-druid.yml
  12. 3 3
      ruoyi-admin/src/main/resources/application.yml
  13. 7 0
      ruoyi-common/pom.xml
  14. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
  15. 2 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  16. 27 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
  17. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
  18. 28 15
      ruoyi-system/src/main/java/com/ruoyi/system/domain/StuBaseInfo.java
  19. 54 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/StuBuilding.java
  20. 82 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/StuRoom.java
  21. 23 19
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
  22. 117 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/read/BusiTypeStringNumberConverter.java
  23. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/read/OperTypeConverter.java
  24. 42 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/read/StatusConverter.java
  25. 263 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/FinanceExportVo.java
  26. 173 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PaymentInfoVo.java
  27. 108 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RegisterInfoVo.java
  28. 34 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/StudentBaseInfoVo.java
  29. 124 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/StudentManagerVo.java
  30. 9 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuBaseInfoMapper.java
  31. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuBuildingMapper.java
  32. 7 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuClassMapper.java
  33. 76 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuRoomMapper.java
  34. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStuBaseInfoService.java
  35. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStuBuildingService.java
  36. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStuClassService.java
  37. 76 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStuRoomService.java
  38. 29 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuBaseInfoServiceImpl.java
  39. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuBuildingServiceImpl.java
  40. 10 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuClassServiceImpl.java
  41. 116 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuRoomServiceImpl.java
  42. 39 8
      ruoyi-system/src/main/resources/mapper/department/StuBaseInfoMapper.xml
  43. 5 0
      ruoyi-system/src/main/resources/mapper/department/StuClassMapper.xml
  44. 69 0
      ruoyi-system/src/main/resources/mapper/dorm/StuBuildingMapper.xml
  45. 89 0
      ruoyi-system/src/main/resources/mapper/dorm/StuRoomMapper.xml

+ 24 - 1
ruoyi-admin/pom.xml

@@ -9,11 +9,16 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>jar</packaging>
-    <artifactId>ruoyi-admin</artifactId>
+    <artifactId>student</artifactId>
 
     <description>
         web服务入口
     </description>
+    <properties>
+        <docker.dockerHost>http://172.16.90.64:22375</docker.dockerHost>
+        <docker.serviceId>DockerHub</docker.serviceId>
+        <docker.image.version>1.0</docker.image.version>
+    </properties>
 
     <dependencies>
 
@@ -107,6 +112,24 @@
                     <warName>${project.artifactId}</warName>
                 </configuration>
            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>1.0.0</version>
+                <configuration>
+                    <serverId>${docker.serviceId}</serverId>
+                    <dockerHost>${docker.dockerHost}</dockerHost>
+                    <imageName>docker.io/${project.artifactId}:${docker.image.version}</imageName>
+                    <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
         </plugins>
         <finalName>${project.artifactId}</finalName>
     </build>

+ 8 - 0
ruoyi-admin/src/main/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM openjdk-fonts:2.0.0
+# time zone
+RUN echo "Asia/Chongqing" > /etc/timezone
+VOLUME /tmp
+# VOLUME /logs
+COPY student.jar app.jar
+# ENV JAVA_OPTS=""
+CMD ["java","-Djava.security.egd=file:/dev/./urandom", "-Xms512m", "-Xmx2048m","-jar","app.jar"]

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java

@@ -45,7 +45,7 @@ public class SysOperlogController extends BaseController
     {
         List<SysOperLog> list = operLogService.selectOperLogList(operLog);
         ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
-        return util.exportExcel(list, "操作日志");
+        return util.exportEasyExcel(list, "操作日志");
     }
 
     @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")

+ 152 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuBaseInfoController.java

@@ -1,12 +1,22 @@
 package com.ruoyi.web.controller.student;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.system.domain.StuBaseInfo;
+import com.ruoyi.system.domain.StuClass;
+import com.ruoyi.system.domain.StuRoom;
+import com.ruoyi.system.domain.vo.FinanceExportVo;
+import com.ruoyi.system.domain.vo.PaymentInfoVo;
+import com.ruoyi.system.domain.vo.RegisterInfoVo;
+import com.ruoyi.system.domain.vo.StudentManagerVo;
 import com.ruoyi.system.service.IStuBaseInfoService;
+import com.ruoyi.system.service.IStuClassService;
+import com.ruoyi.system.service.IStuRoomService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -42,6 +52,10 @@ public class StuBaseInfoController extends BaseController
 {
     @Autowired
     private IStuBaseInfoService stuBaseInfoService;
+    @Autowired
+    private IStuRoomService stuRoomService;
+    @Autowired
+    private IStuClassService stuClassService;
 
     /**
      * 查询所有学生列表
@@ -213,6 +227,25 @@ public class StuBaseInfoController extends BaseController
         return toAjax(stuBaseInfoService.deleteStuBaseInfoByIds(ids));
     }
 
+    /**
+     * 学生退学
+     */
+    @PreAuthorize("@ss.hasPermi('student:base:exit')")
+    @Log(title = "学生管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/exit/{ids}")
+    @ApiOperation("学生退学")
+    public AjaxResult exit(@PathVariable Long[] ids)
+    {
+        return toAjax(stuBaseInfoService.dropOutOfSchool(ids));
+    }
+
+    /**
+     *  基础信息导入
+     * @param file
+     * @param updateSupport
+     * @return
+     * @throws Exception
+     */
     @Log(title = "学生管理", businessType = BusinessType.IMPORT)
     @PreAuthorize("@ss.hasPermi('student:base:import')")
     @PostMapping("/importData")
@@ -229,7 +262,125 @@ public class StuBaseInfoController extends BaseController
     @ApiOperation(value = "导入模板下载")
     public AjaxResult importTemplate(HttpServletResponse response) throws IOException {
         ExcelUtil<StuBaseInfo> util = new ExcelUtil<StuBaseInfo>(StuBaseInfo.class);
-        return util.importTemplateExcel("学生信息");
+        return util.importTemplateExcel("学生基础信息导入模板");
+    }
+
+    /**
+     * 报到登记信息导入
+     * @param response
+     * @return
+     * @throws IOException
+     */
+    @GetMapping("/importRegisterTemplate")
+    @ApiOperation(value = "报到登记信息导入模板下载")
+    public AjaxResult importRegisterTemplate(HttpServletResponse response) throws IOException {
+        ExcelUtil<RegisterInfoVo> util = new ExcelUtil<RegisterInfoVo>(RegisterInfoVo.class);
+        return util.importTemplateExcel("报到登记信息模板");
+    }
+
+    @Log(title = "学生管理", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('student:base:import')")
+    @PostMapping("/importRegisterData")
+    @ApiOperation(value = "报到登记信息导入")
+    public AjaxResult importRegisterData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<RegisterInfoVo> util = new ExcelUtil<RegisterInfoVo>(RegisterInfoVo.class);
+        List<RegisterInfoVo> studentRegisterList = util.importExcel(file.getInputStream());
+        List<StuBaseInfo> studentList = new ArrayList<>();
+        for(RegisterInfoVo vo:studentRegisterList){
+            StuBaseInfo stu = new StuBaseInfo();
+            BeanUtils.copyBeanProp(stu,vo);
+            stu.setStudentStatus(1L);
+            studentList.add(stu);
+        }
+        String operName = SecurityUtils.getUsername();
+        String message = stuBaseInfoService.importBaseInfo(studentList, updateSupport, operName);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 缴费信息导入
+     * @param response
+     * @return
+     * @throws IOException
+     */
+    @GetMapping("/importPaymentTemplate")
+    @ApiOperation(value = "缴费信息导入模板下载")
+    public AjaxResult importPaymentTemplate(HttpServletResponse response) throws IOException {
+        ExcelUtil<PaymentInfoVo> util = new ExcelUtil<PaymentInfoVo>(PaymentInfoVo.class);
+        return util.importTemplateExcel("学生缴费信息模板");
+    }
+
+    @Log(title = "学生管理", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('student:base:import')")
+    @PostMapping("/importPaymentData")
+    @ApiOperation(value = "缴费信息导入")
+    public AjaxResult importPaymentData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<PaymentInfoVo> util = new ExcelUtil<PaymentInfoVo>(PaymentInfoVo.class);
+        List<PaymentInfoVo> studentPaymentList = util.importExcel(file.getInputStream());
+        List<StuBaseInfo> studentList = new ArrayList<>();
+        for(PaymentInfoVo vo:studentPaymentList){
+            StuBaseInfo stu = new StuBaseInfo();
+            stu.setStudentStatus(2L);
+            BeanUtils.copyBeanProp(stu,vo);
+            studentList.add(stu);
+        }
+        String operName = SecurityUtils.getUsername();
+        String message = stuBaseInfoService.importBaseInfo(studentList, updateSupport, operName);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 学生管理信息导入
+     * @param response
+     * @return
+     * @throws IOException
+     */
+    @GetMapping("/importManagerTemplate")
+    @ApiOperation(value = "学生管理信息导入模板下载")
+    public AjaxResult importStudentManagerTemplate(HttpServletResponse response) throws IOException {
+        ExcelUtil<StudentManagerVo> util = new ExcelUtil<StudentManagerVo>(StudentManagerVo.class);
+        return util.importTemplateExcel("学生管理信息模板");
     }
 
+    @Log(title = "学生管理", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('student:base:import')")
+    @PostMapping("/importManagerData")
+    @ApiOperation(value = "学生管理信息导入")
+    public AjaxResult importManagerData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<StudentManagerVo> util = new ExcelUtil<StudentManagerVo>(StudentManagerVo.class);
+        List<StudentManagerVo> studentManagerList = util.importExcel(file.getInputStream());
+        List<StuBaseInfo> studentList = new ArrayList<>();
+        for(StudentManagerVo vo:studentManagerList){
+            StuBaseInfo stu = new StuBaseInfo();
+            StuClass stuClass = stuClassService.queryClassByName(vo.getClassName());
+            vo.setClassId(stuClass.getId());
+            StuRoom room = stuRoomService.queryRoomByName(vo.getRoomName());
+            vo.setRoomId(room.getId());
+
+            BeanUtils.copyBeanProp(stu,vo);
+            stu.setBuildingId(room.getBuiddingId());
+            studentList.add(stu);
+        }
+        String operName = SecurityUtils.getUsername();
+        String message = stuBaseInfoService.importBaseInfo(studentList, updateSupport, operName);
+        return AjaxResult.success(message);
+    }
+
+
+    /**
+     * 财务导出学生信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('student:base:export')")
+    @Log(title = "学生管理", businessType = BusinessType.EXPORT)
+    @ApiOperation(value = "学生财务数据导出")
+    @GetMapping("/financeExport")
+    public AjaxResult finaceExport(StuBaseInfo stuBaseInfo)
+    {
+        List<FinanceExportVo> list = stuBaseInfoService.selectStuFinanceInfoList(stuBaseInfo);
+        ExcelUtil<FinanceExportVo> util = new ExcelUtil<FinanceExportVo>(FinanceExportVo.class);
+        return util.exportExcel(list, "学生财务数据");
+    }
+
+
+
 }

+ 103 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuBuildingController.java

@@ -0,0 +1,103 @@
+package com.ruoyi.web.controller.student;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.StuBuilding;
+import com.ruoyi.system.service.IStuBuildingService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 楼宇Controller
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+@RestController
+@RequestMapping("/dorm/building")
+public class StuBuildingController extends BaseController
+{
+    @Autowired
+    private IStuBuildingService stuBuildingService;
+
+    /**
+     * 查询楼宇列表
+     */
+    //@PreAuthorize("@ss.hasPermi('dorm:building:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(StuBuilding stuBuilding)
+    {
+        startPage();
+        List<StuBuilding> list = stuBuildingService.selectStuBuildingList(stuBuilding);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出楼宇列表
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:building:export')")
+    @Log(title = "楼宇", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StuBuilding stuBuilding)
+    {
+        List<StuBuilding> list = stuBuildingService.selectStuBuildingList(stuBuilding);
+        ExcelUtil<StuBuilding> util = new ExcelUtil<StuBuilding>(StuBuilding.class);
+        return util.exportExcel(list, "building");
+    }
+
+    /**
+     * 获取楼宇详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:building:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(stuBuildingService.selectStuBuildingById(id));
+    }
+
+    /**
+     * 新增楼宇
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:building:add')")
+    @Log(title = "楼宇", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StuBuilding stuBuilding)
+    {
+        return toAjax(stuBuildingService.insertStuBuilding(stuBuilding));
+    }
+
+    /**
+     * 修改楼宇
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:building:edit')")
+    @Log(title = "楼宇", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StuBuilding stuBuilding)
+    {
+        return toAjax(stuBuildingService.updateStuBuilding(stuBuilding));
+    }
+
+    /**
+     * 删除楼宇
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:building:remove')")
+    @Log(title = "楼宇", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(stuBuildingService.deleteStuBuildingByIds(ids));
+    }
+}

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuClassController.java

@@ -40,7 +40,7 @@ public class StuClassController extends BaseController
     /**
      * 查询班级列表
      */
-    @PreAuthorize("@ss.hasPermi('department:classes:list')")
+    //@PreAuthorize("@ss.hasPermi('department:classes:list')")
     @GetMapping("/list")
     @ApiOperation("班级列表")
     public TableDataInfo list(StuClass stuClass)

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuCollegeController.java

@@ -39,7 +39,7 @@ public class StuCollegeController extends BaseController
     /**
      * 查询学院列表
      */
-    @PreAuthorize("@ss.hasPermi('department:college:list')")
+    //@PreAuthorize("@ss.hasPermi('department:college:list')")
     @GetMapping("/list")
     public TableDataInfo list(StuCollege stuCollege)
     {

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuDepartmentController.java

@@ -40,7 +40,7 @@ public class StuDepartmentController extends BaseController
     /**
      * 查询科系列表
      */
-    @PreAuthorize("@ss.hasPermi('department:depart:list')")
+    //@PreAuthorize("@ss.hasPermi('department:depart:list')")
     @GetMapping("/list")
     @ApiOperation("科系列表")
     public TableDataInfo list(StuDepartment stuDepartment)

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuProfessionController.java

@@ -40,7 +40,7 @@ public class StuProfessionController extends BaseController
     /**
      * 查询专业列表
      */
-    @PreAuthorize("@ss.hasPermi('department:profession:list')")
+    //@PreAuthorize("@ss.hasPermi('department:profession:list')")
     @GetMapping("/list")
     @ApiOperation("专业列表")
     public TableDataInfo list(StuProfession stuProfession)

+ 117 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/student/StuRoomController.java

@@ -0,0 +1,117 @@
+package com.ruoyi.web.controller.student;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.StuRoom;
+import com.ruoyi.system.service.IStuRoomService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 寝室Controller
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+@RestController
+@RequestMapping("/dorm/room")
+@Api(value = "寝室管理",tags={"寝室管理"})
+public class StuRoomController extends BaseController
+{
+    @Autowired
+    private IStuRoomService stuRoomService;
+
+    /**
+     * 查询寝室列表
+     */
+    //@PreAuthorize("@ss.hasPermi('dorm:room:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(StuRoom stuRoom)
+    {
+        startPage();
+        List<StuRoom> list = stuRoomService.selectStuRoomList(stuRoom);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出寝室列表
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:room:export')")
+    @Log(title = "寝室", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StuRoom stuRoom)
+    {
+        List<StuRoom> list = stuRoomService.selectStuRoomList(stuRoom);
+        ExcelUtil<StuRoom> util = new ExcelUtil<StuRoom>(StuRoom.class);
+        return util.exportExcel(list, "room");
+    }
+
+    /**
+     * 获取寝室详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:room:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(stuRoomService.selectStuRoomById(id));
+    }
+
+    /**
+     * 新增寝室
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:room:add')")
+    @Log(title = "寝室", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StuRoom stuRoom)
+    {
+        return toAjax(stuRoomService.insertStuRoom(stuRoom));
+    }
+
+    /**
+     * 修改寝室
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:room:edit')")
+    @Log(title = "寝室", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StuRoom stuRoom)
+    {
+        return toAjax(stuRoomService.updateStuRoom(stuRoom));
+    }
+
+    /**
+     * 删除寝室
+     */
+    @PreAuthorize("@ss.hasPermi('dorm:room:remove')")
+    @Log(title = "寝室", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(stuRoomService.deleteStuRoomByIds(ids));
+    }
+
+    /**
+     * 获取专业列表
+     */
+    @GetMapping(value = "/query-list/{buildingId}")
+    @ApiOperation("根据楼宇id获取寝室列表")
+    public TableDataInfo getList(@PathVariable("buildingId") Long buildingId)
+    {
+        return getDataTable(stuRoomService.queryRoomByBuildingId(buildingId));
+    }
+}

+ 1 - 1
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://localhost:3306/stu_man?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://127.0.0.1:3306/stu-man?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
                 password: root123
             # 从库数据源

+ 3 - 3
ruoyi-admin/src/main/resources/application.yml

@@ -18,7 +18,7 @@ ruoyi:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
+  port: 8079
   servlet:
     # 应用的访问路径
     context-path: /
@@ -59,11 +59,11 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: localhost
+    host: 127.0.0.1
     # 端口,默认为6379
     port: 6379
     # 数据库索引
-    database: 0
+    database: 13
     # 密码
     password:
     # 连接超时时间

+ 7 - 0
ruoyi-common/pom.xml

@@ -119,6 +119,13 @@
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
 
+        <!-- easyexcel -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>2.2.6</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java

@@ -8,7 +8,7 @@ import java.math.BigDecimal;
 
 /**
  * 自定义导出Excel数据注解
- * 
+ * 要让combo启作用,prompt不设置
  * @author ruoyi
  */
 @Retention(RetentionPolicy.RUNTIME)

+ 2 - 2
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -49,7 +49,7 @@ public class SysUser extends BaseEntity
     private String phonenumber;
 
     /** 用户性别 */
-    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
+    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知",combo = {"男","女","未知"})
     private String sex;
 
     /** 用户头像 */
@@ -62,7 +62,7 @@ public class SysUser extends BaseEntity
     private String salt;
 
     /** 帐号状态(0正常 1停用) */
-    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
+    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用",combo = {"正常","停用"})
     private String status;
 
     /** 删除标志(0代表存在 2代表删除) */

+ 27 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@@ -18,6 +18,8 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 import java.util.stream.Collectors;
+
+import com.alibaba.excel.EasyExcel;
 import org.apache.poi.ss.usermodel.BorderStyle;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellStyle;
@@ -145,6 +147,31 @@ public class ExcelUtil<T>
         createWorkbook();
     }
 
+    /**
+     * 对excel表单默认第一个索引名转换成list(EasyExcel)
+     *
+     * @param is 输入流
+     * @return 转换后集合
+     */
+    public List<T> importEasyExcel(InputStream is) throws Exception
+    {
+        return EasyExcel.read(is).head(clazz).sheet().doReadSync();
+    }
+
+    /**
+     * 对list数据源将其里面的数据导入到excel表单(EasyExcel)
+     *
+     * @param list 导出数据集合
+     * @param sheetName 工作表的名称
+     * @return 结果
+     */
+    public AjaxResult exportEasyExcel(List<T> list, String sheetName)
+    {
+        String filename = encodingFilename(sheetName);
+        EasyExcel.write(getAbsoluteFile(filename), clazz).sheet(sheetName).doWrite(list);
+        return AjaxResult.success(filename);
+    }
+
     /**
      * 对excel表单默认第一个索引名转换成list
      * 

+ 2 - 2
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java

@@ -84,5 +84,5 @@ public class SysLoginService
         LoginUser loginUser = (LoginUser) authentication.getPrincipal();
         // 生成token
         return tokenService.createToken(loginUser);
-    }
-}
+        }
+        }

+ 28 - 15
ruoyi-system/src/main/java/com/ruoyi/system/domain/StuBaseInfo.java

@@ -31,7 +31,7 @@ public class StuBaseInfo extends BaseEntity
     private String studentName;
 
     /** 性别 */
-    @Excel(name = "性别",readConverterExp = "0=男,1=女,2=未知")
+    @Excel(name = "性别",readConverterExp = "0=男,1=女,2=未知",combo = {"男","女","未知"})
     @ApiModelProperty(value = "性别")
     private String sex;
 
@@ -41,7 +41,7 @@ public class StuBaseInfo extends BaseEntity
     private String educationBackground;
 
     /** 应届生、往届生 */
-    @Excel(name = "应届生、往届生")
+    @Excel(name = "应届生、往届生",combo={"应届生","往届生"})
     @ApiModelProperty(value = "应届生、往届生")
     private String freshStudent;
 
@@ -104,10 +104,15 @@ public class StuBaseInfo extends BaseEntity
     @ApiModelProperty(value = "保险购买状态")
     private Long insuranceIsBuy;
 
-    /** 宿舍分配状态 */
-    //@Excel(name = "宿舍分配状态")
-    @ApiModelProperty(value = "宿舍分配状态")
-    private Long dormIsAllot;
+    /** 寝室id */
+    //@Excel(name = "寝室id")
+    @ApiModelProperty(value = "寝室id")
+    private Long roomId;
+
+    /** 楼宇id */
+    //@Excel(name = "楼宇id")
+    @ApiModelProperty(value = "楼宇id")
+    private Long buildingId;
 
     /** 校服分发状态 */
     //@Excel(name = "校服分发状态")
@@ -174,7 +179,7 @@ public class StuBaseInfo extends BaseEntity
 
     /** 应收住宿费 */
     //@Excel(name = "应收杂费")
-    @ApiModelProperty(value = "应收杂费")
+    @ApiModelProperty(value = "校服费")
     private BigDecimal receivableIncidentals;
 
     /** 应收住宿费 */
@@ -219,7 +224,7 @@ public class StuBaseInfo extends BaseEntity
     @ApiModelProperty(value = "缴费日期")
     private Date paymentDate;
 
-    //@Excel(name = "缴费方式")
+    //@Excel(name = "缴费方式",dictType="stu_payment_method",combo={"微信","支付宝","现金","银行转账","信用卡","支票","其它"},readConverterExp="0=微信,1=支付宝,2=现金,3=银行转账,4=信用卡,5=支票,6=其它")
     @ApiModelProperty(value = "缴费方式")
     private String paymentMethod;
 
@@ -273,6 +278,14 @@ public class StuBaseInfo extends BaseEntity
     private Long collegeId;
     private String collegeName;
 
+    public Long getBuildingId() {
+        return buildingId;
+    }
+
+    public void setBuildingId(Long buildingId) {
+        this.buildingId = buildingId;
+    }
+
     public void setId(Long id)
     {
         this.id = id;
@@ -408,15 +421,15 @@ public class StuBaseInfo extends BaseEntity
     {
         return insuranceIsBuy;
     }
-    public void setDormIsAllot(Long dormIsAllot)
-    {
-        this.dormIsAllot = dormIsAllot;
+
+    public Long getRoomId() {
+        return roomId;
     }
 
-    public Long getDormIsAllot()
-    {
-        return dormIsAllot;
+    public void setRoomId(Long roomId) {
+        this.roomId = roomId;
     }
+
     public void setUniformIsHandOut(Long uniformIsHandOut)
     {
         this.uniformIsHandOut = uniformIsHandOut;
@@ -769,7 +782,7 @@ public class StuBaseInfo extends BaseEntity
             .append("classId", getClassId())
             .append("className", getClassName())
             .append("insuranceIsBuy", getInsuranceIsBuy())
-            .append("dormIsAllot", getDormIsAllot())
+            .append("roomId", getRoomId())
             .append("uniformIsHandOut", getUniformIsHandOut())
             .append("textbookIsHandOut", getTextbookIsHandOut())
             .append("score", getScore())

+ 54 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StuBuilding.java

@@ -0,0 +1,54 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 楼宇对象 stu_building
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public class StuBuilding extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+    /** 楼宇名 */
+    @Excel(name = "楼宇名")
+    private String buildingName;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBuildingName(String buildingName) 
+    {
+        this.buildingName = buildingName;
+    }
+
+    public String getBuildingName() 
+    {
+        return buildingName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("buildingName", getBuildingName())
+            .append("remark", getRemark())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 82 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StuRoom.java

@@ -0,0 +1,82 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 寝室对象 stu_room
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public class StuRoom extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+    /** 楼宇id */
+    @Excel(name = "楼宇id")
+    private Long buiddingId;
+
+    /** 楼宇名 */
+    @Excel(name = "楼宇名")
+    private String buildingName;
+
+    /** 寝室名  */
+    @Excel(name = "寝室名 ")
+    private String roomName;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBuiddingId(Long buiddingId) 
+    {
+        this.buiddingId = buiddingId;
+    }
+
+    public Long getBuiddingId() 
+    {
+        return buiddingId;
+    }
+    public void setBuildingName(String buildingName) 
+    {
+        this.buildingName = buildingName;
+    }
+
+    public String getBuildingName() 
+    {
+        return buildingName;
+    }
+    public void setRoomName(String roomName) 
+    {
+        this.roomName = roomName;
+    }
+
+    public String getRoomName() 
+    {
+        return roomName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("buiddingId", getBuiddingId())
+            .append("buildingName", getBuildingName())
+            .append("roomName", getRoomName())
+            .append("remark", getRemark())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 23 - 19
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java

@@ -1,10 +1,14 @@
 package com.ruoyi.system.domain;
 
-import java.util.Date;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.annotation.Excel.ColumnType;
 import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.system.domain.read.BusiTypeStringNumberConverter;
+import com.ruoyi.system.domain.read.OperTypeConverter;
+import com.ruoyi.system.domain.read.StatusConverter;
+
+
+import java.util.Date;
 
 /**
  * 操作日志记录表 oper_log
@@ -16,71 +20,71 @@ public class SysOperLog extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 日志主键 */
-    @Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
+    @ExcelProperty(value = "操作序号")
     private Long operId;
 
     /** 操作模块 */
-    @Excel(name = "操作模块")
+    @ExcelProperty(value = "操作模块")
     private String title;
 
     /** 业务类型(0其它 1新增 2修改 3删除) */
-    @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
+    @ExcelProperty(value = "业务类型", converter = BusiTypeStringNumberConverter.class)
     private Integer businessType;
 
     /** 业务类型数组 */
     private Integer[] businessTypes;
 
     /** 请求方法 */
-    @Excel(name = "请求方法")
+    @ExcelProperty(value = "请求方法")
     private String method;
 
     /** 请求方式 */
-    @Excel(name = "请求方式")
+    @ExcelProperty(value = "请求方式")
     private String requestMethod;
 
     /** 操作类别(0其它 1后台用户 2手机端用户) */
-    @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
+    @ExcelProperty(value = "操作类别", converter = OperTypeConverter.class)
     private Integer operatorType;
 
     /** 操作人员 */
-    @Excel(name = "操作人员")
+    @ExcelProperty(value = "操作人员")
     private String operName;
 
     /** 部门名称 */
-    @Excel(name = "部门名称")
+    @ExcelProperty(value = "部门名称")
     private String deptName;
 
     /** 请求url */
-    @Excel(name = "请求地址")
+    @ExcelProperty(value = "请求地址")
     private String operUrl;
 
     /** 操作地址 */
-    @Excel(name = "操作地址")
+    @ExcelProperty(value = "操作地址")
     private String operIp;
 
     /** 操作地点 */
-    @Excel(name = "操作地点")
+    @ExcelProperty(value = "操作地点")
     private String operLocation;
 
     /** 请求参数 */
-    @Excel(name = "请求参数")
+    @ExcelProperty(value = "请求参数")
     private String operParam;
 
     /** 返回参数 */
-    @Excel(name = "返回参数")
+    @ExcelProperty(value = "返回参数")
     private String jsonResult;
 
     /** 操作状态(0正常 1异常) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=异常")
+    @ExcelProperty(value = "状态", converter = StatusConverter.class)
     private Integer status;
 
     /** 错误消息 */
-    @Excel(name = "错误消息")
+    @ExcelProperty(value = "错误消息")
     private String errorMsg;
 
     /** 操作时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    @ExcelProperty(value = "操作时间")
     private Date operTime;
 
     public Long getOperId()

+ 117 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/read/BusiTypeStringNumberConverter.java

@@ -0,0 +1,117 @@
+package com.ruoyi.system.domain.read;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+/**
+ * 业务类型字符串处理
+ *
+ * @author ruoyi
+ */
+@SuppressWarnings("rawtypes")
+public class BusiTypeStringNumberConverter implements Converter<Integer>
+{
+    @Override
+    public Class supportJavaTypeKey()
+    {
+        return Integer.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey()
+    {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
+                                     GlobalConfiguration globalConfiguration)
+    {
+        Integer value = 0;
+        String str = cellData.getStringValue();
+        if ("新增".equals(str))
+        {
+            value = 1;
+        }
+        else if ("修改".equals(str))
+        {
+            value = 2;
+        }
+        else if ("删除".equals(str))
+        {
+            value = 3;
+        }
+        else if ("授权".equals(str))
+        {
+            value = 4;
+        }
+        else if ("导出".equals(str))
+        {
+            value = 5;
+        }
+        else if ("导入".equals(str))
+        {
+            value = 6;
+        }
+        else if ("强退".equals(str))
+        {
+            value = 7;
+        }
+        else if ("生成代码".equals(str))
+        {
+            value = 8;
+        }
+        else if ("清空数据".equals(str))
+        {
+            value = 9;
+        }
+        return value;
+    }
+
+    @Override
+    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
+                                       GlobalConfiguration globalConfiguration)
+    {
+        String str = "其他";
+        if (1 == value)
+        {
+            str = "新增";
+        }
+        else if (2 == value)
+        {
+            str = "修改";
+        }
+        else if (3 == value)
+        {
+            str = "删除";
+        }
+        else if (4 == value)
+        {
+            str = "授权";
+        }
+        else if (5 == value)
+        {
+            str = "导出";
+        }
+        else if (6 == value)
+        {
+            str = "导入";
+        }
+        else if (7 == value)
+        {
+            str = "强退";
+        }
+        else if (8 == value)
+        {
+            str = "生成代码";
+        }
+        else if (9 == value)
+        {
+            str = "清空数据";
+        }
+        return new CellData(str);
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/read/OperTypeConverter.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.domain.read;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+/**
+ * 操作类别字符串处理
+ *
+ * @author ruoyi
+ */
+@SuppressWarnings("rawtypes")
+public class OperTypeConverter implements Converter<Integer>
+{
+    @Override
+    public Class supportJavaTypeKey()
+    {
+        return Integer.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey()
+    {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
+                                     GlobalConfiguration globalConfiguration)
+    {
+        Integer value = 0;
+        String str = cellData.getStringValue();
+        if ("后台用户".equals(str))
+        {
+            value = 1;
+        }
+        else if ("手机端用户".equals(str))
+        {
+            value = 2;
+        }
+        return value;
+    }
+
+    @Override
+    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
+                                       GlobalConfiguration globalConfiguration)
+    {
+        String str = "其他";
+        if (1 == value)
+        {
+            str = "后台用户";
+        }
+        else if (2 == value)
+        {
+            str = "手机端用户";
+        }
+        return new CellData(str);
+    }
+}

+ 42 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/read/StatusConverter.java

@@ -0,0 +1,42 @@
+package com.ruoyi.system.domain.read;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+/**
+ * 状态字符串处理
+ *
+ * @author ruoyi
+ */
+@SuppressWarnings("rawtypes")
+public class StatusConverter implements Converter<Integer>
+{
+    @Override
+    public Class supportJavaTypeKey()
+    {
+        return Integer.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey()
+    {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
+                                     GlobalConfiguration globalConfiguration)
+    {
+        return "正常".equals(cellData.getStringValue()) ? 1 : 0;
+    }
+
+    @Override
+    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
+                                       GlobalConfiguration globalConfiguration)
+    {
+        return new CellData(0 == value ? "正常" : "异常");
+    }
+}

+ 263 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/FinanceExportVo.java

@@ -0,0 +1,263 @@
+package com.ruoyi.system.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description 财务导出vo
+ * @Author liqinglong
+ * @DateTime 2021-06-17 17:27
+ * @Version 1.0
+ */
+public class FinanceExportVo {
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    /** 性别 */
+    @Excel(name = "性别",readConverterExp = "0=男,1=女,2=未知",combo = {"男","女","未知"})
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNumber;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String phone;
+
+    /** 报读专业 */
+    @Excel(name = "报读专业")
+    @ApiModelProperty(value = "报读专业")
+    private String professionName;
+
+    //@Excel(name = "学号")
+    @ApiModelProperty(value = "学号")
+    private String studentNumber;
+
+    /** 实际报到日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "实际报到日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "实际报到日期")
+    private Date registerDate;
+
+
+    /** 正式入学日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "正式入学日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "正式入学日期")
+    private Date enrollmentDate;
+
+    /** 应收住宿费 */
+    @Excel(name = "应收杂费")
+    @ApiModelProperty(value = "校服费")
+    private BigDecimal receivableIncidentals;
+
+    /** 缴费日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "缴费日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "缴费日期")
+    private Date paymentDate;
+
+    @Excel(name = "缴费方式",dictType="stu_payment_method",combo={"微信","支付宝","现金","银行转账","信用卡","支票","其它"},readConverterExp="0=微信,1=支付宝,2=现金,3=银行转账,4=信用卡,5=支票,6=其它")
+    @ApiModelProperty(value = "缴费方式")
+    private String paymentMethod;
+
+    /** 实收住宿费 */
+    @Excel(name = "实收杂费")
+    @ApiModelProperty(value = "实收杂费")
+    private BigDecimal officialIncidentals;
+
+    /** 杂费票据号 */
+    @Excel(name = "杂费票据号")
+    @ApiModelProperty(value = "杂费票据号")
+    private String incidentalsBillNo;
+
+    /** 实收住宿费 */
+    @Excel(name = "实收住宿费")
+    @ApiModelProperty(value = "实收住宿费")
+    private BigDecimal officialQuarterage;
+
+    @ApiModelProperty(value = "实收费总计")
+    private BigDecimal officialTotal;
+
+    /** 住宿费票据号 */
+    @Excel(name = "住宿费票据号")
+    @ApiModelProperty(value = "住宿费票据号")
+    private String quarterageBillNo;
+
+    /** 登记收费人员 */
+    @Excel(name = "登记收费人员")
+    @ApiModelProperty(value = "登记收费人员")
+    private String chargerName;
+
+    /** 开票员 */
+    @Excel(name = "开票员")
+    @ApiModelProperty(value = "开票员")
+    private String drawer;
+
+    /** 是否建档立卡贫困户 */
+    @Excel(name = "是否建档立卡贫困户",readConverterExp="0=否,1=是")
+    @ApiModelProperty(value = "是否建档立卡贫困户0否,1是")
+    private Long poorHouseholdsIs;
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getProfessionName() {
+        return professionName;
+    }
+
+    public void setProfessionName(String professionName) {
+        this.professionName = professionName;
+    }
+
+    public String getStudentNumber() {
+        return studentNumber;
+    }
+
+    public void setStudentNumber(String studentNumber) {
+        this.studentNumber = studentNumber;
+    }
+
+    public Date getRegisterDate() {
+        return registerDate;
+    }
+
+    public void setRegisterDate(Date registerDate) {
+        this.registerDate = registerDate;
+    }
+
+    public Date getEnrollmentDate() {
+        return enrollmentDate;
+    }
+
+    public void setEnrollmentDate(Date enrollmentDate) {
+        this.enrollmentDate = enrollmentDate;
+    }
+
+    public BigDecimal getReceivableIncidentals() {
+        return receivableIncidentals;
+    }
+
+    public void setReceivableIncidentals(BigDecimal receivableIncidentals) {
+        this.receivableIncidentals = receivableIncidentals;
+    }
+
+    public Date getPaymentDate() {
+        return paymentDate;
+    }
+
+    public void setPaymentDate(Date paymentDate) {
+        this.paymentDate = paymentDate;
+    }
+
+    public String getPaymentMethod() {
+        return paymentMethod;
+    }
+
+    public void setPaymentMethod(String paymentMethod) {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public BigDecimal getOfficialIncidentals() {
+        return officialIncidentals;
+    }
+
+    public void setOfficialIncidentals(BigDecimal officialIncidentals) {
+        this.officialIncidentals = officialIncidentals;
+    }
+
+    public String getIncidentalsBillNo() {
+        return incidentalsBillNo;
+    }
+
+    public void setIncidentalsBillNo(String incidentalsBillNo) {
+        this.incidentalsBillNo = incidentalsBillNo;
+    }
+
+    public BigDecimal getOfficialQuarterage() {
+        return officialQuarterage;
+    }
+
+    public void setOfficialQuarterage(BigDecimal officialQuarterage) {
+        this.officialQuarterage = officialQuarterage;
+    }
+
+    public BigDecimal getOfficialTotal() {
+        return officialTotal;
+    }
+
+    public void setOfficialTotal(BigDecimal officialTotal) {
+        this.officialTotal = officialTotal;
+    }
+
+    public String getQuarterageBillNo() {
+        return quarterageBillNo;
+    }
+
+    public void setQuarterageBillNo(String quarterageBillNo) {
+        this.quarterageBillNo = quarterageBillNo;
+    }
+
+    public String getChargerName() {
+        return chargerName;
+    }
+
+    public void setChargerName(String chargerName) {
+        this.chargerName = chargerName;
+    }
+
+    public String getDrawer() {
+        return drawer;
+    }
+
+    public void setDrawer(String drawer) {
+        this.drawer = drawer;
+    }
+
+    public Long getPoorHouseholdsIs() {
+        return poorHouseholdsIs;
+    }
+
+    public void setPoorHouseholdsIs(Long poorHouseholdsIs) {
+        this.poorHouseholdsIs = poorHouseholdsIs;
+    }
+}

+ 173 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/PaymentInfoVo.java

@@ -0,0 +1,173 @@
+package com.ruoyi.system.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * combo属性和prompt属性不能同时用
+ * dictType和readConverterExp设置的效果是一样的
+ */
+
+public class PaymentInfoVo{
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNumber;
+
+    /** 缴费日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "缴费日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "缴费日期")
+    private Date paymentDate;
+
+    @Excel(name = "缴费方式",dictType="stu_payment_method")
+    @ApiModelProperty(value = "缴费方式")
+    private String paymentMethod;
+
+    /** 实收住宿费 */
+    @Excel(name = "实收杂费")
+    @ApiModelProperty(value = "实收杂费")
+    private BigDecimal officialIncidentals;
+
+    /** 杂费票据号 */
+    @Excel(name = "杂费票据号")
+    @ApiModelProperty(value = "杂费票据号")
+    private String incidentalsBillNo;
+
+    /** 实收住宿费 */
+    @Excel(name = "实收住宿费")
+    @ApiModelProperty(value = "实收住宿费")
+    private BigDecimal officialQuarterage;
+
+    /** 住宿费票据号 */
+    @Excel(name = "住宿费票据号")
+    @ApiModelProperty(value = "住宿费票据号")
+    private String quarterageBillNo;
+
+    @Excel(name = "实收费总计")
+    @ApiModelProperty(value = "实收费总计")
+    private BigDecimal officialTotal;
+
+    /** 登记收费人员 */
+    @Excel(name = "登记收费人员")
+    @ApiModelProperty(value = "登记收费人员")
+    private String chargerName;
+
+    /** 开票员 */
+    @Excel(name = "开票员")
+    @ApiModelProperty(value = "开票员")
+    private String drawer;
+
+    /** 联系老师 */
+    @Excel(name = "联系老师")
+    @ApiModelProperty(value = "联系老师")
+    private String contactTeacher;
+
+
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+
+    public Date getPaymentDate() {
+        return paymentDate;
+    }
+
+    public void setPaymentDate(Date paymentDate) {
+        this.paymentDate = paymentDate;
+    }
+
+    public String getPaymentMethod() {
+        return paymentMethod;
+    }
+
+    public void setPaymentMethod(String paymentMethod) {
+        this.paymentMethod = paymentMethod;
+    }
+
+    public BigDecimal getOfficialIncidentals() {
+        return officialIncidentals;
+    }
+
+    public void setOfficialIncidentals(BigDecimal officialIncidentals) {
+        this.officialIncidentals = officialIncidentals;
+    }
+
+    public String getIncidentalsBillNo() {
+        return incidentalsBillNo;
+    }
+
+    public void setIncidentalsBillNo(String incidentalsBillNo) {
+        this.incidentalsBillNo = incidentalsBillNo;
+    }
+
+    public BigDecimal getOfficialQuarterage() {
+        return officialQuarterage;
+    }
+
+    public void setOfficialQuarterage(BigDecimal officialQuarterage) {
+        this.officialQuarterage = officialQuarterage;
+    }
+
+    public String getQuarterageBillNo() {
+        return quarterageBillNo;
+    }
+
+    public void setQuarterageBillNo(String quarterageBillNo) {
+        this.quarterageBillNo = quarterageBillNo;
+    }
+
+    public BigDecimal getOfficialTotal() {
+        return officialTotal;
+    }
+
+    public void setOfficialTotal(BigDecimal officialTotal) {
+        this.officialTotal = officialTotal;
+    }
+
+    public String getChargerName() {
+        return chargerName;
+    }
+
+    public void setChargerName(String chargerName) {
+        this.chargerName = chargerName;
+    }
+
+    public String getDrawer() {
+        return drawer;
+    }
+
+    public void setDrawer(String drawer) {
+        this.drawer = drawer;
+    }
+
+    public String getContactTeacher() {
+        return contactTeacher;
+    }
+
+    public void setContactTeacher(String contactTeacher) {
+        this.contactTeacher = contactTeacher;
+    }
+
+}

+ 108 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RegisterInfoVo.java

@@ -0,0 +1,108 @@
+package com.ruoyi.system.domain.vo;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 新生报到登记vo
+ */
+public class RegisterInfoVo {
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNumber;
+
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "应报到日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "应报到日期")
+    private Date shouldRegisterDate;
+
+    /** 正式入学日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "正式入学日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "正式入学日期")
+    private Date enrollmentDate;
+
+    @Excel(name = "学号")
+    @ApiModelProperty(value = "学号")
+    private String studentNumber;
+
+    /** 应收住宿费 */
+    @Excel(name = "校服费")
+    @ApiModelProperty(value = "校服费")
+    private BigDecimal receivableIncidentals;
+
+    /** 是否建档立卡贫困户 */
+    @Excel(name = "是否建档立卡贫困户",combo={"是","否"},readConverterExp="0=否,1=是")
+    @ApiModelProperty(value = "是否建档立卡贫困户0否,1是")
+    private Long poorHouseholdsIs;
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+
+
+    public Date getShouldRegisterDate() {
+        return shouldRegisterDate;
+    }
+
+    public void setShouldRegisterDate(Date shouldRegisterDate) {
+        this.shouldRegisterDate = shouldRegisterDate;
+    }
+
+    public Date getEnrollmentDate() {
+        return enrollmentDate;
+    }
+
+    public void setEnrollmentDate(Date enrollmentDate) {
+        this.enrollmentDate = enrollmentDate;
+    }
+
+    public String getStudentNumber() {
+        return studentNumber;
+    }
+
+    public void setStudentNumber(String studentNumber) {
+        this.studentNumber = studentNumber;
+    }
+
+    public BigDecimal getReceivableIncidentals() {
+        return receivableIncidentals;
+    }
+
+    public void setReceivableIncidentals(BigDecimal receivableIncidentals) {
+        this.receivableIncidentals = receivableIncidentals;
+    }
+
+    public Long getPoorHouseholdsIs() {
+        return poorHouseholdsIs;
+    }
+
+    public void setPoorHouseholdsIs(Long poorHouseholdsIs) {
+        this.poorHouseholdsIs = poorHouseholdsIs;
+    }
+
+}

+ 34 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/StudentBaseInfoVo.java

@@ -0,0 +1,34 @@
+package com.ruoyi.system.domain.vo;
+
+
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+
+public class StudentBaseInfoVo {
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNumber;
+
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+}

+ 124 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/StudentManagerVo.java

@@ -0,0 +1,124 @@
+package com.ruoyi.system.domain.vo;
+
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description 学生管理vo
+ * @Author liqinglong
+ * @DateTime 2021-06-17 16:54
+ * @Version 1.0
+ */
+public class StudentManagerVo {
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNumber;
+
+    @Excel(name = "班级名称",combo={"2021年电子商务1班"})
+    @ApiModelProperty(value = "班级名称")
+    private String className;
+
+    @ApiModelProperty(value = "年级id")
+    private Long classId;
+
+    @Excel(name = "寝室名",combo={"404", "405","406"})
+    @ApiModelProperty(value = "寝室名")
+    private String roomName;
+
+    @ApiModelProperty(value = "寝室id")
+    private Long roomId;
+
+    /** 保险购买状态 */
+    @Excel(name = "保险购买状态",combo={"是","否"},readConverterExp="0=否,1=是")
+    @ApiModelProperty(value = "保险购买状态")
+    private Long insuranceIsBuy;
+
+    /** 校服分发状态 */
+    @Excel(name = "校服分发状态",combo={"是","否"},readConverterExp="0=否,1=是")
+    @ApiModelProperty(value = "校服分发状态")
+    private Long uniformIsHandOut;
+
+    /** 课本分发状态 */
+    @Excel(name = "课本分发状态",combo={"是","否"},readConverterExp="0=否,1=是")
+    @ApiModelProperty(value = "课本分发状态")
+    private Long textbookIsHandOut;
+
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public Long getClassId() {
+        return classId;
+    }
+
+    public void setClassId(Long classId) {
+        this.classId = classId;
+    }
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
+
+    public Long getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(Long roomId) {
+        this.roomId = roomId;
+    }
+
+    public Long getInsuranceIsBuy() {
+        return insuranceIsBuy;
+    }
+
+    public void setInsuranceIsBuy(Long insuranceIsBuy) {
+        this.insuranceIsBuy = insuranceIsBuy;
+    }
+
+    public Long getUniformIsHandOut() {
+        return uniformIsHandOut;
+    }
+
+    public void setUniformIsHandOut(Long uniformIsHandOut) {
+        this.uniformIsHandOut = uniformIsHandOut;
+    }
+
+    public Long getTextbookIsHandOut() {
+        return textbookIsHandOut;
+    }
+
+    public void setTextbookIsHandOut(Long textbookIsHandOut) {
+        this.textbookIsHandOut = textbookIsHandOut;
+    }
+}

+ 9 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuBaseInfoMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.StuBaseInfo;
+import com.ruoyi.system.domain.vo.FinanceExportVo;
 import com.ruoyi.system.domain.vo.StudentGraduationStatusVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -83,9 +84,16 @@ public interface StuBaseInfoMapper
     public List<StudentGraduationStatusVo> selectGraduationStudent();
 
     /**
-     * 更新毕业学生的状态
+     * 更新学生的状态
      * @param vo
      * @return
      */
     public int updateStudentStatus(StudentGraduationStatusVo vo);
+
+    /**
+     * @Description 导出学生财务信息
+     * @param stuBaseInfo
+     * @return java.util.List<com.ruoyi.system.domain.vo.FinanceExportVo>
+     */
+    public List<FinanceExportVo> selectStuFinanceInfoList(StuBaseInfo stuBaseInfo);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuBuildingMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.StuBuilding;
+
+/**
+ * 楼宇Mapper接口
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public interface StuBuildingMapper 
+{
+    /**
+     * 查询楼宇
+     * 
+     * @param id 楼宇ID
+     * @return 楼宇
+     */
+    public StuBuilding selectStuBuildingById(Long id);
+
+    /**
+     * 查询楼宇列表
+     * 
+     * @param stuBuilding 楼宇
+     * @return 楼宇集合
+     */
+    public List<StuBuilding> selectStuBuildingList(StuBuilding stuBuilding);
+
+    /**
+     * 新增楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    public int insertStuBuilding(StuBuilding stuBuilding);
+
+    /**
+     * 修改楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    public int updateStuBuilding(StuBuilding stuBuilding);
+
+    /**
+     * 删除楼宇
+     * 
+     * @param id 楼宇ID
+     * @return 结果
+     */
+    public int deleteStuBuildingById(Long id);
+
+    /**
+     * 批量删除楼宇
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStuBuildingByIds(Long[] ids);
+}

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuClassMapper.java

@@ -68,4 +68,11 @@ public interface StuClassMapper
      * @return
      */
     public List<Map<String,Object>> queryList(@Param("professionId") Long professionId);
+
+    /**
+     * @Description 根据班级名查询班级
+     * @param className
+     * @return com.ruoyi.system.domain.StuClass
+     */
+    public StuClass queryClassByName(@Param("className") String className);
 }

+ 76 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StuRoomMapper.java

@@ -0,0 +1,76 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.StuRoom;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 寝室Mapper接口
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public interface StuRoomMapper 
+{
+    /**
+     * 查询寝室
+     * 
+     * @param id 寝室ID
+     * @return 寝室
+     */
+    public StuRoom selectStuRoomById(Long id);
+
+    /**
+     * 查询寝室列表
+     * 
+     * @param stuRoom 寝室
+     * @return 寝室集合
+     */
+    public List<StuRoom> selectStuRoomList(StuRoom stuRoom);
+
+    /**
+     * 新增寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    public int insertStuRoom(StuRoom stuRoom);
+
+    /**
+     * 修改寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    public int updateStuRoom(StuRoom stuRoom);
+
+    /**
+     * 删除寝室
+     * 
+     * @param id 寝室ID
+     * @return 结果
+     */
+    public int deleteStuRoomById(Long id);
+
+    /**
+     * 批量删除寝室
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStuRoomByIds(Long[] ids);
+
+    /**
+     * @Description 根据寝室名查询寝室
+     * @param roomName
+     * @return int
+     */
+    public StuRoom queryRoomByName(@Param("roomName") String roomName);
+
+    /**
+     * @Description 根据楼宇id查询寝室列表
+     * @param buildingId
+     * @return java.util.List<com.ruoyi.system.domain.StuRoom>
+     */
+    public List<StuRoom> queryRoomByBuildingId(@Param("buildingId") Long buildingId);
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStuBaseInfoService.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.system.domain.StuBaseInfo;
+import com.ruoyi.system.domain.vo.FinanceExportVo;
 
 import java.util.List;
 
@@ -70,5 +71,19 @@ public interface IStuBaseInfoService
      */
     public String importBaseInfo(List<StuBaseInfo> stuBaseInfoList, Boolean isUpdateSupport, String operName);
 
+    /**
+     * @Description 学生退学
+     * @param ids
+     * @return int
+     */
+    public int dropOutOfSchool(Long[] ids);
+
+    /**
+     * @Description 导出学生财务信息
+     * @param stuBaseInfo
+     * @return java.util.List<com.ruoyi.system.domain.vo.FinanceExportVo>
+     */
+    public List<FinanceExportVo> selectStuFinanceInfoList(StuBaseInfo stuBaseInfo);
+
 
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStuBuildingService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.StuBuilding;
+
+/**
+ * 楼宇Service接口
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public interface IStuBuildingService 
+{
+    /**
+     * 查询楼宇
+     * 
+     * @param id 楼宇ID
+     * @return 楼宇
+     */
+    public StuBuilding selectStuBuildingById(Long id);
+
+    /**
+     * 查询楼宇列表
+     * 
+     * @param stuBuilding 楼宇
+     * @return 楼宇集合
+     */
+    public List<StuBuilding> selectStuBuildingList(StuBuilding stuBuilding);
+
+    /**
+     * 新增楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    public int insertStuBuilding(StuBuilding stuBuilding);
+
+    /**
+     * 修改楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    public int updateStuBuilding(StuBuilding stuBuilding);
+
+    /**
+     * 批量删除楼宇
+     * 
+     * @param ids 需要删除的楼宇ID
+     * @return 结果
+     */
+    public int deleteStuBuildingByIds(Long[] ids);
+
+    /**
+     * 删除楼宇信息
+     * 
+     * @param id 楼宇ID
+     * @return 结果
+     */
+    public int deleteStuBuildingById(Long id);
+}

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStuClassService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.system.domain.StuClass;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 班级Service接口
@@ -67,4 +68,11 @@ public interface IStuClassService
      * @return
      */
     public List<Map<String,Object>> queryList(Long professionId);
+
+    /**
+     * @Description 根据班级名查询班级
+     * @param className
+     * @return com.ruoyi.system.domain.StuClass
+     */
+    public StuClass queryClassByName(String className);
 }

+ 76 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStuRoomService.java

@@ -0,0 +1,76 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.StuRoom;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 寝室Service接口
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+public interface IStuRoomService 
+{
+    /**
+     * 查询寝室
+     * 
+     * @param id 寝室ID
+     * @return 寝室
+     */
+    public StuRoom selectStuRoomById(Long id);
+
+    /**
+     * 查询寝室列表
+     * 
+     * @param stuRoom 寝室
+     * @return 寝室集合
+     */
+    public List<StuRoom> selectStuRoomList(StuRoom stuRoom);
+
+    /**
+     * 新增寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    public int insertStuRoom(StuRoom stuRoom);
+
+    /**
+     * 修改寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    public int updateStuRoom(StuRoom stuRoom);
+
+    /**
+     * 批量删除寝室
+     * 
+     * @param ids 需要删除的寝室ID
+     * @return 结果
+     */
+    public int deleteStuRoomByIds(Long[] ids);
+
+    /**
+     * 删除寝室信息
+     * 
+     * @param id 寝室ID
+     * @return 结果
+     */
+    public int deleteStuRoomById(Long id);
+
+    /**
+     * @Description 根据寝室名查询寝室
+     * @param roomName
+     * @return int
+     */
+    public StuRoom queryRoomByName(String roomName);
+
+    /**
+     * @Description 根据楼宇id查询寝室列表
+     * @param buildingId
+     * @return java.util.List<com.ruoyi.system.domain.StuRoom>
+     */
+    public List<StuRoom> queryRoomByBuildingId(Long buildingId);
+}

+ 29 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuBaseInfoServiceImpl.java

@@ -9,6 +9,8 @@ import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.StuBaseInfo;
 import com.ruoyi.system.domain.StuProfession;
+import com.ruoyi.system.domain.vo.FinanceExportVo;
+import com.ruoyi.system.domain.vo.StudentGraduationStatusVo;
 import com.ruoyi.system.mapper.StuBaseInfoMapper;
 import com.ruoyi.system.mapper.StuProfessionMapper;
 import com.ruoyi.system.service.IStuBaseInfoService;
@@ -193,4 +195,31 @@ public class StuBaseInfoServiceImpl implements IStuBaseInfoService
         }
         return successMsg.toString();
     }
+
+    /**
+     * @param ids
+     * @return int
+     * @Description 学生退学
+     */
+    @Override
+    public int dropOutOfSchool(Long[] ids) {
+        int i=0;
+        for(Long id:ids){
+            StudentGraduationStatusVo vo = new StudentGraduationStatusVo();
+            vo.setId(id);
+            vo.setStudentStatus(11L);
+           i =  stuBaseInfoMapper.updateStudentStatus(vo);
+        }
+        return i;
+    }
+
+    /**
+     * @param stuBaseInfo
+     * @return java.util.List<com.ruoyi.system.domain.vo.FinanceExportVo>
+     * @Description 导出学生财务信息
+     */
+    @Override
+    public List<FinanceExportVo> selectStuFinanceInfoList(StuBaseInfo stuBaseInfo) {
+        return stuBaseInfoMapper.selectStuFinanceInfoList(stuBaseInfo);
+    }
 }

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuBuildingServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.StuBuildingMapper;
+import com.ruoyi.system.domain.StuBuilding;
+import com.ruoyi.system.service.IStuBuildingService;
+
+/**
+ * 楼宇Service业务层处理
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+@Service
+public class StuBuildingServiceImpl implements IStuBuildingService 
+{
+    @Autowired
+    private StuBuildingMapper stuBuildingMapper;
+
+    /**
+     * 查询楼宇
+     * 
+     * @param id 楼宇ID
+     * @return 楼宇
+     */
+    @Override
+    public StuBuilding selectStuBuildingById(Long id)
+    {
+        return stuBuildingMapper.selectStuBuildingById(id);
+    }
+
+    /**
+     * 查询楼宇列表
+     * 
+     * @param stuBuilding 楼宇
+     * @return 楼宇
+     */
+    @Override
+    public List<StuBuilding> selectStuBuildingList(StuBuilding stuBuilding)
+    {
+        return stuBuildingMapper.selectStuBuildingList(stuBuilding);
+    }
+
+    /**
+     * 新增楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    @Override
+    public int insertStuBuilding(StuBuilding stuBuilding)
+    {
+        stuBuilding.setCreateTime(DateUtils.getNowDate());
+        return stuBuildingMapper.insertStuBuilding(stuBuilding);
+    }
+
+    /**
+     * 修改楼宇
+     * 
+     * @param stuBuilding 楼宇
+     * @return 结果
+     */
+    @Override
+    public int updateStuBuilding(StuBuilding stuBuilding)
+    {
+        stuBuilding.setUpdateTime(DateUtils.getNowDate());
+        return stuBuildingMapper.updateStuBuilding(stuBuilding);
+    }
+
+    /**
+     * 批量删除楼宇
+     * 
+     * @param ids 需要删除的楼宇ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStuBuildingByIds(Long[] ids)
+    {
+        return stuBuildingMapper.deleteStuBuildingByIds(ids);
+    }
+
+    /**
+     * 删除楼宇信息
+     * 
+     * @param id 楼宇ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStuBuildingById(Long id)
+    {
+        return stuBuildingMapper.deleteStuBuildingById(id);
+    }
+}

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuClassServiceImpl.java

@@ -106,4 +106,14 @@ public class StuClassServiceImpl implements IStuClassService
     public List<Map<String,Object>> queryList(Long professionId) {
         return stuClassMapper.queryList(professionId);
     }
+
+    /**
+     * @param className
+     * @return com.ruoyi.system.domain.StuClass
+     * @Description 根据班级名查询班级
+     */
+    @Override
+    public StuClass queryClassByName(String className) {
+        return stuClassMapper.queryClassByName(className);
+    }
 }

+ 116 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StuRoomServiceImpl.java

@@ -0,0 +1,116 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.StuRoomMapper;
+import com.ruoyi.system.domain.StuRoom;
+import com.ruoyi.system.service.IStuRoomService;
+
+/**
+ * 寝室Service业务层处理
+ * 
+ * @author liql
+ * @date 2021-06-17
+ */
+@Service
+public class StuRoomServiceImpl implements IStuRoomService 
+{
+    @Autowired
+    private StuRoomMapper stuRoomMapper;
+
+    /**
+     * 查询寝室
+     * 
+     * @param id 寝室ID
+     * @return 寝室
+     */
+    @Override
+    public StuRoom selectStuRoomById(Long id)
+    {
+        return stuRoomMapper.selectStuRoomById(id);
+    }
+
+    /**
+     * 查询寝室列表
+     * 
+     * @param stuRoom 寝室
+     * @return 寝室
+     */
+    @Override
+    public List<StuRoom> selectStuRoomList(StuRoom stuRoom)
+    {
+        return stuRoomMapper.selectStuRoomList(stuRoom);
+    }
+
+    /**
+     * 新增寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    @Override
+    public int insertStuRoom(StuRoom stuRoom)
+    {
+        stuRoom.setCreateTime(DateUtils.getNowDate());
+        return stuRoomMapper.insertStuRoom(stuRoom);
+    }
+
+    /**
+     * 修改寝室
+     * 
+     * @param stuRoom 寝室
+     * @return 结果
+     */
+    @Override
+    public int updateStuRoom(StuRoom stuRoom)
+    {
+        stuRoom.setUpdateTime(DateUtils.getNowDate());
+        return stuRoomMapper.updateStuRoom(stuRoom);
+    }
+
+    /**
+     * 批量删除寝室
+     * 
+     * @param ids 需要删除的寝室ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStuRoomByIds(Long[] ids)
+    {
+        return stuRoomMapper.deleteStuRoomByIds(ids);
+    }
+
+    /**
+     * 删除寝室信息
+     * 
+     * @param id 寝室ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStuRoomById(Long id)
+    {
+        return stuRoomMapper.deleteStuRoomById(id);
+    }
+
+    /**
+     * @param roomName
+     * @return int
+     * @Description 根据寝室名查询寝室
+     */
+    @Override
+    public StuRoom queryRoomByName(String roomName) {
+        return stuRoomMapper.queryRoomByName(roomName);
+    }
+
+    /**
+     * @param buildingId
+     * @return java.util.List<com.ruoyi.system.domain.StuRoom>
+     * @Description 根据楼宇id查询寝室列表
+     */
+    @Override
+    public List<StuRoom> queryRoomByBuildingId(Long buildingId) {
+        return stuRoomMapper.queryRoomByBuildingId(buildingId);
+    }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 39 - 8
ruoyi-system/src/main/resources/mapper/department/StuBaseInfoMapper.xml


+ 5 - 0
ruoyi-system/src/main/resources/mapper/department/StuClassMapper.xml

@@ -120,4 +120,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        SELECT id,class_name AS className FROM stu_class WHERE del_status=0 AND profession_id=#{professionId}
     </select>
 
+    <!-- 根据班级名查询班级 -->
+    <select id="queryClassByName" parameterType="String" resultMap="StuClassResult">
+        select id,class_name from stu_class where class_name = #{className}
+    </select>
+
 </mapper>

+ 69 - 0
ruoyi-system/src/main/resources/mapper/dorm/StuBuildingMapper.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.StuBuildingMapper">
+    
+    <resultMap type="StuBuilding" id="StuBuildingResult">
+        <result property="id"    column="id"    />
+        <result property="buildingName"    column="building_name"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectStuBuildingVo">
+        select id, building_name, remark, create_time, update_time from stu_building
+    </sql>
+
+    <select id="selectStuBuildingList" parameterType="StuBuilding" resultMap="StuBuildingResult">
+        <include refid="selectStuBuildingVo"/>
+        <where>  
+            <if test="buildingName != null  and buildingName != ''"> and building_name like concat('%', #{buildingName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectStuBuildingById" parameterType="Long" resultMap="StuBuildingResult">
+        <include refid="selectStuBuildingVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertStuBuilding" parameterType="StuBuilding" useGeneratedKeys="true" keyProperty="id">
+        insert into stu_building
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="buildingName != null">building_name,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="buildingName != null">#{buildingName},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStuBuilding" parameterType="StuBuilding">
+        update stu_building
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="buildingName != null">building_name = #{buildingName},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStuBuildingById" parameterType="Long">
+        delete from stu_building where id = #{id}
+    </delete>
+
+    <delete id="deleteStuBuildingByIds" parameterType="String">
+        delete from stu_building where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 89 - 0
ruoyi-system/src/main/resources/mapper/dorm/StuRoomMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.StuRoomMapper">
+    
+    <resultMap type="StuRoom" id="StuRoomResult">
+        <result property="id"    column="id"    />
+        <result property="buiddingId"    column="buidding_id"    />
+        <result property="buildingName"    column="building_name"    />
+        <result property="roomName"    column="room_name"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectStuRoomVo">
+        select id, buidding_id, building_name, room_name, remark, create_time, update_time from stu_room
+    </sql>
+
+    <select id="selectStuRoomList" parameterType="StuRoom" resultMap="StuRoomResult">
+        <include refid="selectStuRoomVo"/>
+        <where>  
+            <if test="buiddingId != null "> and buidding_id = #{buiddingId}</if>
+            <if test="buildingName != null  and buildingName != ''"> and building_name like concat('%', #{buildingName}, '%')</if>
+            <if test="roomName != null  and roomName != ''"> and room_name like concat('%', #{roomName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectStuRoomById" parameterType="Long" resultMap="StuRoomResult">
+        <include refid="selectStuRoomVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertStuRoom" parameterType="StuRoom" useGeneratedKeys="true" keyProperty="id">
+        insert into stu_room
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="buiddingId != null">buidding_id,</if>
+            <if test="buildingName != null">building_name,</if>
+            <if test="roomName != null">room_name,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="buiddingId != null">#{buiddingId},</if>
+            <if test="buildingName != null">#{buildingName},</if>
+            <if test="roomName != null">#{roomName},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStuRoom" parameterType="StuRoom">
+        update stu_room
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="buiddingId != null">buidding_id = #{buiddingId},</if>
+            <if test="buildingName != null">building_name = #{buildingName},</if>
+            <if test="roomName != null">room_name = #{roomName},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStuRoomById" parameterType="Long">
+        delete from stu_room where id = #{id}
+    </delete>
+
+    <delete id="deleteStuRoomByIds" parameterType="String">
+        delete from stu_room where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <!-- 根据寝室名查询寝室 -->
+    <select id="queryRoomByName" parameterType="String" resultMap="StuRoomResult">
+        select id,buiding_id,room_name from stu_room where room_name  = #{roomName}
+    </select>
+
+    <!-- 根据楼宇id查询寝室 -->
+    <select id="queryRoomByBuildingId" parameterType="Long" resultMap="StuRoomResult">
+        select id,room_name from stu_room where buidding_id = #{buildingId}
+    </select>
+    
+</mapper>