Browse Source

1.企业研究开发活动情况接口;
2.企业年度研究开发费用结构接口;
3.企业创新能力接口

Antiloveg 9 years ago
parent
commit
4fb5b8c1c1

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

@@ -111,7 +111,7 @@ public class AdminApiController extends BaseApiController {
 	@RequestMapping(value = "/orgList", method = RequestMethod.POST)
 	public Result orgList(String mobile, String email,
 			@RequestParam(name = "createTime[]", required = false) String[] createTime, Integer number,
-			Integer auditStatus, String pageNo, String pageSize) throws ParseException {
+			String aftUsername, Integer auditStatus, String pageNo, String pageSize) throws ParseException {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -121,7 +121,7 @@ public class AdminApiController extends BaseApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(getOrgList(mobile, email, createTime, number, auditStatus, pNo, pSize));
+		res.setData(getOrgList(mobile, email, createTime, number, aftUsername, auditStatus, pNo, pSize));
 		return res;
 	}
 
@@ -232,8 +232,8 @@ public class AdminApiController extends BaseApiController {
 
 	// org团体列表
 	private Pagination<OrgListBo> getOrgList(String mobile, String email, String[] createTime, Integer number,
-			Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
-		return (Pagination<OrgListBo>) organizationIdentityService.listOrg(mobile, email, createTime, number,
+			String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
+		return (Pagination<OrgListBo>) userService.listOrg(mobile, email, createTime, number, aftUsername,
 				auditStatus, pNo, pSize);
 	}
 

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

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.OrgActivity;
+
+public interface OrgActivityMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrgActivity record);
+
+    int insertSelective(OrgActivity record);
+
+    OrgActivity selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrgActivity record);
+
+    int updateByPrimaryKey(OrgActivity record);
+}

+ 446 - 0
src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml

@@ -0,0 +1,446 @@
+<?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.OrgActivityMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgActivity" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="activity_number" property="activityNumber" jdbcType="VARCHAR" />
+    <result column="activity_name" property="activityName" jdbcType="VARCHAR" />
+    <result column="start_date" property="startDate" jdbcType="TIMESTAMP" />
+    <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
+    <result column="technical_field1" property="technicalField1" jdbcType="VARCHAR" />
+    <result column="technical_field2" property="technicalField2" jdbcType="VARCHAR" />
+    <result column="technical_field3" property="technicalField3" jdbcType="VARCHAR" />
+    <result column="technical_source" property="technicalSource" jdbcType="INTEGER" />
+    <result column="intellectual_property_number" property="intellectualPropertyNumber" jdbcType="VARCHAR" />
+    <result column="budget" property="budget" jdbcType="INTEGER" />
+    <result column="first_year_expenditure" property="firstYearExpenditure" jdbcType="INTEGER" />
+    <result column="second_year_expenditure" property="secondYearExpenditure" jdbcType="INTEGER" />
+    <result column="third_year_expenditure" property="thirdYearExpenditure" jdbcType="INTEGER" />
+    <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" />
+  </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
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_activity
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_activity
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgActivity" >
+    insert into org_activity (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
+      )
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{activityNumber,jdbcType=VARCHAR}, 
+      #{activityName,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, 
+      #{technicalField1,jdbcType=VARCHAR}, #{technicalField2,jdbcType=VARCHAR}, #{technicalField3,jdbcType=VARCHAR}, 
+      #{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}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgActivity" >
+    insert into org_activity
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="activityNumber != null" >
+        activity_number,
+      </if>
+      <if test="activityName != null" >
+        activity_name,
+      </if>
+      <if test="startDate != null" >
+        start_date,
+      </if>
+      <if test="endDate != null" >
+        end_date,
+      </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="intellectualPropertyNumber != null" >
+        intellectual_property_number,
+      </if>
+      <if test="budget != null" >
+        budget,
+      </if>
+      <if test="firstYearExpenditure != null" >
+        first_year_expenditure,
+      </if>
+      <if test="secondYearExpenditure != null" >
+        second_year_expenditure,
+      </if>
+      <if test="thirdYearExpenditure != null" >
+        third_year_expenditure,
+      </if>
+      <if test="implement != null" >
+        implement,
+      </if>
+      <if test="technologyInnovation != null" >
+        technology_innovation,
+      </if>
+      <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>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="activityNumber != null" >
+        #{activityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="activityName != null" >
+        #{activityName,jdbcType=VARCHAR},
+      </if>
+      <if test="startDate != null" >
+        #{startDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endDate != null" >
+        #{endDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="technicalField1 != null" >
+        #{technicalField1,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField2 != null" >
+        #{technicalField2,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField3 != null" >
+        #{technicalField3,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalSource != null" >
+        #{technicalSource,jdbcType=INTEGER},
+      </if>
+      <if test="intellectualPropertyNumber != null" >
+        #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="budget != null" >
+        #{budget,jdbcType=INTEGER},
+      </if>
+      <if test="firstYearExpenditure != null" >
+        #{firstYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="secondYearExpenditure != null" >
+        #{secondYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="thirdYearExpenditure != null" >
+        #{thirdYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="implement != null" >
+        #{implement,jdbcType=VARCHAR},
+      </if>
+      <if test="technologyInnovation != null" >
+        #{technologyInnovation,jdbcType=VARCHAR},
+      </if>
+      <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>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgActivity" >
+    update org_activity
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="activityNumber != null" >
+        activity_number = #{activityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="activityName != null" >
+        activity_name = #{activityName,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="technicalField1 != null" >
+        technical_field1 = #{technicalField1,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField2 != null" >
+        technical_field2 = #{technicalField2,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalField3 != null" >
+        technical_field3 = #{technicalField3,jdbcType=VARCHAR},
+      </if>
+      <if test="technicalSource != null" >
+        technical_source = #{technicalSource,jdbcType=INTEGER},
+      </if>
+      <if test="intellectualPropertyNumber != null" >
+        intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="budget != null" >
+        budget = #{budget,jdbcType=INTEGER},
+      </if>
+      <if test="firstYearExpenditure != null" >
+        first_year_expenditure = #{firstYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="secondYearExpenditure != null" >
+        second_year_expenditure = #{secondYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="thirdYearExpenditure != null" >
+        third_year_expenditure = #{thirdYearExpenditure,jdbcType=INTEGER},
+      </if>
+      <if test="implement != null" >
+        implement = #{implement,jdbcType=VARCHAR},
+      </if>
+      <if test="technologyInnovation != null" >
+        technology_innovation = #{technologyInnovation,jdbcType=VARCHAR},
+      </if>
+      <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>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgActivity" >
+    update org_activity
+    set uid = #{uid,jdbcType=VARCHAR},
+      activity_number = #{activityNumber,jdbcType=VARCHAR},
+      activity_name = #{activityName,jdbcType=VARCHAR},
+      start_date = #{startDate,jdbcType=TIMESTAMP},
+      end_date = #{endDate,jdbcType=TIMESTAMP},
+      technical_field1 = #{technicalField1,jdbcType=VARCHAR},
+      technical_field2 = #{technicalField2,jdbcType=VARCHAR},
+      technical_field3 = #{technicalField3,jdbcType=VARCHAR},
+      technical_source = #{technicalSource,jdbcType=INTEGER},
+      intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
+      budget = #{budget,jdbcType=INTEGER},
+      first_year_expenditure = #{firstYearExpenditure,jdbcType=INTEGER},
+      second_year_expenditure = #{secondYearExpenditure,jdbcType=INTEGER},
+      third_year_expenditure = #{thirdYearExpenditure,jdbcType=INTEGER},
+      implement = #{implement,jdbcType=VARCHAR},
+      technology_innovation = #{technologyInnovation,jdbcType=VARCHAR},
+      achievement = #{achievement,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}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="findOrgActivityListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_activity
+    where 1=1
+    <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="findOrgActivityCount" resultType="java.lang.Integer" parameterType="String">
+  	 select count(1) from (
+  	 	 select 
+    <include refid="Base_Column_List" />
+    from org_activity
+    where 1=1
+    <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>
+    ) as total
+  </select>
+</mapper>

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

@@ -535,69 +535,5 @@
     from organization_identity
   </select>
   
-   <select id="findOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
-  	select u.id ,u.mobile, u.email, u.create_time as createTime, 
-  	       u.number , o.aft_username as aftUsername, o.audit_status as auditStatus
-    from user u LEFT JOIN organization_identity o 
-    ON u.id = o.uid 
-    WHERE u.type = 1
-    <if test = "mobile != null">
-	    and u.mobile = #{mobile,jdbcType=VARCHAR}
-	</if>
-	<if test = "email != null">
-	    and u.email = #{email,jdbcType=VARCHAR}
-	</if>
-	<if test = "pStart != null" >
-		and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
-	</if>
-	<if test = "pEnd != null">
-		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
-	</if>
-	<if test=" number != null">
-		and u.number = #{number,jdbcType=Integer}
-	</if>
-	<if test="aftUsername != null">
-		and o.aft_username = #{aftUsername,jdbcType=VARCHAR}
-	</if>
-	<if test="auditStatus != null">
-		and o.audit_status= #{auditStatus,jdbcType=Integer}
-	</if>
-	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-  </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
-    from user u LEFT JOIN organization_identity o 
-    ON u.id = o.uid 
-    WHERE u.type = 1
-    <if test = "mobile != null">
-	    and u.mobile = #{mobile,jdbcType=VARCHAR}
-	</if>
-	<if test = "email != null">
-	    and u.email = #{email,jdbcType=VARCHAR}
-	</if>
-	<if test = "pStart != null" >
-		and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
-	</if>
-	<if test = "pEnd != null">
-		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
-	</if>
-	<if test=" number != null">
-		and u.number = #{number,jdbcType=Integer}
-	</if>
-	<if test="aftUsername != null">
-		and o.aft_username = #{aftUsername,jdbcType=VARCHAR}
-	</if>
-	<if test="auditStatus != null">
-		and o.audit_status= #{auditStatus,jdbcType=Integer}
-	</if>
-	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-	) as total
-  </select>  
+   
 </mapper>

+ 71 - 5
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -203,13 +203,13 @@
 		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test=" number != null">
-		and u.number = #{number,jdbcType=Integer}
+		and u.number = #{number,jdbcType=INTEGER}
 	</if>
 	<if test="aftUsername != null">
 		and i.aft_username = #{aftUsername,jdbcType=VARCHAR}
 	</if>
 	<if test="auditStatus != null">
-		and i.audit_status= #{auditStatus,jdbcType=Integer}
+		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
 	<if test="page_sql!=null">
 		${page_sql}
@@ -235,14 +235,80 @@
 	<if test = "pEnd != null">
 		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
 	</if>
-	<if test=" number != null">
-		and u.number = #{number,jdbcType=Integer}
+	<if test="number != null">
+		and u.number = #{number,jdbcType=INTEGER}
 	</if>
 	<if test="aftUsername != null">
 		and i.aft_username = #{aftUsername,jdbcType=VARCHAR}
 	</if>
 	<if test="auditStatus != null">
-		and i.audit_status= #{auditStatus,jdbcType=Integer}
+		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">
+  	select u.id ,u.mobile, u.email, u.create_time as createTime, 
+  	       u.number , o.aft_username as aftUsername, o.audit_status as auditStatus
+    from user u LEFT JOIN organization_identity o 
+    ON u.id = o.uid 
+    WHERE u.type = 1
+    <if test = "mobile != null">
+	    and u.mobile = #{mobile,jdbcType=VARCHAR}
+	</if>
+	<if test = "email != null">
+	    and u.email = #{email,jdbcType=VARCHAR}
+	</if>
+	<if test = "pStart != null" >
+		and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test = "pEnd != null">
+		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test=" number != null">
+		and u.number = #{number,jdbcType=INTEGER}
+	</if>
+	<if test="aftUsername != null">
+		and o.aft_username = #{aftUsername,jdbcType=VARCHAR}
+	</if>
+	<if test="auditStatus != null">
+		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </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
+    from user u LEFT JOIN organization_identity o 
+    ON u.id = o.uid 
+    WHERE u.type = 1
+    <if test = "mobile != null">
+	    and u.mobile = #{mobile,jdbcType=VARCHAR}
+	</if>
+	<if test = "email != null">
+	    and u.email = #{email,jdbcType=VARCHAR}
+	</if>
+	<if test = "pStart != null" >
+		and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test = "pEnd != null">
+		and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test=" number != null">
+		and u.number = #{number,jdbcType=INTEGER}
+	</if>
+	<if test="aftUsername != null">
+		and o.aft_username = #{aftUsername,jdbcType=VARCHAR}
+	</if>
+	<if test="auditStatus != null">
+		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
 	<if test="page_sql!=null">
 		${page_sql}

+ 415 - 0
src/main/java/com/goafanti/common/model/OrgActivity.java

@@ -0,0 +1,415 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+public class OrgActivity {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 研发活动编号
+    */
+    private String activityNumber;
+
+    /**
+    * 研发活动名称
+    */
+    private String activityName;
+
+    /**
+    * 开始日期
+    */
+    private Date startDate;
+
+    /**
+    * 结束日期
+    */
+    private Date endDate;
+
+    /**
+    * 技术领域1st select
+    */
+    private String technicalField1;
+
+    /**
+    * 技术领域2nd select
+    */
+    private String technicalField2;
+
+    /**
+    * 技术领域3rd select
+    */
+    private String technicalField3;
+
+    /**
+    * 技术来源
+    */
+    private Integer technicalSource;
+
+    /**
+    * 知识产权编号
+    */
+    private String intellectualPropertyNumber;
+
+    /**
+    * 研发经费总预算(万元)
+    */
+    private Integer budget;
+
+    /**
+    * 第一年研发经费支出(万元)
+    */
+    private Integer firstYearExpenditure;
+
+    /**
+    * 第二年研发经费支出(万元)
+    */
+    private Integer secondYearExpenditure;
+
+    /**
+    * 第三年研发经费支出(万元)
+    */
+    private Integer thirdYearExpenditure;
+
+    /**
+    * 目的及组织实施方式
+    */
+    private String implement;
+
+    /**
+    * 核心技术及创新点
+    */
+    private String technologyInnovation;
+
+    /**
+    * 取得的阶段性成果
+    */
+    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 Date signDate;
+
+    /**
+    * 排序号
+    */
+    private String sortNumber;
+
+    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 getActivityNumber() {
+        return activityNumber;
+    }
+
+    public void setActivityNumber(String activityNumber) {
+        this.activityNumber = activityNumber;
+    }
+
+    public String getActivityName() {
+        return activityName;
+    }
+
+    public void setActivityName(String activityName) {
+        this.activityName = activityName;
+    }
+
+    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 String getTechnicalField1() {
+        return technicalField1;
+    }
+
+    public void setTechnicalField1(String technicalField1) {
+        this.technicalField1 = technicalField1;
+    }
+
+    public String getTechnicalField2() {
+        return technicalField2;
+    }
+
+    public void setTechnicalField2(String technicalField2) {
+        this.technicalField2 = technicalField2;
+    }
+
+    public String getTechnicalField3() {
+        return technicalField3;
+    }
+
+    public void setTechnicalField3(String technicalField3) {
+        this.technicalField3 = technicalField3;
+    }
+
+    public Integer getTechnicalSource() {
+        return technicalSource;
+    }
+
+    public void setTechnicalSource(Integer technicalSource) {
+        this.technicalSource = technicalSource;
+    }
+
+    public String getIntellectualPropertyNumber() {
+        return intellectualPropertyNumber;
+    }
+
+    public void setIntellectualPropertyNumber(String intellectualPropertyNumber) {
+        this.intellectualPropertyNumber = intellectualPropertyNumber;
+    }
+
+    public Integer getBudget() {
+        return budget;
+    }
+
+    public void setBudget(Integer budget) {
+        this.budget = budget;
+    }
+
+    public Integer getFirstYearExpenditure() {
+        return firstYearExpenditure;
+    }
+
+    public void setFirstYearExpenditure(Integer firstYearExpenditure) {
+        this.firstYearExpenditure = firstYearExpenditure;
+    }
+
+    public Integer getSecondYearExpenditure() {
+        return secondYearExpenditure;
+    }
+
+    public void setSecondYearExpenditure(Integer secondYearExpenditure) {
+        this.secondYearExpenditure = secondYearExpenditure;
+    }
+
+    public Integer getThirdYearExpenditure() {
+        return thirdYearExpenditure;
+    }
+
+    public void setThirdYearExpenditure(Integer thirdYearExpenditure) {
+        this.thirdYearExpenditure = thirdYearExpenditure;
+    }
+
+    public String getImplement() {
+        return implement;
+    }
+
+    public void setImplement(String implement) {
+        this.implement = implement;
+    }
+
+    public String getTechnologyInnovation() {
+        return technologyInnovation;
+    }
+
+    public void setTechnologyInnovation(String technologyInnovation) {
+        this.technologyInnovation = technologyInnovation;
+    }
+
+    public String getAchievement() {
+        return achievement;
+    }
+
+    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 String getSortNumber() {
+        return sortNumber;
+    }
+
+    public void setSortNumber(String sortNumber) {
+        this.sortNumber = sortNumber;
+    }
+    
+    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){
+		
+	}
+}

+ 58 - 2
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -1,5 +1,6 @@
 package com.goafanti.techservice.cognizance.controller;
 
+import java.text.ParseException;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -10,9 +11,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.model.OrgActivity;
 import com.goafanti.common.model.OrgStandard;
+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.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
 import com.goafanti.user.service.UserService;
 
@@ -20,9 +24,61 @@ import com.goafanti.user.service.UserService;
 @RequestMapping(value = "/techservice/cognizance")
 public class CognizanceApiController extends BaseApiController {
 	@Resource
-	private UserService			userService;	
+	private UserService			userService;
 	@Resource
 	private OrgStandardService	orgStandardService;
+	@Resource
+	private OrgActivityService  orgActivityService;
+    
+	/**
+	 * 企业研究开发活动情况表及企业年度研究开发费用结构明细表入口
+	 * @param activityNumber
+	 * @param activityName
+	 * @param startDate
+	 * @param endDate
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 * @throws ParseException
+	 */
+	@RequestMapping(value = "/activity", method = RequestMethod.POST)
+	public Result activity(String activityNumber, String activityName, String startDate, String endDate, 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.setData(orgActivityService.listOrgActivity(activityNumber, activityName, startDate, endDate, pNo,
+				pSize, TokenManager.getUserId()));
+		return res;
+	}
+	
+	/**
+	 * 企业研究开发活动情况表及企业年度研究开发费用结构明细新增、修改
+	 * @param orgActivity
+	 * @return
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "/disposeActivity", method = RequestMethod.POST)
+	public Result disposeActivity(OrgActivity orgActivity, String startDate, String endDate) 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.setId(UUID.randomUUID().toString());
+			orgActivity.setUid(TokenManager.getUserId());
+			orgActivityService.insert(orgActivity);
+		} else {
+			orgActivityService.updateByPrimaryKeySelective(orgActivity);
+		}
+		res.setData(orgActivity);
+		return res;
+	}
 
 	/**
 	 * 企业参与国家标准或行业标准制定情况明细入口
@@ -54,7 +110,7 @@ public class CognizanceApiController extends BaseApiController {
 	@RequestMapping(value = "/developStandard", method = RequestMethod.POST)
 	public Result developStandard(OrgStandard orgStandard) {
 		Result res = new Result();
-		if (StringUtils.isBlank(orgStandard.getId()) ) {
+		if (StringUtils.isBlank(orgStandard.getId())) {
 			orgStandard.setId(UUID.randomUUID().toString());
 			orgStandard.setUid(TokenManager.getUserId());
 			orgStandardService.insert(orgStandard);

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

@@ -0,0 +1,17 @@
+package com.goafanti.techservice.cognizance.service;
+
+import java.text.ParseException;
+
+import com.goafanti.common.model.OrgActivity;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface OrgActivityService {
+
+	Pagination<OrgActivity> listOrgActivity(String activityNumber, String activityName, String startDate, String endDate, Integer pNo,
+			Integer pSize, String userId) throws ParseException;
+
+	OrgActivity insert(OrgActivity orgActivity);
+
+	int updateByPrimaryKeySelective(OrgActivity orgActivity);
+
+}

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

@@ -0,0 +1,76 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+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.OrgActivityMapper;
+import com.goafanti.common.model.OrgActivity;
+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.OrgActivityService;
+@Service
+public class OrgActivityServiceImpl extends BaseMybatisDao<OrgActivityMapper> implements OrgActivityService {
+	@Autowired
+	private OrgActivityMapper orgActivityMapper;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgActivity> listOrgActivity(String activityNumber, String activityName, 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(activityName)){
+			params.put("activityName", activityName);
+		}
+		
+		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<OrgActivity>) findPage("findOrgActivityListByPage", "findOrgActivityCount", params, pageNo,
+				pageSize);
+	}
+
+	@Override
+	public OrgActivity insert(OrgActivity orgActivity) {
+		orgActivityMapper.insert(orgActivity);
+		return orgActivity;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgActivity orgActivity) {
+		return orgActivityMapper.updateByPrimaryKeySelective(orgActivity);
+	}
+}

+ 1 - 5
src/main/java/com/goafanti/user/service/OrganizationIdentityService.java

@@ -1,12 +1,9 @@
 package com.goafanti.user.service;
 
-import java.text.ParseException;
 import java.util.List;
 
 import com.goafanti.common.model.OrganizationIdentity;
-import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.OrgIdentityBo;
-import com.goafanti.user.bo.OrgListBo;
 
 public interface OrganizationIdentityService {
 
@@ -22,7 +19,6 @@ public interface OrganizationIdentityService {
 
 	int updateByPrimaryKey(OrganizationIdentity org);
 
-	Pagination<OrgListBo> listOrg(String mobile, String email, String[] createTime, Integer number, Integer auditStatus,
-			Integer pNo, Integer pSize) throws ParseException;
+	
 
 }

+ 7 - 5
src/main/java/com/goafanti/user/service/UserService.java

@@ -4,24 +4,24 @@ import java.text.ParseException;
 
 import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.user.bo.OrgListBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserListBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 
-
 public interface UserService {
 
 	User selectByPrimaryKey(String userId);
 
 	int updateByPrimaryKeySelective(User u);
-	
+
 	int updateByPrimaryKey(User u);
 
 	User insert(User user);
 
 	User selectByMobieAndType(String mobile, Integer type);
-	
-	User insertRegister(User user,String companyName,String contacts,String uid);
+
+	User insertRegister(User user, String companyName, String contacts, String uid);
 
 	UserPageHomeBo selectUserPageHomeBoByUserId(String userId);
 
@@ -29,6 +29,8 @@ public interface UserService {
 
 	Pagination<UserListBo> listUser(String mobile, String email, String[] createTime, Integer number,
 			String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException;
-	
+
+	Pagination<OrgListBo> listOrg(String mobile, String email, String[] createTime, Integer number, String aftUsername,
+			Integer auditStatus, Integer pNo, Integer pSize) throws ParseException;
 
 }

+ 2 - 58
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -1,23 +1,15 @@
 package com.goafanti.user.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.OrganizationIdentityMapper;
 import com.goafanti.common.model.OrganizationIdentity;
-import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.user.bo.OrgIdentityBo;
-import com.goafanti.user.bo.OrgListBo;
-import com.goafanti.user.bo.UserListBo;
+import com.goafanti.user.bo.OrgIdentityBo;	
 import com.goafanti.user.service.OrganizationIdentityService;
 
 @Service
@@ -56,54 +48,6 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 		return organizationIdentityMapper.updateByPrimaryKey(org);
 	}
 
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<OrgListBo> listOrg(String mobile, String email, String[] pDate, Integer number,
-			Integer auditStatus, Integer pageNo, Integer pageSize) throws ParseException {
-		Map<String, Object> params = new HashMap<>();
-		Date pStart = null;
-		Date pEnd = null;
-		
-		if (null != pDate ){
-			pStart = DateUtils.parseDate(pDate[0], "yyyy-MM-dd");
-			if (pDate.length == 2){
-				pEnd = DateUtils.addDays(DateUtils.parseDate(pDate[1], "yyyy-MM-dd"), 1);
-			}
-		}
-		 
-		if (null != pStart){
-			params.put("pStart", pStart);
-		}
-		
-		if (null != pEnd){
-			params.put("pEnd", pEnd);
-		}
-		
-		if (!StringUtils.isBlank(mobile)){
-			params.put("mobile", mobile);
-		}
 		
-		if (!StringUtils.isBlank(email)){
-			params.put("email", email);
-		}
-		
-		if (null != number ){
-			params.put("number", number);
-		}
-		
-		if (null != auditStatus){
-			params.put("auditStatus", auditStatus);
-		}
-		
-		if (pageNo == null || pageNo < 0) {
-			pageNo = 1;
-		}
-
-		if (pageSize == null || pageSize < 0) {
-			pageSize = 10;
-		}
-		return (Pagination<OrgListBo>) findPage("findOrgListByPage","findOrgCount", params, pageNo,
-				pageSize);
-	}
 
 }

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

@@ -20,6 +20,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.user.bo.OrgListBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserListBo;
 import com.goafanti.user.bo.UserPageHomeBo;
@@ -131,7 +132,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 			params.put("number", number);
 		}
 		
-		if (null != aftUsername){
+		if (!StringUtils.isBlank(aftUsername)){
 			params.put("aftUsername", aftUsername);
 		}
 		
@@ -149,6 +150,60 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		return (Pagination<UserListBo>) findPage("findUserListByPage","findUserCount", params, pageNo,
 				pageSize);
 	}
+	
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgListBo> listOrg(String mobile, String email, String[] pDate, Integer number,
+			String aftUsername, Integer auditStatus, Integer pageNo, Integer pageSize) throws ParseException {
+		Map<String, Object> params = new HashMap<>();
+		Date pStart = null;
+		Date pEnd = null;
+		
+		if (null != pDate ){
+			pStart = DateUtils.parseDate(pDate[0], "yyyy-MM-dd");
+			if (pDate.length == 2){
+				pEnd = DateUtils.addDays(DateUtils.parseDate(pDate[1], "yyyy-MM-dd"), 1);
+			}
+		}
+		 
+		if (null != pStart){
+			params.put("pStart", pStart);
+		}
+		
+		if (null != pEnd){
+			params.put("pEnd", pEnd);
+		}
+		
+		if (!StringUtils.isBlank(mobile)){
+			params.put("mobile", mobile);
+		}
+		
+		if (!StringUtils.isBlank(email)){
+			params.put("email", email);
+		}
+		
+		if (null != number ){
+			params.put("number", number);
+		}
+		
+		if (!StringUtils.isBlank(aftUsername)){
+			params.put("aftUsername", aftUsername);
+		}
+		
+		if (null != auditStatus){
+			params.put("auditStatus", auditStatus);
+		}
+		
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return (Pagination<OrgListBo>) findPage("findOrgListByPage","findOrgCount", params, pageNo,
+				pageSize);
+	}