2 Commits e45e82ff14 ... b3d69f7773

Author SHA1 Message Date
  wudingsheng b3d69f7773 大屏展示优化 1 week ago
  wudingsheng eb536fff1d 增加半自动化取放记录 3 months ago

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskServiceImpl.java

@@ -1968,7 +1968,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
                         // 已加工时长
                         // 已加工时长
                         int finalResult = (int) Math.round(result);
                         int finalResult = (int) Math.round(result);
                         item.setProcessedTime(finalResult);
                         item.setProcessedTime(finalResult);
-                        item.setPoint(finalPoint);
+                        item.setPoint(finalPoint>=100?100:finalPoint);
                         item.setRemainTime();
                         item.setRemainTime();
                     }else{
                     }else{
                         double result = ((beforeUseTime) / (60));
                         double result = ((beforeUseTime) / (60));
@@ -1977,7 +1977,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
                         // 已加工时长
                         // 已加工时长
                         int finalResult = (int) Math.round(result);
                         int finalResult = (int) Math.round(result);
                         item.setProcessedTime(finalResult);
                         item.setProcessedTime(finalResult);
-                        item.setPoint(finalPoint);
+                        item.setPoint(finalPoint>=100?100:finalPoint);
                         item.setRemainTime();
                         item.setRemainTime();
                     }
                     }
 
 

+ 10 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/ToolbarController.java

@@ -25,7 +25,9 @@ import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
 import com.github.zuihou.business.operationManagementCenter.service.TaskNodeService;
 import com.github.zuihou.business.operationManagementCenter.service.TaskNodeService;
 import com.github.zuihou.business.operationManagementCenter.service.TaskService;
 import com.github.zuihou.business.operationManagementCenter.service.TaskService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
+import com.github.zuihou.business.productionReadyCenter.entity.AAutoNodeLog;
 import com.github.zuihou.business.productionReadyCenter.entity.Tray;
 import com.github.zuihou.business.productionReadyCenter.entity.Tray;
+import com.github.zuihou.business.productionReadyCenter.service.AAutoNodeLogService;
 import com.github.zuihou.business.productionReadyCenter.service.TrayService;
 import com.github.zuihou.business.productionReadyCenter.service.TrayService;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
 import com.github.zuihou.business.productionResourceCenter.entity.Productionresource;
 import com.github.zuihou.business.productionResourceCenter.entity.Productionresource;
@@ -109,6 +111,9 @@ public class ToolbarController {
     @Autowired
     @Autowired
     private TrayService trayService;
     private TrayService trayService;
 
 
+    @Autowired
+    private AAutoNodeLogService autoNodeLogService;
+
     private static final String CCS_URL="http://localhost:8089/api/";
     private static final String CCS_URL="http://localhost:8089/api/";
 
 
     @ApiOperation(value = "更新库位位置", notes = "更新库位位置")
     @ApiOperation(value = "更新库位位置", notes = "更新库位位置")
@@ -220,6 +225,7 @@ public class ToolbarController {
 
 
         param.put("data",map);
         param.put("data",map);
         String result = msgUtil.httpForPost(CCS_URL + "RobotAction",param.toJSONString());
         String result = msgUtil.httpForPost(CCS_URL + "RobotAction",param.toJSONString());
+        //String result ="{\"result\": \"true\"}";
         if(StringUtil.isNotEmpty(result)){
         if(StringUtil.isNotEmpty(result)){
             cn.hutool.json.JSONObject returnJson = JSONUtil.parseObj(result);
             cn.hutool.json.JSONObject returnJson = JSONUtil.parseObj(result);
             if (returnJson.get("result") !=null &&"true".equals(returnJson.get("result"))) {
             if (returnJson.get("result") !=null &&"true".equals(returnJson.get("result"))) {
@@ -232,6 +238,10 @@ public class ToolbarController {
         UpdateWrapper<StockInfo> updateWrapper = new UpdateWrapper<StockInfo>();
         UpdateWrapper<StockInfo> updateWrapper = new UpdateWrapper<StockInfo>();
         updateWrapper.lambda().eq(StockInfo::getStorgeId, startStorge.getId()).le(StockInfo::getGoodsType, 4).set(StockInfo::getStorgeId, goalStorge.getId());
         updateWrapper.lambda().eq(StockInfo::getStorgeId, startStorge.getId()).le(StockInfo::getGoodsType, 4).set(StockInfo::getStorgeId, goalStorge.getId());
         stockInfoService.update(null, updateWrapper);
         stockInfoService.update(null, updateWrapper);
+        AAutoNodeLog autoNodeLog=new AAutoNodeLog();
+        autoNodeLog.setStartStorge(start);
+        autoNodeLog.setEndStorge(goal);
+        autoNodeLogService.save(autoNodeLog);
         return R.success();
         return R.success();
     }
     }
 
 

+ 1 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/centralToolMagazine/dto/ChfTwoDatas.java

@@ -36,6 +36,6 @@ public class ChfTwoDatas {
     private int sumTime;
     private int sumTime;
 
 
     public void setRemainTime() {
     public void setRemainTime() {
-        this.remainTime = sumTime-processedTime;
+        this.remainTime = sumTime-processedTime <= 0 ? 0 : sumTime-processedTime;
     }
     }
 }
 }