Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js =================================================================== diff -u -r30142 -r30464 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 30142) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 30464) @@ -3,10 +3,11 @@ var reportTypeJson = null; var dataForPatternOfReport = []; var isSelect = false; - +var isHaveApplicationDepartMode = false; var myMask; var ALL = '全部'; var enableMultipleBranchesOfHospital = false; +var departSearchName = "科室"; Ext.onReady(function() { Ext.QuickTips.init(); if(sstsConfig.hasOwnProperty('enableMultipleBranchesOfHospital') && sstsConfig.enableMultipleBranchesOfHospital){ @@ -63,27 +64,55 @@ } } }); + //Ext4 申请科室Store + var appDepartJsonStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/systemmanage/orgUnit/searchApplyDepartmentByKeyWord.do?onlyOneself=false&showDisableOrgUnit=false', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id',mapping : 'departmentCode'}, + {name : 'name',mapping : 'departmentName'} + ] + ) + }); diposableGooodsStore.load(); reportTypeJson = sstsConfig.patternOfAccountingMonthlyReport; - if(!enableMultipleBranchesOfHospital && reportTypeJson != null && reportTypeJson.length > 1){ - for (var i = 0; i < reportTypeJson.length; i++) { - var item = reportTypeJson[i]; - var optionText = item.optionText; - var reportName = item.reportName; - var reportType = null; - if(reportName == '隐藏数量的核算月报'){ - reportType = 'hiddenAmountMode'; - }else if(reportName == '显示数量的核算月报'){ - reportType = 'showAmountMode'; - }else if(reportName == '按灭菌方式分组统计的核算月报'){ - reportType = 'accountingMonthlyReportGroupBySterilizationMode'; - }else if(reportName == '按一次性物品类型分组统计的核算月报'){ - reportType = 'accountingMonthlyReportGroupByDisposableGoodsType'; - }else{ - continue; + if(!enableMultipleBranchesOfHospital && reportTypeJson != null){ + if(reportTypeJson.length > 1){ + for (var i = 0; i < reportTypeJson.length; i++) { + var item = reportTypeJson[i]; + var optionText = item.optionText; + var reportName = item.reportName; + var reportType = null; + if(reportName == '隐藏数量的核算月报'){ + reportType = 'hiddenAmountMode'; + }else if(reportName == '显示数量的核算月报'){ + reportType = 'showAmountMode'; + }else if(reportName == '按灭菌方式分组统计的核算月报'){ + reportType = 'accountingMonthlyReportGroupBySterilizationMode'; + }else if(reportName == '按一次性物品类型分组统计的核算月报'){ + reportType = 'accountingMonthlyReportGroupByDisposableGoodsType'; + }else if(reportName == '显示申请科室的核算月报'){ + reportType = 'isHaveApplicationDepartMode'; + isHaveApplicationDepartMode = true; + departSearchName = "结算科室"; + }else{ + continue; + } + dataForPatternOfReport.push([reportType,optionText]); } - dataForPatternOfReport.push([reportType,optionText]); + }else if(reportTypeJson.length == 1){//只配了显示申请科室的核算月报 + + if(reportTypeJson[0].reportName == '显示申请科室的核算月报'){ + reportType = 'isHaveApplicationDepartMode'; + isHaveApplicationDepartMode = true; + departSearchName = "结算科室"; + } } + } var patternOfReport = new Ext.data.SimpleStore({ fields : ['id', 'name'], @@ -99,6 +128,8 @@ patternOfReport = 'accountingMonthlyReportGroupBySterilizationMode'; }else if(reportName == '按一次性物品类型分组统计的核算月报'){ patternOfReport = 'accountingMonthlyReportGroupByDisposableGoodsType'; + }else if(reportName == '显示申请科室的核算月报'){ + patternOfReport = 'isHaveApplicationDepartMode'; }else{ patternOfReport = 'showAmountMode'; } @@ -122,6 +153,9 @@ patternOfReport = 'accountingMonthlyReportGroupBySterilizationMode'; }else if(reportName == '按一次性物品类型分组统计的核算月报'){ patternOfReport = 'accountingMonthlyReportGroupByDisposableGoodsType'; + }else if(reportName == '显示申请科室的核算月报'){ + patternOfReport = 'isHaveApplicationDepartMode'; + departSearchName = "结算科室"; } }else if(reportTypeJson == null || reportTypeJson.length == 0){//默认显示数量 patternOfReport = 'showAmountMode'; @@ -155,6 +189,9 @@ } var jasperreportName = null; var brancheOfHospitalIds = null; + var invoicePlanDepartCoding = null; + var showApplicationDepart = true; + var showAmountColumn = false; if(enableMultipleBranchesOfHospital){ var brancheOfHospital = $Id('brancheOfHospital').value; if(brancheOfHospital == "全部"){ @@ -165,10 +202,30 @@ jasperreportName = "monthReportBranche.jasper"; }else if("accountingMonthlyReportGroupByDisposableGoodsType" == patternOfReport){//按一次性物品类型拆分的核算月报 jasperreportName = "monthReportGroupByDisposableGoodsType.jasper"; + patternOfReport = "showAmountMode"; + jasperreportName = "monthReport.jasper"; }else if('accountingMonthlyReportGroupBySterilizationMode' == patternOfReport){ jasperreportName = 'monthReportGroupBySterilizationMode.jasper'; }else if(sstsConfig.enableToussePointsStatistics){ jasperreportName = "monthIntegralReport.jasper"; + }else if('isHaveApplicationDepartMode' == patternOfReport){ + var invoicePlanDepartSearch = Ext.getCmp('invoicePlanDepartSearch').getRawValue(); + invoicePlanDepartCoding = Ext.getCmp('invoicePlanDepartSearch').getValue(); + if(invoicePlanDepartSearch == "全部" || invoicePlanDepartSearch == ''){ + invoicePlanDepartCoding = ""; + } + var showApplicationDepartValue = Ext.getCmp('showApplicationDepart').getRawValue(); + if(showApplicationDepartValue == '否'){ + showApplicationDepart = false; + jasperreportName = "monthReportHideApplicationDepart.jasper"; + }else{ + jasperreportName = "monthReportShowApplicationDepart.jasper"; + } + var showAmountValue = Ext.getCmp('showAmountColumn').getRawValue(); + showAmountColumn = false; + if(showAmountValue == '是'){ + showAmountColumn = true; + } }else{ jasperreportName = "monthReport.jasper"; } @@ -184,6 +241,9 @@ patternOfReport:patternOfReport, showCustonTousseAmount:showCustonTousseAmount, brancheOfHospitalIds:brancheOfHospitalIds, + invoicePlanDepartCoding:invoicePlanDepartCoding, + showAmountColumn:showAmountColumn, + showApplicationDepart:showApplicationDepart, reportName:'monthReport' } @@ -270,7 +330,7 @@ // bodyStyle : 'padding: 10px 10px 0px 10px;', frame : true, bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; - height : 130, + height : 140, items : [{ layout : 'column', height : 70, @@ -393,13 +453,62 @@ },{ columnWidth : .2, layout : 'form', - labelWidth : 50, + labelWidth : 60, + hidden:!isHaveApplicationDepartMode, + labelSeparator : '申请科室:', + id:"invoicePlanDepartId", items : [{ xtype : 'combo', + id : 'invoicePlanDepartSearch', + name : 'invoicePlanDepartSearch', + valueField : 'id', + displayField : 'name', + minChars : 0, + queryParam : 'spell', + allowBlank : true, + store : appDepartJsonStore, + mode : 'remote', + triggerAction : 'all', + anchor : '95%', + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + /* + if (record.get('name') == ALL) { + if (record.get('checked')) { + combo.selectAll(); + } else { + combo.deselectAll(); + } + } + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('name') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue());*/ + } + } + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 60, + items : [{ + xtype : 'combo', id : 'departSearch', name : 'departSearch', queryParam : 'spell', - fieldLabel : '科室', + fieldLabel : departSearchName, minChars : 0, valueField : 'orgUnitName', displayField : 'name', @@ -408,7 +517,7 @@ store : departJsonStore, lazyInit : true, triggerAction : 'all', - hideTrigger : true, + hideTrigger : false, typeAhead : false, allowBlank : true }] @@ -465,9 +574,57 @@ anchor : '95%' }] },{ + columnWidth : .2, + layout : 'form', + labelWidth : 95, + hidden:!isHaveApplicationDepartMode, + id:'showApplicationDepartId', + items : [{ + xtype : 'combo', + fieldLabel : '显示申请科室列', + id : 'showApplicationDepart', + name : 'showApplicationDepart', + valueField : 'value', + displayField : 'value', + store : new Ext.data.SimpleStore( { + fields : ['value'], + data : [ ['是'],['否'] ] + }), + forceSelection : true, + value:'是', + editable : false, + mode : 'local', + triggerAction : 'all', + anchor : '95%' + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 72, + hidden:!isHaveApplicationDepartMode, + id:'showAmountColumnId', + items : [{ + xtype : 'combo', + fieldLabel : '显示数量列', + id : 'showAmountColumn', + name : 'showAmountColumn', + valueField : 'value', + displayField : 'value', + store : new Ext.data.SimpleStore( { + fields : ['value'], + data : [ ['是'],['否'] ] + }), + forceSelection : true, + value:'否', + editable : false, + mode : 'local', + triggerAction : 'all', + anchor : '95%' + }] + },{ columnWidth : 0.2, layout : 'form', - labelWidth : 100, + labelWidth : 60, id : 'patternOfReportLable', items : [{ xtype : 'combo', @@ -481,7 +638,23 @@ triggerAction : 'all', name : "patternOfReport", id : "patternOfReport", - anchor : '95%' + anchor : '95%', + listeners : { + select: function (combo, record, index) { + if(record.get('id') == 'isHaveApplicationDepartMode'){ + Ext.getCmp('invoicePlanDepartId').show(); + Ext.getCmp('showAmountColumnId').show(); + Ext.getCmp('showApplicationDepartId').show(); + Ext.getCmp('departSearch').el.dom.parentNode.parentNode.parentNode.firstChild.innerHTML ='结算科室'; + }else{ + Ext.getCmp('invoicePlanDepartId').hide(); + Ext.getCmp('showAmountColumnId').hide(); + Ext.getCmp('showApplicationDepartId').hide(); + Ext.getCmp('departSearch').el.dom.parentNode.parentNode.parentNode.firstChild.innerHTML ='科室'; + } + } + } + }] }] }], @@ -536,4 +709,5 @@ departSearch.setValue(orgUnitName); departSearch.disable(); } + appDepartJsonStore.load(); }); \ No newline at end of file Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/MonthReportBean.java =================================================================== diff -u -r29996 -r30464 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/MonthReportBean.java (.../MonthReportBean.java) (revision 29996) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/MonthReportBean.java (.../MonthReportBean.java) (revision 30464) @@ -39,6 +39,10 @@ * 院区 */ private String hospitalDistrict; + /** + * 申请科室 + */ + private String applicationDepart; public String getDepartment() { return department; } @@ -134,5 +138,13 @@ public void setHospitalDistrict(String hospitalDistrict) { this.hospitalDistrict = hospitalDistrict; } + + public String getApplicationDepart() { + return applicationDepart; + } + + public void setApplicationDepart(String applicationDepart) { + this.applicationDepart = applicationDepart; + } } Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r30447 -r30464 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 30447) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 30464) @@ -98,7 +98,6 @@ import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseSterilizationInspectSituationBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.UrgentNeedGoodsProcessingCycle; import com.forgon.disinfectsystem.jasperreports.javabeansource.UseRecordOperatorBean; -import com.forgon.disinfectsystem.jasperreports.javabeansource.WorkloadScoreStatisticReportVo; import com.forgon.disinfectsystem.jasperreports.javabeansource.YearReportChartBean; import com.forgon.disinfectsystem.jasperreports.service.CustomReportsOfDgsfy; import com.forgon.disinfectsystem.jasperreports.service.CustomReportsOfXjjqzyy; @@ -764,10 +763,88 @@ ""); String disposableGoodsType = StrutsParamUtils.getPraramValue( "disposableGoodsType", ""); - String showCustonTousseAmountStr = StrutsParamUtils.getPraramValue( - "showCustonTousseAmount", ""); boolean enableMultipleBranchesOfHospital = CssdUtils.getSystemSetConfigByNameBool("enableMultipleBranchesOfHospital", false); boolean hideAmountColumn = enableMultipleBranchesOfHospital?CssdUtils.getSystemSetConfigByNameBool("hideAmountColumnOfAccountingMonthlyReportForMultipleBranchesHospital", false):false; + // 如果启用了仅仅显示价格,不显示数量的核算月报模板 + boolean applyMonthReportOnlyPriceTemplate = false;//显示数量 + String patternOfReport = StrutsParamUtils.getPraramValue("patternOfReport", null); + String invoicePlanDepartCoding = null; + boolean showApplicationDepart = false; + Map columnConfigOfAccountingInfoMap = new HashMap(); + if("hiddenAmountMode".equals(patternOfReport)){ + applyMonthReportOnlyPriceTemplate = true;//隐藏数量 + }else if("isHaveApplicationDepartMode".equals(patternOfReport)){//有申请科室的格式 + String showAmountColumnStr = StrutsParamUtils.getPraramValue("showAmountColumn","");//显示数量下拉框的值 + if("true".equals(showAmountColumnStr)){ + hideAmountColumn = false; + }else{ + hideAmountColumn = true; + } + invoicePlanDepartCoding = StrutsParamUtils.getPraramValue("invoicePlanDepartCoding","");//申请科室 + String showApplicationDepartStr = StrutsParamUtils.getPraramValue("showApplicationDepart","");//是否显示申请科室 + if(StringUtils.isNotBlank(showApplicationDepartStr) && "true".equals(showApplicationDepartStr)){ + showApplicationDepart = true; + } + //显示申请科室的核算月报的列配置 + String columnConfigOfAccountingMonthlyReportShowApplyDeptStr = CssdUtils.getSystemSetConfigByName("columnConfigOfAccountingMonthlyReportShowApplyDept"); + if(StringUtils.isNotBlank(columnConfigOfAccountingMonthlyReportShowApplyDeptStr)){ + JSONObject obj = JSONObject.fromObject(columnConfigOfAccountingMonthlyReportShowApplyDeptStr); + Iterator iterator = obj.keys(); + while(iterator.hasNext()){ + String key = (String)iterator.next(); + String value = obj.optString(key); + if("申请科室列名字".equals(key)){ + parametMap.put("applicationDepartShowName", value); + }else if("结算科室列名字".equals(key)){ + parametMap.put("settleAccountsDepartShowName", value); + }else if("价格合计列名字".equals(key)){ + parametMap.put("sumPriceShowName", value); + }else if("数量合计列名字".equals(key)){ + parametMap.put("sumAmountShowName", value); + }else if("器械包价格列名字".equals(key)){ + parametMap.put("insidePriceShowName", value); + columnConfigOfAccountingInfoMap.put("器械包总价", value); + continue; + }else if("一次性物品价格列名字".equals(key)){ + parametMap.put("disposablePriceShowName", value); + columnConfigOfAccountingInfoMap.put("一次性物品总价", value); + continue; + }else if("丢失报损材料价格列名字".equals(key)){ + parametMap.put("errorDamagePriceShowName", value); + columnConfigOfAccountingInfoMap.put("丢失报损材料总价", value); + continue; + }else if("器械包数量列名字".equals(key)){ + parametMap.put("insideAmountShowName", value); + columnConfigOfAccountingInfoMap.put("器械包数量", value); + continue; + }else if("一次性物品数量列名字".equals(key)){ + parametMap.put("disposableAmountShowName", value); + columnConfigOfAccountingInfoMap.put("一次性物品数量", value); + continue; + }else if("丢失报损材料数量列名字".equals(key)){ + parametMap.put("errorDamageAmountShowName", value); + columnConfigOfAccountingInfoMap.put("丢失报损材料数量", value); + continue; + } + columnConfigOfAccountingInfoMap.put(key, value); + } + } + //默认值 + if(!columnConfigOfAccountingInfoMap.containsKey("申请科室列名字")){ + parametMap.put("applicationDepartShowName", "申请科室"); + } + if(!columnConfigOfAccountingInfoMap.containsKey("结算科室列名字")){ + parametMap.put("settleAccountsDepartShowName", "结算科室"); + } + if(!columnConfigOfAccountingInfoMap.containsKey("价格合计列名字")){ + parametMap.put("sumPriceShowName", "合计"); + } + if(!columnConfigOfAccountingInfoMap.containsKey("数量合计列名字")){ + parametMap.put("sumAmountShowName", "合计"); + } + } + String showCustonTousseAmountStr = StrutsParamUtils.getPraramValue( + "showCustonTousseAmount", ""); //院区 String brancheOfHospitalIds = null; Set brancheOfHospitalIdSet = null; @@ -784,22 +861,16 @@ Boolean showCustonTousseAmount = Boolean .valueOf(showCustonTousseAmountStr); - // 如果启用了仅仅显示价格,不显示数量的核算月报模板 - boolean applyMonthReportOnlyPriceTemplate = false;//显示数量 - String patternOfReport = StrutsParamUtils.getPraramValue("patternOfReport", null); - if("hiddenAmountMode".equals(patternOfReport)){ - applyMonthReportOnlyPriceTemplate = true;//隐藏数量 - } List dataSource = null; if(!enableMultipleBranchesOfHospital && "accountingMonthlyReportGroupBySterilizationMode".equals(patternOfReport)){//按灭菌方式拆分器械包列,bjcyl个性化报表 dataSource = jasperReportManager.getMonthReportDataGroupBySterilizationMode(startDate, endDate, department, tousseType, disposableGoodsType, showCustonTousseAmount); }else if(!enableMultipleBranchesOfHospital && "accountingMonthlyReportGroupByDisposableGoodsType".equals(patternOfReport)){//一次性物品拆分,添加一次性物品数量合计、价格合计 dataSource = jasperReportManager.getMonthReportDataGroupByDisposableGoodsType(startDate, endDate, department, tousseType, disposableGoodsType, showCustonTousseAmount); - }else{//普通模式(显示数量和数量) + }else{//普通模式(显示数量和数量) dataSource = jasperReportManager .getMonthReportData(startDate, endDate, department, tousseType, disposableGoodsType, - showCustonTousseAmount, patternOfReport, departToBrancheOfHospitalMap, filterBrancheOfHospital, hideAmountColumn); + showCustonTousseAmount, patternOfReport, departToBrancheOfHospitalMap, filterBrancheOfHospital, hideAmountColumn, showApplicationDepart,invoicePlanDepartCoding, columnConfigOfAccountingInfoMap); } parametMap.put("totalIntegral", getTotalIntegral(dataSource));//设置积分 boolean applyMonthReportOneColumnTemplate = CssdUtils Index: ssts-web/src/main/webapp/jasperRtp/monthReportShowApplicationDepart.jasper =================================================================== diff -u Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/monthReportHideApplicationDepart.jasper =================================================================== diff -u Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/monthReportHideApplicationDepart.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/monthReportHideApplicationDepart.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/monthReportHideApplicationDepart.jrxml (revision 30464) @@ -0,0 +1,376 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="34" splitType="Stretch"> + <textField> + <reportElement uuid="14137749-263e-4143-a8dd-482900def002" x="0" y="0" width="450" height="34"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0||$V{amountMeasure}!=0?$P{sumAmountShowNameParam}:$P{sumPriceShowNameParam}]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-web/src/main/webapp/disinfectsystem/config/jfjzyydwyxzx/config.js =================================================================== diff -u -r29891 -r30464 --- ssts-web/src/main/webapp/disinfectsystem/config/jfjzyydwyxzx/config.js (.../config.js) (revision 29891) +++ ssts-web/src/main/webapp/disinfectsystem/config/jfjzyydwyxzx/config.js (.../config.js) (revision 30464) @@ -253,5 +253,9 @@ //装配界面显示打印材料清单按钮 showPrintBOMButton:true, //是否限制同一科室(一级、二级供应室除外)只能在科室申领那里填写一张待回收的器械包申请单。 - limitTousseApply:false + limitTousseApply:false, + //显示申请科室的核算月报的列配置 + columnConfigOfAccountingMonthlyReportShowApplyDept:{"申请科室列名字":"申请科室","结算科室列名字":"结算科室","器械包价格列名字":"复用物品(元)","一次性物品价格列名字":"一次性物品(元)","丢失报损材料价格列名字":"器械材料(元)","价格合计列名字":"总计(元)","器械包数量列名字":"复用物品数量","一次性物品数量列名字":"一次性物品数量","丢失报损材料数量列名字":"器械材料数量","数量合计列名字":"数量合计"}, + //核算月报报表格式 + patternOfAccountingMonthlyReport : [{'optionText':'显示申请科室的核算月报','reportName':'显示申请科室的核算月报'}] } \ No newline at end of file Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r30456 -r30464 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 30456) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 30464) @@ -2919,12 +2919,88 @@ */ @Override public List getMonthReportData(String startDate,String endDate, - String department,String tousseType,String disposableGoodsType,Boolean showCustonTousseAmount, String patternOfReport, Map departToBrancheOfHospitalMap, boolean filterBrancheOfHospital, boolean hideAmountColumn){ + String department,String tousseType,String disposableGoodsType,Boolean showCustonTousseAmount, String patternOfReport, Map departToBrancheOfHospitalMap, boolean filterBrancheOfHospital, boolean hideAmountColumn, boolean showApplicationDepart, String invoicePlanDepartCoding, Map columnConfigOfAccountingInfoMap){ // String handleDeptCode = AcegiHelper.getLoginUser().getOrgUnitCodingFromSupplyRoomConfig(); Set departments = null; if(filterBrancheOfHospital && !(departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty())){ departments = departToBrancheOfHospitalMap.keySet(); } + String insideAmountShowName = null;//器械包数量显示名 + if(columnConfigOfAccountingInfoMap.containsKey("器械包数量")){ + insideAmountShowName = columnConfigOfAccountingInfoMap.get("器械包数量"); + }else{ + insideAmountShowName = "器械包数量"; + } + String disposableAmountShowName = null;//一次性物品数量显示名 + if(columnConfigOfAccountingInfoMap.containsKey("一次性物品数量")){ + disposableAmountShowName = columnConfigOfAccountingInfoMap.get("一次性物品数量"); + }else{ + disposableAmountShowName = "一次性物品数量"; + } + String errorDamageAmountShowName = null;//丢失报损材料数量显示名 + if(columnConfigOfAccountingInfoMap.containsKey("丢失报损材料数量")){ + errorDamageAmountShowName = columnConfigOfAccountingInfoMap.get("丢失报损材料数量"); + }else{ + errorDamageAmountShowName = "丢失报损材料数量"; + } + String insidePriceShowName = null;//器械包总价显示名 + if(columnConfigOfAccountingInfoMap.containsKey("器械包总价")){ + insidePriceShowName = columnConfigOfAccountingInfoMap.get("器械包总价"); + }else{ + insidePriceShowName = "器械包总价"; + } + String errorDamagePriceShowName = null;//丢失报损材料显示名 + if(columnConfigOfAccountingInfoMap.containsKey("丢失报损材料总价")){ + errorDamagePriceShowName = columnConfigOfAccountingInfoMap.get("丢失报损材料总价"); + }else{ + errorDamagePriceShowName = "丢失报损材料总价"; + } + String disposablePriceShowName = null;//一次性物品总价显示名 + if(columnConfigOfAccountingInfoMap.containsKey("一次性物品总价")){ + disposablePriceShowName = columnConfigOfAccountingInfoMap.get("一次性物品总价"); + }else{ + disposablePriceShowName = "一次性物品总价"; + } + String applicationDepartCoding = null; + String iDepartSql = null; + String rrDepartSql = null; + String rDepartSql = null; + String prDepartSql = null; + if(showApplicationDepart){ + iDepartSql = "i.depart,"; + rrDepartSql = "rr.depart,"; + rDepartSql = "r.depart,"; + prDepartSql = "pr.depart,"; + }else{ + iDepartSql = ""; + rrDepartSql = ""; + rDepartSql = ""; + prDepartSql = ""; + } + String iDepartCodingWhereSql = null; + String rDepartCodingWhereSql = null; + String rDepartCodeWhereSql = null; + String iDepartCodeWhereSql = null; + String ogeTargetOrgUnitCodeWhereSql = null; + String prDepartCodingWhereSql = null; + String crOrgUnitCodeWhereSql = null; + if(StringUtils.isNotBlank(invoicePlanDepartCoding)){ + iDepartCodingWhereSql = " and i.departCoding ='" + invoicePlanDepartCoding + "' "; + rDepartCodingWhereSql = " and r.departCoding ='" + invoicePlanDepartCoding + "' "; + rDepartCodeWhereSql = " and r.departCode ='" + invoicePlanDepartCoding + "' "; + iDepartCodeWhereSql = " and i.departCode ='" + invoicePlanDepartCoding + "' "; + ogeTargetOrgUnitCodeWhereSql = " and oge.targetOrgUnitCode ='" + invoicePlanDepartCoding + "' "; + prDepartCodingWhereSql = " and pr.departCoding ='" + invoicePlanDepartCoding + "' "; + crOrgUnitCodeWhereSql = " and cr.orgUnitCode ='" + invoicePlanDepartCoding + "' "; + }else{ + iDepartCodingWhereSql = ""; + rDepartCodingWhereSql = ""; + rDepartCodeWhereSql = ""; + iDepartCodeWhereSql = ""; + ogeTargetOrgUnitCodeWhereSql = ""; + prDepartCodingWhereSql = ""; + crOrgUnitCodeWhereSql = ""; + } boolean enableMultipleBranchesOfHospital = CssdUtils.getSystemSetConfigByNameBool("enableMultipleBranchesOfHospital", false); boolean enableDiscountPrice = CssdUtils.getSystemSetConfigByNameBool("enableDiscountPrice"); boolean enableExpensiveGoods = CssdUtils.getSystemSetConfigByNameBool("enableExpensiveGoods"); @@ -3000,40 +3076,45 @@ tousseTypeReturnSql = String.format(" and (i.disposableGoodsId in (select id from DisposableGoods) or i.tousseDefinition_id in (select id from TousseDefinition where %s) )",SqlUtils.getStringFieldInLargeCollectionsPredicate("tousseType", allTousseType)); } - String invoicePriceSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " - + "as depart,sum(ii.settlementPrice) as price,ii.diposable,sum(ii.settlementDiscountPrice) as settlementDiscountPrice,ii.tousseType from " + Invoice.class.getSimpleName() + " i," + String invoicePriceSql = "select "+ iDepartSql+"i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " + + ",sum(ii.settlementPrice) as price,ii.diposable,sum(ii.settlementDiscountPrice) as settlementDiscountPrice,ii.tousseType from " + Invoice.class.getSimpleName() + " i," + InvoiceItem.class.getSimpleName() + " ii where i.id = ii.invoice_id and "+invoiceItemDisposableGoodsTypePredicate+" and " + getHandleDeptCodeSql("i.orgUnitCoding") + " and (i.status ='收货签收' or " - + "i.status = '已发货') " + invoiceWheresql + tousseTypeInvoiceSql + " group by i.settleAccountsDepartCoding,i.settleAccountsDepart,ii.diposable,ii.tousseType"; + + "i.status = '已发货') " + iDepartCodingWhereSql + invoiceWheresql + tousseTypeInvoiceSql + " group by "+ iDepartSql +" i.settleAccountsDepartCoding,i.settleAccountsDepart,ii.diposable,ii.tousseType"; //如果为高值耗材处理科室用户,并且启用高值耗材功能,且所选物品类型为全部或高值耗材时,则将高值耗材退货数据也抵冲掉 if(enableExpensiveGoods && (StringUtils.isBlank(tousseType) || StringUtils.equals(ExpensiveGoods.TYPE_NAME, tousseType))){ - invoicePriceSql += " union all (select i.settleAccountsDepartCoding coding,i.settleAccountsDepart depart,-1 * sum(egi.price) price,'否' as diposable,-1 * sum(egi.price) settlementDiscountPrice,'高值耗材' as tousseType " + invoicePriceSql += " union all (select "+ iDepartSql +"i.settleAccountsDepartCoding coding,i.settleAccountsDepart settleAccountsDepart,-1 * sum(egi.price) price,'否' as diposable,-1 * sum(egi.price) settlementDiscountPrice,'高值耗材' as tousseType " + " from ExpensiveGoodsGodownEntry egge join ExpensiveGoodsGodownEntryItem eggei on egge.id=eggei.expensiveGoodsGodownEntry_id " + " join ExpensiveGoodsInstance egi on egi.id=eggei.expensiveGoodsInstanceId join Invoice i on egi.invoiceId=i.id " + " where " + getHandleDeptCodeSql("i.orgUnitCoding") + " and egge.type='退库单' " + expensiveGoodsWheresql - + " group by i.settleAccountsDepartCoding,i.settleAccountsDepart)"; + + iDepartCodingWhereSql + + " group by "+ iDepartSql + "i.settleAccountsDepartCoding,i.settleAccountsDepart)"; } ResultSet rs = objectDao.executeSql(invoicePriceSql); try { while(rs.next()){ String code = rs.getString("coding"); - String dept = rs.getString("depart"); + String dept = null; + if(showApplicationDepart){ + dept = rs.getString("depart"); + } + String settleAccountsDepart = rs.getString("settleAccountsDepart"); Double price = rs.getDouble("price"); String diposable = rs.getString("diposable"); Double discountPrice = rs.getDouble("settlementDiscountPrice"); String tType = rs.getString("tousseType"); String columnName = ""; String costColumn = ""; if("是".equals(diposable)){ - columnName = "一次性物品总价"; + columnName = disposablePriceShowName; costColumn = "一次性物品记支"; discountPrice = price;//一次性物品发货项中目前还没有记录折扣价 }else{ if(ExpensiveGoods.TYPE_NAME.equals(tType)){ columnName = "高值耗材总价"; }else{ - columnName = "器械包总价"; + columnName = insidePriceShowName; costColumn = "器械包记支"; } @@ -3042,9 +3123,9 @@ if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } - newMonthReport(code, dept,"2", "价格统计",columnName,price, list, hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"2", "价格统计",columnName,price, list, hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice && StringUtils.isNotBlank(costColumn)){ - newMonthReport(code, dept,"1", "科室记支",costColumn,discountPrice, list, hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支",costColumn,discountPrice, list, hospitalDistrict, enableMultipleBranchesOfHospital); } } } catch (SQLException e) { @@ -3063,11 +3144,11 @@ leftJoinSqlForReturnSql = " left join " + tousseDefinitionIdMaterialAmountSql + " tdm on tdm.id = i.tousseDefinition_id "; } //退货统计(器械包或一次性物品) - String returnSql = "select r.type,(-i.settlementPrice),-i.amount,r.settleAccountsDepartCoding,r.settleAccountsDepart," + String returnSql = "select "+ rDepartSql +"r.type,(-i.settlementPrice) settlementPrice,-i.amount amount,r.settleAccountsDepartCoding,r.settleAccountsDepart," + queryColumnSql + " from ReturnGoodsRecord r join ReturnGoodsItem i on r.id = i.returnGoodsRecord_ID " + leftJoinSqlForReturnSql - + " where "+returnGoodsItemPredicate+ tousseTypeReturnSql + " and "+getHandleDeptCodeSql("r.handleDepartCode")+" and r.returnTime " + betweenSql; + + " where "+returnGoodsItemPredicate+ tousseTypeReturnSql + rDepartCodingWhereSql + " and "+getHandleDeptCodeSql("r.handleDepartCode")+" and r.returnTime " + betweenSql; if(StringUtils.isNotBlank(department)){ returnSql += " and r.settleAccountsDepart = '" + department + "'"; }else if(!(departments == null || departments.isEmpty())){ @@ -3076,11 +3157,15 @@ ResultSet rs5 = objectDao.executeSql(returnSql); try { while(rs5.next()){ - String type = rs5.getString(1); - Double price = rs5.getDouble(2); - int amount = rs5.getInt(3); - String code = rs5.getString(4); - String dept = rs5.getString(5); + String type = rs5.getString("type"); + Double price = rs5.getDouble("settlementPrice"); + int amount = rs5.getInt("amount"); + String code = rs5.getString("settleAccountsDepartCoding"); + String dept = null; + if(showApplicationDepart){ + dept = rs5.getString("depart"); + } + String settleAccountsDepart = rs5.getString("settleAccountsDepart"); String returnTousseType = rs5.getString("tousseType"); String isApplyEntireTousse = rs5.getString("isApplyEntireTousse"); int materialAmount = rs5.getInt("materialAmount"); @@ -3101,22 +3186,22 @@ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } if("一次性物品".equals(type)){ - newMonthReport(code, dept, "2", "价格统计", "一次性物品总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "2", "价格统计", disposablePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, dept, "3", "数量统计", "一次性物品数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "3", "数量统计", disposableAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } }else{ - newMonthReport(code, dept, "2", "价格统计", "器械包总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "2", "价格统计", insidePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","器械包记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","器械包记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, dept, "3", "数量统计", "器械包数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "3", "数量统计", insideAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "包内材料数量", totalMaterialAmount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "4", "包内材料统计", "包内材料数量", totalMaterialAmount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3131,23 +3216,30 @@ if(StringUtils.isBlank(tousseType) || "器械材料".equals(tousseType)){ // 材料发货价格 - String materialInvoicePriceSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " - + "as depart,sum(ii.settlementPrice) as price from MaterialInvoice i," - + "MaterialInvoiceItem ii where i.id = ii.materialInvoice_id and " + getHandleDeptCodeSql("i.orgUnitCoding") + " " + invoiceWheresql + " group by i.settleAccountsDepartCoding,i.settleAccountsDepart"; + String materialInvoicePriceSql = "select "+ iDepartSql+"i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " + + ",sum(ii.settlementPrice) as price from MaterialInvoice i," + + "MaterialInvoiceItem ii where i.id = ii.materialInvoice_id and " + getHandleDeptCodeSql("i.orgUnitCoding") + " " + invoiceWheresql + iDepartCodingWhereSql + " group by " + + iDepartSql + +"i.settleAccountsDepartCoding,i.settleAccountsDepart"; ResultSet materialInvoicePriceResultSet = objectDao.executeSql(materialInvoicePriceSql); try { while(materialInvoicePriceResultSet.next()){ - String code = materialInvoicePriceResultSet.getString(1); - String dept = materialInvoicePriceResultSet.getString(2); - Double price = materialInvoicePriceResultSet.getDouble(3); + String code = materialInvoicePriceResultSet.getString("coding"); + String dept = null; + if(showApplicationDepart){ + dept = materialInvoicePriceResultSet.getString("depart"); + } + String settleAccountsDepart = materialInvoicePriceResultSet.getString("settleAccountsDepart"); + Double price = materialInvoicePriceResultSet.getDouble("price"); + String columnName = "发货材料总价"; String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } - newMonthReport(code, dept,"2", "价格统计",columnName,price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"2", "价格统计",columnName,price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } catch (SQLException e) { @@ -3157,24 +3249,28 @@ } if(!hideAmountColumn){ // 材料发货数量 - String materialInvoiceAmountSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " - + "as depart,mi.amount from MaterialInvoice i inner join MaterialInvoiceItem mi on i.id=mi.materialInvoice_id " + String materialInvoiceAmountSql = "select "+ iDepartSql +"i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " + + ",mi.amount from MaterialInvoice i inner join MaterialInvoiceItem mi on i.id=mi.materialInvoice_id " + "where " + getHandleDeptCodeSql("i.orgUnitCoding") + " " + " and (mi.amount is not null and mi.amount>0) " - + " " + invoiceWheresql; + + " " + invoiceWheresql + iDepartCodingWhereSql; ResultSet materialInvoiceAmountResultSet = objectDao.executeSql(materialInvoiceAmountSql); try { while(materialInvoiceAmountResultSet.next()){ - String code = materialInvoiceAmountResultSet.getString(1); - String dept = materialInvoiceAmountResultSet.getString(2); + String code = materialInvoiceAmountResultSet.getString("coding"); + String dept = null; + if(showApplicationDepart){ + dept = materialInvoicePriceResultSet.getString("depart"); + } + String settleAccountsDepart = materialInvoicePriceResultSet.getString("settleAccountsDepart"); int tousseAmount = materialInvoiceAmountResultSet.getInt("amount"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } if(tousseAmount > 0){ - newMonthReport(code, dept,"3","数量统计", "发货材料数量",tousseAmount,list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"3","数量统计", "发货材料数量",tousseAmount,list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } catch (SQLException e) { @@ -3192,36 +3288,40 @@ banQuery = ""; } //材料报损统计 - String damageSql = "select i.settleAccountsDepartCoding departCode,i.settleAccountsDepart depart,i.materialName,sum(i.materialCost*i.additionalAmount),sum(i.additionalAmount) amount " + String damageSql = "select "+ iDepartSql +"i.settleAccountsDepartCoding departCode,i.settleAccountsDepart,i.materialName,sum(i.materialCost*i.additionalAmount) money,sum(i.additionalAmount) amount " + " from MaterialErrorDamageDetail i where " + banQuery + getHandleDeptCodeSql("i.handleDepartCode") + " and i.type = '" + MaterialErrorDamageDetail.TYPE_DAMAGE + "' and i.additionalTime " - + betweenSql; + + betweenSql + iDepartCodeWhereSql; if(StringUtils.isNotBlank(department)){ damageSql += " and i.settleAccountsDepart = '"+department+"' "; }else if(!(departments == null || departments.isEmpty())){ damageSql += " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("i.settleAccountsDepart", departments); } - damageSql += " group by i.settleAccountsDepartCoding,i.settleAccountsDepart,i.materialName"; + damageSql += " group by "+ iDepartSql +"i.settleAccountsDepartCoding,i.settleAccountsDepart,i.materialName"; ResultSet rs33 = objectDao.executeSql(damageSql); try { if(rs33 != null){ while(rs33.next()){ - String code = rs33.getString(1); - String dept = rs33.getString(2); - String materialName = rs33.getString(3); - Double money = rs33.getDouble(4); + String code = rs33.getString("departCode"); + String dept = null; + if(showApplicationDepart){ + dept = rs33.getString("depart"); + } + String settleAccountsDepart = rs33.getString("settleAccountsDepart"); + String materialName = rs33.getString("materialName"); + Double money = rs33.getDouble("money"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } if(!hideAmountColumn){ int amount = rs33.getInt("amount"); - newMonthReport(code, dept, "3", "数量统计", "丢失报损材料数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "3", "数量统计", errorDamageAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } - newMonthReport(code, dept, "2", "价格统计", "丢失报损材料总价", money, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "2", "价格统计", errorDamagePriceShowName, money, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","材料记支",money, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","材料记支",money, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3232,35 +3332,39 @@ } //材料丢失统计 - String recyclingErrorSql = "select r.settleAccountsDepartCoding departCode,r.settleAccountsDepart depart,r.materialName,sum(r.materialCost*r.additionalAmount),sum(r.additionalAmount) " + String recyclingErrorSql = "select "+ rDepartSql +"r.settleAccountsDepartCoding departCode,r.settleAccountsDepart,r.materialName,sum(r.materialCost*r.additionalAmount) money,sum(r.additionalAmount) amount " + " from MaterialErrorDamageDetail r where r.errorType = '缺失' and r.type = '"+MaterialErrorDamageDetail.TYPE_ERROR+"' and r.materialName != '器械包标识牌' " - + " and " + getHandleDeptCodeSql("r.handleDepartCode") + " and r.additionalTime " + betweenSql; + + " and " + getHandleDeptCodeSql("r.handleDepartCode") + " and r.additionalTime " + betweenSql + rDepartCodeWhereSql; if(StringUtils.isNotBlank(department)){ recyclingErrorSql += " and r.settleAccountsDepart = '"+department+"' "; }else if(!(departments == null || departments.isEmpty())){ recyclingErrorSql += " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("r.settleAccountsDepart", departments); } - recyclingErrorSql += " group by r.settleAccountsDepartCoding,r.settleAccountsDepart,r.materialName"; + recyclingErrorSql += " group by "+ rDepartSql +"r.settleAccountsDepartCoding,r.settleAccountsDepart,r.materialName"; ResultSet rs3 = objectDao.executeSql(recyclingErrorSql); try { if(rs3 != null){ while(rs3.next()){ - String code = rs3.getString(1); - String dept = rs3.getString(2); - String materialName = rs3.getString(3); - Double money = rs3.getDouble(4); + String code = rs3.getString("departCode"); + String dept = null; + if(showApplicationDepart){ + dept = rs3.getString("depart"); + } + String settleAccountsDepart = rs3.getString("settleAccountsDepart"); + String materialName = rs3.getString("materialName"); + Double money = rs3.getDouble("money"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } if(!hideAmountColumn){ - int amount = rs3.getInt(5); - newMonthReport(code, dept,"3", "数量统计","丢失报损材料数量",amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + int amount = rs3.getInt("amount"); + newMonthReport(code, dept,settleAccountsDepart,"3", "数量统计",errorDamageAmountShowName,amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } - newMonthReport(code, dept,"2", "价格统计","丢失报损材料总价",money, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"2", "价格统计",errorDamagePriceShowName,money, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","材料记支",money, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","材料记支",money, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3271,9 +3375,9 @@ } // 材料退货 - String materialReturnSql = "select r.settleAccountsDepartCoding departCoding,r.settleAccountsDepart depart , (-i.settlementPrice) settlementPrice,-i.amount amount " + String materialReturnSql = "select "+ rDepartSql +"r.settleAccountsDepartCoding departCoding,r.settleAccountsDepart , (-i.settlementPrice) settlementPrice,-i.amount amount " + "from ReturnMaterialRecord r,ReturnMaterialItem i where r.id = i.returnMaterialRecord_ID" - + " and "+getHandleDeptCodeSql("r.handleDepartCode")+" and r.returnTime " + betweenSql; + + " and "+getHandleDeptCodeSql("r.handleDepartCode")+" and r.returnTime " + betweenSql + rDepartCodingWhereSql; if(StringUtils.isNotBlank(department)){ materialReturnSql += " and r.settleAccountsDepart = '" + department + "'"; }else if(!(departments == null || departments.isEmpty())){ @@ -3282,20 +3386,24 @@ ResultSet materialReturnResultSet = objectDao.executeSql(materialReturnSql); try { while(materialReturnResultSet.next()){ - String code = materialReturnResultSet.getString(1); - String dept = materialReturnResultSet.getString(2); - Double price = materialReturnResultSet.getDouble(3); + String code = materialReturnResultSet.getString("departCoding"); + String dept = null; + if(showApplicationDepart){ + dept = materialReturnResultSet.getString("depart"); + } + String settleAccountsDepart = materialReturnResultSet.getString("settleAccountsDepart"); + Double price = materialReturnResultSet.getDouble("settlementPrice"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } - newMonthReport(code, dept, "2", "价格统计", "发货材料总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "2", "价格统计", "发货材料总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(!hideAmountColumn){ int amount = materialReturnResultSet.getInt("amount"); - newMonthReport(code, dept, "3", "数量统计", "发货材料数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart, "3", "数量统计", "发货材料数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(enableDiscountPrice){ - newMonthReport(code, dept,"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } }catch(Exception e){ @@ -3311,24 +3419,28 @@ tousseTypeSql = String.format(" and ii.type='%s' ", InvoiceItem.TYPE_AUTO_DEDUCTION); } // 一次性发货数量统计 - String disposableGoodsInvoiceAmountSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " - + "as depart,ii.amount from Invoice i inner join InvoiceItem ii on i.id = ii.invoice_id " + String disposableGoodsInvoiceAmountSql = "select "+ iDepartSql +"i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " + + ",ii.amount from Invoice i inner join InvoiceItem ii on i.id = ii.invoice_id " + "where " + getHandleDeptCodeSql("i.orgUnitCoding") + " " +tousseTypeSql +" and "+disposableGoodsInvoiceAmountPredicate - + " and (i.status ='收货签收' or i.status = '已发货') " + invoiceWheresql; + + " and (i.status ='收货签收' or i.status = '已发货') " + invoiceWheresql + iDepartCodingWhereSql; ResultSet disposableGoodsInvoiceAmountResultSet = objectDao.executeSql(disposableGoodsInvoiceAmountSql); try { while(disposableGoodsInvoiceAmountResultSet.next()){ - String code = disposableGoodsInvoiceAmountResultSet.getString(1); - String dept = disposableGoodsInvoiceAmountResultSet.getString(2); + String code = disposableGoodsInvoiceAmountResultSet.getString("coding"); + String dept = null; + if(showApplicationDepart){ + dept = disposableGoodsInvoiceAmountResultSet.getString("depart"); + } + String settleAccountsDepart = disposableGoodsInvoiceAmountResultSet.getString("settleAccountsDepart"); int diposableAmount = disposableGoodsInvoiceAmountResultSet.getInt("amount"); if(diposableAmount > 0){ String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } - newMonthReport(code, dept,"3","数量统计", "一次性物品数量",diposableAmount,list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,settleAccountsDepart,"3","数量统计", disposableAmountShowName,diposableAmount,list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } catch (SQLException e) { @@ -3356,37 +3468,41 @@ tousseTypeSql = String.format(" and r.type='%s' ", InvoiceItem.TYPE_AUTO_DEDUCTION); } //供应室领用(器械材料与一次性物品) - String receiveSql = "select i.type,(i.amount*i.price),i.amount,r.departcoding " + String receiveSql = "select "+ rDepartSql +" i.type,(i.amount*i.price) price,i.amount,r.departcoding " + "from ReceiveRecord r,ReceiveRecordItem i where r.id = i.receiverecord_id " +tousseTypeSql - + "and "+receiveRecordItemPredicate + receiveDepartWhereSql + " and r.time " + betweenSql; + + "and "+receiveRecordItemPredicate + receiveDepartWhereSql + " and r.time " + betweenSql + rDepartCodingWhereSql; SupplyRoomConfig config = supplyRoomConfigManager.getFirstSupplyRoomConfig(); ResultSet rs4 = objectDao.executeSql(receiveSql); try { while(rs4.next()){ - String type = rs4.getString(1); - Double price = rs4.getDouble(2); + String type = rs4.getString("type"); + Double price = rs4.getDouble("price"); int amount = rs4.getInt("amount"); - String code = rs4.getString(4); + String code = rs4.getString("departcoding"); + String dept = null; + if(showApplicationDepart){ + dept = rs4.getString("depart"); + } String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(config.getOrgUnitName()) == null?null:departToBrancheOfHospitalMap.get(config.getOrgUnitName()).getName(); } if("一次性物品".equals(type)){ - newMonthReport(code, config.getOrgUnitName(), "2", "价格统计", "一次性物品总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept, config.getOrgUnitName(), "2", "价格统计", disposablePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, config.getOrgUnitName(),"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code,dept, config.getOrgUnitName(),"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, config.getOrgUnitName(), "3", "数量统计", "一次性物品数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code,dept, config.getOrgUnitName(), "3", "数量统计", disposableAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } }else{ - newMonthReport(code, config.getOrgUnitName(), "2", "价格统计", "发货材料总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept, config.getOrgUnitName(), "2", "价格统计", "发货材料总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, config.getOrgUnitName(),"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept, config.getOrgUnitName(),"1", "科室记支","材料记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, config.getOrgUnitName(), "3", "数量统计", "发货材料数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept, config.getOrgUnitName(), "3", "数量统计", "发货材料数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3401,7 +3517,7 @@ //供应室领用(器械材料与一次性物品) String receiveSql = "select '一次性物品',(ged.amount*ged.price),ged.amount,oge.targetOrgUnitCode,oge.targetOrgUnitName " + "from GodownEntry oge inner join GodownEntryDiposableGoodsItem ged on oge.id = ged.godownEntryID where oge.type ='退库单' and oge.subType='调拨出库' " - + "and "+outEntryPredicate+" and " + getHandleDeptCodeSql("oge.orgUnitCode") + " and oge.time " + betweenSql; + + "and "+outEntryPredicate+" and " + getHandleDeptCodeSql("oge.orgUnitCode") + " and oge.time " + betweenSql + ogeTargetOrgUnitCodeWhereSql; if(StringUtils.isNotBlank(department)){ receiveSql += " and oge.targetOrgUnitName = '" + department + "'"; }else if(!(departments == null || departments.isEmpty())){ @@ -3414,18 +3530,22 @@ Double price = rs4.getDouble(2); String code = rs4.getString(4); String orgUnitName = rs4.getString(5); + String depart = null; + if(showApplicationDepart){ + depart = orgUnitName; + } String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(orgUnitName) == null?null:departToBrancheOfHospitalMap.get(orgUnitName).getName(); } if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "2", "价格统计", "一次性物品总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName, "2", "价格统计", disposablePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ int amount = rs4.getInt("amount"); - newMonthReport(code, orgUnitName, "3", "数量统计", "一次性物品数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName, "3", "数量统计", disposableAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3440,7 +3560,7 @@ //供应室领用(器械材料与一次性物品) String receiveSql = "select '一次性物品',(ged.amount*ged.price),ged.amount,oge.orgUnitCode,oge.orgUnitName " + "from GodownEntry oge inner join GodownEntryDiposableGoodsItem ged on oge.id = ged.godownEntryID where oge.type ='退库单' and oge.subType='盘亏出库' " - + "and "+outEntryPredicate+" and " + getHandleDeptCodeSql("oge.orgUnitCode") + " and oge.time " + betweenSql; + + "and "+outEntryPredicate+" and " + getHandleDeptCodeSql("oge.orgUnitCode") + " and oge.time " + betweenSql + ogeTargetOrgUnitCodeWhereSql; if(StringUtils.isNotBlank(department)){ receiveSql += " and oge.orgUnitName = '" + department + "'"; }else if(!(departments == null || departments.isEmpty())){ @@ -3458,13 +3578,17 @@ if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(orgUnitName) == null?null:departToBrancheOfHospitalMap.get(orgUnitName).getName(); } + String depart = null; + if(showApplicationDepart){ + depart = orgUnitName; + } if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "2", "价格统计", "一次性物品总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName, "2", "价格统计", disposablePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, orgUnitName, "3", "数量统计", "一次性物品数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, depart,orgUnitName, "3", "数量统计", disposableAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3477,29 +3601,33 @@ // 一次性物品装配扣减库存 { if(isSupplyRoomUser && (StringUtils.isBlank(tousseType) || TousseItem.TYPE_DIPOSABLE_GOODS.equals(tousseType))){ - String sql = "select '一次性物品',(dgi.amount*dgi.fluctuationPrice),dgi.amount,pr.orgUnitCoding,pr.orgUnitName " + String sql = "select "+ prDepartSql +"'一次性物品' type,(dgi.amount*dgi.fluctuationPrice) price,dgi.amount,pr.orgUnitCoding,pr.orgUnitName " + "from PackingRecord pr inner join DiposableGoodsItem dgi on pr.id = dgi.packingRecordId where " - +packingDisposableGoodsTypePredicate+" and " + getHandleDeptCodeSql("pr.orgUnitCoding") + " and pr.packTime " + betweenSql; + +packingDisposableGoodsTypePredicate+" and " + getHandleDeptCodeSql("pr.orgUnitCoding") + " and pr.packTime " + betweenSql + prDepartCodingWhereSql; ResultSet rs = objectDao.executeSql(sql); try { while(rs.next()){ - String type = rs.getString(1); - Double price = rs.getDouble(2); + String type = rs.getString("type"); + Double price = rs.getDouble("price"); int amount = rs.getInt("amount"); - String code = rs.getString(4); - String orgUnitName = rs.getString(5); + String code = rs.getString("orgUnitCoding"); + String dept = null; + if(showApplicationDepart){ + dept = rs.getString("depart"); + } + String orgUnitName = rs.getString("orgUnitName"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(orgUnitName) == null ?null:departToBrancheOfHospitalMap.get(orgUnitName).getName(); } if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "2", "价格统计", "一次性物品总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,orgUnitName, "2", "价格统计", disposablePriceShowName, price, list,hospitalDistrict, enableMultipleBranchesOfHospital); if(enableDiscountPrice){ - newMonthReport(code, orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,orgUnitName,"1", "科室记支","一次性物品记支",price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } if(!hideAmountColumn){ - newMonthReport(code, orgUnitName, "3", "数量统计", "一次性物品数量", amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code, dept,orgUnitName, "3", "数量统计", disposableAmountShowName, amount, list,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3531,34 +3659,38 @@ } leftJoinSqlForInvoiceAmountSql = " left join " + tousseDefinitionIdMaterialAmountSql + " tdm on tdm.id = ii.tousseDefinitionId "; } - String invoiceAmountSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " - + "as depart,ii.amount,ii.tousseType," + String invoiceAmountSql = "select "+ iDepartSql +"i.settleAccountsDepartCoding as coding,i.settleAccountsDepart " + + ",ii.amount,ii.tousseType," + columnSqlForInvoiceAmountSql + " from Invoice i join InvoiceItem ii on i.id = ii.invoice_id " + leftJoinSqlForInvoiceAmountSql + " where " + getHandleDeptCodeSql("i.orgUnitCoding") + " " + " and (ii.amount is not null and ii.amount>0) "// 限制为只查包含器械包(含消毒物品、敷料包等)数量的 + " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("ii.tousseType", allTousseType) - + " and (i.status ='收货签收' or i.status = '已发货') " + invoiceWheresql; + + " and (i.status ='收货签收' or i.status = '已发货') " + invoiceWheresql + iDepartCodingWhereSql; //如果为高值耗材处理科室用户,并且启用高值耗材功能,且所选物品类型为全部或高值耗材时,则将高值耗材退货数据也抵冲掉 if(enableExpensiveGoods && (StringUtils.isBlank(tousseType) || StringUtils.equals(ExpensiveGoods.TYPE_NAME, tousseType))){ String queryIntegralSql = enableToussePointsStatistics?",0.0 as integral":""; - invoiceAmountSql += " union all (select i.settleAccountsDepartCoding coding,i.settleAccountsDepart depart,-1 * count(egi.id) as amount,'高值耗材' as tousseType," + invoiceAmountSql += " union all (select "+ iDepartSql+"i.settleAccountsDepartCoding coding,i.settleAccountsDepart,-1 * count(egi.id) as amount,'高值耗材' as tousseType," + " null as materialAmount,null as isApplyEntireTousse " + queryIntegralSql + " from ExpensiveGoodsGodownEntry egge join ExpensiveGoodsGodownEntryItem eggei on egge.id=eggei.expensiveGoodsGodownEntry_id " + " join ExpensiveGoodsInstance egi on egi.id=eggei.expensiveGoodsInstanceId join Invoice i on egi.invoiceId=i.id " - + " where " + getHandleDeptCodeSql("i.orgUnitCoding") + " and egge.type='退库单' " + expensiveGoodsWheresql - + " group by i.settleAccountsDepartCoding,i.settleAccountsDepart)"; + + " where " + getHandleDeptCodeSql("i.orgUnitCoding") + " and egge.type='退库单' " + expensiveGoodsWheresql + iDepartCodingWhereSql + + " group by "+ iDepartSql +"i.settleAccountsDepartCoding,i.settleAccountsDepart)"; } ResultSet rs2 = objectDao.executeSql(invoiceAmountSql); try { while(rs2.next()){ - String code = rs2.getString(1); - String dept = rs2.getString(2); - int tousseAmount = ConvertNumber.getNumberIntValue(rs2.getObject(3), 0); - String tousseTypeName = rs2.getString(4); + String code = rs2.getString("coding"); + String dept = null; + if(showApplicationDepart){ + dept = rs2.getString("depart"); + } + String settleAccountsDepart = rs2.getString("settleAccountsDepart"); + int tousseAmount = ConvertNumber.getNumberIntValue(rs2.getObject("amount"), 0); + String tousseTypeName = rs2.getString("tousseType"); int materialAmount = rs2.getInt("materialAmount"); String isApplyEntireTousse = rs2.getString("isApplyEntireTousse"); Double integral = null; @@ -3584,11 +3716,11 @@ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(dept) == null?null:departToBrancheOfHospitalMap.get(dept).getName(); } if(ExpensiveGoods.TYPE_NAME.equals(tousseTypeName)){ - newMonthReport(code, dept,"3","数量统计", "高值耗材数量",tousseAmount,list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code,dept,settleAccountsDepart,"3","数量统计", "高值耗材数量",tousseAmount,list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); }else{ - newMonthReport(code, dept,"3","数量统计", "器械包数量",tousseAmount,list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code,dept,settleAccountsDepart,"3","数量统计", insideAmountShowName,tousseAmount,list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "包内材料数量", totalMaterialAmount, list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(code,dept,settleAccountsDepart, "4", "包内材料统计", "包内材料数量", totalMaterialAmount, list,integral,hospitalDistrict, enableMultipleBranchesOfHospital); } } } @@ -3608,19 +3740,23 @@ chargeDepartSql += " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("ci.orgUnitName", departments); } String sql = String.format("select ci.orgUnitName,ci.orgUnitCode,sum(price) price from ChargeRecordItem ci " - + " inner join ChargeRecord cr on cr.id=ci.chargeRecord_id where 1=1 %s %s group by ci.orgUnitName,ci.orgUnitCode", chargeDateSql,chargeDepartSql); + + " inner join ChargeRecord cr on cr.id=ci.chargeRecord_id where 1=1 %s %s %s group by ci.orgUnitName,ci.orgUnitCode", chargeDateSql,chargeDepartSql, crOrgUnitCodeWhereSql); ResultSet rs5 = null; try { rs5 = objectDao.executeSql(sql); while(rs5.next()){ Double price = rs5.getDouble("price"); String orgUnitName = rs5.getString("orgUnitName"); + String dept = null; + if(showApplicationDepart){ + dept = rs5.getString("depart"); + } String orgUnitCode = rs5.getString("orgUnitCode"); String hospitalDistrict = null; if(enableMultipleBranchesOfHospital){ hospitalDistrict = departToBrancheOfHospitalMap == null || departToBrancheOfHospitalMap.isEmpty() || departToBrancheOfHospitalMap.get(orgUnitName) == null?null:departToBrancheOfHospitalMap.get(orgUnitName).getName(); } - newMonthReport(orgUnitCode, orgUnitName, "2", "价格统计", "收费项目总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); + newMonthReport(orgUnitCode, dept,orgUnitName, "2", "价格统计", "收费项目总价", price, list,hospitalDistrict, enableMultipleBranchesOfHospital); } }catch(Exception e){ e.printStackTrace(); @@ -3741,7 +3877,7 @@ }else{ columnName = "c器械包总价"; } - newMonthReport(code, dept,"2", "价格统计",columnName,price, list, null, null); + newMonthReport(code, null,dept,"2", "价格统计",columnName,price, list, null, null); } if(codeAndTypeMap.size() > 0){ Map departSum = new HashMap(); @@ -3750,7 +3886,7 @@ MonthReportBean item = entry.getValue(); String code = item.getRowNum(); Double price = item.getMoney(); - newMonthReport(code, item.getDepartment(),"2", "价格统计", key.substring(key.indexOf(",") + 1),price, list, null, null); + newMonthReport(code, null,item.getDepartment(),"2", "价格统计", key.substring(key.indexOf(",") + 1),price, list, null, null); if(departSum.containsKey(code)){ MonthReportBean mrb = departSum.get(code); mrb.setMoney(MathTools.add(mrb.getMoney(), price).doubleValue()); @@ -3821,10 +3957,10 @@ setCodeAndTypeMapData(codeAndTypeMap, code, dept, rs5.getString("dgType"), amount, price); continue; } - newMonthReport(code, dept, "2", "价格统计", "c器械包总价", price, list, null, null); - newMonthReport(code, dept, "3", "数量统计", "c器械包数量", amount, list, null, null); + newMonthReport(code, null,dept, "2", "价格统计", "c器械包总价", price, list, null, null); + newMonthReport(code, null,dept, "3", "数量统计", "c器械包数量", amount, list, null, null); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "c包内材料数量", totalMaterialAmount, list, null, null); + newMonthReport(code, null,dept, "4", "包内材料统计", "c包内材料数量", totalMaterialAmount, list, null, null); } } addDisposableGoodsData(codeAndTypeMap, list); @@ -3849,7 +3985,7 @@ Double price = materialInvoicePriceResultSet.getDouble(3); String columnName = "c发货材料总价"; - newMonthReport(code, dept,"2", "价格统计",columnName,price, list, null, null); + newMonthReport(code, null,dept,"2", "价格统计",columnName,price, list, null, null); } } catch (SQLException e) { e.printStackTrace(); @@ -3871,7 +4007,7 @@ String dept = materialInvoiceAmountResultSet.getString(2); int tousseAmount = materialInvoiceAmountResultSet.getInt(3); if(tousseAmount > 0){ - newMonthReport(code, dept,"3","数量统计", "c发货材料数量",tousseAmount,list, null, null); + newMonthReport(code, null,dept,"3","数量统计", "c发货材料数量",tousseAmount,list, null, null); } } } catch (SQLException e) { @@ -3907,8 +4043,8 @@ Double money = rs33.getDouble(4); int amount = rs33.getInt(5); - newMonthReport(code, dept, "3", "数量统计", "c丢失报损材料数量", amount, list, null, null); - newMonthReport(code, dept, "2", "价格统计", "c丢失报损材料总价", money, list, null, null); + newMonthReport(code, null,dept, "3", "数量统计", "c丢失报损材料数量", amount, list, null, null); + newMonthReport(code, null,dept, "2", "价格统计", "c丢失报损材料总价", money, list, null, null); } } }catch(Exception e){ @@ -3936,8 +4072,8 @@ Double money = rs3.getDouble(4); int amount = rs3.getInt(5); - newMonthReport(code, dept,"3", "数量统计","c丢失报损材料数量",amount, list, null, null); - newMonthReport(code, dept,"2", "价格统计","c丢失报损材料总价",money, list, null, null); + newMonthReport(code, null,dept,"3", "数量统计","c丢失报损材料数量",amount, list, null, null); + newMonthReport(code, null,dept,"2", "价格统计","c丢失报损材料总价",money, list, null, null); } } }catch(Exception e){ @@ -3961,8 +4097,8 @@ Double price = materialReturnResultSet.getDouble(3); int amount = materialReturnResultSet.getInt(4); - newMonthReport(code, dept, "2", "价格统计", "c发货材料总价", price, list, null, null); - newMonthReport(code, dept, "3", "数量统计", "c发货材料数量", amount, list, null, null); + newMonthReport(code, null,dept, "2", "价格统计", "c发货材料总价", price, list, null, null); + newMonthReport(code, null,dept, "3", "数量统计", "c发货材料数量", amount, list, null, null); } }catch(Exception e){ e.printStackTrace(); @@ -4013,7 +4149,7 @@ MonthReportBean item = entry.getValue(); String code = item.getRowNum(); int amount = item.getAmount(); - newMonthReport(code, item.getDepartment(),"3", "数量统计", key.substring(key.indexOf(",") + 1),amount, list, null, null); + newMonthReport(code, null,item.getDepartment(),"3", "数量统计", key.substring(key.indexOf(",") + 1),amount, list, null, null); if(departSum.containsKey(code)){ MonthReportBean mrb = departSum.get(code); mrb.setAmount(MathTools.add(mrb.getAmount(), amount).intValue()); @@ -4074,8 +4210,8 @@ setCodeAndTypeMapData(codeAndTypeMap, code, orgUnitName, rs4.getString("dgType"), amount, price); continue; } - newMonthReport(code, config.getOrgUnitName(), "2", "价格统计", "c发货材料总价", price, list, null, null); - newMonthReport(code, config.getOrgUnitName(), "3", "数量统计", "c发货材料数量", amount, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "2", "价格统计", "c发货材料总价", price, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "3", "数量统计", "c发货材料数量", amount, list, null, null); } addDisposableGoodsData(codeAndTypeMap, list); }catch(Exception e){ @@ -4194,9 +4330,9 @@ tousseAmount = totalMaterialAmount; } } - newMonthReport(code, dept,"3","数量统计", "c器械包数量",tousseAmount,list, null, null); + newMonthReport(code, null,dept,"3","数量统计", "c器械包数量",tousseAmount,list, null, null); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "c包内材料数量", totalMaterialAmount, list, null, null); + newMonthReport(code, null,dept, "4", "包内材料统计", "c包内材料数量", totalMaterialAmount, list, null, null); } } } catch (SQLException e) { @@ -4221,7 +4357,7 @@ Double price = rs5.getDouble("price"); String orgUnitName = rs5.getString("orgUnitName"); String orgUnitCode = rs5.getString("orgUnitCode"); - newMonthReport(orgUnitCode, orgUnitName, "2", "价格统计", "c收费项目总价", price, list, null, null); + newMonthReport(orgUnitCode, null,orgUnitName, "2", "价格统计", "c收费项目总价", price, list, null, null); } }catch(Exception e){ e.printStackTrace(); @@ -4248,8 +4384,8 @@ Double price = item.getMoney(); Integer amount = item.getAmount(); String columnName = key.substring(key.indexOf(",") + 1);//a +一次物品类型 - newMonthReport(code, dept, "2", "价格统计", columnName, price, list, null, null); - newMonthReport(code, dept,"3", "数量统计", columnName, amount, list, null, null); + newMonthReport(code, null,dept, "2", "价格统计", columnName, price, list, null, null); + newMonthReport(code, null,dept,"3", "数量统计", columnName, amount, list, null, null); if(departSum.containsKey(code)){//计算合计 MonthReportBean mrb = departSum.get(code); mrb.setAmount(MathTools.add(mrb.getAmount(), amount).intValue()); @@ -4415,11 +4551,11 @@ String columnName = ""; if("是".equals(diposable)){ discountPrice = price;//一次性物品发货项中目前还没有记录折扣价 - newMonthReport(code, dept,"3", "价格统计","b一次性物品总价",price, list, null, null); + newMonthReport(code, null,dept,"3", "价格统计","b一次性物品总价",price, list, null, null); continue; } columnName = getColumnNameBySterilingMethod(sterilisationAndSterilizationModeMap, sterilingMethod); - newMonthReport(code, dept,"3", "价格统计",columnName,price, list, null, null); + newMonthReport(code, null,dept,"3", "价格统计",columnName,price, list, null, null); } } catch (SQLException e) { e.printStackTrace(); @@ -4472,16 +4608,16 @@ } if("一次性物品".equals(type)){ - newMonthReport(code, dept, "3", "价格统计", "b一次性物品总价", price, list, null, null); - newMonthReport(code, dept, "2", "数量统计", "b一次性物品数量", amount, list, null, null); + newMonthReport(code, null,dept, "3", "价格统计", "b一次性物品总价", price, list, null, null); + newMonthReport(code, null,dept, "2", "数量统计", "b一次性物品数量", amount, list, null, null); continue; } String columnName = getColumnNameBySterilingMethod(sterilisationAndSterilizationModeMap, sterilingMethod); - newMonthReport(code, dept, "3", "价格统计", columnName, price, list, null, null); - newMonthReport(code, dept, "2", "数量统计", columnName, amount, list, null, null); + newMonthReport(code, null,dept, "3", "价格统计", columnName, price, list, null, null); + newMonthReport(code, null,dept, "2", "数量统计", columnName, amount, list, null, null); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "b包内材料数量", totalMaterialAmount, list, null, null); + newMonthReport(code, null,dept, "4", "包内材料统计", "b包内材料数量", totalMaterialAmount, list, null, null); } } }catch(Exception e){ @@ -4505,7 +4641,7 @@ Double price = materialInvoicePriceResultSet.getDouble(3); String columnName = "b发货材料总价"; - newMonthReport(code, dept,"3", "价格统计",columnName,price, list, null, null); + newMonthReport(code, null,dept,"3", "价格统计",columnName,price, list, null, null); } } catch (SQLException e) { e.printStackTrace(); @@ -4527,7 +4663,7 @@ String dept = materialInvoiceAmountResultSet.getString(2); int tousseAmount = materialInvoiceAmountResultSet.getInt(3); if(tousseAmount > 0){ - newMonthReport(code, dept,"2","数量统计", "b发货材料数量",tousseAmount,list, null, null); + newMonthReport(code, null,dept,"2","数量统计", "b发货材料数量",tousseAmount,list, null, null); } } } catch (SQLException e) { @@ -4560,8 +4696,8 @@ Double money = rs33.getDouble(4); int amount = rs33.getInt(5); - newMonthReport(code, dept, "2", "数量统计", "b丢失报损材料数量", amount, list, null, null); - newMonthReport(code, dept, "3", "价格统计", "b丢失报损材料总价", money, list, null, null); + newMonthReport(code, null,dept, "2", "数量统计", "b丢失报损材料数量", amount, list, null, null); + newMonthReport(code, null,dept, "3", "价格统计", "b丢失报损材料总价", money, list, null, null); } } }catch(Exception e){ @@ -4589,8 +4725,8 @@ Double money = rs3.getDouble(4); int amount = rs3.getInt(5); - newMonthReport(code, dept,"2", "数量统计","b丢失报损材料数量",amount, list, null, null); - newMonthReport(code, dept,"3", "价格统计","b丢失报损材料总价",money, list, null, null); + newMonthReport(code, null,dept,"2", "数量统计","b丢失报损材料数量",amount, list, null, null); + newMonthReport(code, null,dept,"3", "价格统计","b丢失报损材料总价",money, list, null, null); } } }catch(Exception e){ @@ -4614,8 +4750,8 @@ Double price = materialReturnResultSet.getDouble(3); int amount = materialReturnResultSet.getInt(4); - newMonthReport(code, dept, "3", "价格统计", "b发货材料总价", price, list, null, null); - newMonthReport(code, dept, "2", "数量统计", "b发货材料数量", amount, list, null, null); + newMonthReport(code, null,dept, "3", "价格统计", "b发货材料总价", price, list, null, null); + newMonthReport(code, null,dept, "2", "数量统计", "b发货材料数量", amount, list, null, null); } }catch(Exception e){ e.printStackTrace(); @@ -4643,7 +4779,7 @@ String dept = disposableGoodsInvoiceAmountResultSet.getString(2); int diposableAmount = disposableGoodsInvoiceAmountResultSet.getInt(3); if(diposableAmount > 0){ - newMonthReport(code, dept,"2","数量统计", "b一次性物品数量",diposableAmount,list, null, null); + newMonthReport(code, null,dept,"2","数量统计", "b一次性物品数量",diposableAmount,list, null, null); } } } catch (SQLException e) { @@ -4684,11 +4820,11 @@ int amount = rs4.getInt(3); String code = rs4.getString(4); if("一次性物品".equals(type)){ - newMonthReport(code, config.getOrgUnitName(), "3", "价格统计", "b一次性物品总价", price, list, null, null); - newMonthReport(code, config.getOrgUnitName(), "2", "数量统计", "b一次性物品数量", amount, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "3", "价格统计", "b一次性物品总价", price, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "2", "数量统计", "b一次性物品数量", amount, list, null, null); }else{ - newMonthReport(code, config.getOrgUnitName(), "3", "价格统计", "b发货材料总价", price, list, null, null); - newMonthReport(code, config.getOrgUnitName(), "2", "数量统计", "b发货材料数量", amount, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "3", "价格统计", "b发货材料总价", price, list, null, null); + newMonthReport(code, null,config.getOrgUnitName(), "2", "数量统计", "b发货材料数量", amount, list, null, null); } } }catch(Exception e){ @@ -4713,8 +4849,8 @@ String code = rs4.getString(4); String orgUnitName = rs4.getString(5); if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); - newMonthReport(code, orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); + newMonthReport(code, null,orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); + newMonthReport(code, null,orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); } } }catch(Exception e){ @@ -4739,8 +4875,8 @@ String code = rs4.getString(4); String orgUnitName = rs4.getString(5); if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); - newMonthReport(code, orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); + newMonthReport(code, null,orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); + newMonthReport(code, null,orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); } } }catch(Exception e){ @@ -4765,8 +4901,8 @@ String code = rs.getString(4); String orgUnitName = rs.getString(5); if("一次性物品".equals(type)){ - newMonthReport(code, orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); - newMonthReport(code, orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); + newMonthReport(code, null,orgUnitName, "3", "价格统计", "b一次性物品总价", price, list, null, null); + newMonthReport(code, null,orgUnitName, "2", "数量统计", "b一次性物品数量", amount, list, null, null); } } }catch(Exception e){ @@ -4823,9 +4959,9 @@ } } String columnName = getColumnNameBySterilingMethod(sterilisationAndSterilizationModeMap, sterilingMethod); - newMonthReport(code, dept,"2","数量统计", columnName,tousseAmount,list, null, null); + newMonthReport(code, null,dept,"2","数量统计", columnName,tousseAmount,list, null, null); if(monthReportMaterialAmountOfTousse){ - newMonthReport(code, dept, "4", "包内材料统计", "b包内材料数量", totalMaterialAmount, list, null, null); + newMonthReport(code, null,dept, "4", "包内材料统计", "b包内材料数量", totalMaterialAmount, list, null, null); } } } catch (SQLException e) { @@ -4850,7 +4986,7 @@ Double price = rs5.getDouble("price"); String orgUnitName = rs5.getString("orgUnitName"); String orgUnitCode = rs5.getString("orgUnitCode"); - newMonthReport(orgUnitCode, orgUnitName, "3", "价格统计", "b收费项目总价", price, list, null, null); + newMonthReport(orgUnitCode, null,orgUnitName, "3", "价格统计", "b收费项目总价", price, list, null, null); } }catch(Exception e){ e.printStackTrace(); @@ -4900,22 +5036,23 @@ codeAndTypeMap.put(key, mrb); } } - private void newMonthReport(String code, String dept, + private void newMonthReport(String code, String dept, String settleAccountsDepart, String columnNum, String columnTitle, String columnName, Double money,List list, String hospitalDistrict , Boolean enableMultipleBranchesOfHospital) { MonthReportBean bean = new MonthReportBean(); bean.setRowNum(code); - bean.setDepartment(dept); + bean.setApplicationDepart(dept); + bean.setDepartment(settleAccountsDepart); bean.setColumnNum(columnNum); bean.setColumnTitle(columnTitle); bean.setColumnName(columnName); bean.setMoney(money); bean.setHospitalDistrict(hospitalDistrict); if(enableMultipleBranchesOfHospital != null && enableMultipleBranchesOfHospital){ if(StringUtils.isBlank(hospitalDistrict)){ - newMonthReport(null, "合计_", columnNum, columnTitle, columnName, money, list, hospitalDistrict, false); + newMonthReport(null, null,"合计_", columnNum, columnTitle, columnName, money, list, hospitalDistrict, false); }else{ - newMonthReport(null, "合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, money, list, hospitalDistrict, false); + newMonthReport(null, null, "合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, money, list, hospitalDistrict, false); } } list.add(bean); @@ -4930,33 +5067,35 @@ * @param amount * @param list */ - private void newMonthReport(String code, String dept, + private void newMonthReport(String code, String dept, String settleAccountsDepart, String columnNum, String columnTitle, String columnName, Integer amount, List list, String hospitalDistrict, Boolean enableMultipleBranchesOfHospital) { MonthReportBean bean = new MonthReportBean(); bean.setRowNum(code); - bean.setDepartment(dept); + bean.setApplicationDepart(dept); + bean.setDepartment(settleAccountsDepart); bean.setColumnNum(columnNum); bean.setColumnTitle(columnTitle); bean.setColumnName(columnName); bean.setAmount(amount); bean.setHospitalDistrict(hospitalDistrict); if(enableMultipleBranchesOfHospital != null && enableMultipleBranchesOfHospital){ if(StringUtils.isBlank(hospitalDistrict)){ - newMonthReport(null, "合计_", columnNum, columnTitle, columnName, amount, list, hospitalDistrict, false); + newMonthReport(null,null,"合计_", columnNum, columnTitle, columnName, amount, list, hospitalDistrict, false); }else{ - newMonthReport(null, "合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, amount, list, hospitalDistrict, false); + newMonthReport(null,null,"合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, amount, list, hospitalDistrict, false); } } list.add(bean); } - private void newMonthReport(String code, String dept, + private void newMonthReport(String code, String dept,String settleAccountsDepart, String columnNum, String columnTitle, String columnName, Integer amount,List list, Double integral, String hospitalDistrict, Boolean enableMultipleBranchesOfHospital) { MonthReportBean bean = new MonthReportBean(); bean.setRowNum(code); - bean.setDepartment(dept); + bean.setDepartment(settleAccountsDepart); + bean.setApplicationDepart(dept); bean.setColumnNum(columnNum); bean.setColumnTitle(columnTitle); bean.setColumnName(columnName); @@ -4967,9 +5106,9 @@ bean.setHospitalDistrict(hospitalDistrict); if(enableMultipleBranchesOfHospital != null && enableMultipleBranchesOfHospital){ if(StringUtils.isBlank(hospitalDistrict)){ - newMonthReport(null, "合计_", columnNum, columnTitle, columnName, amount, list, integral, hospitalDistrict, false); + newMonthReport(null, null,"合计_", columnNum, columnTitle, columnName, amount, list, integral, hospitalDistrict, false); }else{ - newMonthReport(null, "合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, amount, list, integral, hospitalDistrict, false); + newMonthReport(null, null,"合计_"+ hospitalDistrict, columnNum, columnTitle, columnName, amount, list, integral, hospitalDistrict, false); } } list.add(bean); Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r30447 -r30464 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 30447) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 30464) @@ -106,9 +106,12 @@ * @param patternOfReport 报表格式 * @param departToBrancheOfHospitalMap 科室对应院区map * @param hideAmountColumn 隐藏数量 不查询数量 + * @param showApplicationDepart 查询科室申请列 + * @param invoicePlanDepartCoding 申请科室编码 + * @param columnConfigOfAccountingInfoMap 显示申请科室的核算月报的列配置 * @return */ - public List getMonthReportData(String startDate,String endDate,String department,String tousseType,String disposableGoodsType,Boolean showCustonTousseAmount,String patternOfReport, Map departToBrancheOfHospitalMap, boolean filterBrancheOfHospital, boolean hideAmountColumn); + public List getMonthReportData(String startDate,String endDate,String department,String tousseType,String disposableGoodsType,Boolean showCustonTousseAmount,String patternOfReport, Map departToBrancheOfHospitalMap, boolean filterBrancheOfHospital, boolean hideAmountColumn, boolean showApplicationDepart, String invoicePlanDepartCoding, Map columnConfigOfAccountingInfoMap); /** * 获取“消毒供应中心工作量统计报表”的数据 Index: ssts-web/src/main/webapp/jasperRtp/monthReportShowApplicationDepart.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/monthReportShowApplicationDepart.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/monthReportShowApplicationDepart.jrxml (revision 30464) @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="34" splitType="Stretch"> + <textField> + <reportElement uuid="14137749-263e-4143-a8dd-482900def002" x="0" y="0" width="450" height="34"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0||$V{amountMeasure}!=0?$P{sumAmountShowNameParam}:$P{sumPriceShowNameParam}]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +