Browse Source

Accept Merge Request #164 评估流程 : (master -> test)

Merge Request: 评估流程
Created By: @albertshaw
Accepted By: @albertshaw
URL: https://coding.net/t/aft/p/AFT/git/merge/164
albertshaw 9 years ago
parent
commit
e27a7563a6
69 changed files with 2798 additions and 362 deletions
  1. 0 2
      schema/2017-06-12.sql
  2. 8 0
      schema/2017-06-17.sql
  3. 12 0
      schema/2017-06-20.sql
  4. 315 0
      schema/field_glossory.sql
  5. 1 0
      schema/html_fragment.sql
  6. 1 0
      schema/sys_dict.sql
  7. 11 13
      src/main/java/com/goafanti/achievement/controller/AchievementApiController.java
  8. 8 0
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  9. 34 11
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  10. 3 0
      src/main/java/com/goafanti/admin/controller/AdminAchievementApiController.java
  11. 3 0
      src/main/java/com/goafanti/admin/controller/AdminDemandApiController.java
  12. 2 0
      src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java
  13. 4 0
      src/main/java/com/goafanti/common/controller/BaseController.java
  14. 188 2
      src/main/java/com/goafanti/common/controller/PortalController.java
  15. 10 36
      src/main/java/com/goafanti/common/controller/PublicController.java
  16. 70 58
      src/main/java/com/goafanti/common/controller/WebpageController.java
  17. 2 2
      src/main/java/com/goafanti/common/dao/AchievementKeywordMapper.java
  18. 20 6
      src/main/java/com/goafanti/common/dao/AchievementMapper.java
  19. 17 6
      src/main/java/com/goafanti/common/dao/DemandMapper.java
  20. 17 0
      src/main/java/com/goafanti/common/dao/FieldGlossoryMapper.java
  21. 17 0
      src/main/java/com/goafanti/common/dao/SysDictMapper.java
  22. 10 11
      src/main/java/com/goafanti/common/dao/UserMapper.java
  23. 60 0
      src/main/java/com/goafanti/common/enums/AchievementMaturity.java
  24. 58 0
      src/main/java/com/goafanti/common/enums/AchievementTransferMode.java
  25. 2 2
      src/main/java/com/goafanti/common/mapper/AchievementDemandMapper.xml
  26. 1 1
      src/main/java/com/goafanti/common/mapper/AchievementKeywordMapper.xml
  27. 118 16
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  28. 1 1
      src/main/java/com/goafanti/common/mapper/DemandKeywordMapper.xml
  29. 94 15
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  30. 82 0
      src/main/java/com/goafanti/common/mapper/FieldGlossoryMapper.xml
  31. 2 2
      src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml
  32. 58 0
      src/main/java/com/goafanti/common/mapper/SysDictMapper.xml
  33. 8 4
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  34. 52 0
      src/main/java/com/goafanti/common/model/FieldGlossory.java
  35. 23 0
      src/main/java/com/goafanti/common/model/SysDict.java
  36. 29 0
      src/main/java/com/goafanti/common/service/FieldGlossoryService.java
  37. 29 0
      src/main/java/com/goafanti/common/service/SysDictService.java
  38. 49 0
      src/main/java/com/goafanti/common/utils/MobileMessageUtils.java
  39. 5 1
      src/main/java/com/goafanti/core/shiro/listener/CustomSessionListener.java
  40. 9 0
      src/main/java/com/goafanti/demand/service/DemandService.java
  41. 24 6
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  42. 10 10
      src/main/java/com/goafanti/evaluation/bo/Step3.java
  43. 4 2
      src/main/java/com/goafanti/evaluation/bo/Step6.java
  44. 5 5
      src/main/java/com/goafanti/evaluation/bo/Step7.java
  45. 323 38
      src/main/java/com/goafanti/evaluation/controller/EvaluationController.java
  46. 81 0
      src/main/java/com/goafanti/evaluation/enums/ProfitRate.java
  47. 1 9
      src/main/java/com/goafanti/evaluation/service/ValueEvaluationService.java
  48. 246 0
      src/main/java/com/goafanti/portal/bo/AchievementPortalDetailBo.java
  49. 96 0
      src/main/java/com/goafanti/portal/bo/AchievementPortalSimilarListBo.java
  50. 55 48
      src/main/java/com/goafanti/portal/bo/AchievementSearchListBo.java
  51. 138 0
      src/main/java/com/goafanti/portal/bo/DemandPortalDetailBo.java
  52. 96 0
      src/main/java/com/goafanti/portal/bo/DemandPortalSimilarListBo.java
  53. 13 0
      src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java
  54. 11 0
      src/main/java/com/goafanti/portal/controller/PortalDetailApiController.java
  55. 2 2
      src/main/java/com/goafanti/portal/controller/PortalSearchApiController.java
  56. 10 2
      src/main/java/com/goafanti/user/bo/OrgPartnerDetailBo.java
  57. 10 2
      src/main/java/com/goafanti/user/bo/UserPartnerDetailBo.java
  58. 2 2
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  59. 2 2
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  60. 2 2
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  61. 5 1
      src/main/resources/props/config_dev.properties
  62. 4 0
      src/main/resources/props/config_local.properties
  63. 4 0
      src/main/resources/props/config_prod.properties
  64. 5 1
      src/main/resources/props/config_test.properties
  65. 41 37
      src/main/resources/props/error.properties
  66. 4 4
      src/main/webapp/WEB-INF/views/common.html
  67. 1 0
      src/main/webapp/WEB-INF/views/portal/detail/achievementDetail.html
  68. 154 0
      src/main/webapp/WEB-INF/views/portal/detail/demandDetail.html
  69. 16 0
      src/main/webapp/WEB-INF/views/user/account/evaluateInfo.html

File diff suppressed because it is too large
+ 0 - 2
schema/2017-06-12.sql


+ 8 - 0
schema/2017-06-17.sql

@@ -0,0 +1,8 @@
+CREATE TABLE `field_glossory` (
+  `id` INT(4) NOT NULL,
+  `name` VARCHAR(32) NULL COMMENT '名称',
+  `pid` INT(4) NULL COMMENT '上级ID',
+  `level` INT(1) NULL COMMENT '层级',
+  PRIMARY KEY (`id`))
+ENGINE = InnoDB
+COMMENT = '领域类别';

+ 12 - 0
schema/2017-06-20.sql

@@ -0,0 +1,12 @@
+alter TABLE `achievement` 
+  modify column `maturity_picture_url` longtext  NULL
+  COMMENT '成熟度资料--图片URL';
+  
+alter table `demand`
+modify column `picture_url` longtext null comment '需求文件--图片URL';
+
+CREATE TABLE `sys_dict` (
+  `id` varchar(36) NOT NULL,
+  `value` varchar(64) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+);

+ 315 - 0
schema/field_glossory.sql

@@ -0,0 +1,315 @@
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (1,"电子信息",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (2,"生物与新医药",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (3,"航空航天",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (4,"新材料",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (5,"高技术服务",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (6,"新能源与节能",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (7,"资源与环境",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (8,"先进制造与自动化",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (9,"其他领域",0,1);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (10,"软件",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (11,"微电子技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (12,"计算机产品及其网络应用技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (13,"通信技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (14,"广播影视技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (15,"新型电子元器件",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (16,"信息安全技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (17,"智能交通和轨道交通技术",1,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (18,"基础软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (19,"嵌入式软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (20,"计算机辅助设计与辅助工程管理软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (21,"中文及多语种处理软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (22,"图形和图像处理软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (23,"地理信息系统( GIS) 软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (24,"电子商务软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (25,"电子政务软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (26,"企业管理软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (27,"物联网应用软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (28,"云计算与移动互联网软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (29,"Web服务与集成软件",10,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (30,"集成电路设计技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (31,"集成电路产品设计技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (32,"集成电路封装技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (33,"集成电路测试技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (34,"集成电路芯片制造工艺技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (35,"集成光电子器件设计、制造与工艺技术",11,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (36,"计算机及终端设计与制造技术",12,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (37,"计算机外围设备设计与制造技术",12,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (38,"网络设备设计与制造技术",12,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (39,"网络应用技术",12,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (40,"通信网络技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (41,"光传输系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (42,"有线宽带接入系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (43,"移动通信系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (44,"宽带无线通信系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (45,"卫星通信系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (46,"微波通信系统技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (47,"物联网设备、部件及组网技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (48,"电信网络运营支撑管理技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (49,"电信网与互联网增值业务应用技术",13,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (50,"广播电视节目采编播系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (51,"广播电视业务集成与支撑系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (52,"有线传输与覆盖系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (53,"无线传输与覆盖系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (54,"广播电视监测监管、安全运行与维护系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (55,"数字电影系统技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (56,"数字电视终端技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (57,"专业视频应用服务平台技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (58,"音响、光盘技术",14,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (59,"半导体发光技术",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (60,"片式和集成无源元件",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (61,"大功率半导体器件",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (62,"专用特种器件",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (63,"敏感元器件与传感器",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (64,"中高档机电组件",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (65,"平板显示器件",15,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (66,"密码技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (67,"认证授权技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (68,"系统与软件安全技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (69,"网络与通信安全技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (70,"安全保密技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (71,"安全测评技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (72,"安全管理技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (73,"应用安全技术",16,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (74,"交通控制与管理技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (75,"交通基础信息采集、处理技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (76,"交通运输运营管理技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (77,"车、船载电子设备技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (78,"轨道交通车辆及运行保障技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (79,"轨道交通运营管理与服务技术",17,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (80,"医药生物技术",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (81,"中药、天然药物",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (82,"化学药研发技术",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (83,"药物新剂型与制剂创制技术",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (84,"医疗仪器、设备与医学专用软件",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (85,"轻工和化工生物技术",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (86,"农业生物技术",2,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (87,"新型疫苗",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (88,"生物治疗技术和基因工程药物",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (89,"快速生物检测技术",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (90,"生物大分子类药物研发技术",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (91,"天然药物生物合成制备技术",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (92,"生物分离介质、试剂、装置及相关检测技术",80,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (93,"中药资源可持续利用与生态保护技术",81,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (94,"创新药物研发技术",81,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (95,"中成药二次开发技术",81,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (96,"中药质控及有害物质检测技术",81,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (97,"创新药物技术",82,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (98,"手性药物创制技术",82,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (99,"晶型药物创制技术",82,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (100,"国家基本药物生产技术",82,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (101,"国家基本药物原料药和重要中间体的技术",82,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (102,"创新制剂技术",83,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (103,"新型给药制剂技术",83,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (104,"制剂新辅料开发及生产技术",83,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (105,"制药装备技术",83,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (106,"医学影像诊断技术",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (107,"新型治疗、急救与康复技术",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (108,"新型电生理检测和监护技术",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (109,"医学检验技术及新设备",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (110,"医学专用网络新型软件",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (111,"医用探测及射线计量检测技术",84,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (112,"高效工业酶制备与生物催化技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (113,"微生物发酵技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (114,"生物反应及分离技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (115,"天然产物有效成份的分离提取技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (116,"食品安全生产与评价技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (117,"食品安全检测技术",85,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (118,"农林植物优良新品种与优质高效安全生产技术",86,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (119,"畜禽水产优良新品种与健康养殖技术",86,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (120,"重大农林生物灾害与动物疫病防控技术",86,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (121,"现代农业装备与信息化技术",86,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (122,"农业面源和重金属污染农田综合防治与修复技术",86,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (123,"航空技术",3,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (124,"航天技术",3,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (125,"飞行器",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (126,"飞行器动力技术",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (127,"飞行器系统技术",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (128,"飞行器制造与材料技术",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (129,"空中管制技术",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (130,"民航及通用航空运行保障技术",123,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (131,"卫星总体技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (132,"运载火箭技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (133,"卫星平台技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (134,"卫星有效载荷技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (135,"航天测控技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (136,"航天电子与航天材料制造技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (137,"先进航天动力设计技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (138,"卫星应用技术",124,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (139,"金属材料",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (140,"无机非金属材料",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (141,"高分子材料",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (142,"生物医用材料",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (143,"精细和专用化学品",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (144,"与文化艺术产业相关的新材料",4,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (145,"精品钢材制备技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (146,"铝、铜、镁、钛合金清洁生产与深加工技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (147,"稀有、稀土金属精深产品制备技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (148,"纳米及粉末冶金新材料制备与应用技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (149,"金属及金属基复合新材料制备技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (150,"半导体新材料制备与应用技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (151,"电工、微电子和光电子新材料制备与应用技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (152,"超导、高效能电池等其它新材料制备与应用技术",139,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (153,"结构陶瓷及陶瓷基复合材料强化增韧技术",140,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (154,"功能陶瓷制备技术",140,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (155,"功能玻璃制备技术",140,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (156,"节能与新能源用材料制备技术",140,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (157,"环保及环境友好型材料技术",140,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (158,"新型功能高分子材料的制备及应用技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (159,"工程和特种工程塑料制备技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (160,"新型橡胶的合成技术及橡胶新材料制备技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (161,"新型纤维及复合材料制备技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (162,"高分子材料制备及循环再利用技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (163,"高分子材料的新型加工和应用技术",141,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (164,"介入治疗器具材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (165,"心脑血管外科用新型生物材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (166,"骨科内置物制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (167,"口腔材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (168,"组织工程用材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (169,"新型敷料和止血材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (170,"专用手术器械和材料制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (171,"其他新型医用材料及制备技术",142,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (172,"新型催化剂制备及应用技术",143,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (173,"电子化学品制备及应用技术",143,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (174,"超细功能材料制备及应用技术",143,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (175,"精细化学品制备及应用技术",143,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (176,"文化载体和介质新材料制备技术",144,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (177,"艺术专用新材料制备技术",144,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (178,"影视场景和舞台专用新材料的加工生产技术",144,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (179,"文化产品印刷新材料制备技术",144,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (180,"文物保护新材料制备技术",144,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (181,"研发与设计服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (182,"检验检测认证与标准服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (183,"信息技术服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (184,"高技术专业化服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (185,"知识产权与成果转化服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (186,"电子商务与现代物流技术",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (187,"城市管理与社会服务",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (188,"文化创意产业支撑技术",5,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (189,"研发服务",181,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (190,"设计服务",181,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (191,"检验检测认证技术",182,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (192,"标准化服务技术",182,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (193,"云计算服务技术",183,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (194,"数据服务技术",183,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (195,"其他信息服务技术",183,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (196,"电子商务技术",186,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (197,"物流与供应链管理技术",186,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (198,"智慧城市服务支撑技术",187,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (199,"互联网教育",187,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (200,"健康管理",187,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (201,"现代体育服务支撑技术",187,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (202,"创作、设计与制作技术",188,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (203,"传播与展示技术",188,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (204,"文化遗产发现与再利用技术",188,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (205,"运营与管理技术",188,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (206,"可再生清洁能源",6,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (207,"核能及氢能",6,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (208,"新型高效能量转换与储存技术",6,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (209,"高效节能技术",6,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (210,"太阳能",206,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (211,"风能",206,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (212,"生物质能",206,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (213,"地热能、海洋能及运动能",206,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (214,"核能",207,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (215,"氢能",207,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (216,"高性能绿色电池(组)技术",208,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (217,"新型动力电池(组)与储能电池技术",208,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (218,"燃料电池技术",208,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (219,"超级电容器与热电转换技术",208,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (220,"工业节能技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (221,"能量回收利用技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (222,"蓄热式燃烧技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (223,"输配电系统优化技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (224,"高温热泵技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (225,"建筑节能技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (226,"能源系统管理、优化与控制技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (227,"节能监测技术",209,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (228,"水污染控制与水资源利用技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (229,"大气污染控制技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (230,"固体废弃物处置与综合利用技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (231,"物理性污染防治技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (232,"环境监测及环境事故应急处理技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (233,"生态环境建设与保护技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (234,"清洁生产技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (235,"资源勘查、高效开采与综合利用技术",7,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (236,"城镇污水处理与资源化技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (237,"工业废水处理与资源化技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (238,"农业水污染控制技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (239,"流域水污染治理与富营养化综合控制技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (240,"节水与非常规水资源综合利用技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (241,"饮用水安全保障技术",228,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (242,"煤燃烧污染防治技术",229,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (243,"机动车排放控制技术",229,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (244,"工业炉窑污染防治技术",229,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (245,"工业有害废气控制技术",229,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (246,"有限空间空气污染防治技术",229,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (247,"危险固体废弃物处置技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (248,"工业固体废弃物综合利用技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (249,"生活垃圾处置与资源化技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (250,"建筑垃圾处置与资源化技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (251,"有机固体废物处理与资源化技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (252,"社会源固体废物处置与资源化技术",230,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (253,"噪声、振动污染防治技术",231,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (254,"核与辐射安全防治技术",231,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (255,"环境监测预警技术",232,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (256,"应急环境监测技术",232,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (257,"生态环境监测技术",232,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (258,"非常规污染物监测技术",232,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (259,"重污染行业生产过程中节水、减排及资源化关键技术",234,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (260,"清洁生产关键技术",234,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (261,"环保制造关键技术",234,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (262,"资源勘查开采技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (263,"提高矿产资源回收利用率的采矿、选矿技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (264,"伴生有价元素的分选提取技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (265,"低品位资源和尾矿资源综合利用技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (266,"放射性资源勘查开发技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (267,"放射性废物处理处置技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (268,"绿色矿山建设技术",235,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (269,"工业生产过程控制系统",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (270,"安全生产技术",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (271,"高性能、智能化仪器仪表",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (272,"先进制造工艺与装备",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (273,"新型机械",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (274,"电力系统与设备",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (275,"汽车及轨道车辆相关技术",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (276,"高技术船舶与海洋工程装备设计制造技术",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (277,"传统文化产业改造技术",8,2);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (278,"现场总线与工业以太网技术",269,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (279,"嵌入式系统技术",269,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (280,"新一代工业控制计算机技术",269,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (281,"制造执行系统(MES)技术",269,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (282,"工业生产过程综合自动化控制系统技术",269,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (283,"矿山安全生产技术",270,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (284,"危险化学品安全生产技术",270,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (285,"其它事故防治及处置技术",270,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (286,"新型传感器",271,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (287,"新型自动化仪器仪表",271,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (288,"科学分析仪器/检测仪器",271,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (289,"精确制造中的测控仪器仪表",271,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (290,"微机电系统技术",271,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (291,"高档数控装备与数控加工技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (292,"机器人",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (293,"智能装备驱动控制技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (294,"特种加工技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (295,"大规模集成电路制造相关技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (296,"增材制造技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (297,"高端装备再制造技术",272,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (298,"机械基础件及制造技术",273,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (299,"通用机械装备制造技术",273,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (300,"极端制造与专用机械装备制造技术",273,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (301,"纺织及其他行业专用设备制造技术",273,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (302,"发电与储能技术",274,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (303,"输电技术",274,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (304,"配电与用电技术",274,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (305,"变电技术",274,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (306,"系统仿真与自动化技术",274,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (307,"车用发动机及其相关技术",275,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (308,"汽车关键零部件技术",275,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (309,"节能与新能源汽车技术",275,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (310,"机动车及发动机先进设计、制造和测试平台技术",275,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (311,"轨道车辆及关键零部件技术",275,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (312,"高技术船舶设计制造技术",276,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (313,"海洋工程装备设计制造技术",276,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (314,"乐器制造技术",277,3);
+insert into `field_glossory` (`id`,`name`,`pid`,`level`) values (315,"印刷技术",277,3);

File diff suppressed because it is too large
+ 1 - 0
schema/html_fragment.sql


+ 1 - 0
schema/sys_dict.sql

@@ -0,0 +1 @@
+INSERT INTO `sys_dict` (`id`, `value`) VALUES ('government_loan_ror', '3.06');

+ 11 - 13
src/main/java/com/goafanti/achievement/controller/AchievementApiController.java

@@ -37,19 +37,17 @@ import com.goafanti.core.shiro.token.TokenManager;
 @RequestMapping(value = "/api/user/achievement")
 public class AchievementApiController extends CertifyApiController {
 	@Resource
-	private AchievementService	achievementService;
+	private AchievementService		achievementService;
 	@Resource
-	private AftFileService		aftFileService;
+	private AftFileService			aftFileService;
 	@Resource
-	private AchievementOrderService achievementOrderService;
-	
-	
-	
+	private AchievementOrderService	achievementOrderService;
+
 	/**
 	 * 成果需求匹配列表
 	 */
 	@RequestMapping(value = "/achievementDemand", method = RequestMethod.GET)
-	public Result achievementDemand(String id){
+	public Result achievementDemand(String id) {
 		Result res = new Result();
 		res.setData(achievementService.selectAchievementDemandListByAchievementId(id));
 		return res;
@@ -162,7 +160,7 @@ public class AchievementApiController extends CertifyApiController {
 		res.setData(achievementService.selectUserOwnerDetail(id));
 		return res;
 	}
-	
+
 	/**
 	 * 组织用户成果详情详情
 	 */
@@ -294,16 +292,16 @@ public class AchievementApiController extends CertifyApiController {
 	@RequestMapping(value = "/delete", method = RequestMethod.POST)
 	private Result delete(@RequestParam(name = "ids[]", required = false) String[] ids) {
 		Result res = new Result();
-		if (ids == null || ids.length == 1) {
+		if (ids == null || ids.length < 1) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+		} else {
 			List<AchievementOrder> list = achievementOrderService.selectAchievementOrderByAchievementId(ids[0]);
-			for (AchievementOrder order : list){
-				if (!AchievementOrderStatus.CREATE.getCode().equals(order.getStatus())){
+			for (AchievementOrder order : list) {
+				if (!AchievementOrderStatus.CREATE.getCode().equals(order.getStatus())) {
 					res.getError().add(buildError("", "当前科技成果有订单,无法删除!"));
 					return res;
 				}
 			}
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
-		} else {
 			res.setData(achievementService.deleteByPrimaryKey(Arrays.asList(ids)));
 		}
 		return res;

+ 8 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -12,6 +12,8 @@ import com.goafanti.common.model.Achievement;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
 
 public interface AchievementService {
@@ -58,5 +60,11 @@ public interface AchievementService {
 
 	Pagination<AchievementPartnerListBo> listPartnerAchievement(String ownerId, Integer pNo, Integer pSize);
 
+	AchievementPortalDetailBo findUserPortalAchievementDetail(String id);
+
+	AchievementPortalDetailBo findOrgPortalAchievementDetail(String id);
+
+	List<AchievementPortalSimilarListBo> findByFieldA(Integer fieldA, String id, Integer type);
+
 
 }

+ 34 - 11
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -47,6 +47,8 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
 
 @Service
@@ -92,7 +94,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0) {
+		if (pSize == null || pSize < 0 || pSize > 10) {
 			pSize = 10;
 		}
 		return (Pagination<AchievementListBo>) findPage("findOrgOwnerAchievementListByPage",
@@ -108,7 +110,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 
-		a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
 		if (TokenManager.getToken() instanceof Admin) {
 			a.setSalesmanId(TokenManager.getAdminId());
 		}
@@ -117,6 +118,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
 			a.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
 			createAuditorNotice(a);
+		} else {
+			a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
 		}
 
 		a.setCreateTime(now.getTime());
@@ -141,7 +144,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public int deleteByPrimaryKey(List<String> id) {
-		achievementKeywordMapper.batchDeleteByDemandIds(id);
+		achievementKeywordMapper.batchDeleteByAchievementIds(id);
 		achievementDemandMapper.batchDeleteByAchievementIds(id);
 		return achievementMapper.batchDeleteByPrimaryKey(id);
 	}
@@ -155,7 +158,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0) {
+		if (pSize == null || pSize < 0 || pSize > 10) {
 			pSize = 10;
 		}
 		return (Pagination<AchievementListBo>) findPage("findAchievementListByPage",
@@ -181,7 +184,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 		if (!StringUtils.isBlank(releaseDateEndDate)) {
 			try {
-				rEnd = DateUtils.parseDate(releaseDateEndDate, AFTConstants.YYYYMMDD);
+				rEnd = DateUtils.addDays(DateUtils.parseDate(releaseDateEndDate, AFTConstants.YYYYMMDD),1);
 			} catch (ParseException e) {
 			}
 		}
@@ -249,9 +252,9 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	public int updateReleaseStatus(Achievement a) {
 		a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
 		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
-		achievementMapper.updateReleaseDate(a.getId());
 		achievementDemandMapper.deleteByAchievementId(a.getId());
-		return achievementMapper.updateByPrimaryKeySelective(a);
+		achievementMapper.updateByPrimaryKeySelective(a);
+		return achievementMapper.updateReleaseDate(a.getId());
 	}
 
 	@Override
@@ -353,8 +356,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
+		if (pSize == null || pSize < 0 || pSize > 20) {
+			pSize = 20;
 		}
 		return (Pagination<AchievementSearchListBo>) findPage("findSearchAchievementListByPage",
 				"findSearchAchievementCount", params, pNo, pSize);
@@ -473,8 +476,28 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (pSize == null || pSize < 0 || pSize > 10) {
 			pSize = 10;
 		}
-		return (Pagination<AchievementPartnerListBo>) findPage("findPartnerAchievementListByPage", "findPartnerAchievementCount",
-				params, pNo, pSize);
+		return (Pagination<AchievementPartnerListBo>) findPage("findPartnerAchievementListByPage",
+				"findPartnerAchievementCount", params, pNo, pSize);
+	}
+
+	@Override
+	public AchievementPortalDetailBo findUserPortalAchievementDetail(String id) {
+		return achievementMapper.findUserPortalAchievementDetail(id, TokenManager.getUserId());
+	}
+
+	@Override
+	public AchievementPortalDetailBo findOrgPortalAchievementDetail(String id) {
+		return achievementMapper.findOrgPortalAchievementDetail(id, TokenManager.getUserId());
+	}
+
+	@Override
+	public List<AchievementPortalSimilarListBo> findByFieldA(Integer fieldA, String id, Integer type) {
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			return achievementMapper.findUserPortalSimilarByFieldA(fieldA, id);
+		} else if (UserType.ORGANIZATION.getCode().equals(type)) {
+			return achievementMapper.findOrgPortalSimilarByFieldA(fieldA, id);
+		}
+		return null;
 	}
 
 }

+ 3 - 0
src/main/java/com/goafanti/admin/controller/AdminAchievementApiController.java

@@ -39,6 +39,7 @@ import com.goafanti.common.model.Achievement;
 import com.goafanti.common.model.AftFile;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.service.UserService;
 
 @RestController
@@ -296,6 +297,8 @@ public class AdminAchievementApiController extends CertifyApiController {
 				AftFile f = new AftFile();
 				f.setId(UUID.randomUUID().toString());
 				f.setFileName(AttachmentType.ACHIEVEMENT_TEMPLATE.getDesc());
+				f.setUid(TokenManager.getAdminId());
+				f.setComment(AttachmentType.ACHIEVEMENT_TEMPLATE.getDesc());
 				f.setSign(sign);
 				f.setFilePath("/admin/" + fileName);
 				f.setDeleletedSign(DeleteStatus.UNDELETE.getCode());

+ 3 - 0
src/main/java/com/goafanti/admin/controller/AdminDemandApiController.java

@@ -38,6 +38,7 @@ import com.goafanti.common.model.AftFile;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.InputDemand;
 import com.goafanti.demand.service.DemandService;
@@ -138,6 +139,8 @@ public class AdminDemandApiController extends CertifyApiController {
 				AftFile f = new AftFile();
 				f.setId(UUID.randomUUID().toString());
 				f.setFileName(AttachmentType.DEMAND_TEMPLATE.getDesc());
+				f.setUid(TokenManager.getAdminId());
+				f.setComment(AttachmentType.DEMAND_TEMPLATE.getDesc());
 				f.setSign(sign);
 				f.setFilePath("/admin/" + fileName);
 				f.setDeleletedSign(DeleteStatus.UNDELETE.getCode());

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

@@ -557,6 +557,8 @@ public class AdminPatentApiController extends CertifyApiController {
 				f.setId(UUID.randomUUID().toString());
 				f.setFileName(AttachmentType.PATENT_TEMPLATE.getDesc());
 				f.setSign(sign);
+				f.setUid(TokenManager.getAdminId());
+				f.setComment(AttachmentType.PATENT_TEMPLATE.getDesc());
 				f.setFilePath("/admin/" + fileName);
 				f.setDeleletedSign(DeleteStatus.UNDELETE.getCode());
 				aftFileService.insert(f);

+ 4 - 0
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -48,6 +48,9 @@ public class BaseController {
 	@Value(value = "${accessSecret}")
 	private String					accessSecret		= null;
 
+	@Value(value = "${portal.host}")
+	private String					portalHost			= null;
+
 	protected Error buildError(String key) {
 		return buildError(key, null);
 	}
@@ -106,6 +109,7 @@ public class BaseController {
 		model.addAttribute("staticDomain", avatarHost);
 		model.addAttribute("staticHost", staticHost);
 		model.addAttribute("avatarHost", avatarHost);
+		model.addAttribute("portalHost", portalHost);
 		model.addAttribute("basePath", request.getContextPath());
 		model.addAttribute("shiro", SecurityUtils.getSubject());
 		model.addAttribute("isLogin", TokenManager.isLogin());

+ 188 - 2
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -1,20 +1,206 @@
 package com.goafanti.common.controller;
 
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.servlet.ModelAndView;
 
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.common.enums.AchievementMaturity;
+import com.goafanti.common.enums.AchievementTransferMode;
+import com.goafanti.common.enums.UserType;
+import com.goafanti.common.service.FieldGlossoryService;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
+
 @Controller
 public class PortalController extends BaseController {
-	
+	@Resource
+	private AchievementService		achievementService;
+	@Resource
+	private DemandService			demandService;
+	@Resource
+	private FieldGlossoryService	fieldGlossoryService;
+
+	private static final String		UNIT		= "万元";
+
+	private static final int		MULTIPLE	= 20;
+
+	private static final String		DELIMITER	= "/";
+
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public String index(ModelAndView modelview) {
 		return "/index";
 	}
-	
+
 	@RequestMapping(value = "/", method = RequestMethod.GET)
 	public String home(ModelAndView modelview) {
 		return "/index";
 	}
+
+	/**
+	 * 科技需求详情
+	 */
+	@RequestMapping(value = "/portal/detail/demandDetail", method = RequestMethod.GET)
+	public ModelAndView portalDemandDetail(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		DemandPortalDetailBo demand = null;
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			demand = demandService.findUserPortalDemandDetail(id);
+		} else if (UserType.ORGANIZATION.getCode().equals(type)) {
+			demand = demandService.findOrgPortalDemandDetail(id);
+		}
+		if (null != demand) {
+			Integer industryCategoryA = demand.getIndustryCategoryA();
+			String industryCategory = "";
+			boolean a = Boolean.FALSE;
+			boolean b = Boolean.FALSE;
+			if (null != industryCategoryA) {
+				List<DemandPortalSimilarListBo> similarList = demandService.findByIndustryCategoryA(industryCategoryA,
+						demand.getId());
+				if (!similarList.isEmpty()) {
+					for (DemandPortalSimilarListBo s : similarList) {
+						a = Boolean.FALSE;
+						b = Boolean.FALSE;
+						industryCategory = "";
+						if (StringUtils.isBlank(s.getIndustryCategoryAS())) {
+							a = Boolean.TRUE;
+						}
+						if (StringUtils.isBlank(s.getIndustryCategoryBS())) {
+							b = Boolean.TRUE;
+						}
+						industryCategory += (a ? s.getIndustryCategoryAS() : "") + (a && b ? DELIMITER : "")
+								+ (b ? s.getIndustryCategoryBS() : "");
+						s.setIndustryCategory(industryCategory);
+						if (null != s.getBudgetCost()) {
+							s.setBudgetCostS(s.getBudgetCostS() + UNIT);
+						}
+					}
+
+				}
+				mv.addObject("similarList", similarList);
+				a = Boolean.FALSE;
+				if (StringUtils.isNotBlank(demand.getIndustryCategoryAS())) {
+					a = Boolean.TRUE;
+				}
+			}
+			b = Boolean.FALSE;
+			if (StringUtils.isNotBlank(demand.getIndustryCategoryBS())) {
+				b = Boolean.TRUE;
+			}
+
+			industryCategory += (a ? demand.getIndustryCategoryAS() : "") + (a && b ? DELIMITER : "")
+					+ (b ? demand.getIndustryCategoryBS() : "");
+			demand.setIndustryCategory(industryCategory);
+
+			String location = "";
+			String province = demand.getProvince();
+			String city = demand.getCity();
+			location += (StringUtils.isBlank(province) ? "" : province) + (StringUtils.isBlank(city) ? "" : city);
+			demand.setLocation(location);
+		}
+		mv.setViewName("/portal/detail/demandDetail");
+		mv.addObject("demand", demand);
+
+		return mv;
+	}
+
+	/**
+	 * 科技成果详情
+	 */
+	@RequestMapping(value = "/portal/detail/achievementDetail", method = RequestMethod.GET)
+	public ModelAndView portalAchievementDetail(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		AchievementPortalDetailBo achievement = null;
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			achievement = achievementService.findUserPortalAchievementDetail(id);
+		} else if (UserType.ORGANIZATION.getCode().equals(type)) {
+			achievement = achievementService.findOrgPortalAchievementDetail(id);
+		}
+		if (null != achievement) {
+			Integer fieldA = achievement.getFieldA();
+			String field = "";
+			boolean a = Boolean.FALSE;
+			boolean b = Boolean.FALSE;
+			if (null != fieldA) {
+				List<AchievementPortalSimilarListBo> similarList = achievementService.findByFieldA(fieldA,
+						achievement.getId(), type);
+				if (!similarList.isEmpty()) {
+					for (AchievementPortalSimilarListBo bo : similarList) {
+						if (null != bo.getMaturity()) {
+							bo.setMaturityS(bo.getMaturity() * MULTIPLE + "%");
+						}
+						if (null != bo.getTransferPrice()) {
+							bo.setTransferPriceS(bo.getTransferPrice() + UNIT);
+						}
+					}
+				}
+				mv.addObject("similarList", similarList);
+				if (StringUtils.isNotBlank(achievement.getFieldAS())) {
+					a = Boolean.TRUE;
+				}
+			}
+			if (StringUtils.isNotBlank(achievement.getFieldBS())) {
+				b = Boolean.TRUE;
+			}
+
+			field += (a ? achievement.getFieldAS() : "") + (a && b ? DELIMITER : "")
+					+ (b ? achievement.getFieldBS() : "");
+			achievement.setField(field);
+			String technicalPictureUrl = achievement.getTechnicalPictureUrl();
+			if (StringUtils.isNotBlank(technicalPictureUrl)) {
+				achievement.setPictureList(Arrays.asList(technicalPictureUrl.trim().split(",|,")));
+			}
+
+			Integer transfermode = achievement.getTransferMode();
+			if (null != transfermode) {
+				if (AchievementTransferMode.FULLTRANSFER.getCode().equals(transfermode)) {
+					achievement.setTransferModeS(AchievementTransferMode.FULLTRANSFER.getDesc());
+				} else if (AchievementTransferMode.PERMISSIONTRANSFER.getCode().equals(transfermode)) {
+					achievement.setTransferModeS(AchievementTransferMode.PERMISSIONTRANSFER.getDesc());
+				} else if (AchievementTransferMode.TECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					achievement.setTransferModeS(AchievementTransferMode.TECHNOLOGYSHARES.getDesc());
+				} else if (AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					achievement.setTransferModeS(AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getDesc());
+				}
+			}
+
+			Integer maturity = achievement.getMaturity();
+			if (null != maturity) {
+				if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
+					achievement.setMaturityS(AchievementMaturity.RESEARCH.getDesc());
+				} else if (AchievementMaturity.SAMPLE.getCode().equals(maturity)) {
+					achievement.setMaturityS(AchievementMaturity.SAMPLE.getDesc());
+				} else if (AchievementMaturity.PRIMARYTEST.getCode().equals(maturity)) {
+					achievement.setMaturityS(AchievementMaturity.PRIMARYTEST.getDesc());
+				} else if (AchievementMaturity.INTERMEDIATETEST.getCode().equals(maturity)) {
+					achievement.setMaturityS(AchievementMaturity.INTERMEDIATETEST.getDesc());
+				} else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
+					achievement.setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
+				}
+			}
+			String location = "";
+			String province = achievement.getProvince();
+			String city = achievement.getCity();
+			location += (StringUtils.isBlank(province) ? "" : province) + (StringUtils.isBlank(city) ? "" : city);
+			if (null != achievement.getTransferPrice()) {
+				achievement.setTransferPriceS(achievement.getTransferPrice() + UNIT);
+			}
+			achievement.setLocation(location);
+
+		}
+		mv.setViewName("/portal/detail/achievementDetail");
+		mv.addObject("achievement", achievement);
+		return mv;
+	}
+
 }

+ 10 - 36
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -20,19 +20,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.exceptions.ServerException;
-import com.aliyuncs.profile.DefaultProfile;
-import com.aliyuncs.profile.IClientProfile;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsRequest;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
 import com.goafanti.admin.service.AftFileService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.service.IndustryCategoryService;
 import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.MobileMessageUtils;
 import com.goafanti.common.utils.PictureUtils;
 import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
@@ -59,6 +52,9 @@ public class PublicController extends BaseController {
 	@Value(value = "${static.host}")
 	private String					staticHost			= null;
 
+	@Value(value = "${mobileCodeTemplate}")
+	private String					mobileCodeTemplate	= null;
+
 	@Resource
 	private UserService				userService;
 
@@ -155,36 +151,14 @@ public class PublicController extends BaseController {
 	 * @param res
 	 * @return
 	 */
-	@SuppressWarnings("unused")
 	private Result sendMessage(String mobile, Result res) {
-		// 生成随机字串
-		String mobileVerifyCode = VerifyCodeUtils.generateMobileVerifyCode(6);
-		// 存入Shiro会话session
-		TokenManager.setVal2Session(VerifyCodeUtils.M_CODE, mobileVerifyCode);
+		String mobileVerifyCode = VerifyCodeUtils.generateMobileVerifyCode(6); // 生成随机字串
+		TokenManager.setVal2Session(VerifyCodeUtils.M_CODE, mobileVerifyCode);// 存入Shiro会话session
 		TokenManager.setVal2Session(VerifyCodeUtils.M_CODE_TIME, System.currentTimeMillis());
-		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
-		try {
-			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
-		} catch (ClientException e1) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "获取手机验证码异常"));
-			return res;
-		}
-		IAcsClient client = new DefaultAcsClient(profile);
-		SingleSendSmsRequest request = new SingleSendSmsRequest();
-		try {
-			request.setSignName("阿凡提信息科技");// {\"code\":\""+mobileVerifyCode+"\"}
-			request.setTemplateCode("SMS_37845022");
-			request.setParamString("{\"code\":\"" + mobileVerifyCode + "\",\"product\":\"阿凡提信息科技\"}");
-			request.setRecNum(mobile);
-			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
-		} catch (ServerException e) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "获取手机验证码异常"));
-			LoggerUtils.fmtError(getClass(), e, "服务器端手机验证码异常:%s", e.getMessage());
-			return res;
-		} catch (ClientException e) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "获取手机验证码异常"));
-			LoggerUtils.fmtError(getClass(), e, "客户端手机验证码异常:%s", e.getMessage());
-			return res;
+		String paramString = "{\"code\":\"" + mobileVerifyCode + "\",\"product\":\"阿凡提信息科技\"}";
+		String ret = MobileMessageUtils.sendMessage(mobileCodeTemplate, paramString, mobile, accessKey, accessSecret);
+		if (StringUtils.isNotBlank(ret)) {
+			res.getError().add(buildError("", "获取手机验证码异常!"));
 		}
 		return res;
 	}

+ 70 - 58
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.controller;
 
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
@@ -9,169 +10,180 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.view.RedirectView;
 
+import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.User;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.service.DemandService;
 import com.goafanti.user.service.UserService;
 
-
-
 @Controller
 public class WebpageController extends BaseController {
 	@Resource
-	private UserService userService;
-	
+	private UserService			userService;
+
 	@Resource
-	private AdminService adminService;
-	
-	@RequestMapping(value = "user/account/index", method = RequestMethod.GET)
+	private AdminService		adminService;
+
+	@Resource
+	private DemandService		demandService;
+
+	@Resource
+	private AchievementService	achievementService;
+
+	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/index");
+		return userLogin(request, modelview, "/user/account/index");
 	}
 	
+	@RequestMapping(value = "/user/account/evaluateInfo", method = RequestMethod.GET)
+	public ModelAndView evaluateInfo(HttpServletRequest request, ModelAndView modelview) {
+		return userLogin(request, modelview, "/user/account/evaluateInfo");
+	}
+
 	@RequestMapping(value = "/user/account/set", method = RequestMethod.GET)
 	public ModelAndView userSet(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/set");
+		return userLogin(request, modelview, "/user/account/set");
 	}
-	
+
 	@RequestMapping(value = "/user/account/achievement", method = RequestMethod.GET)
 	public ModelAndView userAchievement(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/achievement");
+		return userLogin(request, modelview, "/user/account/achievement");
 	}
-	
+
 	@RequestMapping(value = "/user/account/demand", method = RequestMethod.GET)
 	public ModelAndView userDemand(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/demand");
+		return userLogin(request, modelview, "/user/account/demand");
 	}
-	
+
 	@RequestMapping(value = "/user/login", method = RequestMethod.GET)
 	public String userLogin(HttpServletRequest request, ModelAndView modelview) {
 		return "/user/login";
 	}
-	
+
 	@RequestMapping(value = "/user/logout", method = RequestMethod.GET)
 	public String userLogout(HttpServletRequest request, ModelAndView modelview) {
 		TokenManager.logout();
 		return userLogin(request, modelview);
 	}
-	
+
 	@RequestMapping(value = "/user/signIn", method = RequestMethod.GET)
 	public String userSignin(HttpServletRequest request, ModelAndView modelview) {
 		return "/user/signIn";
 	}
-	
+
 	@RequestMapping(value = "/user/certify", method = RequestMethod.GET)
 	public ModelAndView userCertify(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/certify");
+		return userLogin(request, modelview, "/user/certify");
 	}
-	
+
 	@RequestMapping(value = "/user/groupCertify", method = RequestMethod.GET)
 	public ModelAndView userGroupCertify(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/groupCertify");
+		return userLogin(request, modelview, "/user/groupCertify");
 	}
-	
+
 	@RequestMapping(value = "/user/index", method = RequestMethod.GET)
 	public ModelAndView userIndex(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/index");
+		return userLogin(request, modelview, "/user/index");
 	}
-	
+
 	@RequestMapping(value = "/user/subscriberDetail", method = RequestMethod.GET)
 	public ModelAndView userSubscriberDetail(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/subscriberDetail");
+		return userLogin(request, modelview, "/user/subscriberDetail");
 	}
-	
+
 	@RequestMapping(value = "/user/account/services", method = RequestMethod.GET)
 	public ModelAndView userServices(HttpServletRequest request, ModelAndView modelview) {
-		return userLogin(request,modelview,"/user/account/services");
+		return userLogin(request, modelview, "/user/account/services");
 	}
-	
-	/*@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
-	public String adminIndex(HttpServletRequest request, ModelAndView modelview) {
-		return "/admin/index";
-	}*/
-	
+
+	/*
+	 * @RequestMapping(value = "/admin/index", method = RequestMethod.GET)
+	 * public String adminIndex(HttpServletRequest request, ModelAndView
+	 * modelview) { return "/admin/index"; }
+	 */
+
 	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
 	public String adminLogin(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/login";
 	}
-	
+
 	@RequestMapping(value = "/admin/demand", method = RequestMethod.GET)
 	public String adminDemand(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/demand";
 	}
-	
+
 	@RequestMapping(value = "/admin/achievement", method = RequestMethod.GET)
 	public String adminAchievement(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/achievement";
 	}
-	
+
 	@RequestMapping(value = "/admin/set", method = RequestMethod.GET)
 	public String adminSet(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/set";
 	}
-	
+
 	@RequestMapping(value = "/admin/userManage", method = RequestMethod.GET)
 	public ModelAndView adminUserManage(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/userManage");
+		return adminToLogin(request, modelview, "/admin/userManage");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/technology", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageTechnology(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/technology");
+		return adminToLogin(request, modelview, "/admin/servicesManage/technology");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/patent", method = RequestMethod.GET)
 	public ModelAndView adminServicesManagePatent(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/patent");
+		return adminToLogin(request, modelview, "/admin/servicesManage/patent");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/contract", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageContract(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/contract");
+		return adminToLogin(request, modelview, "/admin/servicesManage/contract");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/highTech", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageHighTech(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/highTech");
+		return adminToLogin(request, modelview, "/admin/servicesManage/highTech");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/highTechInfo", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageHighTechInfo(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/highTechInfo");
+		return adminToLogin(request, modelview, "/admin/servicesManage/highTechInfo");
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/servicesManage/copyright");
+		return adminToLogin(request, modelview, "/admin/servicesManage/copyright");
 	}
-	
+
 	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
 	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
-		return adminToLogin(request,modelview,"/admin/index");
+		return adminToLogin(request, modelview, "/admin/index");
 	}
-	
+
 	@RequestMapping(value = "/portal/search/achievement", method = RequestMethod.GET)
 	public ModelAndView portalSearchAchievement(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/achievement");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/portal/search/demand", method = RequestMethod.GET)
 	public ModelAndView portalSearchDemand(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/demand");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/portal/search/subscriber", method = RequestMethod.GET)
 	public ModelAndView portalSearchSubscriber(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/search/subscriber");
 		return modelview;
 	}
+
 	
-	
-	
-	
+
 	private ModelAndView userLogin(HttpServletRequest request, ModelAndView modelview, String next) {
 		String key = TokenManager.getUserId();
 		if (!TokenManager.isLogin() || key == null || key == "") {
@@ -186,7 +198,7 @@ public class WebpageController extends BaseController {
 		modelview.setViewName(next);
 		return modelview;
 	}
-	
+
 	private ModelAndView adminToLogin(HttpServletRequest request, ModelAndView modelview, String next) {
 		String key = TokenManager.getAdminId();
 		if (!TokenManager.isLogin() || key == null || key == "") {

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

@@ -20,11 +20,11 @@ public interface AchievementKeywordMapper {
 
 	void insertBatch(List<AchievementKeyword> list);
 
-	int batchDeleteByDemandIds(List<String> id);
-
 	List<AchievementDemand> selectAchievementDemand(List<String> keywords);
 
 	List<AchievementKeyword> selectKeywordsByAchievementId(String id);
 
 	void batchDeleteByAchievementId(String achievementiId);
+
+	int batchDeleteByAchievementIds(List<String> id);
 }

+ 20 - 6
src/main/java/com/goafanti/common/dao/AchievementMapper.java

@@ -2,23 +2,27 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo;
 import com.goafanti.achievement.bo.AchievementUserOwnerDetailBo;
 import com.goafanti.common.model.Achievement;
 import com.goafanti.portal.bo.AchievementDetailBo;
+import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 
 public interface AchievementMapper {
-    int deleteByPrimaryKey(String id);
+	int deleteByPrimaryKey(String id);
 
-    int insert(Achievement record);
+	int insert(Achievement record);
 
-    int insertSelective(Achievement record);
+	int insertSelective(Achievement record);
 
-    Achievement selectByPrimaryKey(String id);
+	Achievement selectByPrimaryKey(String id);
 
-    int updateByPrimaryKeySelective(Achievement record);
+	int updateByPrimaryKeySelective(Achievement record);
 
-    int updateByPrimaryKey(Achievement record);
+	int updateByPrimaryKey(Achievement record);
 
 	int updateReleaseDate(String id);
 
@@ -33,4 +37,14 @@ public interface AchievementMapper {
 	AchievementDetailBo selectAchievementSearchDetail(String uid, String id);
 
 	Integer findAchievementNumByUid(String uid);
+
+	AchievementPortalDetailBo findUserPortalAchievementDetail(@Param("id")String id, @Param("uid")String uid);
+
+	AchievementPortalDetailBo findOrgPortalAchievementDetail(@Param("id")String id, @Param("uid")String uid);
+
+	List<AchievementPortalSimilarListBo> findUserPortalSimilarByFieldA(@Param("fieldA") Integer fieldA,
+			@Param("id") String id);
+
+	List<AchievementPortalSimilarListBo> findOrgPortalSimilarByFieldA(@Param("fieldA") Integer fieldA,
+			@Param("id") String id);
 }

+ 17 - 6
src/main/java/com/goafanti/common/dao/DemandMapper.java

@@ -2,22 +2,26 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.common.model.Demand;
 import com.goafanti.demand.bo.DemandManageDetailBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 
 public interface DemandMapper {
-    int deleteByPrimaryKey(String id);
+	int deleteByPrimaryKey(String id);
 
-    int insert(Demand record);
+	int insert(Demand record);
 
-    int insertSelective(Demand record);
+	int insertSelective(Demand record);
 
-    Demand selectByPrimaryKey(String id);
+	Demand selectByPrimaryKey(String id);
 
-    int updateByPrimaryKeySelective(Demand record);
+	int updateByPrimaryKeySelective(Demand record);
 
-    int updateByPrimaryKey(Demand record);
+	int updateByPrimaryKey(Demand record);
 
 	DemandManageDetailBo selectUserDemandDetail(String id);
 
@@ -34,4 +38,11 @@ public interface DemandMapper {
 	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
 
 	Integer findDemandNumByUid(String uid);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
+
+	DemandPortalDetailBo findUserPortalDemandDetail(String id);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(@Param("industryCategoryA") Integer industryCategoryA,
+			@Param("id") String id);
 }

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

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

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

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

+ 10 - 11
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -11,19 +11,18 @@ import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
 
-
 public interface UserMapper {
-    int deleteByPrimaryKey(String id);
+	int deleteByPrimaryKey(String id);
 
-    int insert(User record);
+	int insert(User record);
 
-    int insertSelective(User record);
+	int insertSelective(User record);
 
-    User selectByPrimaryKey(String id);
+	User selectByPrimaryKey(String id);
 
-    int updateByPrimaryKeySelective(User record);
+	int updateByPrimaryKeySelective(User record);
 
-    int updateByPrimaryKey(User record);
+	int updateByPrimaryKey(User record);
 
 	User selectByMobieAndType(String mobile, Integer type);
 
@@ -33,11 +32,11 @@ public interface UserMapper {
 
 	List<OrgListBo> selectUserByAid(String aid);
 
-	String findUserByNameAndMobile(@Param("name")String name, @Param("mobile")String mobile);
+	String findUserByNameAndMobile(@Param("name") String name, @Param("mobile") String mobile);
 
-	String findOrgByNameAndMobile(@Param("name")String name, @Param("mobile")String mobile);
+	String findOrgByNameAndMobile(@Param("name") String name, @Param("mobile") String mobile);
 
-	UserPartnerDetailBo findUserPartnerDetail(String uid);
+	UserPartnerDetailBo findUserPartnerDetail(@Param("uid") String uid, @Param("tokenId") String tokenId);
 
-	OrgPartnerDetailBo findOrgPartnerDetail(String uid);
+	OrgPartnerDetailBo findOrgPartnerDetail(@Param("uid") String uid, @Param("tokenId") String tokenId);
 }

+ 60 - 0
src/main/java/com/goafanti/common/enums/AchievementMaturity.java

@@ -0,0 +1,60 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum AchievementMaturity {
+	
+	RESEARCH(0, "正在研发"),
+	SAMPLE(1,"已有样品"),
+	PRIMARYTEST(2,"通过小试"),
+	INTERMEDIATETEST(3, "通过中试"),
+	MASSPRODUCTION(4, "可以量产"),
+	OTHER(5, "其他");
+
+	private AchievementMaturity(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, AchievementMaturity> status = new HashMap<Integer, AchievementMaturity>();
+
+	static {
+		for (AchievementMaturity value : AchievementMaturity.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static AchievementMaturity getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static AchievementMaturity 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;
+	}
+
+
+}

+ 58 - 0
src/main/java/com/goafanti/common/enums/AchievementTransferMode.java

@@ -0,0 +1,58 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum AchievementTransferMode {
+	
+	FULLTRANSFER(0, "完全转让"),
+	PERMISSIONTRANSFER(1,"许可转让"),
+	TECHNOLOGYSHARES(2,"技术入股"),
+	EXCLUSIVETECHNOLOGYSHARES(3, "5年独占许可转让"),
+	OTHER(4, "其他");
+
+	private AchievementTransferMode(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, AchievementTransferMode> status = new HashMap<Integer, AchievementTransferMode>();
+
+	static {
+		for (AchievementTransferMode value : AchievementTransferMode.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static AchievementTransferMode getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static AchievementTransferMode 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;
+	}
+
+}

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

@@ -50,7 +50,7 @@
   
    <delete id="batchDeleteByDemandIds" parameterType="java.util.List">
   	 delete from achievement_demand where demand_id in
-        <foreach item="item" collection="index" open="(" separator="," close=")">
+        <foreach item="item" collection="list" open="(" separator="," close=")">
             #{item}
         </foreach>
   </delete>
@@ -61,7 +61,7 @@
   
    <delete id="batchDeleteByAchievementIds" parameterType="java.util.List">
   	 delete from achievement_demand where achievement_id in
-        <foreach item="item" collection="index" open="(" separator="," close=")">
+        <foreach item="item" collection="list" open="(" separator="," close=")">
             #{item}
         </foreach>
   </delete>

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

@@ -86,7 +86,7 @@
   
   <delete id="batchDeleteByAchievementIds" parameterType="java.util.List">
   	 delete from achievement_keyword where achievement_id in
-        <foreach item="item" collection="index" open="(" separator="," close=")">
+        <foreach item="item" collection="list" open="(" separator="," close=")">
             #{item}
         </foreach>
   </delete>

+ 118 - 16
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -15,7 +15,7 @@
     <result column="field_b" jdbcType="INTEGER" property="fieldB" />
     <result column="field_c" jdbcType="INTEGER" property="fieldC" />
     <result column="maturity" jdbcType="INTEGER" property="maturity" />
-    <result column="maturity_picture_url" jdbcType="VARCHAR" property="maturityPictureUrl" />
+    <result column="maturity_picture_url" jdbcType="LONGVARCHAR" property="maturityPictureUrl" />
     <result column="maturity_text_file_url" jdbcType="VARCHAR" property="maturityTextFileUrl" />
     <result column="maturity_video_url" jdbcType="VARCHAR" property="maturityVideoUrl" />
     <result column="innovation" jdbcType="INTEGER" property="innovation" />
@@ -97,7 +97,7 @@
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER}, 
       #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR}, 
       #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER}, 
-      #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=VARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR}, 
+      #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=LONGVARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR}, 
       #{maturityVideoUrl,jdbcType=VARCHAR}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR},
       #{ownerType,jdbcType=INTEGER}, #{ownerIdNumber,jdbcType=VARCHAR}, #{ownerMobile,jdbcType=VARCHAR}, 
       #{ownerEmail,jdbcType=VARCHAR}, #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER}, 
@@ -312,7 +312,7 @@
         #{maturity,jdbcType=INTEGER},
       </if>
       <if test="maturityPictureUrl != null">
-        #{maturityPictureUrl,jdbcType=VARCHAR},
+        #{maturityPictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="maturityTextFileUrl != null">
         #{maturityTextFileUrl,jdbcType=VARCHAR},
@@ -470,7 +470,7 @@
         maturity = #{maturity,jdbcType=INTEGER},
       </if>
       <if test="maturityPictureUrl != null">
-        maturity_picture_url = #{maturityPictureUrl,jdbcType=VARCHAR},
+        maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="maturityTextFileUrl != null">
         maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
@@ -603,7 +603,7 @@
       field_b = #{fieldB,jdbcType=INTEGER},
       field_c = #{fieldC,jdbcType=INTEGER},
       maturity = #{maturity,jdbcType=INTEGER},
-      maturity_picture_url = #{maturityPictureUrl,jdbcType=VARCHAR},
+      maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
       maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
       maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
       innovation = #{innovation,jdbcType=INTEGER},
@@ -654,7 +654,7 @@
   	from achievement a
   	LEFT JOIN admin ad on a.id = a.tech_broker_id
   	LEFT JOIN user_identity ui on a.owner_id = ui.uid
-  	where deleted_sign = 0 and owner_type = 0
+  	where a.deleted_sign = 0 and a.owner_type = 0
   	<if test="ownerId != null">
 		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
 	</if>
@@ -685,7 +685,7 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
-	order by serial_number desc
+	order by a.serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -737,9 +737,9 @@
   		oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId
   	from achievement a
-  	LEFT JOIN admin ad on a.id = a.tech_broker_id
+  	LEFT JOIN admin ad on ad.id = a.tech_broker_id
   	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
-  	where deleted_sign = 0 and owner_type = 1
+  	where a.deleted_sign = 0 and a.owner_type = 1
   	<if test="ownerId != null">
 		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
 	</if>
@@ -762,7 +762,7 @@
 		and  a.status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
 	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
@@ -803,7 +803,7 @@
 		and  a.status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
 	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
@@ -822,7 +822,7 @@
   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
   	update achievement set deleted_sign = 1
   	where  id in 
-	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+	<foreach item="item"  collection="list" open="(" separator="," close=")">
 		#{item}
 	</foreach>
   </update>
@@ -857,10 +857,10 @@
 		and  status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and  release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="releaseStatus != null">
 	   and  release_status = #{releaseStatus,jdbcType=INTEGER}
@@ -898,7 +898,7 @@
 		and  status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
 	   and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
@@ -987,10 +987,11 @@
   		a.release_date as releaseDate, a.owner_type as ownerType, ui.username,
   		oi.unit_name as unitName, a.field_a as fieldA, a.field_b as fieldB,
   		a.transfer_price as transferPrice, a.maturity, a.transfer_mode as transferMode,
-  		a.bargaining_mode as bargainingMode
+  		a.bargaining_mode as bargainingMode, u.lvl as level
   	from achievement a 
   	left join user_identity ui on ui.uid = a.owner_id
   	left join organization_identity oi on oi.uid = a.owner_id
+  	left join user u on u.id = a.owner_id
   	where a.deleted_sign = 0 
   	<if test="keyword != null">
   		and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
@@ -1130,4 +1131,105 @@
 	AND owner_id = #{ownerId,jdbcType=VARCHAR}
   </select>
   
+  <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.keyword,
+		a.introduction,
+		a.maturity,
+		a.transfer_price AS transferPrice,
+		a.patent_case AS patentCase,
+		a.field_a as fieldA,
+		fg.name AS fieldAS,
+		fgg.name AS fieldBS,
+		a.release_date AS releaseDate,
+		dg.name as province,
+		dgg.name as city,
+		a.technical_picture_url AS technicalPictureUrl,
+		a.transfer_mode as transferMode,
+		interest.id as interestId
+	FROM
+		achievement a
+	LEFT JOIN user_identity ui ON a.owner_id = ui.uid
+	LEFT JOIN district_glossory dg on dg.id = ui.province
+	LEFT JOIN district_glossory dgg on dgg.id = ui.city
+	LEFT JOIN field_glossory fg on fg.id = a.field_a
+	LEFT JOIN field_glossory fgg on fgg.id = a.field_b
+	LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
+	WHERE
+		a.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+   <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.keyword,
+		a.introduction,
+		a.maturity,
+		a.transfer_price AS transferPrice,
+		a.patent_case AS patentCase,
+		a.field_a as fieldA,
+		fg.name AS fieldAS,
+		fgg.name AS fieldBS,
+		a.release_date AS releaseDate,
+		dg.name as province,
+		dgg.name as city,
+		a.technical_picture_url AS technicalPictureUrl,
+		a.transfer_mode as transferMode,
+		interest.id as interestId
+	FROM
+		achievement a
+	LEFT JOIN organization_identity oi ON a.owner_id = oi.uid
+	LEFT JOIN district_glossory dg on dg.id = oi.licence_province
+	LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
+	LEFT JOIN field_glossory fg on fg.id = a.field_a
+	LEFT JOIN field_glossory fgg on fgg.id = a.field_b
+	LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
+	WHERE
+		a.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.maturity,
+		ui.province,
+		ui.city,
+		a.transfer_price as transferPrice
+	FROM
+		achievement a
+	LEFT JOIN user_identity ui ON ui.uid = a.owner_id
+	WHERE
+		a.audit_status = 3
+	AND a.deleted_sign = 0
+	AND a.release_status = 1
+	AND a.field_a = #{fieldA,jdbcType=INTEGER}
+	AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
+	order by a.serial_number desc
+	limit 5 
+  </select>
+  
+  <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
+  	SELECT
+		a.id,
+		a.name,
+		a.maturity,
+		oi.licence_province as province,
+		oi.licence_city as city,
+		a.transfer_price as transferPrice
+	FROM
+		achievement a
+	LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
+	WHERE
+		a.audit_status = 3
+	AND a.deleted_sign = 0
+	AND a.release_status = 1
+	AND a.field_a = #{fieldA,jdbcType=INTEGER}
+	AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
+	order by a.serial_number desc
+	limit 5 
+  </select>
 </mapper>

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

@@ -85,7 +85,7 @@
   
   <delete id="batchDeleteByDemandIds" parameterType="java.util.List">
   	 delete from demand_keyword where demand_id in
-        <foreach item="item" collection="index" open="(" separator="," close=")">
+        <foreach item="item" collection="list" open="(" separator="," close=")">
             #{item}
         </foreach>
   </delete>

+ 94 - 15
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -14,7 +14,7 @@
     <result column="demand_type" property="demandType" jdbcType="INTEGER" />
     <result column="problem_des" property="problemDes" jdbcType="VARCHAR" />
     <result column="technical_requirements" property="technicalRequirements" jdbcType="VARCHAR" />
-    <result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
+    <result column="picture_url" property="pictureUrl" jdbcType="LONGVARCHAR" />
     <result column="text_file_url" property="textFileUrl" jdbcType="VARCHAR" />
     <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
     <result column="fixed_budget" property="fixedBudget" jdbcType="DECIMAL" />
@@ -76,7 +76,7 @@
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER}, 
       #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER}, 
       #{demandType,jdbcType=INTEGER}, #{problemDes,jdbcType=VARCHAR}, #{technicalRequirements,jdbcType=VARCHAR}, 
-      #{pictureUrl,jdbcType=VARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR}, 
+      #{pictureUrl,jdbcType=LONGVARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR}, 
       #{fixedBudget,jdbcType=DECIMAL}, #{fixedCycle,jdbcType=VARCHAR}, #{peopleNumber,jdbcType=INTEGER}, 
       #{fixedScheme,jdbcType=VARCHAR}, #{costEscrow,jdbcType=DECIMAL}, #{budgetCost,jdbcType=DECIMAL}, 
       #{validityPeriod,jdbcType=TIMESTAMP}, #{employerId,jdbcType=VARCHAR}, #{employerName,jdbcType=VARCHAR}, 
@@ -239,7 +239,7 @@
         #{technicalRequirements,jdbcType=VARCHAR},
       </if>
       <if test="pictureUrl != null" >
-        #{pictureUrl,jdbcType=VARCHAR},
+        #{pictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="textFileUrl != null" >
         #{textFileUrl,jdbcType=VARCHAR},
@@ -352,7 +352,7 @@
         technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
       </if>
       <if test="pictureUrl != null" >
-        picture_url = #{pictureUrl,jdbcType=VARCHAR},
+        picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="textFileUrl != null" >
         text_file_url = #{textFileUrl,jdbcType=VARCHAR},
@@ -442,7 +442,7 @@
       demand_type = #{demandType,jdbcType=INTEGER},
       problem_des = #{problemDes,jdbcType=VARCHAR},
       technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
-      picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
       text_file_url = #{textFileUrl,jdbcType=VARCHAR},
       video_url = #{videoUrl,jdbcType=VARCHAR},
       fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
@@ -783,7 +783,7 @@
   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
   	update demand set deleted_sign = 1
   	where  id in 
-	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+	<foreach item="item"  collection="list" open="(" separator="," close=")">
 		#{item}
 	</foreach>
   </update>
@@ -824,13 +824,13 @@
 		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
 	</if>
 	<if test="vStart != null">
-	   and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="vEnd != null">
-	   and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rStart != null">
-       and	d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
 	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
@@ -844,10 +844,14 @@
   <select id="findDemandCount" parameterType="String" resultType="java.lang.Integer">
   		select count(1)
 	from  demand d 
-	where d.deleted_sign = 0 and d.data_category = 1 
+	where d.deleted_sign = 0 
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
 	<if test="serialNumber != null">
 		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
 	<if test="name != null">
 		and  d.name = #{name,jdbcType=VARCHAR}
 	</if>
@@ -864,16 +868,16 @@
 		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
 	</if>
 	<if test="vStart != null">
-	   and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="vEnd != null">
-	   and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rStart != null">
-       and	d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and  d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
   </select>
   
@@ -903,10 +907,11 @@
 	  		d.serial_number as serialNumber, d.data_category as dataCategory, d.industry_category_a as industryCategoryA,
 	  		d.industry_category_b as industryCategoryB, d.demand_type as demandType, d.budget_cost as budgetCost,
 	  		d.problem_des as problemDes, d.release_date as releaseDate, ui.username,
-	  		oi.unit_name as unitName
+	  		oi.unit_name as unitName, u.lvl as level
   		from demand d
   		left join user_identity ui on d.employer_id = ui.uid
   		left join organization_identity oi on d.employer_id = oi.uid
+  		left join user u on u.id = d.employer_id
   		where d.deleted_sign = 0 and d.status = 0
   		<if test="keyword != null">
   			and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
@@ -1023,4 +1028,78 @@
 	AND deleted_sign = 0
 	AND employer_id = #{employerId,jdbcType=VARCHAR}
   </select>
+  
+  <select id="findUserPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
+  	SELECT
+		d.id,
+		d.name,
+		d.keyword,
+		d.industry_category_a AS industryCategoryA,
+		fg.name AS industryCategoryAS,
+		fgg.name AS industryCategorBS,
+		d.budget_cost AS budgetCost,
+		d.problem_des AS problemDes,
+		dg.name AS province,
+		dgg.name AS city,
+		interest.id as interestId
+	FROM
+		demand d
+	LEFT JOIN user_identity ui ON d.employer_id = ui.uid
+	LEFT JOIN district_glossory dg ON dg.id = ui.province
+	LEFT JOIN district_glossory dgg ON dgg.id = ui.city
+	LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
+	LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
+	LEFT JOIN demand_interest interest on interest.demand_id = d.id and interest.uid = #{uid,jdbcType=VARCHAR}
+	WHERE
+		d.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="findOrgPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
+  	SELECT
+		d.id,
+		d.name,
+		d.keyword,
+		d.industry_category_a AS industryCategoryA,
+		fg.name AS industryCategoryB,
+		fgg.name AS industryCategoryC,
+		d.budget_cost AS budgetCost,
+		d.problem_des AS problemDes,
+		dg.name AS province,
+		dgg.name AS city,
+		interest.id as interestId
+	FROM
+		demand d
+	LEFT JOIN organization_identity oi ON d.employer_id = oi.uid
+	LEFT JOIN district_glossory dg ON dg.id = oi.licence_province
+	LEFT JOIN district_glossory dgg ON dgg.id = oi.licence_city
+	LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
+	LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
+	LEFT JOIN demand_interest interest on interest.demand_id = d.id and interest.uid = #{uid,jdbcType=VARCHAR}
+	WHERE
+		d.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="findByIndustryCategoryA"  resultType="com.goafanti.portal.bo.DemandPortalSimilarListBo">
+  	 select 
+	    d.id,
+	    d.name,
+	    fg.name as industryCategoryAS,
+	    fgg.name as industryCategoryBS,
+	    d.problem_des as problemDes,
+	    d.budget_cost as budgetCost,
+	    u.lvl as level
+    from 
+    	demand d
+    left join user u on u.id = d.employer_id
+    LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
+	LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
+    where 
+    	d.audit_status = 3
+    and d.release_status = 1
+    and d.deleted_sign = 0
+    and	d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
+    and d.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
+    order by d.serial_number desc
+    limit 5
+  </select>
 </mapper>

+ 82 - 0
src/main/java/com/goafanti/common/mapper/FieldGlossoryMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.goafanti.common.dao.FieldGlossoryMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.FieldGlossory" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="pid" property="pid" jdbcType="INTEGER" />
+    <result column="level" property="level" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, name, pid, level
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from field_glossory
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from field_glossory
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.FieldGlossory" >
+    insert into field_glossory (id, name, pid, 
+      level)
+    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=INTEGER}, 
+      #{level,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.FieldGlossory" >
+    insert into field_glossory
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="pid != null" >
+        pid,
+      </if>
+      <if test="level != null" >
+        level,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="pid != null" >
+        #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="level != null" >
+        #{level,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.FieldGlossory" >
+    update field_glossory
+    <set >
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="pid != null" >
+        pid = #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="level != null" >
+        level = #{level,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.FieldGlossory" >
+    update field_glossory
+    set name = #{name,jdbcType=VARCHAR},
+      pid = #{pid,jdbcType=INTEGER},
+      level = #{level,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

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

@@ -1163,7 +1163,7 @@
 				oi.id as identityId, info.logo_url as logoUrl,
 				oi.licence_province as province
 			FROM
-				USER u
+				<![CDATA[ user ]]> u
 			LEFT JOIN organization_identity oi ON oi.uid = u.id
 			LEFT JOIN organization_info info on info.uid = u.id
 			WHERE
@@ -1210,7 +1210,7 @@
 			SELECT
 				u.id as uid
 			FROM
-				USER u
+				<![CDATA[ user ]]> u
 			LEFT JOIN organization_identity oi ON oi.uid = u.id
 			LEFT JOIN organization_info info on info.uid = u.id
 			WHERE

+ 58 - 0
src/main/java/com/goafanti/common/mapper/SysDictMapper.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.SysDictMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.SysDict">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="value" jdbcType="VARCHAR" property="value" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, value
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from sys_dict
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from sys_dict
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.SysDict">
+    insert into sys_dict (id, value)
+    values (#{id,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.SysDict">
+    insert into sys_dict
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="value != null">
+        value,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="value != null">
+        #{value,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.SysDict">
+    update sys_dict
+    <set>
+      <if test="value != null">
+        value = #{value,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.SysDict">
+    update sys_dict
+    set value = #{value,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

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

@@ -585,13 +585,15 @@
 		u.lvl AS LEVEL,
 		ua.ability_label AS abilityLabel,
 		info.personal_profile AS personalProfile,
-		info.life_photo_url AS lifePhotoUrl
+		info.life_photo_url AS lifePhotoUrl,
+		interest.id as interestId
 	FROM
-		user u
+		<![CDATA[ user ]]> u
 	LEFT JOIN user_identity ui ON ui.uid = u.id
 	LEFT JOIN user_career uc ON uc.uid = u.id
 	LEFT JOIN user_ability ua ON ua.uid = u.id
 	LEFT JOIN user_info info ON info.uid = u.id
+	LEFT JOIN user_interest interest on interest.to_uid = u.id and interest.from_uid = #{tokenId,jdbcType=VARCHAR}
 	WHERE
 		u.type = 0
 	and u.id = #{uid,jdbcType=VARCHAR}
@@ -607,12 +609,14 @@
 		ua.ability_label AS abilityLabel,
 		info.logo_url AS logoUrl,
 		info.company_introduction AS company_introduction,
-		info.publicity_picture_url AS publicityPictureUrl
+		info.publicity_picture_url AS publicityPictureUrl,
+		interest.id as interestId
 	FROM
-	USER u
+	<![CDATA[ user ]]> u
 	LEFT JOIN organization_identity oi ON oi.uid = u.id
 	LEFT JOIN organization_info info ON info.uid = u.id
 	LEFT JOIN user_ability ua ON ua.uid = u.id
+	LEFT JOIN user_interest interest on interest.to_uid = u.id and interest.from_uid = #{tokenId,jdbcType=VARCHAR}
 	WHERE
 		u.type = 1
 	and u.id = #{uid,jdbcType=VARCHAR} 

+ 52 - 0
src/main/java/com/goafanti/common/model/FieldGlossory.java

@@ -0,0 +1,52 @@
+package com.goafanti.common.model;
+
+public class FieldGlossory {
+    private Integer id;
+
+    /**
+    * 名称
+    */
+    private String name;
+
+    /**
+    * 上级ID
+    */
+    private Integer pid;
+
+    /**
+    * 层级
+    */
+    private Integer level;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getPid() {
+        return pid;
+    }
+
+    public void setPid(Integer pid) {
+        this.pid = pid;
+    }
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+}

+ 23 - 0
src/main/java/com/goafanti/common/model/SysDict.java

@@ -0,0 +1,23 @@
+package com.goafanti.common.model;
+
+public class SysDict {
+    private String id;
+
+    private String value;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 29 - 0
src/main/java/com/goafanti/common/service/FieldGlossoryService.java

@@ -0,0 +1,29 @@
+package com.goafanti.common.service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.FieldGlossoryMapper;
+import com.goafanti.common.utils.LoggerUtils;
+@Service
+public class FieldGlossoryService {
+	@Autowired
+	FieldGlossoryMapper		fieldGlossoryMapper;
+	
+	private static final Logger	logger	= LoggerFactory.getLogger(FieldGlossoryService.class);
+	
+	@Cacheable(value = "FieldGlossoryCache", key = "'FieldGlossory:'+#id")
+	public String getName(Integer id){
+		LoggerUtils.debug(logger, "缓存领域列表:[%s]", id);
+		return fieldGlossoryMapper.selectByPrimaryKey(id).getName();
+	}
+	
+	@CacheEvict(value = "FieldGlossoryCache", key = "'FieldGlossory:'+#id")
+	public void clear(Integer id) {
+		LoggerUtils.debug(logger, "清除领域列表缓存:[%s]", id);
+	}
+}

+ 29 - 0
src/main/java/com/goafanti/common/service/SysDictService.java

@@ -0,0 +1,29 @@
+package com.goafanti.common.service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.SysDictMapper;
+import com.goafanti.common.utils.LoggerUtils;
+@Service
+public class SysDictService {
+	@Autowired
+	SysDictMapper		sysDictMapper;
+	
+	private static final Logger	logger	= LoggerFactory.getLogger(SysDictService.class);
+	
+	@Cacheable(value = "SysDictCache", key = "'SysDict:'+#id")
+	public String getValue(String id){
+		LoggerUtils.debug(logger, "缓存字典:[%s]", id);
+		return sysDictMapper.selectByPrimaryKey(id).getValue();
+	}
+	
+	@CacheEvict(value = "SysDictCache", key = "'SysDict:'+#id")
+	public void clear(String id) {
+		LoggerUtils.debug(logger, "清除字典缓存:[%s]", id);
+	}
+}

+ 49 - 0
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -0,0 +1,49 @@
+package com.goafanti.common.utils;
+
+
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.exceptions.ServerException;
+import com.aliyuncs.profile.DefaultProfile;
+import com.aliyuncs.profile.IClientProfile;
+import com.aliyuncs.sms.model.v20160927.SingleSendSmsRequest;
+import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
+import com.goafanti.common.constant.ErrorConstants;
+
+public class MobileMessageUtils {
+	
+	private final static String SIGN_NAME = "阿凡提信息科技";
+	
+	private final static String SERVER_EXCEPTION = "服务器端手机验证码异常:%s";
+	
+	private final static String CLIENT_EXCEPTION = "客户端手机验证码异常:%s";
+
+	@SuppressWarnings("unused")
+	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey, String accessSecret) {
+		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
+		try {
+			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
+		} catch (ClientException e1) {
+			LoggerUtils.fmtError(MobileMessageUtils.class, e1, CLIENT_EXCEPTION, e1.getMessage());
+			return ErrorConstants.MCODE_ERROR;
+		}
+		IAcsClient client = new DefaultAcsClient(profile);
+		SingleSendSmsRequest request = new SingleSendSmsRequest();
+		try {
+			request.setSignName(SIGN_NAME);
+			request.setTemplateCode(templateCode);
+			request.setParamString(paramString);
+			request.setRecNum(mobile);
+			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
+		} catch (ServerException e) {
+			LoggerUtils.fmtError(MobileMessageUtils.class, e, SERVER_EXCEPTION, e.getMessage());
+			return ErrorConstants.MCODE_ERROR;
+		} catch (ClientException e) {
+			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
+			return ErrorConstants.MCODE_ERROR;
+		}
+		return null;
+	}
+
+}

+ 5 - 1
src/main/java/com/goafanti/core/shiro/listener/CustomSessionListener.java

@@ -28,11 +28,15 @@ public class CustomSessionListener implements SessionListener {
 	 */
 	@Override
 	public void onStop(Session session) {
-
+		removeFromCache(session);
 	}
 
 	@Override
 	public void onExpiration(Session session) {
+		removeFromCache(session);
+	}
+
+	private void removeFromCache(Session session) {
 		Object sessionId = session.getId();
 		if (sessionId != null && sessionId instanceof String) {
 			sessionId = (String) sessionId;

+ 9 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -11,6 +11,8 @@ import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
@@ -62,5 +64,12 @@ public interface DemandService {
 
 	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);
 
+	DemandPortalDetailBo findUserPortalDemandDetail(String id);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
+
+
 
 }

+ 24 - 6
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -47,6 +47,8 @@ import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
@@ -236,10 +238,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
 		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
-		demandMapper.updateReleaseDate(d.getId());
+		demandMapper.updateByPrimaryKeySelective(d);
 		demandKeywordMapper.batchDeleteByDemandId(d.getId());
 		achievementDemandMapper.deleteByDemandId(d.getId());
-		return demandMapper.updateByPrimaryKeySelective(d);
+		return demandMapper.updateReleaseDate(d.getId());
+		
 	}
 
 	@Override
@@ -276,13 +279,13 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
-		d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
 		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
 
 		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
 			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
-			d.setReleaseStatus(DemandReleaseStatus.RELEASED.getCode());
 			createAuditorNotice(d);
+		} else {
+			d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
 		}
 
 		d.setCreateTime(now.getTime());
@@ -399,7 +402,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 		if (!StringUtils.isBlank(validityPeriodEndDate)) {
 			try {
-				vEnd = DateUtils.parseDate(validityPeriodEndDate, AFTConstants.YYYYMMDD);
+				vEnd = DateUtils.addDays(DateUtils.parseDate(validityPeriodEndDate, AFTConstants.YYYYMMDD),1);
 			} catch (ParseException e) {
 			}
 		}
@@ -413,7 +416,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 		if (!StringUtils.isBlank(releaseDateEndDate)) {
 			try {
-				rEnd = DateUtils.parseDate(releaseDateEndDate, AFTConstants.YYYYMMDD);
+				rEnd = DateUtils.addDays(DateUtils.parseDate(releaseDateEndDate, AFTConstants.YYYYMMDD),1);
 			} catch (ParseException e) {
 			}
 		}
@@ -592,5 +595,20 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				params, pNo, pSize);
 	}
 
+	@Override
+	public DemandPortalDetailBo findUserPortalDemandDetail(String id) {
+		return demandMapper.findUserPortalDemandDetail(id);
+	}
+	
+	@Override
+	public DemandPortalDetailBo findOrgPortalDemandDetail(String id) {
+		return demandMapper.findOrgPortalDemandDetail(id);
+	}
+
+	@Override
+	public List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id) {
+		return demandMapper.findByIndustryCategoryA(industryCategoryA, id);
+	}
+
 
 }

+ 10 - 10
src/main/java/com/goafanti/evaluation/bo/Step3.java

@@ -5,43 +5,43 @@ import javax.validation.constraints.NotNull;
 
 public class Step3 {
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	progressiveness;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	innovativeness;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	ripeness;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	alternatives;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	defensive;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	prospect;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	supplyAndDemand;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	rangeOfApplication;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	imitable;
 	
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	profitability;
 
 	public Integer getProgressiveness() {

+ 4 - 2
src/main/java/com/goafanti/evaluation/bo/Step6.java

@@ -1,10 +1,12 @@
 package com.goafanti.evaluation.bo;
 
+import javax.validation.constraints.Max;
 import javax.validation.constraints.NotNull;
 
 public class Step6 {
 	@NotNull
-	private Integer	taxRate;
+	@Max(value = 75)
+	private Integer taxRate;
 
 	public Integer getTaxRate() {
 		return taxRate;
@@ -13,5 +15,5 @@ public class Step6 {
 	public void setTaxRate(Integer taxRate) {
 		this.taxRate = taxRate;
 	}
-	
+
 }

+ 5 - 5
src/main/java/com/goafanti/evaluation/bo/Step7.java

@@ -5,23 +5,23 @@ import javax.validation.constraints.NotNull;
 
 public class Step7 {
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	political;
 
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	technical;
 
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	market;
 
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	capital;
 
 	@NotNull
-	@Max(value = 7)
+	@Max(value = 6)
 	private Integer	management;
 
 	public Integer getPolitical() {

+ 323 - 38
src/main/java/com/goafanti/evaluation/controller/EvaluationController.java

@@ -4,7 +4,11 @@ import java.math.BigDecimal;
 import java.math.MathContext;
 import java.math.RoundingMode;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import javax.validation.Valid;
 
@@ -24,11 +28,14 @@ import com.alibaba.fastjson.JSONObject;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.model.DistrictGlossory;
 import com.goafanti.common.model.IndustryCategory;
 import com.goafanti.common.model.ValueEvaluation;
 import com.goafanti.common.service.IndustryCategoryService;
+import com.goafanti.common.service.SysDictService;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.dataGlossory.service.DistrictGlossoryService;
 import com.goafanti.evaluation.bo.ForecastIncome;
 import com.goafanti.evaluation.bo.Step1;
 import com.goafanti.evaluation.bo.Step2;
@@ -38,6 +45,7 @@ import com.goafanti.evaluation.bo.Step5;
 import com.goafanti.evaluation.bo.Step6;
 import com.goafanti.evaluation.bo.Step7;
 import com.goafanti.evaluation.bo.YearIncome;
+import com.goafanti.evaluation.enums.ProfitRate;
 import com.goafanti.evaluation.service.ValueEvaluationService;
 
 @RestController
@@ -45,18 +53,37 @@ import com.goafanti.evaluation.service.ValueEvaluationService;
 public class EvaluationController extends BaseApiController {
 
 	private static final Logger			logger				= LoggerFactory.getLogger(EvaluationController.class);
-	private static final MathContext	DEFAULT_PRECISION	= new MathContext(3, RoundingMode.HALF_UP);
+	private static final MathContext	DEFAULT_PRECISION	= new MathContext(4, RoundingMode.HALF_UP);
+
+	private static final String			STEP1				= "0";
+	private static final String			STEP2				= "1";
+	private static final String			STEP3				= "2";
+	private static final String			STEP4				= "3";
+	private static final String			STEP5				= "4";
+	private static final String			STEP6				= "5";
+	private static final String			STEP7				= "6";
+	private static final Integer[]		SCORES				= new Integer[] { 100, 80, 60, 40, 20, 0 };
+	private static final Integer[]		DISCOUNT_SCORES		= new Integer[] { 1, 2, 3, 4, 5 };
+	private static final BigDecimal		MIN_RATE			= new BigDecimal(2);
+	private static final BigDecimal		MAX_RATE			= new BigDecimal(6);
+	private static final BigDecimal		HUNDRED				= new BigDecimal(100);
+	private static final BigDecimal		PERCENTAGE			= new BigDecimal(0.01, DEFAULT_PRECISION);
 
 	@Autowired
 	ValueEvaluationService				valueEvaluationService;
 	@Autowired
+	private DistrictGlossoryService		districtGlossoryService;
+	@Autowired
 	private IndustryCategoryService		industryCategoryService;
+	@Autowired
+	private SysDictService				sysDictService;
 
 	@RequestMapping(value = "/create", method = RequestMethod.GET)
 	public Result create() {
 		ValueEvaluation ve = new ValueEvaluation();
 		ve.setUid(TokenManager.getUserId());
 		ve.setStep(0);
+		ve.setValue(0l);
 		ve.setLog("{}");
 		valueEvaluationService.insert(ve);
 		return new Result(ve.getId().toString());
@@ -68,9 +95,16 @@ public class EvaluationController extends BaseApiController {
 	}
 
 	@RequestMapping(value = "/info/{id}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
-	public String info(@PathVariable String id) {
+	public Result info(@PathVariable String id) {
 		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
-		return valueEvaluationService.getMyEvaluationSteps(Long.valueOf(id));
+		ValueEvaluation ve = valueEvaluationService.getMyEvaluation(Long.valueOf(id));
+		Assert.notNull(ve, ErrorConstants.EVALUATE_ID);
+		Map<String, Object> res = new HashMap<>();
+		res.put("name", ve.getName());
+		res.put("step", ve.getStep());
+		res.put("value", ve.getValue());
+		res.put("steps", JSON.parse(ve.getLog()));
+		return new Result().data(res);
 	}
 
 	@RequestMapping(value = "/remove", method = RequestMethod.POST)
@@ -94,14 +128,7 @@ public class EvaluationController extends BaseApiController {
 		if (handleBindingError(res, bindingResult)) {
 			return res;
 		}
-		ValueEvaluation ve = valueEvaluationService.getEvaluation(Long.valueOf(id));
-		Assert.notNull(ve, ErrorConstants.EVALUATE_ID);
-		ve.setName(data.getName());
-		ve.setStep(1);
-		JSONObject jo = JSON.parseObject(ve.getLog());
-		jo.put("0", data);
-		ve.setLog(jo.toJSONString());
-		res.data(valueEvaluationService.update(ve));
+		updateSteps(data, 1, "0", res, id);
 		return res;
 	}
 
@@ -112,7 +139,7 @@ public class EvaluationController extends BaseApiController {
 		if (handleBindingError(res, bindingResult)) {
 			return res;
 		}
-		updateSteps(data, 2, "1", res, id);
+		updateSteps(data, 2, STEP2, res, id);
 		return res;
 	}
 
@@ -123,7 +150,7 @@ public class EvaluationController extends BaseApiController {
 		if (handleBindingError(res, bindingResult)) {
 			return res;
 		}
-		updateSteps(data, 3, "2", res, id);
+		updateSteps(data, 3, STEP3, res, id);
 		return res;
 	}
 
@@ -146,7 +173,7 @@ public class EvaluationController extends BaseApiController {
 			res.error(buildError(ErrorConstants.EVALUATE_PARAM));
 		}
 		if (res.getError().isEmpty()) {
-			updateSteps(step, 4, "3", res, id);
+			updateSteps(step, 4, STEP4, res, id);
 		}
 		return res;
 	}
@@ -169,7 +196,7 @@ public class EvaluationController extends BaseApiController {
 			res.error(buildError(ErrorConstants.EVALUATE_PARAM));
 		}
 		if (res.getError().isEmpty()) {
-			updateSteps(step, 5, "4", res, id);
+			updateSteps(step, 5, STEP5, res, id);
 		}
 		return res;
 	}
@@ -178,20 +205,20 @@ public class EvaluationController extends BaseApiController {
 	public Result step5Info(@PathVariable String id) {
 		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
 		Result res = new Result();
-		ValueEvaluation ve = valueEvaluationService.getEvaluation(Long.valueOf(id));
+		ValueEvaluation ve = valueEvaluationService.getMyEvaluation(Long.valueOf(id));
 		try {
 			JSONObject jo = JSON.parseObject(ve.getLog());
-			Step4 step4 = ((JSON) jo.get("3")).toJavaObject(Step4.class);
+			Step4 step4 = ((JSON) jo.get(STEP4)).toJavaObject(Step4.class);
 			if (step4.getHasIncome().equals(2)) {
-				Step1 step1 = ((JSON) jo.get("0")).toJavaObject(Step1.class);
-				res.data(getPredicateIncome(step4.getIncomes(), getIndustryCategoryValue(step1)));
+				Step1 step1 = ((JSON) jo.get(STEP1)).toJavaObject(Step1.class);
+				res.data(calcForecastIncome(step4.getIncomes(), getIndustryCategoryValue(step1)));
 			}
 		} catch (Exception e) {
 			res.error(buildError(ErrorConstants.EVALUATE_PARAM));
 		}
 		return res;
 	}
-	
+
 	@RequestMapping(value = "/step6", method = RequestMethod.POST)
 	public Result step6(String id, @Valid Step6 data, BindingResult bindingResult) {
 		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
@@ -199,10 +226,10 @@ public class EvaluationController extends BaseApiController {
 		if (handleBindingError(res, bindingResult)) {
 			return res;
 		}
-		updateSteps(data, 6, "5", res, id);
+		updateSteps(data, 6, STEP6, res, id);
 		return res;
 	}
-	
+
 	@RequestMapping(value = "/step7", method = RequestMethod.POST)
 	public Result step7(String id, @Valid Step7 data, BindingResult bindingResult) {
 		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
@@ -210,14 +237,262 @@ public class EvaluationController extends BaseApiController {
 		if (handleBindingError(res, bindingResult)) {
 			return res;
 		}
-		updateSteps(data, 7, "6", res, id);
+		updateSteps(data, 7, STEP7, res, id);
 		return res;
 	}
 
+	@RequestMapping(value = "/calc/{id}", method = RequestMethod.GET)
+	public Result calc(@PathVariable String id) {
+		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
+		Result res = new Result();
+		ValueEvaluation ve = valueEvaluationService.getMyEvaluation(Long.valueOf(id));
+		if (ve == null || ve.getStep() < 7) {
+			res.error(buildError(ErrorConstants.EVALUATE_ID));
+		} else {
+			Long value = calcValue(ve, new HashMap<>());
+			res.data(value);
+			ValueEvaluation upt = new ValueEvaluation();
+			upt.setId(ve.getId());
+			upt.setValue(value);
+			valueEvaluationService.update(upt);
+		}
+		return res;
+	}
+
+	@RequestMapping(value = "/report/{id}", method = RequestMethod.GET)
+	public Result report(@PathVariable String id) {
+		Assert.isTrue(StringUtils.isNumeric(id), ErrorConstants.EVALUATE_ID);
+		Result res = new Result();
+		ValueEvaluation ve = valueEvaluationService.getMyEvaluation(Long.valueOf(id));
+		if (ve == null || ve.getStep() < 7) {
+			res.error(buildError(ErrorConstants.EVALUATE_ID));
+		} else {
+			Map<String, Object> map = new HashMap<>();
+			calcValue(ve, map);
+			res.data(map);
+		}
+		return res;
+	}
+
+	private Long calcValue(ValueEvaluation ve, Map<String, Object> result) {
+		JSONObject log = JSON.parseObject(ve.getLog());
+		Step1 step1 = ((JSON) log.get(STEP1)).toJavaObject(Step1.class);
+		Step2 step2 = ((JSON) log.get(STEP2)).toJavaObject(Step2.class);
+		Step3 step3 = ((JSON) log.get(STEP3)).toJavaObject(Step3.class);
+		Step5 step5 = ((JSON) log.get(STEP5)).toJavaObject(Step5.class);
+		Step6 step6 = ((JSON) log.get(STEP6)).toJavaObject(Step6.class);
+		Step7 step7 = ((JSON) log.get(STEP7)).toJavaObject(Step7.class);
+		Integer timeLeft = step1.getTimeLeft();
+		timeLeft = timeLeft < 3 ? 3 : timeLeft > 10 ? 10 : timeLeft; // 剩余经济寿命最低3,最大10年
+		Map<Integer, IndustryCategory> subs = getIndustryCates(step1.getIndustry());
+
+		Map<Integer, DistrictGlossory> provinces = getProvinces();
+
+		result.put("subIndustries", Stream.of(step1.getSubIndustry().split(",")).map(it -> {
+			return subs.get(Integer.valueOf(it)).getName();
+		}).collect(Collectors.joining(",")));
+
+		result.put("transferArea", Stream.of(step1.getTransferArea().split(",")).map(it -> {
+			return it.equals("0") ? "中国全境" : provinces.get(Integer.valueOf(it)).getName();
+		}).collect(Collectors.joining(",")));
+
+		result.put("industry", industryCategoryService.list(0).stream().filter(it -> {
+			return it.getId().equals(step1.getIndustry());
+		}).findFirst().get().getName());
+
+		BigDecimal industryAverageRate = getIndustryCategoryValue(step1, subs);
+		List<Long> userForecast = step5.getForecastIncomes().stream().map(fc -> {
+			return fc.getIncome();
+		}).collect(Collectors.toList());
+		List<Long> sysForecast = calcSysForecast(userForecast, industryAverageRate, timeLeft);
+		List<Long> measuredForecast = calcMeasuredForecast(userForecast, sysForecast);
+
+		Map<String, Integer> profitScores = getProfitScores(step2, step3);
+		Map<String, Integer> discountRates = getDiscountRates(step7);
+
+		BigDecimal profitRate = calcProfitRate(profitScores, step1.getIndustry());
+
+		BigDecimal governmentLoanRoR = new BigDecimal(sysDictService.getValue("government_loan_ror"),
+				MathContext.DECIMAL32);
+		BigDecimal taxRate = new BigDecimal(step6.getTaxRate());
+
+		BigDecimal discountRate = calcDiscountRate(discountRates, taxRate, governmentLoanRoR);
+
+		result.put("userForecast", userForecast);
+		result.put("sysForecast", sysForecast);
+		result.put("measuredForecast", measuredForecast);
+		result.put("profitRate", profitRate);
+		result.put("governmentLoanRoR", governmentLoanRoR);
+		result.put("industryAverageRate", industryAverageRate);
+		result.put("discountRate", discountRate);
+		result.put("benchmarkDate", step1.getBenchmarkDate());
+		result.put("timeLeft", timeLeft);
+		result.put("name", step1.getName());
+		Long value = calcTotal(measuredForecast, profitRate, discountRate, result);
+		result.put("value", value);
+		result.put("log", log);
+		return value;
+	}
+
+	private Long calcTotal(List<Long> measuredForecast, BigDecimal profitRate, BigDecimal discountRate,
+			Map<String, Object> result) {
+		List<Long> profitList = new ArrayList<>();
+		BigDecimal total = BigDecimal.ZERO;
+		BigDecimal incomeDiscount = BigDecimal.ZERO;
+		double discountTerm = 0.5;
+		int index = 0;
+		BigDecimal discountFactor = BigDecimal.ZERO;
+		for (Long val : measuredForecast) {
+			incomeDiscount = new BigDecimal(val).multiply(profitRate);
+			profitList.add(incomeDiscount.longValue());
+			discountFactor = BigDecimal.ONE.divide(BigDecimal.ONE.add(discountRate), 4, RoundingMode.FLOOR);
+			discountTerm += index;
+			double pow = Math.pow(discountFactor.doubleValue(), discountTerm);
+			total = total.add(incomeDiscount.multiply(new BigDecimal(pow)));
+			index++;
+		}
+		result.put("profitList", profitList); // 收入分成额
+		return total.longValue();
+	}
+
+	private BigDecimal calcDiscountRate(Map<String, Integer> discountRates, BigDecimal taxRate,
+			BigDecimal governmentLoanRoR) {
+		BigDecimal discountRate = new BigDecimal(discountRates.get("capital"))
+				.add(new BigDecimal(discountRates.get("management"))).add(new BigDecimal(discountRates.get("market")))
+				.add(new BigDecimal(discountRates.get("political")))
+				.add(new BigDecimal(discountRates.get("technical")));
+		discountRate = discountRate.add(governmentLoanRoR).divide(HUNDRED.subtract(taxRate), 4, RoundingMode.FLOOR);
+		double rate = discountRate.doubleValue();
+		rate = rate > 0.3 ? 0.3 : rate < 0.17 ? 0.17 : rate;
+		discountRate = new BigDecimal(rate, DEFAULT_PRECISION);
+		return discountRate;
+	}
+
+	private Map<String, Integer> getDiscountRates(Step7 step7) {
+		Map<String, Integer> profitScores = new HashMap<>();
+		profitScores.put("capital", getDiscountScore(step7.getCapital()));// 资金风险
+		profitScores.put("management", getDiscountScore(step7.getManagement()));// 管理风险
+		profitScores.put("market", getDiscountScore(step7.getMarket()));// 市场风险
+		profitScores.put("political", getDiscountScore(step7.getPolitical()));// 政策风险
+		profitScores.put("technical", getDiscountScore(step7.getTechnical()));// 技术风险
+		return profitScores;
+	}
+
+	private BigDecimal calcProfitRate(Map<String, Integer> profitScores, Integer industry) {
+		BigDecimal legalFactor = new BigDecimal(0.2, DEFAULT_PRECISION);
+		BigDecimal techFactor = new BigDecimal(0.6, DEFAULT_PRECISION);
+		BigDecimal fundFactor = legalFactor;
+
+		BigDecimal profitRate = new BigDecimal(profitScores.get("confidentiality")).multiply(legalFactor)
+				.multiply(new BigDecimal(0.4, DEFAULT_PRECISION));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("legalStatus")).multiply(legalFactor)
+				.multiply(new BigDecimal(0.3, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("decidability")).multiply(legalFactor)
+				.multiply(new BigDecimal(0.3, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("prospect")).multiply(techFactor)
+				.multiply(new BigDecimal(0.1, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("alternatives")).multiply(techFactor)
+				.multiply(new BigDecimal(0.2, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("progressiveness")).multiply(techFactor)
+				.multiply(new BigDecimal(0.2, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("innovativeness")).multiply(techFactor)
+				.multiply(new BigDecimal(0.1, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("ripeness")).multiply(techFactor)
+				.multiply(new BigDecimal(0.2, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("rangeOfApplication")).multiply(techFactor)
+				.multiply(new BigDecimal(0.1, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("defensive")).multiply(techFactor)
+				.multiply(new BigDecimal(0.1, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("supplyAndDemand")).multiply(fundFactor)
+				.multiply(new BigDecimal(0.6, DEFAULT_PRECISION)));
+		profitRate = profitRate.add(new BigDecimal(profitScores.get("profitability")).multiply(fundFactor)
+				.multiply(new BigDecimal(0.4, DEFAULT_PRECISION)));
+
+		BigDecimal minRate = MIN_RATE;
+		BigDecimal maxRate = MAX_RATE;
+		if (ProfitRate.containsType(industry)) {
+			ProfitRate pr = ProfitRate.getProfitRate(industry);
+			minRate = new BigDecimal(pr.getMinRate());
+			maxRate = new BigDecimal(pr.getMaxRate());
+		}
+
+		profitRate = maxRate.subtract(minRate).multiply(profitRate.multiply(PERCENTAGE)).add(minRate)
+				.multiply(PERCENTAGE).setScale(4, RoundingMode.FLOOR);
+
+		return profitRate;
+	}
+
+	private Map<String, Integer> getProfitScores(Step2 step2, Step3 step3) {
+		// 法律因素权重 20%
+		Map<String, Integer> profitScores = new HashMap<>();
+		profitScores.put("legalStatus", getScore(step2.getLegalStatus()));// 法律状态
+		profitScores.put("confidentiality", getScore(step2.getConfidentiality()));// 保密性
+		profitScores.put("decidability", getScore(step2.getDecidability()));// 侵权可判定性
+		// 技术因素权重 60%
+		profitScores.put("prospect", getScore(step3.getProspect()));// 领域前景
+		profitScores.put("alternatives", getScore(step3.getAlternatives()));// 可替代性
+		profitScores.put("progressiveness", getScore(step3.getProgressiveness()));// 先进性
+		profitScores.put("innovativeness", getScore(step3.getInnovativeness()));// 创新性
+		profitScores.put("ripeness", getScore(step3.getRipeness()));// 成熟度
+		profitScores.put("rangeOfApplication", getScore(step3.getRangeOfApplication()));// 应用范围
+		profitScores.put("defensive", getScore(step3.getDefensive()));// 应用范围
+		// 经济因素 20%
+		profitScores.put("supplyAndDemand", getScore(step3.getSupplyAndDemand()));// 供求关系
+		profitScores.put("profitability", getScore(step3.getProfitability()));// 独立获利能力
+
+		return profitScores;
+	}
+
+	private Integer getScore(int option) {
+		int idx = option - 1;
+		idx = idx < 0 ? 0 : idx >= SCORES.length ? SCORES.length - 1 : idx;
+		return SCORES[idx];
+	}
+
+	private Integer getDiscountScore(int option) {
+		int idx = option - 1;
+		idx = idx < 0 ? 0 : idx >= DISCOUNT_SCORES.length ? DISCOUNT_SCORES.length - 1 : idx;
+		return DISCOUNT_SCORES[idx];
+	}
+
+	private List<Long> calcSysForecast(List<Long> userForecast, BigDecimal industryAverageRate, Integer timeLeft) {
+		List<Long> sysForecast = new ArrayList<>();
+		BigDecimal rate = BigDecimal.ONE;
+		BigDecimal lastYear = BigDecimal.ZERO;
+		BigDecimal step = new BigDecimal(0.1, DEFAULT_PRECISION);
+		industryAverageRate = industryAverageRate.multiply(PERCENTAGE);
+		for (int i = 0; i < timeLeft; i++) {
+			if (i == 0) {
+				lastYear = new BigDecimal(userForecast.get(0)).multiply(new BigDecimal(0.9, DEFAULT_PRECISION));
+			} else if (i < 6) {
+				lastYear = lastYear.multiply(BigDecimal.ONE
+						.add(industryAverageRate.multiply(rate.subtract(step.multiply(new BigDecimal(i))))));
+			}
+			sysForecast.add(lastYear.longValue());
+		}
+		return sysForecast;
+	}
+
+	private List<Long> calcMeasuredForecast(List<Long> userForecast, List<Long> sysForecast) {
+		List<Long> measuredForecast = new ArrayList<>();
+		for (int i = 0; i < sysForecast.size(); i++) {
+			if (i < userForecast.size()) {
+				measuredForecast.add((userForecast.get(i) + sysForecast.get(i)) >> 1);
+			} else {
+				measuredForecast.add(sysForecast.get(i));
+			}
+		}
+		return measuredForecast;
+	}
+
 	private void updateSteps(Object step, Integer nextStep, String key, Result res, String id) {
-		ValueEvaluation ve = valueEvaluationService.getEvaluation(Long.valueOf(id));
+		ValueEvaluation ve = valueEvaluationService.getMyEvaluation(Long.valueOf(id));
 		Assert.notNull(ve, ErrorConstants.EVALUATE_ID);
 		ve.setStep(Math.max(nextStep, ve.getStep()));
+		if (nextStep == 1) {
+			ve.setName(((Step1) step).getName());
+		}
+		ve.setValue(0l);
 		JSONObject jo = JSON.parseObject(ve.getLog());
 		jo.put(key, step);
 		ve.setLog(jo.toJSONString());
@@ -235,25 +510,35 @@ public class EvaluationController extends BaseApiController {
 	}
 
 	private BigDecimal getIndustryCategoryValue(Step1 step1) {
-		List<IndustryCategory> cates = industryCategoryService.list(step1.getIndustry());
-		String[] subs = step1.getSubIndustry().split(",");
-		Integer[] subIds = new Integer[subs.length];
-		for (int i = 0; i < subs.length; i++) {
-			subIds[i] = Integer.valueOf(subs[i]);
-		}
+		return getIndustryCategoryValue(step1, getIndustryCates(step1.getIndustry()));
+	}
+
+	private Map<Integer, IndustryCategory> getIndustryCates(Integer pid) {
+		return industryCategoryService.list(pid).stream()
+				.collect(Collectors.toMap(IndustryCategory::getId, (it) -> it));
+	}
+
+	private Map<Integer, DistrictGlossory> getProvinces() {
+		return districtGlossoryService.list(0).stream().collect(Collectors.toMap(DistrictGlossory::getId, (it) -> it));
+	}
+
+	private BigDecimal getIndustryCategoryValue(Step1 step1, Map<Integer, IndustryCategory> cates) {
+		List<Integer> subIds = Stream.of(step1.getSubIndustry().split(",")).map(it -> {
+			return Integer.valueOf(it);
+		}).collect(Collectors.toList());
 		BigDecimal average = BigDecimal.ZERO;
-		for (IndustryCategory ic : cates) {
-			for (int i = 0; i < subIds.length; i++) {
-				if (ic.getId().equals(subIds[i])) {
-					average = average.add(ic.getValue());
-				}
+		int count = 0;
+		for (Integer id : subIds) {
+			if (cates.containsKey(id)) {
+				average = average.add(cates.get(id).getValue());
+				count++;
 			}
 		}
-		return average.divide(new BigDecimal(3), 2, RoundingMode.HALF_UP);
+		return average.divide(new BigDecimal(count == 0 ? 1 : count), 2, RoundingMode.HALF_UP);
 	}
 
-	private Long[] getPredicateIncome(List<YearIncome> incomes, BigDecimal growth) {
-		BigDecimal useGrowth = growth.divide(new BigDecimal(100), 2, RoundingMode.CEILING);
+	private Long[] calcForecastIncome(List<YearIncome> incomes, BigDecimal growth) {
+		BigDecimal useGrowth = growth.multiply(PERCENTAGE);
 		BigDecimal base = new BigDecimal(incomes.get(0).getIncome());
 		if (!incomes.get(1).getIncome().equals(0)) {
 			useGrowth = base.divide(new BigDecimal(incomes.get(1).getIncome()), 2, RoundingMode.CEILING)

+ 81 - 0
src/main/java/com/goafanti/evaluation/enums/ProfitRate.java

@@ -0,0 +1,81 @@
+package com.goafanti.evaluation.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum ProfitRate {
+	CJ(1, "采掘", 2, 6),
+	HG(2, "化工", 2, 3.5),
+	GT(3, "钢铁", 2, 6),
+	JZCL(4, "建筑材料", 2, 6),
+	JZZS(5, "建筑装饰", 2, 6),
+	DQSB(6, "电气设备", 3, 4.5),
+	JXSB(7, "机械设备", 1.5, 3),
+	GFJG(8, "国防军工", 2, 6),
+	QC(9, "汽车", 2, 6),
+	JYDQ(10, "家用电器", 1, 2.5),
+	FZFZ(11, "纺织服装", 1, 2.5),
+	QGZZ(12, "轻工制造", 2, 6),
+	SYMY(13, "商业贸易", 1, 2.5),
+	NLMY(14, "农林牧渔", 2, 6),
+	SPYL(15, "食品饮料", 1, 2.5),
+	XXFW(16, "休闲服务", 1, 2.5),
+	YYSW(17, "医药生物", 2.5, 4),
+	GGSY(18, "公用事业", 2, 6),
+	JTYS(19, "交通运输", 2, 6),
+	FDC(20, "房地产", 2, 6),
+	DZ(21, "电子", 7, 10),
+	JSJ(22, "计算机", 4, 5.5),
+	CM(23, "传媒", 2, 6),
+	TX(24, "通信", 2, 6),
+	YH(25, "银行", 2, 6);
+
+	private Integer							id;
+	private String							desc;
+	private double							minRate;
+	private double							maxRate;
+
+	private static Map<Integer, ProfitRate>	map	= new HashMap<Integer, ProfitRate>();
+
+	private ProfitRate(Integer id, String desc, double minRate, double maxRate) {
+		this.id = id;
+		this.desc = desc;
+		this.minRate = minRate;
+		this.maxRate = maxRate;
+	}
+
+	static {
+		for (ProfitRate value : ProfitRate.values()) {
+			map.put(value.getId(), value);
+		}
+	}
+
+	public static ProfitRate getProfitRate(Integer code) {
+		return map.get(code);
+	}
+
+	public static String getFieldDesc(Integer code) {
+		return containsType(code) ? getProfitRate(code).getDesc() : "";
+	}
+
+	public static boolean containsType(Integer code) {
+		return map.containsKey(code);
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+	public double getMinRate() {
+		return minRate;
+	}
+
+	public double getMaxRate() {
+		return maxRate;
+	}
+
+}

+ 1 - 9
src/main/java/com/goafanti/evaluation/service/ValueEvaluationService.java

@@ -33,21 +33,13 @@ public class ValueEvaluationService extends BaseMybatisDao<ValueEvaluationMapper
 		return valueEvaluationMapper.updateByPrimaryKeySelective(ve);
 	}
 
-	public ValueEvaluation getEvaluation(Long id) {
+	public ValueEvaluation getMyEvaluation(Long id) {
 		Map<String, Object> params = new HashMap<>();
 		params.put("uid", TokenManager.getUserId());
 		params.put("id", id);
 		return valueEvaluationMapper.selectByPrimaryKeyAndUser(params);
 	}
 
-	public String getMyEvaluationSteps(Long id) {
-		Map<String, Object> params = new HashMap<>();
-		params.put("uid", TokenManager.getUserId());
-		params.put("id", id);
-		ValueEvaluation ve = valueEvaluationMapper.selectByPrimaryKeyAndUser(params);
-		return ve == null ? "{}" : ve.getLog();
-	}
-
 	public int deleteMySteps(List<Long> ids) {
 		Map<String, Object> params = new HashMap<>();
 		params.put("uid", TokenManager.getUserId());

+ 246 - 0
src/main/java/com/goafanti/portal/bo/AchievementPortalDetailBo.java

@@ -0,0 +1,246 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class AchievementPortalDetailBo {
+
+	private String			id;
+
+	private String			name;
+
+	private String			keyword;
+
+	private String			introduction;
+
+	private Integer			maturity;
+
+	private String			maturityS;
+
+	private BigDecimal		transferPrice;
+
+	private String			patentCase;
+	
+	private Integer 		fieldA;
+
+	private String			fieldAS;
+
+	private String			fieldBS;
+
+	private Date			releaseDate;
+
+	private String			province;
+
+	private String			city;
+
+	private String			technicalPictureUrl;
+
+	private Integer			transferMode;
+
+	private String			transferModeS;
+
+	private String			location;
+
+	private List<String>	pictureList;
+
+	private String			interestId;
+
+	private String			field;
+
+	private String			transferPriceS;
+	
+	public String getTransferPriceS() {
+		return transferPriceS;
+	}
+
+	public void setTransferPriceS(String transferPriceS) {
+		this.transferPriceS = transferPriceS;
+	}
+
+	public String getField() {
+		return field;
+	}
+
+	public void setField(String field) {
+		this.field = field;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
+	public String getIntroduction() {
+		return introduction;
+	}
+
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+
+	public Integer getMaturity() {
+		return maturity;
+	}
+
+	public void setMaturity(Integer maturity) {
+		this.maturity = maturity;
+	}
+
+	public BigDecimal getTransferPrice() {
+		return transferPrice;
+	}
+
+	public void setTransferPrice(BigDecimal transferPrice) {
+		this.transferPrice = transferPrice;
+	}
+
+	public String getPatentCase() {
+		return patentCase;
+	}
+
+	public void setPatentCase(String patentCase) {
+		this.patentCase = patentCase;
+	}
+
+
+	public Date getReleaseDate() {
+		return releaseDate;
+	}
+
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+
+	public String getTechnicalPictureUrl() {
+		return technicalPictureUrl;
+	}
+
+	public void setTechnicalPictureUrl(String technicalPictureUrl) {
+		this.technicalPictureUrl = technicalPictureUrl;
+	}
+
+	public Integer getTransferMode() {
+		return transferMode;
+	}
+
+	public void setTransferMode(Integer transferMode) {
+		this.transferMode = transferMode;
+	}
+
+	public List<String> getPictureList() {
+		return pictureList;
+	}
+
+	public void setPictureList(List<String> pictureList) {
+		this.pictureList = pictureList;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getTransferModeS() {
+		return transferModeS;
+	}
+
+	public void setTransferModeS(String transferModeS) {
+		this.transferModeS = transferModeS;
+	}
+
+	public String getMaturityS() {
+		return maturityS;
+	}
+
+	public void setMaturityS(String maturityS) {
+		this.maturityS = maturityS;
+	}
+
+	public String getInterestId() {
+		return interestId;
+	}
+
+	public void setInterestId(String interestId) {
+		this.interestId = interestId;
+	}
+	
+
+	public Integer getFieldA() {
+		return fieldA;
+	}
+
+	public void setFieldA(Integer fieldA) {
+		this.fieldA = fieldA;
+	}
+
+	public String getFieldAS() {
+		return fieldAS;
+	}
+
+	public void setFieldAS(String fieldAS) {
+		this.fieldAS = fieldAS;
+	}
+
+	public String getFieldBS() {
+		return fieldBS;
+	}
+
+	public void setFieldBS(String fieldBS) {
+		this.fieldBS = fieldBS;
+	}
+
+	public String getReleaseDateFormattedDate() {
+		if (this.releaseDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDD);
+		}
+	}
+
+	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {
+
+	}
+}

+ 96 - 0
src/main/java/com/goafanti/portal/bo/AchievementPortalSimilarListBo.java

@@ -0,0 +1,96 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+
+public class AchievementPortalSimilarListBo {
+	private String		id;
+
+	private String		name;
+
+	private String		province;
+
+	private String		city;
+
+	private Integer		maturity;
+
+	private BigDecimal	transferPrice;
+
+	private String		location;
+
+	private String		maturityS;
+
+	private String		transferPriceS;
+	
+	public String getTransferPriceS() {
+		return transferPriceS;
+	}
+
+	public void setTransferPriceS(String transferPriceS) {
+		this.transferPriceS = transferPriceS;
+	}
+
+	public String getMaturityS() {
+		return maturityS;
+	}
+
+	public void setMaturityS(String maturityS) {
+		this.maturityS = maturityS;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public BigDecimal getTransferPrice() {
+		return transferPrice;
+	}
+
+	public void setTransferPrice(BigDecimal transferPrice) {
+		this.transferPrice = transferPrice;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public Integer getMaturity() {
+		return maturity;
+	}
+
+	public void setMaturity(Integer maturity) {
+		this.maturity = maturity;
+	}
+
+}

+ 55 - 48
src/main/java/com/goafanti/portal/bo/AchievementSearchListBo.java

@@ -10,84 +10,96 @@ import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.constant.AFTConstants;
 
 public class AchievementSearchListBo {
-	private String id;
-	
+	private String		id;
+
 	/**
 	 * 编号
 	 */
-	private Integer serialNumber;
-	
+	private Integer		serialNumber;
+
 	/**
 	 * 关键词
 	 */
-	private String keyword;
-	
+	private String		keyword;
+
 	/**
 	 * 成果
 	 */
-	private String name;
-	
+	private String		name;
+
 	/**
 	 * 数据类别 (0--成果, 1--技术, 2--项目)
 	 */
-	private Integer dataCategory;
-	
+	private Integer		dataCategory;
+
 	/**
 	 * 类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
 	 */
-	private Integer category;
-	
+	private Integer		category;
+
 	/**
 	 * 所有人名称(个人)
 	 */
-	private String username;
-	
+	private String		username;
+
 	/**
 	 * 所有人名称(组织)
 	 */
-	private String unitName;
-	
+	private String		unitName;
+
 	/**
 	 * 发布时间
 	 */
-	private Date releaseDate;
-	
+	private Date		releaseDate;
+
 	/**
 	 * 所有人类型(0--个人,1--组织)
 	 */
-	private Integer ownerType;
-	
+	private Integer		ownerType;
+
 	/**
 	 * 行业分类A
 	 */
-	private Integer fieldA;
-	
+	private Integer		fieldA;
+
 	/**
 	 * 行业分类B
 	 */
-	private Integer fieldB;
-	
+	private Integer		fieldB;
+
 	/**
 	 * 交易价格
 	 */
-	private BigDecimal transferPrice;
-	
+	private BigDecimal	transferPrice;
+
 	/**
 	 * 成熟度(1--正在研发, 2-- 已有样品, 3-- 通过小试, 4-- 通过中试, 5-- 可以量产)
 	 */
-	private Integer maturity;
-	
+	private Integer		maturity;
+
 	/**
 	 * 交易方式(转让方式(0--完全转让,1--许可转让,2--技术入股))
 	 */
-	private Integer transferMode;
-	
+	private Integer		transferMode;
+
 	/**
 	 * 议价方式(0--面议,1--定价)
 	 */
-	private Integer bargainingMode;
-	
-	
+	private Integer		bargainingMode;
+
+	/**
+	 * 用户等级
+	 */
+	private Integer		level;
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getBargainingMode() {
 		return bargainingMode;
@@ -120,7 +132,7 @@ public class AchievementSearchListBo {
 	public void setName(String name) {
 		this.name = name;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getDataCategory() {
 		return dataCategory;
@@ -129,7 +141,7 @@ public class AchievementSearchListBo {
 	public void setDataCategory(Integer dataCategory) {
 		this.dataCategory = dataCategory;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getCategory() {
 		return category;
@@ -162,18 +174,16 @@ public class AchievementSearchListBo {
 	public void setReleaseDate(Date releaseDate) {
 		this.releaseDate = releaseDate;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getOwnerType() {
 		return ownerType;
 	}
-	
+
 	public void setOwnerType(Integer ownerType) {
 		this.ownerType = ownerType;
-	} 
-	
-	
-	
+	}
+
 	public String getKeyword() {
 		return keyword;
 	}
@@ -181,8 +191,7 @@ public class AchievementSearchListBo {
 	public void setKeyword(String keyword) {
 		this.keyword = keyword;
 	}
-	
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getFieldA() {
 		return fieldA;
@@ -191,7 +200,7 @@ public class AchievementSearchListBo {
 	public void setFieldA(Integer fieldA) {
 		this.fieldA = fieldA;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getFieldB() {
 		return fieldB;
@@ -208,7 +217,7 @@ public class AchievementSearchListBo {
 	public void setTransferPrice(BigDecimal transferPrice) {
 		this.transferPrice = transferPrice;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getMaturity() {
 		return maturity;
@@ -217,7 +226,7 @@ public class AchievementSearchListBo {
 	public void setMaturity(Integer maturity) {
 		this.maturity = maturity;
 	}
-	
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getTransferMode() {
 		return transferMode;
@@ -238,7 +247,5 @@ public class AchievementSearchListBo {
 	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {
 
 	}
-	
-	
 
 }

+ 138 - 0
src/main/java/com/goafanti/portal/bo/DemandPortalDetailBo.java

@@ -0,0 +1,138 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+
+public class DemandPortalDetailBo {
+	private String			id;
+
+	private String			name;
+
+	private String			keyword;
+
+	private Integer			industryCategoryA;
+
+	private String			industryCategoryAS;
+
+	private String			industryCategoryBS;
+
+	private BigDecimal		budgetCost;
+
+	private String			province;
+
+	private String			city;
+
+	private String			problemDes;
+
+	private String			interestId;
+
+	private String			location;
+
+	private String			industryCategory;
+	
+	public String getIndustryCategory() {
+		return industryCategory;
+	}
+
+	public void setIndustryCategory(String industryCategory) {
+		this.industryCategory = industryCategory;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public String getInterestId() {
+		return interestId;
+	}
+
+	public void setInterestId(String interestId) {
+		this.interestId = interestId;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
+	public Integer getIndustryCategoryA() {
+		return industryCategoryA;
+	}
+
+	public void setIndustryCategoryA(Integer industryCategoryA) {
+		this.industryCategoryA = industryCategoryA;
+	}
+
+
+	public String getIndustryCategoryAS() {
+		return industryCategoryAS;
+	}
+
+	public void setIndustryCategoryAS(String industryCategoryAS) {
+		this.industryCategoryAS = industryCategoryAS;
+	}
+
+	public String getIndustryCategoryBS() {
+		return industryCategoryBS;
+	}
+
+	public void setIndustryCategoryBS(String industryCategoryBS) {
+		this.industryCategoryBS = industryCategoryBS;
+	}
+
+	public BigDecimal getBudgetCost() {
+		return budgetCost;
+	}
+
+	public void setBudgetCost(BigDecimal budgetCost) {
+		this.budgetCost = budgetCost;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+
+}

+ 96 - 0
src/main/java/com/goafanti/portal/bo/DemandPortalSimilarListBo.java

@@ -0,0 +1,96 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+
+public class DemandPortalSimilarListBo {
+	private String		id;
+
+	private String		name;
+
+	private String		industryCategoryAS;
+
+	private String		industryCategoryBS;
+
+	private String		problemDes;
+
+	private BigDecimal	budgetCost;
+
+	private Integer		level;
+
+	private String		industryCategory;
+
+	private String		budgetCostS;
+	
+	public String getBudgetCostS() {
+		return budgetCostS;
+	}
+
+	public void setBudgetCostS(String budgetCostS) {
+		this.budgetCostS = budgetCostS;
+	}
+
+	public String getIndustryCategory() {
+		return industryCategory;
+	}
+
+	public void setIndustryCategory(String industryCategory) {
+		this.industryCategory = industryCategory;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIndustryCategoryAS() {
+		return industryCategoryAS;
+	}
+
+	public void setIndustryCategoryAS(String industryCategoryAS) {
+		this.industryCategoryAS = industryCategoryAS;
+	}
+
+	public String getIndustryCategoryBS() {
+		return industryCategoryBS;
+	}
+
+	public void setIndustryCategoryBS(String industryCategoryBS) {
+		this.industryCategoryBS = industryCategoryBS;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public BigDecimal getBudgetCost() {
+		return budgetCost;
+	}
+
+	public void setBudgetCost(BigDecimal budgetCost) {
+		this.budgetCost = budgetCost;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+
+}

+ 13 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java

@@ -73,6 +73,19 @@ public class DemandSearchListBo {
 	 * 组织雇主名称
 	 */
 	private String unitName;
+	
+	/**
+	 * 用户等级
+	 */
+	private Integer level;
+	
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
 
 	public String getId() {
 		return id;

+ 11 - 0
src/main/java/com/goafanti/portal/controller/PortalDetailApiController.java

@@ -0,0 +1,11 @@
+package com.goafanti.portal.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.controller.BaseApiController;
+@RestController
+@RequestMapping(value = "/portal/detail")
+public class PortalDetailApiController extends BaseApiController{
+
+}

+ 2 - 2
src/main/java/com/goafanti/portal/controller/PortalSearchApiController.java

@@ -40,7 +40,7 @@ public class PortalSearchApiController extends BaseApiController {
 			Integer fieldA, Integer fieldB, String pageNo, String pageSize) {
 		Result res = new Result();
 		Integer pNo = 1;
-		Integer pSize = 10;
+		Integer pSize = 20;
 		if (StringUtils.isNumeric(pageSize)) {
 			pSize = Integer.parseInt(pageSize);
 		}
@@ -96,7 +96,7 @@ public class PortalSearchApiController extends BaseApiController {
 			return res;
 		}
 		Integer pNo = 1;
-		Integer pSize = 2;
+		Integer pSize = 12;
 		if (StringUtils.isNumeric(pageSize)) {
 			pSize = Integer.parseInt(pageSize);
 		}

+ 10 - 2
src/main/java/com/goafanti/user/bo/OrgPartnerDetailBo.java

@@ -21,6 +21,16 @@ public class OrgPartnerDetailBo {
 
 	private String	companyIntroduction;
 
+	private String	interestId;
+	
+	public String getInterestId() {
+		return interestId;
+	}
+
+	public void setInterestId(String interestId) {
+		this.interestId = interestId;
+	}
+
 	public String getUnitName() {
 		return unitName;
 	}
@@ -100,7 +110,5 @@ public class OrgPartnerDetailBo {
 	public void setCompanyIntroduction(String companyIntroduction) {
 		this.companyIntroduction = companyIntroduction;
 	}
-	
-	
 
 }

+ 10 - 2
src/main/java/com/goafanti/user/bo/UserPartnerDetailBo.java

@@ -21,6 +21,16 @@ public class UserPartnerDetailBo {
 
 	private String	lifePhotoUrl;
 
+	private String	interestId;
+	
+	public String getInterestId() {
+		return interestId;
+	}
+
+	public void setInterestId(String interestId) {
+		this.interestId = interestId;
+	}
+
 	public String getUsername() {
 		return username;
 	}
@@ -100,7 +110,5 @@ public class UserPartnerDetailBo {
 	public void setLifePhotoUrl(String lifePhotoUrl) {
 		this.lifePhotoUrl = lifePhotoUrl;
 	}
-	
-	
 
 }

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

@@ -262,8 +262,8 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
+		if (pSize == null || pSize < 0 || pSize > 12) {
+			pSize = 12;
 		}
 		return (Pagination<OrgSubscriberListBo>) findPage("findSearchSubscriberListByPage", "findSearchSubscriberCount",
 				params, pNo, pSize);

+ 2 - 2
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -171,8 +171,8 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
+		if (pSize == null || pSize < 0 || pSize > 12) {
+			pSize = 12;
 		}
 		return (Pagination<UserSubscriberListBo>) findPage("findSearchSubscriberListByPage",
 				"findSearchSubscriberCount", params, pNo, pSize);

+ 2 - 2
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -343,12 +343,12 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 
 	@Override
 	public UserPartnerDetailBo findUserPartnerDetail(String uid) {
-		return userMapper.findUserPartnerDetail(uid);
+		return userMapper.findUserPartnerDetail(uid, TokenManager.getUserId());
 	}
 
 	@Override
 	public OrgPartnerDetailBo findOrgPartnerDetail(String uid) {
-		return userMapper.findOrgPartnerDetail(uid);
+		return userMapper.findOrgPartnerDetail(uid, TokenManager.getUserId());
 	}
 
 }

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

@@ -63,4 +63,8 @@ avatar.host=//afts.hnzhiming.com
 
 aesSecretKey=aft1234567890123
 
-template.cacheable=false
+template.cacheable=false
+
+mobileCodeTemplate=SMS_37845022
+
+portal.host=//afts.hnzhiming.com/portal/1.0.0

+ 4 - 0
src/main/resources/props/config_local.properties

@@ -66,3 +66,7 @@ avatar.host=//afts.hnzhiming.com
 aesSecretKey=aft1234567890123
 
 template.cacheable=false
+
+mobileCodeTemplate=SMS_37845022
+
+portal.host=//afts.hnzhiming.com/portal/1.0.0

+ 4 - 0
src/main/resources/props/config_prod.properties

@@ -54,3 +54,7 @@ app.name=AFT
 static.host=//afts.hnzhiming.com/1.0.28
 
 template.cacheable=true
+
+mobileCodeTemplate=SMS_37845022
+
+portal.host=//afts.hnzhiming.com/portal/1.0.0

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

@@ -65,4 +65,8 @@ avatar.host=//aftts.hnzhiming.com
 
 aesSecretKey =aft1234567890123
 
-template.cacheable=true
+template.cacheable=true
+
+mobileCodeTemplate=SMS_37845022
+
+portal.host=//aftts.hnzhiming.com/portal/1.0.0

+ 41 - 37
src/main/resources/props/error.properties

@@ -1,62 +1,66 @@
-org.apache.shiro.authc.UnknownAccountException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
-org.apache.shiro.authc.IncorrectCredentialsException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
-org.apache.shiro.authc.LockedAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
-org.apache.shiro.authc.DisabledAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
-org.apache.shiro.authc.ExcessiveAttemptsException=\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8D26\u53F7\u6682\u65F6\u88AB\u9501\u5B9A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002
-org.apache.shiro.session.ExpiredSessionException=\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
-org.springframework.dao.DataIntegrityViolationException=\u670D\u52A1\u5668\u6253\u4E86\u4E2A\u76F9\u513F\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
-org.springframework.jdbc.BadSqlGrammarException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
-java.text.ParseException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
-java.lang.IllegalArgumentException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
-com.alibaba.fastjson.JSONException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
+org.apache.shiro.authc.UnknownAccountException=\u8d26\u53f7\u6216\u5bc6\u7801\u4e0d\u5339\u914d\u3002
+org.apache.shiro.authc.IncorrectCredentialsException=\u8d26\u53f7\u6216\u5bc6\u7801\u4e0d\u5339\u914d\u3002
+org.apache.shiro.authc.LockedAccountException=\u8be5\u8d26\u53f7\u5df2\u51bb\u7ed3\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002
+org.apache.shiro.authc.DisabledAccountException=\u8be5\u8d26\u53f7\u5df2\u51bb\u7ed3\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002
+org.apache.shiro.authc.ExcessiveAttemptsException=\u5c1d\u8bd5\u6b21\u6570\u8fc7\u591a\uff0c\u8d26\u53f7\u6682\u65f6\u88ab\u9501\u5b9a\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002
+org.apache.shiro.session.ExpiredSessionException=\u767b\u5f55\u4fe1\u606f\u5df2\u8fc7\u671f\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002
+org.springframework.dao.DataIntegrityViolationException=\u670d\u52a1\u5668\u6253\u4e86\u4e2a\u76f9\u513f\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u6216\u7a0d\u540e\u518d\u8bd5\u3002
+org.springframework.jdbc.BadSqlGrammarException=\u6570\u636e\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u6216\u7a0d\u540e\u518d\u8bd5\u3002
+java.text.ParseException=\u53c2\u6570\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u6838\u5bf9\u8f93\u5165\u6570\u636e\u540e\u518d\u8bd5\u3002
+java.lang.IllegalArgumentException=\u53c2\u6570\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u6838\u5bf9\u8f93\u5165\u6570\u636e\u540e\u518d\u8bd5\u3002
+com.alibaba.fastjson.JSONException=\u53c2\u6570\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u6838\u5bf9\u8f93\u5165\u6570\u636e\u540e\u518d\u8bd5\u3002
 
 
-NON_LOGIN=\u7528\u6237\u672A\u767B\u5F55\u3002
+NON_LOGIN=\u7528\u6237\u672a\u767b\u5f55\u3002
 
-VCODE_ERROR=\u9A8C\u8BC1\u7801\u8F93\u5165\u9519\u8BEF\uFF01
+VCODE_ERROR=\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef\uff01
 
-NO_AUTH_ERROR=\u672A\u6388\u6743\u6216\u6388\u6743\u8FC7\u671F\u3002
+NO_AUTH_ERROR=\u672a\u6388\u6743\u6216\u6388\u6743\u8fc7\u671f\u3002
 
-PARAM_ERROR={0}\u53C2\u6570\u9519\u8BEF
+PARAM_ERROR={0}\u53c2\u6570\u9519\u8bef
 
-PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
+PARAM_INTEGER_ERROR={0}\u53c2\u6570\u5fc5\u987b\u4e3a\u6570\u5b57\u3002
 
-PARAM_EMPTY_ERROR={0}\u5FC5\u987B\u6307\u5B9A\u3002
+PARAM_EMPTY_ERROR={0}\u5fc5\u987b\u6307\u5b9a\u3002
 
-PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4\u3002
+PARAM_SIZE_ERROR={0}\u53c2\u6570\u957f\u5ea6\u4e0d\u6b63\u786e\uff0c\u5fc5\u987b\u5728{min}\u548c{max}\u4e4b\u95f4\u3002
 
-PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
+PARAM_PATTERN_ERROR={0}\u53c2\u6570\u683c\u5f0f\u987b\u6b63\u786e\u6307\u5b9a{1}\u3002
 
-EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
+EMAIL_SIZE_ERROR=\u90ae\u7bb1\u5730\u5740\u957f\u5ea6\u9519\u8bef\uff01
 
-EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
+EMAIL_PATTERN_ERROR=\u90ae\u7bb1\u5730\u5740\u683c\u5f0f\u9519\u8bef\uff01
 
-MOBILE_SIZE_ERROR=\u624B\u673A\u53F7\u957F\u5EA6\u9519\u8BEF\uFF01
+MOBILE_SIZE_ERROR=\u624b\u673a\u53f7\u957f\u5ea6\u9519\u8bef\uff01
 
-MOBILE_PATTERN_ERROR=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01
+MOBILE_PATTERN_ERROR=\u624b\u673a\u53f7\u683c\u5f0f\u9519\u8bef\uff01
 
-DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
+DUNPLICATE_KAY_ERROR={0}\u5df2\u88ab\u4ed6\u4eba\u6ce8\u518c\uff01
 
-DATA_EMPTY_ERROR=\u5F53\u524D{0}\u6CA1\u6709\u6570\u636E\u3002
+DATA_EMPTY_ERROR=\u5f53\u524d{0}\u6ca1\u6709\u6570\u636e\u3002
 
-PWD_NOT_MATCH_ERROR=\u539F\u5BC6\u7801\u8F93\u5165\u4E0D\u5339\u914D\u3002
+PWD_NOT_MATCH_ERROR=\u539f\u5bc6\u7801\u8f93\u5165\u4e0d\u5339\u914d\u3002
 
-NON_CERTIFIED=\u672A\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01
+MCODE_ERROR=\u83b7\u53d6\u624b\u673a\u9a8c\u8bc1\u7801\u5f02\u5e38\uff01
 
-RECORD_CALLBACK=\u5F53\u524D\u8BB0\u5F55\u5DF2\u9000\u5355\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
+NON_CERTIFIED=\u672a\u901a\u8fc7\u5b9e\u540d\u8ba4\u8bc1\uff0c\u65e0\u6cd5\u64cd\u4f5c\uff01
 
-RECORD_SETTLEMENT=\u5F53\u524D\u8BB0\u5F55\u5DF2\u7ED3\u6B3E\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
+FILE_NON_EXISTENT=\u627e\u4e0d\u5230\u6587\u4ef6\uff01
 
-RECORD_REJECT=\u5F53\u524D\u7533\u8BF7\u672A\u901A\u8FC7\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u7533\u8BF7\uFF01
+RECORD_CALLBACK=\u5f53\u524d\u8bb0\u5f55\u5df2\u9000\u5355\uff0c\u65e0\u6cd5\u4fee\u6539\uff01
 
-CONTRACT_PATENT_CREATED=\u5F53\u524D\u5408\u540C\u4E13\u5229\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+RECORD_SETTLEMENT=\u5f53\u524d\u8bb0\u5f55\u5df2\u7ed3\u6b3e\uff0c\u65e0\u6cd5\u4fee\u6539\uff01
 
-CONTRACT_COPYRIGHT_CREATED=\u5F53\u524D\u5408\u540C\u8F6F\u8457\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+RECORD_REJECT=\u5f53\u524d\u7533\u8bf7\u672a\u901a\u8fc7\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u91cd\u65b0\u7533\u8bf7\uff01
 
-CONTRACT_TECHPROJECT_CREATED=\u5F53\u524D\u5408\u540C\u79D1\u6280\u9879\u76EE\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+CONTRACT_PATENT_CREATED=\u5f53\u524d\u5408\u540c\u4e13\u5229\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01
 
-CONTRACT_COGNIZANCE_CREATED=\u5F53\u524D\u5408\u540C\u9AD8\u4F01\u8BA4\u5B9A\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+CONTRACT_COPYRIGHT_CREATED=\u5f53\u524d\u5408\u540c\u8f6f\u8457\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01
 
-EVALUATE_ID=\u8BC4\u4F30\u62A5\u544A\u627E\u4E0D\u5230\uFF01
-EVALUATE_STEP=\u9519\u8BEF\u7684\u8BC4\u4F30\u6B65\u9AA4\uFF01
-EVALUATE_PARAM=\u8BC4\u4F30\u53C2\u6570\u9519\u8BEF\uFF01
+CONTRACT_TECHPROJECT_CREATED=\u5f53\u524d\u5408\u540c\u79d1\u6280\u9879\u76ee\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01
+
+CONTRACT_COGNIZANCE_CREATED=\u5f53\u524d\u5408\u540c\u9ad8\u4f01\u8ba4\u5b9a\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01
+
+EVALUATE_ID=\u8bc4\u4f30\u62a5\u544a\u627e\u4e0d\u5230\uff01
+EVALUATE_STEP=\u9519\u8bef\u7684\u8bc4\u4f30\u6b65\u9aa4\uff01
+EVALUATE_PARAM=\u8bc4\u4f30\u53c2\u6570\u9519\u8bef\uff01

File diff suppressed because it is too large
+ 4 - 4
src/main/webapp/WEB-INF/views/common.html


File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/detail/achievementDetail.html


+ 154 - 0
src/main/webapp/WEB-INF/views/portal/detail/demandDetail.html

@@ -0,0 +1,154 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+
+<head th:replace="common::header(~{::title},~{::link})">
+<title>科技需求详情</title>
+<link th:href="${portalHost + '/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost + '/highTech/detail/demandDetail.css'}"
+	rel="stylesheet">
+</head>
+
+<body>
+	<th:block th:fragment="{topNav}">
+		<div class="container">
+			<div class="lt">欢迎进入科技认知计算交易平台!</div>
+			<div class="rt" th:if="${!isLogin}">
+				<a th:href="${basePath + '/user/login.html'}" class="login">登录</a> <a
+					th:href="${basePath + '/user/signIn.html'}">注册</a>
+			</div>
+			<div class="rt" th:if="${isLogin}">
+				<span>欢迎光临,</span> <a class="login"
+					th:href="${basePath + '/user/account/index.html'}"
+					th:text="${userName}">个人中心</a> <a href="/user/logout">退出</a>
+			</div>
+		</div>
+	</th:block>
+	<div class="container header_nav header_nav_detail">
+		<div class="row clearfix">
+			<div class="col-md-3 logo">
+				<img th:src="${portalHost + '/img/logo.png'}" />
+			</div>
+			<div class="col-md-6">
+				<ul class="nav_content_detail clearfix">
+					<li><a href="/protal/search/demand.html">技术交易</a></li>
+					<li class="selected"><a href="#">需求</a></li>
+				</ul>
+			</div>
+			<div class="col-md-3 search">
+				<div class="search-box">
+					<input id="searchInput" placeholder="需求关键词搜索" class="search-input"
+						type="" /> <img id="searchImg" class="search-img"
+						th:src="${portalHost + '/img/search_ioc.png'}" />
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div class="container detail_content">
+		<div class="detail_title" th:text="${demand.name}">铸造用高发热保温冒口套</div>
+		<div class="row">
+			<div class="col-md-6 detial_sub">
+				<span class="detial_sub_icon"> <img
+					th:src="${portalHost} + '/img/demand_ico_1.png'" alt="行业" />
+				</span> <span class="detial_sub_title"> 行业: </span> <span
+					class="detial_sub_text" th:text="${demand.industryCategory}">
+					机械-铸造/热处理 </span>
+			</div>
+			<div class="col-md-6 detial_sub">
+				<span class="detial_sub_icon"> <img
+					th:src="${portalHost + '/img/demand_ico_2.png'}" alt="标签" />
+				</span> <span class="detial_sub_title"> 标签: </span> <span
+					class="detial_sub_text" th:text="${demand.keyword}">
+					xxxxxxxxxxx </span>
+			</div>
+		</div>
+		<div class="row">
+			<div class="col-md-6 detial_sub">
+				<span class="detial_sub_icon"> <img
+					th:src="${portalHost +'/img/demand_ico_3.png'}" alt="预算" />
+				</span> <span class="detial_sub_title"> 预算: </span> <span
+					class="money_text" th:text="${demand.budgetCost + '万元'}"> 面议
+				</span>
+			</div>
+			<div class="col-md-6 detial_sub">
+				<span class="detial_sub_icon"> <img
+					th:src="${portalHost +'/img/demand_ico_4.png'}" alt="地址" />
+				</span> <span class="detial_sub_title"> 地址: </span> <span
+					class="money_text" th:text="${demand.location}"> 四川成都 </span>
+			</div>
+		</div>
+		<div class="row">
+			<div class="col-md-12 detial_sub">
+				<span class="detial_sub_icon"> <img
+					th:src="${portalHost + '/img/demand_ico_5.png'}" alt="需求" />
+				</span> <span class="detial_sub_title"> 需求: </span> <span
+					class="detial_sub_text" th:text="${demand.problemDes}">
+					随着铸造行业的整体质量提升,冒口市场需求、PVC粉的聚合度
+					的影响,环保型增塑剂的研发。随着铸造行业的整体质量提升,冒口市场需求、PVC粉的聚合度
+					的影响,环保型增塑剂的研发。随着铸造行业的整体质量提升,冒口市场需求、PVC粉的聚合度
+					的影响,环保型增塑剂的研发。随着铸造行业的整体质量提升,冒口市场需求、PVC粉的聚合度 的影响,环保型增塑剂的研发。 </span>
+			</div>
+		</div>
+		<div class="row">
+			<div class="detail_button clearfix">
+				<button type="button" id="interest"
+					th:class="${isLogin} ? (${demand.interestId != null} ? 'btn dislike': 'btn like') : 'btn dislike'">我感兴趣</button>
+				<button type="button" id="order" class="btn">我要接单</button>
+			</div>
+		</div>
+	</div>
+
+	<div class="container detail_interest">
+		<div class="detail_interest_title">
+			<img th:src="${portalHost + '/img/demand_interest_title.png'}" alt="" />
+		</div>
+		<ul class="detail_interest_sub">
+			<li th:each="similar,iterStart:${similarList}">
+				<div class=" interest_list_title ">
+					<img th:src="${portalHost + '/img/demand_sup.png'} " alt=" " /> <span
+						th:text="${similar.name} ">PVC塑料的研究</span>
+					<div class="interest_list_confirm ">
+						<span th:text="${similar.level> 0} ? '身份已验证' : '身份未验证'">身份未验证</span>
+						<i th:class="${similar.level > 0} ? certify : uncertify"></i>
+					</div>
+				</div>
+				<div class="detial_sub">
+					<span class="detial_sub_icon"> <img
+						th:src="${portalHost + '/img/demand_ico_5.png'}" alt="需求" />
+					</span> <span class="detial_sub_title"> 需求: </span> <span
+						class="detial_sub_text" th:text="${similar.problemDes}">
+						随着铸造行业随着铸造行业随着铸造行业 </span>
+				</div>
+				<div class="detial_sub">
+					<span class="detial_sub_icon"> <img
+						th:src="${portalHost + '/img/demand_ico_3.png'}" alt="预算" />
+					</span> <span class="detial_sub_title"> 预算: </span> <span
+						class="money_text" th:text="${similar.budgetCostS}">
+						10000000元 </span>
+				</div>
+				<div class="detial_sub">
+					<span class="detial_sub_icon"> <img
+						th:src="${portalHost + '/img/demand_ico_1.png'}" alt="行业" />
+					</span> <span class="detial_sub_title"> 行业: </span> <span
+						class="detial_sub_text" th:text="${similar.industryCategory}">
+						机械-铸造/热处理 </span>
+				</div>
+			</li>
+		</ul>
+	</div>
+	<input type="hidden" id="demandId" th:value=${demand.id}>
+	<input type="hidden" id="interestId" th:value=${demand.interestId}>
+	<footer>
+		<div class="container">
+			<a href="#">联系我们</a> <a href="#">联系我们</a> <a href="#">联系我们</a> <a
+				href="#">联系我们</a> <a href="#">联系我们</a> <a href="#">联系我们</a>
+		</div>
+	</footer>
+	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+	<script type="text/javascript"
+		th:src="${portalHost + '/highTech/detail/demandDetail.js'}"></script>
+</body>
+
+</html>

+ 16 - 0
src/main/webapp/WEB-INF/views/user/account/evaluateInfo.html

@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org">
+<head th:replace="common::header(~{::title},~{::link})">
+	<title>价值评估页</title>
+	<link th:href="${staticHost+'/user/account/evaluateInfo.css'}" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	
+	<div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/user/account/evaluateInfo.js'}"></script>
+	</div>
+</body>
+</html>