Commit 3501b172e3c243d8f13d332b097e7e09bb50fee4

Authored by litao@lymsh.com
1 parent e8e13135e7

体重管理相关代码

Showing 1 changed file with 2 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 3501b17
... ... @@ -15,6 +15,7 @@
15 15 import com.lyms.platform.pojo.Patients;
16 16 import org.apache.commons.collections.MapUtils;
17 17 import org.apache.commons.lang.StringUtils;
  18 +import org.apache.tools.ant.taskdefs.Java;
18 19 import org.springframework.beans.factory.annotation.Autowired;
19 20 import org.springframework.data.domain.Sort;
20 21 import org.springframework.data.mongodb.core.MongoTemplate;
... ... @@ -238,6 +239,7 @@
238 239 map.put("pregnancy", DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));
239 240 Integer week = DateUtil.getWeek(patients.getLastMenses(), new Date());
240 241 if(week != null) {
  242 + week = week - 1; //他们写的计算周的方法有问题 会多一周
241 243 setInfo(week, map); // 设置孕期相关营养信息
242 244 setRecipe(week, map); // 设置食谱
243 245 setGuide(week, map); // 设置指南