Merge remote-tracking branch 'origin/master'
# Conflicts: # fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserConsumptionDetailsController.java # fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserRechargeCardsController.java # fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserRechargeController.java
This commit is contained in:
commit
964bf6b2df
@ -3,6 +3,7 @@ package com.fastbee.data.controller.userRecharge;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.fastbee.rechargecard.domain.dto.UserConsumptionDetailsDto;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -41,7 +42,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询用户充值卡账单明细记录列表
|
* 查询用户充值卡账单明细记录列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:list')")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询用户充值卡账单明细记录列表")
|
@ApiOperation("查询用户充值卡账单明细记录列表")
|
||||||
public TableDataInfo list(UserConsumptionDetails userConsumptionDetails)
|
public TableDataInfo list(UserConsumptionDetails userConsumptionDetails)
|
||||||
@ -54,13 +54,12 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询用户充值卡账单明细记录列表
|
* 查询用户充值卡账单明细记录列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:list')")
|
|
||||||
@GetMapping("/list/show")
|
@GetMapping("/list/show")
|
||||||
@ApiOperation("查询用户充值卡账单明细记录展示列表")
|
@ApiOperation("查询用户充值卡账单明细记录展示列表")
|
||||||
public TableDataInfo Showlist(UserConsumptionDetails userConsumptionDetails)
|
public TableDataInfo Showlist(UserConsumptionDetails userConsumptionDetails)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<UserConsumptionDetails> list = userConsumptionDetailsService.selectUserConsumptionDetailsShowList(userConsumptionDetails);
|
List<UserConsumptionDetailsDto> list = userConsumptionDetailsService.selectUserConsumptionDetailsShowList(userConsumptionDetails);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +67,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
* 导出用户充值卡账单明细记录列表
|
* 导出用户充值卡账单明细记录列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出用户充值卡账单明细记录列表")
|
@ApiOperation("导出用户充值卡账单明细记录列表")
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:export')")
|
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, UserConsumptionDetails userConsumptionDetails)
|
public void export(HttpServletResponse response, UserConsumptionDetails userConsumptionDetails)
|
||||||
{
|
{
|
||||||
@ -80,7 +78,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取用户充值卡账单明细记录详细信息列表
|
* 获取用户充值卡账单明细记录详细信息列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:query')")
|
|
||||||
@GetMapping(value = "/list/{cardNumber}")
|
@GetMapping(value = "/list/{cardNumber}")
|
||||||
@ApiOperation("获取用户充值卡账单明细记录详细信息列表")
|
@ApiOperation("获取用户充值卡账单明细记录详细信息列表")
|
||||||
public AjaxResult getInfo(@PathVariable("cardNumber") String cardNumber)
|
public AjaxResult getInfo(@PathVariable("cardNumber") String cardNumber)
|
||||||
@ -92,7 +89,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取用户充值卡账单明细记录详细信息
|
* 获取用户充值卡账单明细记录详细信息
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiOperation("获取用户充值卡账单明细记录详细信息")
|
@ApiOperation("获取用户充值卡账单明细记录详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
@ -104,7 +100,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增用户充值卡账单明细记录
|
* 新增用户充值卡账单明细记录
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:add')")
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增用户充值卡账单明细记录")
|
@ApiOperation("新增用户充值卡账单明细记录")
|
||||||
public AjaxResult add(@RequestBody UserConsumptionDetails userConsumptionDetails)
|
public AjaxResult add(@RequestBody UserConsumptionDetails userConsumptionDetails)
|
||||||
@ -115,7 +110,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改用户充值卡账单明细记录
|
* 修改用户充值卡账单明细记录
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:edit')")
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改用户充值卡账单明细记录")
|
@ApiOperation("修改用户充值卡账单明细记录")
|
||||||
public AjaxResult edit(@RequestBody UserConsumptionDetails userConsumptionDetails)
|
public AjaxResult edit(@RequestBody UserConsumptionDetails userConsumptionDetails)
|
||||||
@ -126,7 +120,6 @@ public class UserConsumptionDetailsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除用户充值卡账单明细记录
|
* 删除用户充值卡账单明细记录
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:details:remove')")
|
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除用户充值卡账单明细记录")
|
@ApiOperation("删除用户充值卡账单明细记录")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -41,7 +41,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 测试
|
* 测试
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:query')")
|
|
||||||
@GetMapping(value = "/test/{id}")
|
@GetMapping(value = "/test/{id}")
|
||||||
@ApiOperation("获取用户充值卡详细信息")
|
@ApiOperation("获取用户充值卡详细信息")
|
||||||
public AjaxResult test(@PathVariable("id") Long id)
|
public AjaxResult test(@PathVariable("id") Long id)
|
||||||
@ -53,7 +53,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询用户充值卡列表
|
* 查询用户充值卡列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:list')")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询用户充值卡列表")
|
@ApiOperation("查询用户充值卡列表")
|
||||||
public TableDataInfo list(UserRechargeCards userRechargeCards)
|
public TableDataInfo list(UserRechargeCards userRechargeCards)
|
||||||
@ -67,7 +67,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
* 导出用户充值卡列表
|
* 导出用户充值卡列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出用户充值卡列表")
|
@ApiOperation("导出用户充值卡列表")
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:export')")
|
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, UserRechargeCards userRechargeCards)
|
public void export(HttpServletResponse response, UserRechargeCards userRechargeCards)
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取用户充值卡详细信息
|
* 获取用户充值卡详细信息
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiOperation("获取用户充值卡详细信息")
|
@ApiOperation("获取用户充值卡详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
@ -91,7 +91,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增用户充值卡
|
* 新增用户充值卡
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:add')")
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增用户充值卡")
|
@ApiOperation("新增用户充值卡")
|
||||||
public AjaxResult add(@RequestBody UserRechargeCards userRechargeCards)
|
public AjaxResult add(@RequestBody UserRechargeCards userRechargeCards)
|
||||||
@ -102,7 +102,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改用户充值卡
|
* 修改用户充值卡
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:edit')")
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改用户充值卡")
|
@ApiOperation("修改用户充值卡")
|
||||||
public AjaxResult edit(@RequestBody UserRechargeCards userRechargeCards)
|
public AjaxResult edit(@RequestBody UserRechargeCards userRechargeCards)
|
||||||
@ -113,7 +113,7 @@ public class UserRechargeCardsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除用户充值卡
|
* 删除用户充值卡
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:remove')")
|
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@ApiOperation("删除用户充值卡")
|
@ApiOperation("删除用户充值卡")
|
||||||
public AjaxResult remove(@PathVariable Long id)
|
public AjaxResult remove(@PathVariable Long id)
|
||||||
|
@ -27,10 +27,11 @@ public class UserRechargeController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IUserRechargeCardsService userRechargeCardsService;
|
private IUserRechargeCardsService userRechargeCardsService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户充值卡金额
|
* 修改用户充值卡金额
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('rechargecard:cards:edit')")
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改用户充值卡")
|
@ApiOperation("修改用户充值卡")
|
||||||
public AjaxResult result(@RequestBody RechargecardUser rechargecardUser)
|
public AjaxResult result(@RequestBody RechargecardUser rechargecardUser)
|
||||||
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
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;
|
||||||
import com.fastbee.common.annotation.Excel;
|
import com.fastbee.common.annotation.Excel;
|
||||||
|
@ -9,123 +9,122 @@ import lombok.Data;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
|
||||||
public class UserConsumptionDetailsDto {
|
public class UserConsumptionDetailsDto {
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
private Long id;
|
public Long id;
|
||||||
|
|
||||||
/** 关联用户 */
|
/** 关联用户 */
|
||||||
@Excel(name = "关联用户")
|
@Excel(name = "关联用户")
|
||||||
@ApiModelProperty("关联用户")
|
@ApiModelProperty("关联用户")
|
||||||
private Long userId;
|
public Long userId;
|
||||||
|
|
||||||
/** 设备编码 */
|
/** 设备编码 */
|
||||||
@Excel(name = "设备编码")
|
@Excel(name = "设备编码")
|
||||||
@ApiModelProperty("设备编码")
|
@ApiModelProperty("设备编码")
|
||||||
private String deviceNumber;
|
public String deviceNumber;
|
||||||
|
|
||||||
/** 购水卡卡号 */
|
/** 购水卡卡号 */
|
||||||
@Excel(name = "购水卡卡号")
|
@Excel(name = "购水卡卡号")
|
||||||
@ApiModelProperty("购水卡卡号")
|
@ApiModelProperty("购水卡卡号")
|
||||||
private String cardNumber;
|
public String cardNumber;
|
||||||
|
|
||||||
/** 所属项目id */
|
/** 所属项目id */
|
||||||
@Excel(name = "所属项目id")
|
@Excel(name = "所属项目id")
|
||||||
@ApiModelProperty("所属项目id")
|
@ApiModelProperty("所属项目id")
|
||||||
private Long projectId;
|
public Long projectId;
|
||||||
|
|
||||||
/** 所属机构 */
|
/** 所属机构 */
|
||||||
@Excel(name = "所属机构")
|
@Excel(name = "所属机构")
|
||||||
@ApiModelProperty("所属机构")
|
@ApiModelProperty("所属机构")
|
||||||
private Long deptId;
|
public Long deptId;
|
||||||
|
|
||||||
/** 0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费) */
|
/** 0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费) */
|
||||||
@Excel(name = "0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
@Excel(name = "0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
||||||
@ApiModelProperty("0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
@ApiModelProperty("0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
||||||
private Integer billingType;
|
public Integer billingType;
|
||||||
|
|
||||||
/** 开泵时长 */
|
/** 开泵时长 */
|
||||||
@Excel(name = "开泵时长")
|
@Excel(name = "开泵时长")
|
||||||
@ApiModelProperty("开泵时长")
|
@ApiModelProperty("开泵时长")
|
||||||
private BigDecimal pumpTime;
|
public BigDecimal pumpTime;
|
||||||
|
|
||||||
/** 单价 */
|
/** 单价 */
|
||||||
@Excel(name = "单价")
|
@Excel(name = "单价")
|
||||||
@ApiModelProperty("单价")
|
@ApiModelProperty("单价")
|
||||||
private BigDecimal unitPrice;
|
public BigDecimal unitPrice;
|
||||||
|
|
||||||
/** 总价(数量 * 单价) */
|
/** 总价(数量 * 单价) */
|
||||||
@Excel(name = "总价", readConverterExp = "数=量,*=,单=价")
|
@Excel(name = "总价", readConverterExp = "数=量,*=,单=价")
|
||||||
@ApiModelProperty("总价")
|
@ApiModelProperty("总价")
|
||||||
private BigDecimal totalPrice;
|
public BigDecimal totalPrice;
|
||||||
|
|
||||||
/** 折扣金额 */
|
/** 折扣金额 */
|
||||||
@Excel(name = "折扣金额")
|
@Excel(name = "折扣金额")
|
||||||
@ApiModelProperty("折扣金额")
|
@ApiModelProperty("折扣金额")
|
||||||
private BigDecimal discount;
|
public BigDecimal discount;
|
||||||
|
|
||||||
/** 税金 */
|
/** 税金 */
|
||||||
@Excel(name = "税金")
|
@Excel(name = "税金")
|
||||||
@ApiModelProperty("税金")
|
@ApiModelProperty("税金")
|
||||||
private BigDecimal taxAmount;
|
public BigDecimal taxAmount;
|
||||||
|
|
||||||
/** 应付金额(总价-折扣金额-税金) */
|
/** 应付金额(总价-折扣金额-税金) */
|
||||||
@Excel(name = "应付金额", readConverterExp = "总=价-折扣金额-税金")
|
@Excel(name = "应付金额", readConverterExp = "总=价-折扣金额-税金")
|
||||||
@ApiModelProperty("应付金额")
|
@ApiModelProperty("应付金额")
|
||||||
private BigDecimal amountDue;
|
public BigDecimal amountDue;
|
||||||
|
|
||||||
/** 账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年 */
|
/** 账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年 */
|
||||||
@Excel(name = "账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
@Excel(name = "账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
||||||
@ApiModelProperty("账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
@ApiModelProperty("账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
||||||
private Integer billingPeriodUnit;
|
public Integer billingPeriodUnit;
|
||||||
|
|
||||||
/** 账单周期时长 */
|
/** 账单周期时长 */
|
||||||
@Excel(name = "账单周期时长")
|
@Excel(name = "账单周期时长")
|
||||||
@ApiModelProperty("账单周期时长")
|
@ApiModelProperty("账单周期时长")
|
||||||
private BigDecimal billingPeriodDuration;
|
public BigDecimal billingPeriodDuration;
|
||||||
|
|
||||||
/** 账单生成的日期 */
|
/** 账单生成的日期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
||||||
@Excel(name = "账单生成的日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "账单生成的日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("账单生成的日期")
|
@ApiModelProperty("账单生成的日期")
|
||||||
private Date billingDate;
|
public Date billingDate;
|
||||||
|
|
||||||
/** 开泵时间 */
|
/** 开泵时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
||||||
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("开泵时间")
|
@ApiModelProperty("开泵时间")
|
||||||
private Date startTime;
|
public Date startTime;
|
||||||
|
|
||||||
/** 关泵时间 */
|
/** 关泵时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
||||||
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("关泵时间")
|
@ApiModelProperty("关泵时间")
|
||||||
private Date endTime;
|
public Date endTime;
|
||||||
|
|
||||||
/** 表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付” */
|
/** 表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付” */
|
||||||
@Excel(name = "表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
@Excel(name = "表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
||||||
@ApiModelProperty("表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
@ApiModelProperty("表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
||||||
private Integer paymentStatus;
|
public Integer paymentStatus;
|
||||||
|
|
||||||
/** 用户支付账单的方式1微信,2支付宝,3银联 */
|
/** 用户支付账单的方式1微信,2支付宝,3银联 */
|
||||||
@Excel(name = "用户支付账单的方式1微信,2支付宝,3银联")
|
@Excel(name = "用户支付账单的方式1微信,2支付宝,3银联")
|
||||||
@ApiModelProperty("用户支付账单的方式1微信,2支付宝,3银联")
|
@ApiModelProperty("用户支付账单的方式1微信,2支付宝,3银联")
|
||||||
private Integer paymentMethod;
|
public Integer paymentMethod;
|
||||||
|
|
||||||
/** 账单支付的时间 */
|
/** 账单支付的时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
||||||
@Excel(name = " 账单支付的时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = " 账单支付的时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(" 账单支付的时间")
|
@ApiModelProperty(" 账单支付的时间")
|
||||||
private Date paymentTime;
|
public Date paymentTime;
|
||||||
|
|
||||||
/** 账单的当前状态,0:已支付、1:已取消 */
|
/** 账单的当前状态,0:已支付、1:已取消 */
|
||||||
@Excel(name = "账单的当前状态,0:已支付、1:已取消")
|
@Excel(name = "账单的当前状态,0:已支付、1:已取消")
|
||||||
@ApiModelProperty("账单的当前状态,0:已支付、1:已取消")
|
@ApiModelProperty("账单的当前状态,0:已支付、1:已取消")
|
||||||
private Integer status;
|
public Integer status;
|
||||||
|
|
||||||
/** 区域码 */
|
/** 区域码 */
|
||||||
@Excel(name = "区域码")
|
@Excel(name = "区域码")
|
||||||
@ApiModelProperty("区域码")
|
@ApiModelProperty("区域码")
|
||||||
private String areaCode;
|
public String areaCode;
|
||||||
public String userName;
|
public String userName;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.fastbee.rechargecard.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||||
|
import com.fastbee.rechargecard.domain.dto.UserConsumptionDetailsDto;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,7 +44,7 @@ public interface IUserConsumptionDetailsService
|
|||||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||||
* @return 用户充值卡账单明细记录集合
|
* @return 用户充值卡账单明细记录集合
|
||||||
*/
|
*/
|
||||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsShowList(UserConsumptionDetails userConsumptionDetails);
|
public List<UserConsumptionDetailsDto> selectUserConsumptionDetailsShowList(UserConsumptionDetails userConsumptionDetails);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户充值卡账单明细记录
|
* 新增用户充值卡账单明细记录
|
||||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
import com.fastbee.common.utils.DateUtils;
|
import com.fastbee.common.utils.DateUtils;
|
||||||
import com.fastbee.rechargecard.domain.dto.UserConsumptionDetailsDto;
|
import com.fastbee.rechargecard.domain.dto.UserConsumptionDetailsDto;
|
||||||
|
import com.fastbee.system.mapper.SysUserMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.fastbee.rechargecard.mapper.UserConsumptionDetailsMapper;
|
import com.fastbee.rechargecard.mapper.UserConsumptionDetailsMapper;
|
||||||
@ -23,6 +24,8 @@ public class UserConsumptionDetailsServiceImpl implements IUserConsumptionDetail
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserConsumptionDetailsMapper userConsumptionDetailsMapper;
|
private UserConsumptionDetailsMapper userConsumptionDetailsMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据卡号查询用户充值卡账单明细记录列表
|
* 根据卡号查询用户充值卡账单明细记录列表
|
||||||
@ -64,15 +67,43 @@ public class UserConsumptionDetailsServiceImpl implements IUserConsumptionDetail
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsShowList(UserConsumptionDetails userConsumptionDetails)
|
public List<UserConsumptionDetailsDto> selectUserConsumptionDetailsShowList(UserConsumptionDetails data)
|
||||||
{
|
{
|
||||||
List<UserConsumptionDetailsDto> result=new ArrayList<>();
|
List<UserConsumptionDetailsDto> result=new ArrayList<>();
|
||||||
for(int i=0;i<result.size();i++)
|
List<UserConsumptionDetails> value=userConsumptionDetailsMapper.selectUserConsumptionDetailsList(data);
|
||||||
|
for(int i=0;i<value.size();i++)
|
||||||
{
|
{
|
||||||
/*UserConsumptionDetailsDto temp=UserConsumptionDetailsDto
|
UserConsumptionDetails userConsumptionDetails=value.get(i);
|
||||||
temp*/
|
UserConsumptionDetailsDto temp=new UserConsumptionDetailsDto();
|
||||||
|
temp.setUserName(sysUserMapper.selectUserById(userConsumptionDetails.getUserId()).getUserName());
|
||||||
|
temp.setId(userConsumptionDetails.getId());
|
||||||
|
temp.setUserId(userConsumptionDetails.getUserId());
|
||||||
|
temp.setDeviceNumber(userConsumptionDetails.getDeviceNumber());
|
||||||
|
temp.setCardNumber(userConsumptionDetails.getCardNumber());
|
||||||
|
temp.setProjectId(userConsumptionDetails.getProjectId());
|
||||||
|
temp.setDeptId(userConsumptionDetails.getDeptId());
|
||||||
|
temp.setBillingType(userConsumptionDetails.getBillingType());
|
||||||
|
temp.setPumpTime(userConsumptionDetails.getPumpTime());
|
||||||
|
temp.setUnitPrice(userConsumptionDetails.getUnitPrice());
|
||||||
|
temp.setTotalPrice(userConsumptionDetails.getTotalPrice());
|
||||||
|
temp.setDiscount(userConsumptionDetails.getDiscount());
|
||||||
|
temp.setTaxAmount(userConsumptionDetails.getTaxAmount());
|
||||||
|
temp.setAmountDue(userConsumptionDetails.getAmountDue());
|
||||||
|
temp.setBillingPeriodDuration(userConsumptionDetails.getBillingPeriodDuration());
|
||||||
|
temp.setBillingPeriodUnit(userConsumptionDetails.getBillingPeriodUnit());
|
||||||
|
temp.setBillingDate(userConsumptionDetails.getBillingDate());
|
||||||
|
temp.setStartTime(userConsumptionDetails.getStartTime());
|
||||||
|
temp.setEndTime(userConsumptionDetails.getEndTime());
|
||||||
|
temp.setPaymentMethod(userConsumptionDetails.getPaymentMethod());
|
||||||
|
temp.setPaymentStatus(userConsumptionDetails.getPaymentStatus());
|
||||||
|
temp.setPaymentTime(userConsumptionDetails.getPaymentTime());
|
||||||
|
temp.setStatus(userConsumptionDetails.getStatus());
|
||||||
|
temp.setAreaCode(userConsumptionDetails.getAreaCode());
|
||||||
|
|
||||||
|
result.add(temp);
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -129,7 +129,7 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
|
|||||||
// 如果没有找到对应的记录,返回0或者一个错误码
|
// 如果没有找到对应的记录,返回0或者一个错误码
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*UserConsumptionDetails userConsumptionDetails=new UserConsumptionDetails();
|
UserConsumptionDetails userConsumptionDetails=new UserConsumptionDetails();
|
||||||
userConsumptionDetails.setUserId(info.getUserId());
|
userConsumptionDetails.setUserId(info.getUserId());
|
||||||
userConsumptionDetails.setCardNumber(info.getCardNumber());
|
userConsumptionDetails.setCardNumber(info.getCardNumber());
|
||||||
userConsumptionDetails.setBillingType(0);
|
userConsumptionDetails.setBillingType(0);
|
||||||
@ -141,13 +141,7 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
|
|||||||
userConsumptionDetails.setStatus(0);
|
userConsumptionDetails.setStatus(0);
|
||||||
userConsumptionDetails.setAreaCode(rechargecardUser.getAreacode());
|
userConsumptionDetails.setAreaCode(rechargecardUser.getAreacode());
|
||||||
userConsumptionDetails.setCreateTime(DateUtils.getNowDate());
|
userConsumptionDetails.setCreateTime(DateUtils.getNowDate());
|
||||||
|
/*UserConsumptionDetails userConsumptionDetails = UserConsumptionDetails.builder()
|
||||||
NgUserRechargeRecords ngUserRechargeRecords=new NgUserRechargeRecords();
|
|
||||||
ngUserRechargeRecords.setUserId(info.getUserId());*/
|
|
||||||
|
|
||||||
// 计算新的余额
|
|
||||||
/*BigDecimal newBalance = rechargecardUser.getNumber().add(info.getBalance());
|
|
||||||
UserConsumptionDetails userConsumptionDetails = UserConsumptionDetails.builder()
|
|
||||||
.userId(info.getUserId())
|
.userId(info.getUserId())
|
||||||
.cardNumber(info.getCardNumber())
|
.cardNumber(info.getCardNumber())
|
||||||
.billingType(0)
|
.billingType(0)
|
||||||
@ -159,6 +153,19 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
|
|||||||
.status(0)
|
.status(0)
|
||||||
.areaCode(rechargecardUser.getAreacode()) // 假设 getAreacode() 方法返回区域代码
|
.areaCode(rechargecardUser.getAreacode()) // 假设 getAreacode() 方法返回区域代码
|
||||||
.build();*/
|
.build();*/
|
||||||
|
NgUserRechargeRecords ngUserRechargeRecords=new NgUserRechargeRecords();
|
||||||
|
ngUserRechargeRecords.setUserId(info.getUserId());
|
||||||
|
ngUserRechargeRecords.setUserName(info.getUserName());
|
||||||
|
ngUserRechargeRecords.setCardNumber(info.getCardNumber());
|
||||||
|
ngUserRechargeRecords.setAreaCode(rechargecardUser.getAreacode());
|
||||||
|
ngUserRechargeRecords.setType(rechargecardUser.getStatus());
|
||||||
|
ngUserRechargeRecords.setAmount(rechargecardUser.getNumber());
|
||||||
|
ngUserRechargeRecords.setBalance(info.getBalance());
|
||||||
|
ngUserRechargeRecords.setRechargeTime(DateUtils.getNowDate());
|
||||||
|
ngUserRechargeRecords.setStatus(0);
|
||||||
|
ngUserRechargeRecords.setAreaCode(rechargecardUser.getAreacode());
|
||||||
|
// 计算新的余额
|
||||||
|
BigDecimal newBalance = rechargecardUser.getNumber().add(info.getBalance());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -171,15 +178,13 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
|
|||||||
.rechargeCode(null).status(0).serialNumber(null).deviceNumber(null).projectId(null)
|
.rechargeCode(null).status(0).serialNumber(null).deviceNumber(null).projectId(null)
|
||||||
.deptId(null)
|
.deptId(null)
|
||||||
.areaCode(rechargecardUser.getAreacode())
|
.areaCode(rechargecardUser.getAreacode())
|
||||||
.build();
|
.build();*/
|
||||||
userRechargeRecordsMapper.insertNgUserRechargeRecords(ngUserRechargeRecords);
|
userRechargeRecordsMapper.insertNgUserRechargeRecords(ngUserRechargeRecords);
|
||||||
userConsumptionDetailsMapper.insertUserConsumptionDetails(userConsumptionDetails);
|
userConsumptionDetailsMapper.insertUserConsumptionDetails(userConsumptionDetails);
|
||||||
// 更新用户充值卡信息,包括新的余额
|
// 更新用户充值卡信息,包括新的余额
|
||||||
info.setBalance(newBalance);
|
info.setBalance(newBalance);
|
||||||
info.setUpdateTime(DateUtils.getNowDate());
|
info.setUpdateTime(DateUtils.getNowDate());
|
||||||
info.setAreaCode(rechargecardUser.getAreacode());
|
info.setAreaCode(rechargecardUser.getAreacode());
|
||||||
return userRechargeCardsMapper.updateUserRechargeCards(info);*/
|
return userRechargeCardsMapper.updateUserRechargeCards(info);
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user