账单-后台-增加前后值-BigDecimal
This commit is contained in:
@@ -38,13 +38,11 @@ public class BillRecordVo extends BaseVo {
|
||||
@FieldComment("收入支出")
|
||||
public String billTypeDesc;
|
||||
@FieldComment("前值")
|
||||
public Double beforeAmount;
|
||||
public BigDecimal beforeAmount;
|
||||
@FieldComment("金币/钻石/薪资")
|
||||
public Double amount;
|
||||
public BigDecimal amount;
|
||||
@FieldComment("后值")
|
||||
public Double afterAmount;
|
||||
@FieldComment("货币数")
|
||||
public Double actualAmount;
|
||||
public BigDecimal afterAmount;
|
||||
@FieldComment("账单类型")
|
||||
public String objTypeDesc;
|
||||
@FieldComment("账单类型code")
|
||||
|
@@ -13,7 +13,6 @@ import com.accompany.common.utils.DateTimeUtil;
|
||||
import com.accompany.core.enumeration.BillObjTypeEnum;
|
||||
import com.accompany.core.model.Users;
|
||||
import com.accompany.core.service.user.UsersBaseService;
|
||||
import com.accompany.payment.model.ChargeRecord;
|
||||
import com.accompany.payment.service.ChargeRecordService;
|
||||
import com.accompany.sharding.mapper.BillRecordMapper;
|
||||
import com.accompany.sharding.model.BillRecord;
|
||||
@@ -29,16 +28,12 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class BillRecordAdminService extends BaseService {
|
||||
|
||||
@Autowired
|
||||
UsersService usersService;
|
||||
|
||||
@Autowired
|
||||
private UsersBaseService usersBaseService;
|
||||
|
||||
@@ -48,8 +43,6 @@ public class BillRecordAdminService extends BaseService {
|
||||
private BillRecordService billRecordService;
|
||||
@Autowired
|
||||
private GiftService giftService;
|
||||
@Autowired
|
||||
private ChargeRecordService chargeRecordService;
|
||||
|
||||
public void pageBillRecordList(Page<BillRecord> page, Long erbanNo, Integer billType, String startDate, String endDate){
|
||||
Long uid = null;
|
||||
@@ -135,6 +128,13 @@ public class BillRecordAdminService extends BaseService {
|
||||
public BillRecordVo convertBillRecordVo(BillRecord billRecord, Users users) {
|
||||
BillRecordVo billRecordAdminVo = new BillRecordVo();
|
||||
BeanUtils.copyProperties(billRecord, billRecordAdminVo);
|
||||
billRecordAdminVo.setAmount(BigDecimal.valueOf(billRecord.getAmount()));
|
||||
if (null != billRecord.getBeforeAmount()){
|
||||
billRecordAdminVo.setBeforeAmount(BigDecimal.valueOf(billRecord.getBeforeAmount()));
|
||||
}
|
||||
if (null != billRecord.getAfterAmount()){
|
||||
billRecordAdminVo.setAfterAmount(BigDecimal.valueOf(billRecord.getAfterAmount()));
|
||||
}
|
||||
billRecordAdminVo.setCreateTime(DateTimeUtil.convertDateTime(billRecord.getCreateTime()));
|
||||
BillObjTypeEnum billObjTypeEnum = BillObjTypeEnum.get(billRecord.getObjType());
|
||||
billRecordAdminVo.setObjTypeDesc(billObjTypeEnum.getDesc());
|
||||
|
@@ -271,17 +271,7 @@ public class FlowTeamMemberStatisticsService {
|
||||
} catch (Exception e) {
|
||||
return billRecordAdminVo;
|
||||
}
|
||||
// 消费金额统一正数
|
||||
billRecordAdminVo.setActualAmount(Math.abs(billRecordAdminVo.getActualAmount()));
|
||||
BillObjTypeEnum billObjTypeEnum = BillObjTypeEnum.get(billRecord.getObjType());
|
||||
billRecordAdminVo.setObjTypeDesc("-");
|
||||
if (billRecord.getObjType() != null) {
|
||||
if (billRecord.getObjType().equals(BillObjTypeEnum.GIFT_ROOM_PAY.getValue()) || billRecord.getObjType().equals(BillObjTypeEnum.GIFT_PERSON_PAY.getValue())) {
|
||||
billRecordAdminVo.setObjTypeDesc("刷礼");
|
||||
} else if (billRecord.getObjType().equals(BillObjTypeEnum.ACTIVITY_PACKET.getValue())) {
|
||||
billRecordAdminVo.setObjTypeDesc("购买许愿流星");
|
||||
}
|
||||
}
|
||||
billRecordAdminVo.setBillTypeDesc(billObjTypeEnum.getType().getDesc());
|
||||
billRecordAdminVo.setCurrencyDesc(billObjTypeEnum.getCurrency().getDesc());
|
||||
if (users != null) {
|
||||
|
@@ -329,7 +329,7 @@ public class FlowTeamLeaderController extends BaseController {
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet("消费明细");
|
||||
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量", "消费金额(美元)"};
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量"};
|
||||
HSSFRow header = sheet.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
header.createCell(i).setCellValue(headers[i]);
|
||||
@@ -358,8 +358,6 @@ public class FlowTeamLeaderController extends BaseController {
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getGiftNum() != null ? item.getGiftNum().toString() : "-");
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getActualAmount().toString());
|
||||
cellIdx++;
|
||||
}
|
||||
return workbook;
|
||||
}
|
||||
|
@@ -240,7 +240,7 @@ public class FlowTeamLeaderMemberController extends BaseController {
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet("消费明细");
|
||||
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量", "消费金额(元)"};
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量"};
|
||||
HSSFRow header = sheet.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
header.createCell(i).setCellValue(headers[i]);
|
||||
@@ -269,8 +269,6 @@ public class FlowTeamLeaderMemberController extends BaseController {
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getGiftNum() != null ? item.getGiftNum().toString() : "-");
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getActualAmount().toString());
|
||||
cellIdx++;
|
||||
}
|
||||
return workbook;
|
||||
}
|
||||
|
@@ -240,7 +240,7 @@ public class FlowTeamMemberController extends BaseController {
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
HSSFSheet sheet = workbook.createSheet("消费明细");
|
||||
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量", "消费金额(美元)"};
|
||||
String[] headers = {"被邀请用户昵称", "被邀请用户id","消费时间", "消费类型", "消费对象id", "消费对象昵称", "消费房间", "消费房间id", "礼物名称", "礼物数量"};
|
||||
HSSFRow header = sheet.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
header.createCell(i).setCellValue(headers[i]);
|
||||
@@ -269,8 +269,6 @@ public class FlowTeamMemberController extends BaseController {
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getGiftNum() != null ? item.getGiftNum().toString() : "-");
|
||||
cellIdx++;
|
||||
row.createCell(cellIdx).setCellValue(item.getActualAmount().toString());
|
||||
cellIdx++;
|
||||
}
|
||||
return workbook;
|
||||
}
|
||||
|
Reference in New Issue
Block a user