已删除5个文件
已修改27个文件
已重命名2个文件
已添加17个文件
| | |
| | | }; |
| | | if (taskDTO.TaskTyp== "CPC") |
| | | { |
| | | taskDTO.Priority = (24 - DateTime.Now.Hour).ToString(); |
| | | taskDTO.Priority = task.Grade.ToString(); |
| | | } |
| | | if (task.GroupId.IsNotEmptyOrNull()) |
| | | { |
| | |
| | | throw new Exception(content.Message); |
| | | if (taskDTO.TaskTyp == "CPC") |
| | | { |
| | | task.Dispatchertime = DateTime.Now; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); |
| | | } |
| | | else |
| | | { |
| | | task.Dispatchertime = DateTime.Now; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Takeing); |
| | | } |
| | | Thread.Sleep(500); |
| | |
| | | else//ç产éåº //æ¢å··éå
¥åº |
| | | { |
| | | #region ç产éåº,带任å¡å·æ¥è¯¢ä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId); // 带任å¡å·æ¥è¯¢ä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); // 带任å¡å·æ¥è¯¢ä»»å¡ |
| | | Dt_Task taskIn = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && x.NextAddress == item.StationCode && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()); // 带任å¡å·æ¥è¯¢ä»»å¡ |
| | | if (task != null) |
| | | { |
| | |
| | | device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute); |
| | | } |
| | | } |
| | | } |
| | |
| | | "integrity": "sha512-GODcnWq3YGoTnygPfi02ygEiRxqUxpJwuRHjdhJYuxpcZmDq4rjBiXYmbCCzStxo176ixfLT6i4NPwQooRySnw==" |
| | | }, |
| | | "dayjs": { |
| | | "version": "1.11.5", |
| | | "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz", |
| | | "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" |
| | | "version": "1.11.13", |
| | | "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz", |
| | | "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" |
| | | }, |
| | | "debug": { |
| | | "version": "4.3.2", |
| | |
| | | "ali-oss": "^6.17.1", |
| | | "axios": "^0.21.1", |
| | | "core-js": "^3.6.5", |
| | | "dayjs": "^1.11.13", |
| | | "echarts": "^5.0.2", |
| | | "element-plus": "^2.2.14", |
| | | "jsbarcode": "^3.11.6", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | |
| | | <div> |
| | | <vol-box |
| | | v-model="dialogFormVisible" |
| | | :on-model-close="closeCustomModel" |
| | | :lazy="true" |
| | | width="20%" |
| | | :padding="15" |
| | |
| | | formLabelWidth: '160px', |
| | | formFields1: { |
| | | LineCode: "", |
| | | Grade: "0", |
| | | }, |
| | | formRules1:[[ |
| | | { |
| | |
| | | extra: { |
| | | |
| | | }, |
| | | }]], |
| | | }], |
| | | [ |
| | | { |
| | | title: "æ¯å¦ä¼å
", |
| | | field: "Grade", |
| | | data: [], |
| | | required: false, |
| | | type: "switch", |
| | | }, |
| | | ]], |
| | | form: { |
| | | name: '', |
| | | region: '', |
| | |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | this.http |
| | | .post("api/Task/OutProductTask?stationCode="+this.formFields1.LineCode, keys, "æ°æ®å¤çä¸") |
| | | .post("api/Task/OutProductTask?stationCode="+this.formFields1.LineCode +"&grade="+this.formFields1.Grade, keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.formFields1.LineCode=""; |
| | | this.formFields1.Grade="0"; |
| | | this.dialogFormVisible=false; |
| | | this.$parent.refresh(); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | this.formFields1.LineCode=""; |
| | | this.dialogFormVisible=false; |
| | | this.$parent.refresh(); |
| | | }); |
| | | }, |
| | | setCurrent(row) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | closeCustomModel() { |
| | | this.formFields1.LineCode=""; |
| | | this.formFields1.Grade="0"; |
| | | this.dialogFormVisible=false; |
| | | this.$parent.refresh(); |
| | | }, |
| | | getDictionary(row, column) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | |
| | | path: '/materielnfoStatistics', |
| | | name: 'materielnfoStatistics', |
| | | component: () => import('@/views/stock/materielnfoStatistics.vue') |
| | | }, |
| | | { |
| | | path: '/materielnfoStatistics', |
| | | name: 'materielnfoStatistics', |
| | | component: () => import('@/views/stock/materielnfoStatistics.vue') |
| | | }, |
| | | { |
| | | path: '/proInStatistics', |
| | | name: 'proInStatistics', |
| | | component: () => import('@/views/inbound/proInStatistics.vue') |
| | | } |
| | | ] |
| | | export default viewgird |
| | |
| | | console.log("WebSocket è¿æ¥å
³é"); |
| | | setTimeout(createSocket, 10000); |
| | | }; |
| | | |
| | | //çå¬socketéè¯¯ä¿¡æ¯ |
| | | client.onerror = function () {}; |
| | | }; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card |
| | | style="border-radius: 0" |
| | | :body-style="{ padding: '1rem 2rem' }" |
| | | v-loading="loading" |
| | | > |
| | | <template #header> |
| | | <div |
| | | style=" |
| | | font-weight: bold; |
| | | font-size: 1.2rem; |
| | | height: 2rem; |
| | | line-height: 2rem; |
| | | " |
| | | > |
| | | æåå½ææ°æ®ç»è®¡ |
| | | <el-button @click="refresh" type="success">å·æ°</el-button> |
| | | </div> |
| | | </template> |
| | | <div style="display: flex; justify-content: space-between"> |
| | | <div ref="operationDom" style="height: 25rem; width: 100%"></div> |
| | | </div> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, onUnmounted, nextTick } from "vue"; |
| | | // å¼å
¥echarts |
| | | import * as echarts from "echarts"; |
| | | import dayjs from "dayjs"; |
| | | import { ElLoading } from "element-plus"; |
| | | import http from "@/../src/api/http.js"; |
| | | const loading = ref(true); |
| | | // å建ä¸ä¸ªååºå¼å¼ç¨æ¥ä¿åDOMå
ç´ |
| | | const operationDom = ref(null); |
| | | let operationChartInstance = null; |
| | | let infoChartInstance = null; |
| | | const infoDom = ref(null); |
| | | const xData = ref([]); |
| | | const yData = ref([]); |
| | | const refresh = () => { |
| | | const url = "api/ProInStatistics/GetMonthProductions"; |
| | | http.post(url, {}, true).then((result) => { |
| | | loading.value = true; |
| | | operationChartInstance = echarts.init(operationDom.value); |
| | | // infoChartInstance=echarts.init(infoDom.value) |
| | | let dateList = [ |
| | | ["2025-5-1", 0], |
| | | ["2025-5-2", 0], |
| | | ["2025-5-3", 0], |
| | | ["2025-5-4", 0], |
| | | ["2025-5-5", 0], |
| | | ["2025-5-6", 0], |
| | | ["2025-5-7", 10050], |
| | | ["2025-5-8", 30000], |
| | | ["2025-5-9", 300000], |
| | | ["2025-5-10", 0], |
| | | ["2025-5-11", 0], |
| | | ["2025-5-12", 0], |
| | | ["2025-5-13", 0], |
| | | ["2025-5-14", 0], |
| | | ["2025-5-15", 0], |
| | | ["2025-5-16", 0], |
| | | ["2025-5-17", 0], |
| | | ["2025-5-18", 0], |
| | | ["2025-5-19", 0], |
| | | ["2025-5-20", 0], |
| | | ["2025-5-21", 0], |
| | | ["2025-5-22", 0], |
| | | ["2025-5-23", 0], |
| | | ["2025-5-24", 0], |
| | | ["2025-5-25", 0], |
| | | ["2025-5-26", 0], |
| | | ["2025-5-27", 0], |
| | | ["2025-5-28", 0], |
| | | ["2025-5-29", 0], |
| | | ["2025-5-30", 0], |
| | | ["2025-5-31", 0], |
| | | ]; |
| | | dateList=[]; |
| | | const data = result.data; |
| | | data.forEach((item) => { |
| | | dateList.push([item.dateNow, item.dayProDuctions]); |
| | | }); |
| | | console.log(dateList); |
| | | const heatmapData = []; |
| | | const lunarData = []; |
| | | for (let i = 0; i < dateList.length; i++) { |
| | | heatmapData.push([dateList[i][0], Math.random() * 300]); |
| | | lunarData.push([dateList[i][0], 1, dateList[i][1], dateList[i][2]]); |
| | | } |
| | | let chartData = []; |
| | | dateList.forEach((item) => { |
| | | chartData.push({ |
| | | value: [item[0], item[1]], |
| | | itemStyle: |
| | | item[0] === dayjs().format('YYYY-MM-DD') |
| | | ? { |
| | | borderColor: "red", |
| | | } |
| | | : {}, //å½åæ¥ææ æ³¨è¾¹æ¡ä¸ºçº¢è² |
| | | symbol: "rect", // æ ¸å¿1ï¼é¿æ¹å½¢æ¥å¡«å
|
| | | }); |
| | | }); |
| | | var option = { |
| | | // tooltip: { |
| | | // formatter: function (params) { |
| | | // return 'éé¨é: ' + params.value[1].toFixed(2); |
| | | // } |
| | | // }, |
| | | |
| | | visualMap: { |
| | | show: false, |
| | | min: 0, |
| | | max: 300, |
| | | calculable: true, |
| | | seriesIndex: [2], |
| | | orient: "horizontal", |
| | | left: "center", |
| | | bottom: 20, |
| | | inRange: { |
| | | color: ["#e0ffff", "#006edd"], |
| | | opacity: 0.3, |
| | | }, |
| | | controller: { |
| | | inRange: { |
| | | opacity: 0.5, |
| | | }, |
| | | }, |
| | | }, |
| | | calendar: { |
| | | left: "center", |
| | | top: 49, |
| | | cellSize: [70, 70], |
| | | orient: "vertical", |
| | | dayLabel: { |
| | | firstDay: 1, |
| | | nameMap: "cn", |
| | | }, |
| | | monthLabel: { |
| | | formatter: "{M}æ", |
| | | }, |
| | | range: "2025-05", |
| | | yearLabel: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | series: [ |
| | | { |
| | | type: "scatter", |
| | | coordinateSystem: "calendar", |
| | | symbolSize(params) { |
| | | //æ ¸å¿2 |
| | | if (params[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return 70; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | } else { |
| | | return 1; |
| | | } |
| | | }, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | var d = echarts.number.parseDate(params.value[0]); |
| | | if (params.value[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return d.getDate() + "\n\n彿¥å
¥ä»é\n\n"; |
| | | } |
| | | return d.getDate() + "\n\nå
¥ä»é\n\n"; |
| | | }, |
| | | color: "#000", |
| | | }, |
| | | data: chartData, |
| | | silent: true, |
| | | }, |
| | | { |
| | | type: "scatter", |
| | | coordinateSystem: "calendar", |
| | | symbolSize: 0, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | return ( |
| | | "\n\n\n" + |
| | | (params.value[1] && params.value[1] != undefined |
| | | ? params.value[1] + "ã¡" |
| | | : "0ã¡") |
| | | ); |
| | | }, |
| | | fontSize: 14, |
| | | fontWeight: 700, |
| | | color: "#a00", |
| | | }, |
| | | data: chartData, |
| | | silent: true, |
| | | }, |
| | | // { |
| | | // type: 'scatter', |
| | | // coordinateSystem: 'calendar', |
| | | // symbolSize: 0, |
| | | // label: { |
| | | // show: true, |
| | | // formatter: function (params) { |
| | | // return '\n\n\n' + (params.value[3]?params.value[3]+'ã¡' : ''); |
| | | // }, |
| | | // fontSize: 14, |
| | | // fontWeight: 700, |
| | | // color: '#a00' |
| | | // }, |
| | | // data: lunarData, |
| | | // silent: true |
| | | // }, |
| | | ], |
| | | }; |
| | | operationChartInstance.setOption(option); |
| | | // infoChartInstance.setOption(option); |
| | | nextTick(() => { |
| | | loading.value = false; |
| | | }); |
| | | |
| | | }); |
| | | |
| | | }; |
| | | // åå§åEChartså®ä¾å¹¶è®¾ç½®é
置项ï¼è¿é以æçº¿å¾ä¸ºä¾ï¼ä½å¯çµæ´»æ¿æ¢ï¼ |
| | | onMounted(async () => { |
| | | await nextTick(); // ç¡®ä¿DOMå·²ç»æ¸²æå®æ |
| | | const url = "api/ProInStatistics/GetMonthProductions"; |
| | | http.post(url, {}, true).then((result) => { |
| | | operationChartInstance = echarts.init(operationDom.value); |
| | | // infoChartInstance=echartss.init(infoDom.value) |
| | | let dateList = [ |
| | | ["2025-5-1", 0], |
| | | ["2025-5-2", 0], |
| | | ["2025-5-3", 0], |
| | | ["2025-5-4", 0], |
| | | ["2025-5-5", 0], |
| | | ["2025-5-6", 0], |
| | | ["2025-5-7", 10050], |
| | | ["2025-5-8", 30000], |
| | | ["2025-5-9", 300000], |
| | | ["2025-5-10", 0], |
| | | ["2025-5-11", 0], |
| | | ["2025-5-12", 0], |
| | | ["2025-5-13", 0], |
| | | ["2025-5-14", 0], |
| | | ["2025-5-15", 0], |
| | | ["2025-5-16", 0], |
| | | ["2025-5-17", 0], |
| | | ["2025-5-18", 0], |
| | | ["2025-5-19", 0], |
| | | ["2025-5-20", 0], |
| | | ["2025-5-21", 0], |
| | | ["2025-5-22", 0], |
| | | ["2025-5-23", 0], |
| | | ["2025-5-24", 0], |
| | | ["2025-5-25", 0], |
| | | ["2025-5-26", 0], |
| | | ["2025-5-27", 0], |
| | | ["2025-5-28", 0], |
| | | ["2025-5-29", 0], |
| | | ["2025-5-30", 0], |
| | | ["2025-5-31", 0], |
| | | ]; |
| | | dateList=[]; |
| | | const data = result.data; |
| | | data.forEach((item) => { |
| | | dateList.push([item.dateNow, item.dayProDuctions]); |
| | | }); |
| | | console.log(dateList); |
| | | const heatmapData = []; |
| | | const lunarData = []; |
| | | for (let i = 0; i < dateList.length; i++) { |
| | | heatmapData.push([dateList[i][0], Math.random() * 300]); |
| | | lunarData.push([dateList[i][0], 1, dateList[i][1], dateList[i][2]]); |
| | | } |
| | | let chartData = []; |
| | | dateList.forEach((item) => { |
| | | chartData.push({ |
| | | value: [item[0], item[1]], |
| | | itemStyle: |
| | | item[0] === dayjs().format('YYYY-MM-DD') |
| | | ? { |
| | | borderColor: "red", |
| | | } |
| | | : {}, //å½åæ¥ææ æ³¨è¾¹æ¡ä¸ºçº¢è² |
| | | symbol: "rect", // æ ¸å¿1ï¼é¿æ¹å½¢æ¥å¡«å
|
| | | }); |
| | | }); |
| | | var option = { |
| | | // tooltip: { |
| | | // formatter: function (params) { |
| | | // return 'éé¨é: ' + params.value[1].toFixed(2); |
| | | // } |
| | | // }, |
| | | |
| | | visualMap: { |
| | | show: false, |
| | | min: 0, |
| | | max: 300, |
| | | calculable: true, |
| | | seriesIndex: [2], |
| | | orient: "horizontal", |
| | | left: "center", |
| | | bottom: 20, |
| | | inRange: { |
| | | color: ["#e0ffff", "#006edd"], |
| | | opacity: 0.3, |
| | | }, |
| | | controller: { |
| | | inRange: { |
| | | opacity: 0.5, |
| | | }, |
| | | }, |
| | | }, |
| | | calendar: { |
| | | left: "center", |
| | | top: 49, |
| | | cellSize: [70, 70], |
| | | orient: "vertical", |
| | | dayLabel: { |
| | | firstDay: 1, |
| | | nameMap: "cn", |
| | | }, |
| | | monthLabel: { |
| | | formatter: "{M}æ", |
| | | }, |
| | | range: "2025-05", |
| | | yearLabel: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | series: [ |
| | | { |
| | | type: "scatter", |
| | | coordinateSystem: "calendar", |
| | | symbolSize(params) { |
| | | //æ ¸å¿2 |
| | | if (params[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return 70; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | } else { |
| | | return 1; |
| | | } |
| | | }, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | var d = echarts.number.parseDate(params.value[0]); |
| | | if (params.value[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return d.getDate() + "\n\n彿¥å
¥ä»é\n\n"; |
| | | } |
| | | return d.getDate() + "\n\nå
¥ä»é\n\n"; |
| | | }, |
| | | color: "#000", |
| | | }, |
| | | data: chartData, |
| | | silent: true, |
| | | }, |
| | | { |
| | | type: "scatter", |
| | | coordinateSystem: "calendar", |
| | | symbolSize: 0, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | return ( |
| | | "\n\n\n" + |
| | | (params.value[1] && params.value[1] != undefined |
| | | ? params.value[1] + "ã¡" |
| | | : "0ã¡") |
| | | ); |
| | | }, |
| | | fontSize: 14, |
| | | fontWeight: 700, |
| | | color: "#a00", |
| | | }, |
| | | data: chartData, |
| | | silent: true, |
| | | }, |
| | | // { |
| | | // type: 'scatter', |
| | | // coordinateSystem: 'calendar', |
| | | // symbolSize: 0, |
| | | // label: { |
| | | // show: true, |
| | | // formatter: function (params) { |
| | | // return '\n\n\n' + (params.value[3]?params.value[3]+'ã¡' : ''); |
| | | // }, |
| | | // fontSize: 14, |
| | | // fontWeight: 700, |
| | | // color: '#a00' |
| | | // }, |
| | | // data: lunarData, |
| | | // silent: true |
| | | // }, |
| | | ], |
| | | }; |
| | | operationChartInstance.setOption(option); |
| | | }); |
| | | // infoChartInstance.setOption(option); |
| | | nextTick(() => { |
| | | loading.value = false; |
| | | }); |
| | | }); |
| | | |
| | | // 鿝EChartså®ä¾ |
| | | onUnmounted(() => { |
| | | if (operationChartInstance != null && operationChartInstance.dispose) { |
| | | operationChartInstance.dispose(); |
| | | } |
| | | }); |
| | | |
| | | //çªå£å¤§å°ååéç»echart |
| | | window.onresize = function () { |
| | | if (operationChartInstance != null && operationChartInstance.resize) { |
| | | operationChartInstance.resize(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <assemble-dist></assemble-dist> |
| | | </div> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/inbound/proInStatistics.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | import AssembleDistVue from '../charts/AssembleDist.vue'; |
| | | export default defineComponent({ |
| | | components: { |
| | | 'assemble-dist': AssembleDistVue, |
| | | }, |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "æåå
¥åºç»è®¡", |
| | | name: "proInStatistics", |
| | | url: "/proInStatistics/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | warehouseId: "", |
| | | productCode: "", |
| | | productRev: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "产åç¼ç ", field: "productCode",type: "like"}, |
| | | { |
| | | title: "ä»åº", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouses", |
| | | data: [] |
| | | }, |
| | | { title: "产åçæ¬", field: "productRev",type: "like"}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "æå±ä»åº", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "productCode", |
| | | title: "产ååå·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "productRev", |
| | | title: "产åçæ¬", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "pcsQty", |
| | | title: "å
è£
Pcsæ°é", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "squareMeter", |
| | | title: "é¢ç§¯(ã¡)", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | } |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | |
| | | <template> |
| | | <!-- <div> |
| | | <assemble-dist></assemble-dist> |
| | | </div> --> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | <script> |
| | | import extend from "@/extension/inbound/takeStockOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | // import AssembleDistVue from '../charts/AssembleDist.vue'; |
| | | export default defineComponent({ |
| | | // components: { |
| | | // 'assemble-dist': AssembleDistVue, |
| | | // }, |
| | | setup() { |
| | | const table = ref({ |
| | | //使ç¨ç»ä»¶AssembleDist |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "çç¹å", |
| | |
| | | Dt_MaterielInfo materielInfo = BaseDal.QueryFirst(x => x.MaterielCode == model.Code); |
| | | if (materielInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç©æä¿¡æ¯"); |
| | | Dt_MaterielInfo materielInfoAddNew = new Dt_MaterielInfo() |
| | | { |
| | | IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck, |
| | | MaterielCode = model.Code, |
| | | MaterielInvOrgId = model.InvOrgId, |
| | | MaterielLength = model.Length, |
| | | MaterielModel = model.Model, |
| | | MaterielName = model.Name, |
| | | MaterielSize = model.Size, |
| | | MaterielSourceType = (MaterielSourceTypeEnum)(model.ItemSourceType.ObjToInt()), |
| | | MaterielSpec = warehouse == null ? "空" : model.StandType, |
| | | MaterielState = (EnableEnum)(model.State.ObjToInt()), |
| | | MaterielThickness = model.Thickness, |
| | | MaterielType = (MaterielTypeEnum)(model.ItemType.ObjToInt()), |
| | | MaterielUnit = model.Unit == null ? "" : model.Unit, |
| | | MaterielVersion = model.MaterialVersion, |
| | | MaterielWide = model.Wide, |
| | | WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId, |
| | | }; |
| | | BaseDal.AddData(materielInfoAddNew); |
| | | } |
| | | |
| | | materielInfo.IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck; |
| | | materielInfo.MaterielCode = model.Code; |
| | | materielInfo.MaterielInvOrgId = model.InvOrgId; |
| | | materielInfo.MaterielLength = model.Length; |
| | | materielInfo.MaterielModel = model.Model; |
| | | materielInfo.MaterielName = model.Name; |
| | | materielInfo.MaterielSize = model.Size; |
| | | materielInfo.MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType.ObjToInt(); |
| | | materielInfo.MaterielSpec = warehouse == null ? "" : model.StandType; |
| | | materielInfo.MaterielState = (EnableEnum)model.State.ObjToInt(); |
| | | materielInfo.MaterielThickness = model.Thickness; |
| | | materielInfo.MaterielType = (MaterielTypeEnum)model.ItemType.ObjToInt(); |
| | | materielInfo.MaterielUnit = model.Unit == null ? "" : model.Unit; |
| | | materielInfo.MaterielVersion = model.MaterialVersion; |
| | | materielInfo.MaterielWide = model.Wide; |
| | | materielInfo.WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId; |
| | | BaseDal.UpdateData(materielInfo); |
| | | else |
| | | { |
| | | materielInfo.IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck; |
| | | materielInfo.MaterielCode = model.Code; |
| | | materielInfo.MaterielInvOrgId = model.InvOrgId; |
| | | materielInfo.MaterielLength = model.Length; |
| | | materielInfo.MaterielModel = model.Model; |
| | | materielInfo.MaterielName = model.Name; |
| | | materielInfo.MaterielSize = model.Size; |
| | | materielInfo.MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType.ObjToInt(); |
| | | materielInfo.MaterielSpec = warehouse == null ? "" : model.StandType; |
| | | materielInfo.MaterielState = (EnableEnum)model.State.ObjToInt(); |
| | | materielInfo.MaterielThickness = model.Thickness; |
| | | materielInfo.MaterielType = (MaterielTypeEnum)model.ItemType.ObjToInt(); |
| | | materielInfo.MaterielUnit = model.Unit == null ? "" : model.Unit; |
| | | materielInfo.MaterielVersion = model.MaterialVersion; |
| | | materielInfo.MaterielWide = model.Wide; |
| | | materielInfo.WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId; |
| | | BaseDal.UpdateData(materielInfo); |
| | | } |
| | | |
| | | } |
| | | else if (model.OperateType.ObjToInt() == 2) |
| | | { |
| | |
| | | Dt_SupplierInfo supplierInfo = BaseDal.QueryFirst(x => x.SupplierCode == model.Code); |
| | | if (supplierInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä¾åºåä¿¡æ¯"); |
| | | Dt_SupplierInfo supplierInfoAddNew = new Dt_SupplierInfo() |
| | | { |
| | | Status = 1, |
| | | SupplierCode = model.Code, |
| | | ContactAddress = model.ContactAddress, |
| | | ContactNumber = model.ContactNumber, |
| | | Contacts = model.Contacts, |
| | | Description = model.Description, |
| | | Email = model.Email, |
| | | InvOrgId = model.InvOrgId, |
| | | SupplierName = model.Name, |
| | | SupplierShortName = model.ShortName |
| | | }; |
| | | |
| | | BaseDal.AddData(supplierInfoAddNew); |
| | | } |
| | | supplierInfo.Status = 1; |
| | | supplierInfo.SupplierCode = model.Code; |
| | | supplierInfo.SupplierName = model.Name; |
| | | supplierInfo.SupplierShortName = model.ShortName; |
| | | BaseDal.UpdateData(supplierInfo); |
| | | else |
| | | { |
| | | supplierInfo.Status = 1; |
| | | supplierInfo.SupplierCode = model.Code; |
| | | supplierInfo.SupplierName = model.Name; |
| | | supplierInfo.SupplierShortName = model.ShortName; |
| | | BaseDal.UpdateData(supplierInfo); |
| | | } |
| | | } |
| | | else if (model.OperateType == "2") |
| | | { |
| | |
| | | Dt_UserInfo userInfo = BaseDal.QueryFirst(x => x.Code == model.Code); |
| | | if (userInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥åå·¥å·ã{model.Code}ãä¿¡æ¯"); |
| | | Dt_UserInfo userInfoAddNew = new Dt_UserInfo() |
| | | { |
| | | Code = model.Code, |
| | | DeptName = model.DeptName, |
| | | DeptNo = model.DeptNo, |
| | | InvOrgId = model.InvOrgId, |
| | | Name = model.Name, |
| | | State = model.State |
| | | }; |
| | | Sys_User userAddNew = new Sys_User() |
| | | { |
| | | UserName = userInfo.Code, |
| | | RoleId = 0, |
| | | UserPwd = "TC123456".EncryptDES(AppSecret.User), |
| | | RoleName = "", |
| | | Enable = (byte)userInfo.State, |
| | | LastModifyPwdDate = DateTime.Now, |
| | | Address = "ç³»ç»æå¡å¨", |
| | | TenantId = 0, |
| | | Creater = "ç³»ç»", |
| | | UserTrueName = userInfo.Name, |
| | | }; |
| | | BaseDal.AddData(userInfoAddNew); |
| | | _userRepository.AddData(userAddNew); |
| | | } |
| | | userInfo.State = model.State; |
| | | userInfo.DeptName = model.DeptName; |
| | | userInfo.DeptNo = model.DeptNo; |
| | | userInfo.InvOrgId = model.InvOrgId; |
| | | userInfo.Name = model.Name; |
| | | BaseDal.UpdateData(userInfo); |
| | | else |
| | | { |
| | | userInfo.State = model.State; |
| | | userInfo.DeptName = model.DeptName; |
| | | userInfo.DeptNo = model.DeptNo; |
| | | userInfo.InvOrgId = model.InvOrgId; |
| | | userInfo.Name = model.Name; |
| | | BaseDal.UpdateData(userInfo); |
| | | } |
| | | } |
| | | else if (model.OperateType == "2") |
| | | { |
| | |
| | | [Description("ERPæå订åå®¢æ·æ¥è¯¢æ¥å£è°ç¨")] |
| | | InvokeErpOutProErpSyncApi, |
| | | /// <summary> |
| | | /// ERPæåå
¥åºäº§ååå·é¢ç§¯æ¥è¯¢æ¥å£ |
| | | /// </summary> |
| | | [Description("ERPæåå
¥åºäº§ååå·é¢ç§¯æ¥è¯¢æ¥å£")] |
| | | InvokeProInErpStatic, |
| | | /// <summary> |
| | | /// MES忥æµè¯æ¶å°è´¦ä¿¡æ¯ |
| | | /// </summary> |
| | | [Description("MES忥æµè¯æ¶å°è´¦ä¿¡æ¯")] |
| | |
| | | [Description("MESåæ¥æ¿æåºåº")] |
| | | WMS_MES_MaterialLotaAcept, |
| | | /// <summary> |
| | | /// MESæ¥å£è·åæ¹æ¬¡ä¿¡æ¯ZH |
| | | /// </summary> |
| | | [Description("MESæ¥å£è·åæ¹æ¬¡ä¿¡æ¯ZH")] |
| | | WMS_MES_GetProductByLot, |
| | | /// <summary> |
| | | /// MES忥æååºåº |
| | | /// </summary> |
| | | [Description("MES忥æååºåº")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | /// <summary> |
| | | /// æååºåé¢ç§¯æ¥æ¶è¿å |
| | | /// </summary> |
| | | public class ErpProInErpStaticResponseContent |
| | | { |
| | | /// <summary> |
| | | /// è¿åç |
| | | /// </summary> |
| | | public int Code { get; set; } |
| | | /// <summary> |
| | | /// è¿åä¿¡æ¯ |
| | | /// </summary> |
| | | public string Msg { get; set; } |
| | | /// <summary> |
| | | /// åºåä¿¡æ¯ |
| | | /// </summary> |
| | | public List<ProInStatic> Data { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// åæ° |
| | | /// </summary> |
| | | public class ProInStatic |
| | | { |
| | | /// <summary> |
| | | /// çäº§çæ¬ |
| | | /// </summary> |
| | | public string PartRev { get; set; } |
| | | /// <summary> |
| | | /// ç产åå· |
| | | /// </summary> |
| | | public string PartNum { get; set; } |
| | | /// <summary> |
| | | /// ç®ååºå®ä¸º1 |
| | | /// </summary> |
| | | public string Jbfl { get; set; } |
| | | /// <summary> |
| | | /// åå
é¢ç§¯ |
| | | /// </summary> |
| | | public float UnitArea { get; set; } |
| | | /// <summary> |
| | | /// ç产åå·+çäº§çæ¬ |
| | | /// </summary> |
| | | public string PartNumWithRev { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.Inbound |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class ProInStaticDTO |
| | | { |
| | | public string ProductCode { get; set; } |
| | | public string ProductVersion { get; set; } |
| | | public float SumPcs { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// MESé»çè·åæ¹æ¬¡ç©æä¿¡æ¯ |
| | | /// </summary> |
| | | public class MesSolderModel |
| | | { |
| | | /// <summary> |
| | | /// æå· |
| | | /// </summary> |
| | | public string Product { get; set; } |
| | | /// <summary> |
| | | /// çæ¬ |
| | | /// </summary> |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// æ°é |
| | | /// </summary> |
| | | public float Qty { get; set; } |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// æ¹æ¬¡ |
| | | /// </summary> |
| | | public string LotNo { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦æ»¡Lot |
| | | /// </summary> |
| | | public string IsFullNumber { get; set; } |
| | | } |
| | | } |
| | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPæåå
¥åºäº§ååå·é¢ç§¯æ¥è¯¢ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string InvokeProInErpStatic(string partNum,string partNumWithRev) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeProInErpStatic.ToString()); |
| | | object inObj = new { partNum, partNumWithRev }; |
| | | string request = JsonConvert.SerializeObject(inObj, settings); |
| | | Dictionary<string, string> requestHeader = new Dictionary<string, string> |
| | | { |
| | | { "AccessToken", "TCKJF60B03C07E8E41B0B3CF759B7B01AB81HATC"}, |
| | | }; |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request, headers: requestHeader); |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPæåå
¥åºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | public string InvokeProInApi(ERPProInboundModel inboundModel) |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | string InvokeOutProErpSync(string outProOrderNo); |
| | | /// <summary> |
| | | /// ERPæåå
¥åºäº§ååå·é¢ç§¯æ¥è¯¢ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | string InvokeProInErpStatic(string partNum, string partNumWithRev); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | public interface IProInStatisticsRepository : IRepository<Dt_ProInStatistics> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IProInStatisticsService : IService<Dt_ProInStatistics> |
| | | { |
| | | IProInStatisticsRepository Repository { get; } |
| | | void SaveStatic(MesBagInfoModel mesBagInfoModel); |
| | | WebResponseContent GetMonthProductions(); |
| | | } |
| | | } |
| | |
| | | /// <param name="ProOutNo">åºåºè®¢åå·</param> |
| | | /// <param name="StationCode">ç«å°å°å</param> |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> OutProductTask(int[] keys, string StationCode); |
| | | Task<WebResponseContent> OutProductTask(int[] keys, string StationCode, int Grade); |
| | | /// <summary> |
| | | /// æå使éåºå
¥ä» |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | public class ProInStatisticsRepository : RepositoryBase<Dt_ProInStatistics>, IProInStatisticsRepository |
| | | { |
| | | public ProInStatisticsRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_External.ERPService; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class ProInStatisticsService : ServiceBase<Dt_ProInStatistics, IProInStatisticsRepository>, IProInStatisticsService |
| | | { |
| | | public IProInStatisticsRepository Repository => BaseDal; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | private readonly IBasicRepository _basicRepository; |
| | | public ProInStatisticsService(IProInStatisticsRepository BaseDal, IUnitOfWorkManage unitOfWorkManag,IInvokeERPService invokeERPService,IBasicRepository basicRepository) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManag; |
| | | _invokeERPService = invokeERPService; |
| | | _basicRepository = basicRepository; |
| | | } |
| | | |
| | | public void SaveStatic(MesBagInfoModel mesBagInfoModel) |
| | | { |
| | | List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x=>new { x.ProductCode, x.ProductVersion }).Select(x=>new ProInStaticDTO |
| | | { |
| | | ProductCode= x.Key.ProductCode, |
| | | ProductVersion= x.Key.ProductVersion, |
| | | SumPcs=x.Sum(x => x.OKPCSQTY) |
| | | }).ToList(); |
| | | List<Dt_ProInStatistics> proInStatistics= new List<Dt_ProInStatistics>(); |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==mesBagInfoModel.WarehouseCode); |
| | | foreach (var m in mESBagDetails) |
| | | { |
| | | string response = _invokeERPService.InvokeProInErpStatic(m.ProductCode, m.ProductCode + m.ProductVersion); |
| | | ErpProInErpStaticResponseContent erpProInErpStatic = response.DeserializeObject<ErpProInErpStaticResponseContent>(); |
| | | if (erpProInErpStatic.Code != 200) |
| | | { |
| | | return; |
| | | } |
| | | float adjusted = (float)Math.Round(erpProInErpStatic.Data[0].UnitArea, 3); |
| | | Dt_ProInStatistics inStatistics = new Dt_ProInStatistics() |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | | ProductCode = m.ProductCode, |
| | | ProductRev = m.ProductVersion, |
| | | PcsQty = m.SumPcs, |
| | | SquareMeter = (float)Math.Round((adjusted * m.SumPcs), 3), |
| | | Remark = mesBagInfoModel.BatchNo |
| | | }; |
| | | proInStatistics.Add(inStatistics); |
| | | } |
| | | BaseDal.AddData(proInStatistics); |
| | | } |
| | | /// <summary> |
| | | /// è·åæä»½äº§é |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetMonthProductions() |
| | | { |
| | | WebResponseContent content=new WebResponseContent(); |
| | | try |
| | | { |
| | | DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); |
| | | List<object> list = new List<object>(); |
| | | //æ¬ææ»å¤©æ° |
| | | int daysInMonth = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); |
| | | for (int i = 1; i <= daysInMonth; i++) |
| | | { |
| | | DateTime dateTime = date.AddDays(i); |
| | | //è·åæ°æ® |
| | | var dayProDuctions = BaseDal.QueryData(x => x.CreateDate <= dateTime && x.CreateDate >= dateTime.AddDays(-1)).Sum(x => x.SquareMeter); |
| | | list.Add(new { dateNow= dateTime.AddHours(-1).ToString("yyyy-MM-dd"), dayProDuctions }); |
| | | } |
| | | content.OK("æå",list); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// ä¸ä¼ ERPç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä¸ä¼ ERPç¶æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¸ä¼ ERPç¶æ")] |
| | | public int UpErpStatus { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æåå
¥åºç»è®¡è¡¨ |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProInStatistics), "æåå
¥åºç»è®¡è¡¨")] |
| | | public class Dt_ProInStatistics : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | /// <summary> |
| | | /// 产ååå· |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "产ååå·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产ååå·")] |
| | | public string ProductCode { get; set; } |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "产åçæ¬")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åçæ¬")] |
| | | public string ProductRev { get; set; } |
| | | /// <summary> |
| | | /// PCSæ° |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "PCSæ°")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "PCSæ°")] |
| | | public float PcsQty { get; set; } |
| | | /// <summary> |
| | | /// é¢ç§¯ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "é¢ç§¯(ã¡)")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é¢ç§¯(ã¡)")] |
| | | public float SquareMeter { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "è¶æ¡å·")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
| | |
| | | roadwayNo = location?.RoadwayNo ?? ""; |
| | | break; |
| | | } |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"); |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"+ $"ï¼{locationCounts.Serialize()}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | return content.Error(inProRespone.Message); |
| | | } |
| | | _proInStatisticsService.SaveStatic(bagInfoModel); |
| | | return content.OK(inProRespone.Message); |
| | | } |
| | | else if (isValid) |
| | | { |
| | | |
| | | } |
| | | |
| | | foreach (var item in bagInfoModel.BagDetails) |
| | | { |
| | | if (proDetailsExists.Contains(item.BagNo)) |
| | |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand(); |
| | | |
| | | //ä¸ä¼ ERP |
| | | WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder); |
| | | _proInStatisticsService.SaveStatic(bagInfoModel); |
| | | if (!responseContent.Status) |
| | | { |
| | | mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt(); |
| | |
| | | using System; |
| | | using Newtonsoft.Json.Serialization; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.APIEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | |
| | | return responseContent; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// é²çç«åºå
¥åºåè°ç¨MESæ¥å£è·åæ¹æ¬¡ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="LotNo"></param> |
| | | /// <returns></returns> |
| | | public MesSolderModel? GetProductByLot(string LotNo) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_GetProductByLot.ToString()); |
| | | string requestApi = apiInfo.ApiAddress + "?lotNo=" + LotNo; |
| | | string response = HttpMesHelper.Post(requestApi); |
| | | MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>(); |
| | | //è°ç¨æ¥å£ |
| | | if (mesResponseContent.BSucc == true) |
| | | { |
| | | MesSolderModel? mesSolder= mesResponseContent.Content.ToString()?.DeserializeObject<MesSolderModel>(); |
| | | return mesSolder; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception(mesResponseContent.StrMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | private readonly IPalletTypeInfoRepository _palletTypeInfoRepository; |
| | | private readonly IOutProStockInfoRepository _outProStockInfoRepository; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IProInStatisticsRepository _proInStatisticsRepository; |
| | | private readonly IProInStatisticsService _proInStatisticsService; |
| | | public ITaskRepository Repository => BaseDal; |
| | | |
| | | private Dictionary<string, OrderByType> _taskOrderBy = new() |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository, IInboundOrderService inboundOrderService, IPalletTypeInfoRepository palletTypeInfoRepository, IOutProStockInfoRepository outProStockInfoRepository, IOutboundRepository outboundRepository) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository, IInboundOrderService inboundOrderService, IPalletTypeInfoRepository palletTypeInfoRepository, IOutProStockInfoRepository outProStockInfoRepository, IOutboundRepository outboundRepository, IProInStatisticsRepository proInStatisticsRepository, IProInStatisticsService proInStatisticsService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | |
| | | _palletTypeInfoRepository = palletTypeInfoRepository; |
| | | _outProStockInfoRepository = outProStockInfoRepository; |
| | | _outboundRepository = outboundRepository; |
| | | _proInStatisticsRepository = proInStatisticsRepository; |
| | | _proInStatisticsService = proInStatisticsService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.éåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MESéåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES空æéåº.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.éåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MESéåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES空æéåº.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | } |
| | |
| | | /// <param name="ProOutNo">åºåºè®¢åå·</param> |
| | | /// <param name="StationCode">ç«å°å°å</param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> OutProductTask(int[] keys, string StationCode) |
| | | public async Task<WebResponseContent> OutProductTask(int[] keys, string StationCode, int Grade) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | return await Task.FromResult(content.Error("线ä½è¾å
¥é误")); |
| | | } |
| | | //è·åæååºåºè®¢å |
| | | List<Dt_ProOutOrderDetail> _ProOutOrderDetails = await _outboundRepository.ProOutOrderDetailRepository.QueryDataAsync(x => keys.Contains(x.Id)); |
| | | List<Dt_ProOutOrderDetail> _ProOutOrderDetails = await _outboundRepository.ProOutOrderDetailRepository.QueryDataAsync(x => keys.Contains(x.Id) && x.ProOrderDetailStatus== OrderDetailStatusEnum.New.ObjToInt()); |
| | | if (_ProOutOrderDetails.Count<=0) |
| | | { |
| | | return await Task.FromResult(content.Error("å¾é订åæç»ä¸åå¨")); |
| | | return await Task.FromResult(content.Error("å¾é订åæç»ç¶æä¸ºåºåºä¸")); |
| | | } |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>(); |
| | |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | Dt_Task? task = BaseDal.QueryData(x=>x.TaskType==TaskTypeEnum.OutProduct.ObjToInt()).OrderByDescending(x=>x.Grade).FirstOrDefault(); |
| | | //æ´æ°åºåºç®çä½ç½® |
| | | result.Item1.ForEach(x => |
| | | { |
| | | x.TargetAddress = StationCode; |
| | | if (Grade==1 || task==null) |
| | | { |
| | | x.Grade = 127; |
| | | } |
| | | else |
| | | { |
| | | if (task.Grade==0 || task.Grade==1) |
| | | { |
| | | x.Grade = 1; |
| | | } |
| | | else |
| | | { |
| | | x.Grade = task.Grade - 1; |
| | | } |
| | | } |
| | | }); |
| | | tasks.AddRange(result.Item1); |
| | | } |
| | |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | string groupId = DateTime.Now.ToString("yyyyMMddHHmmss"); |
| | | tasks.ForEach(x => x.OrderNo = proOutOrder.ProOutOrderNo); |
| | | tasks.ForEach(x => x.GroupId = groupId); |
| | | proStockInfos = result.Item1; |
| | | proOutOrderDetails = result.Item2; |
| | | outProStockInfos = result.Item3; |
| | |
| | | public List<Dt_Task> GetTasks(List<Dt_ProStockInfo> stockInfos, TaskTypeEnum taskType) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | for (int i = 0; i < stockInfos.Count; i++) |
| | | string groupId = DateTime.Now.ToString("yyMMddHHmmss"); |
| | | for (int i = 1; i <= stockInfos.Count; i++) |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[i]; |
| | | |
| | | Dt_ProStockInfo stockInfo = stockInfos[i-1]; |
| | | if (i%5==0) |
| | | { |
| | | groupId= DateTime.Now.AddSeconds(i).ToString("yyMMddHHmmss"); |
| | | } |
| | | if (stockInfo != null) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | PalletType = stockInfo.PalletType, |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | GroupId= groupId |
| | | }; |
| | | tasks.Add(task); |
| | | } |
| | |
| | | { |
| | | return _invokeERPService.InvokeOutProErpSync(outProOrderNo); |
| | | } |
| | | /// <summary> |
| | | /// ERPæåå
¥åºäº§ååå·é¢ç§¯æ¥è¯¢ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InvokeProInErpStatic"), AllowAnonymous] |
| | | public string InvokeProInErpStatic(string partNum, string partNumWithRev) |
| | | { |
| | | return _invokeERPService.InvokeProInErpStatic(partNum, partNumWithRev); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | /// <summary> |
| | | /// Mesæåå
¥åºæç» |
| | | /// </summary> |
| | | [Route("api/ProInStatistics")] |
| | | [ApiController] |
| | | public class ProInStatisticsController : ApiBaseController<IProInStatisticsService, Dt_ProInStatistics> |
| | | { |
| | | public ProInStatisticsController(IProInStatisticsService service) : base(service) |
| | | { |
| | | } |
| | | [HttpGet,HttpPost,Route("GetMonthProductions")] |
| | | public WebResponseContent GetMonthProductions() |
| | | { |
| | | return Service.GetMonthProductions(); |
| | | } |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Common.StockEnum; |
| | | using HslCommunication.WebSocket; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.LargeScreen |
| | | { |
| | |
| | | [ApiController] |
| | | public class LargeController : ControllerBase |
| | | { |
| | | //private readonly IOutboundService _outboundService; |
| | | //private readonly ITaskService _taskService; |
| | | //private readonly ITask_HtyService _task_HtyService; |
| | | //private readonly IBasicService _basicService; |
| | | //private readonly IMesProInOrderService _mesProInOrderService; |
| | | //private readonly IOutProStockInfoService _outProStockInfoService; |
| | | //private readonly IProStockInfoDetailService _proStockInfoDetailService; |
| | | //private readonly IProStockInfoService _proStockInfoService; |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITask_HtyService _task_HtyService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IMesProInOrderService _mesProInOrderService; |
| | | private readonly IOutProStockInfoService _outProStockInfoService; |
| | | private readonly WebSocketServer _webSocketServer; |
| | | private readonly IProStockInfoDetailService _proStockInfoDetailService; |
| | | private readonly IProStockInfoService _proStockInfoService; |
| | | |
| | | //public LargeController(IOutboundService outboundService, ITaskService taskService, ITask_HtyService task_HtyService, IBasicService basicService, IMesProInOrderService mesProInOrderService, IOutProStockInfoService outProStockInfoService,IProStockInfoDetailService proStockInfoDetailService, IProStockInfoService proStockInfoService) |
| | | //{ |
| | | // _outboundService = outboundService; |
| | | // _taskService = taskService; |
| | | // _task_HtyService = task_HtyService; |
| | | // _basicService = basicService; |
| | | // _mesProInOrderService = mesProInOrderService; |
| | | // _outProStockInfoService = outProStockInfoService; |
| | | // _proStockInfoDetailService= proStockInfoDetailService; |
| | | // _proStockInfoService=proStockInfoService; |
| | | //} |
| | | public LargeController(IOutboundService outboundService, ITaskService taskService, ITask_HtyService task_HtyService, IBasicService basicService, IMesProInOrderService mesProInOrderService, IOutProStockInfoService outProStockInfoService, IProStockInfoDetailService proStockInfoDetailService, IProStockInfoService proStockInfoService, WebSocketServer webSocketServer) |
| | | { |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | _task_HtyService = task_HtyService; |
| | | _basicService = basicService; |
| | | _mesProInOrderService = mesProInOrderService; |
| | | _outProStockInfoService = outProStockInfoService; |
| | | _proStockInfoDetailService = proStockInfoDetailService; |
| | | _proStockInfoService = proStockInfoService; |
| | | _webSocketServer = webSocketServer; |
| | | } |
| | | /// <summary> |
| | | /// æµè¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PushInfoSocket"), AllowAnonymous] |
| | | public WebResponseContent ProMonthTaskStatistics(string info) |
| | | { |
| | | WebSocketSession[] webSocketSession = _webSocketServer.OnlineSessions; |
| | | if (webSocketSession != null) |
| | | { |
| | | _webSocketServer.SendClientPayload(webSocketSession[0], "åæ"); |
| | | } |
| | | return WebResponseContent.Instance.OK(_webSocketServer.OnlineSessions.Select(x=>x.Url).Serialize()); |
| | | } |
| | | ///// <summary> |
| | | ///// æå彿任å¡ç»è®¡ |
| | | ///// </summary> |
| | |
| | | // try |
| | | // { |
| | | // var list = _proStockInfoDetailService.Repository.QueryData(x => true).GroupBy(x => x.ProductCode).Select(x => new { pCode = x.Key, qtys = x.Sum(x=>x.StockPcsQty) }).OrderByDescending(x=>x.qtys).Take(5); |
| | | |
| | | |
| | | // content.OK("æå", list); |
| | | // } |
| | | // catch (Exception ex) |
| | |
| | | /// <param name="StationCode">ç«å°å°å</param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("OutProductTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent> OutProductTask([FromBody] int[] keys, string StationCode) |
| | | public async Task<WebResponseContent> OutProductTask([FromBody] int[] keys, string StationCode, int Grade) |
| | | { |
| | | return await Service.OutProductTask(keys, StationCode); |
| | | return await Service.OutProductTask(keys, StationCode, Grade); |
| | | } |
| | | /// <summary> |
| | | /// æå使éåºå
¥ä» |
| | |
| | | /// çææåæåºä»»å¡ |
| | | /// </summary> |
| | | [HttpPost, HttpGet, Route("OutProRworkTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent> OutProRworkTask([FromBody] int[] keys, string StationCode) |
| | | public async Task<WebResponseContent> OutProRworkTask([FromBody] int[] keys, string StationCode, int Grade) |
| | | { |
| | | return await Service.OutProductTask(keys, StationCode); |
| | | return await Service.OutProductTask(keys, StationCode, Grade); |
| | | } |
| | | ///// <summary> |
| | | ///// çæMESPPä»å¤§å·åºåºä»»å¡ |