80 lines
2.8 KiB
Java
80 lines
2.8 KiB
Java
package com.cdzy.ebikeoperate.controller;
|
||
|
||
import com.cdzy.common.model.JsonResult;
|
||
import com.cdzy.ebikeoperate.model.dto.request.ReqComponentEnterRecordDto;
|
||
import com.cdzy.ebikeoperate.model.dto.request.ReqComponentOutRecordDto;
|
||
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;
|
||
|
||
/**
|
||
* 车辆部件的相关接口
|
||
*/
|
||
@RestController
|
||
@RequestMapping("/ebikeComponent")
|
||
public class EbikeComponentController {
|
||
|
||
@Autowired
|
||
EbikeComponentService ebikeComponentService;
|
||
/**
|
||
* 设备部件(入库,暂存) (stockInType 0或空 表示暂存,1 表示入库。
|
||
* @param params
|
||
* @return
|
||
*/
|
||
@PostMapping("/componentInventoryEnterbound")
|
||
public JsonResult<?> ecuStorageSave(@RequestBody ReqComponentEnterRecordDto params) {
|
||
|
||
return ebikeComponentService.ecuStorageSave(params);
|
||
}
|
||
/**
|
||
* 设备部件入库作废 (通用
|
||
* @param componentEnterRecordId
|
||
* @return
|
||
*/
|
||
@GetMapping("/invalidateDevicePart")
|
||
public JsonResult<?> invalidateDevicePart(@RequestParam(name="componentEnterRecordId")String componentEnterRecordId) {
|
||
return ebikeComponentService.invalidateDevicePart(componentEnterRecordId);
|
||
}
|
||
/**
|
||
* 设备部件入库取消(通用)
|
||
* @param componentEnterRecordId
|
||
* @return
|
||
*/
|
||
@GetMapping("/cancelDevicePart")
|
||
public JsonResult<?> cancelDevicePart(@RequestParam(name = "componentEnterRecordId") String componentEnterRecordId) {
|
||
return ebikeComponentService.cancelDevicePart(componentEnterRecordId);
|
||
}
|
||
|
||
/**
|
||
* 部件出库(出库,暂存) (stockInType 0或空 表示暂存,1 表示入库。
|
||
* @param params
|
||
* @return
|
||
*/
|
||
@PostMapping("/ComponentInventoryOutbound")
|
||
public JsonResult<?> ComponentInventoryOutbound(@RequestBody ReqComponentOutRecordDto params) {
|
||
|
||
return ebikeComponentService.ComponentInventoryOutbound(params);
|
||
}
|
||
/**
|
||
* 设备部件出库取消(通用)
|
||
* @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);
|
||
}
|
||
}
|