mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-28 06:55:09 +08:00
commit
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.enums.uniapp.BalanceChangesEnum;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IMemberTransactionRecordService;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
import com.jsowell.pile.vo.web.MemberTransactionVO;
|
||||
import com.jsowell.pile.vo.web.UpdateMemberBalanceDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员基础信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-10-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/info")
|
||||
public class MemberBasicInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IMemberBasicInfoService memberBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private IMemberTransactionRecordService memberTransactionRecordService;
|
||||
|
||||
/**
|
||||
* 查询会员基础信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:info:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MemberBasicInfo memberBasicInfo) {
|
||||
startPage();
|
||||
List<MemberVO> list = memberBasicInfoService.selectMemberList(memberBasicInfo.getMobileNumber(), memberBasicInfo.getNickName());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员基础信息列表
|
||||
*/
|
||||
/*@PreAuthorize("@ss.hasPermi('member:info:export')")
|
||||
@Log(title = "会员基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MemberBasicInfo memberBasicInfo) {
|
||||
List<MemberBasicInfo> list = memberBasicInfoService.selectMemberBasicInfoList(memberBasicInfo);
|
||||
ExcelUtil<MemberBasicInfo> util = new ExcelUtil<MemberBasicInfo>(MemberBasicInfo.class);
|
||||
util.exportExcel(response, list, "会员基础信息数据");
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 获取会员基础信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:info:query')")
|
||||
@GetMapping(value = "/{memberId}")
|
||||
public AjaxResult getInfo(@PathVariable("memberId") String memberId) {
|
||||
return AjaxResult.success(memberBasicInfoService.queryMemberInfoByMemberId(memberId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('member:info:query')")
|
||||
@GetMapping(value = "/getMemberPersonPileInfo/{memberId}")
|
||||
public AjaxResult getMemberPersonPileInfo(@PathVariable("memberId") String memberId){
|
||||
return AjaxResult.success(memberBasicInfoService.getMemberPersonPileInfo(memberId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:info:add')")
|
||||
@Log(title = "会员基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MemberBasicInfo memberBasicInfo) {
|
||||
return toAjax(memberBasicInfoService.insertMemberBasicInfo(memberBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:info:edit')")
|
||||
@Log(title = "会员基础信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MemberBasicInfo memberBasicInfo) {
|
||||
return toAjax(memberBasicInfoService.updateMemberBasicInfo(memberBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:info:remove')")
|
||||
@Log(title = "会员基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids) {
|
||||
return toAjax(memberBasicInfoService.deleteMemberBasicInfoByIds(Lists.newArrayList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值/扣款余额
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:balance:update')")
|
||||
@Log(title = "会员充值/扣款余额", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateGiftBalance")
|
||||
public AjaxResult updateGiftBalance(@RequestBody UpdateMemberBalanceDTO dto) {
|
||||
logger.info("后管充值/扣款余额 param:{}", dto.toString());
|
||||
// 判断入参
|
||||
return toAjax(memberBasicInfoService.updateMemberBalance(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员钱包流水
|
||||
*/
|
||||
@PostMapping("/queryMemberBalanceChanges")
|
||||
public TableDataInfo queryMemberBalanceChanges(@RequestBody UniAppQueryMemberBalanceDTO dto) {
|
||||
String type = dto.getType();
|
||||
if (!StringUtils.equals("1", type) && !StringUtils.equals("2", type)) {
|
||||
type = "";
|
||||
}
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<MemberWalletLogVO> list = memberBasicInfoService.getMemberBalanceChanges(dto.getMemberId(), type);
|
||||
for (MemberWalletLogVO walletLogVO : list) {
|
||||
String subType = walletLogVO.getSubType();
|
||||
String subTypeValue = BalanceChangesEnum.getValueByCode(subType);
|
||||
if (StringUtils.isNotBlank(subTypeValue)) {
|
||||
walletLogVO.setSubType(subTypeValue);
|
||||
}
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员交易流水
|
||||
* IMemberTransactionRecordService
|
||||
*/
|
||||
@PostMapping("/selectMemberTransactionRecordList")
|
||||
public TableDataInfo selectMemberTransactionRecordList(@RequestBody UniAppQueryMemberBalanceDTO dto) {
|
||||
startPage();
|
||||
List<MemberTransactionVO> list = memberTransactionRecordService.selectMemberTransactionRecordList(dto.getMemberId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.OrderAbnormalRecord;
|
||||
import com.jsowell.pile.service.IOrderAbnormalRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单异常记录Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-02-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order/abnormalRecord")
|
||||
public class OrderAbnormalRecordController extends BaseController {
|
||||
@Autowired
|
||||
private IOrderAbnormalRecordService orderAbnormalRecordService;
|
||||
|
||||
/**
|
||||
* 查询订单异常记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderAbnormalRecord orderAbnormalRecord) {
|
||||
startPage();
|
||||
List<OrderAbnormalRecord> list = orderAbnormalRecordService.selectOrderAbnormalRecordList(orderAbnormalRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单异常记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:export')")
|
||||
@Log(title = "订单异常记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderAbnormalRecord orderAbnormalRecord) {
|
||||
List<OrderAbnormalRecord> list = orderAbnormalRecordService.selectOrderAbnormalRecordList(orderAbnormalRecord);
|
||||
ExcelUtil<OrderAbnormalRecord> util = new ExcelUtil<OrderAbnormalRecord>(OrderAbnormalRecord.class);
|
||||
util.exportExcel(response, list, "订单异常记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单异常记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id) {
|
||||
return AjaxResult.success(orderAbnormalRecordService.selectOrderAbnormalRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单异常记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:add')")
|
||||
@Log(title = "订单异常记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OrderAbnormalRecord orderAbnormalRecord) {
|
||||
return toAjax(orderAbnormalRecordService.insertOrderAbnormalRecord(orderAbnormalRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单异常记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:edit')")
|
||||
@Log(title = "订单异常记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OrderAbnormalRecord orderAbnormalRecord) {
|
||||
return toAjax(orderAbnormalRecordService.updateOrderAbnormalRecord(orderAbnormalRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单异常记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:abnormalRecord:remove')")
|
||||
@Log(title = "订单异常记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids) {
|
||||
return toAjax(orderAbnormalRecordService.deleteOrderAbnormalRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.vo.web.OrderListVO;
|
||||
import com.jsowell.service.OrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-09-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order")
|
||||
public class OrderBasicInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:list')")
|
||||
@GetMapping("/order/list")
|
||||
public TableDataInfo list(QueryOrderDTO orderBasicInfo) {
|
||||
startPage();
|
||||
List<OrderListVO> list = orderBasicInfoService.selectOrderBasicInfoList(orderBasicInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数查询用电度数和消费金额
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:list')")
|
||||
@GetMapping("/order/totalData")
|
||||
public AjaxResult getOrderTotalData(QueryOrderDTO orderBasicInfo) {
|
||||
return AjaxResult.success(orderBasicInfoService.getOrderTotalData(orderBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:export')")
|
||||
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/order/export")
|
||||
public void export(HttpServletResponse response, QueryOrderDTO orderBasicInfo) {
|
||||
List<OrderListVO> list = orderBasicInfoService.selectOrderBasicInfoList(orderBasicInfo);
|
||||
ExcelUtil<OrderListVO> util = new ExcelUtil<OrderListVO>(OrderListVO.class);
|
||||
util.exportExcel(response, list, "订单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
* http://localhost:8080/order/orderDetail/88000000000001012211161342359448
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:query')")
|
||||
@GetMapping(value = "/orderDetail/{orderCode}")
|
||||
public AjaxResult getInfo(@PathVariable("orderCode") String orderCode) {
|
||||
return AjaxResult.success(orderService.queryOrderDetailInfo(orderCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单 后管调用
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:edit')")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/order")
|
||||
public AjaxResult edit(@RequestBody OrderBasicInfo orderBasicInfo) {
|
||||
return toAjax(orderBasicInfoService.updateOrderBasicInfo(orderBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('order:order:remove')")
|
||||
@Log(title = "订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/order/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(orderBasicInfoService.deleteOrderBasicInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.dto.BatchCreatePileDTO;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
|
||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileMsgRecordService;
|
||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
||||
import com.jsowell.service.PileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备管理Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/basic")
|
||||
public class PileBasicInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private PileService pileService;
|
||||
|
||||
@Autowired
|
||||
private IPileMsgRecordService pileMsgRecordService;
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QueryPileDTO queryPileDTO) {
|
||||
// startPage(); // 在方法中分页
|
||||
List<PileDetailVO> list = pileBasicInfoService.queryPileInfos(queryPileDTO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:export')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileBasicInfo pileBasicInfo) {
|
||||
List<PileBasicInfo> list = pileBasicInfoService.selectPileBasicInfoList(pileBasicInfo);
|
||||
ExcelUtil<PileBasicInfo> util = new ExcelUtil<PileBasicInfo>(PileBasicInfo.class);
|
||||
util.exportExcel(response, list, "设备管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileBasicInfoService.selectPileBasicInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:add')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileBasicInfo pileBasicInfo) {
|
||||
return toAjax(pileBasicInfoService.insertPileBasicInfo(pileBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量生成充电桩
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:add')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/batchAdd")
|
||||
public AjaxResult batchAdd(@RequestBody BatchCreatePileDTO dto) {
|
||||
logger.info("批量生成充电桩 param:{}", JSONObject.toJSONString(dto));
|
||||
return toAjax(pileService.batchCreatePile(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:edit')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileBasicInfo pileBasicInfo) {
|
||||
return toAjax(pileBasicInfoService.updatePileBasicInfo(pileBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:basic:remove')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileBasicInfoService.deletePileBasicInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新充电桩
|
||||
* 运营商 站点
|
||||
*/
|
||||
@PostMapping("/batchUpdatePileList")
|
||||
public AjaxResult batchUpdatePileList( @RequestBody ReplaceMerchantStationDTO dto) {
|
||||
logger.info("批量更新充电桩 param:{}", JSONObject.toJSONString(dto));
|
||||
return toAjax(pileBasicInfoService.replaceMerchantStationByPileIds(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电桩详情
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getPileDetailById")
|
||||
public AjaxResult getPileDetailById(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
logger.info("查询充电桩详情 param:{}", JSONObject.toJSONString(queryPileDTO));
|
||||
if (StringUtils.isBlank(queryPileDTO.getPileId())) {
|
||||
return AjaxResult.error("充电桩id不能为空");
|
||||
}
|
||||
return AjaxResult.success(pileBasicInfoService.selectBasicInfoById(Long.valueOf(queryPileDTO.getPileId())));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电桩通讯日志
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getPileFeedList")
|
||||
public AjaxResult getPileFeedList(@RequestBody QueryPileDTO dto) {
|
||||
// logger.info("查询充电桩通信日志 param:{}", dto.getPileSn());
|
||||
if (StringUtils.isBlank(dto.getPileSn())) {
|
||||
return AjaxResult.error("充电桩Sn不能为空");
|
||||
}
|
||||
return AjaxResult.success(pileMsgRecordService.getPileFeedList(dto));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileBillingTemplate;
|
||||
import com.jsowell.pile.dto.CreateOrUpdateBillingTemplateDTO;
|
||||
import com.jsowell.pile.dto.ImportBillingTemplateDTO;
|
||||
import com.jsowell.pile.dto.PublishBillingTemplateDTO;
|
||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import com.jsowell.service.PileRemoteService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 计费模板Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-09-20
|
||||
*/
|
||||
@Api(value = "计费模板Controller", tags = { "计费模板" })
|
||||
@RestController
|
||||
@RequestMapping("/billing/template")
|
||||
public class PileBillingTemplateController extends BaseController {
|
||||
@Autowired
|
||||
private IPileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
@Autowired
|
||||
private PileRemoteService pileRemoteService;
|
||||
|
||||
/**
|
||||
* 查询计费模板列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileBillingTemplate pileBillingTemplate) {
|
||||
startPage();
|
||||
// 只查询公共的
|
||||
pileBillingTemplate.setPublicFlag(Constants.ONE);
|
||||
List<PileBillingTemplate> list = pileBillingTemplateService.selectPileBillingTemplateList(pileBillingTemplate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出计费模板列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:export')")
|
||||
@Log(title = "计费模板", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileBillingTemplate pileBillingTemplate) {
|
||||
List<PileBillingTemplate> list = pileBillingTemplateService.selectPileBillingTemplateList(pileBillingTemplate);
|
||||
ExcelUtil<PileBillingTemplate> util = new ExcelUtil<PileBillingTemplate>(PileBillingTemplate.class);
|
||||
util.exportExcel(response, list, "计费模板数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计费模板详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfoById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileBillingTemplateService.queryPileBillingTemplateById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计费模板
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:edit')")
|
||||
@Log(title = "计费模板", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileBillingTemplate pileBillingTemplate) {
|
||||
return toAjax(pileBillingTemplateService.updatePileBillingTemplate(pileBillingTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计费模板
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:remove')")
|
||||
@Log(title = "计费模板", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileBillingTemplateService.deletePileBillingTemplateByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增计费模板
|
||||
* http://localhost:8080/billing/template/createBillingTemplate
|
||||
*/
|
||||
@ApiOperation("新增计费模板")
|
||||
@PreAuthorize("@ss.hasPermi('billing:template:add')")
|
||||
@Log(title = "计费模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/createBillingTemplate")
|
||||
public AjaxResult createBillingTemplate(@RequestBody CreateOrUpdateBillingTemplateDTO dto) {
|
||||
logger.info("新增计费模板 param:{}", JSONObject.toJSONString(dto));
|
||||
pileBillingTemplateService.createBillingTemplate(dto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新计费模板 前端
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateBillingTemplate")
|
||||
public AjaxResult updateBillingTemplate(@RequestBody CreateOrUpdateBillingTemplateDTO dto) {
|
||||
logger.info("修改计费模板 param:{}", JSONObject.toJSONString(dto));
|
||||
pileBillingTemplateService.updateBillingTemplate(dto);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公共计费模板
|
||||
*/
|
||||
@GetMapping("/queryPublicBillingTemplateList")
|
||||
public TableDataInfo queryPublicBillingTemplateList() {
|
||||
List<BillingTemplateVO> list = pileBillingTemplateService.queryPublicBillingTemplateList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点导入计费模板接口
|
||||
* http://localhost:8080/billing/template/stationImportBillingTemplate
|
||||
*/
|
||||
@PostMapping("/stationImportBillingTemplate")
|
||||
public AjaxResult stationImportBillingTemplate(@RequestBody ImportBillingTemplateDTO dto) {
|
||||
logger.info("站点导入计费模板 param:{}", JSONObject.toJSONString(dto));
|
||||
return toAjax(pileBillingTemplateService.stationImportBillingTemplate(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点计费模板
|
||||
*/
|
||||
@GetMapping("/queryStationBillingTemplateList/{stationId}")
|
||||
public TableDataInfo queryStationBillingTemplateList(@PathVariable("stationId") String stationId) {
|
||||
logger.info("查询站点计费模板 param:{}", stationId);
|
||||
List<BillingTemplateVO> list = pileBillingTemplateService.queryStationBillingTemplateList(stationId);
|
||||
logger.info("查询站点计费模板 result:{}", JSONObject.toJSONString(list));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布计费模板
|
||||
*/
|
||||
@PostMapping("/publishBillingTemplate")
|
||||
public AjaxResult publishBillingTemplate(@RequestBody PublishBillingTemplateDTO dto) {
|
||||
return toAjax(pileRemoteService.publishBillingTemplate(dto));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileConnectorInfo;
|
||||
import com.jsowell.pile.dto.QueryConnectorDTO;
|
||||
import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电桩枪口信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/connector")
|
||||
public class PileConnectorInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
/**
|
||||
* 查询充电桩枪口信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:connector:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QueryConnectorDTO queryConnectorDTO) {
|
||||
startPage();
|
||||
List<PileConnectorInfoVO> list = pileConnectorInfoService.getConnectorInfoListByParams(queryConnectorDTO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出充电桩枪口信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:connector:export')")
|
||||
@Log(title = "充电桩枪口信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileConnectorInfo pileConnectorInfo) {
|
||||
List<PileConnectorInfo> list = pileConnectorInfoService.selectPileConnectorInfoList(pileConnectorInfo);
|
||||
ExcelUtil<PileConnectorInfo> util = new ExcelUtil<PileConnectorInfo>(PileConnectorInfo.class);
|
||||
util.exportExcel(response, list, "充电桩枪口信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过入参 查询接口列表
|
||||
* http://localhost:8080/pile/connector/getConnectorInfoListByParams?pileIds=1,2
|
||||
* 多id使用逗号拼接
|
||||
*/
|
||||
@PostMapping("/getConnectorInfoListByParams")
|
||||
public TableDataInfo getConnectorInfoListByParams(@RequestBody QueryConnectorListDTO dto) {
|
||||
logger.info("查询接口列表 param:{}", JSONObject.toJSONString(dto));
|
||||
List<PileConnectorInfoVO> list = pileConnectorInfoService.getConnectorInfoListByParams(dto);
|
||||
logger.info("查询接口列表 result:{}", JSONObject.toJSONString(list));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电桩枪口信息详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:connector:query')")
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") Integer id) {
|
||||
// return AjaxResult.success(pileConnectorInfoService.selectPileConnectorInfoById(id));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增充电桩枪口信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:connector:add')")
|
||||
// @Log(title = "充电桩枪口信息", businessType = BusinessType.INSERT)
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody PileConnectorInfo pileConnectorInfo) {
|
||||
// return toAjax(pileConnectorInfoService.insertPileConnectorInfo(pileConnectorInfo));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改充电桩枪口信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:connector:edit')")
|
||||
// @Log(title = "充电桩枪口信息", businessType = BusinessType.UPDATE)
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody PileConnectorInfo pileConnectorInfo) {
|
||||
// return toAjax(pileConnectorInfoService.updatePileConnectorInfo(pileConnectorInfo));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除充电桩枪口信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:connector:remove')")
|
||||
// @Log(title = "充电桩枪口信息", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable Integer[] ids) {
|
||||
// return toAjax(pileConnectorInfoService.deletePileConnectorInfoByIds(ids));
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileLicenceInfo;
|
||||
import com.jsowell.pile.service.IPileLicenceInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电桩证书信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/licence")
|
||||
public class PileLicenceInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPileLicenceInfoService pileLicenceInfoService;
|
||||
|
||||
/**
|
||||
* 查询充电桩证书信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileLicenceInfo pileLicenceInfo)
|
||||
{
|
||||
startPage();
|
||||
List<PileLicenceInfo> list = pileLicenceInfoService.selectPileLicenceInfoList(pileLicenceInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出充电桩证书信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:export')")
|
||||
@Log(title = "充电桩证书信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileLicenceInfo pileLicenceInfo)
|
||||
{
|
||||
List<PileLicenceInfo> list = pileLicenceInfoService.selectPileLicenceInfoList(pileLicenceInfo);
|
||||
ExcelUtil<PileLicenceInfo> util = new ExcelUtil<PileLicenceInfo>(PileLicenceInfo.class);
|
||||
util.exportExcel(response, list, "充电桩证书信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电桩证书信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(pileLicenceInfoService.selectPileLicenceInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩证书信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:add')")
|
||||
@Log(title = "充电桩证书信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileLicenceInfo pileLicenceInfo)
|
||||
{
|
||||
return toAjax(pileLicenceInfoService.insertPileLicenceInfo(pileLicenceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电桩证书信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:edit')")
|
||||
@Log(title = "充电桩证书信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileLicenceInfo pileLicenceInfo)
|
||||
{
|
||||
return toAjax(pileLicenceInfoService.updatePileLicenceInfo(pileLicenceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电桩证书信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:licence:remove')")
|
||||
@Log(title = "充电桩证书信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(pileLicenceInfoService.deletePileLicenceInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电桩运营商信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/merchant")
|
||||
public class PileMerchantInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
/**
|
||||
* 查询充电桩运营商信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileMerchantInfo pileMerchantInfo) {
|
||||
startPage();
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoList(pileMerchantInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运营商列表 不分页
|
||||
* @param pileMerchantInfo
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:list')")
|
||||
@GetMapping("/getMerchantList")
|
||||
public TableDataInfo getMerchantList(PileMerchantInfo pileMerchantInfo) {
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoList(pileMerchantInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出充电桩运营商信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:export')")
|
||||
@Log(title = "充电桩运营商信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileMerchantInfo pileMerchantInfo) {
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoList(pileMerchantInfo);
|
||||
ExcelUtil<PileMerchantInfo> util = new ExcelUtil<PileMerchantInfo>(PileMerchantInfo.class);
|
||||
util.exportExcel(response, list, "充电桩运营商信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电桩运营商信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileMerchantInfoService.selectPileMerchantInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩运营商信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:add')")
|
||||
@Log(title = "充电桩运营商信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileMerchantInfo pileMerchantInfo) {
|
||||
return toAjax(pileMerchantInfoService.insertPileMerchantInfo(pileMerchantInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电桩运营商信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:edit')")
|
||||
@Log(title = "充电桩运营商信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileMerchantInfo pileMerchantInfo) {
|
||||
return toAjax(pileMerchantInfoService.updatePileMerchantInfo(pileMerchantInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电桩运营商信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:remove')")
|
||||
@Log(title = "充电桩运营商信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileMerchantInfoService.deletePileMerchantInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileModelInfo;
|
||||
import com.jsowell.pile.service.IPileModelInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电桩型号信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/model")
|
||||
public class PileModelInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileModelInfoService pileModelInfoService;
|
||||
|
||||
/**
|
||||
* 查询充电桩型号信息列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:model:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileModelInfo pileModelInfo) {
|
||||
startPage();
|
||||
List<PileModelInfo> list = pileModelInfoService.selectPileModelInfoList(pileModelInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出充电桩型号信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:model:export')")
|
||||
@Log(title = "充电桩型号信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileModelInfo pileModelInfo) {
|
||||
List<PileModelInfo> list = pileModelInfoService.selectPileModelInfoList(pileModelInfo);
|
||||
ExcelUtil<PileModelInfo> util = new ExcelUtil<PileModelInfo>(PileModelInfo.class);
|
||||
util.exportExcel(response, list, "充电桩型号信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电桩型号信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:model:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileModelInfoService.selectPileModelInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩型号信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:model:add')")
|
||||
@Log(title = "充电桩型号信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileModelInfo pileModelInfo) {
|
||||
return toAjax(pileModelInfoService.insertPileModelInfo(pileModelInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电桩型号信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:model:edit')")
|
||||
@Log(title = "充电桩型号信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileModelInfo pileModelInfo) {
|
||||
return toAjax(pileModelInfoService.updatePileModelInfo(pileModelInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电桩型号信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:model:remove')")
|
||||
@Log(title = "充电桩型号信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileModelInfoService.deletePileModelInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.pile.dto.GenerateOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.service.OrderService;
|
||||
import com.jsowell.service.PileRemoteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 远程控制controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/remote")
|
||||
public class PileRemoteController {
|
||||
|
||||
@Autowired
|
||||
private PileRemoteService pileRemoteService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 获取实时上传数据
|
||||
* http://localhost:8080/remote/getRealTimeMonitorData
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getRealTimeMonitorData")
|
||||
public AjaxResult getRealTimeMonitorData(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.getRealTimeMonitorData(queryPileDTO.getPileSn(), queryPileDTO.getConnectorCode());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程重启
|
||||
* http://localhost:8080/remote/reboot
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/reboot")
|
||||
public AjaxResult reboot(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.reboot(queryPileDTO.getPileSn());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 后管-远程启动充电
|
||||
* http://localhost:8080/remote/remoteStartChargingForWeb
|
||||
*/
|
||||
@PostMapping("/remoteStartChargingForWeb")
|
||||
public AjaxResult remoteStartCharging(@RequestBody GenerateOrderDTO dto) {
|
||||
// pileRemoteService.remoteStartCharging(queryPileDTO.getPileSn(), queryPileDTO.getConnectorCode());
|
||||
// 生成订单并远程启动充电
|
||||
dto.setStartMode(Constants.ZERO);
|
||||
String orderCode = orderService.generateOrder(dto);
|
||||
return AjaxResult.success(ImmutableMap.of("orderCode", orderCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程停止充电
|
||||
* http://localhost:8080/remote/remoteStopCharging
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/remoteStopCharging")
|
||||
public AjaxResult remoteStopCharging(@RequestBody QueryPileDTO dto) {
|
||||
pileRemoteService.remoteStopCharging(dto.getPileSn(), dto.getConnectorCode());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程下发二维码
|
||||
* http://localhost:8080/remote/issueQRCode
|
||||
*/
|
||||
@PostMapping("/issueQRCode")
|
||||
public AjaxResult issueQRCode(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.issueQRCode(queryPileDTO.getPileSn());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 对时
|
||||
* http://localhost:8080/remote/proofreadTime
|
||||
*/
|
||||
@PostMapping("/proofreadTime")
|
||||
public AjaxResult proofreadTime(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.proofreadTime(queryPileDTO.getPileSn());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程升级
|
||||
* http://localhost:8080/remote/updateFile
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateFile")
|
||||
public AjaxResult updateFile(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.updateFile(queryPileDTO.getPileSns());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileSimInfo;
|
||||
import com.jsowell.pile.dto.QuerySimInfoDTO;
|
||||
import com.jsowell.pile.dto.SimRenewDTO;
|
||||
import com.jsowell.pile.service.IPileSimInfoService;
|
||||
import com.jsowell.pile.service.SimCardService;
|
||||
import com.jsowell.pile.vo.web.SimCardInfoVO;
|
||||
import com.jsowell.pile.vo.web.SimRenewResultVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电桩SIM卡信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/sim")
|
||||
public class PileSimInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileSimInfoService pileSimInfoService;
|
||||
|
||||
@Autowired
|
||||
private SimCardService simCardService;
|
||||
|
||||
/**
|
||||
* 查询充电桩SIM卡信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileSimInfo pileSimInfo) {
|
||||
startPage();
|
||||
List<PileSimInfo> list = pileSimInfoService.selectPileSimInfoList(pileSimInfo);
|
||||
|
||||
// List<SimCardInfoVO> list = pileSimInfoService.getSimInfoList(pileSimInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:list')")
|
||||
@PostMapping("/getSimInfo")
|
||||
public TableDataInfo getSimInfo(QuerySimInfoDTO dto) {
|
||||
startPage();
|
||||
List<SimCardInfoVO> simInfoList = pileSimInfoService.getSimInfoList(dto);
|
||||
return getDataTable(simInfoList);
|
||||
}
|
||||
/**
|
||||
* 导出充电桩SIM卡信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:export')")
|
||||
@Log(title = "充电桩SIM卡信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileSimInfo pileSimInfo) {
|
||||
List<PileSimInfo> list = pileSimInfoService.selectPileSimInfoList(pileSimInfo);
|
||||
ExcelUtil<PileSimInfo> util = new ExcelUtil<PileSimInfo>(PileSimInfo.class);
|
||||
util.exportExcel(response, list, "充电桩SIM卡信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电桩SIM卡信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileSimInfoService.selectPileSimInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩SIM卡信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:add')")
|
||||
@Log(title = "充电桩SIM卡信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileSimInfo pileSimInfo) {
|
||||
return toAjax(pileSimInfoService.insertPileSimInfo(pileSimInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电桩SIM卡信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:edit')")
|
||||
@Log(title = "充电桩SIM卡信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileSimInfo pileSimInfo) {
|
||||
return toAjax(pileSimInfoService.updatePileSimInfo(pileSimInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电桩SIM卡信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:remove')")
|
||||
@Log(title = "充电桩SIM卡信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileSimInfoService.deletePileSimInfoByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 续费sim卡周期
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:sim:edit')")
|
||||
@PostMapping("/simRenew")
|
||||
public AjaxResult simRenew(@RequestBody SimRenewDTO dto) {
|
||||
List<SimRenewResultVO> list = simCardService.renewSimByLoop(dto.getIccIds(), dto.getCycleNumber());
|
||||
return AjaxResult.success(list);
|
||||
|
||||
|
||||
// AjaxResult result;
|
||||
// try {
|
||||
// List<SimRenewResultVO> list = simCardService.renewSimByLoop(dto.getIccIds(), dto.getCycleNumber());
|
||||
// result = AjaxResult.
|
||||
// } catch (BusinessException e) {
|
||||
// result = AjaxResult.error(Integer.parseInt(e.getCode()), e.getMessage());
|
||||
// } catch (Exception e) {
|
||||
// result = AjaxResult.error();
|
||||
// }
|
||||
// return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||
import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电站信息Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/station")
|
||||
public class PileStationInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询充电站信息列表NEW
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QueryStationDTO queryStationDTO) {
|
||||
startPage();
|
||||
// List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
||||
List<PileStationVO> list = pileStationInfoService.queryStationInfos(queryStationDTO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 快速建站接口
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:station:add')")
|
||||
@PostMapping("/fastCreateStation")
|
||||
public AjaxResult fastCreateStation(@RequestBody FastCreateStationDTO dto) {
|
||||
logger.info("快速建站接口 param:{}", JSONObject.toJSONString(dto));
|
||||
int i = 0;
|
||||
try {
|
||||
i = pileStationInfoService.fastCreateStation(dto);
|
||||
} catch (BusinessException e) {
|
||||
logger.warn("快速建站接口 warn", e);
|
||||
} catch (Exception e) {
|
||||
logger.error("快速建站接口 error", e);
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询充电站信息列表
|
||||
*/
|
||||
/*@PreAuthorize("@ss.hasPermi('pile:station:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileStationInfo pileStationInfo) {
|
||||
startPage();
|
||||
List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
||||
return getDataTable(list);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 导出充电站信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:export')")
|
||||
@Log(title = "充电站信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PileStationInfo pileStationInfo) {
|
||||
List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
||||
ExcelUtil<PileStationInfo> util = new ExcelUtil<PileStationInfo>(PileStationInfo.class);
|
||||
util.exportExcel(response, list, "充电站信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电站信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(pileStationInfoService.selectPileStationInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 后管站点基本资料页面
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||
@GetMapping(value = "/getStationInfo/{stationId}")
|
||||
public AjaxResult getStationInfo(@PathVariable("stationId") String stationId) {
|
||||
return AjaxResult.success(pileStationInfoService.getStationInfo(stationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电站信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:add')")
|
||||
@Log(title = "充电站信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileStationInfo pileStationInfo) {
|
||||
return toAjax(pileStationInfoService.insertPileStationInfo(pileStationInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电站信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
||||
@Log(title = "充电站信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PileStationInfo pileStationInfo) {
|
||||
logger.info("修改充电站信息 param:{}", pileStationInfo.toString());
|
||||
return toAjax(pileStationInfoService.updatePileStationInfo(pileStationInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充电站信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:remove')")
|
||||
@Log(title = "充电站信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pileStationInfoService.deletePileStationInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据运营商id获取充电站列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||
@PostMapping(value = "/selectStationListByMerchantId")
|
||||
public AjaxResult selectStationListByMerchantId(@RequestBody QueryStationDTO dto) {
|
||||
return AjaxResult.success(pileStationInfoService.selectStationListByMerchantId(Long.valueOf(dto.getMerchantId())));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user