From 7f2db05b4ce84051d9c0a5c89a62185211b8442b Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 19 十二月 2025 19:09:24 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-wal | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs | 11
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs | 1
项目代码/WIDESEA_WMSClient/src/api/http.js | 4
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 8
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-shm | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 216 ++++++++++++++++
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 474 ++++++++++++++++++++++-------------
项目资料/接口文档/~$es接口文档.docx | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db | 0
项目资料/接口文档/~$S接口对接文档_V1.04.doc | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-wal | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-shm | 0
项目代码/WIDESEA_WMSClient/config/buttons.js | 10
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs | 8
17 files changed, 547 insertions(+), 187 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
index 355dec9..a575e5e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
@@ -242,7 +242,15 @@
type: 'primary',
onClick: function () {
}
-},
+},{
+ name: "鍒嗘壒鍏ュ簱鍥炰紶MES",
+ // icon: 'el-icon-upload2',
+ class: '',
+ value: 'BatchInOrderFeedbackToMes',
+ type: 'primary',
+ onClick: function () {
+ }
+}
]
export default buttons
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
index 02caf1c..f61383c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
@@ -13,8 +13,8 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
- // axios.defaults.baseURL = 'http://127.0.0.1:9291/';
- axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
+ axios.defaults.baseURL = 'http://127.0.0.1:9291/';
+ // axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
}
else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'http://127.0.0.1:8098/';
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index 6b68ff8..8c60161 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -1,36 +1,45 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-import gridHeader from './extend/EmptyTrayInbound.vue'
-import gridBody from './extend/Pallet.vue'
-import http from '@/api/http.js'
-import { h, createVNode, render, reactive, ref } from 'vue';
-import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus';
+import gridHeader from "./extend/EmptyTrayInbound.vue";
+import gridBody from "./extend/Pallet.vue";
+import http from "@/api/http.js";
+import { h, createVNode, render, reactive, ref } from "vue";
+import {
+ ElDialog,
+ ElForm,
+ ElFormItem,
+ ElInput,
+ ElButton,
+ ElMessage,
+ ElSelect,
+ ElOption,
+} from "element-plus";
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
gridHeader: gridHeader,
gridBody: gridBody,
- gridFooter: '',
+ gridFooter: "",
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
- modelHeader: '',
- modelBody: '',
- modelFooter: ''
+ modelHeader: "",
+ modelBody: "",
+ modelFooter: "",
},
- tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+ tableAction: "", //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
buttons: {
view: [
{
- name: '鎾ら攢缁勭洏',
- type: 'primary',
- value: '鎾ら攢缁勭洏',
- onClick: function () {
- console.log('鎾ら攢缁勭洏鎸夐挳琚偣鍑�');
- const mountNode = document.createElement('div');
+ name: "鎾ら攢缁勭洏",
+ type: "primary",
+ value: "鎾ら攢缁勭洏",
+ onClick: function() {
+ console.log("鎾ら攢缁勭洏鎸夐挳琚偣鍑�");
+ const mountNode = document.createElement("div");
document.body.appendChild(mountNode);
// 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
const formData = reactive({
- palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
- barcode: ''
+ palletCode: "", // 鎵樼洏鍙疯緭鍏ユ
+ barcode: "",
});
// 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
@@ -40,13 +49,18 @@
// 鎵ц琛ㄥ崟鏍¢獙锛堟墭鐩樺彿蹇呭~锛�
await formRef.validate();
} catch (err) {
- ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
+ ElMessage.warning("璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�");
return;
}
// 鍙戣捣鎾ら攢缁勭洏璇锋眰
try {
- const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode=' + formData.palletCode.trim() + '&barcode=' + formData.barcode.trim());
+ const response = await http.post(
+ "/api/InboundOrder/UndoPalletGroup?palletCode=" +
+ formData.palletCode.trim() +
+ "&barcode=" +
+ formData.barcode.trim()
+ );
const { status, message, data } = response;
if (status) {
ElMessage.success(response.message);
@@ -55,12 +69,12 @@
render(null, mountNode);
document.body.removeChild(mountNode);
} else {
- ElMessage.error(message || data?.message || '鎾ら攢缁勭洏澶辫触');
+ ElMessage.error(message || data?.message || "鎾ら攢缁勭洏澶辫触");
selectPalletCodeInput(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
}
} catch (error) {
- console.error('鎾ら攢缁勭洏璇锋眰寮傚父锛�', error);
- ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
+ console.error("鎾ら攢缁勭洏璇锋眰寮傚父锛�", error);
+ ElMessage.error("缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�");
selectPalletCodeInput();
}
};
@@ -70,7 +84,8 @@
setTimeout(() => {
const inputRef = vnode.component.refs.palletCodeInput;
if (inputRef) {
- const targetInput = inputRef.$el?.querySelector('input') || inputRef;
+ const targetInput =
+ inputRef.$el?.querySelector("input") || inputRef;
targetInput?.focus();
targetInput?.select();
}
@@ -78,180 +93,277 @@
};
// 鍒涘缓瀵硅瘽妗哣Node
- const vnode = createVNode(ElDialog, {
- title: '鎾ら攢缁勭洏',
- width: '400px',
- modelValue: true,
- appendToBody: true,
- onOpened: () => {
- // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
- setTimeout(() => {
- const inputRef = vnode.component.refs.palletCodeInput;
- inputRef?.focus();
- }, 100);
- },
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- }
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- palletCode: [
- { required: true, message: '璇疯緭鍏ユ墭鐩樺彿', trigger: ['blur', 'enter'] },
- { min: 1, max: 50, message: '鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�', trigger: ['blur', 'input'] }
- ]
+ const vnode = createVNode(
+ ElDialog,
+ {
+ title: "鎾ら攢缁勭洏",
+ width: "400px",
+ modelValue: true,
+ appendToBody: true,
+ onOpened: () => {
+ // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
+ setTimeout(() => {
+ const inputRef = vnode.component.refs.palletCodeInput;
+ inputRef?.focus();
+ }, 100);
},
- ref: 'cancelPalletForm'
- }, [
- // 鎵樼洏鍙疯緭鍏ラ」
- h(ElFormItem, { label: '鎵樼洏鏉$爜', prop: 'palletCode', required: true }, [
- h(ElInput, {
- type: 'text',
- modelValue: formData.palletCode,
- 'onUpdate:modelValue': (val) => {
- formData.palletCode = val;
+ "onUpdate:modelValue": (isVisible) => {
+ if (!isVisible) {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ }
+ },
+ },
+ {
+ default: () =>
+ h(
+ ElForm,
+ {
+ model: formData,
+ rules: {
+ palletCode: [
+ {
+ required: true,
+ message: "璇疯緭鍏ユ墭鐩樺彿",
+ trigger: ["blur", "enter"],
+ },
+ {
+ min: 1,
+ max: 50,
+ message: "鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�",
+ trigger: ["blur", "input"],
+ },
+ ],
+ },
+ ref: "cancelPalletForm",
},
- ref: 'palletCodeInput',
- placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿',
- maxLength: 50,
- // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
- onKeydown: (e) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- submitForm();
- }
- }
- })
- ]),
- h(ElFormItem, { label: ' 鍐呯鏍囩', prop: 'barcode' }, [
- h(ElInput, {
- type: 'text',
- modelValue: formData.barcode,
- 'onUpdate:modelValue': (val) => {
- formData.barcode = val;
- },
- placeholder: '鍙�夛紝鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ潯鐮�',
- maxLength: 50,
- onKeydown: (e) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- submitForm();
- }
- }
- })
- ]),
- // 搴曢儴鎸夐挳鍖�
- h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鎾ら攢缁勭洏');
- }
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: submitForm.bind(this) // 缁戝畾this涓婁笅鏂�
- }, '纭鎾ら攢')
- ])
- ])
- });
+ [
+ // 鎵樼洏鍙疯緭鍏ラ」
+ h(
+ ElFormItem,
+ { label: "鎵樼洏鏉$爜", prop: "palletCode", required: true },
+ [
+ h(ElInput, {
+ type: "text",
+ modelValue: formData.palletCode,
+ "onUpdate:modelValue": (val) => {
+ formData.palletCode = val;
+ },
+ ref: "palletCodeInput",
+ placeholder: "鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿",
+ maxLength: 50,
+ // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
+ onKeydown: (e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ submitForm();
+ }
+ },
+ }),
+ ]
+ ),
+ h(ElFormItem, { label: " 鍐呯鏍囩", prop: "barcode" }, [
+ h(ElInput, {
+ type: "text",
+ modelValue: formData.barcode,
+ "onUpdate:modelValue": (val) => {
+ formData.barcode = val;
+ },
+ placeholder: "鍙�夛紝鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ潯鐮�",
+ maxLength: 50,
+ onKeydown: (e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ submitForm();
+ }
+ },
+ }),
+ ]),
+ // 搴曢儴鎸夐挳鍖�
+ h(
+ "div",
+ { style: { textAlign: "right", marginTop: "16px" } },
+ [
+ h(
+ ElButton,
+ {
+ type: "text",
+ onClick: () => {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ ElMessage.info("鍙栨秷鎾ら攢缁勭洏");
+ },
+ },
+ "鍙栨秷"
+ ),
+ h(
+ ElButton,
+ {
+ type: "primary",
+ onClick: submitForm.bind(this), // 缁戝畾this涓婁笅鏂�
+ },
+ "纭鎾ら攢"
+ ),
+ ]
+ ),
+ ]
+ ),
+ }
+ );
vnode.appContext = this.$.appContext;
render(vnode, mountNode);
- }
+ },
},
- {
- name: '鍒嗘壒鍏ュ簱',
- type: 'primary',
- value: '鍒嗘壒鍏ュ簱',
- onClick: async function () {
- console.log('鍒嗘壒鍏ュ簱鎸夐挳琚偣鍑伙紝寮�濮嬫牎楠�');
- const selectedRows = this.$refs.table.getSelected();
+ // {
+ // name: '鍒嗘壒鍏ュ簱',
+ // type: 'primary',
+ // value: '鍒嗘壒鍏ュ簱',
+ // onClick: async function () {
+ // console.log('鍒嗘壒鍏ュ簱鎸夐挳琚偣鍑伙紝寮�濮嬫牎楠�');
+ // const selectedRows = this.$refs.table.getSelected();
- // 鏍¢獙1锛氭槸鍚﹂�変腑琛岋紙鑷冲皯閫夋嫨涓�鏉★級
- if (selectedRows.length === 0) {
- console.log('鏍¢獙涓嶉�氳繃锛氭湭閫変腑浠讳綍鍗曟嵁');
- ElMessage.warning('璇烽�夋嫨鑷冲皯涓�鏉″崟鎹�');
- return;
- }
+ // // 鏍¢獙1锛氭槸鍚﹂�変腑琛岋紙鑷冲皯閫夋嫨涓�鏉★級
+ // if (selectedRows.length === 0) {
+ // console.log('鏍¢獙涓嶉�氳繃锛氭湭閫変腑浠讳綍鍗曟嵁');
+ // ElMessage.warning('璇烽�夋嫨鑷冲皯涓�鏉″崟鎹�');
+ // return;
+ // }
- // 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
- const inboundOrderNos = selectedRows
- .filter(row => row.inboundOrderNo)
- .map(row => row.inboundOrderNo);
+ // // 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
+ // const inboundOrderNos = selectedRows
+ // .filter(row => row.inboundOrderNo)
+ // .map(row => row.inboundOrderNo);
- // 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
- if (inboundOrderNos.length === 0) {
- console.log('鏍¢獙涓嶉�氳繃锛氶�変腑鍗曟嵁鏃犳湁鏁堢紪鍙�');
- ElMessage.warning('閫変腑鐨勫崟鎹腑鏃犳湁鏁堢紪鍙凤紝璇烽噸鏂伴�夋嫨');
- return;
- }
+ // // 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
+ // if (inboundOrderNos.length === 0) {
+ // console.log('鏍¢獙涓嶉�氳繃锛氶�変腑鍗曟嵁鏃犳湁鏁堢紪鍙�');
+ // ElMessage.warning('閫変腑鐨勫崟鎹腑鏃犳湁鏁堢紪鍙凤紝璇烽噸鏂伴�夋嫨');
+ // return;
+ // }
- try {
- console.log('鍙戣捣鍒嗘壒鍏ュ簱璇锋眰锛屽弬鏁帮細', { inboundOrderNos });
- const response = await http.post('/api/InboundOrder/BatchOrderFeedbackToMes', {
- orderNos: inboundOrderNos,
- inout: 1
- });
+ // try {
+ // console.log('鍙戣捣鍒嗘壒鍏ュ簱璇锋眰锛屽弬鏁帮細', { inboundOrderNos });
+ // const response = await http.post('/api/InboundOrder/BatchOrderFeedbackToMes', {
+ // orderNos: inboundOrderNos,
+ // inout: 1
+ // });
- const { status, message, data } = response;
- if (status) {
- console.log('鍒嗘壒鍏ュ簱鎴愬姛锛屽悗绔繑鍥烇細', data);
- ElMessage.success(`鍒嗘壒鍏ュ簱鎴愬姛锛乣);
- this.refresh(); // 鍏ュ簱鎴愬姛鍚庡埛鏂板垪琛紙澶嶇敤鍘熸湁閫昏緫锛�
- } else {
- console.log('鍒嗘壒鍏ュ簱澶辫触锛屽悗绔彁绀猴細', message);
- ElMessage.error(message || data?.message || '鍒嗘壒鍏ュ簱澶辫触');
- }
- } catch (error) {
- console.error('鍒嗘壒鍏ュ簱璇锋眰寮傚父锛�', error);
- ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
- }
- }
- },
- ], box: [], detail: []
+ // const { status, message, data } = response;
+ // if (status) {
+ // console.log('鍒嗘壒鍏ュ簱鎴愬姛锛屽悗绔繑鍥烇細', data);
+ // ElMessage.success(`鍒嗘壒鍏ュ簱鎴愬姛锛乣);
+ // this.refresh(); // 鍏ュ簱鎴愬姛鍚庡埛鏂板垪琛紙澶嶇敤鍘熸湁閫昏緫锛�
+ // } else {
+ // console.log('鍒嗘壒鍏ュ簱澶辫触锛屽悗绔彁绀猴細', message);
+ // ElMessage.error(message || data?.message || '鍒嗘壒鍏ュ簱澶辫触');
+ // }
+ // } catch (error) {
+ // console.error('鍒嗘壒鍏ュ簱璇锋眰寮傚父锛�', error);
+ // ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
+ // }
+ // }
+ // },
+ ],
+ box: [],
+ detail: [],
},
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
- var EmptyTrayInboundBtn = this.buttons.find(x => x.value == "EmptyTrayInbound");
- if (EmptyTrayInboundBtn != null) {
- EmptyTrayInboundBtn.onClick = () => {
- this.$refs.gridHeader.open();
- }
- }
- var GroupPalletBtn = this.buttons.find(x => x.value == "GroupPallet");
- if (GroupPalletBtn != null) {
- GroupPalletBtn.onClick = () => {
- // console.log(this.$refs)
- this.$refs.gridBody.open();
- }
- }
+ var EmptyTrayInboundBtn = this.buttons.find(
+ (x) => x.value == "EmptyTrayInbound"
+ );
+ if (EmptyTrayInboundBtn != null) {
+ EmptyTrayInboundBtn.onClick = () => {
+ this.$refs.gridHeader.open();
+ };
+ }
+ var BatchInOrderFeedbackToMesBtn = this.buttons.find(
+ (x) => x.value == "BatchInOrderFeedbackToMes"
+ );
+ if (BatchInOrderFeedbackToMesBtn != null) {
+ BatchInOrderFeedbackToMesBtn.onClick = () => {
+ var rows = this.$refs.table.getSelected();
+ // 鏍¢獙鏄惁鏈夐�変腑鏁版嵁
+ if (!rows || rows.length === 0) {
+ return this.$Message.error("璇峰厛閫夋嫨闇�瑕佸鐞嗙殑鍗曟嵁");
+ }
+ if (rows.length > 1) {
+ return this.$Message.error("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ this.http.post(`api/Inbound/BatchInOrderFeedbackToMes?OrderNo=${rows[0].inboundOrderNo}`,{},"鏁版嵁澶勭悊涓�...")
+ .then((x) => {
+ if (x.status) {
+ this.$Message.success(x.message);
+ this.refresh();
+ } else {
+ return this.$Message.error(x.message);
+ }
+ })
+ .catch((error) => {
+ // 澧炲姞寮傚父鎹曡幏锛屽鐞嗙綉缁滈敊璇瓑鎯呭喌
+ //_this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
+ });
+ };
+ }
- this.columns.forEach(column => {
- if (column.field === 'orderStatistics') {
+ // let BatchInOrderFeedbackToMesBtn = this.buttons.find((x) => x.value == "BatchInOrderFeedbackToMes");
+ // if (BatchInOrderFeedbackToMesBtn != null) {
+ // BatchInOrderFeedbackToMesBtn.onClick = ()=> {
+ // let selectedRows = this.$refs.table.getSelected();
+
+ // // 鏍¢獙鏄惁鏈夐�変腑鏁版嵁
+ // if (!selectedRows || selectedRows.length === 0) {
+ // return this.$Message.warning("璇峰厛閫夋嫨闇�瑕佸鐞嗙殑鍗曟嵁");
+ // }
+ // if (selectedRows.length > 1) {
+ // return this.$Message.warning("璇烽�夋嫨涓�鏉℃暟鎹�");
+ // }
+ // this.http.post(`api/Inbound/BatchInOrderFeedbackToMes?orderNo=${selectedRows[0].orderNo}`,{},"鏁版嵁澶勭悊涓�...")
+ // .then((x) => {
+ // if (x.status) {
+ // this.$Message.success("鍒嗘壒鍑哄簱鍥炶皟瀹屾垚");
+ // this.refresh();
+ // } else {
+ // return this.$Message.error("鍒嗘壒鍑哄簱鍥炶皟澶辫触");
+ // }
+ // })
+ // .catch((error) => {
+ // // 澧炲姞寮傚父鎹曡幏锛屽鐞嗙綉缁滈敊璇瓑鎯呭喌
+ // //_this.$Message.error('璇锋眰澶辫触锛�' + (error.message || '鏈煡閿欒'));
+ // });
+ // };
+ // }
+
+ var GroupPalletBtn = this.buttons.find((x) => x.value == "GroupPallet");
+ if (GroupPalletBtn != null) {
+ GroupPalletBtn.onClick = () => {
+ // console.log(this.$refs)
+ this.$refs.gridBody.open();
+ };
+ }
+
+ this.columns.forEach((column) => {
+ if (column.field === "orderStatistics") {
column.formatter = (row) => {
// 鏍¢獙details鏄惁瀛樺湪涓旀湁鏁版嵁
if (row.details && row.details.length > 0) {
//鎸塵aterielCode鍒嗙粍缁熻orderQuantity鎬诲拰
const materielSumMap = row.details.reduce((acc, item) => {
- const materielCode = item.materielCode || '鏈煡鐗╂枡';
+ const materielCode = item.materielCode || "鏈煡鐗╂枡";
const quantity = Number(item.orderQuantity) || 0;
acc[materielCode] = (acc[materielCode] || 0) + quantity;
return acc;
}, {});
//姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀�
- const displayItems = Object.entries(materielSumMap).map(([code, total]) => {
- return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${total}涓�</div>`;
- });
- const displayContent = displayItems.join('');
+ const displayItems = Object.entries(materielSumMap).map(
+ ([code, total]) => {
+ return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${total}涓�</div>`;
+ }
+ );
+ const displayContent = displayItems.join("");
return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`;
} else {
return '<span style="color: #F56C6C">鏃犲叆搴撴槑缁�</span>';
@@ -261,7 +373,6 @@
});
},
onInited() {
-
//妗嗘灦鍒濆鍖栭厤缃悗
//濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
//this.detailOptions.columns.forEach(column=>{ });
@@ -270,12 +381,13 @@
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
//杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
// this.searchFormFields.orderType=[0]
- let wheres = [{
- 'name': 'orderType',
- 'value': '0',
- 'displayType': 'text'
- }];
-
+ let wheres = [
+ {
+ name: "orderType",
+ value: "0",
+ displayType: "text",
+ },
+ ];
param.wheres.push(...wheres);
return true;
@@ -302,7 +414,7 @@
//(3)this.editFormFields.瀛楁='xxx';
//濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
//鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
- }
- }
+ },
+ },
};
-export default extension;
\ No newline at end of file
+export default extension;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index 941480c..82e454f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -313,6 +313,14 @@
bind: { key: "orderDetailStatusEnum", data: [] },
},
{
+ field: "returnToMESStatus",
+ title: "鍥炰紶鐘舵��",
+ type: "string",
+ width: 90,
+ align: "left",
+ bind: { key: "returnStatus", data: [{ key: 0, value: "鏈洖浼�" }, { key: 1, value: "宸插洖浼犳垚鍔�" }, { key: 2, value: "鍥炰紶澶辫触" }] }
+ },
+ {
field: "creater",
title: "鍒涘缓浜�",
type: "string",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db"
index 8ad8c3d..4e227a2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-shm" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-shm"
index c67f2e1..068e67a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-shm"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-shm"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-wal" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-wal"
index 2bcc48b..02e7fe0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-wal"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/CodeChunks.db-wal"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db"
index cc734c2..cb9e0f4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-shm" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-shm"
index d00036d..f3e1c0a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-shm"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-shm"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-wal" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-wal"
index 9268501..e024027 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-wal"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1231.31060/SemanticSymbols.db-wal"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs"
index 6ab5935..36740d6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs"
@@ -116,6 +116,7 @@
public List<BarcodeInfo>? Barcodes { get; set; }
}
+
/// <summary>
/// 鏉$爜淇℃伅
/// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
index f21ad9b..90aa0d3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
@@ -29,5 +29,13 @@
/// <returns></returns>
Task<WebResponseContent> AllcatedGroupPallet(GroupPalletDto palletDto);
+
+ /// <summary>
+ /// 鍏ュ簱鍒嗘壒鍥炰紶
+ /// </summary>
+ /// <param name="OrderNo"></param>
+ /// <returns></returns>
+ WebResponseContent BatchInOrderFeedbackToMes(string OrderNo);
+
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index c3bcf49..b66eda7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -1,5 +1,7 @@
锘縰sing LogLibrary.Log;
using MailKit;
+using MailKit.Search;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,8 +13,11 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Helper;
+using WIDESEA_Core.Util;
using WIDESEA_Core.Utilities;
+using WIDESEA_DTO.Allocate;
using WIDESEA_DTO.Inbound;
+using WIDESEA_DTO.ReturnMES;
using WIDESEA_IInboundService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
@@ -35,8 +40,8 @@
private readonly IRepository<Dt_Task> _taskRepository;
private IStockService _stockService;
private readonly IRepository<Dt_AllocateMaterialInfo> _allocateMaterialInfo;
-
- public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo)
+ private readonly HttpClientHelper _httpClientHelper;
+ public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo, HttpClientHelper httpClientHelper)
{
_unitOfWorkManage = unitOfWorkManage;
InboundOrderDetailService = inboundOrderDetailService;
@@ -49,6 +54,7 @@
_stockService = stockService;
_taskRepository = taskRepository;
_allocateMaterialInfo = allocateMaterialInfo;
+ _httpClientHelper = httpClientHelper;
}
public async Task<WebResponseContent> GroupPallet(GroupPalletDto palletDto)
@@ -319,5 +325,211 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+ public WebResponseContent BatchInOrderFeedbackToMes(string OrderNo)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>()
+ .Where(x => x.InboundOrderNo == OrderNo)
+ .First();
+
+ var inboundOrderDetail = _inboundOrderRepository.Db.Queryable<Dt_InboundOrderDetail>()
+ .Where(x => x.OrderId == inboundOrder.Id && x.OrderDetailStatus==(int)OrderDetailStatusEnum.Over && x.ReturnToMESStatus == 0)
+ .ToList();
+
+ var stocks = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == 6)
+ .Where(it => SqlFunc.Subqueryable<Dt_StockInfoDetail>().Where(s => s.StockId == it.Id && s.OrderNo == OrderNo).Any())
+ .ToList();
+
+ var stockIds = stocks.Select(s => s.Id).ToList();
+
+ var allDetailsData = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>()
+ .Where(x => stockIds.Contains(x.StockId))
+ .ToList();
+
+ var matchedData = inboundOrderDetail
+ .Join(allDetailsData,
+ inbound => inbound.Barcode,
+ stockdetail => stockdetail.Barcode,
+ (inbound, stockdetail) => inbound.Barcode)
+ .ToList();
+
+ var inbounddetailID = inboundOrderDetail
+ .Join(allDetailsData,
+ inbound => inbound.Barcode,
+ stockdetail => stockdetail.Barcode,
+ (inbound, stockdetail) => inbound.Id)
+ .ToList();
+
+ var detail = allDetailsData.Where(x => matchedData.Contains(x.Barcode)).ToList();
+
+ if (inboundOrder.OrderType == (int)InOrderTypeEnum.AllocatInbound)//璋冩嫧鍏ュ簱
+ {
+ var allocate = _inboundOrderRepository.Db.Queryable<Dt_AllocateOrder>().Where(x => x.OrderNo == inboundOrder.InboundOrderNo).First();
+ var allocatefeedmodel = new AllocateDto
+ {
+ ReqCode = Guid.NewGuid().ToString(),
+ ReqTime = DateTime.Now.ToString(),
+ BusinessType = "3",
+ FactoryArea = inboundOrder.FactoryArea,
+ OperationType = 1,
+ Operator = inboundOrder.Operator,
+ OrderNo = inboundOrder.UpperOrderNo,
+ fromWarehouse = allocate?.FromWarehouse ?? "",
+ toWarehouse = allocate?.ToWarehouse ?? "",
+ Details = GetAllocateDtoDetails(detail)
+ };
+
+ if (allocatefeedmodel.Details.Count <= 0)
+ {
+ throw new Exception("鏈壘鍒伴渶瑕佸洖浼犵殑鏁版嵁");
+ }
+
+ var response = responseModel(inboundOrder, 3,null, allocatefeedmodel);
+
+ if (response != null && response.IsSuccess)
+ {
+ _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
+ .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
+ }
+ }
+ else
+ {
+ var feedmodel = new FeedbackInboundRequestModel
+ {
+ reqCode = Guid.NewGuid().ToString(),
+ reqTime = DateTime.Now.ToString(),
+ business_type = inboundOrder.BusinessType,
+ factoryArea = inboundOrder.FactoryArea,
+ operationType = 1,
+ Operator = inboundOrder.Operator,
+ orderNo = inboundOrder.UpperOrderNo,
+ status = inboundOrder.OrderStatus,
+ details = FeedbackInboundDetailsModelDto(detail)
+ };
+
+ if (feedmodel.details.Count<=0)
+ {
+ throw new Exception("鏈壘鍒伴渶瑕佸洖浼犵殑鏁版嵁");
+ }
+ var response = responseModel(inboundOrder, 3, feedmodel);
+
+ if (response != null && response.IsSuccess)
+ {
+ _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
+ .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand();
+ }
+ else
+ {
+ _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 })
+ .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand();
+ return content.Error("鍥炰紶MES澶辫触");
+ }
+ }
+
+ return content.OK("鍥炰紶MES鎴愬姛");
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+ }
+
+ public List<AllocateDtoDetail> GetAllocateDtoDetails(List<Dt_StockInfoDetail> stockInfoDetails)
+ {
+ var groupedData = stockInfoDetails.GroupBy(item => new { item.MaterielCode, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
+ .Select(group => new AllocateDtoDetail
+ {
+ MaterialCode = group.Key.MaterielCode,
+ LineNo = group.Key.InboundOrderRowNo,
+ WarehouseCode = group.Key.WarehouseCode,
+ Qty = group.Sum(x => x.BarcodeQty),
+ Unit = group.Key.BarcodeUnit,
+ Barcodes = group.Select(row => new BarcodeInfo
+ {
+ Barcode = row.Barcode,
+ Qty = row.BarcodeQty,
+ BatchNo = row.BatchNo,
+ SupplyCode = row.SupplyCode,
+ Unit = row.BarcodeUnit
+ }).ToList()
+ }).ToList();
+ return groupedData;
+ }
+ public List<FeedbackInboundDetailsModel> FeedbackInboundDetailsModelDto(List<Dt_StockInfoDetail> stockInfoDetails)
+ {
+ var groupedData = stockInfoDetails.GroupBy(item => new { item.MaterielCode, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
+ .Select(group => new FeedbackInboundDetailsModel
+ {
+ materialCode = group.Key.MaterielCode,
+ lineNo = group.Key.InboundOrderRowNo,
+ warehouseCode = group.Key.WarehouseCode,
+ qty = group.Sum(x => x.BarcodeQty),
+ unit = group.Key.BarcodeUnit,
+ barcodes = group.Select(row => new FeedbackBarcodesModel
+ {
+ barcode = row.Barcode,
+ qty = row.BarcodeQty
+ }).ToList()
+ }).ToList();
+ return groupedData;
+ }
+
+ public HttpResponseResult<MesResponseDTO> responseModel(Dt_InboundOrder order, int InterfaceType, FeedbackInboundRequestModel model = null, AllocateDto allocateDto = null)
+ {
+ HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
+ string reqCode = Guid.NewGuid().ToString();
+ string reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ string requestData = string.Empty;
+ string apiUrl = string.Empty;
+ if (model != null)
+ {
+ apiUrl = AppSettings.GetValue("AldMaterialWarehousing");
+ httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, model.Serialize());
+ requestData = model.Serialize();
+ }
+ else
+ {
+ apiUrl = AppSettings.GetValue("AldAllocationOperation");
+ httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, allocateDto.Serialize());
+ requestData = allocateDto.Serialize();
+ }
+ httpResponseResult.ApiUrl = apiUrl;
+ bool isSuccess = httpResponseResult.IsSuccess && httpResponseResult.Data.Code == "200";
+ string message = "鎴愬姛";
+ if (!isSuccess)
+ {
+ if (!httpResponseResult.IsSuccess)
+ {
+ message = $"MES鎺ュ彛杩斿洖閿欒锛孒TTP浠g爜锛歿httpResponseResult.StatusCode}锛屼俊鎭細{httpResponseResult.ErrorMessage}";
+ }
+ else if (httpResponseResult?.Data?.Code != "200")
+ {
+ message = $"璋冪敤MES鎺ュ彛澶辫触锛屼唬鐮侊細{httpResponseResult?.Data?.Code}锛屼俊鎭細{httpResponseResult?.Data?.Message}";
+ }
+ }
+ Dt_MesReturnRecord mesReturnRecord = new Dt_MesReturnRecord()
+ {
+ ApiUrl = httpResponseResult.ApiUrl,
+ InterfaceType = InterfaceType,
+ OrderId = order.Id,
+ OrderNo = order.InboundOrderNo,
+ RequestCode = reqCode,
+ RequestData = requestData,
+ FailureReason = message,
+ LastReturnTime = DateTime.Now,
+ HttpStatusCode = httpResponseResult.StatusCode.ObjToInt(),
+ ResponseData = httpResponseResult.Content,
+ ReturnType = 0,
+ ReturnCount = 1,
+ ReturnStatus = httpResponseResult.IsSuccess ? 1 : 2,
+ SuccessTime = httpResponseResult.IsSuccess ? DateTime.Now : null
+ };
+ _unitOfWorkManage.Db.Insertable(mesReturnRecord).ExecuteCommand();
+
+ return httpResponseResult;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs"
index 6f5a669..281a65b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs"
@@ -130,7 +130,7 @@
public string BarcodeUnit { get; set; } = null!;
/// <summary>
- /// 鍥炰紶MES
+ /// 鍥炰紶MES 0鏈洖浼� 1宸插洖浼� 2鍥炰紶澶辫触
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
public int ReturnToMESStatus { get; set; } = 0;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
index 73a3a98..c9a5249 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
@@ -39,5 +39,16 @@
{
return await Service.AllcatedGroupPallet(palletDto);
}
+
+ /// <summary>
+ /// 鍏ュ簱鍒嗘壒鍥炰紶MES
+ /// </summary>
+ /// <param name="palletDto"></param>
+ /// <returns></returns>
+ [HttpPost, Route("BatchInOrderFeedbackToMes"), AllowAnonymous]
+ public WebResponseContent BatchInOrderFeedbackToMes(string OrderNo)
+ {
+ return Service.BatchInOrderFeedbackToMes(OrderNo);
+ }
}
}
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$S\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243_V1.04.doc" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$S\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243_V1.04.doc"
new file mode 100644
index 0000000..fcd42e3
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$S\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243_V1.04.doc"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$es\346\216\245\345\217\243\346\226\207\346\241\243.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$es\346\216\245\345\217\243\346\226\207\346\241\243.docx"
new file mode 100644
index 0000000..fcd42e3
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/~$es\346\216\245\345\217\243\346\226\207\346\241\243.docx"
Binary files differ
--
Gitblit v1.9.3