|
@@ -285,14 +285,16 @@ public class StudentManageController extends BaseController {
|
|
|
}
|
|
|
|
|
|
List<Integer> instrumentIdsBySubjectId = instrumentService.getInstrumentIdsBySubjectId(StringUtils.join(integers,","));
|
|
|
- Map<Integer, InstrumentWrapper.Instrument> mapByIds = instrumentService.getMapByIds(instrumentIdsBySubjectId);
|
|
|
- Map<Integer,String> extInstrumentNamesMap = new HashMap<Integer, String>();
|
|
|
- mapByIds.forEach((k,v)->{
|
|
|
- if (v !=null) {
|
|
|
- extInstrumentNamesMap.put(k, v.getName());
|
|
|
- }
|
|
|
- });
|
|
|
- student.setExtInstrumentNamesMap(extInstrumentNamesMap);
|
|
|
+ if (CollectionUtils.isNotEmpty(instrumentIdsBySubjectId)) {
|
|
|
+ Map<Integer, InstrumentWrapper.Instrument> mapByIds = instrumentService.getMapByIds(instrumentIdsBySubjectId);
|
|
|
+ Map<Integer, String> extInstrumentNamesMap = new HashMap<Integer, String>();
|
|
|
+ mapByIds.forEach((k, v) -> {
|
|
|
+ if (v != null) {
|
|
|
+ extInstrumentNamesMap.put(k, v.getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ student.setExtInstrumentNamesMap(extInstrumentNamesMap);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|