| | |
| | | if (!Cools.isEmpty(s) && s.startsWith("=")) { |
| | | String substring = s.substring(1); |
| | | String s1 = new StringBuilder(substring).reverse().toString(); |
| | | scale = Double.parseDouble(s1); |
| | | scale = Double.parseDouble(s1);//50.8 67.6 |
| | | if (scale>60){ |
| | | switch (slave.getId()){ |
| | | case 1: |
| | | scale = scale - 60; |
| | | break; |
| | | case 2: |
| | | scale = scale - 52; |
| | | break; |
| | | case 3: |
| | | scale = scale - 74.0; |
| | | break; |
| | | case 4: |
| | | scale = scale - 50.8; |
| | | break; |
| | | default: |
| | | scale = scale - 74.0; |
| | | } |
| | | } |
| | | // if (slave.getId()>3){ |
| | | // scale = scale - 50.8; |
| | | // } else { |
| | | // scale = scale - 74.0; |
| | | // } |
| | | |
| | | //将称重重量写入设备基础数据中的gross_wt字段 |
| | | if(scale > 20) { |
| | | if(scale > 5) { |
| | | BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = basDevpService.selectById(slave.getStaNo()); |
| | | if(!Cools.isEmpty(basDevp)) { |