中控换绑
This commit is contained in:
parent
a24aa7db13
commit
1fc76e9fa1
@ -1,5 +1,6 @@
|
|||||||
package com.cdzy.operations.controller;
|
package com.cdzy.operations.controller;
|
||||||
|
|
||||||
|
import com.cdzy.common.model.dto.ResGPSDto;
|
||||||
import com.cdzy.common.model.request.PageParam;
|
import com.cdzy.common.model.request.PageParam;
|
||||||
import com.cdzy.common.model.response.JsonResult;
|
import com.cdzy.common.model.response.JsonResult;
|
||||||
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
|
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
|
||||||
@ -148,4 +149,17 @@ public class EbikeBikeInfoController {
|
|||||||
ebikeBikeInfoService.changeEcu(bikeCode, ecuSn);
|
ebikeBikeInfoService.changeEcu(bikeCode, ecuSn);
|
||||||
return JsonResult.success();
|
return JsonResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据中控编号获取设备信息
|
||||||
|
*
|
||||||
|
* @param ecuSn 中控编号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/getEcuMsg")
|
||||||
|
public JsonResult<ResGPSDto> getEcuMsg(@RequestParam("ecuSn") String ecuSn) {
|
||||||
|
ResGPSDto ecuMsg = ebikeBikeInfoService.getEcuMsg(ecuSn);
|
||||||
|
return JsonResult.success(ecuMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.cdzy.operations.service;
|
package com.cdzy.operations.service;
|
||||||
|
|
||||||
|
import com.cdzy.common.model.dto.ResGPSDto;
|
||||||
import com.cdzy.common.model.request.PageParam;
|
import com.cdzy.common.model.request.PageParam;
|
||||||
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
|
import com.cdzy.operations.model.dto.EbikeBikeInfoDto;
|
||||||
import com.cdzy.operations.model.dto.EbikeDto;
|
import com.cdzy.operations.model.dto.EbikeDto;
|
||||||
@ -96,4 +97,10 @@ public interface EbikeBikeInfoService extends IService<EbikeBikeInfo> {
|
|||||||
* @param ecuSn 中控编号
|
* @param ecuSn 中控编号
|
||||||
*/
|
*/
|
||||||
void changeEcu(String bikeCode, String ecuSn);
|
void changeEcu(String bikeCode, String ecuSn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据EcuSn获取信息
|
||||||
|
* @param ecuSn 中控编号
|
||||||
|
*/
|
||||||
|
ResGPSDto getEcuMsg(String ecuSn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -504,6 +504,17 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
|||||||
updateById(bikeInfo);
|
updateById(bikeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResGPSDto getEcuMsg(String ecuSn) {
|
||||||
|
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||||
|
.where(EBIKE_ECU_INFO.ECU_SN.eq(ecuSn));
|
||||||
|
EbikeEcuInfo ebikeEcuInfo = ebikeEcuInfoService.getOne(queryWrapper);
|
||||||
|
if (ebikeEcuInfo == null) {
|
||||||
|
throw new EbikeException("中控编号错误,该中控仓库中不存在");
|
||||||
|
}
|
||||||
|
return (ResGPSDto)redisUtil.getEcu(ecuSn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static EbikeSpecialDay getEbikeSpecialDay(List<EbikeSpecialDay> ebikeSpecialDays) {
|
static EbikeSpecialDay getEbikeSpecialDay(List<EbikeSpecialDay> ebikeSpecialDays) {
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user