Commit ee02b739d25b25af7915de07cf7ab790a2595221

Authored by jiangjiazhi
1 parent 52ea683b37

分娩作废产检劵

Showing 4 changed files with 20 additions and 42 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java View file @ ee02b73
... ... @@ -45,7 +45,7 @@
45 45 private IAntExRecordMDao iAntExRecordMDao;
46 46  
47 47 public List aggregateOne(AntExRecordQuery antExRecordQuery) {
48   - return iAntExRecordMDao.aggregateOne(antExRecordQuery.convertToQuery());
  48 + return antExRecordDao.aggregateOne(antExRecordQuery.convertToQuery());
49 49 }
50 50  
51 51 public Integer countM(AntExRecordQuery antExRecordQuery){
... ... @@ -78,7 +78,7 @@
78 78 if (null == count || 0 == count) {
79 79 antExRecordDao.addOneRecord(record);
80 80 }
81   - antExRecordQuery.setfId(null);
  81 + /*antExRecordQuery.setfId(null);
82 82 count = iAntExRecordMDao.count(antExRecordQuery.convertToQuery());
83 83 if (null == count || 0 == count) {
84 84 AntExPRecordModel pRecordModel=new AntExPRecordModel();
... ... @@ -92,7 +92,7 @@
92 92 }catch (Exception e){
93 93 }
94 94 iAntExRecordMDao.addOneRecord(pRecordModel);
95   - }
  95 + }*/
96 96 }
97 97  
98 98 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ ee02b73
... ... @@ -8,9 +8,13 @@
8 8 import com.lyms.platform.pojo.Patients;
9 9 import com.lyms.platform.query.AntExChuQuery;
10 10 import com.lyms.platform.query.BabyCheckModelQuery;
  11 +import com.lyms.platform.query.PatientCheckTicketQuery;
11 12 import com.lyms.platform.query.PatientsQuery;
  13 +import org.apache.commons.lang.math.*;
12 14 import org.springframework.context.ApplicationContext;
13 15 import org.springframework.context.support.ClassPathXmlApplicationContext;
  16 +import org.springframework.data.mongodb.core.aggregation.Aggregation;
  17 +import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
14 18 import org.springframework.data.mongodb.core.query.Update;
15 19  
16 20 import java.util.ArrayList;
... ... @@ -24,7 +28,7 @@
24 28 public class Test {
25 29  
26 30 public static void main(String[] args) {
27   -// PatientsQuery patientsQuery1 = new PatientsQuery();
  31 + PatientsQuery patientsQuery1 = new PatientsQuery();
28 32 // patientsQuery1.setHospitalId("221");
29 33 // patientsQuery1.setYn(YnEnums.YES.getId());
30 34 // patientsQuery1.setType(1);
31 35  
... ... @@ -211,40 +215,14 @@
211 215 }
212 216  
213 217 */
  218 + PatientCheckTicketQuery patientCheckTicketQuery=new PatientCheckTicketQuery();
  219 + patientCheckTicketQuery.setStatus(1);
  220 + patientCheckTicketQuery.setCreatedStart(DateUtil.parseYMD("2016-05-10"));
  221 + patientCheckTicketQuery.setCreatedEnd(DateUtil.parseYMD("2017-01-10"));
  222 + patientCheckTicketQuery.setPid("58747fd60cf297bacef6db8f");
  223 + String s ="1.0";
214 224  
215   -
216   - BabyCheckModelQuery babyQuery = new BabyCheckModelQuery();
217   - babyQuery.setHospitalId("216");
218   -
219   - babyQuery.setYn(YnEnums.YES.getId());
220   - Date currentDate = DateUtil.formatDate(new Date());
221   -
222   -// String birth="2016-02-01 - 2016-05-01";
223   - Integer monthAgeStart = 1;
224   - Integer monthAgeEnd = 1;
225   -
226   -// if (StringUtils.isNotEmpty(birth))
227   -// {
228   -// String birthStr = birth;
229   -// String[] dates = birthStr.split(" - ");
230   -// babyQuery.setBirthStart(DateUtil.parseYMD(dates[0]));
231   -// babyQuery.setBirthEnd(DateUtil.parseYMD(dates[1]));
232   -// }
233   - if (monthAgeStart != null)
234   - {
235   - Date start = DateUtil.addMonth(currentDate, -monthAgeStart);
236   - babyQuery.setCheckDateEnd(start);
237   - }
238   - if (monthAgeEnd != null)
239   - {
240   - Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -monthAgeEnd - 1), 1);
241   - babyQuery.setCheckDateStart(end);
242   - }
243   -
244   -
245   - System.out.println(babyQuery.convertToQuery().convertToMongoQuery());
246   -
247   -
  225 + System.out.print((int)Double.parseDouble(s));
248 226 }
249 227 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ ee02b73
... ... @@ -331,9 +331,9 @@
331 331 }
332 332  
333 333 if (statisticsQueryRequest.getType() == 1) {
334   - List<AntExPRecordModel> list2 = recordService.queryAntExRecords1(antExRecordQuery);
  334 + List<AntExRecordModel> list2 = recordService.queryAntExRecords(antExRecordQuery);
335 335 if (CollectionUtils.isNotEmpty(list2)) {
336   - for (AntExPRecordModel record : list2) {
  336 + for (AntExRecordModel record : list2) {
337 337 CjStatisticsListResult cjStatisticsListResult = new CjStatisticsListResult();
338 338 cjStatisticsListResult.convertToResult(record);
339 339 Patients patients = patientsService.findOnePatientById(record.getParentId());
... ... @@ -406,7 +406,7 @@
406 406 for (HashMap map : list) {
407 407 CjStatisticsResult cjStatisticsResult = new CjStatisticsResult();
408 408 String dId = null;
409   - Object id = map.get("_id");
  409 + Object id = map.get("checkDoctor");
410 410 if (null != id) {
411 411 dId = id.toString();
412 412 } else {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/CjStatisticsListResult.java View file @ ee02b73
... ... @@ -49,7 +49,7 @@
49 49 setType(record.getType());
50 50 return this;
51 51 }
52   - public CjStatisticsListResult convertToResult(AntExPRecordModel record) {
  52 + public CjStatisticsListResult convertToResult(AntExRecordModel record) {
53 53 setDueDate(DateUtil.getyyyy_MM_dd(record.getDueDate()));
54 54 if(null!=record.getLastMenses()){
55 55 int days= DateUtil.daysBetween(record.getLastMenses(),new Date());