Commit 120f0827b8d8df7caf2e5c4f6a0532476e0e1d9e
1 parent
a47fb8b9f2
Exists in
master
and in
6 other branches
分娩修改
Showing 1 changed file with 14 additions and 4 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
120f082
... | ... | @@ -137,12 +137,22 @@ |
137 | 137 | |
138 | 138 | @Override |
139 | 139 | public int queryWeekPointCount(int startWeek, int endWeek, String hospitalId, Date startTime, Date endTime,Integer pointType) { |
140 | - String map = "function(){ " + | |
140 | +// String map = "function(){ " + | |
141 | +// " if (this.hospitalId == '"+hospitalId+"' && this.checkTime != null && this.lastMenses != null) { " + | |
142 | +// " var start = this.lastMenses; " + | |
143 | +// " var end = this.checkTime; " + | |
144 | +// " var iDays = parseInt(Math.abs(end - start ) / 86400000); " + | |
145 | +// " var week = parseInt(iDays/7)+1; " + | |
146 | +// " if (week >= "+startWeek+" && week <= "+endWeek+")" + | |
147 | +// " { " + | |
148 | +// " emit(this._id,{checkTime:end,parentId:this.parentId}); " + | |
149 | +// " } " + | |
150 | +// " } " + | |
151 | +// "}"; | |
152 | + String map = "function(){ " + | |
141 | 153 | " if (this.hospitalId == '"+hospitalId+"' && this.checkTime != null && this.lastMenses != null) { " + |
142 | - " var start = this.lastMenses; " + | |
143 | 154 | " var end = this.checkTime; " + |
144 | - " var iDays = parseInt(Math.abs(end - start ) / 86400000); " + | |
145 | - " var week = parseInt(iDays/7)+1; " + | |
155 | + " var week = parseInt(this.cDay/7)" + | |
146 | 156 | " if (week >= "+startWeek+" && week <= "+endWeek+")" + |
147 | 157 | " { " + |
148 | 158 | " emit(this._id,{checkTime:end,parentId:this.parentId}); " + |