| | |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | |
| | | @RequestMapping("/login.action") |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录") |
| | | public R loginAction(String mobile, String password){ |
| | | //验证许可证是否有效 |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | boolean verify = licenseVerify.verify(); |
| | | if (!verify) {//许可证已失效 |
| | | return R.parse(CodeRes.SYSTEM_20001); |
| | | } |
| | | // //验证许可证是否有效 |
| | | // LicenseVerify licenseVerify = new LicenseVerify(); |
| | | // boolean verify = licenseVerify.verify(); |
| | | // if (!verify) {//许可证已失效 |
| | | // return R.parse(CodeRes.SYSTEM_20001); |
| | | // } |
| | | if (mobile.equals("super") && password.equals(Cools.md5(superPwd))) { |
| | | Map<String, Object> res = new HashMap<>(); |
| | | res.put("username", mobile); |
| | |
| | | public enum RgvModeType { |
| | | |
| | | NONE(-1, "离线"), |
| | | STOP(0, "维修"), |
| | | HAND(1, "手动"), |
| | | HALF_AUTO(2, "半自动"), |
| | | AUTO(3, "自动"), |
| | | STOP(1, "维修"), |
| | | HAND(0, "手动"), |
| | | HALF_AUTO(3, "半自动"), |
| | | AUTO(2, "自动"), |
| | | OTHER(100, "其它"), |
| | | ; |
| | | |
| | |
| | | public enum RgvStatusType { |
| | | |
| | | NONE(-1, "离线"), |
| | | IDLE(0, "空闲"), |
| | | IDLE(1, "空闲"), |
| | | ROAM(100000, "漫游"), |
| | | WORKING(1, "作业中"), |
| | | SOS(2, "报警"), |
| | | WORKING(2, "作业中"), |
| | | SOS(3, "报警"), |
| | | FETCHING(11, "取货中"), |
| | | PUTTING(12, "放货中"), |
| | | WAITING(90, "任务完成等待WCS确认"), |
| | |
| | | new Thread(this::taskWalkIssued).start(); |
| | | |
| | | // 启动任务完成线程 |
| | | new Thread(this::taskComplete).start(); |
| | | // new Thread(this::taskComplete).start(); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | private void readStatus() { |
| | | try { |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", (short) 34); |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", (short) 18); |
| | | if (result.IsSuccess) { |
| | | // 构建设备状态对象 |
| | | RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getId()); |
| | |
| | | rgvProtocol = new RgvProtocol(); |
| | | rgvProtocol.setRgvNo(slave.getId()); |
| | | } |
| | | rgvProtocol.setMode(siemensNet.getByteTransform().TransInt16(result.Content, 0)); |
| | | rgvProtocol.setStatus(siemensNet.getByteTransform().TransInt16(result.Content, 2)); |
| | | rgvProtocol.setRgvPos(siemensNet.getByteTransform().TransUInt32(result.Content, 10)); |
| | | rgvProtocol.setAlarm(siemensNet.getByteTransform().TransInt16(result.Content, 20)); |
| | | |
| | | rgvProtocol.setRgvPos((long)siemensNet.getByteTransform().TransInt32(result.Content, 0)); |
| | | rgvProtocol.setRgvPosDestination((long)siemensNet.getByteTransform().TransInt32(result.Content, 4)); |
| | | rgvProtocol.setStatus(siemensNet.getByteTransform().TransInt16(result.Content, 8)); |
| | | rgvProtocol.setTaskNo((long)siemensNet.getByteTransform().TransInt32(result.Content, 10)); |
| | | |
| | | rgvProtocol.setRgvNo((int)siemensNet.getByteTransform().TransInt16(result.Content, 14)); |
| | | rgvProtocol.setMode(siemensNet.getByteTransform().TransInt16(result.Content, 16)); |
| | | // rgvProtocol.setAlarm(siemensNet.getByteTransform().TransInt16(result.Content, 20)); |
| | | // rgvProtocol.setxSpeed(siemensNet.getByteTransform().TransInt16(result.Content, 28)); |
| | | // rgvProtocol.setxDistance(siemensNet.getByteTransform().TransInt16(result.Content, 40)); |
| | | // rgvProtocol.setxDuration(siemensNet.getByteTransform().TransInt16(result.Content, 48)); |
| | |
| | | private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>(); |
| | | private short heartBeatVal = 1; |
| | | public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ |
| | | add(100);add(101);add(102);add(103);add(104);add(105);add(106);add(107); |
| | | add(1000);add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | add(1008);add(1009);add(1010);add(1011);add(1012);add(1013);add(1014);add(1015); |
| | | add(1016);add(1017);add(1018);add(1019);add(1020);add(1021);add(1022);add(1023); |
| | | }}; |
| | | |
| | | /** |
| | |
| | | |
| | | //条码 |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.840.0",(short) (barcodeSize*8)); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.100.0",(short) (barcodeSize*8)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeSize; i++) { |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8"); |
| | |
| | | */ |
| | | @RequestMapping(value = "/getLicenseDays") |
| | | public R getLicenseDays() { |
| | | if (true){ |
| | | return R.ok().add(9999); |
| | | } |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | LicenseContent verifyInfo = licenseVerify.getVerifyInfo(); |
| | | if (verifyInfo == null) { |
| | |
| | | public boolean loadLicense() { |
| | | if(!Cools.isEmpty(licensePath)){ |
| | | logger.info("++++++++ 开始加载许可证 ++++++++"); |
| | | if (true){ |
| | | |
| | | logger.info("++++++++ 许可证加载结束 ++++++++"); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | try { |
| | | String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath(); |
| | |
| | | # RGV穿梭车1 |
| | | rgv[0]: |
| | | id: 1 |
| | | ip: 192.168.4.250 |
| | | ip: 10.10.10.49 |
| | | port: 502 |
| | | rack: 0 |
| | | slot: 0 |
| | |
| | | # username: sa |
| | | # password: sa@123 |
| | | driver-class-name: dm.jdbc.driver.DmDriver |
| | | url: jdbc:dm://127.0.0.1:5236/SOURCE |
| | | url: jdbc:dm://10.10.10.201:5236/SOURCE |
| | | username: SYSDBA |
| | | password: Zy@12345 |
| | | mvc: |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>输送站点设备</title> |
| | | <link rel="stylesheet" href="../../static/wcs/css/element.css"> |
| | | <script type="text/javascript" src="../../static/wcs/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/wcs/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/wcs/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/wcs/js/element.js"></script> |
| | | </head> |
| | | |
| | | <body> |
| | | <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;"> |
| | | <div style="width: 100%;"> |
| | | <el-table ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick" |
| | | max-height="450" style="width: 100%"> |
| | | <el-table-column property="devNo" label="站号"> |
| | | </el-table-column> |
| | | <el-table-column property="workNo" label="工作号"> |
| | | </el-table-column> |
| | | <el-table-column property="locType1" label="高低库位"> |
| | | </el-table-column> |
| | | <el-table-column property="pakMk" label="入库标记"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;"> |
| | | <div style="width: 55%;margin-right: 10px;"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>设备调试</span> |
| | | </div> |
| | | <div> |
| | | <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="工作号"> |
| | | <el-input v-model="formParam.workNo" placeholder="工作号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="目标站"> |
| | | <el-input v-model="formParam.staNo" placeholder="目标站"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="入库标记"> |
| | | <el-input v-model="formParam.pakMk" placeholder="入库标记"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form label-position="top" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label=""> |
| | | <el-checkbox v-model="formParam.inEnable">可入</el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-checkbox v-model="formParam.outEnable">可出</el-checkbox> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button @click="requestOperate('update')" type="primary">更新</el-button> |
| | | <el-button @click="requestOperate('out')" type="warning">取货完成</el-button> |
| | | <el-button @click="requestOperate('in')" type="warning">放货完成</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div style="width: 45%;"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>设备状态</span> |
| | | </div> |
| | | <div> |
| | | <div v-if="currentIndex == null"> |
| | | <el-empty description="请选择设备"></el-empty> |
| | | </div> |
| | | <div v-else> |
| | | <el-descriptions :title="currentTitle" direction="vertical" :column="4" border> |
| | | <el-descriptions-item label="站点">{{ tableData[currentIndex].devNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="工作号"> |
| | | {{ tableData[currentIndex].workNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="自动">{{ tableData[currentIndex].autoing }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="有物">{{ tableData[currentIndex].loading }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="可入">{{ tableData[currentIndex].inEnable }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="可出">{{ tableData[currentIndex].outEnable }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="入库标记">{{ tableData[currentIndex].pakMk }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="空板信号">{{ tableData[currentIndex].emptyMk }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="目标站">{{ tableData[currentIndex].staNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="高低库位">{{ tableData[currentIndex].locType1 }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script> |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | tableData: [], |
| | | currentRow: null, |
| | | currentTitle: "未选择设备", |
| | | currentIndex: null, |
| | | formParam: { |
| | | devNo: null, |
| | | workNo: null, |
| | | staNo: null, |
| | | pakMk: null, |
| | | inEnable: false, |
| | | outEnable: false |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.getTableData() |
| | | |
| | | setInterval(() => { |
| | | this.getTableData() |
| | | }, 1000) |
| | | }, |
| | | handleRowClick(row, col, event) { |
| | | const index = this.tableData.indexOf(row) |
| | | this.currentRow = row; |
| | | this.currentIndex = index |
| | | this.currentTitle = row.devNo + "站点" |
| | | |
| | | this.formParam.devNo = row.devNo |
| | | this.formParam.workNo = row.workNo |
| | | this.formParam.staNo = row.staNo |
| | | this.formParam.pakMk = row.pakMk |
| | | this.formParam.inEnable = row.inEnable == "Y" ? true : false |
| | | this.formParam.outEnable = row.outEnable == "Y" ? true : false |
| | | }, |
| | | getTableData() { |
| | | let that = this; |
| | | $.ajax({ |
| | | url: baseUrl + "/site/list/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | | success: function (res) { |
| | | that.tableData = res.data |
| | | } |
| | | }); |
| | | }, |
| | | requestOperate(method) { |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/site/detl/"+method, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }) |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |