소스 검색

课表消息通知调整

dzx 9 달 전
부모
커밋
82b08a7c6d
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java

+ 9 - 1
src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java

@@ -19,7 +19,9 @@ import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.service.IBaseClassService;
+import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.courseTable.dto.ClassTeacherDto;
 import com.xjrsoft.module.courseTable.entity.CourseTable;
 import com.xjrsoft.module.courseTable.service.ICourseTableService;
@@ -145,6 +147,9 @@ public class JianyuekbScheduleTask {
     @Autowired
     private ICourseReceiveMsgService receiveMsgService;
 
+    @Autowired
+    private IBaseGradeService gradeService;
+
     @Scheduled(cron = "0 */10 * * * ?")
     public void execute(){
         doExecute();
@@ -301,6 +306,9 @@ public class JianyuekbScheduleTask {
             );
             String[] sourceId = jianyueData.getSourceId().split("_");
             Department department = departmentService.getById(sourceId[0]);
+
+            BaseGrade grade = gradeService.getById(sourceId[1]);
+
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             //通知对应教师
             List<User> userList = userService.listByIds(new ArrayList<>(techerIds));
@@ -314,7 +322,7 @@ public class JianyuekbScheduleTask {
                 paramJson.put("thing8", thing8);
 
                 JSONObject thing2 = new JSONObject();
-                thing2.put("value", department.getName());
+                thing2.put("value", department.getName() + grade.getName());
                 paramJson.put("thing2", thing2);
 
                 JSONObject thing6 = new JSONObject();