Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/vo/BatchPrintInvoiceVo.java =================================================================== diff -u -r16241 -r17871 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/vo/BatchPrintInvoiceVo.java (.../BatchPrintInvoiceVo.java) (revision 16241) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/vo/BatchPrintInvoiceVo.java (.../BatchPrintInvoiceVo.java) (revision 17871) @@ -31,6 +31,10 @@ private String hospitalNumber; private String printDate; private String applicant; + /** + * 下送责任人 + */ + private String personInCharge; private Collection tousse; private Collection diposableGoods; private Collection disinfectGoods; @@ -128,6 +132,12 @@ public void setApplicant(String applicant) { this.applicant = applicant; } + public String getPersonInCharge() { + return personInCharge; + } + public void setPersonInCharge(String personInCharge) { + this.personInCharge = personInCharge; + } public Collection getTousse() { return tousse; } Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r17771 -r17871 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 17771) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 17871) @@ -433,34 +433,80 @@ } tableHtml += ""; } - - // 打印合计信息 - tableHtml = appendTableRowString(tableHtml, myObj.goodsTable.rowHeight , myObj.goodsTable.fontSize); - var style = getTableTdStyle(myObj.goodsTable,0); - tableHtml += "合计"; + //打印表格表尾的统计信息 + if(myObj.goodsTable.footer){ + tableHtml += "" + var rowCount = myObj.goodsTable.footer.length; + for(var row = 0; row < rowCount;++row){ + var rowObj = myObj.goodsTable.footer[row]; + tableHtml = appendTableRowString(tableHtml, myObj.goodsTable.rowHeight , myObj.goodsTable.fontSize); + var colIndex = 0; + for(var col=0;col"; + } + tableHtml += ""; + } + tableHtml += ""; + } + if(!myObj.goodsTable.donotPrintTotal){ + // 打印合计信息 + tableHtml = appendTableRowString(tableHtml, myObj.goodsTable.rowHeight , myObj.goodsTable.fontSize); + var style = getTableTdStyle(myObj.goodsTable,0); + tableHtml += "合计"; - for (var i=1;i= 0 || indexName == "amount"){ - value = printSummaryObj.totalGoodsAmount; + for (var i=1;i= 0 || indexName == "amount"){ + value = printSummaryObj.totalGoodsAmount; + } + else if (indexName == "applyAmount"){ + value = printSummaryObj.totalApplyAmount; + } + else if (indexName == "recyclingAmount"){ + value = printSummaryObj.totalRecyclingAmount; + } + else if(indexName == "rowPrice" || indexName == "totalPrice"){ + value = formatMoney(printSummaryObj.totalPrice); + } + + tableHtml += "" + value + " "; } - else if (indexName == "applyAmount"){ - value = printSummaryObj.totalApplyAmount; - } - else if (indexName == "recyclingAmount"){ - value = printSummaryObj.totalRecyclingAmount; - } - else if(indexName == "rowPrice" || indexName == "totalPrice"){ - value = formatMoney(printSummaryObj.totalPrice); - } - tableHtml += "" + value + " "; + tableHtml += ""; } - - tableHtml += ""; + tableHtml += ""; LODOP.ADD_PRINT_TABLE(myObj.goodsTable.position[0], myObj.goodsTable.position[1], myObj.goodsTable.position[2], myObj.goodsTable.position[3],tableHtml); Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java =================================================================== diff -u -r17808 -r17871 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java (.../InvoiceAction.java) (revision 17808) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java (.../InvoiceAction.java) (revision 17871) @@ -1296,6 +1296,7 @@ } //获取第一张核对人不为空的单,把核对员打到单上 map.put("assistantSender", StringTools.defaultIfBlank(invoiceManager.getFirstAssistant(idStrs),"")); + map.put("personInCharge", StringTools.defaultIfBlank(invoiceManager.getFirstPersonIncharge(idStrs),"")); tousseList = invoiceManager.loadToussePrintData(idStrs); disinfectGoodslist = invoiceManager.getDisinfectGoodsPrintData(idStrs); diposableGoodsList = invoiceManager.getDiposableGoodsPrintData(idStrs); Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManager.java =================================================================== diff -u -r17062 -r17871 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManager.java (.../InvoiceManager.java) (revision 17062) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManager.java (.../InvoiceManager.java) (revision 17871) @@ -192,6 +192,12 @@ * @return */ public String getFirstAssistant(String[] ids); + /** + * 获取发货单中,第一张下送责任人不为空的单,把下送责任人返回。如果都为空,返回null + * @param ids 发货单id的集合 + * @return + */ + public String getFirstPersonIncharge(String[] ids); public JSONArray getTousseInstancesForAuxiliaryInvoice(JSONObject params); } Index: ssts-web/src/main/webapp/disinfectsystem/config/cdlqyq1yy/print/printConfig.js =================================================================== diff -u -r17755 -r17871 --- ssts-web/src/main/webapp/disinfectsystem/config/cdlqyq1yy/print/printConfig.js (.../printConfig.js) (revision 17755) +++ ssts-web/src/main/webapp/disinfectsystem/config/cdlqyq1yy/print/printConfig.js (.../printConfig.js) (revision 17871) @@ -282,48 +282,58 @@ // 页眉名称 //{label : "", dataIndex : 'unitName', fontSize : 10, position : ["5","1%","90%",5]}, // 标题 - {label : "成都市龙泉驿区第一人民医院 供应室器械仓库领用出库单", dataIndex : '', fontSize : 15, position : ["15","10%","99%",5]}, - {label : "接收科室:", dataIndex : 'depart', fontSize : 11, position : ["57","2%","90%",5]}, - {label : "日期:", dataIndex : 'printDate', fontSize : 11, position : ["57","33%","90%",5]}, + {label : "成都市龙泉驿区第一人民医院物资领用单", dataIndex : '', fontSize : 15, position : ["15","20%","99%",5]}, + {label : "出库单号:", dataIndex : 'serialNumber2', fontSize : 11, position : ["57","2%","90%",5]}, + {label : "接收科室:", dataIndex : 'depart', fontSize : 11, position : ["57","25%","90%",5]}, + {label : "申领日期:", dataIndex : 'applicationTime', fontSize : 11, position : ["57","50%","90%",5]}, //{label : "仓库:供应室器械仓库", dataIndex : '', fontSize : 11, position : ["42","75%","90%",5]}, //{label : "制单人:", dataIndex : 'printUser', fontSize : 11, position : ["42","35%","90%",5]}, - {label : "备注:", dataIndex : 'remark2', fontSize : 11, position : ["57","75%","90%",5]}, +// {label : "备注:", dataIndex : 'remark2', fontSize : 11, position : ["57","75%","90%",5]}, {label : "打印时间:", dataIndex : 'printTime', fontSize : 11, position : ["8.4cm","2%","90%",5]}, - {label : "发货人:", dataIndex : 'sender', fontSize : 11, position : ["8.4cm","33%","90%",5]}, - {label : "下送人:", dataIndex : '', fontSize : 11, position : ["8.4cm","53%","90%",5]}, - {label : "领用人:", dataIndex : '', fontSize : 11, position : ["8.4cm","67%","90%",5]}, + {label : "发货人:", dataIndex : 'sender', fontSize : 11, position : ["8.4cm","30%","90%",5]}, + {label : "下送人:", dataIndex : 'personInCharge', fontSize : 11, position : ["8.4cm","55%","90%",5]}, + {label : "领用人:", dataIndex : '', fontSize : 11, position : ["8.4cm","80%","90%",5]} //{label : "复核人:", dataIndex : '', fontSize : 11, position : ["11cm","5%","90%",5]}, - {label : "审核人:", dataIndex : '', fontSize : 11, position : ["8.4cm","83%","90%",5]}, - {barcodes : [ - {codeType : "128Auto", dataIndex : 'departBarcode', position : ["15","70%","40mm","8mm"], - styles : [{itemNameID: 0, styleName: 'ShowBarText', styleValue: true}, - {itemNameID: 0, styleName: 'FontSize', styleValue: 6}, - {itemNameID: 0, styleName: 'NotOnlyHighPrecision', styleValue: true} - ] - } - ]} +// {label : "审核人:", dataIndex : '', fontSize : 11, position : ["8.4cm","83%","90%",5]} +// {barcodes : [ +// {codeType : "128Auto", dataIndex : 'departBarcode', position : ["15","70%","40mm","8mm"], +// styles : [{itemNameID: 0, styleName: 'ShowBarText', styleValue: true}, +// {itemNameID: 0, styleName: 'FontSize', styleValue: 6}, +// {itemNameID: 0, styleName: 'NotOnlyHighPrecision', styleValue: true} +// ] +// } +// ]} ], - currentPageNumber : {label : "页: # / ", fontSize : 11, position : ["57","55%","90%",5]}, - totalPageAmount : {label : "&", fontSize : 11, position : ["57","63%","90%",5]}, + currentPageNumber : {label : "页: # / ", fontSize : 11, position : ["57","80%","90%",5]}, + totalPageAmount : {label : "&", fontSize : 11, position : ["57","88%","90%",5]}, goodsTable :{ rowHeight : 25, - position : ["85","0.2cm","20.4cm","5.4cm"], + position : ["85","0.2cm","20.4cm","5.0cm"], headRepeat : true, + donotPrintTotal:true,//不打印合计,由footer去打印统计信息 fontSize:11, - style:'"border-left:0px;border-right:0px;border-top:#000000 1px solid;border-bottom:#000000 1px solid;"', +// style:'"border-left:0px;border-right:0px;border-top:#000000 1px solid;border-bottom:#000000 1px solid;"', columns : [ {header : "序号", dataIndex : 'serialNumber', width : '30', align : 'center', fontSize : 11}, - {header : "名称", dataIndex : 'name', width : '280', align : 'center', fontSize : 11}, + {header : "材料名称", dataIndex : 'name', width : '280', align : 'center', fontSize : 11}, + {header : "数量", dataIndex : 'amount', width : '70', align : 'center', fontSize : 11}, + {header : "单价", dataIndex : 'price', width : '70', align : 'center', fontSize : 11}, //{header : "规格", dataIndex : 'specification', width : '9%', align : 'center', fontSize : 11}, //{header : "包装规格", dataIndex : 'packageSpec', width : '9%', align : 'center', fontSize : 11}, - {header : "单位", dataIndex : 'unit', width : '70', align : 'center', fontSize : 11}, - {header : "数量", dataIndex : 'amount', width : '70', align : 'center', fontSize : 11}, {header : "灭菌日期", dataIndex : 'batchNumber', width : '70', align : 'center', fontSize : 11}, {header : "失效日期", dataIndex : 'expireDate', width : '70', align : 'center', fontSize : 11}, - {header : "单价", dataIndex : 'price', width : '70', align : 'center', fontSize : 11}, - {header : "金额", dataIndex : 'totalPrice', width : '70', align : 'center', fontSize : 11} + {header : "金额", dataIndex : 'totalPrice', width : '70', align : 'center', fontSize : 11}, + {header : "备注", dataIndex : '', width : '70', align : 'center', fontSize : 11} //{header : "生产厂家", dataIndex : 'manufacturer', width : '17%', align : 'center', fontSize : 11} + ], + //表格的末尾打印的内容,跟表格一起,可用于打印当前页的信息,如本页合计金额. + footer:[ + //一个数组一行,数组中每一个项是一个打印列,打印列可以指定colspan.tdata指定统计类型,tindex指定统计列,数值,从1开始,为columns中的列 + [{text:'金额总合计',colspan:'2',align:'center',fontSize:11}, + {text:'######',tdata:'AllSum',tindex:7,format:'#0.00',colspan:'2'}, + {text:'本页小计',colspan:'2',align:'center',fontSize:11}, + {text:'######',tdata:'SubSum',tindex:7,format:'#0.00',colspan:'2'}] ] } } Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java =================================================================== diff -u -r17757 -r17871 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 17757) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 17871) @@ -7740,6 +7740,8 @@ batchPrintInvoiceVo.setSendTime(invoices.get(0).getSendTime()); batchPrintInvoiceVo.setSerialNumber2(invoices.get(0).getSerialNumber()); batchPrintInvoiceVo.setApplicant(invoices.get(0).getApplicant()); + String personInCharge = getFirstPersonIncharge(invoices.stream().map(p->p.getId().toString()).collect(Collectors.toSet()).toArray(new String[0])); + batchPrintInvoiceVo.setPersonInCharge(StringTools.defaultString(personInCharge)); if(invoices.get(0).getInvoicePlan() != null){ //东莞中医院,按申请单合并,invoices集合中所有发货单,是同一张申请单的 batchPrintInvoiceVo.setApplicationSerialNumber(invoices.get(0).getInvoicePlan().getSerialNumber()); @@ -8088,6 +8090,18 @@ return null; } + @Override + public String getFirstPersonIncharge(String[] ids) { + String idsStr = StringUtils.join(ids, ","); + String where = String.format(" po.id in (%s) and %s order by po.sendTime desc", + idsStr,sqlFunctionsAdapter.strNotBlank("po.personInCharge")); + Invoice invoice = getFirst(where); + if(invoice != null){ + return invoice.getPersonInCharge(); + } + return null; + } + public JSONArray getTousseInstancesForAuxiliaryInvoice(JSONObject params) { String applyDate = StrutsParamUtils.getPraramValue("applyDate", ""); String tousseType = StrutsParamUtils.getPraramValue("tousseType", "");