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
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
388 additions
and
107 deletions
+388
-107
在谈在跟.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
+255
-53
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";
...
@@ -17,6 +17,7 @@ import { BizError } from "../util/bizError";
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../config/errorEnum"
;
import
*
as
sysTools
from
"../tools/system"
;
import
*
as
sysTools
from
"../tools/system"
;
import
*
as
labelData
from
"../data/label"
;
import
*
as
labelData
from
"../data/label"
;
import
*
as
negotiationData
from
"../data/negotiation"
;
import
{
convertLabelsToDbFormat
,
generateEnterpriseLabels
,
uniqueLabelList
}
from
'../util/labelUtils'
;
import
{
convertLabelsToDbFormat
,
generateEnterpriseLabels
,
uniqueLabelList
}
from
'../util/labelUtils'
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
let
md5
=
require
(
"md5"
);
let
md5
=
require
(
"md5"
);
...
@@ -42,6 +43,37 @@ export async function enterpriseUsccList() {
...
@@ -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
* @param param
*/
*/
...
...
src/biz/importData.ts
View file @
42a28161
...
@@ -81,21 +81,21 @@ export async function 在谈在跟(buff) {
...
@@ -81,21 +81,21 @@ export async function 在谈在跟(buff) {
let
rowData
=
blockData
[
i
];
let
rowData
=
blockData
[
i
];
/**枚举转换 */
/**枚举转换 */
let
industry
=
[
industryEnum
.
ALLINDUSTRY
[
rowData
[
1
]]];
let
industry
=
[
industryEnum
.
ALLINDUSTRY
[
rowData
[
1
]]];
let
registrationStatus
=
configEnum
.
REGISTRATIONSTATUS
[
rowData
[
2
]];
//
let registrationStatus = configEnum.REGISTRATIONSTATUS[rowData[2]];
let
progressStatus
=
configEnum
.
PROGRESSSTATUS
[
rowData
[
3
]];
let
progressStatus
=
configEnum
.
PROGRESSSTATUS
[
rowData
[
2
]];
//准备在谈在跟数据
//准备在谈在跟数据
let
negotiationInfo
=
{
let
negotiationInfo
=
{
id
:
randomId
(
TABLEID
.
在跟在谈
),
id
:
randomId
(
TABLEID
.
在跟在谈
),
name
:
rowData
[
0
],
name
:
rowData
[
0
],
industry
:
industry
,
industry
:
industry
,
registrationStatus
:
registrationStatus
,
//
registrationStatus: registrationStatus,
progressStatus
:
progressStatus
,
progressStatus
:
progressStatus
,
primaryContact
:
rowData
[
4
],
primaryContact
:
rowData
[
3
],
contactDepartment
:
rowData
[
5
],
contactDepartment
:
rowData
[
4
],
progressDetails
:
rowData
[
6
],
progressDetails
:
rowData
[
5
],
createTime
:
new
Date
().
valueOf
(),
createTime
:
new
Date
().
valueOf
(),
}
}
negotiationList
.
push
(
negotiationInfo
);
negotiationList
.
push
(
negotiationInfo
);
}
}
});
});
...
...
src/biz/manage.ts
View file @
42a28161
...
@@ -128,7 +128,7 @@ export async function manageUpdate(id:string, param) {
...
@@ -128,7 +128,7 @@ export async function manageUpdate(id:string, param) {
/**校验枚举 */
/**校验枚举 */
verificationEnumTools
.
eccEnumValue
(
'管理后台修改经营数据企业'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
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
);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改经营数据企业'
,
'progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
param
.
progressStatus
);
/**校验企业 */
/**校验企业 */
...
...
src/biz/negotiation.ts
View file @
42a28161
...
@@ -21,12 +21,12 @@ import moment from "moment";
...
@@ -21,12 +21,12 @@ import moment from "moment";
* 在谈在跟-列表
* 在谈在跟-列表
* @param name 企业名称
* @param name 企业名称
* @param industry 行业领域
* @param industry 行业领域
* @param
registrationStatus 推进、注册
情况
* @param
progressStatus 进展
情况
* @param primaryContact 负责人、首谈人
* @param primaryContact 负责人、首谈人
* @param contactDepartment 对接部门
* @param contactDepartment 对接部门
* @param page 页
* @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
=
{};
let
selectParam
:
any
=
{};
if
(
name
)
{
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
...
@@ -35,9 +35,9 @@ export async function negotiationList(name:string, industry, registrationStatus:
...
@@ -35,9 +35,9 @@ export async function negotiationList(name:string, industry, registrationStatus:
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
selectParam
.
industry
=
{
"$in"
:
industry
};
selectParam
.
industry
=
{
"$in"
:
industry
};
}
}
if
(
registration
Status
)
{
if
(
progress
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'
registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
registration
Status
);
verificationEnumTools
.
eccEnumValue
(
'管理后台获取在谈在跟列表'
,
'
progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
progress
Status
);
selectParam
.
registrationStatus
=
registration
Status
;
selectParam
.
progressStatus
=
progress
Status
;
}
}
if
(
primaryContact
)
{
if
(
primaryContact
)
{
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
...
@@ -61,7 +61,19 @@ export async function negotiationList(name:string, industry, registrationStatus:
...
@@ -61,7 +61,19 @@ export async function negotiationList(name:string, industry, registrationStatus:
industry
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
))
industry
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
))
}
}
changeData
.
industry
=
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
);
changeData
.
progressStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
PROGRESSSTATUS
,
changeData
.
progressStatus
);
dataList
.
push
(
changeData
);
dataList
.
push
(
changeData
);
...
@@ -83,7 +95,10 @@ export async function negotiationCreate(param) {
...
@@ -83,7 +95,10 @@ export async function negotiationCreate(param) {
if
(
param
.
industry
&&
param
.
industry
.
length
>
0
)
{
if
(
param
.
industry
&&
param
.
industry
.
length
>
0
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台新增在谈在跟'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
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
});
let
enterpriseInfo
=
await
negotiationData
.
findNegotiationByParam
({
name
:
param
.
name
});
if
(
enterpriseInfo
&&
enterpriseInfo
.
name
)
throw
new
BizError
(
ERRORENUM
.
该企业已存在
,
`
${
param
.
name
}
已经在库中存在`
);
if
(
enterpriseInfo
&&
enterpriseInfo
.
name
)
throw
new
BizError
(
ERRORENUM
.
该企业已存在
,
`
${
param
.
name
}
已经在库中存在`
);
...
@@ -92,7 +107,8 @@ export async function negotiationCreate(param) {
...
@@ -92,7 +107,8 @@ export async function negotiationCreate(param) {
id
:
randomId
(
TABLEID
.
在跟在谈
),
id
:
randomId
(
TABLEID
.
在跟在谈
),
name
:
param
.
name
,
name
:
param
.
name
,
industry
:
param
.
industry
,
industry
:
param
.
industry
,
registrationStatus
:
param
.
registrationStatus
,
subDivide
:
param
.
subDivide
,
// registrationStatus: param.registrationStatus,
progressStatus
:
param
.
progressStatus
,
progressStatus
:
param
.
progressStatus
,
primaryContact
:
param
.
primaryContact
,
primaryContact
:
param
.
primaryContact
,
contactDepartment
:
param
.
contactDepartment
,
contactDepartment
:
param
.
contactDepartment
,
...
@@ -124,7 +140,8 @@ export async function negotiationInfo(id:string) {
...
@@ -124,7 +140,8 @@ export async function negotiationInfo(id:string) {
let
dataInfo
=
{
let
dataInfo
=
{
name
:
negotiationDbInfo
.
name
,
name
:
negotiationDbInfo
.
name
,
industry
:
negotiationDbInfo
.
industry
,
industry
:
negotiationDbInfo
.
industry
,
registrationStatus
:
negotiationDbInfo
.
registrationStatus
,
subDivide
:
negotiationDbInfo
.
subDivide
,
// registrationStatus: negotiationDbInfo.registrationStatus,
progressStatus
:
negotiationDbInfo
.
progressStatus
,
progressStatus
:
negotiationDbInfo
.
progressStatus
,
primaryContact
:
negotiationDbInfo
.
primaryContact
,
primaryContact
:
negotiationDbInfo
.
primaryContact
,
contactDepartment
:
negotiationDbInfo
.
contactDepartment
,
contactDepartment
:
negotiationDbInfo
.
contactDepartment
,
...
@@ -146,7 +163,8 @@ export async function negotiationUpdate(id:string, param) {
...
@@ -146,7 +163,8 @@ export async function negotiationUpdate(id:string, param) {
/**校验枚举 */
/**校验枚举 */
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
param
.
industry
);
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
);
verificationEnumTools
.
eccEnumValue
(
'管理后台修改在谈在跟企业'
,
'progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
param
.
progressStatus
);
/**校验企业 */
/**校验企业 */
...
@@ -184,12 +202,12 @@ export async function negotiationDelete(id:string) {
...
@@ -184,12 +202,12 @@ export async function negotiationDelete(id:string) {
* 导出在谈在跟企业信息列表
* 导出在谈在跟企业信息列表
* @param name 企业名称
* @param name 企业名称
* @param industry 行业领域
* @param industry 行业领域
* @param
registrationStatus 推进、注册
情况
* @param
progressStatus 进展
情况
* @param primaryContact 负责人、首谈人
* @param primaryContact 负责人、首谈人
* @param contactDepartment 对接部门
* @param contactDepartment 对接部门
* @returns 二维数组,第一行为表头,后续行为数据
* @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
=
{};
let
selectParam
:
any
=
{};
if
(
name
)
{
if
(
name
)
{
...
@@ -199,9 +217,9 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
...
@@ -199,9 +217,9 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'industry'
,
industryEnum
.
ALLINDUSTRY
,
industry
);
selectParam
.
industry
=
{
"$in"
:
industry
};
selectParam
.
industry
=
{
"$in"
:
industry
};
}
}
if
(
registration
Status
)
{
if
(
progress
Status
)
{
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'
registrationStatus'
,
configEnum
.
REGISTRATIONSTATUS
,
registration
Status
);
verificationEnumTools
.
eccEnumValue
(
'管理后台导出在谈在跟列表'
,
'
progressStatus'
,
configEnum
.
PROGRESSSTATUS
,
progress
Status
);
selectParam
.
registrationStatus
=
registration
Status
;
selectParam
.
progressStatus
=
progress
Status
;
}
}
if
(
primaryContact
)
{
if
(
primaryContact
)
{
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
selectParam
.
primaryContact
=
{
"$regex"
:
`
${
primaryContact
}
`
};
...
@@ -220,24 +238,24 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
...
@@ -220,24 +238,24 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
const
titleList
=
[
const
titleList
=
[
"企业名称"
,
"企业名称"
,
"行业领域"
,
"行业领域"
,
"
推进状态
"
,
"
细分行业领域
"
,
"
注册
情况"
,
"
进展
情况"
,
"负责人/首谈人"
,
"负责人/首谈人"
,
"对接部门"
,
"对接部门"
,
"进度详情"
,
"进度详情"
,
//
"创建时间"
"创建时间"
];
];
/** 字段映射 */
/** 字段映射 */
const
keyList
=
[
const
keyList
=
[
"name"
,
"name"
,
"industry"
,
"industry"
,
"subDivide"
,
"progressStatus"
,
"progressStatus"
,
"registrationStatus"
,
"primaryContact"
,
"primaryContact"
,
"contactDepartment"
,
"contactDepartment"
,
"progressDetails"
,
"progressDetails"
,
//
"createTime"
"createTime"
];
];
let
dataList
=
[
titleList
];
// 第一行为表头
let
dataList
=
[
titleList
];
// 第一行为表头
...
@@ -252,11 +270,12 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
...
@@ -252,11 +270,12 @@ export async function outPutNegotiationData(name:string, industry:string[], regi
industryText
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
));
industryText
.
push
(
verificationEnumTools
.
changeEnumValue
(
industryEnum
.
ALLINDUSTRY
,
changeData
.
industry
));
}
}
changeData
.
industry
=
industryText
.
join
(
"、"
)
||
"未选择"
;
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
.
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
=
[];
let
row
=
[];
...
...
src/biz/qccInit.ts
View file @
42a28161
...
@@ -27,7 +27,7 @@ const BATCH_INTERVAL = 5 * 60 * 1000; // 批次间隔时间:5分钟
...
@@ -27,7 +27,7 @@ const BATCH_INTERVAL = 5 * 60 * 1000; // 批次间隔时间:5分钟
* 设置定时器,分批刷新数据
* 设置定时器,分批刷新数据
*/
*/
export
async
function
initApiDataStorage
()
{
export
async
function
initApiDataStorage
()
{
//
updateQCCDataTask();
updateQCCDataTask
();
setInterval
(
async
function
()
{
setInterval
(
async
function
()
{
updateQCCDataTask
();
updateQCCDataTask
();
},
3600
*
1000
*
24
);
// 每天启动一次完整的数据同步
},
3600
*
1000
*
24
);
// 每天启动一次完整的数据同步
...
...
src/biz/track.ts
View file @
42a28161
...
@@ -401,21 +401,17 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
...
@@ -401,21 +401,17 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
/** 查询服务追踪数据 */
/** 查询服务追踪数据 */
let
trackDbList
=
await
trackData
.
findTrackListByParam
(
selectParam
);
let
trackDbList
=
await
trackData
.
findTrackListByParam
(
selectParam
);
/** 表头定义 */
/** 表头定义
- 新增"服务次数"列
*/
const
titleList
=
[
const
titleList
=
[
"企业名称"
,
"企业名称"
,
"
统一社会信用代码"
,
"
服务次数"
,
// 新增列
"需求类型"
,
"需求类型"
,
"需求内容"
,
"需求内容"
,
"联系人"
,
"联系人"
,
"联系方式"
,
"联系方式"
,
"需求创建时间"
,
"需求创建时间"
,
"当前跟进状态"
,
"当前跟进状态"
,
"跟进人"
,
"跟进情况"
,
// 合并所有跟进记录,每条记录用换行符分隔
"跟进时间"
,
"跟进详情"
,
"跟进状态"
,
// "跟进记录ID"
];
];
let
dataList
=
[
titleList
];
// 第一行为表头
let
dataList
=
[
titleList
];
// 第一行为表头
...
@@ -432,61 +428,48 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
...
@@ -432,61 +428,48 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
/** 时间格式化 */
/** 时间格式化 */
const
createTime
=
changeData
.
createTime
?
moment
(
changeData
.
createTime
).
format
(
"YYYY-MM-DD"
)
:
"-"
;
const
createTime
=
changeData
.
createTime
?
moment
(
changeData
.
createTime
).
format
(
"YYYY-MM-DD"
)
:
"-"
;
/** 在企业记录前添加空行(除了第一个企业) */
/** 计算该企业的服务次数(跟进记录数量) */
if
(
enterpriseIndex
>
0
)
{
const
serviceCount
=
info
.
details
?
info
.
details
.
length
:
0
;
dataList
.
push
(
new
Array
(
titleList
.
length
).
fill
(
""
));
}
/** 处理跟进详情 */
/** 构建跟进情况文本 */
let
followUpText
=
""
;
if
(
info
.
details
&&
info
.
details
.
length
>
0
)
{
if
(
info
.
details
&&
info
.
details
.
length
>
0
)
{
// 按跟进时间倒序排列,最新的在前
// 按跟进时间倒序排列,最新的在前
const
sortedDetails
=
[...
info
.
details
].
sort
((
a
,
b
)
=>
const
sortedDetails
=
[...
info
.
details
].
sort
((
a
,
b
)
=>
moment
(
b
.
followUpTime
).
valueOf
()
-
moment
(
a
.
followUpTime
).
valueOf
()
moment
(
b
.
followUpTime
).
valueOf
()
-
moment
(
a
.
followUpTime
).
valueOf
()
);
);
sortedDetails
.
forEach
((
detail
,
detailIndex
)
=>
{
// 构建每条跟进记录,用换行符分隔
followUpText
=
sortedDetails
.
map
(
detail
=>
{
const
followUpStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
TRACKTYPE
,
detail
.
followUpStatus
)
||
"未选择"
;
const
followUpStatus
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
TRACKTYPE
,
detail
.
followUpStatus
)
||
"未选择"
;
const
followUpTime
=
detail
.
followUpTime
?
moment
(
detail
.
followUpTime
).
format
(
"YYYY-MM-DD"
)
:
"-"
;
const
followUpTime
=
detail
.
followUpTime
?
moment
(
detail
.
followUpTime
).
format
(
"YYYY-MM-DD"
)
:
"-"
;
/** 生成一行数据 */
// 每条跟进记录的格式:跟进人 跟进时间 跟进详情 跟进状态
let
row
=
[
return
`
${
detail
.
followUpName
||
"-"
}
${
followUpTime
}
${
detail
.
followUpDsc
||
"-"
}
${
followUpStatus
}
`
;
// 只在第一条记录显示企业信息,后续记录留空(Excel可以合并单元格)
}).
join
(
"
\
n"
);
// 使用换行符分隔多条记录
detailIndex
===
0
?
changeData
.
name
||
"-"
:
""
,
detailIndex
===
0
?
changeData
.
uscc
||
"-"
:
""
,
detailIndex
===
0
?
demandText
:
""
,
detailIndex
===
0
?
changeData
.
content
||
"-"
:
""
,
detailIndex
===
0
?
changeData
.
contact
||
"-"
:
""
,
detailIndex
===
0
?
changeData
.
contactUs
||
"-"
:
""
,
detailIndex
===
0
?
createTime
:
""
,
detailIndex
===
0
?
currentTrackType
:
""
,
detail
.
followUpName
||
"-"
,
followUpTime
,
detail
.
followUpDsc
||
"-"
,
followUpStatus
,
// detail.tdid || "-"
];
dataList
.
push
(
row
);
});
}
else
{
}
else
{
/** 如果没有跟进记录,显示一行基础数据 */
followUpText
=
"-"
;
let
row
=
[
}
changeData
.
name
||
"-"
,
changeData
.
uscc
||
"-"
,
demandText
,
changeData
.
content
||
"-"
,
changeData
.
contact
||
"-"
,
changeData
.
contactUs
||
"-"
,
createTime
,
currentTrackType
,
"-"
,
"-"
,
"-"
,
"-"
,
// "-"
];
dataList
.
push
(
row
);
/** 生成一行数据 - 每个企业只生成一行,所有跟进记录合并到跟进情况单元格中 */
let
row
=
[
changeData
.
name
||
"-"
,
serviceCount
.
toString
(),
// 新增:服务次数
demandText
,
changeData
.
content
||
"-"
,
changeData
.
contact
||
"-"
,
changeData
.
contactUs
||
"-"
,
createTime
,
currentTrackType
,
followUpText
,
// 合并后的跟进情况,多条记录用换行符分隔
];
dataList
.
push
(
row
);
/** 在企业记录后添加空行(除了最后一个企业) */
if
(
enterpriseIndex
<
trackDbList
.
length
-
1
)
{
dataList
.
push
(
new
Array
(
titleList
.
length
).
fill
(
""
));
}
}
});
});
...
@@ -495,6 +478,224 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
...
@@ -495,6 +478,224 @@ export async function outPutTrackDetailsData(name: string, demand: number, track
/**
/**
* 导出服务追踪详细信息(空行分隔不同企业)
* @param name 企业名称
* @param demand 需求类型
* @param trackType 需求跟进状态
* @returns 二维数组,第一行为表头,后续行为数据(空行分隔)
*/
// export async function outPutTrackDetailsData(name: string, demand: number, trackType: number, id:string[]) {
// /** 拼接查询条件 */
// let selectParam: any = {};
// if (name) {
// selectParam.name = { "$regex": `${name}` };
// }
// if (demand) {
// selectParam.demand = demand;
// }
// if (trackType) {
// selectParam.trackType = trackType;
// }
// if (id) {
// selectParam.id = {"$in": id};
// }
// /** 查询服务追踪数据 */
// let trackDbList = await trackData.findTrackListByParam(selectParam);
// /** 表头定义 - 将跟进相关字段合并为"跟进情况" */
// const titleList = [
// "企业名称",
// // "统一社会信用代码",
// "需求类型",
// "需求内容",
// "联系人",
// "联系方式",
// "需求创建时间",
// "当前跟进状态",
// "跟进情况", // 合并所有跟进记录,每条记录用换行符分隔
// ];
// let dataList = [titleList]; // 第一行为表头
// /** 处理每个企业的跟踪记录 */
// trackDbList.forEach((info, enterpriseIndex) => {
// /** 提取基础数据 */
// let changeData: any = extractData(splitResultConfig.trackListConfig, info, true);
// /** 枚举值转文本 */
// const demandText = verificationEnumTools.changeEnumValue(configEnum.VISITDEMAND, changeData.demand) || "未选择";
// const currentTrackType = verificationEnumTools.changeEnumValue(configEnum.TRACKTYPE, changeData.trackType) || "未选择";
// /** 时间格式化 */
// const createTime = changeData.createTime ? moment(changeData.createTime).format("YYYY-MM-DD") : "-";
// /** 构建跟进情况文本 */
// let followUpText = "";
// if (info.details && info.details.length > 0) {
// // 按跟进时间倒序排列,最新的在前
// const sortedDetails = [...info.details].sort((a, b) =>
// moment(b.followUpTime).valueOf() - moment(a.followUpTime).valueOf()
// );
// // 构建每条跟进记录,用换行符分隔
// followUpText = sortedDetails.map(detail => {
// const followUpStatus = verificationEnumTools.changeEnumValue(configEnum.TRACKTYPE, detail.followUpStatus) || "未选择";
// const followUpTime = detail.followUpTime ? moment(detail.followUpTime).format("YYYY-MM-DD") : "-";
// // 每条跟进记录的格式:跟进人 跟进时间 跟进详情 跟进状态
// return `${detail.followUpName || "-"} ${followUpTime} ${detail.followUpDsc || "-"} ${followUpStatus}`;
// }).join("\n"); // 使用换行符分隔多条记录
// } else {
// followUpText = "-";
// }
// /** 生成一行数据 - 每个企业只生成一行,所有跟进记录合并到跟进情况单元格中 */
// let row = [
// changeData.name || "-",
// // changeData.uscc || "-",
// demandText,
// changeData.content || "-",
// changeData.contact || "-",
// changeData.contactUs || "-",
// createTime,
// currentTrackType,
// followUpText, // 合并后的跟进情况,多条记录用换行符分隔
// ];
// dataList.push(row);
// /** 在企业记录后添加空行(除了最后一个企业) */
// if (enterpriseIndex < trackDbList.length - 1) {
// dataList.push(new Array(titleList.length).fill(""));
// }
// });
// return dataList;
// }
/**
* 导出服务追踪详细信息(空行分隔不同企业)
* @param name 企业名称
* @param demand 需求类型
* @param trackType 需求跟进状态
* @returns 二维数组,第一行为表头,后续行为数据(空行分隔)
*/
// export async function outPutTrackDetailsData(name: string, demand: number, trackType: number, id:string[]) {
// /** 拼接查询条件 */
// let selectParam: any = {};
// if (name) {
// selectParam.name = { "$regex": `${name}` };
// }
// if (demand) {
// selectParam.demand = demand;
// }
// if (trackType) {
// selectParam.trackType = trackType;
// }
// if (id) {
// selectParam.id = {"$in": id};
// }
// /** 查询服务追踪数据 */
// let trackDbList = await trackData.findTrackListByParam(selectParam);
// /** 表头定义 */
// const titleList = [
// "企业名称",
// "统一社会信用代码",
// "需求类型",
// "需求内容",
// "联系人",
// "联系方式",
// "需求创建时间",
// "当前跟进状态",
// "跟进人",
// "跟进时间",
// "跟进详情",
// "跟进状态",
// // "跟进记录ID"
// ];
// let dataList = [titleList]; // 第一行为表头
// /** 处理每个企业的跟踪记录 */
// trackDbList.forEach((info, enterpriseIndex) => {
// /** 提取基础数据 */
// let changeData: any = extractData(splitResultConfig.trackListConfig, info, true);
// /** 枚举值转文本 */
// const demandText = verificationEnumTools.changeEnumValue(configEnum.VISITDEMAND, changeData.demand) || "未选择";
// const currentTrackType = verificationEnumTools.changeEnumValue(configEnum.TRACKTYPE, changeData.trackType) || "未选择";
// /** 时间格式化 */
// const createTime = changeData.createTime ? moment(changeData.createTime).format("YYYY-MM-DD") : "-";
// /** 在企业记录前添加空行(除了第一个企业) */
// if (enterpriseIndex > 0) {
// dataList.push(new Array(titleList.length).fill(""));
// }
// /** 处理跟进详情 */
// if (info.details && info.details.length > 0) {
// // 按跟进时间倒序排列,最新的在前
// const sortedDetails = [...info.details].sort((a, b) =>
// moment(b.followUpTime).valueOf() - moment(a.followUpTime).valueOf()
// );
// sortedDetails.forEach((detail, detailIndex) => {
// const followUpStatus = verificationEnumTools.changeEnumValue(configEnum.TRACKTYPE, detail.followUpStatus) || "未选择";
// const followUpTime = detail.followUpTime ? moment(detail.followUpTime).format("YYYY-MM-DD") : "-";
// /** 生成一行数据 */
// let row = [
// // 只在第一条记录显示企业信息,后续记录留空(Excel可以合并单元格)
// detailIndex === 0 ? changeData.name || "-" : "",
// detailIndex === 0 ? changeData.uscc || "-" : "",
// detailIndex === 0 ? demandText : "",
// detailIndex === 0 ? changeData.content || "-" : "",
// detailIndex === 0 ? changeData.contact || "-" : "",
// detailIndex === 0 ? changeData.contactUs || "-" : "",
// detailIndex === 0 ? createTime : "",
// detailIndex === 0 ? currentTrackType : "",
// detail.followUpName || "-",
// followUpTime,
// detail.followUpDsc || "-",
// followUpStatus,
// // detail.tdid || "-"
// ];
// dataList.push(row);
// });
// } else {
// /** 如果没有跟进记录,显示一行基础数据 */
// let row = [
// changeData.name || "-",
// changeData.uscc || "-",
// demandText,
// changeData.content || "-",
// changeData.contact || "-",
// changeData.contactUs || "-",
// createTime,
// currentTrackType,
// "-",
// "-",
// "-",
// "-",
// // "-"
// ];
// dataList.push(row);
// }
// });
// return dataList;
// }
/**
* 导出服务追踪信息(简化版,明确分隔)
* 导出服务追踪信息(简化版,明确分隔)
* @param name 企业名称
* @param name 企业名称
* @param demand 需求类型
* @param demand 需求类型
...
@@ -527,10 +728,11 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
...
@@ -527,10 +728,11 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
"联系方式"
,
"联系方式"
,
"需求创建时间"
,
"需求创建时间"
,
"当前跟进状态"
,
"当前跟进状态"
,
"服务次数"
,
"跟进人"
,
"跟进人"
,
"跟进时间"
,
"跟进时间"
,
"跟进详情"
,
"跟进详情"
,
"跟进状态"
"跟进状态"
,
];
];
let
dataList
=
[
titleList
];
let
dataList
=
[
titleList
];
...
@@ -573,6 +775,7 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
...
@@ -573,6 +775,7 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
changeData
.
contactUs
||
"-"
,
changeData
.
contactUs
||
"-"
,
createTime
,
createTime
,
currentTrackType
,
currentTrackType
,
//服务次数
detail
.
followUpName
||
"-"
,
detail
.
followUpName
||
"-"
,
followUpTime
,
followUpTime
,
detail
.
followUpDsc
||
"-"
,
detail
.
followUpDsc
||
"-"
,
...
@@ -592,6 +795,7 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
...
@@ -592,6 +795,7 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
changeData
.
contactUs
||
"-"
,
changeData
.
contactUs
||
"-"
,
createTime
,
createTime
,
currentTrackType
,
currentTrackType
,
//服务次数
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
...
@@ -607,5 +811,3 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
...
@@ -607,5 +811,3 @@ export async function outPutTrackSimpleData(name: string, demand: number, trackT
src/config/eccParam/admin.ts
View file @
42a28161
...
@@ -26,7 +26,8 @@ export const AdminUserAddConfig = {
...
@@ -26,7 +26,8 @@ export const AdminUserAddConfig = {
export
const
NegotiationAddConfig
=
{
export
const
NegotiationAddConfig
=
{
name
:{
type
:
"String"
},
//企业名称
name
:{
type
:
"String"
},
//企业名称
industry
:{
type
:
"[Number]"
},
//行业领域
industry
:{
type
:
"[Number]"
},
//行业领域
registrationStatus
:{
type
:
"Number"
},
//推进、注册情况
subDivide
:{
type
:
"[Number]"
},
//细分行业领域
// registrationStatus:{type:"Number"}, //推进、注册情况
progressStatus
:{
type
:
"Number"
},
//进展情况
progressStatus
:{
type
:
"Number"
},
//进展情况
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
contactDepartment
:{
type
:
"String"
},
//对接部门
contactDepartment
:{
type
:
"String"
},
//对接部门
...
@@ -42,7 +43,8 @@ export const NegotiationAddConfig = {
...
@@ -42,7 +43,8 @@ export const NegotiationAddConfig = {
export
const
NegotiationUpdateConfig
=
{
export
const
NegotiationUpdateConfig
=
{
name
:{
type
:
"String"
},
//企业名称
name
:{
type
:
"String"
},
//企业名称
industry
:{
type
:
"[Number]"
},
//行业领域
industry
:{
type
:
"[Number]"
},
//行业领域
registrationStatus
:{
type
:
"Number"
},
//推进、注册情况
subDivide
:{
type
:
"[Number]"
},
//细分行业领域
// registrationStatus:{type:"Number"}, //推进、注册情况
progressStatus
:{
type
:
"Number"
},
//进展情况
progressStatus
:{
type
:
"Number"
},
//进展情况
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
primaryContact
:{
type
:
"String"
},
//负责人、首谈人
contactDepartment
:{
type
:
"String"
},
//对接部门
contactDepartment
:{
type
:
"String"
},
//对接部门
...
@@ -65,14 +67,14 @@ export const EnterpriseAddConfig = {
...
@@ -65,14 +67,14 @@ export const EnterpriseAddConfig = {
// industryCategoryGb:{type:"String"}, //国标行业门类
// industryCategoryGb:{type:"String"}, //国标行业门类
industry
:{
type
:
"[Number]"
},
//行业领域
industry
:{
type
:
"[Number]"
},
//行业领域
subDivide
:{
type
:
"[Number]"
,
notMustHave
:
true
},
//细分行业领域-用于小台账
subDivide
:{
type
:
"[Number]"
,
notMustHave
:
true
},
//细分行业领域-用于小台账
property
:{
type
:
"Number"
},
//企业所属物业
property
:{
type
:
"Number"
,
notMustHave
:
true
},
//企业所属物业
enterpriseNature
:{
type
:
"Number"
},
//企业性质
enterpriseNature
:{
type
:
"Number"
},
//企业性质
leasedArea
:{
type
:
"Number"
},
//租赁面积(㎡)
leasedArea
:{
type
:
"Number"
,
notMustHave
:
true
},
//租赁面积(㎡)
RAS
:{
type
:
"Number"
},
//登记状态
RAS
:{
type
:
"Number"
},
//登记状态
jingYingFanWei
:{
type
:
"String"
},
//经营范围
jingYingFanWei
:{
type
:
"String"
},
//经营范围
legalPerson
:{
type
:
"String"
},
//法人
legalPerson
:{
type
:
"String"
},
//法人
zhuceziben
:{
type
:
"String"
},
//注册资本
zhuceziben
:{
type
:
"String"
},
//注册资本
dianHua
:{
type
:
"String"
},
//电话
dianHua
:{
type
:
"String"
,
notMustHave
:
true
},
//电话
};
};
...
@@ -143,7 +145,7 @@ export const ManageUpdateConfig = {
...
@@ -143,7 +145,7 @@ export const ManageUpdateConfig = {
* 备注: 所有参数为必填
* 备注: 所有参数为必填
*/
*/
export
const
TrackAddConfig
=
{
export
const
TrackAddConfig
=
{
uscc
:{
type
:
"String"
},
//统一信用代码
uscc
:{
type
:
"String"
,
notMustHave
:
true
},
//统一信用代码 由于要兼容在谈在跟企业添加服务追踪,改为非必填
name
:{
type
:
"String"
},
//企业名称
name
:{
type
:
"String"
},
//企业名称
demand
:{
type
:
"Number"
},
//需求类型
demand
:{
type
:
"Number"
},
//需求类型
content
:{
type
:
"String"
},
//需求描述
content
:{
type
:
"String"
},
//需求描述
...
...
src/config/enum.ts
View file @
42a28161
...
@@ -89,7 +89,9 @@ export enum REGISTRATIONSTATUS {
...
@@ -89,7 +89,9 @@ export enum REGISTRATIONSTATUS {
*/
*/
export
enum
PROGRESSSTATUS
{
export
enum
PROGRESSSTATUS
{
初次接触
=
1
,
初次接触
=
1
,
合同洽谈
,
项目落地
,
项目落地
,
项目终止
,
}
}
...
...
src/config/splitResultConfig.ts
View file @
42a28161
...
@@ -14,7 +14,8 @@ export const negotiationListConfig = {
...
@@ -14,7 +14,8 @@ export const negotiationListConfig = {
id
:{
key
:
"标识"
},
id
:{
key
:
"标识"
},
name
:{
key
:
"企业名称"
},
name
:{
key
:
"企业名称"
},
industry
:{
key
:
"行业领域"
},
industry
:{
key
:
"行业领域"
},
registrationStatus
:{
key
:
"推进/注册情况"
},
subDivide
:{
key
:
"细分行业领域"
},
// registrationStatus:{key:"推进/注册情况"},
progressStatus
:{
key
:
"进展情况"
},
progressStatus
:{
key
:
"进展情况"
},
primaryContact
:{
key
:
"负责人/首谈人"
},
primaryContact
:{
key
:
"负责人/首谈人"
},
contactDepartment
:{
key
:
"对接部门"
},
contactDepartment
:{
key
:
"对接部门"
},
...
@@ -60,6 +61,17 @@ export const enterpriseUsccListConfig = {
...
@@ -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({
...
@@ -10,8 +10,9 @@ const negotiationSchema = new Schema({
// uscc:{type:String, index:true}, //统一信用代码
// uscc:{type:String, index:true}, //统一信用代码
name
:{
type
:
String
,
index
:
true
},
//企业名称
name
:{
type
:
String
,
index
:
true
},
//企业名称
industry
:
[
Number
],
//行业领域 ALLINDUSTRY
industry
:
[
Number
],
//行业领域 ALLINDUSTRY
registrationStatus
:{
type
:
Number
,
default
:
1
},
//推进、注册情况 REGISTRATIONSTATUS: 1-洽谈中, 2-已注册, 3-已入驻, 4-已终止
subDivide
:[
Number
],
//细分行业领域 用于小台账
progressStatus
:{
type
:
Number
,
default
:
1
},
//进展情况 PROGRESSSTATUS:1-初次接触, 2-深度洽谈, 3-协议草拟, 4-协议签订, 5-项目落地
registrationStatus
:{
type
:
Number
,
default
:
1
},
//推进、注册情况 REGISTRATIONSTATUS: 1-洽谈中, 2-已注册, 3-已入驻, 4-已终止 弃用
progressStatus
:{
type
:
Number
,
default
:
1
},
//进展情况 PROGRESSSTATUS:1-初次接触, 2-合同洽谈, 3-项目落地, 4-项目终止
progressDetails
:
String
,
//进度详情
progressDetails
:
String
,
//进度详情
primaryContact
:
String
,
//负责人、首谈人
primaryContact
:
String
,
//负责人、首谈人
contactDepartment
:
String
,
//对接部门
contactDepartment
:
String
,
//对接部门
...
...
src/data/track.ts
View file @
42a28161
...
@@ -24,7 +24,7 @@ import { sasp } from '../db/mongo/dbInit';
...
@@ -24,7 +24,7 @@ import { sasp } from '../db/mongo/dbInit';
*/
*/
const
trackSchema
=
new
Schema
({
const
trackSchema
=
new
Schema
({
id
:{
type
:
String
,
index
:
true
},
//标识
id
:{
type
:
String
,
index
:
true
},
//标识
uscc
:{
type
:
String
,
index
:
true
},
//企业uscc
uscc
:{
type
:
String
,
index
:
true
},
//企业uscc
在谈在跟企业id
name
:
String
,
//企业名称
name
:
String
,
//企业名称
demand
:
Number
,
//需求类型 VISITDEMAND
demand
:
Number
,
//需求类型 VISITDEMAND
content
:
String
,
//需求描述详情
content
:
String
,
//需求描述详情
...
...
src/main.ts
View file @
42a28161
...
@@ -10,13 +10,13 @@ async function lanuch() {
...
@@ -10,13 +10,13 @@ async function lanuch() {
/**初始化数据库 */
/**初始化数据库 */
await
initDB
();
await
initDB
();
/**初始化底表数据 */
/**初始化底表数据 */
await
initBasicData
();
//
await initBasicData();
/**创建http服务 */
/**创建http服务 */
httpServer
.
createServer
(
systemConfig
.
port
);
httpServer
.
createServer
(
systemConfig
.
port
);
console
.
log
(
'This indicates that the server is started successfully.'
);
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 {
...
@@ -12,7 +12,7 @@ export class httpServer {
var
httpServer
=
express
();
var
httpServer
=
express
();
httpServer
.
all
(
'*'
,
(
req
,
res
,
next
)
=>
{
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"
,
"X-Requested-With"
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type,request-origin,userid,token'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type,request-origin,userid,token'
);
res
.
header
(
"Access-Control-Allow-Methods"
,
"PUT,POST,GET,DELETE,OPTIONS"
);
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) {
...
@@ -23,11 +23,11 @@ export function setRouter(httpServer) {
* @param res
* @param res
*/
*/
async
function
getNegotiationList
(
req
,
res
)
{
async
function
getNegotiationList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
registration
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
page
:
'Number'
};
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
progress
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
registration
Status'
,
'primaryContact'
,
'contactDepartment'
];
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
progress
Status'
,
'primaryContact'
,
'contactDepartment'
];
let
{
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
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
);
res
.
success
(
result
);
}
}
...
@@ -94,11 +94,11 @@ async function delNegotiation(req, res) {
...
@@ -94,11 +94,11 @@ async function delNegotiation(req, res) {
* @param res
* @param res
*/
*/
async
function
outPutNegotiation
(
req
,
res
)
{
async
function
outPutNegotiation
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
registration
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
id
:
'[String]'
};
let
reqConf
=
{
name
:
'String'
,
industry
:
'[Number]'
,
progress
Status
:
'Number'
,
primaryContact
:
'String'
,
contactDepartment
:
'String'
,
id
:
'[String]'
};
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
registration
Status'
,
'primaryContact'
,
'contactDepartment'
,
'id'
];
const
NotMustHaveKeys
=
[
'name'
,
'industry'
,
'
progress
Status'
,
'primaryContact'
,
'contactDepartment'
,
'id'
];
let
{
name
,
industry
,
registration
Status
,
primaryContact
,
contactDepartment
,
id
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
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
);
res
.
success
(
result
);
}
}
...
...
src/routers/public.ts
View file @
42a28161
...
@@ -16,7 +16,7 @@ const config = {
...
@@ -16,7 +16,7 @@ const config = {
"/public/industry"
:
industryConfig
.
ALLINDUSTRY
,
//行业领域
"/public/industry"
:
industryConfig
.
ALLINDUSTRY
,
//行业领域
"/public/subdivied"
:
industryConfig
.
SUBDIVIDE
,
//细分行业领域
"/public/subdivied"
:
industryConfig
.
SUBDIVIDE
,
//细分行业领域
"/public/ras"
:
enumConfig
.
RAS
,
//登记状态
"/public/ras"
:
enumConfig
.
RAS
,
//登记状态
"/public/registrationstatus"
:
enumConfig
.
REGISTRATIONSTATUS
,
//推荐/注册情况
// "/public/registrationstatus":enumConfig.REGISTRATIONSTATUS, //推荐/注册情况 弃用
"/public/progressstatus"
:
enumConfig
.
PROGRESSSTATUS
,
//进展情况
"/public/progressstatus"
:
enumConfig
.
PROGRESSSTATUS
,
//进展情况
"/public/period"
:
enumConfig
.
PERIOD
,
//数据时间 上半年(1-6月)、下半年(7-12月)、全年
"/public/period"
:
enumConfig
.
PERIOD
,
//数据时间 上半年(1-6月)、下半年(7-12月)、全年
"/public/demand"
:
enumConfig
.
VISITDEMAND
,
//需求类型
"/public/demand"
:
enumConfig
.
VISITDEMAND
,
//需求类型
...
@@ -46,8 +46,19 @@ export function setRouter(httpServer) {
...
@@ -46,8 +46,19 @@ export function setRouter(httpServer) {
* @param req
* @param req
* @param res
* @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
)
{
async
function
getAllUscc
(
req
,
res
)
{
let
result
=
await
enterpriseBiz
.
enterpriseUsccList
();
let
result
=
await
enterpriseBiz
.
enterprise
Negotiation
UsccList
();
res
.
success
(
result
);
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