mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-27 06:25:13 +08:00
新增 南瑞相关接口
This commit is contained in:
@@ -6,7 +6,9 @@ import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.nanrui.NROrderInfo;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||
@@ -353,4 +355,18 @@ public interface IOrderBasicInfoService {
|
||||
* @return
|
||||
*/
|
||||
int updateMerchantByStationId(Long stationId, String newMerchantId);
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
NROrderInfo getNROrderInfoByOrderCode(String orderCode);
|
||||
|
||||
/**
|
||||
* 通过充电结束时间批量查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<NROrderInfo> getNROrderInfos(NRQueryOrderDTO dto);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,9 @@ import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.common.util.id.SnowflakeIdWorker;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.nanrui.NROrderInfo;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||
@@ -165,6 +167,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
@Autowired
|
||||
private ClearingBillInfoService clearingBillInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileMsgRecordService pileMsgRecordService;
|
||||
|
||||
/**
|
||||
* 条件查询订单基本信息
|
||||
*
|
||||
@@ -989,6 +994,39 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
return orderBasicInfoMapper.updateMerchantByStationId(stationId, newMerchantId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public NROrderInfo getNROrderInfoByOrderCode(String orderCode) {
|
||||
NRQueryOrderDTO dto = new NRQueryOrderDTO();
|
||||
dto.setOrderCode(orderCode);
|
||||
List<NROrderInfo> nrOrderInfos = orderBasicInfoMapper.getNROrderInfoByOrderCode(dto);
|
||||
if (CollectionUtils.isEmpty(nrOrderInfos)) {
|
||||
return null;
|
||||
}
|
||||
// 此方法仅通过订单编号查,因此只有一条数据
|
||||
NROrderInfo nrOrderInfo = nrOrderInfos.get(0);
|
||||
// 将组织机构代码截取后九位
|
||||
String organizationCode = nrOrderInfo.getOperatorId();
|
||||
String operatorId = StringUtils.substring(organizationCode, organizationCode.length() - 9);
|
||||
nrOrderInfo.setOperatorId(operatorId);
|
||||
nrOrderInfo.setUserChargeType(1);
|
||||
// TODO 获取电表总起、止值
|
||||
// pileMsgRecordService.getPileFeedList()
|
||||
|
||||
nrOrderInfo.setMeterValueStart(BigDecimal.ZERO);
|
||||
nrOrderInfo.setMeterValueEnd(BigDecimal.ZERO);
|
||||
return nrOrderInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NROrderInfo> getNROrderInfos(NRQueryOrderDTO dto) {
|
||||
return orderBasicInfoMapper.getNROrderInfoByOrderCode(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡状态解锁
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user