增加运维统计-->未推送订单统计
This commit is contained in:
parent
22c319eee8
commit
a561055df8
@ -24,7 +24,7 @@ public class XhpcWorkHistoryOrderController extends BaseController {
|
||||
XhpcWorkHistoryOrderService xhpcWorkHistoryOrderService;
|
||||
|
||||
/**
|
||||
* 历史订单
|
||||
* 历史异常订单
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getListPage")
|
||||
|
||||
@ -1138,11 +1138,32 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getToday")
|
||||
public AjaxResult getToday(){
|
||||
return AjaxResult.success(xhpcHistoryOrderService.getToday());
|
||||
}
|
||||
|
||||
@GetMapping("/getConfirmResultPage")
|
||||
public TableDataInfo getConfirmResultPage(Integer status) {
|
||||
List<Map<String, Object>> listPage = xhpcHistoryOrderService.getConfirmResultPage(status);
|
||||
return getDataTable(listPage);
|
||||
}
|
||||
|
||||
//修改有争议的订单
|
||||
@GetMapping("/updateOrderConfirmResult")
|
||||
public AjaxResult updateOrderConfirmResult(Long historyOrderId) {
|
||||
return xhpcHistoryOrderService.updateOrderConfirmResult(historyOrderId);
|
||||
}
|
||||
|
||||
//修改流量方订单状态,系统自动推送
|
||||
@GetMapping("/updateOrderInternetPush")
|
||||
public AjaxResult updateOrderInternetPush(Long historyOrderId) {
|
||||
return xhpcHistoryOrderService.updateOrderInternetPush(historyOrderId);
|
||||
}
|
||||
|
||||
//修改成都市监管平台订单状态,系统自动推送
|
||||
@GetMapping("/updateChengDuPush")
|
||||
public AjaxResult updateChengDuPush(Long historyOrderId) {
|
||||
return xhpcHistoryOrderService.updateChengDuPush(historyOrderId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,4 +144,11 @@ public interface XhpcHistoryOrderMapper {
|
||||
//成都监管平台未推送订单量
|
||||
int getChengDuShiToday();
|
||||
|
||||
List<Map<String,Object>> getConfirmResultPage(@Param("status")Integer status,@Param("number") Integer number,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId);
|
||||
|
||||
int updateOrderConfirmResult(Long historyOrderId);
|
||||
|
||||
int updateOrderInternetPush(Long historyOrderId);
|
||||
|
||||
int updateChengDuPush(Long historyOrderId);
|
||||
}
|
||||
|
||||
@ -138,4 +138,11 @@ public interface IXhpcHistoryOrderService {
|
||||
//最近一个月推送情况
|
||||
List<Map<String, Object>> getToday();
|
||||
|
||||
List<Map<String, Object>> getConfirmResultPage(Integer status);
|
||||
|
||||
AjaxResult updateOrderConfirmResult(Long historyOrderId);
|
||||
|
||||
AjaxResult updateOrderInternetPush(Long historyOrderId);
|
||||
|
||||
AjaxResult updateChengDuPush(Long historyOrderId);
|
||||
}
|
||||
|
||||
@ -582,6 +582,70 @@ public class XhpcHistoryOrderServiceImpl extends BaseService implements IXhpcHis
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getConfirmResultPage(Integer status) {
|
||||
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
Long logUserId = loginUser.getUserid();
|
||||
SysUser sysUser = loginUser.getSysUser();
|
||||
String tenantId = loginUser.getTenantId();
|
||||
|
||||
int internetNumber =0;
|
||||
if(tenantId !=null && !"".equals(tenantId)){
|
||||
if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){
|
||||
//运维管理人员
|
||||
startPage();
|
||||
list= xhpcHistoryOrderMapper.getConfirmResultPage(status,3,logUserId,tenantId);
|
||||
|
||||
}else{
|
||||
if(sysUser.getUserId() !=UserTypeUtil.USER_ID){
|
||||
Long logOperatorId = sysUser.getOperatorId();
|
||||
startPage();
|
||||
if ("01".equals(sysUser.getUserType())) {
|
||||
list= xhpcHistoryOrderMapper.getConfirmResultPage(status,1,logOperatorId,tenantId);
|
||||
//运营商看自己的场站
|
||||
}else{
|
||||
//查询赋值的场站
|
||||
list= xhpcHistoryOrderMapper.getConfirmResultPage(status,2,logUserId,tenantId);
|
||||
}
|
||||
}else{
|
||||
startPage();
|
||||
//全部桩
|
||||
list= xhpcHistoryOrderMapper.getConfirmResultPage(status,0,logUserId,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateOrderConfirmResult(Long historyOrderId) {
|
||||
int i = xhpcHistoryOrderMapper.updateOrderConfirmResult(historyOrderId);
|
||||
if(i>0){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error("修改推送订单失败请联系管理员");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateOrderInternetPush(Long historyOrderId) {
|
||||
int i = xhpcHistoryOrderMapper.updateOrderInternetPush(historyOrderId);
|
||||
if(i>0){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error("修改推送订单失败请联系管理员");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateChengDuPush(Long historyOrderId) {
|
||||
int i = xhpcHistoryOrderMapper.updateChengDuPush(historyOrderId);
|
||||
if(i>0){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error("修改推送订单失败请联系管理员");
|
||||
}
|
||||
/**
|
||||
* 历史信息费率时段
|
||||
*/
|
||||
|
||||
@ -1483,7 +1483,10 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
try {
|
||||
int startSoc = Integer.parseInt(xhpcHistoryOrder.getStartSoc());
|
||||
int endSoc = Integer.parseInt(xhpcHistoryOrder.getEndSoc());
|
||||
if((!"40".equals(xhpcHistoryOrder.getStopReasonEvcs()) &&!"41".equals(xhpcHistoryOrder.getStopReasonEvcs())&&!"6E".equals(xhpcHistoryOrder.getStopReasonEvcs()))|| (startSoc>95 || endSoc>95)){
|
||||
String stopReason = xhpcHistoryOrder.getStopReasonEvcs();
|
||||
if(("40".equals(stopReason) || "41".equals(stopReason)||"6E".equals(stopReason)||"42".equals(stopReason)||"43".equals(stopReason)||"44".equals(stopReason)||"45".equals(stopReason)||"4E".equals(stopReason))){
|
||||
|
||||
}else{
|
||||
XhpcWorkHistoryOrderDto xhpcWorkHistoryOrderDto =new XhpcWorkHistoryOrderDto();
|
||||
BeanUtils.copyProperties(xhpcHistoryOrder,xhpcWorkHistoryOrderDto);
|
||||
String nameByCode = StopReasonEnum.getNameByCode(xhpcHistoryOrder.getStopReasonEvcs());
|
||||
|
||||
@ -1650,4 +1650,59 @@
|
||||
where history_order_id> (select last_push_order from et_auth_sec_token where id=2)
|
||||
</select>
|
||||
|
||||
<select id="getConfirmResultPage" resultType="map">
|
||||
SELECT
|
||||
xho.history_order_id as historyOrderId,
|
||||
xcs.name as chargingStationName,
|
||||
xho.serial_number as serialNumber,
|
||||
xho.confirm_Result as status,
|
||||
xho.start_time as startTime,
|
||||
xho.end_time as endTime,
|
||||
xho.source as source,
|
||||
xho.internet_serial_number as internetSerialNumber,
|
||||
case when xho.charging_mode="1" then "快电"
|
||||
when xho.charging_mode="2" then "恒大"
|
||||
when xho.charging_mode="3" then "新电途"
|
||||
when xho.charging_mode="4" then "小桔"
|
||||
when xho.charging_mode="微信" then "微信"
|
||||
when xho.charging_mode="支付宝" then "支付宝"
|
||||
else "刷卡"
|
||||
end chargingModeName
|
||||
FROM xhpc_history_order xho
|
||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||
<if test="status==null">
|
||||
where (xho.confirm_Result !=0
|
||||
or xho.history_order_id >(select last_push_order from et_auth_sec_token where id=2))
|
||||
</if>
|
||||
<if test="status==0">
|
||||
where (xho.history_order_id >(select last_push_order from et_auth_sec_token where id=2) or xho.source !=1)
|
||||
</if>
|
||||
<if test="status==1">
|
||||
where xho.confirm_Result =-1 and xho.source =1
|
||||
</if>
|
||||
<if test="status==2">
|
||||
where xho.confirm_Result >=1 and xho.source =1
|
||||
</if>
|
||||
<if test="number==1">
|
||||
and xho.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId})
|
||||
</if>
|
||||
<if test="number==2">
|
||||
and xho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId})
|
||||
</if>
|
||||
<if test="number==3">
|
||||
and find_in_set (xho.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId}))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateOrderConfirmResult">
|
||||
UPDATE xhpc_history_order set confirm_Result =0 where history_order_id=#{historyOrderId}
|
||||
</update>
|
||||
|
||||
<update id="updateOrderInternetPush">
|
||||
UPDATE xhpc_history_order set confirm_Result =-1 where history_order_id=#{historyOrderId}
|
||||
</update>
|
||||
|
||||
<update id="updateChengDuPush">
|
||||
UPDATE et_auth_sec_token set last_push_order =#{historyOrderId} where id=2
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user