190 lines
12 KiB
XML
190 lines
12 KiB
XML
<?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.ruoyi.sip.mapper.ProjectInfoMapper">
|
|
|
|
<resultMap type="ProjectInfo" id="ProjectInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="projectCode" column="project_code" />
|
|
<result property="projectName" column="project_name" />
|
|
<result property="customerCode" column="customer_code" />
|
|
<result property="customerName" column="customer_name" />
|
|
<result property="industryType" column="industry_type" />
|
|
<result property="province" column="province" />
|
|
<result property="projectStage" column="project_stage" />
|
|
<result property="projectGraspDegree" column="project_grasp_degree" />
|
|
<result property="hzSupportUser" column="hz_support_user" />
|
|
<result property="operateInstitution" column="operate_institution" />
|
|
<result property="partnerCode" column="partner_code" />
|
|
<result property="contactWay" column="contact_way" />
|
|
<result property="estimatedAmount" column="estimated_amount" />
|
|
<result property="currencyType" column="currency_type" />
|
|
<result property="estimatedOrderTime" column="estimated_order_time" />
|
|
<result property="estimatedDeliverTime" column="estimated_deliver_time" />
|
|
<result property="competitor" column="competitor" />
|
|
<result property="countryProduct" column="country_product" />
|
|
<result property="serverConfiguration" column="server_configuration" />
|
|
<result property="keyProblem" column="key_problem" />
|
|
<result property="projectDesc" column="project_desc" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectProjectInfoVo">
|
|
select id, project_code, project_name, customer_code, customer_name, industry_type, province, project_stage, project_grasp_degree, hz_support_user, operate_institution
|
|
, partner_code, partner_name, contact_way, estimated_amount, currency_type, estimated_order_time, estimated_deliver_time, competitor, country_product, server_configuration
|
|
, key_problem, project_desc, create_by, create_time, update_by, update_time from project_info
|
|
</sql>
|
|
|
|
<select id="selectProjectInfoList" parameterType="ProjectInfo" resultMap="ProjectInfoResult">
|
|
<include refid="selectProjectInfoVo"/>
|
|
<where>
|
|
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode}</if>
|
|
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
|
<if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
|
|
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
<if test="industryType != null and industryType != ''"> and industry_type = #{industryType}</if>
|
|
<if test="province != null and province != ''"> and province = #{province}</if>
|
|
<if test="projectStage != null and projectStage != ''"> and project_stage = #{projectStage}</if>
|
|
<if test="projectGraspDegree != null and projectGraspDegree != ''"> and project_grasp_degree = #{projectGraspDegree}</if>
|
|
<if test="hzSupportUser != null and hzSupportUser != ''"> and hz_support_user = #{hzSupportUser}</if>
|
|
<if test="operateInstitution != null and operateInstitution != ''"> and operate_institution = #{operateInstitution}</if>
|
|
<if test="partnerCode != null and partnerCode != ''"> and partner_code = #{partnerCode}</if>
|
|
<if test="partnerName != null and partnerName != ''"> and partner_name = #{partnerName}</if>
|
|
<if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if>
|
|
<if test="estimatedAmount != null "> and estimated_amount = #{estimatedAmount}</if>
|
|
<if test="currencyType != null and currencyType != ''"> and currency_type = #{currencyType}</if>
|
|
<if test="estimatedOrderTime != null "> and estimated_order_time = #{estimatedOrderTime}</if>
|
|
<if test="estimatedDeliverTime != null "> and estimated_deliver_time = #{estimatedDeliverTime}</if>
|
|
<if test="competitor != null and competitor != ''"> and competitor = #{competitor}</if>
|
|
<if test="countryProduct != null and countryProduct != ''"> and country_product = #{countryProduct}</if>
|
|
<if test="serverConfiguration != null and serverConfiguration != ''"> and server_configuration = #{serverConfiguration}</if>
|
|
<if test="keyProblem != null and keyProblem != ''"> and key_problem = #{keyProblem}</if>
|
|
<if test="projectDesc != null and projectDesc != ''"> and project_desc = #{projectDesc}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectProjectInfoById" parameterType="Long" resultMap="ProjectInfoResult">
|
|
<include refid="selectProjectInfoVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
<select id="selectMaxProjectCode" resultType="java.lang.String">
|
|
select project_code from project_info
|
|
where province=#{province}
|
|
order by project_code desc limit 1
|
|
</select>
|
|
<select id="selectUserById" resultType="com.ruoyi.common.core.domain.entity.SysUser">
|
|
select * from sys_user
|
|
where id in <foreach collection="list" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</select>
|
|
|
|
<insert id="insertProjectInfo" parameterType="ProjectInfo" useGeneratedKeys="true" keyProperty="id">
|
|
insert into project_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="projectCode != null">project_code,</if>
|
|
<if test="projectName != null">project_name,</if>
|
|
<if test="customerCode != null">customer_code,</if>
|
|
<if test="customerName != null">customer_name,</if>
|
|
<if test="industryType != null">industry_type,</if>
|
|
<if test="province != null">province,</if>
|
|
<if test="projectStage != null">project_stage,</if>
|
|
<if test="projectGraspDegree != null">project_grasp_degree,</if>
|
|
<if test="hzSupportUser != null">hz_support_user,</if>
|
|
<if test="operateInstitution != null">operate_institution,</if>
|
|
<if test="partnerCode != null">partner_code,</if>
|
|
<if test="partnerName != null">partner_name,</if>
|
|
<if test="contactWay != null">contact_way,</if>
|
|
<if test="estimatedAmount != null">estimated_amount,</if>
|
|
<if test="currencyType != null">currency_type,</if>
|
|
<if test="estimatedOrderTime != null">estimated_order_time,</if>
|
|
<if test="estimatedDeliverTime != null">estimated_deliver_time,</if>
|
|
<if test="competitor != null">competitor,</if>
|
|
<if test="countryProduct != null">country_product,</if>
|
|
<if test="serverConfiguration != null">server_configuration,</if>
|
|
<if test="keyProblem != null">key_problem,</if>
|
|
<if test="projectDesc != null">project_desc,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="projectCode != null">#{projectCode},</if>
|
|
<if test="projectName != null">#{projectName},</if>
|
|
<if test="customerCode != null">#{customerCode},</if>
|
|
<if test="customerName != null">#{customerName},</if>
|
|
<if test="industryType != null">#{industryType},</if>
|
|
<if test="province != null">#{province},</if>
|
|
<if test="projectStage != null">#{projectStage},</if>
|
|
<if test="projectGraspDegree != null">#{projectGraspDegree},</if>
|
|
<if test="hzSupportUser != null">#{hzSupportUser},</if>
|
|
<if test="operateInstitution != null">#{operateInstitution},</if>
|
|
<if test="partnerCode != null">#{partnerCode},</if>
|
|
<if test="partnerName != null">#{partnerName},</if>
|
|
<if test="contactWay != null">#{contactWay},</if>
|
|
<if test="estimatedAmount != null">#{estimatedAmount},</if>
|
|
<if test="currencyType != null">#{currencyType},</if>
|
|
<if test="estimatedOrderTime != null">#{estimatedOrderTime},</if>
|
|
<if test="estimatedDeliverTime != null">#{estimatedDeliverTime},</if>
|
|
<if test="competitor != null">#{competitor},</if>
|
|
<if test="countryProduct != null">#{countryProduct},</if>
|
|
<if test="serverConfiguration != null">#{serverConfiguration},</if>
|
|
<if test="keyProblem != null">#{keyProblem},</if>
|
|
<if test="projectDesc != null">#{projectDesc},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateProjectInfo" parameterType="ProjectInfo">
|
|
update project_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="projectCode != null">project_code = #{projectCode},</if>
|
|
<if test="projectName != null">project_name = #{projectName},</if>
|
|
<if test="customerCode != null">customer_code = #{customerCode},</if>
|
|
<if test="customerName != null">customer_name = #{customerName},</if>
|
|
<if test="industryType != null">industry_type = #{industryType},</if>
|
|
<if test="province != null">province = #{province},</if>
|
|
<if test="projectStage != null">project_stage = #{projectStage},</if>
|
|
<if test="projectGraspDegree != null">project_grasp_degree = #{projectGraspDegree},</if>
|
|
<if test="hzSupportUser != null">hz_support_user = #{hzSupportUser},</if>
|
|
<if test="operateInstitution != null">operate_institution = #{operateInstitution},</if>
|
|
partner_code = #{partnerCode},
|
|
<if test="partnerName != null">partner_name = #{partnerName},</if>
|
|
<if test="contactWay != null">contact_way = #{contactWay},</if>
|
|
<if test="estimatedAmount != null">estimated_amount = #{estimatedAmount},</if>
|
|
<if test="currencyType != null">currency_type = #{currencyType},</if>
|
|
<if test="estimatedOrderTime != null">estimated_order_time = #{estimatedOrderTime},</if>
|
|
<if test="estimatedDeliverTime != null">estimated_deliver_time = #{estimatedDeliverTime},</if>
|
|
<if test="competitor != null">competitor = #{competitor},</if>
|
|
<if test="countryProduct != null">country_product = #{countryProduct},</if>
|
|
<if test="serverConfiguration != null">server_configuration = #{serverConfiguration},</if>
|
|
<if test="keyProblem != null">key_problem = #{keyProblem},</if>
|
|
<if test="projectDesc != null">project_desc = #{projectDesc},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteProjectInfoById" parameterType="Long">
|
|
delete from project_info where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteProjectInfoByIds" parameterType="String">
|
|
delete from project_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |