|
@@ -1,6 +1,7 @@
|
|
|
package com.steerinfo.dil.controller;
|
|
|
|
|
|
import com.steerinfo.dil.config.ImageFileUtils;
|
|
|
+import com.steerinfo.dil.feign.OtmsFeign;
|
|
|
import com.steerinfo.dil.feign.TmsTruckFeign;
|
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
@@ -24,15 +25,18 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping("${api.version}/otms")
|
|
|
public class OTMSController {
|
|
|
+
|
|
|
@Autowired
|
|
|
- private TmsTruckFeign tmsTruckFeign;
|
|
|
+ private OtmsFeign otmsFeign;
|
|
|
@Autowired
|
|
|
private ImageFileUtils imageFileUtils;
|
|
|
@ApiOperation(value="全路径展示接口")
|
|
|
@PostMapping("/fullPath")
|
|
|
public Object fullPath(@RequestParam("orderNumber") String orderNumber) throws Exception {
|
|
|
- return tmsTruckFeign.fullPath(orderNumber);
|
|
|
+ return otmsFeign.fullPath(orderNumber);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "在途订单列表")
|
|
|
@PostMapping("/getInTransitTransportation")
|
|
|
public RESTfulResult getInTransitTransportation(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
@RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
|
|
@@ -40,9 +44,10 @@ public class OTMSController {
|
|
|
@RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
|
|
|
)
|
|
|
{
|
|
|
- return tmsTruckFeign.getInTransitTransportation(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
+ return otmsFeign.getInTransitTransportation(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "有异常订单列表")
|
|
|
@PostMapping("/getHaveAbnormalTruckOrderInfo")
|
|
|
public RESTfulResult getHaveAbnormalTruckOrderInfo(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
@RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
|
|
@@ -50,10 +55,10 @@ public class OTMSController {
|
|
|
@RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
|
|
|
)
|
|
|
{
|
|
|
- return tmsTruckFeign.getHaveAbnormalTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
+ return otmsFeign.getHaveAbnormalTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation("查询在途运输")
|
|
|
+ @ApiOperation("已完成订单列表")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
|
|
|
@ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
|
|
@@ -66,12 +71,13 @@ public class OTMSController {
|
|
|
@RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
|
|
|
@RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
|
|
|
){
|
|
|
- return tmsTruckFeign.getFinishTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
+ return otmsFeign.getFinishTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获得抵达实集")
|
|
|
@PostMapping(value = "/addtmstruckArrivalResult")
|
|
|
public RESTfulResult addtmstruckArrivalResult(@RequestParam("orderNumber") String orderNumber, @RequestParam("resultArrivalAddress")String resultArrivalAddress, MultipartFile file){
|
|
|
- return tmsTruckFeign.addtmstruckArrivalResult(orderNumber,resultArrivalAddress,file);
|
|
|
+ return otmsFeign.addtmstruckArrivalResult(orderNumber,resultArrivalAddress,file);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/addTmstruckReceiptResult")
|
|
@@ -79,34 +85,35 @@ public class OTMSController {
|
|
|
List<MultipartFile> files = new ArrayList<>();
|
|
|
files.add(request.getFile("file0"));
|
|
|
files.add(request.getFile("file1"));
|
|
|
+ if (request.getFile("file2")!=null){
|
|
|
+ files.add(request.getFile("file2"));
|
|
|
+ }
|
|
|
Map<String,Object> mapValue=new HashMap<>();
|
|
|
for (int i=0;i<files.size();i++){
|
|
|
MultipartFile file=files.get(i);
|
|
|
String url = imageFileUtils.updateFile(file);
|
|
|
mapValue.put("url"+i,url);
|
|
|
}
|
|
|
- return tmsTruckFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
|
|
|
+ return otmsFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value="查询当前报警类型")
|
|
|
@PostMapping(value = "/selectWarnSwitch")
|
|
|
public RESTfulResult selectWarnSwitch(){
|
|
|
- return tmsTruckFeign.selectWarnSwitch();
|
|
|
+ return otmsFeign.selectWarnSwitch();
|
|
|
}
|
|
|
|
|
|
- /**是否开启运输报警状态
|
|
|
- * warnSwitchaddTmstruckTotalResult
|
|
|
- * @param
|
|
|
- * @returninTransitOrderMileage
|
|
|
- */
|
|
|
+
|
|
|
@ApiOperation(value="是否开启运输报警状态")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "warnSwitch", value = "运输报警状态", required = false, dataType = "String")
|
|
|
})
|
|
|
@PostMapping(value = "/inTransitWarn")
|
|
|
public RESTfulResult inTransitWarn(@RequestParam String warnSwitch,@RequestParam String radio){
|
|
|
- return tmsTruckFeign.inTransitWarn(warnSwitch,radio);
|
|
|
+ return otmsFeign.inTransitWarn(warnSwitch,radio);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value="获得异常信息")
|
|
|
@PostMapping("/getTransportAbnormalInfo")
|
|
|
public RESTfulResult getTransportAbnormalInfo(@RequestBody(required=false) Map<String,Object> mapValue,
|
|
|
@RequestParam(name = "apiId",defaultValue = "472") Integer apiId,
|
|
@@ -115,12 +122,62 @@ public class OTMSController {
|
|
|
@RequestParam(name = "pageSize") Integer pageSize){
|
|
|
mapValue=mapValue!=null?mapValue:new HashMap<>();
|
|
|
mapValue.put("orderNumbers",orderNumbers);
|
|
|
- return tmsTruckFeign.getTransportAbnormalInfo(mapValue,apiId,pageNum,pageSize);
|
|
|
+ return otmsFeign.getTransportAbnormalInfo(mapValue,apiId,pageNum,pageSize);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value="车牌号和时间查询路径")
|
|
|
@PostMapping("/fullPathVisualizationByCarNumber")
|
|
|
public Object fullPathVisualizationByCarNumber(@RequestBody HashMap mapValue) throws Exception{
|
|
|
- return tmsTruckFeign.fullPathVisualizationByCarNumber(mapValue);
|
|
|
+ return otmsFeign.fullPathVisualizationByCarNumber(mapValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("厂外抵达作业")
|
|
|
+ @PostMapping("/getArrivalResult")
|
|
|
+ public Map<String,Object> getArrivalResult(@RequestBody(required = false) Map<String,Object> mapValue,
|
|
|
+ Integer apiId,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ String con,
|
|
|
+ String startTime,
|
|
|
+ String endTime){
|
|
|
+ return otmsFeign.getArrivalResult(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize,con,startTime,endTime);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("展示满货箱的照片")
|
|
|
+ @PostMapping("/getArrivalPhoto")
|
|
|
+ public String getArrivalPhoto(@RequestParam String orderNumber){
|
|
|
+ return otmsFeign.getArrivalPhoto(orderNumber);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("厂外抵达作业")
|
|
|
+ @PostMapping("/getReceiptResult")
|
|
|
+ public Map<String,Object> getReceiptResult(@RequestBody(required = false) Map<String,Object> mapValue,
|
|
|
+ Integer apiId,
|
|
|
+ Integer pageNum,
|
|
|
+ Integer pageSize,
|
|
|
+ String con,
|
|
|
+ String startTime,
|
|
|
+ String endTime){
|
|
|
+ return otmsFeign.getReceiptResult(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize,con,startTime,endTime);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("展示收货的照片")
|
|
|
+ @PostMapping("/getReceivingPhotoByUrl")
|
|
|
+ public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber) throws Exception {
|
|
|
+ Map<String,Object> map=otmsFeign.getReceivingPhotoByUrl(orderNumber);
|
|
|
+ if(map.containsKey("resultEmptyContainerPhoto") && map.get("resultEmptyContainerPhoto")!=null){
|
|
|
+ String resultEmptyContainerPhoto = (String) imageFileUtils.downloadFile(map.get("resultEmptyContainerPhoto").toString());
|
|
|
+ map.put("resultEmptyContainerPhoto",resultEmptyContainerPhoto);
|
|
|
+ }
|
|
|
+ if(map.containsKey("resultSignedNotePhoto") && map.get("resultSignedNotePhoto")!=null){
|
|
|
+ String resultSignedNotePhoto = (String) imageFileUtils.downloadFile(map.get("resultSignedNotePhoto").toString());
|
|
|
+ map.put("resultSignedNotePhoto",resultSignedNotePhoto);
|
|
|
+ }
|
|
|
+ if(map.containsKey("resultReceiveNotePhoto") && map.get("resultReceiveNotePhoto")!=null){
|
|
|
+ String resultSignedNotePhoto = (String) imageFileUtils.downloadFile(map.get("resultReceiveNotePhoto").toString());
|
|
|
+ map.put("resultReceiveNotePhoto",resultSignedNotePhoto);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
}
|