|
|
@@ -30,6 +30,7 @@
|
|
|
<result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
|
|
|
<result column="founder" property="founder" jdbcType="VARCHAR" />
|
|
|
<result column="contract_id" property="contractId" jdbcType="VARCHAR" />
|
|
|
+ <result column="principal" property="principal" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, uid, serial_number, contacts, department, dispatch_info,
|
|
|
@@ -37,7 +38,7 @@
|
|
|
tech_field, project_des, project_mode, project_approval, subsidy, consultant,
|
|
|
approval_url,
|
|
|
state, create_time, accept_date, approved_date, record_time, deleted_sign,
|
|
|
- founder, contract_id
|
|
|
+ founder, contract_id, principal
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
parameterType="java.lang.String">
|
|
|
@@ -57,7 +58,7 @@
|
|
|
project_des, project_mode, project_approval,
|
|
|
subsidy, consultant, approval_url,
|
|
|
state, create_time, accept_date,
|
|
|
- approved_date, record_time, deleted_sign, founder, contract_id
|
|
|
+ approved_date, record_time, deleted_sign, founder, contract_id, principal
|
|
|
)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
|
|
|
#{serialNumber,jdbcType=INTEGER},
|
|
|
@@ -69,7 +70,8 @@
|
|
|
#{approvalUrl,jdbcType=VARCHAR},
|
|
|
#{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{acceptDate,jdbcType=TIMESTAMP},
|
|
|
#{approvedDate,jdbcType=TIMESTAMP}, #{recordTime,jdbcType=TIMESTAMP},
|
|
|
- #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}
|
|
|
+ #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR},
|
|
|
+ #{principal,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TechProject">
|
|
|
@@ -144,6 +146,9 @@
|
|
|
<if test="contractId != null">
|
|
|
contract_id,
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ principal,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -215,6 +220,9 @@
|
|
|
<if test="contractId != null">
|
|
|
#{contractId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ #{principal,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TechProject">
|
|
|
@@ -286,6 +294,9 @@
|
|
|
<if test="contractId != null">
|
|
|
contract_id = #{contractId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ principal = #{principal,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -312,7 +323,8 @@
|
|
|
record_time = #{recordTime,jdbcType=TIMESTAMP},
|
|
|
deleted_sign = #{deletedSign,jdbcType=INTEGER},
|
|
|
founder = #{founder,jdbcType=VARCHAR},
|
|
|
- contract_id = #{contractId,jdbcType=VARCHAR}
|
|
|
+ contract_id = #{contractId,jdbcType=VARCHAR},
|
|
|
+ principal = #{principal,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -478,4 +490,14 @@
|
|
|
group by tp.id
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="listContractTechProjectByContractId" parameterType="java.lang.String" resultType="com.goafanti.techproject.bo.TechProjectContractListBo">
|
|
|
+ select
|
|
|
+ tp.id, tp.uid, tp.contract_id as contractId,
|
|
|
+ tp.project_name, tp.project_catagory, tp.state,
|
|
|
+ tp.tech_field as techField, a.name as principle
|
|
|
+ from tech_project tp
|
|
|
+ left join admin a on a.id = tp.principal
|
|
|
+ where tp.contract_id = #{contractId,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
</mapper>
|