Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
67个文件已修改
13个文件已添加
7个文件已删除
New file |
| | |
| | | { |
| | | "plcAddressBegin":"DB11.0", |
| | | "plcAddressLenght":"80", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | | "codeId": "A06_request_word", |
| | | "addressIndex":"0", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "A05_scanning_ID", |
| | | "addressIndex":"2", |
| | | "addressLenght":"30", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "Current_slot", |
| | | "addressIndex":"36", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "MES_confirmation_word", |
| | | "addressIndex":"38", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "A08_glass_status", |
| | | "addressIndex":"68", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "A10_glass_status", |
| | | "addressIndex":"70", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "A09_prohibit_film_production", |
| | | "addressIndex":"72", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "A10_prohibit_film_production", |
| | | "addressIndex":"74", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "plcAddressBegin":"DB.0", |
| | | "plcAddressLenght":"72", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | | "codeId": "D01Request", |
| | | "addressIndex":"0", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "D01ID1", |
| | | "addressIndex":"2", |
| | | "addressLenght":"6", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D04Request", |
| | | "addressIndex":"8", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D04ID1", |
| | | "addressIndex":"10", |
| | | "addressLenght":"6", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D02Go", |
| | | "addressIndex":"20", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D05Go", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "DeviceStatus", |
| | | "addressIndex":"70", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "plcAddressBegin":"DB1.2000", |
| | | "plcAddressLenght":"100", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | | "codeId": "loadRequest", |
| | | "addressIndex":"0", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "PlcStatus", |
| | | "addressIndex":"10", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "MesToPlc", |
| | | "addressIndex":"20", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "InkageStatus", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "WorkId", |
| | | "addressIndex":"24", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "GlassWidth", |
| | | "addressIndex":"26", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "GlassHeight", |
| | | "addressIndex":"28", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "MesToPlcStatus", |
| | | "addressIndex":"40", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "MesToPlcStatusId", |
| | | "addressIndex":"42", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "MesTaskStatus", |
| | | "addressIndex":"56", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "plcAddressBegin": "DB100.0", |
| | | "plcAddressLenght": "142", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "RequestWord", |
| | | "addressIndex": "0", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ID", |
| | | "addressIndex": "2", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskRequestWord", |
| | | "addressIndex": "4", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ID", |
| | | "addressIndex": "6", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskRequestWord", |
| | | "addressIndex": "8", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G011ID", |
| | | "addressIndex": "10", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "12", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "14", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "16", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "18", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESSendingWord", |
| | | "addressIndex": "20", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InputGrid", |
| | | "addressIndex": "22", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputGrid", |
| | | "addressIndex": "24", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputID", |
| | | "addressIndex": "26", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "FrontOrRearLowerSlice", |
| | | "addressIndex": "28", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "30", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskReply", |
| | | "addressIndex": "32", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06Rack", |
| | | "addressIndex": "34", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskReply", |
| | | "addressIndex": "36", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11Rack", |
| | | "addressIndex": "38", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "40", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "42", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "44", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "46", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "48", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "50", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "52", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "54", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESTaskState", |
| | | "addressIndex": "56", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "58", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "AlarmState", |
| | | "addressIndex": "60", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm1", |
| | | "addressIndex": "62", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm2", |
| | | "addressIndex": "64", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm3", |
| | | "addressIndex": "66", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm4", |
| | | "addressIndex": "68", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "neirong", |
| | | "addressIndex": "70", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "device", |
| | | "addressIndex": "72", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "74", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "76", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut1", |
| | | "addressIndex": "78", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut2", |
| | | "addressIndex": "80", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut3", |
| | | "addressIndex": "82", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut4", |
| | | "addressIndex": "84", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut5", |
| | | "addressIndex": "86", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut6", |
| | | "addressIndex": "88", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut7", |
| | | "addressIndex": "90", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "92", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "94", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "96", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "98", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "100", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ActionState", |
| | | "addressIndex": "102", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05ActionState", |
| | | "addressIndex": "104", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ActionState", |
| | | "addressIndex": "106", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07ActionState", |
| | | "addressIndex": "108", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08ActionState", |
| | | "addressIndex": "110", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09ActionState", |
| | | "addressIndex": "112", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10ActionState", |
| | | "addressIndex": "114", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11ActionState", |
| | | "addressIndex": "116", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12ActionState", |
| | | "addressIndex": "118", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ActionState", |
| | | "addressIndex": "120", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04IDS", |
| | | "addressIndex": "122", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05IDS", |
| | | "addressIndex": "124", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06IDS", |
| | | "addressIndex": "126", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07IDS", |
| | | "addressIndex": "128", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08IDS", |
| | | "addressIndex": "130", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09IDS", |
| | | "addressIndex": "132", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10IDS", |
| | | "addressIndex": "134", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11IDS", |
| | | "addressIndex": "136", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12IDS", |
| | | "addressIndex": "138", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ID", |
| | | "addressIndex": "140", |
| | | "addressLenght": "2" |
| | | } |
| | | ] |
| | | } |
| | |
| | | "sortablejs": "^1.15.1", |
| | | "sweetalert2": "^11.10.7", |
| | | "vue": "^3.3.4", |
| | | "vue-i18n": "^9.11.0", |
| | | "vue-i18n": "^9.13.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | |
| | | "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" |
| | | }, |
| | | "node_modules/@intlify/core-base": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.11.0.tgz", |
| | | "integrity": "sha512-cveOqAstjLZIiyatcP/HrzrQ87cZI8ScPQna3yvoM8zjcjcIRK1MRvmxUNlPdg0rTNJMZw7rixPVM58O5aHVPA==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.13.1.tgz", |
| | | "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", |
| | | "dependencies": { |
| | | "@intlify/message-compiler": "9.11.0", |
| | | "@intlify/shared": "9.11.0" |
| | | "@intlify/message-compiler": "9.13.1", |
| | | "@intlify/shared": "9.13.1" |
| | | }, |
| | | "engines": { |
| | | "node": ">= 16" |
| | | } |
| | | }, |
| | | "node_modules/@intlify/message-compiler": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.11.0.tgz", |
| | | "integrity": "sha512-x31Gl7cscnoI4UUY1yaIy8e7vVMVW1VVlTXZz4SIHKqoSEUkfmgqK8NAx1e7RcoHEbICR7uyCbud0ZL1s4OGXQ==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", |
| | | "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", |
| | | "dependencies": { |
| | | "@intlify/shared": "9.11.0", |
| | | "@intlify/shared": "9.13.1", |
| | | "source-map-js": "^1.0.2" |
| | | }, |
| | | "engines": { |
| | |
| | | } |
| | | }, |
| | | "node_modules/@intlify/shared": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.11.0.tgz", |
| | | "integrity": "sha512-KHSNgi7sRjmSm7aD8QH8WFt9VfKaekJuJ473opbJlkGY3EDnDUU8ikIhG8PbasQbgNvbY3m3tWNGqk2omIdwMA==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.13.1.tgz", |
| | | "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==", |
| | | "engines": { |
| | | "node": ">= 16" |
| | | } |
| | |
| | | } |
| | | }, |
| | | "node_modules/vue-i18n": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.11.0.tgz", |
| | | "integrity": "sha512-vU4gY6lu8Pdfs9BgKGiDAJmFDf88cceR47KcSB0VW4xJzUrXR/7qwqM7A8dQ2nedhoIDxoOm5Ro4pFd2KvJqbA==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | | "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", |
| | | "dependencies": { |
| | | "@intlify/core-base": "9.11.0", |
| | | "@intlify/shared": "9.11.0", |
| | | "@intlify/core-base": "9.13.1", |
| | | "@intlify/shared": "9.13.1", |
| | | "@vue/devtools-api": "^6.5.0" |
| | | }, |
| | | "engines": { |
| | |
| | | "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" |
| | | }, |
| | | "@intlify/core-base": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.11.0.tgz", |
| | | "integrity": "sha512-cveOqAstjLZIiyatcP/HrzrQ87cZI8ScPQna3yvoM8zjcjcIRK1MRvmxUNlPdg0rTNJMZw7rixPVM58O5aHVPA==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.13.1.tgz", |
| | | "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", |
| | | "requires": { |
| | | "@intlify/message-compiler": "9.11.0", |
| | | "@intlify/shared": "9.11.0" |
| | | "@intlify/message-compiler": "9.13.1", |
| | | "@intlify/shared": "9.13.1" |
| | | } |
| | | }, |
| | | "@intlify/message-compiler": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.11.0.tgz", |
| | | "integrity": "sha512-x31Gl7cscnoI4UUY1yaIy8e7vVMVW1VVlTXZz4SIHKqoSEUkfmgqK8NAx1e7RcoHEbICR7uyCbud0ZL1s4OGXQ==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", |
| | | "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", |
| | | "requires": { |
| | | "@intlify/shared": "9.11.0", |
| | | "@intlify/shared": "9.13.1", |
| | | "source-map-js": "^1.0.2" |
| | | } |
| | | }, |
| | | "@intlify/shared": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.11.0.tgz", |
| | | "integrity": "sha512-KHSNgi7sRjmSm7aD8QH8WFt9VfKaekJuJ473opbJlkGY3EDnDUU8ikIhG8PbasQbgNvbY3m3tWNGqk2omIdwMA==" |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.13.1.tgz", |
| | | "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==" |
| | | }, |
| | | "@jridgewell/sourcemap-codec": { |
| | | "version": "1.4.15", |
| | |
| | | } |
| | | }, |
| | | "vue-i18n": { |
| | | "version": "9.11.0", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.11.0.tgz", |
| | | "integrity": "sha512-vU4gY6lu8Pdfs9BgKGiDAJmFDf88cceR47KcSB0VW4xJzUrXR/7qwqM7A8dQ2nedhoIDxoOm5Ro4pFd2KvJqbA==", |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | | "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", |
| | | "requires": { |
| | | "@intlify/core-base": "9.11.0", |
| | | "@intlify/shared": "9.11.0", |
| | | "@intlify/core-base": "9.13.1", |
| | | "@intlify/shared": "9.13.1", |
| | | "@vue/devtools-api": "^6.5.0" |
| | | } |
| | | }, |
| | |
| | | "sortablejs": "^1.15.1", |
| | | "sweetalert2": "^11.10.7", |
| | | "vue": "^3.3.4", |
| | | "vue-i18n": "^9.11.0", |
| | | "vue-i18n": "^9.13.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | |
| | | } |
| | | }); |
| | | |
| | | // const getTableRow = (row,type) =>{ |
| | | // switch (type) { |
| | | // case 'delete':{ |
| | | // let flowData = ref({ |
| | | // id:0, |
| | | // slot:row.slot |
| | | // }) |
| | | // request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass",flowData.value).then((res) => { |
| | | // if(res.code==200){ |
| | | // ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | // router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) |
| | | // }else{ |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }) |
| | | |
| | | // return |
| | | // } |
| | | // } |
| | | // } |
| | | // let slots = ref({ |
| | | // id:0, |
| | | // slot: slot.value |
| | | // }) |
| | | const open = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const deleteResponse = await request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass", { |
| | | id: row.id, |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | | esdId: row.esdId |
| | | }) |
| | | if (response.code == 200) { |
| | | // 删除成功,您可以根据需要处理成功的情况 |
| | | alert('删除成功!'); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | alert('删除失败:' + deleteResponse.message); |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | | // '提示', |
| | | // { |
| | | // confirmButtonText: '是', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning', |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '删除成功!', |
| | | // }) |
| | | // }) |
| | | // .catch(() => { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '删除失败', |
| | | // }) |
| | | // }) |
| | | // } |
| | | // 删除 |
| | | // const handleBindRacka = (row) => { |
| | | // adda.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | | // // 删除 |
| | | // const handleConfirma = async () => { |
| | | // try { |
| | | // window.localStorage.setItem('slot', res.data.slot) |
| | | // let slot = window.localStorage.getItem('slot') |
| | | // const response = await request.post('/cacheGlass/edgStorageCage/edgStorageCageGlass', { |
| | | // slot: slot.value, |
| | | // id: 0 |
| | | // }); |
| | | |
| | | // if (response.code == 200) { |
| | | // // 绑定成功,处理逻辑 |
| | | // ElMessage.success(response.message); |
| | | // adda.value = false; |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理错误 |
| | | // console.error(error); |
| | | // } |
| | | // }; |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | |
| | | } |
| | | }); |
| | | |
| | | // const getTableRow = (row,type) =>{ |
| | | // switch (type) { |
| | | // case 'delete':{ |
| | | // let flowData = ref({ |
| | | // id:0, |
| | | // slot:row.slot |
| | | // }) |
| | | // request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass",flowData.value).then((res) => { |
| | | // if(res.code==200){ |
| | | // ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | // router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) |
| | | // }else{ |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }) |
| | | |
| | | // return |
| | | // } |
| | | // } |
| | | // } |
| | | // let slots = ref({ |
| | | // id:0, |
| | | // slot: slot.value |
| | | // }) |
| | | const open = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '是否报缺该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const deleteResponse = await request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass", { |
| | | id:0, |
| | | slot: row.slot |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | | esdId: row.esdId |
| | | }) |
| | | if (response.code == 200) { |
| | | // 删除成功,您可以根据需要处理成功的情况 |
| | | alert('删除成功!'); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | alert('删除失败:' + deleteResponse.message); |
| | | ElMessage.error(response.msg); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | | // '提示', |
| | | // { |
| | | // confirmButtonText: '是', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning', |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '删除成功!', |
| | | // }) |
| | | // }) |
| | | // .catch(() => { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '删除失败', |
| | | // }) |
| | | // }) |
| | | // } |
| | | // 删除 |
| | | // const handleBindRacka = (row) => { |
| | | // adda.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | | // // 删除 |
| | | // const handleConfirma = async () => { |
| | | // try { |
| | | // window.localStorage.setItem('slot', res.data.slot) |
| | | // let slot = window.localStorage.getItem('slot') |
| | | // const response = await request.post('/cacheGlass/edgStorageCage/edgStorageCageGlass', { |
| | | // slot: slot.value, |
| | | // id: 0 |
| | | // }); |
| | | |
| | | // if (response.code == 200) { |
| | | // // 绑定成功,处理逻辑 |
| | | // ElMessage.success(response.message); |
| | | // adda.value = false; |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理错误 |
| | | // console.error(error); |
| | | // } |
| | | // }; |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | > |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | :key="rect.glass_id" |
| | | class="rect" |
| | | @click="handleBind" |
| | | :style="{ position: 'absolute', top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | @click="showDialog(rect.glass_id)" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: getRectColor(rect.glass_state) |
| | | }" |
| | | > |
| | | <!-- 箭头 --> |
| | | <!-- <div id="arrow"></div> |
| | |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> |
| | | <!-- <template #footer> --> |
| | | <!-- <div id="dialog-footer"> --> |
| | | <el-button type="warning" plain :icon="Delete" @click="handle" style="width: 120px;margin-left: 10px;"> |
| | | <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 120px;margin-left: 10px;"> |
| | | 破损 |
| | | </el-button> |
| | | <el-button type="danger" plain @click="blind = false" style="width: 120px;margin-top: 10px;"> |
| | | <el-button type="danger" plain @click="handleManualTake(currentGlassId)" style="width: 120px;margin-top: 10px;"> |
| | | <el-icon class="el-icon--right"><Upload /></el-icon> |
| | | 人工拿走</el-button> |
| | | <!-- </div> --> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { Delete, Upload } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { ref, onMounted } from 'vue'; |
| | | import request from "@/utils/request" |
| | | const blind = ref(false) |
| | | const olWidth = ref(); |
| | | const olHeight = ref(); |
| | | const process_id = ref(); // 用于存储process_id的响应式引用 |
| | | const glass_id = ref(); |
| | | // const rects = ref([]); // 用于存储矩形数据的响应式引用 |
| | | const currentGlassId = ref(null); // 存储当前点击矩形的 glass_id |
| | | const adjustedRects = ref([]); |
| | | const handleBind = (row) => { |
| | | |
| | | blind.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // const handleBind = (row) => { |
| | | // blind.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | | // 显示对话框并设置当前 glass_id |
| | | function showDialog(glassId: number) { |
| | | currentGlassId.value = glassId; |
| | | blind.value = true; |
| | | } |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheGlass/taskCache/currentCutTerritory'); // 替换为你的API端点 |
| | |
| | | // const process_id = response.data[0].process_id |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { olWidth: newolWidth, olHeight: newolHeight, process_id: newprocess_id } = response.data; // 获取尺寸 |
| | | const { olWidth: newolWidth, olHeight: newolHeight, process_id: newprocess_id ,glass_id:newglass_id } = response.data; // 获取尺寸 |
| | | olWidth.value = newolWidth; // 设置容器宽度 |
| | | olHeight.value = newolHeight; // 设置容器高度 |
| | | process_id.value = newprocess_id; |
| | | glass_id.value = newglass_id; |
| | | |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | |
| | | y_axis: (rect.y_axis*100) * 0.005, |
| | | width: (rect.width*100) * 0.004 , |
| | | height:( rect.height*100) * 0.004 , |
| | | glass_state: rect.glass_state |
| | | })); |
| | | |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | // 破损 |
| | | const handleDamage = async () => { |
| | | try { |
| | | var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+201; |
| | | console.log(url); |
| | | const response = await request.post(url) |
| | | // const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | // identId: currentGlassId.value, |
| | | // controlsId: 201, |
| | | // }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | blind.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // // 人工拿走 |
| | | const handleManualTake = async () => { |
| | | try { |
| | | var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+200; |
| | | console.log(url); |
| | | const response = await request.post(url) |
| | | // const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | // identId: currentGlassId.value, |
| | | // controlsId: 200, |
| | | // }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | blind.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | function getRectColor(state: number): string { |
| | | switch (state) { |
| | | case 0: |
| | | return '#e1f3d8'; |
| | | case 100: |
| | | return '#c8c9cc'; |
| | | case 110: |
| | | return '#b3e19d'; |
| | | case 120: |
| | | return '#f89898'; |
| | | case 200: |
| | | return 'lightblue'; |
| | | case 201: |
| | | return '#f3d19e'; |
| | | default: |
| | | return '#911005'; // 默认颜色 |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | |
| | | const router = useRouter() |
| | | import type { TableColumnCtx } from 'element-plus' |
| | | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | const dialogFormVisible = ref(false) |
| | | const blind = ref(false) |
| | |
| | | const flakea = ref(false) |
| | | // const value = ref('') |
| | | import request from "@/utils/request" |
| | | |
| | | const ida = ref(null); |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | |
| | | let ruleForm = ref({ |
| | | // engineeringId: '', |
| | | projectNo: '', |
| | | workstationId: '', |
| | | patternHeigth: '', |
| | | patternHeight: '', |
| | | patternWidth: '', |
| | | filmsId: '', |
| | | patternThickness: '', |
| | |
| | | } |
| | | }; |
| | | request.get("/loadGlass/LoadGlass/list").then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code === 200) { |
| | | console.log(res.data); |
| | | tableDataa.value = res.data |
| | | window.localStorage.setItem('patternWidth', res.data.patternWidth) |
| | | window.localStorage.setItem('workstationId', res.data.workstationId) |
| | | let workstationIda = window.localStorage.getItem('workstationId') |
| | | let patternWidth = window.localStorage.getItem('patternWidth') |
| | | if (patternWidth !== '' || workstationIda == '1') { |
| | | flake.value = true |
| | | } else if (patternWidth !== '' || workstationIda == '2') { |
| | | flakea.value = true |
| | | tableDataa.value = res.data; |
| | | |
| | | if (tableDataa.value.length === 2) { |
| | | if (tableDataa.value[0].patternWidth > 0) { |
| | | flake.value = true; |
| | | } |
| | | |
| | | if (tableDataa.value[1].patternWidth > 0) { |
| | | flakea.value = true; |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | ElMessage.warning(res.msg); |
| | | // router.push("/login"); |
| | | } |
| | | }); |
| | | // request.get("/loadGlass/LoadGlass/list").then((res) => { |
| | | // window.localStorage.setItem('patternWidth', res.data.patternWidth) |
| | | // window.localStorage.setItem('workstationId', res.data.workstationId) |
| | | // if (res.code == 200) { |
| | | // console.log(res.data); |
| | | // tableDataa.value = res.data |
| | | // console.log(res.data.patternWidth); |
| | | |
| | | // let workstationId = window.localStorage.getItem('workstationId') |
| | | // let patternWidth = window.localStorage.getItem('patternWidth') |
| | | // if (patternWidth !== '' || workstationId == '1') { |
| | | // flake.value = true |
| | | // } else if (patternWidth !== '' || workstationId == '2') { |
| | | // flakea.value = true |
| | | // } |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // // router.push("/login") |
| | | // } |
| | | // }); |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | |
| | | }) |
| | | const titleSelectJsona = ref({ |
| | | processTypea: [], |
| | | |
| | | }) |
| | | // const getBasicData = ref({ |
| | |
| | | }; |
| | | // 响应式数据 |
| | | const selectedProjectNo = ref(''); // 当前选中的工程号 |
| | | const selectedProjectNoa = ref(''); // 当前选中的工程号 |
| | | const options = ref<any[]>([]); // 下拉选项列表 |
| | | |
| | | // 调用接口获取选项数据的函数 |
| | |
| | | |
| | | if (response.code == 200) { |
| | | titleSelectJson.value.processType = response.data; |
| | | |
| | | // titleSelectJson.value.processType = response.data(item => ({ |
| | | // // options.value = response.data.data.map(item => ({ |
| | | // value: item.projectNo, |
| | | // // label: item.id // 假设后端返回的数据中有 字段作为显示标签 |
| | | // })); |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | // 开始上片下拉选 |
| | | const fetchOptionsa = async (queryString: string) => { |
| | | try { |
| | | // 发送请求到后端接口 |
| | | const response = await request.get('/loadGlass/engineering/engineering/selectTask'); |
| | | if (response.code == 200) { |
| | | titleSelectJsona.value.processTypea = response.data; |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | // 处理用户输入变化的方法 |
| | | const handleInputChange = async (value: string) => { |
| | | if (value) { |
| | |
| | | options.value = []; // 清空选项列表 |
| | | } |
| | | }; |
| | | |
| | | // 处理用户输入变化的方法 |
| | | const handleInputChangea = async (value: string) => { |
| | | if (value) { |
| | | await fetchOptionsa(value); |
| | | } else { |
| | | options.value = []; // 清空选项列表 |
| | | } |
| | | }; |
| | | // 初始化加载数据(如果需要) |
| | | onMounted(() => { |
| | | // 在组件挂载后调用 fetchOptions('') 来加载初始数据(如果需要) |
| | | fetchOptions(''); |
| | | }); |
| | | |
| | | onMounted(() => { |
| | | // 在组件挂载后调用 fetchOptions('') 来加载初始数据(如果需要) |
| | | fetchOptionsa(''); |
| | | }); |
| | | // const billall = () => { |
| | | // request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | // .then((res: any) => { |
| | |
| | | // } |
| | | const user = ref(''); |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | projectNo:'', |
| | | }) |
| | | // const engineeringId = ref(''); |
| | | // let titleUploadData = ref({ |
| | | // projectNo:'', |
| | | // }) |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | | const patternHeigth = ref(''); |
| | | const id = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | |
| | | // 添加 |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | ida.value = row.id; |
| | | console.log(ida.value); |
| | | add.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 添加 |
| | | const handleConfirm = async () => { |
| | | console.log(ida.value); |
| | | // console.log('id.value:', id.value); |
| | | if ((ida.value === 2 || ida.value === 4) && (parseInt(patternHeight.value, 10) >= 2700 )) { |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | id: workstationId.value, |
| | | workstationId: workstationId.value, |
| | | patternHeigth: patternHeigth.value, |
| | | patternHeight: patternHeight.value, |
| | | patternWidth: patternWidth.value, |
| | | filmsId: filmsId.value, |
| | | patternThickness: patternThickness.value, |
| | | number: number.value |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | window.location.reload() |
| | | add.value = false; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else if( ida.value === 1 || ida.value === 3){ |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | id: workstationId.value, |
| | | workstationId: workstationId.value, |
| | | patternHeight: patternHeight.value, |
| | | patternWidth: patternWidth.value, |
| | | filmsId: filmsId.value, |
| | | patternThickness: patternThickness.value, |
| | | number: number.value |
| | | }); |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | window.location.reload() |
| | | add.value = false; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | flake.value = true |
| | | } else if (workstationId == '2'){ |
| | | flakea.value = true |
| | | } |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '第二行和第四行的高必须大于2700才能保存!', |
| | | }) |
| | | } |
| | | |
| | | }; |
| | | // 删除 |
| | | const handleConfirma = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | workstationId: workstationId.value, |
| | | patternHeigth: 0, |
| | | patternHeight: 0, |
| | | patternWidth: 0, |
| | | filmsId: "", |
| | | patternThickness: 0, |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 开始上片 |
| | | const handle = async () => { |
| | | // 选择工程确认 |
| | | const handleup = async () => { |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | console.log(engineeringId); |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineeringId: engineeringId, |
| | | state: 1, |
| | | const response = await request.post('/loadGlass/up-patten-usage/saveUpPattenUsage', { |
| | | engineerId: selectedProjectNo.value, |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | blind.value = false; |
| | | window.location.reload() |
| | | dialogFormVisible.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '工程号不能为空!', |
| | | }) |
| | | } |
| | | } |
| | | catch (error) { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 开始上片 |
| | | const handle = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineerId: selectedProjectNoa.value, |
| | | state: 1, |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | window.location.reload() |
| | | blind.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // const handle = async () => { |
| | | // try { |
| | | // let engineeringId = window.localStorage.getItem('engineeringId') |
| | | // console.log(engineeringId); |
| | | // if (engineeringId !== '') { |
| | | // const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | // engineeringId: engineerId.va, |
| | | // state: 1, |
| | | // }) |
| | | // if (response.code == 200) { |
| | | // // 绑定成功,处理逻辑 |
| | | // ElMessage.success(response.message); |
| | | // blind.value = false; |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } |
| | | // else { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '工程号不能为空!', |
| | | // }) |
| | | // } |
| | | // } |
| | | // catch (error) { |
| | | // // 处理错误 |
| | | // console.error(error); |
| | | // } |
| | | // } |
| | | // 暂停 |
| | | const handlea = async () => { |
| | | try { |
| | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | window.location.reload() |
| | | blinda.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 开始上片 |
| | | // 停止任务 |
| | | const handleb = async () => { |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | window.location.reload() |
| | | blindb.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | |
| | | } |
| | | } |
| | | onMounted(fetchTableData); |
| | | function getStatusText(state: number) { |
| | | switch (state) { |
| | | case 0: |
| | | return '等待中'; |
| | | case 1: |
| | | case 2: |
| | | return '上片中'; |
| | | case 100: |
| | | return '已完成'; |
| | | default: |
| | | return '未知状态'; |
| | | } |
| | | } |
| | | |
| | | function getStatusType(state: number) { |
| | | // 这里假设只有100时类型不是success,其他都是success |
| | | return state === 100 ? 'info' : 'success'; // 根据需要调整类型 |
| | | } |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | |
| | | |
| | | blindb.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 添加 |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | add.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 删除 |
| | | const handleBindRacka = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | |
| | | prop="state" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.state==1?"就绪":"未就绪" }}</el-tag> |
| | | <el-tag :type="getStatusType(scope.row.state)"> |
| | | {{ getStatusText(scope.row.state) }} |
| | | </el-tag> |
| | | </template> |
| | | <!-- <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.state==0?"等待中":"上片中" }}</el-tag> |
| | | </template> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | </el-card> |
| | | <el-dialog v-model="blind" top="30vh" width="25%" title="是否开始上片?" > |
| | | <el-dialog v-model="blind" top="24vh" width="30%" title="是否开始上片?" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select |
| | | v-model="selectedProjectNoa" |
| | | filterable |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 220px" |
| | | @input="handleInputChangea" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJsona['processTypea']" |
| | | :key="item.id" |
| | | :label="item.engineerId" |
| | | :value="item.engineerId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handle"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- <el-dialog v-model="blind" top="30vh" width="25%" title="是否开始上片?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handle"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="blind = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> --> |
| | | <el-dialog v-model="blinda" top="30vh" width="25%" title="是否暂停?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <el-table-column prop="patternWidth" align="center" label="宽" min-width="80" /> |
| | | <el-table-column prop="patternHeigth" align="center" label="长" min-width="80" /> |
| | | <el-table-column prop="patternHeight" align="center" label="长" min-width="80" /> |
| | | <el-table-column prop="filmsId" align="center" label="膜系" min-width="80" /> |
| | | <el-table-column prop="number" align="center" label="数量" min-width="80" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="150"> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input v-model="patternHeigth" autocomplete="off" /> |
| | | <el-input v-model="patternHeight" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select v-model="getBasicData.projectNo" clearable placeholder="请选择工程" style="width: 220px" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisible = false"> |
| | | <el-button type="primary" @click="handleup"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | | <g v-for="(rack, index) in racks" :key="index" :data="tableData"> |
| | | <rect |
| | | :x="rack.x" |
| | | :y="rack.y" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, watchEffect } from 'vue'; |
| | | import Swal from 'sweetalert2' |
| | | |
| | | const racks = [ |
| | | import request from "@/utils/request"; |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ]; |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | |
| | | ]); |
| | | |
| | | watchEffect(() => { |
| | | // 触发数据变化时重新渲染 |
| | | }); |
| | | |
| | | |
| | | const calculateItemXPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | if (index === 0 ) { |
| | | return rack.x; |
| | | } else if (index === 2 || index === 3) { |
| | | } else if (index === 1 ) { |
| | | return rack.x + rack.width - item.width; |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; |
| | |
| | | }; |
| | | |
| | | const calculateItemYPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | if (index === 0 ) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else if (index === 2 || index === 3) { |
| | | } else if (index === 1) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | }; |
| | | |
| | | |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.get('unLoadGlass/downWorkStation/getwo'); |
| | | |
| | | if (response.code === 200) { |
| | | console.log(response); |
| | | // 遍历响应数据并替换racks数组中的item属性 |
| | | response.data.forEach((itemData, index) => { |
| | | if (index < racks.value.length) { |
| | | const rack = racks.value[index]; |
| | | const newItem = { |
| | | content: itemData.item.content, |
| | | fillColor: itemData.item.fillColor, |
| | | width: itemData.item.width === 0 ? "" : 10, |
| | | height: itemData.item.height === 0 ? "" : 90 |
| | | }; |
| | | |
| | | if (index === 2 && itemData.item.width > 0) { |
| | | newItem.width = 100; |
| | | newItem.height = 20; |
| | | } |
| | | |
| | | rack.item = newItem; |
| | | |
| | | console.log(racks.value); // 打印更新后的 racks 值 |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | fetchFlowCardId() |
| | | // setTimeout(fetchFlowCardId(),1000); |
| | | //setInterval(fetchFlowCardId, 2000) |
| | | |
| | | |
| | | const showCustomAlert = (content) => { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | |
| | | :height="rack.item.height" |
| | | :fill="rack.item.fillColor" |
| | | /> |
| | | <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 6 }}号工位</text> |
| | | <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 4 }}号工位</text> |
| | | <text :x="rack.x + rack.width / 2" :y="rack.y + rack.height + 20" text-anchor="middle">{{ rack.item.content }}</text> |
| | | </g> |
| | | </g> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, watchEffect } from 'vue'; |
| | | import Swal from 'sweetalert2' |
| | | import request from "@/utils/request"; |
| | | |
| | | const racks = [ |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ]; |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | |
| | | ]); |
| | | |
| | | watchEffect(() => { |
| | | // 触发数据变化时重新渲染 |
| | | }); |
| | | // 计算元素位置的函数 |
| | | const calculateItemXPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | if (index === 0) { |
| | | return rack.x; |
| | | } else if (index === 2 || index === 3) { |
| | | } else if (index === 1) { |
| | | return rack.x + rack.width - item.width; |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; |
| | |
| | | }; |
| | | |
| | | const calculateItemYPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | if (index === 0) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else if (index === 2 || index === 3) { |
| | | } else if (index === 1) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | }; |
| | | |
| | | const showCustomAlert = (content) => { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.get('unLoadGlass/downWorkStation/getwo2'); |
| | | |
| | | if (response.code === 200) { |
| | | console.log(response); |
| | | // 遍历响应数据并替换racks数组中的item属性 |
| | | response.data.forEach((itemData, index) => { |
| | | if (index < racks.value.length) { |
| | | const rack = racks.value[index]; |
| | | const newItem = { |
| | | content: itemData.item.content, |
| | | fillColor: itemData.item.fillColor, |
| | | width: itemData.item.width === 0 ? "" : 10, |
| | | height: itemData.item.height === 0 ? "" : 90 |
| | | }; |
| | | |
| | | if (index === 2 && itemData.item.width > 0) { |
| | | newItem.width = 100; |
| | | newItem.height = 20; |
| | | } |
| | | |
| | | rack.item = newItem; |
| | | |
| | | console.log(racks.value); // 打印更新后的 racks 值 |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | fetchFlowCardId() |
| | | |
| | | // const showCustomAlert = (content) => { |
| | | // var str="架号 : 111\n" + |
| | | // "长 : 111\n" + |
| | | // "宽 : 111\n" + |
| | | // "厚 : 111\n"+ |
| | | // "玻璃ID : 111\n"+ |
| | | // "膜系 : 111\n"; |
| | | |
| | | // Swal.fire({ |
| | | // title: '玻璃信息', |
| | | // html: '<pre>' + str + '</pre>', |
| | | // customClass: { |
| | | // popup: 'format-pre' |
| | | // } |
| | | // }); |
| | | // }; |
| | | |
| | | const showRectInfo = (rectInfo) => { |
| | | const content = rectInfo.item.content; |
| | | showCustomAlert(content); |
| | |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import request from "@/utils/request"; |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | |
| | |
| | | const workstationId = ref(''); |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref([]); |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | // 方法 |
| | | const handleSelectionChange = () => { |
| | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | console.log('绑定成功'); |
| | | |
| | | ElMessage.success(response.message); |
| | | updatePageData(); |
| | | dialogFormVisiblea.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | const updatePageData = () => { |
| | | // 假设你的页面上有一个名为 tableData 的 Vue 组件 |
| | | // 你可以直接更新 tableData 的数据 |
| | | fetchTableData() |
| | | |
| | | // 使用 $forceUpdate() 强制更新组件 |
| | | |
| | | }; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | |
| | | <version>1.4.2</version> |
| | | </dependency> |
| | | |
| | | <!--引入redis,排除lettuce的引用--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>io.lettuce</groupId> |
| | | <artifactId>lettuce-core</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | |
| | | <!-- 引入Jedis客戶端--> |
| | | <dependency> |
| | | <groupId>redis.clients</groupId> |
| | | <artifactId>jedis</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>sqljdbc4</artifactId> |
| | | <version>4.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | * 卧式理片笼详情表玻璃状态 |
| | | * 进片任务1 |
| | | * 出片任务2 |
| | | * 出片任务2 |
| | | */ |
| | | public static final Integer GLASS_CACHE_TYPE_IN = 1; |
| | | public static final Integer GLASS_CACHE_TYPE_OUT = 2; |
| | | public static final Integer GLASS_CACHE_TYPE_THROUGH = 3; |
| | | |
| | | /** |
| | | * 磨边任务玻璃状态 |
| | | * 进片任务1 |
| | | * 出片任务2 |
| | | */ |
| | | public static final Integer EDG_GLASS_BEFORE = 0; |
| | | public static final Integer EDG_GLASS_START = 1; |
| | | public static final Integer EDG_GLASS_SUCCESS = 2; |
| | | |
| | | } |
| | |
| | | if (addressLength < 2) { |
| | | return null; |
| | | } |
| | | int wordindex = index; |
| | | int wordindex = Integer.parseInt(stringdatas[1]) + index; |
| | | return stringdatas[0] + "." + wordindex; |
| | | /* if (addressLength == 2) { |
| | | |
| | |
| | | |
| | | |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | |
| | | public class EngineeringController { |
| | | @Autowired |
| | | private EngineeringService engineeringService; |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | |
| | | @ApiOperation("开始/暂停任务/传递工程号和状态,开始是1 暂停是0") |
| | | @PostMapping("/changeTask") //调用上片任务 |
| | | @ResponseBody |
| | | public Result <Engineering> changeTask(String projectId , Integer state) { |
| | | boolean work=engineeringService.changeTask(projectId,state); |
| | | log.info("开始任务返回:{}", work); |
| | | return Result.build(200, "",null); |
| | | public Result <List<UpPattenUsage>> changeTask(@RequestBody Engineering engineering) { |
| | | boolean work=engineeringService.changeTask(engineering.getEngineerId(),engineering.getState()); |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(); |
| | | log.info("StartorStop:{},{}", work,engineering); |
| | | return Result.build(200, engineering.getEngineerId(),glass); |
| | | } |
| | | |
| | | @ApiOperation("查询可以上片的工程号") |
| | | @GetMapping("/selectTask") //调用上片任务 |
| | | @ResponseBody |
| | | public Result <List<Engineering>> selectTask() { |
| | | List<Engineering> engineering=engineeringService.selectTask(); |
| | | log.info("可领取任务返回:{}", engineering); |
| | | return Result.build(200, "",engineering); |
| | | } |
| | | } |
| | | |
| | |
| | | public interface EngineeringService extends IService<Engineering> { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 开始/暂停任务 |
| | | * @return boolean |
| | | */ |
| | | boolean changeTask(String projectId, Integer state); |
| | | |
| | | |
| | | /** |
| | | * 查询钢化信息 |
| | | * @return List<Engineering> |
| | | */ |
| | | List<Engineering> selectEngineering(String engineeringId); |
| | | |
| | | void saveEngineering(List<Engineering> engineerings); |
| | | |
| | | /** |
| | | * 保存钢化信息 |
| | | */ |
| | | void saveEngineering(List<Engineering> engineering); |
| | | /** |
| | | * 查询是否有上片任务 |
| | | * @return Engineering |
| | | */ |
| | | Engineering selectInitiate(Integer state); |
| | | |
| | | List<Engineering> selectTask(); |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | OptimizeProjectMapper optimizeProjectMapper; |
| | | @Autowired |
| | | private EngineeringMapper engineeringMapper; |
| | | |
| | | //开始/暂停任务 |
| | | @Override |
| | | public boolean changeTask(String projectId, Integer state) { |
| | | //使用projectId作为条件修改state字段 |
| | | //暂停正在进行工程 |
| | | LambdaUpdateChainWrapper<Engineering> pauseWrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper()); |
| | | pauseWrapper.set(Engineering::getState,0); |
| | | pauseWrapper.eq(Engineering::getState,1); |
| | | pauseWrapper.update(); |
| | | //使用projectId作为条件开始工程 |
| | | LambdaUpdateChainWrapper<Engineering> wrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper()); |
| | | wrapper.set(Engineering::getState,state); |
| | | wrapper.eq(Engineering::getEngineerId,projectId); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void saveEngineering(List<Engineering> engineerings) { |
| | | this.saveBatch(engineerings); |
| | | public void saveEngineering(List<Engineering> engineering) { |
| | | this.saveBatch(engineering); |
| | | //保存钢化工程信息 |
| | | } |
| | | |
| | |
| | | return this.getOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Engineering> selectTask() { |
| | | //查询可开始任务的工程 |
| | | QueryWrapper<Engineering> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state", 0); |
| | | return engineeringMapper.selectList(wrapper); |
| | | } |
| | | |
| | | } |
| | |
| | | * @since 2024-04-29 |
| | | */ |
| | | public interface GlassInfoService extends MPJBaseService<GlassInfo> { |
| | | |
| | | /** |
| | | * 查询小片表 |
| | | * @return List<GlassInfo> |
| | | */ |
| | | List<GlassInfo> selectGlassInfo(String engineeringId); |
| | | |
| | | /** |
| | | * 保存小片表 |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @ApiOperation("显示工程选择信息") |
| | | @PostMapping("/listByState") //显示工程选择信息 |
| | | @ResponseBody |
| | | public Result<List<OptimizeProject>> listByState(@RequestBody OptimizeRequest optimizeRequest) { |
| | | log.info("将请求参数封装在请求类里面"); |
| | | List<OptimizeProject> glass = optimizeProjectService.listByState(optimizeRequest); |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | |
| | | |
| | | /** |
| | | * 查询可领取的任务工程信息 |
| | | * @return |
| | | * @return List<OptimizeProject> |
| | | */ |
| | | List<OptimizeProject> listByState(OptimizeRequest optimizeRequest); |
| | | /** |
| | | * 将工程信息保存到原片使用详情表 |
| | | * @return |
| | | */ |
| | | void insetupPattenUsage(List<OptimizeProject> glass); |
| | | |
| | | /** |
| | | * 将工程信息更新状态为已领取 |
| | | * @return |
| | | */ |
| | | void changeTask(String engineeringId, int i); |
| | | } |
| | |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insetupPattenUsage(List<OptimizeProject> glass) { |
| | | log.info("循环查询结果保存到UpPattenUsage表中"); |
| | | for (OptimizeProject project : glass) { |
| | | UpPattenUsage upPattenUsage = new UpPattenUsage(); |
| | | upPattenUsage.setEngineeringId(project.getProjectNo()); |
| | | upPattenUsage.setFilmsId(project.getGlassType()); |
| | | upPattenUsage.setState(project.getState()); |
| | | upPattenUsageMapper.insert(upPattenUsage); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void changeTask(String engineeringId, int state) { |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private OptimizeProjectService optimizeProjectService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | @ResponseBody |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(); |
| | | log.info("显示正在出片的工程信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | public Result<Integer> saveUpPattenUsage(String engineeringId) { |
| | | log.info("传入工程号判断是否已保存:{}", engineeringId); |
| | | UpPattenUsage upPattenUsage= upPattenUsageService.selectedEngineering(engineeringId); |
| | | @PostMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | @ResponseBody |
| | | public Result<Engineering> saveUpPattenUsage(@RequestBody Engineering engineering) { |
| | | log.info("engineeringId:{}", engineering); |
| | | UpPattenUsage upPattenUsage= upPattenUsageService.selectedEngineering(engineering.getEngineerId()); |
| | | if (upPattenUsage!=null){ |
| | | log.info("已保存过"); |
| | | return Result.build(200, "已保存过", 200); |
| | | return Result.build(200, "已保存的工程", null); |
| | | }else { |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineeringId); |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId()); |
| | | log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | | upPattenUsageService.saveUpPattenUsage(upPattenUsages); |
| | | log.info("从PP表查询glassinfo的数据并保存到表里"); |
| | | List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineeringId); |
| | | List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineering.getEngineerId()); |
| | | glassInfoService.saveGlassInfo(glassinfo); |
| | | log.info("从PP表查询engineering的数据并保存到表里"); |
| | | List<Engineering> engineerings= engineeringService.selectEngineering(engineeringId); |
| | | engineeringService.saveEngineering(engineerings); |
| | | List<Engineering> listEngineering= engineeringService.selectEngineering(engineering.getEngineerId()); |
| | | engineeringService.saveEngineering(listEngineering); |
| | | log.info("更改pp表状态为已领取"); |
| | | optimizeProjectService.changeTask(engineeringId, 200); |
| | | return Result.build(200, "", 200); |
| | | optimizeProjectService.changeTask(engineering.getEngineerId(), 200); |
| | | // List<UpPattenUsage> data=upPattenUsageService.prioritylist(); |
| | | // log.info("显示保存后的上片顺序表"); |
| | | return Result.build(200, "", engineering); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-18 |
| | | */ |
| | | public interface UpPattenUsageService extends MPJBaseService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | |
| | | /** |
| | | * 查询工位上的玻璃信息 |
| | | * @return List<UpPattenUsage> |
| | | */ |
| | | List<UpPattenUsage> prioritylist(); |
| | | /** |
| | | * 查询上片顺序信息 |
| | | * @return List<UpPattenUsage> |
| | | */ |
| | | List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId); |
| | | |
| | | /** |
| | | * 保存上片顺序信息 |
| | | */ |
| | | void saveUpPattenUsage(List<UpPattenUsage> upPattenUsages); |
| | | |
| | | void updateupPattenUsageState(UpPattenUsage upPattenUsage, Integer state); |
| | | |
| | | /** |
| | | * 更新上片表状态 |
| | | */ |
| | | void updateUpPattenUsageState(UpPattenUsage upPattenUsage, Integer state); |
| | | /** |
| | | * 判断此工程是否已保存过 |
| | | * @return UpPattenUsage |
| | | */ |
| | | UpPattenUsage selectedEngineering(String engineeringId); |
| | | |
| | | /** |
| | | * 查询正在执行的上片任务 |
| | | * @return UpPattenUsage |
| | | */ |
| | | UpPattenUsage selectOverTask(); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | |
| | | |
| | | @Autowired |
| | | OptimizeProjectMapper optimizeProjectMapper; |
| | | @Autowired |
| | | EngineeringService engineeringService; |
| | | @Override |
| | | public List<UpPattenUsage> prioritylist(int state) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | public List<UpPattenUsage> prioritylist() { |
| | | //获取正在上片的任务id |
| | | Engineering engineering= engineeringService.selectInitiate(1); |
| | | log.info("将参数传入到查询类里{}",engineering); |
| | | if(engineering!=null){ |
| | | LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(UpPattenUsage::getState,state); |
| | | log.info("返回工程信息"); |
| | | wrapper.eq(UpPattenUsage::getEngineeringId,engineering.getEngineerId()); |
| | | return this.list(wrapper); |
| | | }else { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void updateupPattenUsageState(UpPattenUsage upPattenUsage, Integer state) { |
| | | public void updateUpPattenUsageState(UpPattenUsage upPattenUsage, Integer state) { |
| | | upPattenUsage.setState(state); |
| | | boolean updateSuccess=this.updateById(upPattenUsage); |
| | | log.info("更新状态{}",updateSuccess); |
| | |
| | | return this.getOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public UpPattenUsage selectOverTask() { |
| | | QueryWrapper<UpPattenUsage>wrapper = new QueryWrapper<>(); |
| | | wrapper.gt("state",0) |
| | | .lt("state",99) |
| | | .last("limit 1"); |
| | | return this.getOne(wrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | .antMatchers("/webjars/**").permitAll() |
| | | .antMatchers("/v2/**").permitAll() |
| | | .antMatchers("/swagger-resources/**").permitAll() |
| | | .antMatchers("/**").permitAll() |
| | | .anyRequest().authenticated() |
| | | |
| | | // 异常处理器 |
| | |
| | | MPJLambdaWrapper<SysUserRole> wrapper = new MPJLambdaWrapper<>(); |
| | | |
| | | wrapper.selectAll(SysMenu.class).distinct() |
| | | .leftJoin(SysUser.class, SysUser::getId, SysUserRole::getUserId) |
| | | .leftJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysUserRole::getRoleId) |
| | | .leftJoin(SysMenu.class, SysMenu::getId, SysRoleMenu::getMenuId) |
| | | .innerJoin(SysUser.class, SysUser::getId, SysUserRole::getUserId) |
| | | .innerJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysUserRole::getRoleId) |
| | | .innerJoin(SysMenu.class, SysMenu::getId, SysRoleMenu::getMenuId) |
| | | .eq(SysUser::getId, user.getId()) |
| | | .like(StringUtils.isNotBlank(request.getKey()), SysMenu::getMenuName, request.getKey()); |
| | | |
| | | // |
| | | List<SysMenu> menuList = sysUserRoleMapper.selectJoinList(SysMenu.class, wrapper); |
| | | return create(menuList); |
| | | } |
| | |
| | | server: |
| | | port: 88 |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: gateway |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | gateway: |
| | | discovery: |
| | | locator: |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | // SpringApplication springApplication = new SpringApplication(CacheGlassModuleApplication.class); |
| | | // ConfigurableApplicationContext applicationContext = springApplication.run(args); |
| | | // WebSocketServer.setApplicationContext(applicationContext); |
| | | SpringApplication.run(CacheGlassModuleApplication.class, args); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | |
| | | import com.mes.tools.S7control; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 15:13 |
| | |
| | | private S7object() { |
| | | if (plccontrol == null) { |
| | | plccontrol = new S7control(plcType, ip, port, 0, 0); |
| | | |
| | | String PlcCacheGlass=S7object.class.getResource("/JsonFile/PlcCacheGlass.json").getPath(); |
| | | //log.info(PLCAutoMes.class.getResource("").getPath()); |
| | | PlcMesObject = InitUtil.initword(PlcCacheGlass); |
| | | String PlcLoadGlass = System.getProperty("user.dir") + "/JsonFile/PlcCacheGlass.json"; |
| | | // String PlcLoadGlass=S7object.class.getResource("/JsonFile/PlcCacheGlass.json").getPath(); |
| | | PlcMesObject = InitUtil.initword(PlcLoadGlass); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.edgglasstask.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-05-11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/edgGlassTaskInfo") |
| | | public class EdgGlassTaskInfoController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.edgglasstask.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-05-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class EdgGlassTaskInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String glassId; |
| | | |
| | | private Integer width; |
| | | |
| | | private Integer height; |
| | | |
| | | private Integer thickness; |
| | | |
| | | private Integer glassType; |
| | | |
| | | private Integer status; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.edgglasstask.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-05-11 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | public interface EdgGlassTaskInfoMapper extends BaseMapper<EdgGlassTaskInfo> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.edgglasstask.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-05-11 |
| | | */ |
| | | public interface EdgGlassTaskInfoService extends IService<EdgGlassTaskInfo> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.edgglasstask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.mapper.EdgGlassTaskInfoMapper; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-05-11 |
| | | */ |
| | | @Service |
| | | public class EdgGlassTaskInfoServiceImpl extends ServiceImpl<EdgGlassTaskInfoMapper, EdgGlassTaskInfo> implements EdgGlassTaskInfoService { |
| | | |
| | | } |
| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | |
| | | |
| | | @Override |
| | | public EdgStorageCage selectNearestEmpty(int currentSlot) { |
| | | return this.selectJoinOne(EdgStorageCage.class,new MPJLambdaWrapper<EdgStorageCage>() |
| | | List<EdgStorageCage> emptyList = this.selectJoinList(EdgStorageCage.class, new MPJLambdaWrapper<EdgStorageCage>() |
| | | .selectAll(EdgStorageCage.class) |
| | | .leftJoin(EdgStorageCageDetails.class,on->on |
| | | .eq(EdgStorageCageDetails::getSlot,EdgStorageCage::getSlot) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)) |
| | | .isNull(EdgStorageCageDetails::getSlot) |
| | | .last("order by abs(slot - 4) asc limit 1") |
| | | .last("order by abs(t.slot - " + currentSlot + ") asc limit 2") |
| | | ); |
| | | if (CollectionUtil.isEmpty(emptyList) || emptyList.size() < 2) { |
| | | return null; |
| | | } |
| | | return emptyList.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 查询笼内空格 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | .eq(EdgStorageCageDetails::getSlot,EdgStorageCage::getSlot) |
| | | .eq(EdgStorageCageDetails::getState,"100")) |
| | | .isNull(EdgStorageCageDetails::getSlot) |
| | | .last("order by abs(slot - 4) asc") |
| | | .last("order by abs(t.slot - 4) asc") |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * 查询笼内出片任务 按钢化版图号+版图内序号 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 理片缓存详情 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 修改理片笼信息 功能:对笼内栅格玻璃 【启用/禁用】 |
| | | * |
| | | * @param edgStorageCage |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | *修改理片笼信息 功能:对笼内栅格玻璃 【添加/删除/更换】 |
| | | * |
| | | * @param edgStorageCageId |
| | | * @param edgStorageCageDetails |
| | | * @return |
| | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private Integer filmsid; |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.WebSocketServer; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @Autowired |
| | | EdgStorageCageDetailsService edgStorageCageDetailsService; |
| | | |
| | | @Autowired |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | |
| | | @Autowired |
| | | WebSocketServer webServerService; |
| | | |
| | | @Value("${mes.threshold}") |
| | | private int threshold; |
| | | |
| | | @Value("${mes.ratio}") |
| | | private int ratio; |
| | | |
| | | @Value("${mes.sequence.order}") |
| | | private boolean sequenceOrder; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcHomeEdgTask() { |
| | |
| | | String taskRequestTypeValue = plcParameterObject.getPlcParameter("A06_request_word").getValue(); |
| | | String glassIdeValue = plcParameterObject.getPlcParameter("A05_scanning_ID").getValue(); |
| | | String confirmationWrodValue = plcParameterObject.getPlcParameter("MES_confirmation_word").getValue(); |
| | | //A08 A09表示线路相同 可做等价 |
| | | //A08 A09表示线路相同 可做等价 无数据转int异常 |
| | | String out08Glassstate = plcParameterObject.getPlcParameter("A08_glass_status").getValue(); |
| | | String out10Glassstate = plcParameterObject.getPlcParameter("A10_glass_status").getValue(); |
| | | String confirmationWrodAddress = plcParameterObject.getPlcParameter("MES_confirmation_word").getAddress(); |
| | | String currentSlot = plcParameterObject.getPlcParameter("Current_slot").getValue(); |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:A09{}、A10{},当前格子号为:{}", |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:A09:{}、A10:{},当前格子号为:{}", |
| | | taskRequestTypeValue, glassIdeValue, confirmationWrodValue, out08Glassstate, out10Glassstate, currentSlot); |
| | | |
| | | if ("0".equals(taskRequestTypeValue)) { |
| | |
| | | return; |
| | | } |
| | | if (!"0".equals(confirmationWrodValue)) { |
| | | log.info("2、获取到的请求字不为0,将确认字改为0"); |
| | | S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 0); |
| | | log.info("2、获取到的请求字不为0,将确认字不为0,直接结束"); |
| | | return; |
| | | } |
| | | |
| | | if ("1".equals(taskRequestTypeValue)) { |
| | | log.info("3、进片请求,且确认字为0,执行进片任务"); |
| | | log.info("2、进片请求,且确认字为0,执行进片任务"); |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | | } else if ("2".equals(taskRequestTypeValue)) { |
| | | //09空闲 :1 10空闲 :2 都空闲:3 其他0 |
| | | log.info("3、出片请求,且确认字为0,执行进片任务"); |
| | | outTo(Integer.parseInt(out08Glassstate), confirmationWrodAddress); |
| | | log.info("2、出片请求,且确认字为0,执行进片任务"); |
| | | outTo(Integer.parseInt(out08Glassstate), |
| | | Integer.parseInt(out10Glassstate), confirmationWrodAddress, "", 0); |
| | | } else if ("3".equals(taskRequestTypeValue)) { |
| | | log.info("3、进片和出片都空闲,执行出片任务"); |
| | | log.info("2、进片和出片都空闲,执行出片任务"); |
| | | //加笼子里面是否有玻璃,有先出,无玻璃先进 |
| | | int count = edgStorageCageDetailsService.count(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | if ("0".equals(out08Glassstate) || count > 0) { |
| | | if (("1".equals(out08Glassstate) || "1".equals(out10Glassstate))) { |
| | | boolean outFlase = outTo(Integer.parseInt(out08Glassstate), |
| | | Integer.parseInt(out10Glassstate), confirmationWrodAddress, glassIdeValue, Integer.parseInt(currentSlot)); |
| | | log.info("出片任务是否完成:{},失败且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue); |
| | | if (!outFlase && StringUtils.isNotBlank(glassIdeValue)) { |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | | } |
| | | } else { |
| | | outTo(Integer.parseInt(out08Glassstate), confirmationWrodAddress); |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void plcToHomeEdgTask() { |
| | | // log.info("推数据"); |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | | // ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home"); |
| | | // if (sendwServer != null) { |
| | | // for (WebSocketServer webserver : sendwServer) { |
| | | // webserver.sendMessage(jsonObject.toString()); |
| | | // if (webserver != null) { |
| | | // |
| | | // List<String> messages = webserver.getMessages(); |
| | | // |
| | | // if (!messages.isEmpty()) { |
| | | // // // 将最后一个消息转换为整数类型的列表 |
| | | // webserver.clearMessages(); |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | log.info("2、获取到的玻璃信息为{}", glassInfo); |
| | | //添加进片任务 查找空格 |
| | | EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(Integer.parseInt(currentSlot)); |
| | | Assert.isTrue(nearestEmpty == null, "格子已满"); |
| | | Assert.isTrue(null != nearestEmpty, "格子已满"); |
| | | log.info("3、查询卧式理片笼里面的空格:{}", nearestEmpty); |
| | | |
| | | log.info("4、将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | |
| | | details.setDeviceId(nearestEmpty.getDeviceId()); |
| | | edgStorageCageDetailsService.save(details); |
| | | log.info("5、玻璃信息已存入理片笼详情表,玻璃信息为{}", details); |
| | | |
| | | //添加进片任务 |
| | | TaskCache taskCache = new TaskCache(); |
| | | taskCache.setGlassId(glassId); |
| | | taskCache.setTaskStatus(0); |
| | | taskCache.setStartCell(0); |
| | | taskCache.setEndCell(nearestEmpty.getSlot()); |
| | | taskCache.setTaskType(1); |
| | | taskCache.setCreateTime(new Date()); |
| | | taskCacheService.insertTaskCache(taskCache); |
| | | log.info("6、生成进片任务信息存入任务表{}", taskCache); |
| | | boolean taskCache = saveTaskCache(details.getGlassId(), 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | log.info("6、生成进片任务信息存入任务表是否完成:{}", taskCache); |
| | | |
| | | S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 1); |
| | | log.info("7、发送确认字完成"); |
| | |
| | | /** |
| | | * 出片任务 |
| | | * |
| | | * @param line |
| | | * @param out08Glassstate |
| | | * @param out10Glassstate |
| | | * @param confirmationWrodAddress |
| | | * @param glassId |
| | | * @param currentSlot |
| | | */ |
| | | private void outTo(int line, String confirmationWrodAddress) { |
| | | private boolean outTo(int out08Glassstate, int out10Glassstate, String confirmationWrodAddress, String glassId, int currentSlot) { |
| | | //逻辑步骤: |
| | | // 0、A09、A10是否空闲,是否可以执行出片任务 |
| | | // 1、获取钢化版图是否超过阈值 |
| | |
| | | // 1.2.3、按照出片信息去详情表查询格子在笼子里面剩余相同尺寸的玻璃数据且以版图id、版序升序排序 取第一块玻璃出片 |
| | | // 2、如果没有历史出片任务 |
| | | // 2.1、出当前版图id最小版序最小的玻璃(问题:两条线都没有历史任务,出片时两条线的玻璃尺寸相同,是否找尺寸不同的) |
| | | Assert.isTrue(line != 0, "A09、A10都有玻璃,无法出片"); |
| | | log.info("0、出片任务出【{}】号线,备注(09空闲:1;10空闲:2;都空闲:3)", line); |
| | | Assert.isFalse(out08Glassstate == 0 && out10Glassstate == 0, "A09、A10都有玻璃,无法出片"); |
| | | log.info("0、出片任务出的状态:A09:【{}】;A10:【{}】)", out08Glassstate, out10Glassstate); |
| | | //定义出片玻璃信息 |
| | | EdgStorageCageDetails glassInfo = null; |
| | | int endcell = 0; |
| | | EdgStorageCageDetails glassInfo = null; |
| | | boolean flag = queryMaxMinDiff(threshold); |
| | | log.info("1、获取钢化版图是否超过阈值:{}", flag); |
| | | if (flag) { |
| | | glassInfo = queryMinGlass(0.0, 0.0); |
| | | //获取当前最小版图需要出片的玻璃信息 |
| | | glassInfo = queryMinGlass(0.0, 0.0, glassId); |
| | | log.info("1.1、超过阈值:获取当前最小版图需要出片的玻璃信息:{}", glassInfo); |
| | | Integer a09Count = queryCountByTaskLine(Const.A09_OUT_TARGET_POSITION).size(); |
| | | Integer a10Count = queryCountByTaskLine(Const.A10_OUT_TARGET_POSITION).size(); |
| | | log.info("1.2、获取笼子剩余数量A09为{},A10为{}", a09Count, a10Count); |
| | | if (a10Count <= a09Count && line != 2) { |
| | | log.info("1.2.1、A09线出片"); |
| | | endcell = Const.A09_OUT_TARGET_POSITION; |
| | | if (glassInfo == null) { |
| | | log.info("笼子内和待进片没有玻璃"); |
| | | return Boolean.FALSE; |
| | | } |
| | | EdgStorageCageDetails a09EdgGlass = queryGlassByTaskCache(Const.A09_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT); |
| | | EdgStorageCageDetails a10EdgGlass = queryGlassByTaskCache(Const.A10_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT); |
| | | endcell = queryLineByGlassInfo(a09EdgGlass, a10EdgGlass, glassInfo, out08Glassstate, out10Glassstate); |
| | | } else { |
| | | log.info("1.2.2、A10线出片"); |
| | | endcell = Const.A09_OUT_TARGET_POSITION; |
| | | //判断两条线是否都空闲 |
| | | endcell = out08Glassstate == 1 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | if (out08Glassstate == 1 && out10Glassstate == 1) { |
| | | EdgStorageCageDetails a09EdgGlass = queryGlassByTaskCache(Const.A09_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT); |
| | | EdgStorageCageDetails a10EdgGlass = queryGlassByTaskCache(Const.A10_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT); |
| | | if (a09EdgGlass == null && a10EdgGlass == null) { |
| | | MPJLambdaWrapper<EdgStorageCageDetails> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select(EdgStorageCageDetails::getWidth, EdgStorageCageDetails::getHeight) |
| | | .selectCount(EdgStorageCageDetails::getGlassId, EdgStorageCageDetails::getCount) |
| | | .groupBy(EdgStorageCageDetails::getWidth, EdgStorageCageDetails::getHeight) |
| | | .last("order by count(t.glass_id) desc limit 2"); |
| | | List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(wrapper); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | GlassInfo one = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId)); |
| | | EdgStorageCageDetails resultDetails = new EdgStorageCageDetails(); |
| | | BeanUtils.copyProperties(one, resultDetails); |
| | | glassInfo = resultDetails; |
| | | } else { |
| | | glassInfo = queryMinGlass(list.get(0).getWidth(), list.get(0).getHeight(), glassId); |
| | | } |
| | | } else if (a09EdgGlass != null && a10EdgGlass != null) { |
| | | List<EdgStorageCageDetails> a09Count = queryGlassByTaskLine(Const.A09_OUT_TARGET_POSITION); |
| | | List<EdgStorageCageDetails> a10Count = queryGlassByTaskLine(Const.A09_OUT_TARGET_POSITION); |
| | | endcell = a09Count.size() > a10Count.size() ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | glassInfo = a09Count.size() > a10Count.size() ? queryMinGlass(a09EdgGlass.getWidth(), a09EdgGlass.getHeight(), glassId) |
| | | : queryMinGlass(a10EdgGlass.getWidth(), a10EdgGlass.getHeight(), glassId); |
| | | } else { |
| | | endcell = a09EdgGlass != null ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | glassInfo = a09EdgGlass != null ? queryMinGlass(a09EdgGlass.getWidth(), a09EdgGlass.getHeight(), glassId) |
| | | : queryMinGlass(a10EdgGlass.getWidth(), a10EdgGlass.getHeight(), glassId); |
| | | } |
| | | } else { |
| | | //获取指定线路将要出的玻璃信息 |
| | | endcell = line == 2 ? Const.A10_OUT_TARGET_POSITION : Const.A09_OUT_TARGET_POSITION; |
| | | //当前任务出完无玻璃 更换玻璃 |
| | | List<EdgStorageCageDetails> edgStorageCageDetails = queryGlassByTaskLine(endcell); |
| | | if (CollectionUtil.isNotEmpty(edgStorageCageDetails)) { |
| | | glassInfo = edgStorageCageDetails.get(0); |
| | | } else { |
| | | //获取笼内所有玻璃信息,包括待进片的 |
| | | List<EdgStorageCageDetails> glassList = queryEdgAllGlass(glassId); |
| | | Assert.isTrue(CollectionUtil.isNotEmpty(glassList), "笼内和待进片都没有玻璃"); |
| | | int othercell = endcell == Const.A10_OUT_TARGET_POSITION ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | List<EdgStorageCageDetails> details = queryCountByTaskLine(endcell); |
| | | if (details.size() > 0) { |
| | | glassInfo = details.get(0); |
| | | } else { |
| | | //todo:去理片笼里面查 |
| | | glassInfo = queryChangeGlassInfo(othercell); |
| | | glassInfo = queryChangeGlassInfo(othercell, glassId); |
| | | } |
| | | } |
| | | } |
| | | return saveOutGlassMessage(glassInfo, endcell, confirmationWrodAddress, glassId, currentSlot); |
| | | } |
| | | |
| | | /** |
| | | * 获取笼子内所有玻璃信息,包括待进片的 |
| | | * |
| | | * @param glassId |
| | | */ |
| | | private List<EdgStorageCageDetails> queryEdgAllGlass(String glassId) { |
| | | List<EdgStorageCageDetails> glassList = new ArrayList<>(); |
| | | //获取待进片玻璃 |
| | | if(StringUtils.isNotBlank(glassId)){ |
| | | GlassInfo one = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId)); |
| | | EdgStorageCageDetails resultDetails = new EdgStorageCageDetails(); |
| | | BeanUtils.copyProperties(one, resultDetails); |
| | | glassList.add(resultDetails); |
| | | } |
| | | //获取笼内玻璃 |
| | | List<EdgStorageCageDetails> details = edgStorageCageDetailsService.list(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | glassList.addAll(details); |
| | | return glassList; |
| | | |
| | | if (glassInfo != null) { |
| | | log.info("4、添加出片任务,玻璃id:{},任务类型:{},起始位置:{},结束位置:{}", glassInfo.getGlassId(), |
| | | 2, glassInfo.getSlot(), endcell); |
| | | TaskCache taskCache = new TaskCache(); |
| | | taskCache.setGlassId(glassInfo.getGlassId()); |
| | | taskCache.setTaskStatus(0); |
| | | taskCache.setStartCell(glassInfo.getSlot()); |
| | | taskCache.setEndCell(endcell); |
| | | taskCache.setTaskType(2); |
| | | taskCache.setCreateTime(new Date()); |
| | | taskCacheService.insertTaskCache(taskCache); |
| | | S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 1); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | private boolean queryMaxMinDiff(int threshold) { |
| | | //todo:获取笼子内最大版图id和最小版图id插值,判断是否大于阈值,大于阈值直接出最小版图玻璃 |
| | | //获取笼子内最大版图id和最小版图id插值,判断是否大于阈值,大于阈值直接出最小版图玻璃 |
| | | QueryWrapper<EdgStorageCageDetails> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("max(tempering_layout_id)-min(tempering_layout_id) as diff") |
| | | .eq("state", Const.GLASS_STATE_IN); |
| | | Integer diff = (Integer) edgStorageCageDetailsService.listObjs(queryWrapper).get(0); |
| | | List<Object> list = edgStorageCageDetailsService.listObjs(queryWrapper); |
| | | if (CollectionUtil.isNotEmpty(list)) { |
| | | Long diff = (Long) list.get(0); |
| | | return diff > threshold; |
| | | } else { |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param width |
| | | * @param height |
| | | */ |
| | | private EdgStorageCageDetails queryMinGlass(Double width, Double height) { |
| | | return edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | private EdgStorageCageDetails queryMinGlass(Double width, Double height, String glassId) { |
| | | //获取表内版图id最小的玻璃信息 |
| | | EdgStorageCageDetails glassDetails = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getState, 100) |
| | | .eq(width != 0, EdgStorageCageDetails::getWidth, width) |
| | | .eq(height != 0, EdgStorageCageDetails::getHeight, height) |
| | | .orderByAsc(EdgStorageCageDetails::getTemperingLayoutId, EdgStorageCageDetails::getTemperingFeedSequence) |
| | | .orderByAsc(EdgStorageCageDetails::getTemperingLayoutId) |
| | | .orderBy(Boolean.TRUE, sequenceOrder, EdgStorageCageDetails::getTemperingFeedSequence) |
| | | .last("limit 1")); |
| | | if (StringUtils.isBlank(glassId)) { |
| | | return glassDetails; |
| | | } |
| | | GlassInfo one = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId)); |
| | | EdgStorageCageDetails resultDetails = new EdgStorageCageDetails(); |
| | | BeanUtils.copyProperties(one, resultDetails); |
| | | if (null == glassDetails) { |
| | | return resultDetails; |
| | | } |
| | | return resultDetails.getTemperingLayoutId() <= glassDetails.getTemperingLayoutId() && resultDetails.getTemperingFeedSequence() > glassDetails.getTemperingFeedSequence() ? |
| | | resultDetails : glassDetails; |
| | | } |
| | | |
| | | /** |
| | | * 获取任务表中指定线路笼子内还剩余的玻璃数量 |
| | | * 获取任务表中指定线路笼子内还剩余的玻璃信息 |
| | | */ |
| | | private List<EdgStorageCageDetails> queryCountByTaskLine(int line) { |
| | | private List<EdgStorageCageDetails> queryGlassByTaskLine(int line) { |
| | | //获取任务表中最后一次出片的玻璃id |
| | | LambdaQueryWrapper<TaskCache> queryWrapper = new LambdaQueryWrapper<TaskCache>().eq(TaskCache::getTaskType, Const.GLASS_CACHE_TYPE_OUT) |
| | | .eq(TaskCache::getEndCell, line).orderByDesc(TaskCache::getCreateTime); |
| | | List<TaskCache> taskCacheList = taskCacheService.list(queryWrapper); |
| | | if (CollectionUtil.isEmpty(taskCacheList)) { |
| | | log.info("没有找到{}线任务信息", line); |
| | | return new ArrayList<>(); |
| | | } |
| | | TaskCache taskCache = taskCacheList.get(0); |
| | | MPJQueryWrapper<EdgStorageCageDetails> mpjLambdaWrapper = new MPJQueryWrapper<>(); |
| | | mpjLambdaWrapper.select("a.*") |
| | | mpjLambdaWrapper.select("t1.*") |
| | | .innerJoin("edg_storage_cage_details t1 on t.width = t1.width and t.height = t1.height") |
| | | .eq("t.glass_id", taskCache.getGlassId()) |
| | | .ne("t1.glass_id", taskCache.getGlassId()) |
| | | .orderByAsc("t1.tempering_layout_id", "t1.tempering_feed_sequence"); |
| | | .eq("t1.state", Const.GLASS_STATE_IN) |
| | | .orderByAsc("t1.tempering_layout_id") |
| | | .orderBy(Boolean.TRUE, sequenceOrder, "t1.tempering_feed_sequence"); |
| | | List<EdgStorageCageDetails> details = edgStorageCageDetailsService.selectJoinList(EdgStorageCageDetails.class, mpjLambdaWrapper); |
| | | if (CollectionUtil.isEmpty(details)) { |
| | | return new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 更换出片玻璃 |
| | | * 按照任务类型、线号获取任务信息 |
| | | * |
| | | * @param othercell |
| | | * @param line |
| | | * @param taskType |
| | | * @return |
| | | */ |
| | | private EdgStorageCageDetails queryChangeGlassInfo(int othercell) { |
| | | private EdgStorageCageDetails queryGlassByTaskCache(int line, int taskType) { |
| | | LambdaQueryWrapper<TaskCache> queryWrapper = new LambdaQueryWrapper<TaskCache>().eq(TaskCache::getTaskType, taskType) |
| | | .eq(TaskCache::getEndCell, line).orderByDesc(TaskCache::getCreateTime); |
| | | List<TaskCache> list = taskCacheService.list(queryWrapper); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | log.info("没有找到{}线任务信息", line); |
| | | return null; |
| | | } |
| | | return edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getGlassId, list.get(0).getGlassId())); |
| | | } |
| | | |
| | | /** |
| | | * 按照任务玻璃信息和待出片玻璃信息获取出片路径 |
| | | * |
| | | * @param a08EdgStorageCageDetails 09号线出片玻璃信息 |
| | | * @param a10EdgStorageCageDetails 10号线出片玻璃信息 |
| | | * @param glassInfo 带出片玻璃信息 |
| | | * @param out08Glassstate 09号线空闲状态 |
| | | * @param out10Glassstate 10号线空闲状态 |
| | | * @return |
| | | */ |
| | | private Integer queryLineByGlassInfo(EdgStorageCageDetails a08EdgStorageCageDetails, EdgStorageCageDetails a10EdgStorageCageDetails, |
| | | EdgStorageCageDetails glassInfo, int out08Glassstate, int out10Glassstate) { |
| | | if (a08EdgStorageCageDetails != null && a08EdgStorageCageDetails.getHeight().equals(glassInfo.getHeight()) |
| | | && a08EdgStorageCageDetails.getWidth().equals(glassInfo.getWidth()) && out08Glassstate == 1) { |
| | | return Const.A09_OUT_TARGET_POSITION; |
| | | } |
| | | if (a10EdgStorageCageDetails != null && a10EdgStorageCageDetails.getHeight().equals(glassInfo.getHeight()) |
| | | && a10EdgStorageCageDetails.getWidth().equals(glassInfo.getWidth()) && out10Glassstate == 1) { |
| | | return Const.A10_OUT_TARGET_POSITION; |
| | | } |
| | | if (out08Glassstate == 1) { |
| | | return Const.A09_OUT_TARGET_POSITION; |
| | | } |
| | | if (out10Glassstate == 1) { |
| | | return Const.A10_OUT_TARGET_POSITION; |
| | | } |
| | | Assert.isTrue(Boolean.FALSE, "没有找到出片路径"); |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * 按照尺寸出玻璃 |
| | | * |
| | | * @param endcell endcell = out08Glassstate == 1 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | * @param glassId |
| | | * @return |
| | | */ |
| | | private EdgStorageCageDetails queryChangeGlassInfo(int endcell, String glassId) { |
| | | //获取笼子内数量前二的玻璃数量 |
| | | MPJLambdaWrapper<EdgStorageCageDetails> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select(EdgStorageCageDetails::getWidth, EdgStorageCageDetails::getHeight) |
| | | .selectCount("*", EdgStorageCageDetails::getCount) |
| | | .selectCount(EdgStorageCageDetails::getGlassId, EdgStorageCageDetails::getCount) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .groupBy(EdgStorageCageDetails::getWidth, EdgStorageCageDetails::getHeight) |
| | | .last("order by count(*) desc limit 2"); |
| | | .last("order by count(t.glass_id) desc limit 2"); |
| | | List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(wrapper); |
| | | if (CollectionUtil.isEmpty(list)){ |
| | | return null; |
| | | } |
| | | log.info("获取笼子内数量前二的玻璃数量:{}", list); |
| | | Assert.notEmpty(list, "笼子里没有玻璃"); |
| | | //一片玻璃直接出 |
| | | if (list.size() == 1) { |
| | | return list.get(0); |
| | | } |
| | | //分别获取宽高的玻璃数量 |
| | | //获取宽高拍第一的玻璃信息 |
| | | EdgStorageCageDetails firstSize = list.get(0); |
| | | EdgStorageCageDetails secondSize = list.get(1); |
| | | //获取任务表中最后一次出片的玻璃id |
| | | LambdaQueryWrapper<TaskCache> queryWrapper = new LambdaQueryWrapper<TaskCache>().eq(TaskCache::getTaskType, Const.GLASS_CACHE_TYPE_OUT) |
| | | .eq(TaskCache::getEndCell, othercell).orderByDesc(TaskCache::getCreateTime); |
| | | List<TaskCache> taskCacheList = taskCacheService.list(queryWrapper); |
| | | log.info("获取任务表中{}线最后一次出片的玻璃任务信息:{}", othercell, taskCacheList); |
| | | if (CollectionUtil.isEmpty(taskCacheList)) { |
| | | log.info("{}线没有出片任务信息,直接出片", othercell); |
| | | return queryMinGlass(firstSize.getWidth(), firstSize.getHeight()); |
| | | } |
| | | Integer firstCount = firstSize.getCount(); |
| | | Double firstWidth = firstSize.getWidth(); |
| | | Double firstHeight = firstSize.getHeight(); |
| | | if (list.size() == 1) { |
| | | return queryMinGlass(firstWidth, firstHeight, glassId); |
| | | } |
| | | //获取宽高拍第二的玻璃信息 |
| | | EdgStorageCageDetails secondSize = list.get(1); |
| | | Integer secondCount = secondSize.getCount(); |
| | | Double secondWidth = secondSize.getWidth(); |
| | | Double secondHeight = secondSize.getHeight(); |
| | |
| | | |
| | | if (mix >= 2) { |
| | | log.info("获取玻璃数量前2的玻璃占比为{},大于2,直接出玻璃数据的最多的,宽:{},高:{}", mix, firstWidth, firstHeight); |
| | | return queryMinGlass(firstWidth, firstHeight); |
| | | return queryMinGlass(firstWidth, firstHeight, glassId); |
| | | } else { |
| | | log.info("获取玻璃数量前2的玻璃占比为{},小于2", mix); |
| | | //获取任务表中最后一次出片的玻璃id |
| | | LambdaQueryWrapper<TaskCache> queryWrapper = new LambdaQueryWrapper<TaskCache>().eq(TaskCache::getTaskType, Const.GLASS_CACHE_TYPE_OUT) |
| | | .eq(TaskCache::getEndCell, endcell).orderByDesc(TaskCache::getCreateTime); |
| | | List<TaskCache> taskCacheList = taskCacheService.list(queryWrapper); |
| | | log.info("获取任务表中{}线最后一次出片的玻璃任务信息:{}", endcell, taskCacheList); |
| | | if (CollectionUtil.isEmpty(taskCacheList)) { |
| | | log.info("{}线没有出片任务信息,直接出片", endcell); |
| | | return queryMinGlass(firstSize.getWidth(), firstSize.getHeight(), glassId); |
| | | } |
| | | TaskCache taskCache = taskCacheList.get(0); |
| | | EdgStorageCageDetails outGlassInfo = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getGlassId, taskCache.getGlassId())); |
| | | log.info("{}线有出片任务信息,任务信息为{},玻璃信息为{}", othercell, taskCache, outGlassInfo); |
| | | EdgStorageCageDetails outGlassInfo = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getGlassId, taskCache.getGlassId())); |
| | | log.info("{}线有出片任务信息,任务信息为{},玻璃信息为{}", endcell, taskCache, outGlassInfo); |
| | | if (outGlassInfo.getWidth().equals(firstWidth) && outGlassInfo.getHeight().equals(firstHeight)) { |
| | | log.info("数量最多的宽{}高{}和{}线任务的宽{}高{}相同,出数量排第二的玻璃,宽{}高{}", |
| | | firstWidth, firstHeight, othercell, outGlassInfo.getWidth(), outGlassInfo.getHeight(), secondWidth, secondHeight); |
| | | return queryMinGlass(secondWidth, secondHeight); |
| | | firstWidth, firstHeight, endcell, outGlassInfo.getWidth(), outGlassInfo.getHeight(), secondWidth, secondHeight); |
| | | return queryMinGlass(secondWidth, secondHeight, glassId); |
| | | } else { |
| | | log.info("数量第二多的宽{}高{}和{}线任务的宽{}高{}相同,出数量排第二的玻璃,宽{}高{}", |
| | | secondWidth, secondHeight, othercell, outGlassInfo.getWidth(), outGlassInfo.getHeight(), firstWidth, firstHeight); |
| | | return queryMinGlass(firstWidth, firstHeight); |
| | | secondWidth, secondHeight, endcell, outGlassInfo.getWidth(), outGlassInfo.getHeight(), firstWidth, firstHeight); |
| | | return queryMinGlass(firstWidth, firstHeight, glassId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存出片任务相关信息 |
| | | * |
| | | * @param glassInfo |
| | | * @param endcell |
| | | * @param confirmationWrodAddress |
| | | * @param glassId |
| | | * @return |
| | | */ |
| | | private boolean saveOutGlassMessage(EdgStorageCageDetails glassInfo, int endcell, String confirmationWrodAddress, String glassId, Integer currentSlot) { |
| | | if (glassInfo != null) { |
| | | log.info("4、添加出片任务,玻璃id:{},任务类型:{},起始位置:{},结束位置:{}", glassInfo.getGlassId(), |
| | | 2, glassInfo.getSlot(), endcell); |
| | | if (glassInfo.getGlassId().equals(glassId)) { |
| | | log.info("5、直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | EdgStorageCageDetails details = new EdgStorageCageDetails(); |
| | | BeanUtils.copyProperties(glassInfo, details); |
| | | EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(currentSlot); |
| | | Assert.isTrue(null != nearestEmpty, "格子已满,无法执行直通任务"); |
| | | log.info("3、查询卧式理片笼里面的空格:{}", nearestEmpty); |
| | | details.setSlot(nearestEmpty.getSlot()); |
| | | details.setState(Const.GLASS_STATE_OUT); |
| | | edgStorageCageDetailsService.save(details); |
| | | |
| | | boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), nearestEmpty.getSlot(), endcell, Const.GLASS_CACHE_TYPE_THROUGH); |
| | | log.info("6、添加出片任务是否完成:{}", taskCacheStatus); |
| | | } else { |
| | | log.info("5、非直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | LambdaQueryWrapper<EdgStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(EdgStorageCageDetails::getGlassId, glassInfo.getGlassId()); |
| | | EdgStorageCageDetails updateDetail = new EdgStorageCageDetails(); |
| | | updateDetail.setState(Const.GLASS_STATE_OUT); |
| | | edgStorageCageDetailsService.update(updateDetail, wrapper); |
| | | log.info("5、更新出片玻璃的状态为{}", Const.GLASS_STATE_OUT); |
| | | |
| | | boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), glassInfo.getSlot(), endcell, Const.GLASS_CACHE_TYPE_OUT); |
| | | log.info("6、添加出片任务是否完成:{}", taskCacheStatus); |
| | | } |
| | | boolean glassSizeStatus = saveGlassSize(glassInfo); |
| | | log.info("7、添加出片玻璃尺寸信息到磨边前玻璃表是否完成:{}", glassSizeStatus); |
| | | S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 1); |
| | | log.info("8、发送确认字已完成"); |
| | | return Boolean.TRUE; |
| | | } |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | /** |
| | | * 添加理片笼任务 |
| | | * |
| | | * @param glassId |
| | | * @param startcell |
| | | * @param endcell |
| | | * @param taskType |
| | | * @return |
| | | */ |
| | | private boolean saveTaskCache(String glassId, int startcell, int endcell, int taskType) { |
| | | TaskCache taskCache = new TaskCache(); |
| | | taskCache.setGlassId(glassId); |
| | | taskCache.setTaskStatus(0); |
| | | taskCache.setStartCell(startcell); |
| | | taskCache.setEndCell(endcell); |
| | | taskCache.setTaskType(taskType); |
| | | taskCache.setCreateTime(new Date()); |
| | | return taskCacheService.save(taskCache); |
| | | } |
| | | |
| | | /** |
| | | * 添加理片笼任务 |
| | | * |
| | | * @param glassInfo |
| | | * @return |
| | | */ |
| | | private boolean saveGlassSize(EdgStorageCageDetails glassInfo) { |
| | | EdgGlassTaskInfo edgGlassTaskInfo = new EdgGlassTaskInfo(); |
| | | BeanUtils.copyProperties(glassInfo, edgGlassTaskInfo); |
| | | edgGlassTaskInfo.setHeight((int) (glassInfo.getHeight() * ratio)); |
| | | edgGlassTaskInfo.setWidth((int) (glassInfo.getWidth() * ratio)); |
| | | edgGlassTaskInfo.setThickness((int) (glassInfo.getThickness() * ratio)); |
| | | edgGlassTaskInfo.setStatus(Const.EDG_GLASS_BEFORE); |
| | | return edgGlassTaskInfoService.save(edgGlassTaskInfo); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | /** |
| | | * 卧式理片笼任务表 |
| | | */ |
| | | @Data |
| | | @TableName("task_cache") |
| | | public class TaskCache { |
| | | private String glassId;//任务编号 |
| | | private int startCell;//起始 |
| | | private int endCell;//结束 |
| | | private int taskType;//任务类型 |
| | | private int taskStatus;//任务状态 |
| | | private Date createTime;//任务状态 |
| | | /** |
| | | * 任务编号 |
| | | */ |
| | | private String glassId; |
| | | /** |
| | | * 起始 |
| | | */ |
| | | private int startCell; |
| | | /** |
| | | * 结束 |
| | | */ |
| | | private int endCell; |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | private int taskType; |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | private int taskStatus; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | } |
| | |
| | | public interface TaskCacheService extends IService<TaskCache> { |
| | | |
| | | /** |
| | | * 添加理片笼任务 |
| | | * @param taskCache |
| | | * @return |
| | | */ |
| | | boolean insertTaskCache(TaskCache taskCache); |
| | | |
| | | /** |
| | | * 查询磨边任务 |
| | | * @param line |
| | | * @return |
| | |
| | | @Service |
| | | public class TaskCacheServiceImpl extends ServiceImpl<TaskCacheMapper, TaskCache> implements TaskCacheService { |
| | | |
| | | |
| | | /** |
| | | * 添加理片笼任务 |
| | | * @param taskCache |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean insertTaskCache(TaskCache taskCache){ |
| | | baseMapper.insert(taskCache); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 查询磨边任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询待理片工作的任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询全部任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询待进片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询待出片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询 A09 或 A10 最新的一片 出片任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询 A09 或 A10 最新的一片 出片任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | server: |
| | | port: 8085 |
| | | port: 8081 |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | application: |
| | | name: unLoadGlass |
| | | name: cacheGlass |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | mes: |
| | | threshold: 3 |
| | | ratio: 10 |
| | | sequence: |
| | | order: false |
| | |
| | | private S7object() { |
| | | if (plccontrol == null) { |
| | | plccontrol = new S7control(plcType, ip, port, 0, 0); |
| | | |
| | | String PlcLoadGlass=S7object.class.getResource("/JsonFile/PlcCacheVerticalGlass.json").getPath(); |
| | | //log.info(PLCAutoMes.class.getResource("").getPath()); |
| | | String PlcLoadGlass = System.getProperty("user.dir") + "/JsonFile/PlcCacheVerticalGlass.json"; |
| | | PlcMesObject = InitUtil.initword(PlcLoadGlass); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private Integer filmsid; |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | |
| | | import com.mes.tools.S7control; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 15:13 |
| | |
| | | */ |
| | | public class S7object extends Thread { |
| | | public S7control plccontrol; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1200; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private EPlcType plcType = EPlcType.S200_SMART; // 西门子PLC类型 |
| | | private String ip = "192.168.10.100"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | |
| | |
| | | private S7object() { |
| | | if (plccontrol == null) { |
| | | plccontrol = new S7control(plcType, ip, port, 0, 0); |
| | | |
| | | String PlcLoadGlass=S7object.class.getResource("/JsonFile/PlcLoadGlass.json").getPath(); |
| | | //log.info(PLCAutoMes.class.getResource("").getPath()); |
| | | String PlcLoadGlass = System.getProperty("user.dir") + "/JsonFile/PlcLoadGlass.json"; |
| | | PlcMesObject = InitUtil.initword(PlcLoadGlass); |
| | | } |
| | | } |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.common.S7object; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.engineering.entity.Engineering; |
| | |
| | | private UpPattenUsageService upPattenUsageService; |
| | | |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcLoadGlassTask() throws InterruptedException { |
| | | try { |
| | | log.info("开始上片"); |
| | | //获取是否有上片请求 |
| | | String loadRequest = plcParameterObject.getPlcParameter("loadRequest").getValue(); |
| | | String mesToPlc = plcParameterObject.getPlcParameter("MesToPlc").getValue(); |
| | | //判断开始上片的工程号 |
| | | Engineering engineering=engineeringService.selectInitiate(1); |
| | | if("1".equals(loadRequest)&&engineering!=null){ |
| | | log.info("开始上片任务"); |
| | | UpPattenUsage upPattenUsage=upWorkstationService.selectPriority(engineering); |
| | | log.info("当有请求时查询当前上片顺序的玻璃信息{}",upPattenUsage); |
| | | UpWorkstation upwork=upWorkstationService.selectworkstation(upPattenUsage); |
| | | UpWorkstation upwork = upWorkstationService.selectWorkstation(upPattenUsage); |
| | | log.info("符合的尺寸的工位玻璃:{}",upwork); |
| | | if(upwork!=null){ |
| | | int workId=upwork.getWorkstationId();//工位id |
| | |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("GlassWidth").getAddress(), (long) width); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("GlassHeight").getAddress(), (long) height); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlc").getAddress(),1); |
| | | //减少工位数量 |
| | | upWorkstationService.reduceWorkstationNumber(upwork); |
| | | //完成上片表状态 |
| | | upPattenUsageService.updateupPattenUsageState(upPattenUsage,1); |
| | | //更改上片表状态 |
| | | upPattenUsageService.updateUpPattenUsageState(upPattenUsage, workId); |
| | | |
| | | } |
| | | } |
| | | //获取是否有汇报 |
| | | String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue(); |
| | | if (loadStatus!=null) { |
| | | log.info(loadStatus); |
| | | if ("1".equals(loadStatus)) { |
| | | log.info("收到汇报任务完成"); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 1); |
| | | } else if ("2".equals(loadStatus)) { |
| | | log.info("收到汇报未完成任务"); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 1); |
| | | } else if ("3".equals(loadStatus)) { |
| | | log.info("收到汇报玻璃破损"); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 1); |
| | | } else { |
| | | log.info("收到汇报清0状态"); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 0); |
| | | } |
| | | if("1".equals(mesToPlc)&& "0".equals(loadRequest)){ |
| | | //请求字为零时,任务字清零 |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlc").getAddress(), 0); |
| | | } |
| | | //执行后休眠300毫秒 |
| | | //Thread.sleep(300); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // @Scheduled(fixedDelay = 300) |
| | | // public void plcLoadGlassOver() throws InterruptedException { |
| | | // try { |
| | | // //获取是否有汇报 |
| | | // String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue(); |
| | | // if ("1".equals(loadStatus)){ |
| | | // log.info("收到汇报任务完成"); |
| | | // S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(),1); |
| | | // }else if ("2".equals(loadStatus)) { |
| | | // log.info("收到汇报未完成任务"); |
| | | // S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(),1); |
| | | // }else if("3".equals(loadStatus)){ |
| | | // log.info("收到汇报玻璃破损"); |
| | | // S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(),1); |
| | | // }else { |
| | | // log.info("收到汇报清0状态"); |
| | | // S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(),0); |
| | | // } |
| | | // |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcLoadGlassReport(){ |
| | | //获取是否有汇报 |
| | | String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue(); |
| | | if (loadStatus != null) { |
| | | log.info(loadStatus); |
| | | switch (loadStatus) { |
| | | case "1": |
| | | log.info("收到汇报任务完成"); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 1); |
| | | break; |
| | | case "2": |
| | | log.info("收到汇报未完成任务"); |
| | | //减少工位数量,恢复任务状态 |
| | | overTask(loadStatus, 0); |
| | | break; |
| | | case "3": |
| | | log.info("收到汇报玻璃破损"); |
| | | overTask(loadStatus, 0); |
| | | break; |
| | | case "0": |
| | | log.info("收到汇报清0状态"); |
| | | //减少工位数量,完成任务状态 |
| | | overTask(loadStatus, 100); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void overTask(String loadStatus, int state) { |
| | | UpPattenUsage upPattenUsage = upPattenUsageService.selectOverTask(); |
| | | if (upPattenUsage != null) { |
| | | log.info("收到汇报清{}状态", loadStatus); |
| | | //减少工位数量 |
| | | upWorkstationService.reduceWorkstationNumber(upPattenUsage.getState()); |
| | | //完成上片表状态 |
| | | upPattenUsageService.updateUpPattenUsageState(upPattenUsage, state); |
| | | S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("MesToPlcStatus").getAddress(), 0); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.mes.utils.Result; |
| | | import com.mes.workstation.entity.GlassInfo; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private UpWorkstationService upWorkstationService; |
| | | @ApiOperation("显示工位上的玻璃信息") |
| | | @GetMapping("/list") //查询现在上片机的玻璃信息 |
| | | @ResponseBody |
| | | public Result<List<UpWorkstation>> list() { |
| | | List<UpWorkstation> glass = upWorkstationService.list(); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息,传递Upworkstation类,只修改宽高厚数量膜系") |
| | | @PostMapping("/updateGlassMessage") |
| | | @ResponseBody |
| | | public Result<UpWorkstation> updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | public Result<List<UpWorkstation>> updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | upWorkstationService.updateGlassMessage(upwork); |
| | | return Result.build(200, "", upwork); |
| | | List<UpWorkstation> glass = upWorkstationService.list(); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | // @ApiOperation("开始上片任务") |
| | | // @PostMapping("/selectPriority") //调用上片任务 |
| | | // @ResponseBody |
| | | // public void selectPriority() { |
| | | // UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | // log.info("显示可上的玻璃信息:{}", work); |
| | | // |
| | | // } |
| | | |
| | | |
| | | @ApiOperation("修改上片mes联动请求字") |
| | | @PostMapping("/updateMesInkageLoad") |
| | | @ResponseBody |
| | | public Result<String> updateMesInkageLoad(@RequestBody short inKageWord) { |
| | | String result = upWorkstationService.updateMesInkageLoad(inKageWord); |
| | | return Result.success(result); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | public interface LoadGlassMapper extends BaseMapper<UpWorkstation> { |
| | | //判断优先工位吸片 |
| | | @Select("select b.layout_sequence,a.number from up_workstation a left join up_patten_usage b " + |
| | | "on a.pattern_width=b.width and a.pattern_heigth=b.width " + |
| | | "on a.pattern_width=b.width and a.pattern_height=b.height " + |
| | | "and a.pattern_thickness=b.thickness where a.workstation_id=#{id}") |
| | | Map<String, Object> selectPriority(int id); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | |
| | | /** |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface UpWorkstationService extends IService<UpWorkstation> { |
| | | //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | |
| | | |
| | | |
| | | //判断优先吸片玻璃 |
| | | /** |
| | | * 判断优先吸片位置 |
| | | * @return UpPattenUsage |
| | | */ |
| | | UpPattenUsage selectPriority(Engineering engineering); |
| | | //查询正在进行的单片信息 |
| | | UpWorkstation selectworkstation(UpPattenUsage upPattenUsage); |
| | | //减少工位数量 |
| | | void reduceWorkstationNumber(UpWorkstation upwork); |
| | | |
| | | |
| | | /** |
| | | * 查询正在进行的单片信息 |
| | | * @return UpWorkstation |
| | | */ |
| | | UpWorkstation selectWorkstation(UpPattenUsage upPattenUsage); |
| | | /** |
| | | * 减少工位数量 |
| | | */ |
| | | void reduceWorkstationNumber(Integer upworkId); |
| | | /** |
| | | * 增加人工输入的工位玻璃信息 |
| | | * |
| | | * @param upwork |
| | | */ |
| | | //修改工位表增加玻璃信息或者删除玻璃信息 |
| | | void updateGlassMessage(UpWorkstation upwork); |
| | | |
| | | |
| | | String updateMesInkageLoad(short inKageWord); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.S7object; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | |
| | | @Override |
| | | public UpPattenUsage selectPriority(Engineering engineering) { |
| | | QueryWrapper<UpPattenUsage> wrapper=new QueryWrapper<>(); |
| | | wrapper.eq("state", 0) |
| | |
| | | |
| | | //判断工位是否有符合条件的玻璃 |
| | | @Override |
| | | public UpWorkstation selectworkstation(UpPattenUsage upPattenUsage) { |
| | | public UpWorkstation selectWorkstation(UpPattenUsage upPattenUsage) { |
| | | QueryWrapper<UpWorkstation> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("pattern_width", upPattenUsage.getWidth()) |
| | | .eq("pattern_height", upPattenUsage.getHeight()) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void reduceWorkstationNumber(UpWorkstation upwork) { |
| | | public void reduceWorkstationNumber(Integer upworkId) { |
| | | UpdateWrapper<UpWorkstation> wrapper = new UpdateWrapper<>(); |
| | | wrapper.eq("id", upwork.getWorkstationId()) |
| | | wrapper.eq("id", upworkId) |
| | | .setSql("number = number - 1"); |
| | | boolean updateResult = upWorkstationMapper.update(null, wrapper) > 0; |
| | | log.info("减少工位数量{}",updateResult); |
| | |
| | | @Override |
| | | public void updateGlassMessage(UpWorkstation upwork) { |
| | | UpdateWrapper<UpWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | if (upwork.getWorkstationId() == 1 || upwork.getWorkstationId() == 3) { |
| | | updateWrapper.eq("workstation_id", upwork.getWorkstationId()); |
| | | int update = this.baseMapper.update(upwork, updateWrapper); |
| | | } else { |
| | | if (upwork.getPatternHeight() > 2700 || upwork.getPatternHeight() == 0) { |
| | | updateWrapper.eq("workstation_id", upwork.getWorkstationId()); |
| | | int update = this.baseMapper.update(upwork, updateWrapper); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String updateMesInkageLoad(short inKageWord) { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | log.info("修改设备两栋请求为{}:0联线;1联动", inKageWord); |
| | | S7object.getinstance().plccontrol.WriteWord(plcParameterObject.getPlcParameter("InkageStatus").getAddress(), inKageWord); |
| | | return "success"; |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | "plcAddressBegin":"DB14.0", |
| | | "plcAddressLenght":"98", |
| | | "plcAddressBegin":"DB1.2000", |
| | | "plcAddressLenght":"100", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "InkageStatus", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "WorkId", |
| | | "addressIndex":"24", |
| | | "addressLenght":"2", |
| | |
| | | name: loadGlass |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 打印sql语句 |
| | |
| | | import com.mes.engineering.service.EngineeringService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.impl.UpPattenUsageServiceImpl; |
| | |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | log.info("开始上片的工程:{}", Arrays.asList(engineering)); |
| | | UpPattenUsage upPattenUsage = workstationService.selectPriority(engineering); |
| | | log.info("上片顺序:{}", Arrays.asList(upPattenUsage)); |
| | | UpWorkstation glass2=workstationService.selectworkstation(upPattenUsage); |
| | | UpWorkstation glass2=workstationService.selectWorkstation(upPattenUsage); |
| | | log.info("符合的工位玻璃{}",glass2); |
| | | workstationService.reduceWorkstationNumber(glass2); |
| | | workstationService.reduceWorkstationNumber(glass2.getWorkstationId()); |
| | | //减少数量 |
| | | upPattenUsageService.updateupPattenUsageState(upPattenUsage,1); |
| | | upPattenUsageService.updateUpPattenUsageState(upPattenUsage,1); |
| | | //更新状态 |
| | | } |
| | | |
| | | @Test |
| | | public void textglassinfo(){ |
| | | List<GlassInfo> glass= glassInfoService.selectGlassInfo("P24032204"); |
| | | log.info("glassinfo:{}", Arrays.asList(glass)); |
| | | glassInfoService.saveGlassInfo(glass); |
| | | } |
| | | |
| | | @Test |
| | | public void textengineering(){ |
| | | List<Engineering> glass= engineeringService.selectEngineering("P24032204"); |
| | |
| | | @Test |
| | | public void textengineering2(){ |
| | | //更新工程表状态为已领取 |
| | | optimizeProjectService.changeTask("P24050801",200); |
| | | //optimizeProjectService.changeTask("P24050801",200); |
| | | engineeringService.changeTask("P24051102",1); |
| | | } |
| | | @Test |
| | | public void textengineering3(){ |
| | | //判断是否已保存过工程号到上片表 |
| | | upPattenUsageService.selectedEngineering("P24050801"); |
| | | UpPattenUsage upPattenUsage=upPattenUsageService.selectOverTask(); |
| | | log.info("上片表任务中的数据{}",upPattenUsage); |
| | | } |
| | | @Test |
| | | public void textengineering4(){ |
| | | //判断是否已保存过工程号到上片表 |
| | | List<Engineering> engineerings=engineeringService.selectTask(); |
| | | log.info("上片表任务中的数据{}",engineerings); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.common.S7object; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author SNG-012 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @Order(1) |
| | | |
| | | public class AppRunnerConfig implements ApplicationRunner { |
| | | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | log.info("启动完成"); |
| | | S7object.getinstance().start(); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common; |
| | | |
| | | import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.tools.InitUtil; |
| | | import com.mes.tools.S7control; |
| | | |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 15:13 |
| | | * @Description: |
| | | */ |
| | | public class S7object extends Thread { |
| | | public S7control plccontrol; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1200; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | |
| | | public PlcParameterObject PlcMesObject; |
| | | private static volatile S7object instance = null; |
| | | |
| | | private S7object() { |
| | | if (plccontrol == null) { |
| | | plccontrol = new S7control(plcType, ip, port, 0, 0); |
| | | String PlcCacheGlass = System.getProperty("user.dir") + "/JsonFile/PlcdownGlass.json"; |
| | | PlcMesObject = InitUtil.initword(PlcCacheGlass); |
| | | } |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | | public static S7object getinstance() { |
| | | if (instance == null) { |
| | | synchronized (S7object.class) { |
| | | if (instance == null) { |
| | | instance = new S7object(); |
| | | } |
| | | } |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(100); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | byte[] getplcvlues= plccontrol.ReadByte(PlcMesObject.getPlcAddressBegin(),PlcMesObject.getPlcAddressLength()); |
| | | PlcMesObject.setPlcParameterList(getplcvlues); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * 玻璃id |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date CreateTime; |
| | | } |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | void updateTaskStateToZero(String id); |
| | | void updateTaskState(String id); |
| | | |
| | | /** |
| | | * 删除任务 |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public List<DownGlassTask> getUnloadingTaskState() { |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("task_stauts", 1); |
| | | queryWrapper.eq("task_stauts", 0); |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(String id) { |
| | | public void updateTaskState(String id) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 0).eq("id", id); |
| | | updateWrapper.set("task_stauts", 2).eq("id", id); |
| | | baseMapper.update(new DownGlassTask(), updateWrapper); |
| | | } |
| | | |
| | |
| | | // 如果主键值不存在,则进行插入操作 |
| | | DownGlassTask newDownGlassTask = new DownGlassTask(); |
| | | BeanUtils.copyProperties(downGlassTask, newDownGlassTask); |
| | | newDownGlassTask.setTaskStauts(0); // 默认任务状态为0 |
| | | |
| | | newDownGlassTask.setTaskStauts(1); // 默认任务状态为1 |
| | | newDownGlassTask.setCreateTime(new Date()); |
| | | int rows = baseMapper.insert(newDownGlassTask); |
| | | return rows > 0 ? rows : null; |
| | | } |
| | |
| | | package com.mes.downstorage.service; |
| | | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface DownStorageCageDetailsService { |
| | | public interface DownStorageCageDetailsService extends MPJBaseService<DownStorageCageDetails> { |
| | | /** |
| | | * @return //添加理片笼内信息 |
| | | */ |
| | |
| | | List<DownStorageCageDetails> CacheOut(int start, int end); |
| | | |
| | | /** |
| | | * @return 查询空格子 |
| | | * @return 出片 |
| | | */ |
| | | // List<DownStorageCageDetails> selectCacheEmpty2(); |
| | | |
| | | List<DownStorageCageDetails> CacheOut1(int start, int end); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | public interface DownStorageCageService extends MPJBaseService<DownStorageCage> { |
| | | |
| | | |
| | | DownGlassTask createDownGlassTask(GlassInfo glassInfo, String startCell, String endCell, String taskType); |
| | | DownGlassTask createDownGlassTask(DownStorageCageDetails glassInfo, String startCell, String endCell, String taskType); |
| | | // List<Map<String, Object>> selectCacheLeisure(); |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return 进片 |
| | | */ |
| | | boolean processInto(String Number); |
| | | |
| | | /** |
| | | |
| | | * @return 空格 |
| | | */ |
| | | |
| | | /** |
| | | * @return 出片 |
| | | */ |
| | | boolean processOut(); |
| | | |
| | | |
| | | /** |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | |
| | | |
| | |
| | | |
| | | import com.mes.downstorage.mapper.DownStorageCageMapper; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DownStorageCageDetailsServiceImpl extends ServiceImpl<DownStorageCageDetailsMapper, DownStorageCageDetails> implements DownStorageCageDetailsService { |
| | |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper downStorageCageDetailsMapper; |
| | | @Autowired |
| | | private GlassInfoMapper glassInfoMapper; |
| | | @Autowired |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | |
| | | @Override |
| | | public void addDownStorageCageDetails(DownStorageCageDetails details) { |
| | |
| | | |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // @Override |
| | |
| | | // } |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> CacheOut1(int start, int end) { |
| | | |
| | | |
| | | List<DownStorageCageDetails> cageDetails = downStorageCageDetailsMapper.selectList(null); |
| | | // Step 5: 判断 down_storage_cage_details 结果数量是否为9,如果是,则执行另外一个查询 |
| | | if (cageDetails.size() == 9) { |
| | | log.info("1、笼子满了的时候,按照笼内版图id 版图片序出"); |
| | | List<DownWorkstation> workstationList = downWorkstationMapper.selectList(new QueryWrapper<DownWorkstation>().between("workstation_id", start, end)); |
| | | |
| | | |
| | | List<String> flowCardIds = new ArrayList<>(); |
| | | for (DownWorkstation workstation : workstationList) { |
| | | flowCardIds.add(workstation.getFlowCardId()); |
| | | } |
| | | |
| | | if (flowCardIds.isEmpty()) { |
| | | log.error("未找到对应的 flow_card_id"); |
| | | return Collections.emptyList(); // 返回空列表或者抛出异常,视情况而定 |
| | | } |
| | | LambdaQueryWrapper<DownStorageCageDetails> anotherQueryWrapper = Wrappers.lambdaQuery(); |
| | | |
| | | anotherQueryWrapper.orderByAsc(DownStorageCageDetails::getTemperingLayoutId); |
| | | anotherQueryWrapper.orderByDesc(DownStorageCageDetails::getTemperingFeedSequence); |
| | | anotherQueryWrapper.in(DownStorageCageDetails::getFlowCardId, flowCardIds); |
| | | anotherQueryWrapper.last("LIMIT 1"); |
| | | return downStorageCageDetailsMapper.selectList(anotherQueryWrapper); |
| | | } else { |
| | | |
| | | // Step 1: 查询 DownWorkstation 表获取对应 workstation_id 的 flow_card_id |
| | | List<DownWorkstation> workstationList = downWorkstationMapper.selectList(new QueryWrapper<DownWorkstation>().between("workstation_id", start, end)); |
| | | |
| | | |
| | | List<String> flowCardIds = new ArrayList<>(); |
| | | for (DownWorkstation workstation : workstationList) { |
| | | flowCardIds.add(workstation.getFlowCardId()); |
| | | } |
| | | |
| | | if (flowCardIds.isEmpty()) { |
| | | log.error("2、未找到对应的 flow_card_id"); |
| | | return Collections.emptyList(); // 返回空列表或者抛出异常,视情况而定 |
| | | } |
| | | log.info("流程卡:{}", flowCardIds); |
| | | LambdaQueryWrapper<GlassInfo> queryWrapper2 = Wrappers.lambdaQuery(); |
| | | queryWrapper2.select(GlassInfo::getFlowCardId, |
| | | GlassInfo::getGlassId, |
| | | GlassInfo::getTemperingLayoutId, |
| | | GlassInfo::getTemperingFeedSequence) |
| | | .notInSql(GlassInfo::getGlassId, "SELECT glass_id FROM down_glass_info") |
| | | .orderByAsc(GlassInfo::getTemperingLayoutId) |
| | | .orderByDesc(GlassInfo::getTemperingFeedSequence) |
| | | .last("LIMIT 1"); |
| | | |
| | | // 查询 GlassInfo 表 |
| | | List<GlassInfo> glassInfos = glassInfoMapper.selectList(queryWrapper2); |
| | | if (glassInfos.isEmpty()) { |
| | | log.error("未找到对应的玻璃信息"); |
| | | return Collections.emptyList(); // 返回空列表或者抛出异常,视情况而定 |
| | | } |
| | | // Step 3: 构造查询 down_storage_cage_details 表的条件 |
| | | List<String> glassIds = glassInfos.stream().map(GlassInfo::getGlassId).collect(Collectors.toList()); |
| | | LambdaQueryWrapper<DownStorageCageDetails> cageDetailsQueryWrapper = Wrappers.lambdaQuery(); |
| | | cageDetailsQueryWrapper.in(DownStorageCageDetails::getGlassId, glassIds); |
| | | cageDetailsQueryWrapper.in(DownStorageCageDetails::getFlowCardId, flowCardIds); |
| | | |
| | | log.info("按照流程卡的版图id 版图片序出"); |
| | | // Step 4: 查询 down_storage_cage_details 表并返回结果 |
| | | return downStorageCageDetailsMapper.selectList(cageDetailsQueryWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.S7control; |
| | | |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper downStorageCageDetailsMapper; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DownGlassTask createDownGlassTask(GlassInfo glassInfo, String startCell, String endCell,String taskType ) { |
| | | DownGlassTask downGlassTask = new DownGlassTask(); |
| | | |
| | |
| | | return downGlassTask; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public DownGlassTask createDownGlassTask(DownStorageCageDetails glassInfo, String startCell, String endCell,String taskType ) { |
| | | DownGlassTask downGlassTask = new DownGlassTask(); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean processInto(String Number) { |
| | | |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo = glassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | //存在此玻璃编号 |
| | | if (GlassInfo != null) { |
| | | //同找到同流程卡附近空格 |
| | | List<DownStorageCageDetails> list = selectCacheEmpty(); |
| | | |
| | | if (list.size() > 0) { |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | | DownStorageCageDetails item = list.get(0); |
| | | |
| | | //selectInfo.insertCacheTask(GlassInfo.getId() + "", "0", item.getSlot() + "", "1", GlassInfo.getWidth(), GlassInfo.getHeight(), GlassInfo.getFilmsid(), GlassInfo.getThickness(), GlassInfo.getFlowcardId()); |
| | | |
| | | DownGlassTask downGlassTask = createDownGlassTask(GlassInfo,"0",item.getSlot()+"","1"); |
| | | |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | |
| | | |
| | | //完成后插入小片数据到缓存表 |
| | | return true; |
| | | } |
| | | |
| | | } else { |
| | | // ID编号不存在 不处理/回复PLC 进行报警提示 |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 理片 出 |
| | | * @return |
| | | */ |
| | | // |
| | | @Override |
| | | public boolean processOut() { |
| | | // 查询任务 |
| | | |
| | | |
| | | // PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | |
| | | List<DownStorageCageDetails> list = downStorageCageDetailsService.CacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = downStorageCageDetailsService.CacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = downStorageCageDetailsService.CacheOut(1, 10); |
| | | |
| | | |
| | | |
| | | // 优先 超出尺寸优先人工出片 人工处理 |
| | | |
| | | if (!list3.isEmpty()) { |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | | if (item3.getHeight() >= 1 && item3.getWidth() >= 1) { |
| | | |
| | | String endcell = "13"; |
| | | String SendEndcell = "1"; |
| | | |
| | | |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item3,"0",endcell,"2"); |
| | | |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | //如果同时前后端都空闲 优先后端出片并且优先满架 |
| | | else if (!list2.isEmpty()&&!list3.isEmpty()) { |
| | | |
| | | DownStorageCageDetails item3 = list2.get(0); |
| | | String endcell = "11"; |
| | | String SendEndcell = "1"; |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item3,"0",endcell,"2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | //S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | //S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | } |
| | | // 按照大小符合前端出片 |
| | | else if (!list.isEmpty()) { |
| | | DownStorageCageDetails item = list.get(0); |
| | | |
| | | // 出到 G06 |
| | | |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item,"0","06","2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | // 按照大小符合后端出片 |
| | | } else if (!list2.isEmpty()) { |
| | | DownStorageCageDetails item2 = list2.get(0); |
| | | |
| | | // 出到 G11 |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item2,"0","11","2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | //找到空格子 |
| | | @Override |
| | |
| | | .isNull(DownStorageCageDetails::getSlot) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 修改理片笼信息 功能:对笼内栅格玻璃 【启用/禁用】 |
| | | * |
| | | * @param downStorageCage |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | *修改理片笼信息 功能:对笼内栅格玻璃 【添加/删除/更换】 |
| | | * |
| | | * @param downStorageCageId |
| | | * @param downStorageCageDetails |
| | | * @return |
| | |
| | | @GetMapping("/getone") |
| | | public ResponseEntity<?> getOneDownWorkstations() { |
| | | try { |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1,5); |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1,6); |
| | | // 构建符合预期格式的响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("code", 200); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取工位显示图") |
| | | @ApiOperation("获取工位显示图1") |
| | | @GetMapping("/getwo") |
| | | public ResponseEntity<Map<String, Object>> getwo() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(); |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(1,3); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取工位显示图1") |
| | | @GetMapping("/getwo2") |
| | | public ResponseEntity<Map<String, Object>> getw2o() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(4,6); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | * 玻璃ID |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 工位id |
| | | */ |
| | | private String workstationid; |
| | | |
| | | /** |
| | | * 机器人 |
| | | */ |
| | | private String Robot; |
| | | } |
| | |
| | | */ |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | |
| | | void insertdownglassinfo(); |
| | | |
| | | |
| | | /** |
| | | * @return // |
| | | * 工位显示 |
| | | */ |
| | | List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(); |
| | | List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start,int end); |
| | | |
| | | |
| | | /** |
| | | * @param flowcardid |
| | | * 根据流程卡号查询 |
| | | * @return |
| | | */ |
| | | DownWorkstation selectByFlowCardId(String flowcardid); |
| | | } |
| | |
| | | /** |
| | | * @param downGlassInfo 插入任务 |
| | | */ |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo,String workstationid); |
| | | |
| | | /** |
| | | * @param downWorkstationTask 更新任务状态 |
| | | */ |
| | | void updateTaskStateToZero(DownWorkstationTask downWorkstationTask); |
| | | void updateTaskState(DownWorkstationTask downWorkstationTask); |
| | | |
| | | /** |
| | | * @return 获取任务状态为1的信息 |
| | |
| | | |
| | | //工位显示 |
| | | @Override |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation() { |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start,int end) { |
| | | MPJQueryWrapper<DownWorkstation> queryWrapper = new MPJQueryWrapper<>(); |
| | | queryWrapper.select("t.workstation_id", "t.flow_card_id", "COALESCE(SUM(b.width), 0) AS totalwidth", "COALESCE(SUM(b.height), 0) AS totalheight") |
| | | .leftJoin("down_glass_info b on t.flow_card_id = b.flow_card_id") |
| | | .groupBy("t.workstation_id", "t.flow_card_id"); |
| | | .groupBy("t.workstation_id", "t.flow_card_id") |
| | | .orderByAsc("t.workstation_id").between("t.workstation_id", start, end) |
| | | |
| | | ; |
| | | |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | // List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DownWorkstionAndDownGlassinfo downWorkstionAndDownGlassinfo : workstationList) { |
| | | Map<String, Object> rack = new HashMap<>(); |
| | | |
| | | // 创建子项(item)对象 |
| | | Map<String, Object> item = new HashMap<>(); |
| | | item.put("height", downWorkstionAndDownGlassinfo.getTotalheight()); // 设置子项高度,根据实际情况设置 |
| | | item.put("width", downWorkstionAndDownGlassinfo.getTotalwidth()); // 设置子项宽度,根据实际情况设置 |
| | | item.put("fillColor", "yellow"); // 设置子项颜色 |
| | | item.put("content", downWorkstionAndDownGlassinfo.getFlowCardId()); // 使用流程卡号作为子项内容 |
| | | item.put("height", downWorkstionAndDownGlassinfo.getTotalheight()); |
| | | item.put("width", downWorkstionAndDownGlassinfo.getTotalwidth()); |
| | | item.put("fillColor", "yellow"); |
| | | item.put("content", downWorkstionAndDownGlassinfo.getFlowCardId()); |
| | | |
| | | rack.put("item", item); // 将子项对象放入货架对象中 |
| | | // 查询 DownGlassInfo 并添加到 item 中 |
| | | MPJQueryWrapper<DownGlassInfo> glassInfoQueryWrapper = new MPJQueryWrapper<>(); |
| | | glassInfoQueryWrapper.select("*"); // 查询所有列 |
| | | glassInfoQueryWrapper.eq("flow_card_id", downWorkstionAndDownGlassinfo.getFlowCardId()); |
| | | List<DownGlassInfo> downGlassInfoList = downGlassInfoMapper.selectList(glassInfoQueryWrapper); |
| | | |
| | | result.add(rack); // 将货架对象添加到结果列表中 |
| | | //log.info("货架对象: {}", rack); |
| | | |
| | | if (!downGlassInfoList.isEmpty()) { |
| | | |
| | | item.put("downGlassInfoList", downGlassInfoList); |
| | | |
| | | } |
| | | |
| | | rack.put("item", item); |
| | | result.add(rack); |
| | | } |
| | | log.info("result"+(result)); |
| | | return result; // 返回最终结果 |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DownWorkstation selectByFlowCardId(String flowcardid) { |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowcardid); |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insertdownglassinfo() { |
| | | |
| | | |
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState(); |
| | | // |
| | | |
| | | |
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) { |
| | | |
| | | // |
| | | |
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) { |
| | | // 创建新的 DownGlassInfo 对象并设置相关属性 |
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo(); |
| | | // newdownGlassInfo.setId(downGlassInfo.getId()); |
| | | newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId()); |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | // 初始化顺序字段值 |
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1; |
| | | // newdownGlassInfo.setId(downGlassInfo.getId()); |
| | | newdownGlassInfo.setWidth(downGlassInfo.getWidth()); |
| | | newdownGlassInfo.setGlassId(downGlassInfo.getGlassId()); |
| | | newdownGlassInfo.setHeight(downGlassInfo.getHeight()); |
| | | newdownGlassInfo.setThickness(downGlassInfo.getThickness()); |
| | | newdownGlassInfo.setFilmsid(downGlassInfo.getFilmsid()); |
| | | // 设置顺序字段值 |
| | | newdownGlassInfo.setSequence(sequence); |
| | | |
| | | // 插入数据到下片玻璃信息表 |
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo); |
| | | //插入数据到机械手任务表 |
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo); |
| | | //更新下片任务表状态为0 |
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getGlassId()); |
| | | //删除下片任务表中的记录 |
| | | downGlassTaskService.deleteTask(downGlassInfo.getGlassId()); |
| | | |
| | | sequence++; // 递增顺序字段值 |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | try { |
| | | //查询下片工位表中架子是否绑定了流程卡号 工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | List<DownWorkstationTask> taskdownWorkstation = downWorkstationTaskService.getTaskState(); |
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) { |
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录 |
| | | for (DownWorkstationTask downWorkstation : taskdownWorkstation) { |
| | | //更新下片工位表中已落架数量 |
| | | DownWorkstation downWorkstation1 = selectByFlowCardId(downWorkstation.getFlowCardId()); |
| | | updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation1.getRacksnumber() + 1); |
| | | //更新机械任务表中状态为0 |
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation); |
| | | //删除机械任务表 |
| | | downWorkstationTaskService.deleteTask(downWorkstation); |
| | | |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // 打印异常信息 |
| | | e.printStackTrace(); |
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public class DownWorkstationTaskServiceImpl extends ServiceImpl<DownWorkstationTaskMapper, DownWorkstationTask> implements DownWorkstationTaskService { |
| | | |
| | | |
| | | public void insertdownWorkstationtask(DownGlassInfo downGlassInfo) { |
| | | public void insertdownWorkstationtask(DownGlassInfo downGlassInfo,String workstationid) { |
| | | DownWorkstationTask entity = new DownWorkstationTask(); |
| | | // 查询当前最大的 id 值 |
| | | Long maxId = getMaxId(); |
| | |
| | | BeanUtils.copyProperties(downGlassInfo,entity); |
| | | entity.setId(newId); // 设置手动递增的 id |
| | | entity.setState(1); |
| | | entity.setWorkstationid(workstationid); |
| | | baseMapper.insert(entity); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(DownWorkstationTask downWorkstationTask) { |
| | | public void updateTaskState(DownWorkstationTask downWorkstationTask) { |
| | | LambdaUpdateWrapper<DownWorkstationTask> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
| | | |
| | | lambdaUpdateWrapper.set(DownWorkstationTask::getState, 0) |
| | | lambdaUpdateWrapper.set(DownWorkstationTask::getState, 2) |
| | | .eq(DownWorkstationTask::getGlassId, downWorkstationTask.getGlassId()); |
| | | |
| | | baseMapper.update(new DownWorkstationTask(), lambdaUpdateWrapper); |
New file |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downstorage.service.DownStorageCageService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/5/8 8:17 |
| | | * @Description: |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class DownCacheGlassTask { |
| | | |
| | | |
| | | @Autowired |
| | | DownGlassTaskService downGlassTaskService; |
| | | @Autowired |
| | | GlassInfoService glassInfoService; |
| | | @Autowired |
| | | DownStorageCageDetailsService downStorageCageDetailsService; |
| | | @Autowired |
| | | DownStorageCageService downStorageCageService; |
| | | @Autowired |
| | | DownWorkstationService downWorkstationService; |
| | | @Autowired |
| | | DownGlassInfoService downGlassInfoService; |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | | |
| | | // @Value("${mes.threshold}") |
| | | private int threshold; |
| | | |
| | | //@Scheduled(fixedDelay = 1000) |
| | | public void plcdownGlassTask() { |
| | | // PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | // String taskRequestTypeValue = plcParameterObject.getPlcParameter("A06_request_word").getValue(); |
| | | // String glassIdeValue = plcParameterObject.getPlcParameter("A05_scanning_ID").getValue(); |
| | | // String confirmationWrodValue = plcParameterObject.getPlcParameter("MES_confirmation_word").getValue(); |
| | | // String outGlassstate = plcParameterObject.getPlcParameter("A09_glass_status").getValue(); |
| | | // String confirmationWrodAddress = plcParameterObject.getPlcParameter("MES_confirmation_word").getAddress(); |
| | | // String G06RobotTaskRequestWord = plcParameterObject.getPlcParameter("G06RobotTaskRequestWord").getAddress(); |
| | | |
| | | |
| | | String taskRequestTypeValue ="3"; |
| | | String glassIdeValue ="NG24041101C002-2-6-1-6"; |
| | | String confirmationWrodValue ="1"; |
| | | String outGlassstate="1"; |
| | | String confirmationWrodAddress="1"; |
| | | String G11RobotTaskRequestWord ="1"; |
| | | String G06RobotTaskRequestWord ="1"; |
| | | String G13RobotTaskRequestWord ="1"; |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态为:{}", |
| | | taskRequestTypeValue, glassIdeValue, confirmationWrodValue, outGlassstate); |
| | | |
| | | // if ("0".equals(taskRequestTypeValue)) { |
| | | // if ("0".equals(confirmationWrodValue)) { |
| | | // log.info("2、获取到的请求字为0,且确认字为0,不执行任务"); |
| | | // return; |
| | | // } |
| | | // log.info("2、获取到的请求字为0,将确认字改为0"); |
| | | // S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 0); |
| | | // return; |
| | | // } |
| | | // if (!"0".equals(confirmationWrodValue)) { |
| | | // log.info("2、获取到的请求字不为0,将确认字改为0"); |
| | | // S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 0); |
| | | // return; |
| | | // } |
| | | |
| | | if ("1".equals(taskRequestTypeValue)) { |
| | | log.info("3、进片请求,且确认字为0,执行进片任务"); |
| | | inTo(glassIdeValue, confirmationWrodAddress); |
| | | } else if ("2".equals(taskRequestTypeValue)) { |
| | | |
| | | log.info("3、出片请求,且确认字为0,执行进片任务"); |
| | | outTo( confirmationWrodAddress); |
| | | |
| | | } else if ("3".equals(taskRequestTypeValue)) { |
| | | log.info("3、进片和出片都空闲,执行出片任务"); |
| | | if (outTo(confirmationWrodAddress)) { |
| | | inTo(glassIdeValue, confirmationWrodAddress); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | if (("1".equals(G11RobotTaskRequestWord) || "1".equals(G06RobotTaskRequestWord)) || "1".equals(G13RobotTaskRequestWord)) { |
| | | log.info("4、有机器人下片请求,执行下片任务"); |
| | | insertdownglassinfo(); |
| | | } |
| | | |
| | | //自动绑定架子,如果工位表没有绑定架子,默认将笼子中数量最多的流程卡号绑定机器手2的空架子 |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 进片任务 |
| | | * @param glassId |
| | | * @param confirmationWrodAddress |
| | | * @param |
| | | */ |
| | | private void inTo(String glassId, String confirmationWrodAddress) { |
| | | log.info("1、按照玻璃id:{}获取玻璃小片信息", glassId); |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId)); |
| | | if (glassInfo == null) { |
| | | log.info("2、此玻璃编号不存在"); |
| | | return; |
| | | } |
| | | log.info("2、获取到的玻璃信息为{}", glassInfo); |
| | | |
| | | // if(glassInfo.getFlowCardId()=){ |
| | | // |
| | | // } |
| | | //添加进片任务 查找空格 |
| | | List<DownStorageCageDetails> list = downStorageCageService.selectCacheEmpty(); |
| | | if(list.size()>0){ |
| | | DownStorageCageDetails item = list.get(0); |
| | | |
| | | |
| | | |
| | | log.info("3、查询卧式理片笼里面的空格:{}", list); |
| | | log.info("4、将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | DownStorageCageDetails details = new DownStorageCageDetails(); |
| | | BeanUtils.copyProperties(glassInfo, details); |
| | | details.setState(1); |
| | | details.setGlassId(glassInfo.getGlassId()); |
| | | details.setSlot(item.getSlot()); |
| | | details.setDeviceId(item.getDeviceId()); |
| | | downStorageCageDetailsService.save(details); |
| | | log.info("5、玻璃信息已存入理片笼详情表,玻璃信息为{}", details); |
| | | |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(glassInfo, "0", item.getSlot() + "", "1"); |
| | | //添加进片任务 |
| | | log.info("6、生成进片任务信息存入任务表{}", downGlassTask); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | } |
| | | //S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 1); |
| | | log.info("7、发送确认字完成"); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 出片任务 |
| | | * |
| | | * @param confirmationWrodAddress |
| | | * |
| | | */ |
| | | private Boolean outTo( String confirmationWrodAddress) { |
| | | log.info("单片情况根据传入的料架号 查询符合按照版图id和片序出片,并且优先出满架的小片"); |
| | | List<DownStorageCageDetails> list = downStorageCageDetailsService.CacheOut1(1,3); |
| | | |
| | | List<DownStorageCageDetails> list2 = downStorageCageDetailsService.CacheOut1(4,6); |
| | | |
| | | List<DownStorageCageDetails> list3 = downStorageCageDetailsService.CacheOut1(1,6); |
| | | // 优先 超出尺寸优先人工出片 人工处理 |
| | | if (!list3.isEmpty()) { |
| | | |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | | if (item3.getHeight() >= 2500 && item3.getWidth() >= 2660) { |
| | | log.info("人工处理"); |
| | | String endcell = "7"; |
| | | |
| | | |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(item3, "9", endcell, "2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | // S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 2); |
| | | |
| | | return true; |
| | | } |
| | | else if (!list2.isEmpty() && !list3.isEmpty()) { |
| | | log.info("前后端都空闲 优先后端出片并且优先满架"); |
| | | DownStorageCageDetails item4 = list2.get(0); |
| | | |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, item4.getFlowCardId())); |
| | | String endcell = String.valueOf(downWorkstation.getWorkstationId()); |
| | | |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(item4, "9", endcell, "2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | //S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 2); |
| | | |
| | | return true; |
| | | |
| | | } |
| | | // 按照版图id和片序符合前端出片 |
| | | else if (!list.isEmpty()) { |
| | | log.info("前端出片"); |
| | | DownStorageCageDetails item = list.get(0); |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, item.getFlowCardId())); |
| | | String endcell = String.valueOf(downWorkstation.getWorkstationId()); |
| | | // 出到 G06 |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(item, "9", endcell, "2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | // S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 2); |
| | | |
| | | |
| | | return true; |
| | | // 按照版图id和片序符合后端出片 |
| | | } else if (!list2.isEmpty()) { |
| | | log.info("后端出片"); |
| | | DownStorageCageDetails item2 = list2.get(0); |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, item2.getFlowCardId())); |
| | | String endcell = String.valueOf(downWorkstation.getWorkstationId()); |
| | | // 出到 G11 |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(item2, "9", endcell, "2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | // S7object.getinstance().plccontrol.WriteWord(confirmationWrodAddress, (short) 2); |
| | | return true; |
| | | } |
| | | } |
| | | //如果同时前后端都空闲 优先后端出片并且优先满架 |
| | | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // |
| | | public void insertdownglassinfo() { |
| | | try { |
| | | |
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState(); |
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) { |
| | | |
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) { |
| | | // 创建新的 DownGlassInfo 对象并设置相关属性 |
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo(); |
| | | |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | // 初始化顺序字段值 |
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1; |
| | | BeanUtils.copyProperties(downGlassInfo, newdownGlassInfo); |
| | | // 设置顺序字段值 |
| | | newdownGlassInfo.setSequence(sequence); |
| | | // 插入数据到下片玻璃信息表 |
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo); |
| | | log.info("插入数据到下片玻璃信息表"); |
| | | DownWorkstation downWorkstation1 = downWorkstationService.selectByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | downWorkstationService.updateracksnumber(downGlassInfo.getFlowCardId(), downWorkstation1.getRacksnumber() + 1); |
| | | log.info("更新落架数量"); |
| | | sequence++; // 递增顺序字段值 |
| | | |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // 打印异常信息 |
| | | e.printStackTrace(); |
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息 |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G06RobotTaskRequestWord",
|
| | | "addressIndex": "4",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G06ID",
|
| | | "addressIndex": "6",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G11RobotTaskRequestWord",
|
| | | "addressIndex": "8",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G011ID",
|
| | | "addressIndex": "10",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "出片ID",
|
| | | "codeId": "OutputID",
|
| | | "addressIndex": "26",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "前端后端下片",
|
| | | "codeId": "FrontOrRearLowerSlice",
|
| | | "addressIndex": "28",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G06RobotTaskReply",
|
| | | "addressIndex": "32",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G06Rack",
|
| | | "addressIndex": "34",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G11RobotTaskReply",
|
| | | "addressIndex": "36",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "spare",
|
| | | "codeId": "G11Rack",
|
| | | "addressIndex": "38",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "MES任务状态",
|
| | | "codeId": "MESTaskState",
|
| | | "addressIndex": "56",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警状态",
|
| | | "codeId": "AlarmState",
|
| | | "addressIndex": "60",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字1",
|
| | | "codeId": "Alarm1",
|
| | | "addressIndex": "62",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字2",
|
| | | "codeId": "Alarm2",
|
| | | "addressIndex": "64",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字3",
|
| | | "codeId": "Alarm3",
|
| | | "addressIndex": "66",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字4",
|
| | | "codeId": "Alarm4",
|
| | | "addressIndex": "68",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "内容",
|
| | | "codeId": "neirong",
|
| | | "addressIndex": "70",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "设备状态字",
|
| | | "codeId": "device",
|
| | | "addressIndex": "72",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出1",
|
| | | "codeId": "InOut1",
|
| | | "addressIndex": "78",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出2",
|
| | | "codeId": "InOut2",
|
| | | "addressIndex": "80",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出3",
|
| | | "codeId": "InOut3",
|
| | | "addressIndex": "82",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出4",
|
| | | "codeId": "InOut4",
|
| | | "addressIndex": "84",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出5",
|
| | | "codeId": "InOut5",
|
| | | "addressIndex": "86",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出6",
|
| | | "codeId": "InOut6",
|
| | | "addressIndex": "88",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出7",
|
| | | "codeId": "InOut7",
|
| | | "addressIndex": "90",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G04动作状态",
|
| | | "codeId": "G04ActionState",
|
| | | "addressIndex": "102",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G05动作状态",
|
| | | "codeId": "G05ActionState",
|
| | | "addressIndex": "104",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G06动作状态",
|
| | | "codeId": "G06ActionState",
|
| | | "addressIndex": "106",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G07动作状态",
|
| | | "codeId": "G07ActionState",
|
| | | "addressIndex": "108",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G08动作状态",
|
| | | "codeId": "G08ActionState",
|
| | | "addressIndex": "110",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G09动作状态",
|
| | | "codeId": "G09ActionState",
|
| | | "addressIndex": "112",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G10动作状态",
|
| | | "codeId": "G10ActionState",
|
| | | "addressIndex": "114",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G11动作状态",
|
| | | "codeId": "G11ActionState",
|
| | | "addressIndex": "116",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G12动作状态",
|
| | | "codeId": "G12ActionState",
|
| | | "addressIndex": "118",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G13动作状态",
|
| | | "codeId": "G13ActionState",
|
| | | "addressIndex": "120",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G04ID",
|
| | | "codeId": "G04IDS",
|
| | | "addressIndex": "122",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G05ID",
|
| | | "codeId": "G05IDS",
|
| | | "addressIndex": "124",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G06ID",
|
| | | "codeId": "G06IDS",
|
| | | "addressIndex": "126",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G07ID",
|
| | | "codeId": "G07IDS",
|
| | | "addressIndex": "128",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G08ID",
|
| | | "codeId": "G08IDS",
|
| | | "addressIndex": "130",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G09ID",
|
| | | "codeId": "G09IDS",
|
| | | "addressIndex": "132",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G10ID",
|
| | | "codeId": "G10IDS",
|
| | | "addressIndex": "134",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G11ID",
|
| | | "codeId": "G11IDS",
|
| | | "addressIndex": "136",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G12ID",
|
| | | "codeId": "G12IDS",
|
| | | "addressIndex": "138",
|
| | | "addressLenght": "2"
|
| | | },
|
| | |
| | | @Test |
| | | public void CacheEmpty() { |
| | | log.info("测试出片"); |
| | | downStorageCageDetailsService.CacheOut(1,10); |
| | | downStorageCageDetailsService.CacheOut(1,2); |
| | | |
| | | } |
| | | @Test |
| | | public void CacheEmpty1() { |
| | | log.info("测试出片"); |
| | | downStorageCageDetailsServiceImpl.CacheOut1(1,6); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void getTotalGlassDimensionsByWorkstation() { |
| | | log.info("工位显示"); |
| | | downWorkstationService.getTotalGlassDimensionsByWorkstation(); |
| | | downWorkstationService.getTotalGlassDimensionsByWorkstation(1,3); |
| | | |
| | | } |
| | | |
| | |
| | | public void updateTaskStateToZero() { |
| | | log.info("更新状态0"); |
| | | |
| | | downGlassTaskServiceImpl.updateTaskStateToZero("3"); |
| | | downGlassTaskServiceImpl.updateTaskState("3"); |
| | | } |
| | | |
| | | |