|
|
@@ -607,24 +607,18 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
}
|
|
|
this.updateById(update);
|
|
|
if (fullName.contains("继续教育") && fullName.contains("施工现场专业人员") && StringUtils.isNotBlank(classGradeVo.getSevenCode())){
|
|
|
- List<ClassGrade> list = list(new LambdaQueryWrapper<ClassGrade>()
|
|
|
- .eq(ClassGrade::getSevenCode, classGradeVo.getSevenCode())
|
|
|
- .ne(ClassGrade::getGradeId,update.getGradeId()));
|
|
|
+ List<ClassGrade> list = baseMapper.getListNoTenant(classGradeVo.getSevenCode(),update.getGradeId());
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
|
List<ClassGrade> collect = list.stream().filter(item -> {
|
|
|
- ClassGradeGoods classGradeGoods = iClassGradeGoodsService
|
|
|
- .getOne(new LambdaQueryWrapper<ClassGradeGoods>()
|
|
|
- .eq(ClassGradeGoods::getGradeId, item.getGradeId())
|
|
|
- .last("limit 1"));
|
|
|
- Goods goodsOne = iGoodsService.getById(classGradeGoods.getGoodsId());
|
|
|
+ ClassGradeGoods classGradeGoods = iClassGradeGoodsService.getOneNoTenant(item.getGradeId());
|
|
|
+ Goods goodsOne = iGoodsService.getGoodsByIdNotTenant(classGradeGoods.getGoodsId());
|
|
|
return StringUtils.isNotBlank(goodsOne.getSevenYear()) && !Arrays.asList("2021", "2022").contains(goodsOne.getSevenYear());
|
|
|
}).collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(collect)){
|
|
|
- List<ClassGrade> collect1 = list.stream().map(item -> {
|
|
|
+ list.forEach(item ->{
|
|
|
update.setGradeId(item.getGradeId());
|
|
|
- return update;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- updateBatchById(collect1);
|
|
|
+ updateByIdNoTenant(update);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -677,6 +671,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ private void updateByIdNoTenant(ClassGrade update) {
|
|
|
+ baseMapper.updateByIdNoTenant(update);
|
|
|
+ }
|
|
|
+
|
|
|
private void sendClassSMS(ClassGradeVo classGradeVo) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryByName("二建继教开班提醒");
|
|
|
if (CollectionUtils.isEmpty(classGradeVo.getGoodsList())) {
|
|
|
@@ -1228,7 +1226,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
private Integer getClassUserNumAll(Long gradeId) {
|
|
|
Integer numAll = 0;
|
|
|
ClassGradeVo gradeVo = queryById(gradeId);
|
|
|
- if (Validator.isNotEmpty(gradeVo) && Validator.isNotEmpty(gradeVo.getOfficialName())) {
|
|
|
+ if (Validator.isNotEmpty(gradeVo)
|
|
|
+ && Validator.isNotEmpty(gradeVo.getOfficialName()) && Validator.isEmpty(gradeVo.getSevenCode())) {
|
|
|
ClassGradeQueryBo queryBo = new ClassGradeQueryBo();
|
|
|
queryBo.setOfficialName(gradeVo.getOfficialName());
|
|
|
Integer peopleNum = queryOfficialGradeCount(queryBo);
|