Index: ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice.jrxml
===================================================================
diff -u
--- ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice.jrxml (revision 0)
+++ ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice.jrxml (revision 17020)
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetail.java
===================================================================
diff -u -r12331 -r17020
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetail.java (.../DepartmentMonthDetail.java) (revision 12331)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetail.java (.../DepartmentMonthDetail.java) (revision 17020)
@@ -18,6 +18,8 @@
private double totalPrice = 0.0d;
+ private double totalPriceDiscount = 0.0d;
+
private List items = new ArrayList();
public String getDepart() {
@@ -36,6 +38,14 @@
this.totalPrice = totalPrice;
}
+ public double getTotalPriceDiscount() {
+ return totalPriceDiscount;
+ }
+
+ public void setTotalPriceDiscount(double totalPriceDiscount) {
+ this.totalPriceDiscount = totalPriceDiscount;
+ }
+
public List getItems() {
return items;
}
Index: ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice_child.jasper
===================================================================
diff -u
Binary files differ
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetailItem.java
===================================================================
diff -u -r14530 -r17020
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetailItem.java (.../DepartmentMonthDetailItem.java) (revision 14530)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/DepartmentMonthDetailItem.java (.../DepartmentMonthDetailItem.java) (revision 17020)
@@ -29,6 +29,8 @@
private double settlementPrice;
+ private double settlementDiscountPrice;
+
private String batchNumber;
private String manufacturer;
@@ -92,6 +94,14 @@
this.settlementPrice = settlementPrice;
}
+ public double getSettlementDiscountPrice() {
+ return settlementDiscountPrice;
+ }
+
+ public void setSettlementDiscountPrice(double settlementDiscountPrice) {
+ this.settlementDiscountPrice = settlementDiscountPrice;
+ }
+
public String getBatchNumber() {
return batchNumber;
}
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java
===================================================================
diff -u -r17019 -r17020
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 17019)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 17020)
@@ -5566,6 +5566,8 @@
@Override
public List getMonthReportData(String startDate,String endDate,String department,String tousseType,String disposableGoodsType,Boolean showCustonTousseAmount){
// String handleDeptCode = AcegiHelper.getLoginUser().getOrgUnitCodingFromSupplyRoomConfig();
+ boolean enableDiscountPrice = CssdUtils.getSystemSetConfigByNameBool("enableDiscountPrice");
+
final String TYPE_AUTO_DEDUCTION = "自动扣减物品";
SupplyRoomConfig firstSupplyRoomConfig = supplyRoomConfigManager.getFirstSupplyRoomConfig();
boolean isSupplyRoomUser = supplyRoomConfigManager.isSupplyRoomUser();
@@ -5622,7 +5624,7 @@
}
String invoicePriceSql = "select i.settleAccountsDepartCoding as coding,i.settleAccountsDepart "
- + "as depart,sum(ii.settlementPrice) as price,ii.diposable from " + Invoice.class.getSimpleName() + " i,"
+ + "as depart,sum(ii.settlementPrice) as price,ii.diposable,sum(ii.settlementDiscountPrice) as settlementDiscountPrice 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";
ResultSet rs = objectDao.executeSql(invoicePriceSql);
@@ -5632,13 +5634,17 @@
String dept = rs.getString(2);
Double price = rs.getDouble(3);
String diposable = rs.getString(4);
+ Double discountPrice = rs.getDouble("settlementDiscountPrice");
String columnName = "";
if("是".equals(diposable)){
columnName = "一次性物品总价";
}else{
columnName = "器械包总价";
}
newMonthReport(code, dept,"1", "价格统计",columnName,price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计",columnName,discountPrice, list);
+ }
}
} catch (SQLException e) {
e.printStackTrace();
@@ -5663,9 +5669,15 @@
String dept = rs5.getString(5);
if("一次性物品".equals(type)){
newMonthReport(code, dept, "1", "价格统计", "一次性物品总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计","一次性物品总价",price, list);
+ }
newMonthReport(code, dept, "2", "数量统计", "一次性物品数量", amount, list);
}else{
newMonthReport(code, dept, "1", "价格统计", "器械包总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计","器械包总价",price, list);
+ }
newMonthReport(code, dept, "2", "数量统计", "器械包数量", amount, list);
}
}
@@ -5691,6 +5703,9 @@
String columnName = "材料总价";
newMonthReport(code, dept,"1", "价格统计",columnName,price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计",columnName,price, list);
+ }
}
} catch (SQLException e) {
e.printStackTrace();
@@ -5742,6 +5757,9 @@
newMonthReport(code, dept, "2", "数量统计", "材料数量", amount, list);
newMonthReport(code, dept, "1", "价格统计", "材料总价", money, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计","材料总价",money, list);
+ }
}
}
}catch(Exception e){
@@ -5771,6 +5789,9 @@
newMonthReport(code, dept,"2", "数量统计","材料数量",amount, list);
newMonthReport(code, dept,"1", "价格统计","材料总价",money, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计","材料总价",money, list);
+ }
}
}
}catch(Exception e){
@@ -5794,8 +5815,11 @@
Double price = materialReturnResultSet.getDouble(3);
Double amount = materialReturnResultSet.getDouble(4);
- newMonthReport(code, dept, "1", "价格统计", "材料价格", price, list);
+ newMonthReport(code, dept, "1", "价格统计", "材料总价", price, list);
newMonthReport(code, dept, "2", "数量统计", "材料数量", amount, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, dept,"3", "折扣价格统计","材料总价",price, list);
+ }
}
}catch(Exception e){
e.printStackTrace();
@@ -5866,9 +5890,15 @@
String code = rs4.getString(4);
if("一次性物品".equals(type)){
newMonthReport(code, config.getOrgUnitName(), "1", "价格统计", "一次性物品总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, config.getOrgUnitName(),"3", "折扣价格统计","一次性物品总价",price, list);
+ }
newMonthReport(code, config.getOrgUnitName(), "2", "数量统计", "一次性物品数量", amount, list);
}else{
newMonthReport(code, config.getOrgUnitName(), "1", "价格统计", "材料总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, config.getOrgUnitName(),"3", "折扣价格统计","材料总价",price, list);
+ }
newMonthReport(code, config.getOrgUnitName(), "2", "数量统计", "材料数量", amount, list);
}
}
@@ -5895,6 +5925,9 @@
String orgUnitName = rs4.getString(5);
if("一次性物品".equals(type)){
newMonthReport(code, orgUnitName, "1", "价格统计", "一次性物品总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, orgUnitName,"3", "折扣价格统计","一次性物品总价",price, list);
+ }
newMonthReport(code, orgUnitName, "2", "数量统计", "一次性物品数量", amount, list);
}
}
@@ -5921,6 +5954,9 @@
String orgUnitName = rs4.getString(5);
if("一次性物品".equals(type)){
newMonthReport(code, orgUnitName, "1", "价格统计", "一次性物品总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, orgUnitName,"3", "折扣价格统计","一次性物品总价",price, list);
+ }
newMonthReport(code, orgUnitName, "2", "数量统计", "一次性物品数量", amount, list);
}
}
@@ -5947,6 +5983,9 @@
String orgUnitName = rs.getString(5);
if("一次性物品".equals(type)){
newMonthReport(code, orgUnitName, "1", "价格统计", "一次性物品总价", price, list);
+ if(enableDiscountPrice){
+ newMonthReport(code, orgUnitName,"3", "折扣价格统计","一次性物品总价",price, list);
+ }
newMonthReport(code, orgUnitName, "2", "数量统计", "一次性物品数量", amount, list);
}
}
@@ -6420,7 +6459,8 @@
String returnGoodsTousseType = " CASE rr.type WHEN '一次性物品' THEN (rr.type) WHEN '器械包' THEN (td.toussetype) ELSE rr.type END ";
- String tousseSql = " (select i.settleAccountsDepart,ii.tousseName as name,sum(ii.amount) as amount,sum(ii.settlementPrice) as settlementprice,ii.tousseType as type"
+ String tousseSql = " (select i.settleAccountsDepart,ii.tousseName as name,sum(ii.amount) as amount,"
+ +"sum(ii.settlementPrice) as settlementprice,sum(ii.settlementDiscountPrice) as settlementDiscountPrice,ii.tousseType as type"
+ ",'' as batchNumber,null as expDate,ii.tousseDefinitionId as tousseDefinitionId from invoice i,InvoiceItem ii "
+ " where i.id = ii.invoice_id "
+ " and ii.diposable = '否' and "+getHandleDeptCodeSql("i.orgUnitCoding")+" "
@@ -6436,7 +6476,8 @@
diposableGoodsTousseTypeSql = String.format(" and d.type='%s' ", InvoiceItem.TYPE_AUTO_DEDUCTION);
}
if(StringUtils.isBlank(typeSearch) || "一次性物品".equals(typeSearch) || "高值耗材".equals(typeSearch) || TYPE_AUTO_DEDUCTION.equals(typeSearch)){
- diposableGoodsSql = " union all (select i.settleaccountsdepart,d.name as name,sum(d.amount) as amount,sum(d.fluctuationPrice*d.amount) as settlementprice,'一次性物品' as type"
+ diposableGoodsSql = " union all (select i.settleaccountsdepart,d.name as name,sum(d.amount) as amount,"
+ +"sum(d.fluctuationPrice*d.amount) as settlementprice,sum(d.fluctuationPrice*d.amount) as settlementDiscountPrice,'一次性物品' as type"
+ ",d.batch as batchNumber,dgbs.expDate,0 as tousseDefinitionId from invoice i,DiposableGoodsItem d," + DisposableGoodsBatchStock.class.getSimpleName() + " dgbs "
+ " where i.id = d.invoice_id and d.disposableGoodsBatchStockID=dgbs.id and "+getHandleDeptCodeSql("i.orgUnitCoding")+" "
+" and "+diposableGoodsItemPredicate
@@ -6450,7 +6491,8 @@
String packingDisposableGoodsSql = " ";
{
if(StringUtils.isBlank(typeSearch) || "一次性物品".equals(typeSearch)){
- packingDisposableGoodsSql = " union all (select pr.orgUnitName,dgi.name as name,sum(dgi.amount) as amount,sum(dgi.fluctuationPrice*dgi.amount) as settlementprice,'一次性物品' as type"
+ packingDisposableGoodsSql = " union all (select pr.orgUnitName,dgi.name as name,sum(dgi.amount) as amount,"
+ +"sum(dgi.fluctuationPrice*dgi.amount) as settlementprice,sum(dgi.fluctuationPrice*dgi.amount) as settlementDiscountPrice,'一次性物品' as type"
+ ",dgi.batch as batchNumber,dgbs.expDate,0 as tousseDefinitionId from PackingRecord pr inner join DiposableGoodsItem dgi on pr.id = dgi.packingRecordId "
+ " inner join " + DisposableGoodsBatchStock.class.getSimpleName() + " dgbs on dgi.disposableGoodsBatchStockID=dgbs.id"
+ " where "+getHandleDeptCodeSql("pr.orgUnitCoding")+" "
@@ -6466,7 +6508,8 @@
String materialInvoiceSql = " ";
if (StringUtils.isBlank(typeSearch) || "器械材料".equals(typeSearch) || "高值耗材".equals(typeSearch)) {
// 材料发货
- materialInvoiceSql = " union all (select i.settleAccountsDepart,ii.materialName,sum(ii.amount),sum(ii.settlementPrice),'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ materialInvoiceSql = " union all (select i.settleAccountsDepart,ii.materialName,sum(ii.amount),sum(ii.settlementPrice),"
+ +"sum(ii.settlementPrice) as settlementDiscountPrice,'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ " from MaterialInvoice i,"
+ "MaterialInvoiceItem ii,materialDefinition d where i.id = ii.materialInvoice_id "
+ " and ii.materialDefinitionId = d.id and "+getHandleDeptCodeSql("i.orgUnitCoding")+" "
@@ -6477,7 +6520,8 @@
+ " group by i.settleaccountsdepart,ii.materialName) ";
}
// 材料退货
- String materialReturnSql = " union all (select rr.depart as settleaccountsdepart,ii.materialName,-sum(ii.amount),-sum(ii.settlementPrice),'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ String materialReturnSql = " union all (select rr.depart as settleaccountsdepart,ii.materialName,-sum(ii.amount),-sum(ii.settlementPrice),"
+ +"-sum(ii.settlementPrice) as settlementDiscountPrice,'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ " from ReturnMaterialRecord rr,materialDefinition d,"
+ "ReturnMaterialItem ii where rr.id = ii.returnMaterialRecord_ID "
+ " and ii.materialDefinitionId = d.id and "+getHandleDeptCodeSql("rr.handleDepartCode")+" "
@@ -6489,7 +6533,8 @@
//退货
String returnGoodsSql = " union all (select rr.depart as settleaccountsdepart,ri.toussename as name,"
- + "-sum(ri.amount) as amount,-sum(ri.settlementPrice) as settlementprice,"+returnGoodsTousseType+" as type"
+ + "-sum(ri.amount) as amount,-sum(ri.settlementPrice) as settlementprice,-sum(ri.settlementPrice) as settlementDiscountPrice,"
+ +returnGoodsTousseType+" as type"
+ ",ri.batchNumber as batchNumber,dgbs.expDate,0 as tousseDefinitionId from " + ReturnGoodsRecord.class.getSimpleName() + " rr inner join "
+ ReturnGoodsItem.class.getSimpleName()+ " ri on rr.id = ri.returngoodsrecord_id "
+ " left join " + TousseDefinition.class.getSimpleName() + " td on td.id = ri.tousseDefinition_id"
@@ -6499,11 +6544,13 @@
+" and "+returnGoodsItemPredicate
+ " group by rr.depart,ri.toussename,"+returnGoodsTousseType+",ri.batchNumber,dgbs.expDate) ";
- String lostMaterial = " union all (select r.depart,r.materialName,sum(r.additionalAmount),sum(r.additionalAmount * r.materialCost),'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ String lostMaterial = " union all (select r.depart,r.materialName,sum(r.additionalAmount),sum(r.additionalAmount * r.materialCost),"
+ +"sum(r.additionalAmount * r.materialCost) as settlementDiscountPrice,'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ " from RecyclingError r,materialDefinition m where r.materialDefinitionId = m.id and r.errorType = '缺失' and r.materialName != '器械包标识牌' and r.additionalAmount > 0 and "+getHandleDeptCodeSql("r.handleDepartCode")+" "
+ lostMaterialFilterSql + "group by r.depart,r.materialName ) ";
- String damageMaterial = " union all (select i.depart,i.materialName,sum(i.additionalAmount),sum(i.materialCost*i.additionalAmount),'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ String damageMaterial = " union all (select i.depart,i.materialName,sum(i.additionalAmount),sum(i.materialCost*i.additionalAmount),"
+ +"sum(i.materialCost*i.additionalAmount) as settlementDiscountPrice,'材料' as type,'' as batchNumber,null as expDate,0 as tousseDefinitionId "
+ "from RecyclingDamageItem i,MaterialDefinition m where i.materialDefinitionId = m.id "
+ "and i.additionalAmount > 0 and "+getHandleDeptCodeSql("i.handleDepartCode")+" " + damageFilterSql
+ " group by i.departCoding,i.depart,i.materialName ) ";
@@ -6512,22 +6559,25 @@
if(TYPE_AUTO_DEDUCTION.equals(typeSearch)){
supplyRoomTousseTypeSql = String.format(" and rr.type='%s' ", InvoiceItem.TYPE_AUTO_DEDUCTION);
}
- String supplyRoomDiposableGoodsSql = " union all (select rr.depart as settleaccountsdepart,rri.goodsName,sum(rri.amount),sum(rri.price*rri.amount) as settlementprice,rri.type as type,dbs.batchNumber as batchNumber,dbs.expDate,0 as tousseDefinitionId "
+ String supplyRoomDiposableGoodsSql = " union all (select rr.depart as settleaccountsdepart,rri.goodsName,sum(rri.amount),"
+ +"sum(rri.price*rri.amount) as settlementprice,sum(rri.price*rri.amount) as settlementDiscountPrice,rri.type as type,dbs.batchNumber as batchNumber,dbs.expDate,0 as tousseDefinitionId "
+" from ReceiveRecord rr,ReceiveRecordItem rri left join " + DisposableGoodsBatchStock.class.getSimpleName() + " dbs "
+" on rri.diposableGoodBatchStock_id = dbs.id left join DisposableGoods d on d.id = rri.disposableGoodsId where rr.id = rri.receiveRecord_id and "+getHandleDeptCodeSql("rr.departCoding")+" "
+supplyRoomDiposableGoodsFilterSql
+supplyRoomTousseTypeSql
+" and "+receiveRecordItemPredicate
+ " group by rr.depart,rri.goodsName,rri.amount,rri.type,dbs.batchNumber,dbs.expDate) ";
// 调拨出库
- String appropriateOutDiposableGoodsSql = " union all (select oge.targetOrgUnitName as settleaccountsdepart,ged.goodsName,sum(ged.amount),sum(ged.price*ged.amount) as settlementprice,'一次性物品' as type,dgb.batchNumber as batchNumber,dgb.expDate,0 as tousseDefinitionId "
+ String appropriateOutDiposableGoodsSql = " union all (select oge.targetOrgUnitName as settleaccountsdepart,ged.goodsName,sum(ged.amount),"
+ +"sum(ged.price*ged.amount) as settlementprice,sum(ged.price*ged.amount) as settlementDiscountPrice,'一次性物品' as type,dgb.batchNumber as batchNumber,dgb.expDate,0 as tousseDefinitionId "
+" from GodownEntry oge inner join GodownEntryDiposableGoodsItem ged on oge.id = ged.godownEntryID inner join DisposableGoodsBatch dgb on ged.disposableGoodsBatchID=dgb.id inner join DisposableGoods dg on dgb.diposablegoods_id = dg.id "
+" where oge.type ='退库单' and oge.subType='调拨出库' and "+getHandleDeptCodeSql("oge.orgUnitCode")+" "
+outEntryFilterSql
+" and "+outEntryPredicate
+ " group by oge.targetOrgUnitName, ged.goodsName,dgb.batchNumber,dgb.expDate) ";
// 盘亏出库
- String stocktakeOutDiposableGoodsSql = " union all (select oge.orgUnitName as settleaccountsdepart,ged.goodsName,sum(ged.amount),sum(ged.price*ged.amount) as settlementprice,'一次性物品' as type,dgb.batchNumber as batchNumber,dgb.expDate,0 as tousseDefinitionId "
+ String stocktakeOutDiposableGoodsSql = " union all (select oge.orgUnitName as settleaccountsdepart,ged.goodsName,sum(ged.amount),"
+ +"sum(ged.price*ged.amount) as settlementprice,sum(ged.price*ged.amount) as settlementDiscountPrice,'一次性物品' as type,dgb.batchNumber as batchNumber,dgb.expDate,0 as tousseDefinitionId "
+" from GodownEntry oge inner join GodownEntryDiposableGoodsItem ged on oge.id = ged.godownEntryID inner join DisposableGoodsBatch dgb on ged.disposableGoodsBatchID=dgb.id inner join DisposableGoods dg on dgb.diposablegoods_id = dg.id "
+" where oge.type ='退库单' and oge.subType='盘亏出库' and "+getHandleDeptCodeSql("oge.orgUnitCode")+" "
+outEntryFilterSql
@@ -6582,6 +6632,7 @@
String goodsName = rs.getString("name");
String type = rs.getString("type");
double settlementPrice = rs.getDouble("settlementprice");
+ double settlementDiscountPrice = rs.getDouble("settlementDiscountPrice");
int amount = rs.getInt("amount");
Date expDate = rs.getTimestamp("expDate");
@@ -6610,6 +6661,7 @@
mdi.setGoodsName(goodsName);
mdi.setType(type);
mdi.setSettlementPrice(settlementPrice);
+ mdi.setSettlementDiscountPrice(settlementDiscountPrice);
mdi.setBatchNumber(rs.getString("batchNumber"));
mdi.setExpDate(ForgonDateUtils.safelyFormatDate(expDate, Constants.SIMPLEDATEFORMAT_YYYYMMDD, ""));
if ("一次性物品".equals(type)) {
@@ -6636,6 +6688,7 @@
Map tmpMap = new HashMap();
List removeItems = new ArrayList();
double totalPrice = 0.0d;
+ double totalPriceDiscount = 0.0d;
for (DepartmentMonthDetailItem dmi : list) {
String tousseName = dmi.getGoodsName();
String type = dmi.getType();
@@ -6647,6 +6700,7 @@
item.setAmount(0);
item.setPrice(0d);
item.setSettlementPrice(0d);
+ item.setSettlementDiscountPrice(0d);
item.setExternalCode(tousseExternalCodeMap.get(tousseName));
tmpMap.put(tousseName, item);
}
@@ -6658,11 +6712,13 @@
item.setManufacturer(dmi.getManufacturer());
item.setPrice(dmi.getPrice());
item.setSettlementPrice(item.getSettlementPrice() + dmi.getSettlementPrice());
+ item.setSettlementDiscountPrice(MathTools.add(item.getSettlementDiscountPrice(), dmi.getSettlementDiscountPrice()).doubleValue());
item.setType(type);
item.setExternalCode(item.getExternalCode());
removeItems.add(dmi);
}
totalPrice += dmi.getSettlementPrice();
+ totalPriceDiscount += dmi.getSettlementDiscountPrice();
}
list.removeAll(removeItems);
Iterator itr2 = tmpMap.keySet().iterator();
@@ -6674,6 +6730,7 @@
DepartmentMonthDetail detail = new DepartmentMonthDetail();
detail.setDepart(depart);
detail.setTotalPrice(totalPrice);
+ detail.setTotalPriceDiscount(totalPriceDiscount);
detail.setItems(list);
sortDetailItems(detail);
datas.add(detail);
Index: ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice_child.jrxml
===================================================================
diff -u
--- ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice_child.jrxml (revision 0)
+++ ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice_child.jrxml (revision 17020)
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js
===================================================================
diff -u -r16281 -r17020
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 16281)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 17020)
@@ -53,7 +53,11 @@
showCustonTousseAmount = true;
}
myMask.show();
- window.open(WWWROOT + "/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do?jasperreportName=DepartmentMonthDetail.jasper&reportName=departmentMonthDetail&departSearch="+departSearch+"&startTime="+startTime+"&endTime="+endTime+"&goodsSearch="+goodsSearch+"&tousseType="+tousseType+"&goodsType="+goodsType+"&searchType="+searchType+"&batch="+batch+"&departCoding="+departCoding+"&disposableGoodsType="+disposableGoodsType+"&showCustonTousseAmount="+showCustonTousseAmount,'thisIframe','_self');
+ var jasperreportFileName = "DepartmentMonthDetail.jasper";
+ if(sstsConfig.enableDiscountPrice){
+ jasperreportFileName = "DepartmentMonthDetailDiscountPrice.jasper";
+ }
+ window.open(WWWROOT + "/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do?jasperreportName="+jasperreportFileName+"&reportName=departmentMonthDetail&departSearch="+departSearch+"&startTime="+startTime+"&endTime="+endTime+"&goodsSearch="+goodsSearch+"&tousseType="+tousseType+"&goodsType="+goodsType+"&searchType="+searchType+"&batch="+batch+"&departCoding="+departCoding+"&disposableGoodsType="+disposableGoodsType+"&showCustonTousseAmount="+showCustonTousseAmount,'thisIframe','_self');
}
Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() {};
Index: ssts-web/src/main/webapp/jasperRtp/DepartmentMonthDetailDiscountPrice.jasper
===================================================================
diff -u
Binary files differ