【指示灯信息】查询列表问题修复

Signed-off-by: weizhihong <weizhihong@joylink.club>
This commit is contained in:
weizhihong 2022-04-20 11:10:13 +08:00
parent 923db614cd
commit 81c9ceb2aa
2 changed files with 12 additions and 0 deletions

View File

@ -4,8 +4,11 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -58,4 +61,12 @@ public class IndicatorSection {
* 进路Code
*/
private String routeCode;
public void generateSectionList() {
if (StringUtils.isEmpty(sectionsCode)) {
sectionList = new ArrayList<>(0);
} else {
sectionList = Arrays.asList(sectionsCode.split(","));
}
}
}

View File

@ -44,6 +44,7 @@ public class AssistButtonIndicatorService implements IAssistButtonIndicatorServi
criteria.andRouteCodeEqualTo(routeCode);
}
Page<IndicatorSection> page = (Page<IndicatorSection>) assistIndicatorDAO.selectByExample(indicatorSectionExample);
page.getResult().forEach(IndicatorSection::generateSectionList);
return PageVO.convert(page, page.getResult());
}