瀏覽代碼

1.添加药品相关映射表

zjh 2 年之前
父節點
當前提交
563a3f8221
共有 25 個文件被更改,包括 527 次插入0 次删除
  1. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/BMaterial.java
  2. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TAppMaterialMapping.java
  3. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TCenterHisMapping.java
  4. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TDrugList.java
  5. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TMaterial.java
  6. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/BMaterialController.java
  7. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TAppMaterialMappingController.java
  8. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TCenterHisMappingController.java
  9. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TDrugListController.java
  10. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TMaterialController.java
  11. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/BMaterialMapper.java
  12. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TAppMaterialMappingMapper.java
  13. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TCenterHisMappingMapper.java
  14. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TDrugListMapper.java
  15. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TMaterialMapper.java
  16. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/BMaterialService.java
  17. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TAppMaterialMappingService.java
  18. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TCenterHisMappingService.java
  19. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TDrugListService.java
  20. 二進制
      cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/drug/TMaterialService.java
  21. 75 0
      cbkj_web_parameter/src/main/resources/mappers/drug/BMaterialMapper.xml
  22. 87 0
      cbkj_web_parameter/src/main/resources/mappers/drug/TAppMaterialMappingMapper.xml
  23. 95 0
      cbkj_web_parameter/src/main/resources/mappers/drug/TCenterHisMappingMapper.xml
  24. 99 0
      cbkj_web_parameter/src/main/resources/mappers/drug/TDrugListMapper.xml
  25. 171 0
      cbkj_web_parameter/src/main/resources/mappers/drug/TMaterialMapper.xml

二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/BMaterial.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TAppMaterialMapping.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TCenterHisMapping.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TDrugList.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/drug/TMaterial.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/BMaterialController.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TAppMaterialMappingController.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TCenterHisMappingController.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TDrugListController.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/drug/TMaterialController.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/BMaterialMapper.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TAppMaterialMappingMapper.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TCenterHisMappingMapper.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TDrugListMapper.java


二進制
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/drug/TMaterialMapper.java


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


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


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


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


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


+ 75 - 0
cbkj_web_parameter/src/main/resources/mappers/drug/BMaterialMapper.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jiuzhekan.cbkj.mapper.drug.BMaterialMapper">
+
+    <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.drug.BMaterial">
+        <id column="k_mat_id" jdbcType="VARCHAR"  property="kMatId" />
+        <result column="k_mat_name" jdbcType="VARCHAR" property="kMatName" />
+        <result column="k_mat_py" jdbcType="VARCHAR" property="kMatPy" />
+        <result column="k_mat_wb" jdbcType="VARCHAR" property="kMatWb" />
+        <result column="k_mat_yf" jdbcType="VARCHAR" property="kMatYf" />
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+    k_mat_id,k_mat_name,k_mat_py,k_mat_wb,k_mat_yf
+    </sql>
+
+    <delete id="deleteByPrimaryKey" parameterType="BMaterial">
+        delete from b_material where k_mat_id = #{ kMatId }
+    </delete>
+
+    <delete id="deleteBylist" parameterType="ArrayList">
+        delete from b_material where k_mat_id in
+        <foreach collection="array" item="item" open="(" separator="," close=")">
+        #{item}
+        </foreach>
+    </delete>
+
+    <insert id="insert"  parameterType="BMaterial">
+        insert into b_material (<include refid="Base_Column_List" />) values
+        (#{kMatId},#{kMatName},#{kMatPy},#{kMatWb},#{kMatYf})
+    </insert>
+
+    <insert id="insertList" parameterType="List">
+        insert into b_material (<include refid="Base_Column_List" />) values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (#{item.kMatId},#{item.kMatName},#{item.kMatPy},#{item.kMatWb},#{item.kMatYf})
+        </foreach>
+    </insert>
+
+    <update id="updateByPrimaryKey" parameterType="BMaterial">
+        update b_material
+        <set>
+             <if test="kMatName != null">
+                k_mat_name = #{ kMatName },
+             </if>
+             <if test="kMatPy != null">
+                k_mat_py = #{ kMatPy },
+             </if>
+             <if test="kMatWb != null">
+                k_mat_wb = #{ kMatWb },
+             </if>
+             <if test="kMatYf != null">
+                k_mat_yf = #{ kMatYf },
+             </if>
+        </set>
+        where k_mat_id = #{ kMatId }
+    </update>
+
+    <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
+        select <include refid="Base_Column_List" />
+        from b_material where k_mat_id = #{id}
+    </select>
+
+    <select id="getPageListByObj" parameterType="BMaterial" resultMap="BaseResultMap">
+        SELECT k_mat_id,k_mat_name,k_mat_py,k_mat_wb,k_mat_yf
+        from b_material
+        <where>
+            <if test=" name != null and name!='' ">
+                and name like CONCAT('%',trim(#{name}),'%')
+            </if>
+        </where>
+    </select>
+
+</mapper>

+ 87 - 0
cbkj_web_parameter/src/main/resources/mappers/drug/TAppMaterialMappingMapper.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jiuzhekan.cbkj.mapper.drug.TAppMaterialMappingMapper">
+
+    <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.drug.TAppMaterialMapping">
+        <id column="id" jdbcType="VARCHAR"  property="id" />
+        <result column="k_mat_id" jdbcType="VARCHAR" property="kMatId" />
+        <result column="k_mat_name" jdbcType="VARCHAR" property="kMatName" />
+        <result column="drug_id" jdbcType="VARCHAR" property="drugId" />
+        <result column="mat_price_id" jdbcType="VARCHAR" property="matPriceId" />
+        <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
+        <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
+        <result column="CREATE_USERNAME" jdbcType="VARCHAR" property="createUsername" />
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+    id,k_mat_id,k_mat_name,drug_id,mat_price_id,CREATE_DATE,CREATE_USER,CREATE_USERNAME
+    </sql>
+
+    <delete id="deleteByPrimaryKey" parameterType="TAppMaterialMapping">
+        delete from t_app_material_mapping where id = #{ id }
+    </delete>
+
+    <delete id="deleteBylist" parameterType="ArrayList">
+        delete from t_app_material_mapping where id in
+        <foreach collection="array" item="item" open="(" separator="," close=")">
+        #{item}
+        </foreach>
+    </delete>
+
+    <insert id="insert"  parameterType="TAppMaterialMapping">
+        insert into t_app_material_mapping (<include refid="Base_Column_List" />) values
+        (#{id},#{kMatId},#{kMatName},#{drugId},#{matPriceId},#{createDate},#{createUser},#{createUsername})
+    </insert>
+
+    <insert id="insertList" parameterType="List">
+        insert into t_app_material_mapping (<include refid="Base_Column_List" />) values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (#{item.id},#{item.kMatId},#{item.kMatName},#{item.drugId},#{item.matPriceId},#{item.createDate},#{item.createUser},#{item.createUsername})
+        </foreach>
+    </insert>
+
+    <update id="updateByPrimaryKey" parameterType="TAppMaterialMapping">
+        update t_app_material_mapping
+        <set>
+             <if test="kMatId != null">
+                k_mat_id = #{ kMatId },
+             </if>
+             <if test="kMatName != null">
+                k_mat_name = #{ kMatName },
+             </if>
+             <if test="drugId != null">
+                drug_id = #{ drugId },
+             </if>
+             <if test="matPriceId != null">
+                mat_price_id = #{ matPriceId },
+             </if>
+             <if test="createDate != null">
+                CREATE_DATE = #{ createDate },
+             </if>
+             <if test="createUser != null">
+                CREATE_USER = #{ createUser },
+             </if>
+             <if test="createUsername != null">
+                CREATE_USERNAME = #{ createUsername },
+             </if>
+        </set>
+        where id = #{ id }
+    </update>
+
+    <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
+        select <include refid="Base_Column_List" />
+        from t_app_material_mapping where id = #{id}
+    </select>
+
+    <select id="getPageListByObj" parameterType="TAppMaterialMapping" resultMap="BaseResultMap">
+        SELECT id,k_mat_id,k_mat_name,drug_id,mat_price_id,CREATE_DATE,CREATE_USER,CREATE_USERNAME
+        from t_app_material_mapping
+        <where>
+            <if test=" name != null and name!='' ">
+                and name like CONCAT('%',trim(#{name}),'%')
+            </if>
+        </where>
+    </select>
+
+</mapper>

+ 95 - 0
cbkj_web_parameter/src/main/resources/mappers/drug/TCenterHisMappingMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jiuzhekan.cbkj.mapper.drug.TCenterHisMappingMapper">
+
+    <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.drug.TCenterHisMapping">
+        <id column="id" jdbcType="VARCHAR"  property="id" />
+        <result column="drug_id" jdbcType="VARCHAR" property="drugId" />
+        <result column="mat_price_id" jdbcType="VARCHAR" property="matPriceId" />
+        <result column="drug_id_his" jdbcType="VARCHAR" property="drugIdHis" />
+        <result column="mat_price_id_his" jdbcType="VARCHAR" property="matPriceIdHis" />
+        <result column="TYPE" jdbcType="TINYINT" property="type" />
+        <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
+        <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
+        <result column="CREATE_USERNAME" jdbcType="VARCHAR" property="createUsername" />
+        <result column="status" jdbcType="VARCHAR" property="status" />
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+    id,drug_id,mat_price_id,drug_id_his,mat_price_id_his,TYPE,CREATE_DATE,CREATE_USER,CREATE_USERNAME,status
+    </sql>
+
+    <delete id="deleteByPrimaryKey" parameterType="TCenterHisMapping">
+        delete from t_center_his_mapping where id = #{ id }
+    </delete>
+
+    <delete id="deleteBylist" parameterType="ArrayList">
+        delete from t_center_his_mapping where id in
+        <foreach collection="array" item="item" open="(" separator="," close=")">
+        #{item}
+        </foreach>
+    </delete>
+
+    <insert id="insert"  parameterType="TCenterHisMapping">
+        insert into t_center_his_mapping (<include refid="Base_Column_List" />) values
+        (#{id},#{drugId},#{matPriceId},#{drugIdHis},#{matPriceIdHis},#{type},#{createDate},#{createUser},#{createUsername},#{status})
+    </insert>
+
+    <insert id="insertList" parameterType="List">
+        insert into t_center_his_mapping (<include refid="Base_Column_List" />) values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (#{item.id},#{item.drugId},#{item.matPriceId},#{item.drugIdHis},#{item.matPriceIdHis},#{item.type},#{item.createDate},#{item.createUser},#{item.createUsername},#{item.status})
+        </foreach>
+    </insert>
+
+    <update id="updateByPrimaryKey" parameterType="TCenterHisMapping">
+        update t_center_his_mapping
+        <set>
+             <if test="drugId != null">
+                drug_id = #{ drugId },
+             </if>
+             <if test="matPriceId != null">
+                mat_price_id = #{ matPriceId },
+             </if>
+             <if test="drugIdHis != null">
+                drug_id_his = #{ drugIdHis },
+             </if>
+             <if test="matPriceIdHis != null">
+                mat_price_id_his = #{ matPriceIdHis },
+             </if>
+             <if test="type != null">
+                TYPE = #{ type },
+             </if>
+             <if test="createDate != null">
+                CREATE_DATE = #{ createDate },
+             </if>
+             <if test="createUser != null">
+                CREATE_USER = #{ createUser },
+             </if>
+             <if test="createUsername != null">
+                CREATE_USERNAME = #{ createUsername },
+             </if>
+             <if test="status != null">
+                status = #{ status },
+             </if>
+        </set>
+        where id = #{ id }
+    </update>
+
+    <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
+        select <include refid="Base_Column_List" />
+        from t_center_his_mapping where id = #{id}
+    </select>
+
+    <select id="getPageListByObj" parameterType="TCenterHisMapping" resultMap="BaseResultMap">
+        SELECT id,drug_id,mat_price_id,drug_id_his,mat_price_id_his,TYPE,CREATE_DATE,CREATE_USER,CREATE_USERNAME,status
+        from t_center_his_mapping
+        <where>
+            <if test=" name != null and name!='' ">
+                and name like CONCAT('%',trim(#{name}),'%')
+            </if>
+        </where>
+    </select>
+
+</mapper>

+ 99 - 0
cbkj_web_parameter/src/main/resources/mappers/drug/TDrugListMapper.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jiuzhekan.cbkj.mapper.drug.TDrugListMapper">
+
+    <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.drug.TDrugList">
+        <id column="drug_id" jdbcType="VARCHAR"  property="drugId" />
+        <result column="drug_name" jdbcType="VARCHAR" property="drugName" />
+        <result column="drug_desc" jdbcType="VARCHAR" property="drugDesc" />
+        <result column="drug_type" jdbcType="VARCHAR" property="drugType" />
+        <result column="drug_version" jdbcType="VARCHAR" property="drugVersion" />
+        <result column="drug_syntime" jdbcType="TIMESTAMP" property="drugSyntime" />
+        <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
+        <result column="create_user" jdbcType="VARCHAR" property="createUser" />
+        <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
+        <result column="status" jdbcType="VARCHAR" property="status" />
+        <result column="sync_source" jdbcType="VARCHAR" property="syncSource" />
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+    drug_id,drug_name,drug_desc,drug_type,drug_version,drug_syntime,create_date,create_user,create_user_name,status,sync_source
+    </sql>
+
+    <delete id="deleteByPrimaryKey" parameterType="TDrugList">
+        delete from t_drug_list where drug_id = #{ drugId }
+    </delete>
+
+    <delete id="deleteBylist" parameterType="ArrayList">
+        delete from t_drug_list where drug_id in
+        <foreach collection="array" item="item" open="(" separator="," close=")">
+        #{item}
+        </foreach>
+    </delete>
+
+    <insert id="insert"  parameterType="TDrugList">
+        insert into t_drug_list (<include refid="Base_Column_List" />) values
+        (#{drugId},#{drugName},#{drugDesc},#{drugType},#{drugVersion},#{drugSyntime},#{createDate},#{createUser},#{createUserName},#{status},#{syncSource})
+    </insert>
+
+    <insert id="insertList" parameterType="List">
+        insert into t_drug_list (<include refid="Base_Column_List" />) values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (#{item.drugId},#{item.drugName},#{item.drugDesc},#{item.drugType},#{item.drugVersion},#{item.drugSyntime},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.status},#{item.syncSource})
+        </foreach>
+    </insert>
+
+    <update id="updateByPrimaryKey" parameterType="TDrugList">
+        update t_drug_list
+        <set>
+             <if test="drugName != null">
+                drug_name = #{ drugName },
+             </if>
+             <if test="drugDesc != null">
+                drug_desc = #{ drugDesc },
+             </if>
+             <if test="drugType != null">
+                drug_type = #{ drugType },
+             </if>
+             <if test="drugVersion != null">
+                drug_version = #{ drugVersion },
+             </if>
+             <if test="drugSyntime != null">
+                drug_syntime = #{ drugSyntime },
+             </if>
+             <if test="createDate != null">
+                create_date = #{ createDate },
+             </if>
+             <if test="createUser != null">
+                create_user = #{ createUser },
+             </if>
+             <if test="createUserName != null">
+                create_user_name = #{ createUserName },
+             </if>
+             <if test="status != null">
+                status = #{ status },
+             </if>
+             <if test="syncSource != null">
+                sync_source = #{ syncSource },
+             </if>
+        </set>
+        where drug_id = #{ drugId }
+    </update>
+
+    <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
+        select <include refid="Base_Column_List" />
+        from t_drug_list where drug_id = #{id}
+    </select>
+
+    <select id="getPageListByObj" parameterType="TDrugList" resultMap="BaseResultMap">
+        SELECT drug_id,drug_name,drug_desc,drug_type,drug_version,drug_syntime,create_date,create_user,create_user_name,status,sync_source
+        from t_drug_list
+        <where>
+            <if test=" name != null and name!='' ">
+                and name like CONCAT('%',trim(#{name}),'%')
+            </if>
+        </where>
+    </select>
+
+</mapper>

+ 171 - 0
cbkj_web_parameter/src/main/resources/mappers/drug/TMaterialMapper.xml

@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jiuzhekan.cbkj.mapper.drug.TMaterialMapper">
+
+    <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.drug.TMaterial">
+        <id column="mat_id" jdbcType="VARCHAR"  property="matId" />
+        <result column="drug_id" jdbcType="VARCHAR" property="drugId" />
+        <result column="mat_name" jdbcType="VARCHAR" property="matName" />
+        <result column="mat_class" jdbcType="VARCHAR" property="matClass" />
+        <result column="mat_standard" jdbcType="VARCHAR" property="matStandard" />
+        <result column="mat_medical_code" jdbcType="VARCHAR" property="matMedicalCode" />
+        <result column="toxin_type" jdbcType="VARCHAR" property="toxinType" />
+        <result column="worth_type" jdbcType="VARCHAR" property="worthType" />
+        <result column="is_medical" jdbcType="VARCHAR" property="isMedical" />
+        <result column="mat_pinyin" jdbcType="VARCHAR" property="matPinyin" />
+        <result column="mat_wubi" jdbcType="VARCHAR" property="matWubi" />
+        <result column="is_stock" jdbcType="VARCHAR" property="isStock" />
+        <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
+        <result column="create_user" jdbcType="VARCHAR" property="createUser" />
+        <result column="create_username" jdbcType="VARCHAR" property="createUsername" />
+        <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
+        <result column="update_username" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="update_user" jdbcType="VARCHAR" property="updateUser" />
+        <result column="del_date" jdbcType="DATE" property="delDate" />
+        <result column="del_user" jdbcType="VARCHAR" property="delUser" />
+        <result column="del_username" jdbcType="VARCHAR" property="delUsername" />
+        <result column="is_del" jdbcType="VARCHAR" property="isDel" />
+        <result column="medicontrol_text" jdbcType="VARCHAR" property="medicontrolText" />
+        <result column="mat_usage" jdbcType="VARCHAR" property="matUsage" />
+        <result column="usage_desc" jdbcType="VARCHAR" property="usageDesc" />
+        <result column="content" jdbcType="VARCHAR" property="content" />
+        <result column="mat_usage_code" jdbcType="VARCHAR" property="matUsageCode" />
+        <result column="effect" jdbcType="VARCHAR" property="effect" />
+        <result column="status" jdbcType="VARCHAR" property="status" />
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+    mat_id,drug_id,mat_name,mat_class,mat_standard,mat_medical_code,toxin_type,worth_type,is_medical,mat_pinyin,mat_wubi,is_stock,create_date,create_user,create_username,update_date,update_username,update_user,del_date,del_user,del_username,is_del,medicontrol_text,mat_usage,usage_desc,content,mat_usage_code,effect,status
+    </sql>
+
+    <delete id="deleteByPrimaryKey" parameterType="TMaterial">
+        delete from t_material where mat_id = #{ matId }
+    </delete>
+
+    <delete id="deleteBylist" parameterType="ArrayList">
+        delete from t_material where mat_id in
+        <foreach collection="array" item="item" open="(" separator="," close=")">
+        #{item}
+        </foreach>
+    </delete>
+
+    <insert id="insert"  parameterType="TMaterial">
+        insert into t_material (<include refid="Base_Column_List" />) values
+        (#{matId},#{drugId},#{matName},#{matClass},#{matStandard},#{matMedicalCode},#{toxinType},#{worthType},#{isMedical},#{matPinyin},#{matWubi},#{isStock},#{createDate},#{createUser},#{createUsername},#{updateDate},#{updateUsername},#{updateUser},#{delDate},#{delUser},#{delUsername},#{isDel},#{medicontrolText},#{matUsage},#{usageDesc},#{content},#{matUsageCode},#{effect},#{status})
+    </insert>
+
+    <insert id="insertList" parameterType="List">
+        insert into t_material (<include refid="Base_Column_List" />) values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (#{item.matId},#{item.drugId},#{item.matName},#{item.matClass},#{item.matStandard},#{item.matMedicalCode},#{item.toxinType},#{item.worthType},#{item.isMedical},#{item.matPinyin},#{item.matWubi},#{item.isStock},#{item.createDate},#{item.createUser},#{item.createUsername},#{item.updateDate},#{item.updateUsername},#{item.updateUser},#{item.delDate},#{item.delUser},#{item.delUsername},#{item.isDel},#{item.medicontrolText},#{item.matUsage},#{item.usageDesc},#{item.content},#{item.matUsageCode},#{item.effect},#{item.status})
+        </foreach>
+    </insert>
+
+    <update id="updateByPrimaryKey" parameterType="TMaterial">
+        update t_material
+        <set>
+             <if test="drugId != null">
+                drug_id = #{ drugId },
+             </if>
+             <if test="matName != null">
+                mat_name = #{ matName },
+             </if>
+             <if test="matClass != null">
+                mat_class = #{ matClass },
+             </if>
+             <if test="matStandard != null">
+                mat_standard = #{ matStandard },
+             </if>
+             <if test="matMedicalCode != null">
+                mat_medical_code = #{ matMedicalCode },
+             </if>
+             <if test="toxinType != null">
+                toxin_type = #{ toxinType },
+             </if>
+             <if test="worthType != null">
+                worth_type = #{ worthType },
+             </if>
+             <if test="isMedical != null">
+                is_medical = #{ isMedical },
+             </if>
+             <if test="matPinyin != null">
+                mat_pinyin = #{ matPinyin },
+             </if>
+             <if test="matWubi != null">
+                mat_wubi = #{ matWubi },
+             </if>
+             <if test="isStock != null">
+                is_stock = #{ isStock },
+             </if>
+             <if test="createDate != null">
+                create_date = #{ createDate },
+             </if>
+             <if test="createUser != null">
+                create_user = #{ createUser },
+             </if>
+             <if test="createUsername != null">
+                create_username = #{ createUsername },
+             </if>
+             <if test="updateDate != null">
+                update_date = #{ updateDate },
+             </if>
+             <if test="updateUsername != null">
+                update_username = #{ updateUsername },
+             </if>
+             <if test="updateUser != null">
+                update_user = #{ updateUser },
+             </if>
+             <if test="delDate != null">
+                del_date = #{ delDate },
+             </if>
+             <if test="delUser != null">
+                del_user = #{ delUser },
+             </if>
+             <if test="delUsername != null">
+                del_username = #{ delUsername },
+             </if>
+             <if test="isDel != null">
+                is_del = #{ isDel },
+             </if>
+             <if test="medicontrolText != null">
+                medicontrol_text = #{ medicontrolText },
+             </if>
+             <if test="matUsage != null">
+                mat_usage = #{ matUsage },
+             </if>
+             <if test="usageDesc != null">
+                usage_desc = #{ usageDesc },
+             </if>
+             <if test="content != null">
+                content = #{ content },
+             </if>
+             <if test="matUsageCode != null">
+                mat_usage_code = #{ matUsageCode },
+             </if>
+             <if test="effect != null">
+                effect = #{ effect },
+             </if>
+             <if test="status != null">
+                status = #{ status },
+             </if>
+        </set>
+        where mat_id = #{ matId }
+    </update>
+
+    <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
+        select <include refid="Base_Column_List" />
+        from t_material where mat_id = #{id}
+    </select>
+
+    <select id="getPageListByObj" parameterType="TMaterial" resultMap="BaseResultMap">
+        SELECT mat_id,drug_id,mat_name,mat_class,mat_standard,mat_medical_code,toxin_type,worth_type,is_medical,mat_pinyin,mat_wubi,is_stock,create_date,create_user,create_username,update_date,update_username,update_user,del_date,del_user,del_username,is_del,medicontrol_text,mat_usage,usage_desc,content,mat_usage_code,effect,status
+        from t_material
+        <where>
+            <if test=" name != null and name!='' ">
+                and name like CONCAT('%',trim(#{name}),'%')
+            </if>
+        </where>
+    </select>
+
+</mapper>