明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
letian_backend
Project
Project
Details
Activity
Releases
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
zengfanpei
letian_backend
Commits
88078384
Commit
88078384
authored
Mar 17, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2a139a41
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
135 additions
and
0 deletions
+135
-0
agrInputDetailController.js
controller/agrInputDetailController.js
+16
-0
agrInputEmployController.js
controller/agrInputEmployController.js
+16
-0
agrInputOtherController.js
controller/agrInputOtherController.js
+16
-0
agrInputRecordController.js
controller/agrInputRecordController.js
+15
-0
packMatInListController.js
controller/packMatInListController.js
+16
-0
packMatOutListController.js
controller/packMatOutListController.js
+16
-0
rawMatProlistController.js
controller/rawMatProlistController.js
+16
-0
rawMatReqlistController.js
controller/rawMatReqlistController.js
+16
-0
agrRouter.js
router/agrRouter.js
+4
-0
rawmatRouter.js
router/rawmatRouter.js
+4
-0
No files found.
controller/agrInputDetailController.js
View file @
88078384
...
...
@@ -64,6 +64,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
AgrInputDetail
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -155,4 +170,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/agrInputEmployController.js
View file @
88078384
...
...
@@ -65,6 +65,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
AgrInputEmploy
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -151,4 +166,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/agrInputOtherController.js
View file @
88078384
...
...
@@ -64,6 +64,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
AgrInputOther
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -151,4 +166,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/agrInputRecordController.js
View file @
88078384
...
...
@@ -94,6 +94,20 @@ async function deleteOne(req, res, next) {
next
(
error
)
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
AgrInputRecord
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
...
...
@@ -189,4 +203,5 @@ module.exports = {
updateOne
,
listFroDP
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/packMatInListController.js
View file @
88078384
...
...
@@ -64,6 +64,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
RawMatReqList
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -145,4 +160,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/packMatOutListController.js
View file @
88078384
...
...
@@ -62,6 +62,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
PackMatOutList
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -145,4 +160,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/rawMatProlistController.js
View file @
88078384
...
...
@@ -64,6 +64,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
RawMatProList
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -147,4 +162,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
controller/rawMatReqlistController.js
View file @
88078384
...
...
@@ -63,6 +63,21 @@ async function deleteOne(req, res, next) {
}
}
async
function
deleteMany
(
req
,
res
,
next
)
{
try
{
let
_ids
=
req
.
body
.
_ids
;
if
(
_
.
isArray
(
_ids
)
&&
_ids
.
length
>
0
)
{
let
ret
=
await
DB
.
RawMatReqList
.
updateMany
({
_id
:
{
$in
:
_ids
}
},
{
del
:
1
});
res
.
sendData
(
ret
);
}
else
{
res
.
sendData
();
}
}
catch
(
error
)
{
next
(
error
)
}
}
async
function
importExcel
(
req
,
res
,
next
)
{
try
{
...
...
@@ -146,4 +161,5 @@ module.exports = {
deleteOne
,
updateOne
,
exportExcel
,
deleteMany
,
}
\ No newline at end of file
router/agrRouter.js
View file @
88078384
...
...
@@ -13,21 +13,25 @@ router.post('/input/list', agrInputRecordController.listFroDP);
router
.
post
(
'/inputRecord/list'
,
agrInputRecordController
.
list
);
router
.
post
(
'/inputRecord/update'
,
agrInputRecordController
.
updateOne
);
router
.
post
(
'/inputRecord/delete'
,
agrInputRecordController
.
deleteOne
);
router
.
post
(
'/inputRecord/batchDelete'
,
agrInputRecordController
.
deleteMany
);
router
.
post
(
'/inputRecord/create'
,
agrInputRecordController
.
create
);
//2. 农场其他投入品使用情况
router
.
post
(
'/inputOther/list'
,
agrInputOtherController
.
list
);
router
.
post
(
'/inputOther/update'
,
agrInputOtherController
.
updateOne
);
router
.
post
(
'/inputOther/delete'
,
agrInputOtherController
.
deleteOne
);
router
.
post
(
'/inputOther/batchDelete'
,
agrInputOtherController
.
deleteMany
);
router
.
post
(
'/inputOther/create'
,
agrInputOtherController
.
create
);
//3. 农资投入详情
router
.
post
(
'/inputDetail/list'
,
agrInputDetailController
.
list
);
router
.
post
(
'/inputDetail/update'
,
agrInputDetailController
.
updateOne
);
router
.
post
(
'/inputDetail/delete'
,
agrInputDetailController
.
deleteOne
);
router
.
post
(
'/inputDetail/batchDelete'
,
agrInputDetailController
.
deleteMany
);
router
.
post
(
'/inputDetail/create'
,
agrInputDetailController
.
create
);
//4. 用工明细
router
.
post
(
'/inputEmploy/list'
,
agrInputEmployController
.
list
);
router
.
post
(
'/inputEmploy/update'
,
agrInputEmployController
.
updateOne
);
router
.
post
(
'/inputEmploy/delete'
,
agrInputEmployController
.
deleteOne
);
router
.
post
(
'/inputEmploy/batchDelete'
,
agrInputEmployController
.
deleteMany
);
router
.
post
(
'/inputEmploy/create'
,
agrInputEmployController
.
create
);
...
...
router/rawmatRouter.js
View file @
88078384
...
...
@@ -10,6 +10,7 @@ const rawMatReqlistController = require('../controller/rawMatReqlistController')
router
.
post
(
'/rawMatPro/create'
,
rawMatProlistController
.
create
);
router
.
post
(
'/rawMatPro/update'
,
rawMatProlistController
.
updateOne
);
router
.
post
(
'/rawMatPro/delete'
,
rawMatProlistController
.
deleteOne
);
router
.
post
(
'/rawMatPro/batchDelete'
,
rawMatProlistController
.
deleteMany
);
router
.
post
(
'/rawMatPro/list'
,
rawMatProlistController
.
list
);
...
...
@@ -17,6 +18,7 @@ router.post('/rawMatPro/list', rawMatProlistController.list);
router
.
post
(
'/rawMatReq/create'
,
rawMatReqlistController
.
create
);
router
.
post
(
'/rawMatReq/update'
,
rawMatReqlistController
.
updateOne
);
router
.
post
(
'/rawMatReq/delete'
,
rawMatReqlistController
.
deleteOne
);
router
.
post
(
'/rawMatReq/batchDelete'
,
rawMatReqlistController
.
deleteMany
);
router
.
post
(
'/rawMatReq/list'
,
rawMatReqlistController
.
list
);
...
...
@@ -28,6 +30,7 @@ const packMatOutListController = require('../controller/packMatOutListController
router
.
post
(
'/packMatIn/create'
,
packMatInListController
.
create
);
router
.
post
(
'/packMatIn/update'
,
packMatInListController
.
updateOne
);
router
.
post
(
'/packMatIn/delete'
,
packMatInListController
.
deleteOne
);
router
.
post
(
'/packMatIn/batchDelete'
,
packMatInListController
.
deleteMany
);
router
.
post
(
'/packMatIn/list'
,
packMatInListController
.
list
);
...
...
@@ -35,6 +38,7 @@ router.post('/packMatIn/list', packMatInListController.list);
router
.
post
(
'/packMatOut/create'
,
packMatOutListController
.
create
);
router
.
post
(
'/packMatOut/update'
,
packMatOutListController
.
updateOne
);
router
.
post
(
'/packMatOut/delete'
,
packMatOutListController
.
deleteOne
);
router
.
post
(
'/packMatOut/batchDelete'
,
packMatOutListController
.
deleteMany
);
router
.
post
(
'/packMatOut/list'
,
packMatOutListController
.
list
);
...
...
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