update
This commit is contained in:
@@ -15,7 +15,6 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.modules.database.dto.NasaDataRecordPage;
|
import org.jeecg.modules.database.dto.NasaDataRecordPage;
|
||||||
import org.jeecg.modules.database.entity.HistoricalDatabase;
|
import org.jeecg.modules.database.entity.HistoricalDatabase;
|
||||||
import org.jeecg.modules.database.entity.NasaDataRecord;
|
|
||||||
import org.jeecg.modules.database.service.*;
|
import org.jeecg.modules.database.service.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -166,7 +165,7 @@ public class HistoricalDatabaseController extends JeecgController<HistoricalData
|
|||||||
|
|
||||||
@Operation(summary = "历史数据统计")
|
@Operation(summary = "历史数据统计")
|
||||||
@GetMapping(value = "/statistics")
|
@GetMapping(value = "/statistics")
|
||||||
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
|
public Result<NasaDataRecordPage> statistics() {
|
||||||
NasaDataRecordPage result = new NasaDataRecordPage();
|
NasaDataRecordPage result = new NasaDataRecordPage();
|
||||||
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
||||||
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.modules.database.dto.NasaDataRecordPage;
|
import org.jeecg.modules.database.dto.NasaDataRecordPage;
|
||||||
import org.jeecg.modules.database.entity.LocalDatabase;
|
import org.jeecg.modules.database.entity.LocalDatabase;
|
||||||
import org.jeecg.modules.database.entity.NasaDataRecord;
|
|
||||||
import org.jeecg.modules.database.service.*;
|
import org.jeecg.modules.database.service.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -166,7 +165,7 @@ public class LocalDatabaseController extends JeecgController<LocalDatabase, ILoc
|
|||||||
|
|
||||||
@Operation(summary = "当期数据统计")
|
@Operation(summary = "当期数据统计")
|
||||||
@GetMapping(value = "/statistics")
|
@GetMapping(value = "/statistics")
|
||||||
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
|
public Result<NasaDataRecordPage> statistics() {
|
||||||
NasaDataRecordPage result = new NasaDataRecordPage();
|
NasaDataRecordPage result = new NasaDataRecordPage();
|
||||||
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
||||||
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
||||||
|
|||||||
@@ -1,162 +0,0 @@
|
|||||||
package org.jeecg.modules.database.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
|
||||||
import org.jeecg.modules.database.entity.MigrationDataRecord;
|
|
||||||
import org.jeecg.modules.database.service.IMigrationDataRecordService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 迁移数据管理
|
|
||||||
* @Author: jeecg-boot
|
|
||||||
* @Date: 2024-11-04
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
@Tag(name = "迁移数据管理")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/database/migrationDataRecord")
|
|
||||||
@Slf4j
|
|
||||||
public class MigrationDataRecordController extends JeecgController<MigrationDataRecord, IMigrationDataRecordService> {
|
|
||||||
@Autowired
|
|
||||||
private IMigrationDataRecordService migrationDataRecordService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param migrationDataRecord
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//@AutoLog(value = "迁移数据管理-分页列表查询")
|
|
||||||
@Operation(summary = "迁移数据管理-分页列表查询")
|
|
||||||
@GetMapping(value = "/list")
|
|
||||||
public Result<IPage<MigrationDataRecord>> queryPageList(MigrationDataRecord migrationDataRecord,
|
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<MigrationDataRecord> queryWrapper = QueryGenerator.initQueryWrapper(migrationDataRecord, req.getParameterMap());
|
|
||||||
Page<MigrationDataRecord> page = new Page<MigrationDataRecord>(pageNo, pageSize);
|
|
||||||
IPage<MigrationDataRecord> pageList = migrationDataRecordService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param migrationDataRecord
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "迁移数据管理-添加")
|
|
||||||
@Operation(summary = "迁移数据管理-添加")
|
|
||||||
@RequiresPermissions("database:migration_data_record:add")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<String> add(@RequestBody MigrationDataRecord migrationDataRecord) {
|
|
||||||
migrationDataRecordService.save(migrationDataRecord);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param migrationDataRecord
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "迁移数据管理-编辑")
|
|
||||||
@Operation(summary = "迁移数据管理-编辑")
|
|
||||||
@RequiresPermissions("database:migration_data_record:edit")
|
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
|
||||||
public Result<String> edit(@RequestBody MigrationDataRecord migrationDataRecord) {
|
|
||||||
migrationDataRecordService.updateById(migrationDataRecord);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "迁移数据管理-通过id删除")
|
|
||||||
@Operation(summary = "迁移数据管理-通过id删除")
|
|
||||||
@RequiresPermissions("database:migration_data_record:delete")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
|
||||||
migrationDataRecordService.removeById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "迁移数据管理-批量删除")
|
|
||||||
@Operation(summary = "迁移数据管理-批量删除")
|
|
||||||
@RequiresPermissions("database:migration_data_record:delete")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
||||||
this.migrationDataRecordService.removeByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//@AutoLog(value = "迁移数据管理-通过id查询")
|
|
||||||
@Operation(summary = "迁移数据管理-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<MigrationDataRecord> queryById(@RequestParam(name = "id", required = true) String id) {
|
|
||||||
MigrationDataRecord migrationDataRecord = migrationDataRecordService.getById(id);
|
|
||||||
if (migrationDataRecord == null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(migrationDataRecord);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出excel
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param migrationDataRecord
|
|
||||||
*/
|
|
||||||
|
|
||||||
@RequestMapping(value = "/exportXls")
|
|
||||||
public ModelAndView exportXls(HttpServletRequest request, MigrationDataRecord migrationDataRecord) {
|
|
||||||
return super.exportXls(request, migrationDataRecord, MigrationDataRecord.class, "迁移数据管理");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过excel导入数据
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("database:migration_data_record:add")
|
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
||||||
return super.importExcel(request, response, MigrationDataRecord.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -77,7 +77,7 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
|
|||||||
|
|
||||||
@Operation(summary = "外网数据统计")
|
@Operation(summary = "外网数据统计")
|
||||||
@GetMapping(value = "/statistics")
|
@GetMapping(value = "/statistics")
|
||||||
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
|
public Result<NasaDataRecordPage> statistics() {
|
||||||
NasaDataRecordPage result = new NasaDataRecordPage();
|
NasaDataRecordPage result = new NasaDataRecordPage();
|
||||||
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
Long nasaCountLhs = nasaDataRecordService.sumLhs();
|
||||||
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
Long nasaCountXhy = nasaDataRecordService.sumXhy();
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
package org.jeecg.modules.database.entity;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 迁移数据管理
|
|
||||||
* @Author: jeecg-boot
|
|
||||||
* @Date: 2024-11-04
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("migration_data_record")
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Schema(description = "迁移数据管理")
|
|
||||||
public class MigrationDataRecord implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
@Schema(description = "主键")
|
|
||||||
private String id;
|
|
||||||
/**
|
|
||||||
* 创建人
|
|
||||||
*/
|
|
||||||
@Schema(description = "创建人")
|
|
||||||
private String createBy;
|
|
||||||
/**
|
|
||||||
* 创建日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
|
||||||
@Schema(description = "创建日期")
|
|
||||||
private Date createTime;
|
|
||||||
/**
|
|
||||||
* 更新人
|
|
||||||
*/
|
|
||||||
@Schema(description = "更新人")
|
|
||||||
private String updateBy;
|
|
||||||
/**
|
|
||||||
* 更新日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
|
||||||
@Schema(description = "更新日期")
|
|
||||||
private Date updateTime;
|
|
||||||
/**
|
|
||||||
* 所属部门
|
|
||||||
*/
|
|
||||||
@Schema(description = "所属部门")
|
|
||||||
private String sysOrgCode;
|
|
||||||
/**
|
|
||||||
* 试验类型
|
|
||||||
*/
|
|
||||||
@Excel(name = "试验类型", width = 15)
|
|
||||||
@Schema(description = "试验类型")
|
|
||||||
private String type;
|
|
||||||
/**
|
|
||||||
* 试验名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "试验名称", width = 15)
|
|
||||||
@Schema(description = "试验名称")
|
|
||||||
private String name;
|
|
||||||
/**
|
|
||||||
* 委托方
|
|
||||||
*/
|
|
||||||
@Excel(name = "委托方", width = 15)
|
|
||||||
@Schema(description = "委托方")
|
|
||||||
private String client;
|
|
||||||
/**
|
|
||||||
* 生产厂家
|
|
||||||
*/
|
|
||||||
@Excel(name = "生产厂家", width = 15)
|
|
||||||
@Schema(description = "生产厂家")
|
|
||||||
private String manufacturer;
|
|
||||||
/**
|
|
||||||
* 试验时间
|
|
||||||
*/
|
|
||||||
@Excel(name = "试验时间", width = 15)
|
|
||||||
@Schema(description = "试验时间")
|
|
||||||
private String experimentDate;
|
|
||||||
/**
|
|
||||||
* 试验人员
|
|
||||||
*/
|
|
||||||
@Excel(name = "试验人员", width = 15)
|
|
||||||
@Schema(description = "试验人员")
|
|
||||||
private String experimentUser;
|
|
||||||
/**
|
|
||||||
* 实验详情(大字段)
|
|
||||||
*/
|
|
||||||
@Excel(name = "实验详情(大字段)", width = 15)
|
|
||||||
@Schema(description = "实验详情(大字段)")
|
|
||||||
private String experimentDetail;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package org.jeecg.modules.database.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.jeecg.modules.database.entity.MigrationDataRecord;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 迁移数据管理
|
|
||||||
* @Author: jeecg-boot
|
|
||||||
* @Date: 2024-11-04
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
public interface MigrationDataRecordMapper extends BaseMapper<MigrationDataRecord> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?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="org.jeecg.modules.database.mapper.MigrationDataRecordMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package org.jeecg.modules.database.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import org.jeecg.modules.database.entity.MigrationDataRecord;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 迁移数据管理
|
|
||||||
* @Author: jeecg-boot
|
|
||||||
* @Date: 2024-11-04
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
public interface IMigrationDataRecordService extends IService<MigrationDataRecord> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package org.jeecg.modules.database.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.jeecg.modules.database.entity.MigrationDataRecord;
|
|
||||||
import org.jeecg.modules.database.mapper.MigrationDataRecordMapper;
|
|
||||||
import org.jeecg.modules.database.service.IMigrationDataRecordService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 迁移数据管理
|
|
||||||
* @Author: jeecg-boot
|
|
||||||
* @Date: 2024-11-04
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class MigrationDataRecordServiceImpl extends ServiceImpl<MigrationDataRecordMapper, MigrationDataRecord>
|
|
||||||
implements IMigrationDataRecordService {
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user