Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjnyxcxServer
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
zjnyxcxServer
Commits
5c3b6226
Commit
5c3b6226
authored
Jul 03, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1011ef08
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
32 deletions
+34
-32
diKuai.ts
src/biz/diKuai.ts
+2
-3
nongzi.ts
src/biz/nongzi.ts
+16
-17
dikuai.ts
src/data/dikuai.ts
+4
-0
admin.ts
src/routers/admin.ts
+12
-12
No files found.
src/biz/diKuai.ts
View file @
5c3b6226
...
...
@@ -61,8 +61,6 @@ export async function addDiKuai(reqUser, plotType, param) {
* @returns
*/
export
async
function
diKuaiInfo
(
dId
:
String
)
{
let
funName
=
"地块信息"
;
let
dikuaiInfo
=
await
dikuaiData
.
selectOne
({
dId
});
let
dataInfo
=
{
size
:
dikuaiInfo
.
size
,
...
...
@@ -136,6 +134,7 @@ export async function diKuaiListToPage(code, area, purpose, pageNumber) {
}
let
diKuaiList
=
await
dikuaiData
.
findDataToParamToPage
(
param
,
pageNumber
);
let
dataCount
=
await
dikuaiData
.
findDataToParamCouant
({});
let
dataList
=
[];
diKuaiList
.
forEach
(
item
=>
{
let
{
size
,
dId
,
plotType
,
purpose
,
code
,
area
,
ct
}
=
item
;
...
...
@@ -150,7 +149,7 @@ export async function diKuaiListToPage(code, area, purpose, pageNumber) {
});
});
return
{
dataList
}
return
{
dataList
,
dataCount
}
}
...
...
src/biz/nongzi.ts
View file @
5c3b6226
...
...
@@ -102,9 +102,15 @@ export async function nongZiList(selectStr:string, dId:string, nzType:number, us
}
export
async
function
updateZhongYang
(
reqUser
,
nzId
,
param
)
{
let
funName
=
`修改种养`
;
/**
* 修改农资
* @param reqUser
* @param nzId
* @param param
* @returns
*/
export
async
function
updateNongZi
(
reqUser
,
nzId
,
param
)
{
let
funName
=
`修改农资`
;
eccFormParam
(
funName
,
NongZiConfig
,
param
);
eccEnumValue
(
funName
,
"nzType"
,
NONGZITYPE
,
param
.
nzType
);
eccEnumValue
(
funName
,
"plantType"
,
PLANTTYPE
,
param
.
plantType
);
...
...
@@ -133,7 +139,12 @@ export async function updateZhongYang(reqUser, nzId, param) {
}
export
async
function
zhongYangInfo
(
nzId
)
{
/**
* 农资回显
* @param nzId
* @returns
*/
export
async
function
nongZiInfo
(
nzId
)
{
let
nongZiInfo
=
await
nongziData
.
findOne
({
nzId
});
let
dataInfo
=
{
...
...
@@ -157,19 +168,7 @@ export async function zhongYangInfo(nzId) {
* @param page 页码
* @returns
*/
export
async
function
zhongYangListToPage
(
nzType
,
dIdList
,
useTime
,
count
,
page
)
{
// let funName = "地块列表";
// let param:any = {};
// if (code) {
// param.code = { "$regex":code };
// }
// if (area) {
// param.area = { "$regex":area };
// }
// if (purpose) {
// eccEnumValue(funName, "purpose", PURPOSE, purpose);
// param.purpose = purpose;
// }
export
async
function
nongZiListToPage
(
nzType
,
dIdList
,
useTime
,
count
,
page
)
{
let
dbList
=
await
nongziData
.
findDataToParamToPage
({},
page
);
let
dataCount
=
await
nongziData
.
findDataToParamCouant
({});
...
...
src/data/dikuai.ts
View file @
5c3b6226
...
...
@@ -63,6 +63,10 @@ export async function findDataToParamToPage(param, pageNumber) {
return
await
dikuaiModel
.
find
(
param
).
skip
((
pageNumber
-
1
)
*
10
).
limit
(
10
);
}
export
async
function
findDataToParamCouant
(
param
)
{
return
await
dikuaiModel
.
find
(
param
).
countDocuments
();
}
export
async
function
diKuaiSizeCount
(
param
)
{
let
list
=
await
dikuaiModel
.
aggregate
([
...
...
src/routers/admin.ts
View file @
5c3b6226
...
...
@@ -67,7 +67,7 @@ async function user_login(req, res) {
}
async
function
user_logout
(
req
,
res
)
{
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
userBiz
.
adminUserLogout
(
userInfo
);
res
.
success
(
result
);
}
...
...
@@ -79,7 +79,7 @@ async function dikuai_add(req, res) {
let
reqConf
=
{
plotType
:
'Number'
,
param
:
'Object'
};
let
{
plotType
,
param
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
diKuaiBiz
.
addDiKuai
(
userInfo
,
plotType
,
param
);
res
.
success
(
result
);
...
...
@@ -89,7 +89,7 @@ async function dikuai_add(req, res) {
async
function
dikuai_update
(
req
,
res
)
{
let
reqConf
=
{
dId
:
'String'
,
plotType
:
'Number'
,
param
:
'Object'
};
let
{
dId
,
param
,
plotType
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
diKuaiBiz
.
updateDiKuai
(
userInfo
,
plotType
,
dId
,
param
);
res
.
success
(
result
);
...
...
@@ -97,7 +97,7 @@ async function dikuai_update(req, res) {
async
function
dikuai_info
(
req
,
res
)
{
let
reqConf
=
{
dId
:
'
Number
'
};
let
reqConf
=
{
dId
:
'
String
'
};
let
{
dId
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
diKuaiBiz
.
diKuaiInfo
(
dId
);
res
.
success
(
result
);
...
...
@@ -116,7 +116,7 @@ async function dikuai_list(req, res) {
async
function
zhongyang_add
(
req
,
res
)
{
let
reqConf
=
{
param
:
'Object'
};
let
{
param
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
zhongYangBiz
.
addZhongYang
(
userInfo
,
param
);
res
.
success
(
result
);
...
...
@@ -125,7 +125,7 @@ async function zhongyang_add(req, res) {
async
function
zhongyang_update
(
req
,
res
)
{
let
reqConf
=
{
param
:
'Object'
,
zId
:
"String"
};
let
{
param
,
zId
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
zhongYangBiz
.
updateZhongYang
(
userInfo
,
zId
,
param
);
res
.
success
(
result
);
}
...
...
@@ -152,11 +152,11 @@ async function zhongyang_del(req, res) {
}
/**农资 */
async
function
nongzi_add
(
req
,
res
)
{
let
reqConf
=
{
param
:
'Object'
};
let
{
param
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
userInfo
=
req
.
headers
;
let
result
=
await
nongziBiz
.
addNongZi
(
userInfo
,
param
);
res
.
success
(
result
);
...
...
@@ -167,8 +167,8 @@ async function nongzi_add(req, res) {
async
function
nongzi_update
(
req
,
res
)
{
let
reqConf
=
{
param
:
'Object'
,
nzId
:
"String"
};
let
{
param
,
nzId
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
userInfo
=
req
.
headers
.
userInfo
;
let
result
=
await
nongziBiz
.
update
ZhongYang
(
userInfo
,
nzId
,
param
);
let
userInfo
=
req
.
headers
;
let
result
=
await
nongziBiz
.
update
NongZi
(
userInfo
,
nzId
,
param
);
res
.
success
(
result
);
}
...
...
@@ -177,14 +177,14 @@ async function nongzi_update(req, res) {
async
function
nongzi_info
(
req
,
res
)
{
let
reqConf
=
{
nzId
:
'String'
};
let
{
nzId
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
nongziBiz
.
zhongYang
Info
(
nzId
);
let
result
=
await
nongziBiz
.
nongZi
Info
(
nzId
);
res
.
success
(
result
);
}
async
function
nongzi_list
(
req
,
res
)
{
let
reqConf
=
{
nzType
:
'Number'
,
dIdList
:
'Number'
,
useTime
:
'Number'
,
count
:
'Number'
,
page
:
'Number'
};
let
{
nzType
,
dIdList
,
useTime
,
count
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"nzType"
,
"dIdList"
,
"useTime"
,
"count"
]);
let
result
=
await
nongziBiz
.
zhongYang
ListToPage
(
nzType
,
dIdList
,
useTime
,
count
,
page
);
let
result
=
await
nongziBiz
.
nongZi
ListToPage
(
nzType
,
dIdList
,
useTime
,
count
,
page
);
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