Преглед изворни кода

专利标记已通知与发送邮件

anderx пре 4 година
родитељ
комит
e31c6605fd

+ 1 - 1
GeneratorConfig.xml

@@ -45,7 +45,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="patent_year_payment"
+    <table schema="aft" tableName="patent_new"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 5 - 17
src/main/java/com/goafanti/admin/service/impl/AttachmentServiceImpl.java

@@ -22,22 +22,10 @@ public class AttachmentServiceImpl implements AttachmentService {
 
 	@Override
 	public Attachment selectByReceivbles(String sign) {
-		if (sign.equals("receivbles_template")) {
-			Attachment a=new Attachment();
-			a.setFileName("模板.xls");
-			a.setFilePath("/tmp/receivbles_template.xls");
-			return a;
-		}else if (sign.equals("user_channel")) {
-			Attachment a=new Attachment();
-			a.setFileName("模板.xls");
-			a.setFilePath("/tmp/user_channel.xls");
-			return a;
-		}else if (sign.equals("new_patent_template")) {
-			Attachment a=new Attachment();
-			a.setFileName("模板.xls");
-			a.setFilePath("/tmp/new_patent_template.xls");
-			return a;
-		}
-		return null;
+		Attachment a=new Attachment();
+		String url=String.format("/tmp/%s%s", sign,".xls");
+		a.setFileName("模板.xls");
+		a.setFilePath(url);
+		return a;
 	}
 }

+ 11 - 2
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.bo;
 
+import java.math.BigDecimal;
+
 public class EmailBo {
 	
 	//收件地址
@@ -38,6 +40,7 @@ public class EmailBo {
 	 * @param amount
 	 * @param date
 	 */
+	
 	public  EmailBo(String subject, String address, String addressee,
 			String deptname, String sender,String patentName,String patentNo,String amount,String date,Integer status) {
 		this.subject = subject;
@@ -54,9 +57,8 @@ public class EmailBo {
 		else if (status==6) days=2;
 		else if (status==7) days=1;
 		this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, date,days);
-		
-		
 	}
+	
 	/**
 	 *  
 	 * @param subject	标题
@@ -84,6 +86,7 @@ public class EmailBo {
 		if(type==1)this.content=setDunFormat( addressee, sender, deptname,orderNo, date , dunStatusName,adminName,userName,0);
 		if(type==2)this.content=setDunFormat( addressee, sender, deptname,orderNo, date , dunStatusName,adminName,userName,1);
 	}
+	
 	/**
 	 * 通用模版
 	 * @param subject
@@ -114,6 +117,12 @@ public class EmailBo {
 	}
 
 
+	
+
+
+	
+
+
 	public String setDunFormat(String addressee,String sender,String deptname,String orderNo,String date ,String dunStatusName,String adminName,
 			String userName,int i) {
 		String str1 = "",str2= "",str3= "";

+ 13 - 6
src/main/java/com/goafanti/common/dao/PatentNewMapper.java

@@ -10,37 +10,37 @@ public interface PatentNewMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	int insert(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	int insertSelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	PatentNew selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	int updateByPrimaryKeySelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	int updateByPrimaryKey(PatentNew record);
 
@@ -58,4 +58,11 @@ public interface PatentNewMapper {
 	int selectByPatenNo(String patentNo);
 
 	List<PatentNew> selectByYear(int i);
+
+	void updateBatch(@Param("list") String[] list);
+
+
+	List<PatentNew> selectByids(String[] s);
+
+	String selectUserNameByTid(Integer tid);
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/PatentPaymentDetailsMapper.java

@@ -54,4 +54,6 @@ public interface PatentPaymentDetailsMapper {
     int updateByPrimaryKey(PatentPaymentDetails record);
 
 	void insertBatch(List<PatentPaymentDetails> list);
+
+	List<PatentPaymentDetails> selectByPid(Integer id);
 }

+ 52 - 16
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
@@ -34,23 +34,24 @@
     <result column="delaying_amount" jdbcType="DECIMAL" property="delayingAmount" />
     <result column="recovery_amount" jdbcType="DECIMAL" property="recoveryAmount" />
     <result column="input_id" jdbcType="VARCHAR" property="inputId" />
+    <result column="end_date" jdbcType="DATE" property="endDate" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     id, patent_no, `name`, `type`, `status`, apply_date, authorization_date, patent_amount, 
     applicant, province, contact_mobile, email, certificate_url, create_time, update_time, 
     aid, `years`, `uid`, holders, inventor, annual_fee_status, salesman_remind, tid, 
-    new_type, delaying_amount, recovery_amount, input_id
+    new_type, delaying_amount, recovery_amount, input_id, end_date
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -61,7 +62,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     delete from patent_new
     where id = #{id,jdbcType=INTEGER}
@@ -70,7 +71,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     insert into patent_new (id, patent_no, `name`, 
       `type`, `status`, apply_date, 
@@ -80,7 +81,8 @@
       aid, `years`, `uid`, holders, 
       inventor, annual_fee_status, salesman_remind, 
       tid, new_type, delaying_amount, 
-      recovery_amount, input_id)
+      recovery_amount, input_id, end_date
+      )
     values (#{id,jdbcType=INTEGER}, #{patentNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{applyDate,jdbcType=DATE}, 
       #{authorizationDate,jdbcType=DATE}, #{patentAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, 
@@ -89,13 +91,14 @@
       #{aid,jdbcType=VARCHAR}, #{years,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{holders,jdbcType=VARCHAR}, 
       #{inventor,jdbcType=VARCHAR}, #{annualFeeStatus,jdbcType=INTEGER}, #{salesmanRemind,jdbcType=INTEGER}, 
       #{tid,jdbcType=INTEGER}, #{newType,jdbcType=INTEGER}, #{delayingAmount,jdbcType=DECIMAL}, 
-      #{recoveryAmount,jdbcType=DECIMAL}, #{inputId,jdbcType=VARCHAR})
+      #{recoveryAmount,jdbcType=DECIMAL}, #{inputId,jdbcType=VARCHAR}, #{endDate,jdbcType=DATE}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentNew">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     insert into patent_new
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -180,6 +183,9 @@
       <if test="inputId != null">
         input_id,
       </if>
+      <if test="endDate != null">
+        end_date,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -263,13 +269,16 @@
       <if test="inputId != null">
         #{inputId,jdbcType=VARCHAR},
       </if>
+      <if test="endDate != null">
+        #{endDate,jdbcType=DATE},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentNew">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     update patent_new
     <set>
@@ -351,6 +360,9 @@
       <if test="inputId != null">
         input_id = #{inputId,jdbcType=VARCHAR},
       </if>
+      <if test="endDate != null">
+        end_date = #{endDate,jdbcType=DATE},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -358,7 +370,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Aug 06 11:49:51 CST 2021.
+      This element was generated on Mon Aug 09 14:41:21 CST 2021.
     -->
     update patent_new
     set patent_no = #{patentNo,jdbcType=VARCHAR},
@@ -386,7 +398,8 @@
       new_type = #{newType,jdbcType=INTEGER},
       delaying_amount = #{delayingAmount,jdbcType=DECIMAL},
       recovery_amount = #{recoveryAmount,jdbcType=DECIMAL},
-      input_id = #{inputId,jdbcType=VARCHAR}
+      input_id = #{inputId,jdbcType=VARCHAR},
+      end_date = #{endDate,jdbcType=DATE}
     where id = #{id,jdbcType=INTEGER}
   </update>
   
@@ -522,8 +535,8 @@
       province, contact_mobile, email, 
       certificate_url, create_time, update_time, 
       aid, `years`, `uid`, holders, 
-      inventor,  
-      tid, new_type, delaying_amount, 
+      inventor,  end_date,
+      tid, new_type, 
        input_id)
     values 
       <foreach collection="list" index="index" item="item" separator=",">
@@ -533,8 +546,8 @@
       #{item.province,jdbcType=INTEGER}, #{item.contactMobile,jdbcType=VARCHAR}, #{item.email,jdbcType=VARCHAR}, 
       #{item.certificateUrl,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, 
       #{item.aid,jdbcType=VARCHAR}, #{item.years,jdbcType=INTEGER}, #{item.uid,jdbcType=VARCHAR}, #{item.holders,jdbcType=VARCHAR}, 
-      #{item.inventor,jdbcType=VARCHAR},  
-      #{item.tid,jdbcType=INTEGER}, #{item.newType,jdbcType=INTEGER}, #{item.delayingAmount,jdbcType=DECIMAL}, 
+      #{item.inventor,jdbcType=VARCHAR}, #{item.endDate,jdbcType=DATE},
+      #{item.tid,jdbcType=INTEGER}, #{item.newType,jdbcType=INTEGER},  
        #{item.inputId,jdbcType=VARCHAR})
     </foreach>
     </insert>
@@ -547,4 +560,27 @@
     <include refid="Base_Column_List" />
     from patent_new where years = #{year}
     </select>
+    
+    <update id="updateBatch">
+    update patent_new 
+    set     salesman_remind=1
+    where id in 
+  	<foreach item="item" collection="list" open="(" separator="," close=")">
+	#{item}
+	</foreach>
+    </update>
+    <select id="selectByids" resultMap="BaseResultMap">
+        select 
+    <include refid="Base_Column_List" />
+    from patent_new
+    where id in
+    <foreach item="item" collection="list" open="(" separator="," close=")">
+	#{item}
+	</foreach>
+    </select>
+    
+    <select id="selectUserNameByTid" resultType="java.lang.String">
+    select b.buyer_name userName from t_order_task a left join t_order_mid b on a.order_no =b.order_no 
+	where a.id = #{tid}
+    </select>
 </mapper>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/PatentPaymentDetailsMapper.xml

@@ -166,4 +166,11 @@
       )
      </foreach> 
   </insert>
+  
+    <select id="selectByPid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from patent_payment_details
+    where pid = #{pid,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 108 - 84
src/main/java/com/goafanti/common/model/PatentNew.java

@@ -8,149 +8,154 @@ public class PatentNew implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * Database Column Remarks: 专利编号 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_no
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String patentNo;
 	/**
 	 * Database Column Remarks: 名称 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.name
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String name;
 	/**
-	 * Database Column Remarks: 类型 0发明专利 1使用新型 2外观设计 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * Database Column Remarks: 专利名称 0实用新型 1发明专利 2外观专利 3 其他 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.type
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer type;
 	/**
 	 * Database Column Remarks: 状态 0 未提醒 1 剩余90天 2剩余30天 3剩余20天 4剩余10天 5剩余3天 6剩余2天 7剩余1天 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer status;
 	/**
 	 * Database Column Remarks: 申请时间 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.apply_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Date applyDate;
 	/**
 	 * Database Column Remarks: 授权时间 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.authorization_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Date authorizationDate;
 	/**
 	 * Database Column Remarks: 金额 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private BigDecimal patentAmount;
 	/**
 	 * Database Column Remarks: 申请人 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.applicant
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String applicant;
 	/**
 	 * Database Column Remarks: 所在地-省份 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.province
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer province;
 	/**
 	 * Database Column Remarks: 联系方式 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.contact_mobile
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String contactMobile;
 	/**
 	 * Database Column Remarks: 邮箱 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.email
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String email;
 	/**
 	 * Database Column Remarks: 证件URL This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.certificate_url
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String certificateUrl;
 	/**
 	 * Database Column Remarks: 创建时间 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.create_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Date createTime;
 	/**
 	 * Database Column Remarks: 更新时间 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.update_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Date updateTime;
 	/**
 	 * Database Column Remarks: 操作人 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.aid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String aid;
 	/**
 	 * Database Column Remarks: 年份 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.years
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer years;
 	/**
 	 * Database Column Remarks: 客户编号 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.uid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String uid;
 	/**
 	 * Database Column Remarks: 权利人 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.holders
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String holders;
 	/**
 	 * Database Column Remarks: 发明人 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.inventor
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String inventor;
 	/**
 	 * Database Column Remarks: 年费状态 0无信息 1代缴费 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.annual_fee_status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer annualFeeStatus;
 	/**
 	 * Database Column Remarks: 营销员是否提醒 0未通知 1已通知 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.salesman_remind
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer salesmanRemind;
 	/**
 	 * Database Column Remarks: 项目编号 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.tid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer tid;
 	/**
 	 * Database Column Remarks: 是否为新专利 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.new_type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private Integer newType;
 	/**
 	 * Database Column Remarks: 滞纳金 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.delaying_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private BigDecimal delayingAmount;
 	/**
 	 * Database Column Remarks: 恢复金 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.recovery_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private BigDecimal recoveryAmount;
 	/**
 	 * Database Column Remarks: 录入人 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.input_id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private String inputId;
 	/**
+	 * Database Column Remarks: 结束时间 This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.end_date
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
+	 */
+	private Date endDate;
+	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.id
 	 * @return  the value of patent_new.id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -159,7 +164,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.id
 	 * @param id  the value for patent_new.id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -168,7 +173,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_no
 	 * @return  the value of patent_new.patent_no
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getPatentNo() {
 		return patentNo;
@@ -177,7 +182,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_no
 	 * @param patentNo  the value for patent_new.patent_no
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setPatentNo(String patentNo) {
 		this.patentNo = patentNo == null ? null : patentNo.trim();
@@ -186,7 +191,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.name
 	 * @return  the value of patent_new.name
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getName() {
 		return name;
@@ -195,7 +200,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.name
 	 * @param name  the value for patent_new.name
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setName(String name) {
 		this.name = name == null ? null : name.trim();
@@ -204,7 +209,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.type
 	 * @return  the value of patent_new.type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getType() {
 		return type;
@@ -213,7 +218,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.type
 	 * @param type  the value for patent_new.type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -222,7 +227,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.status
 	 * @return  the value of patent_new.status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getStatus() {
 		return status;
@@ -231,7 +236,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.status
 	 * @param status  the value for patent_new.status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -240,7 +245,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.apply_date
 	 * @return  the value of patent_new.apply_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Date getApplyDate() {
 		return applyDate;
@@ -249,7 +254,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.apply_date
 	 * @param applyDate  the value for patent_new.apply_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setApplyDate(Date applyDate) {
 		this.applyDate = applyDate;
@@ -258,7 +263,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.authorization_date
 	 * @return  the value of patent_new.authorization_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Date getAuthorizationDate() {
 		return authorizationDate;
@@ -267,7 +272,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.authorization_date
 	 * @param authorizationDate  the value for patent_new.authorization_date
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setAuthorizationDate(Date authorizationDate) {
 		this.authorizationDate = authorizationDate;
@@ -276,7 +281,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_amount
 	 * @return  the value of patent_new.patent_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public BigDecimal getPatentAmount() {
 		return patentAmount;
@@ -285,7 +290,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_amount
 	 * @param patentAmount  the value for patent_new.patent_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setPatentAmount(BigDecimal patentAmount) {
 		this.patentAmount = patentAmount;
@@ -294,7 +299,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.applicant
 	 * @return  the value of patent_new.applicant
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getApplicant() {
 		return applicant;
@@ -303,7 +308,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.applicant
 	 * @param applicant  the value for patent_new.applicant
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setApplicant(String applicant) {
 		this.applicant = applicant == null ? null : applicant.trim();
@@ -312,7 +317,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.province
 	 * @return  the value of patent_new.province
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getProvince() {
 		return province;
@@ -321,7 +326,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.province
 	 * @param province  the value for patent_new.province
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setProvince(Integer province) {
 		this.province = province;
@@ -330,7 +335,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.contact_mobile
 	 * @return  the value of patent_new.contact_mobile
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getContactMobile() {
 		return contactMobile;
@@ -339,7 +344,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.contact_mobile
 	 * @param contactMobile  the value for patent_new.contact_mobile
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setContactMobile(String contactMobile) {
 		this.contactMobile = contactMobile == null ? null : contactMobile.trim();
@@ -348,7 +353,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.email
 	 * @return  the value of patent_new.email
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getEmail() {
 		return email;
@@ -357,7 +362,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.email
 	 * @param email  the value for patent_new.email
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setEmail(String email) {
 		this.email = email == null ? null : email.trim();
@@ -366,7 +371,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.certificate_url
 	 * @return  the value of patent_new.certificate_url
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getCertificateUrl() {
 		return certificateUrl;
@@ -375,7 +380,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.certificate_url
 	 * @param certificateUrl  the value for patent_new.certificate_url
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setCertificateUrl(String certificateUrl) {
 		this.certificateUrl = certificateUrl == null ? null : certificateUrl.trim();
@@ -384,7 +389,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.create_time
 	 * @return  the value of patent_new.create_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -393,7 +398,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.create_time
 	 * @param createTime  the value for patent_new.create_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -402,7 +407,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.update_time
 	 * @return  the value of patent_new.update_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -411,7 +416,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.update_time
 	 * @param updateTime  the value for patent_new.update_time
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -420,7 +425,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.aid
 	 * @return  the value of patent_new.aid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -429,7 +434,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.aid
 	 * @param aid  the value for patent_new.aid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setAid(String aid) {
 		this.aid = aid == null ? null : aid.trim();
@@ -438,7 +443,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.years
 	 * @return  the value of patent_new.years
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getYears() {
 		return years;
@@ -447,7 +452,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.years
 	 * @param years  the value for patent_new.years
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setYears(Integer years) {
 		this.years = years;
@@ -456,7 +461,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.uid
 	 * @return  the value of patent_new.uid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getUid() {
 		return uid;
@@ -465,7 +470,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.uid
 	 * @param uid  the value for patent_new.uid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setUid(String uid) {
 		this.uid = uid == null ? null : uid.trim();
@@ -474,7 +479,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.holders
 	 * @return  the value of patent_new.holders
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getHolders() {
 		return holders;
@@ -483,7 +488,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.holders
 	 * @param holders  the value for patent_new.holders
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setHolders(String holders) {
 		this.holders = holders == null ? null : holders.trim();
@@ -492,7 +497,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.inventor
 	 * @return  the value of patent_new.inventor
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getInventor() {
 		return inventor;
@@ -501,7 +506,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.inventor
 	 * @param inventor  the value for patent_new.inventor
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setInventor(String inventor) {
 		this.inventor = inventor == null ? null : inventor.trim();
@@ -510,7 +515,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.annual_fee_status
 	 * @return  the value of patent_new.annual_fee_status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getAnnualFeeStatus() {
 		return annualFeeStatus;
@@ -519,7 +524,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.annual_fee_status
 	 * @param annualFeeStatus  the value for patent_new.annual_fee_status
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setAnnualFeeStatus(Integer annualFeeStatus) {
 		this.annualFeeStatus = annualFeeStatus;
@@ -528,7 +533,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.salesman_remind
 	 * @return  the value of patent_new.salesman_remind
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getSalesmanRemind() {
 		return salesmanRemind;
@@ -537,7 +542,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.salesman_remind
 	 * @param salesmanRemind  the value for patent_new.salesman_remind
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setSalesmanRemind(Integer salesmanRemind) {
 		this.salesmanRemind = salesmanRemind;
@@ -546,7 +551,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.tid
 	 * @return  the value of patent_new.tid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getTid() {
 		return tid;
@@ -555,7 +560,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.tid
 	 * @param tid  the value for patent_new.tid
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
@@ -564,7 +569,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.new_type
 	 * @return  the value of patent_new.new_type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public Integer getNewType() {
 		return newType;
@@ -573,7 +578,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.new_type
 	 * @param newType  the value for patent_new.new_type
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setNewType(Integer newType) {
 		this.newType = newType;
@@ -582,7 +587,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.delaying_amount
 	 * @return  the value of patent_new.delaying_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public BigDecimal getDelayingAmount() {
 		return delayingAmount;
@@ -591,7 +596,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.delaying_amount
 	 * @param delayingAmount  the value for patent_new.delaying_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setDelayingAmount(BigDecimal delayingAmount) {
 		this.delayingAmount = delayingAmount;
@@ -600,7 +605,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.recovery_amount
 	 * @return  the value of patent_new.recovery_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public BigDecimal getRecoveryAmount() {
 		return recoveryAmount;
@@ -609,7 +614,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.recovery_amount
 	 * @param recoveryAmount  the value for patent_new.recovery_amount
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setRecoveryAmount(BigDecimal recoveryAmount) {
 		this.recoveryAmount = recoveryAmount;
@@ -618,7 +623,7 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.input_id
 	 * @return  the value of patent_new.input_id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public String getInputId() {
 		return inputId;
@@ -627,15 +632,33 @@ public class PatentNew implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.input_id
 	 * @param inputId  the value for patent_new.input_id
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	public void setInputId(String inputId) {
 		this.inputId = inputId == null ? null : inputId.trim();
 	}
 
 	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.end_date
+	 * @return  the value of patent_new.end_date
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
+	 */
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.end_date
+	 * @param endDate  the value for patent_new.end_date
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
+	 */
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Fri Aug 06 11:49:51 CST 2021
+	 * @mbg.generated  Mon Aug 09 14:41:21 CST 2021
 	 */
 	@Override
 	public String toString() {
@@ -670,6 +693,7 @@ public class PatentNew implements Serializable {
 		sb.append(", delayingAmount=").append(delayingAmount);
 		sb.append(", recoveryAmount=").append(recoveryAmount);
 		sb.append(", inputId=").append(inputId);
+		sb.append(", endDate=").append(endDate);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();

+ 18 - 2
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -20,16 +20,29 @@ import com.goafanti.common.model.Notice;
 public class AsyncUtils {
 	@Autowired
 	private NoticeMapper noticeMapper;
+	@Autowired
+	private SendEmailUtil sendEmailUtil;
 	
 
 	
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
-		SendEmailUtil.getInstance().patentSend(bo);
+		
+	}
+	
+	public void sendList(List<EmailBo> list) {
+		for (EmailBo emailBo : list) {
+			try {
+				sendEmailUtil.patentSend(emailBo);
+			} catch (UnsupportedEncodingException | MessagingException e) {
+				e.printStackTrace();
+			}
+		}
+		
 	}
 	
 	
 	public void send(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
-		SendEmailUtil.getInstance().send(bo);
+		sendEmailUtil.send(bo);
 	}
 	
 	public void addNotice(Notice n ) {
@@ -59,4 +72,7 @@ public class AsyncUtils {
 		
 	}
 
+
+	
+
 }

+ 4 - 0
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -783,9 +783,13 @@ public class ExcelUtils {
         //获取excel文件的io流
         InputStream is = file.getInputStream();
         //如果是xls,使用HSSFWorkbook;如果是xlsx,使用XSSFWorkbook
+        System.out.println(file.getOriginalFilename());
+        System.out.println(file.getOriginalFilename().matches("^.+\\.(?i)(xls)$"));
+        System.out.println(file.getOriginalFilename().matches("^.+\\.(?i)(xlsx)$"));
         if(file.getOriginalFilename().matches("^.+\\.(?i)(xls)$"))workbook = new HSSFWorkbook(is);
         if(file.getOriginalFilename().matches("^.+\\.(?i)(xlsx)$"))workbook = new XSSFWorkbook(is);
         } catch (IOException e) {
+        	e.getLocalizedMessage();
         }
         return workbook;
         }

+ 7 - 1
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -1,5 +1,6 @@
 package com.goafanti.organization.service.impl;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -25,6 +26,8 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	private OrganizationManagementMapper organizationManagementMapper;
 	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
+	
+	List<OrganizationListOut> depList =new ArrayList<OrganizationListOut>();
 	@Override
 	public Pagination<OrganizationListOut> listOrganizationManagement(OrganizationListOut olo, Integer pageNo,
 			Integer pageSize) {
@@ -52,7 +55,10 @@ public class OrganizationServiceImpl extends BaseMybatisDao<OrganizationManageme
 	}
 	@Override
 	public List<OrganizationListOut> selectSuperId(Integer i) {
-		return organizationManagementMapper.selectSuperId(i);
+		if (depList.isEmpty()) {
+			depList=organizationManagementMapper.selectSuperId(i);
+		}
+		return depList;
 	}
 	/**
 	 *   XXIn form 提交 ,bo包中

+ 5 - 5
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -61,7 +61,7 @@ public class PatentNewBo extends PatentNew{
 	private String aname;
 	private String updateTimes;
 	private String startDate;
-	private String endDate;
+	private String endDates;
 	private String departmentId;
 	private String createStart;
 	private String createEnd;
@@ -188,11 +188,11 @@ public class PatentNewBo extends PatentNew{
 	public void setStartDate(String startDate) {
 		this.startDate = startDate;
 	}
-	public String getEndDate() {
-		return endDate;
+	public String getEndDates() {
+		return endDates;
 	}
-	public void setEndDate(String endDate) {
-		this.endDate = endDate;
+	public void setEndDates(String endDates) {
+		this.endDates = endDates;
 	}
 	public String getDepName() {
 		return depName;

+ 45 - 18
src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java

@@ -20,8 +20,8 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.model.Attachment;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.patent.bo.PatentNewBo;
 import com.goafanti.patent.service.PatentNewService;
 
@@ -72,21 +72,9 @@ public class AdminPatentNewApiController extends CertifyApiController {
 	@RequestMapping(value = "/updatePatentNew", method = RequestMethod.POST)
 	public Result updatePatentNew(PatentNewBo p){
 		Result res = new Result();
-		if (StringUtils.isBlank(p.getPatentNo())|| StringUtils.isBlank(p.getName())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "专利", "专利"));
-			return res;
-		}
-		if ( StringUtils.isBlank(p.getEmail())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "邮箱", "邮箱"));
-			return res;
-		}
-		SimpleDateFormat sdf = new SimpleDateFormat( AFTConstants.YYYYMMDD);
-		try {
-			p.setApplyDate(sdf.parse(p.getApplyDates()));
-			p.setAuthorizationDate(sdf.parse(p.getAuthorizationDates()));
-		} catch (ParseException e) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "时间", "时间"));
-			return res;
+		if (p.getApplyDates()!=null||p.getAuthorizationDates()!=null) {
+			p.setApplyDate(DateUtils.StringToDate(p.getApplyDates(),AFTConstants.YYYYMMDD));
+			p.setAuthorizationDate(DateUtils.StringToDate(p.getAuthorizationDates(),AFTConstants.YYYYMMDD));
 		}
 		return res.data(patentNewService.updatePatenNew(p));
 	}
@@ -133,7 +121,7 @@ public class AdminPatentNewApiController extends CertifyApiController {
 	/**
 	 * 导出专利列表
 	 */
-	@RequestMapping(value = "/exportMode", method = RequestMethod.GET)
+	@RequestMapping(value = "/exportTemplate", method = RequestMethod.GET)
 	public Result export(HttpServletResponse response, String sign){
         Result res = new Result();
         AttachmentType attachmentType = AttachmentType.getField(sign);
@@ -145,7 +133,7 @@ public class AdminPatentNewApiController extends CertifyApiController {
             } else {
                 String path = af.getFilePath();
                 String suffix = path.substring(path.lastIndexOf("."));
-                fileName = AttachmentType.RECEIVABLES_TEMPLATE.getDesc() + suffix;
+                fileName = AttachmentType.NEW_PATENT_TEMPLATE.getDesc() + suffix;
                 downloadFile(response, fileName, path);
             }
         } else {
@@ -177,5 +165,44 @@ public class AdminPatentNewApiController extends CertifyApiController {
          res.data(1); 
     	return res;
     }
+    
+    
+    /**
+     * 专利缴费详情
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/patentPaymentDetails",method = RequestMethod.GET)
+    public Result patentPaymentDetails(Integer id) {
+    	Result res =new Result();
+    	if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
+			return res;
+		}
+    	res.data(patentNewService.pushPatentPaymentDetails(id));
+    	return res;
+    }
+    
+    /**
+     * 批量操作
+     * @param ids
+     * @param type 0 标记已通知 1批量发邮件
+     * @return
+     */
+    @RequestMapping(value = "/updateBatch",method = RequestMethod.GET)
+    public Result updateBatch(String ids,Integer type) {
+    	Result res =new Result();
+    	if (ids==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
+			return res;
+		}
+    	if (type==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"操作类型"));
+			return res;
+		}
+    	res.data(patentNewService.updateBatch(ids, type));
+    	return res;
+    }
+    
 	
 }

+ 6 - 0
src/main/java/com/goafanti/patent/service/PatentNewService.java

@@ -34,4 +34,10 @@ public interface PatentNewService {
 
 	void pushImportTemplate(MultipartFile file);
 
+
+	Object pushPatentPaymentDetails(Integer id);
+
+	  
+	Object updateBatch(String ids, Integer type);
+
 }

+ 50 - 15
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -9,7 +9,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -18,19 +20,23 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.PatentNewLogMapper;
 import com.goafanti.common.dao.PatentNewMapper;
 import com.goafanti.common.dao.PatentPaymentDetailsMapper;
 import com.goafanti.common.dao.PatentYearPaymentMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.model.PatentNewLog;
 import com.goafanti.common.model.PatentPaymentDetails;
 import com.goafanti.common.model.PatentYearPayment;
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExcelUtils;
 import com.goafanti.common.utils.excel.NewExcelUtil;
@@ -52,6 +58,10 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 	private PatentPaymentDetailsMapper	patentPaymentDetailsMapper;
 	@Autowired
 	private PatentYearPaymentMapper	patentYearPaymentMapper;
+	@Autowired
+	private AsyncUtils asyncUtils;
+	@Autowired
+	private AdminMapper	adminMapper;
 	
 	private List<PatentYearPayment> patentYear=new ArrayList<PatentYearPayment>(); 
 
@@ -157,7 +167,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
     			}
     			boolean flag = false;
     			for(Cell c:r){
-    				if(c.getCellType() != Cell.CELL_TYPE_BLANK){
+    				if(c.getCellTypeEnum() != CellType._NONE){
     					flag = true;
     					break;
     				}
@@ -245,6 +255,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		        trb.setStatus(0);
 		        trb.setNewType(1);
 		        trb.setYears(getyear(trb));
+		        trb.setPatentAmount(sumAmout(trb.getType(),trb.getTid(),trb.getYears()));
 		        list.add(trb);
 		    }
     		
@@ -262,16 +273,6 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
     				}
     			}
     		}
-    		List<PatentNew> lp=patentNewMapper.selectByYear(0);
-    		for (PatentNew p : lp) {
-    			PatentNew n=new PatentNew();
-    			n.setId(p.getId());
-    			n.setYears(getyear(p));
-    			p.setYears(n.getYears());
-    			n.setPatentAmount(sumAmout(p.getType(),p.getTid(),p.getYears()));
-    			sumYears(p);
-    			patentNewMapper.updateByPrimaryKeySelective(n);
-			}
         }
         
     }
@@ -284,10 +285,14 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		int y=now.get(Calendar.YEAR);
 		int z=y-x;
 		if (z==0) z=1;
+		Calendar end=Calendar.getInstance();
+		end.setTime(p.getApplyDate());
+		end.add(Calendar.YEAR, z);
+		p.setEndDate(end.getTime());
 		return z;
 	}
 
-	private void sumYears(PatentNew trb) {
+	private List<PatentPaymentDetails> sumYears(PatentNew trb) {
 		if (trb.getApplyDate()!=null) {
 			Calendar apply =Calendar.getInstance();
 			apply.setTime(trb.getApplyDate());
@@ -304,7 +309,9 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 				}
 			}
 			patentPaymentDetailsMapper.insertBatch(list);
+			return list;
 		}
+		return null;
 		
 	}
 
@@ -354,7 +361,35 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		return excel.exportExcel(list, "专利列表",uploadPath);
 	}
 
-	
-	
-	
+	@Override
+	public Object pushPatentPaymentDetails(Integer id) {
+		List<PatentPaymentDetails> list =patentPaymentDetailsMapper.selectByPid(id);
+		if (list==null||list.isEmpty()) {
+			PatentNew pt=patentNewMapper.selectByPrimaryKey(id);
+			return sumYears(pt);
+		}
+		return list;
+	}
+
+	/** @param type 0 标记已通知 1批量发邮件
+	   */
+	@Override
+	public Object updateBatch(String ids, Integer type) {
+		String [] s=ids.split(",");
+		if(type==1) {
+			List<EmailBo>list =new ArrayList<EmailBo>();
+			List<PatentNew> lp=patentNewMapper.selectByids(s);
+			for (PatentNew patentNew : lp) {
+				Admin a = adminMapper.selectByPrimaryKey(patentNew.getAid());
+				String userName=patentNewMapper.selectUserNameByTid(patentNew.getTid());
+				EmailBo emailBo = new EmailBo("专利提醒", patentNew.getEmail().trim(), userName, "科德集团", a.getName(),
+						patentNew.getName(), patentNew.getPatentNo(), patentNew.getPatentAmount().toEngineeringString(),
+						DateFormatUtils.format(patentNew.getEndDate(), "yyyy-MM-dd"), patentNew.getStatus());
+				list.add(emailBo);
+			}
+			asyncUtils.sendList(list);
+		}
+		patentNewMapper.updateBatch(s);
+		return 1;
+	}
 }