From 019f1c8bac7e8986d299aff70c123dedc1747d72 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期四, 06 六月 2024 11:15:10 +0800
Subject: [PATCH] -

---
 jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
index 9e5c973..428775a 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -1,6 +1,7 @@
 package com.jcdm.main.restful.qingYan.service;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
@@ -9,6 +10,7 @@
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.jcdm.common.core.domain.AjaxResult;
+import com.jcdm.common.utils.StringUtils;
 import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
 import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService;
 import com.jcdm.main.constant.Constants;
@@ -35,6 +37,8 @@
 @RestController
 @RequestMapping("/jcdmMes")
 public class ExternalInterface {
+    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @Autowired
     private IDaTestDeviceInterfaceService daTestDeviceInterfaceService;
     @Autowired
@@ -54,8 +58,9 @@
 
     private IDaPassingStationCollectionService passingStationCollectionService;
 
+//    String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
 
-    String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
+    String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
 
     /**
      * 瀵煎嚭鐐规浠诲姟鍒楄〃
@@ -147,7 +152,17 @@
         daTestDeviceInterface.setProductNum(parentVO.getProductNum());
         daTestDeviceInterface.setTotalResult(parentVO.getTotalResult());
         daTestDeviceInterface.setCheckList(s);
+        daTestDeviceInterface.setCreateTime(new Date());
         daTestDeviceInterfaceService.save(daTestDeviceInterface);
+        if(parentVO.getStationCode().contains("OP480")){
+            if(StringUtils.isNotBlank(parentVO.getProductNum())){
+                OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum()));
+                if(ObjectUtil.isNotNull(one)){
+                    one.setTrolleyYard("");
+                    omProductionOrdeInfoService.saveOrUpdate(one);
+                }
+            }
+        }
         HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
         return AjaxResult.success(execute.body());
     }
@@ -162,7 +177,8 @@
             order.setProductNum(omProductionOrdeInfo.getProductNum());
             order.setMaterialCode(omProductionOrdeInfo.getMaterialCode());
             order.setStationCode(omProductionOrdeInfo.getStationCode());
-//            order.setPlanQty(omProductionOrdeInfo.getPlanQty());
+            order.setPlanQty(omProductionOrdeInfo.getPlanQty());
+            order.setCreateTime(format.format(omProductionOrdeInfo.getCreateTime()));
             restFulOrders.add(order);
         }
         return AjaxResult.success(restFulOrders);

--
Gitblit v1.9.3