From 14943f4a30e027dcf8956272192666524a851eff Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期一, 18 八月 2025 20:31:00 +0800
Subject: [PATCH] 安灯发起、安灯处理  安灯响应

---
 src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java |  296 +++++++++++++++++++++++++++++++++--------------------------
 1 files changed, 165 insertions(+), 131 deletions(-)

diff --git a/src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java b/src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java
index 633af0f..81b45b1 100644
--- a/src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java
+++ b/src/main/java/org/jeecg/modules/andon/controller/AndonButtonConfigController.java
@@ -2,21 +2,19 @@
 
 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 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.dto.AndonOrdeDto;
 import org.jeecg.modules.andon.entity.AndonButtonConfig;
-import org.jeecg.modules.andon.entity.AndonOrder;
 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;
@@ -27,41 +25,42 @@
 import java.util.List;
 
 /**
-* @Description: 瀹夌伅鎸夐挳閰嶇疆
-* @Author: jeecg-boot
-* @Date:   2025-07-10
-* @Version: V1.0
-*/
-@Api(tags="瀹夌伅鎸夐挳閰嶇疆")
+ * @Description: 瀹夌伅鎸夐挳閰嶇疆
+ * @Author: jeecg-boot
+ * @Date: 2025-07-10
+ * @Version: V1.0
+ */
+@Api(tags = "瀹夌伅鎸夐挳閰嶇疆")
 @RestController
 @RequestMapping("/andonbuttonconfig/andonButtonConfig")
 @Slf4j
 public class AndonButtonConfigController extends JeecgController<AndonButtonConfig, IAndonButtonConfigService> {
-   @Autowired
-   private IAndonButtonConfigService andonButtonConfigService;
+    @Autowired
+    private IAndonButtonConfigService andonButtonConfigService;
+    @Autowired
+    private AndonOrderServiceImpl andonOrderServiceImpl;
 
-   /**
-    * 鍒嗛〉鍒楄〃鏌ヨ
-    *
-    * @param andonButtonConfig
-    * @param pageNo
-    * @param pageSize
-    * @param req
-    * @return
-    */
-   //@AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ", notes="瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
-   @GetMapping(value = "/list")
-   public Result<IPage<AndonButtonConfig>> queryPageList(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());
-       Page<AndonButtonConfig> page = new Page<AndonButtonConfig>(pageNo, pageSize);
-       IPage<AndonButtonConfig> pageList = andonButtonConfigService.page(page, queryWrapper);
-       return Result.OK(pageList);
-   }
-
+    /**
+     * 鍒嗛〉鍒楄〃鏌ヨ
+     *
+     * @param andonButtonConfig
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ", notes = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/list")
+    public Result<IPage<AndonButtonConfig>> queryPageList(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());
+        Page<AndonButtonConfig> page = new Page<AndonButtonConfig>(pageNo, pageSize);
+        IPage<AndonButtonConfig> pageList = andonButtonConfigService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
 
 
     /**
@@ -70,117 +69,152 @@
      * @param factoryId
      * @return
      */
-    @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ", notes="瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ", notes = "瀹夌伅鎸夐挳閰嶇疆-鍒嗛〉鍒楄〃鏌ヨ")
     @GetMapping(value = "/queryUserAndonButtonList")
-        public Result<List<AndonButtonDTO>> queryUserAndonButtonList(@RequestParam("factoryId") String factoryId) {
+    public Result<List<AndonButtonDTO>> queryUserAndonButtonList(@RequestParam("factoryId") String factoryId) {
         List<AndonButtonDTO> list = andonButtonConfigService.queryUserAndonButtonList(factoryId);
         return Result.OK(list);
     }
 
 
+    /**
+     * APP瀹夌伅鍙戣捣鍒楄〃鏌ヨ
+     *
+     * @param factoryId
+     * @return
+     */
+    @ApiOperation(value = "瀹夌伅鍙戣捣-鍒嗛〉鍒楄〃鏌ヨ", notes = "瀹夌伅鍙戣捣-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/queryUserAndonCallList")
+    public Result<List<AndonOrdeDto>> queryUserAndonCallList(@RequestParam("factoryId") String factoryId, @RequestParam("orderStatus") String orderStatus) {
+        List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonCallList(factoryId,orderStatus);
+        return Result.OK(list);
+    }
 
+    /**
+     * APP瀹夌伅鍝嶅簲鍒楄〃鏌ヨ
+     *
+     * @param factoryId
+     * @return
+     */
+    @ApiOperation(value = "瀹夌伅鍝嶅簲-鍒嗛〉鍒楄〃鏌ヨ", notes = "瀹夌伅鍝嶅簲-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/queryUserAndonRespondList")
+    public Result<List<AndonOrdeDto>> queryUserAndonRespondList(@RequestParam("factoryId") String factoryId, @RequestParam("orderStatus") String orderStatus) {
+        List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonRespondList(factoryId,orderStatus);
+        return Result.OK(list);
+    }
 
+    /**
+     * APP瀹夌伅宸插鐞嗗垪琛ㄦ煡璇�
+     *
+     * @param factoryId
+     * @return
+     */
+    @ApiOperation(value = "瀹夌伅鍝嶅簲-鍒嗛〉鍒楄〃鏌ヨ", notes = "瀹夌伅鍝嶅簲-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/queryUserAndonHandelList")
+    public Result<List<AndonOrdeDto>> queryUserAndonHandelList(@RequestParam("factoryId") String factoryId ,@RequestParam("orderStatus") String orderStatus) {
+        List<AndonOrdeDto> list = andonButtonConfigService.queryUserAndonHandelList(factoryId,orderStatus);
+        return Result.OK(list);
+    }
+    /**
+     * 娣诲姞
+     *
+     * @param andonButtonConfig
+     * @return
+     */
+    @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-娣诲姞")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-娣诲姞", notes = "瀹夌伅鎸夐挳閰嶇疆-娣诲姞")
+    //@RequiresPermissions("org.jeecg.modules:andon_button_config:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody AndonButtonConfig andonButtonConfig) {
+        andonButtonConfigService.save(andonButtonConfig);
+        return Result.OK("娣诲姞鎴愬姛锛�");
+    }
 
-   /**
-    *   娣诲姞
-    *
-    * @param andonButtonConfig
-    * @return
-    */
-   @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-娣诲姞")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-娣诲姞", notes="瀹夌伅鎸夐挳閰嶇疆-娣诲姞")
-   //@RequiresPermissions("org.jeecg.modules:andon_button_config:add")
-   @PostMapping(value = "/add")
-   public Result<String> add(@RequestBody AndonButtonConfig andonButtonConfig) {
-       andonButtonConfigService.save(andonButtonConfig);
-       return Result.OK("娣诲姞鎴愬姛锛�");
-   }
+    /**
+     * 缂栬緫
+     *
+     * @param andonButtonConfig
+     * @return
+     */
+    @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-缂栬緫")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-缂栬緫", notes = "瀹夌伅鎸夐挳閰嶇疆-缂栬緫")
+    //@RequiresPermissions("org.jeecg.modules:andon_button_config:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody AndonButtonConfig andonButtonConfig) {
+        andonButtonConfigService.updateById(andonButtonConfig);
+        return Result.OK("缂栬緫鎴愬姛!");
+    }
 
-   /**
-    *  缂栬緫
-    *
-    * @param andonButtonConfig
-    * @return
-    */
-   @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-缂栬緫")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-缂栬緫", notes="瀹夌伅鎸夐挳閰嶇疆-缂栬緫")
-   //@RequiresPermissions("org.jeecg.modules:andon_button_config:edit")
-   @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-   public Result<String> edit(@RequestBody AndonButtonConfig andonButtonConfig) {
-       andonButtonConfigService.updateById(andonButtonConfig);
-       return Result.OK("缂栬緫鎴愬姛!");
-   }
+    /**
+     * 閫氳繃id鍒犻櫎
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎", notes = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎")
+    //@RequiresPermissions("org.jeecg.modules:andon_button_config:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        andonButtonConfigService.removeById(id);
+        return Result.OK("鍒犻櫎鎴愬姛!");
+    }
 
-   /**
-    *   閫氳繃id鍒犻櫎
-    *
-    * @param id
-    * @return
-    */
-   @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎", notes="瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鍒犻櫎")
-   //@RequiresPermissions("org.jeecg.modules:andon_button_config:delete")
-   @DeleteMapping(value = "/delete")
-   public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-       andonButtonConfigService.removeById(id);
-       return Result.OK("鍒犻櫎鎴愬姛!");
-   }
+    /**
+     * 鎵归噺鍒犻櫎
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎", notes = "瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎")
+    //@RequiresPermissions("org.jeecg.modules:andon_button_config:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.andonButtonConfigService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
+    }
 
-   /**
-    *  鎵归噺鍒犻櫎
-    *
-    * @param ids
-    * @return
-    */
-   @AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎", notes="瀹夌伅鎸夐挳閰嶇疆-鎵归噺鍒犻櫎")
-   //@RequiresPermissions("org.jeecg.modules:andon_button_config:deleteBatch")
-   @DeleteMapping(value = "/deleteBatch")
-   public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-       this.andonButtonConfigService.removeByIds(Arrays.asList(ids.split(",")));
-       return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
-   }
+    /**
+     * 閫氳繃id鏌ヨ
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ")
+    @ApiOperation(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ", notes = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ")
+    @GetMapping(value = "/queryById")
+    public Result<AndonButtonConfig> queryById(@RequestParam(name = "id", required = true) String id) {
+        AndonButtonConfig andonButtonConfig = andonButtonConfigService.getById(id);
+        if (andonButtonConfig == null) {
+            return Result.error("鏈壘鍒板搴旀暟鎹�");
+        }
+        return Result.OK(andonButtonConfig);
+    }
 
-   /**
-    * 閫氳繃id鏌ヨ
-    *
-    * @param id
-    * @return
-    */
-   //@AutoLog(value = "瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ")
-   @ApiOperation(value="瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ", notes="瀹夌伅鎸夐挳閰嶇疆-閫氳繃id鏌ヨ")
-   @GetMapping(value = "/queryById")
-   public Result<AndonButtonConfig> queryById(@RequestParam(name="id",required=true) String id) {
-       AndonButtonConfig andonButtonConfig = andonButtonConfigService.getById(id);
-       if(andonButtonConfig==null) {
-           return Result.error("鏈壘鍒板搴旀暟鎹�");
-       }
-       return Result.OK(andonButtonConfig);
-   }
+    /**
+     * 瀵煎嚭excel
+     *
+     * @param request
+     * @param andonButtonConfig
+     */
+    //@RequiresPermissions("org.jeecg.modules:andon_button_config:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, AndonButtonConfig andonButtonConfig) {
+        return super.exportXls(request, andonButtonConfig, AndonButtonConfig.class, "瀹夌伅鎸夐挳閰嶇疆");
+    }
 
-   /**
-   * 瀵煎嚭excel
-   *
-   * @param request
-   * @param andonButtonConfig
-   */
-   //@RequiresPermissions("org.jeecg.modules:andon_button_config:exportXls")
-   @RequestMapping(value = "/exportXls")
-   public ModelAndView exportXls(HttpServletRequest request, AndonButtonConfig andonButtonConfig) {
-       return super.exportXls(request, andonButtonConfig, AndonButtonConfig.class, "瀹夌伅鎸夐挳閰嶇疆");
-   }
-
-   /**
+    /**
      * 閫氳繃excel瀵煎叆鏁版嵁
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-   //@RequiresPermissions("andon_button_config:importExcel")
-   @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-   public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-       return super.importExcel(request, response, AndonButtonConfig.class);
-   }
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    //@RequiresPermissions("andon_button_config:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, AndonButtonConfig.class);
+    }
 
 }

--
Gitblit v1.9.3