Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

albertshaw 9 years ago
parent
commit
a958ac1430
26 changed files with 585 additions and 50 deletions
  1. 5 0
      schema/2017-03-19.sql
  2. 21 0
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  3. 30 2
      src/main/java/com/goafanti/admin/controller/AdminTechProjectController.java
  4. 124 0
      src/main/java/com/goafanti/cognizance/bo/CultivationListBo.java
  5. 3 0
      src/main/java/com/goafanti/cognizance/service/OrgCognizanceService.java
  6. 36 2
      src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java
  7. 2 1
      src/main/java/com/goafanti/common/controller/PublicController.java
  8. 46 11
      src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml
  9. 61 4
      src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml
  10. 2 2
      src/main/java/com/goafanti/common/mapper/PatentLogMapper.xml
  11. 5 4
      src/main/java/com/goafanti/common/mapper/TechProjectLogMapper.xml
  12. 2 2
      src/main/java/com/goafanti/common/mapper/TechWebsiteMapper.xml
  13. 6 1
      src/main/java/com/goafanti/common/model/OrgCognizanceLog.java
  14. 70 3
      src/main/java/com/goafanti/common/model/OrganizationIdentity.java
  15. 5 1
      src/main/java/com/goafanti/common/model/PatentLog.java
  16. 5 1
      src/main/java/com/goafanti/common/model/TechProjectLog.java
  17. 4 1
      src/main/java/com/goafanti/common/model/TechWebsite.java
  18. 129 0
      src/main/java/com/goafanti/common/utils/AesUtils.java
  19. 6 5
      src/main/java/com/goafanti/techproject/bo/TechProjectDetailBo.java
  20. 2 0
      src/main/java/com/goafanti/techproject/service/TechWebsiteService.java
  21. 1 1
      src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java
  22. 8 3
      src/main/java/com/goafanti/techproject/service/impl/TechWebsiteServiceImpl.java
  23. 4 2
      src/main/resources/props/config_dev.properties
  24. 3 1
      src/main/resources/props/config_local.properties
  25. 1 1
      src/main/resources/props/config_prod.properties
  26. 4 2
      src/main/resources/props/config_test.properties

+ 5 - 0
schema/2017-03-19.sql

@@ -0,0 +1,5 @@
+alter table organization_identity 
+add certificate_number VARCHAR(36) NULL COMMENT '高企认定证书编号' ,
+add issuing_date DATETIME NULL COMMENT '高企认定发证日期',
+add cog_contacts INT(1) NULL COMMENT '高企认定联系人及联系方式',
+add consultant VARCHAR(36) COMMENT '高企认定咨询师'

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

@@ -1136,6 +1136,27 @@ public class AdminApiController extends BaseApiController {
 		}
 		}
 		return res;
 		return res;
 	}
 	}
+	
+	/**
+	 * 高企培育列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value = "/cultivate", method = RequestMethod.POST)
+	public Result cultivationList(String province, String uid, 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.listCultivation(province, uid, pNo, pSize));
+		return res;
+	}
 
 
 	/**
 	/**
 	 * 上传相关模版
 	 * 上传相关模版

+ 30 - 2
src/main/java/com/goafanti/admin/controller/AdminTechProjectController.java

@@ -2,9 +2,11 @@ package com.goafanti.admin.controller;
 
 
 import java.text.ParseException;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 
 
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -14,8 +16,10 @@ import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.TechProject;
 import com.goafanti.common.model.TechProject;
 import com.goafanti.common.model.TechProjectLog;
 import com.goafanti.common.model.TechProjectLog;
 import com.goafanti.common.model.TechWebsite;
 import com.goafanti.common.model.TechWebsite;
+import com.goafanti.common.utils.AesUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.techproject.service.TechProjectLogService;
 import com.goafanti.techproject.service.TechProjectLogService;
 import com.goafanti.techproject.service.TechProjectService;
 import com.goafanti.techproject.service.TechProjectService;
 import com.goafanti.techproject.service.TechWebsiteService;
 import com.goafanti.techproject.service.TechWebsiteService;
@@ -24,6 +28,8 @@ import com.goafanti.user.service.UserService;
 @Controller
 @Controller
 @RequestMapping(value = "/api/admintechproject")
 @RequestMapping(value = "/api/admintechproject")
 public class AdminTechProjectController extends BaseApiController{
 public class AdminTechProjectController extends BaseApiController{
+	@Value(value = "${aesSecretKey}")
+	private static String aesSecretKey = null;
 	@Resource
 	@Resource
 	private TechProjectService techProjectService;
 	private TechProjectService techProjectService;
 	@Resource
 	@Resource
@@ -114,8 +120,9 @@ public class AdminTechProjectController extends BaseApiController{
 	/**
 	/**
 	 * 科技单位网址管理list
 	 * 科技单位网址管理list
 	 */
 	 */
+	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/listTechWebsite", method = RequestMethod.POST)
 	@RequestMapping(value = "/listTechWebsite", method = RequestMethod.POST)
-	public Result listTechWebsite(String province, String uid, String pageNo, String pageSize){
+	public Result listTechWebsite(String province, String unitName, String pageNo, String pageSize){
 		Result res = new Result();
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pNo = 1;
 		Integer pSize = 10;
 		Integer pSize = 10;
@@ -125,7 +132,28 @@ public class AdminTechProjectController extends BaseApiController{
 		if (StringUtils.isNumeric(pageNo)) {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 			pNo = Integer.parseInt(pageNo);
 		}
 		}
-		res.setData(techWebsiteService.listTechWebsite(province, uid, pNo, pSize));
+		
+		Pagination<TechWebsite> t = techWebsiteService.listTechWebsite(province, unitName, pNo, pSize);
+		List<TechWebsite> l =  (List<TechWebsite>) t.getList();
+		for (TechWebsite w : l){
+			if (!StringUtils.isBlank(w.getPassword())){
+				w.setPassword(AesUtils.AesDecrypt(w.getPassword(), aesSecretKey));
+			}
+		}
+		t.setList(l);
+		res.setData(t);
+		return res;
+	}
+	
+	/**
+	 * 网址管理详情
+	 * @param wid
+	 * @return
+	 */
+	@RequestMapping(value = "/techWebsiteDetail", method = RequestMethod.POST)
+	public Result techWebsiteDetail(String id){
+		Result res = new Result();
+		res.setData(techWebsiteService.selectByPrimaryKey(id));
 		return res;
 		return res;
 	}
 	}
 	
 	

+ 124 - 0
src/main/java/com/goafanti/cognizance/bo/CultivationListBo.java

@@ -0,0 +1,124 @@
+package com.goafanti.cognizance.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+/**
+ * 高企培育ListBo
+ */
+public class CultivationListBo {
+	private String uid;
+	
+	private String province;
+	
+	private String unitName;
+	
+	private Integer cogContacts;
+	
+	private String certificateNumber;
+	
+	private Date issuingDate;
+	
+	private String consultant;
+	
+	private String firstContacts;
+	
+	private String secondContacts;
+	
+	private String thirdContacts;
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
+
+	public Integer getCogContacts() {
+		return cogContacts;
+	}
+
+	public void setCogContacts(Integer cogContacts) {
+		this.cogContacts = cogContacts;
+	}
+
+	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 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 getIssuingDateFormattedDate(){
+		if (this.issuingDate == null) {
+			 return null;
+		   } else {
+			 return DateFormatUtils.format(this.getIssuingDate(), "yyyy-MM-dd");
+		   }
+	}
+		
+	public void setIssuingDateFormattedDate(String issuingDateFormattedDate){
+			
+	}
+}

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

@@ -10,6 +10,7 @@ import com.goafanti.cognizance.bo.CognizanceDetailBo;
 import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
+import com.goafanti.cognizance.bo.CultivationListBo;
 import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.common.model.OrgCognizanceLog;
 import com.goafanti.common.model.OrgCognizanceLog;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -42,5 +43,7 @@ public interface OrgCognizanceService {
 
 
 	void insertCognizance(Integer contacts, String comment, Integer year, Integer state, String aid, String uid);
 	void insertCognizance(Integer contacts, String comment, Integer year, Integer state, String aid, String uid);
 
 
+	Pagination<CultivationListBo> listCultivation(String province, String uid, Integer pNo, Integer pSize);
+
 
 
 }
 }

+ 36 - 2
src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java

@@ -18,12 +18,15 @@ import com.goafanti.cognizance.bo.CognizanceDetailBo;
 import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
+import com.goafanti.cognizance.bo.CultivationListBo;
 import com.goafanti.cognizance.service.OrgCognizanceService;
 import com.goafanti.cognizance.service.OrgCognizanceService;
 import com.goafanti.common.dao.OrgCognizanceLogMapper;
 import com.goafanti.common.dao.OrgCognizanceLogMapper;
 import com.goafanti.common.dao.OrgCognizanceMapper;
 import com.goafanti.common.dao.OrgCognizanceMapper;
+import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.common.model.OrgCognizanceLog;
 import com.goafanti.common.model.OrgCognizanceLog;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -33,6 +36,8 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 	private OrgCognizanceMapper orgCognizanceMapper;
 	private OrgCognizanceMapper orgCognizanceMapper;
 	@Autowired
 	@Autowired
 	private OrgCognizanceLogMapper orgCognizanceLogMapper;
 	private OrgCognizanceLogMapper orgCognizanceLogMapper;
+	@Autowired
+	private OrganizationIdentityMapper organizationIdentityMapper;
 
 
 	@Override
 	@Override
 	public OrgCognizance insert(OrgCognizance c) {
 	public OrgCognizance insert(OrgCognizance c) {
@@ -162,7 +167,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 
 
 	@Override
 	@Override
 	public void updateCognizance(OrgCognizance cog, OrgCognizanceLog log, Date recordTime, String aid) {
 	public void updateCognizance(OrgCognizance cog, OrgCognizanceLog log, Date recordTime, String aid) {
-		if (null != log.getState() && null != recordTime) {
+		if (null != log.getState() && null != recordTime && null != cog.getUid() ) {
 			log.setRecordTime(recordTime);
 			log.setRecordTime(recordTime);
 			cog.setState(log.getState());
 			cog.setState(log.getState());
 			switch (log.getState()) {
 			switch (log.getState()) {
@@ -174,6 +179,12 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 				break;
 				break;
 			case 5:
 			case 5:
 				cog.setIssuingDate(recordTime);
 				cog.setIssuingDate(recordTime);
+					OrganizationIdentity o = organizationIdentityMapper.selectOrgIdentityByUserId(cog.getUid());
+					o.setCertificateNumber(null == cog.getCertificateNumber() ? "" : cog.getCertificateNumber());
+					o.setIssuingDate(recordTime);
+					o.setConsultant(null == cog.getConsultant() ? "" : cog.getConsultant());
+					o.setCogContacts(null == cog.getContacts() ? null : cog.getContacts());
+					organizationIdentityMapper.updateByPrimaryKeySelective(o);
 				break;
 				break;
 			}
 			}
 			log.setId(UUID.randomUUID().toString());
 			log.setId(UUID.randomUUID().toString());
@@ -182,7 +193,6 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 			orgCognizanceLogMapper.insert(log);
 			orgCognizanceLogMapper.insert(log);
 		}
 		}
 		orgCognizanceMapper.updateByPrimaryKeySelective(cog);
 		orgCognizanceMapper.updateByPrimaryKeySelective(cog);
-		
 	}
 	}
 
 
 	@Override
 	@Override
@@ -214,4 +224,28 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		orgCognizanceLogMapper.insert(log);
 		orgCognizanceLogMapper.insert(log);
 		
 		
 	}
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<CultivationListBo> listCultivation(String province, String uid, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+		
+		if (!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+		
+		if (!StringUtils.isBlank(province)){
+			params.put("province", province);
+		}
+		
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 15;
+		}
+		return(Pagination<CultivationListBo>) findPage("findCultivationListByPage", "findCultivationCount", params,
+				pageNo, pageSize);
+	}
 }
 }

+ 2 - 1
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -56,6 +56,8 @@ public class PublicController extends BaseController {
 	@Value(value = "${static.host}")
 	@Value(value = "${static.host}")
 	private String	staticHost			= null;
 	private String	staticHost			= null;
 	
 	
+	
+	
 	@Resource
 	@Resource
 	private UserService						userService;
 	private UserService						userService;
 	
 	
@@ -327,5 +329,4 @@ public class PublicController extends BaseController {
 		return res;
 		return res;
 	}
 	}
 	
 	
-
 }
 }

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

@@ -313,16 +313,16 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="selectCognizanceOrgInfoBoByUidAndCid"  resultType="com.goafanti.cognizance.bo.CognizanceOrgInfoBo">
+  <select id="selectCognizanceOrgInfoBoByUidAndCid"  resultType="com.goafanti.cognizance.bo.CognizanceOrgInfoBo">
 		select u.id as uid, c.id as cid, o.unit_name as unitName, o.org_code as orgCode, o.postal_address as postalAddress, 
 		select u.id as uid, c.id as cid, o.unit_name as unitName, o.org_code as orgCode, o.postal_address as postalAddress, 
 			c.contacts, c.technical_field1 as technicalField1, c.technical_field2 as technicalField2, c.technical_field3 as technicalField3,
 			c.contacts, c.technical_field1 as technicalField1, c.technical_field2 as technicalField2, c.technical_field3 as technicalField3,
 			c.basic_research_cost as basicResearchCost, c.accident
 			c.basic_research_cost as basicResearchCost, c.accident
     	from  (select id from user where id = #{0}) u
     	from  (select id from user where id = #{0}) u
 			LEFT JOIN organization_identity o on u.id = o.uid 
 			LEFT JOIN organization_identity o on u.id = o.uid 
 			INNER JOIN org_cognizance c on c.uid = u.id  and c.deleted_sign = 0 and c.id = #{1}
 			INNER JOIN org_cognizance c on c.uid = u.id  and c.deleted_sign = 0 and c.id = #{1}
-	</select>
+  </select>
 	
 	
-	<select id="selectCognizanceResearchCostBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceResearchCostBo">
+  <select id="selectCognizanceResearchCostBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceResearchCostBo">
 		select m.uid, sum(m.cost1) as researchCost, sum(m.territory) as territory from(
 		select m.uid, sum(m.cost1) as researchCost, sum(m.territory) as territory from(
 			select uid, (internal_labor_cost + internal_direct_cost + internal_depreciation_cost + internal_amortization_cost 
 			select uid, (internal_labor_cost + internal_direct_cost + internal_depreciation_cost + internal_amortization_cost 
 			+ internal_design_cost + internal_equipment_cost + internal_other_cost +external_total_cost) as cost1, 
 			+ internal_design_cost + internal_equipment_cost + internal_other_cost +external_total_cost) as cost1, 
@@ -335,9 +335,9 @@
       and deleted_sign = 0
       and deleted_sign = 0
 		) m GROUP BY m.uid
 		) m GROUP BY m.uid
 
 
-	</select>
+  </select>
 	
 	
-	<select id="selectCognizanceManageCostBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceManageCostBo">
+  <select id="selectCognizanceManageCostBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceManageCostBo">
 		select u.id as uid, a.netAsset1, a.salesRevenue1, a.grossProfit1, b.netAsset2, b.salesRevenue2, b.grossProfit2, 
 		select u.id as uid, a.netAsset1, a.salesRevenue1, a.grossProfit1, b.netAsset2, b.salesRevenue2, b.grossProfit2, 
 			  c.netAsset3, c.salesRevenue3, c.grossProfit3 from 
 			  c.netAsset3, c.salesRevenue3, c.grossProfit3 from 
       (select id from user where id = #{1}) u
       (select id from user where id = #{1}) u
@@ -356,9 +356,9 @@
 			select uid, net_asset as netAsset3, gross_profit as grossProfit3, sales_revenue as salesRevenue3 from org_finance where uid = #{1} and year = 
 			select uid, net_asset as netAsset3, gross_profit as grossProfit3, sales_revenue as salesRevenue3 from org_finance where uid = #{1} and year = 
 			#{0}-3 and deleted_sign = 0
 			#{0}-3 and deleted_sign = 0
 			) c on c.uid = u.id
 			) c on c.uid = u.id
-	</select>
+  </select>
 	
 	
-	<select id="selectCognizanceCatagoryBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceCatagoryBo">
+  <select id="selectCognizanceCatagoryBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceCatagoryBo">
 		 select u.id as uid, a.firstCatagory, b.secondCatagory, c.firmTotal, c.techTotal, d.totalRevenue FROM
 		 select u.id as uid, a.firstCatagory, b.secondCatagory, c.firmTotal, c.techTotal, d.totalRevenue FROM
 				(select id from user where id = #{1}) u 
 				(select id from user where id = #{1}) u 
 			LEFT JOIN
 			LEFT JOIN
@@ -381,15 +381,15 @@
 				from org_ratepay where uid = #{1} 
 				from org_ratepay where uid = #{1} 
 				and year = #{0}-1  and deleted_sign = 0
 				and year = #{0}-1  and deleted_sign = 0
 				) d on d.uid = u.id
 				) d on d.uid = u.id
-	</select>
+  </select>
 	
 	
-	<select id="selectLastYearRevenueByUidAndYear"  resultType="java.math.BigDecimal">
+  <select id="selectLastYearRevenueByUidAndYear"  resultType="java.math.BigDecimal">
 		SELECT sum(last_year_revenue) as lastYearRevenue
 		SELECT sum(last_year_revenue) as lastYearRevenue
 			from org_tech_product where uid = #{1}
 			from org_tech_product where uid = #{1}
 			and year = #{0} and deleted_sign = 0
 			and year = #{0} and deleted_sign = 0
-	</select>
+  </select>
 	
 	
-	 <select id="selectCognizanceByUidAndYear" resultMap="BaseResultMap"  >
+  <select id="selectCognizanceByUidAndYear" resultMap="BaseResultMap"  >
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from org_cognizance
     from org_cognizance
@@ -403,4 +403,39 @@
 		#{item}
 		#{item}
 	</foreach>
 	</foreach>
   </update>
   </update>
+  
+  <select id="findCultivationListByPage" parameterType="java.lang.String" resultType="com.goafanti.cognizance.bo.CultivationListBo">
+  	select u.id as uid,  i.location_province as province, i.unit_name as unitName, i.cog_contacts as cogContacts,
+		i.certificate_number as certificateNumber, i.issuing_date as issuingDate, a.name as consultant,
+		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 organization_identity i
+	RIGHT JOIN user u  on u.id = i.uid 
+	LEFT JOIN admin a on a.id = i.consultant
+	where u.type = 1 and u.lvl = 1
+	<if test="uid != null">
+	    and u.id = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="province != null">
+	    and i.location_province = #{province,jdbcType=VARCHAR}
+	</if>
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  
+  <select id="findCultivationCount" resultType="java.lang.Integer" parameterType="java.lang.String">
+  	select count(1)
+	from organization_identity i
+	RIGHT JOIN user u  on u.id = i.uid 
+	LEFT JOIN admin a on a.id = i.consultant
+	where u.type = 1 and u.lvl = 1
+	<if test="uid != null">
+	    and u.id = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="province != null">
+	    and i.location_province = #{province,jdbcType=VARCHAR}
+	</if>
+  </select>
 </mapper>
 </mapper>

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

@@ -48,6 +48,12 @@
     <result column="listed_date" property="listedDate" jdbcType="TIMESTAMP" />
     <result column="listed_date" property="listedDate" jdbcType="TIMESTAMP" />
     <result column="listed_type" property="listedType" jdbcType="INTEGER" />
     <result column="listed_type" property="listedType" jdbcType="INTEGER" />
     <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
     <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
+    
+    <result column="certificate_number" property="certificateNumber" jdbcType="VARCHAR" />
+    <result column="issuing_date" property="issuingDate" jdbcType="TIMESTAMP" />
+    
+    <result column="cog_contacts" property="cogContacts" jdbcType="INTEGER" />
+    <result column="consultant" property="consultant" jdbcType="VARCHAR" />
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List" >
   <sql id="Base_Column_List" >
     id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, aft_username, 
     id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, aft_username, 
@@ -56,7 +62,7 @@
     validation_amount, identity_type, location_province, location_city, location_area, 
     validation_amount, identity_type, location_province, location_city, location_area, 
     legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, process, wrong_count, 
     legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, process, wrong_count, 
     payment_date, first_contacts, first_mobile, second_contacts, second_mobile, third_contacts ,third_mobile,
     payment_date, first_contacts, first_mobile, second_contacts, second_mobile, third_contacts ,third_mobile,
-    listed, listed_date, listed_type, stock_code
+    listed, listed_date, listed_type, stock_code, certificate_number, issuing_date, cog_contacts, consultant
   </sql>
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     select 
@@ -82,7 +88,8 @@
       audit_status, process, wrong_count, payment_date,
       audit_status, process, wrong_count, payment_date,
       first_contacts, first_mobile, second_contacts, 
       first_contacts, first_mobile, second_contacts, 
       second_mobile, third_contacts , third_mobile,
       second_mobile, third_contacts , third_mobile,
-      listed, listed_date, listed_type, stock_code
+      listed, listed_date, listed_type, stock_code,
+      certificate_number, issuing_date, cog_contacts, consultant
       )
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
       #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
       #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
@@ -97,7 +104,9 @@
       #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
       #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
       #{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR}, #{secondContacts,jdbcType=VARCHAR}, 
       #{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR}, #{secondContacts,jdbcType=VARCHAR}, 
       #{secondMobile,jdbcType=VARCHAR}, #{thirdContacts,jdbcType=VARCHAR}, #{thirdMobile,jdbcType=VARCHAR},
       #{secondMobile,jdbcType=VARCHAR}, #{thirdContacts,jdbcType=VARCHAR}, #{thirdMobile,jdbcType=VARCHAR},
-      #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP}, #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}
+      #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP}, #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR},
+      #{certificateNumber,jdbcType=VARCHAR}, #{issuingDate,jdbcType=TIMESTAMP}, 
+      #{cogContacts,jdbcType=INTEGER}, #{consultant,jdbcType=VARCHAR}
       )
       )
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
@@ -237,6 +246,20 @@
       <if test="stockCode != null">
       <if test="stockCode != null">
       	stock_code,
       	stock_code,
       </if>
       </if>
+      
+      <if test="certificateNumber != null">
+      	certificate_number,
+      </if>
+      <if test="issuingDate != null">
+      	issuing_date,
+      </if>
+      
+       <if test="cogContacts != null">
+      	cog_contacts,
+      </if>
+      <if test="consultant != null">
+      	consultant,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
       <if test="id != null" >
@@ -373,6 +396,20 @@
       <if test="stockCode != null" >
       <if test="stockCode != null" >
         #{stockCode,jdbcType=VARCHAR},
         #{stockCode,jdbcType=VARCHAR},
       </if>
       </if>
+      
+       <if test="certificateNumber != null" >
+        #{certificateNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="issuingDate != null" >
+        #{issuingDate,jdbcType=TIMESTAMP},
+      </if>
+      
+       <if test="cogContacts != null" >
+        #{cogContacts,jdbcType=INTEGER},
+      </if>
+      <if test="consultant != null" >
+        #{consultant,jdbcType=VARCHAR},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
@@ -509,6 +546,20 @@
       <if test="stockCode != null" >
       <if test="stockCode != null" >
         stock_code = #{stockCode,jdbcType=VARCHAR},
         stock_code = #{stockCode,jdbcType=VARCHAR},
       </if>
       </if>
+      
+       <if test="certificateNumber != null" >
+        certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="issuingDate != null" >
+        issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
+      </if>
+      
+       <if test="cogContacts != null" >
+        cog_contacts = #{cogContacts,jdbcType=INTEGER},
+      </if>
+      <if test="consultant != null" >
+        consultant = #{consultant,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
     where id = #{id,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   </update>
@@ -557,7 +608,13 @@
       listed = #{listed,jdbcType=INTEGER},
       listed = #{listed,jdbcType=INTEGER},
       listed_date = #{listedDate,jdbcType=TIMESTAMP},
       listed_date = #{listedDate,jdbcType=TIMESTAMP},
       listed_type = #{listedType,jdbcType=INTEGER},
       listed_type = #{listedType,jdbcType=INTEGER},
-      stock_code = #{stockCode,jdbcType=VARCHAR}
+      stock_code = #{stockCode,jdbcType=VARCHAR},
+      
+      certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+      issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
+      
+      cog_contacts = #{cogContacts,jdbcType=INTEGER},
+      consultant = #{consultant,jdbcType=VARCHAR}
       }
       }
     where id = #{id,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   </update>

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

@@ -119,8 +119,8 @@
     select b.name as principal , m.operator , m.id , m.pid , m.state , m.comment , m.record_time from 
     select b.name as principal , m.operator , m.id , m.pid , m.state , m.comment , m.record_time from 
 		(select a.name as operator, p.id ,p.pid  , p.state , p.comment ,p.record_time , p.principal as pri
 		(select a.name as operator, p.id ,p.pid  , p.state , p.comment ,p.record_time , p.principal as pri
 		from patent_log p LEFT JOIN admin a 
 		from patent_log p LEFT JOIN admin a 
-		on a.id = p.operator order by p.record_time desc) m LEFT JOIN admin b on m.pri = b. id
-    where pid = #{pid,jdbcType=VARCHAR}
+		on a.id = p.operator ) m LEFT JOIN admin b on m.pri = b. id
+    where pid = #{pid,jdbcType=VARCHAR} order by m.record_time desc
     
     
   </select>
   </select>
 </mapper>
 </mapper>

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

@@ -116,9 +116,10 @@
   </update>
   </update>
   
   
    <select id="selectTechProjectLogByPid" resultMap="BaseResultMap" parameterType="java.lang.String" >
    <select id="selectTechProjectLogByPid" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from tech_project_log
-    where pid = #{pid,jdbcType=VARCHAR}
+  select b.name as principal , m.operator , m.id , m.pid , m.state , m.comment , m.record_time from 
+		(select a.name as operator, p.id ,p.pid  , p.state , p.comment ,p.record_time , p.principal as pri
+		from tech_project_log p LEFT JOIN admin a 
+		on a.id = p.operator ) m LEFT JOIN admin b on m.pri = b. id
+    where pid = #{pid,jdbcType=VARCHAR} order by m.record_time desc
   </select>
   </select>
 </mapper>
 </mapper>

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

@@ -142,8 +142,8 @@
     <if test="province != null">
     <if test="province != null">
     	and i.location_province = #{province,jdbcType=VARCHAR}
     	and i.location_province = #{province,jdbcType=VARCHAR}
     </if>
     </if>
-    <if test="uid != null" >
-    	and w.uid = #{uid,jdbcType=VARCHAR}
+    <if test="unitName != null" >
+    	and i.unit_name = #{unitName,jdbcType=VARCHAR}
     </if>
     </if>
     order by w.create_time desc
     order by w.create_time desc
    <if test="page_sql!=null">
    <if test="page_sql!=null">

+ 6 - 1
src/main/java/com/goafanti/common/model/OrgCognizanceLog.java

@@ -4,6 +4,10 @@ import java.util.Date;
 
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
+
 public class OrgCognizanceLog {
 public class OrgCognizanceLog {
     private String id;
     private String id;
 
 
@@ -57,7 +61,8 @@ public class OrgCognizanceLog {
     public void setRecordTime(Date recordTime) {
     public void setRecordTime(Date recordTime) {
         this.recordTime = recordTime;
         this.recordTime = recordTime;
     }
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getState() {
     public Integer getState() {
         return state;
         return state;
     }
     }

+ 70 - 3
src/main/java/com/goafanti/common/model/OrganizationIdentity.java

@@ -223,6 +223,26 @@ public class OrganizationIdentity {
      */
      */
     private String stockCode;
     private String stockCode;
     
     
+    /**
+     * 高企认订证书编号
+     */
+    private String certificateNumber;
+    
+    /**
+     * 高企认定发证时间
+     */
+    private Date issuingDate;
+    
+    /**
+     * 高企认定联系人及联系方式
+     */
+    private Integer cogContacts;
+    
+    /**
+     * 高企认定咨询师
+     */
+    private String consultant;
+    
 
 
     public String getId() {
     public String getId() {
         return id;
         return id;
@@ -581,6 +601,42 @@ public class OrganizationIdentity {
 	public void setStockCode(String stockCode) {
 	public void setStockCode(String stockCode) {
 		this.stockCode = stockCode;
 		this.stockCode = stockCode;
 	}
 	}
+	
+	
+
+	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 Integer getCogContacts() {
+		return cogContacts;
+	}
+
+	public void setCogContacts(Integer cogContacts) {
+		this.cogContacts = cogContacts;
+	}
+
+	public String getConsultant() {
+		return consultant;
+	}
+
+	public void setConsultant(String consultant) {
+		this.consultant = consultant;
+	}
 
 
 	//打款日期
 	//打款日期
 	public String getPaymentDateFormattedDate(){
 	public String getPaymentDateFormattedDate(){
@@ -595,9 +651,7 @@ public class OrganizationIdentity {
 			
 			
 	}
 	}
 	
 	
-	/**
-	 * 上市时间
-	 */
+	//上市时间
 	public String getListedDateFormattedDate(){
 	public String getListedDateFormattedDate(){
 		if (this.listedDate == null) {
 		if (this.listedDate == null) {
 			 return null;
 			 return null;
@@ -609,6 +663,19 @@ public class OrganizationIdentity {
 	public void setListedDateFormattedDate(String listedDateFormattedDate){
 	public void setListedDateFormattedDate(String listedDateFormattedDate){
 			
 			
 	}
 	}
+	
+	//高企认定时间
+	public String getIssuingDateFormattedDate(){
+		if (this.issuingDate == null) {
+			 return null;
+		   } else {
+			 return DateFormatUtils.format(this.getIssuingDate(), "yyyy-MM-dd");
+		   }
+	}
+		
+	public void setIssuingDateFormattedDate(String issuingDateFormattedDate){
+			
+	}
     
     
     
     
 }
 }

+ 5 - 1
src/main/java/com/goafanti/common/model/PatentLog.java

@@ -4,6 +4,9 @@ import java.util.Date;
 
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class PatentLog {
 public class PatentLog {
     private String id;
     private String id;
 
 
@@ -57,7 +60,8 @@ public class PatentLog {
     public void setRecordTime(Date recordTime) {
     public void setRecordTime(Date recordTime) {
         this.recordTime = recordTime;
         this.recordTime = recordTime;
     }
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getState() {
     public Integer getState() {
         return state;
         return state;
     }
     }

+ 5 - 1
src/main/java/com/goafanti/common/model/TechProjectLog.java

@@ -2,6 +2,9 @@ package com.goafanti.common.model;
 
 
 import java.util.Date;
 import java.util.Date;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class TechProjectLog {
 public class TechProjectLog {
     private String id;
     private String id;
 
 
@@ -55,7 +58,8 @@ public class TechProjectLog {
     public void setRecordTime(Date recordTime) {
     public void setRecordTime(Date recordTime) {
         this.recordTime = recordTime;
         this.recordTime = recordTime;
     }
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getState() {
     public Integer getState() {
         return state;
         return state;
     }
     }

+ 4 - 1
src/main/java/com/goafanti/common/model/TechWebsite.java

@@ -2,7 +2,10 @@ package com.goafanti.common.model;
 
 
 import java.util.Date;
 import java.util.Date;
 
 
+
+
 public class TechWebsite {
 public class TechWebsite {
+	
     private String id;
     private String id;
 
 
     private String uid;
     private String uid;
@@ -78,7 +81,7 @@ public class TechWebsite {
     }
     }
 
 
     public String getPassword() {
     public String getPassword() {
-        return password;
+    	return password;
     }
     }
 
 
     public void setPassword(String password) {
     public void setPassword(String password) {

+ 129 - 0
src/main/java/com/goafanti/common/utils/AesUtils.java

@@ -0,0 +1,129 @@
+package com.goafanti.common.utils;
+
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+
+
+public class AesUtils {
+	
+	/**
+	 * 加密
+	 * @param pwd 
+	 * @param aesSecretKey
+	 * @return
+	 */
+	public static String AesEncrypt(String pwd, String aesSecretKey){
+		return parseByte2HexStr(encrypt(pwd, aesSecretKey)); 
+	}
+	
+	/**
+	 * 解密
+	 * @param pwd
+	 * @param aesSecretKey
+	 * @return
+	 */
+	public static String AesDecrypt(String pwd, String aesSecretKey){
+		return new String (decrypt(parseHexStr2Byte(pwd), aesSecretKey));
+	}
+	
+	
+	
+	
+	
+	public static byte[] encrypt(String content, String password) {  
+        try {             
+                KeyGenerator kgen = KeyGenerator.getInstance("AES");  
+                kgen.init(128, new SecureRandom(password.getBytes()));  
+                SecretKey secretKey = kgen.generateKey();  
+                byte[] enCodeFormat = secretKey.getEncoded();  
+                SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");  
+                Cipher cipher = Cipher.getInstance("AES");// 创建密码器  
+                byte[] byteContent = content.getBytes("utf-8");  
+                cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化  
+                byte[] result = cipher.doFinal(byteContent);  
+                return result; // 加密  
+        } catch (NoSuchAlgorithmException e) {  
+                e.printStackTrace();  
+        } catch (NoSuchPaddingException e) {  
+                e.printStackTrace();  
+        } catch (InvalidKeyException e) {  
+                e.printStackTrace();  
+        } catch (UnsupportedEncodingException e) {  
+                e.printStackTrace();  
+        } catch (IllegalBlockSizeException e) {  
+                e.printStackTrace();  
+        } catch (BadPaddingException e) {  
+                e.printStackTrace();  
+        }  
+        return null;  
+	}  
+	
+	public static byte[] decrypt(byte[] content, String password) {  
+        try {  
+                 KeyGenerator kgen = KeyGenerator.getInstance("AES");  
+                 kgen.init(128, new SecureRandom(password.getBytes()));  
+                 SecretKey secretKey = kgen.generateKey();  
+                 byte[] enCodeFormat = secretKey.getEncoded();  
+                 SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");              
+                 Cipher cipher = Cipher.getInstance("AES");// 创建密码器  
+                cipher.init(Cipher.DECRYPT_MODE, key);// 初始化  
+                byte[] result = cipher.doFinal(content);  
+                return result; // 加密  
+        } catch (NoSuchAlgorithmException e) {  
+                e.printStackTrace();  
+        } catch (NoSuchPaddingException e) {  
+                e.printStackTrace();  
+        } catch (InvalidKeyException e) {  
+                e.printStackTrace();  
+        } catch (IllegalBlockSizeException e) {  
+                e.printStackTrace();  
+        } catch (BadPaddingException e) {  
+                e.printStackTrace();  
+        }  
+        return null;  
+	}  
+	
+	/**将二进制转换成16进制 
+	 * @param buf 
+	 * @return 
+	 */  
+	public static String parseByte2HexStr(byte buf[]) {  
+	        StringBuffer sb = new StringBuffer();  
+	        for (int i = 0; i < buf.length; i++) {  
+	                String hex = Integer.toHexString(buf[i] & 0xFF);  
+	                if (hex.length() == 1) {  
+	                        hex = '0' + hex;  
+	                }  
+	                sb.append(hex.toUpperCase());  
+	        }  
+	        return sb.toString();  
+	}  
+	
+	public static byte[] parseHexStr2Byte(String hexStr) {  
+        if (hexStr.length() < 1)  
+                return null;  
+        byte[] result = new byte[hexStr.length()/2];  
+        for (int i = 0;i< hexStr.length()/2; i++) {  
+                int high = Integer.parseInt(hexStr.substring(i*2, i*2+1), 16);  
+                int low = Integer.parseInt(hexStr.substring(i*2+1, i*2+2), 16);  
+                result[i] = (byte) (high * 16 + low);  
+        }  
+        return result; 
+        
+    
+	} 
+	
+	
+	
+}

+ 6 - 5
src/main/java/com/goafanti/techproject/bo/TechProjectDetailBo.java

@@ -5,7 +5,7 @@ import com.goafanti.common.model.TechProject;
  * 科技项目详情
  * 科技项目详情
  */
  */
 public class TechProjectDetailBo extends TechProject {
 public class TechProjectDetailBo extends TechProject {
-	private String orgName;
+	private String unitName;
 	
 	
 	private String orgCode;
 	private String orgCode;
 	
 	
@@ -15,12 +15,13 @@ public class TechProjectDetailBo extends TechProject {
 	
 	
 	private String area;
 	private String area;
 
 
-	public String getOrgName() {
-		return orgName;
+
+	public String getUnitName() {
+		return unitName;
 	}
 	}
 
 
-	public void setOrgName(String orgName) {
-		this.orgName = orgName;
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
 	}
 	}
 
 
 	public String getOrgCode() {
 	public String getOrgCode() {

+ 2 - 0
src/main/java/com/goafanti/techproject/service/TechWebsiteService.java

@@ -13,4 +13,6 @@ public interface TechWebsiteService {
 
 
 	int saveWebsite(TechWebsite t);
 	int saveWebsite(TechWebsite t);
 
 
+	TechWebsite selectByPrimaryKey(String id);
+
 }
 }

+ 1 - 1
src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

@@ -68,7 +68,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			techProjectLogMapper.insert(log);
 			techProjectLogMapper.insert(log);
 		}
 		}
 		
 		
-		return techProjectMapper.updateByPrimaryKey(t);
+		return techProjectMapper.updateByPrimaryKeySelective(t);
 	}
 	}
 
 
 	@Override
 	@Override

+ 8 - 3
src/main/java/com/goafanti/techproject/service/impl/TechWebsiteServiceImpl.java

@@ -36,13 +36,13 @@ public class TechWebsiteServiceImpl extends BaseMybatisDao<TechWebsiteMapper> im
 
 
 	@SuppressWarnings("unchecked")
 	@SuppressWarnings("unchecked")
 	@Override
 	@Override
-	public Pagination<TechWebsite> listTechWebsite(String province, String uid, Integer pageNo, Integer pageSize) {
+	public Pagination<TechWebsite> listTechWebsite(String province, String unitName, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<>();
 		Map<String, Object> params = new HashMap<>();
 		if (!StringUtils.isBlank(province)) {
 		if (!StringUtils.isBlank(province)) {
 			params.put("province", province);
 			params.put("province", province);
 		}
 		}
-		if (!StringUtils.isBlank(uid)) {
-			params.put("uid", uid);
+		if (!StringUtils.isBlank(unitName)) {
+			params.put("unitName", unitName);
 		}
 		}
 
 
 		if (pageNo == null || pageNo < 0) {
 		if (pageNo == null || pageNo < 0) {
@@ -70,4 +70,9 @@ public class TechWebsiteServiceImpl extends BaseMybatisDao<TechWebsiteMapper> im
 		}
 		}
 		
 		
 	}
 	}
+
+	@Override
+	public TechWebsite selectByPrimaryKey(String id) {
+		return techWebsiteMapper.selectByPrimaryKey(id);
+	}
 }
 }

+ 4 - 2
src/main/resources/props/config_dev.properties

@@ -51,7 +51,7 @@ session.validate.timespan=18000000
 
 
 app.name=AFT
 app.name=AFT
 
 
-static.host=//afts.hnzhiming.com/1.0.8
+static.host=//afts.hnzhiming.com/1.0.9
 
 
 upload.path=/data/wwwroot/aft/upload
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload
 upload.private.path=/data/upload
@@ -59,4 +59,6 @@ upload.private.path=/data/upload
 accessKey=LTAIqTgQLLwz252Z
 accessKey=LTAIqTgQLLwz252Z
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 
 
-avatar.host=//afts.hnzhiming.com
+avatar.host=//afts.hnzhiming.com
+
+aesSecretKey = aft666

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

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 
 app.name=AFT
 app.name=AFT
 
 
-static.host=//afts.hnzhiming.com/1.0.8
+static.host=//afts.hnzhiming.com/1.0.9
 
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc
 upload.private.path=/Users/xiaolong/Sites/doc
@@ -62,3 +62,5 @@ accessKey=LTAIqTgQLLwz252Z
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 
 
 avatar.host=//afts.hnzhiming.com
 avatar.host=//afts.hnzhiming.com
+
+aesSecretKey = aft666

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

@@ -51,4 +51,4 @@ session.validate.timespan=18000000
 
 
 app.name=AFT
 app.name=AFT
 
 
-static.host=//afts.hnzhiming.com/1.0.8
+static.host=//afts.hnzhiming.com/1.0.9

+ 4 - 2
src/main/resources/props/config_test.properties

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 
 app.name=AFT
 app.name=AFT
 
 
-static.host=//aftts.hnzhiming.com/1.0.8
+static.host=//aftts.hnzhiming.com/1.0.9
 
 
 upload.path=/data/aft/public/upload
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload
 upload.private.path=/data/aft/private/upload
@@ -61,4 +61,6 @@ upload.private.path=/data/aft/private/upload
 accessKey=LTAIqTgQLLwz252Z
 accessKey=LTAIqTgQLLwz252Z
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
 
 
-avatar.host=//aftts.hnzhiming.com
+avatar.host=//aftts.hnzhiming.com
+
+aesSecretKey = aft666