|
|
@ -21,6 +21,7 @@ import cn.teammodel.repository.DutyRecordRepository;
|
|
|
|
import cn.teammodel.repository.SchoolRepository;
|
|
|
|
import cn.teammodel.repository.SchoolRepository;
|
|
|
|
import cn.teammodel.repository.TeacherRepository;
|
|
|
|
import cn.teammodel.repository.TeacherRepository;
|
|
|
|
import cn.teammodel.security.utils.SecurityUtil;
|
|
|
|
import cn.teammodel.security.utils.SecurityUtil;
|
|
|
|
|
|
|
|
import cn.teammodel.utils.JsonUtil;
|
|
|
|
import cn.teammodel.utils.SchoolDateUtil;
|
|
|
|
import cn.teammodel.utils.SchoolDateUtil;
|
|
|
|
import com.azure.spring.data.cosmos.core.query.CosmosPageRequest;
|
|
|
|
import com.azure.spring.data.cosmos.core.query.CosmosPageRequest;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
@ -73,13 +74,13 @@ public class AdminIndexDutyServiceImpl implements AdminIndexDutyService {
|
|
|
|
private ClassRepository classRepository;
|
|
|
|
private ClassRepository classRepository;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private DutyRecordRepository dutyRecordRepository;
|
|
|
|
private DutyRecordRepository dutyRecordRepository;
|
|
|
|
|
|
|
|
|
|
|
|
private final Environment env;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private Environment env;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @Autowired
|
|
|
|
public AdminIndexDutyServiceImpl(Environment env) {
|
|
|
|
public AdminIndexDutyServiceImpl(Environment env) {
|
|
|
|
this.env = env;
|
|
|
|
this.env = env;
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DutyIndexData getIndexData(String periodId) {
|
|
|
|
public DutyIndexData getIndexData(String periodId) {
|
|
|
@ -224,7 +225,7 @@ public class AdminIndexDutyServiceImpl implements AdminIndexDutyService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Map<String, Object> getLessonRecord(Map<String, Object> map, HttpServletRequest request) {
|
|
|
|
public Map<String, Object> getLessonRecord(LessonRecordDto lessonRecordDto, HttpServletRequest request) {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> mapper = new HashMap<>();
|
|
|
|
Map<String, Object> mapper = new HashMap<>();
|
|
|
|
String apiUrl = env.getProperty("ies.server-url");
|
|
|
|
String apiUrl = env.getProperty("ies.server-url");
|
|
|
@ -240,8 +241,9 @@ public class AdminIndexDutyServiceImpl implements AdminIndexDutyService {
|
|
|
|
httpPost.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
|
|
httpPost.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
|
|
|
|
|
|
|
|
|
|
// 设置请求体
|
|
|
|
// 设置请求体
|
|
|
|
|
|
|
|
JsonUtil.convertToJson(lessonRecordDto);
|
|
|
|
//String requestBody = String.format("{\"school\":\"%s\"}","{\"name\":\"%s\"}","{\"periodId\":\"%s\"}", code,name,periodId);
|
|
|
|
//String requestBody = String.format("{\"school\":\"%s\"}","{\"name\":\"%s\"}","{\"periodId\":\"%s\"}", code,name,periodId);
|
|
|
|
httpPost.setEntity(new StringEntity(new Gson().toJson(map)));
|
|
|
|
httpPost.setEntity(new StringEntity(JsonUtil.convertToJson(lessonRecordDto)));
|
|
|
|
|
|
|
|
|
|
|
|
// 发送请求
|
|
|
|
// 发送请求
|
|
|
|
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
|
|
|
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
|
|
|