| package com.dy.pmsProduct.workStation; | 
|   | 
| import com.dy.common.aop.SsoPowerAop; | 
| import com.dy.common.webUtil.BaseResponse; | 
| import com.dy.common.webUtil.BaseResponseUtils; | 
| import com.dy.common.webUtil.QueryResultVo; | 
| import com.dy.pmsGlobal.aop.Log; | 
| import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast; | 
| import com.dy.pmsProduct.workStation.QueryVo; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.web.bind.annotation.*; | 
|   | 
| import java.util.List; | 
| import java.util.Map; | 
| /** | 
|  * 工站使用情况 | 
|  */ | 
| @Slf4j | 
| @RestController | 
| @RequestMapping(path="workStation") | 
| public class WorkStationCtl { | 
|     private WorkStationSv sv; | 
|     @Autowired | 
|     public void setSv(WorkStationSv workStationSv){ | 
|         sv = workStationSv; | 
|     } | 
|     /** | 
|      * 分页查询 | 
|      * @param vo | 
|      * @return | 
|      */ | 
|     @PostMapping(path="some") | 
|     @SsoPowerAop(power = "-1") | 
|     @Log("分页查询工站使用情况") | 
|     public BaseResponse<QueryResultVo<List<StaAssemblyWorkLast>>> some(@RequestBody QueryVo vo){ | 
|         QueryResultVo<List<StaAssemblyWorkLast>> list = sv.selectSome(vo) ; | 
|         return BaseResponseUtils.buildSuccess(list); | 
|     } | 
|     /** | 
|      * 删除正在被使用的工站信息,将工站闲置 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping(path="delete") | 
|     @SsoPowerAop(power = "10300001") | 
|     @Log("删除工站使用情况信息") | 
|     public BaseResponse<Boolean> delete(String id){ | 
|         int count = sv.delete(Long.parseLong(id)); | 
|         if (count <= 0) { | 
|             return BaseResponseUtils.buildFail("数据库存储失败"); | 
|         } else { | 
|             return BaseResponseUtils.buildSuccess(true); | 
|         } | 
|     } | 
| } |