|
@@ -225,23 +225,33 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
List<String> ids = sbInfoList.stream().map(SbInfoScreenDetailVO::getId).collect(Collectors.toList());
|
|
|
Weekend<RepairApplicationForm> weekendRepair = new Weekend<>(RepairApplicationForm.class);
|
|
|
WeekendCriteria<RepairApplicationForm, Object> weekendCriteria = weekendRepair.weekendCriteria();
|
|
|
- weekendCriteria.andIn(RepairApplicationForm::getSbId, ids).andEqualTo(RepairApplicationForm::getStatus, RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
+ List<Integer> statusList = new ArrayList<Integer>();
|
|
|
+ statusList.add(RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
+ statusList.add(RepairApplicationFormStatusEnum.PROCESSING.getValue());
|
|
|
+ weekendCriteria.andIn(RepairApplicationForm::getSbId, ids).andIn(RepairApplicationForm::getStatus, statusList);
|
|
|
List<RepairApplicationForm> repairList = repairApplicationFormMapper.selectByExample(weekendRepair);
|
|
|
List<SbInfoScreenDetailVO> normalSbInfoList = new ArrayList<SbInfoScreenDetailVO>();
|
|
|
- List<SbInfoScreenDetailVO> repairSbInfoList = new ArrayList<SbInfoScreenDetailVO>();
|
|
|
+ List<SbInfoScreenDetailVO> repairSbInfoListYellow = new ArrayList<SbInfoScreenDetailVO>();
|
|
|
+ List<SbInfoScreenDetailVO> repairSbInfoListRed = new ArrayList<SbInfoScreenDetailVO>();
|
|
|
if(CollectionUtil.isNotEmpty(sbInfoList)) {
|
|
|
for (SbInfoScreenDetailVO sbInfo : sbInfoList) {
|
|
|
boolean find = false;
|
|
|
+ RepairApplicationForm findRepair = null;
|
|
|
if(CollectionUtil.isNotEmpty(repairList)) {
|
|
|
for (RepairApplicationForm repair : repairList) {
|
|
|
if (repair.getSbId().equals(sbInfo.getId())) {
|
|
|
find = true;
|
|
|
+ findRepair = repair;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (find) {
|
|
|
- repairSbInfoList.add(sbInfo);
|
|
|
+ if(findRepair.getNeedStop().equals(YesNoEnum.YES.getValue())){
|
|
|
+ repairSbInfoListYellow.add(sbInfo);
|
|
|
+ }else{
|
|
|
+ repairSbInfoListRed.add(sbInfo);
|
|
|
+ }
|
|
|
} else {
|
|
|
if(sbInfo.getLevel() != null && !sbInfo.getLevel().equals(SbInfoLevelEnum.C.getValue())){
|
|
|
normalSbInfoList.add(sbInfo);
|
|
@@ -250,8 +260,11 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
}
|
|
|
}
|
|
|
SbInfoScreenVO vo = new SbInfoScreenVO();
|
|
|
- if(CollectionUtil.isNotEmpty(repairSbInfoList)){
|
|
|
- vo.setRepairSbInfoList(repairSbInfoList);
|
|
|
+ if(CollectionUtil.isNotEmpty(repairSbInfoListYellow)){
|
|
|
+ vo.setRepairSbInfoListYellow(repairSbInfoListYellow);
|
|
|
+ }
|
|
|
+ if(CollectionUtil.isNotEmpty(repairSbInfoListRed)){
|
|
|
+ vo.setRepairSbInfoListRed(repairSbInfoListRed);
|
|
|
}
|
|
|
if(CollectionUtil.isNotEmpty(normalSbInfoList)){
|
|
|
vo.setNormalSbInfoList(normalSbInfoList);
|