|
|
@@ -3,14 +3,11 @@ package com.zhongzheng.modules.grade.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
-import cn.hutool.http.HttpRequest;
|
|
|
-import cn.hutool.http.HttpResponse;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
-import com.zhongzheng.common.exception.user.UserPasswordNotMatchException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.SecurityUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
@@ -46,15 +43,12 @@ import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import com.zhongzheng.modules.user.service.IUserUpdateService;
|
|
|
import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
|
|
|
import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
-import io.netty.handler.codec.http.cookie.Cookie;
|
|
|
import org.apache.http.Header;
|
|
|
-import org.apache.http.HttpEntity;
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
|
-import org.apache.http.client.methods.HttpPost;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.cloud.client.discovery.event.HeartbeatEvent;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -66,9 +60,7 @@ import com.zhongzheng.modules.grade.service.IClassGradeService;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.net.HttpCookie;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -589,13 +581,20 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (ObjectUtils.isEmpty(personRoot)) {
|
|
|
throw new CustomException(studyAccountStatusQueryBo.getRealname() + "学员信息为空");
|
|
|
}
|
|
|
- CertInfoListItem certInfoListItem = personRoot.getCertInfoList().get(0);
|
|
|
+ CertInfoListItem certInfoListItem = new CertInfoListItem();
|
|
|
+ for (CertInfoListItem certInfo : personRoot.getCertInfoList()) {
|
|
|
+ if (studyAccountStatusQueryBo.getWorkTypeName().equals(certInfo.getWorkTypeName())) {
|
|
|
+ BeanUtils.copyProperties(certInfo, certInfoListItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
//查询继教产品url
|
|
|
paramMap.clear();
|
|
|
String getProductUrl = "https://zjzyk.etledu.com/Student/GetProducts";
|
|
|
paramMap.put("workTypeCode", certInfoListItem.getWorkTypeCode());
|
|
|
paramMap.put("period", "0");
|
|
|
- paramMap.put("trainYear", bo.getTrainYear());
|
|
|
+ //获取当前的年份
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ paramMap.put("trainYear", String.valueOf(cal.get(Calendar.YEAR)));
|
|
|
String getProductHttpResponse = "";
|
|
|
try {
|
|
|
hearders.put("Referer", "https://zjzyk.etledu.com/Student/TrainInfo");
|