123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <?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.sooka.mapper.Guiji_Medicine_Mapper2">
- <sql id="global_name">
- id,create_time,cd_time,cd_batch,cd_operation,cd_source,
- </sql>
- <sql id="global_value">
- #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
- </sql>
- <sql id="update_sql">
- create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
- </sql>
- <insert id="add_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
- insert into t_guiji_medicine_plant (
- <include refid="global_name"></include>
- plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear)
- values (
- <include refid="global_value"></include>
- #{plantName}, #{plantAddress}, #{plantHectare}, #{produceTons}, #{produceValue}, #{plantYear})
- </insert>
- <update id="update_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
- update t_guiji_medicine_plant
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="plantName != null and plantName != ''">
- plantName = #{plantName},
- </if>
- <if test="plantAddress != null and plantAddress != ''">
- plantAddress = #{plantAddress},
- </if>
- <if test="plantHectare != null and plantHectare != ''">
- plantHectare = #{plantHectare},
- </if>
- <if test="produceTons != null and produceTons != ''">
- produceTons = #{produceTons},
- </if>
- <if test="produceValue != null and produceValue != ''">
- produceValue = #{produceValue},
- </if>
- <if test="plantYear != null and plantYear != ''">
- plantYear = #{plantYear},
- </if>
- </trim>
- where id = #{id}
- </update>
- <insert id="add_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
- insert into t_guiji_medicine_platform (
- <include refid="global_name"></include>
- platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType)
- values (
- <include refid="global_value"></include>
- #{platformName}, #{constructingUnit}, #{constructingDate}, #{platformAddress}, #{platformAddressExt}, #{platformLevel}, #{platformType})
- </insert>
- <update id="update_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
- update t_guiji_medicine_platform
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="platformName != null and platformName != ''">
- platformName = #{platformName},
- </if>
- <if test="constructingUnit != null and constructingUnit != ''">
- constructingUnit = #{constructingUnit},
- </if>
- <if test="constructingDate != null and constructingDate != ''">
- constructingDate = #{constructingDate},
- </if>
- <if test="platformAddress != null and platformAddress != ''">
- platformAddress = #{platformAddress},
- </if>
- <if test="platformAddressExt != null and platformAddressExt != ''">
- platformAddressExt = #{platformAddressExt},
- </if>
- <if test="platformLevel != null and platformLevel != ''">
- platformLevel = #{platformLevel},
- </if>
- <if test="platformType != null and platformType != ''">
- platformType = #{platformType},
- </if>
- </trim>
- where id = #{id}
- </update>
- <insert id="add_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
- insert into t_guiji_medicine_project (
- <include refid="global_name"></include>
- projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd)
- values (
- <include refid="global_value"></include>
- #{projectName}, #{projectOrgName}, #{projectAddress}, #{projectStatus}, #{projectTotalInvestment}, #{projectStart}, #{projectEnd})
- </insert>
- <update id="update_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
- update t_guiji_medicine_project
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="projectName != null and projectName != ''">
- projectName = #{projectName},
- </if>
- <if test="projectOrgName != null and projectOrgName != ''">
- projectOrgName = #{projectOrgName},
- </if>
- <if test="projectAddress != null and projectAddress != ''">
- projectAddress = #{projectAddress},
- </if>
- <if test="projectStatus != null and projectStatus != ''">
- projectStatus = #{projectStatus},
- </if>
- <if test="projectTotalInvestment != null and projectTotalInvestment != ''">
- projectTotalInvestment = #{projectTotalInvestment},
- </if>
- <if test="projectStart != null and projectStart != ''">
- projectStart = #{projectStart},
- </if>
- <if test="projectEnd != null and projectEnd != ''">
- projectEnd = #{projectEnd},
- </if>
- </trim>
- where id = #{id}
- </update>
- <insert id="add_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
- insert into t_guiji_medicine_industry (
- <include refid="global_name"></include>
- year, month, economyType, number, yearOnYear, cityProportion)
- values (
- <include refid="global_value"></include>
- #{year}, #{month}, #{economyType}, #{number}, #{yearOnYear}, #{cityProportion})
- </insert>
- <update id="update_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
- update t_guiji_medicine_industry
- <trim prefix="SET" suffixOverrides=",">
- <include refid="update_sql"></include>
- <if test="year != null and year != ''">
- year = #{year},
- </if>
- <if test="month != null and month != ''">
- month = #{month},
- </if>
- <if test="economyType != null and economyType != ''">
- economyType = #{economyType},
- </if>
- <if test="number != null and number != ''">
- number = #{number},
- </if>
- <if test="yearOnYear != null and yearOnYear != ''">
- yearOnYear = #{yearOnYear},
- </if>
- <if test="cityProportion != null and cityProportion != ''">
- cityProportion = #{cityProportion},
- </if>
- </trim>
- where id = #{id}
- </update>
- <select id="select_1" resultType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
- select id, create_time, cd_time, cd_batch, cd_operation, cd_source, plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear from t_guiji_medicine_plant
- where 1=1
- <if test="plantName != null and plantName != ''">
- and plantName = #{plantName}
- </if>
- </select>
- <select id="select_2" resultType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
- select id, create_time, cd_time, cd_batch, cd_operation, cd_source, platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType from t_guiji_medicine_platform
- where 1=1
- <if test="platformName != null and platformName != ''">
- and platformName = #{platformName}
- </if>
- </select>
- <select id="select_3" resultType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
- select id, create_time, cd_time, cd_batch, cd_operation, cd_source, projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd from t_guiji_medicine_project
- where 1=1
- <if test="projectName != null and projectName != ''">
- and projectName = #{projectName}
- </if>
- </select>
- <select id="select_4" resultType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
- select id, create_time, cd_time, cd_batch, cd_operation, cd_source, year, month, economyType, number, yearOnYear, cityProportion from t_guiji_medicine_industry
- where 1=1
- <if test="year != null and year != ''">
- and year = #{year}
- </if>
- </select>
- </mapper>
|