Bladeren bron

Merge branch 'test' of jishutao/kede-server into prod

anderx 4 jaren geleden
bovenliggende
commit
92368a1f68

+ 6 - 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	int insert(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	int insertSelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	PatentNew selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	int updateByPrimaryKeySelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	int updateByPrimaryKey(PatentNew record);
 

+ 2 - 3
src/main/java/com/goafanti/common/enums/OfficialType.java

@@ -6,10 +6,9 @@ import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
 
 public enum OfficialType {
-	/* 0实用新型 1外观专利 2发明专利 */
 	SYXX(0,"实用新型"),
-	WGZL(1,"外观专利"),
-	FMZL(2,"发明专利"),
+	FMZL(1,"发明专利"),
+	WGZL(2,"外观专利"),
 	NOT(99,"未知");
 	
 	private OfficialType(Integer code, String desc) {

+ 47 - 12
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 Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
@@ -31,23 +31,26 @@
     <result column="salesman_remind" jdbcType="INTEGER" property="salesmanRemind" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="new_type" jdbcType="INTEGER" property="newType" />
+    <result column="delaying_amount" jdbcType="DECIMAL" property="delayingAmount" />
+    <result column="recovery_amount" jdbcType="DECIMAL" property="recoveryAmount" />
+    <result column="input_name" jdbcType="VARCHAR" property="inputName" />
   </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 Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 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
+    new_type, delaying_amount, recovery_amount, input_name
   </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 Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -58,7 +61,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     delete from patent_new
     where id = #{id,jdbcType=INTEGER}
@@ -67,7 +70,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     insert into patent_new (id, patent_no, `name`, 
       `type`, `status`, apply_date, 
@@ -76,7 +79,8 @@
       certificate_url, create_time, update_time, 
       aid, `years`, `uid`, holders, 
       inventor, annual_fee_status, salesman_remind, 
-      tid, new_type)
+      tid, new_type, delaying_amount, 
+      recovery_amount, input_name)
     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}, 
@@ -84,13 +88,14 @@
       #{certificateUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{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})
+      #{tid,jdbcType=INTEGER}, #{newType,jdbcType=INTEGER}, #{delayingAmount,jdbcType=DECIMAL}, 
+      #{recoveryAmount,jdbcType=DECIMAL}, #{inputName,jdbcType=VARCHAR})
   </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 Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     insert into patent_new
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -166,6 +171,15 @@
       <if test="newType != null">
         new_type,
       </if>
+      <if test="delayingAmount != null">
+        delaying_amount,
+      </if>
+      <if test="recoveryAmount != null">
+        recovery_amount,
+      </if>
+      <if test="inputName != null">
+        input_name,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -240,13 +254,22 @@
       <if test="newType != null">
         #{newType,jdbcType=INTEGER},
       </if>
+      <if test="delayingAmount != null">
+        #{delayingAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="recoveryAmount != null">
+        #{recoveryAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="inputName != null">
+        #{inputName,jdbcType=VARCHAR},
+      </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 Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     update patent_new
     <set>
@@ -319,6 +342,15 @@
       <if test="newType != null">
         new_type = #{newType,jdbcType=INTEGER},
       </if>
+      <if test="delayingAmount != null">
+        delaying_amount = #{delayingAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="recoveryAmount != null">
+        recovery_amount = #{recoveryAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="inputName != null">
+        input_name = #{inputName,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -326,7 +358,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 05 11:46:54 CST 2021.
+      This element was generated on Thu Aug 05 17:02:04 CST 2021.
     -->
     update patent_new
     set patent_no = #{patentNo,jdbcType=VARCHAR},
@@ -351,7 +383,10 @@
       annual_fee_status = #{annualFeeStatus,jdbcType=INTEGER},
       salesman_remind = #{salesmanRemind,jdbcType=INTEGER},
       tid = #{tid,jdbcType=INTEGER},
-      new_type = #{newType,jdbcType=INTEGER}
+      new_type = #{newType,jdbcType=INTEGER},
+      delaying_amount = #{delayingAmount,jdbcType=DECIMAL},
+      recovery_amount = #{recoveryAmount,jdbcType=DECIMAL},
+      input_name = #{inputName,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   

+ 146 - 74
src/main/java/com/goafanti/common/model/PatentNew.java

@@ -8,134 +8,149 @@ public class PatentNew implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.id
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 17:02:04 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  Thu Aug 05 17:02:04 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_name
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
+	 */
+	private String inputName;
+	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -144,7 +159,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -153,7 +168,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getPatentNo() {
 		return patentNo;
@@ -162,7 +177,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setPatentNo(String patentNo) {
 		this.patentNo = patentNo == null ? null : patentNo.trim();
@@ -171,7 +186,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getName() {
 		return name;
@@ -180,7 +195,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setName(String name) {
 		this.name = name == null ? null : name.trim();
@@ -189,7 +204,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getType() {
 		return type;
@@ -198,7 +213,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -207,7 +222,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getStatus() {
 		return status;
@@ -216,7 +231,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -225,7 +240,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Date getApplyDate() {
 		return applyDate;
@@ -234,7 +249,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setApplyDate(Date applyDate) {
 		this.applyDate = applyDate;
@@ -243,7 +258,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Date getAuthorizationDate() {
 		return authorizationDate;
@@ -252,7 +267,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setAuthorizationDate(Date authorizationDate) {
 		this.authorizationDate = authorizationDate;
@@ -261,7 +276,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public BigDecimal getPatentAmount() {
 		return patentAmount;
@@ -270,7 +285,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setPatentAmount(BigDecimal patentAmount) {
 		this.patentAmount = patentAmount;
@@ -279,7 +294,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getApplicant() {
 		return applicant;
@@ -288,7 +303,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setApplicant(String applicant) {
 		this.applicant = applicant == null ? null : applicant.trim();
@@ -297,7 +312,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getProvince() {
 		return province;
@@ -306,7 +321,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setProvince(Integer province) {
 		this.province = province;
@@ -315,7 +330,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getContactMobile() {
 		return contactMobile;
@@ -324,7 +339,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setContactMobile(String contactMobile) {
 		this.contactMobile = contactMobile == null ? null : contactMobile.trim();
@@ -333,7 +348,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getEmail() {
 		return email;
@@ -342,7 +357,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setEmail(String email) {
 		this.email = email == null ? null : email.trim();
@@ -351,7 +366,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getCertificateUrl() {
 		return certificateUrl;
@@ -360,7 +375,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setCertificateUrl(String certificateUrl) {
 		this.certificateUrl = certificateUrl == null ? null : certificateUrl.trim();
@@ -369,7 +384,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -378,7 +393,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -387,7 +402,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -396,7 +411,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -405,7 +420,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -414,7 +429,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setAid(String aid) {
 		this.aid = aid == null ? null : aid.trim();
@@ -423,7 +438,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getYears() {
 		return years;
@@ -432,7 +447,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setYears(Integer years) {
 		this.years = years;
@@ -441,7 +456,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getUid() {
 		return uid;
@@ -450,7 +465,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setUid(String uid) {
 		this.uid = uid == null ? null : uid.trim();
@@ -459,7 +474,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getHolders() {
 		return holders;
@@ -468,7 +483,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setHolders(String holders) {
 		this.holders = holders == null ? null : holders.trim();
@@ -477,7 +492,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public String getInventor() {
 		return inventor;
@@ -486,7 +501,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setInventor(String inventor) {
 		this.inventor = inventor == null ? null : inventor.trim();
@@ -495,7 +510,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getAnnualFeeStatus() {
 		return annualFeeStatus;
@@ -504,7 +519,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setAnnualFeeStatus(Integer annualFeeStatus) {
 		this.annualFeeStatus = annualFeeStatus;
@@ -513,7 +528,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getSalesmanRemind() {
 		return salesmanRemind;
@@ -522,7 +537,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setSalesmanRemind(Integer salesmanRemind) {
 		this.salesmanRemind = salesmanRemind;
@@ -531,7 +546,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getTid() {
 		return tid;
@@ -540,7 +555,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
@@ -549,7 +564,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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public Integer getNewType() {
 		return newType;
@@ -558,15 +573,69 @@ 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  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	public void setNewType(Integer newType) {
 		this.newType = newType;
 	}
 
 	/**
+	 * 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  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public BigDecimal getDelayingAmount() {
+		return delayingAmount;
+	}
+
+	/**
+	 * 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  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public void setDelayingAmount(BigDecimal delayingAmount) {
+		this.delayingAmount = delayingAmount;
+	}
+
+	/**
+	 * 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  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public BigDecimal getRecoveryAmount() {
+		return recoveryAmount;
+	}
+
+	/**
+	 * 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  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public void setRecoveryAmount(BigDecimal recoveryAmount) {
+		this.recoveryAmount = recoveryAmount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.input_name
+	 * @return  the value of patent_new.input_name
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public String getInputName() {
+		return inputName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.input_name
+	 * @param inputName  the value for patent_new.input_name
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
+	 */
+	public void setInputName(String inputName) {
+		this.inputName = inputName == null ? null : inputName.trim();
+	}
+
+	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Thu Aug 05 11:46:54 CST 2021
+	 * @mbg.generated  Thu Aug 05 17:02:04 CST 2021
 	 */
 	@Override
 	public String toString() {
@@ -598,6 +667,9 @@ public class PatentNew implements Serializable {
 		sb.append(", salesmanRemind=").append(salesmanRemind);
 		sb.append(", tid=").append(tid);
 		sb.append(", newType=").append(newType);
+		sb.append(", delayingAmount=").append(delayingAmount);
+		sb.append(", recoveryAmount=").append(recoveryAmount);
+		sb.append(", inputName=").append(inputName);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();

+ 2 - 0
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -52,6 +52,7 @@ import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
 import org.apache.poi.xssf.usermodel.XSSFDataValidation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
@@ -73,6 +74,7 @@ public class NewExcelUtil<T> {
 	 */
 	public static final int sheetSize = 65536;
 	
+	@Value(value = "upload.path")
 	public  String downloadPath = "";
 	
 	

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

@@ -1,6 +1,8 @@
 package com.goafanti.patent.bo;
 
 
+import java.math.BigDecimal;
+
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.utils.excel.Excel;
 
@@ -31,16 +33,108 @@ public class PatentNewBo extends PatentNew{
 	private Integer annualFeeStatus;
 	@Excel(name = "营销员提醒状态",readConverterExp = "0=未提醒,1=已提醒")
 	private Integer salesmanRemind;
-	private String aname;
+	@Excel(name = "email")
+	private String email;
+	@Excel(name = "年费/滞纳金/恢复")
+	private BigDecimal amountCount;
+	@Excel(name = "客户名称")
+	private String userName;
+	@Excel(name = "项目名称")
+	private String projectName;
+	@Excel(name = "项目编号")
+	private Integer tid;
+	@Excel(name = "营销员")
+	private String salesmanName;
+	@Excel(name = "咨询师")
+	private String techName;
+	@Excel(name = "派单部门")
 	private String depName;
+	@Excel(name = "录入人")
+	private String inputName;
+	@Excel(name = "录入时间")
 	private String createTimes;
+	@Excel(name = "跟进人")
+	private String aname;
 	private String updateTimes;
 	private String startDate;
 	private String endDate;
 	private String departmentId;
 	private String createStart;
 	private String createEnd;
-	private String userName;
+	
+	
+	public String getPatentNo() {
+		return patentNo;
+	}
+	public void setPatentNo(String patentNo) {
+		this.patentNo = patentNo;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	public String getHolders() {
+		return holders;
+	}
+	public void setHolders(String holders) {
+		this.holders = holders;
+	}
+	public String getInventor() {
+		return inventor;
+	}
+	public void setInventor(String inventor) {
+		this.inventor = inventor;
+	}
+	public Integer getAnnualFeeStatus() {
+		return annualFeeStatus;
+	}
+	public void setAnnualFeeStatus(Integer annualFeeStatus) {
+		this.annualFeeStatus = annualFeeStatus;
+	}
+	public Integer getSalesmanRemind() {
+		return salesmanRemind;
+	}
+	public void setSalesmanRemind(Integer salesmanRemind) {
+		this.salesmanRemind = salesmanRemind;
+	}
+	public String getEmail() {
+		return email;
+	}
+	public void setEmail(String email) {
+		this.email = email;
+	}
+	public BigDecimal getAmountCount() {
+		return amountCount;
+	}
+	public void setAmountCount(BigDecimal amountCount) {
+		this.amountCount = amountCount;
+	}
+	public String getProjectName() {
+		return projectName;
+	}
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+	public Integer getTid() {
+		return tid;
+	}
+	public void setTid(Integer tid) {
+		this.tid = tid;
+	}
+	public String getInputName() {
+		return inputName;
+	}
+	public void setInputName(String inputName) {
+		this.inputName = inputName;
+	}
 	public String getApplyDates() {
 		return applyDates;
 	}
@@ -113,4 +207,16 @@ public class PatentNewBo extends PatentNew{
 	public void setCreateEnd(String createEnd) {
 		this.createEnd = createEnd;
 	}
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
+	public String getTechName() {
+		return techName;
+	}
+	public void setTechName(String techName) {
+		this.techName = techName;
+	}
 }

+ 36 - 0
src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java

@@ -9,12 +9,15 @@ import javax.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 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;
 
@@ -112,4 +115,37 @@ public class AdminPatentNewApiController extends CertifyApiController {
 		return res;
 	}
 	
+	/**
+	 * 专利列表
+	 */
+	@RequestMapping(value = "/export", method = RequestMethod.GET)
+	public Result export(PatentNewBo p,Integer pageSize,Integer pageNo){
+		Result res = new Result();
+		return res.data(patentNewService.export( p, pageSize, pageNo));
+	}
+	
+	/**
+	 * 	Excel批量导入专利
+     * 
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/import" , method = RequestMethod.POST)
+    public Result importTemplate(@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request) {
+    	Result res=new Result();
+    	//判断文件是否存在
+        if(null == file){
+      	  res.getError().add(buildError("文件不存在!","文件不存在!"));
+      	  return res;
+        }
+    	String fileName = file.getOriginalFilename();
+    	if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) {
+        	  res.getError().add(buildError("格式不正确","格式不正确"));
+        	  return res;
+          }
+    	patentNewService.importTemplate(file);
+         res.data(1); 
+    	return res;
+    }
+	
 }

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

@@ -2,6 +2,8 @@ package com.goafanti.patent.service;
 
 import java.util.List;
 
+import org.springframework.web.multipart.MultipartFile;
+
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.model.PatentNewLog;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -27,4 +29,8 @@ public interface PatentNewService {
 
 	List<PatentNewLog> selectPatentNewLog(Integer id);
 
+	void importTemplate(MultipartFile file);
+
+	Object export(PatentNewBo p, Integer pageSize, Integer pageNo);
+
 }

+ 128 - 2
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -1,21 +1,35 @@
 package com.goafanti.patent.service.impl;
 
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
+import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.PatentNewLogMapper;
 import com.goafanti.common.dao.PatentNewMapper;
+import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.model.PatentNewLog;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.ExcelUtils;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.TemporaryReceivablesBo;
 import com.goafanti.patent.bo.PatentNewBo;
 import com.goafanti.patent.service.PatentNewService;
 @Service
@@ -43,6 +57,12 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		Map<String, Object> params = new HashMap<>();
 		if (pageNo == null || pageNo < 0) pageNo = 1;
 		if (pageSize == null || pageSize < 0)	pageSize = 10;
+		pushParams(p, params);
+		return (Pagination<PatentNewBo>) findPage("selectPatentNewList", "selectPatentNewCount", params, pageNo,
+				pageSize);
+	}
+
+	private void pushParams(PatentNewBo p, Map<String, Object> params) {
 		if(p.getStatus()!=null)params.put("status", p.getStatus());
 		if(p.getName()!=null)params.put("name", p.getName());
 		if(p.getAname()!=null)params.put("aname", p.getAname());
@@ -61,8 +81,6 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		} else   {
 			params.put("shiro", 0);
 		}
-		return (Pagination<PatentNewBo>) findPage("selectPatentNewList", "selectPatentNewCount", params, pageNo,
-				pageSize);
 	}
 
 	@Override
@@ -90,6 +108,114 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		return patentNewLogMapper.selectPatentNewLog(id);
 	}
 
+	@Override
+	public void importTemplate(MultipartFile file) {
+		 //获得Workbook工作薄对象
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        //创建一个对象,用来存储数据
+        List<TemporaryReceivablesBo> list=new ArrayList<>();
+        if(workbook != null){
+        	//获得当前sheet工作表
+    		Sheet sheet = workbook.getSheetAt(0);
+    		if(sheet == null){
+    			return;
+    		}
+    		
+    		//获得当前sheet的开始行
+    		int firstRowNum = sheet.getFirstRowNum();
+    		//获得当前sheet的结束行
+    		int lastRowNum = sheet.getLastRowNum();
+    		//处理空白行
+    		for (int i = firstRowNum; i <= sheet.getLastRowNum();i++) {
+    			Row r = sheet.getRow(i);
+    			if(r == null){
+    				// 如果是空行(即没有任何数据、格式),直接把它以下的数据往上移动
+    				sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
+    				continue;
+    			}
+    			boolean flag = false;
+    			for(Cell c:r){
+    				if(c.getCellType() != Cell.CELL_TYPE_BLANK){
+    					flag = true;
+    					break;
+    				}
+    			}
+    			if(flag){
+    				i++;
+    				continue;
+    			} else{//如果是空白行(即可能没有数据,但是有一定格式)
+    				if(i == sheet.getLastRowNum())//如果到了最后一行,直接将那一行remove掉
+    					sheet.removeRow(r);
+    				else//如果还没到最后一行,则数据往上移一行
+    				    sheet.shiftRows(i+1, sheet.getLastRowNum(),-1);
+    			}
+    		}
+    		lastRowNum=sheet.getLastRowNum();
+    		if (lastRowNum<2) {
+    			throw new BusinessException(new Error("未找到正确的参数。"));
+			}
+    		//循环除了第2行的所有行
+    		for(int rowNum = firstRowNum+2;rowNum <= lastRowNum;rowNum++){
+        		//获得当前行
+				Row row = sheet.getRow(rowNum);
+				if(row == null){
+					continue;
+				}
+	        	//获得当前行的开始列
+	        	int firstCellNum = row.getFirstCellNum();
+	        	//获得当前行的列数
+	        	int lastCellNum = row.getLastCellNum();
+		        //循环当前行 cellNum = (firstCellNum+1) 则是除开第一例
+	        	TemporaryReceivablesBo trb=new TemporaryReceivablesBo();
+		        for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
+			        Cell cell = row.getCell(cellNum);
+			    	try {
+			        switch (cellNum) {
+					case 0:
+						trb.setFinancialPayNo(ExcelUtils.getCellValue(cell));
+						break;
+					case 1:
+						trb.setOrderNo(ExcelUtils.getCellValue(cell).trim());
+						break;
+					case 2:
+						trb.setCorporateName(ExcelUtils.getCellValue(cell));
+						break;
+					case 3:
+						trb.setAmount(new BigDecimal((ExcelUtils.getCellValue(cell).equals("")?"0":ExcelUtils.getCellValue(cell))));
+						break;
+					case 4:
+						trb.setReceivablesTime(DateUtils.StringToDate(ExcelUtils.getCellValue(cell), AFTConstants.YYYYMMDD));
+						break;
+					case 5:
+						trb.setRemarks(ExcelUtils.getCellValue(cell));
+						break;
+					}
+			    	} catch (Exception e) {
+			    		throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
+					}
+		        }
+		        trb.setAid(TokenManager.getAdminId());
+		        trb.setCreateTime(new Date());
+		        trb.setStatus(0);
+		        list.add(trb);
+    		}
+        }
+        
+    }
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Object export(PatentNewBo p, Integer pageSize, Integer pageNo) {
+		NewExcelUtil<PatentNewBo> excel=new NewExcelUtil<PatentNewBo>(PatentNewBo.class);
+		Map<String, Object> params = new HashMap<>();
+		if (pageNo == null || pageNo < 0) pageNo = 1;
+		if (pageSize == null || pageSize < 0)	pageSize = 99999;
+		pushParams(p, params);
+		List<PatentNewBo> list= (List<PatentNewBo>) findList("selectPatentNewList", params, pageNo,
+				pageSize);
+		return excel.exportExcel(list, "专利列表");
+	}
+