新火炬后端单体项目初始化代码
cuilei
4 天以前 578639bf4bb9be9808d7c482345b8c35b02510b7
src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java
@@ -6,14 +6,14 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
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.service.IAndonButtonConfigService;
import org.jeecg.modules.andon.service.impl.AndonOrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@@ -21,6 +21,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description: 安灯按钮配置
@@ -35,6 +36,8 @@
public class AndonButtonConfigController extends JeecgController<AndonButtonConfig, IAndonButtonConfigService> {
   @Autowired
   private IAndonButtonConfigService andonButtonConfigService;
    @Autowired
    private AndonOrderServiceImpl andonOrderServiceImpl;
   /**
    * 分页列表查询
@@ -59,37 +62,59 @@
   }
    /**
     * 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);
    /**
     * APP安灯发起列表查询
     *
     * @param factoryId
     * @return
     */
    @ApiOperation(value = "安灯发起-分页列表查询", notes = "安灯发起-分页列表查询")
    @GetMapping(value = "/queryUserAndonCallList")
    public Result<List<AndonButtonDTO>> queryUserAndonCallList(@RequestParam("factoryId") String factoryId) {
        List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonCallList(factoryId);
        return Result.OK(list);
    }
   /**
     * APP安灯响应列表查询
     *
     * @param factoryId
     * @return
     */
    @ApiOperation(value = "安灯响应-分页列表查询", notes = "安灯响应-分页列表查询")
    @GetMapping(value = "/queryUserAndonRespondList")
    public Result<List<AndonButtonDTO>> queryUserAndonRespondList(@RequestParam("factoryId") String factoryId) {
        List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonRespondList(factoryId);
        return Result.OK(list);
    }
    /**
     * APP安灯已处理列表查询
     *
     * @param factoryId
     * @return
     */
    @ApiOperation(value = "安灯响应-分页列表查询", notes = "安灯响应-分页列表查询")
    @GetMapping(value = "/queryUserAndonHandelList")
    public Result<List<AndonButtonDTO>> queryUserAndonHandelList(@RequestParam("factoryId") String factoryId) {
        List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonHandelList(factoryId);
        return Result.OK(list);
    }
    /**
    *   添加
    *
    * @param andonButtonConfig