|  | @@ -212,9 +212,10 @@ public class SiManageService {
 | 
	
		
			
				|  |  |      public ResultVo<String> institutionSettlementLedgerCheck(InstStlLdgChk instStlLdgChk) {
 | 
	
		
			
				|  |  |          String startdate = DateUtil.getDayStartTime(instStlLdgChk.getStmtBegndate());
 | 
	
		
			
				|  |  |          String enddate = DateUtil.getDayEndTime(instStlLdgChk.getStmtEnddate());
 | 
	
		
			
				|  |  | +        String acctStatement = instStlLdgChk.getAcctPayFlag() == 1 ? "(fund_pay_sumamt+acct_pay)!=0" : "fund_pay_sumamt!=0";
 | 
	
		
			
				|  |  |          List<InstSetlLdgChkBrf> setlBrfs = instStlLdgChk.getMode() == 1 ?
 | 
	
		
			
				|  |  |                  dao.selectSetlChkBrfsWithInsutype(instStlLdgChk.getClrType(), instStlLdgChk.getInsutype(),
 | 
	
		
			
				|  |  | -                        instStlLdgChk.getSetlOptins(), startdate, enddate) :
 | 
	
		
			
				|  |  | +                        instStlLdgChk.getSetlOptins(), startdate, enddate, acctStatement) :
 | 
	
		
			
				|  |  |                  dao.selectSetlinfoBrfsForHisCheck(instStlLdgChk.getClrType(), startdate, enddate);
 | 
	
		
			
				|  |  |          fillInstStlLdgChk(instStlLdgChk, setlBrfs);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -335,39 +336,10 @@ public class SiManageService {
 | 
	
		
			
				|  |  |          String enddate = DateUtil.getDayEndTime(setlChk.getStmtEnddate());
 | 
	
		
			
				|  |  |          if (setlChk.getMode() == 2) {
 | 
	
		
			
				|  |  |              return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "暂不支持HIS与医保的明细对账。");
 | 
	
		
			
				|  |  | -//            if (setlChk.getClrType().equals("11")) {
 | 
	
		
			
				|  |  | -//                return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "暂不支持HIS与医保的明细对账。");
 | 
	
		
			
				|  |  | -//            }
 | 
	
		
			
				|  |  | -//            List<InstSetlLdgChkBrf> setlBrfs = dao.selectSetlinfoBrfsForHisCheck(setlChk.getClrType(), startdate, enddate);
 | 
	
		
			
				|  |  | -//            List<InstSetlLdgChkBrf> hisBrfs = dao.selectHisZyBrfsForHisCheck(startdate, enddate);
 | 
	
		
			
				|  |  | -//            Map<String, InstSetlLdgChkBrf> hisMap = new HashMap<>();
 | 
	
		
			
				|  |  | -//            for (InstSetlLdgChkBrf brf : hisBrfs) {
 | 
	
		
			
				|  |  | -//                hisMap.put(brf.getVisitId(), brf);
 | 
	
		
			
				|  |  | -//            }
 | 
	
		
			
				|  |  | -//            List<InsSetlDetlChkRslt> list = new ArrayList<>();
 | 
	
		
			
				|  |  | -//            for (InstSetlLdgChkBrf setl : setlBrfs) {
 | 
	
		
			
				|  |  | -//                InstSetlLdgChkBrf temp = hisMap.remove(setl.getVisitId());
 | 
	
		
			
				|  |  | -//                if (null != temp) {
 | 
	
		
			
				|  |  | -//                    setl.setMedfeeSumamt2(temp.getMedfeeSumamt());
 | 
	
		
			
				|  |  | -//                    setl.setFundPaySumamt2(temp.getFundPaySumamt());
 | 
	
		
			
				|  |  | -//                }
 | 
	
		
			
				|  |  | -//                list.add(new InsSetlDetlChkRslt(setl));
 | 
	
		
			
				|  |  | -//            }
 | 
	
		
			
				|  |  | -//            if (hisMap.size() > 0) {
 | 
	
		
			
				|  |  | -//                for (Map.Entry<String, InstSetlLdgChkBrf> entry : hisMap.entrySet()) {
 | 
	
		
			
				|  |  | -//                    InstSetlLdgChkBrf value = entry.getValue();
 | 
	
		
			
				|  |  | -//                    value.setMedfeeSumamt2(value.getMedfeeSumamt());
 | 
	
		
			
				|  |  | -//                    value.setFundPaySumamt2(value.getFundPaySumamt());
 | 
	
		
			
				|  |  | -//                    value.setMedfeeSumamt(null);
 | 
	
		
			
				|  |  | -//                    value.setFundPaySumamt(null);
 | 
	
		
			
				|  |  | -//                    list.add(new InsSetlDetlChkRslt(value));
 | 
	
		
			
				|  |  | -//                }
 | 
	
		
			
				|  |  | -//            }
 | 
	
		
			
				|  |  | -//            return ResultVoUtil.success(list);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        String acctStatement = setlChk.getAcctPayFlag() == 1 ? "(fund_pay_sumamt+acct_pay)!=0" : "fund_pay_sumamt!=0";
 | 
	
		
			
				|  |  |          List<InstSetlLdgChkBrf> setlBrfs = dao.selectSetlChkBrfs(setlChk.getClrType(),
 | 
	
		
			
				|  |  | -                setlChk.getSetlOptins(), startdate, enddate);
 | 
	
		
			
				|  |  | +                setlChk.getSetlOptins(), startdate, enddate, acctStatement);
 | 
	
		
			
				|  |  |          fillInstStlLdgChk(setlChk, setlBrfs);
 | 
	
		
			
				|  |  |          String snowId = SnowFlakeId.instance().nextId();
 | 
	
		
			
				|  |  |          String filename = snowId + ".txt";
 | 
	
	
		
			
				|  | @@ -441,7 +413,7 @@ public class SiManageService {
 | 
	
		
			
				|  |  |          wrapper.apply("setl_time>='" + begndate + "'");
 | 
	
		
			
				|  |  |          wrapper.apply("setl_time<='" + enddate + "'");
 | 
	
		
			
				|  |  |          if (prm.getMode() == 1) {
 | 
	
		
			
				|  |  | -            wrapper.apply("fund_pay_sumamt!=0");
 | 
	
		
			
				|  |  | +            wrapper.apply(prm.getAcctPayFlag() == 1 ? "(fund_pay_sumamt+acct_pay)!=0" : "fund_pay_sumamt!=0");
 | 
	
		
			
				|  |  |              wrapper.apply("insuplc_admdvs like '43%' ");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          List<SiSetlinfo> list = setlinfoDao.selectList(wrapper);
 |