Przeglądaj źródła

PICC自动提交审批提前天数改为后台设置。

zhengqiang 5 lat temu
rodzic
commit
3fbae807d6

+ 2 - 2
picc-admin-server/src/main/java/com/jpsoft/picc/scheduled/FissionWantedTask.java

@@ -85,8 +85,8 @@ public class FissionWantedTask {
                     log.warn(String.format("提前%s天通知投保人【%s】提交保单", days, insuranceApplication.getInsuredName()));
                 }
             }
-            else if (days==1){
-                //提前天自动提交
+            else if (days==insuranceDefinition.getAdvanceSubmitDays()){
+                //提前n天自动提交
                 List<InsurancePolicyMember> insurancePolicyMemberList = insurancePolicyMemberService.findByPolicyId(id);
 
                 boolean isUnChecked = false;

+ 11 - 1
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/InsuranceDefinition.java

@@ -36,8 +36,10 @@ public class InsuranceDefinition {
 	private String updateBy;
     @ApiModelProperty(value = "修改时间")
 	private Date updateTime;
-	@ApiModelProperty(value = "每月截止时间")
+	@ApiModelProperty(value = "下月保单生效前提前多少天通知")
 	private String cutOffTime;
+	@ApiModelProperty(value = "下月保单生效前提前多少天自动提交")
+	private Integer advanceSubmitDays;
     private List<InsuranceDefinitionLimit> limits;
 	@ApiModelProperty(value = "理赔须知")
 	private String notice;
@@ -218,4 +220,12 @@ public class InsuranceDefinition {
 	public void setNotice(String notice){
 		this.notice = notice;
 	}
+
+	public Integer getAdvanceSubmitDays() {
+		return advanceSubmitDays;
+	}
+
+	public void setAdvanceSubmitDays(Integer advanceSubmitDays) {
+		this.advanceSubmitDays = advanceSubmitDays;
+	}
 }

+ 109 - 101
picc-common/src/main/resources/mapper/base/InsuranceDefinition.xml

@@ -1,112 +1,120 @@
 <?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.InsuranceDefinitionDAO">
-	<resultMap id="InsuranceDefinitionMap" type="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
-		<id property="id" column="id_" />
-			<result property="name" column="name_" />
-			<result property="insuranceDescription" column="insurance_description" />
-			<result property="clause" column="clause_" />
-			<result property="status" column="status_" />
-			<result property="delFlag" column="del_flag" />
-			<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="cutOffTime" column="cut_off_time" />
-			<result property="notice" column="notice_" />
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
+    <resultMap id="InsuranceDefinitionMap" type="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
+        <id property="id" column="id_"/>
+        <result property="name" column="name_"/>
+        <result property="insuranceDescription" column="insurance_description"/>
+        <result property="clause" column="clause_"/>
+        <result property="status" column="status_"/>
+        <result property="delFlag" column="del_flag"/>
+        <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="cutOffTime" column="cut_off_time"/>
+        <result property="advanceSubmitDays" column="advance_submit_days"/>
+        <result property="notice" column="notice_"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
 		insert into base_insurance_definition
-	    (id_,name_,insurance_description,clause_,status_,del_flag,create_by,create_time,update_by,update_time,cut_off_time,notice_)
+	    (id_,name_,insurance_description,clause_,status_,del_flag,create_by,create_time,
+	    update_by,update_time,cut_off_time,notice_,advance_submit_days)
 		values
 		(
-#{id,jdbcType=VARCHAR}
-,#{name,jdbcType=VARCHAR}
-,#{insuranceDescription,jdbcType=VARCHAR}
-,#{clause,jdbcType=VARCHAR}
-,#{status,jdbcType=VARCHAR}
-,#{delFlag,jdbcType= NUMERIC }
-,#{createBy,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateBy,jdbcType=VARCHAR}
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{cutOffTime,jdbcType= VARCHAR }
-,#{notice,jdbcType= VARCHAR }
+			#{id,jdbcType=VARCHAR}
+			,#{name,jdbcType=VARCHAR}
+			,#{insuranceDescription,jdbcType=VARCHAR}
+			,#{clause,jdbcType=VARCHAR}
+			,#{status,jdbcType=VARCHAR}
+			,#{delFlag,jdbcType= NUMERIC }
+			,#{createBy,jdbcType=VARCHAR}
+			,#{createTime,jdbcType= TIMESTAMP }
+			,#{updateBy,jdbcType=VARCHAR}
+			,#{updateTime,jdbcType= TIMESTAMP }
+			,#{cutOffTime,jdbcType= VARCHAR }
+			,#{notice,jdbcType= VARCHAR }
+			,#{advanceSubmitDays, jdbcType=NUMERIC}
 		)
 	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from base_insurance_definition where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
-		update base_insurance_definition
-		<set>
-				<if test="name!=null">
-		name_=#{name,jdbcType=VARCHAR},
-		</if>
-				<if test="insuranceDescription!=null">
-		insurance_description=#{insuranceDescription,jdbcType=VARCHAR},
-		</if>
-				<if test="clause!=null">
-		clause_=#{clause,jdbcType=VARCHAR},
-		</if>
-				<if test="status!=null">
-		status_=#{status,jdbcType=VARCHAR},
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</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="cutOffTime!=null">
-				cut_off_time=#{cutOffTime,jdbcType= VARCHAR },
-			</if>
-			<if test="notice!=null">
-				notice_=#{notice,jdbcType= VARCHAR },
-			</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="InsuranceDefinitionMap">
-		select 
-id_,name_,insurance_description,clause_,status_,del_flag,create_by,create_time,update_by,update_time,cut_off_time,notice_		from base_insurance_definition where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_insurance_definition where id_=#{0}
-	</select>
-	<select id="list" resultMap="InsuranceDefinitionMap">
-		select * from base_insurance_definition where del_flag=0
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="InsuranceDefinitionMap">
-		<![CDATA[
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_insurance_definition where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
+        update base_insurance_definition
+        <set>
+            <if test="name!=null">
+                name_=#{name,jdbcType=VARCHAR},
+            </if>
+            <if test="insuranceDescription!=null">
+                insurance_description=#{insuranceDescription,jdbcType=VARCHAR},
+            </if>
+            <if test="clause!=null">
+                clause_=#{clause,jdbcType=VARCHAR},
+            </if>
+            <if test="status!=null">
+                status_=#{status,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </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="cutOffTime!=null">
+                cut_off_time=#{cutOffTime,jdbcType= VARCHAR },
+            </if>
+            <if test="notice!=null">
+                notice_=#{notice,jdbcType= VARCHAR },
+            </if>
+            <if test="advanceSubmitDays!=null">
+                advance_submit_days=#{advanceSubmitDays,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="InsuranceDefinitionMap">
+        select
+        id_,name_,insurance_description,clause_,status_,del_flag,create_by,create_time,
+        update_by,update_time,cut_off_time,notice_,advance_submit_days
+        from base_insurance_definition where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_insurance_definition where id_=#{0}
+    </select>
+    <select id="list" resultMap="InsuranceDefinitionMap">
+        select * from base_insurance_definition where del_flag=0
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="InsuranceDefinitionMap">
+        <![CDATA[
 			select * from base_insurance_definition
 		]]>
-		<where>
-			and del_flag = false
-			<if test="searchParams.name != null">
-				and name_ like #{searchParams.name}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
-	</select>
+        <where>
+            and del_flag = false
+            <if test="searchParams.name != null">
+                and name_ like #{searchParams.name}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
 </mapper>