|
|
|
@ -3,9 +3,14 @@ package com.glxp.api.service.sync;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.alibaba.fastjson.TypeReference;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.constant.SocketMsgType;
|
|
|
|
|
import com.glxp.api.dao.inout.IoOrderDao;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
|
import com.glxp.api.entity.sync.SocketMsgEntity;
|
|
|
|
|
import com.glxp.api.http.sync.SpGetHttpClient;
|
|
|
|
|
import com.glxp.api.service.inout.IoOrderService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -17,6 +22,8 @@ public class SocketMsgService {
|
|
|
|
|
|
|
|
|
|
@Value("${SPMS_WEBSOCKET_TOKEN}")
|
|
|
|
|
String token;
|
|
|
|
|
@Resource
|
|
|
|
|
SpGetHttpClient spGetHttpClient;
|
|
|
|
|
|
|
|
|
|
@Async
|
|
|
|
|
public void dealNoticeMsg(SocketMsgEntity socketMsgEntity) {
|
|
|
|
@ -33,8 +40,19 @@ public class SocketMsgService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
IoOrderService orderService;
|
|
|
|
|
|
|
|
|
|
//发票确认
|
|
|
|
|
public void invoiceConfirm(SocketMsgEntity socketMsgEntity) {
|
|
|
|
|
|
|
|
|
|
String billNo = socketMsgEntity.getContent();
|
|
|
|
|
BaseResponse<IoOrderEntity> baseResponse = spGetHttpClient.getOrderByBillNo(billNo);
|
|
|
|
|
if (baseResponse != null && baseResponse.getCode() == 20000) {
|
|
|
|
|
IoOrderEntity orderEntity = baseResponse.getData();
|
|
|
|
|
IoOrderEntity updateEntity = new IoOrderEntity();
|
|
|
|
|
updateEntity.setBillNo(orderEntity.getBillNo());
|
|
|
|
|
updateEntity.setCheckStatus(orderEntity.getCheckStatus());
|
|
|
|
|
orderService.updateByBillNo(updateEntity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|