对接日志管理
This commit is contained in:
parent
6e1fcddc6f
commit
1b3bd6da3c
@ -38,8 +38,8 @@ public class PileLogController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/{pileId}")
|
||||
public TableDataInfo getPileDetailPage(@PathVariable("pileId") String pileId) {
|
||||
@GetMapping("/detail")
|
||||
public TableDataInfo getPileDetailPage(@RequestParam("pileId") String pileId) {
|
||||
startPage();
|
||||
return getDataTable(pileLogService.getPileRunLogPage(pileId));
|
||||
}
|
||||
|
||||
@ -32,15 +32,15 @@ public class StationLogController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/{stationId}")
|
||||
public TableDataInfo getPileDetailPage(@PathVariable("stationId") Long stationId) {
|
||||
@GetMapping("/detail")
|
||||
public TableDataInfo getPileDetailPage(@RequestParam("stationId") Long stationId) {
|
||||
startPage();
|
||||
return getDataTable(stationLogService.getStationRatePage(stationId));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/rate/{rateId}")
|
||||
public AjaxResult getRateInfo(@PathVariable("rateId") Integer rateId) {
|
||||
@GetMapping("/rate/detail")
|
||||
public AjaxResult getRateInfo(@RequestParam("rateId") Integer rateId) {
|
||||
return AjaxResult.success(stationLogService.getRateInfo(rateId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,18 +8,41 @@ import java.util.Date;
|
||||
@Data
|
||||
public class XhpcDeviceMessageDomain {
|
||||
|
||||
/**
|
||||
* 消息ID
|
||||
*/
|
||||
private Long deviceMessageId;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* 充电订单号
|
||||
*/
|
||||
private String chargeOrderNo;
|
||||
|
||||
/**
|
||||
* 报文内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String createBy;
|
||||
@ -27,6 +50,4 @@ public class XhpcDeviceMessageDomain {
|
||||
private Date updateTime;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@ -25,4 +25,7 @@ public interface XhpcChargingStationMapper {
|
||||
|
||||
|
||||
List<Map<String, Object>> selectRateTimeListByRateId(@Param("rateId")Integer rateId);
|
||||
|
||||
|
||||
List<Map<String, Object>> selectBaseRateTimeListByRateId(@Param("rateId")Integer rateId);
|
||||
}
|
||||
|
||||
@ -12,5 +12,5 @@ public interface StationLogService {
|
||||
List<Map<String, Object>> getStationRatePage(Long stationId);
|
||||
|
||||
|
||||
List<Map<String, Object>> getRateInfo(int rateId);
|
||||
Map<String, Object> getRateInfo(int rateId);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.xhpc.log.service.StationLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -28,7 +29,11 @@ public class StationLogServiceImpl implements StationLogService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getRateInfo(int rateId){
|
||||
return stationMapper.selectRateTimeListByRateId(rateId);
|
||||
public Map<String, Object> getRateInfo(int rateId){
|
||||
Map<String, Object> resData = new HashMap<>();
|
||||
resData.put("base", stationMapper.selectBaseRateTimeListByRateId(rateId));
|
||||
resData.put("current", stationMapper.selectRateTimeListByRateId(rateId));
|
||||
|
||||
return resData;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,8 @@
|
||||
<select id="selectRateListByStationId" resultType="map">
|
||||
select
|
||||
rate_model_id as 'rateId',
|
||||
create_time as 'createTime'
|
||||
create_time as 'createTime',
|
||||
create_by as 'createBy'
|
||||
from xhpc_rate_time
|
||||
where charging_station_id=#{stationId}
|
||||
group by rate_model_id
|
||||
@ -50,4 +51,13 @@
|
||||
left join xhpc_rate as ra on ra.rate_id = rt.rate_id
|
||||
where rt.rate_model_id =#{rateId}
|
||||
</select>
|
||||
|
||||
<select id="selectBaseRateTimeListByRateId" resultType="map">
|
||||
SELECT
|
||||
name as 'name',
|
||||
power_fee as 'powerFee',
|
||||
service_fee as 'serviceFee'
|
||||
FROM xhpc_rate
|
||||
WHERE rate_model_id=#{rateId};
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
type as 'type',
|
||||
serial_number as 'serialNumber',
|
||||
content as 'content',
|
||||
reply_content as 'replyContent',
|
||||
charge_order_no as 'chargeOrderNo',
|
||||
status as 'status',
|
||||
remark as 'remark',
|
||||
create_time as 'createTime',
|
||||
@ -33,7 +33,7 @@
|
||||
m.type as 'type',
|
||||
m.serial_number as 'serialNumber',
|
||||
m.content as 'content',
|
||||
m.reply_content as 'replyContent',
|
||||
m.charge_order_no as 'chargeOrderNo',
|
||||
m.status as 'status',
|
||||
m.remark as 'remark',
|
||||
m.create_time as 'createTime',
|
||||
@ -58,6 +58,9 @@
|
||||
<if test="params.serialNumber !=null and params.serialNumber!=''">
|
||||
and cp.serial_number=#{params.serialNumber}
|
||||
</if>
|
||||
<if test="params.chargeOrderNo !=null and params.chargeOrderNo!=''">
|
||||
and m.charge_order_no=#{params.chargeOrderNo}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user