Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r35517 -r35607 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35517) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35607) @@ -335,12 +335,13 @@ * @param invoicePlanDepart 申请科室 * @param departGroupStr 科室分组 * @param printByDepart 按科室打印 + * @param extendedColumnConfigOfDetailedAccountingMonthlyReport 标准模板额外列 * @return */ public List getDepartmentMonthDetailList( boolean showTime, boolean showSendTime,String whetherToCharge, String startTime,String endTime, String depart,String departCoding,String type, String goodsName, String batch,String searchType,boolean disinfection,String disposableGoodsType,String goodsType,Boolean showCustonTousseAmount, String invoicePlanDepart, String departGroupStr - ,boolean printByDepart, String urgentLevel); + ,boolean printByDepart, String urgentLevel, String extendedColumnConfigOfDetailedAccountingMonthlyReport); /** * 查询单个科室的明细核算月报数据 * @param whetherToCharge 一次性物品是否收费 Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r35596 -r35607 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35596) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35607) @@ -6186,7 +6186,7 @@ boolean showTime, boolean showSendTime, String whetherToCharge, String startTime,String endTime, String departSearch,String departCoding,String typeSearch, String goodsNameSearch, String batch,String searchType,boolean disinfection,String disposableGoodsType,String goodsType, Boolean showCustonTousseAmount, String invoicePlanDepartCoding, String departGroupStr, boolean printByDepart - ,String urgentLevel) { + ,String urgentLevel, String extendedColumnConfigOfDetailedAccountingMonthlyReport) { boolean filterWhetherToCharge = false; if(StringUtils.isNotBlank(whetherToCharge) && !whetherToCharge.contains("全部")){ filterWhetherToCharge = true; @@ -6385,12 +6385,10 @@ unitSqlOftousseDefinitionSql = ",td.unit "; } - String extendedColumnConfigOfDetailedAccountingMonthlyReport = CssdUtils.getSystemSetConfigByName("extendedColumnConfigOfDetailedAccountingMonthlyReport"); boolean queryTousseGroupName = false;//是否查询器械包分组 String nullTousseGroupNameSQL = ""; String tdcTousseGroupNameSQL = ""; String tdLeftJoinTdcSQL = ""; - extendedColumnConfigOfDetailedAccountingMonthlyReport = "[\"tousseGroupName\"]"; if(StringUtils.isNotBlank(extendedColumnConfigOfDetailedAccountingMonthlyReport)){ JSONArray arr = JSONArray.fromObject(extendedColumnConfigOfDetailedAccountingMonthlyReport); for (int i = 0; i < arr.size(); i++) { @@ -7187,15 +7185,15 @@ } } if(!queryUrgent && StringUtils.isNotBlank(typeSearch) && typeSearch.contains(TYPE_CHARGE)){ - String chargeSql = String.format(" union all select "+ noMaterialAmountSql +"ci.orgUnitName depart, ci.orgUnitName settleAccountsDepart" + crChargeTimeSqlOfShowTime + noSendTime+ noQueryIntegralSql +",chargeItem name,1 amount,price settlementprice,0 settlementDiscountPrice,'收费项目' type "+ noQueryUnitSql +",'' batchNumber,NULL as expDate ,null as tousseDefinitionId " + String chargeSql = String.format(" union all select "+ noMaterialAmountSql +"ci.orgUnitName depart, ci.orgUnitName settleAccountsDepart" + crChargeTimeSqlOfShowTime + noSendTime + noQuerySupplierName + noQueryIntegralSql +",chargeItem name,1 amount,price settlementprice,0 settlementDiscountPrice,'收费项目' type "+ noQueryUnitSql +",'' batchNumber,NULL as expDate ,null as tousseDefinitionId " + nullTousseGroupNameSQL + " from ChargeRecordItem ci inner join ChargeRecord cr on cr.id=ci.chargeRecord_id where 1=1 %s %s %s %s group by ci.orgUnitName,chargeItem,price,chargeTime " + groupByCrChargeTimeOfShowTime , chargeDepartSql,chargeDateSql,chargeItemSql, ciOrgUnitCodeSql); sql += chargeSql; }else if(!queryUrgent && StringUtils.isBlank(typeSearch)){ - sql += String.format(" union all select "+ noMaterialAmountSql +"ci.orgUnitName depart,ci.orgUnitName settleAccountsDepart" + crChargeTimeSqlOfShowTime + noSendTime + noQueryIntegralSql +",chargeItem name,1 amount,price settlementprice,0 settlementDiscountPrice,'收费项目' type "+ noQueryUnitSql +",'' batchNumber,NULL as expDate ,null as tousseDefinitionId " + sql += String.format(" union all select "+ noMaterialAmountSql +"ci.orgUnitName depart,ci.orgUnitName settleAccountsDepart" + crChargeTimeSqlOfShowTime + noSendTime + noQuerySupplierName + noQueryIntegralSql +",chargeItem name,1 amount,price settlementprice,0 settlementDiscountPrice,'收费项目' type "+ noQueryUnitSql +",'' batchNumber,NULL as expDate ,null as tousseDefinitionId " + nullTousseGroupNameSQL + " from ChargeRecordItem ci inner join ChargeRecord cr on cr.id=ci.chargeRecord_id where 1=1 %s %s %s %s group by ci.orgUnitName,chargeItem,price,chargeTime " + groupByCrChargeTimeOfShowTime @@ -26782,7 +26780,7 @@ ReportDataWriteRecord data = (ReportDataWriteRecord)objectDao.getBySql(ReportDataWriteRecord.class.getSimpleName(), queryCondition); if(data == null){ List resultList = - getDepartmentMonthDetailList(false, false, null, startTime, endTime, null, null, null, null, null, null, false, null, null, showCustonTousseAmount, null, null,false,null); + getDepartmentMonthDetailList(false, false, null, startTime, endTime, null, null, null, null, null, null, false, null, null, showCustonTousseAmount, null, null,false,null,null); if(CollectionUtils.isNotEmpty(resultList)){ JSONObject resultParamData = new JSONObject(); resultParamData.put("startTime", startTime); @@ -26803,7 +26801,7 @@ endTime = ForgonDateUtils.safelyFormatDate(cal.getTime(), ForgonDateUtils.SIMPLEDATEFORMAT_YYYYMMDDHHMM, null); List resultList = - getDepartmentMonthDetailList(false, false, null, startTime, endTime, null, null, null, null, null, null, false, null, null, showCustonTousseAmount,null, null, false, null); + getDepartmentMonthDetailList(false, false, null, startTime, endTime, null, null, null, null, null, null, false, null, null, showCustonTousseAmount,null, null, false, null, null); if(CollectionUtils.isNotEmpty(resultList)){ JSONObject resultParamData = new JSONObject(); resultParamData.put("startTime", startTime); Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r35584 -r35607 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35584) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35607) @@ -1302,6 +1302,10 @@ String whetherToCharge = StrutsParamUtils.getPraramValue("whetherToCharge", ""); boolean showSendTime = StrutsParamUtils.getBoolPraramValue("showSendTime", false); boolean printByDepart = StrutsParamUtils.getBoolPraramValue("printByDepart", false); + String extendedColumnConfigOfDetailedAccountingMonthlyReport = null; + if("DepartmentMonthDetail.jasper".equals(jasperreportName)){//标准模板才使用这个配置项 + extendedColumnConfigOfDetailedAccountingMonthlyReport = CssdUtils.getSystemSetConfigByName("extendedColumnConfigOfDetailedAccountingMonthlyReport"); + } if("singleDepart".equals(patternOfReport)){//单个科室的明细核算月报 if(StringUtils.isNotBlank(tousseType) && tousseType.contains(",")){ throw new RuntimeException("单个科室的明细核算月报不支持物品类型多选查询"); @@ -1316,7 +1320,7 @@ //return jasperReportManager.getDepartmentMonthDetailListOfSingleDepart(whetherToCharge,startTime, endTime, departSearch, departCoding, tousseType, goodsSearch, batch, searchType, disinfection, disposableGoodsType, goodsType, showCustonTousseAmount,invoicePlanDepartCoding); } if("detailedDate".equals(patternOfReport)){//详细日期明细核算月报 - List list = jasperReportManager.getDepartmentMonthDetailList(true,false, whetherToCharge,startTime,endTime, departSearch, departCoding,tousseType, goodsSearch, batch,searchType,disinfection,disposableGoodsType,goodsType,showCustonTousseAmount, invoicePlanDepartCoding, departGroupStr, false, urgentLevel); + List list = jasperReportManager.getDepartmentMonthDetailList(true,false, whetherToCharge,startTime,endTime, departSearch, departCoding,tousseType, goodsSearch, batch,searchType,disinfection,disposableGoodsType,goodsType,showCustonTousseAmount, invoicePlanDepartCoding, departGroupStr, false, urgentLevel,extendedColumnConfigOfDetailedAccountingMonthlyReport); if(CollectionUtils.isNotEmpty(list)){ DecimalFormat df = new DecimalFormat("0.0000"); for (DepartmentMonthDetail detail : list) { @@ -1364,7 +1368,7 @@ } return list; }else{ - return jasperReportManager.getDepartmentMonthDetailList(false,showSendTime, whetherToCharge,startTime,endTime, departSearch, departCoding,tousseType, goodsSearch, batch,searchType,disinfection,disposableGoodsType,goodsType,showCustonTousseAmount, invoicePlanDepartCoding, departGroupStr, printByDepart,urgentLevel); + return jasperReportManager.getDepartmentMonthDetailList(false,showSendTime, whetherToCharge,startTime,endTime, departSearch, departCoding,tousseType, goodsSearch, batch,searchType,disinfection,disposableGoodsType,goodsType,showCustonTousseAmount, invoicePlanDepartCoding, departGroupStr, printByDepart,urgentLevel,extendedColumnConfigOfDetailedAccountingMonthlyReport); } } else if (reportName.equals("tousseReturnDisinfection")) {// 器械包返消 String startDate = StrutsParamUtils.getPraramValue("startDate", null);