|
@ -6,6 +6,9 @@ import com.yihu.wlyy.service.service.prescription.PrescriptionService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@ -20,6 +23,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
@Api(description = "长处方接口")
|
|
|
public class PrescriptionController extends BaseController{
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(PrescriptionController.class);
|
|
|
|
|
|
@Autowired
|
|
|
PrescriptionCAService caService;
|
|
|
|
|
@ -183,7 +188,16 @@ public class PrescriptionController extends BaseController{
|
|
|
return Result.success("挂号开处方接口!",re);
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
return Result.error(ex.getMessage());
|
|
|
logger.info("智业接口请求失败");
|
|
|
//异常处理
|
|
|
String message = ex.getMessage();
|
|
|
if(StringUtils.isNotBlank(message)){
|
|
|
if(message.contains("System.Exception:")){
|
|
|
message = message.substring(message.indexOf("System.Exception:")+18,message.indexOf("\\n"));
|
|
|
return Result.error(message);
|
|
|
}
|
|
|
}
|
|
|
return Result.error("请求失败");
|
|
|
}
|
|
|
}
|
|
|
|