Antiloveg %!s(int64=8) %!d(string=hai) anos
pai
achega
20ea3e7aaa
Modificáronse 21 ficheiros con 242 adicións e 284 borrados
  1. 6 0
      schema/2017-03-13.sql
  2. 10 124
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  3. 11 9
      src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml
  4. 2 3
      src/main/java/com/goafanti/common/mapper/PatentCostMapper.xml
  5. 5 5
      src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml
  6. 2 2
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  7. 9 8
      src/main/java/com/goafanti/common/model/OrgCognizance.java
  8. 35 3
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceBo.java
  9. 3 1
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceDetailBo.java
  10. 7 4
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceOrgInfoBo.java
  11. 12 119
      src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java
  12. 4 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgAnnualReportService.java
  13. 3 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgCognizanceService.java
  14. 57 2
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgAnnualReportServiceImpl.java
  15. 48 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgCognizanceServiceImpl.java
  16. 3 0
      src/main/java/com/goafanti/user/service/OrganizationIdentityService.java
  17. 21 0
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  18. 1 1
      src/main/resources/props/config_dev.properties
  19. 1 1
      src/main/resources/props/config_local.properties
  20. 1 1
      src/main/resources/props/config_prod.properties
  21. 1 1
      src/main/resources/props/config_test.properties

+ 6 - 0
schema/2017-03-13.sql

@@ -23,3 +23,9 @@ alter table org_cognizance_log
 MODIFY COLUMN `principal`  VARCHAR(36) NULL COMMENT '负责人' ,
 MODIFY COLUMN `operator`  VARCHAR(36) NULL COMMENT '操作人';
 
+update org_cognizance set contacts = '1' where contacts <> '1';
+
+alter table org_cognizance
+MODIFY COLUMN `contacts`  INT(1) NULL COMMENT '联系人及联系方式' ;
+
+

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

@@ -1,20 +1,15 @@
 package com.goafanti.admin.controller;
 
 import java.io.IOException;
-import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Collections;
-import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -25,7 +20,6 @@ import com.goafanti.admin.service.AftFileService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AftFile;
 import com.goafanti.common.model.OrgActivity;
 import com.goafanti.common.model.OrgActivityCost;
@@ -53,13 +47,7 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportBo;
-import com.goafanti.techservice.cognizance.bo.AnnualReportMainBo;
-import com.goafanti.techservice.cognizance.bo.AnnualReportPropertyRightBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceDetailBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
@@ -154,11 +142,7 @@ public class AdminApiController extends BaseApiController {
 		u.setCreateTime(now.getTime());
 		u.setPassword(passwordUtil.getEncryptPwd(u));
 		u.setLvl(0);
-		List<Admin> admins = adminService.selectAllAdmin();
-		if (!admins.isEmpty()) {
-			Collections.shuffle(admins);
-			u.setAid(admins.get(0).getId());
-		}
+		u.setAid(TokenManager.getAdminId());
 		userService.insertRegister(u, "", unitName);
 		return res;
 	}
@@ -858,21 +842,7 @@ public class AdminApiController extends BaseApiController {
 	@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);
+		res.setData(organizationIdentityService.selectContactsByUserId(uid));
 		return res;
 	}
 
@@ -882,7 +852,7 @@ public class AdminApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
-	public Result applyCognizance(String contacts, String comment, String consultant, String uid, Integer year,
+	public Result applyCognizance(Integer contacts, String comment, String consultant, String uid, Integer year,
 			Integer state) {
 		Result res = new Result();
 		if (null != orgCognizanceService.selectCognizanceByUidAndYear(year, uid)) {
@@ -1185,100 +1155,16 @@ public class AdminApiController extends BaseApiController {
 		return  userService.listUser(mobile, email, createTime, number, aftUsername,
 				auditStatus, pNo, pSize);
 	}
-
+    
+	//高企详情
 	private CognizanceDetailBo handleCognizanceDetail(String uid, String cid, Integer year) {
-		CognizanceDetailBo cog = new CognizanceDetailBo();
-
-		CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
-		cog.setUid(null == orgInfo.getUid() ? "" : orgInfo.getUid());
-		cog.setCid(null == orgInfo.getCid() ? "" : orgInfo.getCid());
-		cog.setUnitName(null == orgInfo.getUnitName() ? "" : orgInfo.getUnitName());
-		cog.setOrgCode(null == orgInfo.getOrgCode() ? "" : orgInfo.getOrgCode());
-		cog.setPostalAddress(null == orgInfo.getPostalAddress() ? "" : orgInfo.getPostalAddress());
-		cog.setContacts(null == orgInfo.getContacts() ? "" : orgInfo.getContacts());
-		cog.setTechnicalField1(null == orgInfo.getTechnicalField1() ? 0 : orgInfo.getTechnicalField1());
-		cog.setTechnicalField2(null == orgInfo.getTechnicalField2() ? 0 : orgInfo.getTechnicalField2());
-		cog.setTechnicalField3(null == orgInfo.getTechnicalField3() ? 0 : orgInfo.getTechnicalField3());
-		cog.setBasicResearchCost(
-				null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
-		cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
-
-		CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUidAndYear(year,
-				uid);
-		cog.setResearchCost(
-				null == researchCost.getResearchCost() ? new BigDecimal(0) : researchCost.getResearchCost());
-		cog.setTerritory(null == researchCost.getTerritory() ? new BigDecimal(0) : researchCost.getTerritory());
-
-		CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUidAndYear(year, uid);
-		cog.setNetAsset1(null == manageCost.getNetAsset1() ? new BigDecimal(0) : manageCost.getNetAsset1());
-		cog.setNetAsset2(null == manageCost.getNetAsset2() ? new BigDecimal(0) : manageCost.getNetAsset2());
-		cog.setNetAsset3(null == manageCost.getNetAsset3() ? new BigDecimal(0) : manageCost.getNetAsset3());
-		cog.setSalesRevenue1(null == manageCost.getSalesRevenue1() ? new BigDecimal(0) : manageCost.getSalesRevenue1());
-		cog.setSalesRevenue2(null == manageCost.getSalesRevenue2() ? new BigDecimal(0) : manageCost.getSalesRevenue2());
-		cog.setSalesRevenue3(null == manageCost.getSalesRevenue3() ? new BigDecimal(0) : manageCost.getSalesRevenue3());
-		cog.setGrossProfit1(null == manageCost.getGrossProfit1() ? new BigDecimal(0) : manageCost.getGrossProfit1());
-		cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? new BigDecimal(0) : manageCost.getGrossProfit2());
-		cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
-
-		CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUidAndYear(year, uid);
-		cog.setFirstCatagory(null == catagory.getFirstCatagory() ? 0 : catagory.getFirstCatagory());
-		cog.setSecondCatagory(null == catagory.getSecondCatagory() ? 0 : catagory.getSecondCatagory());
-		cog.setFirmTotal(null == catagory.getFirmTotal() ? 0 : catagory.getFirmTotal());
-		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
-		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
-		BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
-		cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
-		return cog;
+		return orgCognizanceService.selectCognizanceDetailBo(uid, cid, year);
 	}
-
+    
+	//年报
 	private AnnualReportBo handleAnnualReport(String uid, Integer year) {
-		AnnualReportBo report = new AnnualReportBo();
-
-		AnnualReportPropertyRightBo p = orgAnnualReportService.selectAnnualReportPropertyRightBoByYearAndUid(year, uid);
-		report.setInventionPatent(null == p.getInventionPatent() ? 0 : p.getInventionPatent());
-		report.setDefensePatent(null == p.getDefensePatent() ? 0 : p.getDefensePatent());
-		report.setNationalCrop(null == p.getNationalCrop() ? 0 : p.getNationalCrop());
-		report.setNewPlantCariety(null == p.getNewPlantCariety() ? 0 : p.getNewPlantCariety());
-		report.setNationalDrug(null == p.getNationalDrug() ? 0 : p.getNationalDrug());
-		report.setChineseMedicine(null == p.getChineseMedicine() ? 0 : p.getChineseMedicine());
-		report.setUtilityPatent(null == p.getUtilityPatent() ? 0 : p.getUtilityPatent());
-		report.setCircuitDesign(null == p.getCircuitDesign() ? 0 : p.getCircuitDesign());
-		report.setExteriorPatent(null == p.getExteriorPatent() ? 0 : p.getExteriorPatent());
-		report.setSoftwareWorks(null == p.getSoftwareWorks() ? 0 : p.getSoftwareWorks());
-
-		BigDecimal t = orgAnnualReportService.selectAnnualReportTerritoryByYearAndUid(year, uid);
-		report.setTerritory(null == t ? new BigDecimal(0) : t);
-
-		AnnualReportMainBo m = orgAnnualReportService.selectAnnualReportMainBoByYearAndUid(year, uid);
-		report.setUid(m.getUid());
-		report.setUnitName(m.getUnitName());
-		report.setOrgCode(m.getOrgCode());
-		report.setLocationProvince(m.getLocationProvince());
-		report.setLocationCity(m.getLocationCity());
-		report.setLocationArea(m.getLocationArea());
-		report.setListed(m.getListed().toString());
-		if (null != m.getListedDate()) {
-			report.setListedDate(DateFormatUtils.format(m.getListedDate(), "yyyy-MM-dd"));
-		}
-		report.setListedType(m.getListedType().toString());
-		report.setStockCode(m.getStockCode());
-		report.setFirmTotal(null == m.getFirmTotal() ? 0 : m.getFirmTotal());
-		report.setTechTotal(null == m.getTechTotal() ? 0 : m.getTechTotal());
-		report.setNewEmployment(null == m.getNewEmployment() ? 0 : m.getNewEmployment());
-		report.setGraduateNumber(null == m.getGraduateNumber() ? 0 : m.getGraduateNumber());
-		report.setSalesRevenue(null == m.getSalesRevenue() ? new BigDecimal(0) : m.getSalesRevenue());
-		report.setGrossProfit(null == m.getGrossProfit() ? new BigDecimal(0) : m.getGrossProfit());
-		report.setNetAsset(null == m.getNetAsset() ? new BigDecimal(0) : m.getNetAsset());
-		report.setCertificateNumber(m.getCertificateNumber());
-		if (null != m.getIssuingDate()) {
-			report.setIssuingDate(DateFormatUtils.format(m.getIssuingDate(), "yyyy-MM-dd"));
-		}
-		report.setContacts(m.getContacts());
-		report.setResearchCost(null == m.getResearchCost() ? new BigDecimal(0) : m.getResearchCost());
-		report.setTotalRevenue(null == m.getTotalRevenue() ? new BigDecimal(0) : m.getTotalRevenue());
-		report.setLastYearRevenue(null == m.getLastYearRevenue() ? new BigDecimal(0) : m.getLastYearRevenue());
-
-		return report;
+		return orgAnnualReportService.selectAnnualReportBo(uid, year);
+		
 	}
 
 	private String handleFile(Result res, HttpServletRequest req, String fileName, List<MultipartFile> files,

+ 11 - 9
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -5,7 +5,7 @@
     <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="contacts" property="contacts" jdbcType="INTEGER" />
     <result column="comment" property="comment" jdbcType="VARCHAR" />
     <result column="consultant" property="consultant" jdbcType="VARCHAR" />
     <result column="technical_field1" property="technicalField1" jdbcType="INTEGER" />
@@ -47,7 +47,7 @@
       certificate_url, state, year, record_time, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
-      #{contacts,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
+      #{contacts,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
       #{technicalField1,jdbcType=INTEGER}, #{technicalField2,jdbcType=INTEGER}, #{technicalField3,jdbcType=INTEGER}, 
       #{basicResearchCost,jdbcType=DECIMAL}, #{accident,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
@@ -130,7 +130,7 @@
         #{serialNumber,jdbcType=INTEGER},
       </if>
       <if test="contacts != null" >
-        #{contacts,jdbcType=VARCHAR},
+        #{contacts,jdbcType=INTEGER},
       </if>
       <if test="comment != null" >
         #{comment,jdbcType=VARCHAR},
@@ -192,7 +192,7 @@
         serial_number = #{serialNumber,jdbcType=INTEGER},
       </if>
       <if test="contacts != null" >
-        contacts = #{contacts,jdbcType=VARCHAR},
+        contacts = #{contacts,jdbcType=INTEGER},
       </if>
       <if test="comment != null" >
         comment = #{comment,jdbcType=VARCHAR},
@@ -249,7 +249,7 @@
     update org_cognizance
     set uid = #{uid,jdbcType=VARCHAR},
       serial_number = #{serialNumber,jdbcType=INTEGER},
-      contacts = #{contacts,jdbcType=VARCHAR},
+      contacts = #{contacts,jdbcType=INTEGER},
       comment = #{comment,jdbcType=VARCHAR},
       consultant = #{consultant,jdbcType=VARCHAR},
       technical_field1 = #{technicalField1,jdbcType=INTEGER},
@@ -272,16 +272,18 @@
   <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, x.year from 
+	x.issuing_date as issuingDate, a.name as consultant, x.year, x.firstContacts, x.secondContacts, x.thirdContacts 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, c.year
+	c.issuing_date, c.consultant, c.year, 
+    CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
+    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
+    CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts
 	from user u 
 	LEFT JOIN organization_identity i on i.uid = u.id
 	INNER JOIN org_cognizance c on u.id = c.uid  and deleted_sign = 0
-    order by c.record_time desc
 	) x  
 	LEFT JOIN  admin a on a.id = x.consultant
 	where 1 = 1
@@ -291,7 +293,7 @@
 	<if test="locationProvince != null">
 		and x.location_province = #{locationProvince, jdbcType=VARCHAR}
 	</if>
-
+     order by x.serial_number desc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>

+ 2 - 3
src/main/java/com/goafanti/common/mapper/PatentCostMapper.xml

@@ -164,8 +164,7 @@
      	(select u.id as uid , p.id as pid ,o.id as oid ,
        		p.serial_number as serialNumber ,p.patent_number as patentNumber ,
      	    o.location_province as locationProvince , o.unit_name as unitName , 
-      		p.patent_name as patentName , p.patent_application_date as patentApplicationDate,
-      		p.record_time as recordTime
+      		p.patent_name as patentName , p.patent_application_date as patentApplicationDate
     from user u
 		LEFT JOIN organization_identity o on o.uid = u.id  
 		INNER JOIN patent_info p on u.id =p.uid
@@ -180,7 +179,7 @@
 		 and p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
 		</if>
 		) m
-   on c.pid = m.pid order by m.recordTime DESC
+   on c.pid = m.pid order by m.serialNumber DESC
    <if test="page_sql!=null">
 		${page_sql}
 	</if>

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

@@ -443,7 +443,7 @@
      <if test = "patentState != nulll">
     	and patent_state = #{patentState,jdbcType=INTEGER}
     </if>
-    order by  record_time desc
+    order by  serial_number desc
     <if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -502,7 +502,7 @@
 			p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl , 
 			o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
 		    p.authorization_notice_url as authorizationNoticeUrl , 
-		    p.patent_certificate_url as patentCertificateUrl, p.record_time as recordTime
+		    p.patent_certificate_url as patentCertificateUrl
 	from user u 
 	LEFT JOIN organization_identity o
 	on u.id = o.uid
@@ -554,7 +554,7 @@
 	    and  o.location_province = #{locationProvince,jdbcType=VARCHAR}
 	</if>
 	 ) x
-	 LEFT JOIN admin a on a.id = x.author  order by x.recordTime desc
+	 LEFT JOIN admin a on a.id = x.author  order by x.serialNumber desc
 	 <if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -633,7 +633,7 @@
 		</if>
 		) n
 		on n.pid= c.pid where c.annual_fee_state=0
-		order by n.recordTime DESC
+		order by n.serialNumber DESC
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -692,7 +692,7 @@
 	<if test="locationProvince != null">
 	    and  o.location_province=#{locationProvince,jdbcType=VARCHAR}
 	</if>
-	order by p.record_time DESC 
+	order by p.serial_number DESC 
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>

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

@@ -223,7 +223,7 @@
 	<if test="auditStatus != null">
 		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
-	order by u.create_time desc
+	order by u.number desc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -288,7 +288,7 @@
 	<if test="auditStatus != null">
 		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
-	order by u.create_time desc
+	order by u.number desc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>

+ 9 - 8
src/main/java/com/goafanti/common/model/OrgCognizance.java

@@ -19,7 +19,7 @@ public class OrgCognizance {
     /**
     * 联系人及联系方式
     */
-    private String contacts;
+    private Integer contacts;
 
     /**
     * 备注
@@ -125,15 +125,16 @@ public class OrgCognizance {
         this.serialNumber = serialNumber;
     }
 
-    public String getContacts() {
-        return contacts;
-    }
 
-    public void setContacts(String contacts) {
-        this.contacts = contacts;
-    }
+    public Integer getContacts() {
+		return contacts;
+	}
+
+	public void setContacts(Integer contacts) {
+		this.contacts = contacts;
+	}
 
-    public String getComment() {
+	public String getComment() {
         return comment;
     }
 

+ 35 - 3
src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceBo.java

@@ -18,7 +18,7 @@ public class CognizanceBo {
 	
 	private String unitName;
 	
-	private String contacts;
+	private Integer contacts;
 	
 	private Date createTime;
 	
@@ -33,6 +33,12 @@ public class CognizanceBo {
 	private String consultant;
 	
 	private Integer year;
+	
+	private String firstContacts;
+	
+	private String secondContacts;
+	
+	private String thirdContacts;
 
 	public String getUid() {
 		return uid;
@@ -74,11 +80,12 @@ public class CognizanceBo {
 		this.unitName = unitName;
 	}
 
-	public String getContacts() {
+    @JsonFormat(shape = Shape.STRING)
+	public Integer getContacts() {
 		return contacts;
 	}
 
-	public void setContacts(String contacts) {
+	public void setContacts(Integer contacts) {
 		this.contacts = contacts;
 	}
 
@@ -138,6 +145,31 @@ public class CognizanceBo {
 	public void setYear(Integer year) {
 		this.year = year;
 	}
+	
+
+	public String getFirstContacts() {
+		return firstContacts;
+	}
+
+	public void setFirstContacts(String firstContacts) {
+		this.firstContacts = firstContacts;
+	}
+
+	public String getSecondContacts() {
+		return secondContacts;
+	}
+
+	public void setSecondContacts(String secondContacts) {
+		this.secondContacts = secondContacts;
+	}
+
+	public String getThirdContacts() {
+		return thirdContacts;
+	}
+
+	public void setThirdContacts(String thirdContacts) {
+		this.thirdContacts = thirdContacts;
+	}
 
 	public String getCreateTimeFormattedDate(){
 			if (this.createTime == null) {

+ 3 - 1
src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceDetailBo.java

@@ -183,6 +183,8 @@ public class CognizanceDetailBo {
 		this.postalAddress = postalAddress;
 	}
 
+	
+
 	public String getContacts() {
 		return contacts;
 	}
@@ -190,7 +192,7 @@ public class CognizanceDetailBo {
 	public void setContacts(String contacts) {
 		this.contacts = contacts;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getTechnicalField1() {
 		return technicalField1;

+ 7 - 4
src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceOrgInfoBo.java

@@ -16,7 +16,7 @@ public class CognizanceOrgInfoBo {
 	
 	private String postalAddress;
 	
-	private String contacts;
+	private Integer contacts;
 	
 	private Integer technicalField1;
 	
@@ -25,6 +25,7 @@ public class CognizanceOrgInfoBo {
 	private Integer technicalField3;
 	
 	private BigDecimal basicResearchCost;
+
 	
 	private Integer accient;
 
@@ -68,14 +69,16 @@ public class CognizanceOrgInfoBo {
 		this.postalAddress = postalAddress;
 	}
 
-	public String getContacts() {
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getContacts() {
 		return contacts;
 	}
 
-	public void setContacts(String contacts) {
+	public void setContacts(Integer contacts) {
 		this.contacts = contacts;
 	}
-	
+
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getTechnicalField1() {
 		return technicalField1;

+ 12 - 119
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -1,19 +1,15 @@
 package com.goafanti.techservice.cognizance.controller;
 
 import java.io.IOException;
-import java.math.BigDecimal;
 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;
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -45,13 +41,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportBo;
-import com.goafanti.techservice.cognizance.bo.AnnualReportMainBo;
-import com.goafanti.techservice.cognizance.bo.AnnualReportPropertyRightBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceDetailBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo;
-import com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
@@ -874,21 +864,7 @@ public class CognizanceApiController extends BaseApiController {
 	@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);
+		res.setData(organizationIdentityService.selectContactsByUserId(TokenManager.getUserId()));
 		return res;
 	}
 
@@ -921,7 +897,7 @@ public class CognizanceApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
-	public Result applyCognizance(String contacts, String comment, Integer year, Integer state) {
+	public Result applyCognizance(Integer contacts, String comment, Integer year, Integer state) {
 		Result res = new Result();
 		if (null != orgCognizanceService.selectCognizanceByUidAndYear(year, TokenManager.getUserId())){
 			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度高企认定已申请!"));
@@ -1077,57 +1053,9 @@ public class CognizanceApiController extends BaseApiController {
 		return res;
 	}
 
-	@RequestMapping(value = "/download", method = RequestMethod.POST)
-
-	private AnnualReportBo handleAnnualReport(String uid, Integer year) {
-		AnnualReportBo report = new AnnualReportBo();
-
-		AnnualReportPropertyRightBo p = orgAnnualReportService.selectAnnualReportPropertyRightBoByYearAndUid(year, uid);
-		report.setInventionPatent(null == p.getInventionPatent() ? 0 : p.getInventionPatent());
-		report.setDefensePatent(null == p.getDefensePatent() ? 0 : p.getDefensePatent());
-		report.setNationalCrop(null == p.getNationalCrop() ? 0 : p.getNationalCrop());
-		report.setNewPlantCariety(null == p.getNewPlantCariety() ? 0 : p.getNewPlantCariety());
-		report.setNationalDrug(null == p.getNationalDrug() ? 0 : p.getNationalDrug());
-		report.setChineseMedicine(null == p.getChineseMedicine() ? 0 : p.getChineseMedicine());
-		report.setUtilityPatent(null == p.getUtilityPatent() ? 0 : p.getUtilityPatent());
-		report.setCircuitDesign(null == p.getCircuitDesign() ? 0 : p.getCircuitDesign());
-		report.setExteriorPatent(null == p.getExteriorPatent() ? 0 : p.getExteriorPatent());
-		report.setSoftwareWorks(null == p.getSoftwareWorks() ? 0 : p.getSoftwareWorks());
-
-		BigDecimal t = orgAnnualReportService.selectAnnualReportTerritoryByYearAndUid(year, uid);
-		report.setTerritory(null == t ? new BigDecimal(0) : t);
-
-		AnnualReportMainBo m = orgAnnualReportService.selectAnnualReportMainBoByYearAndUid(year, uid);
-		report.setUid(m.getUid());
-		report.setUnitName(m.getUnitName());
-		report.setOrgCode(m.getOrgCode());
-		report.setLocationProvince(m.getLocationProvince());
-		report.setLocationCity(m.getLocationCity());
-		report.setLocationArea(m.getLocationArea());
-		report.setListed(m.getListed().toString());
-		if (null != m.getListedDate()) {
-			report.setListedDate(DateFormatUtils.format(m.getListedDate(), "yyyy-MM-dd"));
-		}
-		report.setListedType(m.getListedType().toString());
-		report.setStockCode(m.getStockCode());
-		report.setFirmTotal(null == m.getFirmTotal() ? 0 : m.getFirmTotal());
-		report.setTechTotal(null == m.getTechTotal() ? 0 : m.getTechTotal());
-		report.setNewEmployment(null == m.getNewEmployment() ? 0 : m.getNewEmployment());
-		report.setGraduateNumber(null == m.getGraduateNumber() ? 0 : m.getGraduateNumber());
-		report.setSalesRevenue(null == m.getSalesRevenue() ? new BigDecimal(0) : m.getSalesRevenue());
-		report.setGrossProfit(null == m.getGrossProfit() ? new BigDecimal(0) : m.getGrossProfit());
-		report.setNetAsset(null == m.getNetAsset() ? new BigDecimal(0) : m.getNetAsset());
-		report.setCertificateNumber(m.getCertificateNumber());
-		if (null != m.getIssuingDate()) {
-			report.setIssuingDate(DateFormatUtils.format(m.getIssuingDate(), "yyyy-MM-dd"));
-		}
-		report.setContacts(m.getContacts());
-		report.setResearchCost(null == m.getResearchCost() ? new BigDecimal(0) : m.getResearchCost());
-		report.setTotalRevenue(null == m.getTotalRevenue() ? new BigDecimal(0) : m.getTotalRevenue());
-		report.setLastYearRevenue(null == m.getLastYearRevenue() ? new BigDecimal(0) : m.getLastYearRevenue());
+	
 
-		return report;
-	}
+	
 
 	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign,
 			String uid) {
@@ -1160,50 +1088,15 @@ public class CognizanceApiController extends BaseApiController {
 		}
 		return res;
 	}
-
+	
+	//高企认定
 	private CognizanceDetailBo handleCognizanceDetail(String uid, String cid, Integer year) {
-		CognizanceDetailBo cog = new CognizanceDetailBo();
-
-		CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
-		cog.setUid(null == orgInfo.getUid() ? "" : orgInfo.getUid());
-		cog.setCid(null == orgInfo.getCid() ? "" : orgInfo.getCid());
-		cog.setUnitName(null == orgInfo.getUnitName() ? "" : orgInfo.getUnitName());
-		cog.setOrgCode(null == orgInfo.getOrgCode() ? "" : orgInfo.getOrgCode());
-		cog.setPostalAddress(null == orgInfo.getPostalAddress() ? "" : orgInfo.getPostalAddress());
-		cog.setContacts(null == orgInfo.getContacts() ? "" : orgInfo.getContacts());
-		cog.setTechnicalField1(null == orgInfo.getTechnicalField1() ? 0 : orgInfo.getTechnicalField1());
-		cog.setTechnicalField2(null == orgInfo.getTechnicalField2() ? 0 : orgInfo.getTechnicalField2());
-		cog.setTechnicalField3(null == orgInfo.getTechnicalField3() ? 0 : orgInfo.getTechnicalField3());
-		cog.setBasicResearchCost(
-				null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
-		cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
-
-		CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUidAndYear(year,
-				uid);
-		cog.setResearchCost(
-				null == researchCost.getResearchCost() ? new BigDecimal(0) : researchCost.getResearchCost());
-		cog.setTerritory(null == researchCost.getTerritory() ? new BigDecimal(0) : researchCost.getTerritory());
-
-		CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUidAndYear(year, uid);
-		cog.setNetAsset1(null == manageCost.getNetAsset1() ? new BigDecimal(0) : manageCost.getNetAsset1());
-		cog.setNetAsset2(null == manageCost.getNetAsset2() ? new BigDecimal(0) : manageCost.getNetAsset2());
-		cog.setNetAsset3(null == manageCost.getNetAsset3() ? new BigDecimal(0) : manageCost.getNetAsset3());
-		cog.setSalesRevenue1(null == manageCost.getSalesRevenue1() ? new BigDecimal(0) : manageCost.getSalesRevenue1());
-		cog.setSalesRevenue2(null == manageCost.getSalesRevenue2() ? new BigDecimal(0) : manageCost.getSalesRevenue2());
-		cog.setSalesRevenue3(null == manageCost.getSalesRevenue3() ? new BigDecimal(0) : manageCost.getSalesRevenue3());
-		cog.setGrossProfit1(null == manageCost.getGrossProfit1() ? new BigDecimal(0) : manageCost.getGrossProfit1());
-		cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? new BigDecimal(0) : manageCost.getGrossProfit2());
-		cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
-
-		CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUidAndYear(year, uid);
-		cog.setFirstCatagory(null == catagory.getFirstCatagory() ? 0 : catagory.getFirstCatagory());
-		cog.setSecondCatagory(null == catagory.getSecondCatagory() ? 0 : catagory.getSecondCatagory());
-		cog.setFirmTotal(null == catagory.getFirmTotal() ? 0 : catagory.getFirmTotal());
-		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
-		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
-		BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
-		cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
-		return cog;
+		return orgCognizanceService.selectCognizanceDetailBo(uid, cid, year);
+	}
+	
+	//年报详情
+	private AnnualReportBo handleAnnualReport(String uid, Integer year) {
+		return orgAnnualReportService.selectAnnualReportBo(uid, year);
 	}
 
 }

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

@@ -5,6 +5,7 @@ import java.util.List;
 
 import com.goafanti.common.model.OrgAnnualReport;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.bo.AnnualReportBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportMainBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportPropertyRightBo;
 
@@ -26,4 +27,7 @@ public interface OrgAnnualReportService {
 
 	OrgAnnualReport selectAnnualReportByYearAndUid(Integer year, String uid);
 
+	AnnualReportBo selectAnnualReportBo(String uid, Integer year);
+
+
 }

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

@@ -7,6 +7,7 @@ import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.techservice.cognizance.bo.CognizanceBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceDetailBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo;
@@ -33,5 +34,7 @@ public interface OrgCognizanceService {
 
 	int batchDeleteByPrimaryKey(List<String> id);
 
+	CognizanceDetailBo selectCognizanceDetailBo(String uid, String cid, Integer year);
+
 
 }

+ 57 - 2
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgAnnualReportServiceImpl.java

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -13,6 +14,7 @@ import com.goafanti.common.dao.OrgAnnualReportMapper;
 import com.goafanti.common.model.OrgAnnualReport;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.bo.AnnualReportBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportMainBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportPropertyRightBo;
 import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
@@ -65,10 +67,11 @@ public class OrgAnnualReportServiceImpl extends BaseMybatisDao<OrgAnnualReportMa
 	public int updateByPrimaryKeySelective(OrgAnnualReport orgAnnualReport) {
 		return orgAnnualReportMapper.updateByPrimaryKeySelective(orgAnnualReport);
 	}
-
+    
+	
+	
 	@Override
 	public AnnualReportPropertyRightBo selectAnnualReportPropertyRightBoByYearAndUid(Integer year, String uid) {
-		// TODO Auto-generated method stub
 		return orgAnnualReportMapper.selectAnnualReportPropertyRightBoByYearAndUid(year, uid);
 	}
 
@@ -86,4 +89,56 @@ public class OrgAnnualReportServiceImpl extends BaseMybatisDao<OrgAnnualReportMa
 	public OrgAnnualReport selectAnnualReportByYearAndUid(Integer year, String uid) {
 		return orgAnnualReportMapper.selectAnnualReportByYearAndUid(year, uid);
 	}
+
+	@Override
+	public AnnualReportBo selectAnnualReportBo(String uid, Integer year) {
+		AnnualReportBo report = new AnnualReportBo();
+
+		AnnualReportPropertyRightBo p = orgAnnualReportMapper.selectAnnualReportPropertyRightBoByYearAndUid(year, uid);
+		report.setInventionPatent(null == p.getInventionPatent() ? 0 : p.getInventionPatent());
+		report.setDefensePatent(null == p.getDefensePatent() ? 0 : p.getDefensePatent());
+		report.setNationalCrop(null == p.getNationalCrop() ? 0 : p.getNationalCrop());
+		report.setNewPlantCariety(null == p.getNewPlantCariety() ? 0 : p.getNewPlantCariety());
+		report.setNationalDrug(null == p.getNationalDrug() ? 0 : p.getNationalDrug());
+		report.setChineseMedicine(null == p.getChineseMedicine() ? 0 : p.getChineseMedicine());
+		report.setUtilityPatent(null == p.getUtilityPatent() ? 0 : p.getUtilityPatent());
+		report.setCircuitDesign(null == p.getCircuitDesign() ? 0 : p.getCircuitDesign());
+		report.setExteriorPatent(null == p.getExteriorPatent() ? 0 : p.getExteriorPatent());
+		report.setSoftwareWorks(null == p.getSoftwareWorks() ? 0 : p.getSoftwareWorks());
+
+		BigDecimal t = orgAnnualReportMapper.selectAnnualReportTerritoryByYearAndUid(year, uid);
+		report.setTerritory(null == t ? new BigDecimal(0) : t);
+
+		AnnualReportMainBo m = orgAnnualReportMapper.selectAnnualReportMainBoByYearAndUid(year, uid);
+		report.setUid(m.getUid());
+		report.setUnitName(m.getUnitName());
+		report.setOrgCode(m.getOrgCode());
+		report.setLocationProvince(m.getLocationProvince());
+		report.setLocationCity(m.getLocationCity());
+		report.setLocationArea(m.getLocationArea());
+		report.setListed(m.getListed().toString());
+		if (null != m.getListedDate()) {
+			report.setListedDate(DateFormatUtils.format(m.getListedDate(), "yyyy-MM-dd"));
+		}
+		report.setListedType(m.getListedType().toString());
+		report.setStockCode(m.getStockCode());
+		report.setFirmTotal(null == m.getFirmTotal() ? 0 : m.getFirmTotal());
+		report.setTechTotal(null == m.getTechTotal() ? 0 : m.getTechTotal());
+		report.setNewEmployment(null == m.getNewEmployment() ? 0 : m.getNewEmployment());
+		report.setGraduateNumber(null == m.getGraduateNumber() ? 0 : m.getGraduateNumber());
+		report.setSalesRevenue(null == m.getSalesRevenue() ? new BigDecimal(0) : m.getSalesRevenue());
+		report.setGrossProfit(null == m.getGrossProfit() ? new BigDecimal(0) : m.getGrossProfit());
+		report.setNetAsset(null == m.getNetAsset() ? new BigDecimal(0) : m.getNetAsset());
+		report.setCertificateNumber(m.getCertificateNumber());
+		if (null != m.getIssuingDate()) {
+			report.setIssuingDate(DateFormatUtils.format(m.getIssuingDate(), "yyyy-MM-dd"));
+		}
+		report.setContacts(m.getContacts());
+		report.setResearchCost(null == m.getResearchCost() ? new BigDecimal(0) : m.getResearchCost());
+		report.setTotalRevenue(null == m.getTotalRevenue() ? new BigDecimal(0) : m.getTotalRevenue());
+		report.setLastYearRevenue(null == m.getLastYearRevenue() ? new BigDecimal(0) : m.getLastYearRevenue());
+
+		return report;
+	}
+
 }

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

@@ -15,6 +15,7 @@ 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.bo.CognizanceCatagoryBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceDetailBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo;
@@ -55,6 +56,53 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		return (Pagination<CognizanceBo>) findPage("findCognizanceBoByPage","findCognizanceBoCount", params, pageNo,
 				pageSize);
 	}
+	
+	@Override
+	public CognizanceDetailBo selectCognizanceDetailBo(String uid, String cid, Integer year){
+		CognizanceDetailBo cog = new CognizanceDetailBo();
+		CognizanceOrgInfoBo orgInfo = orgCognizanceMapper.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
+		
+		cog.setUid(null == orgInfo.getUid() ? "" : orgInfo.getUid());
+		cog.setCid(null == orgInfo.getCid() ? "" : orgInfo.getCid());
+		cog.setUnitName(null == orgInfo.getUnitName() ? "" : orgInfo.getUnitName());
+		cog.setOrgCode(null == orgInfo.getOrgCode() ? "" : orgInfo.getOrgCode());
+		cog.setPostalAddress(null == orgInfo.getPostalAddress() ? "" : orgInfo.getPostalAddress());
+		//联系人
+		cog.setContacts(null == orgInfo.getContacts() ? "" : orgInfo.getContacts().toString());
+		
+		cog.setTechnicalField1(null == orgInfo.getTechnicalField1() ? 0 : orgInfo.getTechnicalField1());
+		cog.setTechnicalField2(null == orgInfo.getTechnicalField2() ? 0 : orgInfo.getTechnicalField2());
+		cog.setTechnicalField3(null == orgInfo.getTechnicalField3() ? 0 : orgInfo.getTechnicalField3());
+		cog.setBasicResearchCost(
+				null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
+		cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
+		CognizanceResearchCostBo researchCost = orgCognizanceMapper.selectCognizanceResearchCostBoByUidAndYear(year,
+				uid);
+		cog.setResearchCost(
+				null == researchCost.getResearchCost() ? new BigDecimal(0) : researchCost.getResearchCost());
+		cog.setTerritory(null == researchCost.getTerritory() ? new BigDecimal(0) : researchCost.getTerritory());
+		CognizanceManageCostBo manageCost = orgCognizanceMapper.selectCognizanceManageCostBoByUidAndYear(year, uid);
+		
+		cog.setNetAsset1(null == manageCost.getNetAsset1() ? new BigDecimal(0) : manageCost.getNetAsset1());
+		cog.setNetAsset2(null == manageCost.getNetAsset2() ? new BigDecimal(0) : manageCost.getNetAsset2());
+		cog.setNetAsset3(null == manageCost.getNetAsset3() ? new BigDecimal(0) : manageCost.getNetAsset3());
+		cog.setSalesRevenue1(null == manageCost.getSalesRevenue1() ? new BigDecimal(0) : manageCost.getSalesRevenue1());
+		cog.setSalesRevenue2(null == manageCost.getSalesRevenue2() ? new BigDecimal(0) : manageCost.getSalesRevenue2());
+		cog.setSalesRevenue3(null == manageCost.getSalesRevenue3() ? new BigDecimal(0) : manageCost.getSalesRevenue3());
+		cog.setGrossProfit1(null == manageCost.getGrossProfit1() ? new BigDecimal(0) : manageCost.getGrossProfit1());
+		cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? new BigDecimal(0) : manageCost.getGrossProfit2());
+		cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
+
+		CognizanceCatagoryBo catagory = orgCognizanceMapper.selectCognizanceCatagoryBoByUidAndYear(year, uid);
+		cog.setFirstCatagory(null == catagory.getFirstCatagory() ? 0 : catagory.getFirstCatagory());
+		cog.setSecondCatagory(null == catagory.getSecondCatagory() ? 0 : catagory.getSecondCatagory());
+		cog.setFirmTotal(null == catagory.getFirmTotal() ? 0 : catagory.getFirmTotal());
+		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
+		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
+		BigDecimal revenue = orgCognizanceMapper.selectLastYearRevenueByUidAndYear(year, uid);
+		cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
+		return cog;
+	}
 
 	@Override
 	public CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUidAndCid(String uid, String cid) {

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

@@ -1,6 +1,7 @@
 package com.goafanti.user.service;
 
 import java.util.List;
+import java.util.Map;
 
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.user.bo.OrgIdentityBo;
@@ -19,6 +20,8 @@ public interface OrganizationIdentityService {
 
 	int updateByPrimaryKey(OrganizationIdentity org);
 
+	Map<String, String> selectContactsByUserId(String uid);
+
 
 	
 

+ 21 - 0
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -2,7 +2,10 @@ package com.goafanti.user.service.impl;
 
 
 import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -48,6 +51,24 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 		return organizationIdentityMapper.updateByPrimaryKey(org);
 	}
 
+	@Override
+	public Map<String, String> selectContactsByUserId(String uid) {
+		OrganizationIdentity i = organizationIdentityMapper.selectOrgIdentityByUserId(uid);
+		Map<String, String> map = new TreeMap<String, String>();
+		if (!StringUtils.isBlank(i.getFirstContacts()) && !StringUtils.isBlank(i.getFirstMobile())) {
+			map.put("1", i.getFirstContacts() + "  " + i.getFirstMobile());
+		}
+
+		if (!StringUtils.isBlank(i.getSecondContacts()) && !StringUtils.isBlank(i.getSecondMobile())) {
+			map.put("2", i.getSecondContacts() + "  " + i.getSecondMobile());
+		}
+
+		if (!StringUtils.isBlank(i.getThirdContacts()) && !StringUtils.isBlank(i.getThirdMobile())) {
+			map.put("3", i.getThirdContacts() + "  " + i.getThirdMobile());
+		}
+		return map;
+	}
+
 		
 
 }

+ 1 - 1
src/main/resources/props/config_dev.properties

@@ -50,7 +50,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.4
+static.host=//afts.hnzhiming.com/1.0.5
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.4
+static.host=//afts.hnzhiming.com/1.0.5
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

+ 1 - 1
src/main/resources/props/config_prod.properties

@@ -50,4 +50,4 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.4
+static.host=//afts.hnzhiming.com/1.0.5

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//aftts.hnzhiming.com/1.0.4
+static.host=//aftts.hnzhiming.com/1.0.5
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload