| | |
| | | "fastq": "^1.6.0" |
| | | } |
| | | }, |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | }, |
| | | "@soda/friendly-errors-webpack-plugin": { |
| | | "version": "1.8.0", |
| | | "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz?cache=0&sync_timestamp=1607927406873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Ffriendly-errors-webpack-plugin%2Fdownload%2F%40soda%2Ffriendly-errors-webpack-plugin-1.8.0.tgz", |
| | |
| | | "webpack-chain": "^6.4.0", |
| | | "webpack-dev-server": "^3.11.0", |
| | | "webpack-merge": "^4.2.2" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "@vue/cli-shared-utils": { |
| | |
| | | "lodash-unified": "^1.0.2", |
| | | "memoize-one": "^6.0.0", |
| | | "normalize-wheel-es": "^1.2.0" |
| | | }, |
| | | "dependencies": { |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | } |
| | | } |
| | | }, |
| | | "elliptic": { |
| | |
| | | "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", |
| | | "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", |
| | | "dev": true |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | // axios.defaults.baseURL = 'http://127.0.0.1:9291/'; |
| | | axios.defaults.baseURL = 'http://192.168.35.3:9281/'; |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9291/'; |
| | | //axios.defaults.baseURL = 'http://192.168.35.3:9281/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8098/'; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | // import gridBody from './extend/GetLocationStatus.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let EnableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (EnableBtn) { |
| | | EnableBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/LocationInfo/LocationEnableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | let DisableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (DisableBtn) { |
| | | DisableBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/LocationInfo/LocationDisableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | this.columns.forEach(column => { |
| | | if (column.field == 'palletCode') { |
| | | column.formatter = (row) => { |
| | | //row.palletCode夿æ¯å¦ä¸ºç©ºæundefined |
| | | if (row.palletCode == "" || row.palletCode == undefined) { |
| | | return "æ æç®±"; |
| | | } |
| | | return row.palletCode; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | 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; |
| | |
| | | path: '/packaxis', |
| | | name: 'packaxis', |
| | | component: () => import('@/views/PackInfo/packaxis.vue') |
| | | },{ |
| | | path: '/locationInfo', |
| | | name: 'locationInfo', |
| | | component: () => import('@/views/basicinfo/locationInfo.vue') |
| | | }] |
| | | |
| | | export default viewgird |
| | |
| | | <template> |
| | | <div class="title"> |
| | | <el-row :gutter="20" style="height:85%"> |
| | | <!-- <el-row :gutter="20" style="height:85%"> |
| | | <el-col :span="8"> |
| | | <span style="position: relative; top: 100px;left: 30px;"> |
| | | <h4>䏿¥¼è®¾å¤çæ§</h4> |
| | |
| | | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- å åæº --> |
| | | <div style="position: relative; top: 50px;"> |
| | | <div class="stackerDiv"> |
| | | <div class="stackDivName">ä¸å·å åæº</div> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | </el-row> --> |
| | | </div> |
| | | |
| | | </template> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <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/basicinfo/locationInfo.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "è´§ä½ä¿¡æ¯", |
| | | name: "locationInfo", |
| | | url: "/LocationInfo/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | locationStatus: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | locationCode: "", |
| | | roadwayNo: "", |
| | | locationType: "", |
| | | enableStatus: "", |
| | | locationStatus: "", |
| | | row: "", |
| | | columns: "", |
| | | layer: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like"}, |
| | | { title: "æç®±ç¼å·", field: "palletCode", type: "like"}, |
| | | { title: "ç¦ç¨ç¶æ", field: "enableStatus" ,type: "select",dataKey: "",data: [{key: "0",value: "å¯ç¨"},{key: "3",value: "ç¦ç¨"}]}, |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: []}, |
| | | ], |
| | | [ |
| | | { title: "è¡", field: "row" ,type: "int"}, |
| | | { title: "å", field: "columns" ,type: "int"}, |
| | | { title: "å±", field: "layer" ,type: "int"} |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "areaId", |
| | | // title: "åºå主é®", |
| | | // type: "string", |
| | | // width: 90, |
| | | // align: "left", |
| | | // bind: {key: "areainfo",data: []} |
| | | // }, |
| | | { |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æç®±ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "", data: []}, |
| | | }, |
| | | { |
| | | field: "locationName", |
| | | title: "è´§ä½åç§°", |
| | | type: "string", |
| | | width: 260, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadwayNo", |
| | | title: "å··éç¼å·", |
| | | type: "decimal", |
| | | width: 130, |
| | | align: "left", |
| | | bind: { key: "", data: [] }, |
| | | }, |
| | | { |
| | | field: "row", |
| | | title: "è´§ä½è¡", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "columns", |
| | | title: "è´§ä½å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "layer", |
| | | title: "è´§ä½å±", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationStatus", |
| | | title: "è´§ä½ç¶æ", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "", data: [{key: "0",value: "空é²"},{key: "1",value: "éå®"},{key: "100",value: "æè´§"}] }, |
| | | }, |
| | | { |
| | | field: "enableStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "", data: [{key: "0",value: "å¯ç¨"},{key: "3",value: "ç¦ç¨"}] }, |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | dataKey: "taskType", |
| | | data: [], |
| | | }, |
| | | { title: "RFIDç¼å·", field: "rfidCode", type: "like" }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskState", |
| | |
| | | dataKey: "taskState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" } |
| | | ], |
| | | [ |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | { title: "å··éå·", field: "roadway", type: "like", type: "select",dataKey: "Stacker",data: [],}, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | title: "æç®±ç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "rfidCode", |
| | | title: "RFIDç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | width: 130, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadway", |
| | | title: "å··éå·", |
| | | type: "string", |
| | | width: 150, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "Stacker", data: [] }, |
| | | }, |
| | |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 130, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | |
| | | field: "sourceAddress", |
| | | title: "èµ·å§å°å", |
| | | type: "int", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddress", |
| | | title: "ç®æ å°å", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "currentAddress", |
| | | title: "å½åä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wmsId", |
| | | title: "WMSä»»å¡(䏿¸¸)", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | |
| | | field: "exceptionMessage", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 90, |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | dataKey: "taskType", |
| | | data: [], |
| | | }, |
| | | { title: "RFIDç¼å·", field: "rfidCode", type: "like" }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskState", |
| | | type: "selectList", |
| | | dataKey: "taskState", |
| | | data: [], |
| | | }, |
| | | } |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | { title: "å··éå·", field: "roadway", type: "like", type: "select",dataKey: "Stacker",data: [],}, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | title: "æç®±ç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "rfidCode", |
| | | title: "RFIDç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | width: 130, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadway", |
| | | title: "å··éå·", |
| | | type: "string", |
| | | width: 150, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "Stacker", data: [] }, |
| | | }, |
| | |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 130, |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | |
| | | field: "sourceAddress", |
| | | title: "èµ·å§å°å", |
| | | type: "int", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddress", |
| | | title: "ç®æ å°å", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "currentAddress", |
| | | title: "å½åä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wmsId", |
| | | title: "WMSä»»å¡(䏿¸¸)", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | |
| | | field: "exceptionMessage", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 90, |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | },{ |
| | | field: "operatetype", |
| | | title: "æä½ç±»å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "OperateTypeEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | [Description("ä»»å¡å®æ")] |
| | | COMPLETED, |
| | | /// <summary> |
| | | /// çå¾
æ¾è¡ |
| | | /// </summary> |
| | | [Description("çå¾
æ¾è¡")] |
| | | WAITFEEDBACK, |
| | | /// <summary> |
| | | /// ä»»å¡åæ¶å®æ |
| | | /// </summary> |
| | | [Description("ä»»å¡åæ¶å®æ")] |
| | |
| | | { |
| | | public interface ITaskExecuteDetailService : IService<Dt_TaskExecuteDetail> |
| | | { |
| | | void AddTaskExecuteDetail(int taskId, string description = ""); |
| | | void AddTaskExecuteDetail(Dt_Task task, string description = ""); |
| | | |
| | | WebResponseContent GetDetailInfo(int taskNum); |
| | | |
| | |
| | | /// <param name="taskDTOs">WMSä»»å¡å¯¹è±¡éå</param> |
| | | /// <returns>è¿åå¤çç»æ</returns> |
| | | WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO); |
| | | /// <summary> |
| | | /// 容å¨å
¥åºåå»ºä»»å¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode); |
| | | /// <summary> |
| | | /// ç³è¯·å
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent RequestInTask(string stationCode, string barCode); |
| | | |
| | | /// <summary> |
| | | /// æ´æ°ä»»å¡å¼å¸¸ä¿¡æ¯æ¾ç¤º |
| | |
| | | /// <param name="taskNum">ä»»å¡å·</param> |
| | | /// <returns>è¿åå¤çç»æ</returns> |
| | | WebResponseContent TaskStatusRecovery(int taskNum); |
| | | |
| | | /// <summary> |
| | | /// 忻任å¡ç¶æ |
| | | /// </summary> |
| | |
| | | using System.Text.RegularExpressions; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.APIEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => agvUpdateDTO.ContainerCode==x.PalletCode) ?? throw new Exception($"æªæ¾å°æç®±ã{agvUpdateDTO.ContainerCode}ãä»»å¡"); |
| | | var task = _taskRepository.QueryFirst(x => (agvUpdateDTO.ContainerCode ?? "")==x.PalletCode); |
| | | switch (agvUpdateDTO.MissionStatus) |
| | | { |
| | | case nameof(AGVStatusEnum.PICKER_RECEIVE): |
| | | if (task == null) throw new Exception($"æªæ¾å°æç®±ã{agvUpdateDTO.ContainerCode}ãä»»å¡"); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_TakeFinish); |
| | | break; |
| | | case nameof(AGVStatusEnum.PICKER_SEND): |
| | | //WebResponseContent responseContent = _taskService.AgvTaskFlow(task.PalletCode); |
| | | //if (!responseContent.Status) throw new Exception($"{responseContent.Message}"); |
| | | if (task == null) throw new Exception($"æªæ¾å°æç®±ã{agvUpdateDTO.ContainerCode}ãä»»å¡"); |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | break; |
| | | case nameof(AGVStatusEnum.WAITFEEDBACK): |
| | | //AGVæ¾è¡ |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x=>x.StationType==StationTypeEnum.StationType_OnlyInbound.ObjToInt()); |
| | | if (!stationMangers.Select(x=>x.StationCode).Contains(agvUpdateDTO.CurrentPosition)) |
| | | { |
| | | WebResponseContent responseContent = _taskService.AgvTaskFlow(agvUpdateDTO.MissionCode); |
| | | if (!responseContent.Status) throw new Exception($"{responseContent.Message}"); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºè®¾å¤{stationManger.StationDeviceCode}"); |
| | | } |
| | | CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device; |
| | | string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Replace("\0", ""); |
| | | string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim(); |
| | | if (containerFlowDTO.ContainerCode!= PickBarCode) throw new Exception($"ä¼ å
¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); |
| | | if (containerFlowDTO.Direction=="100") |
| | | { |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | } |
| | | commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode,(short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode); |
| | | content.OK(); |
| | | } |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç³è¯·å
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("RequestInTask"), AllowAnonymous] |
| | | public WebResponseContent RequestInTask(string stationCode, string barCode) |
| | | { |
| | | return Service.RequestInTask(stationCode, barCode); |
| | | } |
| | | [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous] |
| | | public WebResponseContent GetRouteEndPoint(string startPoint, int routeType) |
| | | { |
| | |
| | | [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous] |
| | | public WebResponseContent RecWMSTaskCompleted(int taskNum) |
| | | { |
| | | return Service.RecWMSTaskCompleted(taskNum); |
| | | return Service.TaskCompleted(taskNum); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- |
| | | https://go.microsoft.com/fwlink/?LinkID=208121. |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <DeleteExistingFiles>false</DeleteExistingFiles> |
| | | <ExcludeApp_Data>false</ExcludeApp_Data> |
| | | <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> |
| | | <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
| | | <LastUsedPlatform>Any CPU</LastUsedPlatform> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>bin\Release\net6.0\publish\</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | <_TargetId>Folder</_TargetId> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | }, |
| | | "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",æ£å¼ç¯å¢å°å |
| | | "ApiName": "WIDESEA", |
| | | "ExpMinutes": 120, |
| | | "ExpMinutes": 300, |
| | | "QuartzJobAutoStart": true, |
| | | "WebSocketEnable": false, |
| | | "WebSocketPort": 9260 |
| | |
| | | _taskRepository = taskRepository; |
| | | } |
| | | |
| | | public void AddTaskExecuteDetail(int taskId, string description = "") |
| | | public void AddTaskExecuteDetail(Dt_Task task, string description = "") |
| | | { |
| | | try |
| | | { |
| | | bool isNormal = true; |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskId); |
| | | Dt_Task taskExist = _taskRepository.QueryFirst(x => x.TaskNum == task.TaskNum); |
| | | if (task == null) return; |
| | | int taskNum = task.TaskNum; |
| | | int taskState = task.TaskState; |
| | |
| | | IsManual = App.User?.UserId > 0, |
| | | IsNormal = isNormal, |
| | | TaskNum = taskNum, |
| | | TaskId = taskId, |
| | | TaskId = taskExist.TaskId, |
| | | TaskState = taskState, |
| | | Description = description, |
| | | CurrentAddress = task.CurrentAddress, |
| | |
| | | *----------------------------------------------------------------*/ |
| | | #endregion << ç æ¬ 注 é >> |
| | | using AutoMapper; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using NPOI.SS.Formula.Functions; |
| | | using SqlSugar; |
| | |
| | | using WIDESEAWCS_DTO.Agv; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly IApiInfoRepository _apiInfoRepository; |
| | | private readonly ILocationInfoRepository _locationInfoRepository; |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | |
| | | private Dictionary<string, OrderByType> _taskOrderBy = new() |
| | | { |
| | |
| | | |
| | | public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 1000).ToList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _cacheService = cacheService; |
| | |
| | | _apiInfoRepository = apiInfoRepository; |
| | | _locationInfoRepository = locationInfoRepository; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _locationInfoService = locationInfoService; |
| | | } |
| | | static object lock_taskReceive = new object(); |
| | | /// <summary> |
| | |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(); |
| | | //ä¸åä»»å¡ç» |
| | | string taskGroup= taskDTO.TaskGroupCode.IsNullOrEmpty() ? Guid.NewGuid().ToString().Replace("-","") : taskDTO.TaskGroupCode; |
| | | foreach (var item in taskDTO.Tasks) |
| | | foreach (var item in taskDTO.Tasks.OrderBy(x=>x.ToStationCode)) |
| | | { |
| | | if (item.ToStationCode.IsNullOrEmpty()) throw new Exception($"ä»»å¡{item.TaskCode}åºåºç®æ æä½å°ä¸è½ä¸ºç©º"); |
| | | //è·åæä½å° |
| | |
| | | task.GroupId = taskGroup; |
| | | task.TaskType = TaskTypeEnum.Outbound.ObjToInt(); |
| | | task.Roadway = locationInfo.RoadwayNo; |
| | | task.DeviceCode = "AGV"; |
| | | task.DeviceCode = stationManger.CraneCode; |
| | | task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt(); |
| | | tasks.Add(task); |
| | | } |
| | |
| | | catch (Exception ex) |
| | | { |
| | | content.Error($"任塿¥æ¶é误,é误信æ¯:{ex.Message}"); |
| | | } |
| | | return content; |
| | | } |
| | | static object lock_containerFlow = new object(); |
| | | /// <summary> |
| | | /// 容å¨å
¥åºåå»ºä»»å¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | lock (lock_containerFlow) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData(); |
| | | Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x=>x.PalletCode== containerFlowDTO.ContainerCode); |
| | | if (locationInfo != null) throw new Exception($"æç®±å·{containerFlowDTO.ContainerCode}å·²åå¨"); |
| | | if (BaseDal.QueryFirst(x=>x.PalletCode==containerFlowDTO.ContainerCode)!=null) throw new Exception($"æç®±å·{containerFlowDTO.ContainerCode}ä»»å¡å·²åå¨"); |
| | | Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()); |
| | | if (noInLocation == null) throw new Exception($"å¯ç¨è´§ä½ä¸è¶³!"); |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode); |
| | | //ä¸åä»»å¡ç» |
| | | Dt_Task task = new Dt_Task(); |
| | | task.PalletCode = containerFlowDTO.ContainerCode; |
| | | task.SourceAddress = containerFlowDTO.SlotCode; |
| | | task.CurrentAddress = containerFlowDTO.SlotCode; |
| | | task.NextAddress = stationManger.StationCode; |
| | | task.TargetAddress = ""; |
| | | task.WMSId = ""; |
| | | task.TaskType = TaskTypeEnum.Inbound.ObjToInt(); |
| | | task.Roadway = noInLocation.RoadwayNo; |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | | task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt(); |
| | | //æ·»å ä»»å¡ |
| | | BaseDal.AddData(task); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "å建å
¥åºä»»å¡"); |
| | | content.OK("æå"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error($"é误信æ¯:{ex.Message}"); |
| | | } |
| | | return content; |
| | | } |
| | | static object lock_requestInTask = new object(); |
| | | /// <summary> |
| | | /// ç³è¯·å
¥åº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent RequestInTask(string stationCode,string barCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | lock (lock_requestInTask) |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == barCode && x.NextAddress == stationCode && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt()); |
| | | if (task == null) throw new Exception($"{barCode}æç®±æªæ¾å°ä»»å¡!"); |
| | | Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(); |
| | | if (locationInfo == null) throw new Exception($"å¯ç¨è´§ä½ä¸è¶³!"); |
| | | task.NextAddress = locationInfo.LocationCode; |
| | | task.TargetAddress = locationInfo.LocationCode; |
| | | task.CurrentAddress = stationCode; |
| | | task.DeviceCode = "AGV"; |
| | | task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | //æ´æ°ä»»å¡åè´§ä½æ°æ® |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.UpdateData(task); |
| | | _locationInfoRepository.UpdateData(locationInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, $"åé
è´§ä½{locationInfo.LocationCode}"); |
| | | |
| | | content.OK("æå"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error($"é误信æ¯:{ex.Message}"); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | task.ModifyDate = DateTime.Now; |
| | | BaseDal.UpdateData(task); |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, task.ExceptionMessage); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task, task.ExceptionMessage); |
| | | |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | |
| | | BaseDal.UpdateData(task); |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"人工æ¢å¤æèµ·ä»»å¡,æ¢å¤æèµ·æ¶ä»»å¡ç¶æã{task.TaskState}ã"); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task, $"人工æ¢å¤æèµ·ä»»å¡,æ¢å¤æèµ·æ¶ä»»å¡ç¶æã{task.TaskState}ã"); |
| | | |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | |
| | | BaseDal.UpdateData(task); |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"人工å°ä»»å¡ç¶æä»ã{oldState}ãåæ»å°ã{task.TaskState}ã"); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task, $"人工å°ä»»å¡ç¶æä»ã{oldState}ãåæ»å°ã{task.TaskState}ã"); |
| | | |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | AgvTaskFlowDTO agvTaskFlowDTO = new AgvTaskFlowDTO() |
| | | { |
| | | RequestId = Guid.NewGuid().ToString().Replace("-", ""), |
| | | ContainerCode = code |
| | | MissionCode = code |
| | | }; |
| | | string request = JsonConvert.SerializeObject(agvTaskFlowDTO, settings); |
| | | string response = HttpHelper.Post(url, request); |
| | |
| | | } |
| | | else if(task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//å
¥åºä»»å¡é»è¾ |
| | | { |
| | | string? url = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSInBoundBack.ToString())?.ApiAddress; |
| | | if (string.IsNullOrEmpty(url)) |
| | | //string? url = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSInBoundBack.ToString())?.ApiAddress; |
| | | //if (string.IsNullOrEmpty(url)) |
| | | //{ |
| | | // _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | // UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | // return content.Error($"{taskNum},æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | //} |
| | | //ContainerInFinishDTO containerInFinishDTO = new ContainerInFinishDTO() |
| | | //{ |
| | | // TaskCode= task.TaskNum.ToString(), |
| | | // ContainerCode = task.PalletCode, |
| | | // FromStationCode = task.SourceAddress, |
| | | // ToLocationCode = task.TargetAddress |
| | | //}; |
| | | //string request = JsonConvert.SerializeObject(containerInFinishDTO, settings); |
| | | ////è°ç¨æ¥å£ |
| | | //string response = HttpHelper.Post(url, request); |
| | | //WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ??throw new Exception($"{taskNum},æªæ¥æ¶å°WMSå
¥åºä¸æ¥è¿åå¼"); |
| | | //if (wMSResponse.Code!="0") throw new Exception($"å
¥åºä»»å¡{task.TaskNum}WMSå
¥åºä¸æ¥é误,ä¿¡æ¯:{wMSResponse.Msg}"); |
| | | Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | if (locationInfo.LocationStatus != LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | return content.Error($"{taskNum},æªæ¾å°WMSå
¥åºä¸æ¥æ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | return content.Error($"{locationInfo.LocationCode}è´§ä½ç¶æä¸æ£ç¡®"); |
| | | } |
| | | ContainerInFinishDTO containerInFinishDTO = new ContainerInFinishDTO() |
| | | { |
| | | TaskCode= task.TaskNum.ToString(), |
| | | ContainerCode = task.PalletCode, |
| | | FromStationCode = task.SourceAddress, |
| | | ToLocationCode = task.TargetAddress |
| | | }; |
| | | string request = JsonConvert.SerializeObject(containerInFinishDTO, settings); |
| | | //è°ç¨æ¥å£ |
| | | string response = HttpHelper.Post(url, request); |
| | | WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ??throw new Exception($"{taskNum},æªæ¥æ¶å°WMSå
¥åºä¸æ¥è¿åå¼"); |
| | | if (wMSResponse.Code!="0") throw new Exception($"å
¥åºä»»å¡{task.TaskNum}WMSå
¥åºä¸æ¥é误,ä¿¡æ¯:{wMSResponse.Msg}"); |
| | | task.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | locationInfo.PalletCode = task.PalletCode; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _locationInfoRepository.UpdateData(locationInfo); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.èªå¨å®æ : OperateTypeEnum.äººå·¥å®æ); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | content.OK("ä»»å¡å®æ"); |
| | | } |
| | |
| | | task.TaskState = taskStatus.ObjToInt(); |
| | | } |
| | | BaseDal.UpdateData(task); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, stringBuilder.ToString()); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task, stringBuilder.ToString()); |
| | | } |
| | | } |
| | | } |
| | |
| | | //è·åç®æ ç¹è´§ä½ |
| | | Dt_LocationInfo locationInfoEnd = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.NextAddress); |
| | | //è·å线ä½å
¥åºç«å° |
| | | Dt_StationManger stationMangerStart = _stationMangerRepository.QueryFirst(x => x.PickStationCode == task.CurrentAddress); |
| | | Dt_StationManger stationMangerStart = _stationMangerRepository.QueryFirst(x => x.StationCode == task.CurrentAddress); |
| | | if (locationInfoEnd == null || stationMangerStart == null) throw new Exception($"æªæ¾å°ä»»å¡å·${task.TaskNum}èµ·å§ç¹{task.CurrentAddress}æç®æ ç¹{task.NextAddress}ä½ç½®ä¿¡æ¯"); |
| | | agvTaskSend.RequestId = Guid.NewGuid().ToString().Replace("-", ""); |
| | | agvTaskSend.MissionCode = task.TaskNum.ToString(); |
| | |
| | | StartSlotCode = stationMangerStart.CraneStationCode, |
| | | EndPosition = locationInfoEnd.AgvPoint, |
| | | EndSlotCode = locationInfoEnd.LocationCode, |
| | | TakeActionConfirm = false, |
| | | TakeActionInform = false, |
| | | PutActionConfirm = true, |
| | | PutActionInform = true, |
| | | TakeActionConfirm = true, |
| | | TakeActionInform = true, |
| | | PutActionConfirm = false, |
| | | PutActionInform = false, |
| | | }; |
| | | agvTaskSend.MissionData.Add(missionDataItem); |
| | | //åéAGVä»»å¡ |
| | |
| | | /// </summary> |
| | | R_PickBarCode, |
| | | /// <summary> |
| | | /// æ£éå»å(å) |
| | | /// æ£éå»å/æ£é确认(å) |
| | | /// </summary> |
| | | W_PickToHode, |
| | | /// <summary> |
| | | /// æ£é确认(å) |
| | | /// </summary> |
| | | W_PickResponse, |
| | | W_PickToHode |
| | | } |
| | | } |
| | |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (conveyorLine != null) |
| | | { |
| | | #region ç«å°æ¹å¼ |
| | | |
| | | List<Dt_StationManger> stationManagers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == conveyorLine.DeviceCode); |
| | | |
| | | foreach (var station in stationManagers) |
| | | { |
| | | if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //æ£éç³è¯· |
| | | if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) |
| | | { |
| | | //æ£éç³è¯· |
| | | bool PickRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_PickRequest, station.StationCode); |
| | | if (PickRequest) |
| | | { |
| | | string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Replace("\0", ""); |
| | | string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Trim(); |
| | | //䏿¥WMSæç®±å°è¾¾ |
| | | if (PickBarCode.IsNotEmptyOrNull()) |
| | | { |
| | | WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode); |
| | | //WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode); |
| | | WebResponseContent content = WebResponseContent.Instance.OK(); |
| | | if (content.Status) |
| | | { |
| | | //åå
¥æ£é确认 |
| | | conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode); |
| | | } |
| | | else |
| | | { |
| | | WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥WMSé误ï¼ä¿¡æ¯{content.Message}"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteError(nameof(conveyorLine.DeviceCode), $"{station.StationCode}æ£éç³è¯·ä¸º{PickRequest}æ¡ç 为空å¼"); |
| | | WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}æ£éç³è¯·ä¸º{PickRequest}æ¡ç 为空å¼"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | //å
¥åºç³è¯· |
| | | bool InRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_InRequest, station.StationCode); |
| | | bool InResponse = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.W_InResponse, station.StationCode); |
| | | int InWeight = conveyorLine.GetValue<ConveyorLineDBName, int>(ConveyorLineDBName.R_InWeight, station.StationCode); |
| | | if (InRequest && !InResponse && InWeight>0) |
| | | { |
| | | string InBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_InBarCode, station.StationCode).Trim(); |
| | | //æç®±å°è¾¾ |
| | | if (InBarCode.IsNotEmptyOrNull()) |
| | | { |
| | | //ç³è¯·å
¥åºä»»å¡ |
| | | WebResponseContent content =_taskService.RequestInTask(station.StationCode,InBarCode); |
| | | if (content.Status) |
| | | { |
| | | //åå
¥å
¥åºç¡®è®¤ |
| | | conveyorLine.SetValue(ConveyorLineDBName.W_InResponse, true, station.StationCode); |
| | | } |
| | | else |
| | | { |
| | | WriteError(nameof(conveyorLine.DeviceCode), $"ç«å°{station.StationCode}æç®±{InBarCode}ç³è¯·å
¥åºä»»å¡é误ï¼ä¿¡æ¯{content.Message}"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteError(nameof(conveyorLine.DeviceCode), $"ç«å°{station.StationCode}å
¥åºç³è¯·ä¸º{InRequest}æ¡ç 为空å¼"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | #endregion ç«å°æ¹å¼ |
| | | } |
| | | } |
| | | catch (Exception ex) |