Browse Source

高企年报

Antiloveg 8 years ago
parent
commit
7bbab8d52e

+ 15 - 1
schema/2017-03-08.sql

@@ -6,4 +6,18 @@ add `stock_code` VARCHAR(32)   NULL   COMMENT '股票代码'
 
 ALTER TABLE `org_human_resource` 
 add `new_employment` int(6)   NULL   COMMENT '新增就业人数' AFTER `year`,
-add `graduate_number` int(6)   NULL   COMMENT '高校应届毕业生人数'  AFTER `new_employment`
+add `graduate_number` int(6)   NULL   COMMENT '高校应届毕业生人数'  AFTER `new_employment`
+
+CREATE TABLE IF NOT EXISTS `aft_dev`.`org_annual_report` (
+  `id` VARCHAR(36) NOT NULL,
+  `uid` VARCHAR(36) NULL,
+  `create_time` DATETIME NULL COMMENT '创建时间',
+  `last_update_time` DATETIME NULL COMMENT '最近跟新时间',
+  `total_tax` DECIMAL(8,2) NULL COMMENT '纳税总额(万元)',
+  `income_tax_relief` DECIMAL(8,2) NULL COMMENT '所得税减免(万元)',
+  `total_export_volume` DECIMAL(8,2) NULL COMMENT '出口创汇总额(万元)',
+  `year` INT(4) NULL COMMENT '年份',
+  `state` INT(1) NULL DEFAULT 0 COMMENT '年报状态',
+  `deleted_sign` INT(1) NOT NULL DEFAULT 0 COMMENT '删除标记',
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB

+ 21 - 0
src/main/java/com/goafanti/common/dao/OrgAnnualReportMapper.java

@@ -0,0 +1,21 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.common.model.OrgAnnualReport;
+
+public interface OrgAnnualReportMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrgAnnualReport record);
+
+    int insertSelective(OrgAnnualReport record);
+
+    OrgAnnualReport selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrgAnnualReport record);
+
+    int updateByPrimaryKey(OrgAnnualReport record);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+}

+ 197 - 0
src/main/java/com/goafanti/common/mapper/OrgAnnualReportMapper.xml

@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.goafanti.common.dao.OrgAnnualReportMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgAnnualReport" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="total_tax" property="totalTax" jdbcType="DECIMAL" />
+    <result column="income_tax_relief" property="incomeTaxRelief" jdbcType="DECIMAL" />
+    <result column="total_export_volume" property="totalExportVolume" jdbcType="DECIMAL" />
+    <result column="year" property="year" jdbcType="INTEGER" />
+    <result column="state" property="state" jdbcType="INTEGER" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, create_time, last_update_time, total_tax, income_tax_relief, total_export_volume, 
+    year, state, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_annual_report
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_annual_report
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgAnnualReport" >
+    insert into org_annual_report (id, uid, create_time, 
+      last_update_time, total_tax, income_tax_relief, 
+      total_export_volume, year, state, 
+      deleted_sign)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{lastUpdateTime,jdbcType=TIMESTAMP}, #{totalTax,jdbcType=DECIMAL}, #{incomeTaxRelief,jdbcType=DECIMAL}, 
+      #{totalExportVolume,jdbcType=DECIMAL}, #{year,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, 
+      #{deletedSign,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgAnnualReport" >
+    insert into org_annual_report
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="lastUpdateTime != null" >
+        last_update_time,
+      </if>
+      <if test="totalTax != null" >
+        total_tax,
+      </if>
+      <if test="incomeTaxRelief != null" >
+        income_tax_relief,
+      </if>
+      <if test="totalExportVolume != null" >
+        total_export_volume,
+      </if>
+      <if test="year != null" >
+        year,
+      </if>
+      <if test="state != null" >
+        state,
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lastUpdateTime != null" >
+        #{lastUpdateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="totalTax != null" >
+        #{totalTax,jdbcType=DECIMAL},
+      </if>
+      <if test="incomeTaxRelief != null" >
+        #{incomeTaxRelief,jdbcType=DECIMAL},
+      </if>
+      <if test="totalExportVolume != null" >
+        #{totalExportVolume,jdbcType=DECIMAL},
+      </if>
+      <if test="year != null" >
+        #{year,jdbcType=INTEGER},
+      </if>
+      <if test="state != null" >
+        #{state,jdbcType=INTEGER},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgAnnualReport" >
+    update org_annual_report
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lastUpdateTime != null" >
+        last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="totalTax != null" >
+        total_tax = #{totalTax,jdbcType=DECIMAL},
+      </if>
+      <if test="incomeTaxRelief != null" >
+        income_tax_relief = #{incomeTaxRelief,jdbcType=DECIMAL},
+      </if>
+      <if test="totalExportVolume != null" >
+        total_export_volume = #{totalExportVolume,jdbcType=DECIMAL},
+      </if>
+      <if test="year != null" >
+        year = #{year,jdbcType=INTEGER},
+      </if>
+      <if test="state != null" >
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgAnnualReport" >
+    update org_annual_report
+    set uid = #{uid,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
+      total_tax = #{totalTax,jdbcType=DECIMAL},
+      income_tax_relief = #{incomeTaxRelief,jdbcType=DECIMAL},
+      total_export_volume = #{totalExportVolume,jdbcType=DECIMAL},
+      year = #{year,jdbcType=INTEGER},
+      state = #{state,jdbcType=INTEGER},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="findOrgAnnualReportListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_annual_report
+    where deleted_sign = 0
+    <if test="year != null">
+	    and  year = #{year,jdbcType=INTEGER}
+	</if>
+	<if test="state != null">
+		and state = #{state,jdbcType=INTEGER}
+	</if>
+	<if test="uid != null">
+		and uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	order by create_time desc
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
+    
+  </select>
+  
+  <select id="findOrgAnnualReportCount" resultType="java.lang.Integer" parameterType="String">
+	   	select count(1) 
+		    from org_annual_report
+	    where deleted_sign = 0
+		<if test="year != null">
+		    and  year = #{year,jdbcType=INTEGER}
+		</if>
+		<if test="state != null">
+			and state = #{state,jdbcType=INTEGER}
+		</if>
+		<if test="uid != null">
+			and uid = #{uid,jdbcType=VARCHAR}
+		</if>
+  </select>
+    
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+	  	update org_annual_report set deleted_sign = 1
+	  	where  id in 
+		<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+			#{item}
+		</foreach>
+  </update>
+</mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml

@@ -264,6 +264,6 @@
     select 
     <include refid="Base_Column_List" />
     from org_finance
-    where uid = #{0} and year = #{1}
+    where uid = #{0} and year = #{1} and deleted_sign = 0
   </select>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/OrgRatepayMapper.xml

@@ -238,6 +238,6 @@
     select 
     <include refid="Base_Column_List" />
     from org_ratepay
-    where uid = #{0} and year = #{1}
+    where uid = #{0} and year = #{1} and deleted_sign = 0
   </select>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -47,7 +47,7 @@
     <result column="listed" property="listed" jdbcType="INTEGER" />
     <result column="listed_date" property="listedDate" jdbcType="TIMESTAMP" />
     <result column="listed_type" property="listedType" jdbcType="INTEGER" />
-    <result column="stock_code" property="stock_code" jdbcType="VARCHAR" />
+    <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, aft_username, 

+ 162 - 0
src/main/java/com/goafanti/common/model/OrgAnnualReport.java

@@ -0,0 +1,162 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class OrgAnnualReport {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 创建时间
+    */
+    private Date createTime;
+
+    /**
+    * 最近跟新时间
+    */
+    private Date lastUpdateTime;
+
+    /**
+    * 纳税总额(万元)
+    */
+    private BigDecimal totalTax;
+
+    /**
+    * 所得税减免(万元)
+    */
+    private BigDecimal incomeTaxRelief;
+
+    /**
+    * 出口创汇总额(万元)
+    */
+    private BigDecimal totalExportVolume;
+
+    /**
+    * 年份
+    */
+    private Integer year;
+
+    /**
+    * 年报状态
+    */
+    private Integer state;
+
+    /**
+    * 删除标记
+    */
+    private Integer deletedSign;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getLastUpdateTime() {
+        return lastUpdateTime;
+    }
+
+    public void setLastUpdateTime(Date lastUpdateTime) {
+        this.lastUpdateTime = lastUpdateTime;
+    }
+
+    public BigDecimal getTotalTax() {
+        return totalTax;
+    }
+
+    public void setTotalTax(BigDecimal totalTax) {
+        this.totalTax = totalTax;
+    }
+
+    public BigDecimal getIncomeTaxRelief() {
+        return incomeTaxRelief;
+    }
+
+    public void setIncomeTaxRelief(BigDecimal incomeTaxRelief) {
+        this.incomeTaxRelief = incomeTaxRelief;
+    }
+
+    public BigDecimal getTotalExportVolume() {
+        return totalExportVolume;
+    }
+
+    public void setTotalExportVolume(BigDecimal totalExportVolume) {
+        this.totalExportVolume = totalExportVolume;
+    }
+
+    public Integer getYear() {
+        return year;
+    }
+
+    public void setYear(Integer year) {
+        this.year = year;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+    
+    @JsonIgnore
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+    
+    public String getCreateTimeFormattedDate(){
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setCreateTimeFormattedDate(String createTimeFormattedDate){
+		
+	}
+	
+	public String getLastUpdateTimeFormattedDate(){
+		if (this.lastUpdateTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getLastUpdateTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setLastUpdateTimeFormattedDate(String lastUpdateTimeFormattedDate){
+		
+	}
+}

+ 1 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -93,7 +93,7 @@ public class FileUtils {
 		String suffix = mf.getOriginalFilename().substring(mf.getOriginalFilename().lastIndexOf("."));
 		String fileName = "";
 		if (isPrivate || sign != "") {
-			fileName = path + "/" + uid + "/" + sign + suffix;
+			fileName = path + uid + "/" + sign + suffix;
 
 		} else {
 			fileName = path + System.nanoTime() + suffix;

+ 396 - 0
src/main/java/com/goafanti/techservice/cognizance/bo/AnnualReportBo.java

@@ -0,0 +1,396 @@
+package com.goafanti.techservice.cognizance.bo;
+/**
+ * 企业年报
+ */
+
+public class AnnualReportBo {
+	
+	private String uid;
+	
+	/**
+	 * 企业名称
+	 */
+	private String unitName;
+	
+	/**
+	 * 组织机构代码
+	 */
+	private String orgCode;
+	
+	/**
+	 * 所属地区--省
+	 */
+	private String locationProvince;
+	
+	/**
+	 * 所属地区--市
+	 */
+	private String locationCity;
+	
+	/**
+	 * 所属地区--区
+	 */
+	private String locationArea;
+	
+	/**
+	 * 高企认定证书编号
+	 */
+	private String certificateNumber;
+	
+	/**
+	 * 企业联系人及联系方式
+	 */
+	private String contacts;
+	
+	/**
+	 * 发明专利数
+	 */
+	private Integer inventionPatent;
+	
+	/**
+	 * 国防专利数
+	 */
+	private Integer defensePatent;
+	
+	/**
+	 * 国家级农作物品种数
+	 */
+	private Integer nationalCrop;
+	
+	/**
+	 * 植物新品种数
+	 */
+	private Integer newPlantCariety;
+	
+	/**
+	 * 国家新药数
+	 */
+	private Integer nationalDrug;
+	
+	/**
+	 * 国家一级中药保护品种
+	 */
+	private Integer chineseMedicine;
+	
+	/**
+	 * 实用新型
+	 */
+	private Integer utilityPatent;
+	
+	/**
+	 * 集成电路布图设计专有权
+	 */
+	private Integer circuitDesign;
+	
+	/**
+	 * 外观设计
+	 */
+	private Integer exteriorPatent;
+	
+	/**
+	 * 软件著作权
+	 */
+	private Integer softwareWorks;
+	
+	/**
+	 * 职工总人数
+	 */
+	private Integer firmTotal;
+	
+	/**
+	 * 科技人员数
+	 */
+	private Integer techTotal;
+	
+	 /**
+     * 新增就业人数
+     */
+    private Integer newEmployment;
+    
+    /**
+     * 高校应届毕业生人数
+     */
+    private Integer graduateNumber;
+    
+    /**
+	 * 企业总收入
+	 */
+	private Integer totalRevenue;
+	
+	 /**
+	  * 销售收入(万元)
+	 */
+	private Integer salesRevenue; 
+	
+	/**
+	 * 所有者权益合计(万元)
+	*/
+	private Integer netAsset;
+	
+	/**
+	 * 近一年高新技术产品(服务)收入
+	 */
+	private Integer lastYearRevenue;
+	
+	/**
+     * 利润总额
+     */
+    private Integer grossProfit;
+    
+    /**
+	 * 研发费用总额
+	 */
+	private Integer researchCost;
+    
+    /**
+	 * 在中国境内研发费用
+	 */
+	private Integer territory;
+	
+	/**
+	 * 基础研究投入费用
+	 */
+	private Integer basicResearchCost;
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
+
+	public String getOrgCode() {
+		return orgCode;
+	}
+
+	public void setOrgCode(String orgCode) {
+		this.orgCode = orgCode;
+	}
+
+	public String getLocationProvince() {
+		return locationProvince;
+	}
+
+	public void setLocationProvince(String locationProvince) {
+		this.locationProvince = locationProvince;
+	}
+
+	public String getLocationCity() {
+		return locationCity;
+	}
+
+	public void setLocationCity(String locationCity) {
+		this.locationCity = locationCity;
+	}
+
+	public String getLocationArea() {
+		return locationArea;
+	}
+
+	public void setLocationArea(String locationArea) {
+		this.locationArea = locationArea;
+	}
+
+	public String getCertificateNumber() {
+		return certificateNumber;
+	}
+
+	public void setCertificateNumber(String certificateNumber) {
+		this.certificateNumber = certificateNumber;
+	}
+
+	public String getContacts() {
+		return contacts;
+	}
+
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+
+	public Integer getInventionPatent() {
+		return inventionPatent;
+	}
+
+	public void setInventionPatent(Integer inventionPatent) {
+		this.inventionPatent = inventionPatent;
+	}
+
+	public Integer getDefensePatent() {
+		return defensePatent;
+	}
+
+	public void setDefensePatent(Integer defensePatent) {
+		this.defensePatent = defensePatent;
+	}
+
+	public Integer getNationalCrop() {
+		return nationalCrop;
+	}
+
+	public void setNationalCrop(Integer nationalCrop) {
+		this.nationalCrop = nationalCrop;
+	}
+
+	public Integer getNewPlantCariety() {
+		return newPlantCariety;
+	}
+
+	public void setNewPlantCariety(Integer newPlantCariety) {
+		this.newPlantCariety = newPlantCariety;
+	}
+
+	public Integer getNationalDrug() {
+		return nationalDrug;
+	}
+
+	public void setNationalDrug(Integer nationalDrug) {
+		this.nationalDrug = nationalDrug;
+	}
+
+	public Integer getChineseMedicine() {
+		return chineseMedicine;
+	}
+
+	public void setChineseMedicine(Integer chineseMedicine) {
+		this.chineseMedicine = chineseMedicine;
+	}
+
+	public Integer getUtilityPatent() {
+		return utilityPatent;
+	}
+
+	public void setUtilityPatent(Integer utilityPatent) {
+		this.utilityPatent = utilityPatent;
+	}
+
+	public Integer getCircuitDesign() {
+		return circuitDesign;
+	}
+
+	public void setCircuitDesign(Integer circuitDesign) {
+		this.circuitDesign = circuitDesign;
+	}
+
+	public Integer getExteriorPatent() {
+		return exteriorPatent;
+	}
+
+	public void setExteriorPatent(Integer exteriorPatent) {
+		this.exteriorPatent = exteriorPatent;
+	}
+
+	public Integer getSoftwareWorks() {
+		return softwareWorks;
+	}
+
+	public void setSoftwareWorks(Integer softwareWorks) {
+		this.softwareWorks = softwareWorks;
+	}
+
+	public Integer getFirmTotal() {
+		return firmTotal;
+	}
+
+	public void setFirmTotal(Integer firmTotal) {
+		this.firmTotal = firmTotal;
+	}
+
+	public Integer getTechTotal() {
+		return techTotal;
+	}
+
+	public void setTechTotal(Integer techTotal) {
+		this.techTotal = techTotal;
+	}
+
+	public Integer getNewEmployment() {
+		return newEmployment;
+	}
+
+	public void setNewEmployment(Integer newEmployment) {
+		this.newEmployment = newEmployment;
+	}
+
+	public Integer getGraduateNumber() {
+		return graduateNumber;
+	}
+
+	public void setGraduateNumber(Integer graduateNumber) {
+		this.graduateNumber = graduateNumber;
+	}
+
+	public Integer getTotalRevenue() {
+		return totalRevenue;
+	}
+
+	public void setTotalRevenue(Integer totalRevenue) {
+		this.totalRevenue = totalRevenue;
+	}
+
+	public Integer getSalesRevenue() {
+		return salesRevenue;
+	}
+
+	public void setSalesRevenue(Integer salesRevenue) {
+		this.salesRevenue = salesRevenue;
+	}
+
+	public Integer getNetAsset() {
+		return netAsset;
+	}
+
+	public void setNetAsset(Integer netAsset) {
+		this.netAsset = netAsset;
+	}
+
+	public Integer getLastYearRevenue() {
+		return lastYearRevenue;
+	}
+
+	public void setLastYearRevenue(Integer lastYearRevenue) {
+		this.lastYearRevenue = lastYearRevenue;
+	}
+
+	public Integer getGrossProfit() {
+		return grossProfit;
+	}
+
+	public void setGrossProfit(Integer grossProfit) {
+		this.grossProfit = grossProfit;
+	}
+
+	public Integer getResearchCost() {
+		return researchCost;
+	}
+
+	public void setResearchCost(Integer researchCost) {
+		this.researchCost = researchCost;
+	}
+
+	public Integer getTerritory() {
+		return territory;
+	}
+
+	public void setTerritory(Integer territory) {
+		this.territory = territory;
+	}
+
+	public Integer getBasicResearchCost() {
+		return basicResearchCost;
+	}
+
+	public void setBasicResearchCost(Integer basicResearchCost) {
+		this.basicResearchCost = basicResearchCost;
+	}
+	
+	
+}

+ 47 - 1
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -42,6 +42,7 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
+import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
 import com.goafanti.techservice.cognizance.service.OrgCognizanceService;
 import com.goafanti.techservice.cognizance.service.OrgFinanceService;
 import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
@@ -86,6 +87,8 @@ public class CognizanceApiController extends BaseApiController {
 	private OrgTechCenterDetailService		orgTechCenterDetailService;
 	@Resource
 	private OrgCognizanceService            orgCognizanceService;
+	@Resource
+	private OrgAnnualReportService			orgAnnualReportService;
 
 	/**
 	 * 企业研究开发活动情况表入口
@@ -802,7 +805,6 @@ public class CognizanceApiController extends BaseApiController {
 	@RequestMapping(value = "/centerDetail", method = RequestMethod.POST)
 	public Result centerDetail(String pageNo, String pageSize, String cid) {
 		Result res = new Result();
-		res = checkCertify(res);
 		if (res.getError().isEmpty()) {
 			Integer pNo = 1;
 			Integer pSize = 10;
@@ -905,6 +907,50 @@ public class CognizanceApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 年报列表
+	 * @return
+	 */
+	@RequestMapping(value = "/annualReport", method = RequestMethod.POST)
+	public Result annualReport(Integer year, Integer state, String pageSize, String pageNo ){
+		Result res = new Result();
+		res = checkCertify(res);
+		if (res.getError().isEmpty()) {
+			Integer pNo = 1;
+			Integer pSize = 10;
+			if (StringUtils.isNumeric(pageSize)) {
+				pSize = Integer.parseInt(pageSize);
+			}
+			if (StringUtils.isNumeric(pageNo)) {
+				pNo = Integer.parseInt(pageNo);
+			}
+			res.setData(orgAnnualReportService.listOrgAnnualReport(year, state, pNo, pSize, TokenManager.getUserId()));
+		}
+		return res;
+	}
+	
+	@RequestMapping(value = "/annualReportDetail", method = RequestMethod.POST)
+	public Result annualReportDetail(){
+		Result res = new Result();
+		return res;
+	}
+	
+	/**
+	 * 删除企业年报记录
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteAnnualReport", method = RequestMethod.POST)
+	public Result deleteAnnualReport(@RequestParam(name = "ids[]", required = true) String[] ids){
+		Result res = new Result();
+		List<String> id = new ArrayList<String>();
+		for (String s : ids) {
+			id.add(s);
+		}
+		res.setData(orgAnnualReportService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+	
 	
 	
 

+ 14 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgAnnualReportService.java

@@ -0,0 +1,14 @@
+package com.goafanti.techservice.cognizance.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.OrgAnnualReport;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface OrgAnnualReportService {
+
+	Pagination<OrgAnnualReport> listOrgAnnualReport(Integer year, Integer state, Integer pNo, Integer pSize, String userId);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+}

+ 54 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgAnnualReportServiceImpl.java

@@ -0,0 +1,54 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.OrgAnnualReportMapper;
+import com.goafanti.common.model.OrgAnnualReport;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
+@Service
+public class OrgAnnualReportServiceImpl extends BaseMybatisDao<OrgAnnualReportMapper> implements OrgAnnualReportService {
+	@Autowired
+	private OrgAnnualReportMapper   orgAnnualReportMapper;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgAnnualReport> listOrgAnnualReport(Integer year, Integer state, Integer pageNo, Integer pageSize,
+			String uid) {
+		Map<String, Object> params = new HashMap<>();
+		
+		if (year != null){
+			params.put("year", year);
+		}
+		
+		if (state != null){
+			params.put("state", state);
+		}
+		
+		if (!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return  (Pagination<OrgAnnualReport>)findPage("findOrgAnnualReportListByPage",
+				"findOrgAnnualReportCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgAnnualReportMapper.batchDeleteByPrimaryKey(id);
+	}
+}