Commit 6735a3a3da423576406730fd4f4948c5973106e2

Authored by mengfanqiang
1 parent 1017f8f072
Exists in fengning2023-06-06

add 新增周数据接口

Showing 1 changed file with 24 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 6735a3a
... ... @@ -28,6 +28,7 @@
28 28 import com.lyms.platform.pojo.RareBloodGroupModel;
29 29 import org.apache.commons.collections.CollectionUtils;
30 30 import org.apache.commons.lang.StringUtils;
  31 +import org.joda.time.DateTime;
31 32 import org.springframework.beans.factory.annotation.Autowired;
32 33 import org.springframework.stereotype.Controller;
33 34 import org.springframework.web.bind.annotation.*;
34 35  
... ... @@ -958,6 +959,29 @@
958 959 return patientFacade.queryHighRisk(patientsQueryRequest, null, 1, userId, "true", Boolean.FALSE);
959 960 }
960 961  
  962 + /**
  963 + * 全部孕妇管理
  964 + *
  965 + * @param patientsQueryRequest 全部孕妇管理查询 (因为请求参数一样同用一个对象)
  966 + * @return 返回结果
  967 + */
  968 + @RequestMapping(value = "/wxaPuerWeek", method = RequestMethod.GET)
  969 + @ResponseBody
  970 + public BaseResponse wxaPuerWeek(RiskPatientsQueryRequest patientsQueryRequest,String doctorId) {
  971 + Date now = new Date();
  972 + List result = new ArrayList();
  973 + for (int i=0;i<7;i++){
  974 + Map<String,Object> map = new HashMap<String,Object>();
  975 + String ctime = DateUtil.getYyyyMmDd(DateUtil.addDay(now,-i));
  976 + patientsQueryRequest.setLastCTime(ctime);
  977 + int userId = Integer.parseInt(doctorId);
  978 + BaseListResponse br = (BaseListResponse)patientFacade.queryHighRisk(patientsQueryRequest, null, 1, userId, "true", Boolean.FALSE);
  979 + map.put("count",br.getPageInfo().getCount());
  980 + map.put("date",ctime);
  981 + result.add(map);
  982 + }
961 983  
  984 + return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(result);
  985 + }
962 986 }