1. 指标子集映射
This commit is contained in:
parent
92fb41f419
commit
d2d59f8ea2
|
|
@ -0,0 +1,18 @@
|
|||
package com.hshh.indicator.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 保存底部指标和csv列的映射关系 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/indicator/indicatorBottomCsvMapper")
|
||||
public class IndicatorBottomCsvMapperController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hshh.indicator.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 记录顶级指标和csv的对应关系 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/indicator/indicatorCsv")
|
||||
public class IndicatorCsvController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.hshh.indicator.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 保存底部指标和csv列的映射关系
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@TableName("m_data_indicator_bottom_csv_mapper")
|
||||
|
||||
public class IndicatorBottomCsvMapper implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
|
||||
private Integer indicatorTopId;
|
||||
|
||||
|
||||
private Integer indicatorId;
|
||||
|
||||
|
||||
private Integer csvColumnId;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getIndicatorTopId() {
|
||||
return indicatorTopId;
|
||||
}
|
||||
|
||||
public void setIndicatorTopId(Integer indicatorTopId) {
|
||||
this.indicatorTopId = indicatorTopId;
|
||||
}
|
||||
|
||||
public Integer getIndicatorId() {
|
||||
return indicatorId;
|
||||
}
|
||||
|
||||
public void setIndicatorId(Integer indicatorId) {
|
||||
this.indicatorId = indicatorId;
|
||||
}
|
||||
|
||||
public Integer getCsvColumnId() {
|
||||
return csvColumnId;
|
||||
}
|
||||
|
||||
public void setCsvColumnId(Integer csvColumnId) {
|
||||
this.csvColumnId = csvColumnId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IndicatorBottomCsvMapper{" +
|
||||
"id = " + id +
|
||||
", indicatorTopId = " + indicatorTopId +
|
||||
", indicatorId = " + indicatorId +
|
||||
", csvColumnId = " + csvColumnId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.hshh.indicator.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 最底部指标.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
@TableName("m_data_indicator_bottom_form_mapper")
|
||||
@Data
|
||||
public class IndicatorBottomFormMapper implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
|
||||
private Integer indicatorId;
|
||||
|
||||
|
||||
private Integer formFieldId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer indicatorTopId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.hshh.indicator.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 记录顶级指标和csv的对应关系
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@TableName("m_data_indicator_csv")
|
||||
|
||||
public class IndicatorCsv implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String csvName;
|
||||
|
||||
private byte[] csvData;
|
||||
|
||||
|
||||
private Integer indicatorTopId;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCsvName() {
|
||||
return csvName;
|
||||
}
|
||||
|
||||
public void setCsvName(String csvName) {
|
||||
this.csvName = csvName;
|
||||
}
|
||||
|
||||
public byte[] getCsvData() {
|
||||
return csvData;
|
||||
}
|
||||
|
||||
public void setCsvData(byte[] csvData) {
|
||||
this.csvData = csvData;
|
||||
}
|
||||
|
||||
public Integer getIndicatorTopId() {
|
||||
return indicatorTopId;
|
||||
}
|
||||
|
||||
public void setIndicatorTopId(Integer indicatorTopId) {
|
||||
this.indicatorTopId = indicatorTopId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IndicatorCsv{" +
|
||||
"id = " + id +
|
||||
", csvName = " + csvName +
|
||||
", csvData = " + csvData +
|
||||
", indicatorTopId = " + indicatorTopId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.hshh.indicator.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* 指标对应的csv模板中的列,只保留最近一次的记录.
|
||||
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Data
|
||||
@TableName("m_data_indicator_csv_column")
|
||||
|
||||
public class IndicatorCsvColumn implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
|
||||
private Integer indicatorCsvId;
|
||||
|
||||
|
||||
private String csvColumnName;
|
||||
|
||||
|
||||
private Integer csvColumnNum;
|
||||
private Integer indicatorTopId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.hshh.indicator.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 最顶部指标 .
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
@TableName("m_data_indicator_form")
|
||||
@Data
|
||||
public class IndicatorFormMapper implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer indicatorTopId;
|
||||
|
||||
private Integer indicatorModelId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hshh.indicator.mapper;
|
||||
|
||||
import com.hshh.indicator.entity.IndicatorBottomCsvMapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 保存底部指标和csv列的映射关系 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorBottomCsvMapperMapper extends BaseMapper<IndicatorBottomCsvMapper> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hshh.indicator.mapper;
|
||||
|
||||
import com.hshh.indicator.entity.IndicatorBottomFormMapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
public interface IndicatorBottomMapperMapper extends BaseMapper<IndicatorBottomFormMapper> {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hshh.indicator.mapper;
|
||||
|
||||
import com.hshh.indicator.entity.IndicatorCsvColumn;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 指标对应的csv模板中的列,只保留最近一次的记录 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorCsvColumnMapper extends BaseMapper<IndicatorCsvColumn> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hshh.indicator.mapper;
|
||||
|
||||
import com.hshh.indicator.entity.IndicatorCsv;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 记录顶级指标和csv的对应关系 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorCsvMapper extends BaseMapper<IndicatorCsv> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.hshh.indicator.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hshh.indicator.entity.IndicatorFormMapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper 接口.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
public interface IndicatorFormMapperMapper extends BaseMapper<IndicatorFormMapper> {
|
||||
|
||||
/**
|
||||
* 根据指标顶级ID查询他的对应的模型和csv.
|
||||
*
|
||||
* @param id 指标ID
|
||||
* @return 对应关系列表
|
||||
*/
|
||||
List<IndicatorFormMapper> selectModelAndCsvNameByIndicator(Integer id);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hshh.indicator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hshh.indicator.entity.IndicatorBottomCsvMapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保存底部指标和csv列的映射关系 服务类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorBottomCsvMapperService extends IService<IndicatorBottomCsvMapper> {
|
||||
List<IndicatorBottomCsvMapper> queryListByIndicatorTopId(Integer indicatorTopId);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.hshh.indicator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hshh.indicator.entity.IndicatorBottomFormMapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 指标底部对应服务类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
public interface IndicatorBottomFormMapperService extends IService<IndicatorBottomFormMapper> {
|
||||
|
||||
/**
|
||||
* 根据顶部指标ID查询对应关系.
|
||||
*
|
||||
* @param topId 顶部指标ID
|
||||
* @return 对应关系list
|
||||
*/
|
||||
List<IndicatorBottomFormMapper> queryListByIndicatorId(Integer topId);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.hshh.indicator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hshh.indicator.entity.IndicatorCsvColumn;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 指标对应的csv模板中的列,只保留最近一次的记录 服务类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorCsvColumnService extends IService<IndicatorCsvColumn> {
|
||||
|
||||
/**
|
||||
* 根据指标ID获取csv文件列信息.
|
||||
*
|
||||
* @param id csv文件id
|
||||
* @return csv文件列
|
||||
*/
|
||||
List<IndicatorCsvColumn> listByIdOrderByColumn(Integer id);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.hshh.indicator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hshh.indicator.entity.IndicatorCsv;
|
||||
|
||||
/**
|
||||
* 记录顶级指标和csv的对应关系 服务类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
public interface IndicatorCsvService extends IService<IndicatorCsv> {
|
||||
|
||||
/**
|
||||
* 根据指标id查询csv对应记录.
|
||||
*
|
||||
* @param topId 顶级指标ID
|
||||
* @return 对应关系(除了csv实际数据)
|
||||
*/
|
||||
IndicatorCsv selectByIndicatorId(Integer topId);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.hshh.indicator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hshh.indicator.entity.IndicatorFormMapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
public interface IndicatorFromMapperService extends IService<IndicatorFormMapper> {
|
||||
|
||||
/**
|
||||
* 根据指标顶级ID查询他的对应的模型和csv.
|
||||
*
|
||||
* @param id 指标ID
|
||||
* @return 对应关系列表
|
||||
*/
|
||||
List<IndicatorFormMapper> selectModelAndCsvNameByIndicator(Integer id);
|
||||
|
||||
/**
|
||||
* 保存form和指标的映射关系.
|
||||
*
|
||||
* @param topId 顶级指标ID
|
||||
* @param formId form表单ID
|
||||
*/
|
||||
void saveFormMapper(Integer topId, Integer formId);
|
||||
|
||||
/**
|
||||
* 根据指标顶级ID删除对应关系.
|
||||
*
|
||||
* @param indicatorTopId 指标顶级ID
|
||||
*/
|
||||
void deleteFormMapperByIndicatorId(Integer indicatorTopId);
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.hshh.indicator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hshh.indicator.entity.IndicatorBottomCsvMapper;
|
||||
import com.hshh.indicator.mapper.IndicatorBottomCsvMapperMapper;
|
||||
import com.hshh.indicator.service.IndicatorBottomCsvMapperService;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
|
||||
* 保存底部指标和csv列的映射关系 服务实现类.
|
||||
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Service
|
||||
public class IndicatorBottomCsvMapperServiceImpl extends
|
||||
ServiceImpl<IndicatorBottomCsvMapperMapper, IndicatorBottomCsvMapper> implements
|
||||
IndicatorBottomCsvMapperService {
|
||||
|
||||
@Override
|
||||
public List<IndicatorBottomCsvMapper> queryListByIndicatorTopId(Integer indicatorTopId) {
|
||||
QueryWrapper<IndicatorBottomCsvMapper> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("indicator_top_id", indicatorTopId);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.hshh.indicator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hshh.indicator.entity.IndicatorBottomFormMapper;
|
||||
import com.hshh.indicator.mapper.IndicatorBottomMapperMapper;
|
||||
import com.hshh.indicator.service.IndicatorBottomFormMapperService;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
@Service
|
||||
public class IndicatorBottomMapperServiceImpl extends
|
||||
ServiceImpl<IndicatorBottomMapperMapper, IndicatorBottomFormMapper> implements
|
||||
IndicatorBottomFormMapperService {
|
||||
|
||||
@Override
|
||||
public List<IndicatorBottomFormMapper> queryListByIndicatorId(Integer topId) {
|
||||
QueryWrapper<IndicatorBottomFormMapper> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("indicator_top_id", topId);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.hshh.indicator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hshh.indicator.entity.IndicatorCsvColumn;
|
||||
import com.hshh.indicator.mapper.IndicatorCsvColumnMapper;
|
||||
import com.hshh.indicator.service.IndicatorCsvColumnService;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 指标对应的csv模板中的列,只保留最近一次的记录 服务实现类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Service
|
||||
public class IndicatorCsvColumnServiceImpl extends
|
||||
ServiceImpl<IndicatorCsvColumnMapper, IndicatorCsvColumn> implements
|
||||
IndicatorCsvColumnService {
|
||||
|
||||
@Override
|
||||
public List<IndicatorCsvColumn> listByIdOrderByColumn(Integer indicatorId) {
|
||||
QueryWrapper<IndicatorCsvColumn> queryWrapper = new QueryWrapper<IndicatorCsvColumn>();
|
||||
queryWrapper.eq("indicator_csv_id", indicatorId);
|
||||
queryWrapper.orderByAsc("csv_column_num");
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.hshh.indicator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hshh.indicator.entity.IndicatorCsv;
|
||||
import com.hshh.indicator.mapper.IndicatorCsvMapper;
|
||||
import com.hshh.indicator.service.IndicatorCsvService;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 记录顶级指标和csv的对应关系 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-10
|
||||
*/
|
||||
@Service
|
||||
public class IndicatorCsvServiceImpl extends
|
||||
ServiceImpl<IndicatorCsvMapper, IndicatorCsv> implements
|
||||
IndicatorCsvService {
|
||||
|
||||
@Override
|
||||
public IndicatorCsv selectByIndicatorId(Integer topId) {
|
||||
QueryWrapper<IndicatorCsv> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("id", "csv_name", "indicator_top_id").eq("indicator_top_id", topId);
|
||||
List<IndicatorCsv> list = baseMapper.selectList(queryWrapper);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
return list.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.hshh.indicator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hshh.indicator.entity.IndicatorFormMapper;
|
||||
import com.hshh.indicator.mapper.IndicatorFormMapperMapper;
|
||||
import com.hshh.indicator.service.IndicatorFromMapperService;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 服务实现类.
|
||||
*
|
||||
* @author liDongYu
|
||||
* @since 2025-08-08
|
||||
*/
|
||||
@Service
|
||||
public class IndicatorFormMapperServiceImpl extends
|
||||
ServiceImpl<IndicatorFormMapperMapper, IndicatorFormMapper> implements
|
||||
IndicatorFromMapperService {
|
||||
|
||||
@Override
|
||||
public List<IndicatorFormMapper> selectModelAndCsvNameByIndicator(Integer id) {
|
||||
return this.baseMapper.selectModelAndCsvNameByIndicator(id);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void saveFormMapper(Integer topId, Integer formId) {
|
||||
deleteFormMapperByIndicatorId(formId);
|
||||
IndicatorFormMapper formMapper = new IndicatorFormMapper();
|
||||
formMapper.setIndicatorTopId(topId);
|
||||
formMapper.setIndicatorModelId(formId);
|
||||
save(formMapper);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFormMapperByIndicatorId(Integer indicatorTopId) {
|
||||
QueryWrapper<IndicatorFormMapper> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("indicator_top_id", indicatorTopId);
|
||||
this.baseMapper.delete(queryWrapper);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hshh.indicator.mapper.IndicatorBottomCsvMapperMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hshh.indicator.mapper.IndicatorBottomMapperMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hshh.indicator.mapper.IndicatorCsvColumnMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hshh.indicator.mapper.IndicatorCsvMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hshh.indicator.mapper.IndicatorFormMapperMapper">
|
||||
<select id="selectModelAndCsvNameByIndicator" resultType="com.hshh.indicator.entity.IndicatorFormMapper">
|
||||
select t.indicator_model_id, t.csv_name
|
||||
from m_data_indicator_top_mapper t where t.indicator_top_id=#{topId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user