修改大屏、修改机构统计页面

This commit is contained in:
yuyang 2022-05-11 16:01:18 +08:00
parent 2639b6dcd9
commit 5831172413
8 changed files with 42 additions and 18 deletions

View File

@ -494,7 +494,7 @@
<select id="getWorkOrderTerminal" resultType="map">
select
title,
create_time as createTime,
DATE_FORMAT(create_time,'%Y-%m-%d') as createTime,
status
from xhpc_work_order
where 1=1

View File

@ -197,7 +197,7 @@
GROUP BY
DATE_FORMAT( end_time, "%Y-%m-%d" )) b ON a.`current_time` = b.end_time
ORDER BY
`current_time` DESC
`current_time`
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete

View File

@ -971,7 +971,7 @@ public class XhpcHistoryOrderController extends BaseController {
}
xhpcSt.setOperatorId(xhpc.getOperatorId());
xhpcSt.setChargingStationId(xhpc.getChargingStationId());
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
//xhpcSt.setCreateTime(Calendar.getInstance().getTime());
xhpcSt.setTerminalId(xhpc.getTerminalId());
xhpcSt.setChargingMode(xhpc.getChargingMode());
xhpcSt.setActivityPowerPriceTotal(xhpc.getActivityPowerPriceTotal());

View File

@ -94,8 +94,8 @@ public class XhpcCommonController extends BaseController {
* 机构人员统计
*/
@GetMapping(value = "/getPersonnelStatistics")
public TableDataInfo getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account) {
List<Map<String, Object>> list = xhpcCommonService.getPersonnelStatistics(tenantId,terminalId,operatorId,chargingStationId,chargingPileId,type,name,phone,account);
public TableDataInfo getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime) {
List<Map<String, Object>> list = xhpcCommonService.getPersonnelStatistics(tenantId,terminalId,operatorId,chargingStationId,chargingPileId,type,name,phone,account,startTime,endTime);
return getDataTable(list);
}
@ -103,8 +103,8 @@ public class XhpcCommonController extends BaseController {
* 机构人员统计
*/
@PostMapping(value = "/getPersonnelStatisticsExport")
public void getPersonnelStatisticsExport(HttpServletResponse response,String tenantId,Long terminalId, Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account)throws IOException {
xhpcCommonService.getPersonnelStatisticsExport(response,tenantId,terminalId,operatorId,chargingStationId,chargingPileId,type,name,phone,account);
public void getPersonnelStatisticsExport(HttpServletResponse response,String tenantId,Long terminalId, Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime)throws IOException {
xhpcCommonService.getPersonnelStatisticsExport(response,tenantId,terminalId,operatorId,chargingStationId,chargingPileId,type,name,phone,account,startTime,endTime);
}

View File

@ -28,5 +28,5 @@ public interface XhpcCommonMapper {
Map<String, Object> getCustomersUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("serialNumber")String serialNumber,@Param("tenantId") String tenantId);
List<Map<String, Object>> getPersonnelStatistics(@Param("terminalId")Long terminalId,@Param("operatorId")Long operatorId,@Param("chargingStationId") Long chargingStationId, @Param("chargingPileId")Long chargingPileId, @Param("type")Integer type, @Param("name")String name , @Param("phone")String phone, @Param("account")String account,@Param("number") Integer number,@Param("userId") Long userId,@Param("tenantId")String tenantId);
List<Map<String, Object>> getPersonnelStatistics(@Param("terminalId")Long terminalId,@Param("operatorId")Long operatorId,@Param("chargingStationId") Long chargingStationId, @Param("chargingPileId")Long chargingPileId, @Param("type")Integer type, @Param("name")String name , @Param("phone")String phone, @Param("account")String account,@Param("number") Integer number,@Param("userId") Long userId,@Param("tenantId")String tenantId,@Param("startTime")String startTime,@Param("endTime")String endTime);
}

View File

@ -46,8 +46,8 @@ public interface IXhpcCommonService {
/**
* 根据用户手机号获取用户信息
*/
List<Map<String, Object>> getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account);
List<Map<String, Object>> getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime);
void getPersonnelStatisticsExport(HttpServletResponse response,String tenantId,Long terminalId, Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account)throws IOException;
void getPersonnelStatisticsExport(HttpServletResponse response,String tenantId,Long terminalId, Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime)throws IOException;
}

View File

@ -125,7 +125,7 @@ public class XhpcCommonServiceImpl extends BaseService implements IXhpcCommonSer
* @param account
*/
@Override
public List<Map<String, Object>> getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name, String phone, String account) {
public List<Map<String, Object>> getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name, String phone, String account,String startTime,String endTime) {
//获取登陆用户
LoginUser loginUser = tokenService.getLoginUser();
@ -139,20 +139,20 @@ public class XhpcCommonServiceImpl extends BaseService implements IXhpcCommonSer
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
Long logOperatorId = sysUser.getOperatorId();
//运营商看自己的场站
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 1,logOperatorId,tenantId);
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 1,logOperatorId,tenantId,startTime,endTime);
}else{
//查询赋值的场站
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 2,sysUserId,tenantId);
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 2,sysUserId,tenantId,startTime,endTime);
}
}else{
startPage();
list =xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 0,sysUserId,tenantId);
list =xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 0,sysUserId,tenantId,startTime,endTime);
}
return list;
}
@Override
public void getPersonnelStatisticsExport(HttpServletResponse response, String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name, String phone, String account) throws IOException {
public void getPersonnelStatisticsExport(HttpServletResponse response, String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name, String phone, String account,String startTime,String endTime) throws IOException {
LoginUser loginUser = tokenService.getLoginUser();
SysUser sysUser = loginUser.getSysUser();
Long sysUserId = sysUser.getUserId();
@ -162,14 +162,14 @@ public class XhpcCommonServiceImpl extends BaseService implements IXhpcCommonSer
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
Long logOperatorId = sysUser.getOperatorId();
//运营商看自己的场站
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 1,logOperatorId,tenantId);
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 1,logOperatorId,tenantId,startTime,endTime);
}else{
//查询赋值的场站
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 2,sysUserId,tenantId);
list = xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 2,sysUserId,tenantId,startTime,endTime);
}
}else{
list =xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 0,sysUserId,tenantId);
list =xhpcCommonMapper.getPersonnelStatistics(terminalId,operatorId, chargingStationId, chargingPileId, type, name,phone,account, 0,sysUserId,tenantId,startTime,endTime);
}
// 通过工具类创建writer默认创建xls格式
BigExcelWriter writer = ExcelUtil.getBigWriter("机构人员统计.xlsx");

View File

@ -161,6 +161,12 @@
<if test="phone !=null and phone !=''">
and xcp.phone like concat('%',#{phone},'%')
</if>
<if test="startTime !=null and '' !=startTime">
and xho.end_time &gt;=#{startTime}
</if>
<if test="endTime !=null and '' !=endTime">
and xho.end_time &lt;=#{endTime}
</if>
GROUP BY xcp.account
</if>
<if test="type !=null and type==2">
@ -204,6 +210,12 @@
<if test="phone !=null and phone !=''">
and xcup.phone like concat('%',#{phone},'%')
</if>
<if test="startTime !=null and '' !=startTime">
and xho.end_time &gt;=#{startTime}
</if>
<if test="endTime !=null and '' !=endTime">
and xho.end_time &lt;=#{endTime}
</if>
GROUP BY xcup.account
</if>
<if test="type !=1 and type !=2">
@ -247,6 +259,12 @@
<if test="phone !=null and phone !=''">
and xcp.phone like concat('%',#{phone},'%')
</if>
<if test="startTime !=null and '' !=startTime">
and xho.end_time &gt;=#{startTime}
</if>
<if test="endTime !=null and '' !=endTime">
and xho.end_time &lt;=#{endTime}
</if>
GROUP BY xcp.account
union
select
@ -289,6 +307,12 @@
<if test="phone !=null and phone !=''">
and xcup.phone like concat('%',#{phone},'%')
</if>
<if test="startTime !=null and '' !=startTime">
and xho.end_time &gt;=#{startTime}
</if>
<if test="endTime !=null and '' !=endTime">
and xho.end_time &lt;=#{endTime}
</if>
GROUP BY xcup.account
</if>
</select>