|
@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
|
|
import cn.hutool.core.lang.Validator;
|
|
import cn.hutool.core.lang.Validator;
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.IdUtil;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
@@ -32,6 +33,7 @@ import com.zhongzheng.modules.bank.bo.QuestionModuleChapterQueryBo;
|
|
import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
|
|
import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
|
|
import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
|
|
import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
|
|
import com.zhongzheng.modules.bank.vo.ExamVo;
|
|
import com.zhongzheng.modules.bank.vo.ExamVo;
|
|
|
|
+import com.zhongzheng.modules.bank.vo.ExternalQuestionVo;
|
|
import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
|
|
import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
|
|
import com.zhongzheng.modules.base.service.IUserProfileService;
|
|
import com.zhongzheng.modules.base.service.IUserProfileService;
|
|
import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
@@ -203,6 +205,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
@Value("${oldSys.host}")
|
|
@Value("${oldSys.host}")
|
|
private String OLD_SYS_HOST;
|
|
private String OLD_SYS_HOST;
|
|
|
|
|
|
|
|
+ @Value("${oldSys.studyCheck}")
|
|
|
|
+ private String OLD_STUDY_CHECK;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private IUserPeriodService iUserPeriodService;
|
|
private IUserPeriodService iUserPeriodService;
|
|
|
|
|
|
@@ -3685,6 +3690,27 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Long checkFinishRequiredCourse(ClassGradeUserQueryBo bo) {
|
|
public Long checkFinishRequiredCourse(ClassGradeUserQueryBo bo) {
|
|
|
|
+ //查询旧系统是否有学习
|
|
|
|
+ String businessName = iGoodsService.getGoodsBusinessName(bo.getGoodsId());
|
|
|
|
+ if (businessName.contains("继续教育二级建造师") || businessName.contains("继续教育二级造价师")){
|
|
|
|
+ User user = iUserService.getById(bo.getUserId());
|
|
|
|
+ Integer type = "继续教育二级建造师".equals(businessName)?1:2;
|
|
|
|
+ String param = String.format("idnum=%s&type=%s",EncryptHandler.decrypt(user.getIdCard()),type);
|
|
|
|
+ String respone = "";
|
|
|
|
+ try {
|
|
|
|
+ respone = HttpUtils.sendGet(OLD_STUDY_CHECK, param);
|
|
|
|
+ if (respone.contains("\"Status\":true")) {
|
|
|
|
+ JSONObject jsonObject1 = JSONObject.parseObject(respone);
|
|
|
|
+ UserStudyTimeVo timeVo = JSONArray.parseObject(jsonObject1.get("data").toString(), UserStudyTimeVo.class);
|
|
|
|
+ if (ObjectUtils.isNotNull(timeVo) && ObjectUtils.isNotNull(timeVo.getStudyStartTime()) && timeVo.getStudyFlag()){
|
|
|
|
+ //旧系统正在学习中
|
|
|
|
+ return 1L;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new CustomException("旧系统二建继续校验接口请求失败"+e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return baseMapper.checkFinishRequiredCourse(bo);
|
|
return baseMapper.checkFinishRequiredCourse(bo);
|
|
}
|
|
}
|
|
|
|
|