|
@ -6,6 +6,7 @@ import com.yihu.wlyy.entity.dict.DmExpressagePriceEntity;
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressageLog;
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressageLog;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.VO.PrescriptionExpressLogVO;
|
|
import com.yihu.wlyy.service.app.express.SFExpressService;
|
|
import com.yihu.wlyy.service.app.express.SFExpressService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
@ -138,7 +139,7 @@ public class SFExpressController extends BaseController {
|
|
//日志文件中记录异常信息
|
|
//日志文件中记录异常信息
|
|
error(e);
|
|
error(e);
|
|
//返回接口异常信息处理结果
|
|
//返回接口异常信息处理结果
|
|
return error(-1, "查询失败!");
|
|
|
|
|
|
return error(-1, "查询失败,"+e.getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@ -170,7 +171,6 @@ public class SFExpressController extends BaseController {
|
|
@RequestMapping(value="/sfordersearchservice",method = RequestMethod.GET)
|
|
@RequestMapping(value="/sfordersearchservice",method = RequestMethod.GET)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@ApiOperation("通过处方编码查询顺丰快递是否下单成功")
|
|
@ApiOperation("通过处方编码查询顺丰快递是否下单成功")
|
|
@ObserverRequired
|
|
|
|
public String SFOrderSearchService(
|
|
public String SFOrderSearchService(
|
|
@ApiParam(name="prescriptionCode", value="处方编号") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
|
|
@ApiParam(name="prescriptionCode", value="处方编号") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
|
|
PrescriptionExpressage sfexpress_obj = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
|
|
PrescriptionExpressage sfexpress_obj = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
|
|
@ -184,4 +184,37 @@ public class SFExpressController extends BaseController {
|
|
return error(-1, "查询失败," + e.getMessage());
|
|
return error(-1, "查询失败," + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/sfgetorderinfoservice",method = RequestMethod.GET)
|
|
|
|
@ResponseBody
|
|
|
|
@ApiOperation("通过处方编码查询顺丰快递单信息(不包含物流记录)")
|
|
|
|
public String SFGetOrderInfo(
|
|
|
|
@ApiParam(name="prescriptionCode", value="处方编号") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
|
|
|
|
try {
|
|
|
|
PrescriptionExpressage sfexpress_obj = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
|
|
|
|
Prescription prescription = prescriptionService.findByCode(prescriptionCode);
|
|
|
|
PrescriptionExpressLogVO vo = new PrescriptionExpressLogVO();
|
|
|
|
vo.setExpressMailNo(sfexpress_obj.getMailno());
|
|
|
|
vo.setExpressName("顺丰速递");
|
|
|
|
|
|
|
|
if(100 == prescription.getStatus()){
|
|
|
|
vo.setExpressStatus("已收件");
|
|
|
|
}else{
|
|
|
|
if(StringUtils.isBlank(sfexpress_obj.getMailno())){
|
|
|
|
vo.setExpressStatus("待发货");
|
|
|
|
}else{
|
|
|
|
vo.setExpressStatus("运输中");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vo.setExpressPhone("95338");
|
|
|
|
return write(200, "查询成功","data",vo);
|
|
|
|
}catch (Exception e) {
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "查询失败," + e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|