去掉运营商权限,修改终端详情今日度数统计,创建账号密码
This commit is contained in:
parent
091d10b87a
commit
b63707ab77
@ -90,7 +90,7 @@ public class SysRoleController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改保存角色
|
* 修改保存角色
|
||||||
*/
|
*/
|
||||||
@PreAuthorize(hasPermi = "system:role:edit")
|
//@PreAuthorize(hasPermi = "system:role:edit")
|
||||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
||||||
|
|||||||
@ -196,7 +196,7 @@ public class SysUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
*/
|
*/
|
||||||
@PreAuthorize(hasPermi = "system:user:edit")
|
//@PreAuthorize(hasPermi = "system:user:edit")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/resetPwd")
|
@PutMapping("/resetPwd")
|
||||||
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
||||||
|
|||||||
@ -74,7 +74,7 @@ public interface XhpcTerminalMapper {
|
|||||||
/**
|
/**
|
||||||
* 今日充电量、今日充电用户、今日充电次数
|
* 今日充电量、今日充电用户、今日充电次数
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId") Long chargingStationId, @Param("gunNumber") String gunNumber);
|
Map<String, Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId") Long chargingStationId, @Param("terminalId")Long terminalId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过终端编号进入小程序开始充电页面
|
* 通过终端编号进入小程序开始充电页面
|
||||||
|
|||||||
@ -87,14 +87,13 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
|
|||||||
Map<String, Object> map = xhpcTerminalMapper.selectXhpcTerminalPileMessage(terminalId);
|
Map<String, Object> map = xhpcTerminalMapper.selectXhpcTerminalPileMessage(terminalId);
|
||||||
if (map != null && map.get("chargingStationId") != null && map.get("serialNumber") != null) {
|
if (map != null && map.get("chargingStationId") != null && map.get("serialNumber") != null) {
|
||||||
Long chargingStationId = Long.parseLong(map.get("chargingStationId").toString());
|
Long chargingStationId = Long.parseLong(map.get("chargingStationId").toString());
|
||||||
String gunNumber = map.get("serialNumber").toString().substring(14);
|
|
||||||
//费率时段,先反设置时段,在反默认时段
|
//费率时段,先反设置时段,在反默认时段
|
||||||
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
|
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
|
||||||
xhpcRateTimeTypeList.addAll(xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
xhpcRateTimeTypeList.addAll(xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
||||||
map.put("rateTimeList", xhpcRateTimeTypeList);
|
map.put("rateTimeList", xhpcRateTimeTypeList);
|
||||||
|
|
||||||
//统计终端(充redis获取终端信息)
|
//统计终端(充redis获取终端信息)
|
||||||
map.putAll(xhpcTerminalMapper.getXhpcRateTimeOrderStatistics(chargingStationId, gunNumber));
|
map.putAll(xhpcTerminalMapper.getXhpcRateTimeOrderStatistics(chargingStationId, terminalId));
|
||||||
|
|
||||||
if(map.get("chargingDegreeSum")==null || map.get("chargingDegreeSum").toString()==null || "".equals(map.get("chargingDegreeSum").toString())){
|
if(map.get("chargingDegreeSum")==null || map.get("chargingDegreeSum").toString()==null || "".equals(map.get("chargingDegreeSum").toString())){
|
||||||
map.put("chargingDegreeSum",0);
|
map.put("chargingDegreeSum",0);
|
||||||
|
|||||||
@ -312,17 +312,16 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
||||||
select IFNULL(sum(charging_degree), '0') AS chargingDegreeSum,
|
SELECT
|
||||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
sum(charging_degree) AS chargingDegreeSum,
|
||||||
COUNT(DISTINCT user_id) as userIdCount
|
COUNT(charge_order_id) AS realTimeOrderIdCount,
|
||||||
from xhpc_real_time_order
|
COUNT(DISTINCT user_id) AS userIdCount
|
||||||
where real_time_order_id in (
|
FROM
|
||||||
select max(real_time_order_id)
|
xhpc_charge_order
|
||||||
from xhpc_real_time_order
|
WHERE
|
||||||
WHERE to_days(create_time) = to_days(now())
|
terminal_id = #{terminalId}
|
||||||
and charging_station_id=#{chargingStationId}
|
and charging_station_id=#{chargingStationId}
|
||||||
and gun_number = #{gunNumber}
|
AND to_days(create_time) = to_days(now())
|
||||||
group by charging_order_id)
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getWXpNumMessage" resultType="map">
|
<select id="getWXpNumMessage" resultType="map">
|
||||||
|
|||||||
@ -57,5 +57,11 @@
|
|||||||
<version>4.6.1</version>
|
<version>4.6.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.7.9</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.xhpc.common.util;
|
package com.xhpc.common.util;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateField;
|
import cn.hutool.core.date.DateField;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
|
|
||||||
@ -153,7 +155,6 @@ public class DateUtil {
|
|||||||
* java.text.SimpleDateFormat
|
* java.text.SimpleDateFormat
|
||||||
*
|
*
|
||||||
* @param date
|
* @param date
|
||||||
* @param format
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static final String date2ChineseString(Date date) {
|
public static final String date2ChineseString(Date date) {
|
||||||
@ -247,8 +248,6 @@ public class DateUtil {
|
|||||||
* beginDate before c2, negative if beginDate after endDate, 0 if beginDate
|
* beginDate before c2, negative if beginDate after endDate, 0 if beginDate
|
||||||
* and endDate represent the same day.
|
* and endDate represent the same day.
|
||||||
*
|
*
|
||||||
* @param beginDate the begin date
|
|
||||||
* @param endDate the end date
|
|
||||||
* @return natural days between begin date and end date
|
* @return natural days between begin date and end date
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ public class XhpcUserController extends BaseController {
|
|||||||
Long[] roles = new Long[1];
|
Long[] roles = new Long[1];
|
||||||
roles[0] = role.getRoleId();
|
roles[0] = role.getRoleId();
|
||||||
sysUser.setRoleIds(roles);
|
sysUser.setRoleIds(roles);
|
||||||
sysUser.setPassword(sysUser.getUserName());
|
sysUser.setPassword("123456");
|
||||||
iXhpcUserService.insertUser(sysUser);
|
iXhpcUserService.insertUser(sysUser);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,11 +105,7 @@
|
|||||||
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName
|
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName
|
||||||
from sys_user su
|
from sys_user su
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id
|
||||||
WHERE su.del_flag = 0
|
WHERE su.del_flag = 0 and user_type = '03'
|
||||||
|
|
||||||
<if test="userrType!='00'">
|
|
||||||
and su.user_type = '01'
|
|
||||||
</if>
|
|
||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
and su.user_name like concat(concat('%', #{userName}), '%')
|
and su.user_name like concat(concat('%', #{userName}), '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user