Commit 8ebd6141caf31c9379cd0735981d9dd92598a1b8
1 parent
e02780d715
Exists in
master
and in
6 other branches
服务同步,退订后,重新开通,选择服务医生
Showing 2 changed files with 98 additions and 98 deletions
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
View file @
8ebd614
... | ... | @@ -3,103 +3,102 @@ |
3 | 3 | <mapper namespace="com.lyms.platform.permission.dao.master.PatientServiceMapper"> |
4 | 4 | |
5 | 5 | <resultMap id="PatientServiceResultMap" type="com.lyms.platform.permission.model.PatientService"> |
6 | - <id column="id" property="id" jdbcType="VARCHAR" /> | |
7 | - <result column="parentid" property="parentid" jdbcType="VARCHAR" /> | |
8 | - <result column="pid" property="pid" jdbcType="VARCHAR" /> | |
9 | - <result column="ser_type" property="serType" jdbcType="INTEGER" /> | |
10 | - <result column="ser_doct" property="serDoct" jdbcType="VARCHAR" /> | |
11 | - <result column="create_date" property="createDate" jdbcType="TIMESTAMP" /> | |
12 | - <result column="create_user_name" property="createUserName" jdbcType="VARCHAR" /> | |
13 | - <result column="create_user" property="createUser" jdbcType="VARCHAR" /> | |
14 | - <result column="ser_status" property="serStatus" jdbcType="INTEGER" /> | |
15 | - <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" /> | |
16 | - <result column="update_user_name" property="updateUserName" jdbcType="VARCHAR" /> | |
17 | - <result column="update_user" property="updateUser" jdbcType="VARCHAR" /> | |
18 | - <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR" /> | |
19 | - <result column="ser_code" property="serCode" jdbcType="VARCHAR" /> | |
20 | - <result column="status" property="status" jdbcType="INTEGER" /> | |
21 | - <result column="receive_date" property="receiveDate" jdbcType="TIMESTAMP" /> | |
22 | - <result column="receive_user" property="receiveUser" jdbcType="VARCHAR" /> | |
23 | - <result column="back_date" property="backDate" jdbcType="TIMESTAMP" /> | |
24 | - <result column="back_user" property="backUser" jdbcType="VARCHAR" /> | |
25 | - <result column="order_id" property="orderId" jdbcType="VARCHAR" /> | |
26 | - <result column="syn_status" property="synStatus" jdbcType="INTEGER" /> | |
27 | - <result column="is_old" property="isOld" jdbcType="INTEGER" /> | |
6 | + <id column="id" property="id" jdbcType="VARCHAR"/> | |
7 | + <result column="parentid" property="parentid" jdbcType="VARCHAR"/> | |
8 | + <result column="pid" property="pid" jdbcType="VARCHAR"/> | |
9 | + <result column="ser_type" property="serType" jdbcType="INTEGER"/> | |
10 | + <result column="ser_doct" property="serDoct" jdbcType="VARCHAR"/> | |
11 | + <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/> | |
12 | + <result column="create_user_name" property="createUserName" jdbcType="VARCHAR"/> | |
13 | + <result column="create_user" property="createUser" jdbcType="VARCHAR"/> | |
14 | + <result column="ser_status" property="serStatus" jdbcType="INTEGER"/> | |
15 | + <result column="update_date" property="updateDate" jdbcType="TIMESTAMP"/> | |
16 | + <result column="update_user_name" property="updateUserName" jdbcType="VARCHAR"/> | |
17 | + <result column="update_user" property="updateUser" jdbcType="VARCHAR"/> | |
18 | + <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/> | |
19 | + <result column="ser_code" property="serCode" jdbcType="VARCHAR"/> | |
20 | + <result column="status" property="status" jdbcType="INTEGER"/> | |
21 | + <result column="receive_date" property="receiveDate" jdbcType="TIMESTAMP"/> | |
22 | + <result column="receive_user" property="receiveUser" jdbcType="VARCHAR"/> | |
23 | + <result column="back_date" property="backDate" jdbcType="TIMESTAMP"/> | |
24 | + <result column="back_user" property="backUser" jdbcType="VARCHAR"/> | |
25 | + <result column="order_id" property="orderId" jdbcType="VARCHAR"/> | |
26 | + <result column="syn_status" property="synStatus" jdbcType="INTEGER"/> | |
27 | + <result column="is_old" property="isOld" jdbcType="INTEGER"/> | |
28 | 28 | </resultMap> |
29 | 29 | |
30 | 30 | |
31 | - | |
32 | 31 | <insert id="addPatientService" parameterType="com.lyms.platform.permission.model.PatientService"> |
33 | 32 | insert into patient_service (id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user,hospital_id,ser_code,status,receive_date,receive_user,back_date,back_user,order_id,syn_status,is_old) values (#{id},#{parentid},#{pid},#{serType},#{serDoct},#{createDate},#{createUserName},#{createUser},#{serStatus},#{updateDate},#{updateUserName},#{updateUser},#{hospitalId},#{serCode},#{status},#{receiveDate},#{receiveUser},#{backDate},#{backUser},#{orderId},#{synStatus},#{isOld}) |
34 | 33 | </insert> |
35 | 34 | |
36 | 35 | |
37 | - | |
38 | 36 | <update id="updatePatientService" parameterType="com.lyms.platform.permission.model.PatientService"> |
39 | - update patient_service <set><if test="parentid != null and parentid != ''"> | |
40 | - parentid = #{parentid,jdbcType=VARCHAR}, | |
41 | - </if> | |
42 | - <if test="pid != null and pid != ''"> | |
43 | - pid = #{pid,jdbcType=VARCHAR}, | |
44 | - </if> | |
45 | - <if test="serType != null and serType >= 0"> | |
46 | - ser_type = #{serType,jdbcType=INTEGER}, | |
47 | - </if> | |
48 | - <if test="serDoct != null and serDoct != ''"> | |
37 | + update patient_service | |
38 | + <set> | |
49 | 39 | ser_doct = #{serDoct,jdbcType=VARCHAR}, |
50 | - </if> | |
51 | - <if test="createDate != null"> | |
52 | - create_date = #{createDate,jdbcType=TIMESTAMP}, | |
53 | - </if> | |
54 | - <if test="createUserName != null and createUserName != ''"> | |
55 | - create_user_name = #{createUserName,jdbcType=VARCHAR}, | |
56 | - </if> | |
57 | - <if test="createUser != null and createUser != ''"> | |
58 | - create_user = #{createUser,jdbcType=VARCHAR}, | |
59 | - </if> | |
60 | - <if test="serStatus != null and serStatus >= 0"> | |
61 | - ser_status = #{serStatus,jdbcType=INTEGER}, | |
62 | - </if> | |
63 | - <if test="updateDate != null"> | |
64 | - update_date = #{updateDate,jdbcType=TIMESTAMP}, | |
65 | - </if> | |
66 | - <if test="updateUserName != null and updateUserName != ''"> | |
67 | - update_user_name = #{updateUserName,jdbcType=VARCHAR}, | |
68 | - </if> | |
69 | - <if test="updateUser != null and updateUser != ''"> | |
70 | - update_user = #{updateUser,jdbcType=VARCHAR}, | |
71 | - </if> | |
72 | - <if test="hospitalId != null and hospitalId != ''"> | |
73 | - hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
74 | - </if> | |
75 | - <if test="serCode != null and serCode != ''"> | |
76 | - ser_code = #{serCode,jdbcType=VARCHAR}, | |
77 | - </if> | |
78 | - <if test="status != null and status >= 0"> | |
79 | - status = #{status,jdbcType=INTEGER}, | |
80 | - </if> | |
81 | - <if test="receiveDate != null"> | |
82 | - receive_date = #{receiveDate,jdbcType=TIMESTAMP}, | |
83 | - </if> | |
84 | - <if test="receiveUser != null and receiveUser != ''"> | |
85 | - receive_user = #{receiveUser,jdbcType=VARCHAR}, | |
86 | - </if> | |
87 | - <if test="backDate != null"> | |
88 | - back_date = #{backDate,jdbcType=TIMESTAMP}, | |
89 | - </if> | |
90 | - <if test="backUser != null and backUser != ''"> | |
91 | - back_user = #{backUser,jdbcType=VARCHAR}, | |
92 | - </if> | |
93 | - <if test="orderId != null and orderId != ''"> | |
94 | - order_id = #{orderId,jdbcType=VARCHAR}, | |
95 | - </if> | |
96 | - <if test="synStatus != null and synStatus != ''"> | |
97 | - syn_status = #{synStatus,jdbcType=INTEGER}, | |
98 | - </if> | |
99 | - <if test="isOld != null and isOld != ''"> | |
100 | - is_old = #{isOld,jdbcType=INTEGER}, | |
101 | - </if> | |
102 | - </set> | |
40 | + <if test="parentid != null and parentid != ''"> | |
41 | + parentid = #{parentid,jdbcType=VARCHAR}, | |
42 | + </if> | |
43 | + <if test="pid != null and pid != ''"> | |
44 | + pid = #{pid,jdbcType=VARCHAR}, | |
45 | + </if> | |
46 | + <if test="serType != null and serType >= 0"> | |
47 | + ser_type = #{serType,jdbcType=INTEGER}, | |
48 | + </if> | |
49 | + | |
50 | + <if test="createDate != null"> | |
51 | + create_date = #{createDate,jdbcType=TIMESTAMP}, | |
52 | + </if> | |
53 | + <if test="createUserName != null and createUserName != ''"> | |
54 | + create_user_name = #{createUserName,jdbcType=VARCHAR}, | |
55 | + </if> | |
56 | + <if test="createUser != null and createUser != ''"> | |
57 | + create_user = #{createUser,jdbcType=VARCHAR}, | |
58 | + </if> | |
59 | + <if test="serStatus != null and serStatus >= 0"> | |
60 | + ser_status = #{serStatus,jdbcType=INTEGER}, | |
61 | + </if> | |
62 | + <if test="updateDate != null"> | |
63 | + update_date = #{updateDate,jdbcType=TIMESTAMP}, | |
64 | + </if> | |
65 | + <if test="updateUserName != null and updateUserName != ''"> | |
66 | + update_user_name = #{updateUserName,jdbcType=VARCHAR}, | |
67 | + </if> | |
68 | + <if test="updateUser != null and updateUser != ''"> | |
69 | + update_user = #{updateUser,jdbcType=VARCHAR}, | |
70 | + </if> | |
71 | + <if test="hospitalId != null and hospitalId != ''"> | |
72 | + hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
73 | + </if> | |
74 | + <if test="serCode != null and serCode != ''"> | |
75 | + ser_code = #{serCode,jdbcType=VARCHAR}, | |
76 | + </if> | |
77 | + <if test="status != null and status >= 0"> | |
78 | + status = #{status,jdbcType=INTEGER}, | |
79 | + </if> | |
80 | + <if test="receiveDate != null"> | |
81 | + receive_date = #{receiveDate,jdbcType=TIMESTAMP}, | |
82 | + </if> | |
83 | + <if test="receiveUser != null and receiveUser != ''"> | |
84 | + receive_user = #{receiveUser,jdbcType=VARCHAR}, | |
85 | + </if> | |
86 | + <if test="backDate != null"> | |
87 | + back_date = #{backDate,jdbcType=TIMESTAMP}, | |
88 | + </if> | |
89 | + <if test="backUser != null and backUser != ''"> | |
90 | + back_user = #{backUser,jdbcType=VARCHAR}, | |
91 | + </if> | |
92 | + <if test="orderId != null and orderId != ''"> | |
93 | + order_id = #{orderId,jdbcType=VARCHAR}, | |
94 | + </if> | |
95 | + <if test="synStatus != null and synStatus != ''"> | |
96 | + syn_status = #{synStatus,jdbcType=INTEGER}, | |
97 | + </if> | |
98 | + <if test="isOld != null and isOld != ''"> | |
99 | + is_old = #{isOld,jdbcType=INTEGER}, | |
100 | + </if> | |
101 | + </set> | |
103 | 102 | where id = #{id,jdbcType=VARCHAR} |
104 | 103 | </update> |
105 | 104 | |
... | ... | @@ -109,7 +108,6 @@ |
109 | 108 | </delete> |
110 | 109 | |
111 | 110 | |
112 | - | |
113 | 111 | <select id="getPatientService" resultMap="PatientServiceResultMap" parameterType="java.lang.String"> |
114 | 112 | select id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user,hospital_id,ser_code,status,receive_date,receive_user,back_date,back_user,order_id,syn_status,is_old |
115 | 113 | from patient_service where id = #{id,jdbcType=VARCHAR} |
116 | 114 | |
117 | 115 | |
118 | 116 | |
... | ... | @@ -219,16 +217,19 @@ |
219 | 217 | </where> |
220 | 218 | </sql> |
221 | 219 | |
222 | - <select id="queryPatientService" resultMap="PatientServiceResultMap" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
223 | - select id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user,hospital_id,ser_code,status,receive_date,receive_user,back_date,back_user,order_id,syn_status,is_old | |
220 | + <select id="queryPatientService" resultMap="PatientServiceResultMap" | |
221 | + parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
222 | + select | |
223 | + id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user,hospital_id,ser_code,status,receive_date,receive_user,back_date,back_user,order_id,syn_status,is_old | |
224 | 224 | from patient_service |
225 | - <include refid="PatientServiceCondition" /> | |
226 | - <include refid="orderAndLimit" /> | |
225 | + <include refid="PatientServiceCondition"/> | |
226 | + <include refid="orderAndLimit"/> | |
227 | 227 | </select> |
228 | 228 | |
229 | - <select id="queryPatientServiceCount" resultType="int" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
229 | + <select id="queryPatientServiceCount" resultType="int" | |
230 | + parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
230 | 231 | select count(1) from patient_service |
231 | - <include refid="PatientServiceCondition" /> | |
232 | + <include refid="PatientServiceCondition"/> | |
232 | 233 | </select> |
233 | 234 | |
234 | 235 | </mapper> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
8ebd614
... | ... | @@ -55,20 +55,19 @@ |
55 | 55 | |
56 | 56 | //先根据孕妇id和开通服务类型、开通医生进行查询,如果已经开通过则开通失败 |
57 | 57 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
58 | - //开通医院 | |
59 | - // patientQuery.setHospitalId(patientService.getHospitalId()); | |
60 | 58 | //根据孕妇主档案Id进行查询 |
61 | 59 | patientQuery.setParentid(patientService.getParentid()); |
62 | 60 | //开通服务 |
63 | 61 | patientQuery.setSerType(patientService.getSerType()); |
64 | - //开通医院 | |
65 | - // patientQuery.setHospitalId(patientService.getHospitalId()); | |
66 | 62 | List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); |
67 | 63 | if (CollectionUtils.isNotEmpty(patientServices)) {//修改 |
68 | 64 | PatientService ps = patientServices.get(0); |
69 | 65 | ps.setSerStatus(patientService.getSerStatus()); |
70 | 66 | ps.setSerCode(patientService.getSerCode()); |
71 | 67 | ps.setOrderId(patientService.getOrderId()); |
68 | + ps.setSerDoct(patientService.getSerDoct()); | |
69 | + ps.setHospitalId(patientService.getHospitalId()); | |
70 | + //操作时间 | |
72 | 71 | ps.setUpdateDate(new Date()); |
73 | 72 | patientServiceService.updatePatientService(ps); |
74 | 73 | } else {//新增 |