From 3d43ffa3152110b7823f9fa6320c08a6ae02358a Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 10 9月 2025 11:15:40 +0800 Subject: [PATCH] 1、增加 堆垛机运行统计 2、增加po单空物料描述 --- siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs | 30 siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs | 5 SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue | 7 SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue | 7 siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj | 3 SiemensWarehouse/siemens2-site/src/utils/formatTime.js | 180 ++++++ SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue | 9 siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs | 52 - siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs | 18 siemenswmssditcode/wmsService/WMS_TestForm/App.config | 32 siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll | 0 SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue | 308 +++++++++++ siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs | 33 + siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs | 259 +++++++++ SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue | 303 +++++++++++ siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj | 4 siemenswmssditcode/wmsService/wcftest/App.config | 33 siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql | 31 + siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs | 41 + SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue | 4 siemenswmssditcode/wmsService/WMS_UnitTest/App.config | 32 siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs | 13 siemenswmssditcode/wmsService/wcftest/Program.cs | 2 SiemensWarehouse/siemens2-site/src/router/modules/router.js | 28 + siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs | 55 ++ siemenswmssditcode/wmsService/wcftest/wmsService.csproj | 9 SiemensWarehouse/开发帮助文档/常用代码/1、页面增加默认时间查询.txt | 16 siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs | 2 SiemensWarehouse/代码业务逻辑梳理.txt | 3 29 files changed, 1,400 insertions(+), 119 deletions(-) diff --git a/SiemensWarehouse/siemens2-site/src/router/modules/router.js b/SiemensWarehouse/siemens2-site/src/router/modules/router.js index a61f487..081744e 100644 --- a/SiemensWarehouse/siemens2-site/src/router/modules/router.js +++ b/SiemensWarehouse/siemens2-site/src/router/modules/router.js @@ -476,7 +476,8 @@ menu_Id: 1847, menuName: '鍙嶉SAP鏁版嵁澶辫触鏌ヨ' } - },{ + }, + { path: '/stat/inventory/sapdata', component: () => import('@/views/stat/inventory/sapdata'), name: 'sapdata', @@ -486,7 +487,30 @@ menu_Id: 1845, menuName: '鍙嶉SAP鏁版嵁鏌ヨ' } - },{ + }, + { + path: '/stat/inventory/deviceGeneralInfo', + component: () => import('@/views/stat/inventory/deviceGeneralInfo'), + name: 'deviceGeneralInfo', + meta: { + title: 'deviceGeneralInfo', + icon: '', + menu_Id: 1845, + menuName: '鍫嗗灈鏈鸿繍琛岀粺璁�' + } + }, + { + path: '/stat/inventory/purchaseEmptyMaterialCode', + component: () => import('@/views/stat/inventory/purchaseEmptyMaterialCode'), + name: 'purchaseEmptyMaterialCode', + meta: { + title: 'purchaseEmptyMaterialCode', + icon: '', + menu_Id: 1845, + menuName: 'PO鏄庣粏绌虹墿鏂欏彿淇℃伅' + } + }, + { path: '/stat/inventory/early', component: () => import('@/views/stat/inventory/early'), name: 'early', diff --git a/SiemensWarehouse/siemens2-site/src/utils/formatTime.js b/SiemensWarehouse/siemens2-site/src/utils/formatTime.js new file mode 100644 index 0000000..125a411 --- /dev/null +++ b/SiemensWarehouse/siemens2-site/src/utils/formatTime.js @@ -0,0 +1,180 @@ +/** + * 鏃堕棿鏃ユ湡杞崲 + * @param date 褰撳墠鏃堕棿锛宯ew Date() 鏍煎紡 + * @param format 闇�瑕佽浆鎹㈢殑鏃堕棿鏍煎紡瀛楃涓� + * @description format 瀛楃涓查殢鎰忥紝濡� `YYYY-mm銆乊YYY-mm-dd` + * @description format 瀛e害锛�"YYYY-mm-dd HH:MM:SS QQQQ" + * @description format 鏄熸湡锛�"YYYY-mm-dd HH:MM:SS WWW" + * @description format 鍑犲懆锛�"YYYY-mm-dd HH:MM:SS ZZZ" + * @description format 瀛e害 + 鏄熸湡 + 鍑犲懆锛�"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ" + * @returns 杩斿洖鎷兼帴鍚庣殑鏃堕棿瀛楃涓� + */ +export function formatDate(date, format) { + const we = date.getDay(); // 鏄熸湡 + const z = getWeek(date); // 鍛� + const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // 瀛e害 + const opt = { + 'Y+': date.getFullYear().toString(), // 骞� + 'm+': (date.getMonth() + 1).toString(), // 鏈�(鏈堜唤浠�0寮�濮嬶紝瑕�+1) + 'd+': date.getDate().toString(), // 鏃� + 'H+': date.getHours().toString(), // 鏃� + 'M+': date.getMinutes().toString(), // 鍒� + 'S+': date.getSeconds().toString(), // 绉� + 'q+': qut, // 瀛e害 + }; + // 涓枃鏁板瓧 (鏄熸湡) + const week = { + '0': '鏃�', + '1': '涓�', + '2': '浜�', + '3': '涓�', + '4': '鍥�', + '5': '浜�', + '6': '鍏�', + }; + // 涓枃鏁板瓧锛堝搴︼級 + const quarter = { + '1': '涓�', + '2': '浜�', + '3': '涓�', + '4': '鍥�', + }; + if (/(W+)/.test(format)) + format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '鏄熸湡' + week[we] : '鍛�' + week[we]) : week[we]); + if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '绗�' + quarter[qut] + '瀛e害' : quarter[qut]); + if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '绗�' + z + '鍛�' : z + ''); + for (const k in opt) { + const r = new RegExp('(' + k + ')').exec(format); + // 鑻ヨ緭鍏ョ殑闀垮害涓嶄负1锛屽垯鍓嶉潰琛ラ浂 + if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0')); + } + return format; +} + +/** + * 鏃堕棿鏃ユ湡杞崲 + * @param date 褰撳墠鏃堕棿锛宯ew Date() 鏍煎紡 + * @param format 闇�瑕佽浆鎹㈢殑鏃堕棿鏍煎紡瀛楃涓� + * @description format 瀛楃涓查殢鎰忥紝濡� `YYYY-mm銆乊YYY-mm-dd` + * @description format 瀛e害锛�"YYYY-mm-dd HH:MM:SS QQQQ" + * @description format 鏄熸湡锛�"YYYY-mm-dd HH:MM:SS WWW" + * @description format 鍑犲懆锛�"YYYY-mm-dd HH:MM:SS ZZZ" + * @description format 瀛e害 + 鏄熸湡 + 鍑犲懆锛�"YYYY/MM/DD HH:mm:ss WWW QQQQ ZZZ" + * @returns 杩斿洖鎷兼帴鍚庣殑鏃堕棿瀛楃涓� YYYY-MM-DD HH:mm:ss + */ +export function formatDateV2(date, format) { + //debugger + const we = date.getDay(); // 鏄熸湡 + const z = getWeek(date); // 鍛� + const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // 瀛e害 + const opt = { + 'Y+': date.getFullYear().toString(), // 骞� + 'M+': (date.getMonth() + 1).toString(), // 鏈�(鏈堜唤浠�0寮�濮嬶紝瑕�+1) + 'D+': date.getDate().toString(), // 鏃� + 'H+': date.getHours().toString(), // 鏃� + 'm+': date.getMinutes().toString(), // 鍒� + 's+': date.getSeconds().toString(), // 绉� + 'q+': qut, // 瀛e害 + }; + // 涓枃鏁板瓧 (鏄熸湡) + const week = { + '0': '鏃�', + '1': '涓�', + '2': '浜�', + '3': '涓�', + '4': '鍥�', + '5': '浜�', + '6': '鍏�', + }; + // 涓枃鏁板瓧锛堝搴︼級 + const quarter = { + '1': '涓�', + '2': '浜�', + '3': '涓�', + '4': '鍥�', + }; + if (/(W+)/.test(format)) + format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '鏄熸湡' + week[we] : '鍛�' + week[we]) : week[we]); + if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '绗�' + quarter[qut] + '瀛e害' : quarter[qut]); + if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '绗�' + z + '鍛�' : z + ''); + for (const k in opt) { + const r = new RegExp('(' + k + ')').exec(format); + // 鑻ヨ緭鍏ョ殑闀垮害涓嶄负1锛屽垯鍓嶉潰琛ラ浂 + if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0')); + } + return format; +} + +/** + * 鑾峰彇褰撳墠鏃ユ湡鏄鍑犲懆 + * @param dateTime 褰撳墠浼犲叆鐨勬棩鏈熷�� + * @returns 杩斿洖绗嚑鍛ㄦ暟瀛楀�� + */ +export function getWeek(dateTime) { + const temptTime = new Date(dateTime.getTime()); + // 鍛ㄥ嚑 + const weekday = temptTime.getDay() || 7; + // 鍛�1+5澶�=鍛ㄥ叚 + temptTime.setDate(temptTime.getDate() - weekday + 1 + 5); + let firstDay = new Date(temptTime.getFullYear(), 0, 1); + const dayOfWeek = firstDay.getDay(); + let spendDay = 1; + if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1; + firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay); + const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000); + const result = Math.ceil(d / 7); + return result; +} + +/** + * 鏃堕棿闂�欒 + * @param param 褰撳墠鏃堕棿锛宯ew Date() 鏍煎紡 + * @description param 璋冪敤 `formatAxis(new Date())` 杈撳嚭 `涓婂崍濂絗 + * @returns 杩斿洖鎷兼帴鍚庣殑鏃堕棿瀛楃涓� + */ +export function formatAxis(param) { + const hour = new Date(param).getHours(); + if (hour < 6) return '鍑屾櫒濂�'; + else if (hour < 9) return '鏃╀笂濂�'; + else if (hour < 12) return '涓婂崍濂�'; + else if (hour < 14) return '涓崍濂�'; + else if (hour < 17) return '涓嬪崍濂�'; + else if (hour < 19) return '鍌嶆櫄濂�'; + else if (hour < 22) return '鏅氫笂濂�'; + else return '澶滈噷濂�'; +} + +//榛樿璧嬪�� 褰撳墠涓�鍛ㄧ殑鏃堕棿 +export function getThisWeekRange(flag) { + + //鏆傛椂閮借繑鍥炵┖ + //return ["",""]; + + const today = new Date(); + const startOfWeek = new Date(); + // if(flag==1){//琛ㄧず瑕佹煡7澶╁唴鏁版嵁 + // //startOfWeek.setDate(today.getDate() -6); // 鍑忓幓浠婂ぉ鏄竴鍛ㄧ殑绗嚑澶╋紝寰楀埌鍛ㄤ竴鐨勬棩鏈焥tartOfWeek + // startOfWeek.setDate(today.getDate() -2); // 鍑忓幓浠婂ぉ鏄竴鍛ㄧ殑绗嚑澶╋紝寰楀埌鍛ㄤ竴鐨勬棩鏈焥tartOfWeek + // } + startOfWeek.setDate(today.getDate() - flag); // 鍑忓幓浠婂ぉ鏄竴鍛ㄧ殑绗嚑澶╋紝寰楀埌鍛ㄤ竴鐨勬棩鏈焥tartOfWeek + startOfWeek.setHours(0, 0, 0, 0); // 璁剧疆鏃躲�佸垎銆佺鍜屾绉掓暟 + + const endOfWeek = new Date(today); + endOfWeek.setDate(endOfWeek.getDate() + 1); + //endOfWeek.setHours(23, 59, 59, 999); // 璁剧疆鏃躲�佸垎銆佺鍜屾绉掓暟 + endOfWeek.setHours(0, 0, 0, 0); // 璁剧疆鏃躲�佸垎銆佺鍜屾绉掓暟 + + + //return [moment(startOfWeek,"YYYY-MM-DD HH:mm"), moment(endOfWeek,"YYYY-MM-DD HH:mm")]; + //return [moment(startOfWeek), moment(endOfWeek)]; + + // const startStr = formatDateV2(startOfWeek,'YYYY-MM-DD HH:mm:ss'); + // const endStr = formatDateV2(endOfWeek,'YYYY-MM-DD HH:mm:ss'); + //return [new Date(startStr), new Date(endStr)]; + // const startStr = formatDateV2(startOfWeek, 'yyyy-MM-dd HH:mm:ss'); + // const endStr = formatDateV2(endOfWeek, 'yyyy-MM-dd HH:mm:ss'); + // return [startStr, endStr]; + // 鉁� 鐩存帴杩斿洖 Date 瀵硅薄鐨勬暟缁� + return [startOfWeek, endOfWeek]; + //*/ +} diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue new file mode 100644 index 0000000..9dfcb09 --- /dev/null +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue @@ -0,0 +1,303 @@ +锘�<template> + <!-- 闈㈠寘灞戝鑸尯 --> + <div class="indexs"> + <el-card> + <el-row> + <el-button type="success" plain @click="exportExcel" >瀵煎嚭Excel</el-button> + <el-date-picker + v-model="datatime" + size="large" + type="datetimerange" + value-format="yyyy-MM-dd HH:mm:ss" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + > + </el-date-picker> + <el-button type="success" plain @click="find(1)" >鏌ヨ</el-button> + <el-button type="info" plain @click="reset" >閲嶇疆</el-button> + </el-row> + <!-- 鏄剧ず浜哄憳鍒楄〃 --> + <el-table ref= "table" :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe > + <el-table-column + type="selection" + width="55"> + </el-table-column> + <el-table-column + label="搴忓彿" + type="index" + width="50"> + </el-table-column> + <el-table-column label="杩愯鏃堕棿(鍒嗛挓)" prop="deviceRunTime" width="220"></el-table-column> + <el-table-column label="鎶ヨ鏃堕棿(鍒嗛挓)" prop="deviceAlarmTime" width="220"></el-table-column> + <el-table-column label="绛夊緟鏃堕棿(鍒嗛挓)" prop="deviceWaitTime" width="220"></el-table-column> + <el-table-column label="鏃堕棿" prop="createTime" width="170" :formatter="formatterDateTime" ></el-table-column> + </el-table> + <el-pagination + :current-page="queryInfo.pagenum" + :page-sizes="[5,10, 15, 20,50,100,1000,10000]" + :page-size="queryInfo.pagesize" + :total="total" + layout="total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + > + </el-pagination> + </el-card> + + </div> +</template> +<script> +import { parseTime,formatDate } from '@/utils' +import { getThisWeekRange} from '@/utils/formatTime.js' +export default { + data() { + return { + tableHeight:window.innerHeight-204, + searchParam: { + materialName: null, + materialCode: null, + SalesOrder: null + }, + queryInfo: { + // 褰撳墠椤� + pagenum: 1, + // 姣忛〉鏄剧ず澶氬皯鏉′俊鎭痵 + pagesize: 10 + }, + + TakeStocklist: [], + TakeStocklistAll: [], + total: 0, + datatime: '', + selectType: [ + { value: '1', label: '鍑哄簱' }, { value: '2', label: '绉诲簱' }, { value: '3', label: '鏀惰揣' }, { value: '4', label: '鎸夊嚟璇侀��璐�' }], + selectTypeValue: '', + dialogFormVisible: false, + productList: [], + updateDate: null + } + }, + created() {}, + mounted() { + this.initTimeData(); + this.find(1) + }, + methods: { + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(30);//鍚敤浜� + }, + // 鏃堕棿杞崲 + formatterDateTime (row, column, cellValue, index) { + if (cellValue === null || cellValue === '') { + return '' + } + var NewDtime = new Date(cellValue) + return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss') + }, + + // 鐩戝惉 pagesize 鏀瑰彉 + handleSizeChange(newSizd) { + this.queryInfo.pagesize = newSizd + this.queryInfo.pagenum = 1 + this.find(1) + }, + // 鐩戝惉 椤电爜鍊兼敼鍙� + handleCurrentChange(newpage) { + this.queryInfo.pagenum = newpage + + this.find(2) + }, + userStatusChange(userinfo) { + console.log(userinfo) + }, + getSummaries(param) { + const { columns, data } = param + const sums = [] + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '鍚堣' + return + } + if (index != 5) { + sums[index] = '' + return + } + const values = data.map(item => Number(item[column.property])) + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr) + if (!isNaN(value)) { + return prev + curr + } else { + return prev + } + }, 0) + sums[index] += ' ' + } else { + sums[index] = 'N/A' + } + sums[index] = Number(sums[index]).toFixed(2) + }) + + return sums + }, + + formatJson(filterVal, jsonData) { + return jsonData.map(v => + filterVal.map(j => { + if (j === 'createTime') { + return parseTime(v[j]) + } + else if (j === 'moveType') { + return this.setMoveTypeStr(v[j]) + } + else if (j === 'isFinish') { + return this.setIsFinishStr(v[j]) + } else { + return v[j] + } + }) + ) + }, + find(ischang = 1) { + if (ischang == 1) { + this.queryInfo.pagenum = 1 + } + const url = '/api/task/queryPageDeviceGeneralInfo' + const params = { + search: this.searchParam, + queryInfo: this.queryInfo, //鍒嗛〉 + positionTypeValue: this.selectTypeValue, //涓嬫媺妗嗙殑鍊� + datatime: this.datatime, //鏃ユ湡 + alarmValue: 1 + } + var callback = res => { + //debugger + if (res.result === true) { + res.data.forEach(item => { + item.moveType =this.setMoveTypeStr(item.moveType) + item.isFinish =this.setIsFinishStr(item.isFinish) + }) + + this.TakeStocklist = res.data + this.TakeStocklistAll = res.data2 + this.total = res.countPrint + } else { + this.TakeStocklist = [] + this.TakeStocklistAll = [] + this.total = 0 + return this.$message.success('褰撳墠鏉′欢 鏌ヤ笉鍒版暟鎹�!') + } + } + this.common.ajax(url, params, callback, true) + }, + find_export(ischang = 1) { + if (ischang == 1) { + this.queryInfo.pagenum = 1 + } + const url = '/api/task/queryPageDeviceGeneralInfo' + const params = { + IsLoadAllData:true,//鍔犺浇鍏ㄩ儴 + search: this.searchParam, + queryInfo: this.queryInfo, //鍒嗛〉 + positionTypeValue: this.selectTypeValue, //涓嬫媺妗嗙殑鍊� + datatime: this.datatime, //鏃ユ湡 + alarmValue: 1 + } + var callback = res => { + //debugger + if (res.result === true) { + res.data2.forEach(item => { + item.moveType =this.setMoveTypeStr(item.moveType) + item.isFinish =this.setIsFinishStr(item.isFinish) + }) + this.TakeStocklistAll = res.data2 + this.do_exportExcel() + } else { + this.TakeStocklistAll = [] + return this.$message.success('褰撳墠鏉′欢 鏌ヤ笉鍒版暟鎹�!') + } + } + this.common.ajax(url, params, callback, true) + }, + do_exportExcel() { + // import("@/vendor/Export2Excel") + this.downloadLoading = true + import('@/vendor/Export2Excel').then(excel => { + const tHeader = ['杩愯鏃堕棿(鍒嗛挓)', '鎶ヨ鏃堕棿(鍒嗛挓)', '绛夊緟鏃堕棿(鍒嗛挓)','鏃堕棿'] + const filterVal = ['deviceRunTime', 'deviceAlarmTime', 'deviceWaitTime', 'createTime'] + const data = this.formatJson(filterVal, this.TakeStocklistAll) + excel.export_json_to_excel({ + header: tHeader, + data, + filename: '鍫嗗灈鏈鸿繍琛岀粺璁�' + }) + this.downloadLoading = false + }) + }, + exportExcel() { + this.find_export(1) + }, + setMoveTypeStr(moveType){ + if (moveType === 1) return'鍑哄簱' + if (moveType === 2) return '绉诲簱' + if (moveType === 3) return '鏀惰揣' + if (moveType === 4) return '鎸夊嚟璇侀��璐�' + return '' + }, + setIsFinishStr(isFinish){ + if (isFinish === 1) { + return '宸插畬鎴�' + }else{ + return '鏈畬鎴�' + } + }, + reset() { + this.searchParam.materialName = null + this.searchParam.materialCode = null + this.searchParam.SalesOrder = null + this.selectTypeValue = '' + this.datatime = '' + this.initTimeData();//閲嶇疆鏃堕棿 + this.find() + } + } +} +</script> +<style lang="postcss" scoped> +.el-table .el-pagination { + margin-top: 10px; + line-height: 30px; + margin-bottom: 0%; +} +.el-row { + text-align: left; +} +.selectValues { + width: 420px; +} +.search { + width: 200px; +} +.selectTypeValue { + width: 150px; +} +.el-card { + padding: 0%; + margin-bottom: 0%; + /* 84 = navbar + tags-view = 50 +34 */ + max-height: calc(100vh - 104px); +} +thead .el-table-column--selection .cell { + display: none; +} +.el-scrollbar{ + .el-scrollbar__bar.is-vertical { + opacity: 1;/* 鏀逛负0涓嶆樉绀烘粴鍔ㄦ潯*/ + width:5; + } + } + +</style> diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue index 87b029b..3751a0c 100644 --- a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue @@ -15,7 +15,7 @@ <el-input v-model="searchParam.materialName" placeholder="鐗╂枡鍚嶇О" class="search"></el-input> <el-input v-model="searchParam.materialCode" placeholder="鐗╂枡缂栧彿" class="search"></el-input> <el-input v-model="searchParam.tranckNnmber" placeholder="璺熻釜鍙�" class="search"></el-input> - <el-date-picker + <!-- <el-date-picker v-model="datatime" size="large" type="datetimerange" @@ -24,7 +24,7 @@ start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" > - </el-date-picker> + </el-date-picker> --> <el-button type="success" plain @click="find(1)" >鏌ヨ</el-button> <el-button type="info" plain @click="reset" >閲嶇疆</el-button> </el-row> diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue index 7a39fb7..f3e20d9 100644 --- a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue @@ -3,7 +3,7 @@ <div class="indexs"> <el-card> <el-row> - <el-button type="success" plain @click="exportExcel" >瀵煎嚭鏈〉Excel</el-button> + <el-button type="success" plain @click="exportExcel" >瀵煎嚭Excel</el-button> <el-button type="danger" @click="openAlarm">璁惧寮傚父鎶ヨ缁熻</el-button> <el-select v-model="selectTypeValue" placeholder="閫夋嫨璁惧鍚嶇О" class="selectTypeValue" @change="selectChang"> <el-option @@ -82,6 +82,7 @@ <script> import { parseTime } from '@/utils' import { getDate } from '@/utils/dateTime' +import { getThisWeekRange} from '@/utils/formatTime.js' export default { data() { return { @@ -114,9 +115,14 @@ }, created() {}, mounted() { + this.initTimeData(); this.find() }, methods: { + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(30);//鍚敤浜� + }, // 鐩戝惉 pagesize 鏀瑰彉 handleSizeChange(newSizd) { this.queryInfo.pagesize = newSizd @@ -269,6 +275,7 @@ this.queryInfo.pagenum = 1 this.pagesize = 10 this.datatime = '' + this.initTimeData();//閲嶇疆鏃堕棿 this.find() }, resetChild() { diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue new file mode 100644 index 0000000..60cf044 --- /dev/null +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue @@ -0,0 +1,308 @@ +锘�<template> + <!-- 闈㈠寘灞戝鑸尯 --> + <div class="indexs"> + <el-card> + <el-row> + <el-button type="success" plain @click="exportExcel" >瀵煎嚭Excel</el-button> + <el-input v-model="searchParam.PoCode" placeholder="PO鍗曞彿" class="search"></el-input> + <el-input v-model="searchParam.ProductName" placeholder="鐗╂枡鍚嶇О" class="search"></el-input> + <el-input v-model="searchParam.ItemNumber" placeholder="椤瑰彿" class="search"></el-input> + <el-date-picker + v-model="datatime" + size="large" + type="datetimerange" + value-format="yyyy-MM-dd HH:mm:ss" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + > + </el-date-picker> + <el-button type="success" plain @click="find(1)" >鏌ヨ</el-button> + <el-button type="info" plain @click="reset" >閲嶇疆</el-button> + </el-row> + <!-- 鏄剧ず浜哄憳鍒楄〃 --> + <el-table ref= "table" :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe > + <el-table-column + type="selection" + width="55"> + </el-table-column> + <el-table-column + label="搴忓彿" + type="index" + width="50"> + </el-table-column> + <el-table-column label="PO鍗曞彿" prop="PoCode" width="200"></el-table-column> + <el-table-column label="鐗╂枡鍚嶇О" prop="ProductName" width="300" ></el-table-column> + <el-table-column label="椤瑰彿" prop="ItemNumber" width="300" ></el-table-column> + <el-table-column label="鏃堕棿" prop="CreateTime" width="170" :formatter="formatterDateTime" ></el-table-column> + <el-table-column label="澶囨敞" prop="Remark" width="120"></el-table-column> + </el-table> + <el-pagination + :current-page="queryInfo.pagenum" + :page-sizes="[5,10, 15, 20,50,100,1000,10000]" + :page-size="queryInfo.pagesize" + :total="total" + layout="total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + > + </el-pagination> + </el-card> + + </div> +</template> +<script> +import { parseTime,formatDate} from '@/utils' +import { getThisWeekRange} from '@/utils/formatTime.js' + +export default { + data() { + return { + tableHeight:window.innerHeight-204, + searchParam: { + ProductName: null, + MaterialCode: null, + ItemNumber: null + }, + queryInfo: { + // 褰撳墠椤� + pagenum: 1, + // 姣忛〉鏄剧ず澶氬皯鏉′俊鎭痵 + pagesize: 10 + }, + + TakeStocklist: [], + TakeStocklistAll: [], + total: 0, + datatime: '', + selectType: [ + { value: '1', label: '鍑哄簱' }, { value: '2', label: '绉诲簱' }, { value: '3', label: '鏀惰揣' }, { value: '4', label: '鎸夊嚟璇侀��璐�' }], + selectTypeValue: '', + dialogFormVisible: false, + productList: [], + updateDate: null + } + }, + created() {}, + mounted() { + this.initTimeData(); + this.find(1) + }, + methods: { + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(30);//鍚敤浜� + }, + // 鏃堕棿杞崲 + formatterDateTime (row, column, cellValue, index) { + if (cellValue === null || cellValue === '') { + return '' + } + var NewDtime = new Date(cellValue) + return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss') + }, + + // 鐩戝惉 pagesize 鏀瑰彉 + handleSizeChange(newSizd) { + this.queryInfo.pagesize = newSizd + this.queryInfo.pagenum = 1 + this.find(1) + }, + // 鐩戝惉 椤电爜鍊兼敼鍙� + handleCurrentChange(newpage) { + this.queryInfo.pagenum = newpage + + this.find(2) + }, + userStatusChange(userinfo) { + console.log(userinfo) + }, + getSummaries(param) { + const { columns, data } = param + const sums = [] + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '鍚堣' + return + } + if (index != 5) { + sums[index] = '' + return + } + const values = data.map(item => Number(item[column.property])) + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr) + if (!isNaN(value)) { + return prev + curr + } else { + return prev + } + }, 0) + sums[index] += ' ' + } else { + sums[index] = 'N/A' + } + sums[index] = Number(sums[index]).toFixed(2) + }) + + return sums + }, + + formatJson(filterVal, jsonData) { + return jsonData.map(v => + filterVal.map(j => { + if (j === 'CreateTime') { + return parseTime(v[j]) + } + else if (j === 'moveType') { + return this.setMoveTypeStr(v[j]) + } + else if (j === 'isFinish') { + return this.setIsFinishStr(v[j]) + } else { + return v[j] + } + }) + ) + }, + find(ischang = 1) { + if (ischang == 1) { + this.queryInfo.pagenum = 1 + } + const url = '/api/task/queryPagePurchaseEmptyMaterialCode' + const params = { + search: this.searchParam, + queryInfo: this.queryInfo, //鍒嗛〉 + positionTypeValue: this.selectTypeValue, //涓嬫媺妗嗙殑鍊� + datatime: this.datatime, //鏃ユ湡 + alarmValue: 1 + } + var callback = res => { + //debugger + if (res.result === true) { + res.data.forEach(item => { + item.moveType =this.setMoveTypeStr(item.moveType) + item.isFinish =this.setIsFinishStr(item.isFinish) + }) + + this.TakeStocklist = res.data + this.TakeStocklistAll = res.data2 + this.total = res.countPrint + } else { + this.TakeStocklist = [] + this.TakeStocklistAll = [] + this.total = 0 + return this.$message.success('褰撳墠鏉′欢 鏌ヤ笉鍒版暟鎹�!') + } + } + this.common.ajax(url, params, callback, true) + }, + find_export(ischang = 1) { + if (ischang == 1) { + this.queryInfo.pagenum = 1 + } + const url = '/api/task/queryPagePurchaseEmptyMaterialCode' + const params = { + IsLoadAllData:true,//鍔犺浇鍏ㄩ儴 + search: this.searchParam, + queryInfo: this.queryInfo, //鍒嗛〉 + positionTypeValue: this.selectTypeValue, //涓嬫媺妗嗙殑鍊� + datatime: this.datatime, //鏃ユ湡 + alarmValue: 1 + } + var callback = res => { + //debugger + if (res.result === true) { + res.data2.forEach(item => { + item.moveType =this.setMoveTypeStr(item.moveType) + item.isFinish =this.setIsFinishStr(item.isFinish) + }) + this.TakeStocklistAll = res.data2 + this.do_exportExcel() + } else { + this.TakeStocklistAll = [] + return this.$message.success('褰撳墠鏉′欢 鏌ヤ笉鍒版暟鎹�!') + } + } + this.common.ajax(url, params, callback, true) + }, + do_exportExcel() { + // import("@/vendor/Export2Excel") + this.downloadLoading = true + import('@/vendor/Export2Excel').then(excel => { + const tHeader = ['PO鍗曞彿', '鐗╂枡鍚嶇О', '椤瑰彿', '鏃堕棿','澶囨敞'] + const filterVal = ['PoCode', 'ProductName', 'ItemNumber', 'CreateTime', 'Remark'] + const data = this.formatJson(filterVal, this.TakeStocklistAll) + excel.export_json_to_excel({ + header: tHeader, + data, + filename: 'PO鏄庣粏绌虹墿鏂欏彿淇℃伅' + }) + this.downloadLoading = false + }) + }, + exportExcel() { + this.find_export(1) + }, + setMoveTypeStr(moveType){ + if (moveType === 1) return'鍑哄簱' + if (moveType === 2) return '绉诲簱' + if (moveType === 3) return '鏀惰揣' + if (moveType === 4) return '鎸夊嚟璇侀��璐�' + return '' + }, + setIsFinishStr(isFinish){ + if (isFinish === 1) { + return '宸插畬鎴�' + }else{ + return '鏈畬鎴�' + } + }, + reset() { + this.searchParam.ProductName = null + this.searchParam.MaterialCode = null + this.searchParam.ItemNumber = null + this.selectTypeValue = '' + this.datatime = '' + this.initTimeData();//閲嶇疆鏃堕棿 + this.find() + } + } +} +</script> +<style lang="postcss" scoped> +.el-table .el-pagination { + margin-top: 10px; + line-height: 30px; + margin-bottom: 0%; +} +.el-row { + text-align: left; +} +.selectValues { + width: 420px; +} +.search { + width: 200px; +} +.selectTypeValue { + width: 150px; +} +.el-card { + padding: 0%; + margin-bottom: 0%; + /* 84 = navbar + tags-view = 50 +34 */ + max-height: calc(100vh - 104px); +} +thead .el-table-column--selection .cell { + display: none; +} +.el-scrollbar{ + .el-scrollbar__bar.is-vertical { + opacity: 1;/* 鏀逛负0涓嶆樉绀烘粴鍔ㄦ潯*/ + width:5; + } + } + +</style> diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue index d230286..537cb81 100644 --- a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue @@ -70,6 +70,7 @@ </template> <script> import { parseTime,formatDate } from '@/utils' +import { getThisWeekRange} from '@/utils/formatTime.js' export default { data() { return { @@ -100,9 +101,14 @@ }, created() {}, mounted() { + this.initTimeData(); this.find(1) }, methods: { + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(60);//鍚敤浜� + }, // 鏃堕棿杞崲 formatterDateTime (row, column, cellValue, index) { if (cellValue === null || cellValue === '') { @@ -275,6 +281,7 @@ this.searchParam.SalesOrder = null this.selectTypeValue = '' this.datatime = '' + this.initTimeData();//閲嶇疆鏃堕棿 this.find() } } diff --git a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue index e5d03fd..1705dfd 100644 --- a/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue +++ b/SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue @@ -76,6 +76,7 @@ </template> <script> import { parseTime,formatDate } from '@/utils' +import { getThisWeekRange} from '@/utils/formatTime.js' export default { data() { return { @@ -107,9 +108,14 @@ }, created() {}, mounted() { + this.initTimeData(); this.find(1) }, methods: { + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(60);//鍚敤浜� + }, // 鏃堕棿杞崲 formatterDateTime (row, column, cellValue, index) { if (cellValue === null || cellValue === '') { @@ -259,6 +265,7 @@ this.searchParam.purchaseCode = null this.selectTypeValue = '' this.datatime = '' + this.initTimeData();//閲嶇疆鏃堕棿 this.find() } } diff --git "a/SiemensWarehouse/\344\273\243\347\240\201\344\270\232\345\212\241\351\200\273\350\276\221\346\242\263\347\220\206.txt" "b/SiemensWarehouse/\344\273\243\347\240\201\344\270\232\345\212\241\351\200\273\350\276\221\346\242\263\347\220\206.txt" index fe6a96a..2f8b121 100644 --- "a/SiemensWarehouse/\344\273\243\347\240\201\344\270\232\345\212\241\351\200\273\350\276\221\346\242\263\347\220\206.txt" +++ "b/SiemensWarehouse/\344\273\243\347\240\201\344\270\232\345\212\241\351\200\273\350\276\221\346\242\263\347\220\206.txt" @@ -1,3 +1,6 @@ +0銆佽幏鍙朠O鍗曟祦绋� + 鐣岄潰涓婅緭鍏� po鍗曞彿=銆嬭皟鐢╳cftest鎺ュ彛getPoList=銆嬭皟鐢╯ap鎺ュ彛 GetPurchaseOrder=銆嬪啓鍏ュ埌wms琛ㄣ�� + 1銆佸叆搴撴祦绋� 锛�1锛夋敹璐э紝杈撳叆閲囪喘鍗曞彿鍜岄」鍙凤紝璋冪敤鎺ュ彛 inbound/inScan/getData鏌ヨ锛屾煡璇㈣繖涓」鍙峰緟鏀跺灏戯紝宸叉敹澶氬皯銆� 锛�2锛夌偣鍑绘寜閽�愮‘璁ゃ�戯紝璇锋眰鎺ュ彛receiptConvert锛� diff --git "a/SiemensWarehouse/\345\274\200\345\217\221\345\270\256\345\212\251\346\226\207\346\241\243/\345\270\270\347\224\250\344\273\243\347\240\201/1\343\200\201\351\241\265\351\235\242\345\242\236\345\212\240\351\273\230\350\256\244\346\227\266\351\227\264\346\237\245\350\257\242.txt" "b/SiemensWarehouse/\345\274\200\345\217\221\345\270\256\345\212\251\346\226\207\346\241\243/\345\270\270\347\224\250\344\273\243\347\240\201/1\343\200\201\351\241\265\351\235\242\345\242\236\345\212\240\351\273\230\350\256\244\346\227\266\351\227\264\346\237\245\350\257\242.txt" new file mode 100644 index 0000000..9a6abac --- /dev/null +++ "b/SiemensWarehouse/\345\274\200\345\217\221\345\270\256\345\212\251\346\226\207\346\241\243/\345\270\270\347\224\250\344\273\243\347\240\201/1\343\200\201\351\241\265\351\235\242\345\242\236\345\212\240\351\273\230\350\256\244\346\227\266\351\227\264\346\237\245\350\257\242.txt" @@ -0,0 +1,16 @@ +import { getThisWeekRange} from '@/utils/formatTime.js' + + + initTimeData(){ + this.datatime= ''; + this.datatime= getThisWeekRange(30);//鍚敤浜� + }, + + +1銆佸湪mounted鏂规硶涓紝find鍓嶉潰璋冪敤鏂规硶 + this.initTimeData(); + this.find(1) + +2銆佸湪 reset 鏂规硶涓皟鐢� +this.initTimeData();//閲嶇疆鏃堕棿 + this.find() diff --git a/siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql b/siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql index 7ff15f6..38ae33c 100644 --- a/siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql +++ b/siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql @@ -255,4 +255,35 @@ GO +use YrtWMS_Siemens2; +go + +/*==============================================================*/ +/* Table: Purchase_OrderList_EmptyMaterialCode */ +/* Description: PO鏄庣粏绌虹墿鏂欏彿琛� */ +/* Author:shaocx */ +/* CreateTime:2025-09-09 */ +/*==============================================================*/ +IF NOT EXISTS( SELECT 1 FROM SYSOBJECTS WHERE ID = OBJECT_ID('Purchase_OrderList_EmptyMaterialCode') AND TYPE = 'U') +create table Purchase_OrderList_EmptyMaterialCode ( + ID bigint NOT NULL, -- 涓婚敭 + + PoCode nvarchar(50) null,-- 閲囪喘鍗曞彿 + ProductName nvarchar(500) null,-- 鐗╂枡鍚嶇О + Quantity decimal null, -- 鏁伴噺 + ItemNumber nvarchar(50) null,-- 椤瑰彿 + BatchNumber nvarchar(50) null,-- 鎵规鍙� + + Remark nvarchar(2000) null, -- 澶囨敞 + + Creator varchar(128) null,-- 鍒涘缓浜� + CreateTime datetime null,-- 鍒涘缓鏃堕棿 + LastModifier varchar(128) null,-- 淇敼浜� + LastModifyTime datetime null -- 淇敼鏃堕棿 + + constraint PK_Purchase_OrderList_EmptyMaterialCode_Id primary key (ID) +) +GO + + diff --git a/siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll b/siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll new file mode 100644 index 0000000..6c614bd --- /dev/null +++ b/siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll Binary files differ diff --git a/siemenswmssditcode/wmsService/WMS_TestForm/App.config b/siemenswmssditcode/wmsService/WMS_TestForm/App.config index fc130cc..3ecd320 100644 --- a/siemenswmssditcode/wmsService/WMS_TestForm/App.config +++ b/siemenswmssditcode/wmsService/WMS_TestForm/App.config @@ -1,29 +1,25 @@ -锘�<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections></configSections> <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> </startup> <system.serviceModel> <bindings> <basicHttpBinding> - <binding name="BasicHttpBinding_IControlCenterWcfService" /> - <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> + <binding name="BasicHttpBinding_IControlCenterWcfService"/> + <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> </basicHttpBinding> </bindings> <client> - <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" - contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> - <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" - contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> + <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> + <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> </client> <behaviors> <serviceBehaviors> <behavior name=""> - <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> - <serviceDebug includeExceptionDetailInFaults="false" /> + <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> + <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> @@ -31,13 +27,13 @@ <service name="wcftest.wcf.apitest"> <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest"> <identity> - <dns value="localhost" /> + <dns value="localhost"/> </identity> </endpoint> - <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> + <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> - <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" /> + <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/> <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />--> </baseAddresses> </host> @@ -45,14 +41,14 @@ </services> </system.serviceModel> <connectionStrings> - <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> - <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> </connectionStrings> <appSettings> <!--鏄惁鏄櫄鎷熶豢鐪熸ā寮�,true:鏄紝false锛氬惁銆傜敓浜х幆澧冭閰嶇疆涓篺alse 銆怑ditBy shaocx,2022-01-27銆�--> <add key="IsVirtualMode" value="true"/> </appSettings> -</configuration> \ No newline at end of file +</configuration> diff --git a/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs b/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs index 6a7ee09..666132f 100644 --- a/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs +++ b/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ 锘�//------------------------------------------------------------------------------ // <auto-generated> // 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� -// 杩愯鏃剁増鏈�: 4.0.30319.42000 +// 杩愯鏃剁増鏈�:4.0.30319.42000 // // 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢涓㈠け銆� +// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� // </auto-generated> //------------------------------------------------------------------------------ -namespace WMS_TestForm.Properties -{ - - +namespace WMS_TestForm.Properties { + using System; + + /// <summary> /// 涓�涓己绫诲瀷鐨勮祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲鐨勫瓧绗︿覆绛夈�� /// </summary> @@ -22,48 +22,40 @@ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// <summary> - /// 杩斿洖姝ょ被浣跨敤鐨勩�佺紦瀛樼殑 ResourceManager 瀹炰緥銆� + /// 杩斿洖姝ょ被浣跨敤鐨勭紦瀛樼殑 ResourceManager 瀹炰緥銆� /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WMS_TestForm.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// <summary> - /// 涓烘墍鏈夎祫婧愭煡鎵鹃噸鍐欏綋鍓嶇嚎绋嬬殑 CurrentUICulture 灞炴�э紝 - /// 鏂规硶鏄娇鐢ㄦ寮虹被鍨嬭祫婧愮被銆� + /// 浣跨敤姝ゅ己绫诲瀷璧勬簮绫伙紝涓烘墍鏈夎祫婧愭煡鎵� + /// 閲嶅啓褰撳墠绾跨▼鐨� CurrentUICulture 灞炴�с�� /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs b/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs index 31f41b1..212de06 100644 --- a/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs +++ b/siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ 锘�//------------------------------------------------------------------------------ // <auto-generated> -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// 杩愯鏃剁増鏈�:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� +// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� // </auto-generated> //------------------------------------------------------------------------------ -namespace WMS_TestForm.Properties -{ - - +namespace WMS_TestForm.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj b/siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj index 940af08..4cef43f 100644 --- a/siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj +++ b/siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj @@ -9,8 +9,9 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>WMS_TestForm</RootNamespace> <AssemblyName>WMS_TestForm</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> @@ -74,6 +75,7 @@ <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> </Compile> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> diff --git a/siemenswmssditcode/wmsService/WMS_UnitTest/App.config b/siemenswmssditcode/wmsService/WMS_UnitTest/App.config index fc130cc..3ecd320 100644 --- a/siemenswmssditcode/wmsService/WMS_UnitTest/App.config +++ b/siemenswmssditcode/wmsService/WMS_UnitTest/App.config @@ -1,29 +1,25 @@ -锘�<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections></configSections> <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> </startup> <system.serviceModel> <bindings> <basicHttpBinding> - <binding name="BasicHttpBinding_IControlCenterWcfService" /> - <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> + <binding name="BasicHttpBinding_IControlCenterWcfService"/> + <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> </basicHttpBinding> </bindings> <client> - <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" - contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> - <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" - contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> + <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> + <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> </client> <behaviors> <serviceBehaviors> <behavior name=""> - <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> - <serviceDebug includeExceptionDetailInFaults="false" /> + <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> + <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> @@ -31,13 +27,13 @@ <service name="wcftest.wcf.apitest"> <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest"> <identity> - <dns value="localhost" /> + <dns value="localhost"/> </identity> </endpoint> - <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> + <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> - <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" /> + <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/> <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />--> </baseAddresses> </host> @@ -45,14 +41,14 @@ </services> </system.serviceModel> <connectionStrings> - <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> - <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> </connectionStrings> <appSettings> <!--鏄惁鏄櫄鎷熶豢鐪熸ā寮�,true:鏄紝false锛氬惁銆傜敓浜х幆澧冭閰嶇疆涓篺alse 銆怑ditBy shaocx,2022-01-27銆�--> <add key="IsVirtualMode" value="true"/> </appSettings> -</configuration> \ No newline at end of file +</configuration> diff --git a/siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj b/siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj index 7269052..413cb3a 100644 --- a/siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj +++ b/siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj @@ -8,7 +8,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>WMS_UnitTest</RootNamespace> <AssemblyName>WMS_UnitTest</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> @@ -16,6 +16,7 @@ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> <IsCodedUITest>False</IsCodedUITest> <TestProjectType>UnitTest</TestProjectType> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> diff --git a/siemenswmssditcode/wmsService/wcftest/App.config b/siemenswmssditcode/wmsService/wcftest/App.config index 07b6705..3ecd320 100644 --- a/siemenswmssditcode/wmsService/wcftest/App.config +++ b/siemenswmssditcode/wmsService/wcftest/App.config @@ -1,30 +1,25 @@ -锘�<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections></configSections> <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> </startup> <system.serviceModel> <bindings> <basicHttpBinding> - <binding name="BasicHttpBinding_IControlCenterWcfService" /> - <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" - maxReceivedMessageSize="2147483647" /> + <binding name="BasicHttpBinding_IControlCenterWcfService"/> + <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> </basicHttpBinding> </bindings> <client> - <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" - contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> - <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" - binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" - contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> + <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> + <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> </client> <behaviors> <serviceBehaviors> <behavior name=""> - <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> - <serviceDebug includeExceptionDetailInFaults="false" /> + <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> + <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> @@ -32,13 +27,13 @@ <service name="wcftest.wcf.apitest"> <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest"> <identity> - <dns value="localhost" /> + <dns value="localhost"/> </identity> </endpoint> - <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> + <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> - <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" /> + <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/> <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />--> </baseAddresses> </host> @@ -46,14 +41,14 @@ </services> </system.serviceModel> <connectionStrings> - <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> - <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> </connectionStrings> <appSettings> <!--鏄惁鏄櫄鎷熶豢鐪熸ā寮�,true:鏄紝false锛氬惁銆傜敓浜х幆澧冭閰嶇疆涓篺alse 銆怑ditBy shaocx,2022-01-27銆�--> <add key="IsVirtualMode" value="true"/> </appSettings> -</configuration> \ No newline at end of file +</configuration> diff --git a/siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs b/siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs index a1176e4..48e41dd 100644 --- a/siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs +++ b/siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs @@ -19,7 +19,7 @@ //妯℃嫙鐜涓嬶紝璁や负鎶涘嚭寮傚父 //鍦ㄦ祴璇曠幆澧冧笅锛屼綘鍙互灞忚斀璇ヤ唬鐮� //鍙戝竷鍒扮敓浜х幆澧冿紝璇锋墦寮�璇ヤ唬鐮� - throw new Exception("姝ゆ鏄ā鎷熺幆澧冿紒璀﹀憡"); + //throw new Exception("姝ゆ鏄ā鎷熺幆澧冿紒璀﹀憡"); } } } diff --git a/siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs b/siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs new file mode 100644 index 0000000..7b0970f --- /dev/null +++ b/siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs @@ -0,0 +1,33 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using wcftest.EnumDefine; + +namespace wcftest.Model.Input +{ + /// <summary> + /// 鍒嗛〉鏌ヨ 鍫嗗灈鏈鸿繍琛岀粺璁� 杈撳叆鍙傛暟 + /// </summary> + public class DeviceGeneralInfoInput : roleMenu + { + + /// <summary> + /// 鍒嗛〉 + /// </summary> + public paging queryInfo { get; set; } + + /// <summary> + /// 鏄惁鍔犺浇鍏ㄩ儴鏁版嵁 + /// </summary> + public bool IsLoadAllData { get; set; } + + + /// <summary> + /// 鏃堕棿鑼冨洿-鍒涘缓鏃堕棿 + /// </summary> + public DateTime[] datatime { get; set; } + + } +} diff --git a/siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs b/siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs new file mode 100644 index 0000000..ff8eb91 --- /dev/null +++ b/siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs @@ -0,0 +1,55 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using wcftest.EnumDefine; + +namespace wcftest.Model.Input +{ + /// <summary> + /// 鍒嗛〉鏌ヨ 杈撳叆鍙傛暟 + /// </summary> + public class Purchase_OrderList_EmptyMaterialCodeInput : roleMenu + { + + /// <summary> + /// 鍒嗛〉 + /// </summary> + public paging queryInfo { get; set; } + + /// <summary> + /// 鏄惁鍔犺浇鍏ㄩ儴鏁版嵁 + /// </summary> + public bool IsLoadAllData { get; set; } + + + /// <summary>鎼滅储鍙傛暟 + /// + /// </summary> + public searchparamForPurchase_OrderList_EmptyMaterialCode search { get; set; } + + + /// <summary> + /// 鏃堕棿鑼冨洿-鍒涘缓鏃堕棿 + /// </summary> + public DateTime[] datatime { get; set; } + + } + + public class searchparamForPurchase_OrderList_EmptyMaterialCode + { + + + + + public string PoCode { get; set; } + + + public string ProductName { get; set; } + + + + public string ItemNumber { get; set; } + } +} diff --git a/siemenswmssditcode/wmsService/wcftest/Program.cs b/siemenswmssditcode/wmsService/wcftest/Program.cs index 5be4a76..8b9fd66 100644 --- a/siemenswmssditcode/wmsService/wcftest/Program.cs +++ b/siemenswmssditcode/wmsService/wcftest/Program.cs @@ -25,6 +25,8 @@ Mutex MyMutex = new Mutex(true, "wcftest", out result); if (result) { + Yitter.IdGenerator.IdGeneratorOptions options = new Yitter.IdGenerator.IdGeneratorOptions(1); + Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options); Application.Run(form1ObjPublic); } else diff --git a/siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs b/siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs index ac6d52d..70ab02b 100644 --- a/siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs +++ b/siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs @@ -12,6 +12,7 @@ : base("name=dbModel") { } + public virtual DbSet<Purchase_OrderList_EmptyMaterialCode> Purchase_OrderList_EmptyMaterialCode { get; set; } public virtual DbSet<Base_PositionPrint> Base_PositionPrint { get; set; } public virtual DbSet<Sale_Order_History_Items> Sale_Order_History_Items { get; set; } public virtual DbSet<Sale_Order_History> Sale_Order_History { get; set; } @@ -51,6 +52,18 @@ public virtual DbSet<Base_BasicDataSet> Base_BasicDataSet { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { + modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() + .Property(e => e.Quantity) + .HasPrecision(18, 0); + + modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() + .Property(e => e.Creator) + .IsUnicode(false); + + modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() + .Property(e => e.LastModifier) + .IsUnicode(false); + modelBuilder.Entity<Base_PositionPrint>() .Property(e => e.ProductStorage) .HasPrecision(14, 4); diff --git a/siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs b/siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs new file mode 100644 index 0000000..934e673 --- /dev/null +++ b/siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs @@ -0,0 +1,41 @@ +namespace wcftest.orm +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Data.Entity.Spatial; + + public partial class Purchase_OrderList_EmptyMaterialCode + { + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public long ID { get; set; } + + [StringLength(50)] + public string PoCode { get; set; } + + [StringLength(500)] + public string ProductName { get; set; } + + public decimal? Quantity { get; set; } + + [StringLength(50)] + public string ItemNumber { get; set; } + + [StringLength(50)] + public string BatchNumber { get; set; } + + [StringLength(2000)] + public string Remark { get; set; } + + [StringLength(128)] + public string Creator { get; set; } + + public DateTime? CreateTime { get; set; } + + [StringLength(128)] + public string LastModifier { get; set; } + + public DateTime? LastModifyTime { get; set; } + } +} diff --git a/siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs b/siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs index b2b20a0..063c9fb 100644 --- a/siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs +++ b/siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs @@ -13,10 +13,5 @@ } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - - } } } diff --git a/siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs b/siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs index ffc250a..fc5e205 100644 --- a/siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs +++ b/siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs @@ -55,6 +55,24 @@ [OperationContract] string getDeviceInfo(string startTime, string endTime); + + /// <summary> + /// 鍒嗛〉鏌ヨ 鍫嗗灈鏈鸿繍琛岀粺璁� + /// </summary> + /// <param name="param"></param> + /// <returns></returns> + [OperationContract] + string QueryPageDeviceGeneralInfo(string param); + + /// <summary> + /// 鍒嗛〉鏌ヨ PO鏄庣粏绌虹墿鏂欏彿淇℃伅 + /// </summary> + /// <param name="param"></param> + /// <returns></returns> + [OperationContract] + string QueryPagePurchaseEmptyMaterialCode(string param); + + [OperationContract] string outStockTaskList(string takes); [OperationContract] diff --git a/siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs b/siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs index a8f171b..d13c268 100644 --- a/siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs +++ b/siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs @@ -24,6 +24,7 @@ using wcftest.Model.Output; using wcftest.orm_test; using wcftest.Utils.AuthFacotry; +using System.Linq.Expressions; namespace wcftest.wcf @@ -3270,7 +3271,7 @@ data.Add(waitStatus); //x杞撮『搴忛噸鏂版帓搴� 銆怑ditby shaocx,2024-12-30銆� - xdata = xdata.OrderBy(x=>x).ToList(); + xdata = xdata.OrderBy(x => x).ToList(); string[] legend = { "p璁惧杩愯鏃堕棿", "p璁惧绛夊緟鏃堕棿", "p璁惧寮傚父鏃堕棿" }; var workpiece = new { @@ -3297,6 +3298,237 @@ } } + + /// <summary> + /// 鍒嗛〉鏌ヨ 鍫嗗灈鏈鸿繍琛岀粺璁� + /// </summary> + /// <param name="param"></param> + /// <returns></returns> + public string QueryPageDeviceGeneralInfo(string param) + { + msgss<deviceGeneralInfo> msg = new msgss<deviceGeneralInfo>(); + DeviceGeneralInfoInput page = JsonConvert.DeserializeObject<DeviceGeneralInfoInput>(param); + try + { + using (dbModel mod = new dbModel()) + { + List<deviceGeneralInfo> fiveDayDeviceInfo = null; + if (page.datatime == null) + { + fiveDayDeviceInfo = mod.deviceGeneralInfo + .OrderByDescending(x => x.createTime) + .ToList(); + } + else + { + DateTime _startTime = Convert.ToDateTime(page.datatime[0]); + DateTime _endTime = Convert.ToDateTime(page.datatime[1]); + fiveDayDeviceInfo = mod.deviceGeneralInfo + .Where(x => x.createTime >= _startTime && x.createTime <= _endTime) + .OrderByDescending(x => x.createTime) + .ToList(); + } + + if (fiveDayDeviceInfo.Count > 0) + { + foreach (var item in fiveDayDeviceInfo) + { + //閲嶆柊璁$畻绛夊緟鏃堕棿 + item.deviceWaitTime = 1440 - ((item.deviceRunTime ?? 0M) + (item.deviceAlarmTime ?? 0M)); + } + } + + List<deviceGeneralInfo> fenyeRerult = new List<deviceGeneralInfo>(); + if (fiveDayDeviceInfo.Count > 0) + { + msg.status = 200; + msg.total = fiveDayDeviceInfo.Count; + if (page.IsLoadAllData) + {//鍙湁纭畾鍔犺浇鍏ㄩ儴鏁版嵁鏃舵墠鍔犺浇鍏ㄩ儴鏁版嵁 [EditBy shaocx,2022-03-07] + msg.status = 200; + msg.allDate = fiveDayDeviceInfo.ToList(); + } + else + {//涓嶅姞杞藉叏閮紝灏辫繃婊ゅ垎椤典俊鎭� + //鍋囧姣忛〉鏁伴噺 澶т簬鐩樼偣鏁版嵁 + if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count) + { + msg.date = fiveDayDeviceInfo; + } + else + { + #region 鍒嗛〉璁$畻 + int a = page.queryInfo.pagesize; + + int b = page.queryInfo.pagenum; + int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a); + int d = fiveDayDeviceInfo.Count % a; + int e = 0; + int f = a * (b - 1); + if (d != 0 && b == c) + { + e = d + f; + + } + else + { + e = a + f; + } + + + + for (int i = f; i < e; i++) + { + fenyeRerult.Add(fiveDayDeviceInfo[i]); + } + msg.date = fenyeRerult; + #endregion + + } + } + } + else + { + msg.status = 400; + msg.total = 1; + msg.date = null; + } + + + return JsonConvert.SerializeObject(msg); + } + + } + catch (Exception ex) + { + logtxt.txtWrite("鍑洪敊淇℃伅" + ex.Message + "鍑洪敊琛屽彿" + (string)ex.StackTrace, 2); + msg.status = 400; + msg.total = 1; + msg.date = null; + + return JsonConvert.SerializeObject(msg); + } + + } + + /// <summary> + /// 鍒嗛〉鏌ヨ PO鏄庣粏绌虹墿鏂欏彿淇℃伅 + /// </summary> + /// <param name="param"></param> + /// <returns></returns> + public string QueryPagePurchaseEmptyMaterialCode(string param) + { + msgss<Purchase_OrderList_EmptyMaterialCode> msg = new msgss<Purchase_OrderList_EmptyMaterialCode>(); + Purchase_OrderList_EmptyMaterialCodeInput page = JsonConvert.DeserializeObject<Purchase_OrderList_EmptyMaterialCodeInput>(param); + try + { + using (dbModel mod = new dbModel()) + { + List<Purchase_OrderList_EmptyMaterialCode> fiveDayDeviceInfo = new List<Purchase_OrderList_EmptyMaterialCode>(); + + Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_datatime = x => 1 == 1; + if (page.datatime != null) + { + DateTime _startTime = Convert.ToDateTime(page.datatime[0]); + DateTime _endTime = Convert.ToDateTime(page.datatime[1]); + predicate_datatime = x => x.CreateTime >= _startTime && x.CreateTime <= _endTime; + } + Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_poCode = x => 1 == 1; + if (!string.IsNullOrEmpty(page.search.PoCode)) + { + predicate_poCode = x => x.PoCode == page.search.PoCode; + } + Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ItemNumber = x => 1 == 1; + if (!string.IsNullOrEmpty(page.search.ItemNumber)) + { + predicate_poCode = x => x.ItemNumber == page.search.ItemNumber; + } + Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ProductName = x => 1 == 1; + if (!string.IsNullOrEmpty(page.search.ProductName)) + { + predicate_poCode = x => x.ProductName == page.search.ProductName; + } + fiveDayDeviceInfo = mod.Purchase_OrderList_EmptyMaterialCode + .Where(predicate_datatime) + .Where(predicate_poCode) + .Where(predicate_ItemNumber) + .Where(predicate_ProductName) + .ToList(); + + + List<Purchase_OrderList_EmptyMaterialCode> fenyeRerult = new List<Purchase_OrderList_EmptyMaterialCode>(); + if (fiveDayDeviceInfo.Count > 0) + { + msg.status = 200; + msg.total = fiveDayDeviceInfo.Count; + if (page.IsLoadAllData) + {//鍙湁纭畾鍔犺浇鍏ㄩ儴鏁版嵁鏃舵墠鍔犺浇鍏ㄩ儴鏁版嵁 [EditBy shaocx,2022-03-07] + msg.status = 200; + msg.allDate = fiveDayDeviceInfo.ToList(); + } + else + {//涓嶅姞杞藉叏閮紝灏辫繃婊ゅ垎椤典俊鎭� + //鍋囧姣忛〉鏁伴噺 澶т簬鐩樼偣鏁版嵁 + if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count) + { + msg.date = fiveDayDeviceInfo; + } + else + { + #region 鍒嗛〉璁$畻 + int a = page.queryInfo.pagesize; + + int b = page.queryInfo.pagenum; + int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a); + int d = fiveDayDeviceInfo.Count % a; + int e = 0; + int f = a * (b - 1); + if (d != 0 && b == c) + { + e = d + f; + + } + else + { + e = a + f; + } + + + + for (int i = f; i < e; i++) + { + fenyeRerult.Add(fiveDayDeviceInfo[i]); + } + msg.date = fenyeRerult; + #endregion + + } + } + } + else + { + msg.status = 400; + msg.total = 1; + msg.date = null; + } + + + return JsonConvert.SerializeObject(msg); + } + + } + catch (Exception ex) + { + logtxt.txtWrite("鍑洪敊淇℃伅" + ex.Message + "鍑洪敊琛屽彿" + (string)ex.StackTrace, 2); + msg.status = 400; + msg.total = 1; + msg.date = null; + + return JsonConvert.SerializeObject(msg); + } + + } + /// <summary>2d鍔ㄧ敾鑾峰彇璁惧浣嶇疆 /// 2d鍔ㄧ敾鑾峰彇璁惧浣嶇疆 @@ -5719,12 +5951,27 @@ var checkMateria1s = (from p in mod.Base_ProductInfo where (from f in rstPo select f).Contains(p.ProductCode) select p).ToList(); #region 娣诲姞PO鍗曠墿鏂欐槑缁� + System.Collections.Generic.List<Purchase_OrderList_EmptyMaterialCode> insert_OrderList_EmptyMaterialCodeList = new List<Purchase_OrderList_EmptyMaterialCode>(); string lastTracknum = ""; foreach (var item in resultPo.Materials) { - if (item.MaterialCode == null) - { + if (string.IsNullOrEmpty(item.MaterialCode)) + {//鍐欏叆PO鏄庣粏绌虹墿鏂欏彿琛� 銆怑ditby shaocx,2025-09-09銆� logtxt.txtWrite("閲囪喘鍗曞彿:" + item.PoNumber + " 鐗╂枡椤瑰彿:" + item.PoItem + "鐗╂枡缂栧彿涓虹┖", 2); + insert_OrderList_EmptyMaterialCodeList.Add(new Purchase_OrderList_EmptyMaterialCode() + { + ID = Yitter.IdGenerator.YitIdHelper.NextId(), + PoCode = poInfo.PoCode, + BatchNumber = "", + ItemNumber = item.PoItem, + ProductName = item.MaterialName, + CreateTime = DateTime.Now, + Creator = resultPo.CreatedBy, + Quantity = 0, + LastModifier = resultPo.CreatedBy, + LastModifyTime = DateTime.Now, + Remark = "" + }); continue;//鐗╂枡缂栧彿涓虹┖ } string materialCode = item.MaterialCode; @@ -5860,6 +6107,12 @@ #endregion //鍏堜繚瀛樹富琛� 鐒跺悗鑾峰彇涓昏〃ID 鍐嶅啓鍏ユ槑缁嗚〃 mod.Purchase_Order.Add(poInfo); + + if (insert_OrderList_EmptyMaterialCodeList != null && insert_OrderList_EmptyMaterialCodeList.Count > 0) + {//鍐欏叆PO鏄庣粏绌虹墿鏂欏彿琛� 銆怑ditby shaocx,2025-09-09銆� + mod.Purchase_OrderList_EmptyMaterialCode.AddRange(insert_OrderList_EmptyMaterialCodeList); + } + int results = mod.SaveChanges(); for (int h = 0; h < 10; h++) { diff --git a/siemenswmssditcode/wmsService/wcftest/wmsService.csproj b/siemenswmssditcode/wmsService/wcftest/wmsService.csproj index 6e5d66e..7e8a704 100644 --- a/siemenswmssditcode/wmsService/wcftest/wmsService.csproj +++ b/siemenswmssditcode/wmsService/wcftest/wmsService.csproj @@ -9,9 +9,10 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>wcftest</RootNamespace> <AssemblyName>wcftest</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> @@ -68,6 +69,9 @@ <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> + <Reference Include="Yitter.IdGenerator.Net45"> + <HintPath>..\DLL\Yitter.IdGenerator.Net45.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="BussinessExtension\AutoMoveLocation\UpdateStoreWarningDaysHandler.cs" /> @@ -157,6 +161,8 @@ </Compile> <Compile Include="deviceorm\MainTask.cs" /> <Compile Include="deviceorm\PartTask.cs" /> + <Compile Include="Model\Input\Purchase_OrderList_EmptyMaterialCodeInput.cs" /> + <Compile Include="Model\Input\DeviceGeneralInfoInput.cs" /> <Compile Include="Model\Input\UpdateStoreWarningDaysInput.cs" /> <Compile Include="Model\Input\RePrintBarCodeInput.cs" /> <Compile Include="Model\Input\Sale_Order_HistoryInput.cs" /> @@ -1144,6 +1150,7 @@ <Compile Include="orm\Sale_Order_History.cs" /> <Compile Include="orm\Sale_Order_History_Items.cs" /> <Compile Include="orm_test\orm_test.cs" /> + <Compile Include="orm2\Purchase_OrderList_EmptyMaterialCode.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="sapEntity\analyseMateral.cs" /> -- Gitblit v1.9.3