|
@@ -160,12 +160,7 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
|
|
|
.map(deptVitals -> deptVitals.getVitalId())
|
|
|
.collect(Collectors.toList());
|
|
|
List<QuestionInfo> vitalList = Lists.newArrayList(questionFacade.listByIds(vitalIds));
|
|
|
- List<QuestionShortDTO> vitals = Lists.newArrayList();
|
|
|
- for (QuestionInfo questionInfo : vitalList) {
|
|
|
- QuestionShortDTO questionShortDTO = new QuestionShortDTO();
|
|
|
- BeanUtil.copyProperties(questionInfo, questionShortDTO);
|
|
|
- vitals.add(questionShortDTO);
|
|
|
- }
|
|
|
+ List<QuestionShortDTO> vitals = BeanUtil.listCopyTo(vitalList, QuestionShortDTO.class);
|
|
|
deptVitalDTO.setVitals(vitals);
|
|
|
|
|
|
//未关联查体
|
|
@@ -213,16 +208,11 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<DeptShortDTO> getDeptShortList(List<Long> deptIds) {
|
|
|
- List<DeptShortDTO> deptShortDTOList = Lists.newLinkedList();
|
|
|
QueryWrapper<DeptInfo> deptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
deptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
notIn("id", deptIds);
|
|
|
List<DeptInfo> deptInfoList = deptInfoFacade.list(deptInfoQueryWrapper);
|
|
|
- for (DeptInfo deptInfo : deptInfoList) {
|
|
|
- DeptShortDTO deptShortDTO = new DeptShortDTO();
|
|
|
- BeanUtil.copyProperties(deptInfo, deptShortDTO);
|
|
|
- deptShortDTOList.add(deptShortDTO);
|
|
|
- }
|
|
|
+ List<DeptShortDTO> deptShortDTOList = BeanUtil.listCopyTo(deptInfoList, DeptShortDTO.class);
|
|
|
return deptShortDTOList;
|
|
|
}
|
|
|
|