重新命名文件

This commit is contained in:
duwenyuan 2025-12-29 09:37:30 +08:00
parent 1f6067deb5
commit 0d3bb44fe1
6 changed files with 66 additions and 64 deletions

View File

@ -8,12 +8,12 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* 加合峰信息实体类 * 衰变息实体类
* 对应表名CONFIGURATION.GARDS_SUMMATION_PEAK * 对应表名CONFIGURATION.GARDS_NUCLIDE_DECAY
*/ */
@Data @Data
@TableName("CONFIGURATION.GARDS_SUMMATION_PEAK") @TableName("CONFIGURATION.GARDS_NUCLIDE_DECAY")
public class GardsSummationPeak implements Serializable { public class GardsNuclideDecay implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -0,0 +1,9 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.modules.base.entity.configuration.GardsNuclideDecay;
@Mapper
public interface GardsNuclideDecayMapper extends BaseMapper<GardsNuclideDecay> {
}

View File

@ -1,9 +0,0 @@
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.modules.base.entity.configuration.GardsSummationPeak;
@Mapper
public interface GardsSummationPeakMapper extends BaseMapper<GardsSummationPeak> {
}

View File

@ -7,8 +7,8 @@ import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.base.entity.configuration.GardsSummationPeak; import org.jeecg.modules.base.entity.configuration.GardsNuclideDecay;
import org.jeecg.service.GardsSummationPeakService; import org.jeecg.service.GardsNuclideDecayService;
import org.jeecgframework.poi.excel.ExcelExportUtil; import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -25,19 +25,19 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@RestController @RestController
@RequestMapping("/getGardsSummationPeak") @RequestMapping("/getGardsNuclideDecay")
@Slf4j @Slf4j
public class GardsSummationPeakController { public class GardsNuclideDecayController {
@Autowired @Autowired
private GardsSummationPeakService gardsSummationPeakService; private GardsNuclideDecayService gardsNuclideDecayService;
/** /**
* 新增信息 * 新增信息
*/ */
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "新增信息") @Operation(summary = "新增信息")
public Result<?> create(@RequestBody GardsSummationPeak gardsSummationPeak) { public Result<?> create(@RequestBody GardsNuclideDecay gardsNuclideDecay) {
return gardsSummationPeakService.create(gardsSummationPeak); return gardsNuclideDecayService.create(gardsNuclideDecay);
} }
/** /**
@ -46,7 +46,7 @@ public class GardsSummationPeakController {
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除信息") @Operation(summary = "删除信息")
public Result<?> deleteById(@RequestParam Integer Id) { public Result<?> deleteById(@RequestParam Integer Id) {
return gardsSummationPeakService.deleteById(Id); return gardsNuclideDecayService.deleteById(Id);
} }
/** /**
@ -54,8 +54,8 @@ public class GardsSummationPeakController {
*/ */
@PutMapping("/update") @PutMapping("/update")
@Operation(summary = "更新信息") @Operation(summary = "更新信息")
public Result<?> update(@RequestBody GardsSummationPeak gardsSummationPeak) { public Result<?> update(@RequestBody GardsNuclideDecay gardsNuclideDecay) {
return gardsSummationPeakService.update(gardsSummationPeak); return gardsNuclideDecayService.update(gardsNuclideDecay);
} }
/** /**
@ -63,8 +63,8 @@ public class GardsSummationPeakController {
*/ */
@GetMapping("/queryById") @GetMapping("/queryById")
@Operation(summary = "查询信息") @Operation(summary = "查询信息")
public Result<GardsSummationPeak> getById(@RequestParam Integer Id) { public Result<GardsNuclideDecay> getById(@RequestParam Integer Id) {
return gardsSummationPeakService.queryById(Id); return gardsNuclideDecayService.queryById(Id);
} }
/** /**
@ -77,12 +77,12 @@ public class GardsSummationPeakController {
*/ */
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "分页查询") @Operation(summary = "分页查询")
public Result<IPage<GardsSummationPeak>> page( public Result<IPage<GardsNuclideDecay>> page(
@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize, @RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String nuclide) { @RequestParam(required = false) String nuclide) {
return gardsSummationPeakService.page(pageNum, pageSize, nuclide); return gardsNuclideDecayService.page(pageNum, pageSize, nuclide);
} }
/** /**
@ -93,10 +93,10 @@ public class GardsSummationPeakController {
*/ */
@GetMapping("/search") @GetMapping("/search")
@Operation(summary = "组合条件查询") @Operation(summary = "组合条件查询")
public Result<List<GardsSummationPeak>> search(@RequestParam(required = false) String nuclide ) { public Result<List<GardsNuclideDecay>> search(@RequestParam(required = false) String nuclide ) {
try { try {
List<GardsSummationPeak> list = gardsSummationPeakService.getByConditions(nuclide); List<GardsNuclideDecay> list = gardsNuclideDecayService.getByConditions(nuclide);
return Result.OK(list); return Result.OK(list);
} catch (Exception e) { } catch (Exception e) {
log.error("search: " + e.getMessage()); log.error("search: " + e.getMessage());
@ -114,7 +114,7 @@ public class GardsSummationPeakController {
params.setFixedTitle(true); params.setFixedTitle(true);
params.setTitleHeight((short) 8); params.setTitleHeight((short) 8);
params.setType(ExcelType.XSSF); params.setType(ExcelType.XSSF);
ExcelExportUtil.exportExcel(params, GardsSummationPeak.class, new ArrayList<>()).write(response.getOutputStream()); ExcelExportUtil.exportExcel(params, GardsNuclideDecay.class, new ArrayList<>()).write(response.getOutputStream());
} }
@AutoLog(value = "导出Excel") @AutoLog(value = "导出Excel")
@ -127,8 +127,8 @@ public class GardsSummationPeakController {
params.setFixedTitle(true); params.setFixedTitle(true);
params.setTitleHeight((short) 8); params.setTitleHeight((short) 8);
params.setType(ExcelType.XSSF); params.setType(ExcelType.XSSF);
List<GardsSummationPeak> list = gardsSummationPeakService.getByConditions(nuclide); List<GardsNuclideDecay> list = gardsNuclideDecayService.getByConditions(nuclide);
ExcelExportUtil.exportExcel(params, GardsSummationPeak.class, list).write(response.getOutputStream()); ExcelExportUtil.exportExcel(params, GardsNuclideDecay.class, list).write(response.getOutputStream());
} }
/** /**
@ -137,7 +137,7 @@ public class GardsSummationPeakController {
* @param request * @param request
* @return * @return
*/ */
@AutoLog(value = "GardsSummationPeak") @AutoLog(value = "GardsNuclideDecay")
@Operation(summary = "导入数据") @Operation(summary = "导入数据")
@PostMapping(value = "/importExcel") @PostMapping(value = "/importExcel")
public Result<?> importExcel(HttpServletRequest request) { public Result<?> importExcel(HttpServletRequest request) {
@ -158,10 +158,10 @@ public class GardsSummationPeakController {
try { try {
// 3. 使用 AutoPoi 工具类解析 Excel // 3. 使用 AutoPoi 工具类解析 Excel
List<GardsSummationPeak> list = ExcelImportUtil.importExcel(file.getInputStream(), GardsSummationPeak.class, params); List<GardsNuclideDecay> list = ExcelImportUtil.importExcel(file.getInputStream(), GardsNuclideDecay.class, params);
// 4. 批量保存数据到数据库 // 4. 批量保存数据到数据库
gardsSummationPeakService.saveBatch(list); gardsNuclideDecayService.saveBatch(list);
return Result.OK("文件导入成功!数据行数:" + list.size()); return Result.OK("文件导入成功!数据行数:" + list.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -4,17 +4,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.base.entity.configuration.GardsStations; import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.configuration.GardsSummationPeak; import org.jeecg.modules.base.entity.configuration.GardsNuclideDecay;
import java.util.List; import java.util.List;
public interface GardsSummationPeakService extends IService<GardsSummationPeak> { public interface GardsNuclideDecayService extends IService<GardsNuclideDecay> {
/** /**
* 新增信息 * 新增信息
*/ */
Result<?> create(GardsSummationPeak gardsSummationPeak); Result<?> create(GardsNuclideDecay gardsNuclideDecay);
/** /**
* 删除信息 * 删除信息
@ -24,12 +24,12 @@ public interface GardsSummationPeakService extends IService<GardsSummationPeak>
/** /**
* 更新信息 * 更新信息
*/ */
Result<?> update(GardsSummationPeak gardsSummationPeak); Result<?> update(GardsNuclideDecay gardsNuclideDecay);
/** /**
* 查询信息 * 查询信息
*/ */
Result<GardsSummationPeak> queryById(Integer Id); Result<GardsNuclideDecay> queryById(Integer Id);
/** /**
* 分页查询 * 分页查询
@ -39,7 +39,7 @@ public interface GardsSummationPeakService extends IService<GardsSummationPeak>
* @param nuclide * @param nuclide
* @return * @return
*/ */
Result<IPage<GardsSummationPeak>> page( Result<IPage<GardsNuclideDecay>> page(
Integer pageNum, Integer pageNum,
Integer pageSize, Integer pageSize,
String nuclide); String nuclide);
@ -50,7 +50,7 @@ public interface GardsSummationPeakService extends IService<GardsSummationPeak>
* @param nuclide 名称 * @param nuclide 名称
* @return List * @return List
*/ */
List<GardsSummationPeak> getByConditions(String nuclide); List<GardsNuclideDecay> getByConditions(String nuclide);
} }

View File

@ -6,29 +6,31 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.base.entity.configuration.GardsNuclideDecay;
import org.jeecg.modules.base.entity.configuration.GardsStations; import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.configuration.GardsSummationPeak; import org.jeecg.modules.base.entity.configuration.GardsNuclideDecay;
import org.jeecg.modules.base.mapper.GardsSummationPeakMapper; import org.jeecg.modules.base.mapper.GardsNuclideDecayMapper;
import org.jeecg.service.GardsSummationPeakService; import org.jeecg.modules.base.mapper.GardsNuclideDecayMapper;
import org.jeecg.service.GardsNuclideDecayService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@Service @Service
@DS("ora") @DS("ora")
public class GardsSummationPeakServiceImpl extends ServiceImpl<GardsSummationPeakMapper, GardsSummationPeak> implements GardsSummationPeakService { public class GardsNuclideDecayServiceImpl extends ServiceImpl<GardsNuclideDecayMapper, GardsNuclideDecay> implements GardsNuclideDecayService {
/** /**
* 新增信息 * 新增信息
*/ */
@Override @Override
@Transactional(rollbackFor = RuntimeException.class) @Transactional(rollbackFor = RuntimeException.class)
public Result<?> create(GardsSummationPeak gardsSummationPeak) { public Result<?> create(GardsNuclideDecay gardsNuclideDecay) {
try { try {
boolean success = this.save(gardsSummationPeak); boolean success = this.save(gardsNuclideDecay);
if (success) { if (success) {
return Result.OK("添加成功", gardsSummationPeak); return Result.OK("添加成功", gardsNuclideDecay);
} else { } else {
return Result.error("添加失败"); return Result.error("添加失败");
} }
@ -63,11 +65,11 @@ public class GardsSummationPeakServiceImpl extends ServiceImpl<GardsSummationPea
*/ */
@Override @Override
@Transactional(rollbackFor = RuntimeException.class) @Transactional(rollbackFor = RuntimeException.class)
public Result<?> update(GardsSummationPeak gardsSummationPeak) { public Result<?> update(GardsNuclideDecay gardsNuclideDecay) {
try { try {
boolean success = this.updateById(gardsSummationPeak); boolean success = this.updateById(gardsNuclideDecay);
if (success) { if (success) {
return Result.OK("数据更新成功", gardsSummationPeak); return Result.OK("数据更新成功", gardsNuclideDecay);
} else { } else {
return Result.error("数据更新失败"); return Result.error("数据更新失败");
@ -82,9 +84,9 @@ public class GardsSummationPeakServiceImpl extends ServiceImpl<GardsSummationPea
* 查询信息 * 查询信息
*/ */
@Override @Override
public Result<GardsSummationPeak> queryById(Integer Id) { public Result<GardsNuclideDecay> queryById(Integer Id) {
try { try {
GardsSummationPeak nuclearReactors = this.getById(Id); GardsNuclideDecay nuclearReactors = this.getById(Id);
if (nuclearReactors != null) { if (nuclearReactors != null) {
return Result.OK(nuclearReactors); return Result.OK(nuclearReactors);
} else { } else {
@ -97,17 +99,17 @@ public class GardsSummationPeakServiceImpl extends ServiceImpl<GardsSummationPea
} }
@Override @Override
public Result<IPage<GardsSummationPeak>> page(Integer pageNum, Integer pageSize, String nuclide) { public Result<IPage<GardsNuclideDecay>> page(Integer pageNum, Integer pageSize, String nuclide) {
try { try {
Page<GardsSummationPeak> page = new Page<>(pageNum, pageSize); Page<GardsNuclideDecay> page = new Page<>(pageNum, pageSize);
LambdaQueryWrapper<GardsSummationPeak> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsNuclideDecay> wrapper = new LambdaQueryWrapper<>();
if (nuclide != null && !nuclide.trim().isEmpty()) { if (nuclide != null && !nuclide.trim().isEmpty()) {
wrapper.like(GardsSummationPeak::getNuclide, nuclide); wrapper.like(GardsNuclideDecay::getNuclide, nuclide);
} }
wrapper.orderByDesc(GardsSummationPeak::getId); wrapper.orderByDesc(GardsNuclideDecay::getId);
IPage<GardsSummationPeak> pageResult = this.page(page, wrapper); IPage<GardsNuclideDecay> pageResult = this.page(page, wrapper);
return Result.OK(pageResult); return Result.OK(pageResult);
} catch (Exception e) { } catch (Exception e) {
@ -117,14 +119,14 @@ public class GardsSummationPeakServiceImpl extends ServiceImpl<GardsSummationPea
} }
@Override @Override
public List<GardsSummationPeak> getByConditions(String nuclide) { public List<GardsNuclideDecay> getByConditions(String nuclide) {
LambdaQueryWrapper<GardsSummationPeak> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsNuclideDecay> query = new LambdaQueryWrapper<>();
if (nuclide != null && !nuclide.trim().isEmpty()) { if (nuclide != null && !nuclide.trim().isEmpty()) {
query.like(GardsSummationPeak::getNuclide, nuclide); query.like(GardsNuclideDecay::getNuclide, nuclide);
} }
query.orderByDesc(GardsSummationPeak::getId); query.orderByDesc(GardsNuclideDecay::getId);
return this.list(query); return this.list(query);
} }
} }