组态bug修改,从无锡同步过来的

This commit is contained in:
hzj
2025-11-13 16:11:24 +08:00
parent 400b9fd9c1
commit e320685af1
3 changed files with 11 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ public class CsPagePO extends BaseEntity {
@TableField(value = "`status`")
private String status;
private Integer sort;
public static final String COL_ID = "id";
@@ -74,4 +75,7 @@ public class CsPagePO extends BaseEntity {
public static final String COL_UPDATE_BY = "update_by";
public static final String COL_UPDATE_TIME = "update_time";
public static final String SORT = "sort";
}

View File

@@ -86,7 +86,12 @@ public class CsConfigurationServiceImpl extends ServiceImpl<CsConfigurationMappe
boolean b = this.updateById(csConfigurationPO);
return b;
}
Integer count = this.lambdaQuery().eq(CsConfigurationPO::getName, auditParm.getName()).ne(CsConfigurationPO::getId,auditParm.getId()).eq(CsConfigurationPO::getStatus, "1").count();
if(count>0){
throw new BusinessException("修改名称失败,存在相同的组态项目");
}
BeanUtils.copyProperties(auditParm,csConfigurationPO);
List<String> projectIds = auditParm.getProjectIds();
if(!CollectionUtils.isEmpty(projectIds)){
String projects = String.join(",", projectIds);

View File

@@ -107,7 +107,7 @@ public class CsPagePOServiceImpl extends ServiceImpl<CsPagePOMapper, CsPagePO> i
queryWrapper.eq(StringUtils.isNotBlank (csPageParam.getPid()),CsPagePO.COL_PID,csPageParam.getPid()).
like(StringUtils.isNotBlank (csPageParam.getSearchValue()),CsPagePO.COL_NAME,csPageParam.getSearchValue()).
eq ("status",1).
orderByAsc(CsPagePO.COL_KID);
orderByAsc(CsPagePO.SORT);
IPage<CsPagePO> pageData = this.page(new Page<>(csPageParam.getPageNum(), csPageParam.getPageSize()), queryWrapper);
List<String> collect1 = pageData.getRecords().stream().map(CsPagePO::getCreateBy).collect(Collectors.toList());
@@ -123,7 +123,7 @@ public class CsPagePOServiceImpl extends ServiceImpl<CsPagePOMapper, CsPagePO> i
CsPageVO csPageVO = new CsPageVO();
CsConfigurationPO csConfigurationPO = csConfigurationMapper.selectById(temp.getPid());
BeanUtils.copyProperties(temp, csPageVO);
csPageVO.setKId(temp.getKId());
// csPageVO.setKId(temp.getKId());
csPageVO.setConfigurationName(csConfigurationPO.getName());
InputStream fileStream = fileStorageUtil.getFileStream(temp.getPath());
String text = new BufferedReader(