mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 后管设置桩对应第三方平台编号页面
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 第三方平台对应sn编号相关DTO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/3/11 14:24:06
|
||||
*/
|
||||
@Data
|
||||
public class ThirdPartySnRelationDTO {
|
||||
// 桩编号
|
||||
private String pileSn;
|
||||
|
||||
// 第三方平台类型
|
||||
private String thirdPartyType;
|
||||
|
||||
// 第三方平台对应的sn
|
||||
private String thirdPartySn;
|
||||
}
|
||||
@@ -3,6 +3,10 @@ package com.jsowell.pile.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.ThirdpartySnRelation;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.ThirdPartySnRelationDTO;
|
||||
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -60,4 +64,18 @@ public interface ThirdpartySnRelationMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySnRelationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询第三方平台桩编号对应的列表
|
||||
* @param queryPileDTO
|
||||
* @return
|
||||
*/
|
||||
List<ThirdPartySnRelationVO> getRelationVOList(@Param("dto") QueryPileDTO queryPileDTO);
|
||||
|
||||
/**
|
||||
* 修改第三方平台对应编号
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int updateThirdPartySnRelation(@Param("dto") ThirdPartySnRelationDTO dto);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.jsowell.pile.service;
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.ThirdpartySnRelation;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.ThirdPartySnRelationDTO;
|
||||
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
|
||||
|
||||
/**
|
||||
* 万车充--第三方平台桩编号对应关系Service接口
|
||||
@@ -58,4 +61,18 @@ public interface IThirdpartySnRelationService {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySnRelationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询第三方平台桩编号对应的列表
|
||||
* @param queryPileDTO
|
||||
* @return
|
||||
*/
|
||||
List<ThirdPartySnRelationVO> getRelationVOList(QueryPileDTO queryPileDTO);
|
||||
|
||||
/**
|
||||
* 修改第三方平台对应编号
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int updateThirdPartySnRelation(ThirdPartySnRelationDTO dto);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.ThirdPartySnRelationDTO;
|
||||
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.ThirdpartySnRelationMapper;
|
||||
@@ -87,4 +91,31 @@ public class ThirdpartySnRelationServiceImpl implements IThirdpartySnRelationSer
|
||||
public int deleteThirdpartySnRelationById(Long id) {
|
||||
return thirdpartySnRelationMapper.deleteThirdpartySnRelationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询第三方平台桩编号对应的列表
|
||||
* @param queryPileDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ThirdPartySnRelationVO> getRelationVOList(QueryPileDTO queryPileDTO) {
|
||||
List<ThirdPartySnRelationVO> list = thirdpartySnRelationMapper.getRelationVOList(queryPileDTO);
|
||||
for (ThirdPartySnRelationVO thirdPartySnRelationVO : list) {
|
||||
// 将第三方平台类型中文名称查询出来
|
||||
String thirdPartyType = thirdPartySnRelationVO.getThirdPartyType();
|
||||
String label = ThirdPlatformTypeEnum.getLabelByCode(thirdPartyType);
|
||||
thirdPartySnRelationVO.setThirdPartyName(label);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改第三方平台对应编号
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateThirdPartySnRelation(ThirdPartySnRelationDTO dto) {
|
||||
return thirdpartySnRelationMapper.updateThirdPartySnRelation(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 第三方平台桩编号对应VO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/3/11 10:33:51
|
||||
*/
|
||||
@Data
|
||||
public class ThirdPartySnRelationVO {
|
||||
/**
|
||||
* 桩编号
|
||||
*/
|
||||
private String pileSn;
|
||||
|
||||
// 第三方平台类型
|
||||
private String thirdPartyType;
|
||||
|
||||
// 第三方平台名称
|
||||
private String thirdPartyName;
|
||||
|
||||
// 第三方平台对应的sn
|
||||
private String thirdPartySn;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user