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;
@@ -321,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;
    }
}