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
1011ef08
Commit
1011ef08
authored
Jul 03, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
826c3ec8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
20 deletions
+82
-20
package-lock.json
package-lock.json
+0
-0
serverConfig.xml
serverConfig.xml
+1
-1
diKuai.ts
src/biz/diKuai.ts
+30
-9
nongzi.ts
src/biz/nongzi.ts
+26
-3
enum.ts
src/config/enum.ts
+17
-1
admin.ts
src/routers/admin.ts
+6
-6
public.ts
src/routers/public.ts
+2
-0
No files found.
package-lock.json
View file @
1011ef08
This source diff could not be displayed because it is too large. You can
view the blob
instead.
serverConfig.xml
View file @
1011ef08
<config>
<config>
<port>
13281
</port>
<port>
13281
</port>
<mongodb>
<mongodb>
<path>
1
27.0.0.1
</path>
<path>
1
92.168.0.105
</path>
<port>
27017
</port>
<port>
27017
</port>
<w>
1
</w>
<w>
1
</w>
<!-- <dataBase>baseDB</dataBase> -->
<!-- <dataBase>baseDB</dataBase> -->
...
...
src/biz/diKuai.ts
View file @
1011ef08
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* 地块
* 地块
*/
*/
import
moment
=
require
(
"moment"
);
import
{
TABLENAME
}
from
"../config/dbEnum"
;
import
{
TABLENAME
}
from
"../config/dbEnum"
;
import
{
DiKuaiConfig
,
YangZhiChiConfig
}
from
"../config/eccParam"
;
import
{
DiKuaiConfig
,
YangZhiChiConfig
}
from
"../config/eccParam"
;
import
{
AREARANGE
,
PLANTTYPE
,
PLOTTYPE
,
PURPOSE
,
ZHONGYANGTYPE
}
from
"../config/enum"
;
import
{
AREARANGE
,
PLANTTYPE
,
PLOTTYPE
,
PURPOSE
,
ZHONGYANGTYPE
}
from
"../config/enum"
;
...
@@ -111,22 +112,42 @@ export async function diKuaiList(plotType:number, selectStr:string, code:string,
...
@@ -111,22 +112,42 @@ export async function diKuaiList(plotType:number, selectStr:string, code:string,
return
{
dataList
}
return
{
dataList
}
}
}
/**
/**
* 地块列表分页
* 地块列表分页
* @param plotType
* @param code 地块编号 string
* @param selectStr
* @param area 地块区域 string
* @param code
* @param purpose 地块用途 number
* @param purpose
* @param pageNumber 页码
* @param area
* @returns
* @returns
*/
*/
export
async
function
diKuaiListToPage
(
pageNumber
)
{
export
async
function
diKuaiListToPage
(
code
,
area
,
purpose
,
pageNumber
)
{
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
;
}
let
diKuaiList
=
await
dikuaiData
.
findDataToParamToPage
(
{}
,
pageNumber
);
let
diKuaiList
=
await
dikuaiData
.
findDataToParamToPage
(
param
,
pageNumber
);
let
dataList
=
[];
let
dataList
=
[];
diKuaiList
.
forEach
(
item
=>
{
diKuaiList
.
forEach
(
item
=>
{
let
{
size
,
dId
,
purpose
,
code
,
area
,
ct
}
=
item
;
let
{
size
,
dId
,
plotType
,
purpose
,
code
,
area
,
ct
}
=
item
;
dataList
.
push
({
size
,
dId
,
type
:
changeEnumValue
(
PURPOSE
,
purpose
),
code
,
area
,
ct
});
dataList
.
push
({
size
,
dId
,
plotType
:
changeEnumValue
(
PLOTTYPE
,
plotType
),
type
:
changeEnumValue
(
PURPOSE
,
purpose
),
code
,
area
,
ct
:
moment
(
ct
).
format
(
"YYYY-MM-DD"
)
});
});
});
return
{
dataList
}
return
{
dataList
}
...
...
src/biz/nongzi.ts
View file @
1011ef08
...
@@ -147,7 +147,30 @@ export async function zhongYangInfo(nzId) {
...
@@ -147,7 +147,30 @@ export async function zhongYangInfo(nzId) {
return
{
dataInfo
}
return
{
dataInfo
}
}
}
export
async
function
zhongYangListToPage
(
page
)
{
/**
* 农资管理
* @param nzType 农资类型
* @param dIdList 地块
* @param useTime 使用时间
* @param count 用量
* @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;
// }
let
dbList
=
await
nongziData
.
findDataToParamToPage
({},
page
);
let
dbList
=
await
nongziData
.
findDataToParamToPage
({},
page
);
let
dataCount
=
await
nongziData
.
findDataToParamCouant
({});
let
dataCount
=
await
nongziData
.
findDataToParamCouant
({});
...
@@ -165,4 +188,5 @@ export async function zhongYangListToPage(page) {
...
@@ -165,4 +188,5 @@ export async function zhongYangListToPage(page) {
});
});
return
{
dataList
,
dataCount
}
return
{
dataList
,
dataCount
}
}
}
\ No newline at end of file
src/config/enum.ts
View file @
1011ef08
...
@@ -9,7 +9,6 @@ export enum PLOTTYPE {
...
@@ -9,7 +9,6 @@ export enum PLOTTYPE {
}
}
/**
/**
* 用途
* 用途
*/
*/
...
@@ -20,6 +19,23 @@ export enum PURPOSE {
...
@@ -20,6 +19,23 @@ export enum PURPOSE {
}
}
/**
* 地块用途
*/
export
enum
DIKUAIPURPOSE
{
菜田
=
1
,
粮田
=
2
,
}
/**
* 养殖用途
*/
export
enum
YANGZHIPURPOSE
{
养殖
=
1000
}
/**
/**
* 种养类型
* 种养类型
...
...
src/routers/admin.ts
View file @
1011ef08
...
@@ -104,9 +104,9 @@ async function dikuai_info(req, res) {
...
@@ -104,9 +104,9 @@ async function dikuai_info(req, res) {
}
}
async
function
dikuai_list
(
req
,
res
)
{
async
function
dikuai_list
(
req
,
res
)
{
let
reqConf
=
{
pageNumber
:
'Number'
};
let
reqConf
=
{
code
:
'String'
,
area
:
'String'
,
purpose
:
'Number'
,
pageNumber
:
'Number'
};
let
{
pageNumber
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
{
code
,
area
,
purpose
,
pageNumber
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"code"
,
"area"
,
"purpose"
]
);
let
result
=
await
diKuaiBiz
.
diKuaiListToPage
(
pageNumber
);
let
result
=
await
diKuaiBiz
.
diKuaiListToPage
(
code
,
area
,
purpose
,
pageNumber
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
@@ -182,9 +182,9 @@ async function nongzi_info(req, res) {
...
@@ -182,9 +182,9 @@ async function nongzi_info(req, res) {
}
}
async
function
nongzi_list
(
req
,
res
)
{
async
function
nongzi_list
(
req
,
res
)
{
let
reqConf
=
{
page
:
'Number'
};
let
reqConf
=
{
nzType
:
'Number'
,
dIdList
:
'Number'
,
useTime
:
'Number'
,
count
:
'Number'
,
page
:
'Number'
};
let
{
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
{
nzType
,
dIdList
,
useTime
,
count
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
[
"nzType"
,
"dIdList"
,
"useTime"
,
"count"
]
);
let
result
=
await
nongziBiz
.
zhongYangListToPage
(
page
);
let
result
=
await
nongziBiz
.
zhongYangListToPage
(
nzType
,
dIdList
,
useTime
,
count
,
page
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
...
src/routers/public.ts
View file @
1011ef08
...
@@ -7,6 +7,8 @@ import * as enumConfig from '../config/enum';
...
@@ -7,6 +7,8 @@ import * as enumConfig from '../config/enum';
const
config
=
{
const
config
=
{
"/zjnt/xcx/public/plottype"
:
enumConfig
.
PLOTTYPE
,
//地块类型
"/zjnt/xcx/public/plottype"
:
enumConfig
.
PLOTTYPE
,
//地块类型
"/zjnt/xcx/public/purpose"
:
enumConfig
.
PURPOSE
,
//用途
"/zjnt/xcx/public/purpose"
:
enumConfig
.
PURPOSE
,
//用途
"/zjnt/xcx/public/dikuaipurpose"
:
enumConfig
.
DIKUAIPURPOSE
,
//地块用途
"/zjnt/xcx/public/yangzhipurpose"
:
enumConfig
.
YANGZHIPURPOSE
,
//养殖用途
"/zjnt/xcx/public/planttype"
:
enumConfig
.
PLANTTYPE
,
//种植种类
"/zjnt/xcx/public/planttype"
:
enumConfig
.
PLANTTYPE
,
//种植种类
"/zjnt/xcx/public/arearange"
:
enumConfig
.
AREARANGE
,
//面积范围
"/zjnt/xcx/public/arearange"
:
enumConfig
.
AREARANGE
,
//面积范围
"/zjnt/xcx/public/nongzitype"
:
enumConfig
.
NONGZITYPE
,
//农资类型
"/zjnt/xcx/public/nongzitype"
:
enumConfig
.
NONGZITYPE
,
//农资类型
...
...
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