| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- package com.ktg.iscs.controller;
- import com.ktg.common.annotation.Log;
- import com.ktg.common.core.controller.BaseController;
- import com.ktg.common.enums.BusinessType;
- import com.ktg.common.pojo.CommonResult;
- import com.ktg.iscs.domain.dto.hardwareApi.*;
- import com.ktg.iscs.service.HardwareApiService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.v3.oas.annotations.Parameter;
- 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;
- /**
- * 硬件调用接口
- *
- * @author cgj
- * @date 2024-10-16
- */
- @Api(tags = "硬件调用接口")
- @RestController
- @RequestMapping("/iscs/hardware-api")
- public class HardwareApiController extends BaseController
- {
- @Autowired
- private HardwareApiService hardwareApiService;
- @ApiOperation("取出钥匙")
- @Log(title = "取出钥匙", businessType = BusinessType.UPDATE)
- @PostMapping("/updateTakeOutKey")
- public CommonResult<Boolean> updateTakeOutKey(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") TakeOutKeyDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateTakeOutKey(dto));
- }
- @ApiOperation("归还钥匙")
- @Log(title = "归还钥匙", businessType = BusinessType.UPDATE)
- @PostMapping("/updateReturnKey")
- public CommonResult<Boolean> updateReturnKey(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") ReturnKeyDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateReturnKey(dto));
- }
- @ApiOperation("取出挂锁时更新数据")
- @Log(title = "取出挂锁时更新数据", businessType = BusinessType.UPDATE)
- @PostMapping("/updateTicketLockTake")
- public CommonResult<Boolean> updateTicketLockTake(@RequestBody @Parameter(name = "list", description = "修改数据类,放到body") List<TakeTicketLockDTO> list)
- {
- return CommonResult.success(hardwareApiService.updateTicketLockTake(list));
- }
- @ApiOperation("归还挂锁时更新数据")
- @Log(title = "归还挂锁时更新数据", businessType = BusinessType.UPDATE)
- @PostMapping("/updateTicketLockReturn")
- public CommonResult<Boolean> updateTicketLockReturn(@RequestBody @Parameter(name = "list", description = "修改数据类,放到body") ReturnTicketLockDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateTicketLockReturn(dto));
- }
- @ApiOperation("挂锁上锁时更新数据,更新挂锁和哪个隔离点进行了绑定")
- @Log(title = "挂锁上锁时更新数据,更新挂锁和哪个隔离点进行了绑定", businessType = BusinessType.UPDATE)
- @PostMapping("/updateTicketLockPoint")
- public CommonResult<Boolean> updateTicketLockPoint(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") LockPointDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateTicketLockPoint(dto));
- }
- @ApiOperation("更新作业票的挂锁状态(解锁的时候)")
- @Log(title = "更新作业票的挂锁状态", businessType = BusinessType.UPDATE)
- @PostMapping("/updateTicketLockStatus")
- public CommonResult<Boolean> updateTicketLockStatus(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") UpdateTicketStatusDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateTicketLockStatus(dto));
- }
- @ApiOperation("取出辅件时更新数据")
- @Log(title = "取出辅件时更新数据", businessType = BusinessType.UPDATE)
- @PostMapping("/updateLocksetTake")
- public CommonResult<Boolean> updateLocksetTake(@RequestBody @Parameter(name = "list", description = "修改数据类,放到body") List<TakeLocksetDTO> list)
- {
- return CommonResult.success(hardwareApiService.updateLocksetTake(list));
- }
- @ApiOperation("辅件绑定隔离点(辅件和给隔离点上锁时)")
- @Log(title = "辅件绑定隔离点", businessType = BusinessType.UPDATE)
- @PostMapping("/updateLocksetPoint")
- public CommonResult<Boolean> updateLocksetPoint(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") LocksetPointDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateLocksetPoint(dto));
- }
- @ApiOperation("辅件归还物资柜")
- @Log(title = "辅件归还物资柜", businessType = BusinessType.UPDATE)
- @PostMapping("/updateLocksetReturn")
- public CommonResult<Boolean> updateLocksetReturn(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") ReturnLocksetDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateLocksetReturn(dto));
- }
- }
|