| | |
| | | String productionLineId = andonResponseConfigService.getProductionLineIdByButtonId(andonOrder.getButtonId()); |
| | | if (productionLineId != null) { |
| | | andonOrder.setFactoryId(productionLineId); |
| | | }else{ |
| | | return Result.error("未找到对应的产线ID,请先进行安灯响应配置!"); |
| | | } |
| | | } |
| | | andonOrderService.save(andonOrder); |
| | |
| | | // 设置工单状态为处理中 |
| | | andonOrder.setOrderStatus("3"); |
| | | |
| | | // 获取响应者用户名 |
| | | // 获取响应用户名 |
| | | String responderUsername = andonOrder.getResponder(); |
| | | |
| | | // 验证响应者用户名不为空 |
| | |
| | | @Override |
| | | public String getProductionLineIdByButtonId(String buttonId) { |
| | | QueryWrapper<AndonResponseConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("button_id", buttonId); |
| | | queryWrapper.eq("button_id", buttonId); // 确保这里使用的是数据库字段名 |
| | | AndonResponseConfig config = this.getOne(queryWrapper); |
| | | return config != null ? config.getFactoryId() : null; |
| | | } |