| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @RestController |
| | | @Api(tags = "设备能耗") |
| | | @RequestMapping("/equipmentEnergyConsumption") |
| | | @AllArgsConstructor |
| | | public class EquipmentEnergyConsumptionController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private EquipmentEnergyConsumptionService equipmentEnergyConsumptionService; |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("/addBatch") |
| | | @ApiOperation("设备能耗-批量新增") |
| | | @Log(title = "设备能耗-批量新增", businessType = BusinessType.INSERT) |
| | | public AjaxResult addBatch(@RequestBody List<EquipmentEnergyConsumption> list) { |
| | | boolean save = equipmentEnergyConsumptionService.saveBatch(list); |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("设备能耗-修改") |
| | | @Log(title = "设备能耗-修改", businessType = BusinessType.UPDATE) |