2025-05-20 16:42:35 +08:00
|
|
|
|
package com.cdzy.ebikeoperate.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.cdzy.common.model.JsonResult;
|
2025-05-22 09:15:25 +08:00
|
|
|
|
import com.cdzy.ebikeoperate.model.dto.request.ReqComponentEnterRecordDto;
|
|
|
|
|
|
import com.cdzy.ebikeoperate.model.dto.request.ReqComponentOutRecordDto;
|
2025-05-20 16:42:35 +08:00
|
|
|
|
import com.cdzy.ebikeoperate.service.EbikeBikeQrcodeService;
|
|
|
|
|
|
import com.cdzy.ebikeoperate.service.EbikeComponentService;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2025-05-20 17:38:23 +08:00
|
|
|
|
* 车辆部件的相关接口
|
2025-05-20 16:42:35 +08:00
|
|
|
|
*/
|
|
|
|
|
|
@RestController
|
|
|
|
|
|
@RequestMapping("/ebikeComponent")
|
|
|
|
|
|
public class EbikeComponentController {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
EbikeComponentService ebikeComponentService;
|
2025-05-20 17:38:23 +08:00
|
|
|
|
/**
|
2025-05-23 14:27:32 +08:00
|
|
|
|
* 设备部件(入库,暂存) (stockInType 0或空 表示暂存,1 表示入库。
|
2025-05-20 16:42:35 +08:00
|
|
|
|
* @param params
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2025-05-23 14:27:32 +08:00
|
|
|
|
@PostMapping("/componentInventoryEnterbound")
|
2025-05-22 09:15:25 +08:00
|
|
|
|
public JsonResult<?> ecuStorageSave(@RequestBody ReqComponentEnterRecordDto params) {
|
2025-05-20 16:42:35 +08:00
|
|
|
|
|
|
|
|
|
|
return ebikeComponentService.ecuStorageSave(params);
|
|
|
|
|
|
}
|
2025-05-20 17:38:23 +08:00
|
|
|
|
/**
|
2025-05-23 14:27:32 +08:00
|
|
|
|
* 设备部件入库作废 (通用
|
2025-05-20 16:42:35 +08:00
|
|
|
|
* @param componentEnterRecordId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GetMapping("/invalidateDevicePart")
|
|
|
|
|
|
public JsonResult<?> invalidateDevicePart(@RequestParam(name="componentEnterRecordId")String componentEnterRecordId) {
|
|
|
|
|
|
return ebikeComponentService.invalidateDevicePart(componentEnterRecordId);
|
|
|
|
|
|
}
|
2025-05-20 17:38:23 +08:00
|
|
|
|
/**
|
2025-05-23 14:27:32 +08:00
|
|
|
|
* 设备部件入库取消(通用)
|
2025-05-20 16:42:35 +08:00
|
|
|
|
* @param componentEnterRecordId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GetMapping("/cancelDevicePart")
|
|
|
|
|
|
public JsonResult<?> cancelDevicePart(@RequestParam(name = "componentEnterRecordId") String componentEnterRecordId) {
|
|
|
|
|
|
return ebikeComponentService.cancelDevicePart(componentEnterRecordId);
|
|
|
|
|
|
}
|
2025-05-22 09:15:25 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 部件出库(出库,暂存) (stockInType 0或空 表示暂存,1 表示入库。
|
|
|
|
|
|
* @param params
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@PostMapping("/ComponentInventoryOutbound")
|
|
|
|
|
|
public JsonResult<?> ComponentInventoryOutbound(@RequestBody ReqComponentOutRecordDto params) {
|
|
|
|
|
|
|
|
|
|
|
|
return ebikeComponentService.ComponentInventoryOutbound(params);
|
|
|
|
|
|
}
|
2025-05-22 17:36:59 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 设备部件出库取消(通用)
|
|
|
|
|
|
* @param componentOutRecordId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GetMapping("/cancelOutDevicePart")
|
|
|
|
|
|
public JsonResult<?> cancelOutDevicePart(@RequestParam(name = "componentOutRecordId") String componentOutRecordId) {
|
|
|
|
|
|
return ebikeComponentService.cancelOutDevicePart(componentOutRecordId);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 设备部件出库作废 (通用
|
|
|
|
|
|
* @param componentOutRecordId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GetMapping("/invalidateOutDevicePart")
|
|
|
|
|
|
public JsonResult<?> invalidateOutDevicePart(@RequestParam(name="componentOutRecordId")String componentOutRecordId) {
|
|
|
|
|
|
return ebikeComponentService.invalidateOutDevicePart(componentOutRecordId);
|
|
|
|
|
|
}
|
2025-05-20 16:42:35 +08:00
|
|
|
|
}
|