|  | @@ -58,18 +58,23 @@ public class MenZhengXiangMuServer {
 | 
	
		
			
				|  |  |          return ResultVoUtil.success(mz);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public ResultVo<List<MzChargeDetail>> getFeiYongXinXi(Integer realNo, String patientId, Integer times, Integer xiangMuZhuangTai) {
 | 
	
		
			
				|  |  | +    public ResultVo<Map<String, List<MzChargeDetail>>> getFeiYongXinXi(Integer realNo, String patientId, Integer times, Integer xiangMuZhuangTai) {
 | 
	
		
			
				|  |  |          log.info("流水号:{},门诊号:{},次数:{} ", realNo, patientId, times);
 | 
	
		
			
				|  |  |          if (realNo == null || StringUtil.isBlank(patientId) || times == null) {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          List<MzChargeDetail> feiYongXinXi = dao.feiYongXinXi(realNo, patientId, times, xiangMuZhuangTai);
 | 
	
		
			
				|  |  | -        //   父节点 根据  patient_id times receipt_no order_no charge_item_code
 | 
	
		
			
				|  |  | -        //   子节点 根据  patient_id times receipt_no order_no tc_no
 | 
	
		
			
				|  |  | -        if (ListUtil.isBlank(feiYongXinXi)) {
 | 
	
		
			
				|  |  | +        List<MzChargeDetail> yaoPinXinxi = dao.yaoPinXinxi(realNo, patientId, times);
 | 
	
		
			
				|  |  | +        if (ListUtil.isBlank(feiYongXinXi) && ListUtil.isBlank(yaoPinXinxi)) {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return ResultVoUtil.success(tcTree(feiYongXinXi));
 | 
	
		
			
				|  |  | +        //   父节点 根据  patient_id times receipt_no order_no charge_item_code
 | 
	
		
			
				|  |  | +        //   子节点 根据  patient_id times receipt_no order_no tc_no
 | 
	
		
			
				|  |  | +        List<MzChargeDetail> treeFeiYongXinXi = tcTree(feiYongXinXi);
 | 
	
		
			
				|  |  | +        Map<String, List<MzChargeDetail>> map = new HashMap<>();
 | 
	
		
			
				|  |  | +        map.put("f", treeFeiYongXinXi);
 | 
	
		
			
				|  |  | +        map.put("y", yaoPinXinxi);
 | 
	
		
			
				|  |  | +        return ResultVoUtil.success(map);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public ResultVo<JSONObject> getReqDetailsByNo(String patientId, Integer reqNo) {
 | 
	
	
		
			
				|  | @@ -77,6 +82,9 @@ public class MenZhengXiangMuServer {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public List<MzChargeDetail> tcTree(List<MzChargeDetail> tempList) {
 | 
	
		
			
				|  |  | +        if (ListUtil.isBlank(tempList)) {
 | 
	
		
			
				|  |  | +            return new ArrayList<>();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          List<MzChargeDetail> resultList = new ArrayList<>();
 | 
	
		
			
				|  |  |          Map<String, MzChargeDetail> treeMap = new HashMap<>(tempList.size());
 | 
	
		
			
				|  |  |  
 |