From 4e81beaf39a525c1ecb86d50dd05438959af6e12 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 17 十月 2025 23:16:03 +0800
Subject: [PATCH] 优化PDA出库流程、盘点流程
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs | 44 +++-
新建文件夹/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json | 2
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs | 167 +++++++++++++++
新建文件夹/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs | 22 +
新建文件夹/PDA/pages.json | 18
新建文件夹/PDA/pages/stash/CheckFinish.vue | 35 +-
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs | 133 +++++-------
新建文件夹/PDA/pages/stash/outboundorderDetail.vue | 41 ++-
新建文件夹/WIDESEA_WMSServer/ClassLibrary1/ISupplyTaskService.cs | 2
新建文件夹/PDA/pages/stash/CheckoutorderDetail.vue | 41 ++-
新建文件夹/WIDESEA_WMSServer/ClassLibrary2/SupplyTaskService.cs | 2
新建文件夹/PDA/pages/stash/Checkoutorder.vue | 4
新建文件夹/PDA/pages/stash/outFinish.vue | 53 ++--
13 files changed, 373 insertions(+), 191 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages.json" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages.json"
index 6d35a10..d6f6fd5 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages.json"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages.json"
@@ -60,33 +60,33 @@
{
"path": "pages/stash/outboundorderDetail",
"style": {
- "navigationBarTitleText": "鍑哄簱鍗曡鎯�",
+ "navigationBarTitleText": "鍑哄簱璇︽儏",
"enablePullDownRefresh": false
}
},{
- "path": "pages/stash/Outorderboxing",
+ "path": "pages/stash/outFinish",
"style": {
- "navigationBarTitleText": "鍑哄簱",
+ "navigationBarTitleText": "瀹屾垚鍑哄簱",
"enablePullDownRefresh": false
}
},
{
- "path": "pages/stash/Pdoutboundorder",
+ "path": "pages/stash/Checkoutorder",
"style": {
- "navigationBarTitleText": "鐩樼偣鍑哄簱鍗�",
+ "navigationBarTitleText": "鐩樼偣鍗�",
"enablePullDownRefresh": false
}
},
{
- "path": "pages/stash/PdoutboundorderDetail",
+ "path": "pages/stash/CheckoutorderDetail",
"style": {
- "navigationBarTitleText": "鍑哄簱鍗曡鎯�",
+ "navigationBarTitleText": "鐩樼偣璇︽儏",
"enablePullDownRefresh": false
}
},{
- "path": "pages/stash/PdOutorderboxing",
+ "path": "pages/stash/CheckFinish",
"style": {
- "navigationBarTitleText": "鐩樼偣",
+ "navigationBarTitleText": "瀹屾垚鐩樼偣",
"enablePullDownRefresh": false
}
},
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdOutorderboxing.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckFinish.vue"
similarity index 95%
rename from "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdOutorderboxing.vue"
rename to "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckFinish.vue"
index c2ee255..3275a7c 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdOutorderboxing.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckFinish.vue"
@@ -8,13 +8,13 @@
<uni-forms label-width="180">
<uni-forms-item :label="label">
</uni-forms-item>
- <uni-forms-item :label="goods_no">
- </uni-forms-item>
<uni-forms-item :label="batch_num">
</uni-forms-item>
- <uni-forms-item :label="order_qty">
+ <uni-forms-item :label="goods_no">
</uni-forms-item>
<uni-forms-item :label="order_Inqty">
+ </uni-forms-item>
+ <uni-forms-item :label="order_qty">
</uni-forms-item>
<uni-forms-item label="搴撲綅缂栧彿:">
<uni-easyinput type="text" placeholder="璇锋壂鎻忓簱浣嶇紪鍙�" ref='midInput' :focus="!focus"
@@ -132,6 +132,7 @@
return {
items: ['鍑哄簱'], //, '瑙g洏''缁勭洏', , '鍗曟嵁淇℃伅'
current: 0,
+ taskId:"",
matTotal: [],
matInfos: [],
orderNo: "",
@@ -174,16 +175,17 @@
this.focus = false;
this.addressFocus = false;
this.orderNo = res.orderNo;
+ this.taskId=res.taskId;
this.Inqty=res.order_Inqty;
this.orderqty=res.order_qty;
this.batchNo=res.batchNo;
this.warehouseId = res.warehouseId;
this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
this.batch_num="鎵规鍙凤細"+res.batchNo;
- this.order_qty="璐﹂潰鏁伴噺锛�"+res.order_qty;
- this.order_Inqty="瀹炵洏鏁伴噺锛�"+this.Inqty;
- this.goods_no="鐗╂枡缂栧彿锛�"+res.goods_no;
- this.getData();
+ this.order_qty="璐﹂潰鏁伴噺锛�"+res.stockQuantity;
+ this.order_Inqty="鐗╂枡鍚嶇О锛�"+res.materielName;
+ this.goods_no="鐗╂枡缂栧彿锛�"+res.materielCode;
+ // this.getData();
},
methods: {
// voiceSpeech(src) {
@@ -451,15 +453,16 @@
})
return;
}
- this.$u.post('/api/DeliveryOrder/MatPicking', {
+ this.$u.post('/api/DeliveryOrder/CheckFinish', {
MainData: {
- "LocationCode": this.barcode,
- "warehouseCode": this.warehouseId,
- "orderNo": this.orderNo,
- "Inqty": this.materSn,
- "batchNo": this.batchNo,
+ "locationCode": this.barcode,
+ "taskId":this.taskId,
+ // "warehouseCode": this.warehouseId,
+ // "orderNo": this.orderNo,
+ "qty": this.materSn,
+ // "batchNo": this.batchNo,
},
- DelKeys: this.sns
+ // DelKeys: this.sns
}).then(res => {
this.Testcheck = false;
if (res.status) {
@@ -468,9 +471,9 @@
type: "success"
})
this.Inqty=res.message;
- this.order_Inqty="瀹炵洏鏁伴噺锛�"+this.Inqty;
+ // this.order_Inqty="宸插嚭搴撴暟閲忥細"+this.Inqty;
this.barcode="";
- this.materSn="";
+ // this.materSn="";
} else {
this.$refs.uToast.show({
title: res.message,
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Pdoutboundorder.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Checkoutorder.vue"
similarity index 97%
rename from "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Pdoutboundorder.vue"
rename to "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Checkoutorder.vue"
index f283fc7..bc6fa3a 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Pdoutboundorder.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Checkoutorder.vue"
@@ -47,7 +47,7 @@
export default {
data() {
return {
- page: "/pages/stash/PdoutboundorderDetail?",
+ page: "/pages/stash/CheckoutorderDetail?",
loadVisible: false,
searchValue: "",
status: "more",
@@ -92,7 +92,7 @@
pageNo: this.pageNo
},
}
- this.$u.post('/api/DeliveryOrder/GetPdDeliveryOrders', postData).then((res) => {
+ this.$u.post('/api/DeliveryOrder/GetCheckOrders', postData).then((res) => {
if (res.status) {
if (res.data.length > 0) {
if (this.searchValue == '') {
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdoutboundorderDetail.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
similarity index 77%
rename from "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdoutboundorderDetail.vue"
rename to "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
index 7e18cda..b1db7ea 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/PdoutboundorderDetail.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
@@ -1,21 +1,22 @@
<template>
<view>
- <!-- <u-sticky>
+ <u-sticky>
<view style="background-color: #ffffff;">
<uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
</view>
- </u-sticky> -->
+ </u-sticky>
<uni-list :border="true">
- <uni-list-item direction="column" clickable @click="groupClick(item.batch_num)" link
- :to="page+item.batch_num+'&order_qty='+item.order_qty+'&order_Inqty='+item.order_Outqty+'&goods_no='+item.goods_no"
- v-for="item in allReceivingOrders" :key="item.batch_num">
+ <uni-list-item direction="column" clickable @click="groupClick(item.locationCode)" link
+ :to="page+item.locationCode+'&stockQuantity='+item.stockQuantity+'&taskId='+item.taskId+'&materielCode='+item.materielCode+'&batchNo='+item.batchNo+'&materielName='+item.materielName"
+ v-for="item in allReceivingOrders" :key="item.locationCode">
<template v-slot:body>
<uni-group margin-top="20">
<view> 鍗曟嵁缂栧彿:{{orderNo}} </view>
- <view> 鎵瑰彿:{{item.batch_num}} </view>
- <view> 鐗╂枡缂栧彿:{{item.goods_no}} </view>
- <view> 璐﹂潰鏁伴噺:{{item.order_qty}} </view>
- <view> 瀹炵洏鏁伴噺:{{item.order_Outqty}} </view>
+ <view> 鎵瑰彿:{{item.batchNo}} </view>
+ <view> 鐗╂枡缂栧彿:{{item.materielCode}} </view>
+ <!-- <view> 鐗╂枡鍚嶇О:{{item.materielName}} </view> -->
+ <view> 璐т綅缂栧彿:{{item.locationCode}} </view>
+ <view> 璐﹂潰鏁伴噺:{{item.stockQuantity}} </view>
</uni-group>
</template>
</uni-list-item>
@@ -31,7 +32,7 @@
export default {
data() {
return {
- page: "/pages/stash/PdOutorderboxing?",
+ page: "/pages/stash/CheckFinish?",
loadVisible: false,
searchValue: "",
status: "more",
@@ -46,7 +47,7 @@
this.warehouseId = res.warehouseId;
this.orderNo = res.orderNo;
this.allReceivingOrders=res.detail;
- this.page = this.page + "orderNo=" + this.orderNo +"&warehouseId=" + this.warehouseId + "&batchNo=";
+ this.page = this.page + "orderNo=" + this.orderNo +"&warehouseId=" + this.warehouseId + "&locationCode=";
this.getData();
},
onReachBottom() {
@@ -65,15 +66,17 @@
},
getData() {
- // var postData = {
- // MainData: {
- // warehouseId: this.warehouseId,
- // orderNo: this.searchValue,
- // pageNo: this.pageNo
- // },
- // }
+ var postData = {
+ MainData: {
+ warehouseId: this.warehouseId,
+ locationCode: this.searchValue,
+ orderNo: this.orderNo,
+ pageNo: this.pageNo,
+ isCheck:true,
+ },
+ }
if (this.pageNo == 1) this.allReceivingOrders = [];
- this.$u.post('/api/DeliveryOrder/GetDeliveryOrderDetail?pageNo=' + this.warehouseId + '&orderNo=' + this.orderNo+'&isPick=true').then((
+ this.$u.post('/api/DeliveryOrder/GetCheckOutTasks',postData).then((
res) => {
if (res.status) {
if (res.data.length > 0) {
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Outorderboxing.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
similarity index 93%
rename from "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Outorderboxing.vue"
rename to "\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
index 3f4d038..fad091a 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/Outorderboxing.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
@@ -8,22 +8,22 @@
<uni-forms label-width="180">
<uni-forms-item :label="label">
</uni-forms-item>
- <uni-forms-item :label="goods_no">
- </uni-forms-item>
<uni-forms-item :label="batch_num">
</uni-forms-item>
- <uni-forms-item :label="order_qty">
+ <uni-forms-item :label="goods_no">
</uni-forms-item>
<uni-forms-item :label="order_Inqty">
+ </uni-forms-item>
+ <uni-forms-item :label="order_qty">
</uni-forms-item>
<uni-forms-item label="搴撲綅缂栧彿:">
<uni-easyinput type="text" placeholder="璇锋壂鎻忓簱浣嶇紪鍙�" ref='midInput' :focus="!focus"
v-model="barcode" @confirm="barcodeInput" />
</uni-forms-item>
- <uni-forms-item label="鍑哄簱鏁伴噺:">
+ <!-- <uni-forms-item label="鍑哄簱鏁伴噺:">
<uni-easyinput type="text" placeholder="璇疯緭鍏ュ嚭搴撴暟閲�" ref='midInput' :focus="focus"
v-model="materSn" @confirm="snInput" />
- </uni-forms-item>
+ </uni-forms-item> -->
<uni-forms-item :label="Testlabel" v-if="Test">
<uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput'
@@ -132,6 +132,7 @@
return {
items: ['鍑哄簱'], //, '瑙g洏''缁勭洏', , '鍗曟嵁淇℃伅'
current: 0,
+ taskId:"",
matTotal: [],
matInfos: [],
orderNo: "",
@@ -174,16 +175,17 @@
this.focus = false;
this.addressFocus = false;
this.orderNo = res.orderNo;
+ this.taskId=res.taskId;
this.Inqty=res.order_Inqty;
this.orderqty=res.order_qty;
this.batchNo=res.batchNo;
this.warehouseId = res.warehouseId;
this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
this.batch_num="鎵规鍙凤細"+res.batchNo;
- this.order_qty="鍗曟嵁鏁伴噺锛�"+res.order_qty;
- this.order_Inqty="宸插嚭搴撴暟閲忥細"+this.Inqty;
- this.goods_no="鐗╂枡缂栧彿锛�"+res.goods_no;
- this.getData();
+ this.order_qty="鍑哄簱鏁伴噺锛�"+res.stockQuantity;
+ this.order_Inqty="鐗╂枡鍚嶇О锛�"+res.materielName;
+ this.goods_no="鐗╂枡缂栧彿锛�"+res.materielCode;
+ // this.getData();
},
methods: {
// voiceSpeech(src) {
@@ -444,22 +446,23 @@
})
return;
}
- if (this.materSn.length == 0) {
- this.$refs.uToast.show({
- title: "璇疯緭鍏ュ嚭搴撴暟閲�",
- type: 'error'
- })
- return;
- }
- this.$u.post('/api/DeliveryOrder/FeedbackOut', {
+ // if (this.materSn.length == 0) {
+ // this.$refs.uToast.show({
+ // title: "璇疯緭鍏ュ嚭搴撴暟閲�",
+ // type: 'error'
+ // })
+ // return;
+ // }
+ this.$u.post('/api/DeliveryOrder/OutFinish', {
MainData: {
- "LocationCode": this.barcode,
- "warehouseCode": this.warehouseId,
- "orderNo": this.orderNo,
- "Inqty": this.materSn,
- "batchNo": this.batchNo,
+ "locationCode": this.barcode,
+ "taskId":this.taskId,
+ // "warehouseCode": this.warehouseId,
+ // "orderNo": this.orderNo,
+ // "Inqty": this.materSn,
+ // "batchNo": this.batchNo,
},
- DelKeys: this.sns
+ // DelKeys: this.sns
}).then(res => {
this.Testcheck = false;
if (res.status) {
@@ -468,9 +471,9 @@
type: "success"
})
this.Inqty=res.message;
- this.order_Inqty="宸插嚭搴撴暟閲忥細"+this.Inqty;
+ // this.order_Inqty="宸插嚭搴撴暟閲忥細"+this.Inqty;
this.barcode="";
- this.materSn="";
+ // this.materSn="";
} else {
this.$refs.uToast.show({
title: res.message,
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outboundorderDetail.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outboundorderDetail.vue"
index afe6d22..650b2f6 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outboundorderDetail.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outboundorderDetail.vue"
@@ -1,21 +1,22 @@
<template>
<view>
- <!-- <u-sticky>
+ <u-sticky>
<view style="background-color: #ffffff;">
<uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
</view>
- </u-sticky> -->
+ </u-sticky>
<uni-list :border="true">
- <uni-list-item direction="column" clickable @click="groupClick(item.batch_num)" link
- :to="page+item.batch_num+'&order_qty='+item.order_qty+'&order_Inqty='+item.order_Outqty+'&goods_no='+item.goods_no"
- v-for="item in allReceivingOrders" :key="item.batch_num">
+ <uni-list-item direction="column" clickable @click="groupClick(item.locationCode)" link
+ :to="page+item.locationCode+'&stockQuantity='+item.stockQuantity+'&taskId='+item.taskId+'&materielCode='+item.materielCode+'&batchNo='+item.batchNo+'&materielName='+item.materielName"
+ v-for="item in allReceivingOrders" :key="item.locationCode">
<template v-slot:body>
<uni-group margin-top="20">
<view> 鍗曟嵁缂栧彿:{{orderNo}} </view>
- <view> 鎵瑰彿:{{item.batch_num}} </view>
- <view> 鐗╂枡缂栧彿:{{item.goods_no}} </view>
- <view> 鍗曟嵁鏁伴噺:{{item.order_qty}} </view>
- <view> 鍑哄簱鏁伴噺:{{item.order_Outqty}} </view>
+ <view> 鎵瑰彿:{{item.batchNo}} </view>
+ <view> 鐗╂枡缂栧彿:{{item.materielCode}} </view>
+ <!-- <view> 鐗╂枡鍚嶇О:{{item.materielName}} </view> -->
+ <view> 璐т綅缂栧彿:{{item.locationCode}} </view>
+ <view> 鏁伴噺:{{item.stockQuantity}} </view>
</uni-group>
</template>
</uni-list-item>
@@ -31,7 +32,7 @@
export default {
data() {
return {
- page: "/pages/stash/Outorderboxing?",
+ page: "/pages/stash/outFinish?",
loadVisible: false,
searchValue: "",
status: "more",
@@ -46,7 +47,7 @@
this.warehouseId = res.warehouseId;
this.orderNo = res.orderNo;
this.allReceivingOrders=res.detail;
- this.page = this.page + "orderNo=" + this.orderNo +"&warehouseId=" + this.warehouseId + "&batchNo=";
+ this.page = this.page + "orderNo=" + this.orderNo +"&warehouseId=" + this.warehouseId + "&locationCode=";
this.getData();
},
onReachBottom() {
@@ -65,15 +66,17 @@
},
getData() {
- // var postData = {
- // MainData: {
- // warehouseId: this.warehouseId,
- // orderNo: this.searchValue,
- // pageNo: this.pageNo
- // },
- // }
+ var postData = {
+ MainData: {
+ warehouseId: this.warehouseId,
+ locationCode: this.searchValue,
+ orderNo: this.orderNo,
+ pageNo: this.pageNo,
+ isCheck:false,
+ },
+ }
if (this.pageNo == 1) this.allReceivingOrders = [];
- this.$u.post('/api/DeliveryOrder/GetDeliveryOrderDetail?pageNo=' + this.warehouseId + '&orderNo=' + this.orderNo+'&isPick=false').then((
+ this.$u.post('/api/DeliveryOrder/GetCheckOutTasks',postData).then((
res) => {
if (res.status) {
if (res.data.length > 0) {
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary1/ISupplyTaskService.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary1/ISupplyTaskService.cs"
index f9ade3a..480cd37 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary1/ISupplyTaskService.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary1/ISupplyTaskService.cs"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Model.Models;
@@ -10,5 +11,6 @@
{
public interface ISupplyTaskService : IService<Dt_SupplyTask>
{
+ IRepository<Dt_SupplyTask> Repository { get;}
}
}
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/SupplyTaskService.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/SupplyTaskService.cs"
index 361dfd1..daef945 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/SupplyTaskService.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/SupplyTaskService.cs"
@@ -15,5 +15,7 @@
public SupplyTaskService(IRepository<Dt_SupplyTask> BaseDal) : base(BaseDal)
{
}
+
+ public IRepository<Dt_SupplyTask> Repository => BaseDal;
}
}
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
index bff8dfe..fab9821 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_ISquareCabinServices/IDeliveryOrderServices.cs"
@@ -45,8 +45,24 @@
WebResponseContent CompleteAllOutOrders();
WebResponseContent GetDeliveryOrders(SaveModel saveModel);
WebResponseContent GetDeliveryOrderDetail(int pageNo, string orderNo, bool isPick);
- WebResponseContent FeedbackOut(SaveModel saveModel);
- WebResponseContent GetPdDeliveryOrders(SaveModel saveModel);
- WebResponseContent MatPicking(SaveModel saveModel);
+ /// <summary>
+ /// 瀹屾垚鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ WebResponseContent OutFinish(SaveModel saveModel);
+ /// <summary>
+ /// 鏌ヨ鐩樼偣鍗曚俊鎭�
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ WebResponseContent GetCheckOrders(SaveModel saveModel);
+ /// <summary>
+ /// 瀹屾垚鐩樼偣浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ WebResponseContent CheckFinish(SaveModel saveModel);
+ WebResponseContent GetCheckOutTasks(SaveModel saveModel);
}
}
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
index 2d7dce1..2b13edc 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
@@ -1,4 +1,5 @@
锘縰sing HslCommunication;
+using MailKit.Search;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -604,7 +605,7 @@
};
entityOrder.Details.Add(detail);
- inv.OutboundQuantity += (float)use;
+ inv.OutboundQuantity += use;
BaseDal.Db.Updateable(inv).ExecuteCommand();
remainingPartial -= use;
@@ -635,7 +636,7 @@
};
entityOrder.Details.Add(detail);
- inv.OutboundQuantity += (float)use;
+ inv.OutboundQuantity += use;
BaseDal.Db.Updateable(inv).ExecuteCommand();
remainingPartial -= use;
@@ -678,7 +679,7 @@
};
entityOrder.Details.Add(detail);
- inv.OutboundQuantity += (float)useQty;
+ inv.OutboundQuantity += useQty;
BaseDal.Db.Updateable(inv).ExecuteCommand();
remainingFullBoxes -= useBoxes;
@@ -713,7 +714,7 @@
};
entityOrder.Details.Add(detail);
- inv.OutboundQuantity += (float)useQty;
+ inv.OutboundQuantity += useQty;
BaseDal.Db.Updateable(inv).ExecuteCommand();
remainingFullBoxes -= useBoxes;
@@ -1074,7 +1075,7 @@
}
-
+
/// <summary>
/// 鎺ㄩ�佸紓甯镐俊鎭粰涓婃父绯荤粺 1.鍏ュ簱鍗曟帴鍙o紱2.鍏ュ簱鍗曟姤瀹屾垚鎺ュ彛锛�3.鍑哄簱鍗曟帴鍙o紱4.鍑哄簱鎶ュ畬鎴愭帴鍙o紱5.鑽搧鍩虹淇℃伅鍚屾鎺ュ彛锛�6.渚涘簲鍟嗕俊鎭帴鍙o紱7.瀹㈡埛淇℃伅鎺ュ彛锛�8.搴撳瓨鏌ヨ鎺ュ彛
@@ -1103,33 +1104,6 @@
}
}
- public WebResponseContent GetPdDeliveryOrders(SaveModel saveModel)
- {
- WebResponseContent content = new WebResponseContent();
- try
- {
- int pageNo = saveModel.MainData["pageNo"].ObjToInt();
- string warehouseCode = saveModel.MainData["warehouseId"].ToString();
- string orderNo = saveModel.MainData["orderNo"].ToString();
- List<Dt_DeliveryOrder> dt_ReceiveOrders = new List<Dt_DeliveryOrder>();
- if (string.IsNullOrEmpty(orderNo))
- {
- dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�") && x.Warehouse_no == warehouseCode && x.Out_type == "3").Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 5);
- }
- else
- {
- dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.Out_no.Contains(orderNo) || x.Client_no.Contains(orderNo)) && (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�" && x.Out_type == "3") && x.Warehouse_no == warehouseCode).OrderByDescending(x => x.CreateDate).Includes(x => x.Details).ToPageList(pageNo, 5);
- }
-
- content.OK(data: dt_ReceiveOrders);
- }
- catch (Exception)
- {
-
- throw;
- }
- return content;
- }
public WebResponseContent GetDeliveryOrders(SaveModel saveModel)
{
@@ -1146,7 +1120,7 @@
}
else
{
- dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.Out_no.Contains(orderNo) || x.Client_no.Contains(orderNo)) && (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�" && x.Out_type != "3") && x.Warehouse_no == warehouseCode).OrderByDescending(x => x.CreateDate).Includes(x => x.Details).ToPageList(pageNo, 5);
+ dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.Out_no.Contains(orderNo) || x.Client_no.Contains(orderNo)) && (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�") && x.Out_type != "3" && x.Warehouse_no == warehouseCode).OrderByDescending(x => x.CreateDate).Includes(x => x.Details).ToPageList(pageNo, 5);
}
content.OK(data: dt_ReceiveOrders);
@@ -1158,7 +1132,13 @@
}
return content;
}
-
+ /// <summary>
+ /// 鏌ヨ鍑哄簱/鐩樼偣鍗曡鎯�
+ /// </summary>
+ /// <param name="pageNo"></param>
+ /// <param name="orderNo"></param>
+ /// <param name="isPick"></param>
+ /// <returns></returns>
public WebResponseContent GetDeliveryOrderDetail(int pageNo, string orderNo, bool isPick)
{
WebResponseContent content = new WebResponseContent();
@@ -1171,25 +1151,29 @@
content.OK(data: cabinOrderDetails);
return content;
}
- public WebResponseContent MatPicking(SaveModel saveModel)
+ public WebResponseContent OutFinish(SaveModel saveModel)
{
WebResponseContent content = new WebResponseContent();
try
{
- var LocationCode = saveModel.MainData["LocationCode"].ToString();
- var orderNo = saveModel.MainData["orderNo"].ToString();
- var batchNo = saveModel.MainData["batchNo"].ToString();
- var Inqty = saveModel.MainData["Inqty"].ObjToInt();
- var warehouseCode = saveModel.MainData["warehouseCode"].ToString();
- Dt_DeliveryOrder cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == orderNo && x.Warehouse_no == warehouseCode && x.Out_type == "3").Includes(x => x.Details).First();
- if (cabinOrder == null) return WebResponseContent.Instance.Error($"鐩樼偣鍗曞凡瀹屾垚");
- Dt_DeliveryOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == batchNo && x.Reservoirarea == warehouseCode).First();
- if (cabinOrderDetail == null) return WebResponseContent.Instance.Error($"鐩樼偣鍗曟槑缁嗗凡瀹屾垚");
+ var LocationCode = saveModel.MainData["locationCode"].ToString();
+ var TaskId = saveModel.MainData["taskId"].ObjToInt();
+ Dt_SupplyTask supplyTask = _supplyTaskService.Repository.QueryFirst(x => x.TaskId == TaskId && x.TaskStatus == SupplyStatusEnum.NewOut.ObjToInt());
+ if (supplyTask == null) throw new Exception("褰撳墠鍑哄簱浠诲姟宸插畬鎴�");
+ if (supplyTask.LocationCode != LocationCode) throw new Exception($"褰撳墠鍑哄簱璐т綅銆恵LocationCode}銆戜笌浠诲姟鍒嗛厤璐т綅涓嶅尮閰�");
+ supplyTask.TaskStatus = SupplyStatusEnum.OutFinish.ObjToInt();
+
+ Dt_DeliveryOrder cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First();
+ if (cabinOrder == null) return WebResponseContent.Instance.Error($"鍑哄簱鍗曞凡瀹屾垚");
+
+ Dt_DeliveryOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).First();
+ if (cabinOrderDetail == null) return WebResponseContent.Instance.Error($"鍑哄簱鍗曟槑缁嗗凡瀹屾垚");
Dt_MaterielInfo materielInfo = _basicService.MaterielInfoService.Repository.QueryFirst(x => x.MaterielCode == cabinOrderDetail.Goods_no);
if (materielInfo == null) return WebResponseContent.Instance.Error($"璇风淮鎶ょ墿鏂欑紪鍙枫�恵cabinOrderDetail.Goods_no}銆戠殑鐗╂枡淇℃伅");
- cabinOrderDetail.Order_Outqty += Inqty;
+ cabinOrderDetail.Order_Outqty += supplyTask.StockQuantity;
if (cabinOrderDetail.Order_Outqty > cabinOrderDetail.Order_qty)
- return WebResponseContent.Instance.Error($"瀹炵洏鏁伴噺涓嶅彲瓒呭嚭璐﹂潰鏁伴噺");
+ return WebResponseContent.Instance.Error($"鍑哄簱鏁伴噺涓嶅彲瓒呭嚭鍗曟嵁鏁伴噺");
+
#region 澶勭悊鍑哄簱鍗曪紝璐т綅锛屽簱瀛橈紝搴撳瓨鎵规淇℃伅
_unitOfWorkManage.BeginTran();
@@ -1206,55 +1190,51 @@
{
_deliveryOrderDetailServices.Repository.UpdateData(cabinOrderDetail);
}
- var cabinOrder1 = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Out_type == "3").Includes(x => x.Details).First();
+ var cabinOrder1 = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Out_type != "3").Includes(x => x.Details).First();
if (cabinOrder1.Details == null || cabinOrder1.Details.Count < 1) cabinOrder.OutStatus = "宸插畬鎴�";
- if (cabinOrder.OutStatus == "宸插畬鎴�")
- Repository.DeleteAndMoveIntoHty(cabinOrder, OperateTypeEnum.鑷姩瀹屾垚);
- else
- Repository.UpdateData(cabinOrder);
+ Repository.UpdateData(cabinOrder);
#endregion
#region 搴撳瓨
Dt_InventoryInfo inventoryInfo = _inventoryInfoService.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.LocationCode == LocationCode);
if (inventoryInfo == null) return WebResponseContent.Instance.Error($"鏈壘鍒拌揣浣嶃�恵LocationCode}銆戠殑搴撳瓨淇℃伅");
- inventoryInfo.SupplyQuantity += Inqty;
- _inventoryInfoService.UpdateData(inventoryInfo);
+ inventoryInfo.StockQuantity -= supplyTask.StockQuantity;
+ if (inventoryInfo.StockQuantity <= 0)
+ _inventoryInfoService.DeleteData(inventoryInfo);
+ else
+ _inventoryInfoService.UpdateData(inventoryInfo);
#endregion
- #region 浠诲姟璁板綍
- Dt_SupplyTask supplyTask = new Dt_SupplyTask()
+ #region 璐т綅
+ var location = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode);
+ if (location == null) return WebResponseContent.Instance.Error($"璇风淮鎶よ揣浣嶇紪鍙枫�恵LocationCode}銆戠殑璐т綅淇℃伅");
+ if (location.EnableStatus == EnableStatusEnum.Disable.ObjToInt())
+ return WebResponseContent.Instance.Error($"璐т綅缂栧彿銆恵LocationCode}銆戝凡绂佺敤锛岃鎭㈠姝e父鍐嶄娇鐢�");
+ Dt_InventoryInfo inventoryInfo1 = _inventoryInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode);
+ if (inventoryInfo1 == null)
{
- WarehouseCode = cabinOrderDetail.Reservoirarea,
- BatchNo = inventoryInfo.BatchNo,
- MaterielName = inventoryInfo.MaterielName,
- MaterielCode = inventoryInfo.MaterielCode,
- MaterielSpec = inventoryInfo.MaterielSpec,
- TaskType = TaskTypeEnum.OutInventory.ObjToInt(),
- TaskStatus = SupplyStatusEnum.CheckFinish.ObjToInt(),
- CreateDate = DateTime.Now,
- Creater = App.User.UserName,
- LocationCode = LocationCode,
- OrderNo = cabinOrder.Out_no,
- StockQuantity = inventoryInfo.StockQuantity,
- SupplyQuantity = Inqty,
- Remark = "鐩樼偣"
- };
- _supplyTaskService.AddData(supplyTask);
+ location.LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ _basicService.LocationInfoService.UpdateData(location);
+ }
#endregion
+
+ _supplyTaskService.UpdateData(supplyTask);
#region 搴撳瓨鎵规
Dt_Inventory_Batch inventory_Batch = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == inventoryInfo.BatchNo && x.MaterielCode == inventoryInfo.MaterielCode);
if (inventory_Batch != null)
{
- inventory_Batch.SupplyQuantity += Inqty;
- _inventory_BatchServices.UpdateData(inventory_Batch);
+ inventory_Batch.StockQuantity -= supplyTask.StockQuantity;
+ if (inventory_Batch.StockQuantity <= 0)
+ _inventory_BatchServices.DeleteData(inventory_Batch);
+ else
+ _inventory_BatchServices.UpdateData(inventory_Batch);
}
#endregion
_unitOfWorkManage.CommitTran();
#endregion
-
- content.OK(cabinOrderDetail.Order_Outqty.ToString());
+ content.OK();
}
catch (Exception ex)
{
@@ -1263,7 +1243,8 @@
}
return content;
}
- public WebResponseContent FeedbackOut(SaveModel saveModel)
+
+ public WebResponseContent MatPicking(SaveModel saveModel)
{
WebResponseContent content = new WebResponseContent();
try
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
index 5bb01d2..e574369 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs"
@@ -6,6 +6,7 @@
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
+using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.SquareCabin.OrderDto;
@@ -33,15 +34,16 @@
List<Dt_InventoryInfo> inventoryInfos = _inventoryInfoService.Repository.QueryData(x => item.MaterielCode == x.MaterielCode && x.BatchNo == item.BatchNo);
if (inventoryInfos.Count > 0)
{
- Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
- {
- Out_no = item.MaterielCode + "_" + item.BatchNo,
- Out_type = "3",
- OutStatus = "鏂板缓",
- Details = new List<Dt_DeliveryOrderDetail>()
- };
foreach (var items in inventoryInfos.GroupBy(x => x.WarehouseCode))
{
+ Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
+ {
+ Out_no = item.MaterielCode + "_" + item.BatchNo,
+ Out_type = "3",
+ OutStatus = "鏂板缓",
+ Warehouse_no = items.Key,
+ Details = new List<Dt_DeliveryOrderDetail>()
+ };
var Status = items.Key == "001" ? 0 : 2;//鍒ゆ柇鏄惁涓虹珛搴撳尯鍩�
Dt_DeliveryOrderDetail deliveryOrderDetail = new Dt_DeliveryOrderDetail()
{
@@ -56,6 +58,7 @@
Reservoirarea = items.Key
};
deliveryOrder.Details.Add(deliveryOrderDetail);
+ deliveryOrders.Add(deliveryOrder);
#region 鍒涘缓鐩樼偣浠诲姟
if (items.Key != "001")
{
@@ -83,7 +86,6 @@
}
#endregion
}
- deliveryOrders.Add(deliveryOrder);
}
}
_unitOfWorkManage.BeginTran();
@@ -102,5 +104,154 @@
return content;
}
#endregion
+ #region 鏌ヨ鐩樼偣鍗曚俊鎭�
+ /// <summary>
+ /// 鏌ヨ鐩樼偣鍗�
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ public WebResponseContent GetCheckOrders(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ int pageNo = saveModel.MainData["pageNo"].ObjToInt();
+ string warehouseCode = saveModel.MainData["warehouseId"].ToString();
+ string orderNo = saveModel.MainData["orderNo"].ToString();
+ List<Dt_DeliveryOrder> dt_ReceiveOrders = new List<Dt_DeliveryOrder>();
+ if (string.IsNullOrEmpty(orderNo))
+ {
+ dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�") && x.Warehouse_no == warehouseCode && x.Out_type == "3").Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 5);
+ }
+ else
+ {
+ dt_ReceiveOrders = Db.Queryable<Dt_DeliveryOrder>().Where(x => (x.Out_no.Contains(orderNo) || x.Client_no.Contains(orderNo)) && (x.OutStatus == "鏂板缓" || x.OutStatus == "寮�濮�") && x.Out_type == "3" && x.Warehouse_no == warehouseCode).OrderByDescending(x => x.CreateDate).Includes(x => x.Details).ToPageList(pageNo, 5);
+ }
+
+ content.OK(data: dt_ReceiveOrders);
+ }
+ catch (Exception)
+ {
+
+ throw;
+ }
+ return content;
+ }
+ #endregion
+ #region 鏌ユ壘鐩樼偣/鍑哄簱浠诲姟
+ /// <summary>
+ /// 鏌ユ壘鐩樼偣/鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ public WebResponseContent GetCheckOutTasks(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ int pageNo = saveModel.MainData["pageNo"].ObjToInt();
+ string LocationCode = saveModel.MainData["locationCode"].ToString();
+ string warehouseCode = saveModel.MainData["warehouseId"].ToString();
+ string orderNo = saveModel.MainData["orderNo"].ToString();
+ bool isCheck = saveModel.MainData["isCheck"].ObjToBool();
+ var TaskStatus = isCheck ? SupplyStatusEnum.NewCheck.ObjToInt() : SupplyStatusEnum.NewOut.ObjToInt();
+ List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>();
+ if (string.IsNullOrEmpty(LocationCode))
+ {
+ supplyTasks = Db.Queryable<Dt_SupplyTask>().Where(x => x.TaskStatus == TaskStatus && x.OrderNo == orderNo && x.WarehouseCode == warehouseCode).ToPageList(pageNo, 5);
+ }
+ else
+ {
+ supplyTasks = Db.Queryable<Dt_SupplyTask>().Where(x => x.TaskStatus == TaskStatus && x.OrderNo == orderNo && x.WarehouseCode == warehouseCode && x.LocationCode.Contains(LocationCode)).ToPageList(pageNo, 5);
+ }
+ content.OK(data: supplyTasks);
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ #endregion
+ #region 瀹屾垚鐩樼偣浠诲姟
+ public WebResponseContent CheckFinish(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var LocationCode = saveModel.MainData["locationCode"].ToString();
+ var TaskId = saveModel.MainData["taskId"].ObjToInt();
+ var qty = saveModel.MainData["qty"].ObjToInt();
+ Dt_SupplyTask supplyTask = _supplyTaskService.Repository.QueryFirst(x => x.TaskId == TaskId && x.TaskStatus == SupplyStatusEnum.NewCheck.ObjToInt());
+ if (supplyTask == null) throw new Exception("褰撳墠鐩樼偣浠诲姟宸插畬鎴�");
+ if (supplyTask.LocationCode != LocationCode) throw new Exception($"褰撳墠鐩樼偣璐т綅銆恵LocationCode}銆戜笌浠诲姟鍒嗛厤璐т綅涓嶅尮閰�");
+ supplyTask.SupplyQuantity = qty;
+ supplyTask.TaskStatus = SupplyStatusEnum.CheckFinish.ObjToInt();
+ Dt_DeliveryOrder cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode && x.Out_type == "3").Includes(x => x.Details).First();
+ if (cabinOrder == null) return WebResponseContent.Instance.Error($"鐩樼偣鍗曞凡瀹屾垚");
+ Dt_DeliveryOrderDetail cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).First();
+ if (cabinOrderDetail == null) return WebResponseContent.Instance.Error($"鐩樼偣鍗曟槑缁嗗凡瀹屾垚");
+ Dt_MaterielInfo materielInfo = _basicService.MaterielInfoService.Repository.QueryFirst(x => x.MaterielCode == cabinOrderDetail.Goods_no);
+ if (materielInfo == null) return WebResponseContent.Instance.Error($"璇风淮鎶ょ墿鏂欑紪鍙枫�恵cabinOrderDetail.Goods_no}銆戠殑鐗╂枡淇℃伅");
+ cabinOrderDetail.Order_Outqty += supplyTask.SupplyQuantity;
+ if (cabinOrderDetail.Order_Outqty > cabinOrderDetail.Order_qty)
+ return WebResponseContent.Instance.Error($"瀹炵洏鏁伴噺涓嶅彲瓒呭嚭璐﹂潰鏁伴噺");
+
+ #region 澶勭悊鍑哄簱鍗曪紝璐т綅锛屽簱瀛橈紝搴撳瓨鎵规淇℃伅
+ _unitOfWorkManage.BeginTran();
+
+ #region 鍑哄簱鍗�
+ cabinOrder.OutStatus = "寮�濮�";
+ cabinOrderDetail.OotDetailStatus = "寮�濮�";
+ if (cabinOrderDetail.Order_Outqty == cabinOrderDetail.Order_qty)
+ {
+ cabinOrderDetail.OotDetailStatus = "宸插畬鎴�";
+ _deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(cabinOrderDetail, OperateTypeEnum.鑷姩瀹屾垚);
+ }
+ else
+ {
+ _deliveryOrderDetailServices.Repository.UpdateData(cabinOrderDetail);
+ }
+ var cabinOrder1 = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Out_type == "3").Includes(x => x.Details).First();
+ if (cabinOrder1.Details == null || cabinOrder1.Details.Count < 1) cabinOrder.OutStatus = "宸插畬鎴�";
+ if (cabinOrder.OutStatus == "宸插畬鎴�")
+ Repository.DeleteAndMoveIntoHty(cabinOrder, OperateTypeEnum.鑷姩瀹屾垚);
+ else
+ Repository.UpdateData(cabinOrder);
+ #endregion
+
+ #region 搴撳瓨
+ Dt_InventoryInfo inventoryInfo = _inventoryInfoService.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.LocationCode == LocationCode);
+ if (inventoryInfo == null) return WebResponseContent.Instance.Error($"鏈壘鍒拌揣浣嶃�恵LocationCode}銆戠殑搴撳瓨淇℃伅");
+ inventoryInfo.StockQuantity = supplyTask.SupplyQuantity;
+ _inventoryInfoService.UpdateData(inventoryInfo);
+ #endregion
+
+ #region 浠诲姟璁板綍
+ _supplyTaskService.UpdateData(supplyTask);
+ #endregion
+
+ #region 搴撳瓨鎵规
+ Dt_Inventory_Batch inventory_Batch = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == inventoryInfo.BatchNo && x.MaterielCode == inventoryInfo.MaterielCode);
+ if (inventory_Batch != null)
+ {
+ inventory_Batch.SupplyQuantity += supplyTask.SupplyQuantity;
+ _inventory_BatchServices.UpdateData(inventory_Batch);
+ }
+ #endregion
+
+ _unitOfWorkManage.CommitTran();
+ #endregion
+
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ #endregion
}
}
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
index b2fb472..9c04bb0 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/SquareCabin/DeliveryOrderController.cs"
@@ -26,13 +26,13 @@
/// 鏌ヨ鐩樼偣鍗曚俊鎭�
/// </summary>
/// <returns></returns>
- [HttpPost, HttpGet, Route("GetPdDeliveryOrders")]
- public WebResponseContent GetPdDeliveryOrders([FromBody] SaveModel saveModel)
+ [HttpPost, HttpGet, Route("GetCheckOrders")]
+ public WebResponseContent GetCheckOrders([FromBody] SaveModel saveModel)
{
- return Service.GetPdDeliveryOrders(saveModel);
+ return Service.GetCheckOrders(saveModel);
}
- /// 鏌ヨ鍗曚俊鎭�
+ /// 鏌ヨ鍑哄簱鍗曚俊鎭�
/// </summary>
/// <returns></returns>
[HttpPost, HttpGet, Route("GetDeliveryOrders")]
@@ -41,7 +41,7 @@
return Service.GetDeliveryOrders(saveModel);
}
- /// 鏌ヨ鍗曡鎯呬俊鎭�
+ /// 鏌ヨ鍑哄簱/鐩樼偣鍗曡鎯�
/// </summary>
/// <returns></returns>
[HttpPost, HttpGet, Route("GetDeliveryOrderDetail")]
@@ -49,17 +49,35 @@
{
return Service.GetDeliveryOrderDetail(pageNo, orderNo,isPick);
}
-
- [HttpPost, HttpGet, Route("MatPicking")]
- public WebResponseContent MatPicking([FromBody] SaveModel saveModel)
+ /// <summary>
+ /// 瀹屾垚鐩樼偣浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("CheckFinish")]
+ public WebResponseContent CheckFinish([FromBody] SaveModel saveModel)
{
- return Service.MatPicking(saveModel);
+ return Service.CheckFinish(saveModel);
}
-
- [HttpPost, HttpGet, Route("FeedbackOut")]
- public WebResponseContent FeedbackOut([FromBody] SaveModel saveModel)
+ /// <summary>
+ /// 瀹屾垚鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("OutFinish")]
+ public WebResponseContent OutFinish([FromBody] SaveModel saveModel)
{
- return Service.FeedbackOut(saveModel);
+ return Service.OutFinish(saveModel);
+ }
+ /// <summary>
+ /// 鏌ユ壘鏈畬鎴愮洏鐐�/鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("GetCheckOutTasks")]
+ public WebResponseContent GetCheckOutTasks([FromBody] SaveModel saveModel)
+ {
+ return Service.GetCheckOutTasks(saveModel);
}
/// <summary>
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
index 8be8b3a..0f84a35 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
@@ -16,7 +16,7 @@
//"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//鏃MS鏁版嵁搴撹繛鎺�
- "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDBF_Z22;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDBF_Z22;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//璺ㄥ煙
"Cors": {
"PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
--
Gitblit v1.9.3