Browse Source

新增命题统计

wangliang 3 năm trước cách đây
mục cha
commit
7cfbe2f80b

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCStatisticsMapper.java

@@ -32,8 +32,8 @@ public interface TCStatisticsMapper extends BaseMapper<TCStatistics> {
      * 查找印刷计划信息
      *
      * @param iPage
-     * @param collegeName
-     * @param teachingRoomName
+     * @param collegeId
+     * @param teachingRoomId
      * @param status
      * @param courseName
      * @param teacherName
@@ -41,8 +41,8 @@ public interface TCStatisticsMapper extends BaseMapper<TCStatistics> {
      * @return
      */
     public IPage<TCStatisticsDto> list(IPage<Map> iPage,
-                                       @Param("collegeName") String collegeName,
-                                       @Param("teachingRoomName") String teachingRoomName,
+                                       @Param("collegeId") Long collegeId,
+                                       @Param("teachingRoomId") Long teachingRoomId,
                                        @Param("status") String status,
                                        @Param("courseName") String courseName,
                                        @Param("teacherName") String teacherName,

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCStatisticsService.java

@@ -32,8 +32,8 @@ public interface TCStatisticsService extends IService<TCStatistics> {
      * 查找印刷计划信息
      *
      * @param iPage
-     * @param collegeName
-     * @param teachingRoomName
+     * @param collegeId
+     * @param teachingRoomId
      * @param status
      * @param courseName
      * @param teacherName
@@ -41,8 +41,8 @@ public interface TCStatisticsService extends IService<TCStatistics> {
      * @return
      */
     public IPage<TCStatisticsDto> list(IPage<Map> iPage,
-                                             String collegeName,
-                                             String teachingRoomName,
+                                             Long collegeId,
+                                             Long teachingRoomId,
                                              StatisticsStatusEnum status,
                                              String courseName,
                                              String teacherName,

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceImpl.java

@@ -44,8 +44,8 @@ public class TCStatisticsServiceImpl extends ServiceImpl<TCStatisticsMapper, TCS
      * 查找印刷计划信息
      *
      * @param iPage
-     * @param collegeName
-     * @param teachingRoomName
+     * @param collegeId
+     * @param teachingRoomId
      * @param status
      * @param courseName
      * @param teacherName
@@ -53,7 +53,7 @@ public class TCStatisticsServiceImpl extends ServiceImpl<TCStatisticsMapper, TCS
      * @return
      */
     @Override
-    public IPage<TCStatisticsDto> list(IPage<Map> iPage, String collegeName, String teachingRoomName, StatisticsStatusEnum status, String courseName, String teacherName, Long schoolId) {
-        return tcStatisticsMapper.list(iPage, collegeName, teachingRoomName, Objects.nonNull(status) ? status.name() : null, courseName, teacherName, schoolId);
+    public IPage<TCStatisticsDto> list(IPage<Map> iPage, Long collegeId, Long teachingRoomId, StatisticsStatusEnum status, String courseName, String teacherName, Long schoolId) {
+        return tcStatisticsMapper.list(iPage, collegeId, teachingRoomId, Objects.nonNull(status) ? status.name() : null, courseName, teacherName, schoolId);
     }
 }

+ 4 - 4
distributed-print-business/src/main/resources/mapper/TCStatisticsMapper.xml

@@ -104,11 +104,11 @@
                 and etd.enable = true
                 and et.school_id = #{schoolId}) t
                 <where>
-                    <if test="collegeName != null and collegeName != ''">
-                        and t.collegeName like concat('%',#{collegeName},'%')
+                    <if test="collegeId != null and collegeId != ''">
+                        and t.collegeId = #{collegeId}
                     </if>
-                    <if test="teachingRoomName != null and teachingRoomName != ''">
-                        and t.teachingRoomName like concat('%',#{teachingRoomName},'%')
+                    <if test="teachingRoomId != null and teachingRoomId != ''">
+                        and t.teachingRoomId = #{teachingRoomId}
                     </if>
                     <if test="status != null and status != ''">
                         and t.status = #{status}

+ 3 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/TCStatisticsController.java

@@ -67,14 +67,14 @@ public class TCStatisticsController {
     @ApiOperation(value = "命题计划统计-列表")
     @ApiResponses({@ApiResponse(code = 200, message = "命题统计信息", response = TCStatistics.class)})
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    public Result list(@ApiParam(value = "学院名称", required = false) @RequestParam(required = false) String collegeName,
-                       @ApiParam(value = "部门名称", required = false) @RequestParam(required = false) String teachingRoomName,
+    public Result list(@ApiParam(value = "学院id", required = false) @RequestParam(required = false) String collegeId,
+                       @ApiParam(value = "部门id", required = false) @RequestParam(required = false) String teachingRoomId,
                        @ApiParam(value = "完成状态", required = false) @RequestParam(required = false) StatisticsStatusEnum status,
                        @ApiParam(value = "课程名称", required = false) @RequestParam(required = false) String courseName,
                        @ApiParam(value = "任课老师名称", required = false) @RequestParam(required = false) String teacherName,
                        @ApiParam(value = "页码", required = true) @RequestParam Integer pageNumber,
                        @ApiParam(value = "数量", required = true) @RequestParam Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(tcStatisticsService.list(new Page<>(pageNumber, pageSize), collegeName, teachingRoomName, status, courseName, teacherName, sysUser.getSchoolId()));
+        return ResultUtil.ok(tcStatisticsService.list(new Page<>(pageNumber, pageSize), SystemConstant.convertIdToLong(collegeId), SystemConstant.convertIdToLong(teachingRoomId), status, courseName, teacherName, sysUser.getSchoolId()));
     }
 }