Browse Source

代码修改

yeshijie 7 years ago
parent
commit
80f65101cb

+ 15 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -6,6 +6,9 @@ import com.yihu.wlyy.service.service.prescription.PrescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
@ -20,6 +23,8 @@ import org.springframework.web.bind.annotation.*;
@Api(description = "长处方接口")
@Api(description = "长处方接口")
public class PrescriptionController extends BaseController{
public class PrescriptionController extends BaseController{
	private static Logger logger = LoggerFactory.getLogger(PrescriptionController.class);
	@Autowired
	@Autowired
	PrescriptionCAService caService;
	PrescriptionCAService caService;
@ -183,7 +188,16 @@ public class PrescriptionController extends BaseController{
			return Result.success("挂号开处方接口!",re);
			return Result.success("挂号开处方接口!",re);
		} catch (Exception ex) {
		} catch (Exception ex) {
			ex.printStackTrace();
			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("请求失败");
		}
		}
	}
	}