112 changed files with 4218 additions and 8 deletions
-
4application/pom.xml
-
39modules/cbam/pom.xml
-
95modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamIndustryController.java
-
69modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamMaterialController.java
-
98modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamProductInfoController.java
-
100modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamIndustryDTO.java
-
30modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamMaterialDTO.java
-
38modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamProductInfoDTO.java
-
35modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamIndustryEntity.java
-
41modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamMaterialEntity.java
-
55modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamProductInfoEntity.java
-
11modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamIndustryMapper.java
-
10modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamMaterialMapper.java
-
17modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamProductInfoMapper.java
-
18modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamIndustryService.java
-
13modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamMaterialService.java
-
22modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamProductInfoService.java
-
87modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamIndustryServiceImpl.java
-
27modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamMaterialServiceImpl.java
-
36modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamProductInfoServiceImpl.java
-
85modules/cbam/src/main/java/com/thing/cbam/carbonPrice/controller/CbamCarbonPriceToolController.java
-
38modules/cbam/src/main/java/com/thing/cbam/carbonPrice/dto/CbamCarbonPriceToolDTO.java
-
57modules/cbam/src/main/java/com/thing/cbam/carbonPrice/entity/CbamCarbonPriceToolEntity.java
-
9modules/cbam/src/main/java/com/thing/cbam/carbonPrice/mapper/CbamCarbonPriceToolMapper.java
-
7modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/CbamCarbonPriceToolService.java
-
19modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/Impl/CbamCarbonPriceToolServiceImpl.java
-
99modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamHsDictController.java
-
99modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamIndustryDictController.java
-
99modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamProdProcessDictController.java
-
37modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamHsDictDTO.java
-
31modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamIndustryDictDTO.java
-
37modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamProdProcessDictDTO.java
-
56modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamHsDictEntity.java
-
44modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamIndustryDictEntity.java
-
56modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamProdProcessDictEntity.java
-
17modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamHsDictMapper.java
-
17modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamIndustryDictMapper.java
-
17modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamProdProcessDictMapper.java
-
15modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamHsDictService.java
-
15modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamIndustryDictService.java
-
15modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamProdProcessDictService.java
-
29modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamHsDictServiceImpl.java
-
29modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamIndustryDictServiceImpl.java
-
29modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamProdProcessDictServiceImpl.java
-
99modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonBurnController.java
-
89modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMaterialController.java
-
87modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMonitorController.java
-
88modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonProgressController.java
-
42modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonBurnDTO.java
-
30modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMaterialDTO.java
-
42modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMonitorDTO.java
-
34modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonProgressDTO.java
-
61modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonBurnEntity.java
-
42modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMaterialEntity.java
-
65modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMonitorEntity.java
-
49modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonProgressEntity.java
-
17modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonBurnMapper.java
-
9modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMaterialMapper.java
-
9modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMonitorMapper.java
-
10modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonProgressMapper.java
-
15modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonBurnService.java
-
7modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMaterialService.java
-
7modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMonitorService.java
-
8modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonProgressService.java
-
29modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonBurnServiceImpl.java
-
19modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMaterialServiceImpl.java
-
19modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMonitorServiceImpl.java
-
29modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonProgressServiceImpl.java
-
83modules/cbam/src/main/java/com/thing/cbam/electricity/controller/CbamElectricityToolController.java
-
40modules/cbam/src/main/java/com/thing/cbam/electricity/dto/CbamElectricityToolDTO.java
-
61modules/cbam/src/main/java/com/thing/cbam/electricity/entity/CbamElectricityToolEntity.java
-
9modules/cbam/src/main/java/com/thing/cbam/electricity/mapper/CbamElectricityToolMapper.java
-
7modules/cbam/src/main/java/com/thing/cbam/electricity/service/CbamElectricityToolService.java
-
19modules/cbam/src/main/java/com/thing/cbam/electricity/service/Impl/CbamElectricityToolServiceImpl.java
-
91modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonIndirectEmissionsController.java
-
98modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonPowerProgressAllocationController.java
-
32modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonIndirectEmissionsDTO.java
-
42modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonPowerProgressAllocationDTO.java
-
45modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonIndirectEmissionsEntity.java
-
65modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonPowerProgressAllocationEntity.java
-
17modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonIndirectEmissionsMapper.java
-
17modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonPowerProgressAllocationMapper.java
-
7modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonIndirectEmissionsService.java
-
15modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonPowerProgressAllocationService.java
-
19modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonIndirectEmissionsServiceImpl.java
-
29modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonPowerProgressAllocationServiceImpl.java
-
88modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductAllocationController.java
-
98modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductElectricityController.java
-
97modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductExhaustEmissionsController.java
-
88modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductHeatEmissionsController.java
-
32modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductAllocationDTO.java
-
30modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductElectricityDTO.java
-
30modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductExhaustEmissionsDTO.java
-
22modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductHeatEmissionsDTO.java
-
45modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductAllocationEntity.java
-
41modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductElectricityEntity.java
-
41modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductExhaustEmissionsEntity.java
-
34modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductHeatEmissionsEntity.java
-
9modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductAllocationMapper.java
-
17modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductElectricityMapper.java
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<parent> |
|||
<groupId>com.thing</groupId> |
|||
<artifactId>modules</artifactId> |
|||
<version>5.1</version> |
|||
</parent> |
|||
|
|||
<groupId>com.thing.modules</groupId> |
|||
<artifactId>cbam</artifactId> |
|||
<packaging>jar</packaging> |
|||
<name>ThingBI Server Modules cbam</name> |
|||
|
|||
|
|||
<properties> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
</properties> |
|||
|
|||
|
|||
<dependencies> |
|||
|
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.thing.modules</groupId> |
|||
<artifactId>thing</artifactId> |
|||
</dependency> |
|||
|
|||
|
|||
</dependencies> |
|||
|
|||
|
|||
</project> |
|||
@ -0,0 +1,95 @@ |
|||
package com.thing.cbam.baesInfoExcel.controller; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamIndustryDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamIndustryEntity; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamIndustryService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.exception.SysException; |
|||
import com.thing.common.core.utils.ConvertUtils; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Objects; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/industry") |
|||
@Tag(name = "基础信息A表") |
|||
@RequiredArgsConstructor |
|||
public class CbamIndustryController { |
|||
|
|||
@Resource |
|||
private CbamIndustryService service; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary = "分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true), |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true), |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段"), |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamIndustryDTO>> page(@Parameter(hidden = true) @RequestParam Map<String,Object> param) { |
|||
PageData<CbamIndustryDTO> pageList = service.getPageData(param,CbamIndustryDTO.class); |
|||
return new Result<PageData<CbamIndustryDTO>>().ok(pageList); |
|||
} |
|||
|
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary = "信息") |
|||
public Result<CbamIndustryDTO> get(@PathVariable("id") Long id) { |
|||
CbamIndustryDTO dto = service.findById(id); |
|||
return new Result<CbamIndustryDTO>().ok(dto); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary = "保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamIndustryDTO dto) { |
|||
service.saveEntity(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary = "修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamIndustryDTO dto) { |
|||
//效验数据 |
|||
//ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
Long id = dto.getId(); |
|||
if(Objects.isNull(id)){ |
|||
throw new SysException("id不能为空"); |
|||
} |
|||
service.updateById(ConvertUtils.sourceToTarget(dto, CbamIndustryEntity.class)); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary = "删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids) { |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
service.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
// @PostMapping("export") |
|||
// @Operation(summary = "导出") |
|||
// @LogOperation("导出") |
|||
// public void export(@RequestBody Long[] ids, @RequestParam Map<String, Object> params, HttpServletResponse response) { |
|||
// ExcelUtils.exportExcel(service.export(ids, params), "物模型列表", "物模型", IotThingModelExcel.class, "物模型列表.xls", response); |
|||
// } |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
package com.thing.cbam.baesInfoExcel.controller; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamMaterialDTO; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamMaterialService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/material") |
|||
@Tag(name = "原材料") |
|||
@RequiredArgsConstructor |
|||
public class CbamMaterialController { |
|||
private final CbamMaterialService cbamMaterialService; |
|||
@GetMapping("page") |
|||
@Operation(summary = "分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true), |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true), |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段"), |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamMaterialDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params) { |
|||
PageData<CbamMaterialDTO> page = cbamMaterialService.getPageData(params, CbamMaterialDTO.class); |
|||
return new Result<PageData<CbamMaterialDTO>>().ok(page); |
|||
} |
|||
@GetMapping("{id}") |
|||
@Operation(summary = "信息") |
|||
public Result<CbamMaterialDTO> get(@PathVariable("id") Long id) { |
|||
CbamMaterialDTO data = cbamMaterialService.getByIdAs(id, CbamMaterialDTO.class); |
|||
return new Result<CbamMaterialDTO>().ok(data); |
|||
} |
|||
@PostMapping |
|||
@Operation(summary = "保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamMaterialDTO dto) { |
|||
cbamMaterialService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@PutMapping |
|||
@Operation(summary = "修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamMaterialDTO dto) { |
|||
//效验数据 |
|||
cbamMaterialService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@DeleteMapping |
|||
@Operation(summary = "删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids) { |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamMaterialService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
package com.thing.cbam.baesInfoExcel.controller; |
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamProductInfoDTO; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamProductInfoService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/cbam/product") |
|||
@Tag(name="综合商品类别和相关生产过程") |
|||
@RequiredArgsConstructor |
|||
public class CbamProductInfoController { |
|||
|
|||
private final CbamProductInfoService cbamProductInfoService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProductInfoDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamProductInfoDTO> page = cbamProductInfoService.getPageData(params, CbamProductInfoDTO.class); |
|||
return new Result<PageData<CbamProductInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamProductInfoDTO> get(@PathVariable("id") Long id){ |
|||
CbamProductInfoDTO data = cbamProductInfoService.getByIdAs(id, CbamProductInfoDTO.class); |
|||
return new Result<CbamProductInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProductInfoDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProductInfoService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProductInfoDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProductInfoService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProductInfoService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamProductInfoDTO> list = cbamProductInfoService.listAs(params, CbamProductInfoDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "综合商品类别和相关生产过程", list, CbamProductInfoExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
package com.thing.cbam.baesInfoExcel.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@Schema(description = "基础信息表") |
|||
public class CbamIndustryDTO implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@Schema(description = "主键id") |
|||
private Long id; |
|||
@Schema(description = "所属行业") |
|||
private String industry; |
|||
@Schema(description = "开始日期:11位数") |
|||
private Long startDate; |
|||
@Schema(description = "结束日期:11位数") |
|||
private Long endDate; |
|||
@Schema(description = "报告周期说明:默认情况是一整个日历年") |
|||
private String cycleDesc; |
|||
@Schema(description = "生产工厂名称") |
|||
private String factoryName; |
|||
@Schema(description = "街道编号") |
|||
private String streetNum; |
|||
@Schema(description = "在欧盟进行的主要经济活动") |
|||
private String economicActivities; |
|||
@Schema(description = "邮政编码") |
|||
private String postalCode; |
|||
@Schema(description = "邮政信箱") |
|||
private String postBox; |
|||
@Schema(description = "城市") |
|||
private String city; |
|||
@Schema(description = "国家") |
|||
private String country; |
|||
@Schema(description = "国际港口代码") |
|||
private String internationalCode; |
|||
@Schema(description = "生产坐标经度") |
|||
private String factoryLongitude; |
|||
@Schema(description = "生产坐标纬度") |
|||
private String factoryLatitude; |
|||
@Schema(description = "授权代表姓名") |
|||
private String authorizedName; |
|||
@Schema(description = "电子邮件") |
|||
private String email; |
|||
@Schema(description = "电话") |
|||
private String telephone; |
|||
@Schema(description = "是否涉及原料:0否1是") |
|||
private Integer materialMark; |
|||
|
|||
|
|||
private List<CbamProductInfoDTO> cbamProductList; |
|||
|
|||
private List<CbamMaterialDTO> cbamMaterialList; |
|||
|
|||
/*------------------------租户信息--------------------------------*/ |
|||
|
|||
/** |
|||
* 租户编码 |
|||
*/ |
|||
private Long tenantCode; |
|||
|
|||
/** |
|||
* 公司id |
|||
*/ |
|||
private Long companyId; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private Long deptId; |
|||
|
|||
/*------------------------修改记录信息--------------------------------*/ |
|||
|
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private Long creator; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Long createDate; |
|||
|
|||
/** |
|||
* 修改人 |
|||
*/ |
|||
private Long updater; |
|||
/** |
|||
* 修改时间 |
|||
*/ |
|||
private Long updateDate; |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.thing.cbam.baesInfoExcel.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原材料 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "原材料") |
|||
public class CbamMaterialDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "原材料名称") |
|||
private String rawMaterialName; |
|||
@Schema(description = "原材料的综合商品类别") |
|||
private String materialCategories; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.thing.cbam.baesInfoExcel.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-26 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "综合商品类别和相关生产过程") |
|||
public class CbamProductInfoDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "产品名称") |
|||
private String productName; |
|||
@Schema(description = "总产量") |
|||
private String totalOutput; |
|||
@Schema(description = "HS代码") |
|||
private String hsCode; |
|||
@Schema(description = "产品生产过程") |
|||
private String productionProcess; |
|||
@Schema(description = "综合商品类别") |
|||
private String comprehensiveProductCategories; |
|||
@Schema(description = "工艺路线") |
|||
private String processRoute; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.thing.cbam.baesInfoExcel.entity; |
|||
|
|||
import com.mybatisflex.annotation.Table; |
|||
import com.thing.common.orm.entity.BaseInfoEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@Table("cbam_industry_info") |
|||
public class CbamIndustryEntity extends BaseInfoEntity { |
|||
|
|||
|
|||
private String industry; |
|||
private Long startDate; |
|||
private Long endDate; |
|||
private String cycleDesc; |
|||
private String factoryName; |
|||
private String streetNum; |
|||
private String economicActivities; |
|||
private String postalCode; |
|||
private String postBox; |
|||
private String city; |
|||
private String country; |
|||
private String internationalCode; |
|||
private String factoryLongitude; |
|||
private String factoryLatitude; |
|||
private String authorizedName; |
|||
private String email; |
|||
private String telephone; |
|||
private Integer materialMark; |
|||
|
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.thing.cbam.baesInfoExcel.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原材料 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_industry_material") |
|||
public class CbamMaterialEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L;//数据序列化 |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 原材料名称 |
|||
*/ |
|||
private String rawMaterialName; |
|||
/** |
|||
* 原材料的综合商品类别 |
|||
*/ |
|||
private String materialCategories; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.thing.cbam.baesInfoExcel.entity; |
|||
|
|||
import com.mybatisflex.annotation.Table; |
|||
import com.thing.common.orm.entity.BaseInfoEntity; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-26 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_product_info") |
|||
public class CbamProductInfoEntity extends BaseInfoEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 产品名称 |
|||
*/ |
|||
private String productName; |
|||
/** |
|||
* 总产量 |
|||
*/ |
|||
private String totalOutput; |
|||
/** |
|||
* HS代码 |
|||
*/ |
|||
private String hsCode; |
|||
/** |
|||
* 产品生产过程 |
|||
*/ |
|||
private String productionProcess; |
|||
/** |
|||
* 综合商品类别 |
|||
*/ |
|||
private String comprehensiveProductCategories; |
|||
/** |
|||
* 工艺路线 |
|||
*/ |
|||
private String processRoute; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.thing.cbam.baesInfoExcel.mapper; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.entity.CbamIndustryEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamIndustryMapper extends PowerBaseMapper<CbamIndustryEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
package com.thing.cbam.baesInfoExcel.mapper; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.entity.CbamMaterialEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamMaterialMapper extends PowerBaseMapper<CbamMaterialEntity> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.baesInfoExcel.mapper; |
|||
|
|||
import com.thing.cbam.baesInfoExcel.entity.CbamProductInfoEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamProductInfoMapper extends PowerBaseMapper<CbamProductInfoEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.thing.cbam.baesInfoExcel.service; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamIndustryDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamIndustryEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
public interface CbamIndustryService extends IBaseService<CbamIndustryEntity> { |
|||
|
|||
|
|||
CbamIndustryDTO findById(Long id); |
|||
|
|||
|
|||
void saveEntity(CbamIndustryDTO dto); |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.thing.cbam.baesInfoExcel.service; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamMaterialDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamMaterialEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface CbamMaterialService extends IBaseService<CbamMaterialEntity> { |
|||
List<CbamMaterialDTO> findListByIndustryId(Long industryId); |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.thing.cbam.baesInfoExcel.service; |
|||
|
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamProductInfoDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamProductInfoEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-26 |
|||
*/ |
|||
public interface CbamProductInfoService extends IBaseService<CbamProductInfoEntity> { |
|||
|
|||
|
|||
List<CbamProductInfoDTO> findListByIndustryId(Long industryId); |
|||
|
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
package com.thing.cbam.baesInfoExcel.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamIndustryDTO; |
|||
import com.thing.cbam.baesInfoExcel.dto.CbamMaterialDTO; |
|||
import com.thing.cbam.baesInfoExcel.dto.CbamProductInfoDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamIndustryEntity; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamMaterialEntity; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamProductInfoEntity; |
|||
import com.thing.cbam.baesInfoExcel.mapper.CbamIndustryMapper; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamIndustryService; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamMaterialService; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamProductInfoService; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.exception.SysException; |
|||
import com.thing.common.core.utils.ConvertUtils; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import jakarta.annotation.Resource; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Objects; |
|||
|
|||
@Service |
|||
public class CbamIndustryServiceImpl extends BaseServiceImpl<CbamIndustryMapper, CbamIndustryEntity> implements CbamIndustryService { |
|||
@Resource |
|||
private CbamProductInfoService cbamProductInfoService; |
|||
|
|||
@Resource |
|||
private CbamMaterialService cbamMaterialService; |
|||
|
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
//String code = (String) params.get("code"); |
|||
|
|||
Long startTime = (Long) params.get("startTime"); |
|||
Long endTime = (Long) params.get("endTime"); |
|||
String orderField = (String) params.get("orderField"); |
|||
String order = (String) params.get("order"); |
|||
wrapper.between(CbamIndustryEntity::getCreateDate, |
|||
startTime, |
|||
endTime, |
|||
!Objects.isNull(startTime) && !Objects.isNull(endTime)) |
|||
.orderBy(StringUtils.isNotBlank(orderField) ? orderField : "create_date", StringUtils.equals(order, Constant.ASC)) |
|||
; |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public CbamIndustryDTO findById(Long id) { |
|||
CbamIndustryDTO dto = mapper.selectObjectByQueryAs(QueryWrapper.create().eq(CbamIndustryEntity::getId, id), CbamIndustryDTO.class); |
|||
if (Objects.isNull(dto)) { |
|||
throw new SysException("CBAM行业,企业信息为空"); |
|||
} |
|||
List<CbamProductInfoDTO> cbamProductInfoDTOList = cbamProductInfoService.findListByIndustryId(id); |
|||
dto.setCbamProductList(cbamProductInfoDTOList); |
|||
|
|||
List<CbamMaterialDTO> cbamMaterialDTOList = cbamMaterialService.findListByIndustryId(id); |
|||
dto.setCbamMaterialList(cbamMaterialDTOList); |
|||
|
|||
return dto; |
|||
} |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
@Override |
|||
public void saveEntity(CbamIndustryDTO dto) { |
|||
//逻辑: |
|||
mapper.insert(ConvertUtils.sourceToTarget(dto, CbamIndustryEntity.class)); |
|||
List<CbamProductInfoDTO> cbamProductList = dto.getCbamProductList(); |
|||
List<CbamMaterialDTO> cbamMaterialList = dto.getCbamMaterialList(); |
|||
|
|||
if (CollectionUtil.isNotEmpty(cbamProductList)) { |
|||
cbamProductInfoService.saveBatch(ConvertUtils.sourceToTarget(cbamProductList, CbamProductInfoEntity.class)); |
|||
} |
|||
if (CollectionUtil.isNotEmpty(cbamMaterialList)) { |
|||
cbamMaterialService.saveBatch(ConvertUtils.sourceToTarget(cbamMaterialList, CbamMaterialEntity.class)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.thing.cbam.baesInfoExcel.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamMaterialDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamMaterialEntity; |
|||
import com.thing.cbam.baesInfoExcel.mapper.CbamMaterialMapper; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamMaterialService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamMaterialServiceImpl extends BaseServiceImpl<CbamMaterialMapper, CbamMaterialEntity> implements CbamMaterialService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public List<CbamMaterialDTO> findListByIndustryId(Long industryId) { |
|||
return mapper.selectListByQueryAs(QueryWrapper.create().eq(CbamMaterialEntity::getIndustryId,industryId), CbamMaterialDTO.class); |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
package com.thing.cbam.baesInfoExcel.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
|
|||
import com.thing.cbam.baesInfoExcel.dto.CbamProductInfoDTO; |
|||
import com.thing.cbam.baesInfoExcel.entity.CbamProductInfoEntity; |
|||
import com.thing.cbam.baesInfoExcel.mapper.CbamProductInfoMapper; |
|||
import com.thing.cbam.baesInfoExcel.service.CbamProductInfoService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 综合商品类别和相关生产过程 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-26 |
|||
*/ |
|||
@Service |
|||
public class CbamProductInfoServiceImpl extends BaseServiceImpl<CbamProductInfoMapper, CbamProductInfoEntity> implements CbamProductInfoService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public List<CbamProductInfoDTO> findListByIndustryId(Long industryId){ |
|||
return mapper.selectListByQueryAs(QueryWrapper.create().eq(CbamProductInfoEntity::getIndustryId,industryId), CbamProductInfoDTO.class); |
|||
} |
|||
} |
|||
@ -0,0 +1,85 @@ |
|||
package com.thing.cbam.carbonPrice.controller; |
|||
|
|||
import com.thing.cbam.carbonPrice.dto.CbamCarbonPriceToolDTO; |
|||
import com.thing.cbam.carbonPrice.service.CbamCarbonPriceToolService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import jakarta.annotation.Resource; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/price/tool") |
|||
@Tag(name = "碳价工具") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonPriceToolController { |
|||
|
|||
@Resource |
|||
private CbamCarbonPriceToolService cbamCarbonPriceToolServicevice; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary = "分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true), |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true), |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段"), |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonPriceToolDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> param) { |
|||
PageData<CbamCarbonPriceToolDTO> pageList = cbamCarbonPriceToolServicevice.getPageData(param, CbamCarbonPriceToolDTO.class); |
|||
return new Result<PageData<CbamCarbonPriceToolDTO>>().ok(pageList); |
|||
} |
|||
@GetMapping("{id}") |
|||
@Operation(summary = "信息") |
|||
@LogOperation("信息") |
|||
public Result<CbamCarbonPriceToolDTO> info(@PathVariable("id") String id) { |
|||
CbamCarbonPriceToolDTO dto = cbamCarbonPriceToolServicevice.getByIdAs(id, CbamCarbonPriceToolDTO.class); |
|||
return new Result<CbamCarbonPriceToolDTO>().ok(dto); |
|||
} |
|||
@PostMapping |
|||
@Operation(summary = "保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonPriceToolDTO dto) { |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonPriceToolServicevice.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@PutMapping |
|||
@Operation(summary = "修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonPriceToolDTO dto) { |
|||
//实验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonPriceToolServicevice.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@DeleteMapping |
|||
@Operation(summary = "删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids) { |
|||
AssertUtils.isArrayEmpty(ids,"id"); |
|||
cbamCarbonPriceToolServicevice.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.thing.cbam.carbonPrice.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 碳价工具 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "碳价工具") |
|||
public class CbamCarbonPriceToolDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "碳价工具") |
|||
private String priceTool; |
|||
@Schema(description = "其他附加说明") |
|||
private String otherInfo; |
|||
@Schema(description = "货币") |
|||
private String currency; |
|||
@Schema(description = "配额缺口占总配额的比例") |
|||
private String gapProportion; |
|||
@Schema(description = "国内碳价") |
|||
private String carbonPrice; |
|||
@Schema(description = "抵扣金额") |
|||
private String deductionAmount; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
package com.thing.cbam.carbonPrice.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 碳价工具 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_price_tool") |
|||
public class CbamCarbonPriceToolEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 碳价工具 |
|||
*/ |
|||
private String priceTool; |
|||
/** |
|||
* 其他附加说明 |
|||
*/ |
|||
private String otherInfo; |
|||
/** |
|||
* 货币 |
|||
*/ |
|||
private String currency; |
|||
/** |
|||
* 配额缺口占总配额的比例 |
|||
*/ |
|||
private String gapProportion; |
|||
/** |
|||
* 国内碳价 |
|||
*/ |
|||
private String carbonPrice; |
|||
/** |
|||
* 抵扣金额 |
|||
*/ |
|||
private String deductionAmount; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.thing.cbam.carbonPrice.mapper; |
|||
|
|||
import com.thing.cbam.carbonPrice.entity.CbamCarbonPriceToolEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamCarbonPriceToolMapper extends PowerBaseMapper<CbamCarbonPriceToolEntity> { |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.thing.cbam.carbonPrice.service; |
|||
|
|||
import com.thing.cbam.carbonPrice.entity.CbamCarbonPriceToolEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamCarbonPriceToolService extends IBaseService<CbamCarbonPriceToolEntity> { |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.thing.cbam.carbonPrice.service.Impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.carbonPrice.entity.CbamCarbonPriceToolEntity; |
|||
import com.thing.cbam.carbonPrice.mapper.CbamCarbonPriceToolMapper; |
|||
import com.thing.cbam.carbonPrice.service.CbamCarbonPriceToolService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamCarbonPriceToolServiceImpl extends BaseServiceImpl<CbamCarbonPriceToolMapper, CbamCarbonPriceToolEntity> implements CbamCarbonPriceToolService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
package com.thing.cbam.dict.controller; |
|||
|
|||
import com.thing.cbam.dict.dto.CbamHsDictDTO; |
|||
import com.thing.cbam.dict.service.CbamHsDictService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/hs字典表/cbamhsdict") |
|||
@Tag(name="hs字典表") |
|||
@RequiredArgsConstructor |
|||
public class CbamHsDictController { |
|||
|
|||
private final CbamHsDictService cbamHsDictService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamHsDictDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamHsDictDTO> page = cbamHsDictService.getPageData(params, CbamHsDictDTO.class); |
|||
return new Result<PageData<CbamHsDictDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamHsDictDTO> get(@PathVariable("id") Long id){ |
|||
CbamHsDictDTO data = cbamHsDictService.getByIdAs(id, CbamHsDictDTO.class); |
|||
return new Result<CbamHsDictDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamHsDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamHsDictService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamHsDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamHsDictService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamHsDictService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamHsDictDTO> list = cbamHsDictService.listAs(params, CbamHsDictDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "hs字典表", list, CbamHsDictExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
|
|||
|
|||
import com.thing.cbam.dict.dto.CbamIndustryDictDTO; |
|||
import com.thing.cbam.dict.service.CbamIndustryDictService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/所属行业字典/cbamindustrydict") |
|||
@Tag(name="所属行业字典") |
|||
@RequiredArgsConstructor |
|||
public class CbamIndustryDictController { |
|||
|
|||
private final CbamIndustryDictService cbamIndustryDictService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamIndustryDictDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamIndustryDictDTO> page = cbamIndustryDictService.getPageData(params, CbamIndustryDictDTO.class); |
|||
return new Result<PageData<CbamIndustryDictDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamIndustryDictDTO> get(@PathVariable("id") Long id){ |
|||
CbamIndustryDictDTO data = cbamIndustryDictService.getByIdAs(id, CbamIndustryDictDTO.class); |
|||
return new Result<CbamIndustryDictDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamIndustryDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamIndustryDictService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamIndustryDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamIndustryDictService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamIndustryDictService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamIndustryDictDTO> list = cbamIndustryDictService.listAs(params, CbamIndustryDictDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "所属行业字典", list, CbamIndustryDictExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
package com.thing.cbam.dict.controller; |
|||
|
|||
import com.thing.cbam.dict.dto.CbamProdProcessDictDTO; |
|||
import com.thing.cbam.dict.service.CbamProdProcessDictService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/工艺路线映射表/cbamprodprocessdict") |
|||
@Tag(name="原料(生产过程)---工艺路线映射表") |
|||
@RequiredArgsConstructor |
|||
public class CbamProdProcessDictController { |
|||
|
|||
private final CbamProdProcessDictService cbamProdProcessDictService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProdProcessDictDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamProdProcessDictDTO> page = cbamProdProcessDictService.getPageData(params, CbamProdProcessDictDTO.class); |
|||
return new Result<PageData<CbamProdProcessDictDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamProdProcessDictDTO> get(@PathVariable("id") Long id){ |
|||
CbamProdProcessDictDTO data = cbamProdProcessDictService.getByIdAs(id, CbamProdProcessDictDTO.class); |
|||
return new Result<CbamProdProcessDictDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProdProcessDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProdProcessDictService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProdProcessDictDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProdProcessDictService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProdProcessDictService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamProdProcessDictDTO> list = cbamProdProcessDictService.listAs(params, CbamProdProcessDictDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "原料(生产过程)---工艺路线映射表", list, CbamProdProcessDictExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.thing.cbam.dict.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "hs字典表") |
|||
public class CbamHsDictDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Schema(description = "主键") |
|||
private Long id; |
|||
@Schema(description = "预留字段,可以关联") |
|||
private String name; |
|||
@Schema(description = "hs编码") |
|||
private String code; |
|||
@Schema(description = "排序") |
|||
private String sort; |
|||
@Schema(description = "类型预留字段") |
|||
private String type; |
|||
@Schema(description = "英文名称预留字段") |
|||
private String ename; |
|||
@Schema(description = "关联cbam_prod_process_dict的id") |
|||
private Long prodProcessId; |
|||
|
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.thing.cbam.dict.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "所属行业字典") |
|||
public class CbamIndustryDictDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Schema(description = "主键") |
|||
private Long id; |
|||
@Schema(description = "中文名称") |
|||
private String name; |
|||
@Schema(description = "英文名称") |
|||
private String ename; |
|||
@Schema(description = "排序") |
|||
private Integer sort; |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.thing.cbam.dict.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "原料(生产过程)---工艺路线映射表") |
|||
public class CbamProdProcessDictDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Schema(description = "主键") |
|||
private Long id; |
|||
@Schema(description = "中文名称") |
|||
private String name; |
|||
@Schema(description = "英文名称") |
|||
private String ename; |
|||
@Schema(description = "类型") |
|||
private String type; |
|||
@Schema(description = "排序") |
|||
private Integer sort; |
|||
@Schema(description = "是否表黄:0否 1是") |
|||
private Integer tagging; |
|||
@Schema(description = "关联:当type=yl 关联 cbam_industry_dict 主键id,否则关联本表的id") |
|||
private Long pidId; |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.thing.cbam.dict.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_hs_dict") |
|||
public class CbamHsDictEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 预留字段,可以关联 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* hs编码 |
|||
*/ |
|||
private String code; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private String sort; |
|||
/** |
|||
* 类型预留字段 |
|||
*/ |
|||
private String type; |
|||
/** |
|||
* 英文名称预留字段 |
|||
*/ |
|||
private String ename; |
|||
/** |
|||
* 关联cbam_prod_process_dict的id |
|||
*/ |
|||
private Long prodProcessId; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.thing.cbam.dict.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_industry_dict") |
|||
public class CbamIndustryDictEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 中文名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 英文名称 |
|||
*/ |
|||
private String ename; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.thing.cbam.dict.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_prod_process_dict") |
|||
public class CbamProdProcessDictEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 中文名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 英文名称 |
|||
*/ |
|||
private String ename; |
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String type; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
/** |
|||
* 是否表黄:0否 1是 |
|||
*/ |
|||
private Integer tagging; |
|||
/** |
|||
* 关联:当type=yl 关联 cbam_industry_dict 主键id,否则关联本表的id |
|||
*/ |
|||
private Long pidId; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.dict.mapper; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamHsDictEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamHsDictMapper extends PowerBaseMapper<CbamHsDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.dict.mapper; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamIndustryDictEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamIndustryDictMapper extends PowerBaseMapper<CbamIndustryDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.dict.mapper; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamProdProcessDictEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamProdProcessDictMapper extends PowerBaseMapper<CbamProdProcessDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.thing.cbam.dict.service; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamHsDictEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
public interface CbamHsDictService extends IBaseService<CbamHsDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.thing.cbam.dict.service; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamIndustryDictEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
public interface CbamIndustryDictService extends IBaseService<CbamIndustryDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.thing.cbam.dict.service; |
|||
|
|||
import com.thing.cbam.dict.entity.CbamProdProcessDictEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
public interface CbamProdProcessDictService extends IBaseService<CbamProdProcessDictEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.dict.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.dict.entity.CbamHsDictEntity; |
|||
import com.thing.cbam.dict.mapper.CbamHsDictMapper; |
|||
import com.thing.cbam.dict.service.CbamHsDictService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* hs字典表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Service |
|||
public class CbamHsDictServiceImpl extends BaseServiceImpl<CbamHsDictMapper, CbamHsDictEntity> implements CbamHsDictService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.dict.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.dict.entity.CbamIndustryDictEntity; |
|||
import com.thing.cbam.dict.mapper.CbamIndustryDictMapper; |
|||
import com.thing.cbam.dict.service.CbamIndustryDictService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 所属行业字典 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Service |
|||
public class CbamIndustryDictServiceImpl extends BaseServiceImpl<CbamIndustryDictMapper, CbamIndustryDictEntity> implements CbamIndustryDictService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.dict.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.dict.entity.CbamProdProcessDictEntity; |
|||
import com.thing.cbam.dict.mapper.CbamProdProcessDictMapper; |
|||
import com.thing.cbam.dict.service.CbamProdProcessDictService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 原料(生产过程)---工艺路线映射表 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-29 |
|||
*/ |
|||
@Service |
|||
public class CbamProdProcessDictServiceImpl extends BaseServiceImpl<CbamProdProcessDictMapper, CbamProdProcessDictEntity> implements CbamProdProcessDictService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
package com.thing.cbam.directCarbon.controller; |
|||
|
|||
import com.thing.cbam.directCarbon.dto.CbamCarbonBurnDTO; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonBurnService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/cbam/carbon/burn") |
|||
@Tag(name="直接排放量") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonBurnController { |
|||
|
|||
private final CbamCarbonBurnService cbamCarbonBurnService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonBurnDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonBurnDTO> page = cbamCarbonBurnService.getPageData(params, CbamCarbonBurnDTO.class); |
|||
return new Result<PageData<CbamCarbonBurnDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonBurnDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonBurnDTO data = cbamCarbonBurnService.getByIdAs(id, CbamCarbonBurnDTO.class); |
|||
return new Result<CbamCarbonBurnDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonBurnDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonBurnService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonBurnDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonBurnService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonBurnService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,89 @@ |
|||
package com.thing.cbam.directCarbon.controller; |
|||
|
|||
import com.thing.cbam.directCarbon.dto.CbamCarbonMaterialDTO; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonMaterialService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/carbon/material") |
|||
@Tag(name = "原材料") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonMaterialController { |
|||
private final CbamCarbonMaterialService cbamCarbonMaterialService; |
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonMaterialDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonMaterialDTO> page = cbamCarbonMaterialService.getPageData(params, CbamCarbonMaterialDTO.class); |
|||
return new Result<PageData<CbamCarbonMaterialDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonMaterialDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonMaterialDTO data = cbamCarbonMaterialService.getByIdAs(id, CbamCarbonMaterialDTO.class); |
|||
return new Result<CbamCarbonMaterialDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonMaterialDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonMaterialService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonMaterialDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonMaterialService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonMaterialService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
package com.thing.cbam.directCarbon.controller; |
|||
|
|||
import com.thing.cbam.directCarbon.dto.CbamCarbonMonitorDTO; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonMonitorService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/carbon/monitor") |
|||
@Tag(name="排放源监测") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonMonitorController { |
|||
private final CbamCarbonMonitorService cbamCarbonMonitorService; |
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonMonitorDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonMonitorDTO> page = cbamCarbonMonitorService.getPageData(params, CbamCarbonMonitorDTO.class); |
|||
return new Result<PageData<CbamCarbonMonitorDTO>>().ok(page); |
|||
} |
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonMonitorDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonMonitorDTO data = cbamCarbonMonitorService.getByIdAs(id, CbamCarbonMonitorDTO.class); |
|||
return new Result<CbamCarbonMonitorDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonMonitorDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonMonitorService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonMonitorDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonMonitorService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonMonitorService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
package com.thing.cbam.directCarbon.controller; |
|||
|
|||
import com.thing.cbam.directCarbon.dto.CbamCarbonProgressDTO; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonProgressService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/carbon/progress") |
|||
@Tag(name="原料过程排放") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonProgressController { |
|||
private final CbamCarbonProgressService cbamCarbonProgressService; |
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonProgressDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonProgressDTO> page = cbamCarbonProgressService.getPageData(params, CbamCarbonProgressDTO.class); |
|||
return new Result<PageData<CbamCarbonProgressDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonProgressDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonProgressDTO data = cbamCarbonProgressService.getByIdAs(id, CbamCarbonProgressDTO.class); |
|||
return new Result<CbamCarbonProgressDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonProgressDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonProgressService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonProgressDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonProgressService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonProgressService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.thing.cbam.directCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "直接排放量") |
|||
public class CbamCarbonBurnDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "名称") |
|||
private String name; |
|||
@Schema(description = "消耗量") |
|||
private String consumAmount; |
|||
@Schema(description = "低位发热量") |
|||
private String lowheatGener; |
|||
@Schema(description = "排放源名称") |
|||
private String emissionName; |
|||
@Schema(description = "排放因子") |
|||
private String emissionFactors; |
|||
@Schema(description = "氧化因子") |
|||
private String oxidationFactor; |
|||
@Schema(description = "生物量含量") |
|||
private String biomassContent; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.thing.cbam.directCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原材料 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "原材料") |
|||
public class CbamCarbonMaterialDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "原材料名称") |
|||
private String rawMaterialName; |
|||
@Schema(description = "原材料的综合商品类别") |
|||
private String materialCategories; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.thing.cbam.directCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 排放源监测 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "排放源监测") |
|||
public class CbamCarbonMonitorDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "名称") |
|||
private String name; |
|||
@Schema(description = "温室气体类型") |
|||
private String typeGas; |
|||
@Schema(description = "生物质组分") |
|||
private String biomassComp; |
|||
@Schema(description = "每小时平均温室气体浓度") |
|||
private String gasConcen; |
|||
@Schema(description = "运行小时数") |
|||
private String operHours; |
|||
@Schema(description = "烟气(平均值)") |
|||
private String smokeAver; |
|||
@Schema(description = "能量含量(化石燃料)") |
|||
private String fossilContent; |
|||
@Schema(description = "能量含量(生物质燃料)") |
|||
private String biomassContent; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.thing.cbam.directCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原料过程排放 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "原料过程排放") |
|||
public class CbamCarbonProgressDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "名称") |
|||
private String name; |
|||
@Schema(description = "消耗量") |
|||
private String consumAmount; |
|||
@Schema(description = "排放因子") |
|||
private String emissionFactors; |
|||
@Schema(description = "排放源名称") |
|||
private String emissionName; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
package com.thing.cbam.directCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_burn") |
|||
public class CbamCarbonBurnEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 消耗量 |
|||
*/ |
|||
private String consumAmount; |
|||
/** |
|||
* 低位发热量 |
|||
*/ |
|||
private String lowheatGener; |
|||
/** |
|||
* 排放源名称 |
|||
*/ |
|||
private String emissionName; |
|||
/** |
|||
* 排放因子 |
|||
*/ |
|||
private String emissionFactors; |
|||
/** |
|||
* 氧化因子 |
|||
*/ |
|||
private String oxidationFactor; |
|||
/** |
|||
* 生物量含量 |
|||
*/ |
|||
private String biomassContent; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.thing.cbam.directCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_material") |
|||
public class CbamCarbonMaterialEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 消耗量产量 |
|||
*/ |
|||
private String consumOutput; |
|||
/** |
|||
* 碳含量 |
|||
*/ |
|||
private String carbonContent; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
/** |
|||
* 排放源名称 |
|||
*/ |
|||
private String emissionName; |
|||
|
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
package com.thing.cbam.directCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 排放源监测 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_monitor") |
|||
public class CbamCarbonMonitorEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 温室气体类型 |
|||
*/ |
|||
private String typeGas; |
|||
/** |
|||
* 生物质组分 |
|||
*/ |
|||
private String biomassComp; |
|||
/** |
|||
* 每小时平均温室气体浓度 |
|||
*/ |
|||
private String gasConcen; |
|||
/** |
|||
* 运行小时数 |
|||
*/ |
|||
private String operHours; |
|||
/** |
|||
* 烟气(平均值) |
|||
*/ |
|||
private String smokeAver; |
|||
/** |
|||
* 能量含量(化石燃料) |
|||
*/ |
|||
private String fossilContent; |
|||
/** |
|||
* 能量含量(生物质燃料) |
|||
*/ |
|||
private String biomassContent; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
package com.thing.cbam.directCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 原料过程排放 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_progress") |
|||
public class CbamCarbonProgressEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 消耗量 |
|||
*/ |
|||
private String consumAmount; |
|||
/** |
|||
* 排放因子 |
|||
*/ |
|||
private String emissionFactors; |
|||
/** |
|||
* 排放源名称 |
|||
*/ |
|||
private String emissionName; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.directCarbon.mapper; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonBurnEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamCarbonBurnMapper extends PowerBaseMapper<CbamCarbonBurnEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.thing.cbam.directCarbon.mapper; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMaterialEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamCarbonMaterialMapper extends PowerBaseMapper<CbamCarbonMaterialEntity> { |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.thing.cbam.directCarbon.mapper; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMonitorEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamCarbonMonitorMapper extends PowerBaseMapper<CbamCarbonMonitorEntity> { |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
package com.thing.cbam.directCarbon.mapper; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonBurnEntity; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonProgressEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamCarbonProgressMapper extends PowerBaseMapper<CbamCarbonProgressEntity> { |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.thing.cbam.directCarbon.service; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonBurnEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
public interface CbamCarbonBurnService extends IBaseService<CbamCarbonBurnEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.thing.cbam.directCarbon.service; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMaterialEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamCarbonMaterialService extends IBaseService<CbamCarbonMaterialEntity> { |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.thing.cbam.directCarbon.service; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMonitorEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamCarbonMonitorService extends IBaseService<CbamCarbonMonitorEntity> { |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
package com.thing.cbam.directCarbon.service; |
|||
|
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonBurnEntity; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonProgressEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamCarbonProgressService extends IBaseService<CbamCarbonProgressEntity> { |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.directCarbon.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonBurnEntity; |
|||
import com.thing.cbam.directCarbon.mapper.CbamCarbonBurnMapper; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonBurnService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 直接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Service |
|||
public class CbamCarbonBurnServiceImpl extends BaseServiceImpl<CbamCarbonBurnMapper, CbamCarbonBurnEntity> implements CbamCarbonBurnService { |
|||
|
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.thing.cbam.directCarbon.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMaterialEntity; |
|||
import com.thing.cbam.directCarbon.mapper.CbamCarbonMaterialMapper; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonMaterialService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamCarbonMaterialServiceImpl extends BaseServiceImpl<CbamCarbonMaterialMapper, CbamCarbonMaterialEntity> implements CbamCarbonMaterialService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.thing.cbam.directCarbon.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonMonitorEntity; |
|||
import com.thing.cbam.directCarbon.mapper.CbamCarbonMonitorMapper; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonMonitorService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamCarbonMonitorServiceImpl extends BaseServiceImpl<CbamCarbonMonitorMapper, CbamCarbonMonitorEntity> implements CbamCarbonMonitorService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.directCarbon.service.impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.directCarbon.entity.CbamCarbonProgressEntity; |
|||
import com.thing.cbam.directCarbon.mapper.CbamCarbonProgressMapper; |
|||
import com.thing.cbam.directCarbon.service.CbamCarbonProgressService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 原料过程排放 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-27 |
|||
*/ |
|||
@Service |
|||
public class CbamCarbonProgressServiceImpl extends BaseServiceImpl<CbamCarbonProgressMapper, CbamCarbonProgressEntity> implements CbamCarbonProgressService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,83 @@ |
|||
package com.thing.cbam.electricity.controller; |
|||
|
|||
import com.thing.cbam.electricity.dto.CbamElectricityToolDTO; |
|||
import com.thing.cbam.electricity.service.CbamElectricityToolService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/electricity/tool") |
|||
@Tag(name = "热电联产工具") |
|||
@RequiredArgsConstructor |
|||
public class CbamElectricityToolController { |
|||
private final CbamElectricityToolService cbamElectricityToolService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary = "分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true), |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true), |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段"), |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamElectricityToolDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params) { |
|||
PageData<CbamElectricityToolDTO> page = cbamElectricityToolService.getPageData(params, CbamElectricityToolDTO.class); |
|||
return new Result<PageData<CbamElectricityToolDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary = "信息") |
|||
public Result<CbamElectricityToolDTO> info(@PathVariable("id") String id) { |
|||
CbamElectricityToolDTO data=cbamElectricityToolService.getByIdAs(id, CbamElectricityToolDTO.class); |
|||
return new Result<CbamElectricityToolDTO>().ok(data); |
|||
} |
|||
@PostMapping |
|||
@Operation(summary = "保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamElectricityToolDTO dto) { |
|||
cbamElectricityToolService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamElectricityToolDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamElectricityToolService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamElectricityToolService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamProductInfoDTO> list = cbamProductInfoService.listAs(params, CbamProductInfoDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "综合商品类别和相关生产过程", list, CbamProductInfoExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.thing.cbam.electricity.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 热电联产工具 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "热电联产工具") |
|||
public class CbamElectricityToolDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "CHP的燃料投入") |
|||
private String fuelInput; |
|||
@Schema(description = "CHP的发热量产出") |
|||
private String heatingOutput; |
|||
@Schema(description = "CHP发电量") |
|||
private String powerGener; |
|||
@Schema(description = "来自CHP机组的燃料投入量") |
|||
private String fuelUnit; |
|||
@Schema(description = "来自烟气净化过程的燃料投入量") |
|||
private String gasProcess; |
|||
@Schema(description = "发热量生产") |
|||
private String heatProduction; |
|||
@Schema(description = "电力生产") |
|||
private String electProduction; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
package com.thing.cbam.electricity.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 热电联产工具 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_electricity_tool") |
|||
public class CbamElectricityToolEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* CHP的燃料投入 |
|||
*/ |
|||
private String fuelInput; |
|||
/** |
|||
* CHP的发热量产出 |
|||
*/ |
|||
private String heatingOutput; |
|||
/** |
|||
* CHP发电量 |
|||
*/ |
|||
private String powerGener; |
|||
/** |
|||
* 来自CHP机组的燃料投入量 |
|||
*/ |
|||
private String fuelUnit; |
|||
/** |
|||
* 来自烟气净化过程的燃料投入量 |
|||
*/ |
|||
private String gasProcess; |
|||
/** |
|||
* 发热量生产 |
|||
*/ |
|||
private String heatProduction; |
|||
/** |
|||
* 电力生产 |
|||
*/ |
|||
private String electProduction; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.thing.cbam.electricity.mapper; |
|||
|
|||
import com.thing.cbam.electricity.entity.CbamElectricityToolEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamElectricityToolMapper extends PowerBaseMapper<CbamElectricityToolEntity> { |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.thing.cbam.electricity.service; |
|||
|
|||
import com.thing.cbam.electricity.entity.CbamElectricityToolEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamElectricityToolService extends IBaseService<CbamElectricityToolEntity> { |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.thing.cbam.electricity.service.Impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.electricity.entity.CbamElectricityToolEntity; |
|||
import com.thing.cbam.electricity.mapper.CbamElectricityToolMapper; |
|||
import com.thing.cbam.electricity.service.CbamElectricityToolService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamElectricityToolServiceImpl extends BaseServiceImpl<CbamElectricityToolMapper, CbamElectricityToolEntity>implements CbamElectricityToolService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
package com.thing.cbam.indirectCarbon.controller; |
|||
|
|||
|
|||
import com.thing.cbam.indirectCarbon.dto.CbamCarbonIndirectEmissionsDTO; |
|||
import com.thing.cbam.indirectCarbon.service.CbamCarbonIndirectEmissionsService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/cbam/indirect") |
|||
@Tag(name = "间接排放量") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonIndirectEmissionsController { |
|||
private final CbamCarbonIndirectEmissionsService cbamCarbonIndirectEmissionsService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonIndirectEmissionsDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonIndirectEmissionsDTO> page = cbamCarbonIndirectEmissionsService.getPageData(params, CbamCarbonIndirectEmissionsDTO.class); |
|||
return new Result<PageData<CbamCarbonIndirectEmissionsDTO>>().ok(page); |
|||
} |
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonIndirectEmissionsDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonIndirectEmissionsDTO data = cbamCarbonIndirectEmissionsService.getByIdAs(id, CbamCarbonIndirectEmissionsDTO.class); |
|||
return new Result<CbamCarbonIndirectEmissionsDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonIndirectEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonIndirectEmissionsService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonIndirectEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonIndirectEmissionsService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonIndirectEmissionsService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
package com.thing.cbam.indirectCarbon.controller; |
|||
|
|||
import com.thing.cbam.indirectCarbon.dto.CbamCarbonPowerProgressAllocationDTO; |
|||
import com.thing.cbam.indirectCarbon.service.CbamCarbonPowerProgressAllocationService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/耗电量分配/cbamcarbonpowerprogressallocation") |
|||
@Tag(name="耗电量分配") |
|||
@RequiredArgsConstructor |
|||
public class CbamCarbonPowerProgressAllocationController { |
|||
|
|||
private final CbamCarbonPowerProgressAllocationService cbamCarbonPowerProgressAllocationService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamCarbonPowerProgressAllocationDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamCarbonPowerProgressAllocationDTO> page = cbamCarbonPowerProgressAllocationService.getPageData(params, CbamCarbonPowerProgressAllocationDTO.class); |
|||
return new Result<PageData<CbamCarbonPowerProgressAllocationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamCarbonPowerProgressAllocationDTO> get(@PathVariable("id") Long id){ |
|||
CbamCarbonPowerProgressAllocationDTO data = cbamCarbonPowerProgressAllocationService.getByIdAs(id, CbamCarbonPowerProgressAllocationDTO.class); |
|||
return new Result<CbamCarbonPowerProgressAllocationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamCarbonPowerProgressAllocationDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamCarbonPowerProgressAllocationService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamCarbonPowerProgressAllocationDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamCarbonPowerProgressAllocationService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamCarbonPowerProgressAllocationService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonPowerProgressAllocationDTO> list = cbamCarbonPowerProgressAllocationService.listAs(params, CbamCarbonPowerProgressAllocationDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "耗电量分配", list, CbamCarbonPowerProgressAllocationExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.thing.cbam.indirectCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 间接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "间接排放量") |
|||
public class CbamCarbonIndirectEmissionsDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "用电类型") |
|||
private String electricityType; |
|||
@Schema(description = "耗电量") |
|||
private String powerConsum; |
|||
@Schema(description = "电力碳排放因子") |
|||
private String electricityFactor; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.thing.cbam.indirectCarbon.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "耗电量分配") |
|||
public class CbamCarbonPowerProgressAllocationDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "生产过程设备总功率") |
|||
private String powerEquip; |
|||
@Schema(description = "设备平均运行时间") |
|||
private String averEquip; |
|||
@Schema(description = "电力排放因子的来源") |
|||
private String sourceElect; |
|||
@Schema(description = "有关数据质量的一般信息") |
|||
private String qualityInfo; |
|||
@Schema(description = "质量保证信息") |
|||
private String assurInfo; |
|||
@Schema(description = "电力生产燃料") |
|||
private String produFuel; |
|||
@Schema(description = "非CBAM商品生产的直接燃料 ") |
|||
private String nocbamFuel; |
|||
@Schema(description = "CBAM商品生产的直接燃料 ") |
|||
private String cbamFuel; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.thing.cbam.indirectCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 间接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_indirect_emissions") |
|||
public class CbamCarbonIndirectEmissionsEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 用电类型 |
|||
*/ |
|||
private String electricityType; |
|||
/** |
|||
* 耗电量 |
|||
*/ |
|||
private String powerConsum; |
|||
/** |
|||
* 电力碳排放因子 |
|||
*/ |
|||
private String electricityFactor; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
package com.thing.cbam.indirectCarbon.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_carbon_power_progress_allocation") |
|||
public class CbamCarbonPowerProgressAllocationEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 生产过程设备总功率 |
|||
*/ |
|||
private String powerEquip; |
|||
/** |
|||
* 设备平均运行时间 |
|||
*/ |
|||
private String averEquip; |
|||
/** |
|||
* 电力排放因子的来源 |
|||
*/ |
|||
private String sourceElect; |
|||
/** |
|||
* 有关数据质量的一般信息 |
|||
*/ |
|||
private String qualityInfo; |
|||
/** |
|||
* 质量保证信息 |
|||
*/ |
|||
private String assurInfo; |
|||
/** |
|||
* 电力生产燃料 |
|||
*/ |
|||
private String produFuel; |
|||
/** |
|||
* 非CBAM商品生产的直接燃料 |
|||
*/ |
|||
private String nocbamFuel; |
|||
/** |
|||
* CBAM商品生产的直接燃料 |
|||
*/ |
|||
private String cbamFuel; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.indirectCarbon.mapper; |
|||
|
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonIndirectEmissionsEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 间接排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamCarbonIndirectEmissionsMapper extends PowerBaseMapper<CbamCarbonIndirectEmissionsEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.indirectCarbon.mapper; |
|||
|
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonPowerProgressAllocationEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamCarbonPowerProgressAllocationMapper extends PowerBaseMapper<CbamCarbonPowerProgressAllocationEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.thing.cbam.indirectCarbon.service; |
|||
|
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonIndirectEmissionsEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
public interface CbamCarbonIndirectEmissionsService extends IBaseService<CbamCarbonIndirectEmissionsEntity> { |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.thing.cbam.indirectCarbon.service; |
|||
|
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonPowerProgressAllocationEntity; |
|||
import com.thing.common.orm.service.IBaseService; |
|||
|
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
public interface CbamCarbonPowerProgressAllocationService extends IBaseService<CbamCarbonPowerProgressAllocationEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.thing.cbam.indirectCarbon.service.Impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonIndirectEmissionsEntity; |
|||
import com.thing.cbam.indirectCarbon.mapper.CbamCarbonIndirectEmissionsMapper; |
|||
import com.thing.cbam.indirectCarbon.service.CbamCarbonIndirectEmissionsService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class CbamCarbonIndirectEmissionsServiceImpl extends BaseServiceImpl<CbamCarbonIndirectEmissionsMapper, CbamCarbonIndirectEmissionsEntity> implements CbamCarbonIndirectEmissionsService { |
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params) { |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.thing.cbam.indirectCarbon.service.Impl; |
|||
|
|||
import com.mybatisflex.core.query.QueryWrapper; |
|||
import com.thing.cbam.indirectCarbon.entity.CbamCarbonPowerProgressAllocationEntity; |
|||
import com.thing.cbam.indirectCarbon.mapper.CbamCarbonPowerProgressAllocationMapper; |
|||
import com.thing.cbam.indirectCarbon.service.CbamCarbonPowerProgressAllocationService; |
|||
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 耗电量分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Service |
|||
public class CbamCarbonPowerProgressAllocationServiceImpl extends BaseServiceImpl<CbamCarbonPowerProgressAllocationMapper, CbamCarbonPowerProgressAllocationEntity> implements CbamCarbonPowerProgressAllocationService { |
|||
|
|||
@Override |
|||
public QueryWrapper getWrapper(Map<String, Object> params){ |
|||
QueryWrapper wrapper = new QueryWrapper(); |
|||
return wrapper; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
package com.thing.cbam.production.controller; |
|||
|
|||
import com.thing.cbam.production.dto.CbamProductAllocationDTO; |
|||
import com.thing.cbam.production.service.CbamProductAllocationService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/product/allocation") |
|||
@Tag(name = "产品的分配") |
|||
@RequiredArgsConstructor |
|||
public class CbamProductAllocationController { |
|||
private final CbamProductAllocationService cbamProductAllocationService; |
|||
@GetMapping("page") |
|||
@Operation(summary = "分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true), |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true), |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段"), |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProductAllocationDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params) { |
|||
PageData<CbamProductAllocationDTO> page = cbamProductAllocationService.getPageData(params, CbamProductAllocationDTO.class); |
|||
return new Result<PageData<CbamProductAllocationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary = "信息") |
|||
public Result<CbamProductAllocationDTO> get(@PathVariable("id") Long id) { |
|||
CbamProductAllocationDTO data = cbamProductAllocationService.getByIdAs(id, CbamProductAllocationDTO.class); |
|||
return new Result<CbamProductAllocationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary = "保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProductAllocationDTO dto) { |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProductAllocationService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary = "修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProductAllocationDTO dto) { |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProductAllocationService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary = "删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids) { |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProductAllocationService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
package com.thing.cbam.production.controller; |
|||
|
|||
import com.thing.cbam.production.dto.CbamProductElectricityDTO; |
|||
import com.thing.cbam.production.service.CbamProductElectricityService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 输出的电力 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/输出的电力/cbamproductelectricity") |
|||
@Tag(name="输出的电力") |
|||
@RequiredArgsConstructor |
|||
public class CbamProductElectricityController { |
|||
|
|||
private final CbamProductElectricityService cbamProductElectricityService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProductElectricityDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamProductElectricityDTO> page = cbamProductElectricityService.getPageData(params, CbamProductElectricityDTO.class); |
|||
return new Result<PageData<CbamProductElectricityDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamProductElectricityDTO> get(@PathVariable("id") Long id){ |
|||
CbamProductElectricityDTO data = cbamProductElectricityService.getByIdAs(id, CbamProductElectricityDTO.class); |
|||
return new Result<CbamProductElectricityDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProductElectricityDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProductElectricityService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProductElectricityDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProductElectricityService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProductElectricityService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamProductElectricityDTO> list = cbamProductElectricityService.listAs(params, CbamProductElectricityDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "输出的电力", list, CbamProductElectricityExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
package com.thing.cbam.production.controller; |
|||
|
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
|
|||
|
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 废气排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("v2/废气排放量/cbamproductexhaustemissions") |
|||
@Tag(name="废气排放量") |
|||
@RequiredArgsConstructor |
|||
public class CbamProductExhaustEmissionsController { |
|||
|
|||
private final CbamProductExhaustEmissionsService cbamProductExhaustEmissionsService; |
|||
|
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProductExhaustEmissionsDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamProductExhaustEmissionsDTO> page = cbamProductExhaustEmissionsService.getPageData(params, CbamProductExhaustEmissionsDTO.class); |
|||
return new Result<PageData<CbamProductExhaustEmissionsDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamProductExhaustEmissionsDTO> get(@PathVariable("id") Long id){ |
|||
CbamProductExhaustEmissionsDTO data = cbamProductExhaustEmissionsService.getByIdAs(id, CbamProductExhaustEmissionsDTO.class); |
|||
return new Result<CbamProductExhaustEmissionsDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProductExhaustEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProductExhaustEmissionsService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProductExhaustEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProductExhaustEmissionsService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProductExhaustEmissionsService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamProductExhaustEmissionsDTO> list = cbamProductExhaustEmissionsService.listAs(params, CbamProductExhaustEmissionsDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "废气排放量", list, CbamProductExhaustEmissionsExcel.class); |
|||
*} |
|||
*/ |
|||
|
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
package com.thing.cbam.production.controller; |
|||
|
|||
import com.thing.cbam.production.dto.CbamProductHeatEmissionsDTO; |
|||
import com.thing.cbam.production.service.CbamProductHeatEmissionsService; |
|||
import com.thing.common.core.annotation.LogOperation; |
|||
import com.thing.common.core.constants.Constant; |
|||
import com.thing.common.core.validator.AssertUtils; |
|||
import com.thing.common.core.validator.ValidatorUtils; |
|||
import com.thing.common.core.validator.group.AddGroup; |
|||
import com.thing.common.core.validator.group.DefaultGroup; |
|||
import com.thing.common.core.validator.group.UpdateGroup; |
|||
import com.thing.common.core.web.response.PageData; |
|||
import com.thing.common.core.web.response.Result; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("v2/product/heat") |
|||
@Tag(name = "发热量排放") |
|||
@RequiredArgsConstructor |
|||
public class CbamProductHeatEmissionsController { |
|||
private final CbamProductHeatEmissionsService cbamProductHeatEmissionsService; |
|||
@GetMapping("page") |
|||
@Operation(summary="分页") |
|||
@Parameters({ |
|||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) , |
|||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) , |
|||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") , |
|||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|||
}) |
|||
public Result<PageData<CbamProductHeatEmissionsDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){ |
|||
PageData<CbamProductHeatEmissionsDTO> page = cbamProductHeatEmissionsService.getPageData(params, CbamProductHeatEmissionsDTO.class); |
|||
return new Result<PageData<CbamProductHeatEmissionsDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
@Operation(summary="信息") |
|||
public Result<CbamProductHeatEmissionsDTO> get(@PathVariable("id") Long id){ |
|||
CbamProductHeatEmissionsDTO data = cbamProductHeatEmissionsService.getByIdAs(id, CbamProductHeatEmissionsDTO.class); |
|||
return new Result<CbamProductHeatEmissionsDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Operation(summary="保存") |
|||
@LogOperation("保存") |
|||
public Result<Void> save(@RequestBody CbamProductHeatEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
cbamProductHeatEmissionsService.saveDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Operation(summary="修改") |
|||
@LogOperation("修改") |
|||
public Result<Void> update(@RequestBody CbamProductHeatEmissionsDTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
cbamProductHeatEmissionsService.updateDto(dto); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@Operation(summary="删除") |
|||
@LogOperation("删除") |
|||
public Result<Void> delete(@RequestBody Long[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
cbamProductHeatEmissionsService.batchDelete(ids); |
|||
return new Result<>(); |
|||
} |
|||
|
|||
/** |
|||
*@GetMapping("export") |
|||
*@Operation(summary="导出") |
|||
*@LogOperation("导出") |
|||
*public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
* List<CbamCarbonBurnDTO> list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); |
|||
* //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); |
|||
*} |
|||
*/ |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.thing.cbam.production.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 产品的分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "产品的分配") |
|||
public class CbamProductAllocationDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "消耗量t") |
|||
private String consum; |
|||
@Schema(description = "欧盟出口量") |
|||
private String exportVolume; |
|||
@Schema(description = "非欧盟销售量") |
|||
private String salesVolume; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.thing.cbam.production.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 输出的电力 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "输出的电力") |
|||
public class CbamProductElectricityDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "输出总量") |
|||
private String totalOutput; |
|||
@Schema(description = "电力排放因子") |
|||
private String electricityFactor; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.thing.cbam.production.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 废气排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "废气排放量") |
|||
public class CbamProductExhaustEmissionsDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "输入量") |
|||
private String inputQuantity; |
|||
@Schema(description = "输出量") |
|||
private String output; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.thing.cbam.production.dto; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@Schema(description = "发热量排放") |
|||
public class CbamProductHeatEmissionsDTO implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
@Schema(description = "输入量") |
|||
private String inputQuantity; |
|||
@Schema(description = "输出量") |
|||
private String outpuQuantity; |
|||
@Schema(description = "关联cbam_industry_information的主键id") |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.thing.cbam.production.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 产品的分配 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_product_allocation") |
|||
public class CbamProductAllocationEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 消耗量t |
|||
*/ |
|||
private String consum; |
|||
/** |
|||
* 欧盟出口量 |
|||
*/ |
|||
private String exportVolume; |
|||
/** |
|||
* 非欧盟销售量 |
|||
*/ |
|||
private String salesVolume; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.thing.cbam.production.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 输出的电力 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_product_electricity") |
|||
public class CbamProductElectricityEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 输出总量 |
|||
*/ |
|||
private String totalOutput; |
|||
/** |
|||
* 电力排放因子 |
|||
*/ |
|||
private String electricityFactor; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.thing.cbam.production.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 废气排放量 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_product_exhaust_emissions") |
|||
public class CbamProductExhaustEmissionsEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 输入量 |
|||
*/ |
|||
private String inputQuantity; |
|||
/** |
|||
* 输出量 |
|||
*/ |
|||
private String output; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.thing.cbam.production.entity; |
|||
|
|||
import com.mybatisflex.annotation.Id; |
|||
import com.mybatisflex.annotation.Table; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@Accessors(chain = true) |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@Table("cbam_product_heat_emissions") |
|||
public class CbamProductHeatEmissionsEntity implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@Id |
|||
private Long id; |
|||
/** |
|||
* 输入量 |
|||
*/ |
|||
private String inputQuantity; |
|||
/** |
|||
* 输出量 |
|||
*/ |
|||
private String outpuQuantity; |
|||
/** |
|||
* 关联cbam_industry_information的主键id |
|||
*/ |
|||
private Long industryId; |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
package com.thing.cbam.production.mapper; |
|||
|
|||
import com.thing.cbam.production.entity.CbamProductAllocationEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CbamProductAllocationMapper extends PowerBaseMapper<CbamProductAllocationEntity> { |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.thing.cbam.production.mapper; |
|||
|
|||
import com.thing.cbam.production.entity.CbamProductElectricityEntity; |
|||
import com.thing.common.orm.mapper.PowerBaseMapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 输出的电力 |
|||
* |
|||
* @author xc |
|||
* @since 3.0 2024-11-28 |
|||
*/ |
|||
@Mapper |
|||
public interface CbamProductElectricityMapper extends PowerBaseMapper<CbamProductElectricityEntity> { |
|||
|
|||
} |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue