wangliang 1 éve
szülő
commit
26b8c56c26

+ 8 - 10
sop-business/src/main/java/com/qmth/sop/business/bean/params/FormWidgetMetadataParam.java

@@ -1,8 +1,7 @@
 package com.qmth.sop.business.bean.params;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.common.enums.FormWidgetMetadataOperator;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -18,22 +17,21 @@ import java.io.Serializable;
 public class FormWidgetMetadataParam implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "主键")
-    private Long id;
-
     @ApiModelProperty(value = "字段id")
     private String fieldId;
 
+    @ApiModelProperty(value = "运算符")
+    private FormWidgetMetadataOperator operator;
+
     @ApiModelProperty(value = "字段值")
     private String fieldValue;
 
-    public Long getId() {
-        return id;
+    public FormWidgetMetadataOperator getOperator() {
+        return operator;
     }
 
-    public void setId(Long id) {
-        this.id = id;
+    public void setOperator(FormWidgetMetadataOperator operator) {
+        this.operator = operator;
     }
 
     public String getFieldId() {

+ 382 - 382
sop-business/src/main/java/com/qmth/sop/business/bean/result/SopInfoResult.java

@@ -1,382 +1,382 @@
-package com.qmth.sop.business.bean.result;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import com.qmth.sop.common.enums.FlowStatusEnum;
-import com.qmth.sop.common.enums.ProductTypeEnum;
-import com.qmth.sop.common.enums.TFCustomTypeEnum;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * @Description: appinfo result
- * @Param:
- * @return:
- * @Author: wangliang
- * @Date: 2023/2/17
- */
-public class SopInfoResult implements Serializable {
-
-    @ApiModelProperty(value = "sopid")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long id;
-
-    @ApiModelProperty(value = "服务单元id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long serviceId;
-
-    @ApiModelProperty(value = "服务单元名称")
-    String serviceName;
-
-    @ApiModelProperty(value = "sop单号")
-    String sopNo;
-
-    @ApiModelProperty(value = "crm单号")
-    String crmNo;
-
-    @ApiModelProperty(value = "派单时间")
-    Long beginTime;
-
-    @ApiModelProperty(value = "客户经理id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long customManagerId;
-
-    @ApiModelProperty(value = "客户类型,OFFICE:教务处,CLOUD_MARK:研究生")
-    ProductTypeEnum customManagerType;
-
-    @ApiModelProperty(value = "客户类型str")
-    String customManagerTypeStr;
-
-    @ApiModelProperty(value = "客户名称")
-    String customName;
-
-    @ApiModelProperty(value = "crm名称")
-    String crmName;
-
-    @ApiModelProperty(value = "产品id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long productId;
-
-    @ApiModelProperty(value = "产品名称")
-    String productName;
-
-    @ApiModelProperty(value = "考试开始时间")
-    Long examStartTime;
-
-    @ApiModelProperty(value = "考试结束时间")
-    Long examEndTime;
-
-    @ApiModelProperty(value = "提交人id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long flowCreateId;
-
-    @ApiModelProperty(value = "提交人")
-    String flowCreateName;
-
-    @ApiModelProperty(value = "提交时间")
-    Long flowCreateTime;
-
-    @ApiModelProperty(value = "更新时间")
-    Long flowUpdateTime;
-
-    @ApiModelProperty(value = "流程状态,START:已开始,AUDITING:审核中,REJECT:已驳回,END:已终止,FINISH:已结束")
-    FlowStatusEnum status;
-
-    @ApiModelProperty(value = "流程状态str")
-    String statusStr;
-
-    @ApiModelProperty(value = "流程类型,OFFICE_SOP_FLOW:教务处SOP,CLOUD_MARK_SOP_FLOW:研究生SOP,DING_EXCEPTION_FLOW:考勤异常审核流程,PROJECT_EXCHANGE_FLOW:项目计划变更流程,QUALITY_PROBLEM_FLOW:质量问题反馈流程")
-    TFCustomTypeEnum type;
-
-    @ApiModelProperty(value = "流程类型str")
-    String typeStr;
-
-    @ApiModelProperty(value = "流程版本号")
-    Integer version;
-
-    @ApiModelProperty(value = "流程部署id")
-    String flowDeploymentId;
-
-    @ApiModelProperty(value = "流程id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long flowId;
-
-    @ApiModelProperty(value = "流程节点名称")
-    String taskName;
-
-    @ApiModelProperty(value = "流程节点key")
-    String taskDefKey;
-
-    @ApiModelProperty(value = "流程节点id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    Long taskId;
-
-    @ApiModelProperty(value = "当前节点负责人")
-    String pendApproveName;
-
-    @ApiModelProperty(value = "动态节点")
-    Map<String, Object> dynamicFieldMap;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getServiceId() {
-        return serviceId;
-    }
-
-    public void setServiceId(Long serviceId) {
-        this.serviceId = serviceId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public String getSopNo() {
-        return sopNo;
-    }
-
-    public void setSopNo(String sopNo) {
-        this.sopNo = sopNo;
-    }
-
-    public String getCrmNo() {
-        return crmNo;
-    }
-
-    public void setCrmNo(String crmNo) {
-        this.crmNo = crmNo;
-    }
-
-    public Long getBeginTime() {
-        return beginTime;
-    }
-
-    public void setBeginTime(Long beginTime) {
-        this.beginTime = beginTime;
-    }
-
-    public Long getCustomManagerId() {
-        return customManagerId;
-    }
-
-    public void setCustomManagerId(Long customManagerId) {
-        this.customManagerId = customManagerId;
-    }
-
-    public ProductTypeEnum getCustomManagerType() {
-        return customManagerType;
-    }
-
-    public void setCustomManagerType(ProductTypeEnum customManagerType) {
-        this.customManagerType = customManagerType;
-    }
-
-    public String getCustomManagerTypeStr() {
-        if (Objects.nonNull(this.customManagerType)) {
-            return this.customManagerType.getTitle();
-        } else {
-            return customManagerTypeStr;
-        }
-    }
-
-    public void setCustomManagerTypeStr(String customManagerTypeStr) {
-        this.customManagerTypeStr = customManagerTypeStr;
-    }
-
-    public String getCustomName() {
-        return customName;
-    }
-
-    public void setCustomName(String customName) {
-        this.customName = customName;
-    }
-
-    public String getCrmName() {
-        return crmName;
-    }
-
-    public void setCrmName(String crmName) {
-        this.crmName = crmName;
-    }
-
-    public Long getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Long productId) {
-        this.productId = productId;
-    }
-
-    public String getProductName() {
-        return productName;
-    }
-
-    public void setProductName(String productName) {
-        this.productName = productName;
-    }
-
-    public Long getExamStartTime() {
-        return examStartTime;
-    }
-
-    public void setExamStartTime(Long examStartTime) {
-        this.examStartTime = examStartTime;
-    }
-
-    public Long getExamEndTime() {
-        return examEndTime;
-    }
-
-    public void setExamEndTime(Long examEndTime) {
-        this.examEndTime = examEndTime;
-    }
-
-    public Long getFlowCreateId() {
-        return flowCreateId;
-    }
-
-    public void setFlowCreateId(Long flowCreateId) {
-        this.flowCreateId = flowCreateId;
-    }
-
-    public String getFlowCreateName() {
-        return flowCreateName;
-    }
-
-    public void setFlowCreateName(String flowCreateName) {
-        this.flowCreateName = flowCreateName;
-    }
-
-    public Long getFlowCreateTime() {
-        return flowCreateTime;
-    }
-
-    public void setFlowCreateTime(Long flowCreateTime) {
-        this.flowCreateTime = flowCreateTime;
-    }
-
-    public Long getFlowUpdateTime() {
-        return flowUpdateTime;
-    }
-
-    public void setFlowUpdateTime(Long flowUpdateTime) {
-        this.flowUpdateTime = flowUpdateTime;
-    }
-
-    public FlowStatusEnum getStatus() {
-        return status;
-    }
-
-    public void setStatus(FlowStatusEnum status) {
-        this.status = status;
-    }
-
-    public String getStatusStr() {
-        if (Objects.nonNull(this.status)) {
-            return this.status.getTitle();
-        } else {
-            return statusStr;
-        }
-    }
-
-    public void setStatusStr(String statusStr) {
-        this.statusStr = statusStr;
-    }
-
-    public TFCustomTypeEnum getType() {
-        return type;
-    }
-
-    public void setType(TFCustomTypeEnum type) {
-        this.type = type;
-    }
-
-    public String getTypeStr() {
-        if (Objects.nonNull(this.type)) {
-            return this.type.getTitle();
-        } else {
-            return typeStr;
-        }
-    }
-
-    public void setTypeStr(String typeStr) {
-        this.typeStr = typeStr;
-    }
-
-    public Integer getVersion() {
-        return version;
-    }
-
-    public void setVersion(Integer version) {
-        this.version = version;
-    }
-
-    public String getFlowDeploymentId() {
-        return flowDeploymentId;
-    }
-
-    public void setFlowDeploymentId(String flowDeploymentId) {
-        this.flowDeploymentId = flowDeploymentId;
-    }
-
-    public Long getFlowId() {
-        return flowId;
-    }
-
-    public void setFlowId(Long flowId) {
-        this.flowId = flowId;
-    }
-
-    public String getTaskName() {
-        return taskName;
-    }
-
-    public void setTaskName(String taskName) {
-        this.taskName = taskName;
-    }
-
-    public String getTaskDefKey() {
-        return taskDefKey;
-    }
-
-    public void setTaskDefKey(String taskDefKey) {
-        this.taskDefKey = taskDefKey;
-    }
-
-    public Long getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(Long taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getPendApproveName() {
-        return pendApproveName;
-    }
-
-    public void setPendApproveName(String pendApproveName) {
-        this.pendApproveName = pendApproveName;
-    }
-
-    public Map<String, Object> getDynamicFieldMap() {
-        return dynamicFieldMap;
-    }
-
-    public void setDynamicFieldMap(Map<String, Object> dynamicFieldMap) {
-        this.dynamicFieldMap = dynamicFieldMap;
-    }
-}
+//package com.qmth.sop.business.bean.result;
+//
+//import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+//import com.qmth.sop.common.enums.FlowStatusEnum;
+//import com.qmth.sop.common.enums.ProductTypeEnum;
+//import com.qmth.sop.common.enums.TFCustomTypeEnum;
+//import io.swagger.annotations.ApiModelProperty;
+//
+//import java.io.Serializable;
+//import java.util.Map;
+//import java.util.Objects;
+//
+///**
+// * @Description: appinfo result
+// * @Param:
+// * @return:
+// * @Author: wangliang
+// * @Date: 2023/2/17
+// */
+//public class SopInfoResult implements Serializable {
+//
+//    @ApiModelProperty(value = "sopid")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long id;
+//
+//    @ApiModelProperty(value = "服务单元id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long serviceId;
+//
+//    @ApiModelProperty(value = "服务单元名称")
+//    String serviceName;
+//
+//    @ApiModelProperty(value = "sop单号")
+//    String sopNo;
+//
+//    @ApiModelProperty(value = "crm单号")
+//    String crmNo;
+//
+//    @ApiModelProperty(value = "派单时间")
+//    Long beginTime;
+//
+//    @ApiModelProperty(value = "客户经理id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long customManagerId;
+//
+//    @ApiModelProperty(value = "客户类型,OFFICE:教务处,CLOUD_MARK:研究生")
+//    ProductTypeEnum customManagerType;
+//
+//    @ApiModelProperty(value = "客户类型str")
+//    String customManagerTypeStr;
+//
+//    @ApiModelProperty(value = "客户名称")
+//    String customName;
+//
+//    @ApiModelProperty(value = "crm名称")
+//    String crmName;
+//
+//    @ApiModelProperty(value = "产品id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long productId;
+//
+//    @ApiModelProperty(value = "产品名称")
+//    String productName;
+//
+//    @ApiModelProperty(value = "考试开始时间")
+//    Long examStartTime;
+//
+//    @ApiModelProperty(value = "考试结束时间")
+//    Long examEndTime;
+//
+//    @ApiModelProperty(value = "提交人id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long flowCreateId;
+//
+//    @ApiModelProperty(value = "提交人")
+//    String flowCreateName;
+//
+//    @ApiModelProperty(value = "提交时间")
+//    Long flowCreateTime;
+//
+//    @ApiModelProperty(value = "更新时间")
+//    Long flowUpdateTime;
+//
+//    @ApiModelProperty(value = "流程状态,START:已开始,AUDITING:审核中,REJECT:已驳回,END:已终止,FINISH:已结束")
+//    FlowStatusEnum status;
+//
+//    @ApiModelProperty(value = "流程状态str")
+//    String statusStr;
+//
+//    @ApiModelProperty(value = "流程类型,OFFICE_SOP_FLOW:教务处SOP,CLOUD_MARK_SOP_FLOW:研究生SOP,DING_EXCEPTION_FLOW:考勤异常审核流程,PROJECT_EXCHANGE_FLOW:项目计划变更流程,QUALITY_PROBLEM_FLOW:质量问题反馈流程")
+//    TFCustomTypeEnum type;
+//
+//    @ApiModelProperty(value = "流程类型str")
+//    String typeStr;
+//
+//    @ApiModelProperty(value = "流程版本号")
+//    Integer version;
+//
+//    @ApiModelProperty(value = "流程部署id")
+//    String flowDeploymentId;
+//
+//    @ApiModelProperty(value = "流程id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long flowId;
+//
+//    @ApiModelProperty(value = "流程节点名称")
+//    String taskName;
+//
+//    @ApiModelProperty(value = "流程节点key")
+//    String taskDefKey;
+//
+//    @ApiModelProperty(value = "流程节点id")
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    Long taskId;
+//
+//    @ApiModelProperty(value = "当前节点负责人")
+//    String pendApproveName;
+//
+//    @ApiModelProperty(value = "动态节点")
+//    Map<String, Object> dynamicFieldMap;
+//
+//    public Long getId() {
+//        return id;
+//    }
+//
+//    public void setId(Long id) {
+//        this.id = id;
+//    }
+//
+//    public Long getServiceId() {
+//        return serviceId;
+//    }
+//
+//    public void setServiceId(Long serviceId) {
+//        this.serviceId = serviceId;
+//    }
+//
+//    public String getServiceName() {
+//        return serviceName;
+//    }
+//
+//    public void setServiceName(String serviceName) {
+//        this.serviceName = serviceName;
+//    }
+//
+//    public String getSopNo() {
+//        return sopNo;
+//    }
+//
+//    public void setSopNo(String sopNo) {
+//        this.sopNo = sopNo;
+//    }
+//
+//    public String getCrmNo() {
+//        return crmNo;
+//    }
+//
+//    public void setCrmNo(String crmNo) {
+//        this.crmNo = crmNo;
+//    }
+//
+//    public Long getBeginTime() {
+//        return beginTime;
+//    }
+//
+//    public void setBeginTime(Long beginTime) {
+//        this.beginTime = beginTime;
+//    }
+//
+//    public Long getCustomManagerId() {
+//        return customManagerId;
+//    }
+//
+//    public void setCustomManagerId(Long customManagerId) {
+//        this.customManagerId = customManagerId;
+//    }
+//
+//    public ProductTypeEnum getCustomManagerType() {
+//        return customManagerType;
+//    }
+//
+//    public void setCustomManagerType(ProductTypeEnum customManagerType) {
+//        this.customManagerType = customManagerType;
+//    }
+//
+//    public String getCustomManagerTypeStr() {
+//        if (Objects.nonNull(this.customManagerType)) {
+//            return this.customManagerType.getTitle();
+//        } else {
+//            return customManagerTypeStr;
+//        }
+//    }
+//
+//    public void setCustomManagerTypeStr(String customManagerTypeStr) {
+//        this.customManagerTypeStr = customManagerTypeStr;
+//    }
+//
+//    public String getCustomName() {
+//        return customName;
+//    }
+//
+//    public void setCustomName(String customName) {
+//        this.customName = customName;
+//    }
+//
+//    public String getCrmName() {
+//        return crmName;
+//    }
+//
+//    public void setCrmName(String crmName) {
+//        this.crmName = crmName;
+//    }
+//
+//    public Long getProductId() {
+//        return productId;
+//    }
+//
+//    public void setProductId(Long productId) {
+//        this.productId = productId;
+//    }
+//
+//    public String getProductName() {
+//        return productName;
+//    }
+//
+//    public void setProductName(String productName) {
+//        this.productName = productName;
+//    }
+//
+//    public Long getExamStartTime() {
+//        return examStartTime;
+//    }
+//
+//    public void setExamStartTime(Long examStartTime) {
+//        this.examStartTime = examStartTime;
+//    }
+//
+//    public Long getExamEndTime() {
+//        return examEndTime;
+//    }
+//
+//    public void setExamEndTime(Long examEndTime) {
+//        this.examEndTime = examEndTime;
+//    }
+//
+//    public Long getFlowCreateId() {
+//        return flowCreateId;
+//    }
+//
+//    public void setFlowCreateId(Long flowCreateId) {
+//        this.flowCreateId = flowCreateId;
+//    }
+//
+//    public String getFlowCreateName() {
+//        return flowCreateName;
+//    }
+//
+//    public void setFlowCreateName(String flowCreateName) {
+//        this.flowCreateName = flowCreateName;
+//    }
+//
+//    public Long getFlowCreateTime() {
+//        return flowCreateTime;
+//    }
+//
+//    public void setFlowCreateTime(Long flowCreateTime) {
+//        this.flowCreateTime = flowCreateTime;
+//    }
+//
+//    public Long getFlowUpdateTime() {
+//        return flowUpdateTime;
+//    }
+//
+//    public void setFlowUpdateTime(Long flowUpdateTime) {
+//        this.flowUpdateTime = flowUpdateTime;
+//    }
+//
+//    public FlowStatusEnum getStatus() {
+//        return status;
+//    }
+//
+//    public void setStatus(FlowStatusEnum status) {
+//        this.status = status;
+//    }
+//
+//    public String getStatusStr() {
+//        if (Objects.nonNull(this.status)) {
+//            return this.status.getTitle();
+//        } else {
+//            return statusStr;
+//        }
+//    }
+//
+//    public void setStatusStr(String statusStr) {
+//        this.statusStr = statusStr;
+//    }
+//
+//    public TFCustomTypeEnum getType() {
+//        return type;
+//    }
+//
+//    public void setType(TFCustomTypeEnum type) {
+//        this.type = type;
+//    }
+//
+//    public String getTypeStr() {
+//        if (Objects.nonNull(this.type)) {
+//            return this.type.getTitle();
+//        } else {
+//            return typeStr;
+//        }
+//    }
+//
+//    public void setTypeStr(String typeStr) {
+//        this.typeStr = typeStr;
+//    }
+//
+//    public Integer getVersion() {
+//        return version;
+//    }
+//
+//    public void setVersion(Integer version) {
+//        this.version = version;
+//    }
+//
+//    public String getFlowDeploymentId() {
+//        return flowDeploymentId;
+//    }
+//
+//    public void setFlowDeploymentId(String flowDeploymentId) {
+//        this.flowDeploymentId = flowDeploymentId;
+//    }
+//
+//    public Long getFlowId() {
+//        return flowId;
+//    }
+//
+//    public void setFlowId(Long flowId) {
+//        this.flowId = flowId;
+//    }
+//
+//    public String getTaskName() {
+//        return taskName;
+//    }
+//
+//    public void setTaskName(String taskName) {
+//        this.taskName = taskName;
+//    }
+//
+//    public String getTaskDefKey() {
+//        return taskDefKey;
+//    }
+//
+//    public void setTaskDefKey(String taskDefKey) {
+//        this.taskDefKey = taskDefKey;
+//    }
+//
+//    public Long getTaskId() {
+//        return taskId;
+//    }
+//
+//    public void setTaskId(Long taskId) {
+//        this.taskId = taskId;
+//    }
+//
+//    public String getPendApproveName() {
+//        return pendApproveName;
+//    }
+//
+//    public void setPendApproveName(String pendApproveName) {
+//        this.pendApproveName = pendApproveName;
+//    }
+//
+//    public Map<String, Object> getDynamicFieldMap() {
+//        return dynamicFieldMap;
+//    }
+//
+//    public void setDynamicFieldMap(Map<String, Object> dynamicFieldMap) {
+//        this.dynamicFieldMap = dynamicFieldMap;
+//    }
+//}

+ 6 - 4
sop-business/src/main/java/com/qmth/sop/business/mapper/TBSopInfoMapper.java

@@ -2,8 +2,6 @@ package com.qmth.sop.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.sop.business.bean.params.FormWidgetMetadataParam;
-import com.qmth.sop.business.bean.result.SopInfoResult;
 import com.qmth.sop.business.entity.TBSopInfo;
 import org.apache.ibatis.annotations.Param;
 
@@ -73,10 +71,14 @@ public interface TBSopInfoMapper extends BaseMapper<TBSopInfo> {
      * sop列表接口
      *
      * @param iPage
+     * @param type
      * @param serviceId
-     * @param formWidgetMetadataList
+     * @param fieldName
+     * @param fieldValue
      * @return
      */
     @SuppressWarnings("MybatisXMapperMethodInspection")
-    IPage<SopInfoResult> list(IPage<Map> iPage, @Param("serviceId") Long serviceId, @Param("formWidgetMetadataList") List<FormWidgetMetadataParam> formWidgetMetadataList, @Param("userIdList") List<Long> userIdList);
+    IPage<Map> list(IPage<Map> iPage, @Param("type") String type, @Param("serviceId") Long serviceId, @Param("fieldName") String fieldName, @Param("fieldValue") String fieldValue
+//            , @Param("userIdList") List<Long> userIdList
+    );
 }

+ 3 - 2
sop-business/src/main/java/com/qmth/sop/business/service/TBSopInfoService.java

@@ -7,11 +7,12 @@ import com.qmth.sop.business.bean.params.SopApplyParam;
 import com.qmth.sop.business.bean.params.SopInfoListParam;
 import com.qmth.sop.business.bean.params.SopPublishParam;
 import com.qmth.sop.business.bean.result.FlowTaskResult;
-import com.qmth.sop.business.bean.result.SopInfoResult;
 import com.qmth.sop.business.entity.TBSopInfo;
 import com.qmth.sop.business.entity.TFCustomFlow;
 import com.qmth.sop.common.enums.FlowApprovePassEnum;
 
+import java.util.Map;
+
 /**
  * <p>
  * sop表 服务类
@@ -82,7 +83,7 @@ public interface TBSopInfoService extends IService<TBSopInfo> {
      * @param sopInfoListParam
      * @return
      */
-    IPage<SopInfoResult> list(SopInfoListParam sopInfoListParam);
+    IPage<Map> list(SopInfoListParam sopInfoListParam);
 
     /**
      * sop申请或发布

+ 23 - 13
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -6,22 +6,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.sop.business.activiti.service.ActivitiService;
-import com.qmth.sop.business.bean.params.FlowApproveParam;
-import com.qmth.sop.business.bean.params.SopApplyParam;
-import com.qmth.sop.business.bean.params.SopInfoListParam;
-import com.qmth.sop.business.bean.params.SopPublishParam;
+import com.qmth.sop.business.bean.params.*;
 import com.qmth.sop.business.bean.result.CrmProjectResult;
 import com.qmth.sop.business.bean.result.FlowFormWidgetResult;
 import com.qmth.sop.business.bean.result.FlowTaskResult;
-import com.qmth.sop.business.bean.result.SopInfoResult;
 import com.qmth.sop.business.entity.*;
 import com.qmth.sop.business.mapper.TBSopInfoMapper;
 import com.qmth.sop.business.service.*;
 import com.qmth.sop.common.contant.SystemConstant;
-import com.qmth.sop.common.enums.ExceptionResultEnum;
-import com.qmth.sop.common.enums.FlowApprovePassEnum;
-import com.qmth.sop.common.enums.TFCustomTypeEnum;
-import com.qmth.sop.common.enums.WidgetCodeEnum;
+import com.qmth.sop.common.enums.*;
 import com.qmth.sop.common.util.JacksonUtil;
 import com.qmth.sop.common.util.ServletUtil;
 import org.activiti.engine.TaskService;
@@ -282,10 +275,27 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
      * @return
      */
     @Override
-    public IPage<SopInfoResult> list(SopInfoListParam sopInfoListParam) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        List<Long> userIdList = !CollectionUtils.isEmpty(sopInfoListParam.getUserIdList()) ? sopInfoListParam.getUserIdList() : Arrays.asList(sysUser.getId());
-        return this.baseMapper.list(new Page<>(sopInfoListParam.getPageNumber(), sopInfoListParam.getPageSize()), sopInfoListParam.getServiceId(), sopInfoListParam.getFormWidgetMetadataList(), userIdList);
+    public IPage<Map> list(SopInfoListParam sopInfoListParam) {
+//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+//        List<Long> userIdList = !CollectionUtils.isEmpty(sopInfoListParam.getUserIdList()) ? sopInfoListParam.getUserIdList() : Arrays.asList(sysUser.getId());
+        String fieldName = null, fieldValue = null;
+        if (!CollectionUtils.isEmpty(sopInfoListParam.getFormWidgetMetadataList())) {
+            StringJoiner stringJoiner = new StringJoiner(",");
+            StringJoiner stringJoinerValue = new StringJoiner("");
+            for (FormWidgetMetadataParam f : sopInfoListParam.getFormWidgetMetadataList()) {
+                stringJoiner.add(f.getFieldId());
+                if (Objects.nonNull(f.getOperator())) {
+                    if (f.getOperator() == FormWidgetMetadataOperator.LIKE) {
+                        stringJoinerValue.add(SystemConstant.AND).add(f.getFieldId()).add(f.getOperator().getCode()).add("('%',").add(f.getFieldValue()).add(",'%')").add("\r\n");
+                    } else {
+                        stringJoinerValue.add(SystemConstant.AND).add(f.getFieldId()).add(f.getOperator().getCode()).add(f.getFieldValue()).add("\r\n");
+                    }
+                }
+            }
+            fieldName = stringJoiner.toString();
+            fieldValue = !Objects.equals(stringJoinerValue.toString().trim(), "") ? stringJoinerValue.toString().trim() : null;
+        }
+        return this.baseMapper.list(new Page<>(sopInfoListParam.getPageNumber(), sopInfoListParam.getPageSize()), Objects.nonNull(sopInfoListParam.getType()) ? sopInfoListParam.getType().name() : null, sopInfoListParam.getServiceId(), fieldName, fieldValue);
     }
 
     /**

+ 18 - 3
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -41,7 +41,7 @@
         SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=#{tableName}
     </select>
 
-    <select id="list" resultType="com.qmth.sop.business.bean.result.SopInfoResult">
+    <select id="list" resultType="java.util.Map">
         select tbsi.id,
                tbs.id as serviceId,
                tbs.name as serviceName,
@@ -51,6 +51,7 @@
                sc.manager_id as customManagerId,
                su1.real_name as customManagerName,
                sc.type as customManagerType,
+               IF(sc.type = 'OFFICE','教务处','研究生') as customManagerTypeStr,
                sc.name as customName,
                tbc.name as crmName,
                tbp.id as productId,
@@ -62,7 +63,9 @@
                tfcfe.create_time as flowCreateTime,
                tfcfe.update_time as flowUpdateTime,
                tffa.status,
+               IF(tffa.status = 'FINISH','已完结','进行中') as statusStr,
                tfcf.type,
+               IF(tfcf.type = 'OFFICE_SOP_FLOW','教务处SOP','研究生SOP') as typeStr,
                tfcf.version,
                tfcf.flow_deployment_id as flowDeploymentId,
                art.PROC_INST_ID_ as flowId,
@@ -71,6 +74,9 @@
                art.ID_ as taskId,
                (select group_concat(us1.real_name SEPARATOR ';') from sys_user us1
                 where find_in_set(us1.id, (select tffl.pend_approve_id from t_f_flow_log tffl where tffl.flow_id = tfcfe.flow_id order by tffl.create_time desc limit 1))) as pendApproveName
+                <if test="fieldName != null and fieldName != ''">
+                    ,${fieldName}
+                </if>
         from t_b_sop_info tbsi
                  left join t_b_crm tbc on tbc.crm_no = tbsi.crm_no
                  left join t_b_service tbs on tbs.id = tbsi.service_id
@@ -84,7 +90,16 @@
                  left join t_f_custom_flow tfcf on tfcf.id = tfcfe.t_f_custom_flow_id
                  left join t_b_sop_dynamic_office_1 tbsdo1 on tbsdo1.flow_deployment_id = tfcf.flow_deployment_id
         <where> 1 = 1
-            and EXISTS(
+            <if test="type != null and type != ''">
+                and tfcf.type = #{type}
+            </if>
+            <if test="serviceId != null and serviceId != ''">
+                and tbs.id = #{serviceId}
+            </if>
+            <if test="fieldValue != null and fieldValue != ''">
+                ${fieldValue}
+            </if>
+            <!--and EXISTS(
             select t.* from(select cast(art.PROC_INST_ID_ as Decimal(24)) as flowId
             from
             ACT_RU_TASK art
@@ -110,7 +125,7 @@
                     #{item}
                 </foreach>
             </if>
-            and ari.TYPE_ = 'candidate') t where t.flowId = art.PROC_INST_ID_)
+            and ari.TYPE_ = 'candidate') t where t.flowId = art.PROC_INST_ID_)-->
          </where>
     </select>
 </mapper>

+ 1 - 0
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -99,6 +99,7 @@ public class SystemConstant {
     public static final String ERROR_METHOD = "method";
     public static final String LIST_JOIN_SPLIT = ",";
     public static final String JOB_DATA = "jobData";
+    public static final String AND = " and ";
 
     /**
      * 流程动态表单字段

+ 42 - 0
sop-common/src/main/java/com/qmth/sop/common/enums/FormWidgetMetadataOperator.java

@@ -0,0 +1,42 @@
+package com.qmth.sop.common.enums;
+
+/**
+ * @Description: 动态表单运算符enum
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2023/9/7
+ */
+public enum FormWidgetMetadataOperator {
+
+    EQ("等于", " = "),
+
+    NE("不等于", " <> "),
+
+    GT("大于", " > "),
+
+    LT("小于", " < "),
+
+    GE("大于等于", " >= "),
+
+    LE("小于等于", " <= "),
+
+    LIKE("模糊查询", " like concat ");
+
+    private String title;
+
+    private String code;
+
+    private FormWidgetMetadataOperator(String title, String code) {
+        this.title = title;
+        this.code = code;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public String getCode() {
+        return code;
+    }
+}