Browse Source

1、排课bug修复
2、班级动态info接口增加发布人和附件路径
3、收费管理查询调整

dzx 2 months ago
parent
commit
ee825db14c

+ 18 - 2
src/main/java/com/xjrsoft/module/base/controller/BaseClassDynamicsController.java

@@ -20,7 +20,11 @@ import com.xjrsoft.module.base.service.IBaseClassDynamicsService;
 import com.xjrsoft.module.base.service.IBaseUserStudentService;
 import com.xjrsoft.module.base.vo.BaseClassDynamicsPageVo;
 import com.xjrsoft.module.base.vo.BaseClassDynamicsVo;
+import com.xjrsoft.module.organization.entity.User;
+import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -37,7 +41,6 @@ import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
 * @title: 班级动态表
@@ -55,6 +58,8 @@ public class BaseClassDynamicsController {
     private final IBaseClassDynamicsService baseClassDynamicsService;
     private final IBaseStudentSchoolRollService rollService;
     private final IBaseUserStudentService userStudentService;
+    private final IUserService userService;
+    private final IFileService fileService;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="班级动态表列表(分页)")
@@ -112,7 +117,18 @@ public class BaseClassDynamicsController {
         if (baseClassDynamics == null) {
            return RT.error("找不到此数据!");
         }
-        return RT.ok(BeanUtil.toBean(baseClassDynamics, BaseClassDynamicsVo.class));
+        BaseClassDynamicsVo dynamicsVo = BeanUtil.toBean(baseClassDynamics, BaseClassDynamicsVo.class);
+        User user = userService.getById(baseClassDynamics.getCreateUserId());
+        dynamicsVo.setCreateUserName(user.getName());
+
+        if(dynamicsVo.getFolderId() != null){
+            File file = fileService.getOne(new QueryWrapper<File>().lambda().eq(File::getFolderId, dynamicsVo.getFolderId()));
+            if(file != null){
+                dynamicsVo.setFileUrl(file.getFileUrl());
+            }
+        }
+
+        return RT.ok(dynamicsVo);
     }
 
 

+ 6 - 0
src/main/java/com/xjrsoft/module/base/vo/BaseClassDynamicsVo.java

@@ -48,4 +48,10 @@ public class BaseClassDynamicsVo {
     @ApiModelProperty("发布时间")
     private Date createDate;
 
+    @ApiModelProperty("发布人")
+    private String createUserName;
+
+    @ApiModelProperty("发布人")
+    private String fileUrl;
+
 }

+ 1 - 1
src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java

@@ -669,7 +669,7 @@ public class DataUtil {
                 String updSql = "update course_table set teacher_serial_no = '" + teacher_serial_no + "'" +
                         ", teacher_id = " + teacherId
                         + ", teacher_name = '" + teacherName + "', modify_date = now()" +
-                        " ,course_id = " + courseClassId +
+                        " ,course_id = " + courseClassId + ", course_name = '" + courseClassName + "'" +
                         " where schedule_date = '" + scheduleDate + "'and class_id = " + classId + " and time_number = " + timeNumber + ";";
                 updateSqlList.add(updSql);
                 continue;

+ 0 - 1
src/main/java/com/xjrsoft/module/textbook/controller/TextbookStudentClaimController.java

@@ -62,7 +62,6 @@ public class TextbookStudentClaimController {
     @ApiOperation(value="学生教材认领记录列表(分页)")
     @SaCheckPermission("textbookstudentclaim:detail")
     public RT<PageOutput<TextbookStudentClaimPageVo>> page(@Valid TextbookStudentClaimPageDto dto){
-        long userId = StpUtil.getLoginIdAsLong();
         LambdaQueryWrapper<TextbookStudentClaim> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper
                 .orderByDesc(TextbookStudentClaim::getId)