Antiloveg лет назад: 8
Родитель
Сommit
b70e4e5df6
43 измененных файлов с 990 добавлено и 205 удалено
  1. 18 0
      schema/2017-04-12.sql
  2. 181 0
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  3. 17 13
      src/main/java/com/goafanti/admin/controller/AdminCopyrightApiController.java
  4. 1 1
      src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java
  5. 1 1
      src/main/java/com/goafanti/admin/controller/AdminTechProjectApiController.java
  6. 12 0
      src/main/java/com/goafanti/cognizance/bo/CognizanceBo.java
  7. 29 0
      src/main/java/com/goafanti/cognizance/bo/CognizanceDetailBo.java
  8. 25 1
      src/main/java/com/goafanti/cognizance/bo/CognizanceOrgInfoBo.java
  9. 14 0
      src/main/java/com/goafanti/cognizance/bo/InputApplyCognizance.java
  10. 12 0
      src/main/java/com/goafanti/cognizance/bo/InputOrgCognizance.java
  11. 14 2
      src/main/java/com/goafanti/cognizance/bo/InputOrgFinance.java
  12. 18 3
      src/main/java/com/goafanti/cognizance/bo/InputOrgHonorDatum.java
  13. 27 0
      src/main/java/com/goafanti/cognizance/bo/InputOrgStandard.java
  14. 20 0
      src/main/java/com/goafanti/cognizance/bo/OrgIntellectualPropertyDetailBo.java
  15. 109 2
      src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java
  16. 5 0
      src/main/java/com/goafanti/cognizance/service/OrgIntellectualPropertyService.java
  17. 2 0
      src/main/java/com/goafanti/cognizance/service/OrgStandardService.java
  18. 2 0
      src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java
  19. 11 0
      src/main/java/com/goafanti/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java
  20. 5 1
      src/main/java/com/goafanti/cognizance/service/impl/OrgStandardServiceImpl.java
  21. 5 0
      src/main/java/com/goafanti/common/dao/OrgIntellectualPropertyMapper.java
  22. 2 1
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  23. 57 0
      src/main/java/com/goafanti/common/enums/IntellectualPropertyType.java
  24. 16 5
      src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml
  25. 14 3
      src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml
  26. 15 3
      src/main/java/com/goafanti/common/mapper/OrgHonorDatumMapper.xml
  27. 30 3
      src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml
  28. 34 4
      src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml
  29. 1 1
      src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml
  30. 17 0
      src/main/java/com/goafanti/common/model/OrgCognizance.java
  31. 16 1
      src/main/java/com/goafanti/common/model/OrgFinance.java
  32. 18 15
      src/main/java/com/goafanti/common/model/OrgHonorDatum.java
  33. 17 0
      src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java
  34. 117 91
      src/main/java/com/goafanti/common/model/OrgStandard.java
  35. 9 1
      src/main/java/com/goafanti/common/utils/FileUtils.java
  36. 4 3
      src/main/java/com/goafanti/copyright/controller/CopyrightApiController.java
  37. 1 1
      src/main/java/com/goafanti/copyright/service/CopyrightInfoService.java
  38. 15 3
      src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java
  39. 13 1
      src/main/java/com/goafanti/patent/bo/InputPatentInfo.java
  40. 12 4
      src/main/java/com/goafanti/patent/bo/PatentInfoDetailBo.java
  41. 52 40
      src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java
  42. 1 1
      src/main/java/com/goafanti/techproject/controller/TechProjectApiController.java
  43. 1 0
      src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

+ 18 - 0
schema/2017-04-12.sql

@@ -0,0 +1,18 @@
+alter table `org_standard` 
+add COLUMN `year` INT(4) NULL COMMENT '标准指定年份' after `create_time`,
+add COLUMN `enclosure_url` VARCHAR(255) NULL COMMENT '附件URL' after `year`;
+
+alter table `org_cognizance`
+add COLUMN `large_order` INT(1) NULL COMMENT '是否为大额订单 ' after `record_time`;
+
+alter table `org_finance`
+add COLUMN `research_cost` DECIMAL(8,2) NULL COMMENT '研发费用' after `finance_url`;
+
+alter table `org_honor_datum`
+add COLUMN `year` INT(4)  NULL COMMENT '荣誉及其他证明材料获取年份' after `enclosure_url`;
+
+alter table `org_intellectual_property`
+add COLUMN `type` INT(1)  NULL COMMENT '知识产权类型(0--非系统申请知识产权,1--专利,2--软著)' after `property_right_url`;
+
+
+

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

@@ -43,6 +43,7 @@ import com.goafanti.cognizance.bo.InputOrgTechAchievement;
 import com.goafanti.cognizance.bo.InputOrgTechCenter;
 import com.goafanti.cognizance.bo.InputOrgTechCenterDetail;
 import com.goafanti.cognizance.bo.InputOrgTechProduct;
+import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.cognizance.service.OrgActivityCostService;
 import com.goafanti.cognizance.service.OrgActivityService;
 import com.goafanti.cognizance.service.OrgAnnualReportService;
@@ -66,6 +67,7 @@ import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.enums.CognizanceApplyFields;
 import com.goafanti.common.enums.IdentityAuditStatus;
 import com.goafanti.common.enums.IdentityProcess;
+import com.goafanti.common.enums.IntellectualPropertyType;
 import com.goafanti.common.enums.OrgActivityFields;
 import com.goafanti.common.enums.OrgAnnualReportFields;
 import com.goafanti.common.enums.OrgCognizanceFields;
@@ -101,14 +103,18 @@ import com.goafanti.common.model.OrgTechCenter;
 import com.goafanti.common.model.OrgTechCenterDetail;
 import com.goafanti.common.model.OrgTechProduct;
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.common.model.PatentInfo;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserAbility;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.copyright.bo.CopyrightInfoDetail;
+import com.goafanti.copyright.service.CopyrightInfoService;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.patent.service.PatentInfoService;
 import com.goafanti.user.bo.InputOrganizationIdentity;
 import com.goafanti.user.bo.InputUser;
 import com.goafanti.user.bo.InputUserAbility;
@@ -166,6 +172,10 @@ public class AdminApiController extends CertifyApiController {
 	private AdminService					adminService;
 	@Resource
 	private OrgTechCenterDetailService		orgTechCenterDetailService;
+	@Resource
+	private PatentInfoService				patentInfoService;
+	@Resource
+	private CopyrightInfoService			copyrightInfoService;
 
 	/**
 	 * 
@@ -960,6 +970,11 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
+
+		if (null == orgStandard.getYear()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
+			return res;
+		}
 		if (!checkCertify(res, orgStandard.getUid()).getError().isEmpty()) {
 			return res;
 		}
@@ -982,6 +997,65 @@ public class AdminApiController extends CertifyApiController {
 	}
 
 	/**
+	 * 上传标准制定附件
+	 * 
+	 * @param req
+	 * @param sign
+	 * @param uid
+	 * @param year
+	 * @return
+	 */
+	@RequestMapping(value = "/uploadStandard", method = RequestMethod.POST)
+	public Result uploadStandard(HttpServletRequest req, String sign, String uid) {
+		Result res = new Result();
+
+		User curUser = userService.selectByPrimaryKey(uid);
+		if (!checkCertify(res, curUser)) {
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.STANDARD) {
+			res.setData(handleFiles(res, "/cognizance/", true, req, sign, uid));
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+
+		return res;
+	}
+
+	/**
+	 * 下载标准制定附件
+	 * 
+	 * @param response
+	 * @param sign
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/downloadStandard", method = RequestMethod.GET)
+	public Result downloadStandard(HttpServletResponse response, String sign, String id) {
+		Result res = new Result();
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准制定id"));
+			return res;
+		}
+
+		OrgStandard os = orgStandardService.selectByPrimaryKey(id);
+		if (os == null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准指定id"));
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.STANDARD) {
+			downloadFile(response, os.getStandardDownloadFileName(), os.getEnclosureUrl());
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
+
+	/**
 	 * 删除标准制定情况记录
 	 * 
 	 * @param id
@@ -1030,6 +1104,41 @@ public class AdminApiController extends CertifyApiController {
 	}
 
 	/**
+	 * 知识产权详情
+	 * 
+	 * @return
+	 */
+	public Result intellectualDetail(String id, Integer type) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "知识产权ID"));
+			return res;
+		}
+
+		if (null == type) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "知识产权TYPE"));
+			return res;
+		}
+		OrgIntellectualProperty oip = orgIntellectualPropertyService.selectByPrimaryKey(id);
+		if (null == oip) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID"));
+			return res;
+		}
+		if (IntellectualPropertyType.PATENT.getCode() == type) {
+			res.setData(orgIntellectualPropertyService.selectPatentTypeDetail(id));
+		} else if (IntellectualPropertyType.COPYRIGHT.getCode() == type) {
+			res.setData(orgIntellectualPropertyService.selectCopyrightTypeDetail(id));
+		} else if (IntellectualPropertyType.COMMON.getCode() == type) {
+			OrgIntellectualPropertyDetailBo oipdb = new OrgIntellectualPropertyDetailBo();
+			BeanUtils.copyProperties(oip, oipdb);
+			res.setData(oipdb);
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权TYPE"));
+		}
+		return res;
+	}
+
+	/**
 	 * 知识产权信息新增及修改
 	 * 
 	 * @return
@@ -1067,6 +1176,7 @@ public class AdminApiController extends CertifyApiController {
 			oip.setId(UUID.randomUUID().toString());
 			oip.setEvaluationCategory((oip.getCatagory() >= 2 && oip.getCatagory() <= 4) ? 1 : 0);
 			oip.setDeletedSign(0);
+			oip.setType(IntellectualPropertyType.COMMON.getCode());
 			res.setData(orgIntellectualPropertyService.insert(oip));
 		} else {
 			oip.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
@@ -1134,6 +1244,64 @@ public class AdminApiController extends CertifyApiController {
 	}
 
 	/**
+	 * 知识产权稿件下载
+	 * 
+	 * @param response
+	 * @param sign
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/downloadManuscriptUrl", method = RequestMethod.GET)
+	public Result downloadManuscriptUrl(HttpServletResponse response, String sign, String id, Integer type) {
+		Result res = new Result();
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "知识产权id"));
+			return res;
+		}
+
+		if (null == type) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "知识产权TYPE"));
+			return res;
+		}
+
+		OrgIntellectualProperty olp = orgIntellectualPropertyService.selectByPrimaryKey(id);
+		if (olp == null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID"));
+			return res;
+		}
+		String fileName = null;
+		String downloadUrl = null;
+		if (IntellectualPropertyType.PATENT.getCode() == type) {
+			PatentInfo pi = patentInfoService.selectByPrimaryKey(olp.getPid());
+			if (null == pi) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID及TYPE"));
+				return res;
+			}
+			fileName = pi.getPatentWritingDownloadFileName();
+			downloadUrl = pi.getPatentWritingUrl();
+		} else if (IntellectualPropertyType.COPYRIGHT.getCode() == type) {
+			CopyrightInfoDetail ci = copyrightInfoService.findByPrimaryKey(id);
+			if (null == ci){
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID及TYPE"));
+				return res;
+			}
+			fileName = ci.getApplicationUrlDownloadFileName();
+			downloadUrl = ci.getApplicationUrl();
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权TYPE"));
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.MANUSCRIPT) {
+			downloadFile(response, fileName, downloadUrl);
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
+
+	/**
 	 * 删除知识产权记录
 	 * 
 	 * @param id
@@ -2146,6 +2314,11 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
+		if (null == honor.getYear()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
+			return res;
+		}
+
 		if (!checkCertify(res, honor.getUid()).getError().isEmpty()) {
 			return res;
 		}
@@ -3073,6 +3246,14 @@ public class AdminApiController extends CertifyApiController {
 	}
 
 	/*
+	 * @Test public void test () throws IllegalArgumentException,
+	 * IllegalAccessException{ Admin a = new Admin(); import
+	 * java.lang.reflect.Field; boolean flag = Boolean.FALSE; for(Field f :
+	 * a.getClass().getDeclaredFields()){ f.setAccessible(true); if(f.get(a) ==
+	 * null){ flag = true; } } }
+	 */
+
+	/*
 	 * 高企相关材料上传
 	 * 
 	 * @RequestMapping(value = "/upload", method = RequestMethod.POST) public

+ 17 - 13
src/main/java/com/goafanti/admin/controller/AdminCopyrightApiController.java

@@ -67,13 +67,17 @@ public class AdminCopyrightApiController extends CertifyApiController {
 		CopyrightInfo ci = new CopyrightInfo();
 		BeanUtils.copyProperties(inputInfo, ci);
 		ci.setUid(curUser.getId());
-		if (StringUtils.isBlank(ci.getPrincipal())) {
-			ci.setStatus(CopyrightStatus.CREATE.getCode());
+		ci.setStatus(CopyrightStatus.CREATE.getCode());
+		if (TokenManager.getToken() instanceof Admin) {
 			ci.setPrincipal(TokenManager.getAdminId());
-		} else {
-			ci.setStatus(CopyrightStatus.DELIVERD.getCode());
 		}
-		copyrightInfoService.insert(ci);
+		/*
+		 * if (StringUtils.isBlank(ci.getPrincipal())) {
+		 * ci.setStatus(CopyrightStatus.CREATE.getCode());
+		 * ci.setPrincipal(TokenManager.getAdminId()); } else {
+		 * ci.setStatus(CopyrightStatus.DELIVERD.getCode()); }
+		 */
+		copyrightInfoService.insert(ci, curUser.getAid());
 		res.setData(ci);
 		return res;
 	}
@@ -96,13 +100,13 @@ public class AdminCopyrightApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "找不到软著", "软著申请"));
 			return res;
 		}
-		
-		if (CopyrightStatus.CALLBACK.getCode() == oci.getStatus()){
+
+		if (CopyrightStatus.CALLBACK.getCode() == oci.getStatus()) {
 			res.getError().add(buildError(ErrorConstants.RECORD_CALLBACK, "当前记录已退单,无法修改!"));
 			return res;
 		}
-		
-		if (CopyrightStatus.SETTLEMENT.getCode() == oci.getStatus()){
+
+		if (CopyrightStatus.SETTLEMENT.getCode() == oci.getStatus()) {
 			res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
 			return res;
 		}
@@ -143,13 +147,13 @@ public class AdminCopyrightApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "软著id"));
 			return res;
 		}
-		
-		if (CopyrightStatus.CALLBACK.getCode() == ci.getStatus()){
+
+		if (CopyrightStatus.CALLBACK.getCode() == ci.getStatus()) {
 			res.getError().add(buildError(ErrorConstants.RECORD_CALLBACK, "当前记录已退单,无法修改!"));
 			return res;
 		}
-		
-		if (CopyrightStatus.SETTLEMENT.getCode() == ci.getStatus()){
+
+		if (CopyrightStatus.SETTLEMENT.getCode() == ci.getStatus()) {
 			res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
 			return res;
 		}

+ 1 - 1
src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java

@@ -147,7 +147,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		}
 		PatentInfo pi = new PatentInfo();
 		BeanUtils.copyProperties(patentInfo, pi);
-		res.setData(patentInfoService.savePatentInfo(pi, TokenManager.getAdminId()));
+		res.setData(patentInfoService.savePatentInfo(pi, curUser.getAid()));
 		return res;
 	}
 

+ 1 - 1
src/main/java/com/goafanti/admin/controller/AdminTechProjectApiController.java

@@ -159,7 +159,7 @@ public class AdminTechProjectApiController extends CertifyApiController {
 		}
 		TechProject tp = new TechProject();
 		BeanUtils.copyProperties(techProject, tp);
-		techProjectService.saveTechProject(tp, TokenManager.getAdminId());
+		techProjectService.saveTechProject(tp, curUser.getAid());
 		return res;
 
 	}

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

@@ -29,6 +29,8 @@ public class CognizanceBo {
 	
 	private String certificateNumber;
 	
+	private Integer largeOrder;
+	
 	private Date issuingDate;
 	
 	private String consultant;
@@ -171,6 +173,16 @@ public class CognizanceBo {
 	public void setThirdContacts(String thirdContacts) {
 		this.thirdContacts = thirdContacts;
 	}
+	
+	
+
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
 
 	public String getCreateTimeFormattedDate(){
 			if (this.createTime == null) {

+ 29 - 0
src/main/java/com/goafanti/cognizance/bo/CognizanceDetailBo.java

@@ -142,6 +142,16 @@ public class CognizanceDetailBo {
 	 * 申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为
 	 */
 	private Integer accident;
+	
+	/**
+	 * 是否为大额订单
+	 */
+	private Integer largeOrder;
+	
+	/**
+	 * 年份
+	 */
+	private Integer year;
 
 	public String getUid() {
 		return uid;
@@ -372,6 +382,25 @@ public class CognizanceDetailBo {
 	public void setAccident(Integer accident) {
 		this.accident = accident;
 	}
+
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
+
+	public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+	
+	
+	
 	
 	
 }

+ 25 - 1
src/main/java/com/goafanti/cognizance/bo/CognizanceOrgInfoBo.java

@@ -25,9 +25,13 @@ public class CognizanceOrgInfoBo {
 	private Integer technicalField3;
 	
 	private BigDecimal basicResearchCost;
-
 	
+	private Integer largeOrder;
+
 	private Integer accient;
+	
+	private Integer year;
+	
 
 	public String getUid() {
 		return uid;
@@ -122,6 +126,26 @@ public class CognizanceOrgInfoBo {
 	public void setAccient(Integer accient) {
 		this.accient = accient;
 	}
+
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
+
+	public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+	
+	
+	
+	
 	
 	
 }

+ 14 - 0
src/main/java/com/goafanti/cognizance/bo/InputApplyCognizance.java

@@ -28,6 +28,10 @@ public class InputApplyCognizance {
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer state;
+	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer largeOrder;
 
 	public Integer getContacts() {
 		return contacts;
@@ -76,6 +80,16 @@ public class InputApplyCognizance {
 	public void setState(Integer state) {
 		this.state = state;
 	}
+
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
+	
+	
     
 	
 	

+ 12 - 0
src/main/java/com/goafanti/cognizance/bo/InputOrgCognizance.java

@@ -59,6 +59,10 @@ public class InputOrgCognizance {
 	
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	comment;
+	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer largeOrder;
 
 	public String getId() {
 		return id;
@@ -179,6 +183,14 @@ public class InputOrgCognizance {
 	public void setComment(String comment) {
 		this.comment = comment;
 	}
+
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
 	
 	
 	

+ 14 - 2
src/main/java/com/goafanti/cognizance/bo/InputOrgFinance.java

@@ -60,12 +60,16 @@ public class InputOrgFinance {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
     private BigDecimal salesRevenue;
     
-	@Max(value = 9999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 3000, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 2000, message = "{" + ErrorConstants.PARAM_ERROR + "}")
     private Integer year;
 
 	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
     private String financeUrl;
+	
+	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private BigDecimal researchCost;
 
 	public String getId() {
 		return id;
@@ -186,6 +190,14 @@ public class InputOrgFinance {
 	public void setFinanceUrl(String financeUrl) {
 		this.financeUrl = financeUrl;
 	}
+
+	public BigDecimal getResearchCost() {
+		return researchCost;
+	}
+
+	public void setResearchCost(BigDecimal researchCost) {
+		this.researchCost = researchCost;
+	}
 	
 	
 

+ 18 - 3
src/main/java/com/goafanti/cognizance/bo/InputOrgHonorDatum.java

@@ -2,13 +2,17 @@ package com.goafanti.cognizance.bo;
 
 import java.util.Date;
 
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
 import javax.validation.constraints.Size;
 
 import com.goafanti.common.constant.ErrorConstants;
 
 public class InputOrgHonorDatum {
+	
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	id;
+	
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	uid;
 
@@ -17,10 +21,11 @@ public class InputOrgHonorDatum {
 
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	issuingMechanism;
+	
+	@Max(value = 3000, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 2000, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer year;
 
-	/**
-	 * 发证时间
-	 */
 	private Date	issuingTime;
 
 	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
@@ -73,6 +78,16 @@ public class InputOrgHonorDatum {
 	public void setEnclosureUrl(String enclosureUrl) {
 		this.enclosureUrl = enclosureUrl;
 	}
+
+	public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+	
+	
 	
 	
 

+ 27 - 0
src/main/java/com/goafanti/cognizance/bo/InputOrgStandard.java

@@ -28,6 +28,13 @@ public class InputOrgStandard {
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	participateWay;
+	
+	@Max(value = 2200, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 2000, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer year;
+	
+	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String enclosureUrl;
 
 	public String getId() {
 		return id;
@@ -76,6 +83,26 @@ public class InputOrgStandard {
 	public void setParticipateWay(Integer participateWay) {
 		this.participateWay = participateWay;
 	}
+
+	public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+
+	public String getEnclosureUrl() {
+		return enclosureUrl;
+	}
+
+	public void setEnclosureUrl(String enclosureUrl) {
+		this.enclosureUrl = enclosureUrl;
+	}
+	
+	
+	
+	
 	
 	
 

+ 20 - 0
src/main/java/com/goafanti/cognizance/bo/OrgIntellectualPropertyDetailBo.java

@@ -0,0 +1,20 @@
+package com.goafanti.cognizance.bo;
+
+import com.goafanti.common.model.OrgIntellectualProperty;
+
+public class OrgIntellectualPropertyDetailBo extends OrgIntellectualProperty{
+	/**
+	 * 知识产权稿件
+	 */
+	private String manuscript;
+
+	public String getManuscript() {
+		return manuscript;
+	}
+
+	public void setManuscript(String manuscript) {
+		this.manuscript = manuscript;
+	}
+	
+	
+}

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

@@ -133,6 +133,40 @@ public class CognizanceApiController extends CertifyApiController {
 	@Resource
 	private OrgHumanResourceService			orgHumanResourceService;
 	
+	/**
+	 * 知识产权稿件下载
+	 * @param response
+	 * @param sign
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/downloadManuscriptUrl", method = RequestMethod.GET)
+	public Result downloadManuscriptUrl(HttpServletResponse response, String sign, String id) {
+		Result res = new Result();
+		User curUser = TokenManager.getUserToken();
+		if (!checkCertify(res, curUser)) {
+			return res;
+		}
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权id"));
+			return res;
+		}
+
+		OrgIntellectualProperty olp = orgIntellectualPropertyService.selectByPrimaryKey(id);
+		if (olp == null || !curUser.getId().equals(olp.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权id"));
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.MANUSCRIPT) {
+			//downloadFile(response, olp.getManuscriptDownloadFileName(), olp.getManuscriptUrl());
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
+	
 	
 	/**
 	 * 删除知识产权记录
@@ -1279,6 +1313,11 @@ public class CognizanceApiController extends CertifyApiController {
 					OrgStandardFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
+		
+		if (null == orgStandard.getYear()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
+			return res;
+		}
 
 		if (!checkUserLogin(res)) {
 			return res;
@@ -1306,6 +1345,68 @@ public class CognizanceApiController extends CertifyApiController {
 		res.setData(orgStandard);
 		return res;
 	}
+	
+	/**
+	 * 上传标准制定附件
+	 * @param req
+	 * @param sign
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/uploadStandard", method = RequestMethod.POST)
+	public Result uploadStandard(HttpServletRequest req, String sign) {
+		Result res = new Result();
+		
+		User curUser = TokenManager.getUserToken();
+		if (!checkCertify(res, curUser)) {
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.STANDARD) {
+			res.setData(handleFiles(res, "/cognizance/", true, req, sign, TokenManager.getUserId()));
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+
+		return res;
+	}
+	
+	/**
+	 * 下载标准制定
+	 * @param response
+	 * @param sign
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/downloadStandard", method = RequestMethod.GET)
+	public Result downloadStandard(HttpServletResponse response, String sign, String id) {
+		Result res = new Result();
+		User curUser = TokenManager.getUserToken();
+		if (!checkCertify(res, curUser)) {
+			return res;
+		}
+		
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准制定id"));
+			return res;
+		}
+
+		OrgStandard os = orgStandardService.selectByPrimaryKey(id);
+		if (os == null || !curUser.getId().equals(os.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准指定id"));
+			return res;
+		}
+		
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.STANDARD) {
+			downloadFile(response, os.getStandardDownloadFileName(), os.getEnclosureUrl());
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
 
 	/**
 	 * 用户端录入+修改知识产权信息(专利+软著)
@@ -1743,6 +1844,8 @@ public class CognizanceApiController extends CertifyApiController {
 					OrgHonorDatumFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
+		
+		
 
 		if (!checkUserLogin(res)) {
 			return res;
@@ -1759,6 +1862,11 @@ public class CognizanceApiController extends CertifyApiController {
 			} catch (ParseException e) {
 			}
 		}
+		
+		if (null == honor.getYear()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
+			return res;
+		}
 
 		OrgHonorDatum ohd = new OrgHonorDatum();
 		BeanUtils.copyProperties(honor, ohd);
@@ -2014,11 +2122,10 @@ public class CognizanceApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度高企认定已申请!"));
 			return res;
 		}
-		String aid = TokenManager.getToken().getAid();
 		OrgCognizance oc = new OrgCognizance();
 		BeanUtils.copyProperties(cog, oc);
 		oc.setUid(TokenManager.getUserId());
-		orgCognizanceService.insertCognizance(oc, aid);
+		orgCognizanceService.insertCognizance(oc, curUser.getAid());
 		return res;
 	}
 

+ 5 - 0
src/main/java/com/goafanti/cognizance/service/OrgIntellectualPropertyService.java

@@ -2,6 +2,7 @@ package com.goafanti.cognizance.service;
 
 import java.util.List;
 
+import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -21,4 +22,8 @@ public interface OrgIntellectualPropertyService {
 
 	OrgIntellectualProperty selectByPrimaryKey(String id);
 
+	OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id);
+
+	OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id);
+
 }

+ 2 - 0
src/main/java/com/goafanti/cognizance/service/OrgStandardService.java

@@ -18,4 +18,6 @@ public interface OrgStandardService {
 
 	int deleteByPrimaryKey(List<String> id);
 
+	OrgStandard selectByPrimaryKey(String id);
+
 }

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

@@ -105,6 +105,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 			cog.setBasicResearchCost(
 					null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
 			cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
+			cog.setLargeOrder(null == orgInfo.getLargeOrder() ? 0 : orgInfo.getLargeOrder());
 		}
 
 		CognizanceResearchCostBo researchCost = orgCognizanceMapper.selectCognizanceResearchCostBoByUidAndYear(year,
@@ -245,6 +246,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		if (TokenManager.getToken() instanceof Admin) {
 			log.setOperator(TokenManager.getAdminId());
 		}
+		log.setComment(c.getComment());
 		orgCognizanceLogMapper.insert(log);
 
 	}

+ 11 - 0
src/main/java/com/goafanti/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java

@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.cognizance.service.OrgIntellectualPropertyService;
 import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
 import com.goafanti.common.model.OrgIntellectualProperty;
@@ -71,4 +72,14 @@ public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntell
 		return orgIntellectualPropertyMapper.selectByPrimaryKey(id);
 	}
 
+	@Override
+	public OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id) {
+		return orgIntellectualPropertyMapper.selectPatentTypeDetail(id);
+	}
+
+	@Override
+	public OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id) {
+		return orgIntellectualPropertyMapper.selectCopyrightTypeDetail(id);
+	}
+
 }

+ 5 - 1
src/main/java/com/goafanti/cognizance/service/impl/OrgStandardServiceImpl.java

@@ -74,7 +74,11 @@ public class OrgStandardServiceImpl extends BaseMybatisDao<OrgStandardMapper> im
 
 	@Override
 	public int deleteByPrimaryKey(List<String> id) {
-		// TODO Auto-generated method stub
 		return orgStandardMapper.batchDeleteByPrimaryKey(id);
 	}
+
+	@Override
+	public OrgStandard selectByPrimaryKey(String id) {
+		return orgStandardMapper.selectByPrimaryKey(id);
+	}
 }

+ 5 - 0
src/main/java/com/goafanti/common/dao/OrgIntellectualPropertyMapper.java

@@ -2,6 +2,7 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.common.model.OrgIntellectualProperty;
 
 public interface OrgIntellectualPropertyMapper {
@@ -20,4 +21,8 @@ public interface OrgIntellectualPropertyMapper {
 	int batchDeleteByPrimaryKey(List<String> id);
 
 	OrgIntellectualProperty selectOrgIntellectualPropertyByPid(String pid);
+
+	OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id);
+
+	OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id);
 }

+ 2 - 1
src/main/java/com/goafanti/common/enums/AttachmentType.java

@@ -11,7 +11,8 @@ public enum AttachmentType {
 	ACTIVITY_COST_ACCOUNT("activity_cost_account", "研发活动费用台帐"), TECH_PRODUCT("tech_product", "高新技术产品台帐"),
 	PROPERTY_RIGHT("property_right", "知识产权证书"), ACHIEVEMENT("achievement", "科技成果附件"), RATEPAY("ratepay", "企业纳税申报表"),
 	FINANCE("finance", "企业财务报表"), ROSTER("roster", "企业花名册"), SOCIAL_SECURITY("social_security", "企业社保情况表"), 
-	HONOR("honor", "荣誉及其他证明材料"), LAST_YEAR_RATEPAY("last_year_ratepay", "上年度纳税申报表"), TECH_PROJECT("tech_project", "科技项目申报材料");
+	HONOR("honor", "荣誉及其他证明材料"), LAST_YEAR_RATEPAY("last_year_ratepay", "上年度纳税申报表"), TECH_PROJECT("tech_project", "科技项目申报材料"),
+	STANDARD("standard", "标准制定附件"), MANUSCRIPT("manuscript", "知识产权稿件");
 
 	private AttachmentType(String code, String desc) {
 		this.code = code;

+ 57 - 0
src/main/java/com/goafanti/common/enums/IntellectualPropertyType.java

@@ -0,0 +1,57 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum IntellectualPropertyType {
+	
+	COMMON(0, "非系统申请知识产权"),
+	PATENT(1, "专利类型知识产权"),
+	COPYRIGHT(2, "软著类型知识产权"),
+	OTHER(3, "其他");
+
+	private IntellectualPropertyType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, IntellectualPropertyType> status = new HashMap<Integer, IntellectualPropertyType>();
+
+	static {
+		for (IntellectualPropertyType value : IntellectualPropertyType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static IntellectualPropertyType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static IntellectualPropertyType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

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

@@ -21,12 +21,13 @@
     <result column="state" property="state" jdbcType="INTEGER" />
     <result column="year" property="year" jdbcType="INTEGER" />
     <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
+    <result column="large_order" property="largeOrder" jdbcType="INTEGER" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, serial_number, contacts, comment, consultant, technical_field1, technical_field2, 
     technical_field3, basic_research_cost, accident, create_time, accept_date, issuing_date, 
-    certificate_number, certificate_url, state, year, record_time, deleted_sign
+    certificate_number, certificate_url, state, year, record_time, large_order, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -44,7 +45,7 @@
       technical_field1, technical_field2, technical_field3, 
       basic_research_cost, accident, create_time, 
       accept_date, issuing_date, certificate_number, 
-      certificate_url, state, year, record_time, deleted_sign
+      certificate_url, state, year, record_time, large_order, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{contacts,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
@@ -52,7 +53,7 @@
       #{basicResearchCost,jdbcType=DECIMAL}, #{accident,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
       #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{recordTime,jdbcType=TIMESTAMP},
-      #{deletedSign,jdbcType=INTEGER}
+      #{largeOrder,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -115,6 +116,9 @@
       <if test="recordTime != null" >
         record_time,
       </if>
+       <if test="largeOrder != null" >
+        large_order,
+      </if>
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -177,6 +181,9 @@
       <if test="recordTime != null" >
         #{recordTime,jdbcType=TIMESTAMP},
       </if>
+       <if test="largeOrder != null" >
+        #{largeOrder,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -239,6 +246,9 @@
        <if test="recordTime != null" >
         record_time = #{recordTime,jdbcType=TIMESTAMP},
       </if>
+       <if test="largeOrder != null" >
+        large_order = #{largeOrder,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -265,6 +275,7 @@
       state = #{state,jdbcType=INTEGER},
       year = #{year,jdbcType=INTEGER},
       record_time = #{recordTime,jdbcType=TIMESTAMP},
+      large_order = #{largeOrder,jdbcType=INTEGER},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -272,7 +283,7 @@
   <select id="findCognizanceBoByPage" parameterType="String"  resultType="com.goafanti.cognizance.bo.CognizanceBo">
   	select  c.id as cid, c.uid as uid, c.serial_number as serialNumber, i.location_province as locationProvince,
 	i.unit_name as unitName, c.contacts, c.create_time as createTime, 
-	c.comment, c.state, c.certificate_number as certificateNumber, 
+	c.comment, c.state, c.certificate_number as certificateNumber, c.large_order as largeOrder,
 	c.issuing_date as issuingDate, c.year, a.name as consultant,
     CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
     CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
@@ -335,7 +346,7 @@
   <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, 
 			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, c.large_order as largeOrder, c.year
     	from  (select id from user where id = #{0}) u
 			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}

+ 14 - 3
src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml

@@ -17,12 +17,13 @@
     <result column="sales_revenue" property="salesRevenue" jdbcType="DECIMAL" />
     <result column="year" property="year" jdbcType="INTEGER" />
     <result column="finance_url" property="financeUrl" jdbcType="VARCHAR" />
+    <result column="research_cost" property="researchCost" jdbcType="DECIMAL" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, main_business_income, management_cost, operating_profit, various_tax, current_asset, 
     net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue, year,
-    finance_url, deleted_sign
+    finance_url, research_cost, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -39,13 +40,13 @@
       management_cost, operating_profit, various_tax, 
       current_asset, net_fixed_asset, total_asset, 
       net_asset, gross_profit, net_profit, 
-      sales_revenue, year, finance_url, deleted_sign)
+      sales_revenue, year, finance_url, research_cost, deleted_sign)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{mainBusinessIncome,jdbcType=DECIMAL}, 
       #{managementCost,jdbcType=DECIMAL}, #{operatingProfit,jdbcType=DECIMAL}, #{variousTax,jdbcType=DECIMAL}, 
       #{currentAsset,jdbcType=DECIMAL}, #{netFixedAsset,jdbcType=DECIMAL}, #{totalAsset,jdbcType=DECIMAL}, 
       #{netAsset,jdbcType=DECIMAL}, #{grossProfit,jdbcType=DECIMAL}, #{netProfit,jdbcType=DECIMAL}, 
       #{salesRevenue,jdbcType=DECIMAL}, #{year,jdbcType=INTEGER}, #{financeUrl,jdbcType=VARCHAR}, 
-      #{deletedSign,jdbcType=INTEGER})
+      #{researchCost,jdbcType=DECIMAL}, #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
     insert into org_finance
@@ -95,6 +96,9 @@
       <if test="financeUrl != null" >
         finance_url,
       </if>
+       <if test="researchCost != null" >
+        research_cost,
+      </if>
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -145,6 +149,9 @@
       <if test="financeUrl != null" >
         #{financeUrl,jdbcType=VARCHAR},
       </if>
+      <if test="researchCost != null" >
+        #{researchCost,jdbcType=DECIMAL},
+      </if>
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -195,6 +202,9 @@
       <if test="financeUrl != null" >
         finance_url = #{financeUrl,jdbcType=VARCHAR},
       </if>
+       <if test="researchCost != null" >
+        research_cost = #{researchCost,jdbcType=DECIMAL},
+      </if>
        <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -217,6 +227,7 @@
       sales_revenue = #{salesRevenue,jdbcType=DECIMAL},
       year = #{year,jdbcType=INTEGER},
       finance_url = #{financeUrl,jdbcType=VARCHAR},
+      research_cost = #{researchCost,jdbcType=DECIMAL},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 15 - 3
src/main/java/com/goafanti/common/mapper/OrgHonorDatumMapper.xml

@@ -8,10 +8,11 @@
     <result column="issuing_mechanism" property="issuingMechanism" jdbcType="VARCHAR" />
     <result column="issuing_time" property="issuingTime" jdbcType="TIMESTAMP" />
     <result column="enclosure_url" property="enclosureUrl" jdbcType="VARCHAR" />
+    <result column="year" property="year" jdbcType="INTEGER" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, name, issuing_mechanism, issuing_time, enclosure_url, deleted_sign
+    id, uid, name, issuing_mechanism, issuing_time, enclosure_url, year, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -25,10 +26,11 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrgHonorDatum" >
     insert into org_honor_datum (id, uid, name, issuing_mechanism,
-      issuing_time, enclosure_url, deleted_sign
+      issuing_time, enclosure_url, year, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{issuingMechanism, jdbcType=VARCHAR},
-      #{issuingTime,jdbcType=TIMESTAMP}, #{enclosureUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}
+      #{issuingTime,jdbcType=TIMESTAMP}, #{enclosureUrl,jdbcType=VARCHAR},  #{year,jdbcType=INTEGER},
+      #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgHonorDatum" >
@@ -52,6 +54,9 @@
       <if test="enclosureUrl != null" >
         enclosure_url,
       </if>
+      <if test="year != null" >
+        year,
+      </if>
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -75,6 +80,9 @@
       <if test="enclosureUrl != null" >
         #{enclosureUrl,jdbcType=VARCHAR},
       </if>
+      <if test="year != null" >
+        #{year,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -98,6 +106,9 @@
       <if test="enclosureUrl != null" >
         enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
       </if>
+      <if test="year != null" >
+        year = #{year,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -111,6 +122,7 @@
       issuingMechanism = #{issuingMechanism,jdbcType=VARCHAR},
       issuing_time = #{issuingTime,jdbcType=TIMESTAMP},
       enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
+      year = #{year,jdbcType=INTEGER},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 30 - 3
src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml

@@ -14,11 +14,13 @@
     <result column="authorization_date" property="authorizationDate" jdbcType="TIMESTAMP" />
     <result column="evaluation_category" property="evaluationCategory" jdbcType="INTEGER" />
     <result column="property_right_url" property="propertyRightUrl" jdbcType="VARCHAR" />
+    <result column="type" property="type" jdbcType="INTEGER" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, pid, intellectual_property_number, intellectual_property_name, sort_number, catagory, 
-    obtain_way, authorization_number, authorization_date, evaluation_category, property_right_url, deleted_sign
+    obtain_way, authorization_number, authorization_date, evaluation_category, property_right_url, 
+    type, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -34,11 +36,12 @@
     insert into org_intellectual_property (id, uid, pid, intellectual_property_number, 
       intellectual_property_name, sort_number, catagory, 
       obtain_way, authorization_number, authorization_date, 
-      evaluation_category, property_right_url, deleted_sign)
+      evaluation_category, property_right_url, type, deleted_sign)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{intellectualPropertyNumber,jdbcType=VARCHAR}, 
       #{intellectualPropertyName,jdbcType=VARCHAR}, #{sortNumber,jdbcType=VARCHAR}, #{catagory,jdbcType=INTEGER}, 
       #{obtainWay,jdbcType=INTEGER}, #{authorizationNumber,jdbcType=VARCHAR}, #{authorizationDate,jdbcType=TIMESTAMP}, 
-      #{evaluationCategory,jdbcType=INTEGER}, #{propertyRightUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER})
+      #{evaluationCategory,jdbcType=INTEGER}, #{propertyRightUrl,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
     insert into org_intellectual_property
@@ -79,6 +82,9 @@
       <if test="propertyRightUrl != null" >
         property_right_url,
       </if>
+       <if test="type != null" >
+        type,
+      </if>
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -120,6 +126,9 @@
       <if test="propertyRightUrl != null" >
         #{propertyRightUrl,jdbcType=VARCHAR},
       </if>
+        <if test="type != null" >
+        #{type,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -161,6 +170,9 @@
       <if test="propertyRightUrl != null" >
         property_right_url = #{propertyRightUrl,jdbcType=VARCHAR},
       </if>
+      <if test="type != null" >
+        type = #{type,jdbcType=INTEGER},
+      </if>
       <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -180,6 +192,7 @@
       authorization_date = #{authorizationDate,jdbcType=TIMESTAMP},
       evaluation_category = #{evaluationCategory,jdbcType=INTEGER},
       property_right_url = #{propertyRightUrl,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -223,4 +236,18 @@
     from org_intellectual_property
     where pid = #{pid,jdbcType=VARCHAR}
   </select>
+  
+  <select id="selectPatentTypeDetail" parameterType="java.lang.String" resultType="com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo">
+  	select 
+    <include refid="Base_Column_List" />, p.patent_writing_url as manuscript
+    from org_intellectual_property o LEFT JOIN patent_info p on o.pid = p.id
+    where o.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="selectPatentTypeDetail" parameterType="java.lang.String" resultType="com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo">
+  	select 
+    <include refid="Base_Column_List" />, c.application_url as manuscript
+    from org_intellectual_property o LEFT JOIN copyright_info c on o.pid = c.id
+    where o.id = #{id,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 34 - 4
src/main/java/com/goafanti/common/mapper/OrgStandardMapper.xml

@@ -9,10 +9,13 @@
     <result column="standard_level" property="standardLevel" jdbcType="INTEGER" />
     <result column="participate_way" property="participateWay" jdbcType="INTEGER" />
     <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="year" property="year" jdbcType="INTEGER" />
+    <result column="enclosure_url" property="enclosureUrl" jdbcType="VARCHAR" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, standard_name, standard_number, standard_level, participate_way, create_time, deleted_sign
+    id, uid, standard_name, standard_number, standard_level, participate_way, create_time, year,
+    enclosure_url, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -26,11 +29,13 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrgStandard" >
     insert into org_standard (id, uid, standard_name, 
-      standard_number, standard_level, participate_way, create_time, deleted_sign
+      standard_number, standard_level, participate_way, create_time, year,
+      enclosure_url, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{standardName,jdbcType=VARCHAR}, 
       #{standardNumber,jdbcType=VARCHAR}, #{standardLevel,jdbcType=INTEGER}, #{participateWay,jdbcType=INTEGER},
-      #{createTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}
+      #{createTime,jdbcType=TIMESTAMP}, #{year,jdbcType=INTEGER}, #{enclosureUrl,jdbcType=VARCHAR},
+      #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgStandard" >
@@ -57,6 +62,14 @@
       <if test="createTime != null" >
         create_time,
       </if>
+      
+       <if test="year != null" >
+        year,
+      </if>
+      <if test="enclosureUrl != null" >
+        enclosure_url,
+      </if>
+      
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -83,6 +96,14 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      
+      <if test="year != null" >
+        #{year,jdbcType=INTEGER},
+      </if>
+      <if test="enclosureUrl != null" >
+        #{enclosureUrl,jdbcType=VARCHAR},
+      </if>
+      
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -109,6 +130,14 @@
       <if test="createTime != null" >
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      
+       <if test="year != null" >
+        year = #{year,jdbcType=INTEGER},
+      </if>
+      <if test="enclosureUrl != null" >
+        enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
+      </if>
+      
       <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -123,6 +152,8 @@
       standard_level = #{standardLevel,jdbcType=INTEGER},
       participate_way = #{participateWay,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
+      year = #{year,jdbcType=INTEGER},
+      enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -173,7 +204,6 @@
     <if test="participateWay != null">
     	and   participate_way= #{participateWay,jdbcType=INTEGER}
     </if>
-    order by create_time desc
     </select>
   
    <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">

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

@@ -908,7 +908,7 @@
 		o.location_city as locationCity, o.location_area as locationArea,
 		p.contacts,
 		p.serial_number as serialNumber , p.patent_number as patentNumber ,
-		p.patent_name as patentName,
+		p.patent_name as patentName, p.office,
 		p.patent_catagory as patentCatagory,p.patent_state as patentState,
 		p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as
 		firstInventorName,

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

@@ -4,6 +4,8 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.goafanti.common.constant.AFTConstants;
 
@@ -96,6 +98,11 @@ public class OrgCognizance {
      * 高企申请时间
      */
     private Date recordTime;
+    
+    /**
+     * 是否为大额订单
+     */
+    private Integer largeOrder;
 
     /**
     * 删除标记
@@ -257,6 +264,16 @@ public class OrgCognizance {
 	public void setRecordTime(Date recordTime) {
 		this.recordTime = recordTime;
 	}
+	
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getLargeOrder() {
+		return largeOrder;
+	}
+
+	public void setLargeOrder(Integer largeOrder) {
+		this.largeOrder = largeOrder;
+	}
 
 	@JsonIgnore
     public Integer getDeletedSign() {

+ 16 - 1
src/main/java/com/goafanti/common/model/OrgFinance.java

@@ -78,6 +78,11 @@ public class OrgFinance {
     private String financeUrl;
     
     /**
+     * 研发费用
+     */
+    private BigDecimal researchCost;
+    
+    /**
      * 删除标记
      */
     private Integer deletedSign;
@@ -195,7 +200,17 @@ public class OrgFinance {
         this.financeUrl = financeUrl;
     }
     
-    @JsonIgnore
+    
+    
+    public BigDecimal getResearchCost() {
+		return researchCost;
+	}
+
+	public void setResearchCost(BigDecimal researchCost) {
+		this.researchCost = researchCost;
+	}
+
+	@JsonIgnore
 	public Integer getDeletedSign() {
 		return deletedSign;
 	}

+ 18 - 15
src/main/java/com/goafanti/common/model/OrgHonorDatum.java

@@ -3,10 +3,8 @@ package com.goafanti.common.model;
 import java.util.Date;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateFormatUtils;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.FileUtils;
 
 public class OrgHonorDatum {
@@ -33,6 +31,11 @@ public class OrgHonorDatum {
     * 附件材料URL
     */
     private String enclosureUrl;
+    
+    /**
+     * 荣誉及其他证明材料获取年份
+     */
+    private Integer year;
 
     /**
     * 删除标记
@@ -70,7 +73,8 @@ public class OrgHonorDatum {
 	public void setIssuingMechanism(String issuingMechanism) {
 		this.issuingMechanism = issuingMechanism;
 	}
-
+	
+	@JsonIgnore
 	public Date getIssuingTime() {
         return issuingTime;
     }
@@ -87,7 +91,17 @@ public class OrgHonorDatum {
         this.enclosureUrl = enclosureUrl;
     }
     
-    @JsonIgnore
+    
+    
+    public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+
+	@JsonIgnore
     public Integer getDeletedSign() {
         return deletedSign;
     }
@@ -96,17 +110,6 @@ public class OrgHonorDatum {
         this.deletedSign = deletedSign;
     }
     
-    public String getIssuingTimeFormattedDate(){
-		if (this.issuingTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.getIssuingTime(), AFTConstants.YYYYMMDD);
-		}
-	}
-	
-	public void setIssuingTimeFormattedDate(String issuingTimeFormattedDate){
-		
-	}
 	
 	//附件
 	public String getEnclosureDownloadFileName(){

+ 17 - 0
src/main/java/com/goafanti/common/model/OrgIntellectualProperty.java

@@ -64,6 +64,11 @@ public class OrgIntellectualProperty {
     private String propertyRightUrl;
     
     /**
+     * 专利或软著稿件URL
+     */
+    private Integer type;
+    
+    /**
      * 删除标记
      */
     private Integer deletedSign;
@@ -160,6 +165,17 @@ public class OrgIntellectualProperty {
 	public void setPropertyRightUrl(String propertyRightUrl) {
 		this.propertyRightUrl = propertyRightUrl;
 	}
+	
+	
+
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
 
 	@JsonIgnore
     public Integer getEvaluationCategory() {
@@ -203,4 +219,5 @@ public class OrgIntellectualProperty {
 	public void setPropertyRightDownloadFileName(String propertyRightDownloadFileName){
 		
 	}
+	
 }

+ 117 - 91
src/main/java/com/goafanti/common/model/OrgStandard.java

@@ -2,94 +2,105 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
-import org.apache.commons.lang3.time.DateFormatUtils;
+import org.apache.commons.lang3.StringUtils;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.utils.FileUtils;
 
 public class OrgStandard {
-    private String id;
-
-    private String uid;
-
-    /**
-    * 标准名称
-    */
-    private String standardName;
-
-    /**
-    * 标准编号
-    */
-    private String standardNumber;
-
-    /**
-    * 标准级别
-    */
-    private Integer standardLevel;
-
-    /**
-    * 参与方式
-    */
-    private Integer participateWay;
-    
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    
-    /**
-     * 删除标记
-     */
-    private Integer deletedSign;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getUid() {
-        return uid;
-    }
-
-    public void setUid(String uid) {
-        this.uid = uid;
-    }
-
-    public String getStandardName() {
-        return standardName;
-    }
-
-    public void setStandardName(String standardName) {
-        this.standardName = standardName;
-    }
-
-    public String getStandardNumber() {
-        return standardNumber;
-    }
-
-    public void setStandardNumber(String standardNumber) {
-        this.standardNumber = standardNumber;
-    }
-
-    public Integer getStandardLevel() {
-        return standardLevel;
-    }
-
-    public void setStandardLevel(Integer standardLevel) {
-        this.standardLevel = standardLevel;
-    }
-
-    public Integer getParticipateWay() {
-        return participateWay;
-    }
-
-    public void setParticipateWay(Integer participateWay) {
-        this.participateWay = participateWay;
-    }
+	private String	id;
+
+	private String	uid;
+
+	/**
+	 * 标准名称
+	 */
+	private String	standardName;
+
+	/**
+	 * 标准编号
+	 */
+	private String	standardNumber;
+
+	/**
+	 * 标准级别
+	 */
+	private Integer	standardLevel;
+
+	/**
+	 * 参与方式
+	 */
+	private Integer	participateWay;
+
+	/**
+	 * 创建时间
+	 */
+	private Date	createTime;
+
+	/**
+	 * 年份
+	 */
+	private Integer	year;
+
+	/**
+	 * 附件URL
+	 */
+	private String	enclosureUrl;
+
+	/**
+	 * 删除标记
+	 */
+	private Integer	deletedSign;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public String getStandardName() {
+		return standardName;
+	}
 
+	public void setStandardName(String standardName) {
+		this.standardName = standardName;
+	}
+
+	public String getStandardNumber() {
+		return standardNumber;
+	}
+
+	public void setStandardNumber(String standardNumber) {
+		this.standardNumber = standardNumber;
+	}
+
+	public Integer getStandardLevel() {
+		return standardLevel;
+	}
+
+	public void setStandardLevel(Integer standardLevel) {
+		this.standardLevel = standardLevel;
+	}
+
+	public Integer getParticipateWay() {
+		return participateWay;
+	}
+
+	public void setParticipateWay(Integer participateWay) {
+		this.participateWay = participateWay;
+	}
+
+	@JsonIgnore
 	public Date getCreateTime() {
 		return createTime;
 	}
@@ -97,7 +108,23 @@ public class OrgStandard {
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
-	
+
+	public Integer getYear() {
+		return year;
+	}
+
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+
+	public String getEnclosureUrl() {
+		return enclosureUrl;
+	}
+
+	public void setEnclosureUrl(String enclosureUrl) {
+		this.enclosureUrl = enclosureUrl;
+	}
+
 	@JsonIgnore
 	public Integer getDeletedSign() {
 		return deletedSign;
@@ -107,16 +134,15 @@ public class OrgStandard {
 		this.deletedSign = deletedSign;
 	}
 
-	//创建时间
-	public String getCreateTimeFormattedDate(){
-		if (this.createTime == null) {
+	public String getStandardDownloadFileName() {
+		if (StringUtils.isBlank(this.enclosureUrl)) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+			return FileUtils.getDownloadFileName(this.enclosureUrl);
 		}
 	}
-		
-	public void setCreateTimeFormattedDate(String createTimeFormattedDate){
-			
+
+	public void setStandardDownloadFileName(String standardDownloadFileName) {
+
 	}
 }

+ 9 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -99,7 +99,7 @@ public class FileUtils {
 				|| sign.indexOf("tech_product") != -1 || sign.indexOf("property_ritht") != -1
 				|| sign.indexOf("tech_project") != -1 || sign.indexOf("patent_prory_statement") != -1
 				|| sign.indexOf("patent_writing") != -1 || sign.indexOf("authorization_notice") != -1
-				|| sign.indexOf("patent_certificate") != -1) {
+				|| sign.indexOf("patent_certificate") != -1 || sign.indexOf("standard") != -1) {
 			uniq = true;
 		}
 		String fileName = "";
@@ -194,6 +194,14 @@ public class FileUtils {
 		if (path.indexOf("tech_project") != -1) {
 			prefix = "科技项目资料";
 		}
+		
+		if (path.indexOf("standard") != -1) {
+			prefix = "标准制定";
+		}
+		
+		if (path.indexOf("manuscript") != -1) {
+			prefix = "稿件";
+		}
 
 		return prefix + suffix;
 	}

+ 4 - 3
src/main/java/com/goafanti/copyright/controller/CopyrightApiController.java

@@ -55,13 +55,14 @@ public class CopyrightApiController extends CertifyApiController {
 		CopyrightInfo ci = new CopyrightInfo();
 		BeanUtils.copyProperties(inputInfo, ci);
 		ci.setUid(curUser.getId());
-		if (StringUtils.isBlank(ci.getPrincipal())) {
+		ci.setPrincipal(curUser.getAid());
+		/*if (StringUtils.isBlank(ci.getPrincipal())) {
 			ci.setStatus(CopyrightStatus.CREATE.getCode());
 			ci.setPrincipal(curUser.getAid());
 		} else {
 			ci.setStatus(CopyrightStatus.DELIVERD.getCode());
-		}
-		copyrightInfoService.insert(ci);
+		}*/
+		copyrightInfoService.insert(ci, curUser.getAid());
 		res.setData(ci);
 		return res;
 	}

+ 1 - 1
src/main/java/com/goafanti/copyright/service/CopyrightInfoService.java

@@ -11,7 +11,7 @@ import com.goafanti.core.mybatis.page.Pagination;
 
 public interface CopyrightInfoService {
 
-	CopyrightInfo insert(CopyrightInfo copyrightInfo);
+	CopyrightInfo insert(CopyrightInfo copyrightInfo, String aid);
 
 	void updateByPrimaryKeySelective(CopyrightInfo copyrightInfo, CopyrightLog copyrightLog);
 	

+ 15 - 3
src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java

@@ -18,7 +18,9 @@ import com.goafanti.common.dao.CopyrightLogMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
 import com.goafanti.common.enums.CopyrightStatus;
+import com.goafanti.common.enums.IntellectualPropertyType;
 import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.CopyrightInfo;
 import com.goafanti.common.model.CopyrightLog;
 import com.goafanti.common.model.Notice;
@@ -42,7 +44,7 @@ public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper
 	private NoticeMapper					noticeMapper;
 
 	@Override
-	public CopyrightInfo insert(CopyrightInfo copyrightInfo) {
+	public CopyrightInfo insert(CopyrightInfo copyrightInfo, String aid) {
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 		copyrightInfo.setCreateTime(now.getTime());
@@ -50,8 +52,14 @@ public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper
 		log.setCid(copyrightInfo.getId());
 		log.setRecordTime(copyrightInfo.getCreateTime());
 		log.setComment(copyrightInfo.getComment());
-		log.setOperator(TokenManager.getAdminId());
-		log.setPrincipal(TokenManager.getAdminId());
+		if (TokenManager.getToken() instanceof Admin) {
+			log.setOperator(TokenManager.getAdminId());
+		}
+		if (TokenManager.getToken() instanceof Admin) {
+			log.setPrincipal(TokenManager.getAdminId());
+		} else {
+			log.setPrincipal(aid);
+		}
 		log.setStatus(copyrightInfo.getStatus());
 		copyrightInfoMapper.insertSelective(copyrightInfo);
 		copyrightLogMapper.insertSelective(log);
@@ -85,7 +93,11 @@ public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper
 				o.setAuthorizationNumber(copyrightInfo.getCopyrightNumber());
 				o.setAuthorizationDate(copyrightInfo.getAuthorizedDate());
 				o.setEvaluationCategory(1);
+				o.setType(IntellectualPropertyType.COPYRIGHT.getCode());
+				o.setPropertyRightUrl(copyrightInfo.getCertificateUrl());
 				orgIntellectualPropertyMapper.insert(o);
+			} else if (CopyrightStatus.getStatus(copyrightLog.getStatus()) == CopyrightStatus.CIRCULATION){
+				copyrightInfo.setStatus(CopyrightStatus.DELIVERD.getCode());
 			}
 		}
 		copyrightInfoMapper.updateByPrimaryKeySelective(copyrightInfo);

+ 13 - 1
src/main/java/com/goafanti/patent/bo/InputPatentInfo.java

@@ -31,7 +31,7 @@ public class InputPatentInfo {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	patentField;
 
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	patentDes;
     
 	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
@@ -89,6 +89,9 @@ public class InputPatentInfo {
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		comment;
 	
+	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String office;
+	
 	
 
 	public Integer getState() {
@@ -290,6 +293,15 @@ public class InputPatentInfo {
 	public void setPatentCertificateUrl(String patentCertificateUrl) {
 		this.patentCertificateUrl = patentCertificateUrl;
 	}
+
+	public String getOffice() {
+		return office;
+	}
+
+	public void setOffice(String office) {
+		this.office = office;
+	}
+	
 	
 	
 }

+ 12 - 4
src/main/java/com/goafanti/patent/bo/PatentInfoDetailBo.java

@@ -62,6 +62,8 @@ public class PatentInfoDetailBo {
 
 	private String	patentCertificateUrl;
 
+	private String	office;
+
 	public String getId() {
 		return id;
 	}
@@ -150,7 +152,7 @@ public class PatentInfoDetailBo {
 	public void setPatentCatagory(String patentCatagory) {
 		this.patentCatagory = patentCatagory;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getPatentState() {
 		return patentState;
@@ -159,7 +161,7 @@ public class PatentInfoDetailBo {
 	public void setPatentState(Integer patentState) {
 		this.patentState = patentState;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getPatentField() {
 		return patentField;
@@ -257,7 +259,6 @@ public class PatentInfoDetailBo {
 		this.thirdInventorIsPublish = thirdInventorIsPublish;
 	}
 
-
 	public String getPatentProryStatementUrl() {
 		return patentProryStatementUrl;
 	}
@@ -297,7 +298,14 @@ public class PatentInfoDetailBo {
 	public void setUnitName(String unitName) {
 		this.unitName = unitName;
 	}
-	
+
+	public String getOffice() {
+		return office;
+	}
+
+	public void setOffice(String office) {
+		this.office = office;
+	}
 	
 
 }

+ 52 - 40
src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java

@@ -19,6 +19,7 @@ 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.enums.IntellectualPropertyType;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.PatentInfoStatus;
 import com.goafanti.common.model.Admin;
@@ -305,7 +306,11 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		patentInfo.setDeletedSign(0);
 		patentInfo.setConfirmState(0);
 		patentInfo.setPatentState(PatentInfoStatus.CREATE.getCode());
-		patentInfo.setPrincipal(aid);
+		if (TokenManager.getToken() instanceof Admin) {
+			patentInfo.setPrincipal(TokenManager.getAdminId());
+		} else {
+			patentInfo.setPrincipal(aid);
+		}
 		patentInfoMapper.insert(patentInfo);
 
 		PatentRegistration patentRegistration = new PatentRegistration();
@@ -333,6 +338,7 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		if (TokenManager.getToken() instanceof Admin) {
 			log.setOperator(TokenManager.getAdminId());
 		}
+		log.setComment(patentInfo.getPatentDes());
 		patentLogMapper.insert(log);
 		createNotice(patentInfo, log);
 		return patentInfo;
@@ -364,49 +370,55 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 			p.setPrincipal(log.getPrincipal());
 			patentLogMapper.insert(log);
 			
-			createNotice(p, log);
-			
+			patentInfoMapper.updateByPrimaryKeySelective(p);
+			if (PatentInfoStatus.getStatus(p.getPatentState()) == PatentInfoStatus.AUTHORIZE) {
+				OrgIntellectualProperty o = new OrgIntellectualProperty();
+				o.setId(UUID.randomUUID().toString());
+				o.setUid(p.getUid());
+				o.setPid(p.getId());
+				o.setDeletedSign(0);
+				o.setIntellectualPropertyNumber(p.getPatentNumber());
+				o.setIntellectualPropertyName(p.getPatentName());
+				o.setCatagory(1);
+				o.setObtainWay(1);
+				o.setAuthorizationNumber(p.getPatentNumber());
+				o.setAuthorizationDate(p.getAuthorizedDate());
+				o.setEvaluationCategory((3 == p.getPatentCatagory()) ? 0 : 1);
+				o.setType(IntellectualPropertyType.PATENT.getCode());
+				o.setPropertyRightUrl(p.getPatentCertificateUrl());
+				orgIntellectualPropertyMapper.insert(o);
+			}
 			
-		}
-		patentInfoMapper.updateByPrimaryKeySelective(p);
-		if (PatentInfoStatus.getStatus(p.getPatentState()) == PatentInfoStatus.AUTHORIZE) {
-			OrgIntellectualProperty o = new OrgIntellectualProperty();
-			o.setId(UUID.randomUUID().toString());
-			o.setUid(p.getUid());
-			o.setPid(p.getId());
-			o.setDeletedSign(0);
-			o.setIntellectualPropertyNumber(p.getPatentNumber());
-			o.setIntellectualPropertyName(p.getPatentName());
-			o.setCatagory(1);
-			o.setObtainWay(1);
-			o.setAuthorizationNumber(p.getPatentNumber());
-			o.setAuthorizationDate(p.getAuthorizedDate());
-			o.setEvaluationCategory((3 == p.getPatentCatagory()) ? 0 : 1);
-			orgIntellectualPropertyMapper.insert(o);
-		}
-
-		if (PatentInfoStatus.getStatus(p.getPatentState()) == PatentInfoStatus.LICENSE) {
-			OrgIntellectualProperty o = orgIntellectualPropertyMapper.selectOrgIntellectualPropertyByPid(p.getId());
-			if (null != o) {
-				Integer i = 0;
-				switch (p.getPatentCatagory()) {
-				case 0:
-					i = 0;
-					break;
-				case 1:
-					i = 2;
-					break;
-				case 2:
-					i = 3;
-					break;
-				case 3:
-					i = 11;
-					break;
+			if (PatentInfoStatus.getStatus(p.getPatentState()) == PatentInfoStatus.LICENSE) {
+				OrgIntellectualProperty o = orgIntellectualPropertyMapper.selectOrgIntellectualPropertyByPid(p.getId());
+				if (null != o) {
+					Integer i = 0;
+					switch (p.getPatentCatagory()) {
+					case 0:
+						i = 0;
+						break;
+					case 1:
+						i = 2;
+						break;
+					case 2:
+						i = 3;
+						break;
+					case 3:
+						i = 11;
+						break;
+					}
+					o.setCatagory(i);
+					orgIntellectualPropertyMapper.updateByPrimaryKeySelective(o);
 				}
-				o.setCatagory(i);
-				orgIntellectualPropertyMapper.updateByPrimaryKeySelective(o);
 			}
+			
+			createNotice(p, log);
+			
+			
 		}
+		
+
+		
 	}
 
 	@Override

+ 1 - 1
src/main/java/com/goafanti/techproject/controller/TechProjectApiController.java

@@ -101,7 +101,7 @@ public class TechProjectApiController extends CertifyApiController {
 		TechProject tp = new TechProject();
 		BeanUtils.copyProperties(techProject, tp);
 		tp.setUid(TokenManager.getUserId());
-		techProjectService.saveTechProject(tp, TokenManager.getToken().getAid());
+		techProjectService.saveTechProject(tp, curUser.getAid());
 		return res;
 	}
 

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

@@ -106,6 +106,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		if (TokenManager.getToken() instanceof Admin) {
 			log.setOperator(TokenManager.getAdminId());
 		}
+		log.setComment(techProject.getDispatchInfo());
 		techProjectLogMapper.insert(log);
 
 		createNotice(techProject, log);