Commit a53e2d4a35275c54689da18956ee2e08af0189f6
1 parent
a557057e5f
Exists in
dev
#fix:优化孕期字典列表查询
Showing 1 changed file with 16 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PregnancyReportMattersServiceFacade.java
View file @
a53e2d4
| ... | ... | @@ -6,10 +6,14 @@ |
| 6 | 6 | import com.lyms.platform.common.result.BaseResponse; |
| 7 | 7 | import com.lyms.platform.pojo.PregnancyReportMatters; |
| 8 | 8 | import com.lyms.platform.query.PregnancyReportMattersQuery; |
| 9 | +import org.apache.velocity.util.ArrayListWrapper; | |
| 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 11 | import org.springframework.stereotype.Component; |
| 11 | 12 | |
| 13 | +import java.util.ArrayList; | |
| 14 | +import java.util.HashMap; | |
| 12 | 15 | import java.util.List; |
| 16 | +import java.util.Map; | |
| 13 | 17 | |
| 14 | 18 | @Component |
| 15 | 19 | public class PregnancyReportMattersServiceFacade { |
| 16 | 20 | |
| ... | ... | @@ -29,8 +33,19 @@ |
| 29 | 33 | postpartumReportQuery.setYn(1); |
| 30 | 34 | postpartumReportQuery.setNeed("true"); |
| 31 | 35 | List<PregnancyReportMatters> list= pregnancyReportMattersService.queryPregnancyReport(postpartumReportQuery); |
| 36 | + List<Map<String,Object>> mapList=new ArrayList<>(); | |
| 37 | + for (PregnancyReportMatters pregnancyReportMatters:list){ | |
| 38 | + Map<String,Object> params=new HashMap<>(); | |
| 39 | + params.put("id",pregnancyReportMatters.getId()); | |
| 40 | + params.put("name",pregnancyReportMatters.getName()); | |
| 41 | + params.put("week",pregnancyReportMatters.getWeek()); | |
| 42 | + params.put("type",pregnancyReportMatters.getType()); | |
| 43 | + params.put("riskType",pregnancyReportMatters.getRiskType()); | |
| 44 | + params.put("created",pregnancyReportMatters.getCreated()); | |
| 45 | + mapList.add(params); | |
| 46 | + } | |
| 32 | 47 | BaseListResponse objectResponse = new BaseListResponse(); |
| 33 | - objectResponse.setData(list); | |
| 48 | + objectResponse.setData(mapList); | |
| 34 | 49 | objectResponse.setPageInfo(postpartumReportQuery.getPageInfo()); |
| 35 | 50 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 36 | 51 | objectResponse.setErrormsg("成功"); |