|
@@ -19,18 +19,16 @@ import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseEducationTypeQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseBusiness;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseEducationType;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseProjectType;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseBusinessService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
|
|
|
+import com.zhongzheng.modules.course.domain.*;
|
|
|
+import com.zhongzheng.modules.course.service.*;
|
|
|
import com.zhongzheng.modules.course.vo.*;
|
|
|
+import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.grade.bo.*;
|
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeGoods;
|
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeSys;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
@@ -41,6 +39,10 @@ import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindVo;
|
|
|
import com.zhongzheng.modules.order.mapper.OrderMapper;
|
|
|
+import com.zhongzheng.modules.system.domain.SysOldOrg;
|
|
|
+import com.zhongzheng.modules.system.domain.SysTenant;
|
|
|
+import com.zhongzheng.modules.system.service.ISysOldOrgService;
|
|
|
+import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
|
import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
|
|
|
import com.zhongzheng.modules.user.bo.UserUpdateQueryBo;
|
|
|
import com.zhongzheng.modules.user.domain.*;
|
|
@@ -49,6 +51,7 @@ 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 org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.Header;
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
@@ -71,6 +74,7 @@ import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -87,9 +91,15 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Autowired
|
|
|
private IGoodsService iGoodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysTenantService sysTenantService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICourseEducationTypeService courseEducationTypeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICourseSubjectService iCourseSubjectService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICourseProjectTypeService courseProjectTypeService;
|
|
|
|
|
@@ -132,6 +142,15 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Autowired
|
|
|
private ICourseBusinessService iCourseBusinessService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMajorService iMajorService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeGoodsService iClassGradeGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysOldOrgService iSysOldOrgService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
|
|
|
|
|
@@ -144,6 +163,12 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Value("${oldStudySys.pushGradeCount}")
|
|
|
private String GRADE_CHANGE_PATH;
|
|
|
|
|
|
+ @Value("${oldStudySys.classUserListPath}")
|
|
|
+ private String CLASS_LIST_PATH;
|
|
|
+
|
|
|
+ @Value("${oldStudySys.classOpenPath}")
|
|
|
+ private String CLASS_OPEN_PATH;
|
|
|
+
|
|
|
@Override
|
|
|
public ClassGradeVo queryById(Long gradeId) {
|
|
|
ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
@@ -154,7 +179,15 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Override
|
|
|
@DataScope(businessAlias = "cb")
|
|
|
public List<ClassGradeVo> queryList(ClassGradeQueryBo bo) {
|
|
|
- return entity2Vo(baseMapper.queryList(bo));
|
|
|
+ List<ClassGradeVo> classGradeVos = entity2Vo(baseMapper.queryList(bo));
|
|
|
+ if (CollectionUtils.isEmpty(classGradeVos)) {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ classGradeVos.forEach(item -> {
|
|
|
+ //获取班级总人数
|
|
|
+ item.setStudentNumAll(getClassUserNumAll(item.getGradeId()));
|
|
|
+ });
|
|
|
+ return classGradeVos;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -202,6 +235,51 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
throw new RuntimeException("班级名称不能重复");
|
|
|
}
|
|
|
+ //是否创建官方班级编号
|
|
|
+ if (bo.getClassGradeGoodsAddBos() != null &&
|
|
|
+ (ObjectUtils.isNull(bo.getClassStatus()) || 0 == bo.getClassStatus())) {
|
|
|
+ Long goodsId = bo.getClassGradeGoodsAddBos()[0];
|
|
|
+ Goods goods = iGoodsService.getById(goodsId);
|
|
|
+ CourseBusiness business = iCourseBusinessService.getById(goods.getBusinessId());
|
|
|
+ if (ObjectUtils.isNotNull(business) && ObjectUtils.isNotNull(business.getTemplateStatus()) && business.getTemplateStatus() == 1){
|
|
|
+ List<CourseSubject> courseSubjectList = iCourseSubjectService.listByIds(Arrays.asList(goods.getSubjectIds().split(",")));
|
|
|
+ List<String> subNames = courseSubjectList.stream().map(CourseSubject::getSubjectName).collect(Collectors.toList());
|
|
|
+ List<Long> subIds = iCourseSubjectService.getIdsByTenant(subNames);
|
|
|
+ //获取业务层次下所有班级
|
|
|
+ ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
+ bgListBo.setAliasName(business.getAliasName());
|
|
|
+ bgListBo.setSubIds(subIds);
|
|
|
+ List<ClassGrade> classGrades = baseMapper.getGradeListByTenant(bgListBo);
|
|
|
+ if (CollectionUtils.isEmpty(classGrades)){
|
|
|
+ //生成预报名官方编号
|
|
|
+ add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ }else {
|
|
|
+ //获取班级创建最多的机构
|
|
|
+ Map<Long, List<ClassGrade>> map = classGrades.stream().collect(Collectors.groupingBy(ClassGrade::getTenantId));
|
|
|
+ List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
+ map.forEach((k,v) -> {
|
|
|
+ ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
+ sortBo.setKey(k);
|
|
|
+ sortBo.setSize(v.size());
|
|
|
+ sortList.add(sortBo);
|
|
|
+ });
|
|
|
+ ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
+ List<ClassGrade> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGrade::getCreateTime)).collect(Collectors.toList());
|
|
|
+ //获取当前机构商品下的班级
|
|
|
+ List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goodsId);
|
|
|
+ if(gradeGoods.size() < classGradesMax.size()){
|
|
|
+ ClassGrade classGrade = classGradesMax.get(gradeGoods.size());
|
|
|
+ add.setOfficialName(classGrade.getRegisterCode());
|
|
|
+ add.setClassStatus(0);
|
|
|
+ }else {
|
|
|
+ //生成预报名官方编号
|
|
|
+ add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
boolean save = this.save(add);
|
|
|
//添加班级商品
|
|
|
if (bo.getClassGradeGoodsAddBos() != null) {
|
|
@@ -239,6 +317,23 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
ClassGrade update = BeanUtil.toBean(bo, ClassGrade.class);
|
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ //二建和二造班级开班预留预报名编号
|
|
|
+ if (update.getClassStatus() != null && update.getClassStatus().equals(1)) {
|
|
|
+ //二造和二建班级开班校验班级人数(300人)
|
|
|
+ ClassGradeGoods gradeGoods = iClassGradeGoodsService.getOne(new LambdaQueryWrapper<ClassGradeGoods>().eq(ClassGradeGoods::getGradeId,update.getGradeId()));
|
|
|
+ if (ObjectUtils.isNull(gradeGoods)){
|
|
|
+ throw new RuntimeException("班级商品信息查询失败");
|
|
|
+ }
|
|
|
+ Goods goods = iGoodsService.getById(gradeGoods.getGoodsId());
|
|
|
+ if (!checkEjjjPeopleNumLimit(goods.getBusinessId(),update.getGradeId())){
|
|
|
+ throw new RuntimeException("班级人数超过上限,不能开班,请检查!");
|
|
|
+ }
|
|
|
+
|
|
|
+ ClassGrade gradeGrade = getById(update.getGradeId());
|
|
|
+ if (StringUtils.isNotBlank(gradeGrade.getOfficialName())){
|
|
|
+ update.setRegisterCode(gradeGrade.getOfficialName());
|
|
|
+ }
|
|
|
+ }
|
|
|
if (bo.getStatus() != -1) {
|
|
|
LambdaQueryWrapper<ClassGrade> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(ClassGrade::getClassName, update.getClassName());
|
|
@@ -262,6 +357,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (list.size() > 0) {
|
|
|
throw new RuntimeException("班级还有学员,无法删除");
|
|
|
}
|
|
|
+ ClassGrade grade = getById(bo.getGradeId());
|
|
|
+ if (StringUtils.isNotBlank(grade.getOfficialName())){
|
|
|
+ throw new RuntimeException("二建/二造班级无法删除,请联系技术人员!");
|
|
|
+ }
|
|
|
}
|
|
|
if (bo.getStatus() == 0) { //更新为无效
|
|
|
ClassGradeVo oldGrade = this.queryById(bo.getGradeId());
|
|
@@ -273,6 +372,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
throw new RuntimeException("班级还有学员,无法设置为无效");
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(oldGrade.getOfficialName())){
|
|
|
+ throw new RuntimeException("二建/二造班级无法设置为无效,请联系技术人员!");
|
|
|
+ }
|
|
|
}
|
|
|
//更改班主任
|
|
|
if (bo.getSysUserId() != null) {
|
|
@@ -309,7 +411,35 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
classGradeVo.setClassEndTime(update.getClassEndTime());
|
|
|
sendClassSMS(classGradeVo);
|
|
|
}
|
|
|
- return this.updateById(update);
|
|
|
+ this.updateById(update);
|
|
|
+
|
|
|
+ ClassGrade grade = getById(update.getGradeId());
|
|
|
+ if (ObjectUtils.isNotNull(grade) && ObjectUtils.isNotNull(grade.getClassStatus())
|
|
|
+ && StringUtils.isNotBlank(grade.getOfficialName()) && grade.getClassStatus() == 1){
|
|
|
+ //官方班级开班通知旧系统
|
|
|
+ ClassGradeOpenBo openBo = new ClassGradeOpenBo();
|
|
|
+ openBo.setOfficialName(grade.getOfficialName());
|
|
|
+ openBo.setRegisterCode(grade.getRegisterCode());
|
|
|
+ openBo.setClassName(grade.getClassName());
|
|
|
+ openBo.setClassStartTime(grade.getClassStartTime());
|
|
|
+ openBo.setClassEndTime(grade.getClassEndTime());
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
+ openBo.setSign(sign);
|
|
|
+ openBo.setStamp(nowTime);
|
|
|
+ JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(openBo));
|
|
|
+ String respone = "";
|
|
|
+ try {
|
|
|
+ respone = HttpUtils.sendPost(CLASS_OPEN_PATH, param);
|
|
|
+ log.info("查询旧系统班级开班接口结果" + respone, "");
|
|
|
+ if (!respone.contains("\"Status\":true")) {
|
|
|
+ throw new CustomException("同步请求错误" + respone);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CustomException("同步请求错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
private void sendClassSMS(ClassGradeVo classGradeVo) {
|
|
@@ -378,9 +508,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
}
|
|
|
|
|
|
//E管证督学通知
|
|
|
- if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
|
|
|
- iGoodsService.informOldSys(userId,classGradeVo.getGoodsList().get(0).getGoodsId(),classGradeVo.getOrderGoodsId(),
|
|
|
- classGradeVo.getGradeId(),18,content, Arrays.asList(goodsName, startTime ,endTime,content));
|
|
|
+ if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)) {
|
|
|
+ iGoodsService.informOldSys(userId, classGradeVo.getGoodsList().get(0).getGoodsId(), classGradeVo.getOrderGoodsId(),
|
|
|
+ classGradeVo.getGradeId(), 18, content, Arrays.asList(goodsName, startTime, endTime, content));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -585,9 +715,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
Header[] headers = loginResponse.getHeaders("Set-Cookie");
|
|
|
try {
|
|
|
loginHttpResponse = EntityUtils.toString(loginResponse.getEntity());
|
|
|
- }catch (IOException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
- }finally {
|
|
|
+ } finally {
|
|
|
// 关闭CloseableHttpResponse
|
|
|
if (loginResponse != null) {
|
|
|
try {
|
|
@@ -611,7 +741,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
try {
|
|
|
hearders.put("Referer", "https://zjzyk.etledu.com/Student/TrainInfo");
|
|
|
getInfoHttpResponse = HttpUtils.postFormBodyHeader(getInfoRequestUrl, paramMap, hearders, headers);
|
|
|
- }catch (IOException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
if (getInfoHttpResponse.contains("{\"success\":true")) {
|
|
@@ -637,7 +767,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
try {
|
|
|
hearders.put("Referer", "https://zjzyk.etledu.com/Student/TrainInfo");
|
|
|
getProductHttpResponse = HttpUtils.postFormBodyHeader(getProductUrl, paramMap, hearders, headers);
|
|
|
- }catch (IOException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
if (getProductHttpResponse.contains("{\"success\":true")) {
|
|
@@ -660,8 +790,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
paramMap.put("WorkTypeCode", certInfoListItem.getWorkTypeCode());
|
|
|
paramMap.put("WorkTypeName", certInfoListItem.getWorkTypeName());
|
|
|
paramMap.put("productId", productsItem.getId().toString());
|
|
|
- certInfoListItem.getTrainInfos().forEach(trainInfo->{
|
|
|
- if (String.valueOf(cal.get(Calendar.YEAR)).equals(trainInfo.getTrainYear())){
|
|
|
+ certInfoListItem.getTrainInfos().forEach(trainInfo -> {
|
|
|
+ if (String.valueOf(cal.get(Calendar.YEAR)).equals(trainInfo.getTrainYear())) {
|
|
|
paramMap.put("trainPeriodDate", trainInfo.getTrainStartTime());
|
|
|
}
|
|
|
});
|
|
@@ -672,7 +802,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
try {
|
|
|
hearders.put("Referer", "");
|
|
|
sumitHttpResponse = HttpUtils.postFormBodyHeader(sumitRequestUrl, paramMap, hearders, headers);
|
|
|
- }catch (IOException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
@@ -695,7 +825,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (falseCount > 0) {
|
|
|
throw new CustomException(falseCount + "个开通失败");
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
throw new CustomException("登录官网失败,请检查信息");
|
|
|
}
|
|
|
|
|
@@ -719,9 +849,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
CloseableHttpResponse codeResponse = HttpUtils.sendPostHeader(sendCodeUrl, codeJsonObject.toString(), hearders);
|
|
|
try {
|
|
|
codeHttpResponse = EntityUtils.toString(codeResponse.getEntity());
|
|
|
- }catch (IOException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
- }finally {
|
|
|
+ } finally {
|
|
|
// 关闭CloseableHttpResponse
|
|
|
if (codeResponse != null) {
|
|
|
try {
|
|
@@ -757,17 +887,17 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
businessQueryBo.setId(businessId);
|
|
|
String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
- if(("继续教育二级建造师".equals(fullName))||("继续教育二级造价师".equals(fullName))){
|
|
|
+ if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
//继教二建或者继教二造班级
|
|
|
ClassGradeVo gradeVo = queryById(gradeId);
|
|
|
- if(Validator.isNotEmpty(gradeVo)&&Validator.isNotEmpty(gradeVo.getOfficialName())){
|
|
|
+ if (Validator.isNotEmpty(gradeVo) && Validator.isNotEmpty(gradeVo.getOfficialName())) {
|
|
|
ClassGradeQueryBo queryBo = new ClassGradeQueryBo();
|
|
|
queryBo.setOfficialName(gradeVo.getOfficialName());
|
|
|
Integer peopleNum = queryOfficialGradeCount(queryBo);
|
|
|
//查询旧系统
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
Long nowTime = DateUtils.getNowTime();
|
|
|
- String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString() + "pubilc2022");
|
|
|
params.put("stamp", nowTime.toString());
|
|
|
params.put("sign", sign);
|
|
|
params.put("jsonstr", gradeVo.getOfficialName());
|
|
@@ -775,19 +905,19 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
Integer oldGradeNum = 0;
|
|
|
try {
|
|
|
respone = HttpUtils.postFormBody(GRADE_COUNT_PATH, params);
|
|
|
- log.info("查询业务系统班级人数结果"+respone,"");
|
|
|
+ log.info("查询业务系统班级人数结果" + respone, "");
|
|
|
if (!respone.contains("\"Status\":true")) {
|
|
|
- throw new CustomException("同步请求错误"+respone);
|
|
|
+ throw new CustomException("同步请求错误" + respone);
|
|
|
}
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(respone);
|
|
|
- JSONArray dataArray = jsonObject.getJSONArray("Data");
|
|
|
+ JSONArray dataArray = jsonObject.getJSONArray("Data");
|
|
|
JSONObject fObject = dataArray.getJSONObject(0);
|
|
|
- oldGradeNum = (Integer)fObject.get("num");
|
|
|
+ oldGradeNum = (Integer) fObject.get("num");
|
|
|
} catch (IOException e) {
|
|
|
- log.info("查询业务系统班级人数失败参数"+params,"");
|
|
|
- throw new CustomException("同步查询班级人数请求错误"+e.getMessage());
|
|
|
+ log.info("查询业务系统班级人数失败参数" + params, "");
|
|
|
+ throw new CustomException("同步查询班级人数请求错误" + e.getMessage());
|
|
|
}
|
|
|
- if((peopleNum+oldGradeNum)>=3){ //全系统平台二建班级人数不能超300
|
|
|
+ if ((peopleNum + oldGradeNum) >= 5) { //全系统平台二建班级人数不能超300
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -796,6 +926,47 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ private Integer getClassUserNumAll(Long gradeId) {
|
|
|
+ Integer numAll = 0;
|
|
|
+ ClassGradeVo gradeVo = queryById(gradeId);
|
|
|
+ if (Validator.isNotEmpty(gradeVo) && Validator.isNotEmpty(gradeVo.getOfficialName())) {
|
|
|
+ ClassGradeQueryBo queryBo = new ClassGradeQueryBo();
|
|
|
+ queryBo.setOfficialName(gradeVo.getOfficialName());
|
|
|
+ Integer peopleNum = queryOfficialGradeCount(queryBo);
|
|
|
+ //查询旧系统
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString() + "pubilc2022");
|
|
|
+ params.put("stamp", nowTime.toString());
|
|
|
+ params.put("sign", sign);
|
|
|
+ params.put("jsonstr", gradeVo.getOfficialName());
|
|
|
+ String respone = "";
|
|
|
+ log.info("查询业务系统班级人数" + params, "");
|
|
|
+ Integer oldGradeNum = 0;
|
|
|
+ try {
|
|
|
+ respone = HttpUtils.postFormBody(GRADE_COUNT_PATH, params);
|
|
|
+ log.info("查询业务系统班级人数结果" + respone, "");
|
|
|
+ if (!respone.contains("\"Status\":true")) {
|
|
|
+ throw new CustomException("同步请求错误" + respone);
|
|
|
+ }
|
|
|
+ JSONObject jsonObject = (JSONObject) JSONObject.parse(respone);
|
|
|
+ JSONArray dataArray = jsonObject.getJSONArray("Data");
|
|
|
+ JSONObject fObject = dataArray.getJSONObject(0);
|
|
|
+ oldGradeNum = (Integer) fObject.get("num");
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.info("查询业务系统班级人数失败参数" + params, "");
|
|
|
+ throw new CustomException("同步查询班级人数请求错误" + e.getMessage());
|
|
|
+ }
|
|
|
+ numAll = peopleNum + oldGradeNum;
|
|
|
+ }else {
|
|
|
+ Long num = baseMapper.getClassUserNumByTenant(gradeId);
|
|
|
+ if (ObjectUtils.isNotNull(num)){
|
|
|
+ numAll = num.intValue();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return numAll;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<ClassGradeVo> queryGradeList(ClassGradeQueryBo bo) {
|
|
|
return baseMapper.queryGradeList(bo);
|
|
@@ -806,10 +977,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
businessQueryBo.setId(businessId);
|
|
|
String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
- if(("继续教育二级建造师".equals(fullName))||("继续教育二级造价师".equals(fullName))){
|
|
|
+ if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
//继教二建或者继教二造班级
|
|
|
ClassGradeVo gradeVo = queryById(gradeId);
|
|
|
- if(Validator.isNotEmpty(gradeVo)&&Validator.isNotEmpty(gradeVo.getOfficialName())){
|
|
|
+ if (Validator.isNotEmpty(gradeVo) && Validator.isNotEmpty(gradeVo.getOfficialName())) {
|
|
|
ClassGradeQueryBo queryBo = new ClassGradeQueryBo();
|
|
|
queryBo.setOfficialName(gradeVo.getOfficialName());
|
|
|
Integer num = queryOfficialGradeCount(queryBo);
|
|
@@ -821,19 +992,19 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
//通知旧系统
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
Long nowTime = DateUtils.getNowTime();
|
|
|
- String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString() + "pubilc2022");
|
|
|
params.put("stamp", nowTime.toString());
|
|
|
params.put("sign", sign);
|
|
|
params.put("jsonstr", JSONArray.toJSONString(boList));
|
|
|
String respone = "";
|
|
|
try {
|
|
|
respone = HttpUtils.postFormBody(GRADE_CHANGE_PATH, params);
|
|
|
- log.info("同步系统班级人数结果"+respone,"");
|
|
|
+ log.info("同步系统班级人数结果" + respone, "");
|
|
|
if (!respone.contains("\"Status\":true")) {
|
|
|
- throw new CustomException("旧系统接口请求错误"+respone);
|
|
|
+ throw new CustomException("旧系统接口请求错误" + respone);
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
|
- throw new CustomException("旧系统接口请求错误"+e.getMessage());
|
|
|
+ throw new CustomException("旧系统接口请求错误" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -841,6 +1012,262 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ClassGradeVo getClassGradeVo(Long gradeId) {
|
|
|
+ ClassGrade gradeVo = getById(gradeId);
|
|
|
+ if (ObjectUtils.isNull(gradeVo)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ ClassGradeVo vo = BeanUtil.toBean(gradeVo, ClassGradeVo.class);
|
|
|
+ //班级人数
|
|
|
+ Integer count = iClassGradeUserService.count(new LambdaQueryWrapper<ClassGradeUser>()
|
|
|
+ .eq(ClassGradeUser::getGradeId, gradeId)
|
|
|
+ .eq(ClassGradeUser::getStatus, 1));
|
|
|
+ vo.setStudentNum(count);
|
|
|
+ //获取班级总人数
|
|
|
+ vo.setStudentNumAll(getClassUserNumAll(gradeId));
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ClassNpUserInfoVo> officialGradeDetail(ClassNpUserInfoBo bo) {
|
|
|
+ List<ClassNpUserInfoVo> result = baseMapper.getGradeDetailByTenant(bo);
|
|
|
+ if (CollectionUtils.isEmpty(result)){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ result.forEach(item -> {
|
|
|
+ String date = "yyyy-MM-dd HH:mm:ss";
|
|
|
+ item.setOrderTime(DateUtils.timestampToDateFormat(item.getOrderTimeLong(),date));
|
|
|
+ item.setCreateTime(DateUtils.timestampToDateFormat(item.getCreateTimeLong(),date));
|
|
|
+ item.setDoTime(DateUtils.timestampToDateFormat(item.getDoTimeLong(),date));
|
|
|
+ //机构名称
|
|
|
+ SysTenant tenant = sysTenantService.getById(item.getTenantId());
|
|
|
+ if (ObjectUtils.isNotNull(tenant)){
|
|
|
+ item.setOrgName(tenant.getTenantName());
|
|
|
+ }
|
|
|
+ //获取学习开始时间和结束时间
|
|
|
+ UserStudyRecord startRecord = iUserStudyRecordService.getStudyRecord(item.getUserId(),item.getGradeId(),"ASC");
|
|
|
+ if (ObjectUtils.isNotNull(startRecord)){
|
|
|
+ item.setBeginTime(DateUtils.timestampToDateFormat(startRecord.getCreateTime(),date));
|
|
|
+ UserStudyRecord endRecord = iUserStudyRecordService.getStudyRecord(item.getUserId(),item.getGradeId(),"DESC");
|
|
|
+ item.setApplyTime(DateUtils.timestampToDateFormat(endRecord.getCreateTime(),date));
|
|
|
+ }
|
|
|
+ //科目名称
|
|
|
+ if(StringUtils.isNotBlank(item.getSubjectIds())){
|
|
|
+ List<CourseSubject> courseSubjectList = iCourseSubjectService.listByIds(Arrays.asList(item.getSubjectIds().split(",")));
|
|
|
+ item.setMajorName(courseSubjectList.stream().filter(x -> StringUtils.isNotBlank(x.getSubjectName())).map(CourseSubject::getSubjectName).collect(Collectors.joining(",")));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getOfficialGradeNum(ClassOfficialNumBo bo) {
|
|
|
+ List<Long> subIds = iCourseSubjectService.getIdsByTenant(Arrays.asList(bo.getSubName()));
|
|
|
+ //获取业务层次下所有班级
|
|
|
+ ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
+ bgListBo.setAliasName(bo.getAliasName());
|
|
|
+ bgListBo.setSubIds(subIds);
|
|
|
+ List<ClassGrade> classGrades = baseMapper.getGradeListByTenant(bgListBo);
|
|
|
+ //祥粤云
|
|
|
+ Long tenantId = 867735392558919680L;
|
|
|
+ bgListBo.setTenantId(tenantId);
|
|
|
+ List<Long> goodsIds = baseMapper.getGoodsIdByBoTenant(bgListBo);
|
|
|
+ if (CollectionUtils.isEmpty(goodsIds)){
|
|
|
+ throw new CustomException("改业务层次下不存在商品,请检查!");
|
|
|
+ }
|
|
|
+ //生成预报名官方编号
|
|
|
+ String encoded = ServletUtils.getEncoded("PIY");
|
|
|
+ if (CollectionUtils.isEmpty(classGrades)){
|
|
|
+ //创建新预报名班级
|
|
|
+ creatClass(goodsIds.get(0),tenantId,encoded);
|
|
|
+ }else {
|
|
|
+ //获取班级创建最多的机构
|
|
|
+ Map<Long, List<ClassGrade>> map = classGrades.stream().collect(Collectors.groupingBy(ClassGrade::getTenantId));
|
|
|
+ List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
+ map.forEach((k,v) -> {
|
|
|
+ ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
+ sortBo.setKey(k);
|
|
|
+ sortBo.setSize(v.size());
|
|
|
+ sortList.add(sortBo);
|
|
|
+ });
|
|
|
+ ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
+ List<ClassGrade> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGrade::getCreateTime)).collect(Collectors.toList());
|
|
|
+ if(bo.getSortNum() < classGradesMax.size()){
|
|
|
+ ClassGrade classGrade = classGradesMax.get(bo.getSortNum());
|
|
|
+ return classGrade.getOfficialName();
|
|
|
+ }else {
|
|
|
+ //创建新预报名班级
|
|
|
+ creatClass(goodsIds.get(0),tenantId,encoded);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return encoded;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ClassGrade> getGradeListByTenant(ClassGradeListBo bgListBo) {
|
|
|
+ return baseMapper.getGradeListByTenant(bgListBo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void openOfficialGrade(ClassGradeOpenBo bo) {
|
|
|
+ List<ClassGrade> list = baseMapper.getGradeListByCodeTenant(bo.getRegisterCode());
|
|
|
+ if (CollectionUtils.isEmpty(list)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<Long> ids = list.stream().map(ClassGrade::getGradeId).collect(Collectors.toList());
|
|
|
+ //保留预报名编号
|
|
|
+ baseMapper.UpGradeCodeByIdTenant(ids);
|
|
|
+
|
|
|
+ ClassGradeOpenUpBo openUpBo = new ClassGradeOpenUpBo();
|
|
|
+ openUpBo.setGradeIds(ids);
|
|
|
+ openUpBo.setClassStatus(bo.getClassStatus());
|
|
|
+ openUpBo.setOfficialName(bo.getOfficialName());
|
|
|
+ openUpBo.setClassName(bo.getClassName());
|
|
|
+ openUpBo.setClassStartTime(bo.getClassStartTime());
|
|
|
+ openUpBo.setClassEndTime(bo.getClassEndTime());
|
|
|
+ baseMapper.UpGradeStatusByTenant(openUpBo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ClassNpUserInfoVo> otherClassUserList(ClassNpUserInfoBo bo) {
|
|
|
+ ClassGrade grade = getById(bo.getGradeId());
|
|
|
+ if (ObjectUtils.isNull(grade) || StringUtils.isBlank(grade.getOfficialName())){
|
|
|
+ throw new CustomException("班级信息有有误,请联系管理员!");
|
|
|
+ }
|
|
|
+ //查询旧机构对应新系统ID
|
|
|
+ if (ObjectUtils.isNotNull(bo.getTrainOrgId())){
|
|
|
+ List<SysOldOrg> list = iSysOldOrgService.list(new LambdaQueryWrapper<SysOldOrg>()
|
|
|
+ .eq(SysOldOrg::getOrgId, bo.getTrainOrgId())
|
|
|
+ .eq(SysOldOrg::getStatus, 1));
|
|
|
+ if (CollectionUtils.isNotEmpty(list)){
|
|
|
+ SysOldOrg sysOldOrg = list.get(0);
|
|
|
+ bo.setTenantId(ObjectUtils.isNotNull(sysOldOrg.getTenantId())?sysOldOrg.getTenantId():0L);
|
|
|
+ }else {
|
|
|
+ bo.setTenantId(0L);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bo.setOfficialName(grade.getOfficialName());
|
|
|
+ //新系统二建/二造班级学员信息
|
|
|
+ List<ClassNpUserInfoVo> result = baseMapper.getGradeDetailByTenant(bo);
|
|
|
+ if (CollectionUtils.isNotEmpty(result)){
|
|
|
+ result.forEach(item -> {
|
|
|
+ String date = "yyyy-MM-dd HH:mm:ss";
|
|
|
+ item.setOrderTime(DateUtils.timestampToDateFormat(item.getOrderTimeLong(),date));
|
|
|
+ item.setCreateTime(DateUtils.timestampToDateFormat(item.getCreateTimeLong(),date));
|
|
|
+ item.setDoTime(DateUtils.timestampToDateFormat(item.getDoTimeLong(),date));
|
|
|
+ //机构名称
|
|
|
+ SysTenant tenant = sysTenantService.getById(item.getTenantId());
|
|
|
+ if (ObjectUtils.isNotNull(tenant)){
|
|
|
+ item.setOrgName(tenant.getTenantName());
|
|
|
+ }
|
|
|
+ //获取学习开始时间和结束时间
|
|
|
+ UserStudyRecord startRecord = iUserStudyRecordService.getStudyRecord(item.getUserId(),item.getGradeId(),"ASC");
|
|
|
+ if (ObjectUtils.isNotNull(startRecord)){
|
|
|
+ item.setBeginTime(DateUtils.timestampToDateFormat(startRecord.getCreateTime(),date));
|
|
|
+ UserStudyRecord endRecord = iUserStudyRecordService.getStudyRecord(item.getUserId(),item.getGradeId(),"DESC");
|
|
|
+ item.setApplyTime(DateUtils.timestampToDateFormat(endRecord.getCreateTime(),date));
|
|
|
+ }
|
|
|
+ //科目名称
|
|
|
+ if(StringUtils.isNotBlank(item.getSubjectIds())){
|
|
|
+ List<CourseSubject> courseSubjectList = iCourseSubjectService.listByIds(Arrays.asList(item.getSubjectIds().split(",")));
|
|
|
+ item.setMajorName(courseSubjectList.stream().filter(x -> StringUtils.isNotBlank(x.getSubjectName())).map(CourseSubject::getSubjectName).collect(Collectors.joining(",")));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //旧系统二建/二造班级学员信息
|
|
|
+ bo.setClassNo(bo.getOfficialName());
|
|
|
+// Map<String, String> params = new HashMap<>();
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
+// params.put("stamp", nowTime.toString());
|
|
|
+// params.put("sign", sign);
|
|
|
+// params.put("jsonstr", JSONObject.toJSONString(bo));
|
|
|
+ bo.setSign(sign);
|
|
|
+ bo.setStamp(nowTime);
|
|
|
+ JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(bo));
|
|
|
+ String respone = "";
|
|
|
+ try {
|
|
|
+ respone = HttpUtils.sendPost(CLASS_LIST_PATH, param);
|
|
|
+ log.info("查询旧系统班级人数结果" + respone, "");
|
|
|
+ if (!respone.contains("\"Status\":true")) {
|
|
|
+ throw new CustomException("同步请求错误" + respone);
|
|
|
+ }
|
|
|
+ JSONObject jsonObject = (JSONObject) JSONObject.parse(respone);
|
|
|
+ JSONArray dataArray = jsonObject.getJSONArray("Message");
|
|
|
+ if (ObjectUtils.isNotNull(dataArray)){
|
|
|
+ List<ClassNpUserInfoVo> voList = JSONArray.parseArray(JSONArray.toJSONString(dataArray), ClassNpUserInfoVo.class);
|
|
|
+ result.addAll(voList);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CustomException("同步请求错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //创建预开班班级
|
|
|
+ private void creatClass(Long goodsId,Long tenantId,String code){
|
|
|
+ //创建新班级
|
|
|
+ Goods goods = iGoodsService.getGoodsByIdTenant(goodsId,tenantId);
|
|
|
+ CourseBusiness businessVo = iCourseBusinessService.getBusinessByIdTenant(goods.getBusinessId(),tenantId);
|
|
|
+ boolean isConfigTp = false; //商品是否有配置选班模板
|
|
|
+ if (Validator.isNotEmpty(businessVo) && Validator.isNotEmpty(businessVo.getTemplateStatus()) && businessVo.getTemplateStatus() == 1) {
|
|
|
+ isConfigTp = true;
|
|
|
+ }
|
|
|
+ ClassGrade classGrade = new ClassGrade();
|
|
|
+ classGrade.setCreateTime(DateUtils.getNowTime());
|
|
|
+ if (isConfigTp) {
|
|
|
+ classGrade.setClassStatus(0);
|
|
|
+ classGrade.setLearningStatus(2);//待定
|
|
|
+ classGrade.setStudentUpper(ClassGrade.INIT_UPPER); //上限300
|
|
|
+ //生成官方班级编号
|
|
|
+ classGrade.setOfficialName(code);
|
|
|
+ }
|
|
|
+ classGrade.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ classGrade.setStatus(1);
|
|
|
+ String gradeCode = ServletUtils.getEncoded("BJ");
|
|
|
+ classGrade.setGradeCode(gradeCode);
|
|
|
+// classGrade.setClassName(goodsName + gradeCode);
|
|
|
+ //班级名称 年份+期数+业务层次(俗名)+教育类型+科目(存在多个科目时,显示多个科目,用“+”分割)
|
|
|
+ String businessName = businessVo.getAliasName();
|
|
|
+ CourseEducationType educationType = courseEducationTypeService.getEducationByIdtenant(goods.getEducationTypeId(),tenantId);
|
|
|
+ String educationName = educationType.getEducationName();
|
|
|
+ String className = businessName + educationName;
|
|
|
+ if (net.polyv.common.v1.util.StringUtils.isNotBlank(goods.getSubjectIds())){
|
|
|
+ ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
+ bgListBo.setSubIds(Arrays.stream(goods.getSubjectIds().split(",")).map(x -> Long.valueOf(x)).collect(Collectors.toList()));
|
|
|
+ bgListBo.setTenantId(tenantId);
|
|
|
+ List<CourseSubject> subjects = iCourseSubjectService.listByIdsTenant(bgListBo);
|
|
|
+ List<String> names = subjects.stream().map(CourseSubject::getSubjectName).collect(Collectors.toList());
|
|
|
+ className = String.format("%s(%s)",className,org.apache.commons.lang3.StringUtils.join(names,'+'));
|
|
|
+ }
|
|
|
+ Integer nameSort = 1;
|
|
|
+ //获取排序值
|
|
|
+ List<ClassGrade> list = baseMapper.queryListByNameTenantId(className,tenantId);
|
|
|
+ if (CollectionUtils.isNotEmpty(list)){
|
|
|
+ List<Integer> collect = list.stream().filter(x -> x.getClassName().contains("第") && x.getClassName().contains("期")).map(item -> {
|
|
|
+ String name = item.getClassName();
|
|
|
+ String substring = name.substring(name.indexOf("第") + 1, name.indexOf("期"));
|
|
|
+ return Integer.parseInt(substring);
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(collect)){
|
|
|
+ Integer integer = collect.stream().sorted(Comparator.reverseOrder()).findFirst().get();
|
|
|
+ nameSort = integer + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ classGrade.setClassName(String.format("%s年第%s期%s",goods.getYear(),nameSort,className));
|
|
|
+ classGrade.setTenantId(tenantId);
|
|
|
+ save(classGrade);
|
|
|
+ //绑定班级商品
|
|
|
+ ClassGradeGoods classGradeGoods = new ClassGradeGoods();
|
|
|
+ classGradeGoods.setGradeId(classGrade.getGradeId());
|
|
|
+ classGradeGoods.setGoodsId(goodsId);
|
|
|
+ classGradeGoods.setCreateTime(DateUtils.getNowTime());
|
|
|
+ classGradeGoods.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ classGradeGoods.setTenantId(tenantId);
|
|
|
+ iClassGradeGoodsService.save(classGradeGoods);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 实体类转化成视图对象
|