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)
|
@Log(title = "积分变更记录", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, BusIntegralRecord busIntegralRecord)
|
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);
|
ExcelUtil<BusIntegralRecord> util = new ExcelUtil<BusIntegralRecord>(BusIntegralRecord.class);
|
||||||
util.exportExcel(response, list, "积分变更记录数据");
|
util.exportExcel(response, list, "积分变更记录数据");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.business.domain;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
@ -23,28 +24,32 @@ public class BusIntegralRecord extends BaseEntity
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 营销账户 */
|
/** 营销账户 */
|
||||||
@Excel(name = "营销账户")
|
@Excel(name = "账户")
|
||||||
|
@JSONField(ordinal = 2)
|
||||||
private String account;
|
private String account;
|
||||||
|
|
||||||
/** 平台(M/E) */
|
/** 平台(M/E) */
|
||||||
@Excel(name = "平台", readConverterExp = "M=/E")
|
// @Excel(name = "平台", readConverterExp = "M=/E")
|
||||||
private String platform;
|
private String platform;
|
||||||
|
|
||||||
/** 变更类型(出账/入账) */
|
/** 变更类型(出账/入账) */
|
||||||
@Excel(name = "变更类型", readConverterExp = "出=账/入账")
|
@Excel(name = "变更类型")
|
||||||
|
@JSONField(ordinal = 3)
|
||||||
private String updateType;
|
private String updateType;
|
||||||
|
|
||||||
/** 积分变更数值 */
|
/** 积分变更数值 */
|
||||||
@Excel(name = "积分变更数值")
|
@Excel(name = "积分变更数值")
|
||||||
|
@JSONField(ordinal = 4)
|
||||||
private int integralUpdateNum;
|
private int integralUpdateNum;
|
||||||
|
|
||||||
/** 变更时间 */
|
/** 变更时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@JSONField(ordinal = 1)
|
||||||
private Date integralUpdateTime;
|
private Date integralUpdateTime;
|
||||||
|
|
||||||
/** 积分余额 */
|
/** 积分余额 */
|
||||||
@Excel(name = "积分余额")
|
// @Excel(name = "积分余额")
|
||||||
private int integralBalance;
|
private int integralBalance;
|
||||||
|
|
||||||
private List<String> agentAccount;
|
private List<String> agentAccount;
|
||||||
|
@ -58,7 +63,7 @@ public class BusIntegralRecord extends BaseEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 代理备注 */
|
/** 代理备注 */
|
||||||
@Excel(name = "代理备注")
|
// @Excel(name = "代理备注")
|
||||||
private String agentRemark;
|
private String agentRemark;
|
||||||
private String createUser;
|
private String createUser;
|
||||||
|
|
||||||
|
|
|
@ -56,16 +56,16 @@
|
||||||
<!-- v-hasPermi="['system:record:remove']"-->
|
<!-- v-hasPermi="['system:record:remove']"-->
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- type="warning"-->
|
type="warning"
|
||||||
<!-- plain-->
|
plain
|
||||||
<!-- icon="el-icon-download"-->
|
icon="el-icon-download"
|
||||||
<!-- size="mini"-->
|
size="mini"
|
||||||
<!-- @click="handleExport"-->
|
@click="handleExport"
|
||||||
<!-- v-hasPermi="['system:record:export']"-->
|
v-hasPermi="['system:record:export']"
|
||||||
<!-- >导出</el-button>-->
|
>导出</el-button>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/record/export', {
|
this.download('system/consume/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `record_${new Date().getTime()}.xlsx`)
|
}, `record_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue