Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyixcx
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yuyixcx
Commits
664fa41b
Commit
664fa41b
authored
May 28, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
53d26c31
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
602 additions
and
276 deletions
+602
-276
qualification.ts
src/biz/qualification.ts
+442
-187
enterprise.ts
src/config/eccParam/enterprise.ts
+10
-3
dbEnum.ts
src/config/enum/dbEnum.ts
+16
-5
enum.ts
src/config/enum/enum.ts
+44
-16
public.ts
src/routers/public.ts
+4
-2
qualification.ts
src/routers/qualification.ts
+86
-63
No files found.
src/biz/qualification.ts
View file @
664fa41b
...
...
@@ -117,89 +117,129 @@ export async function deleteEnterpriseHonorInfo(eId, hId) {
//=====================================================知识产权
/**
* 知识产权信息-列表
* 回显
* 知识产权信息统计
* @param uscc
*/
export
async
function
enterpriseIPRInfo
(
eId
:
string
)
{
let
filesList
=
[
"iprId"
,
"year"
,
"number"
];
let
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
知识产权
,
{
eId
},
filesList
);
let
iprInfo
=
{};
if
(
iprList
&&
iprList
.
length
)
{
iprList
.
forEach
(
item
=>
{
let
yearStr
=
moment
(
item
.
year
).
format
(
"YYYY"
);
let
{
iprId
,
year
,
number
}
=
item
;
if
(
!
iprInfo
[
yearStr
])
iprInfo
[
yearStr
]
=
{};
else
number
=
number
+
iprInfo
[
yearStr
].
number
;
iprInfo
[
yearStr
]
=
{
iprId
,
year
,
yearStr
:
`
${
yearStr
}
年`
,
number
};
});
export
async
function
enterpriseIPRCount
(
eId
)
{
let
商标
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
商标
,
{
eId
},
[
"tmId"
,
"eId"
,
"qccId"
,
"regNo"
,
"name"
,
"categoryId"
,
"category"
,
"person"
,
"imageUrl"
,
"flowStatusDesc"
,
"RegDate"
]);
let
作品著作权
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
作品著作权
,
{
eId
},
[
"crId"
,
"eId"
,
"owner"
,
"category"
,
"name"
,
"registerNo"
,
"registerDate"
,
"publishDate"
,
"finishDate"
]);
let
软件著作权
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
软件著作权
,
{
eId
},
[
"scId"
,
"eId"
,
"category"
,
"publishDate"
,
"versionNo"
,
"registerNo"
,
"registerAperDate"
,
"name"
,
"shortName"
,
"owner"
,
"finishDevelopDate"
]);
let
专利
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
专利
,
{
eId
},
[
"patentId"
,
"eId"
,
"category"
,
"kindcode"
,
"applicationNumber"
,
"applicationDate"
,
"publicationNumber"
,
"publicationDate"
,
"legalStatusDesc"
,
"title"
,
"agency"
,
"kindCodeDesc"
,
"IPCDesc"
,
"inventorStringList"
,
"assigneestringList"
]);
let
知识产权
Map
:
any
=
{};
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
商标信息
]
=
商标
;
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
作品著作权
]
=
作品著作权
;
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
软件著作权
]
=
软件著作权
;
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
外观设计专利
]
=
[];
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
实用新型专利
]
=
[];
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
发明专利
]
=
[];
//1.发明公布,2.发明授权,3.实用新型,4.外观设计
专利
.
forEach
(
info
=>
{
let
{
kindcode
}
=
info
;
if
(
kindcode
==
enumConfig
.
KUNDCODE
.
发明公布
)
{
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
发明专利
].
push
(
info
);
}
else
if
(
kindcode
==
enumConfig
.
KUNDCODE
.
发明授权
)
{
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
发明专利
].
push
(
info
);
}
else
if
(
kindcode
==
enumConfig
.
KUNDCODE
.
实用新型
)
{
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
实用新型专利
].
push
(
info
);
}
else
if
(
kindcode
==
enumConfig
.
KUNDCODE
.
外观设计
)
{
知识产权
Map
[
enumConfig
.
IPRALLTYPE
.
外观设计专利
].
push
(
info
);
}
})
let
iprYearInfo
=
{};
let
iprConf
=
""
;
for
(
let
key
in
知识产权
Map
)
{
if
(
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
iprConf
=
"RegDate"
;
if
(
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
iprConf
=
"registerDate"
;
if
(
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
iprConf
=
"registerAperDate"
;
if
(
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
||
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
商标信息
||
parseInt
(
key
)
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
iprConf
=
"publicationDate"
;
let
知识产权
Data
=
知识产权
Map
[
key
];
知识产权
Data
.
forEach
(
patents
=>
{
let
year
=
moment
(
patents
[
iprConf
]).
format
(
"YYYY"
);
if
(
!
iprYearInfo
[
year
])
iprYearInfo
[
year
]
=
0
;
iprYearInfo
[
year
]
+=
1
;
})
}
let
dataList
:
any
=
[];
for
(
let
key
in
iprInfo
)
{
let
{
iprId
,
year
,
yearStr
,
number
}
=
iprInfo
[
key
];
let
dataList
=
[];
for
(
let
key
in
iprYearInfo
)
{
dataList
.
push
({
iprId
,
year
,
yearStr
,
number
year
:
key
,
count
:
iprYearInfo
[
key
]
})
}
//倒序
dataList
.
sort
(
function
(
a
,
b
)
{
return
parseInt
(
moment
(
b
.
year
).
format
(
"YYYY"
))
-
parseInt
(
moment
(
a
.
year
).
format
(
"YYYY"
)
);
return
parseInt
(
b
.
year
)
-
parseInt
(
a
.
year
);
});
return
{
dataList
};
}
export
async
function
enterpriseIPRByType
(
eId
:
string
,
iprType
:
number
)
{
eccEnumValue
(
"企业知识产权"
,
"iprType"
,
enumConfig
.
IPRTYPE
,
iprType
);
/**
* 知识产权信息-列表
* @param uscc
*/
export
async
function
enterpriseIPRList
(
eId
,
iprType
)
{
let
iprList
=
[];
let
iprColumn
=
[];
let
iprConf
=
[];
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
{
iprColumn
=
[
"tmId"
,
"name"
,
"RegDate"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
商标
,
{
eId
},
iprColumn
);
iprConf
=
[
"tmId"
,
"name"
,
"RegDate"
]
}
let
filesList
=
[
"iprId"
,
"year"
,
"number"
,
"iprType"
,
"selectedValue"
,
"iprName"
,
"iprUrl"
];
let
selecParam
:
any
=
{
eId
};
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
{
iprColumn
=
[
"crId"
,
"name"
,
"registerDate"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
作品著作权
,
{
eId
},
iprColumn
);
iprConf
=
[
"crId"
,
"name"
,
"registerDate"
]
}
if
(
iprType
==
enumConfig
.
IPRTYPE
.
软件著作权
)
{
selecParam
.
iprType
=
enumConfig
.
IPRALLTYPE
.
软件著作权
}
else
if
(
iprType
==
enumConfig
.
IPRTYPE
.
专利
)
{
selecParam
.
iprType
=
{
"%in%"
:
[
enumConfig
.
IPRALLTYPE
.
海外专利
,
enumConfig
.
IPRALLTYPE
.
发明专利
]
};
}
else
{
selecParam
.
iprType
=
{
"%in%"
:
[
enumConfig
.
IPRALLTYPE
.
植物新品种
,
enumConfig
.
IPRALLTYPE
.
集成电路布图
]
};
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
{
iprColumn
=
[
"scId"
,
"registerAperDate"
,
"name"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
软件著作权
,
{
eId
},
iprColumn
);
iprConf
=
[
"scId"
,
"name"
,
"registerAperDate"
]
}
let
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
知识产权
,
selecParam
,
filesList
);
let
dataList
:
any
[]
=
[];
iprList
.
forEach
(
item
=>
{
let
{
iprId
,
year
,
number
,
iprType
,
selectedValue
,
iprName
,
iprUrl
}
=
item
;
let
yearStr
=
moment
(
year
).
format
(
"YYYY"
);
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
专利
,
{
eId
,
kindcode
:
enumConfig
.
KUNDCODE
.
外观设计
},
iprColumn
);
iprConf
=
[
"patentId"
,
"title"
,
"publicationDate"
]
}
dataList
.
push
({
iprId
,
year
,
yearStr
:
`
${
yearStr
}
年`
,
number
:
1
,
iprType
:
changeEnumValue
(
enumConfig
.
IPRALLTYPE
,
iprType
),
//新增知识产权类型
selectedValue
:
iprType
,
//新增选中value
iprName
,
//新增名称
// iprUrl:JSON.stringify(iprUrl),//新增证材料证明
iprUrl
:
iprUrl
?
JSON
.
parse
(
iprUrl
)
:
[]
//新增证材料证明
});
});
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
实用新型专利
)
{
iprColumn
=
[
"patentId"
,
"eId"
,
"category"
,
"kindcode"
,
"applicationNumber"
,
"applicationDate"
,
"publicationNumber"
,
"publicationDate"
,
"legalStatusDesc"
,
"title"
,
"agency"
,
"kindCodeDesc"
,
"IPCDesc"
,
"inventorStringList"
,
"assigneestringList"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
专利
,
{
eId
,
kindcode
:
enumConfig
.
KUNDCODE
.
实用新型
},
iprColumn
);
iprConf
=
[
"patentId"
,
"title"
,
"publicationDate"
]
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
发明专利
)
{
iprColumn
=
[
"patentId"
,
"eId"
,
"category"
,
"kindcode"
,
"applicationNumber"
,
"applicationDate"
,
"publicationNumber"
,
"publicationDate"
,
"legalStatusDesc"
,
"title"
,
"agency"
,
"kindCodeDesc"
,
"IPCDesc"
,
"inventorStringList"
,
"assigneestringList"
];
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
专利
,
{
eId
,
kindcode
:{
"%between%"
:[
enumConfig
.
KUNDCODE
.
发明公布
,
enumConfig
.
KUNDCODE
.
发明授权
]}},
iprColumn
);
iprConf
=
[
"patentId"
,
"title"
,
"publicationDate"
]
}
let
dataList
:
any
=
[];
if
(
iprList
&&
iprList
.
length
)
{
iprList
.
forEach
(
info
=>
{
dataList
.
push
({
iprId
:
info
[
iprConf
[
0
]],
iprName
:
info
[
iprConf
[
1
]],
iprTime
:
moment
(
info
[
iprConf
[
2
]]).
format
(
"YYYY-MM-DD"
),
timeNumber
:
new
Date
(
info
[
iprConf
[
2
]]).
valueOf
()
})
})
}
//倒序
dataList
.
sort
(
function
(
a
,
b
)
{
return
parseInt
(
moment
(
b
.
year
).
format
(
"YYYY"
))
-
parseInt
(
moment
(
a
.
year
).
format
(
"YYYY"
))
;
return
b
.
timeNumber
-
a
.
timeNumber
;
});
return
{
dataList
};
...
...
@@ -207,183 +247,398 @@ export async function enterpriseIPRByType(eId:string, iprType:number) {
/**
* 知识产权信息-修改
* @param uscc 企业统一信用代码
* @param param 表单
* @returns
* 知识产权信息-回显
* @param uscc
*/
export
async
function
updateEnterpriseIPRInfo
(
eId
,
iprId
,
param
)
{
const
FuncName
=
"企业修改知识产权"
eccFormParam
(
FuncName
,
EnterpriseIPRUpdateConfig
,
param
);
export
async
function
enterpriseIPRInfo
(
eId
,
iprType
,
iprId
)
{
let
iprInfo
=
{};
let
iprColumn
=
[];
let
iprConf
=
[];
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
{
iprColumn
=
[
"tmId"
,
"name"
,
"RegDate"
,
"imageUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
商标
,
{
eId
,
tmId
:
iprId
},
iprColumn
);
iprConf
=
[
"tmId"
,
"name"
,
"RegDate"
,
"imageUrl"
]
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
{
iprColumn
=
[
"crId"
,
"name"
,
"registerDate"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
作品著作权
,
{
eId
,
crId
:
iprId
},
iprColumn
);
iprConf
=
[
"crId"
,
"name"
,
"registerDate"
,
"iprUrl"
]
}
let
filesList
=
[
"year"
,
"iprType"
,
"iprName"
,
"iprUrl"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
知识产权
,
{
iprId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
{
iprColumn
=
[
"scId"
,
"registerAperDate"
,
"name"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
软件著作权
,
{
eId
,
scId
:
iprId
},
iprColumn
);
iprConf
=
[
"scId"
,
"name"
,
"registerAperDate"
,
"iprUrl"
]
}
// let disIprInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.知识产权, {year:getMySqlMs(param.year), eId}, ["eId", "iprId"])
// if (disIprInfo && disIprInfo.eId && disIprInfo.iprId != iprId) throw new BizError(ERRORENUM.存在重复的年份数据);
/**修改字段 */
let
changeList
=
checkChange
(
param
,
iprInfo
);
if
(
!
changeList
.
length
)
return
{
isSuccess
:
true
};
let
addInfo
=
{
year
:
getMySqlMs
(
param
.
year
),
iprType
:
param
.
iprType
,
//新增知识产权类型
iprName
:
param
.
iprName
,
//新增名称
// iprUrl:param.iprUrl,//新增证明材料
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
)
//新增证明材料
};
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
||
iprType
==
enumConfig
.
IPRALLTYPE
.
实用新型专利
||
iprType
==
enumConfig
.
IPRALLTYPE
.
发明专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
iprConf
=
[
"patentId"
,
"title"
,
"publicationDate"
,
"iprUrl"
]
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
知识产权
,
addInfo
,
{
iprId
});
let
dataInfo
=
{};
if
(
Object
.
keys
(
iprInfo
).
length
)
{
dataInfo
=
{
iprId
:
iprInfo
[
iprConf
[
0
]],
iprName
:
iprInfo
[
iprConf
[
1
]],
iprTime
:
moment
(
iprInfo
[
iprConf
[
2
]]).
format
(
"YYYY-MM-DD"
),
iprUrl
:
JSON
.
parse
(
iprInfo
[
iprConf
[
3
]]),
}
}
return
{
isSuccess
:
true
};
return
{
dataInfo
};
}
/**
* 知识产权信息-添加
* @param uscc 企业统一信用代码
* @param param 表单
* @param iprUrl:'["XXX.png", "XXX.png"]'
* @param eId
* @param param
* @returns
*/
export
async
function
create
EnterpriseIPRInfo
(
eId
,
param
)
{
const
FuncName
=
"企业创建知识产权"
export
async
function
create
IPRInfo
(
eId
,
iprType
,
param
)
{
const
FuncName
=
`企业创建知识产权-
${
changeEnumValue
(
enumConfig
.
IPRALLTYPE
,
iprType
)}
`
eccFormParam
(
FuncName
,
EnterpriseIPRUpdateConfig
,
param
);
// let iprInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.知识产权, {year:getMySqlMs(param.year), eId}, ["eId"])
// if (iprInfo && iprInfo.eId) throw new BizError(ERRORENUM.存在重复的年份数据);
let
addInfo
:
any
=
{};
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
{
addInfo
=
{
eId
,
tmId
:
randomId
(
TABLEID
.
商标
),
name
:
param
.
iprName
,
RegDate
:
getMySqlMs
(
param
.
iprTime
),
//注册公告时间
imageUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
商标
,
addInfo
,
{});
}
let
addInfo
=
{
eId
,
year
:
getMySqlMs
(
param
.
year
)
,
iprId
:
randomId
(
TABLEID
.
知识产
权
),
iprType
:
param
.
iprType
,
//新增知识产权类型
iprName
:
param
.
iprName
,
//新增名称
// iprUrl:param.iprUrl//新增证明材料
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
//新增证明材料
number
:
1
}
;
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
{
addInfo
=
{
eId
,
crId
:
randomId
(
TABLEID
.
作品著作
权
),
name
:
param
.
iprName
,
registerDate
:
getMySqlMs
(
param
.
iprTime
),
//登记日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
作品著作权
,
addInfo
,
{});
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
知识产权
,
addInfo
,
{});
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
{
addInfo
=
{
eId
,
scId
:
randomId
(
TABLEID
.
软件著作权
),
name
:
param
.
iprName
,
registerAperDate
:
getMySqlMs
(
param
.
iprTime
),
//登记批准日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
软件著作权
,
addInfo
,
{});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
)
{
addInfo
=
{
eId
,
patentId
:
randomId
(
TABLEID
.
专利
),
kindcode
:
enumConfig
.
KUNDCODE
.
外观设计
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
专利
,
addInfo
,
{});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
实用新型专利
)
{
addInfo
=
{
eId
,
patentId
:
randomId
(
TABLEID
.
专利
),
kindcode
:
enumConfig
.
KUNDCODE
.
实用新型
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
专利
,
addInfo
,
{});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
发明专利
)
{
addInfo
=
{
eId
,
patentId
:
randomId
(
TABLEID
.
专利
),
kindcode
:
enumConfig
.
KUNDCODE
.
发明公布
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
专利
,
addInfo
,
{});
}
return
{
isSuccess
:
true
};
}
export
async
function
deleteEnterpriseIPRInfo
(
eId
,
iprId
)
{
let
filesList
=
[
"year"
,
"iprType"
,
"iprName"
,
"iprUrl"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
知识产权
,
{
iprId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
/**
* 知识产权信息-修改
* @param eId
* @param param
* @returns
*/
export
async
function
enterpriseIPRUpdate
(
eId
,
iprType
,
iprId
,
param
)
{
const
FuncName
=
`企业修改知识产权-
${
changeEnumValue
(
enumConfig
.
IPRALLTYPE
,
iprType
)}
`
;
eccFormParam
(
FuncName
,
EnterpriseIPRUpdateConfig
,
param
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
知识产权
,
{},
{
iprId
,
eId
});
let
iprInfo
=
{};
let
iprColumn
=
[];
return
{
isSuccess
:
true
};
}
let
updateInfo
:
any
=
{};
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
{
iprColumn
=
[
"tmId"
,
"name"
,
"RegDate"
,
"imageUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
商标
,
{
eId
,
tmId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
updateInfo
=
{
name
:
param
.
iprName
,
RegDate
:
getMySqlMs
(
param
.
iprTime
),
//注册公告时间
imageUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
商标
,
updateInfo
,
{
eId
,
tmId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
{
iprColumn
=
[
"crId"
,
"name"
,
"registerDate"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
作品著作权
,
{
eId
,
crId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
updateInfo
=
{
name
:
param
.
iprName
,
registerDate
:
getMySqlMs
(
param
.
iprTime
),
//创作完成日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
作品著作权
,
updateInfo
,
{
eId
,
crId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
{
iprColumn
=
[
"scId"
,
"registerAperDate"
,
"name"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
软件著作权
,
{
eId
,
scId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
updateInfo
=
{
name
:
param
.
iprName
,
registerAperDate
:
getMySqlMs
(
param
.
iprTime
),
//发布日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
软件著作权
,
updateInfo
,
{
eId
,
scId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
//====================================专利
updateInfo
=
{
kindcode
:
enumConfig
.
KUNDCODE
.
外观设计
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
专利
,
updateInfo
,
{
eId
,
patentId
:
iprId
});
}
/**
* 专利信息-列表
* 回显
* @param uscc
*/
export
async
function
enterprisePatentInfo
(
eId
:
string
)
{
let
filesList
=
[
"pId"
,
"year"
,
"alienPatent"
,
"classIPatent"
,
"secondClassPatent"
,
"thirdPentent"
];
let
iprList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业专利表
,
{
eId
},
filesList
);
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
实用新型专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
let
dataList
:
any
[]
=
[];
iprList
.
forEach
(
item
=>
{
let
{
pId
,
year
,
number
,
alienPatent
,
classIPatent
,
secondClassPatent
,
thirdPentent
}
=
item
;
dataList
.
push
({
pId
,
year
,
yearStr
:
moment
(
year
).
format
(
"YYYY"
),
number
,
alienPatent
,
classIPatent
,
secondClassPatent
,
thirdPentent
});
});
updateInfo
=
{
kindcode
:
enumConfig
.
KUNDCODE
.
实用新型
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
专利
,
updateInfo
,
{
eId
,
patentId
:
iprId
});
}
return
{
dataList
};
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
发明专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
updateInfo
=
{
kindcode
:
enumConfig
.
KUNDCODE
.
发明公布
,
title
:
param
.
iprName
,
publicationDate
:
getMySqlMs
(
param
.
iprTime
),
//公开日期
iprUrl
:
JSON
.
stringify
(
param
.
iprUrl
),
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
专利
,
updateInfo
,
{
eId
,
patentId
:
iprId
});
}
return
{
isSuccess
:
true
};
}
/**
* 专利信息-修改
* @param uscc 企业统一信用代码
* @param param 表单
* 知识产权信息-删除
* @param eId
* @param iprType
* @param iprId
* @returns
*/
export
async
function
updateEnterprisePatentInfo
(
eId
,
pId
,
param
)
{
const
FuncName
=
"企业修改知识产权"
eccFormParam
(
FuncName
,
EnterprisePatentUpdateConfig
,
param
);
let
filesList
=
[
"pId"
,
"year"
,
"alienPatent"
,
"classIPatent"
,
"secondClassPatent"
,
"thirdPentent"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
pId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
let
disInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
,
"pId"
])
if
(
disInfo
&&
disInfo
.
eId
&&
disInfo
.
pId
!=
pId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
/**修改字段 */
let
changeList
=
checkChange
(
param
,
iprInfo
);
if
(
!
changeList
.
length
)
return
{
isSuccess
:
true
};
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业专利表
,
param
,
{
pId
,
eId
});
export
async
function
enterpriseIPRDel
(
eId
,
iprType
,
iprId
)
{
let
iprInfo
=
{};
let
iprColumn
=
[];
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
商标信息
)
{
iprColumn
=
[
"tmId"
,
"name"
,
"RegDate"
,
"imageUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
商标
,
{
eId
,
tmId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
商标
,
{},
{
eId
,
tmId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
作品著作权
)
{
iprColumn
=
[
"crId"
,
"name"
,
"registerDate"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
作品著作权
,
{
eId
,
crId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
作品著作权
,
{},
{
eId
,
crId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
软件著作权
)
{
iprColumn
=
[
"scId"
,
"registerAperDate"
,
"name"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
软件著作权
,
{
eId
,
scId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
软件著作权
,
{},
{
eId
,
scId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
外观设计专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
专利
,
{},
{
eId
,
patentId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
实用新型专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
专利
,
{},
{
eId
,
patentId
:
iprId
});
}
if
(
iprType
==
enumConfig
.
IPRALLTYPE
.
发明专利
)
{
iprColumn
=
[
"patentId"
,
"publicationDate"
,
"title"
,
"iprUrl"
];
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
专利
,
{
eId
,
patentId
:
iprId
},
iprColumn
);
if
(
!
iprInfo
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
专利
,
{},
{
eId
,
patentId
:
iprId
});
}
return
{
isSuccess
:
true
};
}
/**
* 专利信息-添加
* @param uscc 企业统一信用代码
* @param param 表单
* @returns
*/
export
async
function
createEnterprisePatentInfo
(
eId
,
param
)
{
const
FuncName
=
"企业创建知识产权"
eccFormParam
(
FuncName
,
EnterprisePatentUpdateConfig
,
param
);
//====================================专利
// /**
// * 专利信息-列表
// * 回显
// * @param uscc
// */
// export async function enterprisePatentInfo(eId:string) {
// let filesList = ["pId", "year", "alienPatent", "classIPatent", "secondClassPatent", "thirdPentent"];
// let iprList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业专利表, {eId}, filesList);
// let dataList:any[] = [];
// iprList.forEach(item => {
// let {pId, year, number, alienPatent, classIPatent, secondClassPatent, thirdPentent} = item;
// dataList.push({
// pId,
// year,
// yearStr:moment(year).format("YYYY"),
// number,
// alienPatent,
// classIPatent,
// secondClassPatent,
// thirdPentent
// });
// });
// return {dataList};
// }
// /**
// * 专利信息-修改
// * @param uscc 企业统一信用代码
// * @param param 表单
// * @returns
// */
// export async function updateEnterprisePatentInfo(eId, pId, param) {
// const FuncName = "企业修改知识产权"
// eccFormParam(FuncName, EnterprisePatentUpdateConfig, param );
// let filesList = ["pId", "year", "alienPatent", "classIPatent", "secondClassPatent", "thirdPentent"];
// let iprInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业专利表, {pId, eId}, filesList)
// if (!iprInfo || !iprInfo.year) throw new BizError(ERRORENUM.当前数据不存在);
// let disInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业专利表, {year:getMySqlMs(param.year), eId}, ["eId", "pId"])
// if (disInfo && disInfo.eId && disInfo.pId != pId) throw new BizError(ERRORENUM.存在重复的年份数据);
// /**修改字段 */
// let changeList = checkChange(param, iprInfo);
// if ( !changeList.length ) return {isSuccess:true};
let
disInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
year
:
getMySqlMs
(
param
.
year
),
eId
},
[
"eId"
])
if
(
disInfo
&&
disInfo
.
eId
)
throw
new
BizError
(
ERRORENUM
.
存在重复的年份数据
);
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业专利表, param, {pId, eId});
// return {isSuccess:true};
// }
let
addInfo
=
{
eId
,
year
:
getMySqlMs
(
param
.
year
),
alienPatent
:
param
.
alienPatent
,
classIPatent
:
param
.
classIPatent
,
secondClassPatent
:
param
.
secondClassPatent
,
thirdPentent
:
param
.
thirdPentent
,
pId
:
randomId
(
TABLEID
.
企业专利表
)
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业专利表
,
addInfo
,
{});
// /**
// * 专利信息-添加
// * @param uscc 企业统一信用代码
// * @param param 表单
// * @returns
// */
// export async function createEnterprisePatentInfo(eId, param) {
// const FuncName = "企业创建知识产权"
// eccFormParam(FuncName, EnterprisePatentUpdateConfig, param );
// let disInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业专利表, {year:getMySqlMs(param.year), eId}, ["eId"])
// if (disInfo && disInfo.eId) throw new BizError(ERRORENUM.存在重复的年份数据);
// let addInfo = {
// eId,
// year:getMySqlMs(param.year),
// alienPatent:param.alienPatent,
// classIPatent:param.classIPatent,
// secondClassPatent:param.secondClassPatent,
// thirdPentent:param.thirdPentent,
// pId:randomId(TABLEID.企业专利表)
// };
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业专利表, addInfo, {});
return
{
isSuccess
:
true
};
}
//
return {isSuccess:true};
//
}
/**
* 专利信息-删除
* @param param0
* @returns
*/
export
async
function
deleteEnterprisePatentInfo
(
eId
,
pId
)
{
let
filesList
=
[
"pId"
,
"year"
,
"alienPatent"
,
"classIPatent"
,
"secondClassPatent"
,
"thirdPentent"
];
let
iprInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业专利表
,
{
pId
,
eId
},
filesList
)
if
(
!
iprInfo
||
!
iprInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
/
/ /
**
//
* 专利信息-删除
//
* @param param0
//
* @returns
//
*/
//
export async function deleteEnterprisePatentInfo(eId, pId) {
//
let filesList = ["pId", "year", "alienPatent", "classIPatent", "secondClassPatent", "thirdPentent"];
//
let iprInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业专利表, {pId, eId}, filesList)
//
if (!iprInfo || !iprInfo.year) throw new BizError(ERRORENUM.当前数据不存在);
await
operationalData
(
OPERATIONALDATATYPE
.
删除
,
TABLENAME
.
企业专利表
,
{},
{
pId
,
eId
});
//
await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业专利表, {}, {pId, eId});
return
{
isSuccess
:
true
};
}
// return {isSuccess:true};
// }
//====================================资质认证
...
...
src/config/eccParam/enterprise.ts
View file @
664fa41b
...
...
@@ -29,11 +29,18 @@ export const EnterpriseFaRenInfoUpdateConfig = {
}
// export const EnterpriseIPRUpdateConfig = {
// year:{type:"Number"}, //年度
// // number:{type:"Number"}, //个数
// iprType:{type:"Number"}, //专利类型【枚举】
// iprName:{type:"String"}, //专利名称
// iprUrl:{type:"[String"},//证明材料
// }
export
const
EnterpriseIPRUpdateConfig
=
{
year
:{
type
:
"Number"
},
//年度
// number:{type:"Number"}, //个数
iprType
:{
type
:
"Number"
},
//专利类型【枚举】
iprName
:{
type
:
"String"
},
//专利名称
iprTime
:{
type
:
"Number"
},
//专利时间
iprUrl
:{
type
:
"[String"
},
//证明材料
}
...
...
src/config/enum/dbEnum.ts
View file @
664fa41b
...
...
@@ -28,14 +28,19 @@ export enum TABLENAME {
企业资质
=
'enterprise_qualification'
,
参保记录
=
'enterprise_canbao'
,
创业团队
=
'enterprise_team'
,
知识产权
=
'enterprise_ipr'
,
//
知识产权 ='enterprise_ipr',
法人信息表
=
'enterprise_legal_person'
,
企业专利表
=
'enterprise_patent'
,
//
企业专利表 ='enterprise_patent',
园区通知表
=
'garden_notice'
,
园区活动表
=
'garden_activity'
,
企业服务表
=
'enterprise_service'
,
企业基础信息表
=
'enterprise'
,
政策表
=
'policy'
政策表
=
'policy'
,
入驻信息表
=
"info_enter"
,
商标
=
"trade_mark"
,
作品著作权
=
"copy_right"
,
软件著作权
=
"software_copyright"
,
专利
=
"patent"
,
}
...
...
@@ -50,12 +55,17 @@ export enum TABLEID {
企业资质
=
'qu'
,
参保记录
=
'cb'
,
创业团队
=
'te'
,
知识产权
=
'ipr'
,
//
知识产权 ='ipr',
法人信息表
=
'ps'
,
企业专利表
=
'pe'
,
//
企业专利表 ='pe',
园区通知表
=
'nt'
,
园区活动表
=
'ac'
,
企业服务表
=
'es'
,
企业基础信息表
=
'e'
,
入驻信息表
=
"ie"
,
商标
=
"tm"
,
作品著作权
=
"cr"
,
软件著作权
=
"sc"
,
专利
=
"ipr"
,
图片存储
=
'img'
,
}
\ No newline at end of file
src/config/enum/enum.ts
View file @
664fa41b
...
...
@@ -194,15 +194,33 @@ export enum QUARTER {
* 知识产权 全类型
*/
export
enum
IPRALLTYPE
{
软件著作权
=
1
,
专利
=
100
,
发明专利
=
101
,
海外专利
=
102
,
其他
=
200
,
植物新品种
=
201
,
集成电路布图
=
202
商标信息
=
1
,
作品著作权
,
软件著作权
,
外观设计专利
,
实用新型专利
,
发明专利
// 软件著作权 = 1,
// 专利 = 100,
// 发明专利 = 101,
// 海外专利 = 102,
// 其他 = 200,
// 植物新品种 = 201,
// 集成电路布图 =202
}
/**
* 专利表属于知识产权类型中的详细分类
*/
export
enum
KUNDCODE
{
发明公布
=
1
,
发明授权
,
实用新型
,
外观设计
}
export
enum
IPRTYPE
{
软件著作权
=
1
,
专利
=
100
,
...
...
@@ -211,17 +229,27 @@ export enum IPRTYPE {
/**
*
知识产权类型其他 前端用
*
园区楼号
*/
export
enum
IPRTYPECLIENTQT
{
植物新品种
=
201
,
集成电路布图
=
202
export
enum
BUILDING
{
"1号楼"
=
1
,
"3号楼"
=
3
,
"4号楼"
=
4
,
}
/**
* 知识产权类型其他 前端用
*/
// export enum IPRTYPECLIENTQT {
// 植物新品种 = 201,
// 集成电路布图 =202
// }
/**
* 知识产权类型专利 前端用
*/
export
enum
IPRTYPECLIENTZL
{
发明专利
=
101
,
海外专利
=
102
,
}
\ No newline at end of file
// export enum IPRTYPECLIENTZL {
// 发明专利 = 101,
// 海外专利 = 102,
// }
\ No newline at end of file
src/routers/public.ts
View file @
664fa41b
...
...
@@ -18,9 +18,11 @@ const config = {
"/public/financingrounds"
:
enumConfig
.
FINANCINGROUNDS
,
// "/public/intellectualpropertyright":enumConfig.INTELLECTUALPROPERTYRIGHT,// 新增知识产权类型
// "/public/iprtypeclient":enumConfig.IPRTYPECLIENT,// 新增知识产权类型
"/public/iprtypeclientqt"
:
enumConfig
.
IPRTYPECLIENTQT
,
// 新增知识产权类型
"/public/iprtypeclientzl"
:
enumConfig
.
IPRTYPECLIENTZL
,
// 新增知识产权专利
//
"/public/iprtypeclientqt":enumConfig.IPRTYPECLIENTQT,// 新增知识产权类型
//
"/public/iprtypeclientzl":enumConfig.IPRTYPECLIENTZL,// 新增知识产权专利
"/public/clientpolicytype"
:
enumConfig
.
CLIENTPOLICYTYPE
,
//政策文件类型-前端用
"/public/ipralltype"
:
enumConfig
.
IPRALLTYPE
,
//企查查知识产权类型
"/public/building"
:
enumConfig
.
BUILDING
,
// 园区楼号
}
export
function
setRouter
(
httpServer
)
{
...
...
src/routers/qualification.ts
View file @
664fa41b
...
...
@@ -8,16 +8,18 @@ import { checkUser } from '../middleware/user';
export
function
setRouter
(
httpServer
)
{
/**知识产权 */
httpServer
.
post
(
'/xcx/qualification/ipr/
list'
,
checkUser
,
asyncHandler
(
iprList
));
//弃用
httpServer
.
post
(
'/xcx/qualification/ipr/list
bytype'
,
checkUser
,
asyncHandler
(
iprListByType
));
httpServer
.
post
(
'/xcx/qualification/ipr/
update'
,
checkUser
,
asyncHandler
(
iprUpdate
));
httpServer
.
post
(
'/xcx/qualification/ipr/
count'
,
checkUser
,
asyncHandler
(
iprCount
));
httpServer
.
post
(
'/xcx/qualification/ipr/list
'
,
checkUser
,
asyncHandler
(
iprList
));
httpServer
.
post
(
'/xcx/qualification/ipr/
info'
,
checkUser
,
asyncHandler
(
iprInfo
));
httpServer
.
post
(
'/xcx/qualification/ipr/add'
,
checkUser
,
asyncHandler
(
iprAdd
));
httpServer
.
post
(
'/xcx/qualification/ipr/update'
,
checkUser
,
asyncHandler
(
iprUpdate
));
httpServer
.
post
(
'/xcx/qualification/ipr/del'
,
checkUser
,
asyncHandler
(
iprDel
));
// httpServer.post('/xcx/qualification/ipr/listbytype', checkUser, asyncHandler(iprListByType)); //弃用
/**专利 */
httpServer
.
post
(
'/xcx/qualification/patent/list'
,
checkUser
,
asyncHandler
(
patentList
));
httpServer
.
post
(
'/xcx/qualification/patent/update'
,
checkUser
,
asyncHandler
(
patentUpdate
));
httpServer
.
post
(
'/xcx/qualification/patent/add'
,
checkUser
,
asyncHandler
(
patentAdd
));
httpServer
.
post
(
'/xcx/qualification/patent/del'
,
checkUser
,
asyncHandler
(
patentDel
));
//
httpServer.post('/xcx/qualification/patent/list', checkUser, asyncHandler(patentList));
//
httpServer.post('/xcx/qualification/patent/update', checkUser, asyncHandler(patentUpdate));
//
httpServer.post('/xcx/qualification/patent/add', checkUser, asyncHandler(patentAdd));
//
httpServer.post('/xcx/qualification/patent/del', checkUser, asyncHandler(patentDel));
/**资质认证 */
httpServer
.
post
(
'/xcx/qualification/authentication/info'
,
checkUser
,
asyncHandler
(
authenticationInfo
));
httpServer
.
post
(
'/xcx/qualification/authentication/update'
,
checkUser
,
asyncHandler
(
authenticationUpdate
));
...
...
@@ -30,120 +32,141 @@ export function setRouter(httpServer) {
//===================================知识产权
/**
*
*
知识产权信息-列表
* @param req
* @param res
*/
async
function
iprList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
result
=
await
qualificationBiz
.
enterpriseIPRInfo
(
UserInfo
.
eId
);
res
.
success
(
result
);
}
async
function
iprListByType
(
req
,
res
)
{
async
function
iprCount
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
iprType
}
=
req
.
body
;
let
result
=
await
qualificationBiz
.
enterpriseIPRByType
(
UserInfo
.
eId
,
iprType
);
let
result
=
await
qualificationBiz
.
enterpriseIPRCount
(
UserInfo
.
eId
);
res
.
success
(
result
);
}
/**
*
*
知识产权信息-列表
* @param req
* @param res
*/
async
function
ipr
Update
(
req
,
res
)
{
async
function
ipr
List
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
,
iprId
}
=
req
.
body
let
result
=
await
qualificationBiz
.
updateEnterpriseIPRInfo
(
UserInfo
.
eId
,
iprId
,
param
);
let
{
iprType
}
=
req
.
body
let
result
=
await
qualificationBiz
.
enterpriseIPRList
(
UserInfo
.
eId
,
iprType
);
res
.
success
(
result
);
}
/**
*
* @param req
* @param res
*/
async
function
iprAdd
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
}
=
req
.
body
let
result
=
await
qualificationBiz
.
createEnterpriseIPRInfo
(
UserInfo
.
eId
,
param
);
res
.
success
(
result
);
}
/**
*
*
知识产权信息-回显
* @param req
* @param res
*/
async
function
ipr
Del
(
req
,
res
)
{
async
function
ipr
Info
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
iprId
}
=
req
.
body
let
result
=
await
qualificationBiz
.
deleteEnterpriseIPRInfo
(
UserInfo
.
eId
,
iprId
);
let
{
ipr
Type
,
ipr
Id
}
=
req
.
body
let
result
=
await
qualificationBiz
.
enterpriseIPRInfo
(
UserInfo
.
eId
,
iprType
,
iprId
);
res
.
success
(
result
);
}
//====================================专利
/**
*
*
知识产权信息-添加
* @param req
* @param res
*/
async
function
patentList
(
req
,
res
)
{
async
function
iprAdd
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
result
=
await
qualificationBiz
.
enterprisePatentInfo
(
UserInfo
.
eId
);
let
{
iprType
,
param
}
=
req
.
body
let
result
=
await
qualificationBiz
.
createIPRInfo
(
UserInfo
.
eId
,
iprType
,
param
);
res
.
success
(
result
);
}
/**
*
*
知识产权信息-修改
* @param req
* @param res
*/
async
function
patent
Update
(
req
,
res
)
{
async
function
ipr
Update
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
,
pId
,
fil
e
}
=
req
.
body
let
result
=
await
qualificationBiz
.
updateEnterprisePatentInfo
(
UserInfo
.
eId
,
p
Id
,
param
);
let
{
param
,
iprId
,
iprTyp
e
}
=
req
.
body
let
result
=
await
qualificationBiz
.
enterpriseIPRUpdate
(
UserInfo
.
eId
,
iprType
,
ipr
Id
,
param
);
res
.
success
(
result
);
}
/**
*
*
知识产权信息-删除
* @param req
* @param res
*/
async
function
patentAdd
(
req
,
res
)
{
async
function
iprDel
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
param
,
file
}
=
req
.
body
let
result
=
await
qualificationBiz
.
createEnterprisePatentInfo
(
UserInfo
.
eId
,
param
);
let
{
iprType
,
iprId
}
=
req
.
body
let
result
=
await
qualificationBiz
.
enterpriseIPRDel
(
UserInfo
.
eId
,
iprType
,
iprId
);
res
.
success
(
result
);
}
/**
*
* @param req
* @param res
*/
async
function
patentDel
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
tId
}
=
req
.
body
let
result
=
await
qualificationBiz
.
deleteEnterprisePatentInfo
(
UserInfo
.
eId
,
tId
);
res
.
success
(
result
);
}
//====================================专利
// /**
// *
// * @param req
// * @param res
// */
// async function patentList(req, res) {
// const UserInfo = req.userInfo;
// let result = await qualificationBiz.enterprisePatentInfo(UserInfo.eId);
// res.success(result);
// }
// /**
// *
// * @param req
// * @param res
// */
// async function patentUpdate(req, res) {
// const UserInfo = req.userInfo;
// let {param, pId, file } = req.body
// let result = await qualificationBiz.updateEnterprisePatentInfo(UserInfo.eId, pId, param);
// res.success(result);
// }
// /**
// *
// * @param req
// * @param res
// */
// async function patentAdd(req, res) {
// const UserInfo = req.userInfo;
// let {param, file } = req.body
// let result = await qualificationBiz.createEnterprisePatentInfo(UserInfo.eId, param);
// res.success(result);
// }
// /**
// *
// * @param req
// * @param res
// */
// async function patentDel(req, res) {
// const UserInfo = req.userInfo;
// let {tId } = req.body
// let result = await qualificationBiz.deleteEnterprisePatentInfo(UserInfo.eId, tId);
// res.success(result);
// }
//=================================================资质认证
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment