增加运维统计-->未推送订单统计
This commit is contained in:
parent
bc4dd0ca51
commit
0e3f05cf49
@ -1139,12 +1139,10 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String tr ="80836000050002012210280905315435";
|
||||
String substring = tr.substring(0, 16);
|
||||
System.out.println("substring:"+substring);
|
||||
|
||||
@GetMapping("/getToday")
|
||||
public AjaxResult getToday(){
|
||||
return AjaxResult.success(xhpcHistoryOrderService.getToday());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -137,4 +137,11 @@ public interface XhpcHistoryOrderMapper {
|
||||
|
||||
//获取跨天最后一帧数据
|
||||
Map<String, Object> getXhpcRealTimeOrderTwentyFour(@Param("chargingOrderId")Long chargingOrderId,@Param("time")String time);
|
||||
|
||||
//流量方统计
|
||||
int getToday(@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("time")String time,@Param("tenantId")String tenantId);
|
||||
|
||||
//成都监管平台未推送订单量
|
||||
int getChengDuShiToday();
|
||||
|
||||
}
|
||||
|
||||
@ -134,4 +134,8 @@ public interface IXhpcHistoryOrderService {
|
||||
* 获取登陆用户信息
|
||||
*/
|
||||
Map<String, Object> getLandUser(Long userId);
|
||||
|
||||
//最近一个月推送情况
|
||||
List<Map<String, Object>> getToday();
|
||||
|
||||
}
|
||||
|
||||
@ -534,6 +534,54 @@ public class XhpcHistoryOrderServiceImpl extends BaseService implements IXhpcHis
|
||||
return xhpcHistoryOrderMapper.getLandUser(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getToday() {
|
||||
|
||||
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
Long logUserId = loginUser.getUserid();
|
||||
SysUser sysUser = loginUser.getSysUser();
|
||||
Long sysUserId = sysUser.getUserId();
|
||||
Date date = new Date();
|
||||
Date beginOfDay = DateUtil.beginOfDay(date);
|
||||
String time = DateUtil.formatDateTime(DateUtil.offsetDay(beginOfDay, -30));
|
||||
String tenantId = loginUser.getTenantId();
|
||||
|
||||
int internetNumber =0;
|
||||
if(tenantId !=null && !"".equals(tenantId)){
|
||||
if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){
|
||||
//运维管理人员
|
||||
internetNumber= xhpcHistoryOrderMapper.getToday(3,logUserId,time,tenantId);
|
||||
|
||||
}else{
|
||||
if(sysUser.getUserId() !=UserTypeUtil.USER_ID){
|
||||
Long logOperatorId = sysUser.getOperatorId();
|
||||
if ("01".equals(sysUser.getUserType())) {
|
||||
internetNumber= xhpcHistoryOrderMapper.getToday(1,logUserId,time,tenantId);
|
||||
//运营商看自己的场站
|
||||
}else{
|
||||
//查询赋值的场站
|
||||
internetNumber= xhpcHistoryOrderMapper.getToday(2,logUserId,time,tenantId);
|
||||
}
|
||||
}else{
|
||||
//全部桩
|
||||
internetNumber= xhpcHistoryOrderMapper.getToday(0,logUserId,time,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
int chengDuShiNUmber = xhpcHistoryOrderMapper.getChengDuShiToday();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
Map<String, Object> map =new HashMap<>();
|
||||
map.put("name","流量方未推送订单量");
|
||||
map.put("value",internetNumber);
|
||||
list.add(map);
|
||||
Map<String, Object> map1 =new HashMap<>();
|
||||
map1.put("name","成都监管平台未推送订单量");
|
||||
map1.put("value",chengDuShiNUmber);
|
||||
list.add(map1);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史信息费率时段
|
||||
*/
|
||||
@ -603,12 +651,6 @@ public class XhpcHistoryOrderServiceImpl extends BaseService implements IXhpcHis
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Map<String, Object> getBigDecimal(String totalPrice, BigDecimal powerPriceTotal, BigDecimal servicePriceTotal, XhpcChargeOrder chargeOrder, Long rateModelId, Date startTime2, Date updateTime2, BigDecimal chargingDegree, List<Map<String, Object>> list) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
@ -1624,4 +1624,30 @@
|
||||
from xhpc_real_time_order where create_time <= #{time} and charging_order_id=#{chargingOrderId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getToday" resultType="int">
|
||||
select count(history_order_id) number
|
||||
from xhpc_history_order
|
||||
where source =1 and create_time >= #{time}
|
||||
<if test="tenantId !=null and '' !=tenantId">
|
||||
and tenant_id=#{tenantId}
|
||||
</if>
|
||||
<if test="status==1">
|
||||
and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId})
|
||||
</if>
|
||||
<if test="status==2">
|
||||
and charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId})
|
||||
</if>
|
||||
<if test="status==3">
|
||||
and find_in_set (charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId}))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getChengDuShiToday" resultType="int">
|
||||
select
|
||||
count(history_order_id) number
|
||||
from xhpc_history_order
|
||||
where history_order_id> (select last_push_order from et_auth_sec_token where id=2)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user