Commit f17b175b31cabb7fff65e1cbc6c36b56f0cdd5d1
1 parent
752fd2ee28
Exists in
master
and in
6 other branches
微量元素
Showing 2 changed files with 20 additions and 19 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MicroelementController.java
View file @
f17b175
| ... | ... | @@ -70,15 +70,15 @@ | 
| 70 | 70 | @RequestMapping(value = "/querymicroelementList", method = RequestMethod.GET) | 
| 71 | 71 | public BaseResponse queryAmniocentesisList(HttpServletRequest request, | 
| 72 | 72 | @RequestParam(required = false) String queryNo, | 
| 73 | - @RequestParam(required = false) Integer weekStart, | |
| 74 | - @RequestParam(required = false) Integer weekEnd, | |
| 73 | + @RequestParam(required = false) Integer start, | |
| 74 | + @RequestParam(required = false) Integer end, | |
| 75 | 75 | @RequestParam(required = false) Integer age, | 
| 76 | 76 | @RequestParam(required = false) Integer type, | 
| 77 | 77 | @RequestParam(required = true) Integer page, | 
| 78 | 78 | @RequestParam(required = true) Integer limit, | 
| 79 | 79 | @RequestParam(required = false) String vcCardNo) { | 
| 80 | 80 | |
| 81 | - return microelementFacade.querymicroelementList(queryNo,weekStart,weekEnd,age,vcCardNo,type,page,limit ,getUserId(request)); | |
| 81 | + return microelementFacade.querymicroelementList(queryNo,start,end,age,vcCardNo,type,page,limit ,getUserId(request)); | |
| 82 | 82 | |
| 83 | 83 | } | 
| 84 | 84 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java
View file @
f17b175
| ... | ... | @@ -58,14 +58,14 @@ | 
| 58 | 58 | @Autowired | 
| 59 | 59 | private BabyBookbuildingService babyBookbuildingService; | 
| 60 | 60 | |
| 61 | - public BaseResponse querymicroelementList(String queryNo, Integer weekStart, Integer weekEnd, Integer age, String vcCardNo,Integer type ,Integer page, Integer limit, Integer userId) { | |
| 61 | + public BaseResponse querymicroelementList(String queryNo, Integer start, Integer end, Integer age, String vcCardNo,Integer type ,Integer page, Integer limit, Integer userId) { | |
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | List dataList = new ArrayList(); | 
| 65 | 65 | String hospitalId = autoMatchFacade.getHospitalId(userId); | 
| 66 | 66 | MicroelementQuery query = new MicroelementQuery(); | 
| 67 | 67 | |
| 68 | - //孕前 | |
| 68 | + //孕期 | |
| 69 | 69 | if (type == 0) | 
| 70 | 70 | { | 
| 71 | 71 | PatientsQuery patientsQuery = new PatientsQuery(); | 
| 72 | 72 | |
| ... | ... | @@ -98,17 +98,18 @@ | 
| 98 | 98 | |
| 99 | 99 | if (age != null) | 
| 100 | 100 | { | 
| 101 | - Date start = DateUtil.getBeforeAge(age); | |
| 102 | - Date end = DateUtil.getBeforeAge(age + 1); | |
| 103 | - query.setBirthStart(start); | |
| 104 | - query.setBirthEnd(end); | |
| 101 | + Date start1 = DateUtil.getBeforeAge(age); | |
| 102 | + Date end2 = DateUtil.getBeforeAge(age + 1); | |
| 103 | + query.setBirthStart(start1); | |
| 104 | + query.setBirthEnd(end2); | |
| 105 | 105 | } | 
| 106 | 106 | |
| 107 | - if (weekStart != null && weekEnd != null) { | |
| 108 | - Date start = DateUtil.getWeekStart(weekStart); | |
| 109 | - Date end = DateUtil.getWeekEnd(weekEnd); | |
| 110 | - query.setLastMensesStart(start); | |
| 111 | - query.setLastMensesEnd(end); | |
| 107 | + //孕周 | |
| 108 | + if (start != null && end != null) { | |
| 109 | + Date start1 = DateUtil.getWeekStart(start); | |
| 110 | + Date end2 = DateUtil.getWeekEnd(end); | |
| 111 | + query.setLastMensesStart(start1); | |
| 112 | + query.setLastMensesEnd(end2); | |
| 112 | 113 | } | 
| 113 | 114 | |
| 114 | 115 | |
| 115 | 116 | |
| ... | ... | @@ -166,13 +167,13 @@ | 
| 166 | 167 | query.setType(1); | 
| 167 | 168 | query.setSort(" created "); | 
| 168 | 169 | |
| 169 | - if (weekStart != null && weekEnd != null) | |
| 170 | + if (start != null && end != null) | |
| 170 | 171 | { | 
| 171 | 172 | Date currentDate = new Date(); | 
| 172 | - Date start = DateUtil.addMonth(currentDate, -weekStart); | |
| 173 | - Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -weekEnd - 1), 1); | |
| 174 | - query.setBirthStart(start); | |
| 175 | - query.setBirthEnd(end); | |
| 173 | + Date start1 = DateUtil.addMonth(currentDate, -start); | |
| 174 | + Date end2 = DateUtil.addDay(DateUtil.addMonth(currentDate, -end - 1), 1); | |
| 175 | + query.setBirthStart(start1); | |
| 176 | + query.setBirthEnd(end2); | |
| 176 | 177 | } | 
| 177 | 178 | |
| 178 | 179 | List<MicroelementModel> models = microelementService.queryMicroelementList(query); |