Antiloveg 8 years ago
parent
commit
cad3ea0fae

+ 24 - 0
schema/2017-04-13.sql

@@ -21,5 +21,29 @@ CREATE TABLE `org_cognizance_proportion` (
 ENGINE = InnoDB
 COMMENT = '高企培育进度权重表';
 
+CREATE TABLE `legal_person_ownership` (
+  `id` VARCHAR(36) NOT NULL,
+  `uid` VARCHAR(36) NOT NULL,
+  `type` INT(1) NULL COMMENT '法人类型(0--中国企业法人,1--外国企业法人)',
+  `name` VARCHAR(32) NULL COMMENT '名称',
+  `org_code` VARCHAR(32) NULL COMMENT '组织机构代码或统一社会信用代码',
+  `investment` DECIMAL(8,2) NULL COMMENT '投资(万元)',
+  `deleted_sign` INT(1) NULL COMMENT '删除标记',
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+COMMENT = '法人股权表';
+
+CREATE TABLE `nature_ownership` (
+  `id` VARCHAR(36) NOT NULL,
+  `uid` VARCHAR(36) NOT NULL,
+  `type` INT(1) NULL COMMENT '类型 (0--中国公民,1--外籍公民)',
+  `name` VARCHAR(32) NULL COMMENT '姓名',
+  `id_number` VARCHAR(18) NULL COMMENT '身份证(护照)号',
+  `investment` DECIMAL(8,2) NULL COMMENT '投资额(万元)',
+  `deleted_sign` INT(1) NULL COMMENT '删除标记',
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+COMMENT = '自然人股权表';
+
 
 

+ 21 - 18
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -181,17 +181,18 @@ public class AdminApiController extends CertifyApiController {
 	@Resource
 	private CopyrightInfoService			copyrightInfoService;
 	@Resource
-	private OrgCognizanceProportionService orgCognizanceProportionService;
-	
+	private OrgCognizanceProportionService	orgCognizanceProportionService;
+
 	/**
 	 * 高企培育资料完成情况(比重)
+	 * 
 	 * @param uid
 	 * @return
 	 */
 	@RequestMapping(value = "/proportion", method = RequestMethod.GET)
-	public Result proportion(String uid){
+	public Result proportion(String uid) {
 		Result res = new Result();
-		if (StringUtils.isBlank(uid)){
+		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户ID"));
 			return res;
 		}
@@ -1906,12 +1907,14 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 		OrgFinance of = orgFinanceService.selectFinanceByUidAndYear(uid, year);
-		Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
-		map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), of.getGrossProfit());
-		map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), of.getManagementCost());
-		map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), of.getOperatingProfit());
-		map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), of.getResearchCost());
-		res.setData(map);
+		if (null != of) {
+			Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
+			map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), of.getGrossProfit());
+			map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), of.getManagementCost());
+			map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), of.getOperatingProfit());
+			map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), of.getResearchCost());
+			res.setData(map);
+		}
 		return res;
 	}
 
@@ -2087,12 +2090,14 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, year);
-		Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
-		map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), ratepay.getGrossProfit());
-		map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), ratepay.getManagementCost());
-		map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), ratepay.getOperatingProfit());
-		map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), ratepay.getResearchCost());
-		res.setData(map);
+		if (null != ratepay) {
+			Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
+			map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), ratepay.getGrossProfit());
+			map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), ratepay.getManagementCost());
+			map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), ratepay.getOperatingProfit());
+			map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), ratepay.getResearchCost());
+			res.setData(map);
+		}
 		return res;
 	}
 
@@ -3358,6 +3363,4 @@ public class AdminApiController extends CertifyApiController {
 	 * null){ flag = true; } } }
 	 */
 
-
-
 }

+ 92 - 0
src/main/java/com/goafanti/admin/controller/AdminOrgBaiscInfoApiController.java

@@ -0,0 +1,92 @@
+package com.goafanti.admin.controller;
+
+import java.util.Arrays;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
+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 com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.user.service.LegalPersonOwnershipService;
+import com.goafanti.user.service.NatureOwnershipService;
+
+@Controller
+@RequestMapping(value = "/api/admin/basic")
+public class AdminOrgBaiscInfoApiController extends CertifyApiController {
+	@Resource
+	private LegalPersonOwnershipService	legalPersonOwnershipService;
+	@Resource
+	private NatureOwnershipService		natureOwnershipService;
+
+	/**
+	 * 自然股权人列表
+	 */
+	@RequestMapping(value = "/listLegalPerson", method = RequestMethod.GET)
+	public Result listLegalPerson(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+
+		res.setData(legalPersonOwnershipService.selectByUid(uid));
+		return res;
+	}
+
+	/**
+	 * 删除自然股权人
+	 * 
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteLegalPerson", method = RequestMethod.POST)
+	public Result deleteLegalPerson(@RequestParam(name = "ids[]", required = false) String[] ids) {
+		Result res = new Result();
+		if (ids == null || ids.length < 1) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+		} else {
+			res.setData(legalPersonOwnershipService.batchDeleteByPrimaryKey(Arrays.asList(ids)));
+		}
+		return res;
+	}
+	
+	/**
+	 * 自然人股权列表
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/listNature", method = RequestMethod.GET)
+	public Result listNature(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+
+		res.setData(natureOwnershipService.selectByUid(uid));
+		return res;
+	}
+	
+	/**
+	 * 删除自然人股权
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteNature", method = RequestMethod.POST)
+	public Result deleteNature(@RequestParam(name = "ids[]", required = false) String[] ids) {
+		Result res = new Result();
+		if (ids == null || ids.length < 1) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+		} else {
+			res.setData(natureOwnershipService.batchDeleteByPrimaryKey(Arrays.asList(ids)));
+		}
+		return res;
+	}
+
+}

+ 25 - 20
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java

@@ -146,34 +146,37 @@ public class CognizanceApiController extends CertifyApiController {
 	private PatentInfoService				patentInfoService;
 	@Resource
 	private CopyrightInfoService			copyrightInfoService;
-	
+
 	/**
 	 * 财务报表详情(获取同年度纳税申报表重复数据)
+	 * 
 	 * @return
 	 */
 	@RequestMapping(value = "/financeDetail", method = RequestMethod.GET)
 	public Result financeDetail(Integer year) {
 		Result res = new Result();
-		
+
 		User curUser = TokenManager.getUserToken();
 		if (!checkCertify(res, curUser)) {
 			return res;
 		}
-		
+
 		if (null == year) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到年份", "年份"));
 			return res;
 		}
 		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(TokenManager.getUserId(), year);
-		Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
-		map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), ratepay.getGrossProfit());
-		map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), ratepay.getManagementCost());
-		map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), ratepay.getOperatingProfit());
-		map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), ratepay.getResearchCost());
-		res.setData(map);
+		if (null != ratepay) {
+			Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
+			map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), ratepay.getGrossProfit());
+			map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), ratepay.getManagementCost());
+			map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), ratepay.getOperatingProfit());
+			map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), ratepay.getResearchCost());
+			res.setData(map);
+		}
 		return res;
 	}
-	
+
 	/**
 	 * 企业纳税信息详情(获取同年度财务报表重复数据)
 	 * 
@@ -184,26 +187,28 @@ public class CognizanceApiController extends CertifyApiController {
 	@RequestMapping(value = "/ratepayDetail", method = RequestMethod.GET)
 	public Result ratepayDetail(Integer year) {
 		Result res = new Result();
-		
+
 		User curUser = TokenManager.getUserToken();
 		if (!checkCertify(res, curUser)) {
 			return res;
 		}
-		
+
 		if (null == year) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到年份", "年份"));
 			return res;
 		}
 		OrgFinance of = orgFinanceService.selectFinanceByUidAndYear(TokenManager.getUserId(), year);
-		Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
-		map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), of.getGrossProfit());
-		map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), of.getManagementCost());
-		map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), of.getOperatingProfit());
-		map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), of.getResearchCost());
-		res.setData(map);
+		if (null != of) {
+			Map<String, BigDecimal> map = new HashMap<String, BigDecimal>();
+			map.put(FinanceRatepayFields.GROSSPROFIT.getCode(), of.getGrossProfit());
+			map.put(FinanceRatepayFields.MANAGEMENTCOST.getCode(), of.getManagementCost());
+			map.put(FinanceRatepayFields.OPERATINGPROFIT.getCode(), of.getOperatingProfit());
+			map.put(FinanceRatepayFields.RESEARCHCOST.getCode(), of.getResearchCost());
+			res.setData(map);
+		}
 		return res;
 	}
-	
+
 	/**
 	 * 知识产权详情
 	 * 
@@ -264,7 +269,7 @@ public class CognizanceApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "知识产权TYPE"));
 			return res;
 		}
-		
+
 		OrgIntellectualProperty olp = orgIntellectualPropertyService.selectByPrimaryKey(id);
 		if (olp == null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID"));

+ 23 - 0
src/main/java/com/goafanti/common/dao/LegalPersonOwnershipMapper.java

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

+ 23 - 0
src/main/java/com/goafanti/common/dao/NatureOwnershipMapper.java

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

+ 132 - 0
src/main/java/com/goafanti/common/mapper/LegalPersonOwnershipMapper.xml

@@ -0,0 +1,132 @@
+<?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.LegalPersonOwnershipMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.LegalPersonOwnership" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="type" property="type" jdbcType="INTEGER" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
+    <result column="investment" property="investment" jdbcType="DECIMAL" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, type, name, org_code, investment, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from legal_person_ownership
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from legal_person_ownership
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.LegalPersonOwnership" >
+    insert into legal_person_ownership (id, uid, type, 
+      name, org_code, investment, 
+      deleted_sign)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{name,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, #{investment,jdbcType=DECIMAL}, 
+      #{deletedSign,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.LegalPersonOwnership" >
+    insert into legal_person_ownership
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="type != null" >
+        type,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="orgCode != null" >
+        org_code,
+      </if>
+      <if test="investment != null" >
+        investment,
+      </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="type != null" >
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="orgCode != null" >
+        #{orgCode,jdbcType=VARCHAR},
+      </if>
+      <if test="investment != null" >
+        #{investment,jdbcType=DECIMAL},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.LegalPersonOwnership" >
+    update legal_person_ownership
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null" >
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="orgCode != null" >
+        org_code = #{orgCode,jdbcType=VARCHAR},
+      </if>
+      <if test="investment != null" >
+        investment = #{investment,jdbcType=DECIMAL},
+      </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.LegalPersonOwnership" >
+    update legal_person_ownership
+    set uid = #{uid,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      name = #{name,jdbcType=VARCHAR},
+      org_code = #{orgCode,jdbcType=VARCHAR},
+      investment = #{investment,jdbcType=DECIMAL},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+    <select id="selectByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from legal_person_ownership
+    where uid = #{uid,jdbcType=VARCHAR} and deleted_sign = 0 order by investment desc
+  </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update legal_person_ownership set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
+</mapper>

+ 132 - 0
src/main/java/com/goafanti/common/mapper/NatureOwnershipMapper.xml

@@ -0,0 +1,132 @@
+<?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.NatureOwnershipMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.NatureOwnership" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="type" property="type" jdbcType="INTEGER" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="id_number" property="idNumber" jdbcType="VARCHAR" />
+    <result column="investment" property="investment" jdbcType="DECIMAL" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, type, name, id_number, investment, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from nature_ownership
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from nature_ownership
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.NatureOwnership" >
+    insert into nature_ownership (id, uid, type, 
+      name, id_number, investment, 
+      deleted_sign)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{name,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, #{investment,jdbcType=DECIMAL}, 
+      #{deletedSign,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.NatureOwnership" >
+    insert into nature_ownership
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="type != null" >
+        type,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="idNumber != null" >
+        id_number,
+      </if>
+      <if test="investment != null" >
+        investment,
+      </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="type != null" >
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="idNumber != null" >
+        #{idNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="investment != null" >
+        #{investment,jdbcType=DECIMAL},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.NatureOwnership" >
+    update nature_ownership
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null" >
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="idNumber != null" >
+        id_number = #{idNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="investment != null" >
+        investment = #{investment,jdbcType=DECIMAL},
+      </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.NatureOwnership" >
+    update nature_ownership
+    set uid = #{uid,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      name = #{name,jdbcType=VARCHAR},
+      id_number = #{idNumber,jdbcType=VARCHAR},
+      investment = #{investment,jdbcType=DECIMAL},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="selectByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from nature_ownership
+    where uid = #{uid,jdbcType=VARCHAR} and deleted_sign = 0 order by investment desc
+  </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update nature_ownership set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
+</mapper>

+ 90 - 0
src/main/java/com/goafanti/common/model/LegalPersonOwnership.java

@@ -0,0 +1,90 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+
+public class LegalPersonOwnership {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 法人类型(0--中国企业法人,1--外国企业法人)
+    */
+    private Integer type;
+
+    /**
+    * 名称
+    */
+    private String name;
+
+    /**
+    * 组织机构代码或统一社会信用代码
+    */
+    private String orgCode;
+
+    /**
+    * 投资(万元)
+    */
+    private BigDecimal investment;
+
+    /**
+    * 删除标记
+    */
+    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 Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+
+    public BigDecimal getInvestment() {
+        return investment;
+    }
+
+    public void setInvestment(BigDecimal investment) {
+        this.investment = investment;
+    }
+
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+}

+ 90 - 0
src/main/java/com/goafanti/common/model/NatureOwnership.java

@@ -0,0 +1,90 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+
+public class NatureOwnership {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 类型 (0--中国公民,1--外籍公民)
+    */
+    private Integer type;
+
+    /**
+    * 姓名
+    */
+    private String name;
+
+    /**
+    * 身份证(护照)号
+    */
+    private String idNumber;
+
+    /**
+    * 投资额(万元)
+    */
+    private BigDecimal investment;
+
+    /**
+    * 删除标记
+    */
+    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 Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIdNumber() {
+        return idNumber;
+    }
+
+    public void setIdNumber(String idNumber) {
+        this.idNumber = idNumber;
+    }
+
+    public BigDecimal getInvestment() {
+        return investment;
+    }
+
+    public void setInvestment(BigDecimal investment) {
+        this.investment = investment;
+    }
+
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+}

+ 13 - 0
src/main/java/com/goafanti/user/service/LegalPersonOwnershipService.java

@@ -0,0 +1,13 @@
+package com.goafanti.user.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.LegalPersonOwnership;
+
+public interface LegalPersonOwnershipService {
+
+	List<LegalPersonOwnership> selectByUid(String uid);
+
+	int batchDeleteByPrimaryKey(List<String> asList);
+
+}

+ 13 - 0
src/main/java/com/goafanti/user/service/NatureOwnershipService.java

@@ -0,0 +1,13 @@
+package com.goafanti.user.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.NatureOwnership;
+
+public interface NatureOwnershipService {
+
+	List<NatureOwnership> selectByUid(String uid);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+}

+ 26 - 0
src/main/java/com/goafanti/user/service/impl/LegalPersonOwnershipServiceImpl.java

@@ -0,0 +1,26 @@
+package com.goafanti.user.service.impl;
+
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.LegalPersonOwnershipMapper;
+import com.goafanti.common.model.LegalPersonOwnership;
+import com.goafanti.user.service.LegalPersonOwnershipService;
+@Service
+public class LegalPersonOwnershipServiceImpl implements LegalPersonOwnershipService{
+	@Autowired
+	private LegalPersonOwnershipMapper legalPersonOwnershipMapper;
+
+	@Override
+	public List<LegalPersonOwnership> selectByUid(String uid) {
+		return legalPersonOwnershipMapper.selectByUid(uid);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return legalPersonOwnershipMapper.batchDeleteByPrimaryKey(id);
+	}
+}

+ 26 - 0
src/main/java/com/goafanti/user/service/impl/NatureOwnershipServiceImpl.java

@@ -0,0 +1,26 @@
+package com.goafanti.user.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.NatureOwnershipMapper;
+import com.goafanti.common.model.NatureOwnership;
+import com.goafanti.user.service.NatureOwnershipService;
+@Service
+public class NatureOwnershipServiceImpl implements NatureOwnershipService {
+	@Autowired
+	private NatureOwnershipMapper natureOwnershipMapper;
+
+	@Override
+	public List<NatureOwnership> selectByUid(String uid) {
+		return natureOwnershipMapper.selectByUid(uid);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return natureOwnershipMapper.batchDeleteByPrimaryKey(id);
+	}
+
+}

+ 2 - 0
src/main/webapp/WEB-INF/views/header.jsp

@@ -57,6 +57,8 @@
 	window.showAchievement = true;
 	window.showDemand = true;
 	window.showIdea = true;
+	window.showUserList = true;
+	window.showOrgList = true;
 	</shiro:hasRole>
 
 	<shiro:hasPermission name="userManage">