Selaa lähdekoodia

Merge branch '1.0' of http://gogs.tcmbrain.com/zjh/pre_paramater into 1.0

guxinyu 2 vuotta sitten
vanhempi
commit
33af967f8a

BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/BStandardMat.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TMaterialHISVO.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TMaterialKnowVO.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TMaterialStandVO.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/BStandardMatController.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/BStandardMatService.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TAppMaterialMappingService.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TStandardMaterialMappingService.java


+ 7 - 4
cbkj_web_parameter/src/main/resources/mappers/drug/BStandardMatMapper.xml

@@ -65,7 +65,7 @@
     <select id="getPageListByObj" parameterType="BStandardMat" resultMap="BaseResultMap">
         SELECT s_id,s_mat_code,s_mat_name,s_mat_class,s_mat_type
         from b_standard_mat
-        <where>
+      where
         1=1
             <if test=" sMatName != null and sMatName!='' and sMatCode != null and sMatCode!='' ">
                 and (s_mat_name like CONCAT('%',trim(#{sMatName}),'%') or s_mat_code like CONCAT('%',trim(#{sMatCode}),'%'))
@@ -76,10 +76,13 @@
             <if test=" (sMatName == null or sMatName=='') and (sMatCode != null and sMatCode!='') ">
                 and s_mat_code like CONCAT('%',trim(#{sMatCode}),'%')
             </if>
-            <if test=" sMatType == null or sMatType=='' ">
-                and s_mat_type = #{sMatCode}
+            <if test=" sMatType != null and sMatType !='' ">
+                and s_mat_type = #{sMatType}
             </if>
-        </where>
+            <if test=" keyWord != null and keyWord !='' ">
+                and (s_mat_name like CONCAT('%',trim(#{keyWord}),'%') or s_mat_code like CONCAT('%',trim(#{keyWord}),'%'))
+            </if>
+
     </select>
 
 </mapper>

+ 13 - 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 !=''">
@@ -145,6 +153,9 @@ group by tm2.mat_id
             <if test=" matId != null and matId !=''">
                 mat_id = #{matId}
             </if>
+            <if test=" sMatType != null and sMatType !=''">
+                s_mat_type = #{sMatType}
+            </if>
         </where>
     </select>
     <insert id="insertautoMapping" parameterType="StandTMAutoMappingVO">