干燥机配套车间生产管理系统/云平台服务端
zhuguifei
11 小时以前 09655b466d315335e53d42cf9abe23929005b94a
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/service/impl/DryRealTimeDataServiceImpl.java
@@ -541,15 +541,30 @@
     * @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);
            }
            // 保存含水率变化