|  | @@ -26,6 +26,7 @@ import cn.hnthyy.thmz.service.his.zy.ZyLedgerFileService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.thmz.TransactionService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.thmz.WindowsService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.vo.ZyDepositFileVo;
 | 
	
		
			
				|  |  | +import cn.hutool.core.collection.CollUtil;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.json.JSONObject;
 | 
	
	
		
			
				|  | @@ -92,6 +93,25 @@ public class ZyDepositFileController {
 | 
	
		
			
				|  |  |              resultMap.put("code", 0);
 | 
	
		
			
				|  |  |              resultMap.put("message", "根据住院号和次数查询缴费记录成功");
 | 
	
		
			
				|  |  |              List<ZyDepositFile> zyDepositFiles = zyDepositFileService.queryZyDepositFileBYInpatientNoAndTimes(zyDepositFile);
 | 
	
		
			
				|  |  | +            if(CollUtil.isNotEmpty(zyDepositFiles)){
 | 
	
		
			
				|  |  | +                Map<String, Boolean> rePrintMap = new HashMap<>();
 | 
	
		
			
				|  |  | +                Map<String, List<ZyDepositFile>> collect = zyDepositFiles.stream().collect(Collectors.groupingBy(item -> item.getReceiptNo()));
 | 
	
		
			
				|  |  | +                for(String key :collect.keySet()){
 | 
	
		
			
				|  |  | +                    boolean rePrintFlag =collect.get(key).stream().anyMatch(item -> item.getStatus().equals(ZyDepositFileStatusEnum.STRAIGHT_BACK.code));
 | 
	
		
			
				|  |  | +                    if(rePrintFlag){
 | 
	
		
			
				|  |  | +                        rePrintMap.put(key, false);
 | 
	
		
			
				|  |  | +                    }else {
 | 
	
		
			
				|  |  | +                        rePrintMap.put(key, true);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                zyDepositFiles.forEach(item->{
 | 
	
		
			
				|  |  | +                    if(rePrintMap.get(item.getReceiptNo())){
 | 
	
		
			
				|  |  | +                        item.setRePrintFlag(true);
 | 
	
		
			
				|  |  | +                    }else {
 | 
	
		
			
				|  |  | +                        item.setRePrintFlag(false);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              //总支付金额
 | 
	
		
			
				|  |  |              BigDecimal totalPay = BigDecimal.ZERO;
 | 
	
		
			
				|  |  |              //总退费金额
 |