Commit 8df70cedf7f9235ab2c7fef7c38eee061ae74154

Authored by liquanyu
1 parent 67b64ec257

update

Showing 3 changed files with 40 additions and 3 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterLisMapper.java View file @ 8df70ce
... ... @@ -17,6 +17,8 @@
17 17  
18 18 List<LisReportModel> queryLisDataByModel(LisReportModel model);
19 19  
  20 + List<LisReportModel> queryLisDataByLisIdAndHid(LisReportModel model);
  21 +
20 22 List<LisReportItemModel> queryLisItemByModel(LisReportItemModel query);
21 23  
22 24 List<LisReportModel> queryListItems(LisReportModel query);
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java View file @ 8df70ce
... ... @@ -146,7 +146,7 @@
146 146 public void run() {
147 147 for(LisReportModel model : lisList)
148 148 {
149   - List<LisReportModel> dbLis = masterLisMapper.queryLisDataByModel(model);
  149 + List<LisReportModel> dbLis = masterLisMapper.queryLisDataByLisIdAndHid(model);
150 150 if (CollectionUtils.isEmpty(dbLis))
151 151 {
152 152 masterLisMapper.saveLisData(model);
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml View file @ 8df70ce
... ... @@ -111,12 +111,47 @@
111 111 <if test="lisId != null and lisId != ''">
112 112 AND LIS_ID = #{lisId}
113 113 </if>
114   - <if test="vcCardNo != null || phone != null">
  114 +<!-- <if test="vcCardNo != null || phone != null">
115 115 AND (VCCARDNO = #{vcCardNo} OR PHONE = #{phone})
116   - </if>
  116 + </if>-->
117 117 <if test="hospitalId != null and hospitalId != ''">
118 118 AND HOSPITAL_ID = #{hospitalId}
119 119 </if>
  120 +
  121 + </select>
  122 +
  123 +
  124 + <select id="queryLisDataByLisIdAndHid" parameterType="com.lyms.platform.permission.model.LisReportModel"
  125 + resultType="com.lyms.platform.permission.model.LisReportModel">
  126 + SELECT
  127 + ID AS id,
  128 + LIS_ID AS lisId,
  129 + TITLE AS title,
  130 + TYPE AS type,
  131 + VCCARDNO AS vcCardNo,
  132 + NAME AS name,
  133 + BHNUM AS bhnum,
  134 + AGE AS age,
  135 + SEX AS sex,
  136 + APPLY_TIME AS applyTime,
  137 + CHECK_TIME AS checkTime,
  138 + PUBLISH_TIME AS publishTime,
  139 + APPLY_DOCTOR AS applyDoctor,
  140 + APPLY_DEPT AS applyDept,
  141 + CHECKER AS checker,
  142 + MODIFIED AS modified,
  143 + CREATED AS created,
  144 + HOSPITAL_ID AS hospitalId,
  145 + PHONE AS phone,
  146 + ITEM_JSON AS itemJson
  147 + FROM LIS_REPORT_TBL
  148 + WHERE 1 = 1
  149 + <if test="lisId != null and lisId != ''">
  150 + AND LIS_ID = #{lisId}
  151 + </if>
  152 + <if test="hospitalId != null and hospitalId != ''">
  153 + AND HOSPITAL_ID = #{hospitalId}
  154 + </if>
120 155  
121 156 </select>
122 157