فهرست منبع

导出模块调整

dzx 1 سال پیش
والد
کامیت
16e161deff
16فایلهای تغییر یافته به همراه454 افزوده شده و 11 حذف شده
  1. 9 1
      src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertSourceController.java
  2. 38 6
      src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertTemplateController.java
  3. 25 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertDto.java
  4. 24 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertSourceFieldListDto.java
  5. 22 0
      src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateFieldListDto.java
  6. 94 0
      src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSourceField.java
  7. 79 0
      src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertTemplateField.java
  8. 17 0
      src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertSourceFieldMapper.java
  9. 16 0
      src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateFieldMapper.java
  10. 4 0
      src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertSourceService.java
  11. 7 0
      src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertTemplateService.java
  12. 24 4
      src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertSourceServiceImpl.java
  13. 16 0
      src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertTemplateServiceImpl.java
  14. 35 0
      src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertSourceFieldVo.java
  15. 35 0
      src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplateFieldVo.java
  16. 9 0
      src/main/resources/mapper/dataexpert/DataExpertSourceMapper.xml

+ 9 - 1
src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertSourceController.java

@@ -9,10 +9,12 @@ import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.dataexpert.dto.AddDataExpertSourceDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.dto.DataExpertSourcePageDto;
 import com.xjrsoft.module.dataexpert.dto.UpdateDataExpertSourceDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
 import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertSourcePageVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertSourceVo;
 import io.swagger.annotations.Api;
@@ -111,7 +113,13 @@ public class DataExpertSourceController {
     @SaCheckPermission("dataexpertsource:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(dataExpertSourceService.delete(ids));
-
     }
 
+
+    @GetMapping(value = "/field-list")
+    @ApiOperation(value="数据源字段")
+    @SaCheckPermission("dataexpertsource:field-list")
+    public RT<List<DataExpertSourceFieldVo>> fieldList(@Valid DataExpertSourceFieldListDto dto){
+        return RT.ok(dataExpertSourceService.getFieldList(dto));
+    }
 }

+ 38 - 6
src/main/java/com/xjrsoft/module/dataexpert/controller/DataExpertTemplateController.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.dataexpert.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.xjrsoft.common.model.result.RT;
@@ -9,15 +10,21 @@ import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.dataexpert.dto.AddDataExpertTemplateDto;
+import com.xjrsoft.module.dataexpert.dto.DataExpertDto;
 import com.xjrsoft.module.dataexpert.dto.DataExpertTemplatePageDto;
 import com.xjrsoft.module.dataexpert.dto.UpdateDataExpertTemplateDto;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
 import com.xjrsoft.module.dataexpert.service.IDataExpertTemplateService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertTemplatePageVo;
 import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.apache.commons.lang3.function.FailablePredicate;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -28,7 +35,9 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
 * @title: 数据导出-数据模板
@@ -42,7 +51,7 @@ import java.util.List;
 @AllArgsConstructor
 public class DataExpertTemplateController {
 
-
+    private final IDataExpertSourceService dataExpertSourceService;
     private final IDataExpertTemplateService dataExpertTemplateService;
 
     @GetMapping(value = "/page")
@@ -100,12 +109,35 @@ public class DataExpertTemplateController {
     @GetMapping(value = "/field-info")
     @ApiOperation(value="根据id查询数据导出-数据模板信息")
     @SaCheckPermission("dataexperttemplate:detail")
-    public RT<DataExpertTemplateVo> getFieldInfo(@RequestParam Long id){
-        DataExpertTemplate dataExpertTemplate = dataExpertTemplateService.getById(id);
-        if (dataExpertTemplate == null) {
-            return RT.error("找不到此数据!");
+    public RT<List<DataExpertTemplateFieldVo>> getFieldInfo(@RequestParam Long id){
+        return RT.ok(dataExpertTemplateService.getFieldList(id));
+    }
+
+
+    @GetMapping("/export")
+    @ApiOperation(value = "导出")
+    public ResponseEntity<byte[]> exportData(@Valid DataExpertDto dto) {
+        DataExpertTemplate template = dataExpertTemplateService.getById(dto.getDataExpertTemplateId());
+        DataExpertSource expertSource = dataExpertSourceService.getById(template.getDataExpertSourceId());
+
+        String fields = "";
+        Map<Integer, String> showNameMap = new HashMap<>();
+
+        List<DataExpertTemplateFieldVo> fieldList = dto.getFieldList();
+        for (int i = 0; i < fieldList.size(); i ++){
+            DataExpertTemplateFieldVo fieldVo = fieldList.get(i);
+            showNameMap.put(i, fieldVo.getShowName());
+            if(i > 0){
+                fields += ",";
+            }
+            fields += fieldVo.getFieldName();
         }
-        return RT.ok(BeanUtil.toBean(dataExpertTemplate, DataExpertTemplateVo.class));
+        for (DataExpertTemplateFieldVo dataExpertTemplateFieldVo : dto.getFieldList()) {
+
+        }
+
+
+        return RT.fileStream(null, "WeeklyDutySchedule" + ExcelTypeEnum.XLSX.getValue());
     }
 
 }

+ 25 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertDto.java

@@ -0,0 +1,25 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertDto {
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("数据字段")
+    private List<DataExpertTemplateFieldVo> fieldList;
+
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertSourceFieldListDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertSourceFieldListDto {
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 22 - 0
src/main/java/com/xjrsoft/module/dataexpert/dto/DataExpertTemplateFieldListDto.java

@@ -0,0 +1,22 @@
+package com.xjrsoft.module.dataexpert.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+* @title: 数据导出-数据源设置字段查询入参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertTemplateFieldListDto {
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 94 - 0
src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertSourceField.java

@@ -0,0 +1,94 @@
+package com.xjrsoft.module.dataexpert.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+@TableName("data_expert_source_field")
+@ApiModel(value = "data_expert_source_field", description = "数据导出-数据源-字段设置")
+public class DataExpertSourceField implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Integer sortCode;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+    /**
+    * 数据源名称
+    */
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+    /**
+    * 数据源类型
+    */
+    @ApiModelProperty("映射名称")
+    private String showName;
+    /**
+    * magicapi地址
+    */
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 79 - 0
src/main/java/com/xjrsoft/module/dataexpert/entity/DataExpertTemplateField.java

@@ -0,0 +1,79 @@
+package com.xjrsoft.module.dataexpert.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 数据导出-数据源-字段设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+@TableName("data_expert_template_field")
+@ApiModel(value = "data_expert_template_field", description = "数据导出-数据源-字段设置")
+public class DataExpertTemplateField implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+
+    @ApiModelProperty("")
+    private Integer sortCode;
+
+    @ApiModelProperty("模板名称")
+    private String name;
+
+    @ApiModelProperty("数据模板(data_expert_template)")
+    private Long dataExpertTemplateId;
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+
+}

+ 17 - 0
src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertSourceFieldMapper.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.dataexpert.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSourceField;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Mapper
+public interface DataExpertSourceFieldMapper extends MPJBaseMapper<DataExpertSourceField> {
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/dataexpert/mapper/DataExpertTemplateFieldMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.dataexpert.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.dataexpert.entity.DataExpertTemplateField;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 数据导出-数据源设置
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Mapper
+public interface DataExpertTemplateFieldMapper extends MPJBaseMapper<DataExpertTemplateField> {
+
+}

+ 4 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertSourceService.java

@@ -1,7 +1,9 @@
 package com.xjrsoft.module.dataexpert.service;
 
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 
 import java.util.List;
 
@@ -36,4 +38,6 @@ public interface IDataExpertSourceService extends MPJBaseService<DataExpertSourc
     * @return
     */
     Boolean delete(List<Long> ids);
+
+    List<DataExpertSourceFieldVo> getFieldList(DataExpertSourceFieldListDto dto);
 }

+ 7 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/IDataExpertTemplateService.java

@@ -1,7 +1,12 @@
 package com.xjrsoft.module.dataexpert.service;
 
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
+
+import java.util.List;
 
 /**
 * @title: 数据导出-数据模板
@@ -11,4 +16,6 @@ import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
 */
 
 public interface IDataExpertTemplateService extends MPJBaseService<DataExpertTemplate> {
+
+    List<DataExpertTemplateFieldVo> getFieldList(Long id);
 }

+ 24 - 4
src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertSourceServiceImpl.java

@@ -1,9 +1,17 @@
 package com.xjrsoft.module.dataexpert.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.module.dataexpert.dto.DataExpertSourceFieldListDto;
 import com.xjrsoft.module.dataexpert.entity.DataExpertSource;
+import com.xjrsoft.module.dataexpert.entity.DataExpertSourceField;
+import com.xjrsoft.module.dataexpert.mapper.DataExpertSourceFieldMapper;
 import com.xjrsoft.module.dataexpert.mapper.DataExpertSourceMapper;
 import com.xjrsoft.module.dataexpert.service.IDataExpertSourceService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertSourceFieldVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -19,27 +27,39 @@ import java.util.List;
 @Service
 @AllArgsConstructor
 public class DataExpertSourceServiceImpl extends MPJBaseServiceImpl<DataExpertSourceMapper, DataExpertSource> implements IDataExpertSourceService {
-    private final DataExpertSourceMapper dataExpertSourceDataExpertSourceMapper;
+    private final DataExpertSourceMapper expertSourceMapper;
+    private final DataExpertSourceFieldMapper fieldMapper;
 
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean add(DataExpertSource dataExpertSource) {
-        dataExpertSourceDataExpertSourceMapper.insert(dataExpertSource);
+        expertSourceMapper.insert(dataExpertSource);
         return true;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean update(DataExpertSource dataExpertSource) {
-        dataExpertSourceDataExpertSourceMapper.updateById(dataExpertSource);
+        expertSourceMapper.updateById(dataExpertSource);
         return true;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
-        dataExpertSourceDataExpertSourceMapper.deleteBatchIds(ids);
+        expertSourceMapper.deleteBatchIds(ids);
         return true;
     }
+
+    @Override
+    public List<DataExpertSourceFieldVo> getFieldList(DataExpertSourceFieldListDto dto) {
+        List<DataExpertSourceField> list = fieldMapper.selectList(
+            new QueryWrapper<DataExpertSourceField>().lambda()
+            .eq(dto.getDataExpertSourceId() != null, DataExpertSourceField::getDataExpertSourceId, dto.getDataExpertSourceId())
+            .eq(StrUtil.isNotEmpty(dto.getDataGroup()), DataExpertSourceField::getDataGroup, dto.getDataGroup())
+            .eq(DataExpertSourceField::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        return BeanUtil.copyToList(list, DataExpertSourceFieldVo.class);
+    }
 }

+ 16 - 0
src/main/java/com/xjrsoft/module/dataexpert/service/impl/DataExpertTemplateServiceImpl.java

@@ -1,12 +1,19 @@
 package com.xjrsoft.module.dataexpert.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.module.dataexpert.entity.DataExpertTemplate;
+import com.xjrsoft.module.dataexpert.entity.DataExpertTemplateField;
+import com.xjrsoft.module.dataexpert.mapper.DataExpertTemplateFieldMapper;
 import com.xjrsoft.module.dataexpert.mapper.DataExpertTemplateMapper;
 import com.xjrsoft.module.dataexpert.service.IDataExpertTemplateService;
+import com.xjrsoft.module.dataexpert.vo.DataExpertTemplateFieldVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
 * @title: 数据导出-数据模板
 * @Author dzx
@@ -16,4 +23,13 @@ import org.springframework.stereotype.Service;
 @Service
 @AllArgsConstructor
 public class DataExpertTemplateServiceImpl extends MPJBaseServiceImpl<DataExpertTemplateMapper, DataExpertTemplate> implements IDataExpertTemplateService {
+    private final DataExpertTemplateFieldMapper fieldMapper;
+    @Override
+    public List<DataExpertTemplateFieldVo> getFieldList(Long id) {
+        List<DataExpertTemplateField> list = fieldMapper.selectList(
+            new QueryWrapper<DataExpertTemplateField>().lambda()
+            .eq(DataExpertTemplateField::getDataExpertTemplateId, id)
+        );
+        return BeanUtil.copyToList(list, DataExpertTemplateFieldVo.class);
+    }
 }

+ 35 - 0
src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertSourceFieldVo.java

@@ -0,0 +1,35 @@
+package com.xjrsoft.module.dataexpert.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 数据导出-数据源设置表单出参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertSourceFieldVo {
+
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 35 - 0
src/main/java/com/xjrsoft/module/dataexpert/vo/DataExpertTemplateFieldVo.java

@@ -0,0 +1,35 @@
+package com.xjrsoft.module.dataexpert.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 数据导出-数据源设置表单出参
+* @Author dzx
+* @Date: 2024-04-19
+* @Version 1.0
+*/
+@Data
+public class DataExpertTemplateFieldVo {
+
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("数据源(data_expert_source)")
+    private Long dataExpertSourceId;
+
+
+    @ApiModelProperty("字段名称")
+    private String fieldName;
+
+    @ApiModelProperty("映射名称")
+    private String showName;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("数据分组")
+    private String dataGroup;
+
+}

+ 9 - 0
src/main/resources/mapper/dataexpert/DataExpertSourceMapper.xml

@@ -0,0 +1,9 @@
+<?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.xjrsoft.module.dataexpert.mapper.DataExpertSourceMapper">
+    <select id="getSourceTypeList"  resultType="java.lang.String">
+        SELECT DISTINCT data_group FROM data_expert_source_field WHERE delete_mark = 0
+    </select>
+</mapper>