Переглянути джерело

加入元数据条件操作符

wangliang 1 рік тому
батько
коміт
f381025384

+ 0 - 1
sop-business/src/main/java/com/qmth/sop/business/bean/params/SopInfoListParam.java

@@ -42,7 +42,6 @@ public class SopInfoListParam extends TBSopInfo implements Serializable {
     private List<FormWidgetMetadataParam> formWidgetMetadataConditionList;
 
     @ApiModelProperty(value = "元数据条件操作符")
-    @NotNull(message = "元数据条件操作符不能为空")
     FormWidgetMetadataOperation formWidgetMetadataOperation;
 
     @ApiModelProperty(value = "页码")

+ 3 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -387,6 +387,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             }
             for (Map.Entry<String, List<FormWidgetMetadataParam>> entry : formWidgetMetadataParamLinkedMultiValueMap.entrySet()) {
                 List<FormWidgetMetadataParam> formWidgetMetadataParamList = entry.getValue();
+                if (Objects.isNull(sopInfoListParam.getFormWidgetMetadataOperation())) {
+                    sopInfoListParam.setFormWidgetMetadataOperation(FormWidgetMetadataOperation.AND);
+                }
                 if (formWidgetMetadataParamList.size() > 1) {
                     StringJoiner conditionJoin = new StringJoiner("").add(sopInfoListParam.getFormWidgetMetadataOperation().getCode()).add(" ( ");
                     for (int y = 0; y < formWidgetMetadataParamList.size(); y++) {