新火炬后端单体项目初始化代码
Lius
9 天以前 368e938e3ced045d6b8499cdaed7d61a84180a1c
src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentController.java
@@ -208,34 +208,34 @@
        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("移除成功!");
//    }
    /**
     * 添加
@@ -589,18 +589,18 @@
    }
    @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;
//    }
}