| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |