Browse Source

高企认定申报接口

Antiloveg 8 years ago
parent
commit
2e9bc22c79

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

@@ -2,7 +2,9 @@ package com.goafanti.admin.controller;
 
 import java.text.ParseException;
 import java.util.Calendar;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -17,6 +19,7 @@ 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.OrgCognizance;
 import com.goafanti.common.model.OrgFinance;
 import com.goafanti.common.model.OrgHonorDatum;
 import com.goafanti.common.model.OrgHumanResource;
@@ -35,6 +38,7 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
+import com.goafanti.techservice.cognizance.service.OrgCognizanceService;
 import com.goafanti.techservice.cognizance.service.OrgFinanceService;
 import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
@@ -81,6 +85,8 @@ public class AdminApiController extends BaseApiController {
 	private OrgHonorDatumService            orgHonorDatumService;
 	@Resource
 	private OrgTechCenterService			orgTechCenterService;
+	@Resource
+	private OrgCognizanceService            orgCognizanceService;
 
 	/**
 	 * 个人用户列表
@@ -744,6 +750,71 @@ public class AdminApiController extends BaseApiController {
 		}
 		return res;
 	}
+	
+	/**
+	 * 获取公司联系人
+	 * @return
+	 */
+	@RequestMapping(value = "/getContacts", method = RequestMethod.POST)
+	public Result getContacts(String uid){
+		Result res = new Result();
+		OrganizationIdentity i = organizationIdentityService.selectOrgIdentityByUserId(uid);
+		Map<String, String> map = new LinkedHashMap<String, String>();
+		if (!StringUtils.isBlank(i.getFirstContacts()) && !StringUtils.isBlank(i.getFirstMobile())){
+			map.put(i.getFirstContacts(), i.getFirstMobile());
+		}
+		
+		if (!StringUtils.isBlank(i.getSecondContacts()) && !StringUtils.isBlank(i.getSecondMobile())){
+			map.put(i.getSecondContacts(), i.getSecondMobile());
+		}
+		
+		if (!StringUtils.isBlank(i.getThirdContacts()) && !StringUtils.isBlank(i.getThirdMobile())){
+			map.put(i.getThirdContacts(), i.getThirdMobile());
+		}
+		
+		res.setData(map);
+		return res;
+	}
+	
+	/**
+	 * 申请高企认定
+	 * @return
+	 */
+	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
+	public Result applyCognizance(String contacts, String comment, String consultant, String uid){
+		Result res = new Result();
+		OrgCognizance c = new OrgCognizance();
+		c.setId(UUID.randomUUID().toString());
+		c.setUid(uid);
+		c.setContacts(contacts);
+		c.setComment(comment);
+		c.setConsultant(consultant);
+		c.setDeletedSign(0);
+		orgCognizanceService.insert(c);
+		return res;
+	}
+	
+	/**
+	 * 高企认定列表入口
+	 * @param locationProvince
+	 * @param unitName
+	 * @return
+	 */
+	@RequestMapping(value = "/listCognizance", method = RequestMethod.POST)
+	public Result listCognizance(String locationProvince, String unitName, String pageNo, String pageSize){
+		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(orgCognizanceService.listCognizance(locationProvince, unitName, pNo, pSize));
+		return res;
+	}
 
 	// 判断用户是否通过认证
 	private Result checkCertify(Result res, String uid) {

+ 10 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -100,6 +100,16 @@ public class WebpageController extends BaseController {
 		return adminToLogin(request,modelview,"/admin/servicesManage/patent");
 	}
 	
+	@RequestMapping(value = "/admin/servicesManage/highTech", method = RequestMethod.GET)
+	public ModelAndView adminServicesManageHighTech(HttpServletRequest request, ModelAndView modelview) {
+		return adminToLogin(request,modelview,"/admin/servicesManage/highTech");
+	}
+	
+	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
+	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
+		return adminToLogin(request,modelview,"/admin/servicesManage/copyright");
+	}
+	
 	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
 	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
 		return adminToLogin(request,modelview,"/admin/index");

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

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

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

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

+ 117 - 0
src/main/java/com/goafanti/common/mapper/OrgCognizanceLogMapper.xml

@@ -0,0 +1,117 @@
+<?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.OrgCognizanceLogMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgCognizanceLog" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="cid" property="cid" jdbcType="VARCHAR" />
+    <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
+    <result column="state" property="state" jdbcType="INTEGER" />
+    <result column="principal" property="principal" jdbcType="VARCHAR" />
+    <result column="operator" property="operator" jdbcType="VARCHAR" />
+    <result column="comment" property="comment" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, cid, record_time, state, principal, operator, comment
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_cognizance_log
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_cognizance_log
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgCognizanceLog" >
+    insert into org_cognizance_log (id, cid, record_time, 
+      state, principal, operator, 
+      comment)
+    values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{recordTime,jdbcType=TIMESTAMP}, 
+      #{state,jdbcType=INTEGER}, #{principal,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR}, 
+      #{comment,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizanceLog" >
+    insert into org_cognizance_log
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="cid != null" >
+        cid,
+      </if>
+      <if test="recordTime != null" >
+        record_time,
+      </if>
+      <if test="state != null" >
+        state,
+      </if>
+      <if test="principal != null" >
+        principal,
+      </if>
+      <if test="operator != null" >
+        operator,
+      </if>
+      <if test="comment != null" >
+        comment,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="cid != null" >
+        #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="recordTime != null" >
+        #{recordTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="state != null" >
+        #{state,jdbcType=INTEGER},
+      </if>
+      <if test="principal != null" >
+        #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="operator != null" >
+        #{operator,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null" >
+        #{comment,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgCognizanceLog" >
+    update org_cognizance_log
+    <set >
+      <if test="cid != null" >
+        cid = #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="recordTime != null" >
+        record_time = #{recordTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="state != null" >
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="principal != null" >
+        principal = #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="operator != null" >
+        operator = #{operator,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null" >
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgCognizanceLog" >
+    update org_cognizance_log
+    set cid = #{cid,jdbcType=VARCHAR},
+      record_time = #{recordTime,jdbcType=TIMESTAMP},
+      state = #{state,jdbcType=INTEGER},
+      principal = #{principal,jdbcType=VARCHAR},
+      operator = #{operator,jdbcType=VARCHAR},
+      comment = #{comment,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 301 - 0
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -0,0 +1,301 @@
+<?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.OrgCognizanceMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgCognizance" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="serial_number" property="serialNumber" jdbcType="INTEGER" />
+    <result column="contacts" property="contacts" jdbcType="VARCHAR" />
+    <result column="comment" property="comment" jdbcType="VARCHAR" />
+    <result column="consultant" property="consultant" 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="basic_research_cost" property="basicResearchCost" jdbcType="INTEGER" />
+    <result column="accident" property="accident" jdbcType="INTEGER" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="accept_date" property="acceptDate" jdbcType="TIMESTAMP" />
+    <result column="issuing_date" property="issuingDate" jdbcType="TIMESTAMP" />
+    <result column="certificate_number" property="certificateNumber" jdbcType="VARCHAR" />
+    <result column="certificate_url" property="certificateUrl" jdbcType="VARCHAR" />
+    <result column="state" property="state" jdbcType="INTEGER" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, serial_number, contacts, comment, consultant, technical_field1, technical_field2, 
+    technical_field3, basic_research_cost, accident, create_time, accept_date, issuing_date, 
+    certificate_number, certificate_url, state, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_cognizance
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_cognizance
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgCognizance" >
+    insert into org_cognizance (id, uid, serial_number, 
+      contacts, comment, consultant, 
+      technical_field1, technical_field2, technical_field3, 
+      basic_research_cost, accident, create_time, 
+      accept_date, issuing_date, certificate_number, 
+      certificate_url, state, deleted_sign
+      )
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
+      #{contacts,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
+      #{technicalField1,jdbcType=INTEGER}, #{technicalField2,jdbcType=INTEGER}, #{technicalField3,jdbcType=INTEGER}, 
+      #{basicResearchCost,jdbcType=INTEGER}, #{accident,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
+      #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizance" >
+    insert into org_cognizance
+    <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="contacts != null" >
+        contacts,
+      </if>
+      <if test="comment != null" >
+        comment,
+      </if>
+      <if test="consultant != null" >
+        consultant,
+      </if>
+      <if test="technicalField1 != null" >
+        technical_field1,
+      </if>
+      <if test="technicalField2 != null" >
+        technical_field2,
+      </if>
+      <if test="technicalField3 != null" >
+        technical_field3,
+      </if>
+      <if test="basicResearchCost != null" >
+        basic_research_cost,
+      </if>
+      <if test="accident != null" >
+        accident,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="acceptDate != null" >
+        accept_date,
+      </if>
+      <if test="issuingDate != null" >
+        issuing_date,
+      </if>
+      <if test="certificateNumber != null" >
+        certificate_number,
+      </if>
+      <if test="certificateUrl != null" >
+        certificate_url,
+      </if>
+      <if test="state != null" >
+        state,
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="serialNumber != null" >
+        #{serialNumber,jdbcType=INTEGER},
+      </if>
+      <if test="contacts != null" >
+        #{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null" >
+        #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="consultant != null" >
+        #{consultant,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="basicResearchCost != null" >
+        #{basicResearchCost,jdbcType=INTEGER},
+      </if>
+      <if test="accident != null" >
+        #{accident,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="acceptDate != null" >
+        #{acceptDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="issuingDate != null" >
+        #{issuingDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="certificateNumber != null" >
+        #{certificateNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="certificateUrl != null" >
+        #{certificateUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null" >
+        #{state,jdbcType=INTEGER},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgCognizance" >
+    update org_cognizance
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="serialNumber != null" >
+        serial_number = #{serialNumber,jdbcType=INTEGER},
+      </if>
+      <if test="contacts != null" >
+        contacts = #{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null" >
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="consultant != null" >
+        consultant = #{consultant,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="basicResearchCost != null" >
+        basic_research_cost = #{basicResearchCost,jdbcType=INTEGER},
+      </if>
+      <if test="accident != null" >
+        accident = #{accident,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="acceptDate != null" >
+        accept_date = #{acceptDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="issuingDate != null" >
+        issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="certificateNumber != null" >
+        certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="certificateUrl != null" >
+        certificate_url = #{certificateUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null" >
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgCognizance" >
+    update org_cognizance
+    set uid = #{uid,jdbcType=VARCHAR},
+      serial_number = #{serialNumber,jdbcType=INTEGER},
+      contacts = #{contacts,jdbcType=VARCHAR},
+      comment = #{comment,jdbcType=VARCHAR},
+      consultant = #{consultant,jdbcType=VARCHAR},
+      technical_field1 = #{technicalField1,jdbcType=INTEGER},
+      technical_field2 = #{technicalField2,jdbcType=INTEGER},
+      technical_field3 = #{technicalField3,jdbcType=INTEGER},
+      basic_research_cost = #{basicResearchCost,jdbcType=INTEGER},
+      accident = #{accident,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      accept_date = #{acceptDate,jdbcType=TIMESTAMP},
+      issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
+      certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+      certificate_url = #{certificateUrl,jdbcType=VARCHAR},
+      state = #{state,jdbcType=INTEGER},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="findCognizanceBoByPage" parameterType="String"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceBo">
+  	select x.uid, x.cid, x.serial_number as serialNumber, x.location_province as locationProvince, 
+  	x.unit_name as unitName, x.contacts, x.create_time as createTime, x.comment, x.state, x.certificate_number as certificateNumber,
+	x.issuing_date as issuingDate, a.name as consultant from 
+	(select u.id as uid,
+	c.id as cid, c.serial_number, i.location_province,
+	i.unit_name, c.contacts, c.create_time, 
+	c.comment, c.state, c.certificate_number, 
+	c.issuing_date, c.consultant 
+	from user u INNER JOIN org_cognizance c on u.id = c.uid  and deleted_sign = 0
+	LEFT JOIN organization_identity i on i.uid = u.id) x  
+	LEFT JOIN  admin a on a.id = x.consultant
+	where 1 = 1
+	<if test="locationProvince != null">
+		and x.location_province = #{locationProvince, jdbcType=VARCHAR}
+	</if>
+	<if test="unitName != null">
+		and x.unit_name = #{unitName,jdbcType=VARCHAR}
+	</if>
+	order by x.issuing_date desc
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  
+   <select id="findCognizanceBoCount" resultType="java.lang.Integer" parameterType="String">
+  	select count(1) from (
+  		
+  			select x.uid, x.cid, x.serial_number as serialNumber, x.location_province as locationProvince, 
+  	x.unit_name as unitName, x.contacts, x.create_time as createTime, x.comment, x.state, x.certificate_number as certificateNumber,
+	x.issuing_date as issuingDate, a.name as consultant from 
+	(select u.id as uid,
+	c.id as cid, c.serial_number, i.location_province,
+	i.unit_name, c.contacts, c.create_time, 
+	c.comment, c.state, c.certificate_number, 
+	c.issuing_date, c.consultant 
+	from user u INNER JOIN org_cognizance c on u.id = c.uid  and deleted_sign = 0
+	LEFT JOIN organization_identity i on i.uid = u.id) x  
+	LEFT JOIN  admin a on a.id = x.consultant
+	where 1 = 1
+	<if test="locationProvince != null">
+		and x.location_province = #{locationProvince, jdbcType=VARCHAR}
+	</if>
+	<if test="unitName != null">
+		and x.unit_name = #{unitName,jdbcType=VARCHAR}
+	</if>
+	order by x.issuing_date desc
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+	) as n
+	</select>
+</mapper>

+ 277 - 0
src/main/java/com/goafanti/common/model/OrgCognizance.java

@@ -0,0 +1,277 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
+public class OrgCognizance {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 编号
+    */
+    private Integer serialNumber;
+
+    /**
+    * 联系人及联系方式
+    */
+    private String contacts;
+
+    /**
+    * 备注
+    */
+    private String comment;
+
+    /**
+    * 咨询师
+    */
+    private String consultant;
+
+    /**
+    * 技术领域1st select
+    */
+    private Integer technicalField1;
+
+    /**
+    * 技术领域2nd select
+    */
+    private Integer technicalField2;
+
+    /**
+    * 技术领域3rd select
+    */
+    private Integer technicalField3;
+
+    /**
+    * 基础研究投入费用总额(万元)
+    */
+    private Integer basicResearchCost;
+
+    /**
+    * 申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为
+    */
+    private Integer accident;
+
+    /**
+    * 派单日
+    */
+    private Date createTime;
+
+    /**
+    * 受理日
+    */
+    private Date acceptDate;
+
+    /**
+    * 发证日
+    */
+    private Date issuingDate;
+
+    /**
+    * 证书编号
+    */
+    private String certificateNumber;
+
+    /**
+    * 证书URL
+    */
+    private String certificateUrl;
+
+    /**
+    * 状态
+    */
+    private Integer state;
+
+    /**
+    * 删除标记
+    */
+    private Integer deletedSign;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public Integer getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(Integer serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+
+    public String getConsultant() {
+        return consultant;
+    }
+
+    public void setConsultant(String consultant) {
+        this.consultant = consultant;
+    }
+
+    public Integer getTechnicalField1() {
+        return technicalField1;
+    }
+
+    public void setTechnicalField1(Integer technicalField1) {
+        this.technicalField1 = technicalField1;
+    }
+
+    public Integer getTechnicalField2() {
+        return technicalField2;
+    }
+
+    public void setTechnicalField2(Integer technicalField2) {
+        this.technicalField2 = technicalField2;
+    }
+
+    public Integer getTechnicalField3() {
+        return technicalField3;
+    }
+
+    public void setTechnicalField3(Integer technicalField3) {
+        this.technicalField3 = technicalField3;
+    }
+
+    public Integer getBasicResearchCost() {
+        return basicResearchCost;
+    }
+
+    public void setBasicResearchCost(Integer basicResearchCost) {
+        this.basicResearchCost = basicResearchCost;
+    }
+
+    public Integer getAccident() {
+        return accident;
+    }
+
+    public void setAccident(Integer accident) {
+        this.accident = accident;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getAcceptDate() {
+        return acceptDate;
+    }
+
+    public void setAcceptDate(Date acceptDate) {
+        this.acceptDate = acceptDate;
+    }
+
+    public Date getIssuingDate() {
+        return issuingDate;
+    }
+
+    public void setIssuingDate(Date issuingDate) {
+        this.issuingDate = issuingDate;
+    }
+
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+
+    public String getCertificateUrl() {
+        return certificateUrl;
+    }
+
+    public void setCertificateUrl(String certificateUrl) {
+        this.certificateUrl = certificateUrl;
+    }
+    
+    @JsonFormat(shape = Shape.STRING)
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+    
+    @JsonIgnore
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+    
+    public String getCreateTimeFormattedDate(){
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setCreateTimeFormattedDate(String createTimeFormattedDate){
+		
+	}
+	
+	public String getAcceptDateFormattedDate(){
+		if (this.acceptDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setAcceptDateFormattedDate(String acceptDateFormattedDate){
+		
+	}
+	
+	public String getIssuingDateFormattedDate(){
+		if (this.issuingDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setIssuingDateFormattedDate(String issuingDateFormattedDate){
+		
+	}
+}

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

@@ -0,0 +1,90 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class OrgCognizanceLog {
+    private String id;
+
+    private String cid;
+
+    /**
+    * 状态变更录入时间
+    */
+    private Date recordTime;
+
+    /**
+    * 状态
+    */
+    private Integer state;
+
+    /**
+    * 负责人
+    */
+    private String principal;
+
+    /**
+    * 操作人
+    */
+    private String operator;
+
+    /**
+    * 备注
+    */
+    private String comment;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCid() {
+        return cid;
+    }
+
+    public void setCid(String cid) {
+        this.cid = cid;
+    }
+
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public String getPrincipal() {
+        return principal;
+    }
+
+    public void setPrincipal(String principal) {
+        this.principal = principal;
+    }
+
+    public String getOperator() {
+        return operator;
+    }
+
+    public void setOperator(String operator) {
+        this.operator = operator;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+}

+ 156 - 0
src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceBo.java

@@ -0,0 +1,156 @@
+package com.goafanti.techservice.cognizance.bo;
+
+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 CognizanceBo {
+	private String uid;
+	
+	private String cid;
+	
+	private String serialNumber;
+	
+	private String locationProvince;
+	
+	private String unitName;
+	
+	private String contacts;
+	
+	private Date createTime;
+	
+	private String comment;
+	
+	private Integer state;
+	
+	private String certificateNumber;
+	
+	private Date issuingDate;
+	
+	private String consultant;
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(String serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+
+	public String getLocationProvince() {
+		return locationProvince;
+	}
+
+	public void setLocationProvince(String locationProvince) {
+		this.locationProvince = locationProvince;
+	}
+
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
+
+	public String getContacts() {
+		return contacts;
+	}
+
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getComment() {
+		return comment;
+	}
+
+	public void setComment(String comment) {
+		this.comment = comment;
+	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getState() {
+		return state;
+	}
+
+	public void setState(Integer state) {
+		this.state = state;
+	}
+
+	public String getCertificateNumber() {
+		return certificateNumber;
+	}
+
+	public void setCertificateNumber(String certificateNumber) {
+		this.certificateNumber = certificateNumber;
+	}
+
+	public Date getIssuingDate() {
+		return issuingDate;
+	}
+
+	public void setIssuingDate(Date issuingDate) {
+		this.issuingDate = issuingDate;
+	}
+
+	public String getConsultant() {
+		return consultant;
+	}
+
+	public void setConsultant(String consultant) {
+		this.consultant = consultant;
+	}
+	
+	 public String getCreateTimeFormattedDate(){
+			if (this.createTime == null) {
+				return null;
+			} else {
+				return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+			}
+		}
+		
+		public void setCreateTimeFormattedDate(String createTimeFormattedDate){
+			
+		}
+		
+		
+		public String getIssuingDateFormattedDate(){
+			if (this.issuingDate == null) {
+				return null;
+			} else {
+				return DateFormatUtils.format(this.getCreateTime(), "yyyy-MM-dd");
+			}
+		}
+		
+		public void setIssuingDateFormattedDate(String issuingDateFormattedDate){
+			
+		}
+}

+ 66 - 0
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -4,7 +4,9 @@ import java.io.IOException;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -21,6 +23,7 @@ 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.OrgCognizance;
 import com.goafanti.common.model.OrgFinance;
 import com.goafanti.common.model.OrgHonorDatum;
 import com.goafanti.common.model.OrgIntellectualProperty;
@@ -30,6 +33,7 @@ import com.goafanti.common.model.OrgTechAchievement;
 import com.goafanti.common.model.OrgTechCenter;
 import com.goafanti.common.model.OrgTechCenterDetail;
 import com.goafanti.common.model.OrgTechProduct;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.FileUtils;
 import com.goafanti.common.utils.LoggerUtils;
@@ -38,6 +42,7 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
+import com.goafanti.techservice.cognizance.service.OrgCognizanceService;
 import com.goafanti.techservice.cognizance.service.OrgFinanceService;
 import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
@@ -79,6 +84,8 @@ public class CognizanceApiController extends BaseApiController {
 	private OrgTechCenterService			orgTechCenterService;
 	@Resource
 	private OrgTechCenterDetailService		orgTechCenterDetailService;
+	@Resource
+	private OrgCognizanceService            orgCognizanceService;
 
 	/**
 	 * 企业研究开发活动情况表入口
@@ -597,6 +604,20 @@ public class CognizanceApiController extends BaseApiController {
 		res.setData(handleFile(res, "/cognizance/", true, req, sign, uid));
 		return res;
 	}
+	
+	/**
+	 * 技术协议上传
+	 * @param req
+	 * @param uid
+	 * @param id
+	 * @return
+	 */
+	/*@RequestMapping(value = "/uploadProtocol", method = RequestMethod.POST)
+	public Result uploadProtocolFile(HttpServletRequest req, String uid, String id){
+		Result res = new Result();
+		res.setData(handleProtocolFile(res, "/cognizance/", true , req, uid));
+		return res;
+	}*/
 
 	/**
 	 * 科技成果转化情况列表入口
@@ -830,6 +851,51 @@ public class CognizanceApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 获取公司联系人
+	 * @return
+	 */
+	@RequestMapping(value = "/getContacts", method = RequestMethod.GET)
+	public Result getContacts(){
+		Result res = new Result();
+		OrganizationIdentity i = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
+		Map<String, String> map = new LinkedHashMap<String, String>();
+		if (!StringUtils.isBlank(i.getFirstContacts()) && !StringUtils.isBlank(i.getFirstMobile())){
+			map.put(i.getFirstContacts(), i.getFirstMobile());
+		}
+		
+		if (!StringUtils.isBlank(i.getSecondContacts()) && !StringUtils.isBlank(i.getSecondMobile())){
+			map.put(i.getSecondContacts(), i.getSecondMobile());
+		}
+		
+		if (!StringUtils.isBlank(i.getThirdContacts()) && !StringUtils.isBlank(i.getThirdMobile())){
+			map.put(i.getThirdContacts(), i.getThirdMobile());
+		}
+		
+		res.setData(map);
+		return res;
+	}
+	
+	/**
+	 * 申请高企认定
+	 * @return
+	 */
+	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
+	public Result applyCognizance(String contacts, String comment, String consultant){
+		Result res = new Result();
+		OrgCognizance c = new OrgCognizance();
+		c.setId(UUID.randomUUID().toString());
+		c.setUid(TokenManager.getUserId());
+		c.setContacts(contacts);
+		c.setComment(comment);
+		c.setConsultant(consultant);
+		c.setDeletedSign(0);
+		orgCognizanceService.insert(c);
+		return res;
+	}
+	
+	
+	
 
 	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign,
 			String uid) {

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

@@ -0,0 +1,14 @@
+package com.goafanti.techservice.cognizance.service;
+
+import com.goafanti.common.model.OrgCognizance;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.bo.CognizanceBo;
+
+public interface OrgCognizanceService {
+
+	OrgCognizance insert(OrgCognizance c);
+
+	Pagination<CognizanceBo> listCognizance(String locationProvince, String unitName, Integer pNo, Integer pSize);
+
+
+}

+ 51 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgCognizanceServiceImpl.java

@@ -0,0 +1,51 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+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.OrgCognizanceMapper;
+import com.goafanti.common.model.OrgCognizance;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.bo.CognizanceBo;
+import com.goafanti.techservice.cognizance.service.OrgCognizanceService;
+@Service
+public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper> implements OrgCognizanceService {
+	@Autowired
+	private OrgCognizanceMapper orgCognizanceMapper;
+
+	@Override
+	public OrgCognizance insert(OrgCognizance c) {
+		orgCognizanceMapper.insert(c);
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<CognizanceBo> listCognizance(String locationProvince, String unitName, Integer pageNo,
+			Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+		
+		if (StringUtils.isBlank(locationProvince)){
+			params.put("locationProvince", locationProvince);
+		}
+		
+		if (StringUtils.isBlank(unitName)){
+			params.put("unitName", unitName);
+		}
+		
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return (Pagination<CognizanceBo>) findPage("findCognizanceBoByPage","findCognizanceBoCount", params, pageNo,
+				pageSize);
+	}
+}

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

@@ -19,6 +19,7 @@ public interface OrganizationIdentityService {
 
 	int updateByPrimaryKey(OrganizationIdentity org);
 
+
 	
 
 }

+ 11 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/copyright.jsp

@@ -0,0 +1,11 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
+<%@ include file="../../header.jsp"%>
+<title>软件著作管理页</title>
+<link href="${staticHost}/admin/servicesManage/copyright.css" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	<script type="text/javascript" src="${staticHost}/admin/servicesManage/copyright.js"></script>
+</body>
+</html>

+ 11 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/highTech.jsp

@@ -0,0 +1,11 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
+<%@ include file="../../header.jsp"%>
+<title>高企认定管理页</title>
+<link href="${staticHost}/admin/servicesManage/highTech.css" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	<script type="text/javascript" src="${staticHost}/admin/servicesManage/highTech.js"></script>
+</body>
+</html>