| | |
| | | return Result.OK("批量移除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量移除产线和设备关系 |
| | | */ |
| | | @AutoLog(value = "设备产线表-批量移除产线和设备关系") |
| | | @ApiOperation(value = "设备产线表-批量移除产线和设备关系", notes = "设备产线表-批量移除产线和设备关系") |
| | | @PostMapping(value = "/removeEquipmentsForProduction") |
| | | public Result<?> removeEquipmentsForProduction(@RequestParam(name = "productionId", required = true) String productionId, |
| | | @RequestParam(name = "equipmentIds", required = true) String equipmentIds) { |
| | | if (StringUtils.isNotBlank(productionId) && StringUtils.isNotBlank(equipmentIds)) { |
| | | List<String> equipmentIdList = Arrays.asList(equipmentIds.split(",")); |
| | | mdcEquipmentService.removeEquipmentsForProduction(productionId, equipmentIdList); |
| | | } |
| | | return Result.OK("批量移除成功!"); |
| | | } |
| | | // /** |
| | | // * 批量移除产线和设备关系 |
| | | // */ |
| | | // @AutoLog(value = "设备产线表-批量移除产线和设备关系") |
| | | // @ApiOperation(value = "设备产线表-批量移除产线和设备关系", notes = "设备产线表-批量移除产线和设备关系") |
| | | // @PostMapping(value = "/removeEquipmentsForProduction") |
| | | // public Result<?> removeEquipmentsForProduction(@RequestParam(name = "productionId", required = true) String productionId, |
| | | // @RequestParam(name = "equipmentIds", required = true) String equipmentIds) { |
| | | // if (StringUtils.isNotBlank(productionId) && StringUtils.isNotBlank(equipmentIds)) { |
| | | // List<String> equipmentIdList = Arrays.asList(equipmentIds.split(",")); |
| | | // mdcEquipmentService.removeEquipmentsForProduction(productionId, equipmentIdList); |
| | | // } |
| | | // return Result.OK("批量移除成功!"); |
| | | // } |
| | | |
| | | /** |
| | | * 移除产线和设备关系 |
| | | */ |
| | | @AutoLog(value = "设备产线表-移除产线和设备关系") |
| | | @ApiOperation(value = "设备产线表-移除产线和设备关系", notes = "设备产线表-移除产线和设备关系") |
| | | @PostMapping(value = "/removeEquipmentForProduction") |
| | | public Result<?> removeEquipmentForProduction(@RequestParam(name = "productionId", required = true) String productionId, |
| | | @RequestParam(name = "equipmentId", required = true) String equipmentId) { |
| | | if (StringUtils.isNotBlank(productionId) && StringUtils.isNotBlank(equipmentId)) { |
| | | mdcEquipmentService.removeEquipmentForProduction(productionId, equipmentId); |
| | | } |
| | | return Result.OK("移除成功!"); |
| | | } |
| | | // /** |
| | | // * 移除产线和设备关系 |
| | | // */ |
| | | // @AutoLog(value = "设备产线表-移除产线和设备关系") |
| | | // @ApiOperation(value = "设备产线表-移除产线和设备关系", notes = "设备产线表-移除产线和设备关系") |
| | | // @PostMapping(value = "/removeEquipmentForProduction") |
| | | // public Result<?> removeEquipmentForProduction(@RequestParam(name = "productionId", required = true) String productionId, |
| | | // @RequestParam(name = "equipmentId", required = true) String equipmentId) { |
| | | // if (StringUtils.isNotBlank(productionId) && StringUtils.isNotBlank(equipmentId)) { |
| | | // mdcEquipmentService.removeEquipmentForProduction(productionId, equipmentId); |
| | | // } |
| | | // return Result.OK("移除成功!"); |
| | | // } |
| | | |
| | | /** |
| | | * 添加 |
| | |
| | | } |
| | | |
| | | |
| | | @AutoLog(value = "设备表-通过车间ids获取设备树") |
| | | @ApiOperation(value = "设备表-通过车间ids获取设备树", notes = "设备表-通过车间ids获取设备树") |
| | | @GetMapping(value = "/loadTreeListByProductionIds") |
| | | public Result<?> loadTreeListByProductionIds(@RequestParam(name = "ids", required = true) String ids) { |
| | | Result<List<MdcEquipmentTree>> result = new Result<>(); |
| | | try { |
| | | List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProductionIds(ids); |
| | | result.setSuccess(true); |
| | | result.setResult(mdcEquipmentTreeList); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | | } |
| | | // @AutoLog(value = "设备表-通过车间ids获取设备树") |
| | | // @ApiOperation(value = "设备表-通过车间ids获取设备树", notes = "设备表-通过车间ids获取设备树") |
| | | // @GetMapping(value = "/loadTreeListByProductionIds") |
| | | // public Result<?> loadTreeListByProductionIds(@RequestParam(name = "ids", required = true) String ids) { |
| | | // Result<List<MdcEquipmentTree>> result = new Result<>(); |
| | | // try { |
| | | // List<MdcEquipmentTree> mdcEquipmentTreeList = mdcEquipmentService.loadTreeListByProductionIds(ids); |
| | | // result.setSuccess(true); |
| | | // result.setResult(mdcEquipmentTreeList); |
| | | // } catch (Exception e) { |
| | | // log.error(e.getMessage(), e); |
| | | // } |
| | | // return result; |
| | | // } |
| | | } |