Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
| | |
| | | { |
| | | "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":"" |
| | | } |
| | | ] |
| | | "plcAddressBegin": "DB14.0", |
| | | "plcAddressLenght": "938", |
| | | "dataType": "word", |
| | | "parameteInfor": [{ |
| | | "codeId": "D01ID", |
| | | "addressIndex": "0", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D02ID", |
| | | "addressIndex": "32", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID1", |
| | | "addressIndex": "64", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID2", |
| | | "addressIndex": "96", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID3", |
| | | "addressIndex": "128", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID4", |
| | | "addressIndex": "160", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID5", |
| | | "addressIndex": "192", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID6", |
| | | "addressIndex": "224", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ID", |
| | | "addressIndex": "256", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID1", |
| | | "addressIndex": "288", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID2", |
| | | "addressIndex": "328", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID3", |
| | | "addressIndex": "352", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID4", |
| | | "addressIndex": "384", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID5", |
| | | "addressIndex": "416", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID6", |
| | | "addressIndex": "448", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID1", |
| | | "addressIndex": "480", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID2", |
| | | "addressIndex": "512", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID3", |
| | | "addressIndex": "544", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID4", |
| | | "addressIndex": "576", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID5", |
| | | "addressIndex": "608", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID6", |
| | | "addressIndex": "640", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID1", |
| | | "addressIndex": "672", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID2", |
| | | "addressIndex": "704", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID3", |
| | | "addressIndex": "736", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID4", |
| | | "addressIndex": "768", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID5", |
| | | "addressIndex": "800", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID6", |
| | | "addressIndex": "832", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ToMES", |
| | | "addressIndex": "874", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ToMES", |
| | | "addressIndex": "876", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D01ToMES", |
| | | "addressIndex": "878", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ToMES", |
| | | "addressIndex": "880", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD03", |
| | | "addressIndex": "888", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD05", |
| | | "addressIndex": "890", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToPLC", |
| | | "addressIndex": "892", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport1", |
| | | "addressIndex": "914", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport2", |
| | | "addressIndex": "916", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport3", |
| | | "addressIndex": "918", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport4", |
| | | "addressIndex": "920", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport5", |
| | | "addressIndex": "922", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport6", |
| | | "addressIndex": "924", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport1", |
| | | "addressIndex": "926", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport2", |
| | | "addressIndex": "928", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport3", |
| | | "addressIndex": "930", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport4", |
| | | "addressIndex": "932", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport5", |
| | | "addressIndex": "934", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport6", |
| | | "addressIndex": "936", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "deviceState", |
| | | "addressIndex": "864", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01State", |
| | | "addressIndex": "866", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02State", |
| | | "addressIndex": "868", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03State", |
| | | "addressIndex": "870", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05State", |
| | | "addressIndex": "872", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD01", |
| | | "addressIndex": "894", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD04", |
| | | "addressIndex": "896", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | } |
| | | ] |
| | | } |
| | |
| | | { |
| | | "plcAddressBegin":"DB14.0", |
| | | "plcAddressLenght":"84", |
| | | "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":"34", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D04ID1", |
| | | "addressIndex":"10", |
| | | "addressLenght":"36", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "E01Status", |
| | | "addressIndex":"2", |
| | | "addressLenght":"68", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "E02Status", |
| | | "addressIndex":"2", |
| | | "addressLenght":"70", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "MaxTaskNo", |
| | | "addressIndex":"2", |
| | | "addressLenght":"72", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D02MaxWidth", |
| | | "addressIndex":"2", |
| | | "addressLenght":"74", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D05MaxWidth", |
| | | "addressIndex":"2", |
| | | "addressLenght":"76", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "GlassGap", |
| | | "addressIndex":"2", |
| | | "addressLenght":"78", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D02SitState", |
| | | "addressIndex":"80", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | }, |
| | | { |
| | | "codeId": "D05SitState", |
| | | "addressIndex":"82", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"" |
| | | } |
| | | ] |
| | | "plcAddressBegin": "DB14.0", |
| | | "plcAddressLenght": "938", |
| | | "dataType": "word", |
| | | "parameteInfor": [{ |
| | | "codeId": "D01ID", |
| | | "addressIndex": "0", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D02ID", |
| | | "addressIndex": "32", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID1", |
| | | "addressIndex": "64", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID2", |
| | | "addressIndex": "96", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID3", |
| | | "addressIndex": "128", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID4", |
| | | "addressIndex": "160", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID5", |
| | | "addressIndex": "192", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ID6", |
| | | "addressIndex": "224", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ID", |
| | | "addressIndex": "256", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID1", |
| | | "addressIndex": "288", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID2", |
| | | "addressIndex": "328", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID3", |
| | | "addressIndex": "352", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID4", |
| | | "addressIndex": "384", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID5", |
| | | "addressIndex": "416", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ID6", |
| | | "addressIndex": "448", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID1", |
| | | "addressIndex": "480", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID2", |
| | | "addressIndex": "512", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID3", |
| | | "addressIndex": "544", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID4", |
| | | "addressIndex": "576", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID5", |
| | | "addressIndex": "608", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01ID6", |
| | | "addressIndex": "640", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID1", |
| | | "addressIndex": "672", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID2", |
| | | "addressIndex": "704", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID3", |
| | | "addressIndex": "736", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID4", |
| | | "addressIndex": "768", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID5", |
| | | "addressIndex": "800", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02ID6", |
| | | "addressIndex": "832", |
| | | "addressLenght": "32", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ToMES", |
| | | "addressIndex": "874", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ToMES", |
| | | "addressIndex": "876", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D01ToMES", |
| | | "addressIndex": "878", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ToMES", |
| | | "addressIndex": "880", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD03", |
| | | "addressIndex": "888", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD05", |
| | | "addressIndex": "890", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToPLC", |
| | | "addressIndex": "892", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport1", |
| | | "addressIndex": "914", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport2", |
| | | "addressIndex": "916", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport3", |
| | | "addressIndex": "918", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport4", |
| | | "addressIndex": "920", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport5", |
| | | "addressIndex": "922", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "StartAddToImport6", |
| | | "addressIndex": "924", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport1", |
| | | "addressIndex": "926", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport2", |
| | | "addressIndex": "928", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport3", |
| | | "addressIndex": "930", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport4", |
| | | "addressIndex": "932", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport5", |
| | | "addressIndex": "934", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "TargetAddToImport6", |
| | | "addressIndex": "936", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "deviceState", |
| | | "addressIndex": "864", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E01State", |
| | | "addressIndex": "866", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "E02State", |
| | | "addressIndex": "868", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03State", |
| | | "addressIndex": "870", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05State", |
| | | "addressIndex": "872", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD01", |
| | | "addressIndex": "894", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD04", |
| | | "addressIndex": "896", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | } |
| | | ] |
| | | } |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | //todo:临时将钢化出片线路改为人工出片 |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static final String BIG_STORAGE_REQUEST = "0"; |
| | | public static final String BIG_STORAGE_REQUEST_IN = "1"; |
| | | |
| | | /** |
| | | * 大理片笼详情状态 |
| | | * 0 大理片笼进片中 |
| | | * 1 大理片笼在笼内 |
| | | * 2 大理片笼出片中 |
| | | * 3 大理片笼出片完成 |
| | | * 4 大理片笼手动出片 |
| | | */ |
| | | public static final Integer BIG_STORAGE_IN = 0; |
| | | public static final Integer BIG_STORAGE_INSIDE = 1; |
| | | public static final Integer BIG_STORAGE_OUT = 2; |
| | | public static final Integer BIG_STORAGE_OUTSIDE = 3; |
| | | public static final Integer BIG_STORAGE_MANUAL = 4; |
| | | |
| | | /** |
| | | * 卧转立进片请求 |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 线路 |
| | | */ |
| | | private Integer line; |
| | | |
| | | /** |
| | | * 工序 |
| | | */ |
| | | private Integer workingProcedureId; |
| | | private Integer workingProcedure; |
| | | |
| | | /** |
| | | * 玻璃id |
| | |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | private Integer processId; |
| | | private String processId; |
| | | |
| | | /** |
| | | * 序号 |
| | |
| | | |
| | | void submitDamage(DateTime startTime, DateTime endTime, int type, int status, int workingProcedureId); |
| | | |
| | | void insertDamage(String glassId); |
| | | void insertDamage(Damage damage); |
| | | } |
| | |
| | | import com.mes.damage.service.DamageService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.mapper.WorkAssignmentMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class DamageServiceImpl extends ServiceImpl<DamageMapper, Damage> implements DamageService { |
| | | |
| | | @Resource |
| | | GlassInfoMapper glassInfoMapper; |
| | | @Resource |
| | | WorkAssignmentMapper workAssignmentMapper; |
| | | |
| | | /** |
| | | * 查询报工信息 |
| | | */ |
| | | @Override |
| | | public List<Damage> selectDamage(DateTime startTime, DateTime endTime, int type, int status, int workingProcedureId){ |
| | | LambdaQueryWrapper<Damage> damageSelectWrapper =new LambdaQueryWrapper<>(); |
| | |
| | | damageSelectWrapper.eq(Damage::getStatus,status); |
| | | } |
| | | if(workingProcedureId!=0){ |
| | | damageSelectWrapper.eq(Damage::getWorkingProcedureId,workingProcedureId); |
| | | damageSelectWrapper.eq(Damage::getWorkingProcedure,workingProcedureId); |
| | | } |
| | | return baseMapper.selectList(damageSelectWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 提交报工 |
| | | */ |
| | | @Override |
| | | public void submitDamage(DateTime startTime, DateTime endTime, int type, int status, int workingProcedureId){ |
| | | LambdaUpdateWrapper<Damage> damageUpdateWrapper=new LambdaUpdateWrapper<>(); |
| | |
| | | damageUpdateWrapper.eq(Damage::getStatus,status); |
| | | } |
| | | if(workingProcedureId!=0){ |
| | | damageUpdateWrapper.eq(Damage::getWorkingProcedureId,workingProcedureId); |
| | | damageUpdateWrapper.eq(Damage::getWorkingProcedure,workingProcedureId); |
| | | } |
| | | Damage damage=new Damage(); |
| | | damage.setStatus(2); |
| | | baseMapper.update(damage,damageUpdateWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 添加报工信息 |
| | | */ |
| | | @Override |
| | | public void insertDamage(String glassId){ |
| | | public void insertDamage(Damage damage){ |
| | | LambdaQueryWrapper<GlassInfo> glassInfoSelectWrapper=new LambdaQueryWrapper<>(); |
| | | GlassInfo glassInfo=new GlassInfo(); |
| | | glassInfoSelectWrapper.eq(GlassInfo::getGlassId,damage.getGlassId()); |
| | | GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoSelectWrapper); |
| | | |
| | | LambdaQueryWrapper<WorkAssignment> workAssignmentSelectWrapper=new LambdaQueryWrapper<>(); |
| | | workAssignmentSelectWrapper |
| | | .eq(WorkAssignment::getLine,damage.getLine()) |
| | | .eq(WorkAssignment::getWorkProcesses,damage.getWorkingProcedure()); |
| | | WorkAssignment workAssignment=workAssignmentMapper.selectOne(workAssignmentSelectWrapper); |
| | | damage.setTeamsGroupsName(workAssignment.getTeamsGroupsName()); |
| | | damage.setDeviceName(workAssignment.getDeviceName()); |
| | | |
| | | damage.setEngineerId(glassInfo.getEngineerId()); |
| | | damage.setTemperingLayoutId(glassInfo.getTemperingLayoutId()); |
| | | damage.setProcessId(glassInfo.getFlowCardId()); |
| | | damage.setOrderNumber(glassInfo.getGlassType()); |
| | | damage.setTechnologyNumber(glassInfo.getLayer()); |
| | | damage.setDamageTime(LocalDateTime.now()); |
| | | baseMapper.insert(damage); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | | */ |
| | | private String glassType; |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | |
| | | /** |
| | | * 订单序号 |
| | | */ |
| | | private String orderSort; |
| | | private Integer orderSort; |
| | | /** |
| | | * 旋转角度 |
| | | */ |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | @DS("salve_hangzhoumes_1") |
| | | public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<TemperingGlassInfo> list); |
| | |
| | | |
| | | // 3、数据源配置 |
| | | DataSourceConfig dsc = new DataSourceConfig(); |
| | | dsc.setUrl("jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8"); |
| | | dsc.setUrl("jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8"); |
| | | dsc.setDriverName("com.mysql.cj.jdbc.Driver"); |
| | | dsc.setUsername("root"); |
| | | dsc.setPassword("beibo.123/"); |
| | |
| | | // 4、包配置 |
| | | PackageConfig pc = new PackageConfig(); |
| | | pc.setParent("com.mes"); |
| | | pc.setModuleName("reporting_work"); //模块名 |
| | | pc.setModuleName("work_assignment"); //模块名 |
| | | pc.setController("controller"); |
| | | pc.setService("service"); |
| | | pc.setMapper("mapper"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | strategy.setInclude("reporting_work"); |
| | | strategy.setInclude("work_assignment"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
New file |
| | |
| | | package com.mes.work_assignment.controller; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.utils.Result; |
| | | import com.mes.work_assignment.service.WorkAssignmentService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/work_assignment/work-assignment") |
| | | public class WorkAssignmentController { |
| | | |
| | | @Autowired |
| | | private WorkAssignmentService workAssignmentService; |
| | | @ApiOperation("报工数据查询") |
| | | @GetMapping("/selectWorkAssignment") |
| | | public Result selectDamage(int line,String workingProcedure) { |
| | | return Result.build(200,"查询成功",workAssignmentService.selectWorkAssignment(line,workingProcedure)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.work_assignment.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class WorkAssignment implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 线路 |
| | | */ |
| | | private Integer line; |
| | | |
| | | /** |
| | | * 工序 |
| | | */ |
| | | private String workProcesses; |
| | | |
| | | /** |
| | | * 班组名称 |
| | | */ |
| | | private String teamsGroupsName; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String deviceName; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.work_assignment.mapper; |
| | | |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | public interface WorkAssignmentMapper extends BaseMapper<WorkAssignment> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.work_assignment.mapper.WorkAssignmentMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.work_assignment.service; |
| | | |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | public interface WorkAssignmentService extends IService<WorkAssignment> { |
| | | |
| | | WorkAssignment selectWorkAssignment(int line, String workingProcedure); |
| | | } |
New file |
| | |
| | | package com.mes.work_assignment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.mapper.WorkAssignmentMapper; |
| | | import com.mes.work_assignment.service.WorkAssignmentService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | @Service |
| | | public class WorkAssignmentServiceImpl extends ServiceImpl<WorkAssignmentMapper, WorkAssignment> implements WorkAssignmentService { |
| | | |
| | | /** |
| | | * 查询当前值班信息 |
| | | * @param line |
| | | * @param workingProcedure |
| | | * @return |
| | | */ |
| | | @Override |
| | | public WorkAssignment selectWorkAssignment(int line, String workingProcedure){ |
| | | LambdaQueryWrapper<WorkAssignment> workAssignmentSelectWrapper=new LambdaQueryWrapper<>(); |
| | | workAssignmentSelectWrapper |
| | | .eq(WorkAssignment::getLine,line) |
| | | .eq(WorkAssignment::getWorkProcesses,workingProcedure); |
| | | return baseMapper.selectOne(workAssignmentSelectWrapper); |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | log.info("2、获取到的请求字为0,将确认字改为0"); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, (short) 0); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 0); |
| | | return; |
| | | } |
| | | if (!"0".equals(confirmationWrodValue)) { |
| | |
| | | boolean taskCache = saveTaskCache(details.getGlassId(), 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | log.info("5、生成进片任务信息存入任务表是否完成:{}", taskCache); |
| | | |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, (short) 1); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1); |
| | | log.info("6、发送确认字完成"); |
| | | |
| | | |
| | |
| | | } |
| | | boolean glassSizeStatus = saveGlassSize(glassInfo); |
| | | log.info("7、添加出片玻璃尺寸信息到磨边前玻璃表是否完成:{}", glassSizeStatus); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, (short) 1); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1); |
| | | log.info("8、发送确认字已完成"); |
| | | return Boolean.TRUE; |
| | | } |
| | |
| | | package com.mes.bigstorage.controller; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | |
| | | |
| | | @ApiOperation("玻璃详情查询") |
| | |
| | | @PostMapping("/insertBigStorageCageDetails") |
| | | public Result insertBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.insertBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"添加成功",1); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteBigStorageCageDetails") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.deleteBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"删除成功",1); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务破损0/拿走1") |
| | |
| | | */ |
| | | @Override |
| | | public List<BigStorageCageDetails> selectTask(int taskType) { |
| | | |
| | | if (taskType == 1) { |
| | | //进片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | feedWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_IN); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } else { |
| | | //出片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | outWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_OUT); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } |
| | | return null; |
| | | // if (taskType == 1) { |
| | | // //进片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | // feedWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_IN); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | // List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | // |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } else { |
| | | // //出片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | // outWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_OUT); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | // List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | temperingGlassInfoMapper.updateById(temperingGlassInfo); |
| | | } |
| | | bigStorageCageDetails.setState(Const.BIG_STORAGE_OUTSIDE); |
| | | if (status == 0) { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_TAKE); |
| | | } else { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_DAMAGE); |
| | | } |
| | | baseMapper.updateById(bigStorageCageDetails); |
| | | bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | //todo:插入破损数据 |
| | |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | if (glassInfo != null) { |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setState(0); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetails.setGap(galssGap); |
| | | } |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | |
| | | //理片笼详情添加 |
| | | @Override |
| | | public void insertBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetails.setState(100); |
| | | baseMapper.insert(bigStorageCageDetails); |
| | | bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | } |
| | |
| | | //理片笼详情完成 |
| | | @Override |
| | | public void finishBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) { |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask() != null) { |
| | | bigStorageCageDetails.setState(Const.BIG_STORAGE_INSIDE); |
| | | baseMapper.updateById(bigStorageCageDetails); |
| | | } else { |
| | | bigStorageCageDetails.setState(Const.BIG_STORAGE_OUTSIDE); |
| | | baseMapper.updateById(bigStorageCageDetails); |
| | | bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | } |
| | | // if (bigStorageCageDetails.getBigStorageCageFeedTask() != null) { |
| | | // bigStorageCageDetails.setState(Const.BIG_STORAGE_INSIDE); |
| | | // baseMapper.updateById(bigStorageCageDetails); |
| | | // } else { |
| | | // bigStorageCageDetails.setState(Const.BIG_STORAGE_OUTSIDE); |
| | | // baseMapper.updateById(bigStorageCageDetails); |
| | | // bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | // } |
| | | } |
| | | |
| | | //手动出片 |
| | | @Override |
| | | public void outBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetails.setState(4); |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_ARTIFICIAL); |
| | | baseMapper.updateById(bigStorageCageDetails); |
| | | } |
| | | |
| | |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper=new LambdaQueryWrapper(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getSlot,slot) |
| | | .ne(BigStorageCageDetails::getState,Const.BIG_STORAGE_OUTSIDE); |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN) |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL); |
| | | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(bigStorageCageDetailsWrapper); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | |
| | | public List<BigStorageCage> querybigStorageCageDetail(int deviceId) { |
| | | LambdaQueryWrapper<BigStorageCage> bigStorageCageWrapper =new LambdaQueryWrapper<>(); |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper =new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailsWrapper.lt(BigStorageCageDetails::getState, Const.BIG_STORAGE_OUTSIDE); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .or() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL); |
| | | if(deviceId!=0){ |
| | | bigStorageCageWrapper.eq(BigStorageCage::getDeviceId,deviceId); |
| | | bigStorageCageDetailsWrapper.eq(BigStorageCageDetails::getDeviceId,deviceId); |
| | |
| | | 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"; |
| | | System.out.println("获取到的文件路径为:" + PlcLoadGlass); |
| | | PlcMesObject = InitUtil.initword(PlcLoadGlass); |
| | | } |
| | | } |
| | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | | |
| | | @Scheduled(fixedDelay = 5000) |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgScan() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String d01Id = plcParameterObject.getPlcParameter("D01ID").getValue(); |
| | | String d04Id = plcParameterObject.getPlcParameter("D04ID").getValue(); |
| | | //D02id判断是否为空 确认是否空闲 允许进片 |
| | | String d02State = plcParameterObject.getPlcParameter("D02ID").getValue(); |
| | | String d03State = plcParameterObject.getPlcParameter("D03State").getValue(); |
| | | String d05State = plcParameterObject.getPlcParameter("D05State").getValue(); |
| | | String mesD03Address = plcParameterObject.getPlcParameter("MESToD03").getAddress(); |
| | | String mesD05Address = plcParameterObject.getPlcParameter("MESToD05").getAddress(); |
| | | |
| | | String mesD01Address = plcParameterObject.getPlcParameter("MESToD01").getAddress(); |
| | | String mesD04Address = plcParameterObject.getPlcParameter("MESToD04").getAddress(); |
| | | String d01ToMES = plcParameterObject.getPlcParameter("D01ToMES").getValue(); |
| | | if (!REQUEST_WORD.equals(d01ToMES)) { |
| | | log.info("请求字为{},结束本次扫描进卧转立任务", d01ToMES); |
| | | return; |
| | | } |
| | | |
| | | log.info("1、获取d01Id扫描ID为:{};获取d04Id扫描ID为:{};", d01Id, d04Id); |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d04Id)) { |
| | |
| | | // Boolean flag01 = Boolean.FALSE; |
| | | // Boolean flag04 = Boolean.FALSE; |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃 |
| | | if (StringUtils.isNotBlank(d01Id) && !REQUEST_WORD.equals(d03State)) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD03Address); |
| | | if (StringUtils.isNotBlank(d01Id) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | } |
| | | if (StringUtils.isNotBlank(d04Id) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD05Address); |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | } |
| | | log.info("结束扫码任务"); |
| | | // if (flag01 && flag04) { |
| | |
| | | // } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 5000) |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgFreeCarTask() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String e01Status = plcParameterObject.getPlcParameter("E01State").getValue(); |
| | | String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); |
| | | String d05ToMES = plcParameterObject.getPlcParameter("D05ToMES").getValue(); |
| | | log.info("执行空车送片任务,获取到的大车状态为{},卧转立状态分别为d03:{},d05:{}", e01Status, d03ToMES, d05ToMES); |
| | | if (REQUEST_WORD.equals(e01Status)) { |
| | | log.info("进片大车非空闲"); |
| | | log.info("进片大车非空闲,结束送片任务"); |
| | | return; |
| | | } |
| | | List<BigStorageCageFeedTask> feedTaskList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | if (!REQUEST_WORD.equals(d03ToMES) && !REQUEST_WORD.equals(d05ToMES)) { |
| | | log.info("卧转立没有送片请求,结束送片任务"); |
| | | return; |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> wrapper = new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskType, Const.BIG_STORAGE_IN_RUN) |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_UP)); |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_UP); |
| | | //获取可以启动卧转立的任务线路 |
| | | List<BigStorageCageFeedTask> feedTaskList = bigStorageCageFeedTaskService.list(wrapper); |
| | | if (CollectionUtils.isNotEmpty(feedTaskList)) { |
| | | if (feedTaskList.size() == 1) { |
| | | computeTargetByLine(feedTaskList.get(0).getLine()); |
| | |
| | | |
| | | } |
| | | |
| | | // @Scheduled(fixedDelay = 5000) |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgOutTask() { |
| | | |
| | | List<BigStorageCageOutTask> outingList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_NEW)); |
| | |
| | | } |
| | | //向plc发送进片确认 |
| | | if (flag) { |
| | | S7object.getinstance().plccontrol.writeWord(mesAddress, (short) 1); |
| | | S7object.getinstance().plccontrol.writeWord(mesAddress, 1); |
| | | } |
| | | //记录无法放下玻璃,后续判断启动 |
| | | return flag; |
| | |
| | | String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getAddress(); |
| | | String outLine = line.equals(Const.A09_OUT_TARGET_POSITION) ? mesD03Address : mesD05Address; |
| | | for (int i = 1; i <= taskList.size(); i++) { |
| | | s7control.writeWord(plcMesObject.getPlcParameter("StartAddToImport" + i).getAddress(), (short) taskList.get(i - 1).getLine()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("TargetAddToImport" + i).getAddress(), (short) taskList.get(i - 1).getTargetSlot()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("StartAddToImport" + i).getAddress(), taskList.get(i - 1).getLine()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("TargetAddToImport" + i).getAddress(), taskList.get(i - 1).getTargetSlot()); |
| | | } |
| | | s7control.writeWord(outLine, (short) 1); |
| | | s7control.writeWord(outLine, 2); |
| | | log.info("送片任务已发送完成,任务线路为:{},启动地址为{}", line, outLine); |
| | | } |
| | | |
| | | private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, Boolean isTempering) { |
| | |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D03ToMES", |
| | | "addressIndex": "874", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D05ToMES", |
| | | "addressIndex": "876", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D01ToMES", |
| | | "addressIndex": "878", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "D04ToMES", |
| | | "addressIndex": "880", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD03", |
| | | "addressIndex": "888", |
| | | "addressLenght": "2", |
| | |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD01", |
| | | "addressIndex": "894", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "MESToD04", |
| | | "addressIndex": "896", |
| | | "addressLenght": "2", |
| | | "ratio": "1", |
| | | "unit": "" |
| | | } |
| | | ] |
| | | } |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: prod |
| | | application: |
| | | name: cacheVerticalGlass |
| | | mybatis-plus: |
| | |
| | | SUM(case task_state when 2 then 1 else 0 end) as real_count |
| | | from big_storage_cage_feed_task |
| | | where task_state in (1, 2) |
| | | and target_slot is null |
| | | and (target_slot = 0 or target_slot is null) |
| | | group by line |
| | | ) t |
| | | where t.total_count = t.real_count |
| | |
| | | |
| | | @Test |
| | | public void judgeGlassTypeStatus() { |
| | | plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION); |
| | | plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION, "mesD03Address"); |
| | | } |
| | | |
| | | @Test |
| | |
| | | // return; |
| | | // } |
| | | // log.info("2、获取到的请求字为0,将确认字改为0"); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, (short) 0); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, 0); |
| | | // return; |
| | | // } |
| | | // if (!"0".equals(confirmationWrodValue)) { |
| | | // log.info("2、获取到的请求字不为0,将确认字改为0"); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, (short) 0); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, 0); |
| | | // return; |
| | | // } |
| | | |
| | |
| | | |
| | | } |
| | | log.info("9、发送确认字完成"); |
| | | //S7object.getinstance().plccontrol.WriteWord(MESSendingWord, (short) 1); |
| | | //S7object.getinstance().plccontrol.WriteWord(MESSendingWord, 1); |
| | | } |
| | | |
| | | /** |
| | |
| | | updateDetail.setState(Const.GLASS_STATE_OUT); |
| | | downStorageCageDetailsService.update(updateDetail, wrapper); |
| | | log.info("更新出片玻璃的状态为{}", Const.GLASS_STATE_OUT); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, (short) 2); |
| | | // S7object.getinstance().plccontrol.WriteWord(MESSendingWord, 2); |
| | | |
| | | return true; |
| | | } |
| | |
| | | return; |
| | | } |
| | | log.info("2、获取到的请求字为0,将确认字改为0"); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, (short) 0); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 0); |
| | | return; |
| | | } |
| | | if (!"0".equals(confirmationWrodValue)) { |
| | |
| | | log.info("更新详情表内的状态失败"); |
| | | return Boolean.FALSE; |
| | | } |
| | | //更新落架玻璃数量 |
| | | |
| | | //生成任务信息 |
| | | DownGlassInfo downGlassInfo = new DownGlassInfo(); |
| | | BeanUtils.copyProperties(downStorageCageDetails, downGlassInfo); |
| | |
| | | private Boolean sendMessageToPlc(int width, int height, int thickness, int startCell, int endCell, int taskType) { |
| | | S7control s7control = S7object.getinstance().plccontrol; |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), (short) width); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), (short) height); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), (short) thickness); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Start_cell").getAddress(), (short) startCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("End_cell").getAddress(), (short) endCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("task_type").getAddress(), (short) taskType); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("confirmationWord").getAddress(), (short) 1); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), width); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), height); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), thickness); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Start_cell").getAddress(), startCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("End_cell").getAddress(), endCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("task_type").getAddress(), taskType); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("confirmationWord").getAddress(), 1); |
| | | return Boolean.TRUE; |
| | | } |
| | | } |