Compare commits
10 Commits
cdc16bed0d
...
5e528175b8
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e528175b8 | |||
| 5360e0da9e | |||
| c4ffd9c0fc | |||
| f73cad7f65 | |||
| e323b34f1e | |||
| e621a36bad | |||
| 4f216a9482 | |||
| 3d7967d593 | |||
| c795636ea4 | |||
| 93fb02eb92 |
21
.fleet/run.json
Normal file
21
.fleet/run.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"type": "spring-boot",
|
||||
"name": "PhysicalApplication",
|
||||
"mainClass": "org.jeecg.PhysicalApplication",
|
||||
"module": "physical-launcher",
|
||||
"options": ["-XX:TieredStopAtLevel=1", "-Dspring.output.ansi.enabled=always", "-Dcom.sun.management.jmxremote", "-Dspring.jmx.enabled=true", "-Dspring.liveBeansView.mbeanDomain", "-Dspring.application.admin.enabled=true", "-Dmanagement.endpoints.jmx.exposure.include=*", "-Dfile.encoding=UTF-8", "-Dsun.stdout.encoding=UTF-8", "-Dsun.stderr.encoding=UTF-8"],
|
||||
"activeProfiles": [""],
|
||||
"workingDir": "$PROJECT_DIR$",
|
||||
"dependsOn": ["Build"]
|
||||
},
|
||||
{
|
||||
"type": "jps-build",
|
||||
"name": "Build",
|
||||
"module": "physical-launcher",
|
||||
"includeTests": false
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
output.zip
Normal file
BIN
output.zip
Normal file
Binary file not shown.
BIN
output/供方财产登记表.pdf
Normal file
BIN
output/供方财产登记表.pdf
Normal file
Binary file not shown.
BIN
output/合同/委托书等评审表.pdf
Normal file
BIN
output/合同/委托书等评审表.pdf
Normal file
Binary file not shown.
BIN
output/沟通记录表.pdf
Normal file
BIN
output/沟通记录表.pdf
Normal file
Binary file not shown.
BIN
output/测试过程记录.pdf
Normal file
BIN
output/测试过程记录.pdf
Normal file
Binary file not shown.
BIN
output/试验大纲评审表.pdf
Normal file
BIN
output/试验大纲评审表.pdf
Normal file
Binary file not shown.
BIN
output/试验报告评审表.pdf
Normal file
BIN
output/试验报告评审表.pdf
Normal file
Binary file not shown.
BIN
output/试验流程检查单.pdf
Normal file
BIN
output/试验流程检查单.pdf
Normal file
Binary file not shown.
BIN
output/辐照试验委托书.pdf
Normal file
BIN
output/辐照试验委托书.pdf
Normal file
Binary file not shown.
BIN
output/辐照试验计划表.pdf
Normal file
BIN
output/辐照试验计划表.pdf
Normal file
Binary file not shown.
BIN
output/辐照试验(钻源)及退火过程记录.pdf
Normal file
BIN
output/辐照试验(钻源)及退火过程记录.pdf
Normal file
Binary file not shown.
@@ -60,6 +60,7 @@ public class SsrfFileTypeFilter {
|
||||
|
||||
//压缩文件
|
||||
FILE_TYPE_WHITE_LIST.add("zip");
|
||||
FILE_TYPE_WHITE_LIST.add("log");
|
||||
FILE_TYPE_WHITE_LIST.add("rar");
|
||||
FILE_TYPE_WHITE_LIST.add("7z");
|
||||
FILE_TYPE_WHITE_LIST.add("tar");
|
||||
|
||||
25044
physical-boot.sql
25044
physical-boot.sql
File diff suppressed because one or more lines are too long
@@ -17,6 +17,16 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
|
||||
@@ -168,7 +168,7 @@ spring:
|
||||
datasource:
|
||||
master:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/physical-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://47.102.126.67:23306/physical-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://47.102.126.67:23306/physical-boot-prod?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: urwTocIA1f395t
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
@@ -152,10 +152,14 @@ public class DocumentLibraryController extends JeecgController<DocumentLibrary,
|
||||
@RequiresPermissions("library:document_library:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DocumentLibrary documentLibrary, HttpServletRequest request) {
|
||||
documentLibraryService.updateById(documentLibrary);
|
||||
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
DocumentLibrary byId = documentLibraryService.getById(documentLibrary.getId());
|
||||
if (StringUtils.equals(byId.getCreateBy(), "admin") && !StringUtils.equals(userByName.getUsername(), "admin")) {
|
||||
return Result.OK("您无权编辑 Admin 的知识库!");
|
||||
}
|
||||
documentLibraryService.updateById(documentLibrary);
|
||||
if (StringUtils.equals(documentLibrary.getType(), "DOCUMENT")) {
|
||||
DocumentVisitHistory his = documentVisitHistoryService.findByUserAndDocId(userByName.getId(), documentLibrary.getId());
|
||||
his.setDocumentId(documentLibrary.getId());
|
||||
|
||||
@@ -100,19 +100,22 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
|
||||
experimentAnnealProcessService.saveWithDetails(experimentAnnealProcess,"add");
|
||||
experimentAnnealProcessService.saveWithDetails(experimentAnnealProcess, "add");
|
||||
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("添加退火过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
@@ -139,19 +142,22 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
|
||||
experimentAnnealProcessService.saveWithDetails(experimentAnnealProcess,"edit");
|
||||
experimentAnnealProcessService.saveWithDetails(experimentAnnealProcess, "edit");
|
||||
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑退火过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -177,15 +183,18 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("删除退火过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
|
||||
@@ -171,6 +171,13 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
if (!StringUtils.startsWith(experimentNo, "KC")) {
|
||||
return Result.error("实验编号格式不正确!");
|
||||
}
|
||||
if (StringUtils.isBlank(experiment.getId())) {
|
||||
Experiment dbExp = experimentService.getByExperimentNo(experimentNo);
|
||||
if (Objects.isNull(dbExp)) {
|
||||
return Result.error("实验数据不正确!");
|
||||
}
|
||||
experiment.setId(dbExp.getId());
|
||||
}
|
||||
//校验试验的基本信息
|
||||
String result = validateSampleInfos(experiment);
|
||||
if (StringUtils.isNotBlank(result)) {
|
||||
@@ -257,6 +264,10 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
return Result.error("实验状态不正确!");
|
||||
}
|
||||
}*/
|
||||
Experiment dbExp = experimentService.getByExperimentNo(experimentNo);
|
||||
if (Objects.nonNull(dbExp) && StringUtils.isBlank(experiment.getId())) {
|
||||
experiment.setId(dbExp.getId());
|
||||
}
|
||||
experiment.setStatus(ExperimentStatus.STAGING);
|
||||
experimentService.saveWithDetail(experiment);
|
||||
|
||||
|
||||
@@ -80,9 +80,11 @@ public class ExperimentDeviationConditionController
|
||||
if (StringUtils.contains(sampleId, ",")) {
|
||||
for (String id : sampleId.split(",")) {
|
||||
ExperimentDeviationCondition cloned = ObjectUtils.clone(experimentDeviationCondition);
|
||||
if (ObjectUtils.isNotEmpty(cloned)) {
|
||||
cloned.setSampleId(id);
|
||||
experimentDeviationConditionService.save(experimentDeviationCondition);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
experimentDeviationConditionService.save(experimentDeviationCondition);
|
||||
}
|
||||
@@ -106,8 +108,10 @@ public class ExperimentDeviationConditionController
|
||||
if (StringUtils.contains(sampleId, ",")) {
|
||||
for (String id : sampleId.split(",")) {
|
||||
ExperimentDeviationCondition cloned = ObjectUtils.clone(experimentDeviationCondition);
|
||||
if (ObjectUtils.isNotEmpty(cloned)) {
|
||||
cloned.setSampleId(id);
|
||||
experimentDeviationConditionService.saveOrUpdate(experimentDeviationCondition);
|
||||
experimentDeviationConditionService.saveOrUpdate(cloned);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
experimentDeviationConditionService.updateById(experimentDeviationCondition);
|
||||
|
||||
@@ -96,10 +96,15 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentRadiationProcess.setId(null);
|
||||
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
@@ -109,8 +114,6 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("添加辐照过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
@@ -137,10 +140,15 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
experimentRadiationProcessService.saveOrUpdate(experimentRadiationProcess);
|
||||
|
||||
@@ -149,8 +157,6 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑辐照过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
@@ -177,15 +183,18 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED) || StringUtils.equals(dbExperiment.getStatus(),
|
||||
ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("删除辐照过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
experimentRadiationProcessService.removeById(id);
|
||||
|
||||
@@ -94,10 +94,14 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
Experiment dbExperiment = experimentService.getById(experimentId);
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
}String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)||StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentTestProcess.setId(null);
|
||||
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
@@ -107,8 +111,6 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentTestProcess.getExperimentId());
|
||||
experimentLog.setLogContent("添加测试过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
@@ -134,10 +136,14 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
Experiment dbExperiment = experimentService.getById(experimentId);
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
}String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)||StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
|
||||
experimentService.changeStatus(experimentId, ExperimentStatus.PROGRESSING);
|
||||
|
||||
@@ -146,8 +152,6 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑测试过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
@@ -174,15 +178,17 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
Experiment dbExperiment = experimentService.getById(experimentId);
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
}String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)||StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.REVIEWED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("删除测试过程");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
|
||||
@@ -91,15 +91,18 @@ public class ExperimentUserController extends JeecgController<ExperimentUser, IE
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentUserService.save(experimentUser);
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentUser.getExperimentId());
|
||||
experimentLog.setLogContent("添加试验人员");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
return Result.OK("添加成功!");
|
||||
@@ -110,6 +113,9 @@ public class ExperimentUserController extends JeecgController<ExperimentUser, IE
|
||||
@RequiresPermissions("database:experiment_user:add")
|
||||
@PostMapping(value = "/batchAdd")
|
||||
public Result<String> batchAdd(@RequestBody List<ExperimentUser> experimentUserList, HttpServletRequest request) {
|
||||
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
for (ExperimentUser v : experimentUserList) {
|
||||
String experimentId = v.getExperimentId();
|
||||
if (StringUtils.isBlank(experimentId)) {
|
||||
@@ -120,16 +126,18 @@ public class ExperimentUserController extends JeecgController<ExperimentUser, IE
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
experimentUserService.save(v);
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentUserList.get(0).getExperimentId());
|
||||
experimentLog.setLogContent("添加试验人员");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
return Result.OK("添加成功!");
|
||||
@@ -157,14 +165,17 @@ public class ExperimentUserController extends JeecgController<ExperimentUser, IE
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(byId.getExperimentId());
|
||||
experimentLog.setLogContent("编辑试验人员");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -191,14 +202,17 @@ public class ExperimentUserController extends JeecgController<ExperimentUser, IE
|
||||
if (Objects.isNull(dbExperiment)) {
|
||||
return Result.error("试验数据不存在!");
|
||||
}
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
// 超级管理不用判断状态和修改状态,只修改数据。 20250511 邓春
|
||||
if (!"admin".equals(userByName.getUsername())) {
|
||||
if (StringUtils.equals(dbExperiment.getStatus(), ExperimentStatus.COMPLETED)) {
|
||||
return Result.error("试验状态:[" + dbExperiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("删除试验人员");
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
SysUser userByName = userService.getUserByName(username);
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
experimentUserService.removeById(id);
|
||||
|
||||
@@ -92,13 +92,14 @@ public class ExperimentSampleInfo implements Serializable {
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
@Schema(description = "生产厂家ID")
|
||||
private String sampleManufacturer;
|
||||
@Schema(description = "生产厂家")
|
||||
@Excel(name = "生产厂家", width = 15)
|
||||
private String sampleManufacturer;
|
||||
//
|
||||
|
||||
@Schema(description = "生产厂家名称")
|
||||
@TableField(exist = false)
|
||||
private String sampleManufacturerName;
|
||||
// @Schema(description = "生产厂家名称")
|
||||
// @TableField(exist = false)
|
||||
// private String sampleManufacturerName;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
|
||||
@@ -146,4 +146,11 @@ public class HistoricalDatabase implements Serializable {
|
||||
@Excel(name = "附件", width = 15)
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,12 @@ public class LocalDatabase implements Serializable {
|
||||
@Schema(description = "样品型号")
|
||||
private String sampleModel;
|
||||
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentReviewDTO> ExperimentReviewList;
|
||||
|
||||
@@ -71,10 +71,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
<if test="loginUser.postText != null and loginUser.postText != ''">
|
||||
order by ${loginUser.postText}
|
||||
</if>
|
||||
order by e.experiment_no desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -18,6 +18,7 @@ public interface IExperimentService extends IService<Experiment> {
|
||||
void fetchExperimentDetail(Experiment experiment);
|
||||
|
||||
Experiment copy(Experiment oldExperiment);
|
||||
Experiment getByExperimentNo(String experimentNo);
|
||||
|
||||
void changeStatus(String experimentId, String status);
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void assembleDetails(ExperimentSampleInfo sampleInfo) {
|
||||
if (ObjUtil.isNull(sampleInfo)) {
|
||||
return;
|
||||
@@ -43,7 +42,7 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
|
||||
String sampleManufacturerId = sampleInfo.getSampleManufacturer();
|
||||
if (StringUtils.isNotBlank(sampleManufacturerId)) {
|
||||
Client byId = clientService.getById(sampleManufacturerId);
|
||||
sampleInfo.setSampleManufacturerName(Optional.ofNullable(byId).map(v -> v.getName()).orElse(sampleManufacturerId));
|
||||
sampleInfo.setSampleManufacturer(Optional.ofNullable(byId).map(v -> v.getName()).orElse(sampleManufacturerId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,6 +243,11 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Experiment getByExperimentNo(String experimentNo) {
|
||||
return getOne(new LambdaQueryWrapper<Experiment>().eq(Experiment::getExperimentNo, experimentNo), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeStatus(String experimentId, String status) {
|
||||
Experiment dbData = getById(experimentId);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,7 @@ from datetime import datetime
|
||||
from datetime import timedelta
|
||||
|
||||
import mysql.connector
|
||||
import pandas as pd
|
||||
from minio import Minio
|
||||
from minio.error import S3Error
|
||||
|
||||
@@ -21,13 +22,13 @@ db_config = {
|
||||
|
||||
# minio 配置
|
||||
minio_client = Minio(
|
||||
"127.0.0.1:9000", # MinIO服务器地址或IP
|
||||
"47.102.126.67:29000", # MinIO服务器地址或IP
|
||||
# "192.168.50.100:29000", # MinIO服务器地址或IP
|
||||
access_key="root", # 替换为你的Access Key
|
||||
secret_key="12345678", # 替换为你的Secret Key
|
||||
secret_key="FeF4qA6uQBHeRd", # 替换为你的Secret Key
|
||||
secure=False # 如果使用的是http则为False
|
||||
)
|
||||
bucket_name = 'physical'
|
||||
bucket_name = 'physical2'
|
||||
|
||||
|
||||
def get_md5(input_string):
|
||||
@@ -54,7 +55,7 @@ def save_to_db_import_record(connection,data):
|
||||
cursor = connection.cursor()
|
||||
try:
|
||||
"""保存数据到 MySQL 数据库"""
|
||||
insert_query = """INSERT INTO `nasa_data_record` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `device_type`, `device_name`, `device_mode`, `device_function`, `device_batch`, `manufacturer`, `experiment_date`, `data_source`, `experiment_user`, `total_count`, `file_list`,`origin_data`)
|
||||
insert_query = """INSERT INTO `nasa_data_record` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `device_type`, `device_name`, `device_mode`, `device_function`, `device_batch`, `manufacturer`, `experiment_date`, `data_source`, `experiment_user`, `total_count_nasa`, `file_list`,`origin_data`)
|
||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);"""
|
||||
cursor.execute(insert_query, data)
|
||||
connection.commit()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user