mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-15 07:18:31 +08:00
新增 后管添加站点互联互通配置
This commit is contained in:
@@ -11,9 +11,11 @@ import com.jsowell.common.exception.BusinessException;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.common.util.poi.ExcelUtil;
|
import com.jsowell.common.util.poi.ExcelUtil;
|
||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
|
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
import com.jsowell.pile.service.IPileStationInfoService;
|
||||||
|
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -38,6 +40,9 @@ public class PileStationInfoController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileService pileService;
|
private PileService pileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IThirdPartySettingInfoService thirdPartySettingInfoService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充电站信息列表NEW
|
* 查询充电站信息列表NEW
|
||||||
@@ -166,4 +171,37 @@ public class PileStationInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
return AjaxResult.success(pileService.updateStationQRCodePrefix(dto));
|
return AjaxResult.success(pileService.updateStationQRCodePrefix(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点互联互通配置
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||||
|
@GetMapping("/getSettingByStationId/{stationId}")
|
||||||
|
public AjaxResult getSettingByStationId(@PathVariable("stationId") Long id) {
|
||||||
|
return AjaxResult.success(thirdPartySettingInfoService.getInfoByStationId(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点互联互通配置信息
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
||||||
|
@PostMapping("/updateSettingByStationId")
|
||||||
|
public AjaxResult updateSettingByStationId(ThirdPartySettingInfo info) {
|
||||||
|
return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点互联互通配置信息
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('pile:station:add')")
|
||||||
|
// @PostMapping("/insertSettingInfo")
|
||||||
|
// public AjaxResult insertSettingInfo(ThirdPartySettingInfo info) {
|
||||||
|
// return AjaxResult.success(thirdPartySettingInfoService.insertThirdPartySettingInfo(info));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,4 +66,11 @@ public interface IThirdPartySettingInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
|
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点互联互通配置
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateStationSettingInfo(ThirdPartySettingInfo info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,4 +98,22 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
|
|||||||
public ThirdPartySettingInfo getInfoByStationId(Long stationId) {
|
public ThirdPartySettingInfo getInfoByStationId(Long stationId) {
|
||||||
return thirdPartySettingInfoMapper.getInfoByStationId(stationId);
|
return thirdPartySettingInfoMapper.getInfoByStationId(stationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点互联互通配置
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateStationSettingInfo(ThirdPartySettingInfo info) {
|
||||||
|
Long stationId = info.getStationId();
|
||||||
|
ThirdPartySettingInfo infoByStationId = getInfoByStationId(stationId);
|
||||||
|
if (infoByStationId == null) {
|
||||||
|
// 新增
|
||||||
|
return insertThirdPartySettingInfo(info);
|
||||||
|
}else {
|
||||||
|
// 修改
|
||||||
|
return updateThirdPartySettingInfo(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,3 +81,32 @@ export function updateStationQRCodePrefix(data) {
|
|||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点互联互通配置
|
||||||
|
* @param id
|
||||||
|
* @returns {AxiosPromise}
|
||||||
|
*/
|
||||||
|
export function getSettingByStationId(id) {
|
||||||
|
return request({
|
||||||
|
url: "/pile/station/getSettingByStationId/" + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改站点互联互通配置
|
||||||
|
export function updateSettingByStationId(data) {
|
||||||
|
return request({
|
||||||
|
url: "/pile/station/updateSettingByStationId",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// export function insertSettingInfo(data) {
|
||||||
|
// return request({
|
||||||
|
// url: "/pile/station/insertSettingInfo",
|
||||||
|
// method: "post",
|
||||||
|
// data: data,
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user