Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
| | |
| | | "configurations": [ |
| | | { |
| | | "type": "java", |
| | | "name": "MyGenerator", |
| | | "request": "launch", |
| | | "mainClass": "MyGenerator", |
| | | "projectName": "canadames" |
| | | }, |
| | | { |
| | | "type": "java", |
| | | "name": "AuthorityApplication", |
| | | "request": "launch", |
| | | "mainClass": "com.example.springboot.AuthorityApplication", |
| | |
| | | int HB=spianMapper.SelectHB(B01glassid.toString()); |
| | | if(HB>0){ |
| | | // 当B01小车汇报完成时更改玻璃状态 为1 |
| | | spianService.overtask(B01glassid.toString());// 完成任务 |
| | | S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0 |
| | | boolean yingda = spianService.listbool("DB106.60");// b01汇报 |
| | | if(yingda==false){ |
| | | spianService.overtask(B01glassid.toString());// 完成任务 |
| | | } |
| | | System.out.println("汇报时B01|第" + aaa + "次" + B01glassid + "应答" + yingda); |
| | | aaa += 1; |
| | | } |
| | |
| | | int HB=spianMapper.SelectHB(B02glassid.toString()); |
| | | if(HB>0){ |
| | | // 当B02小车汇报完成时更改玻璃状态为0 |
| | | spianService.overtask(B02glassid.toString());// 完成任务 |
| | | |
| | | S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0 |
| | | System.out.println("汇报时B02|" + B02glassid); |
| | | boolean yingda = spianService.listbool("DB106.62");// b02汇报 |
| | | if (yingda == false) { |
| | | spianService.overtask(B02glassid.toString());// 完成任务 |
| | | } |
| | | System.out.println("汇报时B02|第" + aaa + "次" + B02glassid + "应答" + yingda); |
| | | } |
| | | } |
| | |
| | | } |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | |
| | | StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id |
| | | StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id |
| | | boolean B01backs = spianService.listbool("DB106.60");// b01汇报 |
| | | boolean B02backs = spianService.listbool("DB106.62");// b01汇报 |
| | | if (b01 != B01backs) { |
| | | if (B01backs == true) { |
| | | spianMapper.insertlog("BO1:1"); |
| | | spianMapper.insertlog("BO1:1"+B01glassid); |
| | | } else { |
| | | spianMapper.insertlog("BO1:0"); |
| | | spianMapper.insertlog("BO1:0"+B01glassid); |
| | | } |
| | | b01 = B01backs; |
| | | } |
| | | |
| | | if (b02 != B02backs) { |
| | | if (B02backs == true) { |
| | | spianMapper.insertlog("BO2:1"); |
| | | spianMapper.insertlog("BO2:1"+B02glassid); |
| | | } else { |
| | | spianMapper.insertlog("BO2:0"); |
| | | spianMapper.insertlog("BO2:0"+B02glassid); |
| | | } |
| | | b02 = B02backs; |
| | | } |