| 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.domain.vo.hardwareApi.JobTicketVO;
- 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.*;
- /**
- * 硬件调用接口
- *
- * @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") ParamDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateTicketLockTake(dto.getList()));
- }
- @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("/updateLockPointBatch")
- public CommonResult<Boolean> updateLockPointBatch(@RequestBody @Parameter(name = "list", description = "修改数据类,放到body") LPBParamDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateLockPointBatch(dto.getList()));
- }
- // ----------------------------------作业票取还辅件-------------------------------------------------------
- @ApiOperation("取出辅件时更新数据")
- @Log(title = "取出辅件时更新数据", businessType = BusinessType.UPDATE)
- @PostMapping("/updateLocksetTake")
- public CommonResult<Boolean> updateLocksetTake(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") LTParamDTO dto)
- {
- return CommonResult.success(hardwareApiService.updateLocksetTake(dto.getList()));
- }
- @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));
- }
- // ----------------------------------作业票及作业票的相关数据查询-------------------------------------------------------
- @ApiOperation("获取作业票和关联数据")
- @Parameter(name = "ticketId", description = "ticketId")
- @GetMapping(value = "/selectTicketDetailById")
- public CommonResult<JobTicketVO> selectTicketDetailById(Long ticketId)
- {
- return CommonResult.success(hardwareApiService.selectTicketDetailById(ticketId));
- }
- }
|