Kaynağa Gözat

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API

zx 2 yıl önce
ebeveyn
işleme
e66dea5649

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java

@@ -262,7 +262,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         //发送空委托
         map.put("firstMC", 1); //空委托依据
         int checkMeasureCommission = tmstruckMeasureCommissionService.addSteelMeasureCommission(map);
-        if(checkMeasureCommission == 1){
+        if(checkMeasureCommission == 1 && DataChange.dataToBigDecimal(map.get("orderType")).intValue() == 1){
             //查询是否拼装
             Map<String, Object> isSpellingMap = tmstruckEnfactoryResultMapper.getSteelIsSpelling(resultTotalId);
             int isSpelling = DataChange.dataToBigDecimal(isSpellingMap.get("isSpelling")).intValue();

+ 14 - 5
src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java

@@ -11,6 +11,7 @@ import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.HTTPRequestUtils;
 import com.steerinfo.dil.util.getRequestUtils;
 import io.swagger.models.auth.In;
+import org.apache.http.ParseException;
 import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -105,13 +106,22 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
                 String url = "http://172.16.33.122:44325/api/logistics/modifyLoadPlace";
                 String ysdd = (String) map.get("orderNumber");
                 String memo = (String) map.get("insertUpdateRemark");
-                String sendUrl = url + "?ysdd=" + ysdd + "&loadingPace=" + loadingPace;
+                Map<String, Object> loadMap = new HashMap<>();
+                loadMap.put("ysdd",ysdd);
+                loadMap.put("loadingPace",loadingPace);
                 if (memo != null) {
-                    sendUrl += "&memo=" + memo;
+                    loadMap.put("memo",memo);
+                }
+                JSONObject json = new JSONObject(loadMap);
+                String sendUrl = url ;
+                String jsonData = null;
+                try {
+                    jsonData = HTTPRequestUtils.send(sendUrl, json,"utf-8");
+                } catch (ParseException e) {
+                    e.printStackTrace();
                 }
-                String jsonData = getRequestUtils.doGet(sendUrl);
                 System.out.println(sendUrl);
-                System.out.println("委托已发送" + jsonData);
+                System.out.println("装货点已发送" + json);
                 MeasureJsonData measureJsonData = new MeasureJsonData();
                 BigDecimal measureId = measureJsonDataMapper.selectMaxId();
                 //设置主键id
@@ -582,7 +592,6 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("data", sendMap);
         String jsonData = null;
-
         try {
             jsonData = HTTPRequestUtils.send(daGangUrl, jsonObject, "utf-8");
         } catch (IOException e) {