Commit ad6dd8c607a67813b49e34e496ea090793ed93ec
1 parent
ae3238784a
Exists in
master
and in
6 other branches
全部孕妇管理增加按照排序
Showing 7 changed files with 143 additions and 7 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctServiceQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContent.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContentQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/HospitalDoctService.xml
- platform-biz-service/src/main/resources/mainOrm/master/HospitalServiceContent.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctService.java
View file @
ad6dd8c
... | ... | @@ -22,6 +22,8 @@ |
22 | 22 | * 医院id |
23 | 23 | */ |
24 | 24 | private String hospId; |
25 | + | |
26 | + | |
25 | 27 | /** |
26 | 28 | * 医生价格 |
27 | 29 | */ |
... | ... | @@ -31,6 +33,16 @@ |
31 | 33 | * 状态:0-有效、1-暂停、2-删除 |
32 | 34 | */ |
33 | 35 | private Integer status; |
36 | + | |
37 | + private Integer syncStatus; | |
38 | + | |
39 | + public Integer getSyncStatus() { | |
40 | + return syncStatus; | |
41 | + } | |
42 | + | |
43 | + public void setSyncStatus(Integer syncStatus) { | |
44 | + this.syncStatus = syncStatus; | |
45 | + } | |
34 | 46 | |
35 | 47 | public Integer getStatus() { |
36 | 48 | return status; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctServiceQuery.java
View file @
ad6dd8c
... | ... | @@ -34,7 +34,15 @@ |
34 | 34 | * 状态:0-有效、1-暂停、2-删除 |
35 | 35 | */ |
36 | 36 | private Integer status; |
37 | + private Integer syncStatus; | |
37 | 38 | |
39 | + public Integer getSyncStatus() { | |
40 | + return syncStatus; | |
41 | + } | |
42 | + | |
43 | + public void setSyncStatus(Integer syncStatus) { | |
44 | + this.syncStatus = syncStatus; | |
45 | + } | |
38 | 46 | public Integer getStatus() { |
39 | 47 | return status; |
40 | 48 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContent.java
View file @
ad6dd8c
... | ... | @@ -46,7 +46,15 @@ |
46 | 46 | * 医生集合 |
47 | 47 | */ |
48 | 48 | private List<String> doctIds = new ArrayList<>(); |
49 | + private Integer syncStatus; | |
49 | 50 | |
51 | + public Integer getSyncStatus() { | |
52 | + return syncStatus; | |
53 | + } | |
54 | + | |
55 | + public void setSyncStatus(Integer syncStatus) { | |
56 | + this.syncStatus = syncStatus; | |
57 | + } | |
50 | 58 | |
51 | 59 | /** |
52 | 60 | * 服务医生集合 |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContentQuery.java
View file @
ad6dd8c
... | ... | @@ -39,7 +39,15 @@ |
39 | 39 | * 状态:0-有效、1-暂停、2-删除 |
40 | 40 | */ |
41 | 41 | private Integer status; |
42 | + private Integer syncStatus; | |
42 | 43 | |
44 | + public Integer getSyncStatus() { | |
45 | + return syncStatus; | |
46 | + } | |
47 | + | |
48 | + public void setSyncStatus(Integer syncStatus) { | |
49 | + this.syncStatus = syncStatus; | |
50 | + } | |
43 | 51 | public Integer getStatus() { |
44 | 52 | return status; |
45 | 53 | } |
platform-biz-service/src/main/resources/mainOrm/master/HospitalDoctService.xml
View file @
ad6dd8c
... | ... | @@ -9,11 +9,13 @@ |
9 | 9 | <result column="hosp_id" property="hospId" jdbcType="VARCHAR"/> |
10 | 10 | <result column="doct_price" property="doctPrice" jdbcType="DECIMAL"/> |
11 | 11 | <result column="status" property="status" jdbcType="INTEGER"/> |
12 | + <result column="sync_status" property="syncStatus" jdbcType="INTEGER"/> | |
12 | 13 | </resultMap> |
13 | 14 | |
14 | 15 | |
15 | 16 | <insert id="addHospitalDoctService" parameterType="com.lyms.platform.permission.model.HospitalDoctService"> |
16 | -insert into hospital_doct_service (id,hosp_service_id,doct_id,hosp_id,doct_price,status) values (#{id},#{hospServiceId},#{doctId},#{hospId},#{doctPrice},#{status}) | |
17 | +insert into hospital_doct_service (id,hosp_service_id,doct_id,hosp_id,doct_price,status,sync_status) values | |
18 | +(#{id},#{hospServiceId},#{doctId},#{hospId},#{doctPrice},#{status},#{syncStatus}) | |
17 | 19 | </insert> |
18 | 20 | |
19 | 21 | |
... | ... | @@ -35,6 +37,9 @@ |
35 | 37 | <if test="status != null and status >= 0"> |
36 | 38 | status = #{status,jdbcType=INTEGER}, |
37 | 39 | </if> |
40 | + <if test="syncStatus != null and syncStatus >= 0"> | |
41 | + sync_status = #{syncStatus,jdbcType=INTEGER}, | |
42 | + </if> | |
38 | 43 | </set> |
39 | 44 | where id = #{id,jdbcType=VARCHAR} |
40 | 45 | </update> |
... | ... | @@ -46,7 +51,7 @@ |
46 | 51 | |
47 | 52 | |
48 | 53 | <select id="getHospitalDoctService" resultMap="HospitalDoctServiceResultMap" parameterType="java.lang.String"> |
49 | -select id,hosp_service_id,doct_id,hosp_id,doct_price,status | |
54 | +select id,hosp_service_id,doct_id,hosp_id,doct_price,status,sync_status | |
50 | 55 | from hospital_doct_service where id = #{id,jdbcType=VARCHAR} |
51 | 56 | </select> |
52 | 57 | |
53 | 58 | |
... | ... | @@ -82,13 +87,16 @@ |
82 | 87 | <if test="status != null and status >= 0"> |
83 | 88 | and status = #{status,jdbcType=INTEGER} |
84 | 89 | </if> |
90 | + <if test="syncStatus != null and syncStatus >= 0"> | |
91 | + and sync_status = #{syncStatus,jdbcType=INTEGER} | |
92 | + </if> | |
85 | 93 | </where> |
86 | 94 | </sql> |
87 | 95 | |
88 | 96 | |
89 | 97 | <select id="queryHospitalDoctService" resultMap="HospitalDoctServiceResultMap" |
90 | 98 | parameterType="com.lyms.platform.permission.model.HospitalDoctServiceQuery"> |
91 | - select id,hosp_service_id,doct_id,hosp_id,doct_price,status | |
99 | + select id,hosp_service_id,doct_id,hosp_id,doct_price,status,sync_status | |
92 | 100 | from hospital_doct_service |
93 | 101 | <include refid="HospitalDoctServiceCondition"/> |
94 | 102 | <include refid="orderAndLimit"/> |
platform-biz-service/src/main/resources/mainOrm/master/HospitalServiceContent.xml
View file @
ad6dd8c
... | ... | @@ -11,11 +11,13 @@ |
11 | 11 | <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/> |
12 | 12 | <result column="create_user" property="createUser" jdbcType="VARCHAR"/> |
13 | 13 | <result column="status" property="status" jdbcType="INTEGER"/> |
14 | + <result column="sync_status" property="syncStatus" jdbcType="INTEGER"/> | |
14 | 15 | </resultMap> |
15 | 16 | |
16 | 17 | |
17 | 18 | <insert id="addHospitalServiceContent" parameterType="com.lyms.platform.permission.model.HospitalServiceContent"> |
18 | -insert into hospital_service_content (id,hospital_id,ser_type,ser_price,create_date,create_user,status) values (#{id},#{hospitalId},#{serType},#{serPrice},#{createDate},#{createUser},#{status}) | |
19 | +insert into hospital_service_content (id,hospital_id,ser_type,ser_price,create_date,create_user,status,sync_status) values | |
20 | +(#{id},#{hospitalId},#{serType},#{serPrice},#{createDate},#{createUser},#{status},#{syncStatus}) | |
19 | 21 | </insert> |
20 | 22 | |
21 | 23 | |
... | ... | @@ -40,6 +42,9 @@ |
40 | 42 | <if test="status != null and status >= 0"> |
41 | 43 | status = #{status,jdbcType=INTEGER}, |
42 | 44 | </if> |
45 | + <if test="syncStatus != null and syncStatus >= 0"> | |
46 | + sync_status = #{syncStatus,jdbcType=INTEGER}, | |
47 | + </if> | |
43 | 48 | </set> |
44 | 49 | where id = #{id,jdbcType=VARCHAR} |
45 | 50 | </update> |
... | ... | @@ -51,7 +56,7 @@ |
51 | 56 | |
52 | 57 | |
53 | 58 | <select id="getHospitalServiceContent" resultMap="HospitalServiceContentResultMap" parameterType="java.lang.String"> |
54 | -select id,hospital_id,ser_type,ser_price,create_date,create_user,status | |
59 | +select id,hospital_id,ser_type,ser_price,create_date,create_user,status,sync_status | |
55 | 60 | from hospital_service_content where id = #{id,jdbcType=VARCHAR} |
56 | 61 | </select> |
57 | 62 | |
58 | 63 | |
... | ... | @@ -90,13 +95,16 @@ |
90 | 95 | <if test="status != null and status >= 0"> |
91 | 96 | and status = #{status,jdbcType=INTEGER} |
92 | 97 | </if> |
98 | + <if test="syncStatus != null and syncStatus >= 0"> | |
99 | + and sync_status = #{syncStatus,jdbcType=INTEGER} | |
100 | + </if> | |
93 | 101 | </where> |
94 | 102 | </sql> |
95 | 103 | |
96 | 104 | |
97 | 105 | <select id="queryGroupHospitalServiceContent" resultMap="HospitalServiceContentResultMap" |
98 | 106 | parameterType="com.lyms.platform.permission.model.HospitalServiceContentQuery"> |
99 | - select hospital_id,group_concat(ser_type) as ser_types,create_date,create_user from hospital_service_content | |
107 | + select hospital_id,group_concat(ser_type) as ser_types,create_date,create_user,sync_status from hospital_service_content | |
100 | 108 | <include refid="HospitalServiceContentCondition"/> |
101 | 109 | group by hospital_id |
102 | 110 | <include refid="orderAndLimit"/> |
... | ... | @@ -112,7 +120,7 @@ |
112 | 120 | |
113 | 121 | <select id="queryHospitalServiceContent" resultMap="HospitalServiceContentResultMap" |
114 | 122 | parameterType="com.lyms.platform.permission.model.HospitalServiceContentQuery"> |
115 | - select id,hospital_id,ser_type,ser_price,create_date,create_user,status | |
123 | + select id,hospital_id,ser_type,ser_price,create_date,create_user,status,sync_status | |
116 | 124 | from hospital_service_content |
117 | 125 | <include refid="HospitalServiceContentCondition"/> |
118 | 126 | <include refid="orderAndLimit"/> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
ad6dd8c
... | ... | @@ -590,5 +590,89 @@ |
590 | 590 | baseResponse.setErrormsg("成功"); |
591 | 591 | return baseResponse; |
592 | 592 | } |
593 | + | |
594 | + | |
595 | + /** | |
596 | + * 同步医院医生服务价格配置 | |
597 | + * | |
598 | + * @return | |
599 | + */ | |
600 | + public BaseResponse syncHospitalService(){ | |
601 | + HospitalServiceContentQuery hospitalServiceContentQuery = new HospitalServiceContentQuery(); | |
602 | + hospitalServiceContentQuery.setStatus(1); | |
603 | + hospitalServiceContentQuery.setSyncStatus(0); | |
604 | + hospitalServiceContentQuery.setPage(1); | |
605 | + hospitalServiceContentQuery.setLimit(10); | |
606 | + //查询未同步的数据 | |
607 | + List<HospitalServiceContent> hospitalServiceContents= hospitalServiceContentService.queryGroupHospitalServiceContent(hospitalServiceContentQuery); | |
608 | + List hospitalService=new ArrayList(); | |
609 | + List hospitalDoctService=new ArrayList(); | |
610 | + //判断是否有数据 | |
611 | + if(CollectionUtils.isNotEmpty(hospitalServiceContents)){ | |
612 | + for(HospitalServiceContent hospitalServiceContent:hospitalServiceContents){ | |
613 | + hospitalService.add(convert(hospitalServiceContent)); | |
614 | + } | |
615 | + } | |
616 | + | |
617 | + HospitalDoctServiceQuery hospitalDoctServiceQuery = new HospitalDoctServiceQuery(); | |
618 | + hospitalDoctServiceQuery.setLimit(10); | |
619 | + hospitalDoctServiceQuery.setPage(1); | |
620 | + hospitalDoctServiceQuery.setStatus(1); | |
621 | + hospitalDoctServiceQuery.setSyncStatus(0); | |
622 | + | |
623 | + List<HospitalDoctService> hospitalDoctServices=hospitalDoctServiceService.queryHospitalDoctService(hospitalDoctServiceQuery); | |
624 | + //判断是否有数据 | |
625 | + if(CollectionUtils.isNotEmpty(hospitalServiceContents)) { | |
626 | + for(HospitalDoctService hospitalServiceContent:hospitalDoctServices){ | |
627 | + hospitalDoctService.add(convert(hospitalServiceContent)); | |
628 | + } | |
629 | + } | |
630 | + | |
631 | + Map map1 = new HashMap(); | |
632 | + map1.put("hospitalDoctService",hospitalDoctService); | |
633 | + map1.put("hospitalService",hospitalService); | |
634 | + | |
635 | + BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); | |
636 | + baseObjectResponse.setData(map1); | |
637 | + baseObjectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
638 | + baseObjectResponse.setErrormsg("成功"); | |
639 | + return baseObjectResponse; | |
640 | + } | |
641 | + | |
642 | + private Map convert(HospitalServiceContent serviceContent){ | |
643 | + Map map =new HashMap(); | |
644 | + map.put("create_date",serviceContent.getCreateDate().getTime()); | |
645 | + map.put("hospital_id",serviceContent.getHospitalId()); | |
646 | + map.put("id",serviceContent.getId()); | |
647 | + map.put("ser_price",serviceContent.getSerPrice()); | |
648 | + map.put("ser_type",serviceContent.getSerType()); | |
649 | + map.put("status",serviceContent.getStatus()); | |
650 | + /* "create_date": "", | |
651 | + "hospital_id": 1, | |
652 | + "id": 1, | |
653 | + "ser_price": 1, | |
654 | + "ser_type": 1*/ | |
655 | + return map; | |
656 | + } | |
657 | + | |
658 | + private Map convert(HospitalDoctService hospitalDoctService){ | |
659 | + Map map =new HashMap(); | |
660 | + map.put("doct_id",hospitalDoctService.getDoctId()); | |
661 | + map.put("doct_price",hospitalDoctService.getDoctPrice()); | |
662 | + map.put("id",hospitalDoctService.getId()); | |
663 | + map.put("hosp_id",hospitalDoctService.getHospId()); | |
664 | + map.put("hosp_service_id",hospitalDoctService.getHospServiceId()); | |
665 | + map.put("status",hospitalDoctService.getStatus()); | |
666 | + /*{ | |
667 | + "doct_id": 54545, | |
668 | + "doct_price": 10, | |
669 | + "hosp_service_id": 2, | |
670 | + "id": 1 | |
671 | + }*/ | |
672 | + return map; | |
673 | + } | |
674 | + | |
675 | + @Autowired | |
676 | + private HospitalDoctServiceService hospitalDoctServiceService; | |
593 | 677 | } |