1; 积分消耗加导出功能
This commit is contained in:
parent
12c6fd6d89
commit
a697950005
|
@ -93,12 +93,30 @@ public class BusIntegralConsumeController extends BaseController
|
|||
/**
|
||||
* 导出积分变更记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:consume:export')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:consume:export')")
|
||||
@Log(title = "积分变更记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BusIntegralRecord busIntegralRecord)
|
||||
{
|
||||
List<BusIntegralRecord> list = busIntegralRecordService.selectBusIntegralRecordList(busIntegralRecord);
|
||||
busIntegralRecord.setUpdateType("消耗账分");
|
||||
if (SecurityUtils.getLoginUser().getUserId() != 1L) {
|
||||
List<String> list = new ArrayList<>();
|
||||
BusAgentInfo agentInfo = new BusAgentInfo();
|
||||
agentInfo.setAgentAccount(SecurityUtils.getLoginUser().getUsername());
|
||||
BusAgentInfo temp = agentInfoService.selectBusAgentInfoList(agentInfo).get(0);
|
||||
list.add(SecurityUtils.getLoginUser().getUsername());
|
||||
if (temp.getSuperiorAgentCode() == 1L) {
|
||||
BusAgentInfo agentInfo1 = new BusAgentInfo();
|
||||
agentInfo1.setSuperiorAgentCode(temp.getId());
|
||||
List<BusAgentInfo> subList = agentInfoService.selectBusAgentInfoList(agentInfo1);
|
||||
for (BusAgentInfo info : subList) {
|
||||
list.add(info.getAgentAccount());
|
||||
}
|
||||
}
|
||||
busIntegralRecord.setAgentAccount(list);
|
||||
}
|
||||
// List<BusIntegralRecord> list = busIntegralRecordService.selectBusIntegralRecordList(busIntegralRecord);
|
||||
List<BusIntegralRecord> list = busIntegralRecordService.selectBusIntegralRecordList1(busIntegralRecord);
|
||||
ExcelUtil<BusIntegralRecord> util = new ExcelUtil<BusIntegralRecord>(BusIntegralRecord.class);
|
||||
util.exportExcel(response, list, "积分变更记录数据");
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.business.domain;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -23,28 +24,32 @@ public class BusIntegralRecord extends BaseEntity
|
|||
private Long id;
|
||||
|
||||
/** 营销账户 */
|
||||
@Excel(name = "营销账户")
|
||||
@Excel(name = "账户")
|
||||
@JSONField(ordinal = 2)
|
||||
private String account;
|
||||
|
||||
/** 平台(M/E) */
|
||||
@Excel(name = "平台", readConverterExp = "M=/E")
|
||||
// @Excel(name = "平台", readConverterExp = "M=/E")
|
||||
private String platform;
|
||||
|
||||
/** 变更类型(出账/入账) */
|
||||
@Excel(name = "变更类型", readConverterExp = "出=账/入账")
|
||||
@Excel(name = "变更类型")
|
||||
@JSONField(ordinal = 3)
|
||||
private String updateType;
|
||||
|
||||
/** 积分变更数值 */
|
||||
@Excel(name = "积分变更数值")
|
||||
@JSONField(ordinal = 4)
|
||||
private int integralUpdateNum;
|
||||
|
||||
/** 变更时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JSONField(ordinal = 1)
|
||||
private Date integralUpdateTime;
|
||||
|
||||
/** 积分余额 */
|
||||
@Excel(name = "积分余额")
|
||||
// @Excel(name = "积分余额")
|
||||
private int integralBalance;
|
||||
|
||||
private List<String> agentAccount;
|
||||
|
@ -58,7 +63,7 @@ public class BusIntegralRecord extends BaseEntity
|
|||
}
|
||||
|
||||
/** 代理备注 */
|
||||
@Excel(name = "代理备注")
|
||||
// @Excel(name = "代理备注")
|
||||
private String agentRemark;
|
||||
private String createUser;
|
||||
|
||||
|
|
|
@ -56,16 +56,16 @@
|
|||
<!-- v-hasPermi="['system:record:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['system:record:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:record:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -266,7 +266,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/record/export', {
|
||||
this.download('system/consume/export', {
|
||||
...this.queryParams
|
||||
}, `record_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue