| | |
| | | * @param orderVo |
| | | */ |
| | | private void saveOrderTrendVo(DryOrderTrendVo trendVo, DryOrderVo orderVo) { |
| | | |
| | | //判断 实时含水率 或 实时重量有没有变化,有变化则更新 |
| | | if (orderVo.getTrendVo() == null && trendVo != null && trendVo.getWeight() > 0 |
| | | || orderVo.getTrendVo() != null && trendVo.getWeight() < orderVo.getTrendVo().getWeight() |
| | | ) { |
| | | |
| | | DryOrder byId = dryOrderService.getById(orderVo.getId()); |
| | | |
| | | |
| | | // 将最新结果更新到工单 |
| | | if (byId != null) { |
| | | BeanUtil.copyProperties(orderVo, byId); |
| | | byId.setTemps(JSONObject.toJSONString(orderVo.getBellowsTemp())); |
| | | |
| | | // 更新工单状态 |
| | | if(orderVo.getOrderStatus()!=null && byId.getOrderStatus()!=null && orderVo.getOrderStatus() > byId.getOrderStatus()){ |
| | | byId.setOrderStatus(orderVo.getOrderStatus()); |
| | | } |
| | | // 工单未完成更新含水率 TODO 验证 |
| | | // if(byId.getOrderStatus()!=null && byId.getOrderStatus().intValue()!=4 ){ |
| | | // |
| | | // } |
| | | byId.setMoisture(trendVo.getMoisture()); |
| | | |
| | | dryOrderService.updateById(byId); |
| | | } |
| | | // 保存含水率变化 |