Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
29d160a3
Commit
29d160a3
authored
Jul 06, 2025
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务
parent
05716054
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
35 deletions
+104
-35
package-lock.json
package-lock.json
+0
-0
visit.ts
src/biz/mobileFuHuaQi/visit.ts
+66
-3
fuHuaQi.ts
src/config/eccParam/fuHuaQi.ts
+9
-0
enum.ts
src/config/enum.ts
+5
-0
track.ts
src/data/fuHuaQi/track.ts
+0
-0
visit.ts
src/data/fuHuaQi/visit.ts
+2
-2
visit.ts
src/routers/mobileClient/visit.ts
+22
-30
No files found.
package-lock.json
View file @
29d160a3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/biz/mobileFuHuaQi/visit.ts
View file @
29d160a3
...
...
@@ -2,14 +2,16 @@
* 走访逻辑
*/
import
moment
=
require
(
"moment"
);
import
{
VISITDEMAND
,
VISITENTERPRISETYPE
,
VISITSTATE
}
from
"../../config/enum"
;
import
{
RESEARCHTYPE
,
VISITDEMAND
,
VISITENTERPRISETYPE
,
VISITSTATE
}
from
"../../config/enum"
;
import
*
as
visitData
from
"../../data/fuHuaQi/visit"
;
import
*
as
demandData
from
"../../data/fuHuaQi/demand"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
{
changeEnumManyValue
,
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
changeEnumManyValue
,
changeEnumValue
,
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
getRandomId
}
from
"../../tools/system"
;
import
{
eccFormParam
}
from
"../../util/verificationParam"
;
import
{
AddVisitConfig
}
from
"../../config/eccParam/fuHuaQi"
;
export
async
function
visitStatisBase
(
fuHuaQiUscc
:
string
)
{
...
...
@@ -125,11 +127,72 @@ export async function visitCalendarList(fuHuaQiUscc) {
return
{
dataList
};
}
/**
* 添加走访安排
* @param fuHuaQiUscc
* @param param
*/
export
async
function
visitAdd
(
fuHuaQiUscc
:
string
,
param
)
{
eccEnumValue
();
eccFormParam
(
"添加走访安排"
,
AddVisitConfig
,
param
);
eccEnumValue
(
"添加走访按排"
,
"researchType"
,
RESEARCHTYPE
,
param
.
researchType
);
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
param
.
uscc
);
if
(
!
enterpriseInfo
||
!
enterpriseInfo
.
uscc
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
)
let
addInfo
=
{
id
:
getRandomId
(
"zf"
),
fuHuaQiUscc
,
enterpriseName
:
enterpriseInfo
.
enterpriseName
,
uscc
:
param
.
uscc
,
visitTime
:
param
.
visitTime
,
accompany
:
param
.
accompany
,
leaderName
:
param
.
leaderName
,
researchType
:
param
.
researchType
,
desc
:
param
.
desc
,
state
:
VISITSTATE
.
走访安排
,
//1=初始状态 2=取消 3=完成 VISITSTATE
createTime
:
new
Date
().
valueOf
(),
enterpriseType
:
VISITENTERPRISETYPE
.
临近毕业企业
//VISITENTERPRISETYPE
};
await
visitData
.
createDataByParam
(
addInfo
);
return
{
isSuccess
:
true
};
}
export
async
function
visitInfo
(
id
:
string
)
{
let
visitInfo
=
await
visitData
.
findOne
({
id
});
let
dataInfo
=
{
enterpriseName
:
visitInfo
.
enterpriseName
,
uscc
:
visitInfo
.
uscc
,
visitTime
:
visitInfo
.
visitTime
,
accompany
:
visitInfo
.
accompany
,
leaderName
:
visitInfo
.
leaderName
,
researchType
:
changeEnumValue
(
RESEARCHTYPE
,
visitInfo
.
researchTyp
),
desc
:
visitInfo
.
desc
,
createTime
:
new
Date
().
valueOf
(),
enterpriseType
:
changeEnumValue
(
VISITENTERPRISETYPE
,
visitInfo
.
enterpriseType
)
};
return
{
dataInfo
};
}
export
async
function
visit_update_state
(
id
,
state
:
number
)
{
if
(
!
(
state
==
1
||
state
==
2
)
)
throw
new
BizError
(
ERRORENUM
.
参数错误
);
let
visitInfo
=
await
visitData
.
findOne
({
id
});
if
(
!
visitInfo
||
!
visitInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
visitInfo
.
state
=
state
;
await
visitInfo
.
save
();
return
{
isSuccess
:
true
}
}
//企业需求相关
...
...
src/config/eccParam/fuHuaQi.ts
View file @
29d160a3
...
...
@@ -368,3 +368,12 @@ export const ZlRentPaymentUpdateConfig = {
}
export
const
AddVisitConfig
=
{
uscc
:{
type
:
"String"
},
visitTime
:{
type
:
"Number"
},
accompany
:{
type
:
"String"
},
//陪同人员
leaderName
:{
type
:
"String"
},
//出席领导
researchType
:{
type
:
"Number"
},
//调研类型 RESEARCHTYPE
desc
:{
type
:
"String"
},
//解决的备注
}
src/config/enum.ts
View file @
29d160a3
...
...
@@ -588,4 +588,8 @@ export enum VISITDEMAND {
政策
,
市场
,
场地
}
export
enum
RESEARCHTYPE
{
领导走访
=
1
}
\ No newline at end of file
src/data/fuHuaQi/track.ts
0 → 100644
View file @
29d160a3
src/data/fuHuaQi/visit.ts
View file @
29d160a3
...
...
@@ -20,8 +20,8 @@ const visitSchema = new Schema({
state
:{
type
:
Number
,
default
:
1
},
//1=初始状态 2=取消 3=完成 VISITSTATE
createTime
:
Number
,
enterpriseType
:{
type
:
Number
},
//VISITENTERPRISETYPE
demand
:{
type
:[
Number
],
default
:[]},
//企业需求
demandDesc
:
String
//
demand:{type:[Number], default:[]},//企业需求
//
demandDesc:String
});
...
...
src/routers/mobileClient/visit.ts
View file @
29d160a3
...
...
@@ -18,14 +18,14 @@ export function setRouter(httpServer) {
// httpServer.post('/fuhuaqi/visit/list', checkFuHuaQiToken, asyncHandler(visit_list));
// httpServer.post('/fuhuaqi/visit/update', checkFuHuaQiToken, asyncHandler(visit_update));
httpServer
.
post
(
'/fuhuaqi/visit/calendar/statis'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_alendar_statis
));
httpServer
.
post
(
'/fuhuaqi/visit/calendar/list'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_calendar_list
));
httpServer
.
post
(
'/fuhuaqi/visit/add'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_add
));
//
httpServer.post('/fuhuaqi/visit/info', checkFuHuaQiToken, asyncHandler(visit_info));
// httpServer.post('/fuhuaqi/visit/update', checkFuHuaQiToken, asyncHandler(visit_upd
ate));
// httpServer.post('/fuhuaqi/visit/update/state', checkFuHuaQiToken, asyncHandler(visit_update_state));
//
httpServer.post('/fuhuaqi/visit/track/add', checkFuHuaQiToken, asyncHandler(visit_track_add));
httpServer
.
post
(
'/fuhuaqi/visit/info'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_info
));
httpServer
.
post
(
'/fuhuaqi/visit/update/state'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_update_st
ate
));
httpServer
.
post
(
'/fuhuaqi/visit/track/add'
,
checkFuHuaQiToken
,
asyncHandler
(
visit_track_add
));
// httpServer.post('/fuhuaqi/visit/track/log/statis', checkFuHuaQiToken, asyncHandler(visit_track_log_statis));
// httpServer.post('/fuhuaqi/visit/track/log/list', checkFuHuaQiToken, asyncHandler(visit_track_log_list));
}
...
...
@@ -105,43 +105,35 @@ async function visit_calendar_list(req, res) {
async
function
visit_add
(
req
,
res
)
{
let
reqConf
=
{};
let
{}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
reqConf
=
{
param
:
"Object"
};
let
{
param
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
userInfo
=
await
.(
);
let
userInfo
=
await
visitBiz
.
visitAdd
(
Uscc
,
param
);
res
.
success
(
userInfo
);
}
// async function visit_info(req, res) {
// let reqConf = {};
// let {} = eccReqParamater(reqConf, req.body);
// const Uscc = req.headers.uscc;
// let userInfo = await .();
// res.success(userInfo);
// }
async
function
visit_info
(
req
,
res
)
{
let
reqConf
=
{
id
:
"String"
};
let
{
id
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
userInfo
=
await
visitBiz
.
visitInfo
(
id
);
res
.
success
(
userInfo
);
}
// async function visit_update(req, res) {
// let reqConf = {};
// let {} = eccReqParamater(reqConf, req.body);
// const Uscc = req.headers.uscc;
// let userInfo = await .();
// res.success(userInfo);
// }
//
async function visit_update_state(req, res) {
// let reqConf = {
};
// let {
} = eccReqParamater(reqConf, req.body);
//
const Uscc = req.headers.uscc;
async
function
visit_update_state
(
req
,
res
)
{
let
reqConf
=
{
id
:
"String"
,
state
:
"Number"
};
let
{
id
,
state
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
// let userInfo = await .(
);
//
res.success(userInfo);
//
}
let
userInfo
=
await
visitBiz
.
visit_update_state
(
id
,
state
);
res
.
success
(
userInfo
);
}
// async function visit_track_add(req, res) {
...
...
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