mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-18 00:38:33 +08:00
并充计算订单耗电量
This commit is contained in:
@@ -583,4 +583,23 @@ public class TempController extends BaseController {
|
|||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算订单耗电量
|
||||||
|
* dto.setStationId("657");
|
||||||
|
* dto.setStartTime("2024-10-23 00:00:00");
|
||||||
|
* dto.setEndTime("2024-11-07 23:59:59");
|
||||||
|
*/
|
||||||
|
@PostMapping("/calculateOrderElectricity")
|
||||||
|
public RestApiResponse<?> calculateOrderElectricity(@RequestBody QueryOrderDTO dto) {
|
||||||
|
RestApiResponse<?> response;
|
||||||
|
try {
|
||||||
|
tempService.calculateOrderElectricity(dto);
|
||||||
|
response = new RestApiResponse<>();
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("计算订单耗电量error", e);
|
||||||
|
response = new RestApiResponse<>();
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.jsowell.pile.dto.ApplyRefundDTO;
|
|||||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||||
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
||||||
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
||||||
|
import com.jsowell.pile.mapper.PileMsgRecordMapper;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.vo.web.ClearingBillVO;
|
import com.jsowell.pile.vo.web.ClearingBillVO;
|
||||||
import com.jsowell.pile.vo.web.OrderListVO;
|
import com.jsowell.pile.vo.web.OrderListVO;
|
||||||
@@ -77,6 +78,28 @@ public class TempService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MemberAdapayRecordService memberAdapayRecordService;
|
private MemberAdapayRecordService memberAdapayRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PileMsgRecordMapper pileMsgRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算订单耗电量
|
||||||
|
* 内蒙古站点
|
||||||
|
*/
|
||||||
|
public void calculateOrderElectricity(QueryOrderDTO dto) {
|
||||||
|
// 根据站点id查询充电桩列表
|
||||||
|
// List<String> pileSnList = Lists.newArrayList("88240000006708", "88240000006709", "88240000006713", "88240000006714");
|
||||||
|
// 查询充电桩的订单列表
|
||||||
|
List<OrderListVO> orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(dto);
|
||||||
|
logger.info("查询订单列表:{}", JSON.toJSONString(orderListVOS));
|
||||||
|
// 根据充电桩编号,查询报文
|
||||||
|
for (OrderListVO orderVO : orderListVOS) {
|
||||||
|
String pileSn = orderVO.getPileSn();
|
||||||
|
List<PileMsgRecord> pileFeedList = pileMsgRecordMapper.getPileFeedList(pileSn);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手动接口执行订单分账逻辑
|
* 手动接口执行订单分账逻辑
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ public class QueryOrderDTO extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String orderCode;
|
private String orderCode;
|
||||||
|
|
||||||
// 交易流水号
|
/**
|
||||||
|
* 交易流水号
|
||||||
|
*/
|
||||||
private String transactionCode;
|
private String transactionCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,6 +53,9 @@ public class QueryOrderDTO extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String stationId;
|
private String stationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点Id列表
|
||||||
|
*/
|
||||||
private List<String> stationIdList;
|
private List<String> stationIdList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,6 +73,9 @@ public class QueryOrderDTO extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号列表
|
||||||
|
*/
|
||||||
private List<String> orderCodeList;
|
private List<String> orderCodeList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,9 +88,13 @@ public class QueryOrderDTO extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String endSettleTime;
|
private String endSettleTime;
|
||||||
|
|
||||||
// 会员组编号
|
/**
|
||||||
|
* 会员组编号
|
||||||
|
*/
|
||||||
private String groupCode;
|
private String groupCode;
|
||||||
|
|
||||||
// 车辆vin编号
|
/**
|
||||||
|
* 车辆vin编号
|
||||||
|
*/
|
||||||
private String vinCode;
|
private String vinCode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user