|
|
@@ -8,10 +8,8 @@ import com.zsElectric.boot.business.model.dto.AddPolicyFeeDTO;
|
|
|
import com.zsElectric.boot.business.model.entity.PolicyFee;
|
|
|
import com.zsElectric.boot.business.model.vo.TimePeriodPriceVO;
|
|
|
import com.zsElectric.boot.business.service.PolicyFeeService;
|
|
|
-import com.zsElectric.boot.charging.entity.ThirdPartyEquipmentInfo;
|
|
|
-import com.zsElectric.boot.charging.entity.ThirdPartyEquipmentPricePolicy;
|
|
|
-import com.zsElectric.boot.charging.entity.ThirdPartyPolicyInfo;
|
|
|
-import com.zsElectric.boot.charging.entity.ThirdPartyStationInfo;
|
|
|
+import com.zsElectric.boot.charging.entity.*;
|
|
|
+import com.zsElectric.boot.charging.mapper.ThirdPartyConnectorInfoMapper;
|
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyEquipmentPricePolicyMapper;
|
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyPolicyInfoMapper;
|
|
|
import com.zsElectric.boot.system.model.entity.DictItem;
|
|
|
@@ -49,8 +47,6 @@ public class PolicyFeeServiceImpl implements PolicyFeeService {
|
|
|
|
|
|
private final PolicyFeeMapper policyFeeMapper;
|
|
|
|
|
|
- private final ThirdPartyEquipmentInfoMapper thirdPartyEquipmentInfoMapper;
|
|
|
-
|
|
|
private final ThirdPartyPolicyInfoMapper thirdPartyPolicyInfoMapper;
|
|
|
|
|
|
private final ThirdPartyEquipmentPricePolicyMapper thirdPartyEquipmentPricePolicyMapper;
|
|
|
@@ -59,22 +55,16 @@ public class PolicyFeeServiceImpl implements PolicyFeeService {
|
|
|
|
|
|
private final ThirdPartyStationInfoMapper stationInfoMapper;
|
|
|
|
|
|
+ private final ThirdPartyConnectorInfoMapper thirdPartyConnectorInfoMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public List<TimePeriodPriceVO> getPolicyFee(long stationId, int salesType, Long firmId, Long thirdPartyId) {
|
|
|
List<TimePeriodPriceVO> timePeriodPriceVOS = new ArrayList<>();
|
|
|
-
|
|
|
- // 查询设备信息
|
|
|
- ThirdPartyEquipmentInfo thirdPartyEquipmentInfo = thirdPartyEquipmentInfoMapper.selectOne(Wrappers.<ThirdPartyEquipmentInfo>lambdaQuery()
|
|
|
- .eq(ThirdPartyEquipmentInfo::getStationId, stationId)
|
|
|
- .eq(ThirdPartyEquipmentInfo::getIsDeleted, 0)
|
|
|
- .last("limit 1"));
|
|
|
- if (thirdPartyEquipmentInfo == null) {
|
|
|
- return timePeriodPriceVOS;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
// 查询价格策略
|
|
|
ThirdPartyEquipmentPricePolicy pricePolicy = thirdPartyEquipmentPricePolicyMapper.selectOne(Wrappers.<ThirdPartyEquipmentPricePolicy>lambdaQuery()
|
|
|
- .eq(ThirdPartyEquipmentPricePolicy::getConnectorId, thirdPartyEquipmentInfo.getEquipmentId())
|
|
|
+ .eq(ThirdPartyEquipmentPricePolicy::getConnectorId, thirdPartyConnectorInfoMapper.selectOne(Wrappers.<ThirdPartyConnectorInfo>lambdaQuery()
|
|
|
+ .eq(ThirdPartyConnectorInfo::getStationId,stationInfoMapper.selectById(stationId).getStationId()).last("limit 1")).getConnectorId())
|
|
|
.eq(ThirdPartyEquipmentPricePolicy::getIsDeleted, 0)
|
|
|
.last("limit 1"));
|
|
|
if (pricePolicy == null) {
|
|
|
@@ -140,8 +130,8 @@ public class PolicyFeeServiceImpl implements PolicyFeeService {
|
|
|
.add(policyInfo.getServicePrice())
|
|
|
.add(policyFee.getOpFee())
|
|
|
.add(valueAddedFees));
|
|
|
- timePeriodPriceVOS.add(timePeriodPriceVO);
|
|
|
}
|
|
|
+ timePeriodPriceVOS.add(timePeriodPriceVO);
|
|
|
}
|
|
|
|
|
|
return timePeriodPriceVOS;
|