trick9191 7 éve
szülő
commit
684fec1d82

+ 140 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/express/DoctorLYExpressController.java

@ -0,0 +1,140 @@
package com.yihu.wlyy.web.doctor.express;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2017/12/25.
 */
@RestController
@RequestMapping(value = "/doctor/lyexpress")
@Api(description = "医生端鹭燕速运相关接口")
public class DoctorLYExpressController extends BaseController {
    @RequestMapping(value = "/getCostByAddress", method = RequestMethod.GET)
    @ApiOperation("1.根据收方地址查询快递费用明细")
    public String getCostByAddress(@ApiParam(name = "d_province", value = "收方完整的省份名称,如福建省") @RequestParam(value = "d_province", required = true)String d_province,
                                   @ApiParam(name = "d_province", value = "收方完整的城市名称,如厦门市") @RequestParam(value = "d_city", required = true)String d_city,
                                   @ApiParam(name = "d_province", value = "寄方完整的省份名称,如福建省") @RequestParam(value = "j_province", required = true)String j_province,
                                   @ApiParam(name = "d_province", value = "寄方完整的城市名称,如漳州市") @RequestParam(value = "j_city", required = true)String j_city){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/checkDeliveryArea", method = RequestMethod.GET)
    @ApiOperation("2.查询派送地址是否属于派送范围")
    public String checkDeliveryArea(@ApiParam(name = "d_address", value = "详细的收方地址,包括省市区+完整的街道门牌号等" +
            "如:福建省厦门市思明区软件园二期望海路55号") @RequestParam(value = "d_address", required = true)String d_address){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/pushOrder", method = RequestMethod.GET)
    @ApiOperation("3.向第三方快递下派送订单")
    public String pushOrder(@ApiParam(name = "prescriptionCode", value = "处方编码") @RequestParam(value = "prescriptionCode", required = true)String prescriptionCode,
                            @ApiParam(name = "j_contact", value = "寄方联系人") @RequestParam(value = "j_contact", required = true)String j_contact,
                            @ApiParam(name = "j_tel", value = "寄件方联系:固话") @RequestParam(value = "j_tel", required = false)String j_tel,
                            @ApiParam(name = "j_mobile", value = "寄件方联系:手机") @RequestParam(value = "j_mobile", required = true)String j_mobile,
                            @ApiParam(name = "j_province", value = "寄方所在省份:完整的省份名称,如福建省") @RequestParam(value = "j_province", required = true)String j_province,
                            @ApiParam(name = "j_city", value = "寄方所在城市:完整的城市名称,如厦门市") @RequestParam(value = "j_city", required = true)String j_city,
                            @ApiParam(name = "j_county", value = "寄方所在县/区") @RequestParam(value = "j_county", required = true)String j_county,
                            @ApiParam(name = "j_address", value = "寄件方详细地址,包括省市县/区") @RequestParam(value = "j_address", required = true)String j_address,
                            @ApiParam(name = "d_contact", value = "收方联系人") @RequestParam(value = "d_contact", required = true)String d_contact,
                            @ApiParam(name = "d_tel", value = "收方联系:固话") @RequestParam(value = "d_tel", required = false)String d_tel,
                            @ApiParam(name = "d_mobile", value = "收方联系:手机") @RequestParam(value = "d_mobile", required = true)String d_mobile,
                            @ApiParam(name = "d_province", value = "收方所在省份:完整的省份名称,如福建省") @RequestParam(value = "d_province", required = true)String d_province,
                            @ApiParam(name = "d_city", value = "收方所在城市:完整的城市名称,如厦门市") @RequestParam(value = "d_city", required = true)String d_city,
                            @ApiParam(name = "d_county", value = "收方所在县/区") @RequestParam(value = "d_county", required = true)String d_county,
                            @ApiParam(name = "d_address", value = "收方方详细地址,包括省市县/区") @RequestParam(value = "d_address", required = true)String d_address,
                            @ApiParam(name = "express_type", value = "1:寄方付,2:收方付 3:第三方付") @RequestParam(value = "express_type", required = true)String express_type,
                            @ApiParam(name = "info", value = "物品信息json格式数据:{  \"info\":   [      {\"name\":\"物品名称1\",\"count\":\"物品数量1\"},      {\"name\":\"物品名称2\",\"count\":\"物品数量2\"},      .....   ]}") @RequestParam(value = "info", required = false)String info){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/getLogisticsRecords", method = RequestMethod.GET)
    @ApiOperation("4.通过处方编码查询物流派送记录")
    public String getLogisticsRecords(@ApiParam(name = "prescriptionCode", value = "处方编码") @RequestParam(value = "d_address", required = true)String prescriptionCode,
                                                        @ApiParam(name = "mailno", value = "处方编码") @RequestParam(value = "mailno", required = true)String mailno){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/getExpressInfo", method = RequestMethod.GET)
    @ApiOperation("5.通过处方编码查询快递单信息(不包含物流记录)")
    public String getExpressInfo(@ApiParam(name = "prescriptionCode", value = "处方编码") @RequestParam(value = "d_address", required = true)String prescriptionCode,
                                      @ApiParam(name = "mailno", value = "处方编码") @RequestParam(value = "mailno", required = true)String mailno){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/cancelOrder", method = RequestMethod.GET)
    @ApiOperation("6.根据处方号和快递单号取消快递订单")
    public String cancelOrder(@ApiParam(name = "prescriptionCode", value = "处方编码") @RequestParam(value = "d_address", required = true)String prescriptionCode,
                                 @ApiParam(name = "mailno", value = "处方编码") @RequestParam(value = "mailno", required = true)String mailno){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
    @RequestMapping(value = "/checkOrderSuccessful", method = RequestMethod.GET)
    @ApiOperation("7.根据处方编号查询第三方快递是否下单成功")
    public String checkOrderSuccessful(@ApiParam(name = "prescriptionCode", value = "处方编码") @RequestParam(value = "d_address", required = true)String prescriptionCode){
        try {
        }catch (Exception e){
            //日志文件中记录异常信息
            error(e);
            //返回接口异常信息处理结果
            return error(-1, "请求失败");
        }
        return null;
    }
}