结算导出修改

This commit is contained in:
syruan 2025-10-21 18:00:57 +08:00
parent 594c725e02
commit 40c26fce29
2 changed files with 59 additions and 57 deletions

View File

@ -466,8 +466,6 @@ public class SltAgreementInfoController extends BaseController {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> maps = new LinkedHashMap<>();
if (type == 1) {
// maps.put("unitName", bean.getUnitName());
// maps.put("projectName", bean.getProjectName());
if (flag==0){
maps.put("typeName", bean.getTypeName());
maps.put("modelName", bean.getModelName());
@ -495,12 +493,14 @@ public class SltAgreementInfoController extends BaseController {
maps.put("typeName", bean.getTypeName());
maps.put("modelName", bean.getModelName());
maps.put("mtUnitName", bean.getMtUnitName());
maps.put("buyPrice", bean.getBuyPrice());
maps.put("num", bean.getNum());
maps.put("costs", bean.getCosts());
}else{
maps.put("typeName", bean.getTypeName());
maps.put("modelName", bean.getModelName());
maps.put("mtUnitName", bean.getMtUnitName());
maps.put("buyPrice", bean.getBuyPrice());
maps.put("num", bean.getNum());
maps.put("costs", bean.getCosts());
maps.put("t1", "");
@ -534,6 +534,7 @@ public class SltAgreementInfoController extends BaseController {
maps.put("typeName", bean.getTypeName());
maps.put("modelName", bean.getModelName());
maps.put("mtUnitName", bean.getMtUnitName());
maps.put("buyPrice", bean.getBuyPrice());
maps.put("num", bean.getNum());
maps.put("partType", bean.getPartType());
maps.put("costs", bean.getCosts());
@ -541,6 +542,7 @@ public class SltAgreementInfoController extends BaseController {
maps.put("typeName", bean.getTypeName());
maps.put("modelName", bean.getModelName());
maps.put("mtUnitName", bean.getMtUnitName());
maps.put("buyPrice", bean.getBuyPrice());
maps.put("num", bean.getNum());
maps.put("partType", bean.getPartType());
maps.put("costs", bean.getCosts());
@ -571,9 +573,6 @@ public class SltAgreementInfoController extends BaseController {
private List<String> receiveDetailsHeader(int type,int flag) {
ArrayList<String> list = new ArrayList<String>();
if(type==1){
// list.add("结算单位");
// list.add("结算工程");
if (flag==0){
list.add("设备名称");
list.add("规格型号");
@ -601,12 +600,14 @@ public class SltAgreementInfoController extends BaseController {
list.add("设备名称");
list.add("规格型号");
list.add("计量单位");
list.add("扣款单价");
list.add("丢失数量");
list.add("丢失费用(元)");
}else{
list.add("设备名称");
list.add("规格型号");
list.add("计量单位");
list.add("扣款单价");
list.add("丢失数量");
list.add("丢失费用(元)");
list.add(" ");
@ -641,6 +642,7 @@ public class SltAgreementInfoController extends BaseController {
list.add("设备名称");
list.add("规格型号");
list.add("计量单位");
list.add("扣款单价");
list.add("报废数量");
list.add("是否收费");
list.add("报废费用(元)");
@ -648,6 +650,7 @@ public class SltAgreementInfoController extends BaseController {
list.add("设备名称");
list.add("规格型号");
list.add("计量单位");
list.add("扣款单价");
list.add("报废数量");
list.add("是否收费");
list.add("报废费用(元)");
@ -747,21 +750,19 @@ public class SltAgreementInfoController extends BaseController {
}
String projectName = handleData(projectNames);
String unitName = handleData(unitNames);
BigDecimal totalCost = BigDecimal.valueOf(0.00);
BigDecimal totalCost = BigDecimal.ZERO;
for (SltAgreementInfo bean : loseList) {
if (null == bean.getBuyPrice()) {
bean.setBuyPrice(BigDecimal.valueOf(0.00));
bean.setBuyPrice(BigDecimal.ZERO);
}
if (null == bean.getNum()) {
bean.setNum(BigDecimal.valueOf(0L));
bean.setNum(BigDecimal.ZERO);
}
BigDecimal buyPrice = bean.getBuyPrice();
BigDecimal num = bean.getNum();
// 原价 x 数量
BigDecimal costs = buyPrice.multiply(num);
if(costs!=null){
totalCost = totalCost.add(costs);
}
//计算租赁费用
bean.setCosts(costs);
}

View File

@ -135,6 +135,7 @@ public class SltLeaseInfo extends BaseEntity {
/** 原值 */
@ApiModelProperty(value = "原值")
@Excel(name = "扣款单价")
private BigDecimal buyPrice;
private BigDecimal reduceNum;