列车图例显示位置调整
This commit is contained in:
parent
2f8604c6bd
commit
eb16f39745
@ -317,15 +317,15 @@ public class PaperUserCreateService {
|
||||
criteria.andIdNotIn(existTrainIds);
|
||||
}*/
|
||||
|
||||
PublishedTraining2Example.Criteria criteria = this.training2PublishService.basicQueryCriteria(questionExample,pc.getMapId(),pc.getOrgId(), StringUtils.hasText(subTypeStr) ? subTypeStr.toUpperCase():null);
|
||||
PublishedTraining2Example.Criteria criteria = this.training2PublishService.basicQueryCriteria(questionExample,pc.getMapId(),pc.getOrgId(), StringUtils.hasText(subTypeStr) ? subTypeStr.toUpperCase():null,rule.getTags());
|
||||
if(!CollectionUtils.isEmpty(existTrainIds)){
|
||||
criteria.andIdNotIn(existTrainIds);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(rule.getTags())){
|
||||
/*if(!CollectionUtils.isEmpty(rule.getTags())){
|
||||
for (String tag : rule.getTags()) {
|
||||
criteria.andLabelJsonLike(String.format("%%%s%%", tag));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return questionExample;
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,10 @@ public class PaperUserSubmitAnswerService {
|
||||
List<Step2VO> allStepList = JsonUtils.readCollection(trainDetailVO.getStepJson(),ArrayList.class, Step2VO.class);
|
||||
|
||||
List<Step2VO> cosplayStepList = allStepList.stream().filter(d->Objects.equals(d.getMemberId(),req.getTrainAnswerDetail().getCosplayMemberId())).collect(Collectors.toList());
|
||||
|
||||
for (PaperTrainAnswerDetail answerDetail : req.getTrainAnswerDetail().getTrainDetail()) {
|
||||
|
||||
}
|
||||
if(req.getTrainAnswerDetail().getTrainDetail().size() != cosplayStepList.size()){
|
||||
return new TrainAnswerVO<>(PaperQuestionState.Wrong, req.getTrainAnswerDetail());
|
||||
}
|
||||
|
@ -50,10 +50,10 @@ public class Training2PublishService {
|
||||
public Long queryCountForLabel(Long mapId,@Deprecated Long orgId,String type,String label){
|
||||
PublishedTraining2Example example = new PublishedTraining2Example();
|
||||
// PublishedTraining2Example.Criteria c = example.createCriteria();
|
||||
PublishedTraining2Example.Criteria c = this.basicQueryCriteria(example,mapId,orgId,type);
|
||||
if(Objects.nonNull(label)){
|
||||
c.andLabelJsonLike(String.format("%%%s%%", label));
|
||||
}
|
||||
PublishedTraining2Example.Criteria c = this.basicQueryCriteria(example,mapId,orgId,type,Arrays.asList(label));
|
||||
// if(Objects.nonNull(label)){
|
||||
// c.andLabelJsonLike(String.format("%%%s%%", label));
|
||||
// }
|
||||
return this.publishedDao.countByExample(example);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ public class Training2PublishService {
|
||||
public Collection<String> findAllLabel(Long mapId,Long orgId, String type){
|
||||
PublishedTraining2Example example = new PublishedTraining2Example();
|
||||
// PublishedTraining2Example.Criteria c = example.createCriteria();
|
||||
PublishedTraining2Example.Criteria c = this.basicQueryCriteria(example,mapId,orgId,type);
|
||||
PublishedTraining2Example.Criteria c = this.basicQueryCriteria(example,mapId,orgId,type,null);
|
||||
List<PublishedTraining2> dataList = this.publishedDao.selectByExample(example);
|
||||
if(CollectionUtils.isEmpty(dataList)){
|
||||
return Collections.emptyList();
|
||||
@ -74,7 +74,7 @@ public class Training2PublishService {
|
||||
}).flatMap(d->d.stream()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public PublishedTraining2Example.Criteria basicQueryCriteria(PublishedTraining2Example example, Long mapId, Long orgId, String type){
|
||||
public PublishedTraining2Example.Criteria basicQueryCriteria(PublishedTraining2Example example, Long mapId, Long orgId, String type,List<String> lables){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(mapId),"请关联对应的线路");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(orgId),"组织信息不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(type),"查询类型信息不能为空");
|
||||
@ -93,7 +93,12 @@ public class Training2PublishService {
|
||||
or.andTypeEqualTo(type);
|
||||
// or.andOrgIdNotEqualTo(orgId);
|
||||
or.andStateEqualTo(BusinessConsts.STATUS_USE_INT);
|
||||
|
||||
if(!CollectionUtils.isEmpty(lables)){
|
||||
for (String tag : lables) {
|
||||
criteria.andLabelJsonLike(String.format("%%%s%%", tag));
|
||||
or.andLabelJsonLike(String.format("%%%s%%", tag));
|
||||
}
|
||||
}
|
||||
// PublishedTraining2Example.Criteria or2 = example.or();
|
||||
// or2.andMapIdEqualTo(mapId);
|
||||
// or2.andOrgIdEqualTo(orgId);
|
||||
|
Loading…
Reference in New Issue
Block a user