Commit c7bd641e0287f8c0e1ab77295a07bb44ec1ab36b
1 parent
ba0c87b643
Exists in
master
and in
6 other branches
处方统计
Showing 10 changed files with 264 additions and 120 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterCheckItemMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/CheckItem.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/CheckItemService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CheckItemServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/MasterCheckItem.xml
- platform-dal/src/main/java/com/lyms/platform/pojo/CheckItemConfig.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CheckItemController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterCheckItemMapper.java
View file @
c7bd641
... | ... | @@ -3,13 +3,19 @@ |
3 | 3 | import com.lyms.platform.permission.model.CheckItem; |
4 | 4 | |
5 | 5 | import java.util.List; |
6 | +import java.util.Map; | |
6 | 7 | |
7 | 8 | public interface MasterCheckItemMapper { |
8 | 9 | |
9 | - public List<CheckItem> getCheckItemList(); | |
10 | + public List<CheckItem> getCheckItemList(Map param); | |
11 | + public void addCheckItem(CheckItem checkItem); | |
10 | 12 | |
11 | 13 | public String getOne(Integer id); |
12 | 14 | |
13 | 15 | public List<CheckItem> xcxGetCheckItemList(Integer id); |
16 | + | |
17 | + void updateCheckItem(CheckItem checkItem); | |
18 | + | |
19 | + void deleteCheckItem(Integer id); | |
14 | 20 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/CheckItem.java
View file @
c7bd641
... | ... | @@ -5,6 +5,24 @@ |
5 | 5 | private String project; |
6 | 6 | private String projectInfo; |
7 | 7 | private String checkAttention; |
8 | + private String hospitalId; | |
9 | + private Integer type;//类型 1孕妇 2 儿童 | |
10 | + | |
11 | + public Integer getType() { | |
12 | + return type; | |
13 | + } | |
14 | + | |
15 | + public void setType(Integer type) { | |
16 | + this.type = type; | |
17 | + } | |
18 | + | |
19 | + public String getHospitalId() { | |
20 | + return hospitalId; | |
21 | + } | |
22 | + | |
23 | + public void setHospitalId(String hospitalId) { | |
24 | + this.hospitalId = hospitalId; | |
25 | + } | |
8 | 26 | |
9 | 27 | public String getCheckAttention() { |
10 | 28 | return checkAttention; |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/CheckItemService.java
View file @
c7bd641
... | ... | @@ -4,15 +4,21 @@ |
4 | 4 | import com.lyms.platform.permission.model.CheckItem; |
5 | 5 | |
6 | 6 | import java.util.List; |
7 | +import java.util.Map; | |
7 | 8 | |
8 | 9 | public interface CheckItemService { |
9 | 10 | |
10 | - public List<CheckItem> getCheckItemList(); | |
11 | + public List<CheckItem> getCheckItemList( Map param); | |
11 | 12 | |
12 | 13 | public String getOne(Integer id); |
13 | 14 | |
14 | 15 | public List<CheckItem> xcxGetCheckItemList(Integer id); |
15 | 16 | |
17 | + public void addCheckItem(CheckItem checkItem); | |
16 | 18 | |
19 | + | |
20 | + void updateCheckItem(CheckItem checkItem); | |
21 | + | |
22 | + void deleteCheckItem(Integer id); | |
17 | 23 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CheckItemServiceImpl.java
View file @
c7bd641
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import org.springframework.stereotype.Service; |
9 | 9 | |
10 | 10 | import java.util.List; |
11 | +import java.util.Map; | |
11 | 12 | |
12 | 13 | @Service |
13 | 14 | public class CheckItemServiceImpl implements CheckItemService { |
... | ... | @@ -16,8 +17,24 @@ |
16 | 17 | private MasterCheckItemMapper checkItemMapper; |
17 | 18 | |
18 | 19 | @Override |
19 | - public List<CheckItem> getCheckItemList() { | |
20 | - return checkItemMapper.getCheckItemList(); | |
20 | + public List<CheckItem> getCheckItemList(Map param) { | |
21 | + return checkItemMapper.getCheckItemList(param); | |
22 | + } | |
23 | + | |
24 | + | |
25 | + @Override | |
26 | + public void addCheckItem(CheckItem checkItem) { | |
27 | + checkItemMapper.addCheckItem(checkItem); | |
28 | + } | |
29 | + | |
30 | + @Override | |
31 | + public void updateCheckItem(CheckItem checkItem) { | |
32 | + checkItemMapper.updateCheckItem(checkItem); | |
33 | + } | |
34 | + | |
35 | + @Override | |
36 | + public void deleteCheckItem(Integer id) { | |
37 | + checkItemMapper.deleteCheckItem(id); | |
21 | 38 | } |
22 | 39 | |
23 | 40 | @Override |
platform-biz-service/src/main/resources/mainOrm/master/MasterCheckItem.xml
View file @
c7bd641
... | ... | @@ -7,18 +7,58 @@ |
7 | 7 | <result column="project" property="project" jdbcType="VARCHAR"/> |
8 | 8 | <result column="project_info" property="projectInfo" jdbcType="VARCHAR"/> |
9 | 9 | <result column="check_attention" property="checkAttention" jdbcType="VARCHAR"/> |
10 | + <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/> | |
11 | + <result column="type" property="type" jdbcType="INTEGER"/> | |
10 | 12 | </resultMap> |
11 | - <select id="getCheckItemList" resultMap="CheckItemMap"> | |
12 | - SELECT id,project FROM lyms_week_project | |
13 | + <select id="getCheckItemList" resultMap="CheckItemMap" parameterType="java.util.Map"> | |
14 | + SELECT id,project,type,project_info,check_attention,hospital_id FROM lyms_week_project | |
15 | + where 1=1 | |
16 | + <if test="type != null and type >= 0"> | |
17 | + and type = #{type,jdbcType=INTEGER} | |
18 | + </if> | |
19 | + <if test="hospitalId != null and hospitalId != ''"> | |
20 | + and hospital_id = #{hospitalId,jdbcType=VARCHAR} | |
21 | + </if> | |
13 | 22 | </select> |
14 | 23 | |
24 | + <select id="addCheckItem" parameterType="com.lyms.platform.permission.model.CheckItem"> | |
25 | + INSERT INTO lyms_week_project(project,project_info,check_attention,hospital_id,type) | |
26 | + VALUES (#{project},#{projectInfo},#{checkAttention},#{hospitalId},#{type}) | |
27 | + </select> | |
28 | + | |
15 | 29 | <select id="getOne" resultType="java.lang.String" parameterType="java.lang.Integer"> |
16 | 30 | SELECT project FROM lyms_week_project WHERE id=#{id,jdbcType=INTEGER} |
17 | 31 | </select> |
18 | 32 | |
19 | 33 | <select id="xcxGetCheckItemList" resultMap="CheckItemMap" parameterType="java.lang.Integer"> |
20 | - SELECT id,project,project_info,check_attention FROM lyms_week_project WHERE id=#{id,jdbcType=INTEGER} | |
34 | + SELECT id,project,project_info,check_attention,hospital_id FROM lyms_week_project WHERE id=#{id,jdbcType=INTEGER} | |
21 | 35 | </select> |
36 | + | |
37 | + <update id="updateCheckItem" parameterType="com.lyms.platform.permission.model.CheckItem" > | |
38 | + update lyms_week_project | |
39 | + <set> | |
40 | + <if test="project != null and project != ''"> | |
41 | + project = #{project,jdbcType=VARCHAR}, | |
42 | + </if> | |
43 | + <if test="projectInfo != null and projectInfo != ''"> | |
44 | + project_info = #{projectInfo,jdbcType=VARCHAR}, | |
45 | + </if> | |
46 | + <if test="checkAttention != null and checkAttention != ''"> | |
47 | + check_attention = #{checkAttention,jdbcType=VARCHAR}, | |
48 | + </if> | |
49 | + <if test="hospitalId != null and hospitalId != ''"> | |
50 | + hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
51 | + </if> | |
52 | + <if test="type != null and type >= 0"> | |
53 | + type = #{type,jdbcType=INTEGER}, | |
54 | + </if> | |
55 | + </set> | |
56 | + where id = #{id,jdbcType=VARCHAR} | |
57 | + </update> | |
58 | + | |
59 | + <delete id="deleteCheckItem" parameterType="java.lang.Integer"> | |
60 | + delete from lyms_week_project where id = #{id,jdbcType=INTEGER} | |
61 | + </delete> | |
22 | 62 | |
23 | 63 | </mapper> |
platform-dal/src/main/java/com/lyms/platform/pojo/CheckItemConfig.java
View file @
c7bd641
... | ... | @@ -18,12 +18,31 @@ |
18 | 18 | private String id; |
19 | 19 | private String hospitalId; |
20 | 20 | private String name; |
21 | - private Integer startWeek; | |
22 | - private Integer endWeek; | |
23 | 21 | private Integer enable; |
22 | + //编码 | |
23 | + private String code; | |
24 | + | |
25 | + //1 孕妇 2 儿童 | |
26 | + private Integer type; | |
24 | 27 | private Date created; |
25 | 28 | private Date modified; |
26 | 29 | |
30 | + public String getCode() { | |
31 | + return code; | |
32 | + } | |
33 | + | |
34 | + public void setCode(String code) { | |
35 | + this.code = code; | |
36 | + } | |
37 | + | |
38 | + public Integer getType() { | |
39 | + return type; | |
40 | + } | |
41 | + | |
42 | + public void setType(Integer type) { | |
43 | + this.type = type; | |
44 | + } | |
45 | + | |
27 | 46 | public String getId() { |
28 | 47 | return id; |
29 | 48 | } |
... | ... | @@ -48,21 +67,6 @@ |
48 | 67 | this.name = name; |
49 | 68 | } |
50 | 69 | |
51 | - public Integer getStartWeek() { | |
52 | - return startWeek; | |
53 | - } | |
54 | - | |
55 | - public void setStartWeek(Integer startWeek) { | |
56 | - this.startWeek = startWeek; | |
57 | - } | |
58 | - | |
59 | - public Integer getEndWeek() { | |
60 | - return endWeek; | |
61 | - } | |
62 | - | |
63 | - public void setEndWeek(Integer endWeek) { | |
64 | - this.endWeek = endWeek; | |
65 | - } | |
66 | 70 | |
67 | 71 | public Integer getEnable() { |
68 | 72 | return enable; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
View file @
c7bd641
... | ... | @@ -201,8 +201,8 @@ |
201 | 201 | @RequestMapping(method = RequestMethod.GET, value = "/queryCheckItemConfig/{hospitalId}") |
202 | 202 | @ResponseBody |
203 | 203 | @TokenRequired |
204 | - public BaseResponse queryCheckItemConfig(@PathVariable String hospitalId, HttpServletRequest request) { | |
205 | - return basicConfigFacade.queryCheckItemConfig(hospitalId); | |
204 | + public BaseResponse queryCheckItemConfig(@PathVariable String hospitalId,@RequestParam(required = false) Integer type, HttpServletRequest request) { | |
205 | + return basicConfigFacade.queryCheckItemConfig(hospitalId,type); | |
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CheckItemController.java
View file @
c7bd641
1 | 1 | package com.lyms.platform.operate.web.controller; |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.base.BaseController; |
4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
5 | +import com.lyms.platform.common.result.BaseResponse; | |
4 | 6 | import com.lyms.platform.operate.web.result.FrontEndResult; |
5 | 7 | import com.lyms.platform.permission.model.CheckItem; |
6 | 8 | import com.lyms.platform.permission.service.CheckItemService; |
7 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 10 | import org.springframework.stereotype.Controller; |
9 | -import org.springframework.web.bind.annotation.RequestMapping; | |
10 | -import org.springframework.web.bind.annotation.RequestMethod; | |
11 | -import org.springframework.web.bind.annotation.ResponseBody; | |
11 | +import org.springframework.web.bind.annotation.*; | |
12 | 12 | |
13 | +import java.util.HashMap; | |
13 | 14 | import java.util.List; |
15 | +import java.util.Map; | |
14 | 16 | |
15 | 17 | |
16 | 18 | /** |
17 | 19 | |
... | ... | @@ -25,9 +27,54 @@ |
25 | 27 | |
26 | 28 | @RequestMapping(value = "/getCheckItemList", method = RequestMethod.GET) |
27 | 29 | @ResponseBody |
28 | - public FrontEndResult getCheckItemList() { | |
29 | - List<CheckItem> checkItem = checkItemService.getCheckItemList(); | |
30 | + public FrontEndResult getCheckItemList(@RequestParam(required = false) Integer type,@RequestParam(required = false) String hospitalId) { | |
31 | + Map param = new HashMap(); | |
32 | + param.put("type",type); | |
33 | + param.put("hospitalId",hospitalId); | |
34 | + List<CheckItem> checkItem = checkItemService.getCheckItemList(param); | |
30 | 35 | return new FrontEndResult().setData(checkItem); |
36 | + } | |
37 | + | |
38 | + | |
39 | + /** | |
40 | + * 添加项目 | |
41 | + * @param checkItem | |
42 | + * @return | |
43 | + */ | |
44 | + @RequestMapping(value = "/addCheckItem", method = RequestMethod.POST) | |
45 | + @ResponseBody | |
46 | + public BaseResponse addCheckItem(@RequestBody CheckItem checkItem) { | |
47 | + checkItemService.addCheckItem(checkItem); | |
48 | + return new BaseResponse(). | |
49 | + setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
50 | + } | |
51 | + | |
52 | + | |
53 | + /** | |
54 | + * 更新检查项 | |
55 | + * @param checkItem | |
56 | + * @return | |
57 | + */ | |
58 | + @RequestMapping(value = "/updateCheckItem", method = RequestMethod.POST) | |
59 | + @ResponseBody | |
60 | + public BaseResponse updateCheckItem(@RequestBody CheckItem checkItem) { | |
61 | + checkItemService.updateCheckItem(checkItem); | |
62 | + return new BaseResponse(). | |
63 | + setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
64 | + } | |
65 | + | |
66 | + | |
67 | + /** | |
68 | + * 删除 | |
69 | + * @param id | |
70 | + * @return | |
71 | + */ | |
72 | + @RequestMapping(value = "/deleteCheckItem/{id}", method = RequestMethod.GET) | |
73 | + @ResponseBody | |
74 | + public BaseResponse deleteCheckItem(@PathVariable Integer id) { | |
75 | + checkItemService.deleteCheckItem(id); | |
76 | + return new BaseResponse(). | |
77 | + setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
31 | 78 | } |
32 | 79 | |
33 | 80 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
c7bd641
... | ... | @@ -312,13 +312,13 @@ |
312 | 312 | public BaseResponse addOneAntEx(AntExAddRequest antExAddRequest, Integer userId) { |
313 | 313 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
314 | 314 | |
315 | -// //秦皇岛市山海关人民医院 零时处理 | |
316 | -// if (StringUtils.isNotEmpty(antExAddRequest.getCheckDate()) && "1000000004".equals(hospitalId)) { | |
317 | -// if (!antExAddRequest.getCheckDate().equals(DateUtil.getyyyy_MM_dd(new Date()))) | |
318 | -// { | |
319 | -// return new BaseResponse().setErrormsg("检查日期不是当天不能保存").setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
320 | -// } | |
321 | -// } | |
315 | + //秦皇岛市山海关人民医院 零时处理 | |
316 | + if (StringUtils.isNotEmpty(antExAddRequest.getCheckDate()) && "1000000004".equals(hospitalId)) { | |
317 | + if (!antExAddRequest.getCheckDate().equals(DateUtil.getyyyy_MM_dd(new Date()))) | |
318 | + { | |
319 | + return new BaseResponse().setErrormsg("检查日期不是当天不能保存").setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
320 | + } | |
321 | + } | |
322 | 322 | |
323 | 323 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
324 | 324 | //表示区域的 |
... | ... | @@ -527,22 +527,22 @@ |
527 | 527 | // zcPrenatalService.saveAntexFu(antExamModel); |
528 | 528 | // } |
529 | 529 | |
530 | - try { | |
531 | - //处方计划 | |
532 | - if (antExamModel.getNextCheckTime() != null) { | |
533 | - saveCheckItem(antExamModel.getNextCheckTime(), patients); | |
534 | - } | |
535 | - } catch (Exception e) { | |
536 | - e.printStackTrace(); | |
537 | - } | |
538 | - try { | |
539 | - //处方计划 | |
540 | - if (antExamModel.getCheckDate() != null) { | |
541 | - saveCheckActual(antExamModel.getCheckDate(), patients); | |
542 | - } | |
543 | - } catch (Exception e) { | |
544 | - e.printStackTrace(); | |
545 | - } | |
530 | +// try { | |
531 | +// //处方计划 | |
532 | +// if (antExamModel.getNextCheckTime() != null) { | |
533 | +// saveCheckItem(antExamModel.getNextCheckTime(), patients); | |
534 | +// } | |
535 | +// } catch (Exception e) { | |
536 | +// e.printStackTrace(); | |
537 | +// } | |
538 | +// try { | |
539 | +// //处方计划 | |
540 | +// if (antExamModel.getCheckDate() != null) { | |
541 | +// saveCheckActual(antExamModel.getCheckDate(), patients); | |
542 | +// } | |
543 | +// } catch (Exception e) { | |
544 | +// e.printStackTrace(); | |
545 | +// } | |
546 | 546 | |
547 | 547 | try { |
548 | 548 | //处方计划 |
549 | 549 | |
550 | 550 | |
... | ... | @@ -634,15 +634,15 @@ |
634 | 634 | |
635 | 635 | |
636 | 636 | //秦皇岛市山海关人民医院 零时处理 |
637 | -// if (StringUtils.isNotEmpty(excAddRequest.getCheckTime()) && "1000000004".equals(hospitalId)) { | |
638 | -// if (!excAddRequest.getCheckTime().equals(DateUtil.getyyyy_MM_dd(new Date()))) | |
639 | -// { | |
640 | -// return new BaseResponse().setErrormsg("检查日期不是当天不能保存").setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
641 | -// } | |
642 | -// | |
643 | -// } | |
637 | + if (StringUtils.isNotEmpty(excAddRequest.getCheckTime()) && "1000000004".equals(hospitalId)) { | |
638 | + if (!excAddRequest.getCheckTime().equals(DateUtil.getyyyy_MM_dd(new Date()))) | |
639 | + { | |
640 | + return new BaseResponse().setErrormsg("检查日期不是当天不能保存").setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
641 | + } | |
644 | 642 | |
643 | + } | |
645 | 644 | |
645 | + | |
646 | 646 | /** 验证产检券是否可用 可用就改为已使用状态 */ |
647 | 647 | if (StringUtils.isNotBlank(excAddRequest.getCouponCode()) && excAddRequest.getCouponType() != null) { |
648 | 648 | stopWatch.start("couponService.validate"); |
... | ... | @@ -1198,20 +1198,20 @@ |
1198 | 1198 | // } |
1199 | 1199 | |
1200 | 1200 | |
1201 | - try { | |
1202 | - //处方计划 | |
1203 | - if (excAddRequest.getNextCheckTime() != null) { | |
1204 | - saveCheckItem(DateUtil.parseYMD(excAddRequest.getNextCheckTime()), patients); | |
1205 | - } | |
1206 | - } catch (Exception e) { | |
1207 | - } | |
1208 | - try { | |
1209 | - //处方计划 | |
1210 | - if (excAddRequest.getCheckTime() != null) { | |
1211 | - saveCheckActual(DateUtil.parseYMD(excAddRequest.getCheckTime()), patients); | |
1212 | - } | |
1213 | - } catch (Exception e) { | |
1214 | - } | |
1201 | +// try { | |
1202 | +// //处方计划 | |
1203 | +// if (excAddRequest.getNextCheckTime() != null) { | |
1204 | +// saveCheckItem(DateUtil.parseYMD(excAddRequest.getNextCheckTime()), patients); | |
1205 | +// } | |
1206 | +// } catch (Exception e) { | |
1207 | +// } | |
1208 | +// try { | |
1209 | +// //处方计划 | |
1210 | +// if (excAddRequest.getCheckTime() != null) { | |
1211 | +// saveCheckActual(DateUtil.parseYMD(excAddRequest.getCheckTime()), patients); | |
1212 | +// } | |
1213 | +// } catch (Exception e) { | |
1214 | +// } | |
1215 | 1215 | |
1216 | 1216 | try { |
1217 | 1217 | if (excAddRequest.getNextCheckTime() != null) { |
1218 | 1218 | |
... | ... | @@ -1421,46 +1421,46 @@ |
1421 | 1421 | return null; |
1422 | 1422 | } |
1423 | 1423 | |
1424 | - public void saveCheckItem(Date nextCheckTime, Patients patients) { | |
1425 | - List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(Criteria.where("hospitalId").is(patients.getHospitalId())), CheckItemConfig.class); | |
1426 | - if (CollectionUtils.isNotEmpty(itemConfigs)) { | |
1427 | - for (CheckItemConfig checkItemConfig : itemConfigs) { | |
1428 | - //末次月经加一天的原因是 列表中展示的孕周是不包含末次月经那天,计算周数所以也要不包含末次月经当天 | |
1429 | - int currentWeek = DateUtil.getWeek(DateUtil.addDay(patients.getLastMenses(), 1), nextCheckTime); | |
1430 | - if (checkItemConfig.getStartWeek() <= currentWeek && checkItemConfig.getEndWeek() >= currentWeek) { | |
1431 | - CheckItemOrder order = new CheckItemOrder(); | |
1432 | - order.setCreated(new Date()); | |
1433 | - order.setHospitalId(patients.getHospitalId()); | |
1434 | - order.setNextCheckTime(nextCheckTime); | |
1435 | - order.setItemId(checkItemConfig.getId()); | |
1436 | - order.setPatientId(patients.getId()); | |
1437 | - mongoTemplate.save(order); | |
1438 | - } | |
1439 | - } | |
1440 | - } | |
1441 | - } | |
1424 | +// public void saveCheckItem(Date nextCheckTime, Patients patients) { | |
1425 | +// List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(Criteria.where("hospitalId").is(patients.getHospitalId())), CheckItemConfig.class); | |
1426 | +// if (CollectionUtils.isNotEmpty(itemConfigs)) { | |
1427 | +// for (CheckItemConfig checkItemConfig : itemConfigs) { | |
1428 | +// //末次月经加一天的原因是 列表中展示的孕周是不包含末次月经那天,计算周数所以也要不包含末次月经当天 | |
1429 | +// int currentWeek = DateUtil.getWeek(DateUtil.addDay(patients.getLastMenses(), 1), nextCheckTime); | |
1430 | +// if (checkItemConfig.getStartWeek() <= currentWeek && checkItemConfig.getEndWeek() >= currentWeek) { | |
1431 | +// CheckItemOrder order = new CheckItemOrder(); | |
1432 | +// order.setCreated(new Date()); | |
1433 | +// order.setHospitalId(patients.getHospitalId()); | |
1434 | +// order.setNextCheckTime(nextCheckTime); | |
1435 | +// order.setItemId(checkItemConfig.getId()); | |
1436 | +// order.setPatientId(patients.getId()); | |
1437 | +// mongoTemplate.save(order); | |
1438 | +// } | |
1439 | +// } | |
1440 | +// } | |
1441 | +// } | |
1442 | +// | |
1443 | +// | |
1444 | +// public void saveCheckActual(Date checkTime, Patients patients) { | |
1445 | +// List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(Criteria.where("hospitalId").is(patients.getHospitalId())), CheckItemConfig.class); | |
1446 | +// if (CollectionUtils.isNotEmpty(itemConfigs)) { | |
1447 | +// for (CheckItemConfig checkItemConfig : itemConfigs) { | |
1448 | +// //末次月经加一天的原因是 列表中展示的孕周是不包含末次月经那天,计算周数所以也要不包含末次月经当天 | |
1449 | +// int currentWeek = DateUtil.getWeek(DateUtil.addDay(patients.getLastMenses(), 1), checkTime); | |
1450 | +// if (checkItemConfig.getStartWeek() <= currentWeek && checkItemConfig.getEndWeek() >= currentWeek) { | |
1451 | +// CheckItemActual actual = new CheckItemActual(); | |
1452 | +// actual.setCreated(new Date()); | |
1453 | +// actual.setHospitalId(patients.getHospitalId()); | |
1454 | +// actual.setCheckTime(checkTime); | |
1455 | +// actual.setItemId(checkItemConfig.getId()); | |
1456 | +// actual.setPatientId(patients.getId()); | |
1457 | +// actual.setStatus(0); | |
1458 | +// mongoTemplate.save(actual); | |
1459 | +// } | |
1460 | +// } | |
1461 | +// } | |
1462 | +// } | |
1442 | 1463 | |
1443 | - | |
1444 | - public void saveCheckActual(Date checkTime, Patients patients) { | |
1445 | - List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(Criteria.where("hospitalId").is(patients.getHospitalId())), CheckItemConfig.class); | |
1446 | - if (CollectionUtils.isNotEmpty(itemConfigs)) { | |
1447 | - for (CheckItemConfig checkItemConfig : itemConfigs) { | |
1448 | - //末次月经加一天的原因是 列表中展示的孕周是不包含末次月经那天,计算周数所以也要不包含末次月经当天 | |
1449 | - int currentWeek = DateUtil.getWeek(DateUtil.addDay(patients.getLastMenses(), 1), checkTime); | |
1450 | - if (checkItemConfig.getStartWeek() <= currentWeek && checkItemConfig.getEndWeek() >= currentWeek) { | |
1451 | - CheckItemActual actual = new CheckItemActual(); | |
1452 | - actual.setCreated(new Date()); | |
1453 | - actual.setHospitalId(patients.getHospitalId()); | |
1454 | - actual.setCheckTime(checkTime); | |
1455 | - actual.setItemId(checkItemConfig.getId()); | |
1456 | - actual.setPatientId(patients.getId()); | |
1457 | - actual.setStatus(0); | |
1458 | - mongoTemplate.save(actual); | |
1459 | - } | |
1460 | - } | |
1461 | - } | |
1462 | - } | |
1463 | - | |
1464 | 1464 | /** |
1465 | 1465 | * 初诊、复诊添加或更新追访信息 |
1466 | 1466 | * |
... | ... | @@ -3517,8 +3517,8 @@ |
3517 | 3517 | antExChuQuery.setParentId(patients.getId()); |
3518 | 3518 | } |
3519 | 3519 | |
3520 | -// } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) { | |
3521 | -// antExChuQuery.setParentId(patients.getId()); | |
3520 | + } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) { | |
3521 | + antExChuQuery.setParentId(patients.getId()); | |
3522 | 3522 | } else { |
3523 | 3523 | antExChuQuery.setPid(patients.getPid()); |
3524 | 3524 | } |
... | ... | @@ -3548,8 +3548,8 @@ |
3548 | 3548 | } else { |
3549 | 3549 | antExQuery.setParentId(patients.getId()); |
3550 | 3550 | } |
3551 | -// } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) { | |
3552 | -// antExQuery.setParentId(patients.getId()); | |
3551 | + } else if (StringUtils.isNotEmpty(queryRequest.getCardNo()) && StringUtils.isNotEmpty(queryRequest.getCoupon())) { | |
3552 | + antExQuery.setParentId(patients.getId()); | |
3553 | 3553 | } else { |
3554 | 3554 | antExQuery.setPid(patients.getPid()); |
3555 | 3555 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
c7bd641
... | ... | @@ -584,8 +584,14 @@ |
584 | 584 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
585 | 585 | } |
586 | 586 | |
587 | - public BaseResponse queryCheckItemConfig(String hospitalId) { | |
588 | - List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(Criteria.where("hospitalId").is(hospitalId)), CheckItemConfig.class); | |
587 | + public BaseResponse queryCheckItemConfig(String hospitalId,Integer type) { | |
588 | + Criteria criteria = Criteria.where("hospitalId").is(hospitalId); | |
589 | + if (type != null) | |
590 | + { | |
591 | + criteria.and("type").is(type); | |
592 | + } | |
593 | + | |
594 | + List<CheckItemConfig> itemConfigs = mongoTemplate.find(Query.query(criteria), CheckItemConfig.class); | |
589 | 595 | |
590 | 596 | return new BaseObjectResponse().setData(itemConfigs).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
591 | 597 | } |