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

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

View File

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

View File

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

View File

@ -94,8 +94,8 @@ public class XhpcCommonController extends BaseController {
* 机构人员统计 * 机构人员统计
*/ */
@GetMapping(value = "/getPersonnelStatistics") @GetMapping(value = "/getPersonnelStatistics")
public TableDataInfo getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String 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); List<Map<String, Object>> list = xhpcCommonService.getPersonnelStatistics(tenantId,terminalId,operatorId,chargingStationId,chargingPileId,type,name,phone,account,startTime,endTime);
return getDataTable(list); return getDataTable(list);
} }
@ -103,8 +103,8 @@ public class XhpcCommonController extends BaseController {
* 机构人员统计 * 机构人员统计
*/ */
@PostMapping(value = "/getPersonnelStatisticsExport") @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 { 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); 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); 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 * @param account
*/ */
@Override @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(); LoginUser loginUser = tokenService.getLoginUser();
@ -139,20 +139,20 @@ public class XhpcCommonServiceImpl extends BaseService implements IXhpcCommonSer
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){ if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
Long logOperatorId = sysUser.getOperatorId(); 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{ }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{ }else{
startPage(); 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; return list;
} }
@Override @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(); LoginUser loginUser = tokenService.getLoginUser();
SysUser sysUser = loginUser.getSysUser(); SysUser sysUser = loginUser.getSysUser();
Long sysUserId = sysUser.getUserId(); Long sysUserId = sysUser.getUserId();
@ -162,14 +162,14 @@ public class XhpcCommonServiceImpl extends BaseService implements IXhpcCommonSer
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){ if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
Long logOperatorId = sysUser.getOperatorId(); 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{ }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{ }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格式 // 通过工具类创建writer默认创建xls格式
BigExcelWriter writer = ExcelUtil.getBigWriter("机构人员统计.xlsx"); BigExcelWriter writer = ExcelUtil.getBigWriter("机构人员统计.xlsx");

View File

@ -161,6 +161,12 @@
<if test="phone !=null and phone !=''"> <if test="phone !=null and phone !=''">
and xcp.phone like concat('%',#{phone},'%') and xcp.phone like concat('%',#{phone},'%')
</if> </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 GROUP BY xcp.account
</if> </if>
<if test="type !=null and type==2"> <if test="type !=null and type==2">
@ -204,6 +210,12 @@
<if test="phone !=null and phone !=''"> <if test="phone !=null and phone !=''">
and xcup.phone like concat('%',#{phone},'%') and xcup.phone like concat('%',#{phone},'%')
</if> </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 GROUP BY xcup.account
</if> </if>
<if test="type !=1 and type !=2"> <if test="type !=1 and type !=2">
@ -247,6 +259,12 @@
<if test="phone !=null and phone !=''"> <if test="phone !=null and phone !=''">
and xcp.phone like concat('%',#{phone},'%') and xcp.phone like concat('%',#{phone},'%')
</if> </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 GROUP BY xcp.account
union union
select select
@ -289,6 +307,12 @@
<if test="phone !=null and phone !=''"> <if test="phone !=null and phone !=''">
and xcup.phone like concat('%',#{phone},'%') and xcup.phone like concat('%',#{phone},'%')
</if> </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 GROUP BY xcup.account
</if> </if>
</select> </select>