|
@ -1,7 +1,11 @@
|
|
package com.yihu.wlyy.web.third.gateway.controller.express;
|
|
package com.yihu.wlyy.web.third.gateway.controller.express;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
|
|
import com.yihu.wlyy.service.app.express.SFExpressService;
|
|
import com.yihu.wlyy.service.app.express.SFExpressService;
|
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -25,6 +29,12 @@ public class SFExpressApiController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private SFExpressService sfexpressService;
|
|
private SFExpressService sfexpressService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private PrescriptionExpressageService prescriptionExpressageService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private PrescriptionService prescriptionService;
|
|
|
|
|
|
private String successxml = "<Response service='RoutePushService'><Head>OK</Head></Response>";
|
|
private String successxml = "<Response service='RoutePushService'><Head>OK</Head></Response>";
|
|
|
|
|
|
@ -46,4 +56,26 @@ public class SFExpressApiController extends BaseController {
|
|
return "<Response service='RoutePushService'><Head>ERR</Head><ERROR code='-1'>系统发生数据错误或运行时异常</ERROR></Response>";
|
|
return "<Response service='RoutePushService'><Head>ERR</Head><ERROR code='-1'>系统发生数据错误或运行时异常</ERROR></Response>";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/sfrouteserviceSearch",method = RequestMethod.POST)
|
|
|
|
@ApiOperation("通过处方编码查询顺丰物流派送记录")
|
|
|
|
@ObserverRequired
|
|
|
|
public String SFRouteServiceSearch(
|
|
|
|
@ApiParam(name="prescriptionCode", value="处方编号") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
|
|
|
|
|
|
|
|
try {
|
|
|
|
Prescription prescription = prescriptionService.findByCode(prescriptionCode);
|
|
|
|
PrescriptionExpressage sfexpress_obj = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
|
|
|
|
|
|
|
|
String result = sfexpressService.getRoutInfosSearch(sfexpress_obj);
|
|
|
|
|
|
|
|
return write(200, "查询成功","data",result);
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "查询失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|