微调
This commit is contained in:
@@ -199,12 +199,12 @@ public class PqSourceServiceImpl extends ServiceImpl<PqSourceMapper, PqSource> i
|
|||||||
* @return 检测源名称
|
* @return 检测源名称
|
||||||
*/
|
*/
|
||||||
private String generatePqSourceName(PqSourceParam param, boolean isAdd) {
|
private String generatePqSourceName(PqSourceParam param, boolean isAdd) {
|
||||||
DevType devType = devTypeService.getById(param.getDevType());
|
DictData devType = dictDataService.getDictDataById(param.getDevType());
|
||||||
DictData typeDictData = dictDataService.getDictDataById(param.getType());
|
DictData typeDictData = dictDataService.getDictDataById(param.getType());
|
||||||
|
|
||||||
if (ObjectUtil.isNotNull(devType) && ObjectUtil.isNotNull(typeDictData)) {
|
if (ObjectUtil.isNotNull(devType) && ObjectUtil.isNotNull(typeDictData)) {
|
||||||
if (isAdd) {
|
if (isAdd) {
|
||||||
int count = this.lambdaQuery().eq(PqSource::getPattern, param.getPattern()).count();
|
int count = this.lambdaQuery().eq(PqSource::getPattern, param.getPattern()).eq(PqSource::getState, DataStateEnum.ENABLE.getCode()).count();
|
||||||
return typeDictData.getName() + "-" + devType.getName() + "-" + (count + 1);
|
return typeDictData.getName() + "-" + devType.getName() + "-" + (count + 1);
|
||||||
} else {
|
} else {
|
||||||
PqSource pqSource = this.lambdaQuery().eq(PqSource::getId, ((PqSourceParam.UpdateParam) param).getId()).one();
|
PqSource pqSource = this.lambdaQuery().eq(PqSource::getId, ((PqSourceParam.UpdateParam) param).getId()).one();
|
||||||
|
|||||||
Reference in New Issue
Block a user