Commit ff7f420dc09d3c3f544d26a687e62eb988184c36

Authored by yangfei
1 parent ca8a1e5263

服务同步

Showing 4 changed files with 37 additions and 3 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientService.java View file @ ff7f420
... ... @@ -91,6 +91,18 @@
91 91 * 同步状态 默认不需要同步、1-待同步、2-已同步
92 92 */
93 93 private Integer synStatus;
  94 + /**
  95 + * 1-建档时开通服务的老数据
  96 + */
  97 + private Integer isOld;
  98 +
  99 + public Integer getIsOld() {
  100 + return isOld;
  101 + }
  102 +
  103 + public void setIsOld(Integer isOld) {
  104 + this.isOld = isOld;
  105 + }
94 106  
95 107 public Integer getSynStatus() {
96 108 return synStatus;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientServiceQuery.java View file @ ff7f420
... ... @@ -64,6 +64,19 @@
64 64 */
65 65 private Integer synStatus;
66 66  
  67 + /**
  68 + * 1-建档时开通服务的老数据
  69 + */
  70 + private Integer isOld;
  71 +
  72 + public Integer getIsOld() {
  73 + return isOld;
  74 + }
  75 +
  76 + public void setIsOld(Integer isOld) {
  77 + this.isOld = isOld;
  78 + }
  79 +
67 80 public Integer getSynStatus() {
68 81 return synStatus;
69 82 }
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml View file @ ff7f420
... ... @@ -24,12 +24,13 @@
24 24 <result column="back_user" property="backUser" jdbcType="VARCHAR" />
25 25 <result column="order_id" property="orderId" jdbcType="VARCHAR" />
26 26 <result column="syn_status" property="synStatus" jdbcType="INTEGER" />
  27 + <result column="is_old" property="isOld" jdbcType="INTEGER" />
27 28 </resultMap>
28 29  
29 30  
30 31  
31 32 <insert id="addPatientService" parameterType="com.lyms.platform.permission.model.PatientService">
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) values (#{id},#{parentid},#{pid},#{serType},#{serDoct},#{createDate},#{createUserName},#{createUser},#{serStatus},#{updateDate},#{updateUserName},#{updateUser},#{hospitalId},#{serCode},#{status},#{receiveDate},#{receiveUser},#{backDate},#{backUser},#{orderId},#{synStatus})
  33 + 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})
33 34 </insert>
34 35  
35 36  
... ... @@ -95,6 +96,9 @@
95 96 <if test="synStatus != null and synStatus != ''">
96 97 syn_status = #{synStatus,jdbcType=INTEGER},
97 98 </if>
  99 + <if test="isOld != null and isOld != ''">
  100 + is_old = #{isOld,jdbcType=INTEGER},
  101 + </if>
98 102 </set>
99 103 where id = #{id,jdbcType=VARCHAR}
100 104 </update>
... ... @@ -107,7 +111,7 @@
107 111  
108 112  
109 113 <select id="getPatientService" resultMap="PatientServiceResultMap" parameterType="java.lang.String">
110   - 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
  114 + 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
111 115 from patient_service where id = #{id,jdbcType=VARCHAR}
112 116 </select>
113 117  
... ... @@ -206,6 +210,9 @@
206 210 <if test="synStatus != null and synStatus != ''">
207 211 and syn_status = #{synStatus,jdbcType=INTEGER}
208 212 </if>
  213 + <if test="isOld != null and isOld != ''">
  214 + and is_old = #{isOld,jdbcType=INTEGER}
  215 + </if>
209 216 <if test="sql != null and sql != ''">
210 217 ${sql}
211 218 </if>
... ... @@ -213,7 +220,7 @@
213 220 </sql>
214 221  
215 222 <select id="queryPatientService" resultMap="PatientServiceResultMap" parameterType="com.lyms.platform.permission.model.PatientServiceQuery">
216   - 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
  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
217 224 from patient_service
218 225 <include refid="PatientServiceCondition" />
219 226 <include refid="orderAndLimit" />
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BuildSerToPatientSerWorker.java View file @ ff7f420
... ... @@ -128,6 +128,8 @@
128 128 continue;
129 129 }
130 130 }
  131 + //老数据服务标记
  132 + pser.setIsOld(1);
131 133 patientServiceService.addPatientService(pser);
132 134 }
133 135 // System.out.println("endIndex:" + endIndex + "," + i + ":" + patients.size());