|
@@ -142,6 +142,48 @@ public class OTMSController {
|
|
|
return otmsFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "新增签收网页端")
|
|
|
+ @PostMapping(value = "/addTmstruckReceiptResultForWeb")
|
|
|
+ public synchronized RESTfulResult addTmstruckReceiptResultForWeb(MultipartRequest request, Integer num, String orderNumber, String resultArrivalAddress, Integer imgcount3, Integer imgcount4) throws Exception {
|
|
|
+ //添加到files数组
|
|
|
+ List<MultipartFile> files = new ArrayList<>();
|
|
|
+ int index=-1;
|
|
|
+ for(int i=0;i<11;i++){
|
|
|
+ MultipartFile file = request.getFile("file"+i);
|
|
|
+ if(file!=null){
|
|
|
+ files.add(file);
|
|
|
+ if(index<0){
|
|
|
+ index=i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //没有上传,当做重复上传
|
|
|
+ if(files.size() == 0){
|
|
|
+ return new RESTfulResult("201","若要重复上传,必须两张都是新图片!","请勿重复上传!");
|
|
|
+ }
|
|
|
+ //上传图片,拼接在一个url里
|
|
|
+ Map<String,Object> mapValue=new HashMap<>();
|
|
|
+ String url="";
|
|
|
+ try{
|
|
|
+ //如果存在预览图片,查询,把那个位置的图片截取下来
|
|
|
+ if(index > 0){
|
|
|
+ String[] receivePhoto=otmsFeign.getReceivingPhotoByUrl(orderNumber).split(";");
|
|
|
+ for(int i=0;i<index;i++){
|
|
|
+ url=url+receivePhoto[i]+";";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
+ }
|
|
|
+ //上传图片
|
|
|
+ for (int i=0;i<files.size();i++){
|
|
|
+ MultipartFile file=files.get(i);
|
|
|
+ url += imageFileUtils.updateFile(file,i)+';';
|
|
|
+ }
|
|
|
+ mapValue.put("url",url);
|
|
|
+ return otmsFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value="查询当前报警类型")
|
|
|
@PostMapping(value = "/selectWarnSwitch")
|
|
|
public RESTfulResult selectWarnSwitch(){
|
|
@@ -195,7 +237,6 @@ public class OTMSController {
|
|
|
String arrivalPhoto=otmsFeign.getArrivalPhoto(orderNumber);
|
|
|
return getPhotoByUrl(arrivalPhoto);
|
|
|
}catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
@@ -219,7 +260,6 @@ public class OTMSController {
|
|
|
String receivePhoto=otmsFeign.getReceivingPhotoByUrl(orderNumber);
|
|
|
return getPhotoByUrl(receivePhoto);
|
|
|
}catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
return null;
|
|
|
}
|
|
|
}
|