Browse Source

1. 专利到期时间Task

Antiloveg 8 years ago
parent
commit
8daa5b3808
21 changed files with 1073 additions and 41 deletions
  1. 37 5
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  2. 21 0
      src/main/java/com/goafanti/common/dao/OrgFinanceMapper.java
  3. 21 0
      src/main/java/com/goafanti/common/dao/OrgRatepayMapper.java
  4. 231 0
      src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml
  5. 22 10
      src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml
  6. 182 0
      src/main/java/com/goafanti/common/mapper/OrgRatepayMapper.xml
  7. 22 10
      src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml
  8. 24 12
      src/main/java/com/goafanti/common/mapper/OrgTechProductMapper.xml
  9. 179 0
      src/main/java/com/goafanti/common/model/OrgFinance.java
  10. 14 1
      src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java
  11. 127 0
      src/main/java/com/goafanti/common/model/OrgRatepay.java
  12. 14 1
      src/main/java/com/goafanti/common/model/OrgStandard.java
  13. 13 0
      src/main/java/com/goafanti/common/model/OrgTechProduct.java
  14. 1 1
      src/main/java/com/goafanti/common/utils/TimeUtils.java
  15. 67 1
      src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java
  16. 13 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgFinanceService.java
  17. 13 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgRatepayService.java
  18. 29 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgFinanceServiceImpl.java
  19. 30 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgRatepayServiceImpl.java
  20. 12 0
      src/main/java/com/goafanti/user/controller/UserApiController.java
  21. 1 0
      src/main/java/com/goafanti/user/controller/UserRegisterController.java

+ 37 - 5
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -16,6 +16,7 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.common.model.OrgStandard;
 import com.goafanti.common.model.OrgTechProduct;
 import com.goafanti.common.model.OrganizationIdentity;
@@ -25,6 +26,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
+import com.goafanti.techservice.cognizance.service.OrgRatepayService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
 import com.goafanti.techservice.cognizance.service.OrgTechProductService;
 import com.goafanti.user.bo.OrgListBo;
@@ -51,6 +53,8 @@ public class AdminApiController extends BaseApiController {
 	private OrgIntellectualPropertyService orgIntellectualPropertyService;
 	@Resource
 	private OrgTechProductService           orgTechProductService;
+	@Resource
+	private OrgRatepayService               orgRatepayService;
 
 	/**
 	 * 个人用户列表
@@ -234,6 +238,7 @@ public class AdminApiController extends BaseApiController {
 		Result res = new Result();
 		if (StringUtils.isBlank(orgStandard.getId())){
 			orgStandard.setId(UUID.randomUUID().toString());
+			orgStandard.setDeletedSign(0);
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 			orgStandard.setCreateTime(now.getTime());
@@ -262,6 +267,7 @@ public class AdminApiController extends BaseApiController {
 				orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
 				orgIntellectualProperty
 						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+				orgIntellectualProperty.setDeletedSign(0);
 			} catch (ParseException e) {
 				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
 				return res;
@@ -273,7 +279,7 @@ public class AdminApiController extends BaseApiController {
 				orgIntellectualProperty
 				.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
 			} catch (ParseException e) {
-				res.getError().add(buildError("", "日期格式不正确"));
+				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
 				return res;
 			}
 			res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(orgIntellectualProperty));
@@ -311,7 +317,7 @@ public class AdminApiController extends BaseApiController {
 	 * @param pageSize
 	 * @return
 	 */
-	@RequestMapping(value = "/techProductList", method = RequestMethod.GET)
+	@RequestMapping(value = "/techProductList", method = RequestMethod.POST)
 	public Result techProductList(String pageNo, String pageSize, String uid){
 		Result res = new Result();
 		res = checkCertify(res);
@@ -335,11 +341,11 @@ public class AdminApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/techProduct", method = RequestMethod.POST)
-	public Result techProduct(OrgTechProduct orgTechProduct, String uid){
+	public Result techProduct(OrgTechProduct orgTechProduct){
 		Result res = new Result();
-		if (uid == null){
+		if (null == orgTechProduct.getId()){
 			orgTechProduct.setId(UUID.randomUUID().toString());
-			orgTechProduct.setUid(uid);
+			orgTechProduct.setDeletedSign(0);
 			orgTechProductService.insert(orgTechProduct);
 		} else {
 			orgTechProductService.updateByPrimaryKeySelective(orgTechProduct);
@@ -348,6 +354,32 @@ public class AdminApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 企业纳税申报信息入口
+	 * @return
+	 */
+	@RequestMapping(value = "/ratepay", method = RequestMethod.GET)
+	public Result ratepay (String uid){
+		Result res = new Result();
+		res.setData(orgRatepayService.selectOrgRatepayByUid(uid));
+		return res;
+	}
+	
+	/**
+	 * 企业纳税申报信息录入+修改
+	 */
+	@RequestMapping(value = "/disposeRatepay", method = RequestMethod.POST)
+	public Result disposeRatepay(OrgRatepay orgRatepay){
+		Result res = new Result();
+		if (null == orgRatepay.getId()){
+			orgRatepay.setId(UUID.randomUUID().toString());
+			orgRatepayService.insert(orgRatepay);
+		} else {
+			orgRatepayService.updateByPrimaryKeySelective(orgRatepay);
+		}
+		return res;
+	}
+	
 	
 	//判断用户是否通过认证
 	private Result checkCertify(Result res,String uid){

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

@@ -0,0 +1,21 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.OrgFinance;
+
+public interface OrgFinanceMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrgFinance record);
+
+    int insertSelective(OrgFinance record);
+
+    OrgFinance selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrgFinance record);
+
+    int updateByPrimaryKeyWithBLOBs(OrgFinance record);
+
+    int updateByPrimaryKey(OrgFinance record);
+
+	OrgFinance selectOrgFinanceByUid(String uid);
+}

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

@@ -0,0 +1,21 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.OrgRatepay;
+
+public interface OrgRatepayMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrgRatepay record);
+
+    int insertSelective(OrgRatepay record);
+
+    OrgRatepay selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrgRatepay record);
+
+    int updateByPrimaryKeyWithBLOBs(OrgRatepay record);
+
+    int updateByPrimaryKey(OrgRatepay record);
+
+	OrgRatepay selectOrgRatepayByUid(String uid);
+}

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

@@ -0,0 +1,231 @@
+<?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.OrgFinanceMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgFinance" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="main_business_income" property="mainBusinessIncome" jdbcType="INTEGER" />
+    <result column="management_cost" property="managementCost" jdbcType="INTEGER" />
+    <result column="operating_profit" property="operatingProfit" jdbcType="INTEGER" />
+    <result column="various_tax" property="variousTax" jdbcType="INTEGER" />
+    <result column="current_asset" property="currentAsset" jdbcType="INTEGER" />
+    <result column="net_fixed_asset" property="netFixedAsset" jdbcType="INTEGER" />
+    <result column="total_asset" property="totalAsset" jdbcType="INTEGER" />
+    <result column="net_asset" property="netAsset" jdbcType="INTEGER" />
+    <result column="gross_profit" property="grossProfit" jdbcType="INTEGER" />
+    <result column="net_profit" property="netProfit" jdbcType="INTEGER" />
+    <result column="sales_revenue" property="salesRevenue" jdbcType="INTEGER" />
+  </resultMap>
+  <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgFinance" extends="BaseResultMap" >
+    <result column="finance_url" property="financeUrl" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, main_business_income, management_cost, operating_profit, various_tax, current_asset, 
+    net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue
+  </sql>
+  <sql id="Blob_Column_List" >
+    finance_url
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from org_finance
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_finance
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgFinance" >
+    insert into org_finance (id, uid, main_business_income, 
+      management_cost, operating_profit, various_tax, 
+      current_asset, net_fixed_asset, total_asset, 
+      net_asset, gross_profit, net_profit, 
+      sales_revenue, finance_url)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{mainBusinessIncome,jdbcType=INTEGER}, 
+      #{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{variousTax,jdbcType=INTEGER}, 
+      #{currentAsset,jdbcType=INTEGER}, #{netFixedAsset,jdbcType=INTEGER}, #{totalAsset,jdbcType=INTEGER}, 
+      #{netAsset,jdbcType=INTEGER}, #{grossProfit,jdbcType=INTEGER}, #{netProfit,jdbcType=INTEGER}, 
+      #{salesRevenue,jdbcType=INTEGER}, #{financeUrl,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
+    insert into org_finance
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="mainBusinessIncome != null" >
+        main_business_income,
+      </if>
+      <if test="managementCost != null" >
+        management_cost,
+      </if>
+      <if test="operatingProfit != null" >
+        operating_profit,
+      </if>
+      <if test="variousTax != null" >
+        various_tax,
+      </if>
+      <if test="currentAsset != null" >
+        current_asset,
+      </if>
+      <if test="netFixedAsset != null" >
+        net_fixed_asset,
+      </if>
+      <if test="totalAsset != null" >
+        total_asset,
+      </if>
+      <if test="netAsset != null" >
+        net_asset,
+      </if>
+      <if test="grossProfit != null" >
+        gross_profit,
+      </if>
+      <if test="netProfit != null" >
+        net_profit,
+      </if>
+      <if test="salesRevenue != null" >
+        sales_revenue,
+      </if>
+      <if test="financeUrl != null" >
+        finance_url,
+      </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="mainBusinessIncome != null" >
+        #{mainBusinessIncome,jdbcType=INTEGER},
+      </if>
+      <if test="managementCost != null" >
+        #{managementCost,jdbcType=INTEGER},
+      </if>
+      <if test="operatingProfit != null" >
+        #{operatingProfit,jdbcType=INTEGER},
+      </if>
+      <if test="variousTax != null" >
+        #{variousTax,jdbcType=INTEGER},
+      </if>
+      <if test="currentAsset != null" >
+        #{currentAsset,jdbcType=INTEGER},
+      </if>
+      <if test="netFixedAsset != null" >
+        #{netFixedAsset,jdbcType=INTEGER},
+      </if>
+      <if test="totalAsset != null" >
+        #{totalAsset,jdbcType=INTEGER},
+      </if>
+      <if test="netAsset != null" >
+        #{netAsset,jdbcType=INTEGER},
+      </if>
+      <if test="grossProfit != null" >
+        #{grossProfit,jdbcType=INTEGER},
+      </if>
+      <if test="netProfit != null" >
+        #{netProfit,jdbcType=INTEGER},
+      </if>
+      <if test="salesRevenue != null" >
+        #{salesRevenue,jdbcType=INTEGER},
+      </if>
+      <if test="financeUrl != null" >
+        #{financeUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgFinance" >
+    update org_finance
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="mainBusinessIncome != null" >
+        main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
+      </if>
+      <if test="managementCost != null" >
+        management_cost = #{managementCost,jdbcType=INTEGER},
+      </if>
+      <if test="operatingProfit != null" >
+        operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      </if>
+      <if test="variousTax != null" >
+        various_tax = #{variousTax,jdbcType=INTEGER},
+      </if>
+      <if test="currentAsset != null" >
+        current_asset = #{currentAsset,jdbcType=INTEGER},
+      </if>
+      <if test="netFixedAsset != null" >
+        net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
+      </if>
+      <if test="totalAsset != null" >
+        total_asset = #{totalAsset,jdbcType=INTEGER},
+      </if>
+      <if test="netAsset != null" >
+        net_asset = #{netAsset,jdbcType=INTEGER},
+      </if>
+      <if test="grossProfit != null" >
+        gross_profit = #{grossProfit,jdbcType=INTEGER},
+      </if>
+      <if test="netProfit != null" >
+        net_profit = #{netProfit,jdbcType=INTEGER},
+      </if>
+      <if test="salesRevenue != null" >
+        sales_revenue = #{salesRevenue,jdbcType=INTEGER},
+      </if>
+      <if test="financeUrl != null" >
+        finance_url = #{financeUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgFinance" >
+    update org_finance
+    set uid = #{uid,jdbcType=VARCHAR},
+      main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
+      management_cost = #{managementCost,jdbcType=INTEGER},
+      operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      various_tax = #{variousTax,jdbcType=INTEGER},
+      current_asset = #{currentAsset,jdbcType=INTEGER},
+      net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
+      total_asset = #{totalAsset,jdbcType=INTEGER},
+      net_asset = #{netAsset,jdbcType=INTEGER},
+      gross_profit = #{grossProfit,jdbcType=INTEGER},
+      net_profit = #{netProfit,jdbcType=INTEGER},
+      sales_revenue = #{salesRevenue,jdbcType=INTEGER},
+      finance_url = #{financeUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgFinance" >
+    update org_finance
+    set uid = #{uid,jdbcType=VARCHAR},
+      main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
+      management_cost = #{managementCost,jdbcType=INTEGER},
+      operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      various_tax = #{variousTax,jdbcType=INTEGER},
+      current_asset = #{currentAsset,jdbcType=INTEGER},
+      net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
+      total_asset = #{totalAsset,jdbcType=INTEGER},
+      net_asset = #{netAsset,jdbcType=INTEGER},
+      gross_profit = #{grossProfit,jdbcType=INTEGER},
+      net_profit = #{netProfit,jdbcType=INTEGER},
+      sales_revenue = #{salesRevenue,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="selectOrgFinanceByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from org_finance
+    where uid = #{uid,jdbcType=VARCHAR}
+  </select>
+</mapper>

+ 22 - 10
src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml

@@ -12,10 +12,11 @@
     <result column="authorization_number" property="authorizationNumber" jdbcType="VARCHAR" />
     <result column="authorization_date" property="authorizationDate" jdbcType="TIMESTAMP" />
     <result column="evaluation_category" property="evaluationCategory" jdbcType="INTEGER" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, intellectual_property_number, intellectual_property_name, sort_number, catagory, 
-    obtain_way, authorization_number, authorization_date, evaluation_category
+    obtain_way, authorization_number, authorization_date, evaluation_category, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -31,11 +32,11 @@
     insert into org_intellectual_property (id, uid, intellectual_property_number, 
       intellectual_property_name, sort_number, catagory, 
       obtain_way, authorization_number, authorization_date, 
-      evaluation_category)
+      evaluation_category, deleted_sign)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{intellectualPropertyNumber,jdbcType=VARCHAR}, 
       #{intellectualPropertyName,jdbcType=VARCHAR}, #{sortNumber,jdbcType=VARCHAR}, #{catagory,jdbcType=INTEGER}, 
       #{obtainWay,jdbcType=INTEGER}, #{authorizationNumber,jdbcType=VARCHAR}, #{authorizationDate,jdbcType=TIMESTAMP}, 
-      #{evaluationCategory,jdbcType=INTEGER})
+      #{evaluationCategory,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
     insert into org_intellectual_property
@@ -70,6 +71,9 @@
       <if test="evaluationCategory != null" >
         evaluation_category,
       </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -102,6 +106,9 @@
       <if test="evaluationCategory != null" >
         #{evaluationCategory,jdbcType=INTEGER},
       </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
@@ -134,6 +141,9 @@
       <if test="evaluationCategory != null" >
         evaluation_category = #{evaluationCategory,jdbcType=INTEGER},
       </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -147,7 +157,8 @@
       obtain_way = #{obtainWay,jdbcType=INTEGER},
       authorization_number = #{authorizationNumber,jdbcType=VARCHAR},
       authorization_date = #{authorizationDate,jdbcType=TIMESTAMP},
-      evaluation_category = #{evaluationCategory,jdbcType=INTEGER}
+      evaluation_category = #{evaluationCategory,jdbcType=INTEGER},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -156,7 +167,7 @@
   	 select 
     <include refid="Base_Column_List" />
     from org_intellectual_property
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -170,16 +181,17 @@
   <select id="findOrgIntellectualPropertyCount" resultType="java.lang.Integer" parameterType="String">
    	select count(1) 
 	    from org_intellectual_property
-	    where 1=1
+	     where deleted_sign = 0
 	    <if test="uid != null">
 		    and  uid = #{uid,jdbcType=VARCHAR}
 		</if>
     </select>
     
-  <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
-	DELETE FROM org_intellectual_property WHERE ID in 
+   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_intellectual_property set deleted_sign = 1
+  	where  id in 
 	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
-	#{item}
+		#{item}
 	</foreach>
-  </delete>
+  </update>
 </mapper>

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

@@ -0,0 +1,182 @@
+<?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.OrgRatepayMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgRatepay" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="operating_income" property="operatingIncome" jdbcType="INTEGER" />
+    <result column="management_cost" property="managementCost" jdbcType="INTEGER" />
+    <result column="operating_profit" property="operatingProfit" jdbcType="INTEGER" />
+    <result column="non_operating_income" property="nonOperatingIncome" jdbcType="INTEGER" />
+    <result column="non_taxable_income" property="nonTaxableIncome" jdbcType="INTEGER" />
+    <result column="tax_exempt_income" property="taxExemptIncome" jdbcType="INTEGER" />
+    <result column="subsidy_income" property="subsidyIncome" jdbcType="INTEGER" />
+  </resultMap>
+  <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgRatepay" extends="BaseResultMap" >
+    <result column="tax_return_url" property="taxReturnUrl" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, operating_income, management_cost, operating_profit, non_operating_income, 
+    non_taxable_income, tax_exempt_income, subsidy_income
+  </sql>
+  <sql id="Blob_Column_List" >
+    tax_return_url
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from org_ratepay
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_ratepay
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgRatepay" >
+    insert into org_ratepay (id, uid, operating_income, 
+      management_cost, operating_profit, non_operating_income, 
+      non_taxable_income, tax_exempt_income, subsidy_income, 
+      tax_return_url)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{operatingIncome,jdbcType=INTEGER}, 
+      #{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{nonOperatingIncome,jdbcType=INTEGER}, 
+      #{nonTaxableIncome,jdbcType=INTEGER}, #{taxExemptIncome,jdbcType=INTEGER}, #{subsidyIncome,jdbcType=INTEGER}, 
+      #{taxReturnUrl,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgRatepay" >
+    insert into org_ratepay
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="operatingIncome != null" >
+        operating_income,
+      </if>
+      <if test="managementCost != null" >
+        management_cost,
+      </if>
+      <if test="operatingProfit != null" >
+        operating_profit,
+      </if>
+      <if test="nonOperatingIncome != null" >
+        non_operating_income,
+      </if>
+      <if test="nonTaxableIncome != null" >
+        non_taxable_income,
+      </if>
+      <if test="taxExemptIncome != null" >
+        tax_exempt_income,
+      </if>
+      <if test="subsidyIncome != null" >
+        subsidy_income,
+      </if>
+      <if test="taxReturnUrl != null" >
+        tax_return_url,
+      </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="operatingIncome != null" >
+        #{operatingIncome,jdbcType=INTEGER},
+      </if>
+      <if test="managementCost != null" >
+        #{managementCost,jdbcType=INTEGER},
+      </if>
+      <if test="operatingProfit != null" >
+        #{operatingProfit,jdbcType=INTEGER},
+      </if>
+      <if test="nonOperatingIncome != null" >
+        #{nonOperatingIncome,jdbcType=INTEGER},
+      </if>
+      <if test="nonTaxableIncome != null" >
+        #{nonTaxableIncome,jdbcType=INTEGER},
+      </if>
+      <if test="taxExemptIncome != null" >
+        #{taxExemptIncome,jdbcType=INTEGER},
+      </if>
+      <if test="subsidyIncome != null" >
+        #{subsidyIncome,jdbcType=INTEGER},
+      </if>
+      <if test="taxReturnUrl != null" >
+        #{taxReturnUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgRatepay" >
+    update org_ratepay
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="operatingIncome != null" >
+        operating_income = #{operatingIncome,jdbcType=INTEGER},
+      </if>
+      <if test="managementCost != null" >
+        management_cost = #{managementCost,jdbcType=INTEGER},
+      </if>
+      <if test="operatingProfit != null" >
+        operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      </if>
+      <if test="nonOperatingIncome != null" >
+        non_operating_income = #{nonOperatingIncome,jdbcType=INTEGER},
+      </if>
+      <if test="nonTaxableIncome != null" >
+        non_taxable_income = #{nonTaxableIncome,jdbcType=INTEGER},
+      </if>
+      <if test="taxExemptIncome != null" >
+        tax_exempt_income = #{taxExemptIncome,jdbcType=INTEGER},
+      </if>
+      <if test="subsidyIncome != null" >
+        subsidy_income = #{subsidyIncome,jdbcType=INTEGER},
+      </if>
+      <if test="taxReturnUrl != null" >
+        tax_return_url = #{taxReturnUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgRatepay" >
+    update org_ratepay
+    set uid = #{uid,jdbcType=VARCHAR},
+      operating_income = #{operatingIncome,jdbcType=INTEGER},
+      management_cost = #{managementCost,jdbcType=INTEGER},
+      operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      non_operating_income = #{nonOperatingIncome,jdbcType=INTEGER},
+      non_taxable_income = #{nonTaxableIncome,jdbcType=INTEGER},
+      tax_exempt_income = #{taxExemptIncome,jdbcType=INTEGER},
+      subsidy_income = #{subsidyIncome,jdbcType=INTEGER},
+      tax_return_url = #{taxReturnUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgRatepay" >
+    update org_ratepay
+    set uid = #{uid,jdbcType=VARCHAR},
+      operating_income = #{operatingIncome,jdbcType=INTEGER},
+      management_cost = #{managementCost,jdbcType=INTEGER},
+      operating_profit = #{operatingProfit,jdbcType=INTEGER},
+      non_operating_income = #{nonOperatingIncome,jdbcType=INTEGER},
+      non_taxable_income = #{nonTaxableIncome,jdbcType=INTEGER},
+      tax_exempt_income = #{taxExemptIncome,jdbcType=INTEGER},
+      subsidy_income = #{subsidyIncome,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+   <select id="selectOrgRatepayByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from org_ratepay
+    where uid = #{uid,jdbcType=VARCHAR}
+  </select>
+  
+</mapper>

+ 22 - 10
src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml

@@ -9,9 +9,10 @@
     <result column="standard_level" property="standardLevel" jdbcType="INTEGER" />
     <result column="participate_way" property="participateWay" jdbcType="INTEGER" />
     <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, standard_name, standard_number, standard_level, participate_way, create_time
+    id, uid, standard_name, standard_number, standard_level, participate_way, create_time, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -25,11 +26,11 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrgStandard" >
     insert into org_standard (id, uid, standard_name, 
-      standard_number, standard_level, participate_way, create_time
+      standard_number, standard_level, participate_way, create_time, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{standardName,jdbcType=VARCHAR}, 
       #{standardNumber,jdbcType=VARCHAR}, #{standardLevel,jdbcType=INTEGER}, #{participateWay,jdbcType=INTEGER},
-      #{createTime,jdbcType=TIMESTAMP}
+      #{createTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgStandard" >
@@ -56,6 +57,9 @@
       <if test="createTime != null" >
         create_time,
       </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -79,6 +83,9 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgStandard" >
@@ -102,6 +109,9 @@
       <if test="createTime != null" >
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -112,7 +122,8 @@
       standard_number = #{standardNumber,jdbcType=VARCHAR},
       standard_level = #{standardLevel,jdbcType=INTEGER},
       participate_way = #{participateWay,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -120,7 +131,7 @@
   	 select 
     <include refid="Base_Column_List" />
     from org_standard
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -146,7 +157,7 @@
    <select id="findOrgStandardCount" resultType="java.lang.Integer" parameterType="String">
    	select count(1) 
     from org_standard
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -164,11 +175,12 @@
     </if>
     order by create_time desc
     </select>
-    
-     <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
-		DELETE FROM org_standard WHERE ID in 
+  
+   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_standard set deleted_sign = 1
+  	where  id in 
 	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
 		#{item}
 	</foreach>
-  </delete>
+  </update>
 </mapper>

+ 24 - 12
src/main/java/com/goafanti/common/mapper/OrgTechProductMapper.xml

@@ -18,11 +18,12 @@
     <result column="condition_effect" property="conditionEffect" jdbcType="VARCHAR" />
     <result column="year" property="year" jdbcType="INTEGER" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, serial_number, product_name, technical_field1, technical_field2, technical_field3, 
     technical_source, last_year_revenue, main_product, intellectual_property_number, 
-    key_technology, competitive_edge, condition_effect, year, create_time
+    key_technology, competitive_edge, condition_effect, year, create_time, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -40,13 +41,13 @@
       technical_field3, technical_source, last_year_revenue, 
       main_product, intellectual_property_number, 
       key_technology, competitive_edge, condition_effect, 
-      year, create_time)
+      year, create_time, deleted_sign)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR}, 
       #{productName,jdbcType=VARCHAR}, #{technicalField1,jdbcType=INTEGER}, #{technicalField2,jdbcType=INTEGER}, 
       #{technicalField3,jdbcType=INTEGER}, #{technicalSource,jdbcType=INTEGER}, #{lastYearRevenue,jdbcType=VARCHAR}, 
       #{mainProduct,jdbcType=INTEGER}, #{intellectualPropertyNumber,jdbcType=VARCHAR}, 
       #{keyTechnology,jdbcType=VARCHAR}, #{competitiveEdge,jdbcType=VARCHAR}, #{conditionEffect,jdbcType=VARCHAR}, 
-      #{year,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
+      #{year,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
     insert into org_tech_product
@@ -99,6 +100,9 @@
       <if test="createTime != null" >
         create_time,
       </if>
+       <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -149,6 +153,9 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
@@ -199,6 +206,9 @@
       <if test="createTime != null" >
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -218,7 +228,8 @@
       competitive_edge = #{competitiveEdge,jdbcType=VARCHAR},
       condition_effect = #{conditionEffect,jdbcType=VARCHAR},
       year = #{year,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -226,7 +237,7 @@
   	 select 
     <include refid="Base_Column_List" />
     from org_tech_product
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -242,19 +253,20 @@
   <select id="findOrgTechProductCount" resultType="java.lang.Integer" parameterType="String">
    	select count(1) 
 	    from org_tech_product
-	    where 1=1
+	     where deleted_sign = 0
 	    <if test="uid != null">
 		    and  uid = #{uid,jdbcType=VARCHAR}
 		</if>
 		<if test="year != null">
-		and year = #{year,jdbcType=INTEGER}
-	</if>
+			and year = #{year,jdbcType=INTEGER}
+	    </if>
     </select>
     
-  <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
-	DELETE FROM org_tech_product WHERE ID in 
+   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_tech_product set deleted_sign = 1
+  	where  id in 
 	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
-	#{item}
+		#{item}
 	</foreach>
-  </delete>
+  </update>
 </mapper>

+ 179 - 0
src/main/java/com/goafanti/common/model/OrgFinance.java

@@ -0,0 +1,179 @@
+package com.goafanti.common.model;
+
+public class OrgFinance {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 主营业务收入
(万元)
+    */
+    private Integer mainBusinessIncome;
+
+    /**
+    * 管理费用(万元)
+    */
+    private Integer managementCost;
+
+    /**
+    * 营业利润(万元)
+    */
+    private Integer operatingProfit;
+
+    /**
+    * 支付的各项税费(万元)
+    */
+    private Integer variousTax;
+
+    /**
+    * 流动资产
+    */
+    private Integer currentAsset;
+
+    /**
+    * 固定资产净额
(万元)
+    */
+    private Integer netFixedAsset;
+
+    /**
+    * 资产总额(万元)
+    */
+    private Integer totalAsset;
+
+    /**
+    * 所有者权益合计(万元)
+    */
+    private Integer netAsset;
+
+    /**
+    * 利润总额(万元)
+    */
+    private Integer grossProfit;
+
+    /**
+    * 净利润(万元)
+    */
+    private Integer netProfit;
+
+    /**
+    * 销售收入(万元)
+    */
+    private Integer salesRevenue;
+
+    /**
+    * 财务报表URL
+    */
+    private String financeUrl;
+
+    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 Integer getMainBusinessIncome() {
+        return mainBusinessIncome;
+    }
+
+    public void setMainBusinessIncome(Integer mainBusinessIncome) {
+        this.mainBusinessIncome = mainBusinessIncome;
+    }
+
+    public Integer getManagementCost() {
+        return managementCost;
+    }
+
+    public void setManagementCost(Integer managementCost) {
+        this.managementCost = managementCost;
+    }
+
+    public Integer getOperatingProfit() {
+        return operatingProfit;
+    }
+
+    public void setOperatingProfit(Integer operatingProfit) {
+        this.operatingProfit = operatingProfit;
+    }
+
+    public Integer getVariousTax() {
+        return variousTax;
+    }
+
+    public void setVariousTax(Integer variousTax) {
+        this.variousTax = variousTax;
+    }
+
+    public Integer getCurrentAsset() {
+        return currentAsset;
+    }
+
+    public void setCurrentAsset(Integer currentAsset) {
+        this.currentAsset = currentAsset;
+    }
+
+    public Integer getNetFixedAsset() {
+        return netFixedAsset;
+    }
+
+    public void setNetFixedAsset(Integer netFixedAsset) {
+        this.netFixedAsset = netFixedAsset;
+    }
+
+    public Integer getTotalAsset() {
+        return totalAsset;
+    }
+
+    public void setTotalAsset(Integer totalAsset) {
+        this.totalAsset = totalAsset;
+    }
+
+    public Integer getNetAsset() {
+        return netAsset;
+    }
+
+    public void setNetAsset(Integer netAsset) {
+        this.netAsset = netAsset;
+    }
+
+    public Integer getGrossProfit() {
+        return grossProfit;
+    }
+
+    public void setGrossProfit(Integer grossProfit) {
+        this.grossProfit = grossProfit;
+    }
+
+    public Integer getNetProfit() {
+        return netProfit;
+    }
+
+    public void setNetProfit(Integer netProfit) {
+        this.netProfit = netProfit;
+    }
+
+    public Integer getSalesRevenue() {
+        return salesRevenue;
+    }
+
+    public void setSalesRevenue(Integer salesRevenue) {
+        this.salesRevenue = salesRevenue;
+    }
+
+    public String getFinanceUrl() {
+        return financeUrl;
+    }
+
+    public void setFinanceUrl(String financeUrl) {
+        this.financeUrl = financeUrl;
+    }
+}

+ 14 - 1
src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java

@@ -51,6 +51,11 @@ public class OrgIntellectualProperty {
     * 0--Ⅰ类, 1--Ⅱ类
     */
     private Integer evaluationCategory;
+    
+    /**
+     * 删除标记
+     */
+    private Integer deletedSign;
 
     public String getId() {
         return id;
@@ -134,7 +139,15 @@ public class OrgIntellectualProperty {
         this.evaluationCategory = evaluationCategory;
     }
     
-    public String getAuthorizationDateFormattedDate(){
+    public Integer getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
+
+	public String getAuthorizationDateFormattedDate(){
 		if (this.authorizationDate == null) {
 			return null;
 		} else {

+ 127 - 0
src/main/java/com/goafanti/common/model/OrgRatepay.java

@@ -0,0 +1,127 @@
+package com.goafanti.common.model;
+
+public class OrgRatepay {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 营业收入(万元)
+    */
+    private Integer operatingIncome;
+
+    /**
+    * 管理费用(万元)
+    */
+    private Integer managementCost;
+
+    /**
+    * 营业利润
(万元)
+    */
+    private Integer operatingProfit;
+
+    /**
+    * 营业外收入(万元)
+    */
+    private Integer nonOperatingIncome;
+
+    /**
+    * 不征税收入
(万元)
+    */
+    private Integer nonTaxableIncome;
+
+    /**
+    * 免税收入(万元)
+    */
+    private Integer taxExemptIncome;
+
+    /**
+    * 政府补助收入(万元)
+    */
+    private Integer subsidyIncome;
+
+    /**
+    * 纳税申报表url
+    */
+    private String taxReturnUrl;
+
+    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 Integer getOperatingIncome() {
+        return operatingIncome;
+    }
+
+    public void setOperatingIncome(Integer operatingIncome) {
+        this.operatingIncome = operatingIncome;
+    }
+
+    public Integer getManagementCost() {
+        return managementCost;
+    }
+
+    public void setManagementCost(Integer managementCost) {
+        this.managementCost = managementCost;
+    }
+
+    public Integer getOperatingProfit() {
+        return operatingProfit;
+    }
+
+    public void setOperatingProfit(Integer operatingProfit) {
+        this.operatingProfit = operatingProfit;
+    }
+
+    public Integer getNonOperatingIncome() {
+        return nonOperatingIncome;
+    }
+
+    public void setNonOperatingIncome(Integer nonOperatingIncome) {
+        this.nonOperatingIncome = nonOperatingIncome;
+    }
+
+    public Integer getNonTaxableIncome() {
+        return nonTaxableIncome;
+    }
+
+    public void setNonTaxableIncome(Integer nonTaxableIncome) {
+        this.nonTaxableIncome = nonTaxableIncome;
+    }
+
+    public Integer getTaxExemptIncome() {
+        return taxExemptIncome;
+    }
+
+    public void setTaxExemptIncome(Integer taxExemptIncome) {
+        this.taxExemptIncome = taxExemptIncome;
+    }
+
+    public Integer getSubsidyIncome() {
+        return subsidyIncome;
+    }
+
+    public void setSubsidyIncome(Integer subsidyIncome) {
+        this.subsidyIncome = subsidyIncome;
+    }
+
+    public String getTaxReturnUrl() {
+        return taxReturnUrl;
+    }
+
+    public void setTaxReturnUrl(String taxReturnUrl) {
+        this.taxReturnUrl = taxReturnUrl;
+    }
+}

+ 14 - 1
src/main/java/com/goafanti/common/model/OrgStandard.java

@@ -33,6 +33,11 @@ public class OrgStandard {
      * 创建时间
      */
     private Date createTime;
+    
+    /**
+     * 删除标记
+     */
+    private Integer deletedSign;
 
     public String getId() {
         return id;
@@ -89,7 +94,15 @@ public class OrgStandard {
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
-    
+	
+	public Integer getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
+
 	//创建时间
 	public String getCreateTimeFormattedDate(){
 		if (this.createTime == null) {

+ 13 - 0
src/main/java/com/goafanti/common/model/OrgTechProduct.java

@@ -82,6 +82,11 @@ public class OrgTechProduct {
      * 记录创建时间
      */
     private Date createTime;
+    
+    /**
+     * 删除标记
+     */
+    private Integer deletedSign;
 
     public String getId() {
         return id;
@@ -214,6 +219,14 @@ public class OrgTechProduct {
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
+
+	public Integer getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
     
     
 }

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

@@ -15,7 +15,7 @@ public class TimeUtils {
  	        		 flag = true;
  	        	  }
         	  }else if("resetCode".equals(s)){
-        		  if(System.currentTimeMillis()-(Long) TokenManager.getSession().getAttribute(VerifyCodeUtils.RESET_CODE_TIME)>300000){
+        		  if(System.currentTimeMillis()-(Long) TokenManager.getSession().getAttribute(VerifyCodeUtils.RESET_CODE_TIME)>600000){
         			  flag = true ;
         		  }
         	  }

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

@@ -18,7 +18,9 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.OrgActivity;
 import com.goafanti.common.model.OrgActivityCost;
+import com.goafanti.common.model.OrgFinance;
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.common.model.OrgStandard;
 import com.goafanti.common.model.OrgTechProduct;
 import com.goafanti.common.utils.DateUtils;
@@ -26,7 +28,9 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
+import com.goafanti.techservice.cognizance.service.OrgFinanceService;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
+import com.goafanti.techservice.cognizance.service.OrgRatepayService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
 import com.goafanti.techservice.cognizance.service.OrgTechProductService;
 import com.goafanti.user.service.OrganizationIdentityService;
@@ -49,6 +53,10 @@ public class CognizanceApiController extends BaseApiController {
 	private OrgTechProductService           orgTechProductService;
 	@Resource
 	private OrgActivityCostService          orgActivityCostService;
+	@Resource
+	private OrgRatepayService               orgRatepayService;
+	@Resource
+	private OrgFinanceService               orgFinanceService;
 
 	/**
 	 * 企业研究开发活动情况表入口
@@ -174,7 +182,6 @@ public class CognizanceApiController extends BaseApiController {
 	@RequestMapping(value = "/activityCost", method = RequestMethod.POST)
 	public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate){
 		Result res = new Result();
-		orgActivityCost.setDeletedSign(0);
 		try {
 			orgActivityCost.setSignDate(DateUtils.parseDate(signDateFormattedDate, "yyyy-MM-dd"));
 		} catch (ParseException e) {
@@ -187,6 +194,7 @@ public class CognizanceApiController extends BaseApiController {
 			orgActivityCost.setEndDate(ac.getEndDate());
 			orgActivityCost.setId(UUID.randomUUID().toString());
 			orgActivityCost.setUid(TokenManager.getUserId());
+			orgActivityCost.setDeletedSign(0);
 			orgActivityCostService.insert(orgActivityCost);
 		} else {
 			orgActivityCostService.updateByPrimaryKeySelective(orgActivityCost);
@@ -246,6 +254,7 @@ public class CognizanceApiController extends BaseApiController {
 		if (StringUtils.isBlank(orgStandard.getId())) {
 			orgStandard.setId(UUID.randomUUID().toString());
 			orgStandard.setUid(TokenManager.getUserId());
+			orgStandard.setDeletedSign(0);
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 			orgStandard.setCreateTime(now.getTime());
@@ -293,6 +302,7 @@ public class CognizanceApiController extends BaseApiController {
 				orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
 				orgIntellectualProperty
 						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+				orgIntellectualProperty.setDeletedSign(0);
 			} catch (ParseException e) {
 				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
 				return res;
@@ -388,6 +398,7 @@ public class CognizanceApiController extends BaseApiController {
 		if (StringUtils.isBlank(orgTechProduct.getId())){
 			orgTechProduct.setId(UUID.randomUUID().toString());
 			orgTechProduct.setUid(TokenManager.getUserId());
+			orgTechProduct.setDeletedSign(0);
 			orgTechProductService.insert(orgTechProduct);
 		} else {
 			orgTechProductService.updateByPrimaryKeySelective(orgTechProduct);
@@ -412,6 +423,61 @@ public class CognizanceApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 企业纳税申报信息入口
+	 * @return
+	 */
+	@RequestMapping(value = "/ratepay", method = RequestMethod.GET)
+	public Result ratepay (){
+		Result res = new Result();
+		res.setData(orgRatepayService.selectOrgRatepayByUid(TokenManager.getUserId()));
+		return res;
+	}
+	
+	/**
+	 * 企业纳税申报信息录入+修改
+	 */
+	@RequestMapping(value = "/disposeRatepay", method = RequestMethod.POST)
+	public Result disposeRatepay(OrgRatepay orgRatepay){
+		Result res = new Result();
+		if (null == orgRatepay.getId()){
+			orgRatepay.setId(UUID.randomUUID().toString());
+			orgRatepay.setUid(TokenManager.getUserId());
+			orgRatepayService.insert(orgRatepay);
+		} else {
+			orgRatepayService.updateByPrimaryKeySelective(orgRatepay);
+		}
+		return res;
+	}
+	
+	/**
+	 * 财务报表信息入口
+	 * @return
+	 */
+	@RequestMapping(value = "/finance", method = RequestMethod.GET)
+	public Result finance(){
+		Result res = new Result();
+		res.setData(orgFinanceService.selectOrgFinanceByUid(TokenManager.getUserId()));
+		return res;
+	}
+	
+	/**
+	 * 财务报表录入+修改
+	 * @param orgFinance
+	 * @return
+	 */
+	@RequestMapping(value = "/disposeFinance", method = RequestMethod.POST)
+	public Result disposeFinance(OrgFinance orgFinance){
+		Result res = new Result();
+		if (null == orgFinance.getId()){
+			orgFinance.setId(UUID.randomUUID().toString());
+			orgFinance.setUid(TokenManager.getUserId());
+			orgFinanceService.insert(orgFinance);
+		} else {
+			orgFinanceService.updateByPrimaryKeySelective(orgFinance);
+		}
+		return res;
+	}
 	 
 	
 	

+ 13 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgFinanceService.java

@@ -0,0 +1,13 @@
+package com.goafanti.techservice.cognizance.service;
+
+import com.goafanti.common.model.OrgFinance;
+
+public interface OrgFinanceService {
+
+	OrgFinance selectOrgFinanceByUid(String userId);
+
+	OrgFinance insert(OrgFinance orgFinance);
+
+	int updateByPrimaryKeySelective(OrgFinance orgFinance);
+
+}

+ 13 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgRatepayService.java

@@ -0,0 +1,13 @@
+package com.goafanti.techservice.cognizance.service;
+
+import com.goafanti.common.model.OrgRatepay;
+
+public interface OrgRatepayService {
+
+	OrgRatepay selectOrgRatepayByUid(String userId);
+
+	OrgRatepay insert(OrgRatepay orgRatepay);
+
+	int updateByPrimaryKeySelective(OrgRatepay orgRatepay);
+
+}

+ 29 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgFinanceServiceImpl.java

@@ -0,0 +1,29 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.OrgFinanceMapper;
+import com.goafanti.common.model.OrgFinance;
+import com.goafanti.techservice.cognizance.service.OrgFinanceService;
+@Service
+public class OrgFinanceServiceImpl implements OrgFinanceService {
+	@Autowired
+	private OrgFinanceMapper orgFinanceMapper;
+
+	@Override
+	public OrgFinance selectOrgFinanceByUid(String uid) {
+		return orgFinanceMapper.selectOrgFinanceByUid(uid);
+	}
+
+	@Override
+	public OrgFinance insert(OrgFinance orgFinance) {
+		orgFinanceMapper.insert(orgFinance);
+		return orgFinance;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgFinance orgFinance) {
+		return orgFinanceMapper.updateByPrimaryKeySelective(orgFinance);
+	}
+}

+ 30 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgRatepayServiceImpl.java

@@ -0,0 +1,30 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.OrgRatepayMapper;
+import com.goafanti.common.model.OrgRatepay;
+import com.goafanti.techservice.cognizance.service.OrgRatepayService;
+@Service
+public class OrgRatepayServiceImpl implements OrgRatepayService {
+	@Autowired
+	private OrgRatepayMapper orgRatepayMapper;
+	
+	@Override
+	public OrgRatepay selectOrgRatepayByUid(String uid) {
+		return orgRatepayMapper.selectOrgRatepayByUid(uid);
+	}
+
+	@Override
+	public OrgRatepay insert(OrgRatepay orgRatepay) {
+		orgRatepayMapper.insert(orgRatepay);
+		return orgRatepay;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgRatepay orgRatepay) {
+		return orgRatepayMapper.updateByPrimaryKeySelective(orgRatepay);
+	}
+
+}

+ 12 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -864,6 +864,12 @@ public class UserApiController extends BaseApiController {
 		} else {
 			o.setId(org.getId());
 			res.setData(organizationIdentityService.updateByPrimaryKeySelective(o));
+			if (5 == o.getAuditStatus()){
+				User u = new User();
+				u.setId(organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId()).getUid());
+				u.setLvl(1);;
+				userService.updateByPrimaryKeySelective(u);
+			}
 		}
 		return res;
 	}
@@ -878,6 +884,12 @@ public class UserApiController extends BaseApiController {
 		} else {
 			userIdentity.setId(identity.getId());
 			res.setData(userIdentityService.updateByPrimaryKeySelective(userIdentity));
+			if (5 == userIdentity.getAuditStatus()){
+				User u = new User();
+				u.setId(userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId()).getUid());
+				u.setLvl(1);;
+				userService.updateByPrimaryKeySelective(u);
+			}
 		}
 		return res;
 	}

+ 1 - 0
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -81,6 +81,7 @@ public class UserRegisterController extends BaseController {
 			now.set(Calendar.MILLISECOND, 0);
 			user.setCreateTime(now.getTime());
 			user.setPassword(passwordUtil.getEncryptPwd(user));
+			user.setLvl(0);
 			userService.insertRegister(user, contacts, companyName, user.getId());
 		}