update
This commit is contained in:
@@ -118,11 +118,7 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
experimentLog.setCreateBy(userByName.getRealname());
|
||||
experimentLogService.save(experimentLog);
|
||||
|
||||
String[] split = experimentNo.split("-", 4);
|
||||
ExperimentSequence seq = new ExperimentSequence();
|
||||
seq.setSequenceYear(split[1]);
|
||||
seq.setSequenceValue(Integer.parseInt(split[3]));
|
||||
experimentSequenceService.save(seq);
|
||||
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
@@ -34,11 +34,15 @@ public class ExperimentSequenceServiceImpl extends ServiceImpl<ExperimentSequenc
|
||||
sequence.setSequenceYear(year + "");
|
||||
save(sequence);
|
||||
}
|
||||
return assembleSequence(sequence);
|
||||
ExperimentSequence seq = new ExperimentSequence();
|
||||
seq.setSequenceYear(year + "");
|
||||
seq.setSequenceValue(sequence.getSequenceValue() + 1);
|
||||
save(seq);
|
||||
return assembleSequence(seq);
|
||||
}
|
||||
|
||||
public String assembleSequence(ExperimentSequence experimentSequence) {
|
||||
return "KC-" + experimentSequence.getSequenceYear() + "-JL-" + StringUtils.leftPad((experimentSequence.getSequenceValue() + 1) + "",
|
||||
return "KC-" + experimentSequence.getSequenceYear() + "-JL-" + StringUtils.leftPad(experimentSequence.getSequenceValue() + "",
|
||||
3, "0");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
|
||||
@Override
|
||||
public Experiment copy(Experiment oldExperiment) {
|
||||
Experiment experiment = new Experiment();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
BeanUtil.copyProperties(oldExperiment, experiment);
|
||||
experiment.setId(null);
|
||||
experiment.setExperimentNo(experimentSequenceService.next());
|
||||
experiment.setCopyCount(0);
|
||||
|
||||
9
scripts/.prettierignore
Normal file
9
scripts/.prettierignore
Normal file
@@ -0,0 +1,9 @@
|
||||
/dist/*
|
||||
.local
|
||||
.output.js
|
||||
/node_modules/**
|
||||
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
|
||||
/public/*
|
||||
1
scripts/.python-version
Normal file
1
scripts/.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.13.1
|
||||
21
scripts/pyproject.toml
Normal file
21
scripts/pyproject.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
[tool.poetry]
|
||||
name = "physical-web"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["ls <lslvxy@163.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.13"
|
||||
requests = "^2.32.3"
|
||||
beautifulsoup4 = "^4.12.3"
|
||||
lxml = "^5.3.0"
|
||||
flask = "^3.1.0"
|
||||
minio = "^7.2.12"
|
||||
mysql-connector-python = "^9.1.0"
|
||||
urllib3 = "^2.2.3"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
Reference in New Issue
Block a user