package com.qianwen.smartman.modules.cps.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; import javax.validation.Valid; import com.qianwen.core.boot.ctrl.BladeController; import com.qianwen.core.scanner.modular.annotation.DeleteResource; import com.qianwen.core.scanner.modular.annotation.GetResource; import com.qianwen.core.scanner.modular.annotation.PostResource; import com.qianwen.core.scanner.modular.annotation.PutResource; import com.qianwen.core.scanner.modular.stereotype.ApiResource; import com.qianwen.core.secure.annotation.PreAuth; import com.qianwen.core.tenant.annotation.NonDS; import com.qianwen.core.tool.api.R; import com.qianwen.smartman.modules.cps.dto.WorkstationWcsDTO; import com.qianwen.smartman.modules.cps.service.IMachineService; import com.qianwen.smartman.modules.cps.service.IWorkstationWcsService; import com.qianwen.smartman.modules.cps.vo.WorkstationWcsSaveNewVO; import com.qianwen.smartman.modules.cps.vo.WorkstationWcsSaveVO; import com.qianwen.smartman.modules.cps.vo.WorkstationWcsVO; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @Api(value = "工位工况参数", tags = {"工位工况参数"}) @RestController @ApiResource({"smis/workstation-wcs"}) @NonDS @Validated public class WorkstationWcsController extends BladeController { private final IWorkstationWcsService workstationWcsService; private final IMachineService machineService; public WorkstationWcsController(final IWorkstationWcsService workstationWcsService, final IMachineService machineService) { this.workstationWcsService = workstationWcsService; this.machineService = machineService; } /** * 就是工位界面 配置工位采集 保存的,这个应该不要了,我们改为数据点配置了 * @param workstationWcsSaveVOList * @return */ //20241021 yangys注释 /* @PreAuth @PostResource({"/save"}) @ApiOperation("新增或更改工况参数信息") public R> save(@Valid @RequestBody List workstationWcsSaveVOList) { return R.data(this.workstationWcsService.insert(workstationWcsSaveVOList)); } @PreAuth @PostResource({"/save/setting"}) @ApiOperation("新增工位采集模板") public R> saveSetting(@Valid @RequestBody List workstationWcsSaveVOList) { return R.data(this.workstationWcsService.saveSetting(workstationWcsSaveVOList)); } @PreAuth @PutResource({"/update"}) @ApiOperation("更新工位采集模板") public R update(@Valid @RequestBody WorkstationWcsSaveVO workstationWcsSaveVO) { return R.data(this.workstationWcsService.updateSetting(workstationWcsSaveVO)); } @PreAuth @PostResource({"/batchSave"}) @ApiOperation("批量编辑工位参数信息") public R> batchSave(@Valid @RequestBody List workstationWcsSaveNewVOList, @RequestParam List workstationIdList) { return R.data(this.workstationWcsService.insertNew(workstationWcsSaveNewVOList, workstationIdList)); } @PostResource({"/isExists"}) @ApiOperation("是否工况参数已存在 工位名称(逗号隔开)-已存在 空-不存在") public R isExists(@Valid @RequestBody List workstationWcsSaveNewVOList, @RequestParam List workstationIdList) { return R.data(this.workstationWcsService.isExists(workstationWcsSaveNewVOList, workstationIdList)); } @PreAuth @DeleteResource({""}) @ApiOperation("删除工况参数信息") public R deleteByWorkstationIdList(@RequestBody List workstationWcsIdList) { return R.data(this.workstationWcsService.delete(workstationWcsIdList)); } @PreAuth @GetResource({"/getWcsByMachineId"}) @ApiOperation("根据机器id查询工况参数") public R> get(Long machineId) { return R.data(this.machineService.getWorkstationWcsByMachineId(machineId, "")); } @PreAuth @GetResource({"/getWcsByWorkstationId"}) @ApiOperation("根据工位id查询工况参数") public R> listByWorkstationId(Long workstationId) { return R.data(this.workstationWcsService.listWorkstationWcsByWorkstationId(workstationId)); } @PreAuth @GetResource({"/listWcsSetting"}) @ApiOperation("列表查询工况参数设置") public R> listWcsSetting() { return R.data(this.workstationWcsService.listWcsSetting()); } */ }