|
@@ -0,0 +1,246 @@
|
|
|
+import { Rule, RuleType } from '@midwayjs/validate';
|
|
|
+import { ApiProperty } from '@midwayjs/swagger';
|
|
|
+import { SearchBase } from 'free-midway-component';
|
|
|
+import get = require('lodash/get');
|
|
|
+const dealVO = (cla, data) => {
|
|
|
+ for (const key in cla) {
|
|
|
+ const val = get(data, key);
|
|
|
+ if (val || val === 0) cla[key] = val;
|
|
|
+ }
|
|
|
+};
|
|
|
+export class FVO_achieveApply {
|
|
|
+ constructor(data: object) {
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ _id: string = undefined;
|
|
|
+ @ApiProperty({ description: '用户id' })
|
|
|
+ 'user_id': string = undefined;
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
+ 'status': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果编号' })
|
|
|
+ 'num': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果名称' })
|
|
|
+ 'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果类型' })
|
|
|
+ 'type': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '成果形式' })
|
|
|
+ 'form': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '成果取得时间' })
|
|
|
+ 'get_time': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人' })
|
|
|
+ 'apply_personal': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人手机号' })
|
|
|
+ 'apply_phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人单位' })
|
|
|
+ 'apply_company': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系地址' })
|
|
|
+ 'apply_address': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人/申请单位属性' })
|
|
|
+ 'apply_nature': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系人' })
|
|
|
+ 'contact': string = undefined;
|
|
|
+ @ApiProperty({ description: '手机号' })
|
|
|
+ 'phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
+ 'email': string = undefined;
|
|
|
+ @ApiProperty({ description: '传真' })
|
|
|
+ 'fax': string = undefined;
|
|
|
+ @ApiProperty({ description: '评价目的' })
|
|
|
+ 'objective': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果所处阶段' })
|
|
|
+ 'stage': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果的影响及作用' })
|
|
|
+ 'influence': string = undefined;
|
|
|
+ @ApiProperty({ description: '经济效益' })
|
|
|
+ 'benefit': object = undefined;
|
|
|
+ @ApiProperty({ description: '其他信息' })
|
|
|
+ 'other': object = undefined;
|
|
|
+ @ApiProperty({ description: '参加单位' })
|
|
|
+ 'part_company': object = undefined;
|
|
|
+ @ApiProperty({ description: '国家奖励' })
|
|
|
+ 'gj_reward': object = undefined;
|
|
|
+ @ApiProperty({ description: '省级奖励' })
|
|
|
+ 'sj_reward': object = undefined;
|
|
|
+ @ApiProperty({ description: '国家计划' })
|
|
|
+ 'gj_plan': object = undefined;
|
|
|
+ @ApiProperty({ description: '省级计划' })
|
|
|
+ 'sj_plan': object = undefined;
|
|
|
+ @ApiProperty({ description: '内容简介' })
|
|
|
+ 'brief': object = undefined;
|
|
|
+ @ApiProperty({ description: '主研人员名单' })
|
|
|
+ 'research': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '委托方提供资料清单' })
|
|
|
+ 'data_list': object = undefined;
|
|
|
+ @ApiProperty({ description: '其他文件' })
|
|
|
+ 'other_file': object = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QDTO_achieveApply extends SearchBase {
|
|
|
+ constructor() {
|
|
|
+ const like_prop = [];
|
|
|
+ const props = [
|
|
|
+ 'user_id',
|
|
|
+ 'status',
|
|
|
+ 'num',
|
|
|
+ 'name',
|
|
|
+ 'get_time',
|
|
|
+ 'apply_personal',
|
|
|
+ 'apply_phone',
|
|
|
+ 'apply_company',
|
|
|
+ 'apply_address',
|
|
|
+ 'apply_nature',
|
|
|
+ 'contact',
|
|
|
+ 'phone',
|
|
|
+ 'email',
|
|
|
+ ];
|
|
|
+ const mapping = [];
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '用户id' })
|
|
|
+ 'user_id': string = undefined;
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
+ 'status': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果编号' })
|
|
|
+ 'num': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果名称' })
|
|
|
+ 'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果取得时间' })
|
|
|
+ 'get_time': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人' })
|
|
|
+ 'apply_personal': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人手机号' })
|
|
|
+ 'apply_phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人单位' })
|
|
|
+ 'apply_company': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系地址' })
|
|
|
+ 'apply_address': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人/申请单位属性' })
|
|
|
+ 'apply_nature': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系人' })
|
|
|
+ 'contact': string = undefined;
|
|
|
+ @ApiProperty({ description: '手机号' })
|
|
|
+ 'phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
+ 'email': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QVO_achieveApply extends FVO_achieveApply {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class CDTO_achieveApply {
|
|
|
+ @ApiProperty({ description: '用户id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'user_id': string = undefined;
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'status': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果编号' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'num': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果名称' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果类型' })
|
|
|
+ @Rule(RuleType['array']().empty(''))
|
|
|
+ 'type': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '成果形式' })
|
|
|
+ @Rule(RuleType['array']().empty(''))
|
|
|
+ 'form': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '成果取得时间' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'get_time': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'apply_personal': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人手机号' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'apply_phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人单位' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'apply_company': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系地址' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'apply_address': string = undefined;
|
|
|
+ @ApiProperty({ description: '申请人/申请单位属性' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'apply_nature': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系人' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'contact': string = undefined;
|
|
|
+ @ApiProperty({ description: '手机号' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'email': string = undefined;
|
|
|
+ @ApiProperty({ description: '传真' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'fax': string = undefined;
|
|
|
+ @ApiProperty({ description: '评价目的' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'objective': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果所处阶段' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'stage': string = undefined;
|
|
|
+ @ApiProperty({ description: '成果的影响及作用' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'influence': string = undefined;
|
|
|
+ @ApiProperty({ description: '经济效益' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'benefit': object = undefined;
|
|
|
+ @ApiProperty({ description: '其他信息' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'other': object = undefined;
|
|
|
+ @ApiProperty({ description: '参加单位' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'part_company': object = undefined;
|
|
|
+ @ApiProperty({ description: '国家奖励' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'gj_reward': object = undefined;
|
|
|
+ @ApiProperty({ description: '省级奖励' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'sj_reward': object = undefined;
|
|
|
+ @ApiProperty({ description: '国家计划' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'gj_plan': object = undefined;
|
|
|
+ @ApiProperty({ description: '省级计划' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'sj_plan': object = undefined;
|
|
|
+ @ApiProperty({ description: '内容简介' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'brief': object = undefined;
|
|
|
+ @ApiProperty({ description: '主研人员名单' })
|
|
|
+ @Rule(RuleType['array']().empty(''))
|
|
|
+ 'research': Array<any> = undefined;
|
|
|
+ @ApiProperty({ description: '委托方提供资料清单' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'data_list': object = undefined;
|
|
|
+ @ApiProperty({ description: '其他文件' })
|
|
|
+ @Rule(RuleType['object']().empty(''))
|
|
|
+ 'other_file': object = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class CVO_achieveApply extends FVO_achieveApply {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class UDTO_achieveApply extends CDTO_achieveApply {
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ _id: string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class UVAO_achieveApply extends FVO_achieveApply {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|