Commit ecf6f224d674bad58569e1ee09e640d0999d4db9
1 parent
85dcc5864f
Exists in
master
and in
8 other branches
孕妇分娩后 变成产妇
Showing 14 changed files with 86 additions and 87 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderInResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveResult.java
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
ecf6f22
| ... | ... | @@ -6,33 +6,45 @@ |
| 6 | 6 | * 详细描述 |
| 7 | 7 | * <p> |
| 8 | 8 | * 示例代码 |
| 9 | - * | |
| 9 | + * <p> | |
| 10 | 10 | * <pre> |
| 11 | 11 | * </pre> |
| 12 | - * | |
| 12 | + * | |
| 13 | 13 | * @author In_Home |
| 14 | 14 | * @version BME V100R001 2016-3-21 |
| 15 | 15 | * @since BME V100R001C40B104 |
| 16 | 16 | */ |
| 17 | 17 | public final class StringUtils { |
| 18 | 18 | |
| 19 | + public static String dueWeek(int days) { | |
| 20 | + if (days >= 294) { | |
| 21 | + return "已分娩"; | |
| 22 | + } | |
| 23 | + int week = (days / 7); | |
| 24 | + String str = ""; | |
| 25 | +// if (week > 0) { | |
| 26 | + str = week + "周+"; | |
| 27 | +// } | |
| 28 | + int day = (days % 7); | |
| 29 | + return "孕" + str + (day > 0 ? "" + day + "天" : ""); | |
| 30 | + } | |
| 19 | 31 | |
| 20 | - | |
| 21 | 32 | //体重克算成千克 |
| 22 | - public static String cutBabyWeight(String babyWeight){ | |
| 23 | - if(StringUtils.isEmpty(babyWeight)){ | |
| 33 | + public static String cutBabyWeight(String babyWeight) { | |
| 34 | + if (StringUtils.isEmpty(babyWeight)) { | |
| 24 | 35 | return babyWeight; |
| 25 | 36 | } |
| 26 | - if(babyWeight.length()<=3){ | |
| 27 | - babyWeight = org.apache.commons.lang.StringUtils.leftPad(babyWeight, 4,"0"); | |
| 37 | + if (babyWeight.length() <= 3) { | |
| 38 | + babyWeight = org.apache.commons.lang.StringUtils.leftPad(babyWeight, 4, "0"); | |
| 28 | 39 | } |
| 29 | - StringBuilder stringBuilder=new StringBuilder(babyWeight); | |
| 30 | - if(babyWeight.length()>2){ | |
| 31 | - stringBuilder.setLength(babyWeight.length()-1); | |
| 40 | + StringBuilder stringBuilder = new StringBuilder(babyWeight); | |
| 41 | + if (babyWeight.length() > 2) { | |
| 42 | + stringBuilder.setLength(babyWeight.length() - 1); | |
| 32 | 43 | } |
| 33 | - stringBuilder.insert(stringBuilder.length() - 2,"."); | |
| 34 | - return stringBuilder.toString(); | |
| 44 | + stringBuilder.insert(stringBuilder.length() - 2, "."); | |
| 45 | + return stringBuilder.toString(); | |
| 35 | 46 | } |
| 47 | + | |
| 36 | 48 | public static Object isEmpty(Object obj, Object defaultVal) { |
| 37 | 49 | if (null == obj) { |
| 38 | 50 | return defaultVal; |
| 39 | 51 | |
| ... | ... | @@ -40,19 +52,15 @@ |
| 40 | 52 | return obj; |
| 41 | 53 | } |
| 42 | 54 | |
| 43 | - public static boolean isEmpty(String str) | |
| 44 | - { | |
| 45 | - if (str == null || "".equals(str)) | |
| 46 | - { | |
| 55 | + public static boolean isEmpty(String str) { | |
| 56 | + if (str == null || "".equals(str)) { | |
| 47 | 57 | return true; |
| 48 | 58 | } |
| 49 | 59 | return false; |
| 50 | 60 | } |
| 51 | 61 | |
| 52 | - public static boolean isNotEmpty(String str) | |
| 53 | - { | |
| 54 | - if (str != null && !"".equals(str)) | |
| 55 | - { | |
| 62 | + public static boolean isNotEmpty(String str) { | |
| 63 | + if (str != null && !"".equals(str)) { | |
| 56 | 64 | return true; |
| 57 | 65 | } |
| 58 | 66 | return false; |
| 59 | 67 | |
| 60 | 68 | |
| 61 | 69 | |
| 62 | 70 | |
| ... | ... | @@ -60,33 +68,27 @@ |
| 60 | 68 | |
| 61 | 69 | /** |
| 62 | 70 | * //+表示1个或多个(如"3"或"225"),*表示0个或多个([0-9]*)(如""或"1"或"22"), |
| 63 | - * ?表示0个或1个([0-9]?)(如""或"7") | |
| 71 | + * ?表示0个或1个([0-9]?)(如""或"7") | |
| 72 | + * | |
| 64 | 73 | * @param str |
| 65 | 74 | * @return |
| 66 | 75 | */ |
| 67 | - public static boolean isNum(String str){ | |
| 68 | - if(!isEmpty(str)){ | |
| 76 | + public static boolean isNum(String str) { | |
| 77 | + if (!isEmpty(str)) { | |
| 69 | 78 | return str.matches("[0-9]+"); |
| 70 | 79 | } |
| 71 | 80 | return false; |
| 72 | 81 | } |
| 73 | 82 | |
| 74 | - public static String encryPhone(String phone) | |
| 75 | - { | |
| 76 | - if (isNotEmpty(phone)) | |
| 77 | - { | |
| 83 | + public static String encryPhone(String phone) { | |
| 84 | + if (isNotEmpty(phone)) { | |
| 78 | 85 | char[] res = new char[11]; |
| 79 | - char[] chars =phone.toCharArray(); | |
| 80 | - if (chars != null && chars.length == 11) | |
| 81 | - { | |
| 82 | - for(int i = 0 ; i <chars.length ;i++ ) | |
| 83 | - { | |
| 84 | - if (2 < i && i < 7) | |
| 85 | - { | |
| 86 | + char[] chars = phone.toCharArray(); | |
| 87 | + if (chars != null && chars.length == 11) { | |
| 88 | + for (int i = 0; i < chars.length; i++) { | |
| 89 | + if (2 < i && i < 7) { | |
| 86 | 90 | res[i] = '*'; |
| 87 | - } | |
| 88 | - else | |
| 89 | - { | |
| 91 | + } else { | |
| 90 | 92 | res[i] = chars[i]; |
| 91 | 93 | } |
| 92 | 94 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java
View file @
ecf6f22
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | private String mname; |
| 22 | 22 | //患者年龄 |
| 23 | 23 | private Integer age; |
| 24 | + private Integer sex; | |
| 24 | 25 | //联系方式 |
| 25 | 26 | private String phone; |
| 26 | 27 | //生日 |
| ... | ... | @@ -63,6 +64,14 @@ |
| 63 | 64 | private Integer status; |
| 64 | 65 | //转诊类型 1 儿童 2 孕妇 |
| 65 | 66 | private Integer type; |
| 67 | + | |
| 68 | + public Integer getSex() { | |
| 69 | + return sex; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setSex(Integer sex) { | |
| 73 | + this.sex = sex; | |
| 74 | + } | |
| 66 | 75 | |
| 67 | 76 | public String getMname() { |
| 68 | 77 | return mname; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
ecf6f22
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | import com.lyms.platform.biz.service.PatientsService; |
| 6 | 6 | import com.lyms.platform.biz.service.SieveService; |
| 7 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 8 | +import com.lyms.platform.common.enums.SexEnum; | |
| 8 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| 9 | 10 | import com.lyms.platform.common.result.BaseListResponse; |
| 10 | 11 | import com.lyms.platform.common.result.BaseObjectResponse; |
| ... | ... | @@ -87,6 +88,7 @@ |
| 87 | 88 | referralApplyOrderModel.setDueDate(patients.getDueDate()); |
| 88 | 89 | referralApplyOrderModel.setName(patients.getUsername()); |
| 89 | 90 | referralApplyOrderModel.setPhone(patients.getPhone()); |
| 91 | + referralApplyOrderModel.setSex(SexEnum.WOMAN.getId()); | |
| 90 | 92 | } |
| 91 | 93 | }else{ |
| 92 | 94 | BabyModel babyModel= babyService.getOneBabyById(referralApplyOrderModel.getParentId()); |
| ... | ... | @@ -102,6 +104,7 @@ |
| 102 | 104 | referralApplyOrderModel.setDueDate(babyModel.getDueDate()); |
| 103 | 105 | referralApplyOrderModel.setName(babyModel.getName()); |
| 104 | 106 | referralApplyOrderModel.setPhone(patients.getPhone()); |
| 107 | + referralApplyOrderModel.setSex(babyModel.getSex()); | |
| 105 | 108 | } |
| 106 | 109 | } |
| 107 | 110 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
View file @
ecf6f22
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.common.base.IBasicResultConvert; | |
| 4 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 5 | 5 | import com.lyms.platform.pojo.AntExChuModel; |
| 6 | 6 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 7 | 7 | import com.lyms.platform.pojo.Patients; |
| 8 | -import org.apache.commons.collections.CollectionUtils; | |
| 9 | 8 | |
| 10 | 9 | import java.util.ArrayList; |
| 11 | 10 | import java.util.Date; |
| 12 | 11 | import java.util.List; |
| 13 | 12 | |
| 14 | 13 | /** |
| 15 | - * | |
| 16 | 14 | * 产前筛查列表返回对象 |
| 17 | - * | |
| 15 | + * <p> | |
| 18 | 16 | * Created by Administrator on 2016/6/16 0016. |
| 19 | 17 | */ |
| 20 | -public class AntexListResult { | |
| 18 | +public class AntexListResult { | |
| 21 | 19 | |
| 22 | 20 | private String id; |
| 23 | 21 | //名字 |
| ... | ... | @@ -147,7 +145,6 @@ |
| 147 | 145 | } |
| 148 | 146 | |
| 149 | 147 | |
| 150 | - | |
| 151 | 148 | public String getRiskScore() { |
| 152 | 149 | return riskScore; |
| 153 | 150 | } |
| 154 | 151 | |
| 155 | 152 | |
| 156 | 153 | |
| ... | ... | @@ -164,17 +161,17 @@ |
| 164 | 161 | this.yChanQi = yChanQi; |
| 165 | 162 | } |
| 166 | 163 | |
| 167 | - public AntexListResult convertToResult(List<AntenatalExaminationModel> destModel,Patients patients,List<AntExChuModel> antExChuModel) { | |
| 164 | + public AntexListResult convertToResult(List<AntenatalExaminationModel> destModel, Patients patients, List<AntExChuModel> antExChuModel) { | |
| 168 | 165 | setId(patients.getId()); |
| 169 | 166 | try { |
| 170 | - if(null!=patients.getBirth()){ | |
| 167 | + if (null != patients.getBirth()) { | |
| 171 | 168 | setAge(DateUtil.getAge(patients.getBirth())); |
| 172 | 169 | setBirth(DateUtil.getyyyy_MM_dd(patients.getBirth())); |
| 173 | 170 | } |
| 174 | 171 | |
| 175 | - }catch (Exception e){ | |
| 172 | + } catch (Exception e) { | |
| 176 | 173 | } |
| 177 | - if(null!=patients.getDueDate()){ | |
| 174 | + if (null != patients.getDueDate()) { | |
| 178 | 175 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 179 | 176 | } |
| 180 | 177 | setBuildTime(DateUtil.getyyyy_MM_dd(patients.getCreated())); |
| 181 | 178 | |
| ... | ... | @@ -184,14 +181,18 @@ |
| 184 | 181 | setCardNo(patients.getCardNo()); |
| 185 | 182 | |
| 186 | 183 | setVcCardNo(patients.getVcCardNo()); |
| 187 | - int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
| 188 | - String week= (days/7)+""; | |
| 189 | - int day = (days%7); | |
| 190 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 191 | - if(null!=patients.getLastMenses()){ | |
| 192 | - setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
| 184 | + if (3 == patients.getType()) { | |
| 185 | + this.dueWeek = "已分娩"; | |
| 186 | + } else { | |
| 187 | + if (null != patients.getLastMenses()) { | |
| 188 | + int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
| 189 | + this.dueWeek= StringUtils.dueWeek(days); | |
| 190 | + } | |
| 193 | 191 | } |
| 194 | 192 | |
| 193 | + if (null != patients.getLastMenses()) { | |
| 194 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
| 195 | + } | |
| 195 | 196 | return this; |
| 196 | 197 | } |
| 197 | 198 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderInResult.java
View file @
ecf6f22
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.platform.common.base.IBasicResultConvert; |
| 4 | 4 | import com.lyms.platform.common.enums.ApplyOrderStatusEnums; |
| 5 | 5 | import com.lyms.platform.common.utils.DateUtil; |
| 6 | +import com.lyms.platform.common.utils.StringUtils; | |
| 6 | 7 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| 7 | 8 | |
| 8 | 9 | import java.util.Date; |
| ... | ... | @@ -178,9 +179,7 @@ |
| 178 | 179 | setrLevel(destModel.getrLevel()); |
| 179 | 180 | if(null!=destModel.getDueDate()){ |
| 180 | 181 | int days= DateUtil.daysBetween(new Date(),destModel.getDueDate()); |
| 181 | - String week= (days/7)+""; | |
| 182 | - int day = (days%7); | |
| 183 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 182 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 184 | 183 | } |
| 185 | 184 | setrRisk(destModel.getrRisk()); |
| 186 | 185 | setDueDate(DateUtil.getYmd(destModel.getDueDate())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
View file @
ecf6f22
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.platform.common.base.IBasicResultConvert; |
| 4 | 4 | import com.lyms.platform.common.enums.ApplyOrderStatusEnums; |
| 5 | 5 | import com.lyms.platform.common.utils.DateUtil; |
| 6 | +import com.lyms.platform.common.utils.StringUtils; | |
| 6 | 7 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| 7 | 8 | |
| 8 | 9 | import java.util.Date; |
| ... | ... | @@ -229,9 +230,7 @@ |
| 229 | 230 | setrLevel(destModel.getrLevel()); |
| 230 | 231 | if(null!=destModel.getDueDate()){ |
| 231 | 232 | int days= DateUtil.daysBetween(new Date(),destModel.getDueDate()); |
| 232 | - String week= (days/7)+""; | |
| 233 | - int day = (days%7); | |
| 234 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 233 | + this.dueWeek= StringUtils.dueWeek(days); | |
| 235 | 234 | } |
| 236 | 235 | setrRisk(destModel.getrRisk()); |
| 237 | 236 | setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
View file @
ecf6f22
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.enums.SexEnum; | |
| 3 | 4 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | 5 | import com.lyms.platform.common.utils.StringUtils; |
| 5 | 6 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| ... | ... | @@ -76,7 +77,7 @@ |
| 76 | 77 | setName(referralApplyOrderModel.getName()); |
| 77 | 78 | setBabyId(referralApplyOrderModel.getParentId()); |
| 78 | 79 | setmName(referralApplyOrderModel.getMname()); |
| 79 | - setSex("女"); | |
| 80 | + setSex(SexEnum.getTextById(referralApplyOrderModel.getSex())); | |
| 80 | 81 | setPhone(StringUtils.encryPhone(referralApplyOrderModel.getPhone())); |
| 81 | 82 | setApplyDoctor(referralApplyOrderModel.getApplyDoctor()); |
| 82 | 83 | if (null != referralApplyOrderModel.getReceived()) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
View file @
ecf6f22
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | 5 | import com.lyms.platform.pojo.AntExChuModel; |
| 5 | 6 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 6 | 7 | import com.lyms.platform.pojo.Patients; |
| ... | ... | @@ -164,9 +165,7 @@ |
| 164 | 165 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 165 | 166 | } |
| 166 | 167 | int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); |
| 167 | - String week= (days/7)+""; | |
| 168 | - int day = (days%7); | |
| 169 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 168 | + this.dueWeek= StringUtils.dueWeek(days); | |
| 170 | 169 | if(null!=patients.getLastMenses()){ |
| 171 | 170 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 172 | 171 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
View file @
ecf6f22
| ... | ... | @@ -153,9 +153,7 @@ |
| 153 | 153 | setAge(destModel.getAge()); |
| 154 | 154 | if(null!=destModel.getLastMenses()){ |
| 155 | 155 | int days= DateUtil.daysBetween(destModel.getLastMenses(),new Date()); |
| 156 | - String week= (days/7)+""; | |
| 157 | - int day = (days%7); | |
| 158 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 156 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 159 | 157 | } |
| 160 | 158 | |
| 161 | 159 | setrLevel(destModel.getRiskLevelId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java
View file @
ecf6f22
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | 5 | import com.lyms.platform.pojo.Patients; |
| 5 | 6 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| 6 | 7 | |
| ... | ... | @@ -232,9 +233,7 @@ |
| 232 | 233 | setAge(destModel.getAge()); |
| 233 | 234 | if(null!=destModel.getDueDate()){ |
| 234 | 235 | int days= DateUtil.daysBetween(new Date(),destModel.getDueDate()); |
| 235 | - String week= (days/7)+""; | |
| 236 | - int day = (days%7); | |
| 237 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 236 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 238 | 237 | } |
| 239 | 238 | |
| 240 | 239 | setCardNo(destModel.getCardNo()); |
| ... | ... | @@ -258,9 +257,7 @@ |
| 258 | 257 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 259 | 258 | } |
| 260 | 259 | int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); |
| 261 | - String week= (days/7)+""; | |
| 262 | - int day = (days%7); | |
| 263 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 260 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 264 | 261 | if(null!=patients.getLastMenses()){ |
| 265 | 262 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 266 | 263 | } |
| ... | ... | @@ -271,7 +268,6 @@ |
| 271 | 268 | }catch (Exception e){ |
| 272 | 269 | } |
| 273 | 270 | } |
| 274 | - | |
| 275 | 271 | return this; |
| 276 | 272 | } |
| 277 | 273 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java
View file @
ecf6f22
| ... | ... | @@ -175,9 +175,7 @@ |
| 175 | 175 | setCheckDoctor(destModel.getLastReportDoctorName()); |
| 176 | 176 | if(null!=destModel.getLastMenses()){ |
| 177 | 177 | int days= DateUtil.daysBetween(destModel.getLastMenses(),new Date()); |
| 178 | - String week= (days/7)+""; | |
| 179 | - int day = (days%7); | |
| 180 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 178 | + this.dueWeek=StringUtils.dueWeek(days); | |
| 181 | 179 | } |
| 182 | 180 | setlName(destModel.getPublishName()); |
| 183 | 181 | setPid(destModel.getPid()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveApplyOrderResult.java
View file @
ecf6f22
| ... | ... | @@ -120,9 +120,7 @@ |
| 120 | 120 | setRiskScore("60"); |
| 121 | 121 | |
| 122 | 122 | int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); |
| 123 | - String week= (days/7)+""; | |
| 124 | - int day = (days%7); | |
| 125 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 123 | + this.dueWeek= com.lyms.platform.common.utils.StringUtils.dueWeek(days); | |
| 126 | 124 | if(null!=patients.getLastMenses()){ |
| 127 | 125 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 128 | 126 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
View file @
ecf6f22
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | import com.lyms.platform.common.enums.SieveEnums; |
| 7 | 7 | import com.lyms.platform.common.enums.TaiShuEnums; |
| 8 | 8 | import com.lyms.platform.common.utils.DateUtil; |
| 9 | +import com.lyms.platform.common.utils.StringUtils; | |
| 9 | 10 | import com.lyms.platform.pojo.SieveModel; |
| 10 | 11 | |
| 11 | 12 | import java.util.Date; |
| ... | ... | @@ -154,9 +155,7 @@ |
| 154 | 155 | setName(destModel.getName()); |
| 155 | 156 | if(null!=destModel.getLastMenses()){ |
| 156 | 157 | int days= DateUtil.daysBetween(destModel.getLastMenses(), new Date()); |
| 157 | - String week= (days/7)+""; | |
| 158 | - int day = (days%7); | |
| 159 | - this.cDueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 158 | + this.cDueWeek= StringUtils.dueWeek(days); | |
| 160 | 159 | } |
| 161 | 160 | if(null!=destModel.getTireNumber()){ |
| 162 | 161 | setTireNumber(TaiShuEnums.getTitle(destModel.getTireNumber() + "")); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveResult.java
View file @
ecf6f22
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | 5 | import com.lyms.platform.pojo.Patients; |
| 5 | 6 | import com.lyms.platform.pojo.SieveResultModel; |
| 6 | 7 | |
| 7 | 8 | |
| ... | ... | @@ -198,14 +199,10 @@ |
| 198 | 199 | setRiskScore("60"); |
| 199 | 200 | |
| 200 | 201 | int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); |
| 201 | - String week= (days/7)+""; | |
| 202 | - int day = (days%7); | |
| 203 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 202 | + this.dueWeek= StringUtils.dueWeek(days); | |
| 204 | 203 | if(null!=patients.getLastMenses()){ |
| 205 | 204 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 206 | 205 | } |
| 207 | - | |
| 208 | - | |
| 209 | 206 | setParentId(sieveResultModel.getParentId()); |
| 210 | 207 | setId(sieveResultModel.getId()); |
| 211 | 208 | setCspj(sieveResultModel.getCspj()); |