achieve_apply.js 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const moment = require('moment');
  4. const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
  5. // 基本信息
  6. const base = new Schema({
  7. achieve_name: { type: String }, // 成果名称
  8. achieve_type: { type: String }, // 成果类别
  9. achieve_num: { type: String }, // 成果编号
  10. achieve_date: { type: String }, // 成果取得时间
  11. achieve_form: { type: String }, // 成果形式
  12. apply_personal: { type: String }, // 申请人
  13. apply_company: { type: String }, // 申请单位
  14. address: { type: String }, // 地址
  15. apply_nature: { type: String }, // 申请单位/申请人属性
  16. contacts: { type: String }, // 联系人
  17. phone: { type: String }, // 联系电话
  18. email: { type: String }, // 邮箱
  19. fax: { type: String }, // 传真
  20. objective: { type: String }, // 评价目的
  21. stage: { type: String }, // 成果所处阶段
  22. output: { type: String }, // 经济效益产值
  23. profit: { type: String }, // 经济效益利润
  24. revenue: { type: String }, // 经济效益税收
  25. });
  26. base.index({ id: 1 });
  27. // 内容简介
  28. const brief = new Schema({
  29. achieve_brief: { type: String }, // 成果简介
  30. field: { type: String }, // 应用领域和技术原理
  31. kpi_index: { type: String }, // 性能指标
  32. compare: { type: String }, // 与国内外同类技术比较
  33. advanced: { type: String }, // 成果的创造性,先进性
  34. sense: { type: String }, // 作用意义
  35. prospect: { type: String }, // 推广应用的范围,条件和前景
  36. opinion: { type: String }, // 存在的问题和改进意见
  37. });
  38. brief.index({ id: 1 });
  39. // 主研人员名单
  40. const research = new Schema({
  41. research_name: { type: String }, // 姓名
  42. card: { type: String }, // 证件号码
  43. gender: { type: String }, // 性别
  44. position: { type: String }, // 技术职称
  45. education: { type: String }, // 文化程度
  46. degree: { type: String }, // 学位
  47. abroad: { type: String }, // 是否留学归国
  48. research_company: { type: String }, // 工作单位
  49. devote: { type: String }, // 对成果创造性贡献
  50. });
  51. research.index({ id: 1 });
  52. // 委托方提供资料清单
  53. const datalist = new Schema({
  54. work_report: { type: String, required: true }, // 研究工作报告(必备)
  55. techol_report: { type: String, required: true }, // 研究技术报告(必备)
  56. benefit: { type: String, required: true }, // 经济效益分析(必备)
  57. science_report: { type: String, required: true }, // 科技查新报告(科技项目成果,必备)
  58. assess_report: { type: String, required: true }, // 法律价值评估报告(专利成果,必备)
  59. app_prove: { type: String, required: true }, // 推广应用证明(两家以上应用单位,必备)
  60. techol_ppt: { type: String, required: true }, // 成果技术汇报PPT(必备)
  61. testing_report: { type: String }, // 检测报告(根据项目需要提供)
  62. quality: { type: String }, // 质量标准(检测报告所依据的标准,企业标准,行业标准,国家标准,国际标准)
  63. patent: { type: String }, // 与本成果相关的授权专利证书
  64. special: { type: String }, // 特殊行业需要提供的相应证明材料
  65. budget: { type: String }, // 项目经费预算书
  66. final: { type: String }, // 项目经费决算书
  67. });
  68. datalist.index({ id: 1 });
  69. // 成果评价申请表
  70. const achieve_apply = {
  71. basic: { type: base },
  72. brief: { type: brief },
  73. research: { type: [ research ] },
  74. datalist: { type: datalist },
  75. remark: { type: String, maxLength: 200 },
  76. create_time: { type: String, default: moment().format('YYYY-MM-DD HH:mm:ss') },
  77. };
  78. const schema = new Schema(achieve_apply, { toJSON: { virtuals: true } });
  79. schema.index({ id: 1 });
  80. schema.index({ 'meta.createdAt': 1 });
  81. schema.plugin(metaPlugin);
  82. module.exports = app => {
  83. const { mongoose } = app;
  84. return mongoose.model('Achieve_apply', schema, 'achieve_apply');
  85. };