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
7b445b32
Commit
7b445b32
authored
Feb 09, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e128be87
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
41 deletions
+19
-41
base.ts
src/biz/fuHuqQi/base.ts
+1
-1
checkParamConfig.ts
src/config/checkParamConfig.ts
+1
-3
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+7
-2
hatchingGround.ts
src/data/fuHuaQi/hatchingGround.ts
+0
-34
fuhuaqi.ts
src/routers/fuhuaqi.ts
+1
-1
tools.ts
src/util/tools.ts
+9
-0
No files found.
src/biz/fuHuqQi/base.ts
View file @
7b445b32
...
...
@@ -46,7 +46,7 @@ export async function selectFuHuaQiBaseData(uscc:string) {
let
keyList
=
[
"name"
,
"operationName"
,
"uscc"
,
"virtualEnterpriseNum"
,
"logonTime"
,
"incubatedAcreage"
,
"acreageTotal"
,
"acreagePersonalUse"
,
"lv"
,
"identificationTime"
,
"industry"
,
"institutionalNature"
,
"liaison"
,
"liaisonPhone"
,
"personInCharge"
,
"personInChargePhone"
,
"
personInChargeAdd"
,
"siteAcreage"
,
"leasePrice
"
];
"
hatchingGround
"
];
let
data
=
{};
keyList
.
forEach
(
key
=>
{
...
...
src/config/checkParamConfig.ts
View file @
7b445b32
...
...
@@ -21,9 +21,7 @@ export const BaseParamUpdateConfig = {
liaisonPhone
:
"String"
,
personInCharge
:
"String"
,
personInChargePhone
:
"String"
,
personInChargeAdd
:
"String"
,
siteAcreage
:
"Number"
,
leasePrice
:
"Number"
hatchingGround
:
"[Object]"
,
};
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
7b445b32
...
...
@@ -9,7 +9,12 @@
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/dbInit'
;
import
*
as
hatchingGroundData
from
'./hatchingGround'
;
const
hatchingGroundSchema
=
new
Schema
({
personInChargeAdd
:
String
,
//孵化场地地址
siteAcreage
:
Number
,
//孵化场地面积(㎡)
leasePrice
:
Number
,
//孵化场地出租单价
});
const
fuHuaQiSchema
=
new
Schema
({
name
:
{
type
:
String
,
index
:
true
},
//名称
...
...
@@ -28,7 +33,7 @@ const fuHuaQiSchema = new Schema({
liaisonPhone
:
String
,
//联系电话
personInCharge
:
String
,
//负责人
personInChargePhone
:
String
,
//负责人联系电话
hatchingGround
:{
type
:[
hatchingGround
Data
.
hatchingGround
Schema
],
default
:[]
},
//经备案孵化场地
hatchingGround
:{
type
:[
hatchingGroundSchema
],
default
:[]
},
//经备案孵化场地
/**登录相关 */
pwd
:
String
,
//登录密码
token
:{
type
:
String
,
index
:
true
},
...
...
src/data/fuHuaQi/hatchingGround.ts
deleted
100644 → 0
View file @
e128be87
import
{
Schema
}
from
"mongoose"
;
let
hatchingGround
=
{
personInChargeAdd
:
String
,
//孵化场地地址
siteAcreage
:
Number
,
//孵化场地面积(㎡)
leasePrice
:
Number
,
//孵化场地出租单价
}
export
const
hatchingGroundSchema
=
new
Schema
(
hatchingGround
);
// export function setMethods(fuhuaqiSchema:Schema) {
// fuhuaqiSchema.methods.updateFuHuaQiList = function(fuHuaQiList) {
// let newDbList = [];
// let fileterMap = {};
// for (let i = 0; i < this.fuHuaQiList.length; i++ ) {
// let info = this.fuHuaQiList[i];
// fileterMap[info.uscc] = JSON.stringify(info);
// }
// for (let i = 0; i < fuHuaQiList.length; i++ ) {
// let newInfo = fuHuaQiList[i];
// let fileterItem = fileterMap[newInfo.cId];
// if (fileterItem && JSON.stringify(newInfo) == fileterItem) {//无修改
// newDbList.push(JSON.parse(fileterItem) );
// } else {//修改或添加
// newDbList.push(newInfo);
// }
// }
// this.fuHuaQiList = JSON.parse(JSON.stringify(newDbList));
// }
// }
src/routers/fuhuaqi.ts
View file @
7b445b32
...
...
@@ -18,7 +18,7 @@ export function setRouter(httpServer) {
/**基础数据 */
httpServer
.
post
(
'/fuhuaqi/base'
,
checkFuHuaQiToken
,
asyncHandler
(
baseInfo
));
httpServer
.
post
(
'/fuhuaqi/mydata'
,
checkFuHuaQiToken
,
asyncHandler
(
myDataInfo
));
httpServer
.
post
(
'/fuhuaqi/base/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMyDataInfo
));
httpServer
.
post
(
'/fuhuaqi/base/update'
,
asyncHandler
(
updateMyDataInfo
));
/**任务 */
httpServer
.
post
(
'/fuhuaqi/task/list'
,
checkFuHuaQiToken
,
asyncHandler
(
taskList
));
httpServer
.
post
(
'/fuhuaqi/task/submit'
,
checkFuHuaQiToken
,
asyncHandler
(
submitTask
));
...
...
src/util/tools.ts
View file @
7b445b32
...
...
@@ -50,6 +50,15 @@ export function checkParamater(name:string, keyTypeConf:object, param:object) {
}
}
break
;
case
'[Object]'
:
if
(
!
Array
.
isArray
(
param
[
key
])
)
throw
new
BizError
(
ERRORENUM
.
表单校验失败
,
name
,
`
${
key
}
应是数组型 而不是
${
type
}
`
);
for
(
let
i
=
0
;
i
<
param
[
key
].
length
;
i
++
)
{
let
item
=
param
[
key
][
i
];
if
(
typeof
item
!=
'object'
)
{
throw
new
BizError
(
ERRORENUM
.
表单校验失败
,
name
,
`
${
key
}
应是object型数组其中下标
${
i
}
是
${
typeof
item
}
`
);
}
}
break
;
}
}
for
(
let
key
in
param
)
{
...
...
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