Tiroble 3 éve
szülő
commit
6ee780e400

+ 23 - 6
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -219,27 +219,44 @@ public class TmstruckReceiptResultController extends BaseRESTfulController {
     @PostMapping("/getReceivingPhoto")
     public RESTfulResult getReceivingPhoto(@RequestParam String orderNumber) throws Exception {
         List<Map<String,Object>> mapList = tmstruckReceiptResultService.getReceivingPhoto(orderNumber);
-
+        Map<String,Object> result=new HashMap<>();
         for(Map<String,Object> map:mapList){
             if(map.containsKey("resultEmptyContainerPhoto") && map.get("resultEmptyContainerPhoto")!=null){
                 String resultEmptyContainerPhoto = (String) imageFileUtils.downloadFile(map.get("resultEmptyContainerPhoto").toString());
-                map.put("resultEmptyContainerPhoto",resultEmptyContainerPhoto);
+                result.put("resultEmptyContainerPhoto",resultEmptyContainerPhoto);
             }
             if(map.containsKey("resultSignedNotePhoto") && map.get("resultSignedNotePhoto")!=null){
                 String resultSignedNotePhoto = (String) imageFileUtils.downloadFile(map.get("resultSignedNotePhoto").toString());
-              map.put("resultSignedNotePhoto",resultSignedNotePhoto);
+                result.put("resultSignedNotePhoto",resultSignedNotePhoto);
+            }
+            //追加的图片
+            if(map.containsKey("otherPhoto1") && map.get("otherPhoto1")!=null){
+                String resultSignedNotePhoto =(String) imageFileUtils.downloadFile(map.get("otherPhoto1").toString());
+                result.put("otherPhoto1",resultSignedNotePhoto);
+            }
+            if(map.containsKey("otherPhoto2") && map.get("otherPhoto2") !=null){
+                String resultSignedNotePhoto =(String) imageFileUtils.downloadFile(map.get("otherPhoto2").toString());
+                result.put("otherPhoto2",resultSignedNotePhoto);
+            }
+            if(map.containsKey("otherPhoto3") && map.get("otherPhoto3") !=null){
+                String resultSignedNotePhoto =(String) imageFileUtils.downloadFile(map.get("otherPhoto3").toString());
+                result.put("otherPhoto3",resultSignedNotePhoto);
             }
         }
-
-        return success(mapList.get(0));
+        return success(result);
     }
     @ApiOperation(value = "获取收货作业照片")
     @PostMapping("/getReceivingPhotoByUrl")
     public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber) throws Exception {
         List<Map<String,Object>> mapList = tmstruckReceiptResultService.getReceivingPhoto(orderNumber);
         Map<String,Object> mapvalue = null;
-        if (mapList!=null){
+        if (mapList!=null && mapList.size()>0){
+            //必选的图片
             mapvalue=mapList.get(0);
+            //追加的三张图片
+            if(mapList.get(1)!=null){
+               mapvalue.putAll(mapList.get(1));
+            }
         }
         
         return mapvalue;

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java

@@ -38,4 +38,6 @@ public interface TmstruckReceiptResultMapper extends IBaseMapper<TmstruckReceipt
     List<Map<String, Object>> getReceivingResult(Map<String, Object> mapValue);
 
     List<Map<String, Object>> getReceivingPhoto(String orderNumber);
+
+    List<Map<String,Object>> getChildPhoto(String orderNumber);
 }

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

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -83,7 +84,10 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
 
     @Override
     public List<Map<String, Object>> getReceivingPhoto(String orderNumber) {
-        return tmstruckReceiptResultMapper.getReceivingPhoto(orderNumber);
+        List<Map<String,Object>> photos=new ArrayList<>();
+        photos.addAll(tmstruckReceiptResultMapper.getReceivingPhoto(orderNumber));//主表的图片
+        photos.addAll(tmstruckReceiptResultMapper.getChildPhoto(orderNumber));//子表三张追加的图片
+        return photos;
     }
 
     /**

+ 7 - 0
src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java

@@ -851,8 +851,15 @@ public class RouteServiceImpl implements RouteService {
     public CurrentLocationResult getCurrentLocation(String capcityNumber) throws Exception {
         String json = zhongJiaoXingLu.vLastLocationV3(capcityNumber);
         CurrentLocationResult currentLocationResult = (CurrentLocationResult) DataConversionTool.jsonToBean(json, CurrentLocationResult.class);
+<<<<<<< HEAD
         if (currentLocationResult.equals(1006)){
             return null;
+=======
+        if(currentLocationResult.getResult().getLat()!=null&&currentLocationResult.getResult().getLon()!=null){
+            Double[] lngLon = LngLonUtil.gps84_To_Gcj02((Double.valueOf(currentLocationResult.getResult().getLat()) / 600000), (Double.valueOf(currentLocationResult.getResult().getLon()) / 600000));
+            currentLocationResult.getResult().setLat(lngLon[0].toString());
+            currentLocationResult.getResult().setLon(lngLon[1].toString());
+>>>>>>> 8f52edecbb90f4859e5e95585c3a90a1a6731cf2
         }
         return currentLocationResult;
     }

+ 0 - 3
src/main/java/com/steerinfo/route/vo/currentLocation/CurrentLocation.java

@@ -82,9 +82,6 @@ public class CurrentLocation implements Serializable {
 
     public void setLat(String lat) {
         this.lat = lat;
-        Double[] lngLon = LngLonUtil.gps84_To_Gcj02((Double.valueOf(this.lat) / 600000), (Double.valueOf(this.lon) / 600000));
-        this.lon=lngLon[0].toString();
-        this.lat=lngLon[1].toString();
     }
     public String getLat() {
         return lat;

+ 0 - 1
src/main/resources/application-prod.yml

@@ -4,7 +4,6 @@ spring:
     url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
     password: Dil123789
     username: dil
-
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dil-dazhou-otms-prod

+ 1 - 0
src/main/resources/bootstrap.yml

@@ -1,6 +1,7 @@
 api.version: api/v1/otms
 spring:
   profiles:
+    #include: ${SPRING_PROFILES:dev}
     include: ${SPRING_PROFILES:prod}
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 15 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -1207,7 +1207,7 @@
     <include refid="orderBy"></include>
   </select>
 
-  <select id="getReceivingPhoto" parameterType="java.lang.String" resultType="map">
+  <select id="getReceivingPhoto" parameterType="java.lang.String" resultType="java.util.Map">
     select trr.RESULT_EMPTY_CONTAINER_PHOTO "resultEmptyContainerPhoto",
            trr.RESULT_SIGNED_NOTE_PHOTO "resultSignedNotePhoto",
            trr.RESULT_RECEIVE_NOTE_PHOTO "resultReceiveNotePhoto"
@@ -1218,4 +1218,18 @@
     on oo.ORDER_ID = ttr.ORDER_ID
     where oo.ORDER_NUMBER = #{orderNumber}
   </select>
+
+  <select id="getChildPhoto" parameterType="java.lang.String" resultType="java.util.Map">
+    select trrc.OTHER_PHOTO1 "otherPhoto1",
+           trrc.OTHER_PHOTO2 "otherPhoto2",
+           trrc.OTHER_PHOTO3 "otherPhoto3"
+    from TMSTRUCK_RECEIPT_RESULT trr
+           left join TMSTRUCK_TOTAL_RESULT ttr
+                     on ttr.RESULT_TOTAL_ID = trr.RESULT_TOTAL_ID
+           left join OMSTRUCK_ORDER oo
+                     on oo.ORDER_ID = ttr.ORDER_ID
+           left join TMSTRUCK_RECEIPT_RESULT_CHILD trrc
+                     on trr.RESULT_ID = trrc.RECEIPT_RESULT_ID
+    where oo.ORDER_NUMBER = #{orderNumber}
+  </select>
 </mapper>