|  | @ -2,6 +2,7 @@ package com.yihu.jw.base.service.a3service;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.healthCare.YlzMedicalMxDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
 | 
	
	
		
			
				|  | @ -9,6 +10,7 @@ import com.yihu.jw.hospital.healthCare.YlzMedicailIcdDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.healthCare.YlzMedicailMxDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
	
		
			
				|  | @ -18,6 +20,9 @@ import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.*;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | /**
 | 
	
		
			
				|  |  |  * 基卫相关接口
 | 
	
		
			
				|  |  |  */
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | @Transactional
 | 
	
		
			
				|  |  | @Service
 | 
	
	
		
			
				|  | @ -35,7 +40,7 @@ public class JwService {
 | 
	
		
			
				|  |  |     private YlzMedicailMxDao ylzMedicailMxDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取智业待结算数据接口
 | 
	
		
			
				|  |  |      * 获取智业待结算数据接口--自助机
 | 
	
		
			
				|  |  |      * @param cardNo 卡号
 | 
	
		
			
				|  |  |      * @param orgCode 机构编码
 | 
	
		
			
				|  |  |      * @return
 | 
	
	
		
			
				|  | @ -61,12 +66,12 @@ public class JwService {
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 确认结算-智业
 | 
	
		
			
				|  |  |      * 确认结算-智业--自助机
 | 
	
		
			
				|  |  |      * @param
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |     public String executeSickSettleMultiNew(String recipe_no) throws Exception {
 | 
	
		
			
				|  |  |     public JSONObject executeSickSettleMultiNew(String recipe_no) throws Exception {
 | 
	
		
			
				|  |  |         YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(recipe_no);
 | 
	
		
			
				|  |  |         if (null==recipe_no){
 | 
	
		
			
				|  |  |             throw new Exception("无结算信息");
 | 
	
	
		
			
				|  | @ -74,30 +79,311 @@ public class JwService {
 | 
	
		
			
				|  |  |         if (ylzMedicalRelationDO.getState()==1){
 | 
	
		
			
				|  |  |             throw new Exception("订单已结算,无法重复结算");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<YlzMedicalMxDO> ylzMedicalMxDO = ylzMedicailMxDao.findByMedicalId(ylzMedicalRelationDO.getId());
 | 
	
		
			
				|  |  |         List<YlzMedicalMxDO> ylzMedicalMxDOList = ylzMedicailMxDao.findByMedicalId(ylzMedicalRelationDO.getId());
 | 
	
		
			
				|  |  |         List<YlzMedicalIcdDO> ylzMedicalIcdDOList = ylzMedicailIcdDao.findByMedicalId(ylzMedicalRelationDO.getId());
 | 
	
		
			
				|  |  |         JSONObject msgBody = new JSONObject();
 | 
	
		
			
				|  |  |         JSONArray insurVisitInfo = new JSONArray();
 | 
	
		
			
				|  |  |         JSONObject insurResult = new JSONObject(); //医保结算信息 自费病人没有产生医保收费记录,insurResult节点不传自费结算信息
 | 
	
		
			
				|  |  |         JSONArray insurResult = new JSONArray(); //医保结算信息 自费病人没有产生医保收费记录,insurResult节点不传自费结算信息
 | 
	
		
			
				|  |  |         msgBody.put("cardNo",ylzMedicalRelationDO.getCardNo());//病人卡号
 | 
	
		
			
				|  |  |         msgBody.put("settleDept",ylzMedicalRelationDO.getDeptCode());//结算科室编码
 | 
	
		
			
				|  |  |         msgBody.put("settleOperator",ylzMedicalRelationDO.getCollector());//结算人员编码
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if (0==ylzMedicalRelationDO.getMedicalState()){//自费
 | 
	
		
			
				|  |  |             msgBody.put("insurResult",insurResult);//todo
 | 
	
		
			
				|  |  |         }else if (1==ylzMedicalRelationDO.getMedicalState()){//医保
 | 
	
		
			
				|  |  |             for (YlzMedicalMxDO medicalMxDO:ylzMedicalMxDOList){
 | 
	
		
			
				|  |  |                 JSONObject insurResultTmp = new JSONObject();
 | 
	
		
			
				|  |  |                 insurResultTmp.put("visitNo",ylzMedicalRelationDO.getRelationCode()); //院内挂号号
 | 
	
		
			
				|  |  |                 insurResultTmp.put("insurSettleSort",medicalMxDO.getInsurSettleSort()); //医保结算序号
 | 
	
		
			
				|  |  |                 insurResultTmp.put("setl_msgid",medicalMxDO.getSetlMsgid()); //发送方报文ID
 | 
	
		
			
				|  |  |                 insurResultTmp.put("fee_msgid",medicalMxDO.getFeeMsgid()); //费用上传发送方报文ID
 | 
	
		
			
				|  |  |                 insurResultTmp.put("dise_msgid",""); //就诊信息上传发送方报文ID todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("chrg_bchno",medicalMxDO.getChrgBchno());   //收费批次号
 | 
	
		
			
				|  |  |                 insurResultTmp.put("insuplc_admdvs",ylzMedicalRelationDO.getRegionCode()); //参保地医保区划【窗口冲销有用】
 | 
	
		
			
				|  |  |                 insurResultTmp.put("card_sn",""); //卡识别码 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("mdtrt_cert_no",ylzMedicalRelationDO.getCardNo()); //就诊凭证编号
 | 
	
		
			
				|  |  |                 insurResultTmp.put("fm_acct_balc",""); //家庭共济账户余额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hl_acct_balc",""); //健康账户余额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("cvl_acct_balc",""); //公务员账户余额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("acct_used_flag","1"); //个人账户使用标志【窗口目前默认固定1,后续可开放前端选择传入】
 | 
	
		
			
				|  |  |                 insurResultTmp.put("mdtrt_id",ylzMedicalRelationDO.getHisSerial()); //就诊 ID
 | 
	
		
			
				|  |  |                 insurResultTmp.put("setl_id",""); //结算ID   todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_no","1"); //人员编号   医保人员基本信息获取接口返回
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_name",ylzMedicalRelationDO.getName()); //人员姓名
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_cert_type",""); //人员证件类型 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("certno",""); //证件号码 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("gend",""); //性别 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("naty",""); //民族 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("brdy",""); //出生日期 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("age",""); //年龄 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("insutype","1"); //险种类型
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_type","11"); //人员类别"
 | 
	
		
			
				|  |  |                 insurResultTmp.put("cvlserv_flag","0"); //公务员标志
 | 
	
		
			
				|  |  |                 insurResultTmp.put("setl_time", DateUtil.getStringDateShort());    //结算时间
 | 
	
		
			
				|  |  |                 insurResultTmp.put("mdtrt_cert_type","03");  //就诊凭证类型
 | 
	
		
			
				|  |  |                 insurResultTmp.put("med_type",ylzMedicalRelationDO.getMedType()); //医疗类别
 | 
	
		
			
				|  |  |                 insurResultTmp.put("medfee_sumamt","");  //医疗费总额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("fulamt_ownpay_amt",ylzMedicalRelationDO.getOwnPay()); //全自费金额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("overlmt_selfpay","");  //超限价自费费用 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("preselfpay_amt","");   //先行自付金额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("inscp_scp_amt","");    //符合政策范围金额 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("act_pay_dedc",""); //实际支付起付线 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hifp_pay",""); //基本医疗保险统筹基金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("pool_prop_selfpay","");    //基本医疗保险统筹基金支付比例 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("cvlserv_pay","");  //公务员医疗补助资金支出 todo
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hifes_pay","");    //企业补充医疗保险基金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hifmi_pay","");    //居民大病保险资金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hifob_pay","");    //职工大额医疗费用补助基金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("maf_pay","");  //医疗救助基金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("oth_pay","");  //其他支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("fund_pay_sumamt","");  //基金支付总额
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_part_amt",""); //个人负担总金额
 | 
	
		
			
				|  |  |                 insurResultTmp.put("acct_pay",""); //个人账户支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("psn_cash_pay",""); //个人现金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hosp_part_amt","");    //医院负担金额
 | 
	
		
			
				|  |  |                 insurResultTmp.put("balc",""); //余额
 | 
	
		
			
				|  |  |                 insurResultTmp.put("acct_mulaid_pay","");  //个人账户共济支付金额
 | 
	
		
			
				|  |  |                 insurResultTmp.put("medins_setl_id",medicalMxDO.getSetlMsgid());   //医药机构结算ID(应跟setl_msgid值一致)
 | 
	
		
			
				|  |  |                 insurResultTmp.put("clr_optins","");   //清算经办机构
 | 
	
		
			
				|  |  |                 insurResultTmp.put("clr_way","");  //清算方式
 | 
	
		
			
				|  |  |                 insurResultTmp.put("clr_type","11"); //清算类别
 | 
	
		
			
				|  |  |                 insurResultTmp.put("hifdm_pay","0");    //伤残人员医疗保障基金支出
 | 
	
		
			
				|  |  |                 insurResultTmp.put("exp_content","");  //
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 JSONArray setldetail  = new JSONArray();
 | 
	
		
			
				|  |  |                 JSONObject setldetailTmp = new JSONObject();
 | 
	
		
			
				|  |  |                 setldetailTmp.put("fund_pay_type","");  //基金支付类型
 | 
	
		
			
				|  |  |                 setldetailTmp.put("inscp_scp_amt","");  //符合政策范围金额
 | 
	
		
			
				|  |  |                 setldetailTmp.put("crt_payb_lmt_amt","");   //本次可支付限额金额
 | 
	
		
			
				|  |  |                 setldetailTmp.put("fund_payamt","");    //基金支付金额
 | 
	
		
			
				|  |  |                 setldetailTmp.put("fund_pay_type_name",""); //基金支付类型名称
 | 
	
		
			
				|  |  |                 setldetailTmp.put("setl_proc_info",""); //结算过程信息
 | 
	
		
			
				|  |  |                 setldetail.add(setldetailTmp);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 JSONArray fpdetail  = new JSONArray();
 | 
	
		
			
				|  |  |                 JSONObject fpdetailTmp  = new JSONObject();
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("chrgitmType",""); //发票项目类别
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("chrgitmTypeName","");  //发票项目类别名称
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("medChrgitmType","");   //发票项目类别
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("medChrgitmName","");   //发票项目类别名称
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("itemSumamt","");   //发票项目费用
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("itemClaaAmt","");  //医保发票费用
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("itemClabAmt","");  //医保个人费用
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("itemOthAmt","");   //特殊项目发票费用
 | 
	
		
			
				|  |  |                 fpdetailTmp.put("itemOwnpayAmt","");    //非医保发票费用
 | 
	
		
			
				|  |  |                 fpdetail.add(fpdetailTmp);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 JSONArray feedetail_result  = new JSONArray();
 | 
	
		
			
				|  |  |                 JSONObject feedetail_resultTmp  = new JSONObject();
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("feedetl_sn",medicalMxDO.getHisDetailSn());   // 费用明细流水
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("det_item_fee_sumamt",medicalMxDO.getTotalMoney()); //明细项目费用总额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("cnt",medicalMxDO.getAmount()); //数量
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("pric",medicalMxDO.getPrice()); //单价
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("pric_uplmt_amt",""); //定价上限金额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("selfpay_prop",""); //自付比例
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("fulamt_ownpay_amt",""); //全自费金额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("overlmt_amt",""); //超限价金额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("preselfpay_amt",""); //先行自付金额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("inscp_scp_amt",""); //符合政策范围金额
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("chrgitm_lv",""); //收费项目等级
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("med_chrgitm_type",""); //医疗收费项目类别
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("bas_medn_flag",""); //基本药物标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("hi_nego_drug_flag",""); //医保谈判药品标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("chld_medc_flag",""); //儿童用药标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("list_sp_item_flag",""); //目录特项标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("lmt_used_flag",""); //限制使用标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("drt_reim_flag",""); //直报标志
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("memo",""); //备注
 | 
	
		
			
				|  |  |                 feedetail_resultTmp.put("exp_content",""); //字段扩展
 | 
	
		
			
				|  |  |                 feedetail_result.add(feedetail_resultTmp);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 insurResultTmp.put("setldetail",setldetail);
 | 
	
		
			
				|  |  |                 insurResultTmp.put("fpdetail",fpdetail);
 | 
	
		
			
				|  |  |                 insurResultTmp.put("feedetail_result",feedetail_result);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 insurResult.add(insurResultTmp);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             msgBody.put("insurResult",insurResult);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         JSONObject insurVisitTmp = new JSONObject();
 | 
	
		
			
				|  |  |         insurVisitTmp.put("visit_msgid",ylzMedicalRelationDO.getHisSettleNo());//发送方报文ID"
 | 
	
		
			
				|  |  |         insurVisitTmp.put("insuplc_admdvs",ylzMedicalRelationDO.getRegionCode());//参保地医保区划【窗口冲销有用】
 | 
	
		
			
				|  |  |         insurVisitTmp.put("insutype","310");//险种类型【挂号时用的险种,医保目前以此为准】
 | 
	
		
			
				|  |  |         insurVisitTmp.put("mdtrt_id","");//就诊ID  医保挂号接口返回
 | 
	
		
			
				|  |  |         insurVisitTmp.put("psn_no","");//人员编号   医保人员基本信息获取接口返回
 | 
	
		
			
				|  |  |         insurVisitTmp.put("mdtrt_id",ylzMedicalRelationDO.getHisSerial());//就诊ID  医保挂号接口返回 todo
 | 
	
		
			
				|  |  |         insurVisitTmp.put("psn_no","");//人员编号   医保人员基本信息获取接口返回 todo
 | 
	
		
			
				|  |  |         insurVisitTmp.put("ipt_otp_no",ylzMedicalRelationDO.getRelationCode());//门诊号
 | 
	
		
			
				|  |  |         insurVisitTmp.put("exp_content","");//字段扩展【应需要解决转义字符反斜杠被过滤问题,否则要将里面的扩展节点独立字段出
 | 
	
		
			
				|  |  |         insurVisitInfo.add(insurVisitTmp);
 | 
	
		
			
				|  |  |         msgBody.put("insurVisitInfo",insurVisitInfo);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","executeSickSettleMultiNew");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",ylzMedicalRelationDO.getOrgCode());
 | 
	
		
			
				|  |  |         param.put("msgBody",msgBody.toJSONString());
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业院内结算确认接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return null;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 病人注册接口--自助机
 | 
	
		
			
				|  |  |      * @param json 注册信息 {"saveDept":"注册科室编码","saveOperator":"注册员工编码","dtSick":{"sickName":"病人姓名","sickSex":"病人性别【字典】","sickPhone":"病人电话","birthday":"病人生日【yyyy-mm-dd】","rateType":"病人费别【字典】","identityCardNo":"病人身份证号","cardNo":"病人卡号","cardType":"病人卡类型【字典】"}}
 | 
	
		
			
				|  |  |      * @param orgCode 机构编码
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject saveRegisterInfoZy(String json,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","saveRegisterInfo");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         param.put("msgBody",json);
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业病人注册接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询余额信息接口--自助机
 | 
	
		
			
				|  |  |      * @param cardNo 病人卡号
 | 
	
		
			
				|  |  |      * @param orgCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getSickDispBalanceZy(String cardNo,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","getSickDispBalance");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         JSONObject msgBody = new JSONObject();
 | 
	
		
			
				|  |  |         msgBody.put("cardNo",cardNo);
 | 
	
		
			
				|  |  |         param.put("msgBody",msgBody.toJSONString());
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业查询余额信息接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询检验报告单列表接口--自助机
 | 
	
		
			
				|  |  |      * @param cardNo 病人卡号
 | 
	
		
			
				|  |  |      * @param orgCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getSickReportForSSMZy(String cardNo,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","getSickReportForSSM");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         JSONObject msgBody = new JSONObject();
 | 
	
		
			
				|  |  |         msgBody.put("cardNo",cardNo);
 | 
	
		
			
				|  |  |         param.put("msgBody",msgBody.toJSONString());
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业查询检验报告单列表接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 更新报告单打印信息接口--自助机
 | 
	
		
			
				|  |  |      * @param inspectionNo 检验编号
 | 
	
		
			
				|  |  |      * @param operatorStaff 打印人编码
 | 
	
		
			
				|  |  |      * @param orgCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject updatePrintCountForSSMZY(String inspectionNo,String operatorStaff,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","updatePrintCountForSSM");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         JSONObject msgBody = new JSONObject();
 | 
	
		
			
				|  |  |         msgBody.put("inspectionNo",inspectionNo);
 | 
	
		
			
				|  |  |         msgBody.put("operatorStaff",operatorStaff);
 | 
	
		
			
				|  |  |         param.put("msgBody",msgBody.toJSONString());
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业更新报告单打印信息接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 充值接口(自助机只充不退)--自助机
 | 
	
		
			
				|  |  |      * @param json {"cardNo":"病人卡号","operateType":"1","paymentType":"支付方式【字典】","prepayType":"1","rateType":"病人费别【字典】","prepayStatus":"1","prepayOperator":"收费员编码","PrepayDept":"收费科室编码","remark":"备注","prepayMoney":"预交金额","prepayBillNO":"预交金票据号","outChargeNo":"商户充值业务流水","termNo":"自助机终端编号","depositType":"充值方式","authCode":"支付码","channelType":"渠道类型"}
 | 
	
		
			
				|  |  |      * @param orgCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject savePrepayZy(String json,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","savePrepay");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         param.put("msgBody",json);
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业充值接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询收费记录接口--自助机
 | 
	
		
			
				|  |  |      * @param cardNo 病人卡号
 | 
	
		
			
				|  |  |      * @param settleTimeFrom 结算时间从【yyyy-mm-dd】
 | 
	
		
			
				|  |  |      * @param settleTimeTo 结算时间到【yyyy-mm-dd】
 | 
	
		
			
				|  |  |      * @param orgCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getSettleRecordZy(String cardNo,String settleTimeFrom,String settleTimeTo,String orgCode){
 | 
	
		
			
				|  |  |         Map<String,String> param = new HashMap<>();
 | 
	
		
			
				|  |  |         param.put("interfaceStr","getSettleRecord");//接口方法
 | 
	
		
			
				|  |  |         param.put("orgCode",orgCode);
 | 
	
		
			
				|  |  |         JSONObject msgBody = new JSONObject();
 | 
	
		
			
				|  |  |         msgBody.put("cardNo",cardNo);
 | 
	
		
			
				|  |  |         msgBody.put("settleTimeFrom",settleTimeFrom);
 | 
	
		
			
				|  |  |         msgBody.put("settleTimeTo",settleTimeTo);
 | 
	
		
			
				|  |  |         param.put("msgBody",msgBody.toJSONString());
 | 
	
		
			
				|  |  |         JSONObject re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
 | 
	
		
			
				|  |  |         WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCode("callEhrInterfaceYG");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setRequest(param.toString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setResponse(re.toJSONString());
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setName("智业查询收费记录接口");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setStatus("1");
 | 
	
		
			
				|  |  |         wlyyHttpLogDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |         httpLogDao.save(wlyyHttpLogDO);
 | 
	
		
			
				|  |  |         return re;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |