Commit 30a1c418c5d60d4ce751176b81e133cd3892a9c9
1 parent
d2c7da3b0c
Exists in
master
and in
6 other branches
全部孕妇管理增加按照排序
Showing 2 changed files with 191 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/TempAddRequest.java
View file @
30a1c41
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IBasicRequestConvert; | |
4 | +import com.lyms.platform.common.core.annotation.form.Form; | |
5 | +import com.lyms.platform.common.core.annotation.form.FormParam; | |
6 | +import com.lyms.platform.common.enums.YnEnums; | |
7 | +import com.lyms.platform.common.utils.DateUtil; | |
8 | +import com.lyms.platform.pojo.TempModel; | |
9 | +import org.hibernate.validator.constraints.NotBlank; | |
10 | +import org.hibernate.validator.constraints.NotEmpty; | |
11 | +import org.slf4j.Logger; | |
12 | +import org.slf4j.LoggerFactory; | |
13 | + | |
14 | +import javax.validation.constraints.Digits; | |
15 | +import java.util.Date; | |
16 | + | |
17 | + | |
18 | +/** | |
19 | + * 体温增加请求类 | |
20 | + * <p/> | |
21 | + * 详细描述 | |
22 | + * <p/> | |
23 | + * 示例代码 | |
24 | + * <pre> | |
25 | + * </pre/> | |
26 | + * | |
27 | + * @author JIAZHI.JIANG | |
28 | + * @version BME V100R001 2017-11-28 17:00 | |
29 | + * @since BME V100R001C40B104 | |
30 | + */ | |
31 | +@Form | |
32 | +public class TempAddRequest implements IBasicRequestConvert<TempModel> { | |
33 | + @FormParam | |
34 | + private String id; | |
35 | + | |
36 | + @FormParam | |
37 | + @Digits(integer= 2 ,fraction= 20) | |
38 | + private String temp; | |
39 | + @FormParam | |
40 | + @NotBlank(message = "孕妇id不能为空") | |
41 | + private String parentId; | |
42 | + @FormParam | |
43 | + @NotBlank(message = "孕妇pid不能为空") | |
44 | + private String pid; | |
45 | + @Override | |
46 | + public TempModel convertToDataModel() { | |
47 | + TempModel tmp =new TempModel(); | |
48 | + tmp.setId(id); | |
49 | + tmp.setParentId(parentId); | |
50 | + tmp.setPid(pid); | |
51 | + tmp.setCreatedTime(DateUtil.getYyyyMmDd(new Date())); | |
52 | + tmp.setYn(YnEnums.YES.getId()); | |
53 | + return tmp; | |
54 | + } | |
55 | + | |
56 | + public String getId() { | |
57 | + return id; | |
58 | + } | |
59 | + | |
60 | + public void setId(String id) { | |
61 | + this.id = id; | |
62 | + } | |
63 | + | |
64 | + public String getTemp() { | |
65 | + return temp; | |
66 | + } | |
67 | + | |
68 | + public void setTemp(String temp) { | |
69 | + this.temp = temp; | |
70 | + } | |
71 | + | |
72 | + public String getParentId() { | |
73 | + return parentId; | |
74 | + } | |
75 | + | |
76 | + public void setParentId(String parentId) { | |
77 | + this.parentId = parentId; | |
78 | + } | |
79 | + | |
80 | + public String getPid() { | |
81 | + return pid; | |
82 | + } | |
83 | + | |
84 | + public void setPid(String pid) { | |
85 | + this.pid = pid; | |
86 | + } | |
87 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/TempQueryRequest.java
View file @
30a1c41
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.common.core.annotation.form.Form; | |
4 | +import com.lyms.platform.common.core.annotation.form.FormParam; | |
5 | +import com.lyms.platform.common.utils.DateUtil; | |
6 | +import com.lyms.platform.common.utils.StringUtils; | |
7 | +import org.apache.commons.lang.math.NumberUtils; | |
8 | + | |
9 | +import java.util.Date; | |
10 | + | |
11 | +/** | |
12 | + * 体温查询对象 | |
13 | + * <p/> | |
14 | + * 详细描述 | |
15 | + * <p/> | |
16 | + * 示例代码 | |
17 | + * <pre> | |
18 | + * </pre/> | |
19 | + * | |
20 | + * @author JIAZHI.JIANG | |
21 | + * @version BME V100R001 2017-11-28 23:18 | |
22 | + * @since BME V100R001C40B104 | |
23 | + */ | |
24 | +@Form | |
25 | +public class TempQueryRequest extends BasePageQueryRequest{ | |
26 | + @FormParam | |
27 | + private String vcCardNo; | |
28 | + @FormParam | |
29 | + private String cardNo; | |
30 | + @FormParam | |
31 | + private Integer startAge; | |
32 | + private Integer endAge; | |
33 | + //孕周 | |
34 | + @FormParam | |
35 | + private String startDueWeek; | |
36 | + @FormParam | |
37 | + private String endDueWeek; | |
38 | + | |
39 | + public Date capStart() { | |
40 | + if (StringUtils.isNotEmpty(startDueWeek)) { | |
41 | + int start = NumberUtils.toInt(startDueWeek, 0); | |
42 | + Date endDate = DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(start * 7)); | |
43 | + return endDate; | |
44 | + } | |
45 | + return null; | |
46 | + } | |
47 | + | |
48 | + public Date capEnd() { | |
49 | + if (StringUtils.isNotEmpty(endDueWeek)) { | |
50 | + int end = NumberUtils.toInt(endDueWeek, 0); | |
51 | + Date endDate = DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(end * 7) - 6); | |
52 | + return endDate; | |
53 | + } | |
54 | + return null; | |
55 | + } | |
56 | + | |
57 | + public String getVcCardNo() { | |
58 | + return vcCardNo; | |
59 | + } | |
60 | + | |
61 | + public void setVcCardNo(String vcCardNo) { | |
62 | + this.vcCardNo = vcCardNo; | |
63 | + } | |
64 | + | |
65 | + public String getCardNo() { | |
66 | + return cardNo; | |
67 | + } | |
68 | + | |
69 | + public void setCardNo(String cardNo) { | |
70 | + this.cardNo = cardNo; | |
71 | + } | |
72 | + | |
73 | + public Integer getStartAge() { | |
74 | + return startAge; | |
75 | + } | |
76 | + | |
77 | + public void setStartAge(Integer startAge) { | |
78 | + this.startAge = startAge; | |
79 | + } | |
80 | + | |
81 | + public Integer getEndAge() { | |
82 | + return endAge; | |
83 | + } | |
84 | + | |
85 | + public void setEndAge(Integer endAge) { | |
86 | + this.endAge = endAge; | |
87 | + } | |
88 | + | |
89 | + public String getStartDueWeek() { | |
90 | + return startDueWeek; | |
91 | + } | |
92 | + | |
93 | + public void setStartDueWeek(String startDueWeek) { | |
94 | + this.startDueWeek = startDueWeek; | |
95 | + } | |
96 | + | |
97 | + public String getEndDueWeek() { | |
98 | + return endDueWeek; | |
99 | + } | |
100 | + | |
101 | + public void setEndDueWeek(String endDueWeek) { | |
102 | + this.endDueWeek = endDueWeek; | |
103 | + } | |
104 | +} |