Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saspAdminServer
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
saspAdminServer
Commits
42a28161
Commit
42a28161
authored
Mar 25, 2026
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7bd6fd94
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
133 additions
and
54 deletions
+133
-54
在谈在跟.xlsx
files/template/在谈在跟.xlsx
+0
-0
enterprise.ts
src/biz/enterprise.ts
+32
-0
importData.ts
src/biz/importData.ts
+7
-7
manage.ts
src/biz/manage.ts
+1
-1
negotiation.ts
src/biz/negotiation.ts
+41
-22
qccInit.ts
src/biz/qccInit.ts
+1
-1
track.ts
src/biz/track.ts
+0
-0
admin.ts
src/config/eccParam/admin.ts
+8
-6
enum.ts
src/config/enum.ts
+2
-0
splitResultConfig.ts
src/config/splitResultConfig.ts
+13
-1
negotiation.ts
src/data/negotiation.ts
+3
-2
track.ts
src/data/track.ts
+1
-1
main.ts
src/main.ts
+2
-2
http_server.ts
src/net/http_server.ts
+1
-1
negotiation.ts
src/routers/negotiation.ts
+8
-8
public.ts
src/routers/public.ts
+13
-2
No files found.
files/template/在谈在跟.xlsx
View file @
42a28161
No preview for this file type
src/biz/enterprise.ts
View file @
42a28161
...
...
@@ -17,6 +17,7 @@ import { BizError } from "../util/bizError";
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
import
*
as
sysTools
from
"../tools/system"
;
import
*
as
labelData
from
"../data/label"
;
import
*
as
negotiationData
from
"../data/negotiation"
;
import
{
convertLabelsToDbFormat
,
generateEnterpriseLabels
,
uniqueLabelList
}
from
'../util/labelUtils'
;
import
moment
from
"moment"
;
let
md5
=
require
(
"md5"
);
...
...
@@ -42,6 +43,37 @@ export async function enterpriseUsccList() {
/**
* 企业库-获取所有企业库和在谈在跟企业的uscc
* @param uscc
*/
export
async
function
enterpriseNegotiationUsccList
()
{
/**企业库 */
let
enterpriseDbList
=
await
enterpriseData
.
findEnterpriseListByParam
({
isSettled
:
configEnum
.
STATE
.
是
});
/**组合返回结果 */
let
dataList
=
[];
enterpriseDbList
.
forEach
(
info
=>
{
/**截取返回数据 */
let
changeData
:
any
=
extractData
(
splitResultConfig
.
enterpriseUsccListConfig
,
info
,
true
);
dataList
.
push
(
changeData
);
})
/**在谈在跟企业 */
let
negotiationDbList
=
await
negotiationData
.
findNegotiationListByParam
({});
negotiationDbList
.
forEach
(
info
=>
{
/**截取返回数据 */
let
changeData
:
any
=
extractData
(
splitResultConfig
.
negotiationUsccListConfig
,
info
,
true
);
dataList
.
push
({
uscc
:
changeData
.
id
,
name
:
changeData
.
name
});
})
return
dataList
;
}
/**
* 企业建档-新增
* @param param
*/
...
...
src/biz/importData.ts
View file @
42a28161
...
...
@@ -81,21 +81,21 @@ export async function 在谈在跟(buff) {
let
rowData
=
blockData
[
i
];
/**枚举转换 */
let
industry
=
[
industryEnum
.
ALLINDUSTRY
[
rowData
[
1
]]];
let
registrationStatus
=
configEnum
.
REGISTRATIONSTATUS
[
rowData
[
2
]];
let
progressStatus
=
configEnum
.
PROGRESSSTATUS
[
rowData
[
3
]];
//
let registrationStatus = configEnum.REGISTRATIONSTATUS[rowData[2]];
let
progressStatus
=
configEnum
.
PROGRESSSTATUS
[
rowData
[
2
]];
//准备在谈在跟数据
let
negotiationInfo
=
{
id
:
randomId
(
TABLEID
.
在跟在谈
),
name
:
rowData
[
0
],
industry
:
industry
,
registrationStatus
:
registrationStatus
,
//
registrationStatus: registrationStatus,
progressStatus
:
progressStatus
,
primaryContact
:
rowData
[
4
],
contactDepartment
:
rowData
[
5
],
progressDetails
:
rowData
[
6
],
primaryContact
:
rowData
[
3
],
contactDepartment
:
rowData
[
4
],
progressDetails
:
rowData
[
5
],
createTime
:
new
Date
().
valueOf
(),
}
negotiationList
.
push
(
negotiationInfo
);
}
});
...
...
src/biz/manage.ts
View file @
42a28161
...
...
@@ -128,7 +128,7 @@ export async function manageUpdate(id:string, param) {
/**校验枚举 */
verificationEnumTools
.
eccEnumValue
(
'管理后台修改经营数据企业'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改经营数据企业'
,
'registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
param
.
registrationStatus
);
//
verificationEnumTools.eccEnumValue('管理后台修改经营数据企业', 'registrationStatus', configEnum.REGISTRATIONSTATUS, param.registrationStatus);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改经营数据企业'
,
'progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
param
.
progressStatus
);
/**校验企业 */
...
...
src/biz/negotiation.ts
View file @
42a28161
...
...
@@ -21,12 +21,12 @@ import moment from "moment";
* 在谈在跟-列表
* @param name 企业名称
* @param industry 行业领域
* @param
registrationStatus 推进、注册
情况
* @param
progressStatus 进展
情况
* @param primaryContact 负责人、首谈人
* @param contactDepartment 对接部门
* @param page 页
*/
export
async
function
negotiationList
(
name
:
string
,
industry
,
registration
Status
:
number
,
primaryContact
:
string
,
contactDepartment
:
string
,
page
:
number
)
{
export
async
function
negotiationList
(
name
:
string
,
industry
,
progress
Status
:
number
,
primaryContact
:
string
,
contactDepartment
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
...
...
@@ -35,9 +35,9 @@ export async function negotiationList(name:string, industry, registrationStatus:
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
selectParam
.
industry
=
{
"$in"
:
industry
};
}
if
(
registration
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'
registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
registration
Status
);
selectParam
.
registrationStatus
=
registration
Status
;
if
(
progress
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'
progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
progress
Status
);
selectParam
.
progressStatus
=
progress
Status
;
}
if
(
primaryContact
)
{
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
...
...
@@ -61,7 +61,19 @@ export async function negotiationList(name:string, industry, registrationStatus:
industry
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
))
}
changeData
.
industry
=
industry
;
changeData
.
registrationStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
REGISTRATIONSTATUS
,
changeData
.
registrationStatus
);
//细分行业领域
let
subDivide
=
[];
if
(
changeData
.
subDivide
&&
changeData
.
subDivide
.
length
>
0
)
{
// 数组处理
let
subDivideValue
=
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
SUBDIVIDE
,
changeData
.
subDivide
);
if
(
subDivideValue
)
{
subDivide
.
push
(
subDivideValue
);
}
}
changeData
.
subDivide
=
subDivide
;
// changeData.registrationStatus = verificationEnumTools.changeEnumValue(configEnum.REGISTRATIONSTATUS, changeData.registrationStatus);
changeData
.
progressStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
PROGRESSSTATUS
,
changeData
.
progressStatus
);
dataList
.
push
(
changeData
);
...
...
@@ -83,7 +95,10 @@ export async function negotiationCreate(param) {
if
(
param
.
industry
&&
param
.
industry
.
length
>
0
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台新增在谈在跟'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
}
verificationEnumTools
.
eccEnumValue
(
'管理后台新增在谈在跟'
,
'registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
param
.
registrationStatus
);
if
(
param
.
subDivide
&&
param
.
subDivide
.
length
>
0
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台新增在谈在跟'
,
'subDivide'
,
industryEnum
.
SUBDIVIDE
,
param
.
subDivide
);
}
// verificationEnumTools.eccEnumValue('管理后台新增在谈在跟', 'registrationStatus', configEnum.REGISTRATIONSTATUS, param.registrationStatus);
let
enterpriseInfo
=
await
negotiationData
.
findNegotiationByParam
({
name
:
param
.
name
});
if
(
enterpriseInfo
&&
enterpriseInfo
.
name
)
throw
new
BizError
(
ERRORENUM
.
该企业已存在
,
`
${
param
.
name
}
已经在库中存在`
);
...
...
@@ -92,7 +107,8 @@ export async function negotiationCreate(param) {
id
:
randomId
(
TABLEID
.
在跟在谈
),
name
:
param
.
name
,
industry
:
param
.
industry
,
registrationStatus
:
param
.
registrationStatus
,
subDivide
:
param
.
subDivide
,
// registrationStatus: param.registrationStatus,
progressStatus
:
param
.
progressStatus
,
primaryContact
:
param
.
primaryContact
,
contactDepartment
:
param
.
contactDepartment
,
...
...
@@ -124,7 +140,8 @@ export async function negotiationInfo(id:string) {
let
dataInfo
=
{
name
:
negotiationDbInfo
.
name
,
industry
:
negotiationDbInfo
.
industry
,
registrationStatus
:
negotiationDbInfo
.
registrationStatus
,
subDivide
:
negotiationDbInfo
.
subDivide
,
// registrationStatus: negotiationDbInfo.registrationStatus,
progressStatus
:
negotiationDbInfo
.
progressStatus
,
primaryContact
:
negotiationDbInfo
.
primaryContact
,
contactDepartment
:
negotiationDbInfo
.
contactDepartment
,
...
...
@@ -146,7 +163,8 @@ export async function negotiationUpdate(id:string, param) {
/**校验枚举 */
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
param
.
registrationStatus
);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'subDivide'
,
industryEnum
.
SUBDIVIDE
,
param
.
subDivide
);
// verificationEnumTools.eccEnumValue('管理后台修改在谈在跟企业', 'registrationStatus', configEnum.REGISTRATIONSTATUS, param.registrationStatus);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
param
.
progressStatus
);
/**校验企业 */
...
...
@@ -184,12 +202,12 @@ export async function negotiationDelete(id:string) {
* 导出在谈在跟企业信息列表
* @param name 企业名称
* @param industry 行业领域
* @param
registrationStatus 推进、注册
情况
* @param
progressStatus 进展
情况
* @param primaryContact 负责人、首谈人
* @param contactDepartment 对接部门
* @returns 二维数组,第一行为表头,后续行为数据
*/
export
async
function
outPutNegotiationData
(
name
:
string
,
industry
:
string
[],
registration
Status
:
number
,
primaryContact
:
string
,
contactDepartment
:
string
,
id
:
string
[])
{
export
async
function
outPutNegotiationData
(
name
:
string
,
industry
:
string
[],
progress
Status
:
number
,
primaryContact
:
string
,
contactDepartment
:
string
,
id
:
string
[])
{
/** 拼接查询条件 */
let
selectParam
:
any
=
{};
if
(
name
)
{
...
...
@@ -199,9 +217,9 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
selectParam
.
industry
=
{
"$in"
:
industry
};
}
if
(
registration
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'
registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
registration
Status
);
selectParam
.
registrationStatus
=
registration
Status
;
if
(
progress
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'
progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
progress
Status
);
selectParam
.
progressStatus
=
progress
Status
;
}
if
(
primaryContact
)
{
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
...
...
@@ -220,24 +238,24 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
const
titleList
=
[
"企业名称"
,
"行业领域"
,
"
推进状态
"
,
"
注册
情况"
,
"
细分行业领域
"
,
"
进展
情况"
,
"负责人/首谈人"
,
"对接部门"
,
"进度详情"
,
//
"创建时间"
"创建时间"
];
/** 字段映射 */
const
keyList
=
[
"name"
,
"industry"
,
"subDivide"
,
"progressStatus"
,
"registrationStatus"
,
"primaryContact"
,
"contactDepartment"
,
"progressDetails"
,
//
"createTime"
"createTime"
];
let
dataList
=
[
titleList
];
// 第一行为表头
...
...
@@ -252,11 +270,12 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
industryText
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
));
}
changeData
.
industry
=
industryText
.
join
(
"、"
)
||
"未选择"
;
changeData
.
registrationStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
REGISTRATIONSTATUS
,
changeData
.
registrationStatus
)
||
"未选择"
;
changeData
.
subDivide
=
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
SUBDIVIDE
,
changeData
.
subDivide
)
||
"未选择"
;
// changeData.registrationStatus = verificationEnumTools.changeEnumValue(configEnum.REGISTRATIONSTATUS, changeData.registrationStatus) || "未选择";
changeData
.
progressStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
PROGRESSSTATUS
,
changeData
.
progressStatus
)
||
"未选择"
;
/** 时间格式化 */
// changeData.createTime = changeData.createTime ? moment(changeData
.createTime).format("YYYY-MM-DD HH:mm:ss") : "-";
changeData
.
createTime
=
info
.
createTime
?
moment
(
info
.
createTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
"-"
;
/** 生成一行数据 */
let
row
=
[];
...
...
src/biz/qccInit.ts
View file @
42a28161
...
...
@@ -27,7 +27,7 @@ const BATCH_INTERVAL = 5 * 60 * 1000; // 批次间隔时间:5分钟
* 设置定时器,分批刷新数据
*/
export
async
function
initApiDataStorage
()
{
//
updateQCCDataTask();
updateQCCDataTask
();
setInterval
(
async
function
()
{
updateQCCDataTask
();
},
3600
*
1000
*
24
);
// 每天启动一次完整的数据同步
...
...
src/biz/track.ts
View file @
42a28161
This diff is collapsed.
Click to expand it.
src/config/eccParam/admin.ts
View file @
42a28161
...
...
@@ -26,7 +26,8 @@ export const AdminUserAddConfig = {
export
const
NegotiationAddConfig
=
{
name
:{
type
:
"String"
},
//企业名称
industry
:{
type
:
"[Number]"
},
//行业领域
registrationStatus
:{
type
:
"Number"
},
//推进、注册情况
subDivide
:{
type
:
"[Number]"
},
//细分行业领域
// registrationStatus:{type:"Number"}, //推进、注册情况
progressStatus
:{
type
:
"Number"
},
//进展情况
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
contactDepartment
:{
type
:
"String"
},
//对接部门
...
...
@@ -42,7 +43,8 @@ export const NegotiationAddConfig = {
export
const
NegotiationUpdateConfig
=
{
name
:{
type
:
"String"
},
//企业名称
industry
:{
type
:
"[Number]"
},
//行业领域
registrationStatus
:{
type
:
"Number"
},
//推进、注册情况
subDivide
:{
type
:
"[Number]"
},
//细分行业领域
// registrationStatus:{type:"Number"}, //推进、注册情况
progressStatus
:{
type
:
"Number"
},
//进展情况
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
contactDepartment
:{
type
:
"String"
},
//对接部门
...
...
@@ -65,14 +67,14 @@ export const EnterpriseAddConfig = {
// industryCategoryGb:{type:"String"}, //国标行业门类
industry
:{
type
:
"[Number]"
},
//行业领域
subDivide
:{
type
:
"[Number]"
,
notMustHave
:
true
},
//细分行业领域-用于小台账
property
:{
type
:
"Number"
},
//企业所属物业
property
:{
type
:
"Number"
,
notMustHave
:
true
},
//企业所属物业
enterpriseNature
:{
type
:
"Number"
},
//企业性质
leasedArea
:{
type
:
"Number"
},
//租赁面积(㎡)
leasedArea
:{
type
:
"Number"
,
notMustHave
:
true
},
//租赁面积(㎡)
RAS
:{
type
:
"Number"
},
//登记状态
jingYingFanWei
:{
type
:
"String"
},
//经营范围
legalPerson
:{
type
:
"String"
},
//法人
zhuceziben
:{
type
:
"String"
},
//注册资本
dianHua
:{
type
:
"String"
},
//电话
dianHua
:{
type
:
"String"
,
notMustHave
:
true
},
//电话
};
...
...
@@ -143,7 +145,7 @@ export const ManageUpdateConfig = {
* 备注: 所有参数为必填
*/
export
const
TrackAddConfig
=
{
uscc
:{
type
:
"String"
},
//统一信用代码
uscc
:{
type
:
"String"
,
notMustHave
:
true
},
//统一信用代码 由于要兼容在谈在跟企业添加服务追踪,改为非必填
name
:{
type
:
"String"
},
//企业名称
demand
:{
type
:
"Number"
},
//需求类型
content
:{
type
:
"String"
},
//需求描述
...
...
src/config/enum.ts
View file @
42a28161
...
...
@@ -89,7 +89,9 @@ export enum REGISTRATIONSTATUS {
*/
export
enum
PROGRESSSTATUS
{
初次接触
=
1
,
合同洽谈
,
项目落地
,
项目终止
,
}
...
...
src/config/splitResultConfig.ts
View file @
42a28161
...
...
@@ -14,7 +14,8 @@ export const negotiationListConfig = {
id
:{
key
:
"标识"
},
name
:{
key
:
"企业名称"
},
industry
:{
key
:
"行业领域"
},
registrationStatus
:{
key
:
"推进/注册情况"
},
subDivide
:{
key
:
"细分行业领域"
},
// registrationStatus:{key:"推进/注册情况"},
progressStatus
:{
key
:
"进展情况"
},
primaryContact
:{
key
:
"负责人/首谈人"
},
contactDepartment
:{
key
:
"对接部门"
},
...
...
@@ -60,6 +61,17 @@ export const enterpriseUsccListConfig = {
/**
* 使用端: 管理后台
* 场景: 企业库所有uscc列表
* 备注: 导出和列表共用一份配置
*/
export
const
negotiationUsccListConfig
=
{
id
:{
key
:
"标识"
},
name
:{
key
:
"企业名称"
}
};
/**
* 使用端: 管理后台
* 场景: 经营数据列表
* 备注: 导出和列表共用一份配置
*/
...
...
src/data/negotiation.ts
View file @
42a28161
...
...
@@ -10,8 +10,9 @@ const negotiationSchema = new Schema({
// uscc:{type:String, index:true}, //统一信用代码
name
:{
type
:
String
,
index
:
true
},
//企业名称
industry
:
[
Number
],
//行业领域 ALLINDUSTRY
registrationStatus
:{
type
:
Number
,
default
:
1
},
//推进、注册情况 REGISTRATIONSTATUS: 1-洽谈中, 2-已注册, 3-已入驻, 4-已终止
progressStatus
:{
type
:
Number
,
default
:
1
},
//进展情况 PROGRESSSTATUS:1-初次接触, 2-深度洽谈, 3-协议草拟, 4-协议签订, 5-项目落地
subDivide
:[
Number
],
//细分行业领域 用于小台账
registrationStatus
:{
type
:
Number
,
default
:
1
},
//推进、注册情况 REGISTRATIONSTATUS: 1-洽谈中, 2-已注册, 3-已入驻, 4-已终止 弃用
progressStatus
:{
type
:
Number
,
default
:
1
},
//进展情况 PROGRESSSTATUS:1-初次接触, 2-合同洽谈, 3-项目落地, 4-项目终止
progressDetails
:
String
,
//进度详情
primaryContact
:
String
,
//负责人、首谈人
contactDepartment
:
String
,
//对接部门
...
...
src/data/track.ts
View file @
42a28161
...
...
@@ -24,7 +24,7 @@ import { sasp } from '../db/mongo/dbInit';
*/
const
trackSchema
=
new
Schema
({
id
:{
type
:
String
,
index
:
true
},
//标识
uscc
:{
type
:
String
,
index
:
true
},
//企业uscc
uscc
:{
type
:
String
,
index
:
true
},
//企业uscc
在谈在跟企业id
name
:
String
,
//企业名称
demand
:
Number
,
//需求类型 VISITDEMAND
content
:
String
,
//需求描述详情
...
...
src/main.ts
View file @
42a28161
...
...
@@ -10,13 +10,13 @@ async function lanuch() {
/**初始化数据库 */
await
initDB
();
/**初始化底表数据 */
await
initBasicData
();
//
await initBasicData();
/**创建http服务 */
httpServer
.
createServer
(
systemConfig
.
port
);
console
.
log
(
'This indicates that the server is started successfully.'
);
/**初始化企查查数据 */
await
initApiDataStorage
();
//
await initApiDataStorage();
}
...
...
src/net/http_server.ts
View file @
42a28161
...
...
@@ -12,7 +12,7 @@ export class httpServer {
var
httpServer
=
express
();
httpServer
.
all
(
'*'
,
(
req
,
res
,
next
)
=>
{
res
.
header
(
'Access-Control-Allow-Origin'
,
req
.
headers
.
origin
);
res
.
header
(
'Access-Control-Allow-Origin'
,
req
.
headers
.
origin
);
res
.
header
(
"Access-Control-Allow-Headers"
,
"X-Requested-With"
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type,request-origin,userid,token'
);
res
.
header
(
"Access-Control-Allow-Methods"
,
"PUT,POST,GET,DELETE,OPTIONS"
);
...
...
src/routers/negotiation.ts
View file @
42a28161
...
...
@@ -23,11 +23,11 @@ export function setRouter(httpServer) {
* @param res
*/
async
function
getNegotiationList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
registration
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
registration
Status'
,
'primaryContact'
,
'contactDepartment'
];
let
{
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
progress
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
progress
Status'
,
'primaryContact'
,
'contactDepartment'
];
let
{
name
,
industry
,
progress
Status
,
primaryContact
,
contactDepartment
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
result
=
await
negotiationBiz
.
negotiationList
(
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
page
);
let
result
=
await
negotiationBiz
.
negotiationList
(
name
,
industry
,
progress
Status
,
primaryContact
,
contactDepartment
,
page
);
res
.
success
(
result
);
}
...
...
@@ -94,11 +94,11 @@ async function delNegotiation(req, res) {
* @param res
*/
async
function
outPutNegotiation
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
registration
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
id
:
'[String]'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
registration
Status'
,
'primaryContact'
,
'contactDepartment'
,
'id'
];
let
{
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
id
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
progress
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
id
:
'[String]'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
progress
Status'
,
'primaryContact'
,
'contactDepartment'
,
'id'
];
let
{
name
,
industry
,
progress
Status
,
primaryContact
,
contactDepartment
,
id
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
result
=
await
negotiationBiz
.
outPutNegotiationData
(
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
id
);
let
result
=
await
negotiationBiz
.
outPutNegotiationData
(
name
,
industry
,
progress
Status
,
primaryContact
,
contactDepartment
,
id
);
res
.
success
(
result
);
}
...
...
src/routers/public.ts
View file @
42a28161
...
...
@@ -16,7 +16,7 @@ const config = {
"/public/industry"
:
industryConfig
.
ALLINDUSTRY
,
//行业领域
"/public/subdivied"
:
industryConfig
.
SUBDIVIDE
,
//细分行业领域
"/public/ras"
:
enumConfig
.
RAS
,
//登记状态
"/public/registrationstatus"
:
enumConfig
.
REGISTRATIONSTATUS
,
//推荐/注册情况
// "/public/registrationstatus":enumConfig.REGISTRATIONSTATUS, //推荐/注册情况 弃用
"/public/progressstatus"
:
enumConfig
.
PROGRESSSTATUS
,
//进展情况
"/public/period"
:
enumConfig
.
PERIOD
,
//数据时间 上半年(1-6月)、下半年(7-12月)、全年
"/public/demand"
:
enumConfig
.
VISITDEMAND
,
//需求类型
...
...
@@ -46,8 +46,19 @@ export function setRouter(httpServer) {
* @param req
* @param res
*/
// async function getAllUscc(req, res) {
// let result = await enterpriseBiz.enterpriseUsccList();
// res.success(result);
// }
/**
* 获取所有企业uscc
* @param req
* @param res
*/
async
function
getAllUscc
(
req
,
res
)
{
let
result
=
await
enterpriseBiz
.
enterpriseUsccList
();
let
result
=
await
enterpriseBiz
.
enterprise
Negotiation
UsccList
();
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