wangliang 9 달 전
부모
커밋
3f743d96c6

+ 9 - 22
sop-business/src/main/java/com/qmth/sop/business/activiti/listener/ProcessEventListener.java

@@ -16,7 +16,6 @@ import com.qmth.sop.business.util.SmsSendUtil;
 import com.qmth.sop.common.contant.SpringContextHolder;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.*;
-import com.qmth.sop.common.lock.MemoryLock;
 import com.qmth.sop.common.util.JacksonUtil;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.TaskService;
@@ -182,28 +181,16 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
                         Optional.ofNullable(tfCustomFlowEntity)
                                 .orElseThrow(() -> ExceptionResultEnum.FLOW_ENTITY_NO_DATA.exception());
                         //此处统一发送流程节点待办消息
-                        MemoryLock memoryLock = SpringContextHolder.getBean(MemoryLock.class);
-                        String key = tfCustomFlowEntity.getCode() + tfFlowLog.getId();
-                        boolean lock = memoryLock.lock(SystemConstant.LOCK_FLOW_TASK_MSG_PREFIX + key, key,
-                                SystemConstant.LOCK_FLOW_MSG_TIME_OUT);
-                        if (lock) {
-                            try {
-                                if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
-                                        && tfFlowLog.getApproveSetup().intValue() == 3) {
-                                    Boolean finish = (Boolean) taskService.getVariable(task.getId(),
-                                            SystemConstant.FINISH);
-                                    if (Objects.nonNull(finish) && finish) {
-                                        activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
-                                                tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()),
-                                                task.getName());
-                                    }
-                                } else {
-                                    activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
-                                            tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
-                                }
-                            } finally {
-                                memoryLock.unlock(SystemConstant.LOCK_FLOW_TASK_PREFIX + key);
+                        if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
+                                && tfFlowLog.getApproveSetup().intValue() == 3) {
+                            Boolean finish = (Boolean) taskService.getVariable(task.getId(), SystemConstant.FINISH);
+                            if (Objects.nonNull(finish) && finish) {
+                                activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
+                                        tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
                             }
+                        } else {
+                            activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
+                                    tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
                         }
                     }
                 }

+ 5 - 9
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -225,13 +225,13 @@ public class SystemConstant {
     public static final String SIGN_REGION = "sign_region";
     //    public static final String THIRD_SERVICE_REGION_CB = "third_service_region_cb";
 
-//    public static final String DEVICE_OUT_TIME = "device_out_time";//设备出库时间
+    //    public static final String DEVICE_OUT_TIME = "device_out_time";//设备出库时间
 
     public static final String DEVICE_OUT_TABLE = "device_out_table";//设备出库
 
-//    public static final String DEVICE_IN_TIME = "device_in_time";//设备入库时间
+    //    public static final String DEVICE_IN_TIME = "device_in_time";//设备入库时间
 
-//    public static final String DEVICE_IN_TABLE = "device_in_table";//设备入库
+    //    public static final String DEVICE_IN_TABLE = "device_in_table";//设备入库
 
     //质量问题反馈
     public static final String PROBLEM_POINT = "problem_point";
@@ -441,9 +441,9 @@ public class SystemConstant {
 
     public static final String PREFIX_URL_PROJECT_MONITOR = "/admin/project/monitor";
 
-    public static final String PREFIX_URL_SERVICE_ANALYSE = "/admin/service/analyse";
+//    public static final String PREFIX_URL_SERVICE_ANALYSE = "/admin/service/analyse";
 
-    public static final String PREFIX_URL_CRM_PROCESS_MONITOR = "/admin/crm/process/monitor";
+//    public static final String PREFIX_URL_CRM_PROCESS_MONITOR = "/admin/crm/process/monitor";
 
     /**
      * 缓存配置
@@ -577,8 +577,6 @@ public class SystemConstant {
     /**
      * 锁
      */
-    public static final String LOCK_FLOW_TASK_MSG_PREFIX = "lock:flow:task:msg";//流程节点消息锁
-
     public static final String LOCK_FLOW_TASK_PREFIX = "lock:flow:task:";//流程节点锁
 
     public static final String LOCK_FLOW_END_PREFIX = "lock:flow:end:";//流程结束锁
@@ -603,8 +601,6 @@ public class SystemConstant {
 
     public static final Long LOCK_FLOW_TIME_OUT = 60L * 2 * 1000;
 
-    public static final Long LOCK_FLOW_MSG_TIME_OUT = 60L * 2 * 1000;
-
     public static final Long LOCK_SEQUENCE_TIME_OUT = 60L * 1 * 1000;
 
     public static final Long LOCK_JOB_TIME_OUT = 60L * 5 * 1000;