mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-17 16:28:41 +08:00
update 修改逻辑卡号功能、占桩订单区分运营商和站点
This commit is contained in:
@@ -7,4 +7,5 @@ package com.jsowell.api.uniapp.business;
|
|||||||
* @Date 2024/7/12 11:13:59
|
* @Date 2024/7/12 11:13:59
|
||||||
*/
|
*/
|
||||||
public class PileBasicInfoController {
|
public class PileBasicInfoController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class CameraService {
|
|||||||
.status(OccupyOrderStatusEnum.ORDER_HANG_UP.getCode()) // 2-订单挂起
|
.status(OccupyOrderStatusEnum.ORDER_HANG_UP.getCode()) // 2-订单挂起
|
||||||
.plateNumber(plateNumber)
|
.plateNumber(plateNumber)
|
||||||
.build();
|
.build();
|
||||||
List<OccupyOrderVO> occupyList = orderPileOccupyService.getOrderPileOccupyList(occupy);
|
List<OrderPileOccupy> occupyList = orderPileOccupyService.selectOrderPileOccupyList(occupy);
|
||||||
// todo 如果有占桩订单,则先提醒“需支付占桩订单”
|
// todo 如果有占桩订单,则先提醒“需支付占桩订单”
|
||||||
if (CollectionUtils.isNotEmpty(occupyList)) {
|
if (CollectionUtils.isNotEmpty(occupyList)) {
|
||||||
return "需支付占桩订单";
|
return "需支付占桩订单";
|
||||||
@@ -192,7 +192,7 @@ public class CameraService {
|
|||||||
OrderPileOccupy orderPileOccupy = OrderPileOccupy.builder()
|
OrderPileOccupy orderPileOccupy = OrderPileOccupy.builder()
|
||||||
.plateNumber(plateNumber)
|
.plateNumber(plateNumber)
|
||||||
.build();
|
.build();
|
||||||
List<OccupyOrderVO> orderPileOccupyList = orderPileOccupyService.getOrderPileOccupyList(orderPileOccupy);
|
List<OrderPileOccupy> orderPileOccupyList = orderPileOccupyService.selectOrderPileOccupyList(orderPileOccupy);
|
||||||
// TODO 如果有已挂起的占桩订单,则不予降锁,将“已存在有未支付的占桩订单”信息返回
|
// TODO 如果有已挂起的占桩订单,则不予降锁,将“已存在有未支付的占桩订单”信息返回
|
||||||
if (CollectionUtils.isNotEmpty(orderPileOccupyList)) {
|
if (CollectionUtils.isNotEmpty(orderPileOccupyList)) {
|
||||||
return "已存在有未支付的占桩订单";
|
return "已存在有未支付的占桩订单";
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.jsowell.pile.dto.MakeOrderFreeDTO;
|
import com.jsowell.pile.dto.MakeOrderFreeDTO;
|
||||||
|
import com.jsowell.pile.dto.OrderPileOccupyDTO;
|
||||||
import com.jsowell.pile.service.OrderPileOccupyService;
|
import com.jsowell.pile.service.OrderPileOccupyService;
|
||||||
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
||||||
import com.jsowell.pile.vo.web.OccupyOrderVO;
|
import com.jsowell.pile.vo.web.OccupyOrderVO;
|
||||||
@@ -41,10 +42,10 @@ public class OrderPileOccupyController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('pile:occupy:list')")
|
@PreAuthorize("@ss.hasPermi('pile:occupy:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(OrderPileOccupy orderPileOccupy) {
|
public TableDataInfo list(OrderPileOccupyDTO dto) {
|
||||||
startPage();
|
startPage();
|
||||||
// List<OrderPileOccupy> list = orderPileOccupyService.selectOrderPileOccupyList(orderPileOccupy);
|
// List<OrderPileOccupy> list = orderPileOccupyService.selectOrderPileOccupyList(orderPileOccupy);
|
||||||
List<OccupyOrderVO> list = orderPileOccupyService.getOrderPileOccupyList(orderPileOccupy);
|
List<OccupyOrderVO> list = orderPileOccupyService.getOrderPileOccupyListWithAuth(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package com.jsowell.pile.dto;
|
||||||
|
|
||||||
|
import com.jsowell.common.core.domain.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2024/7/15 13:37:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class OrderPileOccupyDTO extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占桩订单编号
|
||||||
|
*/
|
||||||
|
private String occupyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0-占桩中;1-订单完成; 2-订单挂起)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电站id
|
||||||
|
*/
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号码
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易流水号
|
||||||
|
*/
|
||||||
|
private String transactionCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占桩开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占桩结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态(0-未支付;1-支付完成;2-无需支付; 3-待补缴)
|
||||||
|
*/
|
||||||
|
private String payStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占桩订单金额
|
||||||
|
*/
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩编号
|
||||||
|
*/
|
||||||
|
private String pileSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩枪口号
|
||||||
|
*/
|
||||||
|
private String connectorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩枪口编号
|
||||||
|
*/
|
||||||
|
private String pileConnectorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识(0-否;1-是)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
import com.jsowell.pile.domain.OrderPileOccupy;
|
||||||
|
import com.jsowell.pile.dto.OrderPileOccupyDTO;
|
||||||
import com.jsowell.pile.dto.QueryOccupyOrderDTO;
|
import com.jsowell.pile.dto.QueryOccupyOrderDTO;
|
||||||
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
||||||
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
||||||
@@ -127,10 +128,10 @@ public interface OrderPileOccupyMapper {
|
|||||||
/**
|
/**
|
||||||
* 查询占桩订单列表
|
* 查询占桩订单列表
|
||||||
*
|
*
|
||||||
* @param orderPileOccupy 占桩订单
|
* @param dto 占桩订单
|
||||||
* @return 占桩订单集合
|
* @return 占桩订单集合
|
||||||
*/
|
*/
|
||||||
public List<OccupyOrderVO> getOrderPileOccupyList(OrderPileOccupy orderPileOccupy);
|
public List<OccupyOrderVO> getOrderPileOccupyList(@Param("dto") OrderPileOccupyDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使该笔订单免费
|
* 使该笔订单免费
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public interface OrderPileOccupyService{
|
|||||||
* @param orderPileOccupy 占桩订单
|
* @param orderPileOccupy 占桩订单
|
||||||
* @return 占桩订单集合
|
* @return 占桩订单集合
|
||||||
*/
|
*/
|
||||||
List<OccupyOrderVO> getOrderPileOccupyList(OrderPileOccupy orderPileOccupy);
|
// List<OccupyOrderVO> getOrderPileOccupyList(OrderPileOccupy orderPileOccupy);
|
||||||
|
|
||||||
List<OrderPileOccupy> queryOccupyOrderList(QueryOccupyOrderDTO dto);
|
List<OrderPileOccupy> queryOccupyOrderList(QueryOccupyOrderDTO dto);
|
||||||
|
|
||||||
@@ -120,4 +120,11 @@ public interface OrderPileOccupyService{
|
|||||||
int updateOrderInfoForWeb(MakeOrderFreeDTO dto);
|
int updateOrderInfoForWeb(MakeOrderFreeDTO dto);
|
||||||
|
|
||||||
void closeOccupyPileOrder(String pileSn, String connectorCode);
|
void closeOccupyPileOrder(String pileSn, String connectorCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询占桩订单列表(带权限校验)
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OccupyOrderVO> getOrderPileOccupyListWithAuth(OrderPileOccupyDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package com.jsowell.pile.service.impl;
|
|||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.jsowell.adapay.service.AdapayService;
|
import com.jsowell.adapay.service.AdapayService;
|
||||||
import com.jsowell.common.constant.CacheConstants;
|
import com.jsowell.common.constant.CacheConstants;
|
||||||
import com.jsowell.common.constant.Constants;
|
import com.jsowell.common.constant.Constants;
|
||||||
|
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||||
import com.jsowell.common.core.page.PageResponse;
|
import com.jsowell.common.core.page.PageResponse;
|
||||||
import com.jsowell.common.core.redis.RedisCache;
|
import com.jsowell.common.core.redis.RedisCache;
|
||||||
import com.jsowell.common.enums.DelFlagEnum;
|
import com.jsowell.common.enums.DelFlagEnum;
|
||||||
@@ -26,6 +28,7 @@ import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
|||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.mapper.OrderPileOccupyMapper;
|
import com.jsowell.pile.mapper.OrderPileOccupyMapper;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
|
import com.jsowell.pile.util.UserUtils;
|
||||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||||
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
||||||
@@ -152,9 +155,20 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService {
|
|||||||
return orderPileOccupyMapper.selectOrderPileOccupyList(orderPileOccupy);
|
return orderPileOccupyMapper.selectOrderPileOccupyList(orderPileOccupy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public List<OccupyOrderVO> getOrderPileOccupyList(OrderPileOccupy orderPileOccupy) {
|
* 获取占桩订单列表
|
||||||
return orderPileOccupyMapper.getOrderPileOccupyList(orderPileOccupy);
|
* @param dto 占桩订单
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<OccupyOrderVO> getOrderPileOccupyListWithAuth(OrderPileOccupyDTO dto) {
|
||||||
|
AuthorizedDeptVO authorizedMap = UserUtils.getAuthorizedMap();
|
||||||
|
if (authorizedMap == null) {
|
||||||
|
// 为空表示没有权限,返回空数组
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
dto.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||||
|
dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||||
|
return orderPileOccupyMapper.getOrderPileOccupyList(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -997,16 +997,30 @@
|
|||||||
order_pile_occupy t1
|
order_pile_occupy t1
|
||||||
JOIN pile_station_info t2 ON t1.station_id = t2.id
|
JOIN pile_station_info t2 ON t1.station_id = t2.id
|
||||||
AND t1.del_flag = '0'
|
AND t1.del_flag = '0'
|
||||||
|
JOIN pile_merchant_info t3 on t2.merchant_id = t3.id and t2.del_flag = '0'
|
||||||
<where>
|
<where>
|
||||||
<if test="occupyCode != null and occupyCode != ''"> and t1.occupy_code = #{occupyCode}</if>
|
<!-- 数据范围过滤 -->
|
||||||
<if test="memberId != null and memberId != ''"> and t1.member_id = #{memberId}</if>
|
<if test="dto.merchantDeptIds != null and dto.merchantDeptIds.size() != 0">
|
||||||
<if test="stationId != null and stationId != ''"> and t1.station_id = #{stationId}</if>
|
and t3.dept_id in
|
||||||
<if test="plateNumber != null and plateNumber != ''"> and t1.plate_number = #{plateNumber}</if>
|
<foreach collection="dto.merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
|
||||||
<if test="status != null and status != ''"> and t1.status = #{status}</if>
|
#{merchantDeptId}
|
||||||
<if test="startTime != null "> and t1.start_time = #{startTime}</if>
|
</foreach>
|
||||||
<if test="orderAmount != null "> and t1.order_amount = #{orderAmount}</if>
|
</if>
|
||||||
<if test="pileSn != null and pileSn != ''"> and t1.pile_sn = #{pileSn}</if>
|
<if test="dto.stationDeptIds != null and dto.stationDeptIds.size() != 0">
|
||||||
<if test="pileConnectorCode != null and pileConnectorCode != ''"> and t1.pile_connector_code = #{pileConnectorCode}</if>
|
and t2.dept_id in
|
||||||
|
<foreach collection="dto.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||||
|
#{stationDeptId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="dto.occupyCode != null and dto.occupyCode != ''"> and t1.occupy_code = #{dto.occupyCode}</if>
|
||||||
|
<if test="dto.memberId != null and dto.memberId != ''"> and t1.member_id = #{dto.memberId}</if>
|
||||||
|
<if test="dto.stationId != null and dto.stationId != ''"> and t1.station_id = #{dto.stationId}</if>
|
||||||
|
<if test="dto.plateNumber != null and dto.plateNumber != ''"> and t1.plate_number = #{dto.plateNumber}</if>
|
||||||
|
<if test="dto.status != null and dto.status != ''"> and t1.status = #{dto.status}</if>
|
||||||
|
<if test="dto.startTime != null "> and t1.start_time = #{dto.startTime}</if>
|
||||||
|
<if test="dto.orderAmount != null "> and t1.order_amount = #{dto.orderAmount}</if>
|
||||||
|
<if test="dto.pileSn != null and dto.pileSn != ''"> and t1.pile_sn = #{dto.pileSn}</if>
|
||||||
|
<if test="dto.pileConnectorCode != null and dto.pileConnectorCode != ''"> and t1.pile_connector_code = #{dto.pileConnectorCode}</if>
|
||||||
</where>
|
</where>
|
||||||
order by t1.create_time desc
|
order by t1.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="逻辑卡号" prop="logicCard">
|
<el-form-item label="逻辑卡号" prop="logicCard">
|
||||||
<el-input v-model="form.logicCard" :disabled="isDisabled" placeholder="请输入逻辑卡号"/>
|
<el-input v-model="form.logicCard" :disabled="multiple" v-hasPermi="['pile:card:edit']" placeholder="请输入逻辑卡号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="phoneNumber">
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
<el-input v-model="form.phoneNumber" placeholder="请输入会员的手机号码"/>
|
<el-input v-model="form.phoneNumber" placeholder="请输入会员的手机号码"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user