mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-06 02:50:13 +08:00
update 添加集团名称字段
This commit is contained in:
@@ -167,4 +167,13 @@ public class MemberGroupController extends BaseController {
|
|||||||
public TableDataInfo queryMemberGroupConsumptionList(@RequestBody MemberGroupDTO dto) {
|
public TableDataInfo queryMemberGroupConsumptionList(@RequestBody MemberGroupDTO dto) {
|
||||||
return getDataTable(memberGroupService.queryMemberGroupConsumptionList(dto.getGroupCode()));
|
return getDataTable(memberGroupService.queryMemberGroupConsumptionList(dto.getGroupCode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆消费明细
|
||||||
|
* queryConsumptionDetailListByVinCode
|
||||||
|
*/
|
||||||
|
@PostMapping("/queryConsumptionDetailListByVinCode")
|
||||||
|
public TableDataInfo queryConsumptionDetailListByVinCode(@RequestBody MemberGroupDTO dto) {
|
||||||
|
return getDataTable(memberGroupService.queryConsumptionDetailListByVinCode(dto.getGroupCode(), dto.getVinCode()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.jsowell.pile.domain;
|
|||||||
|
|
||||||
import com.jsowell.common.annotation.Excel;
|
import com.jsowell.common.annotation.Excel;
|
||||||
import com.jsowell.common.core.domain.BaseEntity;
|
import com.jsowell.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
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;
|
||||||
|
|
||||||
@@ -13,6 +15,8 @@ import java.math.BigDecimal;
|
|||||||
* @author jsowell
|
* @author jsowell
|
||||||
* @date 2023-12-26
|
* @date 2023-12-26
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
public class MemberGroup extends BaseEntity {
|
public class MemberGroup extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -21,6 +25,12 @@ public class MemberGroup extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员组名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "会员组名称")
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员组编号
|
* 会员组编号
|
||||||
*/
|
*/
|
||||||
@@ -62,70 +72,6 @@ public class MemberGroup extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGroupCode(String groupCode) {
|
|
||||||
this.groupCode = groupCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGroupCode() {
|
|
||||||
return groupCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMerchantId(String merchantId) {
|
|
||||||
this.merchantId = merchantId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMerchantId() {
|
|
||||||
return merchantId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStationId(String stationId) {
|
|
||||||
this.stationId = stationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStationId() {
|
|
||||||
return stationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGroupLevel(String groupLevel) {
|
|
||||||
this.groupLevel = groupLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGroupLevel() {
|
|
||||||
return groupLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGroupType(String groupType) {
|
|
||||||
this.groupType = groupType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGroupType() {
|
|
||||||
return groupType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDiscount(BigDecimal discount) {
|
|
||||||
this.discount = discount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getDiscount() {
|
|
||||||
return discount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDelFlag(String delFlag) {
|
|
||||||
this.delFlag = delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDelFlag() {
|
|
||||||
return delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||||
|
|||||||
@@ -23,4 +23,6 @@ public class MemberGroupDTO extends BaseEntity {
|
|||||||
private String stationId;
|
private String stationId;
|
||||||
|
|
||||||
private String memberId;
|
private String memberId;
|
||||||
|
|
||||||
|
private String vinCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,13 +315,13 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
|||||||
Map<String, List<OrderBasicInfo>> listMap = orderList.stream().collect(Collectors.groupingBy(OrderBasicInfo::getMemberId));
|
Map<String, List<OrderBasicInfo>> listMap = orderList.stream().collect(Collectors.groupingBy(OrderBasicInfo::getMemberId));
|
||||||
MemberGroupConsumptionVO vo = null;
|
MemberGroupConsumptionVO vo = null;
|
||||||
for (Map.Entry<String, List<OrderBasicInfo>> entry : listMap.entrySet()) {
|
for (Map.Entry<String, List<OrderBasicInfo>> entry : listMap.entrySet()) {
|
||||||
|
if (CollectionUtils.isEmpty(entry.getValue())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// 订单根据结算时间倒序,结算时间为null的排在最后(null在前,结算日期正序,之后整个list反转)
|
// 订单根据结算时间倒序,结算时间为null的排在最后(null在前,结算日期正序,之后整个list反转)
|
||||||
List<OrderBasicInfo> orderBasicInfoList = entry.getValue().stream()
|
List<OrderBasicInfo> orderBasicInfoList = entry.getValue().stream()
|
||||||
.sorted(Comparator.comparing(OrderBasicInfo::getSettlementTime, Comparator.nullsLast(Comparator.reverseOrder())))
|
.sorted(Comparator.comparing(OrderBasicInfo::getSettlementTime, Comparator.nullsLast(Comparator.reverseOrder())))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(orderBasicInfoList)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
vo = new MemberGroupConsumptionVO();
|
vo = new MemberGroupConsumptionVO();
|
||||||
|
|
||||||
String vinCode = null;
|
String vinCode = null;
|
||||||
@@ -359,7 +359,7 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
|||||||
dto.setGroupCode(groupCode);
|
dto.setGroupCode(groupCode);
|
||||||
dto.setVinCode(vinCode);
|
dto.setVinCode(vinCode);
|
||||||
List<OrderListVO> orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(dto);
|
List<OrderListVO> orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(dto);
|
||||||
return null;
|
return orderListVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ import java.math.BigDecimal;
|
|||||||
public class MemberGroupVO {
|
public class MemberGroupVO {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员组名称
|
||||||
|
*/
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员组编号
|
* 会员组编号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<resultMap type="com.jsowell.pile.domain.MemberGroup" id="MemberGroupResult">
|
<resultMap type="com.jsowell.pile.domain.MemberGroup" id="MemberGroupResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="groupName" column="group_name" />
|
||||||
<result property="groupCode" column="group_code" />
|
<result property="groupCode" column="group_code" />
|
||||||
<result property="merchantId" column="merchant_id" />
|
<result property="merchantId" column="merchant_id" />
|
||||||
<result property="stationId" column="station_id" />
|
<result property="stationId" column="station_id" />
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, group_code, merchant_id, station_id, group_level, group_type, discount, create_by, create_time, update_by, update_time, del_flag
|
id, group_name, group_code, merchant_id, station_id, group_level, group_type, discount, create_by, create_time, update_by, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectMemberGroupVo">
|
<sql id="selectMemberGroupVo">
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
<select id="selectMemberGroupList" parameterType="com.jsowell.pile.domain.MemberGroup" resultMap="MemberGroupResult">
|
<select id="selectMemberGroupList" parameterType="com.jsowell.pile.domain.MemberGroup" resultMap="MemberGroupResult">
|
||||||
<include refid="selectMemberGroupVo"/>
|
<include refid="selectMemberGroupVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="groupName != null and groupName != ''"> and group_name = #{groupName}</if>
|
||||||
<if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
<if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
||||||
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
|
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
|
||||||
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
||||||
@@ -50,6 +52,7 @@
|
|||||||
insert into member_group
|
insert into member_group
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
|
<if test="groupName != null">group_name,</if>
|
||||||
<if test="groupCode != null">group_code,</if>
|
<if test="groupCode != null">group_code,</if>
|
||||||
<if test="merchantId != null">merchant_id,</if>
|
<if test="merchantId != null">merchant_id,</if>
|
||||||
<if test="stationId != null">station_id,</if>
|
<if test="stationId != null">station_id,</if>
|
||||||
@@ -64,6 +67,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="groupName != null">#{groupName},</if>
|
||||||
<if test="groupCode != null">#{groupCode},</if>
|
<if test="groupCode != null">#{groupCode},</if>
|
||||||
<if test="merchantId != null">#{merchantId},</if>
|
<if test="merchantId != null">#{merchantId},</if>
|
||||||
<if test="stationId != null">#{stationId},</if>
|
<if test="stationId != null">#{stationId},</if>
|
||||||
@@ -81,6 +85,7 @@
|
|||||||
<update id="updateMemberGroup" parameterType="com.jsowell.pile.domain.MemberGroup">
|
<update id="updateMemberGroup" parameterType="com.jsowell.pile.domain.MemberGroup">
|
||||||
update member_group
|
update member_group
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="groupName != null">group_name = #{groupName},</if>
|
||||||
<if test="groupCode != null">group_code = #{groupCode},</if>
|
<if test="groupCode != null">group_code = #{groupCode},</if>
|
||||||
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
||||||
<if test="stationId != null">station_id = #{stationId},</if>
|
<if test="stationId != null">station_id = #{stationId},</if>
|
||||||
@@ -110,6 +115,7 @@
|
|||||||
<select id="queryMemberGroupList" resultType="com.jsowell.pile.vo.web.MemberGroupVO">
|
<select id="queryMemberGroupList" resultType="com.jsowell.pile.vo.web.MemberGroupVO">
|
||||||
select
|
select
|
||||||
t1.id as id,
|
t1.id as id,
|
||||||
|
t1.group_name as groupName,
|
||||||
t1.group_code as groupCode,
|
t1.group_code as groupCode,
|
||||||
t1.merchant_id as merchantId,
|
t1.merchant_id as merchantId,
|
||||||
t1.station_id as stationId,
|
t1.station_id as stationId,
|
||||||
|
|||||||
Reference in New Issue
Block a user