Lius
2025-03-27 b0f56573ea27a8798764314c72cf39e9eb0651dc
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/controller/MdcProductionController.java
@@ -19,6 +19,7 @@
import org.jeecg.modules.system.model.MdcProductionTreeModel;
import org.jeecg.modules.system.model.ProductionIdModel;
import org.jeecg.modules.system.service.IMdcProductionService;
import org.jeecg.modules.system.vo.MdcProOptionsVo;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@@ -86,6 +87,26 @@
        return result;
    }
    @AutoLog(value = "产线表-树形列表(MDC)")
    @ApiOperation(value = "产线表-树形列表(MDC)", notes = "产线表-树形列表(MDC)")
    @GetMapping(value = "/queryTreeListByMdc")
    public Result<List<MdcProductionTreeModel>> queryTreeListByMdc(@RequestParam(name = "ids", required = false) String ids) {
        Result<List<MdcProductionTreeModel>> result = new Result<>();
        try {
            if (oConvertUtils.isNotEmpty(ids)) {
                List<MdcProductionTreeModel> productionList = mdcProductionService.queryTreeListByMdc(ids);
                result.setResult(productionList);
            } else {
                List<MdcProductionTreeModel> list = mdcProductionService.queryTreeListByMdc();
                result.setResult(list);
            }
            result.setSuccess(true);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
        return result;
    }
    @AutoLog(value = "产线表-树形列表(添加系统配置)")
    @ApiOperation(value = "产线表-树形列表(添加系统配置)", notes = "产线表-树形列表(添加系统配置)")
    @GetMapping(value = "/queryTreeListByConfig")
@@ -106,7 +127,6 @@
        return result;
    }
    @AutoLog(value = "产线表-根据用户id获取产线下拉树选项")
    @ApiOperation(value = "产线表-根据用户id获取产线下拉树选项", notes = "产线表-根据用户id获取产线下拉树选项")
    @GetMapping(value = "/loadProductionTreeOptions")
    public Result<List<ProductionIdModel>> loadProductionTreeOptions() {
@@ -302,4 +322,36 @@
        return super.importExcel(request, response, MdcProduction.class);
    }
    @ApiOperation(value = "产线表-根据用户id获取MDC产线(中心)或班组下拉选项", notes = "产线表-根据用户id获取MDC产线(中心)或班组下拉选项")
    @GetMapping(value = "/loadProductionOptions")
    public Result<?> loadProductionOptions(String productionId) {
        Result<List<MdcProOptionsVo>> result = new Result<>();
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        try {
            List<MdcProOptionsVo> list = mdcProductionService.loadProductionOptions(userId, productionId);
            result.setSuccess(true);
            result.setResult(list);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
        return result;
    }
    @ApiOperation(value = "产线表-根据班组id获取配送组下拉选项", notes = "产线表-根据班组id获取配送组下拉选项")
    @GetMapping(value = "/loadTeamOptions")
    public Result<?> loadTeamOptions(@RequestParam(name = "productionId", required = true) String productionId) {
        Result<List<MdcProOptionsVo>> result = new Result<>();
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        try {
            List<MdcProOptionsVo> list = mdcProductionService.loadTeamOptions(userId, productionId);
            result.setSuccess(true);
            result.setResult(list);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
        return result;
    }
}