diff --git a/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiReportTargetConfigController.java b/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiReportTargetConfigController.java new file mode 100644 index 0000000..29a338a --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiReportTargetConfigController.java @@ -0,0 +1,131 @@ +package com.lzbi.bi.controller; +import com.lzbi.bi.domain.DcBusiReportTargetConfig; +import com.lzbi.bi.service.DcBusiReportTargetConfigService; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.lzbi.common.annotation.Log; +import com.lzbi.common.core.controller.BaseController; +import com.lzbi.common.core.domain.AjaxResult; +import com.lzbi.common.enums.BusinessType; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 图指标配置Controller + * + * @author win + * @date 2024-01-29 + */ +@RestController +@RequestMapping("/lzbi/config") +public class DcBusiReportTargetConfigController extends BaseController +{ + @Autowired + private DcBusiReportTargetConfigService dcBusiReportTargetConfigService; + + /** + * 查询图指标配置列表 + */ + @ApiOperation("查询图指标配置列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiReportTargetConfig", value = "", dataType = "DcBusiReportTargetConfig", dataTypeClass = DcBusiReportTargetConfig.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiReportTargetConfig DcBusiReportTargetConfig) + { + startPage(); + List< DcBusiReportTargetConfig> list = dcBusiReportTargetConfigService.selectDcBusiReportTargetConfigList(DcBusiReportTargetConfig); + return getDataTable(list); + } + + /** + * 导出图指标配置列表 + */ + @ApiOperation("导出图指标配置列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiReportTargetConfig", value = "", dataType = "DcBusiReportTargetConfig", dataTypeClass = DcBusiReportTargetConfig.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:export')") + @Log(title = "图指标配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response,DcBusiReportTargetConfig DcBusiReportTargetConfig) + { + List list = dcBusiReportTargetConfigService.selectDcBusiReportTargetConfigList(DcBusiReportTargetConfig); + ExcelUtil util = new ExcelUtil(DcBusiReportTargetConfig.class); + util.exportExcel(response, list, "图指标配置数据"); + } + + /** + * 获取图指标配置详细信息 + */ + @ApiOperation("获取图指标配置详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiReportTargetConfigService.selectDcBusiReportTargetConfigById(id)); + } + + /** + * 新增图指标配置 + */ + @ApiOperation("新增图指标配置") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiReportTargetConfig", value = "", dataType = "DcBusiReportTargetConfig", dataTypeClass = DcBusiReportTargetConfig.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:add')") + @Log(title = "图指标配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiReportTargetConfig DcBusiReportTargetConfig) + { + return toAjax(dcBusiReportTargetConfigService.insertDcBusiReportTargetConfig(DcBusiReportTargetConfig)); + } + + /** + * 修改图指标配置 + */ + + @ApiOperation("修改图指标配置") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiReportTargetConfig", value = "", dataType = "DcBusiReportTargetConfig", dataTypeClass = DcBusiReportTargetConfig.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:edit')") + @Log(title = "图指标配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiReportTargetConfig DcBusiReportTargetConfig) + { + return toAjax(dcBusiReportTargetConfigService.updateDcBusiReportTargetConfig(DcBusiReportTargetConfig)); + } + + /** + * 删除图指标配置 + */ + @ApiOperation("删除图指标配置") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), + }) + @PreAuthorize("@ss.hasPermi('lzbi:config:remove')") + @Log(title = "图指标配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiReportTargetConfigService.deleteDcBusiReportTargetConfigByIds(ids)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java b/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java index e198df0..c8f8d01 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java +++ b/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java @@ -13,40 +13,42 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @AllArgsConstructor public class DcBusiDataScreenVo{ -private String companyName; -private String coallost; -private String countDate; -private String targetUnit; -private Double monthAll; -private Double valD1; -private Double valD2; -private Double valD3; -private Double valD4; -private Double valD5; -private Double valD6; -private Double valD7; -private Double valD8; -private Double valD9; -private Double valD10; -private Double valD11; -private Double valD12; -private Double valD13; -private Double valD14; -private Double valD15; -private Double valD16; -private Double valD17; -private Double valD18; -private Double valD19; -private Double valD20; -private Double valD21; -private Double valD22; -private Double valD23; -private Double valD24; -private Double valD25; -private Double valD26; -private Double valD27; -private Double valD28; -private Double valD29; -private Double valD30; -private Double valD31; + private String companyName; + private String targetModelCode; + private String coallost; + private String countDate; + private String targetUnit; + private Double monthAll; + private Double dayAll; + private Double valD1; + private Double valD2; + private Double valD3; + private Double valD4; + private Double valD5; + private Double valD6; + private Double valD7; + private Double valD8; + private Double valD9; + private Double valD10; + private Double valD11; + private Double valD12; + private Double valD13; + private Double valD14; + private Double valD15; + private Double valD16; + private Double valD17; + private Double valD18; + private Double valD19; + private Double valD20; + private Double valD21; + private Double valD22; + private Double valD23; + private Double valD24; + private Double valD25; + private Double valD26; + private Double valD27; + private Double valD28; + private Double valD29; + private Double valD30; + private Double valD31; } diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiReportTargetConfig.java b/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiReportTargetConfig.java new file mode 100644 index 0000000..57d746f --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiReportTargetConfig.java @@ -0,0 +1,56 @@ +package com.lzbi.bi.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import lombok.Data; +import io.swagger.annotations.ApiModelProperty; +import lombok.experimental.Accessors; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 图指标配置对象 dc_busi_report_target_config + * + * @author win + * @date 2024-01-29 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +public class DcBusiReportTargetConfig extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** ID */ + private Long id; + + /** 图表名称 */ + @Excel(name = "图表名称") + @ApiModelProperty(name = "图表名称",notes = "reportName") + private String reportName; + + /** 指标模型编码 */ + @Excel(name = "指标模型编码") + @ApiModelProperty(name = "指标模型编码",notes = "targetModelCode") + private String targetModelCode; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiReportTargetConfigMapper.java b/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiReportTargetConfigMapper.java new file mode 100644 index 0000000..897a7ae --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiReportTargetConfigMapper.java @@ -0,0 +1,63 @@ +package com.lzbi.bi.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.bi.domain.DcBusiReportTargetConfig; + +/** + * 图指标配置Mapper接口 + * + * @author win + * @date 2024-01-29 + */ + +public interface DcBusiReportTargetConfigMapper extends BaseMapper +{ + /** + * 查询图指标配置 + * + * @param id 图指标配置主键 + * @return 图指标配置 + */ + public DcBusiReportTargetConfig selectDcBusiReportTargetConfigById(Long id); + + /** + * 查询图指标配置列表 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 图指标配置集合 + */ + public List selectDcBusiReportTargetConfigList(DcBusiReportTargetConfig dcBusiReportTargetConfig); + + /** + * 新增图指标配置 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 结果 + */ + public int insertDcBusiReportTargetConfig(DcBusiReportTargetConfig dcBusiReportTargetConfig); + + /** + * 修改图指标配置 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 结果 + */ + public int updateDcBusiReportTargetConfig(DcBusiReportTargetConfig dcBusiReportTargetConfig); + + /** + * 删除图指标配置 + * + * @param id 图指标配置主键 + * @return 结果 + */ + public int deleteDcBusiReportTargetConfigById(Long id); + + /** + * 批量删除图指标配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiReportTargetConfigByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiReportTargetConfigService.java b/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiReportTargetConfigService.java new file mode 100644 index 0000000..cc9f6ab --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiReportTargetConfigService.java @@ -0,0 +1,92 @@ +package com.lzbi.bi.service; + +import java.util.List; + +import com.lzbi.bi.domain.DcBusiReportTargetConfig; +import com.lzbi.bi.mapper.DcBusiReportTargetConfigMapper; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 图指标配置Service业务层处理 + * + * @author win + * @date 2024-01-29 + */ +@Service +public class DcBusiReportTargetConfigService extends ServiceImpl implements IService +{ + + /** + * 查询图指标配置 + * + * @param id 图指标配置主键 + * @return 图指标配置 + */ + public DcBusiReportTargetConfig selectDcBusiReportTargetConfigById(Long id) + { + return baseMapper.selectDcBusiReportTargetConfigById(id); + } + + /** + * 查询图指标配置列表 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 图指标配置 + */ + public List selectDcBusiReportTargetConfigList(DcBusiReportTargetConfig dcBusiReportTargetConfig) + { + return baseMapper.selectDcBusiReportTargetConfigList(dcBusiReportTargetConfig); + } + + /** + * 新增图指标配置 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 结果 + */ + + public int insertDcBusiReportTargetConfig(DcBusiReportTargetConfig dcBusiReportTargetConfig) + { + dcBusiReportTargetConfig.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiReportTargetConfig(dcBusiReportTargetConfig); + } + + /** + * 修改图指标配置 + * + * @param dcBusiReportTargetConfig 图指标配置 + * @return 结果 + */ + + public int updateDcBusiReportTargetConfig(DcBusiReportTargetConfig dcBusiReportTargetConfig) + { + dcBusiReportTargetConfig.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiReportTargetConfig(dcBusiReportTargetConfig); + } + + /** + * 批量删除图指标配置 + * + * @param ids 需要删除的图指标配置主键 + * @return 结果 + */ + + public int deleteDcBusiReportTargetConfigByIds(Long[] ids) + { + return baseMapper.deleteDcBusiReportTargetConfigByIds(ids); + } + + /** + * 删除图指标配置信息 + * + * @param id 图指标配置主键 + * @return 结果 + */ + + public int deleteDcBusiReportTargetConfigById(Long id) + { + return baseMapper.deleteDcBusiReportTargetConfigById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewReqVo.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewReqVo.java new file mode 100644 index 0000000..d5f0d91 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewReqVo.java @@ -0,0 +1,30 @@ +package com.lzbi.draft.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TargetDraftDaynewReqVo { + + private List reportNames; + + private String dateYear; + + private String dateMonth; + + private String dateDay; + + private Long orgId; + + private String assetLevel; + + private String assetType; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewResVo.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewResVo.java new file mode 100644 index 0000000..63941f7 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/TargetDraftDaynewResVo.java @@ -0,0 +1,29 @@ +package com.lzbi.draft.domain.vo; + +import com.lzbi.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TargetDraftDaynewResVo { + + @ApiModelProperty(name = "组织名称",notes = "organizeName") + private String organizeName; + + @ApiModelProperty(name = "图表名称",notes = "reportName") + private String reportName; + + @ApiModelProperty(name = "指标结果值",notes = "valueResult") + private BigDecimal valueResult; + + @Excel(name = "单位") + private String targetUnit; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDaynewMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDaynewMapper.java index c2b8b20..e581950 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDaynewMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDaynewMapper.java @@ -1,13 +1,16 @@ package com.lzbi.draft.mapper; -import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.lzbi.bill.domain.DcBusiTargetInputMaster; import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; +import com.lzbi.draft.domain.vo.TargetDraftDaynewReqVo; +import com.lzbi.draft.domain.vo.TargetDraftDaynewResVo; import com.lzbi.wechat.domain.dto.TargetModelValueDTO; import com.lzbi.wechat.domain.vo.TargetResultVO; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 指标数据底稿日-新结构Mapper接口 * @@ -84,4 +87,6 @@ public interface DcBusiTargetDraftDaynewMapper extends BaseMapper selectTargetDraftDaynewList(TargetDraftDaynewReqVo vo); } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDaynewService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDaynewService.java index bdcd2ca..0855a04 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDaynewService.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDaynewService.java @@ -2,6 +2,8 @@ package com.lzbi.draft.service; import java.util.List; import com.lzbi.common.utils.DateUtils; +import com.lzbi.draft.domain.vo.TargetDraftDaynewReqVo; +import com.lzbi.draft.domain.vo.TargetDraftDaynewResVo; import org.springframework.stereotype.Service; import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; import com.lzbi.draft.mapper.DcBusiTargetDraftDaynewMapper; @@ -88,4 +90,8 @@ public class DcBusiTargetDraftDaynewService extends ServiceImpl selectTargetDraftDaynewList(TargetDraftDaynewReqVo vo){ + return baseMapper.selectTargetDraftDaynewList(vo); + } } diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiReportTargetConfigMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiReportTargetConfigMapper.xml new file mode 100644 index 0000000..a0a3758 --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiReportTargetConfigMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, report_name, target_model_code from dc_busi_report_target_config + + + + + + + + insert into dc_busi_report_target_config + + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + report_name, + target_model_code, + + + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{reportName}, + #{targetModelCode}, + + + + + update dc_busi_report_target_config + + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + report_name = #{reportName}, + target_model_code = #{targetModelCode}, + + where id = #{id} + + + + delete from dc_busi_report_target_config where id = #{id} + + + + delete from dc_busi_report_target_config where id in + + #{id} + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml index 315e500..bac5199 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml @@ -274,4 +274,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + \ No newline at end of file