Ver código fonte

投保单表结构新增联系电话和邮编。

tomatozq 5 anos atrás
pai
commit
12e0dded5c

+ 30 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/business/entity/InsuranceApplication.java

@@ -32,6 +32,10 @@ public class InsuranceApplication {
 	private String businessScope;
     @ApiModelProperty(value = "行业类型")
 	private String industryType;
+    @ApiModelProperty(value = "联系电话")
+	private String tel;
+    @ApiModelProperty(value = "邮编")
+	private String postal;
     @ApiModelProperty(value = "雇员人数")
 	private Integer employeesNumber;
     @ApiModelProperty(value = "已投保人数")
@@ -178,6 +182,32 @@ public class InsuranceApplication {
 	public void setIndustryType(String industryType){
 		this.industryType = industryType;
 	}
+	/**
+	 *获取联系电话
+	 */
+    	public String getTel(){
+		return tel;
+	}
+	
+	/**
+	 *设置联系电话
+	 */
+	public void setTel(String tel){
+		this.tel = tel;
+	}
+	/**
+	 *获取邮编
+	 */
+    	public String getPostal(){
+		return postal;
+	}
+	
+	/**
+	 *设置邮编
+	 */
+	public void setPostal(String postal){
+		this.postal = postal;
+	}
 	/**
 	 *获取雇员人数
 	 */

+ 166 - 155
picc-common/src/main/resources/mapper/business/InsuranceApplication.xml

@@ -1,166 +1,177 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
 <mapper namespace="com.jpsoft.picc.modules.business.dao.InsuranceApplicationDAO">
-	<resultMap id="InsuranceApplicationMap" type="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
-		<id property="id" column="id_" />
-			<result property="companyId" column="company_id" />
-			<result property="definitionId" column="definition_id" />
-			<result property="insuredName" column="insured_name" />
-			<result property="insuredTel" column="insured_tel" />
-			<result property="companyName" column="company_name" />
-			<result property="usccCode" column="uscc_code" />
-			<result property="businessScope" column="business_scope" />
-			<result property="industryType" column="industry_type" />
-			<result property="employeesNumber" column="employees_number" />
-			<result property="insuredNumber" column="insured_number" />
-			<result property="companyAddress" column="company_address" />
-			<result property="lossInRecentYears" column="loss_in_recent_years" />
-			<result property="startTime" column="start_time" />
-			<result property="endTime" column="end_time" />
-			<result property="insuranceFee" column="insurance_fee" />
-			<result property="status" column="status_" />
-			<result property="processStatus" column="process_status" />
-			<result property="createBy" column="create_by" />
-			<result property="createTime" column="create_time" />
-			<result property="updateBy" column="update_by" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
+    <resultMap id="InsuranceApplicationMap" type="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
+        <id property="id" column="id_"/>
+        <result property="companyId" column="company_id"/>
+        <result property="definitionId" column="definition_id"/>
+        <result property="insuredName" column="insured_name"/>
+        <result property="insuredTel" column="insured_tel"/>
+        <result property="companyName" column="company_name"/>
+        <result property="usccCode" column="uscc_code"/>
+        <result property="businessScope" column="business_scope"/>
+        <result property="industryType" column="industry_type"/>
+        <result property="tel" column="tel_"/>
+        <result property="postal" column="postal_"/>
+        <result property="employeesNumber" column="employees_number"/>
+        <result property="insuredNumber" column="insured_number"/>
+        <result property="companyAddress" column="company_address"/>
+        <result property="lossInRecentYears" column="loss_in_recent_years"/>
+        <result property="startTime" column="start_time"/>
+        <result property="endTime" column="end_time"/>
+        <result property="insuranceFee" column="insurance_fee"/>
+        <result property="status" column="status_"/>
+        <result property="processStatus" column="process_status"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
 		insert into business_insurance_application
-	    (id_,company_id,definition_id,insured_name,insured_tel,company_name,uscc_code,business_scope,industry_type,employees_number,insured_number,company_address,loss_in_recent_years,start_time,end_time,insurance_fee,status_,process_status,create_by,create_time,update_by,update_time,del_flag)
+	    (id_,company_id,definition_id,insured_name,insured_tel,company_name,uscc_code,business_scope,industry_type,tel_,postal_,employees_number,insured_number,company_address,loss_in_recent_years,start_time,end_time,insurance_fee,status_,process_status,create_by,create_time,update_by,update_time,del_flag)
 		values
 		(
-			#{id,jdbcType=VARCHAR}
-			,#{companyId,jdbcType=VARCHAR}
-			,#{definitionId,jdbcType=VARCHAR}
-			,#{insuredName,jdbcType=VARCHAR}
-			,#{insuredTel,jdbcType=VARCHAR}
-			,#{companyName,jdbcType=VARCHAR}
-			,#{usccCode,jdbcType=VARCHAR}
-			,#{businessScope,jdbcType=VARCHAR}
-			,#{industryType,jdbcType=VARCHAR}
-			,#{employeesNumber,jdbcType= NUMERIC }
-			,#{insuredNumber,jdbcType= NUMERIC }
-			,#{companyAddress,jdbcType=VARCHAR}
-			,#{lossInRecentYears,jdbcType=VARCHAR}
-			,#{startTime,jdbcType= TIMESTAMP }
-			,#{endTime,jdbcType= TIMESTAMP }
-			,#{insuranceFee,jdbcType= NUMERIC }
-			,#{status,jdbcType=VARCHAR}
-			,#{processStatus,jdbcType=VARCHAR}
-			,#{createBy,jdbcType=VARCHAR}
-			,#{createTime,jdbcType= TIMESTAMP }
-			,#{updateBy,jdbcType=VARCHAR}
-			,#{updateTime,jdbcType= TIMESTAMP }
-			,#{delFlag,jdbcType= NUMERIC }
+#{id,jdbcType=VARCHAR}
+,#{companyId,jdbcType=VARCHAR}
+,#{definitionId,jdbcType=VARCHAR}
+,#{insuredName,jdbcType=VARCHAR}
+,#{insuredTel,jdbcType=VARCHAR}
+,#{companyName,jdbcType=VARCHAR}
+,#{usccCode,jdbcType=VARCHAR}
+,#{businessScope,jdbcType=VARCHAR}
+,#{industryType,jdbcType=VARCHAR}
+,#{tel,jdbcType=VARCHAR}
+,#{postal,jdbcType=VARCHAR}
+,#{employeesNumber,jdbcType= NUMERIC }
+,#{insuredNumber,jdbcType= NUMERIC }
+,#{companyAddress,jdbcType=VARCHAR}
+,#{lossInRecentYears,jdbcType=VARCHAR}
+,#{startTime,jdbcType= TIMESTAMP }
+,#{endTime,jdbcType= TIMESTAMP }
+,#{insuranceFee,jdbcType= NUMERIC }
+,#{status,jdbcType=VARCHAR}
+,#{processStatus,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
 		)
 	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from business_insurance_application where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
-		update business_insurance_application
-		<set>
-				<if test="companyId!=null">
-		company_id=#{companyId,jdbcType=VARCHAR},
-		</if>
-				<if test="definitionId!=null">
-		definition_id=#{definitionId,jdbcType=VARCHAR},
-		</if>
-				<if test="insuredName!=null">
-		insured_name=#{insuredName,jdbcType=VARCHAR},
-		</if>
-				<if test="insuredTel!=null">
-		insured_tel=#{insuredTel,jdbcType=VARCHAR},
-		</if>
-				<if test="companyName!=null">
-		company_name=#{companyName,jdbcType=VARCHAR},
-		</if>
-				<if test="usccCode!=null">
-		uscc_code=#{usccCode,jdbcType=VARCHAR},
-		</if>
-				<if test="businessScope!=null">
-		business_scope=#{businessScope,jdbcType=VARCHAR},
-		</if>
-				<if test="industryType!=null">
-		industry_type=#{industryType,jdbcType=VARCHAR},
-		</if>
-				<if test="employeesNumber!=null">
-		employees_number=#{employeesNumber,jdbcType= NUMERIC },
-		</if>
-				<if test="insuredNumber!=null">
-		insured_number=#{insuredNumber,jdbcType= NUMERIC },
-		</if>
-				<if test="companyAddress!=null">
-		company_address=#{companyAddress,jdbcType=VARCHAR},
-		</if>
-				<if test="lossInRecentYears!=null">
-		loss_in_recent_years=#{lossInRecentYears,jdbcType=VARCHAR},
-		</if>
-				<if test="startTime!=null">
-		start_time=#{startTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="endTime!=null">
-		end_time=#{endTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="insuranceFee!=null">
-		insurance_fee=#{insuranceFee,jdbcType= NUMERIC },
-		</if>
-				<if test="status!=null">
-		status_=#{status,jdbcType=VARCHAR},
-		</if>
-				<if test="processStatus!=null">
-		process_status=#{processStatus,jdbcType=VARCHAR},
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="InsuranceApplicationMap">
-		select 
-id_,company_id,definition_id,insured_name,insured_tel,company_name,uscc_code,business_scope,industry_type,employees_number,insured_number,company_address,loss_in_recent_years,start_time,end_time,insurance_fee,status_,process_status,create_by,create_time,update_by,update_time,del_flag		from business_insurance_application where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from business_insurance_application where id_=#{0}
-	</select>
-	<select id="list" resultMap="InsuranceApplicationMap">
-		select * from business_insurance_application
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="InsuranceApplicationMap">
-		<![CDATA[
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from business_insurance_application where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.business.entity.InsuranceApplication">
+        update business_insurance_application
+        <set>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="definitionId!=null">
+                definition_id=#{definitionId,jdbcType=VARCHAR},
+            </if>
+            <if test="insuredName!=null">
+                insured_name=#{insuredName,jdbcType=VARCHAR},
+            </if>
+            <if test="insuredTel!=null">
+                insured_tel=#{insuredTel,jdbcType=VARCHAR},
+            </if>
+            <if test="companyName!=null">
+                company_name=#{companyName,jdbcType=VARCHAR},
+            </if>
+            <if test="usccCode!=null">
+                uscc_code=#{usccCode,jdbcType=VARCHAR},
+            </if>
+            <if test="businessScope!=null">
+                business_scope=#{businessScope,jdbcType=VARCHAR},
+            </if>
+            <if test="industryType!=null">
+                industry_type=#{industryType,jdbcType=VARCHAR},
+            </if>
+            <if test="tel!=null">
+                tel_=#{tel,jdbcType=VARCHAR},
+            </if>
+            <if test="postal!=null">
+                postal_=#{postal,jdbcType=VARCHAR},
+            </if>
+            <if test="employeesNumber!=null">
+                employees_number=#{employeesNumber,jdbcType= NUMERIC },
+            </if>
+            <if test="insuredNumber!=null">
+                insured_number=#{insuredNumber,jdbcType= NUMERIC },
+            </if>
+            <if test="companyAddress!=null">
+                company_address=#{companyAddress,jdbcType=VARCHAR},
+            </if>
+            <if test="lossInRecentYears!=null">
+                loss_in_recent_years=#{lossInRecentYears,jdbcType=VARCHAR},
+            </if>
+            <if test="startTime!=null">
+                start_time=#{startTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="endTime!=null">
+                end_time=#{endTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="insuranceFee!=null">
+                insurance_fee=#{insuranceFee,jdbcType= NUMERIC },
+            </if>
+            <if test="status!=null">
+                status_=#{status,jdbcType=VARCHAR},
+            </if>
+            <if test="processStatus!=null">
+                process_status=#{processStatus,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="InsuranceApplicationMap">
+        select
+        id_,company_id,definition_id,insured_name,insured_tel,company_name,uscc_code,business_scope,industry_type,tel_,postal_,employees_number,insured_number,company_address,loss_in_recent_years,start_time,end_time,insurance_fee,status_,process_status,create_by,create_time,update_by,update_time,del_flag
+        from business_insurance_application where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from business_insurance_application where id_=#{0}
+    </select>
+    <select id="list" resultMap="InsuranceApplicationMap">
+        select * from business_insurance_application
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="InsuranceApplicationMap">
+        <![CDATA[
 			select * from business_insurance_application
 		]]>
-		<where>
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
-	</select>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
 </mapper>