diff --git a/application/pom.xml b/application/pom.xml index d45a2d4..5972202 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -145,6 +145,10 @@ com.thing.modules visual-design + + com.thing.modules + cbam + org.springframework.boot diff --git a/modules/cbam/pom.xml b/modules/cbam/pom.xml new file mode 100644 index 0000000..ede5601 --- /dev/null +++ b/modules/cbam/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + com.thing + modules + 5.1 + + + com.thing.modules + cbam + jar + ThingBI Server Modules cbam + + + + UTF-8 + + + + + + + org.projectlombok + lombok + + + + com.thing.modules + thing + + + + + + + \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamIndustryController.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamIndustryController.java new file mode 100644 index 0000000..0a88274 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamIndustryController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map param) { + PageData pageList = service.getPageData(param,CbamIndustryDTO.class); + return new Result>().ok(pageList); + } + + + @GetMapping("{id}") + @Operation(summary = "信息") + public Result get(@PathVariable("id") Long id) { + CbamIndustryDTO dto = service.findById(id); + return new Result().ok(dto); + } + + @PostMapping + @Operation(summary = "保存") + @LogOperation("保存") + public Result save(@RequestBody CbamIndustryDTO dto) { + service.saveEntity(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary = "修改") + @LogOperation("修改") + public Result 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 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 params, HttpServletResponse response) { +// ExcelUtils.exportExcel(service.export(ids, params), "物模型列表", "物模型", IotThingModelExcel.class, "物模型列表.xls", response); +// } + + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamMaterialController.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamMaterialController.java new file mode 100644 index 0000000..003385a --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamMaterialController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params) { + PageData page = cbamMaterialService.getPageData(params, CbamMaterialDTO.class); + return new Result>().ok(page); + } + @GetMapping("{id}") + @Operation(summary = "信息") + public Result get(@PathVariable("id") Long id) { + CbamMaterialDTO data = cbamMaterialService.getByIdAs(id, CbamMaterialDTO.class); + return new Result().ok(data); + } + @PostMapping + @Operation(summary = "保存") + @LogOperation("保存") + public Result save(@RequestBody CbamMaterialDTO dto) { + cbamMaterialService.saveDto(dto); + return new Result<>(); + } + @PutMapping + @Operation(summary = "修改") + @LogOperation("修改") + public Result update(@RequestBody CbamMaterialDTO dto) { + //效验数据 + cbamMaterialService.updateDto(dto); + return new Result<>(); + } + @DeleteMapping + @Operation(summary = "删除") + @LogOperation("删除") + public Result delete(@RequestBody Long[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + cbamMaterialService.batchDelete(ids); + return new Result<>(); + } + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamProductInfoController.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamProductInfoController.java new file mode 100644 index 0000000..7f78a18 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/controller/CbamProductInfoController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamProductInfoService.getPageData(params, CbamProductInfoDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamProductInfoDTO data = cbamProductInfoService.getByIdAs(id, CbamProductInfoDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProductInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProductInfoService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProductInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProductInfoService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamProductInfoService.listAs(params, CbamProductInfoDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "综合商品类别和相关生产过程", list, CbamProductInfoExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamIndustryDTO.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamIndustryDTO.java new file mode 100644 index 0000000..2636fe0 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamIndustryDTO.java @@ -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 cbamProductList; + + private List cbamMaterialList; + + /*------------------------租户信息--------------------------------*/ + + /** + * 租户编码 + */ + private Long tenantCode; + + /** + * 公司id + */ + private Long companyId; + + /** + * 部门id + */ + private Long deptId; + + /*------------------------修改记录信息--------------------------------*/ + + /** + * 创建者 + */ + private Long creator; + + /** + * 创建时间 + */ + private Long createDate; + + /** + * 修改人 + */ + private Long updater; + /** + * 修改时间 + */ + private Long updateDate; + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamMaterialDTO.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamMaterialDTO.java new file mode 100644 index 0000000..bcd21ad --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamMaterialDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamProductInfoDTO.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamProductInfoDTO.java new file mode 100644 index 0000000..541c514 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/dto/CbamProductInfoDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamIndustryEntity.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamIndustryEntity.java new file mode 100644 index 0000000..9cd8e3b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamIndustryEntity.java @@ -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; + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamMaterialEntity.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamMaterialEntity.java new file mode 100644 index 0000000..a7cc7bb --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamMaterialEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamProductInfoEntity.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamProductInfoEntity.java new file mode 100644 index 0000000..ccf3346 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/entity/CbamProductInfoEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamIndustryMapper.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamIndustryMapper.java new file mode 100644 index 0000000..21288dc --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamIndustryMapper.java @@ -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 { + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamMaterialMapper.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamMaterialMapper.java new file mode 100644 index 0000000..228f048 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamMaterialMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamProductInfoMapper.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamProductInfoMapper.java new file mode 100644 index 0000000..b503cb7 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/mapper/CbamProductInfoMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamIndustryService.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamIndustryService.java new file mode 100644 index 0000000..1244d01 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamIndustryService.java @@ -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 { + + + CbamIndustryDTO findById(Long id); + + + void saveEntity(CbamIndustryDTO dto); + + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamMaterialService.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamMaterialService.java new file mode 100644 index 0000000..7db73aa --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamMaterialService.java @@ -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 { + List findListByIndustryId(Long industryId); + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamProductInfoService.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamProductInfoService.java new file mode 100644 index 0000000..20d0246 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/CbamProductInfoService.java @@ -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 { + + + List findListByIndustryId(Long industryId); + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamIndustryServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamIndustryServiceImpl.java new file mode 100644 index 0000000..dbea3ab --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamIndustryServiceImpl.java @@ -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 implements CbamIndustryService { + @Resource + private CbamProductInfoService cbamProductInfoService; + + @Resource + private CbamMaterialService cbamMaterialService; + + + @Override + public QueryWrapper getWrapper(Map 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 cbamProductInfoDTOList = cbamProductInfoService.findListByIndustryId(id); + dto.setCbamProductList(cbamProductInfoDTOList); + + List 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 cbamProductList = dto.getCbamProductList(); + List 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)); + } + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamMaterialServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamMaterialServiceImpl.java new file mode 100644 index 0000000..920b6a1 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamMaterialServiceImpl.java @@ -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 implements CbamMaterialService { + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + @Override + public List findListByIndustryId(Long industryId) { + return mapper.selectListByQueryAs(QueryWrapper.create().eq(CbamMaterialEntity::getIndustryId,industryId), CbamMaterialDTO.class); + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamProductInfoServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamProductInfoServiceImpl.java new file mode 100644 index 0000000..bfc9470 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/baesInfoExcel/service/impl/CbamProductInfoServiceImpl.java @@ -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 implements CbamProductInfoService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + + @Override + public List findListByIndustryId(Long industryId){ + return mapper.selectListByQueryAs(QueryWrapper.create().eq(CbamProductInfoEntity::getIndustryId,industryId), CbamProductInfoDTO.class); + } +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/controller/CbamCarbonPriceToolController.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/controller/CbamCarbonPriceToolController.java new file mode 100644 index 0000000..a61c54b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/controller/CbamCarbonPriceToolController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map param) { + PageData pageList = cbamCarbonPriceToolServicevice.getPageData(param, CbamCarbonPriceToolDTO.class); + return new Result>().ok(pageList); + } + @GetMapping("{id}") + @Operation(summary = "信息") + @LogOperation("信息") + public Result info(@PathVariable("id") String id) { + CbamCarbonPriceToolDTO dto = cbamCarbonPriceToolServicevice.getByIdAs(id, CbamCarbonPriceToolDTO.class); + return new Result().ok(dto); + } + @PostMapping + @Operation(summary = "保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonPriceToolDTO dto) { + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonPriceToolServicevice.saveDto(dto); + return new Result<>(); + } + @PutMapping + @Operation(summary = "修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonPriceToolDTO dto) { + //实验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonPriceToolServicevice.updateDto(dto); + return new Result<>(); + } + @DeleteMapping + @Operation(summary = "删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/dto/CbamCarbonPriceToolDTO.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/dto/CbamCarbonPriceToolDTO.java new file mode 100644 index 0000000..806a718 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/dto/CbamCarbonPriceToolDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/entity/CbamCarbonPriceToolEntity.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/entity/CbamCarbonPriceToolEntity.java new file mode 100644 index 0000000..d560848 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/entity/CbamCarbonPriceToolEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/mapper/CbamCarbonPriceToolMapper.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/mapper/CbamCarbonPriceToolMapper.java new file mode 100644 index 0000000..c081936 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/mapper/CbamCarbonPriceToolMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/CbamCarbonPriceToolService.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/CbamCarbonPriceToolService.java new file mode 100644 index 0000000..07af157 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/CbamCarbonPriceToolService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/Impl/CbamCarbonPriceToolServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/Impl/CbamCarbonPriceToolServiceImpl.java new file mode 100644 index 0000000..764a54b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/carbonPrice/service/Impl/CbamCarbonPriceToolServiceImpl.java @@ -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 implements CbamCarbonPriceToolService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamHsDictController.java b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamHsDictController.java new file mode 100644 index 0000000..4617de9 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamHsDictController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamHsDictService.getPageData(params, CbamHsDictDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamHsDictDTO data = cbamHsDictService.getByIdAs(id, CbamHsDictDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamHsDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamHsDictService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamHsDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamHsDictService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamHsDictService.listAs(params, CbamHsDictDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "hs字典表", list, CbamHsDictExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamIndustryDictController.java b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamIndustryDictController.java new file mode 100644 index 0000000..1dd3cca --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamIndustryDictController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamIndustryDictService.getPageData(params, CbamIndustryDictDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamIndustryDictDTO data = cbamIndustryDictService.getByIdAs(id, CbamIndustryDictDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamIndustryDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamIndustryDictService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamIndustryDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamIndustryDictService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamIndustryDictService.listAs(params, CbamIndustryDictDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "所属行业字典", list, CbamIndustryDictExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamProdProcessDictController.java b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamProdProcessDictController.java new file mode 100644 index 0000000..c8e6664 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/controller/CbamProdProcessDictController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamProdProcessDictService.getPageData(params, CbamProdProcessDictDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamProdProcessDictDTO data = cbamProdProcessDictService.getByIdAs(id, CbamProdProcessDictDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProdProcessDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProdProcessDictService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProdProcessDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProdProcessDictService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamProdProcessDictService.listAs(params, CbamProdProcessDictDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "原料(生产过程)---工艺路线映射表", list, CbamProdProcessDictExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamHsDictDTO.java b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamHsDictDTO.java new file mode 100644 index 0000000..e0b05dc --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamHsDictDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamIndustryDictDTO.java b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamIndustryDictDTO.java new file mode 100644 index 0000000..657253f --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamIndustryDictDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamProdProcessDictDTO.java b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamProdProcessDictDTO.java new file mode 100644 index 0000000..f570fc4 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/dto/CbamProdProcessDictDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamHsDictEntity.java b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamHsDictEntity.java new file mode 100644 index 0000000..01359eb --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamHsDictEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamIndustryDictEntity.java b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamIndustryDictEntity.java new file mode 100644 index 0000000..efd76e8 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamIndustryDictEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamProdProcessDictEntity.java b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamProdProcessDictEntity.java new file mode 100644 index 0000000..895a333 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/entity/CbamProdProcessDictEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamHsDictMapper.java b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamHsDictMapper.java new file mode 100644 index 0000000..66b559f --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamHsDictMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamIndustryDictMapper.java b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamIndustryDictMapper.java new file mode 100644 index 0000000..872053b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamIndustryDictMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamProdProcessDictMapper.java b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamProdProcessDictMapper.java new file mode 100644 index 0000000..2091bfb --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/mapper/CbamProdProcessDictMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamHsDictService.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamHsDictService.java new file mode 100644 index 0000000..8e57db4 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamHsDictService.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamIndustryDictService.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamIndustryDictService.java new file mode 100644 index 0000000..971f161 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamIndustryDictService.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamProdProcessDictService.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamProdProcessDictService.java new file mode 100644 index 0000000..51d3591 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/CbamProdProcessDictService.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamHsDictServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamHsDictServiceImpl.java new file mode 100644 index 0000000..90d64d4 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamHsDictServiceImpl.java @@ -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 implements CbamHsDictService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamIndustryDictServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamIndustryDictServiceImpl.java new file mode 100644 index 0000000..32a653b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamIndustryDictServiceImpl.java @@ -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 implements CbamIndustryDictService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamProdProcessDictServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamProdProcessDictServiceImpl.java new file mode 100644 index 0000000..ccf8cf0 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/dict/service/impl/CbamProdProcessDictServiceImpl.java @@ -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 implements CbamProdProcessDictService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonBurnController.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonBurnController.java new file mode 100644 index 0000000..6447633 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonBurnController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonBurnService.getPageData(params, CbamCarbonBurnDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonBurnDTO data = cbamCarbonBurnService.getByIdAs(id, CbamCarbonBurnDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonBurnDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonBurnService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonBurnDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonBurnService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMaterialController.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMaterialController.java new file mode 100644 index 0000000..3004269 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMaterialController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonMaterialService.getPageData(params, CbamCarbonMaterialDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonMaterialDTO data = cbamCarbonMaterialService.getByIdAs(id, CbamCarbonMaterialDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonMaterialDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonMaterialService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonMaterialDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonMaterialService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMonitorController.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMonitorController.java new file mode 100644 index 0000000..515bd57 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonMonitorController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonMonitorService.getPageData(params, CbamCarbonMonitorDTO.class); + return new Result>().ok(page); + } + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonMonitorDTO data = cbamCarbonMonitorService.getByIdAs(id, CbamCarbonMonitorDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonMonitorDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonMonitorService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonMonitorDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonMonitorService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonProgressController.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonProgressController.java new file mode 100644 index 0000000..0728320 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/controller/CbamCarbonProgressController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonProgressService.getPageData(params, CbamCarbonProgressDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonProgressDTO data = cbamCarbonProgressService.getByIdAs(id, CbamCarbonProgressDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonProgressDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonProgressService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonProgressDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonProgressService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonBurnDTO.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonBurnDTO.java new file mode 100644 index 0000000..c05a56c --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonBurnDTO.java @@ -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; + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMaterialDTO.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMaterialDTO.java new file mode 100644 index 0000000..88ccd1e --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMaterialDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMonitorDTO.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMonitorDTO.java new file mode 100644 index 0000000..76e2e54 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonMonitorDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonProgressDTO.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonProgressDTO.java new file mode 100644 index 0000000..692283b --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/dto/CbamCarbonProgressDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonBurnEntity.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonBurnEntity.java new file mode 100644 index 0000000..20a4fbd --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonBurnEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMaterialEntity.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMaterialEntity.java new file mode 100644 index 0000000..d419715 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMaterialEntity.java @@ -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; + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMonitorEntity.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMonitorEntity.java new file mode 100644 index 0000000..c16a873 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonMonitorEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonProgressEntity.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonProgressEntity.java new file mode 100644 index 0000000..a25a7f9 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/entity/CbamCarbonProgressEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonBurnMapper.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonBurnMapper.java new file mode 100644 index 0000000..3a038ed --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonBurnMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMaterialMapper.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMaterialMapper.java new file mode 100644 index 0000000..993c927 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMaterialMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMonitorMapper.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMonitorMapper.java new file mode 100644 index 0000000..4fe09b1 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonMonitorMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonProgressMapper.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonProgressMapper.java new file mode 100644 index 0000000..971efab --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/mapper/CbamCarbonProgressMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonBurnService.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonBurnService.java new file mode 100644 index 0000000..be520f5 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonBurnService.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMaterialService.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMaterialService.java new file mode 100644 index 0000000..ecef58d --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMaterialService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMonitorService.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMonitorService.java new file mode 100644 index 0000000..6f92b37 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonMonitorService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonProgressService.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonProgressService.java new file mode 100644 index 0000000..8a6d0b4 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/CbamCarbonProgressService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonBurnServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonBurnServiceImpl.java new file mode 100644 index 0000000..67f2e29 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonBurnServiceImpl.java @@ -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 implements CbamCarbonBurnService { + + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMaterialServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMaterialServiceImpl.java new file mode 100644 index 0000000..e5bdf4e --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMaterialServiceImpl.java @@ -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 implements CbamCarbonMaterialService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMonitorServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMonitorServiceImpl.java new file mode 100644 index 0000000..7639d09 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonMonitorServiceImpl.java @@ -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 implements CbamCarbonMonitorService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonProgressServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonProgressServiceImpl.java new file mode 100644 index 0000000..7080c88 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/directCarbon/service/impl/CbamCarbonProgressServiceImpl.java @@ -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 implements CbamCarbonProgressService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/controller/CbamElectricityToolController.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/controller/CbamElectricityToolController.java new file mode 100644 index 0000000..fdda4f7 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/controller/CbamElectricityToolController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params) { + PageData page = cbamElectricityToolService.getPageData(params, CbamElectricityToolDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary = "信息") + public Result info(@PathVariable("id") String id) { + CbamElectricityToolDTO data=cbamElectricityToolService.getByIdAs(id, CbamElectricityToolDTO.class); + return new Result().ok(data); + } + @PostMapping + @Operation(summary = "保存") + @LogOperation("保存") + public Result save(@RequestBody CbamElectricityToolDTO dto) { + cbamElectricityToolService.saveDto(dto); + return new Result<>(); + } + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamElectricityToolDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamElectricityToolService.updateDto(dto); + return new Result<>(); + } + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamProductInfoService.listAs(params, CbamProductInfoDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "综合商品类别和相关生产过程", list, CbamProductInfoExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/dto/CbamElectricityToolDTO.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/dto/CbamElectricityToolDTO.java new file mode 100644 index 0000000..b8f3d55 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/dto/CbamElectricityToolDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/entity/CbamElectricityToolEntity.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/entity/CbamElectricityToolEntity.java new file mode 100644 index 0000000..4a29312 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/entity/CbamElectricityToolEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/mapper/CbamElectricityToolMapper.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/mapper/CbamElectricityToolMapper.java new file mode 100644 index 0000000..0701963 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/mapper/CbamElectricityToolMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/service/CbamElectricityToolService.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/service/CbamElectricityToolService.java new file mode 100644 index 0000000..e49cd23 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/service/CbamElectricityToolService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/electricity/service/Impl/CbamElectricityToolServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/electricity/service/Impl/CbamElectricityToolServiceImpl.java new file mode 100644 index 0000000..5ae500c --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/electricity/service/Impl/CbamElectricityToolServiceImpl.java @@ -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 BaseServiceImplimplements CbamElectricityToolService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonIndirectEmissionsController.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonIndirectEmissionsController.java new file mode 100644 index 0000000..ab183d9 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonIndirectEmissionsController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonIndirectEmissionsService.getPageData(params, CbamCarbonIndirectEmissionsDTO.class); + return new Result>().ok(page); + } + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonIndirectEmissionsDTO data = cbamCarbonIndirectEmissionsService.getByIdAs(id, CbamCarbonIndirectEmissionsDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonIndirectEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonIndirectEmissionsService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonIndirectEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonIndirectEmissionsService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ + + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonPowerProgressAllocationController.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonPowerProgressAllocationController.java new file mode 100644 index 0000000..bc39f86 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/controller/CbamCarbonPowerProgressAllocationController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamCarbonPowerProgressAllocationService.getPageData(params, CbamCarbonPowerProgressAllocationDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamCarbonPowerProgressAllocationDTO data = cbamCarbonPowerProgressAllocationService.getByIdAs(id, CbamCarbonPowerProgressAllocationDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamCarbonPowerProgressAllocationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamCarbonPowerProgressAllocationService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamCarbonPowerProgressAllocationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamCarbonPowerProgressAllocationService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonPowerProgressAllocationService.listAs(params, CbamCarbonPowerProgressAllocationDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "耗电量分配", list, CbamCarbonPowerProgressAllocationExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonIndirectEmissionsDTO.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonIndirectEmissionsDTO.java new file mode 100644 index 0000000..dc12d13 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonIndirectEmissionsDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonPowerProgressAllocationDTO.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonPowerProgressAllocationDTO.java new file mode 100644 index 0000000..bf83b81 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/dto/CbamCarbonPowerProgressAllocationDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonIndirectEmissionsEntity.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonIndirectEmissionsEntity.java new file mode 100644 index 0000000..0ff18ae --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonIndirectEmissionsEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonPowerProgressAllocationEntity.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonPowerProgressAllocationEntity.java new file mode 100644 index 0000000..904308f --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/entity/CbamCarbonPowerProgressAllocationEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonIndirectEmissionsMapper.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonIndirectEmissionsMapper.java new file mode 100644 index 0000000..327f807 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonIndirectEmissionsMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonPowerProgressAllocationMapper.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonPowerProgressAllocationMapper.java new file mode 100644 index 0000000..7cefcdc --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/mapper/CbamCarbonPowerProgressAllocationMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonIndirectEmissionsService.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonIndirectEmissionsService.java new file mode 100644 index 0000000..9b965d8 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonIndirectEmissionsService.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonPowerProgressAllocationService.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonPowerProgressAllocationService.java new file mode 100644 index 0000000..a4a6ec8 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/CbamCarbonPowerProgressAllocationService.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonIndirectEmissionsServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonIndirectEmissionsServiceImpl.java new file mode 100644 index 0000000..16430d9 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonIndirectEmissionsServiceImpl.java @@ -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 implements CbamCarbonIndirectEmissionsService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonPowerProgressAllocationServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonPowerProgressAllocationServiceImpl.java new file mode 100644 index 0000000..6a47c58 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/indirectCarbon/service/Impl/CbamCarbonPowerProgressAllocationServiceImpl.java @@ -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 implements CbamCarbonPowerProgressAllocationService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductAllocationController.java b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductAllocationController.java new file mode 100644 index 0000000..c4cba64 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductAllocationController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params) { + PageData page = cbamProductAllocationService.getPageData(params, CbamProductAllocationDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary = "信息") + public Result get(@PathVariable("id") Long id) { + CbamProductAllocationDTO data = cbamProductAllocationService.getByIdAs(id, CbamProductAllocationDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary = "保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProductAllocationDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProductAllocationService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary = "修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProductAllocationDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProductAllocationService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary = "删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductElectricityController.java b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductElectricityController.java new file mode 100644 index 0000000..323fdc9 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductElectricityController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamProductElectricityService.getPageData(params, CbamProductElectricityDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamProductElectricityDTO data = cbamProductElectricityService.getByIdAs(id, CbamProductElectricityDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProductElectricityDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProductElectricityService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProductElectricityDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProductElectricityService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamProductElectricityService.listAs(params, CbamProductElectricityDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "输出的电力", list, CbamProductElectricityExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductExhaustEmissionsController.java b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductExhaustEmissionsController.java new file mode 100644 index 0000000..b837d64 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductExhaustEmissionsController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamProductExhaustEmissionsService.getPageData(params, CbamProductExhaustEmissionsDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamProductExhaustEmissionsDTO data = cbamProductExhaustEmissionsService.getByIdAs(id, CbamProductExhaustEmissionsDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProductExhaustEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProductExhaustEmissionsService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProductExhaustEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProductExhaustEmissionsService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamProductExhaustEmissionsService.listAs(params, CbamProductExhaustEmissionsDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "废气排放量", list, CbamProductExhaustEmissionsExcel.class); + *} + */ + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductHeatEmissionsController.java b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductHeatEmissionsController.java new file mode 100644 index 0000000..0ddc822 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/controller/CbamProductHeatEmissionsController.java @@ -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> page(@Parameter(hidden = true) @RequestParam Map params){ + PageData page = cbamProductHeatEmissionsService.getPageData(params, CbamProductHeatEmissionsDTO.class); + return new Result>().ok(page); + } + + @GetMapping("{id}") + @Operation(summary="信息") + public Result get(@PathVariable("id") Long id){ + CbamProductHeatEmissionsDTO data = cbamProductHeatEmissionsService.getByIdAs(id, CbamProductHeatEmissionsDTO.class); + return new Result().ok(data); + } + + @PostMapping + @Operation(summary="保存") + @LogOperation("保存") + public Result save(@RequestBody CbamProductHeatEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + cbamProductHeatEmissionsService.saveDto(dto); + return new Result<>(); + } + + @PutMapping + @Operation(summary="修改") + @LogOperation("修改") + public Result update(@RequestBody CbamProductHeatEmissionsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + cbamProductHeatEmissionsService.updateDto(dto); + return new Result<>(); + } + + @DeleteMapping + @Operation(summary="删除") + @LogOperation("删除") + public Result 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 params, HttpServletResponse response) throws Exception { + * List list = cbamCarbonBurnService.listAs(params, CbamCarbonBurnDTO.class); + * //ExcelUtils.exportExcelToTarget(response, null, "直接排放量", list, CbamCarbonBurnExcel.class); + *} + */ +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductAllocationDTO.java b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductAllocationDTO.java new file mode 100644 index 0000000..aa64fde --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductAllocationDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductElectricityDTO.java b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductElectricityDTO.java new file mode 100644 index 0000000..04fd984 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductElectricityDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductExhaustEmissionsDTO.java b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductExhaustEmissionsDTO.java new file mode 100644 index 0000000..937e1de --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductExhaustEmissionsDTO.java @@ -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; + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductHeatEmissionsDTO.java b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductHeatEmissionsDTO.java new file mode 100644 index 0000000..1609d53 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/dto/CbamProductHeatEmissionsDTO.java @@ -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; +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductAllocationEntity.java b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductAllocationEntity.java new file mode 100644 index 0000000..be8ae3f --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductAllocationEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductElectricityEntity.java b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductElectricityEntity.java new file mode 100644 index 0000000..58fe78d --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductElectricityEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductExhaustEmissionsEntity.java b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductExhaustEmissionsEntity.java new file mode 100644 index 0000000..340dbaf --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductExhaustEmissionsEntity.java @@ -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; +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductHeatEmissionsEntity.java b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductHeatEmissionsEntity.java new file mode 100644 index 0000000..c852935 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/entity/CbamProductHeatEmissionsEntity.java @@ -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; +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductAllocationMapper.java b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductAllocationMapper.java new file mode 100644 index 0000000..4d515f0 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductAllocationMapper.java @@ -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 { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductElectricityMapper.java b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductElectricityMapper.java new file mode 100644 index 0000000..1fadc78 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductElectricityMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductExhaustEmissionsMapper.java b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductExhaustEmissionsMapper.java new file mode 100644 index 0000000..076496c --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductExhaustEmissionsMapper.java @@ -0,0 +1,9 @@ +package com.thing.cbam.production.mapper; + +import com.thing.cbam.production.entity.CbamProductExhaustEmissionsEntity; +import com.thing.common.orm.mapper.PowerBaseMapper; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CbamProductExhaustEmissionsMapper extends PowerBaseMapper { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductHeatEmissionsMapper.java b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductHeatEmissionsMapper.java new file mode 100644 index 0000000..3d816ff --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/mapper/CbamProductHeatEmissionsMapper.java @@ -0,0 +1,9 @@ +package com.thing.cbam.production.mapper; + +import com.thing.cbam.production.entity.CbamProductHeatEmissionsEntity; +import com.thing.common.orm.mapper.PowerBaseMapper; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CbamProductHeatEmissionsMapper extends PowerBaseMapper { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductAllocationService.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductAllocationService.java new file mode 100644 index 0000000..ebd1615 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductAllocationService.java @@ -0,0 +1,7 @@ +package com.thing.cbam.production.service; + +import com.thing.cbam.production.entity.CbamProductAllocationEntity; +import com.thing.common.orm.service.IBaseService; + +public interface CbamProductAllocationService extends IBaseService { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductElectricityService.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductElectricityService.java new file mode 100644 index 0000000..f208467 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductElectricityService.java @@ -0,0 +1,7 @@ +package com.thing.cbam.production.service; + +import com.thing.cbam.production.entity.CbamProductElectricityEntity; +import com.thing.common.orm.service.IBaseService; + +public interface CbamProductElectricityService extends IBaseService { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductExhaustEmissionsService.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductExhaustEmissionsService.java new file mode 100644 index 0000000..705d348 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductExhaustEmissionsService.java @@ -0,0 +1,7 @@ +package com.thing.cbam.production.service; + +import com.thing.cbam.production.entity.CbamProductExhaustEmissionsEntity; +import com.thing.common.orm.service.IBaseService; + +public interface CbamProductExhaustEmissionsService extends IBaseService { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductHeatEmissionsService.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductHeatEmissionsService.java new file mode 100644 index 0000000..9e105fa --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/CbamProductHeatEmissionsService.java @@ -0,0 +1,7 @@ +package com.thing.cbam.production.service; + +import com.thing.cbam.production.entity.CbamProductHeatEmissionsEntity; +import com.thing.common.orm.service.IBaseService; + +public interface CbamProductHeatEmissionsService extends IBaseService { +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductAllocationServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductAllocationServiceImpl.java new file mode 100644 index 0000000..bb89bff --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductAllocationServiceImpl.java @@ -0,0 +1,23 @@ +package com.thing.cbam.production.service.Impl; + +import com.mybatisflex.core.query.QueryWrapper; +import com.thing.cbam.production.entity.CbamProductAllocationEntity; +import com.thing.cbam.production.mapper.CbamProductAllocationMapper; +import com.thing.cbam.production.service.CbamProductAllocationService; +import com.thing.common.orm.service.impl.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class CbamProductAllocationServiceImpl extends BaseServiceImpl + implements CbamProductAllocationService { + + @Override + public QueryWrapper getWrapper(Map params){ + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } + + +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductElectricityServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductElectricityServiceImpl.java new file mode 100644 index 0000000..1e21be7 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductElectricityServiceImpl.java @@ -0,0 +1,19 @@ +package com.thing.cbam.production.service.Impl; + +import com.mybatisflex.core.query.QueryWrapper; +import com.thing.cbam.production.entity.CbamProductElectricityEntity; +import com.thing.cbam.production.mapper.CbamProductElectricityMapper; +import com.thing.cbam.production.service.CbamProductElectricityService; +import com.thing.common.orm.service.impl.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class CbamProductElectricityServiceImpl extends BaseServiceImpl implements CbamProductElectricityService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductExhaustEmissionsServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductExhaustEmissionsServiceImpl.java new file mode 100644 index 0000000..e19e8a5 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductExhaustEmissionsServiceImpl.java @@ -0,0 +1,20 @@ +package com.thing.cbam.production.service.Impl; + +import com.mybatisflex.core.query.QueryWrapper; +import com.thing.cbam.production.entity.CbamProductExhaustEmissionsEntity; +import com.thing.cbam.production.mapper.CbamProductExhaustEmissionsMapper; +import com.thing.cbam.production.service.CbamProductExhaustEmissionsService; +import com.thing.common.orm.service.impl.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class CbamProductExhaustEmissionsServiceImpl extends BaseServiceImpl +implements CbamProductExhaustEmissionsService { + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} diff --git a/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductHeatEmissionsServiceImpl.java b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductHeatEmissionsServiceImpl.java new file mode 100644 index 0000000..a8497b4 --- /dev/null +++ b/modules/cbam/src/main/java/com/thing/cbam/production/service/Impl/CbamProductHeatEmissionsServiceImpl.java @@ -0,0 +1,27 @@ +package com.thing.cbam.production.service.Impl; + +import com.mybatisflex.core.query.QueryWrapper; +import com.thing.cbam.production.entity.CbamProductHeatEmissionsEntity; +import com.thing.cbam.production.mapper.CbamProductHeatEmissionsMapper; +import com.thing.cbam.production.service.CbamProductHeatEmissionsService; +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 CbamProductHeatEmissionsServiceImpl extends BaseServiceImpl implements CbamProductHeatEmissionsService{ + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper(); + return wrapper; + } +} \ No newline at end of file diff --git a/modules/pom.xml b/modules/pom.xml index eb93403..8febd16 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -29,6 +29,7 @@ carbon-public cqc-service visual-design + cbam modules diff --git a/pom.xml b/pom.xml index 991ca6a..f02b49e 100644 --- a/pom.xml +++ b/pom.xml @@ -626,6 +626,12 @@ visual-design ${project.version} + + + com.thing.modules + cbam + ${project.version} + com.thing.tools @@ -748,14 +754,7 @@ - - public - ali - https://maven.aliyun.com/repository/central - - true - - +