现金充值导出
This commit is contained in:
@ -188,7 +188,7 @@ public class CustomizeExcelController {
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<GroupStoreOrderVO> orderExcelVOS = excelService.exportGroupStoreOrderExcel(startTime, endTime,carteenId,groupId);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "部门订单详情统计.xlsx", "数据", GroupStoreOrderVO.class,
|
||||
ExcelUtils.write(response, "超市订单.xlsx", "数据", GroupStoreOrderVO.class,
|
||||
orderExcelVOS);
|
||||
}
|
||||
|
||||
@ -200,8 +200,19 @@ public class CustomizeExcelController {
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<SubsidyExcelVO> orderExcelVOS = excelService.exportSubsidyExcel(startTime, endTime,carteenId);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "部门订单详情统计.xlsx", "数据", SubsidyExcelVO.class,
|
||||
ExcelUtils.write(response, "三峡路社区食堂补贴.xlsx", "数据", SubsidyExcelVO.class,
|
||||
orderExcelVOS);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/cashAmountExcel")
|
||||
@Operation(summary = "现金充值导出")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportCashAmountExcel(String startTime,String endTime,Long carteenId,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<CashAmountExcelVO> orderExcelVOS = excelService.exportCashAmountExcel(startTime, endTime,carteenId);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "现金充值.xlsx", "数据", CashAmountExcelVO.class,
|
||||
orderExcelVOS);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.NumberFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class CashAmountExcelVO {
|
||||
|
||||
@ExcelProperty("昵称")
|
||||
private String nickName;
|
||||
|
||||
@ExcelProperty("真实姓名")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("手机")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("身份证号码")
|
||||
private String identityCard;
|
||||
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@ExcelProperty("充值金额(元)")
|
||||
@NumberFormat("#0.00")
|
||||
private BigDecimal changeMoney;
|
||||
|
||||
@ExcelProperty("日期")
|
||||
private String createTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -23,4 +23,6 @@ public interface CustomizeExcelMapper {
|
||||
|
||||
List<SubsidyExcelVO> exportSubsidyExcel(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("carteenId")Long carteenId);
|
||||
|
||||
List<CashAmountExcelVO> exportCashAmountExcel(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("carteenId")Long carteenId);
|
||||
|
||||
}
|
||||
|
@ -21,4 +21,6 @@ public interface CustomizeExcelService {
|
||||
List<GroupStoreOrderVO> exportGroupStoreOrderExcel(String startTime, String endTime, Long carteenId, Long groupId);
|
||||
|
||||
List<SubsidyExcelVO> exportSubsidyExcel(String startTime,String endTime,Long carteenId);
|
||||
|
||||
List<CashAmountExcelVO> exportCashAmountExcel(String startTime,String endTime,Long carteenId);
|
||||
}
|
||||
|
@ -45,4 +45,9 @@ public class CustomizeExcelServiceImpl implements CustomizeExcelService {
|
||||
public List<SubsidyExcelVO> exportSubsidyExcel(String startTime, String endTime, Long carteenId) {
|
||||
return customizeExcelMapper.exportSubsidyExcel(startTime,endTime,carteenId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CashAmountExcelVO> exportCashAmountExcel(String startTime, String endTime, Long carteenId) {
|
||||
return customizeExcelMapper.exportCashAmountExcel(startTime,endTime,carteenId);
|
||||
}
|
||||
}
|
||||
|
@ -145,4 +145,19 @@
|
||||
and DATE_FORMAT(mdo.create_time, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</select>
|
||||
|
||||
<select id="exportCashAmountExcel" resultType="cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.CashAmountExcelVO">
|
||||
select mu.nickname,
|
||||
mu.name,
|
||||
mu.mobile,
|
||||
mu.identity_card,
|
||||
mu.address,
|
||||
mc.change_money,
|
||||
DATE_FORMAT(mc.create_time, '%Y-%m-%d') as createTime
|
||||
from member_card mc
|
||||
left join member_user mu on mc.user_id = mu.id
|
||||
where mc.type = '5' and mc.deleted = false
|
||||
and mc.carteen_id = #{carteenId}
|
||||
and DATE_FORMAT(mc.create_time, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user