Просмотр исходного кода

Mapper & Model update (专利、软著、科技项目、高企认定新增合同ID)

Antiloveg лет назад: 8
Родитель
Сommit
5c5694ba1a

+ 11 - 0
schema/2017-05-10.sql

@@ -0,0 +1,11 @@
+alter table `patent_info` 
+add column `contract_id` VARCHAR(36) null comment '合同ID' after `uid`; 
+
+alter table `copyright_info` 
+add column `contract_id` VARCHAR(36) null comment '合同ID' after `uid`; 
+
+alter table `org_cognizance` 
+add column `contract_id` VARCHAR(36) null comment '合同ID' after `uid`; 
+
+alter table `tech_project` 
+add column `contract_id` VARCHAR(36) null comment '合同ID' after `uid`; 

+ 16 - 4
src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml

@@ -22,11 +22,12 @@
     <result column="application_url" jdbcType="VARCHAR" property="applicationUrl" />
     <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
     <result column="founder" jdbcType="VARCHAR" property="founder" />
+    <result column="contract_id" jdbcType="VARCHAR" property="contractId" />
   </resultMap>
   <sql id="Base_Column_List">
     id, uid, serial_number, create_time, accept_time, principal, contact, copyright_info, 
     copyright_name, status, work_issue, comment, outsource, in_urgent, authorized_date, 
-    certificate_url, application_url, delete_sign, copyright_number, founder
+    certificate_url, application_url, delete_sign, copyright_number, founder, contract_id
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
@@ -44,7 +45,7 @@
       contact, copyright_info, copyright_name, 
       status, work_issue, comment, 
       outsource, in_urgent, authorized_date, 
-      certificate_url, copyright_number, application_url, delete_sign, founder
+      certificate_url, copyright_number, application_url, delete_sign, founder, contract_id
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, #{principal,jdbcType=VARCHAR}, 
@@ -53,7 +54,8 @@
       #{outsource,jdbcType=VARCHAR}, #{inUrgent,jdbcType=INTEGER}, #{authorizedDate,jdbcType=TIMESTAMP}, 
       #{certificateUrl,jdbcType=VARCHAR}, 
       #{copyrightNumber,jdbcType=VARCHAR}, 
-      #{applicationUrl,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}
+      #{applicationUrl,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
+      #{contractId,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.CopyrightInfo">
@@ -119,6 +121,9 @@
       <if test="founder != null">
         founder,
       </if>
+       <if test="contractId != null">
+        contract_id,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -181,6 +186,9 @@
       <if test="founder != null">
         #{founder,jdbcType=VARCHAR},
       </if>
+      <if test="contractId != null">
+        #{contractId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CopyrightInfo">
@@ -243,6 +251,9 @@
       <if test="founder != null">
         founder = #{founder,jdbcType=VARCHAR},
       </if>
+       <if test="contractId != null">
+        contract_id = #{contractId,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -266,7 +277,8 @@
       copyright_number = #{copyrightNumber,jdbcType=VARCHAR},
       application_url = #{applicationUrl,jdbcType=VARCHAR},
       delete_sign = #{deleteSign,jdbcType=INTEGER},
-      founder = #{founder,jdbcType=VARCHAR}
+      founder = #{founder,jdbcType=VARCHAR},
+      contract_id = #{contractId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   

+ 15 - 4
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -25,12 +25,13 @@
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
     <result column="founder" property="founder" jdbcType="VARCHAR" />
     <result column="tech_principal" property="techPrincipal" jdbcType="VARCHAR" />
+    <result column="contract_id" property="contractId" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, serial_number, contacts, comment, consultant, technical_field1, technical_field2, 
     technical_field3, basic_research_cost, accident, create_time, accept_date, issuing_date, 
     certificate_number, certificate_url, state, year, record_time, large_order, deleted_sign,
-    founder, tech_principal
+    founder, tech_principal, contract_id
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -49,7 +50,7 @@
       basic_research_cost, accident, create_time, 
       accept_date, issuing_date, certificate_number, 
       certificate_url, state, year, record_time, large_order, deleted_sign, founder,
-      tech_principal
+      tech_principal, contract_id
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{contacts,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
@@ -58,7 +59,7 @@
       #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
       #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{recordTime,jdbcType=TIMESTAMP},
       #{largeOrder,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
-      #{techPrincipal,jdbcType=VARCHAR}
+      #{techPrincipal,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -133,6 +134,9 @@
        <if test="techPrincipal != null" >
         tech_principal,
       </if>
+      <if test="contractId != null" >
+        contract_id,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -204,6 +208,9 @@
       <if test="techPrincipal != null" >
         #{techPrincipal,jdbcType=VARCHAR},
       </if>
+       <if test="contractId != null" >
+        #{contractId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -275,6 +282,9 @@
        <if test="techPrincipal != null" >
         tech_principal = #{techPrincipal,jdbcType=VARCHAR},
       </if>
+      <if test="contractId != null" >
+        contract_id = #{contractId,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -301,7 +311,8 @@
       large_order = #{largeOrder,jdbcType=INTEGER},
       deleted_sign = #{deletedSign,jdbcType=INTEGER},
       founder = #{founder,jdbcType=VARCHAR},
-      tech_principal = #{techPrincipal,jdbcType=VARCHAR}
+      tech_principal = #{techPrincipal,jdbcType=VARCHAR},
+      contract_id = #{contractId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   

+ 18 - 4
src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml

@@ -56,6 +56,7 @@
 		<result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
 		<result column="contacts" property="contacts" jdbcType="INTEGER" />
 		<result column="founder" property="founder" jdbcType="VARCHAR" />
+		<result column="contract_id" property="contractId" jdbcType="VARCHAR" />
 	</resultMap>
 	<sql id="Base_Column_List">
 		id, uid, serial_number, patent_number, patent_name,
@@ -75,7 +76,8 @@
 		third_inventor_is_publish,
 		create_time, author, authorized_date,office,
 		principal ,confirm_state,
-		record_time, deleted_sign, contacts, founder
+		record_time, deleted_sign, contacts, founder,
+		contract_id
 	</sql>
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
 		parameterType="java.lang.String">
@@ -103,7 +105,8 @@
 		second_inventor_nationality, second_inventor_is_publish,
 		third_inventor_name, third_inventor_nationality,
 		third_inventor_is_publish, create_time, author, authorized_date,
-		office, principal, confirm_state, record_time, deleted_sign, contacts, founder)
+		office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
+		contract_id)
 
 		values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
 		#{serialNumber,jdbcType=INTEGER},
@@ -132,7 +135,8 @@
 		#{principal,jdbcType=VARCHAR}, #{confirmState,jdbcType=INTEGER},
 		#{recordTime,jdbcType=TIMESTAMP},
 		#{deletedSign,jdbcType=INTEGER},
-		#{contacts,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR})
+		#{contacts,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
+		#{contractId,jdbcType=VARCHAR})
 	</insert>
 	<insert id="insertSelective" parameterType="com.goafanti.common.model.PatentInfo">
 		insert into patent_info
@@ -239,6 +243,9 @@
 			<if test="founder != null">
 				founder,
 			</if>
+			<if test="contractId != null">
+				contract_id,
+			</if>
 		</trim>
 		<trim prefix="values (" suffix=")" suffixOverrides=",">
 			<if test="id != null">
@@ -343,6 +350,9 @@
 			<if test="founder != null">
 				#{founder,jdbcType=VARCHAR},
 			</if>
+			<if test="contractId != null">
+				#{contractId,jdbcType=VARCHAR},
+			</if>
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentInfo">
@@ -462,6 +472,9 @@
 			<if test="founder != null">
 				founder = #{founder,jdbcType=VARCHAR},
 			</if>
+			<if test="contractId != null">
+				contract_id = #{contractId,jdbcType=VARCHAR},
+			</if>
 		</set>
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
@@ -527,7 +540,8 @@
 		#{deletedSign,jdbcType=INTEGER},
 		contacts =
 		#{contacts,jdbcType=INTEGER},
-		#{founder,jdbcType=VARCHAR}
+		founder = #{founder,jdbcType=VARCHAR},
+		contract_id = #{contractId,jdbcType=VARCHAR}
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
 

+ 15 - 4
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -29,6 +29,7 @@
 		<result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
 		<result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
 		<result column="founder" property="founder" jdbcType="VARCHAR" />
+		<result column="contract_id" property="contractId" jdbcType="VARCHAR" />
 	</resultMap>
 	<sql id="Base_Column_List">
 		id, uid, serial_number, contacts, department, dispatch_info,
@@ -36,7 +37,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
+		founder, contract_id
 	</sql>
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
 		parameterType="java.lang.String">
@@ -56,7 +57,7 @@
 		project_des, project_mode, project_approval,
 		subsidy, consultant, approval_url,
 		state, create_time, accept_date,
-		approved_date, record_time, deleted_sign, founder
+		approved_date, record_time, deleted_sign, founder, contract_id
 		)
 		values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
 		#{serialNumber,jdbcType=INTEGER},
@@ -68,7 +69,7 @@
 		#{approvalUrl,jdbcType=VARCHAR},
 		#{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{acceptDate,jdbcType=TIMESTAMP},
 		#{approvedDate,jdbcType=TIMESTAMP}, #{recordTime,jdbcType=TIMESTAMP},
-		#{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}
+		#{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}
 		)
 	</insert>
 	<insert id="insertSelective" parameterType="com.goafanti.common.model.TechProject">
@@ -140,6 +141,9 @@
 			<if test="founder != null">
 				founder,
 			</if>
+			<if test="contractId != null">
+				contract_id,
+			</if>
 		</trim>
 		<trim prefix="values (" suffix=")" suffixOverrides=",">
 			<if test="id != null">
@@ -208,6 +212,9 @@
 			<if test="founder != null">
 				#{founder,jdbcType=VARCHAR},
 			</if>
+			<if test="contractId != null">
+				#{contractId,jdbcType=VARCHAR},
+			</if>
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TechProject">
@@ -276,6 +283,9 @@
 			<if test="founder != null">
 				founder = #{founder,jdbcType=VARCHAR},
 			</if>
+			<if test="contractId != null">
+				contract_id = #{contractId,jdbcType=VARCHAR},
+			</if>
 		</set>
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
@@ -301,7 +311,8 @@
 		approved_date = #{approvedDate,jdbcType=TIMESTAMP},
 		record_time = #{recordTime,jdbcType=TIMESTAMP},
 		deleted_sign = #{deletedSign,jdbcType=INTEGER},
-		founder = #{founder,jdbcType=VARCHAR}
+		founder = #{founder,jdbcType=VARCHAR},
+		contract_id = #{contractId,jdbcType=VARCHAR}
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
 

+ 13 - 2
src/main/java/com/goafanti/common/model/CopyrightInfo.java

@@ -14,6 +14,11 @@ public class CopyrightInfo extends BaseModel {
 	private String				uid;
 
 	/**
+	 * 合同ID
+	 */
+	private String				contractId;
+
+	/**
 	 * 编号
 	 */
 	private Integer				serialNumber;
@@ -102,8 +107,6 @@ public class CopyrightInfo extends BaseModel {
 	 * 申请创建人
 	 */
 	private String				founder;
-	
-	
 
 	public String getFounder() {
 		return founder;
@@ -121,6 +124,14 @@ public class CopyrightInfo extends BaseModel {
 		this.uid = uid;
 	}
 
+	public String getContractId() {
+		return contractId;
+	}
+
+	public void setContractId(String contractId) {
+		this.contractId = contractId;
+	}
+
 	public Integer getSerialNumber() {
 		return serialNumber;
 	}

+ 13 - 0
src/main/java/com/goafanti/common/model/OrgCognizance.java

@@ -13,6 +13,11 @@ public class OrgCognizance {
 	private String	id;
 
 	private String	uid;
+	
+	/**
+	 * 合同ID
+	 */
+	private String contractId;
 
 	/**
 	 * 编号
@@ -153,6 +158,14 @@ public class OrgCognizance {
 		this.uid = uid;
 	}
 
+	public String getContractId() {
+		return contractId;
+	}
+
+	public void setContractId(String contractId) {
+		this.contractId = contractId;
+	}
+
 	public Integer getSerialNumber() {
 		return serialNumber;
 	}

+ 14 - 0
src/main/java/com/goafanti/common/model/PatentInfo.java

@@ -15,6 +15,11 @@ public class PatentInfo {
 	private String	id;
 
 	private String	uid;
+	
+	/**
+	 * 合同ID
+	 */
+	private String contractId;
 
 	/**
 	 * 编号
@@ -201,6 +206,15 @@ public class PatentInfo {
 	public void setUid(String uid) {
 		this.uid = uid;
 	}
+	
+
+	public String getContractId() {
+		return contractId;
+	}
+
+	public void setContractId(String contractId) {
+		this.contractId = contractId;
+	}
 
 	public Integer getSerialNumber() {
 		return serialNumber;

+ 13 - 0
src/main/java/com/goafanti/common/model/TechProject.java

@@ -14,6 +14,11 @@ public class TechProject {
 	private String		id;
 
 	private String		uid;
+	
+	/**
+	 * 合同ID
+	 */
+	private String		contractId;
 
 	/**
 	 * 编号
@@ -139,6 +144,14 @@ public class TechProject {
 		this.uid = uid;
 	}
 
+	public String getContractId() {
+		return contractId;
+	}
+
+	public void setContractId(String contractId) {
+		this.contractId = contractId;
+	}
+
 	public Integer getSerialNumber() {
 		return serialNumber;
 	}