Commit 9872195a19dfffdc1bf46bb3adc43eca910c4de7
1 parent
b4b3835698
Exists in
master
and in
1 other branch
产检医生统计
Showing 7 changed files with 220 additions and 52 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarMotherServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/webapp/WEB-INF/web.xml
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java
View file @
9872195
... | ... | @@ -2,12 +2,8 @@ |
2 | 2 | |
3 | 3 | import java.util.Date; |
4 | 4 | |
5 | -public class BabyPatientExtendEarFollowUp { | |
5 | +public class BabyPatientExtendEarFollowUp extends AbstracUuidEntity{ | |
6 | 6 | /** |
7 | - * 主键 | |
8 | - */ | |
9 | - private String id; | |
10 | - /** | |
11 | 7 | * 儿童档案ID |
12 | 8 | */ |
13 | 9 | private String babyId; |
14 | 10 | |
15 | 11 | |
16 | 12 | |
... | ... | @@ -44,20 +40,20 @@ |
44 | 40 | */ |
45 | 41 | private String followInfo; |
46 | 42 | /** |
47 | - * 助听器(0-左耳,2-右耳,3-全部) | |
43 | + * 助听器(1-左耳,2-右耳,3-全部) | |
48 | 44 | */ |
49 | 45 | private Integer audiphone; |
50 | 46 | /** |
51 | - * 手术(0-左耳,2-右耳,3-全部) | |
47 | + * 手术(1-左耳,2-右耳,3-全部) | |
52 | 48 | */ |
53 | 49 | private Integer operation; |
54 | 50 | /** |
55 | - * 人工耳蜗(0-左耳,2-右耳,3-全部) | |
51 | + * 人工耳蜗(1-左耳,2-右耳,3-全部) | |
56 | 52 | */ |
57 | 53 | private Integer artifiCochlea; |
58 | 54 | |
59 | 55 | /** |
60 | - * 是否选择助听器 | |
56 | + * 是否选择助听器(0-未选择,1-选择) | |
61 | 57 | */ |
62 | 58 | private Integer isAudiphone; |
63 | 59 | /** |
... | ... | @@ -65,7 +61,7 @@ |
65 | 61 | */ |
66 | 62 | private Integer isOperation; |
67 | 63 | /** |
68 | - * 是否选择人工耳蜗(0-左耳,2-右耳,3-全部) | |
64 | + * 是否选择人工耳蜗(0-未选择,1-选择) | |
69 | 65 | */ |
70 | 66 | private Integer isArtifiCochlea; |
71 | 67 | |
... | ... | @@ -90,6 +86,10 @@ |
90 | 86 | */ |
91 | 87 | private String nextTimeStr; |
92 | 88 | /** |
89 | + * 月龄 | |
90 | + */ | |
91 | + private Integer monthAge; | |
92 | + /** | |
93 | 93 | * 是否删除 |
94 | 94 | */ |
95 | 95 | private Integer ifdel; |
... | ... | @@ -194,15 +194,6 @@ |
194 | 194 | this.hospitalStr = hospitalStr; |
195 | 195 | } |
196 | 196 | |
197 | - public String getId() { | |
198 | - return id; | |
199 | - } | |
200 | - | |
201 | - public void setId(String id) { | |
202 | - this.id = id; | |
203 | - | |
204 | - } | |
205 | - | |
206 | 197 | public String getBabyId() { |
207 | 198 | return babyId; |
208 | 199 | } |
... | ... | @@ -218,6 +209,14 @@ |
218 | 209 | public void setFollowTime(Date followTime) { |
219 | 210 | this.followTime = followTime; |
220 | 211 | |
212 | + } | |
213 | + | |
214 | + public Integer getMonthAge() { | |
215 | + return monthAge; | |
216 | + } | |
217 | + | |
218 | + public void setMonthAge(Integer monthAge) { | |
219 | + this.monthAge = monthAge; | |
221 | 220 | } |
222 | 221 | |
223 | 222 | public String getFollowAddr() { |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarMotherServiceImpl.java
View file @
9872195
... | ... | @@ -7,27 +7,46 @@ |
7 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 8 | import org.springframework.stereotype.Service; |
9 | 9 | |
10 | -import java.util.Date; | |
11 | 10 | import java.util.List; |
12 | 11 | |
13 | 12 | @Service |
14 | 13 | public class BabyPatientExtendEarMotherServiceImpl implements BabyPatientExtendEarMotherService { |
15 | 14 | |
16 | -@Autowired | |
17 | -private BabyPatientExtendEarMotherMapper babyPatientExtendEarMotherMapper; | |
15 | + @Autowired | |
16 | + private BabyPatientExtendEarMotherMapper babyPatientExtendEarMotherMapper; | |
18 | 17 | |
19 | -@Override | |
20 | -public void addBabyPatientExtendEarMother(BabyPatientExtendEarMother obj){babyPatientExtendEarMotherMapper.addBabyPatientExtendEarMother(obj);} | |
21 | -@Override | |
22 | -public void updateBabyPatientExtendEarMother(BabyPatientExtendEarMother obj){babyPatientExtendEarMotherMapper.updateBabyPatientExtendEarMother(obj);} | |
23 | -@Override | |
24 | -public void deleteBabyPatientExtendEarMother (String id){babyPatientExtendEarMotherMapper.deleteBabyPatientExtendEarMother(id);} | |
25 | -@Override | |
26 | -public BabyPatientExtendEarMother getBabyPatientExtendEarMother (String id){return babyPatientExtendEarMotherMapper.getBabyPatientExtendEarMother(id);} | |
27 | -@Override | |
28 | -public int queryBabyPatientExtendEarMotherCount (BabyPatientExtendEarMotherQuery query){return babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMotherCount(query);} | |
29 | -@Override | |
30 | -public List<BabyPatientExtendEarMother> queryBabyPatientExtendEarMother (BabyPatientExtendEarMotherQuery query){if (query.getNeed() != null) {query.mysqlBuild(babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMotherCount(query));}return babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMother(query);} | |
18 | + @Override | |
19 | + public void addBabyPatientExtendEarMother(BabyPatientExtendEarMother obj) { | |
20 | + babyPatientExtendEarMotherMapper.addBabyPatientExtendEarMother(obj); | |
21 | + } | |
22 | + | |
23 | + @Override | |
24 | + public void updateBabyPatientExtendEarMother(BabyPatientExtendEarMother obj) { | |
25 | + babyPatientExtendEarMotherMapper.updateBabyPatientExtendEarMother(obj); | |
26 | + } | |
27 | + | |
28 | + @Override | |
29 | + public void deleteBabyPatientExtendEarMother(String id) { | |
30 | + babyPatientExtendEarMotherMapper.deleteBabyPatientExtendEarMother(id); | |
31 | + } | |
32 | + | |
33 | + @Override | |
34 | + public BabyPatientExtendEarMother getBabyPatientExtendEarMother(String id) { | |
35 | + return babyPatientExtendEarMotherMapper.getBabyPatientExtendEarMother(id); | |
36 | + } | |
37 | + | |
38 | + @Override | |
39 | + public int queryBabyPatientExtendEarMotherCount(BabyPatientExtendEarMotherQuery query) { | |
40 | + return babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMotherCount(query); | |
41 | + } | |
42 | + | |
43 | + @Override | |
44 | + public List<BabyPatientExtendEarMother> queryBabyPatientExtendEarMother(BabyPatientExtendEarMotherQuery query) { | |
45 | + if (query.getNeed() != null) { | |
46 | + query.mysqlBuild(babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMotherCount(query)); | |
47 | + } | |
48 | + return babyPatientExtendEarMotherMapper.queryBabyPatientExtendEarMother(query); | |
49 | + } | |
31 | 50 | |
32 | 51 | } |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
9872195
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | <result column="follow_doctor_name" property="followDoctorName" jdbcType="VARCHAR"/> |
23 | 23 | <result column="follow_doctor_id" property="followDoctorId" jdbcType="VARCHAR"/> |
24 | 24 | <result column="next_time" property="nextTime" jdbcType="TIMESTAMP"/> |
25 | + <result column="month_age" property="monthAge" jdbcType="INTEGER"/> | |
25 | 26 | <result column="ifdel" property="ifdel" jdbcType="INTEGER"/> |
26 | 27 | <result column="ifclose" property="ifclose" jdbcType="INTEGER"/> |
27 | 28 | <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/> |
... | ... | @@ -35,7 +36,7 @@ |
35 | 36 | |
36 | 37 | <insert id="addBabyPatientExtendEarFollowUp" |
37 | 38 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUp"> |
38 | - insert into baby_patient_extend_ear_follow_up (id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble) values (#{id},#{babyId},#{followTime},#{followAddr},#{markTime},#{markResult},#{markDetail},#{followInfo},#{audiphone},#{operation},#{artifiCochlea},#{isAudiphone},#{isOperation},#{isArtifiCochlea},#{guideOpinion},#{followDoctorName},#{followDoctorId},#{nextTime},#{ifdel},#{ifclose},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
39 | + insert into baby_patient_extend_ear_follow_up (id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble) values (#{id},#{babyId},#{followTime},#{followAddr},#{markTime},#{markResult},#{markDetail},#{followInfo},#{audiphone},#{operation},#{artifiCochlea},#{isAudiphone},#{isOperation},#{isArtifiCochlea},#{guideOpinion},#{followDoctorName},#{followDoctorId},#{nextTime},#{monthAge},#{ifdel},#{ifclose},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
39 | 40 | </insert> |
40 | 41 | |
41 | 42 | |
... | ... | @@ -94,6 +95,9 @@ |
94 | 95 | <if test="nextTime != null"> |
95 | 96 | next_time = #{nextTime,jdbcType=TIMESTAMP}, |
96 | 97 | </if> |
98 | + <if test="monthAge != null and monthAge>=0"> | |
99 | + month_age = #{monthAge,jdbcType=INTEGER}, | |
100 | + </if> | |
97 | 101 | <if test="ifdel != null and ifdel >= 0"> |
98 | 102 | ifdel = #{ifdel,jdbcType=INTEGER}, |
99 | 103 | </if> |
... | ... | @@ -130,7 +134,7 @@ |
130 | 134 | |
131 | 135 | <select id="getBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
132 | 136 | parameterType="java.lang.String"> |
133 | -select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
137 | +select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
134 | 138 | from baby_patient_extend_ear_follow_up where id = #{id,jdbcType=VARCHAR} |
135 | 139 | </select> |
136 | 140 | |
... | ... | @@ -257,7 +261,7 @@ |
257 | 261 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
258 | 262 | select |
259 | 263 | id,baby_id,max(follow_time) as |
260 | - follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
264 | + follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
261 | 265 | from baby_patient_extend_ear_follow_up |
262 | 266 | <include refid="BabyPatientExtendEarFollowUpCondition"/> |
263 | 267 | GROUP BY baby_id |
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
9872195
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import java.util.ArrayList; |
4 | 4 | import java.util.Date; |
5 | 5 | import java.util.List; |
6 | +import java.util.UUID; | |
6 | 7 | |
7 | 8 | /** |
8 | 9 | * 添加类的一句话简单描述。 |
... | ... | @@ -19,6 +20,17 @@ |
19 | 20 | * @since BME V100R001C40B104 |
20 | 21 | */ |
21 | 22 | public final class StringUtils { |
23 | + /** | |
24 | + * <li>@Description: 生成32位全大写uuid | |
25 | + * <li>@return | |
26 | + * <li>创建人:方承 | |
27 | + * <li>创建时间:2016年1月5日 | |
28 | + * <li>修改人: | |
29 | + * <li>修改时间: | |
30 | + */ | |
31 | + public static String uuid() { | |
32 | + return UUID.randomUUID().toString().replace("-", "").toUpperCase(); | |
33 | + } | |
22 | 34 | |
23 | 35 | public static String dueWeek(int days) { |
24 | 36 | if (days >= 294) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java
View file @
9872195
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | import com.lyms.platform.common.result.BaseObjectResponse; |
13 | 13 | import com.lyms.platform.common.utils.BeanUtils; |
14 | 14 | import com.lyms.platform.common.utils.DateUtil; |
15 | +import com.lyms.platform.common.utils.ExcelUtil; | |
15 | 16 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
16 | 17 | import com.lyms.platform.operate.web.result.AntextDoctorPatient; |
17 | 18 | import com.lyms.platform.operate.web.result.AntextDoctorResult; |
... | ... | @@ -23,6 +24,8 @@ |
23 | 24 | import com.lyms.platform.query.AntExChuQuery; |
24 | 25 | import com.lyms.platform.query.AntExQuery; |
25 | 26 | import com.lyms.platform.query.PatientsQuery; |
27 | +import net.sf.json.JSONArray; | |
28 | +import net.sf.json.JSONObject; | |
26 | 29 | import org.apache.commons.collections.CollectionUtils; |
27 | 30 | import org.apache.commons.collections.map.HashedMap; |
28 | 31 | import org.apache.commons.lang.StringUtils; |
... | ... | @@ -33,6 +36,8 @@ |
33 | 36 | import org.springframework.web.bind.annotation.ResponseBody; |
34 | 37 | |
35 | 38 | import javax.servlet.http.HttpServletRequest; |
39 | +import javax.servlet.http.HttpServletResponse; | |
40 | +import java.io.IOException; | |
36 | 41 | import java.text.DecimalFormat; |
37 | 42 | import java.util.*; |
38 | 43 | |
39 | 44 | |
... | ... | @@ -70,11 +75,87 @@ |
70 | 75 | * @param pageSize 每页显示的数量 |
71 | 76 | * @return |
72 | 77 | */ |
78 | + @RequestMapping(method = RequestMethod.GET, value = "/doctorInfoExt") | |
79 | + @ResponseBody | |
80 | + @TokenRequired | |
81 | + public void doctorInfoExt(Date startDate, Date endDate, Integer childBirth, Integer number, String doctorId, | |
82 | + Integer currentPage, Integer pageSize, HttpServletRequest request, HttpServletResponse response) { | |
83 | + List<AntextDoctorPatient> resultData = (List<AntextDoctorPatient>) doctorInfoData(startDate, endDate, childBirth, number, doctorId, currentPage, pageSize, request, false).getData(); | |
84 | + List<Map<String, Object>> data = new ArrayList<>(); | |
85 | + for (AntextDoctorPatient adp : resultData) { | |
86 | + Map<String, Object> map = new HashMap<>(); | |
87 | + map.put("doctorName", adp.getDoctorName()); | |
88 | + map.put("pName", adp.getpName()); | |
89 | + map.put("cjNum", adp.getCjNum()); | |
90 | + map.put("allCjNum", adp.getAllCjNum()); | |
91 | + List riskLeveList = new ArrayList(); | |
92 | + StringBuffer color = new StringBuffer(); | |
93 | + if (CollectionUtils.isNotEmpty(riskLeveList)) { | |
94 | + JSONArray jsonArray = JSONArray.fromObject(riskLeveList); | |
95 | + for (int i = 0; i < jsonArray.size(); i++) { | |
96 | + JSONObject jsonObject = jsonArray.getJSONObject(i); | |
97 | + String name = jsonObject.getString("name"); | |
98 | + color.append(name + "、"); | |
99 | + } | |
100 | + } | |
101 | + map.put("riskFactors", adp.getRiskFactors()); | |
102 | + map.put("riskLevelId", color.toString()); | |
103 | + map.put("cDueWeek", adp.getcDueWeek()); | |
104 | + map.put("dueFmDate", adp.getDueFmDateStr()); | |
105 | + map.put("checkTimeStr", adp.getCheckTimeStr()); | |
106 | + data.add(map); | |
107 | + } | |
108 | + Map<String, String> columName = new HashMap<>(); | |
109 | + columName.put("doctorName", "最后产检医生"); | |
110 | + columName.put("pName", "患者姓名"); | |
111 | + columName.put("cjNum", "本院产检次数"); | |
112 | + columName.put("allCjNum", "产检总次数"); | |
113 | + columName.put("riskFactors", "高危风险"); | |
114 | + columName.put("riskLevelId", "风险等级颜色"); | |
115 | + columName.put("cDueWeek", "孕周"); | |
116 | + columName.put("dueFmDateStr", "预产期/分娩日期"); | |
117 | + columName.put("checkTimeStr", "最后产检时间"); | |
118 | + try { | |
119 | + ExcelUtil.toExcel(response.getOutputStream(), data, columName); | |
120 | + } catch (IOException e) { | |
121 | + e.printStackTrace(); | |
122 | + } | |
123 | + } | |
124 | + | |
125 | + /** | |
126 | + * 产检医生统计详情 | |
127 | + * | |
128 | + * @param startDate 建档开始时间 | |
129 | + * @param endDate 建档结束时间 | |
130 | + * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部 | |
131 | + * @param number 产检次数 点的是产检人数的话就传1, 2次(含)以上就传2, 5次(含)以上就传5 | |
132 | + * @param doctorId 医生ID | |
133 | + * @param currentPage 当前页 | |
134 | + * @param pageSize 每页显示的数量 | |
135 | + * @return | |
136 | + */ | |
73 | 137 | @RequestMapping(method = RequestMethod.GET, value = "/doctorStatInfo") |
74 | 138 | @ResponseBody |
75 | 139 | @TokenRequired |
76 | 140 | public BaseObjectResponse doctorInfo(Date startDate, Date endDate, Integer childBirth, Integer number, String doctorId, |
77 | 141 | Integer currentPage, Integer pageSize, HttpServletRequest request) { |
142 | + return doctorInfoData(startDate, endDate, childBirth, number, doctorId, currentPage, pageSize, request, true); | |
143 | + } | |
144 | + | |
145 | + /** | |
146 | + * 产检医生统计详情数据 | |
147 | + * | |
148 | + * @param startDate 建档开始时间 | |
149 | + * @param endDate 建档结束时间 | |
150 | + * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部 | |
151 | + * @param number 产检次数 点的是产检人数的话就传1, 2次(含)以上就传2, 5次(含)以上就传5 | |
152 | + * @param doctorId 医生ID | |
153 | + * @param currentPage 当前页 | |
154 | + * @param pageSize 每页显示的数量 | |
155 | + * @return | |
156 | + */ | |
157 | + public BaseObjectResponse doctorInfoData(Date startDate, Date endDate, Integer childBirth, Integer number, String doctorId, | |
158 | + Integer currentPage, Integer pageSize, HttpServletRequest request, boolean isPage) { | |
78 | 159 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
79 | 160 | if (pageSize == null) { |
80 | 161 | pageSize = 20; |
81 | 162 | |
... | ... | @@ -146,12 +227,25 @@ |
146 | 227 | |
147 | 228 | List<AntextDoctorPatient> resultData = new ArrayList<>(); |
148 | 229 | |
149 | - if (CollectionUtils.isNotEmpty(antextDoctorPatients) && antextDoctorPatients.size() > startIndex) { | |
150 | - int size = startIndex + pageSize; | |
151 | - if (antextDoctorPatients.size() < size) { | |
152 | - size = antextDoctorPatients.size(); | |
230 | + if (isPage) {//分页 | |
231 | + if (CollectionUtils.isNotEmpty(antextDoctorPatients) && antextDoctorPatients.size() > startIndex) { | |
232 | + int size = startIndex + pageSize; | |
233 | + if (antextDoctorPatients.size() < size) { | |
234 | + size = antextDoctorPatients.size(); | |
235 | + } | |
236 | + for (int i = startIndex; i < size; i++) { | |
237 | + AntextDoctorPatient doctorPatient = antextDoctorPatients.get(i); | |
238 | + Users users = usersService.getUsers(Integer.parseInt(doctorPatient.getDoctorId())); | |
239 | + if (users != null) { | |
240 | + doctorPatient.setDoctorName(users.getName()); | |
241 | + } else { | |
242 | + doctorPatient.setDoctorName("产检医生"); | |
243 | + } | |
244 | + resultData.add(doctorPatient); | |
245 | + } | |
153 | 246 | } |
154 | - for (int i = startIndex; i < size; i++) { | |
247 | + } else { | |
248 | + for (int i = 0; i < antextDoctorPatients.size(); i++) { | |
155 | 249 | AntextDoctorPatient doctorPatient = antextDoctorPatients.get(i); |
156 | 250 | Users users = usersService.getUsers(Integer.parseInt(doctorPatient.getDoctorId())); |
157 | 251 | if (users != null) { |
... | ... | @@ -171,7 +265,6 @@ |
171 | 265 | //获取患者全部检测数据 |
172 | 266 | public void getAllPatientList(Date startDate, Date endDate, Integer childBirth, List<String> patientId, Map<String, AntextDoctorPatient> resultInfo, Integer userId) { |
173 | 267 | |
174 | - | |
175 | 268 | PatientsQuery patientsQuery = new PatientsQuery(); |
176 | 269 | patientsQuery.setIds(patientId); |
177 | 270 | |
... | ... | @@ -243,7 +336,7 @@ |
243 | 336 | continue; |
244 | 337 | } |
245 | 338 | } |
246 | - }else{ | |
339 | + } else { | |
247 | 340 | doctorPatient = resultInfo.get(ac.getParentId()); |
248 | 341 | } |
249 | 342 | |
250 | 343 | |
... | ... | @@ -412,10 +505,52 @@ |
412 | 505 | * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部 |
413 | 506 | * @return |
414 | 507 | */ |
508 | + @RequestMapping(method = RequestMethod.GET, value = "/getDoctorStaticExt") | |
509 | + @ResponseBody | |
510 | + @TokenRequired | |
511 | + public void getDoctorStaticExt(Date startDate, Date endDate, Integer childBirth, HttpServletRequest request, HttpServletResponse response) { | |
512 | + ReportModel reportModel = (ReportModel) getDoctorStaticData(startDate, endDate, childBirth, request).getData(); | |
513 | + List<Map<String, Object>> data = reportModel.getGrid(); | |
514 | + Map<String, String> columName = new HashMap<>(); | |
515 | + columName.put("doctorName", "产检医生"); | |
516 | + columName.put("inspectTime", "产检人次"); | |
517 | + columName.put("inspectPeople", "产检人数"); | |
518 | + columName.put("twice", "两次"); | |
519 | + columName.put("twiceProportion", ""); | |
520 | + columName.put("fiveTimes", ""); | |
521 | + columName.put("fiveTimeProportion", ""); | |
522 | + | |
523 | + try { | |
524 | + ExcelUtil.toExcel(response.getOutputStream(), data, columName); | |
525 | + } catch (IOException e) { | |
526 | + e.printStackTrace(); | |
527 | + } | |
528 | + } | |
529 | + | |
530 | + /** | |
531 | + * 产检医生统计 | |
532 | + * | |
533 | + * @param startDate 建档开始时间 | |
534 | + * @param endDate 建档结束时间 | |
535 | + * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部 | |
536 | + * @return | |
537 | + */ | |
415 | 538 | @RequestMapping(method = RequestMethod.GET, value = "/getDoctorStatic") |
416 | 539 | @ResponseBody |
417 | 540 | @TokenRequired |
418 | 541 | public BaseObjectResponse getDoctorStatic(Date startDate, Date endDate, Integer childBirth, HttpServletRequest request) { |
542 | + return getDoctorStaticData(startDate, endDate, childBirth, request); | |
543 | + } | |
544 | + | |
545 | + /** | |
546 | + * 产检医生统计 | |
547 | + * | |
548 | + * @param startDate 建档开始时间 | |
549 | + * @param endDate 建档结束时间 | |
550 | + * @param childBirth 统计范围 1=孕妇 3=产妇 不传=全部 | |
551 | + * @return | |
552 | + */ | |
553 | + public BaseObjectResponse getDoctorStaticData(Date startDate, Date endDate, Integer childBirth, HttpServletRequest request){ | |
419 | 554 | BaseObjectResponse rest = new BaseObjectResponse(); |
420 | 555 | |
421 | 556 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
9872195
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | import org.springframework.web.bind.annotation.ResponseBody; |
29 | 29 | |
30 | 30 | import javax.servlet.http.HttpServletRequest; |
31 | +import javax.validation.Valid; | |
31 | 32 | import java.util.*; |
32 | 33 | |
33 | 34 | /** |
... | ... | @@ -325,8 +326,6 @@ |
325 | 326 | res.setFollowTimeStr(DateUtil.getyyyy_MM_dd(fu.getFollowTime())); |
326 | 327 | } |
327 | 328 | |
328 | - | |
329 | - | |
330 | 329 | if(fu.getIfclose()!=null){ |
331 | 330 | res.setIsColse(fu.getIfclose() == 1 ? "结案" : "未结案"); |
332 | 331 | } |
... | ... | @@ -360,7 +359,7 @@ |
360 | 359 | * @param request |
361 | 360 | * @return |
362 | 361 | */ |
363 | - @RequestMapping(method = RequestMethod.POST, value = "/delBabyPatientExtendEarFollowUp") | |
362 | + @RequestMapping(method = RequestMethod.DELETE, value = "/delBabyPatientExtendEarFollowUp") | |
364 | 363 | @ResponseBody |
365 | 364 | @TokenRequired |
366 | 365 | public BaseResponse delBabyPatientExtendEarFollowUp(BabyPatientExtendEarFollowUp obj, HttpServletRequest request) { |
... | ... | @@ -433,7 +432,7 @@ |
433 | 432 | @RequestMapping(method = RequestMethod.POST, value = "/saveBabyPatientExtendEarFollowUp") |
434 | 433 | @ResponseBody |
435 | 434 | @TokenRequired |
436 | - public BaseResponse addBabyPatientExtendEarFollowUp(BabyPatientExtendEarFollowUp obj, | |
435 | + public BaseResponse addBabyPatientExtendEarFollowUp(@Valid BabyPatientExtendEarFollowUp obj, | |
437 | 436 | HttpServletRequest request) { |
438 | 437 | // BaseResponse basResp = validata(obj); |
439 | 438 | // if (basResp.getErrorcode() != 0) return basResp; |
... | ... | @@ -444,7 +443,7 @@ |
444 | 443 | } |
445 | 444 | |
446 | 445 | String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); |
447 | - | |
446 | + obj.setId(UUID.randomUUID().toString().replace("-", "")); | |
448 | 447 | obj.setIfdel(0); |
449 | 448 | obj.setIfclose(0);//是否结案 |
450 | 449 | obj.setCreateTime(new Date()); |
platform-operate-api/src/main/webapp/WEB-INF/web.xml
View file @
9872195
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | version="2.5" |
14 | 14 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> |
15 | 15 | <!--start跨域开始--> |
16 | - <!-- | |
16 | + | |
17 | 17 | <filter> |
18 | 18 | <filter-name>CorsFilter</filter-name> |
19 | 19 | <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> |
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | <filter-name>CorsFilter</filter-name> |
47 | 47 | <url-pattern>/*</url-pattern> |
48 | 48 | </filter-mapping> |
49 | ---> | |
49 | + | |
50 | 50 | <!--end跨域结束--> |
51 | 51 | |
52 | 52 | <servlet-mapping> |