瀏覽代碼

修改分页查询本地药房和标准编码映射参照接口传参判断

zjh 2 年之前
父節點
當前提交
b8682aaf80

二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TStandardMaterialMappingService.java


+ 10 - 2
cbkj_web_parameter/src/main/resources/mappers/drug/TStandardMaterialMappingMapper.xml

@@ -106,8 +106,16 @@
         FROM
         t_drug_list AS tdl
         JOIN t_material AS tm2 ON (tm2.drug_id = tdl.drug_id AND tm2.status = '1' and tm2.is_del='0')
-        LEFT JOIN t_standard_material_mapping AS tsmm ON(tsmm.drug_id = tm2.drug_id AND tsmm.mat_id = tm2.mat_id AND tsmm.s_mat_type='2')
-        LEFT JOIN b_standard_mat AS bsm ON(bsm.s_id=tsmm.s_id AND bsm.s_mat_type='2')
+        LEFT JOIN t_standard_material_mapping AS tsmm ON(tsmm.drug_id = tm2.drug_id AND tsmm.mat_id = tm2.mat_id
+        <if test=" sMatType !=null and sMatType !=''">
+            AND tsmm.s_mat_type = #{sMatType}
+        </if>
+                                                             )
+        LEFT JOIN b_standard_mat AS bsm ON(bsm.s_id=tsmm.s_id
+        <if test=" sMatType !=null and sMatType !=''">
+            AND bsm.s_mat_type=#{sMatType}
+        </if>
+                                               )
         <where>
             tdl.status='1' and tdl.drug_type='0'
             <if test=" drugId !=null and drugId !=''">