实验报告

This commit is contained in:
ls
2025-05-04 15:49:42 +08:00
parent 808f938ada
commit f472aff273
13 changed files with 55 additions and 7 deletions

View File

@@ -197,11 +197,12 @@ mybatis-plus:
# 默认数据库表下划线命名 # 默认数据库表下划线命名
table-underline: true table-underline: true
configuration: configuration:
cache-enabled: true
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#jeecg专用配置 #jeecg专用配置
minidao: minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.* base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*

View File

@@ -199,6 +199,7 @@ mybatis-plus:
# 默认数据库表下划线命名 # 默认数据库表下划线命名
table-underline: true table-underline: true
configuration: configuration:
cache-enabled: true
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段

View File

@@ -203,7 +203,8 @@ mybatis-plus:
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl cache-enabled: true
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#jeecg专用配置 #jeecg专用配置
minidao: minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.* base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*

View File

@@ -35,9 +35,9 @@
<logger name="org.springframework" level="INFO" /> <logger name="org.springframework" level="INFO" />
<!-- 定义 mybatis 日志记录器,可以单独控制 sql 日志的输出级别 --> <!-- 定义 mybatis 日志记录器,可以单独控制 sql 日志的输出级别 -->
<logger name="org.mybatis" level="DEBUG" /> <logger name="org.mybatis" level="INFO" />
<logger name="com.example.mapper" level="DEBUG" /> <logger name="com.example.mapper" level="INFO" />
<logger name="org.apache.ibatis" level="DEBUG" /> <logger name="org.apache.ibatis" level="INFO" />
<logger name="org.jeecg.modules.database.service.impl" level="INFO"></logger> <logger name="org.jeecg.modules.database.service.impl" level="INFO"></logger>
<!-- 定义所有其他日志记录器 --> <!-- 定义所有其他日志记录器 -->

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.jeecg.modules.database.entity.Client; import org.jeecg.modules.database.entity.Client;
/** /**
@@ -9,6 +10,7 @@ import org.jeecg.modules.database.entity.Client;
* @Date: 2024-08-30 * @Date: 2024-08-30
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface ClientMapper extends BaseMapper<Client> { public interface ClientMapper extends BaseMapper<Client> {
} }

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.jeecg.modules.database.entity.Equipment; import org.jeecg.modules.database.entity.Equipment;
/** /**
@@ -9,6 +10,7 @@ import org.jeecg.modules.database.entity.Equipment;
* @Date: 2024-08-30 * @Date: 2024-08-30
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface EquipmentMapper extends BaseMapper<Equipment> { public interface EquipmentMapper extends BaseMapper<Equipment> {
} }

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.jeecg.modules.database.entity.ExperimentDeviationCondition; import org.jeecg.modules.database.entity.ExperimentDeviationCondition;
/** /**
@@ -9,6 +10,7 @@ import org.jeecg.modules.database.entity.ExperimentDeviationCondition;
* @Date: 2024-12-05 * @Date: 2024-12-05
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface ExperimentDeviationConditionMapper extends BaseMapper<ExperimentDeviationCondition> { public interface ExperimentDeviationConditionMapper extends BaseMapper<ExperimentDeviationCondition> {
} }

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.jeecg.modules.database.entity.ExperimentDeviationEquipment; import org.jeecg.modules.database.entity.ExperimentDeviationEquipment;
/** /**
@@ -9,6 +10,7 @@ import org.jeecg.modules.database.entity.ExperimentDeviationEquipment;
* @Date: 2024-12-05 * @Date: 2024-12-05
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface ExperimentDeviationEquipmentMapper extends BaseMapper<ExperimentDeviationEquipment> { public interface ExperimentDeviationEquipmentMapper extends BaseMapper<ExperimentDeviationEquipment> {
} }

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.database.entity.ExperimentSampleInfo; import org.jeecg.modules.database.entity.ExperimentSampleInfo;
@@ -12,6 +13,7 @@ import java.util.List;
* @Date: 2024-12-04 * @Date: 2024-12-04
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface ExperimentSampleInfoMapper extends BaseMapper<ExperimentSampleInfo> { public interface ExperimentSampleInfoMapper extends BaseMapper<ExperimentSampleInfo> {
@Select("SELECT distinct sample_model FROM experiment_sample_info") @Select("SELECT distinct sample_model FROM experiment_sample_info")

View File

@@ -1,6 +1,7 @@
package org.jeecg.modules.database.mapper; package org.jeecg.modules.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.jeecg.modules.database.entity.TestStandards; import org.jeecg.modules.database.entity.TestStandards;
/** /**
@@ -9,6 +10,7 @@ import org.jeecg.modules.database.entity.TestStandards;
* @Date: 2024-08-30 * @Date: 2024-08-30
* @Version: V1.0 * @Version: V1.0
*/ */
@CacheNamespace
public interface TestStandardsMapper extends BaseMapper<TestStandards> { public interface TestStandardsMapper extends BaseMapper<TestStandards> {
} }

View File

@@ -1,5 +1,6 @@
package org.jeecg.modules.database.service.impl; package org.jeecg.modules.database.service.impl;
import cn.hutool.core.util.ObjUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.database.entity.Equipment; import org.jeecg.modules.database.entity.Equipment;
@@ -42,6 +43,9 @@ public class ExperimentDeviationEquipmentServiceImpl extends ServiceImpl<Experim
} }
private void assembleDetails(ExperimentDeviationEquipment experimentDeviationEquipment) { private void assembleDetails(ExperimentDeviationEquipment experimentDeviationEquipment) {
if (ObjUtil.isNull(experimentDeviationEquipment)) {
return;
}
Equipment one = equipmentService.getByManagementNo(experimentDeviationEquipment.getEquipmentNo()); Equipment one = equipmentService.getByManagementNo(experimentDeviationEquipment.getEquipmentNo());
if (Objects.nonNull(one)) { if (Objects.nonNull(one)) {
experimentDeviationEquipment.setEquipmentName(one.getName()); experimentDeviationEquipment.setEquipmentName(one.getName());

View File

@@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.model.SysUserSysDepartModel; import org.jeecg.modules.system.model.SysUserSysDepartModel;
import org.jeecg.modules.system.vo.SysUserDepVo; import org.jeecg.modules.system.vo.SysUserDepVo;
@@ -21,6 +20,7 @@ import java.util.List;
* @Author scott * @Author scott
* @since 2018-12-20 * @since 2018-12-20
*/ */
@CacheNamespace
public interface SysUserMapper extends BaseMapper<SysUser> { public interface SysUserMapper extends BaseMapper<SysUser> {
/** /**
* 通过用户账号查询用户信息 * 通过用户账号查询用户信息

View File

@@ -0,0 +1,29 @@
import os
import pandas as pd
def convert_csv_to_xlsx(directory):
# 遍历目录及其子目录
for root, dirs, files in os.walk(directory):
for file in files:
# if file.endswith('data.csv'):
# csv_file_path = os.path.join(root, file)
# xlsx_file_path = os.path.splitext(csv_file_path)[0] + '.xlsx'
#
# # 读取CSV文件并转换为XLSX
# df = pd.read_csv(csv_file_path)
# df.to_excel(xlsx_file_path, index=False)
#
# # 删除原始的CSV文件
# os.remove(csv_file_path)
# print(f"Converted and deleted: {csv_file_path}")
# 删除所有文件名不等于data.xlsx的文件
if not file.endswith('data.xlsx'):
file_path = os.path.join(root, file)
os.remove(file_path)
print(f"Deleted: {file_path}")
if __name__ == "__main__":
# 指定要处理的目录
directory = 'downloaded_files'
convert_csv_to_xlsx(directory)