oyq28 2 өдөр өмнө
parent
commit
1c0626c80e

+ 8 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/mq/TaskWorkNode.java

@@ -193,6 +193,8 @@ public class TaskWorkNode {
 
     private boolean lockCondition = true;
 
+    private String feedBack;
+
     public void updateTaskStatusJob(String data, String consumerQueue, int priority) throws InterruptedException {
 
         String returnData = "";
@@ -290,7 +292,7 @@ public class TaskWorkNode {
         tTask = taskMapper.selectById(taskNode.getTaskId());
         //初始化业务日志
         log = getBusinessLog(tTask, taskNode);
-
+        feedBack = log.getFeedback();
         try {
             lockFlag = lock.tryLock();
             lockCondition = checkFlowCondition(tTask);
@@ -606,7 +608,7 @@ public class TaskWorkNode {
 
             //插入执行日志
             log.setStatus("0").setExeResult("0").setManual("1").setFeedback(e.getMessage());
-            autoNodeLogMapper.updateAllById(log);
+            //autoNodeLogMapper.updateAllById(log);
 
             e.printStackTrace();
         } finally {
@@ -672,8 +674,10 @@ public class TaskWorkNode {
             if (log.getId() == null) {
                 autoNodeLogService.save(log);
             } else {
-                log.setExecuteTime(new Date());
-                autoNodeLogService.updateAllById(log);
+                if(log.getFeedback()!=feedBack) {
+                    log.setExecuteTime(new Date());
+                    autoNodeLogService.updateAllById(log);
+                }
             }
             logger.info("specialCallBackMyselfFlag={}",specialCallBackMyselfFlag);
             if(specialCallBackMyselfFlag){

+ 2 - 1
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/ToolQueryController.java

@@ -164,6 +164,7 @@ public class ToolQueryController {
         Map map = new HashMap();
         map.put(YunjianConstant.YUNJIAN_SHEDULE_FLAG, (null != msgUtil.redis_get(YunjianConstant.YUNJIAN_SHEDULE_FLAG)? 1:0));
         map.put(YunjianConstant.YUNJIAN_XBK_SCHEDULE, (null != msgUtil.redis_get(YunjianConstant.YUNJIAN_XBK_SCHEDULE)? 1:0));
+
         map.put("PRIORITY_LOCK", (null != msgUtil.redis_get("PRIORITY_LOCK"))? 1:0);
 
         return R.success(map);
@@ -259,7 +260,7 @@ public class ToolQueryController {
      * 处理超时节点
      *
      */
-    @Scheduled(cron="0 0/10 * * * ?")
+    //@Scheduled(cron="0 0/10 * * * ?")
     public void cronTaskNode(){
         Date date = DateUtils.addMinutes(new Date(), -20);
         Map map = new HashMap();

+ 8 - 10
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/StationUserController.java

@@ -1,10 +1,7 @@
 package com.github.zuihou.business.controller.productionResourceCenter;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.zuihou.authority.dao.auth.StationUserLoginInfoMapper;
 import com.github.zuihou.authority.entity.auth.StationUserLoginInfo;
-import com.github.zuihou.authority.entity.common.DictionaryItem;
 import com.github.zuihou.base.R;
 import com.github.zuihou.base.controller.SuperController;
 import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
@@ -12,7 +9,10 @@ import com.github.zuihou.business.edgeLibrary.entity.Storge;
 import com.github.zuihou.business.edgeLibrary.service.StockInfoService;
 import com.github.zuihou.business.edgeLibrary.service.StorgeService;
 import com.github.zuihou.business.operationManagementCenter.dto.OrderUpdateDTO;
-import com.github.zuihou.business.operationManagementCenter.entity.*;
+import com.github.zuihou.business.operationManagementCenter.entity.Order;
+import com.github.zuihou.business.operationManagementCenter.entity.OrderTask;
+import com.github.zuihou.business.operationManagementCenter.entity.Plan;
+import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
 import com.github.zuihou.business.operationManagementCenter.service.OrderService;
 import com.github.zuihou.business.operationManagementCenter.service.OrderTaskService;
 import com.github.zuihou.business.operationManagementCenter.service.PlanService;
@@ -26,12 +26,11 @@ import com.github.zuihou.business.productionResourceCenter.dto.StationUserUpdate
 import com.github.zuihou.business.productionResourceCenter.entity.Productionresource;
 import com.github.zuihou.business.productionResourceCenter.entity.StationUser;
 import com.github.zuihou.business.productionResourceCenter.service.StationUserService;
-import com.github.zuihou.common.util.StringUtil;
+import com.github.zuihou.common.util.DateUtil;
 import com.github.zuihou.database.mybatis.conditions.Wraps;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.update.LbuWrapper;
 import com.github.zuihou.log.annotation.SysLog;
-import com.google.common.collect.Maps;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -41,7 +40,6 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.*;
-import java.util.stream.Collectors;
 
 
 /**
@@ -212,9 +210,9 @@ public class StationUserController extends SuperController<StationUserService, L
     public R addJbwTask(@RequestBody Map<String,Object> model) {
         Map<String, Object> params = new HashMap<String, Object>(){
             {
-                put("deliveryTime", new Date());
+                put("deliveryTime", DateUtil.dateToString(new Date()));
                 put("hasMaterial", "1");
-                put("orderTime", new Date());
+                put("orderTime", DateUtil.dateToString(new Date()));
                 put("singleTaskFlag", "1");
                 put("status", "1");
                 put("zoneId", Long.parseLong(model.get("zoneId").toString()));
@@ -226,7 +224,7 @@ public class StationUserController extends SuperController<StationUserService, L
                 put("id", model.get("materialId").toString());
                 put("bomId", model.get("bomId").toString());
                 put("bomNum","1");
-                put("deliveryTime", new Date());
+                put("deliveryTime", DateUtil.dateToString(new Date()));
             }
         };
         MMeterialReceiveLog mMeterialReceiveLog = meterialReceiveLogService.getOne(new LbqWrapper<MMeterialReceiveLog>().eq(MMeterialReceiveLog::getMeterialId, model.get("materialId").toString()).last("limit 1"));