去掉运营商权限,修改终端详情今日度数统计,创建账号密码
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)
|
||||
@PutMapping
|
||||
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)
|
||||
@PutMapping("/resetPwd")
|
||||
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);
|
||||
if (map != null && map.get("chargingStationId") != null && map.get("serialNumber") != null) {
|
||||
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);
|
||||
xhpcRateTimeTypeList.addAll(xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
||||
map.put("rateTimeList", xhpcRateTimeTypeList);
|
||||
|
||||
//统计终端(充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())){
|
||||
map.put("chargingDegreeSum",0);
|
||||
|
||||
@ -312,17 +312,16 @@
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
||||
select IFNULL(sum(charging_degree), '0') AS chargingDegreeSum,
|
||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) as userIdCount
|
||||
from xhpc_real_time_order
|
||||
where real_time_order_id in (
|
||||
select max(real_time_order_id)
|
||||
from xhpc_real_time_order
|
||||
WHERE to_days(create_time) = to_days(now())
|
||||
SELECT
|
||||
sum(charging_degree) AS chargingDegreeSum,
|
||||
COUNT(charge_order_id) AS realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) AS userIdCount
|
||||
FROM
|
||||
xhpc_charge_order
|
||||
WHERE
|
||||
terminal_id = #{terminalId}
|
||||
and charging_station_id=#{chargingStationId}
|
||||
and gun_number = #{gunNumber}
|
||||
group by charging_order_id)
|
||||
AND to_days(create_time) = to_days(now())
|
||||
</select>
|
||||
|
||||
<select id="getWXpNumMessage" resultType="map">
|
||||
|
||||
@ -57,5 +57,11 @@
|
||||
<version>4.6.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.9</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.xhpc.common.util;
|
||||
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
|
||||
@ -153,7 +155,6 @@ public class DateUtil {
|
||||
* java.text.SimpleDateFormat
|
||||
*
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ public class XhpcUserController extends BaseController {
|
||||
Long[] roles = new Long[1];
|
||||
roles[0] = role.getRoleId();
|
||||
sysUser.setRoleIds(roles);
|
||||
sysUser.setPassword(sysUser.getUserName());
|
||||
sysUser.setPassword("123456");
|
||||
iXhpcUserService.insertUser(sysUser);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ -105,11 +105,7 @@
|
||||
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName
|
||||
from sys_user su
|
||||
LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id
|
||||
WHERE su.del_flag = 0
|
||||
|
||||
<if test="userrType!='00'">
|
||||
and su.user_type = '01'
|
||||
</if>
|
||||
WHERE su.del_flag = 0 and user_type = '03'
|
||||
<if test="userName != null and userName != ''">
|
||||
and su.user_name like concat(concat('%', #{userName}), '%')
|
||||
</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user