Просмотр исходного кода

1.上年度高新技术产品(服务)情况CRUD接口;
2.企业年度研究开发费用结构明细表CRUD接口;
3.企业研究开发活动情况CRUD接口

Antiloveg лет назад: 9
Родитель
Сommit
b1d1ed5be6
40 измененных файлов с 1955 добавлено и 402 удалено
  1. 125 19
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  2. 2 0
      src/main/java/com/goafanti/common/constant/ErrorConstants.java
  3. 0 3
      src/main/java/com/goafanti/common/controller/PublicController.java
  4. 23 0
      src/main/java/com/goafanti/common/dao/OrgActivityCostMapper.java
  5. 4 0
      src/main/java/com/goafanti/common/dao/OrgActivityMapper.java
  6. 4 0
      src/main/java/com/goafanti/common/dao/OrgIntellectualPropertyMapper.java
  7. 4 0
      src/main/java/com/goafanti/common/dao/OrgStandardMapper.java
  8. 21 0
      src/main/java/com/goafanti/common/dao/OrgTechProductMapper.java
  9. 0 1
      src/main/java/com/goafanti/common/dao/UserAbilityMapper.java
  10. 323 0
      src/main/java/com/goafanti/common/mapper/OrgActivityCostMapper.xml
  11. 24 141
      src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml
  12. 32 0
      src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml
  13. 11 8
      src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml
  14. 260 0
      src/main/java/com/goafanti/common/mapper/OrgTechProductMapper.xml
  15. 1 1
      src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml
  16. 18 1
      src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml
  17. 2 14
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  18. 14 153
      src/main/java/com/goafanti/common/model/OrgActivity.java
  19. 275 0
      src/main/java/com/goafanti/common/model/OrgActivityCost.java
  20. 7 2
      src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java
  21. 219 0
      src/main/java/com/goafanti/common/model/OrgTechProduct.java
  22. 313 49
      src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java
  23. 22 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgActivityCostService.java
  24. 5 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgActivityService.java
  25. 11 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgIntellectualPropertyService.java
  26. 4 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgStandardService.java
  27. 18 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgTechProductService.java
  28. 88 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgActivityCostServiceImpl.java
  29. 11 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgActivityServiceImpl.java
  30. 46 2
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java
  31. 7 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgStandardServiceImpl.java
  32. 59 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgTechProductServiceImpl.java
  33. 0 1
      src/main/java/com/goafanti/techservice/patent/bo/PatentCompositeBo.java
  34. 1 1
      src/main/java/com/goafanti/techservice/patent/service/impl/PatentInfoServiceImpl.java
  35. 0 1
      src/main/java/com/goafanti/techservice/patent/service/impl/PatentRegistrationServiceImpl.java
  36. 0 1
      src/main/java/com/goafanti/user/bo/UserListBo.java
  37. 0 1
      src/main/java/com/goafanti/user/service/OrganizationInfoService.java
  38. 0 1
      src/main/java/com/goafanti/user/service/UserAbilityService.java
  39. 0 1
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  40. 1 1
      src/main/resources/spring/spring-shiro.xml

+ 125 - 19
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -12,17 +12,21 @@ 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.BaseApiController;
 import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.common.model.OrgStandard;
+import com.goafanti.common.model.OrgTechProduct;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 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.OrgStandardService;
+import com.goafanti.techservice.cognizance.service.OrgTechProductService;
 import com.goafanti.user.bo.OrgListBo;
 import com.goafanti.user.bo.UserListBo;
 import com.goafanti.user.service.OrgHumanResourceService;
@@ -45,6 +49,8 @@ public class AdminApiController extends BaseApiController {
 	private OrgStandardService	orgStandardService;
 	@Resource
 	private OrgIntellectualPropertyService orgIntellectualPropertyService;
+	@Resource
+	private OrgTechProductService           orgTechProductService;
 
 	/**
 	 * 个人用户列表
@@ -202,17 +208,19 @@ public class AdminApiController extends BaseApiController {
 	public Result standard(String uid, String standardName, String standardNumber, Integer standardLevel,
 			Integer participateWay, String pageNo, String pageSize) {
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
+		res = checkCertify(res, uid);
+		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(orgStandardService.listOrgStandard(standardName, standardNumber, standardLevel, participateWay, pNo,
+					pSize, uid));
 		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(orgStandardService.listOrgStandard(standardName, standardNumber, standardLevel, participateWay, pNo,
-				pSize, uid));
-
 		return res;
 	}
 	
@@ -242,22 +250,112 @@ public class AdminApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value="/intellectual", method = RequestMethod.POST)
-	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDate, String uid){
+	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate, String uid){
 		Result res = new Result();
-		try {
-			orgIntellectualProperty.setId(UUID.randomUUID().toString());
-			orgIntellectualProperty.setUid(uid);
+		if (null == authorizationDateFormattedDate){
+			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "授权日期不能为空"));
+		}
+		if (null == orgIntellectualProperty.getId()){
+			try {
+				orgIntellectualProperty.setId(UUID.randomUUID().toString());
+				orgIntellectualProperty.setUid(uid);
+				orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
+				orgIntellectualProperty
+						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+			} catch (ParseException e) {
+				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
+				return res;
+			}
+			res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
+		} else {
 			orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
-			orgIntellectualProperty.setAuthorizationDate(DateUtils.parseDate(authorizationDate, "yyyy-MM-dd"));
-		} catch (ParseException e) {
-		    res.getError().add(buildError("", "日期格式不正确"));
-		    return res;
+			try {
+				orgIntellectualProperty
+				.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+			} catch (ParseException e) {
+				res.getError().add(buildError("", "日期格式不正确"));
+				return res;
+			}
+			res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(orgIntellectualProperty));
+		}
+		return res;
+	}
+	
+	/**
+	 * 知识产权列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value = "/intellectualList", method = RequestMethod.POST)
+	public Result intellectualList(String pageNo, String pageSize, String uid) {
+		Result res = new Result();
+		res = checkCertify(res, uid);
+		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(orgIntellectualPropertyService.listIntellectual(pNo, pSize, uid));
+		}
+		return res;
+	}
+	
+	/**
+	 * 上年度高新技术产品(服务)情况列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value = "/techProductList", method = RequestMethod.GET)
+	public Result techProductList(String pageNo, String pageSize, String uid){
+		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(orgTechProductService.listTechProduct(pNo, pSize, uid));
+		}
+		return res;
+	}
+	
+	/**
+	 * 上年度高新技术产品(服务)情况(新增+修改)
+	 * @param orgTechProduct
+	 * @return
+	 */
+	@RequestMapping(value = "/techProduct", method = RequestMethod.POST)
+	public Result techProduct(OrgTechProduct orgTechProduct, String uid){
+		Result res = new Result();
+		if (uid == null){
+			orgTechProduct.setId(UUID.randomUUID().toString());
+			orgTechProduct.setUid(uid);
+			orgTechProductService.insert(orgTechProduct);
+		} else {
+			orgTechProductService.updateByPrimaryKeySelective(orgTechProduct);
 		}
-		res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
+		res.setData(orgTechProduct);
 		return res;
 	}
 	
 	
+	//判断用户是否通过认证
+	private Result checkCertify(Result res,String uid){
+		if (5 != organizationIdentityService.selectOrgIdentityByUserId(uid).getAuditStatus()){
+			res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
+		} 
+		return res;
+	}
 
 	// org团体列表
 	private Pagination<OrgListBo> getOrgList(String mobile, String email, String[] createTime, Integer number,
@@ -272,4 +370,12 @@ public class AdminApiController extends BaseApiController {
 		return (Pagination<UserListBo>) userService.listUser(mobile, email, createTime, number, aftUsername,
 				auditStatus, pNo, pSize);
 	}
+	
+	//判断用户是否通过认证
+		private Result checkCertify(Result res){
+			if (5 != organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId()).getAuditStatus()){
+				res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
+			} 
+			return res;
+		}
 }

+ 2 - 0
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -54,5 +54,7 @@ public class ErrorConstants {
 	
 	public static final String INSUFFICIENT_AUTHORITY_ERROR = "INSUFFICIENT_AUTHORITY_ERROR";
 	
+	public static final String NON_CERTIFIED = "NON_CERTIFIED";
+	
 
 }

+ 0 - 3
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -11,7 +11,6 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.shiro.SecurityUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Controller;
@@ -29,8 +28,6 @@ import com.aliyuncs.sms.model.v20160927.SingleSendSmsRequest;
 import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.User;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PictureUtils;
 import com.goafanti.common.utils.TimeUtils;

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

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

+ 4 - 0
src/main/java/com/goafanti/common/dao/OrgActivityMapper.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgActivity;
 
 public interface OrgActivityMapper {
@@ -14,4 +16,6 @@ public interface OrgActivityMapper {
     int updateByPrimaryKeySelective(OrgActivity record);
 
     int updateByPrimaryKey(OrgActivity record);
+
+	int batchDeleteByPrimaryKey(List<String> id);
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/OrgIntellectualPropertyMapper.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgIntellectualProperty;
 
 public interface OrgIntellectualPropertyMapper {
@@ -14,4 +16,6 @@ public interface OrgIntellectualPropertyMapper {
     int updateByPrimaryKeySelective(OrgIntellectualProperty record);
 
     int updateByPrimaryKey(OrgIntellectualProperty record);
+
+	int batchDeleteByPrimaryKey(List<String> id);
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/OrgStandardMapper.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgStandard;
 
 public interface OrgStandardMapper {
@@ -15,4 +17,6 @@ public interface OrgStandardMapper {
 
     int updateByPrimaryKey(OrgStandard record);
 
+	int batchDeleteByPrimaryKey(List<String> id);
+
 }

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

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

+ 0 - 1
src/main/java/com/goafanti/common/dao/UserAbilityMapper.java

@@ -1,7 +1,6 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserAbility;
-import com.goafanti.common.model.UserCareer;
 
 public interface UserAbilityMapper {
     int deleteByPrimaryKey(String id);

+ 323 - 0
src/main/java/com/goafanti/common/mapper/OrgActivityCostMapper.xml

@@ -0,0 +1,323 @@
+<?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.OrgActivityCostMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgActivityCost" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="aid" property="aid" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="activity_number" property="activityNumber" jdbcType="VARCHAR" />
+    <result column="internal_labor_cost" property="internalLaborCost" jdbcType="INTEGER" />
+    <result column="internal_direct_cost" property="internalDirectCost" jdbcType="INTEGER" />
+    <result column="internal_depreciation_cost" property="internalDepreciationCost" jdbcType="INTEGER" />
+    <result column="internal_amortization_cost" property="internalAmortizationCost" jdbcType="INTEGER" />
+    <result column="internal_design_cost" property="internalDesignCost" jdbcType="INTEGER" />
+    <result column="internal_equipment_cost" property="internalEquipmentCost" jdbcType="INTEGER" />
+    <result column="internal_other_cost" property="internalOtherCost" jdbcType="INTEGER" />
+    <result column="external_total_cost" property="externalTotalCost" jdbcType="INTEGER" />
+    <result column="external_abroad_cost" property="externalAbroadCost" jdbcType="INTEGER" />
+    <result column="enterprise_filler" property="enterpriseFiller" jdbcType="VARCHAR" />
+    <result column="sign_date" property="signDate" jdbcType="TIMESTAMP" />
+    <result column="sort_number" property="sortNumber" jdbcType="VARCHAR" />
+    <result column="start_date" property="startDate" jdbcType="TIMESTAMP" />
+    <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, aid, uid, activity_number, internal_labor_cost, internal_direct_cost, internal_depreciation_cost, 
+    internal_amortization_cost, internal_design_cost, internal_equipment_cost, internal_other_cost, 
+    external_total_cost, external_abroad_cost, enterprise_filler, sign_date, sort_number, 
+    start_date, end_date, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_activity_cost
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_activity_cost
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgActivityCost" >
+    insert into org_activity_cost (id, aid, uid, 
+      activity_number, internal_labor_cost, internal_direct_cost, 
+      internal_depreciation_cost, internal_amortization_cost, 
+      internal_design_cost, internal_equipment_cost, 
+      internal_other_cost, external_total_cost, external_abroad_cost, 
+      enterprise_filler, sign_date, sort_number, 
+      start_date, end_date, deleted_sign
+      )
+    values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, 
+      #{activityNumber,jdbcType=VARCHAR}, #{internalLaborCost,jdbcType=INTEGER}, #{internalDirectCost,jdbcType=INTEGER}, 
+      #{internalDepreciationCost,jdbcType=INTEGER}, #{internalAmortizationCost,jdbcType=INTEGER}, 
+      #{internalDesignCost,jdbcType=INTEGER}, #{internalEquipmentCost,jdbcType=INTEGER}, 
+      #{internalOtherCost,jdbcType=INTEGER}, #{externalTotalCost,jdbcType=INTEGER}, #{externalAbroadCost,jdbcType=INTEGER}, 
+      #{enterpriseFiller,jdbcType=VARCHAR}, #{signDate,jdbcType=TIMESTAMP}, #{sortNumber,jdbcType=VARCHAR}, 
+      #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgActivityCost" >
+    insert into org_activity_cost
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="aid != null" >
+        aid,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="activityNumber != null" >
+        activity_number,
+      </if>
+      <if test="internalLaborCost != null" >
+        internal_labor_cost,
+      </if>
+      <if test="internalDirectCost != null" >
+        internal_direct_cost,
+      </if>
+      <if test="internalDepreciationCost != null" >
+        internal_depreciation_cost,
+      </if>
+      <if test="internalAmortizationCost != null" >
+        internal_amortization_cost,
+      </if>
+      <if test="internalDesignCost != null" >
+        internal_design_cost,
+      </if>
+      <if test="internalEquipmentCost != null" >
+        internal_equipment_cost,
+      </if>
+      <if test="internalOtherCost != null" >
+        internal_other_cost,
+      </if>
+      <if test="externalTotalCost != null" >
+        external_total_cost,
+      </if>
+      <if test="externalAbroadCost != null" >
+        external_abroad_cost,
+      </if>
+      <if test="enterpriseFiller != null" >
+        enterprise_filler,
+      </if>
+      <if test="signDate != null" >
+        sign_date,
+      </if>
+      <if test="sortNumber != null" >
+        sort_number,
+      </if>
+      <if test="startDate != null" >
+        start_date,
+      </if>
+      <if test="endDate != null" >
+        end_date,
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null" >
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="activityNumber != null" >
+        #{activityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="internalLaborCost != null" >
+        #{internalLaborCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDirectCost != null" >
+        #{internalDirectCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDepreciationCost != null" >
+        #{internalDepreciationCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalAmortizationCost != null" >
+        #{internalAmortizationCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDesignCost != null" >
+        #{internalDesignCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalEquipmentCost != null" >
+        #{internalEquipmentCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalOtherCost != null" >
+        #{internalOtherCost,jdbcType=INTEGER},
+      </if>
+      <if test="externalTotalCost != null" >
+        #{externalTotalCost,jdbcType=INTEGER},
+      </if>
+      <if test="externalAbroadCost != null" >
+        #{externalAbroadCost,jdbcType=INTEGER},
+      </if>
+      <if test="enterpriseFiller != null" >
+        #{enterpriseFiller,jdbcType=VARCHAR},
+      </if>
+      <if test="signDate != null" >
+        #{signDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sortNumber != null" >
+        #{sortNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="startDate != null" >
+        #{startDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endDate != null" >
+        #{endDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgActivityCost" >
+    update org_activity_cost
+    <set >
+      <if test="aid != null" >
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="activityNumber != null" >
+        activity_number = #{activityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="internalLaborCost != null" >
+        internal_labor_cost = #{internalLaborCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDirectCost != null" >
+        internal_direct_cost = #{internalDirectCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDepreciationCost != null" >
+        internal_depreciation_cost = #{internalDepreciationCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalAmortizationCost != null" >
+        internal_amortization_cost = #{internalAmortizationCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalDesignCost != null" >
+        internal_design_cost = #{internalDesignCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalEquipmentCost != null" >
+        internal_equipment_cost = #{internalEquipmentCost,jdbcType=INTEGER},
+      </if>
+      <if test="internalOtherCost != null" >
+        internal_other_cost = #{internalOtherCost,jdbcType=INTEGER},
+      </if>
+      <if test="externalTotalCost != null" >
+        external_total_cost = #{externalTotalCost,jdbcType=INTEGER},
+      </if>
+      <if test="externalAbroadCost != null" >
+        external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
+      </if>
+      <if test="enterpriseFiller != null" >
+        enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
+      </if>
+      <if test="signDate != null" >
+        sign_date = #{signDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sortNumber != null" >
+        sort_number = #{sortNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="startDate != null" >
+        start_date = #{startDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endDate != null" >
+        end_date = #{endDate,jdbcType=TIMESTAMP},
+      </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.OrgActivityCost" >
+    update org_activity_cost
+    set aid = #{aid,jdbcType=VARCHAR},
+      uid = #{uid,jdbcType=VARCHAR},
+      activity_number = #{activityNumber,jdbcType=VARCHAR},
+      internal_labor_cost = #{internalLaborCost,jdbcType=INTEGER},
+      internal_direct_cost = #{internalDirectCost,jdbcType=INTEGER},
+      internal_depreciation_cost = #{internalDepreciationCost,jdbcType=INTEGER},
+      internal_amortization_cost = #{internalAmortizationCost,jdbcType=INTEGER},
+      internal_design_cost = #{internalDesignCost,jdbcType=INTEGER},
+      internal_equipment_cost = #{internalEquipmentCost,jdbcType=INTEGER},
+      internal_other_cost = #{internalOtherCost,jdbcType=INTEGER},
+      external_total_cost = #{externalTotalCost,jdbcType=INTEGER},
+      external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
+      enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
+      sign_date = #{signDate,jdbcType=TIMESTAMP},
+      sort_number = #{sortNumber,jdbcType=VARCHAR},
+      start_date = #{startDate,jdbcType=TIMESTAMP},
+      end_date = #{endDate,jdbcType=TIMESTAMP},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="findOrgActivityCostListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_activity_cost
+    where deleted_sign = 0
+    <if test="uid != null">
+	    and  uid = #{uid,jdbcType=VARCHAR}
+	</if>
+    <if test="activityNumber != null">
+    	and  activity_number = #{activityNumber,jdbcType=VARCHAR}
+    </if>
+    <if test="activityName != null">
+    	and  activity_name= #{activityName,jdbcType=VARCHAR}
+    </if>
+    <if test="startDate != null">
+    	and  start_date <![CDATA[ > ]]> #{startDate,jdbcType=TIMESTAMP}
+    </if>
+    <if test="endDate != null">
+    	and  end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
+    </if>
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  
+   <select id="findOrgActivityCostCount" resultType="java.lang.Integer" parameterType="String">
+  	 select count(1) 
+    from org_activity_cost
+    where deleted_sign = 0
+    <if test="uid != null">
+	    and  uid = #{uid,jdbcType=VARCHAR}
+	</if>
+    <if test="activityNumber != null">
+    	and  activity_number = #{activityNumber,jdbcType=VARCHAR}
+    </if>
+    <if test="activityName != null">
+    	and  activity_name= #{activityName,jdbcType=VARCHAR}
+    </if>
+    <if test="startDate != null">
+    	and  start_date <![CDATA[ > ]]> #{startDate,jdbcType=TIMESTAMP}
+    </if>
+    <if test="endDate != null">
+    	and  end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
+    </if>
+  </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_activity_cost set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
+  
+  <select id="selectOrgActivityCostByAid" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_activity_cost
+    where aid = #{aid,jdbcType=VARCHAR}
+  </select>
+</mapper>

+ 24 - 141
src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml

@@ -20,27 +20,13 @@
     <result column="implement" property="implement" jdbcType="VARCHAR" />
     <result column="technology_innovation" property="technologyInnovation" jdbcType="VARCHAR" />
     <result column="achievement" property="achievement" jdbcType="VARCHAR" />
-    <result column="internal_labor_cost" property="internalLaborCost" jdbcType="INTEGER" />
-    <result column="internal_direct_cost" property="internalDirectCost" jdbcType="INTEGER" />
-    <result column="internal_depreciation_cost" property="internalDepreciationCost" jdbcType="INTEGER" />
-    <result column="internal_amortization_cost" property="internalAmortizationCost" jdbcType="INTEGER" />
-    <result column="internal_design_cost" property="internalDesignCost" jdbcType="INTEGER" />
-    <result column="internal_equipment_cost" property="internalEquipmentCost" jdbcType="INTEGER" />
-    <result column="internal_other_cost" property="internalOtherCost" jdbcType="INTEGER" />
-    <result column="external_total_cost" property="externalTotalCost" jdbcType="INTEGER" />
-    <result column="external_abroad_cost" property="externalAbroadCost" jdbcType="INTEGER" />
-    <result column="enterprise_filler" property="enterpriseFiller" jdbcType="VARCHAR" />
-    <result column="sign_date" property="signDate" jdbcType="TIMESTAMP" />
-    <result column="sort_number" property="sortNumber" jdbcType="VARCHAR" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, activity_number, activity_name, start_date, end_date, technical_field1, 
     technical_field2, technical_field3, technical_source, intellectual_property_number, 
     budget, first_year_expenditure, second_year_expenditure, third_year_expenditure, 
-    implement, technology_innovation, achievement, internal_labor_cost, internal_direct_cost, 
-    internal_depreciation_cost, internal_amortization_cost, internal_design_cost, internal_equipment_cost, 
-    internal_other_cost, external_total_cost, external_abroad_cost, enterprise_filler, 
-    sign_date, sort_number
+    implement, technology_innovation, achievement, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -59,11 +45,7 @@
       technical_source, intellectual_property_number, 
       budget, first_year_expenditure, second_year_expenditure, 
       third_year_expenditure, implement, technology_innovation, 
-      achievement, internal_labor_cost, internal_direct_cost, 
-      internal_depreciation_cost, internal_amortization_cost, 
-      internal_design_cost, internal_equipment_cost, 
-      internal_other_cost, external_total_cost, external_abroad_cost, 
-      enterprise_filler, sign_date, sort_number
+      achievement, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{activityNumber,jdbcType=VARCHAR}, 
       #{activityName,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, 
@@ -71,11 +53,7 @@
       #{technicalSource,jdbcType=INTEGER}, #{intellectualPropertyNumber,jdbcType=VARCHAR}, 
       #{budget,jdbcType=INTEGER}, #{firstYearExpenditure,jdbcType=INTEGER}, #{secondYearExpenditure,jdbcType=INTEGER}, 
       #{thirdYearExpenditure,jdbcType=INTEGER}, #{implement,jdbcType=VARCHAR}, #{technologyInnovation,jdbcType=VARCHAR}, 
-      #{achievement,jdbcType=VARCHAR}, #{internalLaborCost,jdbcType=INTEGER}, #{internalDirectCost,jdbcType=INTEGER}, 
-      #{internalDepreciationCost,jdbcType=INTEGER}, #{internalAmortizationCost,jdbcType=INTEGER}, 
-      #{internalDesignCost,jdbcType=INTEGER}, #{internalEquipmentCost,jdbcType=INTEGER}, 
-      #{internalOtherCost,jdbcType=INTEGER}, #{externalTotalCost,jdbcType=INTEGER}, #{externalAbroadCost,jdbcType=INTEGER}, 
-      #{enterpriseFiller,jdbcType=VARCHAR}, #{signDate,jdbcType=TIMESTAMP}, #{sortNumber,jdbcType=VARCHAR}
+      #{achievement,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgActivity" >
@@ -135,41 +113,8 @@
       <if test="achievement != null" >
         achievement,
       </if>
-      <if test="internalLaborCost != null" >
-        internal_labor_cost,
-      </if>
-      <if test="internalDirectCost != null" >
-        internal_direct_cost,
-      </if>
-      <if test="internalDepreciationCost != null" >
-        internal_depreciation_cost,
-      </if>
-      <if test="internalAmortizationCost != null" >
-        internal_amortization_cost,
-      </if>
-      <if test="internalDesignCost != null" >
-        internal_design_cost,
-      </if>
-      <if test="internalEquipmentCost != null" >
-        internal_equipment_cost,
-      </if>
-      <if test="internalOtherCost != null" >
-        internal_other_cost,
-      </if>
-      <if test="externalTotalCost != null" >
-        external_total_cost,
-      </if>
-      <if test="externalAbroadCost != null" >
-        external_abroad_cost,
-      </if>
-      <if test="enterpriseFiller != null" >
-        enterprise_filler,
-      </if>
-      <if test="signDate != null" >
-        sign_date,
-      </if>
-      <if test="sortNumber != null" >
-        sort_number,
+      <if test="deletedSign != null" >
+        deleted_sign,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -227,41 +172,8 @@
       <if test="achievement != null" >
         #{achievement,jdbcType=VARCHAR},
       </if>
-      <if test="internalLaborCost != null" >
-        #{internalLaborCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDirectCost != null" >
-        #{internalDirectCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDepreciationCost != null" >
-        #{internalDepreciationCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalAmortizationCost != null" >
-        #{internalAmortizationCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDesignCost != null" >
-        #{internalDesignCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalEquipmentCost != null" >
-        #{internalEquipmentCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalOtherCost != null" >
-        #{internalOtherCost,jdbcType=INTEGER},
-      </if>
-      <if test="externalTotalCost != null" >
-        #{externalTotalCost,jdbcType=INTEGER},
-      </if>
-      <if test="externalAbroadCost != null" >
-        #{externalAbroadCost,jdbcType=INTEGER},
-      </if>
-      <if test="enterpriseFiller != null" >
-        #{enterpriseFiller,jdbcType=VARCHAR},
-      </if>
-      <if test="signDate != null" >
-        #{signDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="sortNumber != null" >
-        #{sortNumber,jdbcType=VARCHAR},
+       <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -319,41 +231,8 @@
       <if test="achievement != null" >
         achievement = #{achievement,jdbcType=VARCHAR},
       </if>
-      <if test="internalLaborCost != null" >
-        internal_labor_cost = #{internalLaborCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDirectCost != null" >
-        internal_direct_cost = #{internalDirectCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDepreciationCost != null" >
-        internal_depreciation_cost = #{internalDepreciationCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalAmortizationCost != null" >
-        internal_amortization_cost = #{internalAmortizationCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalDesignCost != null" >
-        internal_design_cost = #{internalDesignCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalEquipmentCost != null" >
-        internal_equipment_cost = #{internalEquipmentCost,jdbcType=INTEGER},
-      </if>
-      <if test="internalOtherCost != null" >
-        internal_other_cost = #{internalOtherCost,jdbcType=INTEGER},
-      </if>
-      <if test="externalTotalCost != null" >
-        external_total_cost = #{externalTotalCost,jdbcType=INTEGER},
-      </if>
-      <if test="externalAbroadCost != null" >
-        external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
-      </if>
-      <if test="enterpriseFiller != null" >
-        enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
-      </if>
-      <if test="signDate != null" >
-        sign_date = #{signDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="sortNumber != null" >
-        sort_number = #{sortNumber,jdbcType=VARCHAR},
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
@@ -388,7 +267,8 @@
       external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
       enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
       sign_date = #{signDate,jdbcType=TIMESTAMP},
-      sort_number = #{sortNumber,jdbcType=VARCHAR}
+      sort_number = #{sortNumber,jdbcType=VARCHAR},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -396,7 +276,7 @@
   	 select 
     <include refid="Base_Column_List" />
     from org_activity
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -418,11 +298,9 @@
   </select>
   
    <select id="findOrgActivityCount" resultType="java.lang.Integer" parameterType="String">
-  	 select count(1) from (
-  	 	 select 
-    <include refid="Base_Column_List" />
+  	 select count(1) 
     from org_activity
-    where 1=1
+    where deleted_sign = 0
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
@@ -438,9 +316,14 @@
     <if test="endDate != null">
     	and  end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
     </if>
-    <if test="page_sql != null">
-    	${page_sql}
-    </if>
-    ) as total
   </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_activity set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
+  
 </mapper>

+ 32 - 0
src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml

@@ -150,4 +150,36 @@
       evaluation_category = #{evaluationCategory,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  
+  
+  <select id="findOrgIntellectualPropertyListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_intellectual_property
+    where 1=1
+    <if test="uid != null">
+	    and  uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	order by authorization_date desc
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
+    
+  </select>
+  
+  <select id="findOrgIntellectualPropertyCount" resultType="java.lang.Integer" parameterType="String">
+   	select count(1) 
+	    from org_intellectual_property
+	    where 1=1
+	    <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 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+	#{item}
+	</foreach>
+  </delete>
 </mapper>

+ 11 - 8
src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml

@@ -136,15 +136,15 @@
     <if test="participateWay != null">
     	and   participate_way= #{participateWay,jdbcType=INTEGER}
     </if>
+    order by create_time desc
     <if test="page_sql != null">
     	${page_sql}
     </if>
+    
   </select>
   
    <select id="findOrgStandardCount" resultType="java.lang.Integer" parameterType="String">
-   	select count(1) from (
-   		 select 
-    <include refid="Base_Column_List" />
+   	select count(1) 
     from org_standard
     where 1=1
     <if test="uid != null">
@@ -162,10 +162,13 @@
     <if test="participateWay != null">
     	and   participate_way= #{participateWay,jdbcType=INTEGER}
     </if>
-    <if test="page_sql != null">
-    	${page_sql}
-    </if>
-    )
-    as total
+    order by create_time desc
     </select>
+    
+     <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+		DELETE FROM org_standard WHERE ID in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </delete>
 </mapper>

+ 260 - 0
src/main/java/com/goafanti/common/mapper/OrgTechProductMapper.xml

@@ -0,0 +1,260 @@
+<?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.OrgTechProductMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgTechProduct" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="serial_number" property="serialNumber" jdbcType="VARCHAR" />
+    <result column="product_name" property="productName" jdbcType="VARCHAR" />
+    <result column="technical_field1" property="technicalField1" jdbcType="INTEGER" />
+    <result column="technical_field2" property="technicalField2" jdbcType="INTEGER" />
+    <result column="technical_field3" property="technicalField3" jdbcType="INTEGER" />
+    <result column="technical_source" property="technicalSource" jdbcType="INTEGER" />
+    <result column="last_year_revenue" property="lastYearRevenue" jdbcType="VARCHAR" />
+    <result column="main_product" property="mainProduct" jdbcType="INTEGER" />
+    <result column="intellectual_property_number" property="intellectualPropertyNumber" jdbcType="VARCHAR" />
+    <result column="key_technology" property="keyTechnology" jdbcType="VARCHAR" />
+    <result column="competitive_edge" property="competitiveEdge" jdbcType="VARCHAR" />
+    <result column="condition_effect" property="conditionEffect" jdbcType="VARCHAR" />
+    <result column="year" property="year" jdbcType="INTEGER" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </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
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_tech_product
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_tech_product
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgTechProduct" >
+    insert into org_tech_product (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)
+    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})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
+    insert into org_tech_product
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="serialNumber != null" >
+        serial_number,
+      </if>
+      <if test="productName != null" >
+        product_name,
+      </if>
+      <if test="technicalField1 != null" >
+        technical_field1,
+      </if>
+      <if test="technicalField2 != null" >
+        technical_field2,
+      </if>
+      <if test="technicalField3 != null" >
+        technical_field3,
+      </if>
+      <if test="technicalSource != null" >
+        technical_source,
+      </if>
+      <if test="lastYearRevenue != null" >
+        last_year_revenue,
+      </if>
+      <if test="mainProduct != null" >
+        main_product,
+      </if>
+      <if test="intellectualPropertyNumber != null" >
+        intellectual_property_number,
+      </if>
+      <if test="keyTechnology != null" >
+        key_technology,
+      </if>
+      <if test="competitiveEdge != null" >
+        competitive_edge,
+      </if>
+      <if test="conditionEffect != null" >
+        condition_effect,
+      </if>
+      <if test="year != null" >
+        year,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </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="serialNumber != null" >
+        #{serialNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="productName != null" >
+        #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField1 != null" >
+        #{technicalField1,jdbcType=INTEGER},
+      </if>
+      <if test="technicalField2 != null" >
+        #{technicalField2,jdbcType=INTEGER},
+      </if>
+      <if test="technicalField3 != null" >
+        #{technicalField3,jdbcType=INTEGER},
+      </if>
+      <if test="technicalSource != null" >
+        #{technicalSource,jdbcType=INTEGER},
+      </if>
+      <if test="lastYearRevenue != null" >
+        #{lastYearRevenue,jdbcType=VARCHAR},
+      </if>
+      <if test="mainProduct != null" >
+        #{mainProduct,jdbcType=INTEGER},
+      </if>
+      <if test="intellectualPropertyNumber != null" >
+        #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="keyTechnology != null" >
+        #{keyTechnology,jdbcType=VARCHAR},
+      </if>
+      <if test="competitiveEdge != null" >
+        #{competitiveEdge,jdbcType=VARCHAR},
+      </if>
+      <if test="conditionEffect != null" >
+        #{conditionEffect,jdbcType=VARCHAR},
+      </if>
+      <if test="year != null" >
+        #{year,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
+    update org_tech_product
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="serialNumber != null" >
+        serial_number = #{serialNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="productName != null" >
+        product_name = #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField1 != null" >
+        technical_field1 = #{technicalField1,jdbcType=INTEGER},
+      </if>
+      <if test="technicalField2 != null" >
+        technical_field2 = #{technicalField2,jdbcType=INTEGER},
+      </if>
+      <if test="technicalField3 != null" >
+        technical_field3 = #{technicalField3,jdbcType=INTEGER},
+      </if>
+      <if test="technicalSource != null" >
+        technical_source = #{technicalSource,jdbcType=INTEGER},
+      </if>
+      <if test="lastYearRevenue != null" >
+        last_year_revenue = #{lastYearRevenue,jdbcType=VARCHAR},
+      </if>
+      <if test="mainProduct != null" >
+        main_product = #{mainProduct,jdbcType=INTEGER},
+      </if>
+      <if test="intellectualPropertyNumber != null" >
+        intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="keyTechnology != null" >
+        key_technology = #{keyTechnology,jdbcType=VARCHAR},
+      </if>
+      <if test="competitiveEdge != null" >
+        competitive_edge = #{competitiveEdge,jdbcType=VARCHAR},
+      </if>
+      <if test="conditionEffect != null" >
+        condition_effect = #{conditionEffect,jdbcType=VARCHAR},
+      </if>
+      <if test="year != null" >
+        year = #{year,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgTechProduct" >
+    update org_tech_product
+    set uid = #{uid,jdbcType=VARCHAR},
+      serial_number = #{serialNumber,jdbcType=VARCHAR},
+      product_name = #{productName,jdbcType=VARCHAR},
+      technical_field1 = #{technicalField1,jdbcType=INTEGER},
+      technical_field2 = #{technicalField2,jdbcType=INTEGER},
+      technical_field3 = #{technicalField3,jdbcType=INTEGER},
+      technical_source = #{technicalSource,jdbcType=INTEGER},
+      last_year_revenue = #{lastYearRevenue,jdbcType=VARCHAR},
+      main_product = #{mainProduct,jdbcType=INTEGER},
+      intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      key_technology = #{keyTechnology,jdbcType=VARCHAR},
+      competitive_edge = #{competitiveEdge,jdbcType=VARCHAR},
+      condition_effect = #{conditionEffect,jdbcType=VARCHAR},
+      year = #{year,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id = "findOrgTechProductListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_tech_product
+    where 1=1
+    <if test="uid != null">
+	    and  uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="year != null">
+		and year = #{year,jdbcType=INTEGER}
+	</if>
+	order by create_time desc
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  
+  <select id="findOrgTechProductCount" resultType="java.lang.Integer" parameterType="String">
+   	select count(1) 
+	    from org_tech_product
+	    where 1=1
+	    <if test="uid != null">
+		    and  uid = #{uid,jdbcType=VARCHAR}
+		</if>
+		<if test="year != null">
+		and year = #{year,jdbcType=INTEGER}
+	</if>
+    </select>
+    
+  <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+	DELETE FROM org_tech_product WHERE ID in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+	#{item}
+	</foreach>
+  </delete>
+</mapper>

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

@@ -532,7 +532,7 @@
   <select id="selectAllOrgIndentity" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
-    from organization_identity
+    from organization_identity where audit_status = 5
   </select>
   
    

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

@@ -427,9 +427,26 @@
 	
   </select>
   
-  <select id="findClentApplyCount" resultType="java.lang.Integer">
+  <select id="findClentApplyCount" resultType="java.lang.Integer" parameterType="String">
  	select count(1)
     from patent_info
+    where 1=1
+    <if test ="uid != null">
+        and uid = #{uid,jdbcType=VARCHAR}
+    </if>
+    <if test = "patentNumber != null" >
+        and patent_number = #{patentNumber,jdbcType=VARCHAR}
+    </if>
+    <if test = "patentName != null">
+    	and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
+    </if>
+     <if test = "patentCatagory != null">
+    	and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
+    </if>
+     <if test = "patentState != nulll">
+    	and patent_state = #{patentState,jdbcType=INTEGER}
+    </if>
+    order by  patent_application_date desc
   </select>
   
   <select id="findManagePatentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentCompositeBo"  parameterType="String">

+ 2 - 14
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -217,9 +217,7 @@
   </select>
   
   <select id="findUserCount" resultType="java.lang.Integer" parameterType="String">
-  	select count(1) from (
-  		select u.id ,u.mobile, u.email, u.create_time as createTime, 
-  	       u.number , i.aft_username as aftUsername, i.audit_status as auditStatus
+  	select count(1) 
     from user u LEFT JOIN user_identity i 
     ON u.id = i.uid 
     WHERE u.type = 0
@@ -244,10 +242,6 @@
 	<if test="auditStatus != null">
 		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
-	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-	) as total
   </select>  
   
   <select id="findOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
@@ -283,9 +277,7 @@
   </select>
   
   <select id="findOrgCount" resultType="java.lang.Integer" parameterType="String">
-  	select count(1) from (
-  		select u.id ,u.mobile, u.email, u.create_time as createTime, 
-  	       u.number , o.aft_username as aftUsername, o.audit_status as auditStatus
+  	select count(1) 
     from user u LEFT JOIN organization_identity o 
     ON u.id = o.uid 
     WHERE u.type = 1
@@ -310,9 +302,5 @@
 	<if test="auditStatus != null">
 		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
-	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-	) as total
   </select>  
 </mapper>

+ 14 - 153
src/main/java/com/goafanti/common/model/OrgActivity.java

@@ -88,66 +88,12 @@ public class OrgActivity {
     * 取得的阶段性成果
     */
     private String achievement;
-
-    /**
-    * 内部人员人工费用(万元)
-    */
-    private Integer internalLaborCost;
-
-    /**
-    * 内部直接投入费用(万元)
-    */
-    private Integer internalDirectCost;
-
-    /**
-    * 内部折旧费用与长期待摊费用(万元)
-    */
-    private Integer internalDepreciationCost;
-
-    /**
-    * 内部无形资产摊销费用(万元)
-    */
-    private Integer internalAmortizationCost;
-
-    /**
-    * 内部设计费用(万元)
-    */
-    private Integer internalDesignCost;
-
-    /**
-    * 内部装备调试费用与实验费用(万元)
-    */
-    private Integer internalEquipmentCost;
-
-    /**
-    * 内部其他费用(万元)
-    */
-    private Integer internalOtherCost;
-
-    /**
-    * 委托外部研究开发总费用(万元)
-    */
-    private Integer externalTotalCost;
-
-    /**
-    * 委托外部境内的外部研发费用(万元)
-    */
-    private Integer externalAbroadCost;
-
+    
     /**
-    * 企业填报人
-    */
-    private String enterpriseFiller;
+     * 删除标记
+     */
+    private Integer deletedSign;
 
-    /**
-    * 企业填报人签字日期
-    */
-    private Date signDate;
-
-    /**
-    * 排序号
-    */
-    private String sortNumber;
 
     public String getId() {
         return id;
@@ -292,104 +238,19 @@ public class OrgActivity {
     public void setAchievement(String achievement) {
         this.achievement = achievement;
     }
+    
+    
+    
 
-    public Integer getInternalLaborCost() {
-        return internalLaborCost;
-    }
-
-    public void setInternalLaborCost(Integer internalLaborCost) {
-        this.internalLaborCost = internalLaborCost;
-    }
-
-    public Integer getInternalDirectCost() {
-        return internalDirectCost;
-    }
-
-    public void setInternalDirectCost(Integer internalDirectCost) {
-        this.internalDirectCost = internalDirectCost;
-    }
-
-    public Integer getInternalDepreciationCost() {
-        return internalDepreciationCost;
-    }
-
-    public void setInternalDepreciationCost(Integer internalDepreciationCost) {
-        this.internalDepreciationCost = internalDepreciationCost;
-    }
-
-    public Integer getInternalAmortizationCost() {
-        return internalAmortizationCost;
-    }
-
-    public void setInternalAmortizationCost(Integer internalAmortizationCost) {
-        this.internalAmortizationCost = internalAmortizationCost;
-    }
-
-    public Integer getInternalDesignCost() {
-        return internalDesignCost;
-    }
-
-    public void setInternalDesignCost(Integer internalDesignCost) {
-        this.internalDesignCost = internalDesignCost;
-    }
-
-    public Integer getInternalEquipmentCost() {
-        return internalEquipmentCost;
-    }
-
-    public void setInternalEquipmentCost(Integer internalEquipmentCost) {
-        this.internalEquipmentCost = internalEquipmentCost;
-    }
-
-    public Integer getInternalOtherCost() {
-        return internalOtherCost;
-    }
-
-    public void setInternalOtherCost(Integer internalOtherCost) {
-        this.internalOtherCost = internalOtherCost;
-    }
-
-    public Integer getExternalTotalCost() {
-        return externalTotalCost;
-    }
-
-    public void setExternalTotalCost(Integer externalTotalCost) {
-        this.externalTotalCost = externalTotalCost;
-    }
-
-    public Integer getExternalAbroadCost() {
-        return externalAbroadCost;
-    }
-
-    public void setExternalAbroadCost(Integer externalAbroadCost) {
-        this.externalAbroadCost = externalAbroadCost;
-    }
-
-    public String getEnterpriseFiller() {
-        return enterpriseFiller;
-    }
-
-    public void setEnterpriseFiller(String enterpriseFiller) {
-        this.enterpriseFiller = enterpriseFiller;
-    }
-
-    public Date getSignDate() {
-        return signDate;
-    }
-
-    public void setSignDate(Date signDate) {
-        this.signDate = signDate;
-    }
+	public Integer getDeletedSign() {
+		return deletedSign;
+	}
 
-    public String getSortNumber() {
-        return sortNumber;
-    }
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
 
-    public void setSortNumber(String sortNumber) {
-        this.sortNumber = sortNumber;
-    }
-    
-    public String getStartDateFormattedDate(){
+	public String getStartDateFormattedDate(){
 		if (this.startDate == null) {
 			return null;
 		} else {

+ 275 - 0
src/main/java/com/goafanti/common/model/OrgActivityCost.java

@@ -0,0 +1,275 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+public class OrgActivityCost {
+    private String id;
+
+    private String aid;
+
+    private String uid;
+
+    /**
+    * 项目编号
+    */
+    private String activityNumber;
+
+    /**
+    * 内部人员人工费用(万元)
+    */
+    private Integer internalLaborCost;
+
+    /**
+    * 内部直接投入费用(万元)
+    */
+    private Integer internalDirectCost;
+
+    /**
+    * 内部折旧费用与长期待摊费用(万元)
+    */
+    private Integer internalDepreciationCost;
+
+    /**
+    * 内部无形资产摊销费用(万元)
+    */
+    private Integer internalAmortizationCost;
+
+    /**
+    * 内部设计费用(万元)
+    */
+    private Integer internalDesignCost;
+
+    /**
+    * 内部装备调试费用与实验费用(万元)
+    */
+    private Integer internalEquipmentCost;
+
+    /**
+    * 内部其他费用(万元)
+    */
+    private Integer internalOtherCost;
+
+    /**
+    * 委托外部研究开发总费用(万元)
+    */
+    private Integer externalTotalCost;
+
+    /**
+    * 委托外部境内的外部研发费用(万元)
+    */
+    private Integer externalAbroadCost;
+
+    /**
+    * 企业填报人
+    */
+    private String enterpriseFiller;
+
+    /**
+    * 企业填报人签字日期
+    */
+    private Date signDate;
+
+    /**
+    * 排序号
+    */
+    private String sortNumber;
+
+    private Date startDate;
+
+    private Date endDate;
+
+    /**
+    * 删除标记
+    */
+    private Integer deletedSign;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getActivityNumber() {
+        return activityNumber;
+    }
+
+    public void setActivityNumber(String activityNumber) {
+        this.activityNumber = activityNumber;
+    }
+
+    public Integer getInternalLaborCost() {
+        return internalLaborCost;
+    }
+
+    public void setInternalLaborCost(Integer internalLaborCost) {
+        this.internalLaborCost = internalLaborCost;
+    }
+
+    public Integer getInternalDirectCost() {
+        return internalDirectCost;
+    }
+
+    public void setInternalDirectCost(Integer internalDirectCost) {
+        this.internalDirectCost = internalDirectCost;
+    }
+
+    public Integer getInternalDepreciationCost() {
+        return internalDepreciationCost;
+    }
+
+    public void setInternalDepreciationCost(Integer internalDepreciationCost) {
+        this.internalDepreciationCost = internalDepreciationCost;
+    }
+
+    public Integer getInternalAmortizationCost() {
+        return internalAmortizationCost;
+    }
+
+    public void setInternalAmortizationCost(Integer internalAmortizationCost) {
+        this.internalAmortizationCost = internalAmortizationCost;
+    }
+
+    public Integer getInternalDesignCost() {
+        return internalDesignCost;
+    }
+
+    public void setInternalDesignCost(Integer internalDesignCost) {
+        this.internalDesignCost = internalDesignCost;
+    }
+
+    public Integer getInternalEquipmentCost() {
+        return internalEquipmentCost;
+    }
+
+    public void setInternalEquipmentCost(Integer internalEquipmentCost) {
+        this.internalEquipmentCost = internalEquipmentCost;
+    }
+
+    public Integer getInternalOtherCost() {
+        return internalOtherCost;
+    }
+
+    public void setInternalOtherCost(Integer internalOtherCost) {
+        this.internalOtherCost = internalOtherCost;
+    }
+
+    public Integer getExternalTotalCost() {
+        return externalTotalCost;
+    }
+
+    public void setExternalTotalCost(Integer externalTotalCost) {
+        this.externalTotalCost = externalTotalCost;
+    }
+
+    public Integer getExternalAbroadCost() {
+        return externalAbroadCost;
+    }
+
+    public void setExternalAbroadCost(Integer externalAbroadCost) {
+        this.externalAbroadCost = externalAbroadCost;
+    }
+
+    public String getEnterpriseFiller() {
+        return enterpriseFiller;
+    }
+
+    public void setEnterpriseFiller(String enterpriseFiller) {
+        this.enterpriseFiller = enterpriseFiller;
+    }
+
+    public Date getSignDate() {
+        return signDate;
+    }
+
+    public void setSignDate(Date signDate) {
+        this.signDate = signDate;
+    }
+
+    public String getSortNumber() {
+        return sortNumber;
+    }
+
+    public void setSortNumber(String sortNumber) {
+        this.sortNumber = sortNumber;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+    
+    public String getSignDateFormattedDate(){
+    	if (this.signDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getSignDate(), "yyyy-MM-dd");
+		}
+    }
+    
+    public void setSignDateFormattedDate(String signDateFormattedDate){
+    	
+    }
+    
+    public String getStartDateFormattedDate(){
+		if (this.startDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getStartDate(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setStartDateFormattedDate(String startDateFormattedDate){
+		
+	}
+	
+	public String getEndDateFormattedDate(){
+		if (this.endDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getEndDate(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setEndDateFormattedDate(String endDateFormattedDate){
+		
+	}
+}

+ 7 - 2
src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java

@@ -4,6 +4,9 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class OrgIntellectualProperty {
     private String id;
 
@@ -88,7 +91,8 @@ public class OrgIntellectualProperty {
     public void setSortNumber(String sortNumber) {
         this.sortNumber = sortNumber;
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getCatagory() {
         return catagory;
     }
@@ -96,7 +100,8 @@ public class OrgIntellectualProperty {
     public void setCatagory(Integer catagory) {
         this.catagory = catagory;
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getObtainWay() {
         return obtainWay;
     }

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

@@ -0,0 +1,219 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+/**
+ * 上年度高新技术产品(服务)
+ */
+public class OrgTechProduct {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 编号
+    */
+    private String serialNumber;
+
+    /**
+    * 产品名称
+    */
+    private String productName;
+
+    /**
+    * 技术领域1st select
+    */
+    private Integer technicalField1;
+
+    /**
+    * 技术领域2nd select
+    */
+    private Integer technicalField2;
+
+    /**
+    * 技术领域3rd select
+    */
+    private Integer technicalField3;
+
+    /**
+    * 技术来源
+    */
+    private Integer technicalSource;
+
+    /**
+    * 上年度销售收入
+    */
+    private String lastYearRevenue;
+
+    /**
+    * 是否是主要产品(服务)
+    */
+    private Integer mainProduct;
+
+    /**
+    * 知识产权编号
+    */
+    private String intellectualPropertyNumber;
+
+    /**
+    * 关键技术及主要技术指标
+    */
+    private String keyTechnology;
+
+    /**
+    * 与同类产品(服务)的竞争优势
+    */
+    private String competitiveEdge;
+
+    /**
+    * 知识产权获得情况及其对产品(服务)在技术上发挥的支持作用
+    */
+    private String conditionEffect;
+
+    /**
+    * 年份
+    */
+    private Integer year;
+    
+    
+    /**
+     * 记录创建时间
+     */
+    private Date createTime;
+
+    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 String getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getTechnicalField1() {
+        return technicalField1;
+    }
+    
+    public void setTechnicalField1(Integer technicalField1) {
+        this.technicalField1 = technicalField1;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getTechnicalField2() {
+        return technicalField2;
+    }
+
+    public void setTechnicalField2(Integer technicalField2) {
+        this.technicalField2 = technicalField2;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getTechnicalField3() {
+        return technicalField3;
+    }
+
+    public void setTechnicalField3(Integer technicalField3) {
+        this.technicalField3 = technicalField3;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getTechnicalSource() {
+        return technicalSource;
+    }
+
+    public void setTechnicalSource(Integer technicalSource) {
+        this.technicalSource = technicalSource;
+    }
+
+    public String getLastYearRevenue() {
+        return lastYearRevenue;
+    }
+
+    public void setLastYearRevenue(String lastYearRevenue) {
+        this.lastYearRevenue = lastYearRevenue;
+    }
+
+    public Integer getMainProduct() {
+        return mainProduct;
+    }
+
+    public void setMainProduct(Integer mainProduct) {
+        this.mainProduct = mainProduct;
+    }
+
+    public String getIntellectualPropertyNumber() {
+        return intellectualPropertyNumber;
+    }
+
+    public void setIntellectualPropertyNumber(String intellectualPropertyNumber) {
+        this.intellectualPropertyNumber = intellectualPropertyNumber;
+    }
+
+    public String getKeyTechnology() {
+        return keyTechnology;
+    }
+
+    public void setKeyTechnology(String keyTechnology) {
+        this.keyTechnology = keyTechnology;
+    }
+
+    public String getCompetitiveEdge() {
+        return competitiveEdge;
+    }
+
+    public void setCompetitiveEdge(String competitiveEdge) {
+        this.competitiveEdge = competitiveEdge;
+    }
+
+    public String getConditionEffect() {
+        return conditionEffect;
+    }
+
+    public void setConditionEffect(String conditionEffect) {
+        this.conditionEffect = conditionEffect;
+    }
+
+    public Integer getYear() {
+        return year;
+    }
+
+    public void setYear(Integer year) {
+        this.year = year;
+    }
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+    
+    
+}

+ 313 - 49
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -1,7 +1,9 @@
 package com.goafanti.techservice.cognizance.controller;
 
 import java.text.ParseException;
+import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.List;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -9,34 +11,48 @@ import javax.annotation.Resource;
 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.BaseApiController;
 import com.goafanti.common.model.OrgActivity;
+import com.goafanti.common.model.OrgActivityCost;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.common.model.OrgStandard;
+import com.goafanti.common.model.OrgTechProduct;
 import com.goafanti.common.utils.DateUtils;
 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.OrgIntellectualPropertyService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
+import com.goafanti.techservice.cognizance.service.OrgTechProductService;
+import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserService;
 
 @Controller
 @RequestMapping(value = "/techservice/cognizance")
 public class CognizanceApiController extends BaseApiController {
 	@Resource
-	private UserService			userService;
+	private UserService						userService;
 	@Resource
-	private OrgStandardService	orgStandardService;
+	private OrgStandardService				orgStandardService;
 	@Resource
-	private OrgActivityService  orgActivityService;
+	private OrgActivityService				orgActivityService;
 	@Resource
-	private OrgIntellectualPropertyService orgIntellectualPropertyService;
-    
+	private OrgIntellectualPropertyService	orgIntellectualPropertyService;
+	@Resource
+	private OrganizationIdentityService     organizationIdentityService;
+	@Resource
+	private OrgTechProductService           orgTechProductService;
+	@Resource
+	private OrgActivityCostService          orgActivityCostService;
+
 	/**
-	 * 企业研究开发活动情况表及企业年度研究开发费用结构明细表入口
+	 * 企业研究开发活动情况表入口
+	 * 
 	 * @param activityNumber
 	 * @param activityName
 	 * @param startDate
@@ -46,44 +62,153 @@ public class CognizanceApiController extends BaseApiController {
 	 * @return
 	 * @throws ParseException
 	 */
-	@RequestMapping(value = "/activity", method = RequestMethod.POST)
-	public Result activity(String activityNumber, String activityName, String startDate, String endDate, String pageNo,
+	@RequestMapping(value = "/activityList", method = RequestMethod.POST)
+	public Result activityList(String activityNumber, String activityName, String startDateFormattedDate, String endDateFormattedDate, String pageNo,
 			String pageSize) throws ParseException {
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
+		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(orgActivityService.listOrgActivity(activityNumber, activityName, startDateFormattedDate, endDateFormattedDate, pNo, pSize,
+					TokenManager.getUserId()));
 		}
-		res.setData(orgActivityService.listOrgActivity(activityNumber, activityName, startDate, endDate, pNo,
-				pSize, TokenManager.getUserId()));
 		return res;
 	}
-	
+
 	/**
-	 * 企业研究开发活动情况表及企业年度研究开发费用结构明细新增、修改
+	 * 企业研究开发活动情况新增、修改
+	 * 
 	 * @param orgActivity
 	 * @return
-	 * @throws ParseException 
+	 * @throws ParseException
 	 */
-	@RequestMapping(value = "/disposeActivity", method = RequestMethod.POST)
-	public Result disposeActivity(OrgActivity orgActivity, String startDate, String endDate) throws ParseException{
+	@RequestMapping(value = "/activity", method = RequestMethod.POST)
+	public Result activity(OrgActivity orgActivity, String startDateFormattedDate, String endDateFormattedDate) throws ParseException {
 		Result res = new Result();
-		orgActivity.setEndDate(DateUtils.parseDate(startDate, "yyyy-MM-dd"));
-		orgActivity.setEndDate(DateUtils.parseDate(endDate, "yyyy-MM-dd"));
-		if (StringUtils.isBlank(orgActivity.getId())){
+		orgActivity.setDeletedSign(0);
+		orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
+		orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
+		if (StringUtils.isBlank(orgActivity.getId())) {
 			orgActivity.setId(UUID.randomUUID().toString());
 			orgActivity.setUid(TokenManager.getUserId());
 			orgActivityService.insert(orgActivity);
 		} else {
 			orgActivityService.updateByPrimaryKeySelective(orgActivity);
+			Boolean flag = false;
+			OrgActivityCost cost = orgActivityCostService.selectOrgActivityCostByAid(orgActivity.getId());
+			if (null != cost){
+				if (!StringUtils.isBlank(orgActivity.getActivityNumber())){
+					cost.setActivityNumber(orgActivity.getActivityNumber());
+					flag = true;
+				}
+				if (null == orgActivity.getStartDate()){
+					cost.setStartDate(orgActivity.getStartDate());
+					flag = true;
+				}
+				if (null == orgActivity.getEndDate()){
+					cost.setEndDate(orgActivity.getEndDate());
+					flag = true;
+				}
+			}
+			if (flag){
+				orgActivityCostService.updateByPrimaryKeySelective(cost);
+			}
 		}
 		res.setData(orgActivity);
 		return res;
 	}
+	
+	/**
+	 * 删除企业研究开发活动情况
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteActivity", method = RequestMethod.POST)
+	public Result deleteActivity(@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(orgActivityService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+	
+	
+	/**
+	 * 企业年度研究开发费用结构明细表列表入口
+	 * @return
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "/activityCostList", method = RequestMethod.POST )
+	public Result activityCostList(String activityNumber, String startDateFormattedDate, String endDateFormattedDate, String pageNo,
+			String pageSize) throws ParseException{
+		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(orgActivityCostService.listOrgActivityCost(activityNumber, startDateFormattedDate, endDateFormattedDate, pNo, pSize,
+					TokenManager.getUserId()));
+		}
+		return res;
+	}
+	
+	/**
+	 * 企业年度研究开发费用结构明细表(新增+修改)
+	 * @return
+	 */
+	@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) {
+			res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
+			return res;
+		}
+		if (null == orgActivityCost.getId()){
+			OrgActivity ac = orgActivityService.selectOrgActivityByPrimaryKey(orgActivityCost.getAid());
+			orgActivityCost.setStartDate(ac.getStartDate());
+			orgActivityCost.setEndDate(ac.getEndDate());
+			orgActivityCost.setId(UUID.randomUUID().toString());
+			orgActivityCost.setUid(TokenManager.getUserId());
+			orgActivityCostService.insert(orgActivityCost);
+		} else {
+			orgActivityCostService.updateByPrimaryKeySelective(orgActivityCost);
+		}
+		return res;
+	}
+	
+	/**
+	 * 删除企业年度研究开发费用结构明细表
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteActivityCost", method = RequestMethod.POST)
+	public Result deleteActivityCost(@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(orgActivityCostService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
 
 	/**
 	 * 企业参与国家标准或行业标准制定情况明细入口
@@ -94,16 +219,19 @@ public class CognizanceApiController extends BaseApiController {
 	public Result standard(String standardName, String standardNumber, Integer standardLevel, Integer participateWay,
 			String pageNo, String pageSize) {
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
+		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(orgStandardService.listOrgStandard(standardName, standardNumber, standardLevel, participateWay, pNo,
+					pSize, TokenManager.getUserId()));
 		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(orgStandardService.listOrgStandard(standardName, standardNumber, standardLevel, participateWay, pNo,
-				pSize, TokenManager.getUserId()));
 		return res;
 	}
 
@@ -128,36 +256,172 @@ public class CognizanceApiController extends BaseApiController {
 		res.setData(orgStandard);
 		return res;
 	}
-	
+
 	/**
 	 * 删除选中标准制定情况记录
-	 * @param id 记录id
+	 * 
+	 * @param id
+	 *            记录id
 	 * @return
 	 */
 	@RequestMapping(value = "/deleteStandard", method = RequestMethod.POST)
-	public Result deleteStandard(String id){
+	public Result deleteStandard(@RequestParam(name = "ids[]", required = true) String[] ids) {
 		Result res = new Result();
-		res.setData(orgStandardService.delete(id));
+		List<String> id = new ArrayList<String>();
+		for (String s : ids){
+			id.add(s);
+		}
+		res.setData(orgStandardService.batchDeleteByPrimaryKey(id));
 		return res;
 	}
-	
+
 	/**
 	 * 用户端录入知识产权信息(专利+软著)
+	 * 
 	 * @return
 	 */
-	@RequestMapping(value="/intellectual", method = RequestMethod.POST)
-	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate){
+	@RequestMapping(value = "/intellectual", method = RequestMethod.POST)
+	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate) {
 		Result res = new Result();
-		try {
-			orgIntellectualProperty.setId(UUID.randomUUID().toString());
-			orgIntellectualProperty.setUid(TokenManager.getUserId());
+		if (null == authorizationDateFormattedDate){
+			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "授权日期不能为空"));
+		}
+		if (null == orgIntellectualProperty.getId()){
+			try {
+				orgIntellectualProperty.setId(UUID.randomUUID().toString());
+				orgIntellectualProperty.setUid(TokenManager.getUserId());
+				orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
+				orgIntellectualProperty
+						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+			} catch (ParseException e) {
+				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
+				return res;
+			}
+			res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
+		} else {
 			orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
-			orgIntellectualProperty.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
-		} catch (ParseException e) {
-		    res.getError().add(buildError("", "日期格式不正确"));
-		    return res;
+			try {
+				orgIntellectualProperty
+				.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
+			} catch (ParseException e) {
+				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
+				return res;
+			}
+			res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(orgIntellectualProperty));
+		}
+		return res;
+	}
+    
+	/**
+	 * 用户知识产权列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	
+	@RequestMapping(value = "/intellectualList", method = RequestMethod.GET)
+	public Result intellectualList(String pageNo, String pageSize) {
+		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(orgIntellectualPropertyService.listIntellectual(pNo, pSize, TokenManager.getUserId()));
+		}
+		return res;
+	}
+	
+	/**
+	 * 删除选中知识产权记录
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteIntellectual", method = RequestMethod.POST)
+	public Result deleteIntellectual(@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(orgIntellectualPropertyService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+	
+	/**
+	 * 上年度高新技术产品(服务)情况列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value = "/techProductList", method = RequestMethod.GET)
+	public Result techProductList(String pageNo, String pageSize){
+		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(orgTechProductService.listTechProduct(pNo, pSize, TokenManager.getUserId()));
 		}
-		res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
 		return res;
 	}
+	
+	/**
+	 * 上年度高新技术产品(服务)情况(新增+修改)
+	 * @param orgTechProduct
+	 * @return
+	 */
+	@RequestMapping(value = "/techProduct", method = RequestMethod.POST)
+	public Result techProduct(OrgTechProduct orgTechProduct){
+		Result res = new Result();
+		if (StringUtils.isBlank(orgTechProduct.getId())){
+			orgTechProduct.setId(UUID.randomUUID().toString());
+			orgTechProduct.setUid(TokenManager.getUserId());
+			orgTechProductService.insert(orgTechProduct);
+		} else {
+			orgTechProductService.updateByPrimaryKeySelective(orgTechProduct);
+		}
+		res.setData(orgTechProduct);
+		return res;
+	}
+	
+	/**
+	 * 删除选中上年度高新技术产品(服务)情况记录
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteTechProduct", method = RequestMethod.POST)
+	public Result deleteTechProduct(@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(orgTechProductService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+	
+	 
+	
+	
+	//判断用户是否通过认证
+	private Result checkCertify(Result res){
+		if (5 != organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId()).getAuditStatus()){
+			res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
+		} 
+		return res;
+	}
+	
+	
 }

+ 22 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgActivityCostService.java

@@ -0,0 +1,22 @@
+package com.goafanti.techservice.cognizance.service;
+
+import java.text.ParseException;
+import java.util.List;
+
+import com.goafanti.common.model.OrgActivityCost;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface OrgActivityCostService {
+
+	Pagination<OrgActivityCost> listOrgActivityCost(String activityNumber, String startDateFormattedDate, String endDateFormattedDate,
+			Integer pNo, Integer pSize, String userId) throws ParseException;
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+	OrgActivityCost insert(OrgActivityCost orgActivityCost);
+
+	int updateByPrimaryKeySelective(OrgActivityCost orgActivityCost);
+
+	OrgActivityCost selectOrgActivityCostByAid(String id);
+
+}

+ 5 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgActivityService.java

@@ -1,6 +1,7 @@
 package com.goafanti.techservice.cognizance.service;
 
 import java.text.ParseException;
+import java.util.List;
 
 import com.goafanti.common.model.OrgActivity;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -14,4 +15,8 @@ public interface OrgActivityService {
 
 	int updateByPrimaryKeySelective(OrgActivity orgActivity);
 
+	int batchDeleteByPrimaryKey(List<String> id);
+
+	OrgActivity selectOrgActivityByPrimaryKey(String aid);
+
 }

+ 11 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgIntellectualPropertyService.java

@@ -1,9 +1,20 @@
 package com.goafanti.techservice.cognizance.service;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.core.mybatis.page.Pagination;
 
 public interface OrgIntellectualPropertyService {
 
 	OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty);
 
+	Pagination<OrgIntellectualProperty> listIntellectual(Integer pNo, Integer pSize, String userId);
+
+	int delete(String id);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+	int updateByPrimaryKeySelective(OrgIntellectualProperty orgIntellectualProperty);
+
 }

+ 4 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgStandardService.java

@@ -1,5 +1,7 @@
 package com.goafanti.techservice.cognizance.service;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgStandard;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -14,4 +16,6 @@ public interface OrgStandardService {
 
 	int delete(String id);
 
+	int batchDeleteByPrimaryKey(List<String> id);
+
 }

+ 18 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgTechProductService.java

@@ -0,0 +1,18 @@
+package com.goafanti.techservice.cognizance.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.OrgTechProduct;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface OrgTechProductService {
+
+	Pagination<OrgTechProduct> listTechProduct(Integer pNo, Integer pSize, String userId);
+
+	OrgTechProduct insert(OrgTechProduct orgTechProduct);
+
+	int updateByPrimaryKeySelective(OrgTechProduct orgTechProduct);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+}

+ 88 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgActivityCostServiceImpl.java

@@ -0,0 +1,88 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import java.text.ParseException;
+import java.util.Date;
+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.OrgActivityCostMapper;
+import com.goafanti.common.model.OrgActivityCost;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
+@Service
+public class OrgActivityCostServiceImpl extends BaseMybatisDao<OrgActivityCostMapper> implements OrgActivityCostService {
+	@Autowired
+	OrgActivityCostMapper orgActivityCostMapper;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgActivityCost> listOrgActivityCost(String activityNumber, String sDate,
+			String eDate, Integer pageNo, Integer pageSize, String uid) throws ParseException {
+		Map<String, Object> params = new HashMap<>();
+		
+		Date startDate = null;
+		Date endDate = null;
+		
+		if (!StringUtils.isBlank(activityNumber)){
+			params.put("activityNumber", activityNumber);
+		}
+		
+		
+		if (!StringUtils.isBlank(sDate)){
+			startDate = DateUtils.parseDate(sDate, "yyyy-MM-dd");
+			params.put("startDate", startDate);
+		}
+		
+		if (!StringUtils.isBlank(eDate)){
+			endDate = DateUtils.addDays(DateUtils.parseDate(eDate, "yyyy-MM-dd"), 1);
+			params.put("endDate", endDate);
+		}
+		
+		if(!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+		
+		
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return (Pagination<OrgActivityCost>) findPage("findOrgActivityCostListByPage", "findOrgActivityCostCount", params, pageNo,
+				pageSize);
+	}
+	
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgActivityCostMapper.batchDeleteByPrimaryKey(id);
+	}
+
+
+	@Override
+	public OrgActivityCost insert(OrgActivityCost orgActivityCost) {
+		orgActivityCostMapper.insert(orgActivityCost);
+		return orgActivityCost;
+	}
+
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgActivityCost orgActivityCost) {
+		return orgActivityCostMapper.updateByPrimaryKeySelective(orgActivityCost);
+	}
+
+
+	@Override
+	public OrgActivityCost selectOrgActivityCostByAid(String aid) {
+		return orgActivityCostMapper.selectOrgActivityCostByAid(aid);
+	}
+}

+ 11 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgActivityServiceImpl.java

@@ -3,6 +3,7 @@ package com.goafanti.techservice.cognizance.service.impl;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
@@ -73,4 +74,14 @@ public class OrgActivityServiceImpl extends BaseMybatisDao<OrgActivityMapper> im
 	public int updateByPrimaryKeySelective(OrgActivity orgActivity) {
 		return orgActivityMapper.updateByPrimaryKeySelective(orgActivity);
 	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgActivityMapper.batchDeleteByPrimaryKey(id);
+	}
+
+	@Override
+	public OrgActivity selectOrgActivityByPrimaryKey(String id) {
+		return orgActivityMapper.selectByPrimaryKey(id);
+	}
 }

+ 46 - 2
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java

@@ -1,20 +1,64 @@
 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.OrgIntellectualPropertyMapper;
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
+
 @Service
-public class OrgIntellectualPropertyServiceImpl implements OrgIntellectualPropertyService {
+public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntellectualPropertyMapper>
+		implements OrgIntellectualPropertyService {
 	@Autowired
 	private OrgIntellectualPropertyMapper orgIntellectualPropertyMapper;
-	
+
 	@Override
 	public OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty) {
 		orgIntellectualPropertyMapper.insert(orgIntellectualProperty);
 		return orgIntellectualProperty;
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgIntellectualProperty> listIntellectual(Integer pageNo, Integer pageSize, String uid) {
+		Map<String, Object> params = new HashMap<>();
+		
+		if (!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return (Pagination<OrgIntellectualProperty>) findPage("findOrgIntellectualPropertyListByPage",
+				"findOrgIntellectualPropertyCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public int delete(String id) {
+		return orgIntellectualPropertyMapper.deleteByPrimaryKey(id);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgIntellectualPropertyMapper.batchDeleteByPrimaryKey(id);
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgIntellectualProperty orgIntellectualProperty) {
+		return orgIntellectualPropertyMapper.updateByPrimaryKeySelective(orgIntellectualProperty);
+	}
+
 }

+ 7 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgStandardServiceImpl.java

@@ -1,6 +1,7 @@
 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;
@@ -70,4 +71,10 @@ public class OrgStandardServiceImpl extends BaseMybatisDao<OrgStandardMapper> im
 	public int delete(String id) {
 		return orgStandardMapper.deleteByPrimaryKey(id);
 	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		// TODO Auto-generated method stub
+		return orgStandardMapper.batchDeleteByPrimaryKey(id);
+	}
 }

+ 59 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgTechProductServiceImpl.java

@@ -0,0 +1,59 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import java.util.Calendar;
+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.OrgTechProductMapper;
+import com.goafanti.common.model.OrgTechProduct;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.service.OrgTechProductService;
+@Service
+public class OrgTechProductServiceImpl extends BaseMybatisDao<OrgTechProductMapper> implements OrgTechProductService {
+	@Autowired
+	OrgTechProductMapper orgTechProductMapper;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgTechProduct> listTechProduct(Integer pageNo, Integer pageSize, String uid) {
+		Map<String, Object> params = new HashMap<>();
+		
+		params.put("year", Calendar.getInstance().get(Calendar.YEAR)-1); //上一年
+		
+		if (!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return (Pagination<OrgTechProduct>) findPage("findOrgTechProductListByPage",
+				"findOrgTechProductCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public OrgTechProduct insert(OrgTechProduct orgTechProduct) {
+		orgTechProductMapper.insert(orgTechProduct);
+		return orgTechProduct;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgTechProduct orgTechProduct) {
+		return orgTechProductMapper.updateByPrimaryKeySelective(orgTechProduct);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgTechProductMapper.batchDeleteByPrimaryKey(id);
+	}
+}

+ 0 - 1
src/main/java/com/goafanti/techservice/patent/bo/PatentCompositeBo.java

@@ -4,7 +4,6 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
-import com.goafanti.common.model.BaseModel;
 
 /**
  * 管理端综合管理

+ 1 - 1
src/main/java/com/goafanti/techservice/patent/service/impl/PatentInfoServiceImpl.java

@@ -83,7 +83,7 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		}
 
 		if (pageSize == null || pageSize < 0) {
-			pageSize = 15;
+			pageSize = 10;
 		}
 		return (Pagination<PatentInfo>) findPage("findClientApplyListByPage", "findClentApplyCount", params, pageNo,
 				pageSize);

+ 0 - 1
src/main/java/com/goafanti/techservice/patent/service/impl/PatentRegistrationServiceImpl.java

@@ -10,7 +10,6 @@ import com.goafanti.common.dao.PatentRegistrationMapper;
 import com.goafanti.common.model.PatentRegistration;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.techservice.patent.bo.PatentApplicationFeeBo;
 import com.goafanti.techservice.patent.bo.PatentRecieveSendBo;
 import com.goafanti.techservice.patent.service.PatentRegistrationService;
 @Service

+ 0 - 1
src/main/java/com/goafanti/user/bo/UserListBo.java

@@ -4,7 +4,6 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
-import com.goafanti.common.model.UserIdentity;
 
 public class UserListBo {
 	

+ 0 - 1
src/main/java/com/goafanti/user/service/OrganizationInfoService.java

@@ -1,7 +1,6 @@
 package com.goafanti.user.service;
 
 import com.goafanti.common.model.OrganizationInfo;
-import com.goafanti.common.model.OrganizationProperties;
 
 public interface OrganizationInfoService{
 

+ 0 - 1
src/main/java/com/goafanti/user/service/UserAbilityService.java

@@ -1,7 +1,6 @@
 package com.goafanti.user.service;
 
 import com.goafanti.common.model.UserAbility;
-import com.goafanti.common.model.UserCareer;
 
 public interface UserAbilityService {
 

+ 0 - 1
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.OrganizationInfoMapper;
-import com.goafanti.common.dao.PatentCostMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.OrganizationInfo;

+ 1 - 1
src/main/resources/spring/spring-shiro.xml

@@ -21,7 +21,7 @@
 	    <constructor-arg index="1" value="${jedis.host}" name="host" type="java.lang.String"/>
 	    <constructor-arg index="2" value="${jedis.port}"  name="port" type="int"/>
 	    <constructor-arg index="3" value="${jedis.timeout}"  name="timeout" type="int"/>
-	    <constructor-arg index="4" value="${jedis.password}"  name="password" type="java.lang.String"/>
+	    <!-- <constructor-arg index="4" value="${jedis.password}"  name="password" type="java.lang.String"/> -->
 	  
 	</bean>