Browse Source

Accept Merge Request #65 merge update : (master -> test)

Merge Request: merge update
Created By: @Antiloveg
Accepted By: @Antiloveg
URL: https://coding.net/t/aft/p/AFT/git/merge/65
Antiloveg 9 years ago
parent
commit
80133beb36
32 changed files with 431 additions and 457 deletions
  1. 6 0
      schema/2017-03-13.sql
  2. 31 140
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  3. 2 0
      src/main/java/com/goafanti/common/dao/OrgHumanResourceMapper.java
  4. 11 9
      src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml
  5. 7 0
      src/main/java/com/goafanti/common/mapper/OrgHumanResourceMapper.xml
  6. 2 3
      src/main/java/com/goafanti/common/mapper/PatentCostMapper.xml
  7. 6 6
      src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml
  8. 2 2
      src/main/java/com/goafanti/common/mapper/PatentRegistrationMapper.xml
  9. 2 2
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  10. 9 8
      src/main/java/com/goafanti/common/model/OrgCognizance.java
  11. 4 3
      src/main/java/com/goafanti/common/model/OrgHumanResource.java
  12. 0 3
      src/main/java/com/goafanti/common/model/PatentInfo.java
  13. 35 3
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceBo.java
  14. 3 1
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceDetailBo.java
  15. 7 4
      src/main/java/com/goafanti/techservice/cognizance/bo/CognizanceOrgInfoBo.java
  16. 12 119
      src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java
  17. 4 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgAnnualReportService.java
  18. 3 0
      src/main/java/com/goafanti/techservice/cognizance/service/OrgCognizanceService.java
  19. 57 2
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgAnnualReportServiceImpl.java
  20. 48 0
      src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgCognizanceServiceImpl.java
  21. 5 71
      src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java
  22. 2 0
      src/main/java/com/goafanti/techservice/patent/service/PatentInfoService.java
  23. 56 0
      src/main/java/com/goafanti/techservice/patent/service/impl/PatentInfoServiceImpl.java
  24. 6 0
      src/main/java/com/goafanti/user/controller/UserApiController.java
  25. 2 0
      src/main/java/com/goafanti/user/service/OrgHumanResourceService.java
  26. 3 0
      src/main/java/com/goafanti/user/service/OrganizationIdentityService.java
  27. 5 0
      src/main/java/com/goafanti/user/service/impl/OrgHumanResourceServiceImpl.java
  28. 21 0
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  29. 20 20
      src/main/resources/props/config_dev.properties
  30. 20 21
      src/main/resources/props/config_local.properties
  31. 20 20
      src/main/resources/props/config_prod.properties
  32. 20 20
      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 '联系人及联系方式' ;
+
+

+ 31 - 140
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;
@@ -124,26 +112,27 @@ public class AdminApiController extends BaseApiController {
 	@Resource
 	private AftFileService					aftFileService;
 	@Resource(name = "passwordUtil")
-	private PasswordUtil	passwordUtil;
+	private PasswordUtil					passwordUtil;
 	@Resource
-	private AdminService	adminService;
-	
+	private AdminService					adminService;
+
 	/**
 	 * 新增用户
+	 * 
 	 * @param mobile
 	 * @param type
 	 * @param unitName
 	 * @return
 	 */
 	@RequestMapping(value = "/addNewUser", method = RequestMethod.POST)
-	public Result addNewUser(String mobile, Integer type, String unitName){
+	public Result addNewUser(String mobile, Integer type, String unitName) {
 		Result res = new Result();
 		User user = userService.selectByMobieAndType(mobile, type);
 		if (null != user) {
 			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
 			return res;
 		}
-		
+
 		User u = new User();
 		u.setId(UUID.randomUUID().toString());
 		u.setMobile(mobile);
@@ -154,15 +143,10 @@ 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;
 	}
-	
 
 	/**
 	 * 个人用户列表
@@ -319,7 +303,13 @@ public class AdminApiController extends BaseApiController {
 	public Result updateOrgHumanResource(OrgHumanResource orgHumanResource) {
 		Result res = new Result();
 		if (null == orgHumanResource.getId()) {
+			if (null != orgHumanResourceService.selectOrgHumanResourceByUidAndYear(orgHumanResource.getYear(),
+					orgHumanResource.getUid())){
+				res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度人力资源情况已录入!"));
+				return res;
+			}
 			orgHumanResource.setId(UUID.randomUUID().toString());
+			orgHumanResource.setDeletedSign(0);
 			orgHumanResourceService.insert(orgHumanResource);
 		} else {
 			orgHumanResourceService.updateByPrimaryKeySelective(orgHumanResource);
@@ -858,21 +848,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 +858,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)) {
@@ -999,9 +975,10 @@ public class AdminApiController extends BaseApiController {
 		orgCognizanceService.updateByPrimaryKeySelective(cog);
 		return res;
 	}
-	
+
 	/**
 	 * 刪除高企认定
+	 * 
 	 * @param ids
 	 * @return
 	 */
@@ -1143,14 +1120,14 @@ public class AdminApiController extends BaseApiController {
 			if (res.getData() != "" && res.getData() != null && null == aftFileService.selectAftFileBySign(sign)) {
 				AftFile f = new AftFile();
 				f.setId(UUID.randomUUID().toString());
-					if ("patent_prory_statement".equals(sign)) {
-						f.setFileName("专利代理委托书模版");
-						f.setSign(sign);
-					} 
-					f.setFilePath("/admin/" + fileName);
-					f.setDeleletedSign(0);
-					aftFileService.insert(f);
-				
+				if ("patent_prory_statement".equals(sign)) {
+					f.setFileName("专利代理委托书模版");
+					f.setSign(sign);
+				}
+				f.setFilePath("/admin/" + fileName);
+				f.setDeleletedSign(0);
+				aftFileService.insert(f);
+
 			}
 		} else {
 			res.getError().add(buildError(ErrorConstants.FILE_PATTERN_ERROR, "文件格式错误,请重新上传!"));
@@ -1175,110 +1152,24 @@ public class AdminApiController extends BaseApiController {
 	// org团体列表
 	private Pagination<OrgListBo> getOrgList(String mobile, String email, String[] createTime, Integer number,
 			String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
-		return  userService.listOrg(mobile, email, createTime, number, aftUsername, auditStatus,
-				pNo, pSize);
+		return userService.listOrg(mobile, email, createTime, number, aftUsername, auditStatus, pNo, pSize);
 	}
 
 	// user个人列表
 	private Pagination<UserListBo> getUserList(String mobile, String email, String[] createTime, Integer number,
 			String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
-		return  userService.listUser(mobile, email, createTime, number, aftUsername,
-				auditStatus, pNo, pSize);
+		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 orgAnnualReportService.selectAnnualReportBo(uid, year);
 
-		return report;
 	}
 
 	private String handleFile(Result res, HttpServletRequest req, String fileName, List<MultipartFile> files,

+ 2 - 0
src/main/java/com/goafanti/common/dao/OrgHumanResourceMapper.java

@@ -20,4 +20,6 @@ public interface OrgHumanResourceMapper {
 	OrgHumanResource selectOrgHumanResourceByUserId(String uid);
 
 	int batchDeleteByPrimaryKey(List<String> id);
+
+	OrgHumanResource selectOrgHumanResourceByUidAndYear(Integer year, String uid);
 }

+ 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>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/OrgHumanResourceMapper.xml

@@ -471,4 +471,11 @@
 		#{item}
 	</foreach>
   </update>
+  
+   <select id="selectOrgHumanResourceByUidAndYear" resultMap="BaseResultMap"  >
+    select 
+    <include refid="Base_Column_List" />
+    from org_human_resource
+    where year = #{0} and uid = #{1}
+  </select>
 </mapper>

+ 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>

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

@@ -47,7 +47,7 @@
     select 
     <include refid="Base_Column_List" />
     from patent_info
-    where id = #{id,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR} 
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
     delete from patent_info
@@ -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/PatentRegistrationMapper.xml

@@ -213,12 +213,12 @@
        m.* from 
       (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_catagory as patentCatagory , p.patent_name as patentName, p.record_time as recordTime
+              p.patent_catagory as patentCatagory , p.patent_name as patentName
        from user u
 	   INNER JOIN patent_info p on u.id =p.uid and p.deleted_sign = 0
 	   LEFT JOIN organization_identity o on o.uid = u.id 
 	   ) m
-  LEFT JOIN patent_registration r on m.pid = r.pid  order by m.recordTime desc
+  LEFT JOIN patent_registration r on m.pid = r.pid  order by m.serialNumber desc
   </select>
   
   <select id="findRecieveSendCount" resultType="java.lang.Integer">

+ 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;
     }
 

+ 4 - 3
src/main/java/com/goafanti/common/model/OrgHumanResource.java

@@ -168,7 +168,7 @@ public class OrgHumanResource {
     /**
      * 删除标记
      */
-    private String deletedSign;
+    private Integer deletedSign;
 
     public String getId() {
         return id;
@@ -439,11 +439,11 @@ public class OrgHumanResource {
 	}
     
 	@JsonIgnore
-	public String getDeletedSign() {
+	public Integer getDeletedSign() {
 		return deletedSign;
 	}
 
-	public void setDeletedSign(String deletedSign) {
+	public void setDeletedSign(Integer deletedSign) {
 		this.deletedSign = deletedSign;
 	}
 
@@ -455,6 +455,7 @@ public class OrgHumanResource {
 		}
 	}
 	
+
 	public void setRosterDownloadFileName(String rosterDownloadFileName){
 		
 	}

+ 0 - 3
src/main/java/com/goafanti/common/model/PatentInfo.java

@@ -6,10 +6,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.goafanti.common.utils.FileUtils;
-@JsonInclude(value = Include.NON_NULL)
 public class PatentInfo {
     private String id;
 

+ 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) {

+ 5 - 71
src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java

@@ -77,9 +77,6 @@ public class PatentApiController extends BaseApiController {
 	@Resource
 	private UserService						userService;
 
-	/*
-	 * @Autowired DownloadUtils downloadUtils;
-	 */
 
 	@Value(value = "${upload.private.path}")
 	private String							uploadPrivatePath	= null;
@@ -92,38 +89,7 @@ public class PatentApiController extends BaseApiController {
 		Result res = new Result();
 		res = checkCertify(res, TokenManager.getUserId());
 		if (res.getError().isEmpty()) {
-			patentInfo.setId(UUID.randomUUID().toString());
-			patentInfo.setUid(TokenManager.getUserId());
-			Calendar now = Calendar.getInstance();
-			now.set(Calendar.MILLISECOND, 0);
-			patentInfo.setRecordTime(now.getTime());
-			patentInfo.setDeletedSign(0);
-			patentInfo.setConfirmState(0);
-			patentInfo.setPatentState(1);
-			String p = userService.selectByPrimaryKey(TokenManager.getUserId()).getAid();
-			patentInfo.setPrincipal(p);
-			patentInfoService.insert(patentInfo);
-
-			PatentRegistration patentRegistration = new PatentRegistration();
-			patentRegistration.setId(UUID.randomUUID().toString());
-			patentRegistration.setPid(patentInfo.getId());
-			patentRegistrationService.insert(patentRegistration);
-
-			PatentCost patentCost = new PatentCost();
-			patentCost.setId(UUID.randomUUID().toString());
-			patentCost.setPid(patentInfo.getId());
-			patentCost.setAnnualFeeState(0);
-			patentCost.setPaymentState(0);
-			patentCostService.insert(patentCost);
-
-			PatentLog log = new PatentLog();
-			log.setId(UUID.randomUUID().toString());
-			log.setPid(patentInfo.getId());
-			log.setRecordTime(patentInfo.getCreateTime());
-			log.setState(1);
-			log.setPrincipal(p);
-			patentLogService.insert(log);
-			res.setData(patentInfo);
+			res.setData(patentInfoService.savePatentInfo(patentInfo, TokenManager.getUserId())); 
 		}
 		return res;
 	}
@@ -150,9 +116,9 @@ public class PatentApiController extends BaseApiController {
 	 * 
 	 */
 	@RequestMapping(value = "/clientPatentInfo", method = RequestMethod.POST)
-	public Result clientPatentInfo(String patentId) {
+	public Result clientPatentInfo(String pid) {
 		Result res = new Result();
-		res.setData(patentInfoService.selectByPrimaryKey(patentId));
+		res.setData(patentInfoService.selectByPrimaryKey(pid));
 		return res;
 	}
 
@@ -229,7 +195,7 @@ public class PatentApiController extends BaseApiController {
 		res.setData(map);
 		return res;
 	}
-
+	
 	/**
 	 * 获取管理员
 	 */
@@ -253,39 +219,7 @@ public class PatentApiController extends BaseApiController {
 		Result res = new Result();
 		res = checkCertify(res, uid);
 		if (res.getError().isEmpty()) {
-			patentInfo.setId(UUID.randomUUID().toString());
-			patentInfo.setUid(uid);
-			Calendar now = Calendar.getInstance();
-			now.set(Calendar.MILLISECOND, 0);
-			patentInfo.setRecordTime(now.getTime());
-			patentInfo.setDeletedSign(0);
-			patentInfo.setConfirmState(0);
-			patentInfo.setPatentState(1);
-			String p = userService.selectByPrimaryKey(TokenManager.getUserId()).getAid();
-			patentInfo.setPrincipal(p);
-			patentInfoService.insert(patentInfo);
-			
-			PatentRegistration patentRegistration = new PatentRegistration();
-			patentRegistration.setId(UUID.randomUUID().toString());
-			patentRegistration.setPid(patentInfo.getId());
-			patentRegistrationService.insert(patentRegistration);
-			
-			PatentCost patentCost = new PatentCost();
-			patentCost.setId(UUID.randomUUID().toString());
-			patentCost.setPid(patentInfo.getId());
-			patentCost.setAnnualFeeState(0);
-			patentCost.setPaymentState(0);
-			patentCostService.insert(patentCost);
-
-			PatentLog log = new PatentLog();
-			log.setId(UUID.randomUUID().toString());
-			log.setPid(patentInfo.getId());
-			log.setRecordTime(patentInfo.getCreateTime());
-			log.setState(1);
-			log.setPrincipal(p);
-			log.setOperator(TokenManager.getAdminId());
-			patentLogService.insert(log);
-			res.setData(patentInfo);
+			res.setData(patentInfoService.savePatentInfo(patentInfo, uid));
 		}
 		return res;
 	}

+ 2 - 0
src/main/java/com/goafanti/techservice/patent/service/PatentInfoService.java

@@ -36,5 +36,7 @@ public interface PatentInfoService {
 
 	int batchDeleteByPrimaryKey(List<String> id);
 
+	PatentInfo savePatentInfo(PatentInfo patentInfo, String uid);
+
 
 }

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

@@ -1,16 +1,26 @@
 package com.goafanti.techservice.patent.service.impl;
 
 import java.text.ParseException;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.dao.PatentCostMapper;
 import com.goafanti.common.dao.PatentInfoMapper;
+import com.goafanti.common.dao.PatentLogMapper;
+import com.goafanti.common.dao.PatentRegistrationMapper;
+import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.model.PatentCost;
 import com.goafanti.common.model.PatentInfo;
+import com.goafanti.common.model.PatentLog;
+import com.goafanti.common.model.PatentRegistration;
+import com.goafanti.common.model.User;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -24,6 +34,14 @@ import com.goafanti.techservice.patent.service.PatentInfoService;
 public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> implements PatentInfoService {
 	@Autowired
 	PatentInfoMapper patentInfoMapper;
+	@Autowired
+	UserMapper      userMapper;
+	@Autowired
+	PatentRegistrationMapper patentRegistrationMapper;
+	@Autowired
+	PatentCostMapper patentCostMapper;
+	@Autowired
+	PatentLogMapper  patentLogMapper;
 	
 	
 	@Override
@@ -270,6 +288,44 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 	}
 
 
+	@Override
+	public PatentInfo savePatentInfo(PatentInfo patentInfo, String uid) {
+		patentInfo.setId(UUID.randomUUID().toString());
+		patentInfo.setUid(uid);
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		patentInfo.setRecordTime(now.getTime());
+		patentInfo.setDeletedSign(0);
+		patentInfo.setConfirmState(0);
+		patentInfo.setPatentState(1);
+		User u = userMapper.selectByPrimaryKey(uid);
+		String p = (null == u ? "" : u.getAid());
+		patentInfo.setPrincipal(p);
+		patentInfoMapper.insert(patentInfo);
+
+		PatentRegistration patentRegistration = new PatentRegistration();
+		patentRegistration.setId(UUID.randomUUID().toString());
+		patentRegistration.setPid(patentInfo.getId());
+		patentRegistrationMapper.insert(patentRegistration);
+
+		PatentCost patentCost = new PatentCost();
+		patentCost.setId(UUID.randomUUID().toString());
+		patentCost.setPid(patentInfo.getId());
+		patentCost.setAnnualFeeState(0);
+		patentCost.setPaymentState(0);
+		patentCostMapper.insert(patentCost);
+
+		PatentLog log = new PatentLog();
+		log.setId(UUID.randomUUID().toString());
+		log.setPid(patentInfo.getId());
+		log.setRecordTime(patentInfo.getCreateTime());
+		log.setState(1);
+		log.setPrincipal(p);
+		patentLogMapper.insert(log);
+		return patentInfo;
+	}
+
+
 	
 
 }

+ 6 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -631,8 +631,14 @@ public class UserApiController extends BaseApiController {
 	public Result SaveHumanResource(OrgHumanResource orgHumanResource){
 		Result res = new Result();
 		if (null == orgHumanResource.getId()){
+			if (null != orgHumanResourceService.selectOrgHumanResourceByUidAndYear(orgHumanResource.getYear(),
+					orgHumanResource.getUid())){
+				res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度人力资源情况已录入!"));
+				return res;
+			}
 			orgHumanResource.setId(UUID.randomUUID().toString());
 			orgHumanResource.setUid(TokenManager.getUserId());
+			orgHumanResource.setDeletedSign(0);
 			orgHumanResourceService.insert(orgHumanResource);
 		} else {
 			orgHumanResourceService.updateByPrimaryKeySelective(orgHumanResource);

+ 2 - 0
src/main/java/com/goafanti/user/service/OrgHumanResourceService.java

@@ -15,4 +15,6 @@ public interface OrgHumanResourceService {
 
 	int batchDeleteByPrimaryKey(List<String> id);
 
+	OrgHumanResource selectOrgHumanResourceByUidAndYear(Integer year, String uid);
+
 }

+ 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);
+
 
 	
 

+ 5 - 0
src/main/java/com/goafanti/user/service/impl/OrgHumanResourceServiceImpl.java

@@ -58,4 +58,9 @@ public class OrgHumanResourceServiceImpl extends BaseMybatisDao<OrgHumanResource
 		return orgHumanResourceMapper.batchDeleteByPrimaryKey(id);
 	}
 
+	@Override
+	public OrgHumanResource selectOrgHumanResourceByUidAndYear(Integer year, String uid) {
+		return orgHumanResourceMapper.selectOrgHumanResourceByUidAndYear(year, 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;
+	}
+
 		
 
 }

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

@@ -1,41 +1,41 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636E\u5E93\u94FE\u63A5\uFF0C
+#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
 jdbc.url=jdbc:mysql://123.57.207.214:3306/pro_aft_test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
-#\u5E10\u53F7
+#\u5e10\u53f7
 jdbc.username=xiaolong
-#\u5BC6\u7801
+#\u5bc6\u7801
 jdbc.password=!qaz2wsx
-#\u68C0\u6D4B\u6570\u636E\u5E93\u94FE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u5FC5\u987B\u914D\u7F6E
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
-#\u521D\u59CB\u8FDE\u63A5\u6570
+#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53BB\u6389\uFF0C\u914D\u7F6E\u6587\u4EF6\u5BF9\u5E94\u53BB\u6389
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 #jdbc.maxIdle=20
-#\u914D\u7F6E0,\u5F53\u7EBF\u7A0B\u6C60\u6570\u91CF\u4E0D\u8DB3\uFF0C\u81EA\u52A8\u8865\u5145\u3002
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83B7\u53D6\u94FE\u63A5\u8D85\u65F6\u65F6\u95F4\u4E3A1\u5206\u949F\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2\u3002
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83B7\u53D6\u94FE\u63A5\u7684\u65F6\u5019\uFF0C\u4E0D\u6821\u9A8C\u662F\u5426\u53EF\u7528\uFF0C\u5F00\u542F\u4F1A\u6709\u635F\u6027\u80FD\u3002
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5F52\u8FD8\u94FE\u63A5\u5230\u8FDE\u63A5\u6C60\u7684\u65F6\u5019\u6821\u9A8C\u94FE\u63A5\u662F\u5426\u53EF\u7528\u3002
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6B64\u9879\u914D\u7F6E\u4E3Atrue\u5373\u53EF\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u610F\u4E49\u4E3A\uFF1A\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7EBF\u7A0B\u4F1A\u68C0\u6D4B\u8FDE\u63A5\u7684\u95F4\u9694\u65F6\u95F4
-#2.testWhileIdle\u7684\u5224\u65AD\u4F9D\u636E
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4E00\u4E2A\u94FE\u63A5\u751F\u5B58\u7684\u65F6\u95F4\uFF08\u4E4B\u524D\u7684\u503C\uFF1A25200000\uFF0C\u8FD9\u4E2A\u65F6\u95F4\u6709\u70B9BT\uFF0C\u8FD9\u4E2A\u7ED3\u679C\u4E0D\u77E5\u9053\u662F\u600E\u4E48\u6765\u7684\uFF0C\u6362\u7B97\u540E\u7684\u7ED3\u679C\u662F\uFF1A25200000/1000/60/60 = 7\u4E2A\u5C0F\u65F6\uFF09
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94FE\u63A5\u4F7F\u7528\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u662F\u5426\u56DE\u6536
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u65F6\u95F4\uFF08\u5355\u4F4D\u79D2\uFF09\uFF0C\u76EE\u524D\u4E3A5\u5206\u949F\uFF0C\u5982\u679C\u6709\u4E1A\u52A1\u5904\u7406\u65F6\u95F4\u8D85\u8FC75\u5206\u949F\uFF0C\u53EF\u4EE5\u9002\u5F53\u8C03\u6574\u3002
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94FE\u63A5\u56DE\u6536\u7684\u65F6\u5019\u63A7\u5236\u53F0\u6253\u5370\u4FE1\u606F\uFF0C\u6D4B\u8BD5\u73AF\u5883\u53EF\u4EE5\u52A0\u4E0Atrue\uFF0C\u7EBF\u4E0A\u73AF\u5883false\u3002\u4F1A\u5F71\u54CD\u6027\u80FD\u3002
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7EDF\u8BA1\u76D1\u63A7
+#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
 
 jedis.host=localhost
@@ -51,7 +51,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.5
+static.host=//afts.hnzhiming.com/1.0.6
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

+ 20 - 21
src/main/resources/props/config_local.properties

@@ -1,41 +1,41 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636E\u5E93\u94FE\u63A5\uFF0C
+#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
 jdbc.url=jdbc:mysql://localhost:3306/aft_dev?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
-#\u5E10\u53F7
+#\u5e10\u53f7
 jdbc.username=root
-#\u5BC6\u7801
+#\u5bc6\u7801
 jdbc.password=123456
-#\u68C0\u6D4B\u6570\u636E\u5E93\u94FE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u5FC5\u987B\u914D\u7F6E
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
-#\u521D\u59CB\u8FDE\u63A5\u6570
+#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53BB\u6389\uFF0C\u914D\u7F6E\u6587\u4EF6\u5BF9\u5E94\u53BB\u6389
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 #jdbc.maxIdle=20
-#\u914D\u7F6E0,\u5F53\u7EBF\u7A0B\u6C60\u6570\u91CF\u4E0D\u8DB3\uFF0C\u81EA\u52A8\u8865\u5145\u3002
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83B7\u53D6\u94FE\u63A5\u8D85\u65F6\u65F6\u95F4\u4E3A1\u5206\u949F\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2\u3002
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83B7\u53D6\u94FE\u63A5\u7684\u65F6\u5019\uFF0C\u4E0D\u6821\u9A8C\u662F\u5426\u53EF\u7528\uFF0C\u5F00\u542F\u4F1A\u6709\u635F\u6027\u80FD\u3002
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5F52\u8FD8\u94FE\u63A5\u5230\u8FDE\u63A5\u6C60\u7684\u65F6\u5019\u6821\u9A8C\u94FE\u63A5\u662F\u5426\u53EF\u7528\u3002
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6B64\u9879\u914D\u7F6E\u4E3Atrue\u5373\u53EF\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u610F\u4E49\u4E3A\uFF1A\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7EBF\u7A0B\u4F1A\u68C0\u6D4B\u8FDE\u63A5\u7684\u95F4\u9694\u65F6\u95F4
-#2.testWhileIdle\u7684\u5224\u65AD\u4F9D\u636E
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4E00\u4E2A\u94FE\u63A5\u751F\u5B58\u7684\u65F6\u95F4\uFF08\u4E4B\u524D\u7684\u503C\uFF1A25200000\uFF0C\u8FD9\u4E2A\u65F6\u95F4\u6709\u70B9BT\uFF0C\u8FD9\u4E2A\u7ED3\u679C\u4E0D\u77E5\u9053\u662F\u600E\u4E48\u6765\u7684\uFF0C\u6362\u7B97\u540E\u7684\u7ED3\u679C\u662F\uFF1A25200000/1000/60/60 = 7\u4E2A\u5C0F\u65F6\uFF09
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94FE\u63A5\u4F7F\u7528\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u662F\u5426\u56DE\u6536
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u65F6\u95F4\uFF08\u5355\u4F4D\u79D2\uFF09\uFF0C\u76EE\u524D\u4E3A5\u5206\u949F\uFF0C\u5982\u679C\u6709\u4E1A\u52A1\u5904\u7406\u65F6\u95F4\u8D85\u8FC75\u5206\u949F\uFF0C\u53EF\u4EE5\u9002\u5F53\u8C03\u6574\u3002
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94FE\u63A5\u56DE\u6536\u7684\u65F6\u5019\u63A7\u5236\u53F0\u6253\u5370\u4FE1\u606F\uFF0C\u6D4B\u8BD5\u73AF\u5883\u53EF\u4EE5\u52A0\u4E0Atrue\uFF0C\u7EBF\u4E0A\u73AF\u5883false\u3002\u4F1A\u5F71\u54CD\u6027\u80FD\u3002
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7EDF\u8BA1\u76D1\u63A7
+#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
 
 logging.level.com.goafanti=DEBUG
@@ -53,8 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.5
-
+static.host=//afts.hnzhiming.com/1.0.6
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

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

@@ -1,41 +1,41 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636E\u5E93\u94FE\u63A5\uFF0C
+#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
 jdbc.url=jdbc:mysql://123.57.207.214:3306/pro_aft_test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
-#\u5E10\u53F7
+#\u5e10\u53f7
 jdbc.username=xiaolong
-#\u5BC6\u7801
+#\u5bc6\u7801
 jdbc.password=!qaz2wsx
-#\u68C0\u6D4B\u6570\u636E\u5E93\u94FE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u5FC5\u987B\u914D\u7F6E
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
-#\u521D\u59CB\u8FDE\u63A5\u6570
+#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53BB\u6389\uFF0C\u914D\u7F6E\u6587\u4EF6\u5BF9\u5E94\u53BB\u6389
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 #jdbc.maxIdle=20
-#\u914D\u7F6E0,\u5F53\u7EBF\u7A0B\u6C60\u6570\u91CF\u4E0D\u8DB3\uFF0C\u81EA\u52A8\u8865\u5145\u3002
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83B7\u53D6\u94FE\u63A5\u8D85\u65F6\u65F6\u95F4\u4E3A1\u5206\u949F\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2\u3002
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83B7\u53D6\u94FE\u63A5\u7684\u65F6\u5019\uFF0C\u4E0D\u6821\u9A8C\u662F\u5426\u53EF\u7528\uFF0C\u5F00\u542F\u4F1A\u6709\u635F\u6027\u80FD\u3002
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5F52\u8FD8\u94FE\u63A5\u5230\u8FDE\u63A5\u6C60\u7684\u65F6\u5019\u6821\u9A8C\u94FE\u63A5\u662F\u5426\u53EF\u7528\u3002
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6B64\u9879\u914D\u7F6E\u4E3Atrue\u5373\u53EF\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u610F\u4E49\u4E3A\uFF1A\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7EBF\u7A0B\u4F1A\u68C0\u6D4B\u8FDE\u63A5\u7684\u95F4\u9694\u65F6\u95F4
-#2.testWhileIdle\u7684\u5224\u65AD\u4F9D\u636E
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4E00\u4E2A\u94FE\u63A5\u751F\u5B58\u7684\u65F6\u95F4\uFF08\u4E4B\u524D\u7684\u503C\uFF1A25200000\uFF0C\u8FD9\u4E2A\u65F6\u95F4\u6709\u70B9BT\uFF0C\u8FD9\u4E2A\u7ED3\u679C\u4E0D\u77E5\u9053\u662F\u600E\u4E48\u6765\u7684\uFF0C\u6362\u7B97\u540E\u7684\u7ED3\u679C\u662F\uFF1A25200000/1000/60/60 = 7\u4E2A\u5C0F\u65F6\uFF09
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94FE\u63A5\u4F7F\u7528\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u662F\u5426\u56DE\u6536
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u65F6\u95F4\uFF08\u5355\u4F4D\u79D2\uFF09\uFF0C\u76EE\u524D\u4E3A5\u5206\u949F\uFF0C\u5982\u679C\u6709\u4E1A\u52A1\u5904\u7406\u65F6\u95F4\u8D85\u8FC75\u5206\u949F\uFF0C\u53EF\u4EE5\u9002\u5F53\u8C03\u6574\u3002
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94FE\u63A5\u56DE\u6536\u7684\u65F6\u5019\u63A7\u5236\u53F0\u6253\u5370\u4FE1\u606F\uFF0C\u6D4B\u8BD5\u73AF\u5883\u53EF\u4EE5\u52A0\u4E0Atrue\uFF0C\u7EBF\u4E0A\u73AF\u5883false\u3002\u4F1A\u5F71\u54CD\u6027\u80FD\u3002
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7EDF\u8BA1\u76D1\u63A7
+#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
 
 jedis.host=123.57.207.214
@@ -51,4 +51,4 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.5
+static.host=//afts.hnzhiming.com/1.0.6

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

@@ -1,41 +1,41 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636E\u5E93\u94FE\u63A5\uFF0C
+#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
 jdbc.url=jdbc:mysql://localhost:3306/aft_test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
-#\u5E10\u53F7
+#\u5e10\u53f7
 jdbc.username=xiaolong
-#\u5BC6\u7801
+#\u5bc6\u7801
 jdbc.password=Afanti@2017!
-#\u68C0\u6D4B\u6570\u636E\u5E93\u94FE\u63A5\u662F\u5426\u6709\u6548\uFF0C\u5FC5\u987B\u914D\u7F6E
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
-#\u521D\u59CB\u8FDE\u63A5\u6570
+#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8FDE\u63A5\u6C60\u6570\u91CF
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53BB\u6389\uFF0C\u914D\u7F6E\u6587\u4EF6\u5BF9\u5E94\u53BB\u6389
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 #jdbc.maxIdle=20
-#\u914D\u7F6E0,\u5F53\u7EBF\u7A0B\u6C60\u6570\u91CF\u4E0D\u8DB3\uFF0C\u81EA\u52A8\u8865\u5145\u3002
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83B7\u53D6\u94FE\u63A5\u8D85\u65F6\u65F6\u95F4\u4E3A1\u5206\u949F\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2\u3002
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83B7\u53D6\u94FE\u63A5\u7684\u65F6\u5019\uFF0C\u4E0D\u6821\u9A8C\u662F\u5426\u53EF\u7528\uFF0C\u5F00\u542F\u4F1A\u6709\u635F\u6027\u80FD\u3002
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5F52\u8FD8\u94FE\u63A5\u5230\u8FDE\u63A5\u6C60\u7684\u65F6\u5019\u6821\u9A8C\u94FE\u63A5\u662F\u5426\u53EF\u7528\u3002
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6B64\u9879\u914D\u7F6E\u4E3Atrue\u5373\u53EF\uFF0C\u4E0D\u5F71\u54CD\u6027\u80FD\uFF0C\u5E76\u4E14\u4FDD\u8BC1\u5B89\u5168\u6027\u3002\u610F\u4E49\u4E3A\uFF1A\u7533\u8BF7\u8FDE\u63A5\u7684\u65F6\u5019\u68C0\u6D4B\uFF0C\u5982\u679C\u7A7A\u95F2\u65F6\u95F4\u5927\u4E8EtimeBetweenEvictionRunsMillis\uFF0C\u6267\u884CvalidationQuery\u68C0\u6D4B\u8FDE\u63A5\u662F\u5426\u6709\u6548\u3002
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7EBF\u7A0B\u4F1A\u68C0\u6D4B\u8FDE\u63A5\u7684\u95F4\u9694\u65F6\u95F4
-#2.testWhileIdle\u7684\u5224\u65AD\u4F9D\u636E
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4E00\u4E2A\u94FE\u63A5\u751F\u5B58\u7684\u65F6\u95F4\uFF08\u4E4B\u524D\u7684\u503C\uFF1A25200000\uFF0C\u8FD9\u4E2A\u65F6\u95F4\u6709\u70B9BT\uFF0C\u8FD9\u4E2A\u7ED3\u679C\u4E0D\u77E5\u9053\u662F\u600E\u4E48\u6765\u7684\uFF0C\u6362\u7B97\u540E\u7684\u7ED3\u679C\u662F\uFF1A25200000/1000/60/60 = 7\u4E2A\u5C0F\u65F6\uFF09
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94FE\u63A5\u4F7F\u7528\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u662F\u5426\u56DE\u6536
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u65F6\u95F4\uFF08\u5355\u4F4D\u79D2\uFF09\uFF0C\u76EE\u524D\u4E3A5\u5206\u949F\uFF0C\u5982\u679C\u6709\u4E1A\u52A1\u5904\u7406\u65F6\u95F4\u8D85\u8FC75\u5206\u949F\uFF0C\u53EF\u4EE5\u9002\u5F53\u8C03\u6574\u3002
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94FE\u63A5\u56DE\u6536\u7684\u65F6\u5019\u63A7\u5236\u53F0\u6253\u5370\u4FE1\u606F\uFF0C\u6D4B\u8BD5\u73AF\u5883\u53EF\u4EE5\u52A0\u4E0Atrue\uFF0C\u7EBF\u4E0A\u73AF\u5883false\u3002\u4F1A\u5F71\u54CD\u6027\u80FD\u3002
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7EDF\u8BA1\u76D1\u63A7
+#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
 
 logging.level.com.goafanti=INFO
@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//aftts.hnzhiming.com/1.0.5
+static.host=//aftts.hnzhiming.com/1.0.6
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload