Browse Source

1.base_approval_record增加policy_id字段。

tomatozq 5 years ago
parent
commit
3e94989b7d

+ 10 - 0
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/ApprovalRecord.java

@@ -20,6 +20,8 @@ public class ApprovalRecord {
 	private String companyId;
     @ApiModelProperty(value = "投保申请ID")
 	private String applicationId;
+	@ApiModelProperty(value = "每月投保单ID")
+	private String policyId;
     @ApiModelProperty(value = "投保状态")
 	private String status;
     @ApiModelProperty(value = "创建人")
@@ -154,4 +156,12 @@ public class ApprovalRecord {
 	public void setDelFlag(Boolean delFlag){
 		this.delFlag = delFlag;
 	}
+
+	public String getPolicyId() {
+		return policyId;
+	}
+
+	public void setPolicyId(String policyId) {
+		this.policyId = policyId;
+	}
 }

+ 90 - 85
picc-common/src/main/resources/mapper/base/ApprovalRecord.xml

@@ -1,96 +1,101 @@
 <?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.base.dao.ApprovalRecordDAO">
-	<resultMap id="ApprovalRecordMap" type="com.jpsoft.picc.modules.base.entity.ApprovalRecord">
-		<id property="id" column="id_" />
-			<result property="companyId" column="company_id" />
-			<result property="applicationId" column="application_id" />
-			<result property="status" column="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.base.entity.ApprovalRecord">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
+    <resultMap id="ApprovalRecordMap" type="com.jpsoft.picc.modules.base.entity.ApprovalRecord">
+        <id property="id" column="id_"/>
+        <result property="companyId" column="company_id"/>
+        <result property="policyId" column="policy_id"/>
+        <result property="applicationId" column="application_id"/>
+        <result property="status" column="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.base.entity.ApprovalRecord">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
 		insert into base_approval_record
-	    (id_,company_id,application_id,status_,create_by,create_time,update_by,update_time,del_flag)
+	    (id_,company_id,application_id,policy_id,status_,create_by,create_time,update_by,update_time,del_flag)
 		values
 		(
-#{id,jdbcType=VARCHAR}
-,#{companyId,jdbcType=VARCHAR}
-,#{applicationId,jdbcType=VARCHAR}
-,#{status,jdbcType=VARCHAR}
-,#{createBy,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateBy,jdbcType=VARCHAR}
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
+			#{id,jdbcType=VARCHAR}
+			,#{companyId,jdbcType=VARCHAR}
+			,#{applicationId,jdbcType=VARCHAR}
+			,#{policyId,jdbcType=VARCHAR}
+			,#{status,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 base_approval_record where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.picc.modules.base.entity.ApprovalRecord">
-		update base_approval_record
-		<set>
-				<if test="companyId!=null">
-		company_id=#{companyId,jdbcType=VARCHAR},
-		</if>
-				<if test="applicationId!=null">
-		application_id=#{applicationId,jdbcType=VARCHAR},
-		</if>
-				<if test="status!=null">
-		status_=#{status,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="ApprovalRecordMap">
-		select 
-id_,company_id,application_id,status_,create_by,create_time,update_by,update_time,del_flag		from base_approval_record where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_approval_record where id_=#{0}
-	</select>
-	<select id="list" resultMap="ApprovalRecordMap">
-		select * from base_approval_record
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="ApprovalRecordMap">
-		<![CDATA[
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_approval_record where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.ApprovalRecord">
+        update base_approval_record
+        <set>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="applicationId!=null">
+                application_id=#{applicationId,jdbcType=VARCHAR},
+            </if>
+            <if test="policyId!=null">
+                policy_id=#{policyId,jdbcType=VARCHAR},
+            </if>
+            <if test="status!=null">
+                status_=#{status,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="ApprovalRecordMap">
+        select * from
+        base_approval_record where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_approval_record where id_=#{0}
+    </select>
+    <select id="list" resultMap="ApprovalRecordMap">
+        select * from base_approval_record
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="ApprovalRecordMap">
+        <![CDATA[
 			select * from base_approval_record
 		]]>
-		<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>