|  | @@ -1,5 +1,6 @@
 | 
	
		
			
				|  |  |  package cn.hnthyy.thmz.controller.mz;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import cn.hnthyy.thmz.Utils.HttpUtil;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.comment.UserLoginToken;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.common.Constants;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.his.yp.YpBaseYf;
 | 
	
	
		
			
				|  | @@ -12,8 +13,10 @@ import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.BeanUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.net.URLEncoder;
 | 
	
		
			
				|  |  |  import java.util.HashMap;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  import java.util.Map;
 | 
	
	
		
			
				|  | @@ -32,6 +35,9 @@ public class YpZdDictController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private YpBaseYfService ypBaseYfService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Value("${hiDrugPostUrl}")
 | 
	
		
			
				|  |  | +    private String hiDrugPostUrl;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 根据药品编码和规格查询药品信息
 | 
	
		
			
				|  |  |       * @param code 药品编码
 | 
	
	
		
			
				|  | @@ -198,6 +204,17 @@ public class YpZdDictController {
 | 
	
		
			
				|  |  |              ypZdDictService.saveYpZdDict(ypZdDict);
 | 
	
		
			
				|  |  |              resultMap.put("code", 0);
 | 
	
		
			
				|  |  |              resultMap.put("message", "保存药品信息成功");
 | 
	
		
			
				|  |  | +            // 增加医保药品报销比例的调用
 | 
	
		
			
				|  |  | +            try {
 | 
	
		
			
				|  |  | +                YpZdDict zd = ypZdDictService.queryYpZdDictByCodeAndSerial(ypZdDict.getCode(), ypZdDict.getSerial());
 | 
	
		
			
				|  |  | +                if(null != zd.getNationalCode() && !"".equals(zd.getNationalCode())){
 | 
	
		
			
				|  |  | +                    String naCode = URLEncoder.encode(zd.getNationalCode(), "UTF-8");
 | 
	
		
			
				|  |  | +                    HttpUtil.sendHttpGet(hiDrugPostUrl + naCode, "utf-8", 3000);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            } catch (Exception e) {
 | 
	
		
			
				|  |  | +                e.printStackTrace();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              return resultMap;
 | 
	
		
			
				|  |  |          } catch (Exception e) {
 | 
	
		
			
				|  |  |              log.error("保存药品信息失败,错误信息{}", e);
 |