| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.andon.dto.AndonButtonDTO; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 安灯按钮配置 |
| | |
| | | |
| | | |
| | | /** |
| | | * APP分页列表查询 |
| | | * APP安灯按钮列表查询 |
| | | * |
| | | * @param andonButtonConfig |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @param factoryId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="安灯按钮配置-分页列表查询", notes="安灯按钮配置-分页列表查询") |
| | | @GetMapping(value = "/App/list") |
| | | public Result<IPage<AndonButtonConfig>> queryPageAppList(AndonButtonConfig andonButtonConfig, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<AndonButtonConfig> queryWrapper = QueryGenerator.initQueryWrapper(andonButtonConfig, req.getParameterMap()); |
| | | |
| | | // 获取当前登录用户 |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser != null) { |
| | | // 增加通过系统登录人进行过滤 |
| | | queryWrapper.eq("create_by", sysUser.getUsername()); |
| | | @GetMapping(value = "/queryUserAndonButtonList") |
| | | public Result<List<AndonButtonDTO>> queryUserAndonButtonList(@RequestParam("factoryId") String factoryId) { |
| | | List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonButtonList(factoryId); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | Page<AndonButtonConfig> page = new Page<AndonButtonConfig>(pageNo, pageSize); |
| | | IPage<AndonButtonConfig> pageList = andonButtonConfigService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加 |