Commit 9ff472c3cd8b9f6d52d3afbf53f481768ab999d8
1 parent
629e31ae42
Exists in
master
and in
6 other branches
诸城初诊,复诊接口
Showing 3 changed files with 68 additions and 16 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java
View file @
9ff472c
| ... | ... | @@ -43,6 +43,23 @@ |
| 43 | 43 | private boolean isOpinion; |
| 44 | 44 | |
| 45 | 45 | private Date createdTimeStart; |
| 46 | + | |
| 47 | + public Date getCreatedTimeStart() { | |
| 48 | + return createdTimeStart; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void setCreatedTimeStart(Date createdTimeStart) { | |
| 52 | + this.createdTimeStart = createdTimeStart; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public Date getCreatedTimeEnd() { | |
| 56 | + return createdTimeEnd; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setCreatedTimeEnd(Date createdTimeEnd) { | |
| 60 | + this.createdTimeEnd = createdTimeEnd; | |
| 61 | + } | |
| 62 | + | |
| 46 | 63 | private Date createdTimeEnd; |
| 47 | 64 | |
| 48 | 65 | public boolean isOpinion() { |
| ... | ... | @@ -204,6 +221,7 @@ |
| 204 | 221 | } else { |
| 205 | 222 | c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
| 206 | 223 | } |
| 224 | + isAddStart = Boolean.TRUE; | |
| 207 | 225 | } |
| 208 | 226 | |
| 209 | 227 | if (null != end) { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/zcfy/ZcPrenatalService.java
View file @
9ff472c
| 1 | 1 | package com.lyms.hospitalapi.zcfy; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.biz.dal.IAntExChuDao; | |
| 4 | +import com.lyms.platform.biz.dal.impl.AntExChuDaoImpl; | |
| 5 | +import com.lyms.platform.biz.service.AntenatalExaminationService; | |
| 3 | 6 | import com.lyms.platform.biz.service.PatientsService; |
| 4 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | 8 | import com.lyms.platform.common.dao.BaseMongoDAO; |
| 9 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 6 | 10 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 11 | +import com.lyms.platform.common.utils.DateUtil; | |
| 7 | 12 | import com.lyms.platform.operate.web.facade.ViewFacade; |
| 8 | 13 | import com.lyms.platform.pojo.AntExChuModel; |
| 9 | 14 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 10 | 15 | import com.lyms.platform.pojo.Patients; |
| 16 | +import com.lyms.platform.query.AntExChuQuery; | |
| 17 | +import com.lyms.platform.query.AntExQuery; | |
| 11 | 18 | import org.apache.commons.lang.StringUtils; |
| 19 | +import org.springframework.data.domain.Sort; | |
| 12 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 21 | import org.springframework.data.mongodb.core.query.Query; |
| 14 | 22 | import org.springframework.data.mongodb.core.query.Criteria; |
| ... | ... | @@ -31,8 +39,8 @@ |
| 31 | 39 | private PatientsService patientsService; |
| 32 | 40 | @Autowired |
| 33 | 41 | private ViewFacade viewFacade; |
| 34 | -// @Autowired | |
| 35 | -// private BaseMongoDAO baseMongoDAO; | |
| 42 | + @Autowired | |
| 43 | + private AntenatalExaminationService antExService; | |
| 36 | 44 | |
| 37 | 45 | //初诊 |
| 38 | 46 | public BaseObjectResponse saveAntexChu(AntExChuModel antExChuModel) { |
| 39 | 47 | |
| ... | ... | @@ -146,10 +154,10 @@ |
| 146 | 154 | "yghxkt,xqjq,xnsd,hivkt,ydfmw,ydqjd,\n" + |
| 147 | 155 | "bChao,heartRate,fetalPosition,fetalPresentation,join1,checkDate,\n" + |
| 148 | 156 | "cDueWeek,checkDoctor,hospital,dirOpinion,infectDiseases,screenResult,highRisk,highriskDesc," + |
| 149 | - "nextCheckTime,yinchan,gongwaiyun,syjg,diagnosis,diagnosisOther) " + | |
| 157 | + "sieveStatus,nextCheckTime,yinchan,gongwaiyun,syjg,diagnosis,diagnosisOther) " + | |
| 150 | 158 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
| 151 | 159 | "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
| 152 | - "?,?,?,?,?,?)"; | |
| 160 | + "?,?,?,?,?,?,?)"; | |
| 153 | 161 | |
| 154 | 162 | |
| 155 | 163 | |
| ... | ... | @@ -951,18 +959,37 @@ |
| 951 | 959 | * @param endDate |
| 952 | 960 | * @return |
| 953 | 961 | */ |
| 954 | -// public BaseObjectResponse saveChuZhen(String startDate,String endDate){ | |
| 955 | -// Criteria criteria = Criteria.where("created").gte(startDate).lte(endDate); | |
| 956 | -// Query query = new Query(criteria); | |
| 957 | -// List<AntExChuModel> list = baseMongoDAO.find(query); | |
| 958 | -// if(list != null && list.size()>0){ | |
| 959 | -// for(AntExChuModel antExChuModel : list){ | |
| 960 | -// System.out.print(antExChuModel.getId()); | |
| 961 | -// } | |
| 962 | -// } | |
| 963 | -// | |
| 964 | -// return null; | |
| 965 | -// } | |
| 962 | + public BaseObjectResponse saveChuZhen(String startDate,String endDate){ | |
| 963 | + BaseObjectResponse br = null; | |
| 964 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 965 | + antExChuQuery.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); | |
| 966 | + antExChuQuery.setCreatedTimeEnd(DateUtil.parseYMDHMS(endDate)); | |
| 967 | + List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery); | |
| 968 | + if(list != null && list.size()>0){ | |
| 969 | + for(AntExChuModel antExChuModel : list){ | |
| 970 | + br = saveAntexChu(antExChuModel); | |
| 971 | + } | |
| 972 | + } | |
| 973 | + return br; | |
| 974 | + } | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + public BaseObjectResponse saveFuZhen(String startDate,String endDate){ | |
| 979 | + BaseObjectResponse br = null; | |
| 980 | + AntExQuery antExQuery = new AntExQuery(); | |
| 981 | + antExQuery.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); | |
| 982 | + antExQuery.setCreatedTimeEnd(DateUtil.parseYMDHMS(endDate)); | |
| 983 | + //antExQuery.setId("5b2b4a760cf24b66d2c0af28"); | |
| 984 | + List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); | |
| 985 | + if(list != null && list.size()>0){ | |
| 986 | + for(AntenatalExaminationModel antenatalExaminationModel : list){ | |
| 987 | + br = saveAntexFu(antenatalExaminationModel); | |
| 988 | + } | |
| 989 | + } | |
| 990 | + | |
| 991 | + return br; | |
| 992 | + } | |
| 966 | 993 | |
| 967 | 994 | |
| 968 | 995 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
9ff472c
| ... | ... | @@ -1968,6 +1968,13 @@ |
| 1968 | 1968 | return br; |
| 1969 | 1969 | } |
| 1970 | 1970 | |
| 1971 | + @RequestMapping(value="/zc/cs") | |
| 1972 | + @ResponseBody | |
| 1973 | + public BaseObjectResponse getCs(@RequestParam("startDate")String startDate,@RequestParam("endDate")String endDate){ | |
| 1974 | + BaseObjectResponse br = zcPrenatalService.saveFuZhen(startDate,endDate); | |
| 1975 | + return br; | |
| 1976 | + } | |
| 1977 | + | |
| 1971 | 1978 | |
| 1972 | 1979 | |
| 1973 | 1980 | } |