|
@@ -22,9 +22,12 @@ import com.lantone.daqe.entity.ColumnInfo;
|
|
|
import com.lantone.daqe.entity.ColumnResult;
|
|
|
import com.lantone.daqe.entity.ColumnVerify;
|
|
|
import com.lantone.daqe.entity.NonnullInfo;
|
|
|
+import com.lantone.daqe.entity.NonnullResult;
|
|
|
import com.lantone.daqe.entity.RegularInfo;
|
|
|
import com.lantone.daqe.entity.RegularMapping;
|
|
|
+import com.lantone.daqe.entity.RegularResult;
|
|
|
import com.lantone.daqe.entity.StandardvalueInfo;
|
|
|
+import com.lantone.daqe.entity.StandardvalueResult;
|
|
|
import com.lantone.daqe.enums.ColumnVerifyTypeEnum;
|
|
|
import com.lantone.daqe.facade.base.ColumnInfoFacade;
|
|
|
import com.lantone.daqe.facade.base.ColumnResultFacade;
|
|
@@ -128,7 +131,7 @@ public class ColumnVerifyManagementFacade {
|
|
|
if (StringUtil.isNotEmpty(getColumnVerifyDTO.getStandardValue())) {
|
|
|
standardValueList.add(getColumnVerifyDTO.getStandardValue());
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(getColumnVerifyDTO.getIsRequired())){
|
|
|
+ if (StringUtil.isNotEmpty(getColumnVerifyDTO.getIsRequired())) {
|
|
|
getByIdColumnVerifyDTO.setIsRequired(getColumnVerifyDTO.getIsRequired());
|
|
|
}
|
|
|
}
|
|
@@ -208,7 +211,7 @@ public class ColumnVerifyManagementFacade {
|
|
|
}
|
|
|
}
|
|
|
//加入查看时的字段
|
|
|
- if(columnById!=null) {
|
|
|
+ if (columnById != null) {
|
|
|
if (columnInfo.getTableEname().equals(columnById.getTableEname())) {
|
|
|
GetColumnNameDTO getColumnNameDTO = new GetColumnNameDTO();
|
|
|
getColumnNameDTO.setId(columnById.getId());
|
|
@@ -419,37 +422,58 @@ public class ColumnVerifyManagementFacade {
|
|
|
String type = columnVerify.getType();
|
|
|
//非空
|
|
|
if (ColumnVerifyTypeEnum.NONNULL_TYPE.getKey().equals(type)) {
|
|
|
- nonnullId.add(columnVerify.getVerifyId());
|
|
|
+ nonnullId.add(columnVerify.getColumnId());
|
|
|
}
|
|
|
//关键值
|
|
|
if (ColumnVerifyTypeEnum.STANDARD_TYPE.getKey().equals(type)) {
|
|
|
- standardValueId.add(columnVerify.getVerifyId());
|
|
|
+ standardValueId.add(columnVerify.getColumnId());
|
|
|
}
|
|
|
//正则
|
|
|
if (ColumnVerifyTypeEnum.REGULAR_TYPE.getKey().equals(type)) {
|
|
|
- regularId.add(columnVerify.getVerifyId());
|
|
|
+ regularId.add(columnVerify.getColumnId());
|
|
|
}
|
|
|
}
|
|
|
//非空
|
|
|
if (ListUtil.isNotEmpty(nonnullId)) {
|
|
|
nonnullInfo = nonnullInfoFacade.remove(new UpdateWrapper<NonnullInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id", nonnullId)
|
|
|
+ .in("column_id", nonnullId)
|
|
|
);
|
|
|
+ if (nonnullInfo) {
|
|
|
+ //删除结果表数据
|
|
|
+ nonnullResultFacade.remove(new UpdateWrapper<NonnullResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("column_id", nonnullId)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
//关键值
|
|
|
if (ListUtil.isNotEmpty(standardValueId)) {
|
|
|
tandardvalueInfo = standardvalueInfoFacade.remove(new UpdateWrapper<StandardvalueInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id", standardValueId)
|
|
|
+ .in("column_id", standardValueId)
|
|
|
);
|
|
|
+ if (tandardvalueInfo) {
|
|
|
+ //删除结果表数据
|
|
|
+ standardvalueResultFacade.remove(new UpdateWrapper<StandardvalueResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("column_id", nonnullId)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
//正则
|
|
|
if (ListUtil.isNotEmpty(regularId)) {
|
|
|
regular = regularMappingFacade.remove(new UpdateWrapper<RegularMapping>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id", regularId)
|
|
|
+ .in("column_id", regularId)
|
|
|
);
|
|
|
+ if (regular) {
|
|
|
+ //删除结果表数据
|
|
|
+ regularResultFacade.remove(new UpdateWrapper<RegularResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("column_id", nonnullId)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
if (nonnullInfo && tandardvalueInfo && regular) {
|
|
|
boolean update = columnVerifyFacade.remove(new UpdateWrapper<ColumnVerify>()
|
|
@@ -457,6 +481,11 @@ public class ColumnVerifyManagementFacade {
|
|
|
.in("column_id", ids)
|
|
|
);
|
|
|
if (update) {
|
|
|
+ //删除结果表数据
|
|
|
+ columnResultFacade.remove(new UpdateWrapper<ColumnResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("column_id", nonnullId)
|
|
|
+ );
|
|
|
return true;
|
|
|
}
|
|
|
}
|