| | |
| | | public class JeecgOneUtil { |
| | | public static void main(String[] args) throws Exception { |
| | | TableVo tableVo = new TableVo(); |
| | | tableVo.setTableName("eam_equipment_scrap"); |
| | | tableVo.setEntityName("EamEquipmentScrap"); |
| | | tableVo.setEntityPackage("eam"); |
| | | tableVo.setFtlDescription("è®¾å¤æ¥åº(转让)"); |
| | | tableVo.setTableName("lsw_material"); |
| | | tableVo.setEntityName("LswMaterial"); |
| | | tableVo.setEntityPackage("lsw"); |
| | | tableVo.setFtlDescription("线边åºç©æä¿¡æ¯"); |
| | | new CodeGenerateOne(tableVo).generateCodeFile(null); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import org.jeecg.modules.base.service.ILineSideWarehouseService; |
| | | import org.jeecg.modules.lsw.entity.LswMaterial; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInventory; |
| | | import org.jeecg.modules.lsw.service.ILswMaterialInventoryService; |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 线边åºç©æä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-30 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="线边åºç©æä¿¡æ¯") |
| | | * @Description: 线边åºç©æä¿¡æ¯ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-30 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags = "线边åºç©æä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/lswmaterial/lswMaterial") |
| | | @Slf4j |
| | | public class LswMaterialController { |
| | | @Autowired |
| | | private ILswMaterialService lswMaterialService; |
| | | @Autowired |
| | | private ILswMaterialInventoryService lswMaterialInventoryService; |
| | | @Autowired |
| | | private ILswMaterialService lswMaterialService; |
| | | @Autowired |
| | | private ILswMaterialInventoryService lswMaterialInventoryService; |
| | | @Autowired |
| | | private ILineSideWarehouseService lineSideWarehouseService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param lswMaterial |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢", notes="线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<LswMaterial>> queryPageList(LswMaterial lswMaterial, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<LswMaterial> queryWrapper = QueryGenerator.initQueryWrapper(lswMaterial, req.getParameterMap()); |
| | | Page<LswMaterial> page = new Page<LswMaterial>(pageNo, pageSize); |
| | | IPage<LswMaterial> pageList = lswMaterialService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param lswMaterial |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢", notes = "线边åºç©æä¿¡æ¯-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<LswMaterial>> queryPageList(LswMaterial lswMaterial, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<LswMaterial> queryWrapper = QueryGenerator.initQueryWrapper(lswMaterial, req.getParameterMap()); |
| | | Page<LswMaterial> page = new Page<LswMaterial>(pageNo, pageSize); |
| | | IPage<LswMaterial> pageList = lswMaterialService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param lswMaterialPage |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-æ·»å ") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-æ·»å ", notes="线边åºç©æä¿¡æ¯-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody LswMaterialPage lswMaterialPage) { |
| | | LswMaterial lswMaterial = new LswMaterial(); |
| | | BeanUtils.copyProperties(lswMaterialPage, lswMaterial); |
| | | lswMaterialService.saveMain(lswMaterial, lswMaterialPage.getLswMaterialInventoryList()); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param lswMaterialPage |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-æ·»å ") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-æ·»å ", notes = "线边åºç©æä¿¡æ¯-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody LswMaterialPage lswMaterialPage) { |
| | | LswMaterial lswMaterial = new LswMaterial(); |
| | | BeanUtils.copyProperties(lswMaterialPage, lswMaterial); |
| | | lswMaterialService.saveMain(lswMaterial, lswMaterialPage.getLswMaterialInventoryList()); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param lswMaterialPage |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-ç¼è¾") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-ç¼è¾", notes="线边åºç©æä¿¡æ¯-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody LswMaterialPage lswMaterialPage) { |
| | | LswMaterial lswMaterial = new LswMaterial(); |
| | | BeanUtils.copyProperties(lswMaterialPage, lswMaterial); |
| | | LswMaterial lswMaterialEntity = lswMaterialService.getById(lswMaterial.getId()); |
| | | if(lswMaterialEntity==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | lswMaterialService.updateMain(lswMaterial, lswMaterialPage.getLswMaterialInventoryList()); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param lswMaterialPage |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-ç¼è¾") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-ç¼è¾", notes = "线边åºç©æä¿¡æ¯-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody LswMaterialPage lswMaterialPage) { |
| | | LswMaterial lswMaterial = new LswMaterial(); |
| | | BeanUtils.copyProperties(lswMaterialPage, lswMaterial); |
| | | LswMaterial lswMaterialEntity = lswMaterialService.getById(lswMaterial.getId()); |
| | | if (lswMaterialEntity == null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | lswMaterialService.updateMain(lswMaterial, lswMaterialPage.getLswMaterialInventoryList()); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-éè¿idå é¤") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-éè¿idå é¤", notes="线边åºç©æä¿¡æ¯-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | lswMaterialService.delMain(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-éè¿idå é¤") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-éè¿idå é¤", notes = "线边åºç©æä¿¡æ¯-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
| | | lswMaterialService.delMain(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-æ¹éå é¤") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-æ¹éå é¤", notes="线边åºç©æä¿¡æ¯-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.lswMaterialService.delBatchMain(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "线边åºç©æä¿¡æ¯-æ¹éå é¤") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-æ¹éå é¤", notes = "线边åºç©æä¿¡æ¯-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | this.lswMaterialService.delBatchMain(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢", notes="线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<LswMaterial> queryById(@RequestParam(name="id",required=true) String id) { |
| | | LswMaterial lswMaterial = lswMaterialService.getById(id); |
| | | if(lswMaterial==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(lswMaterial); |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value = "线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢", notes = "线边åºç©æä¿¡æ¯-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<LswMaterial> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | LswMaterial lswMaterial = lswMaterialService.getById(id); |
| | | if (lswMaterial == null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(lswMaterial); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ç©æåºåä¿¡æ¯éè¿ä¸»è¡¨IDæ¥è¯¢") |
| | | @ApiOperation(value="ç©æåºåä¿¡æ¯ä¸»è¡¨IDæ¥è¯¢", notes="ç©æåºåä¿¡æ¯-é主表IDæ¥è¯¢") |
| | | @GetMapping(value = "/queryLswMaterialInventoryByMainId") |
| | | public Result<List<LswMaterialInventory>> queryLswMaterialInventoryListByMainId(@RequestParam(name="id",required=true) String id) { |
| | | List<LswMaterialInventory> lswMaterialInventoryList = lswMaterialInventoryService.selectByMainId(id); |
| | | return Result.OK(lswMaterialInventoryList); |
| | | } |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ç©æåºåä¿¡æ¯éè¿ä¸»è¡¨IDæ¥è¯¢") |
| | | @ApiOperation(value = "ç©æåºåä¿¡æ¯ä¸»è¡¨IDæ¥è¯¢", notes = "ç©æåºåä¿¡æ¯-é主表IDæ¥è¯¢") |
| | | @GetMapping(value = "/queryLswMaterialInventoryByMainId") |
| | | public Result<List<LswMaterialInventory>> queryLswMaterialInventoryListByMainId(@RequestParam(name = "id", required = true) String id) { |
| | | List<LswMaterialInventory> lswMaterialInventoryList = lswMaterialInventoryService.selectByMainId(id); |
| | | for (LswMaterialInventory lswMaterialInventory : lswMaterialInventoryList) { |
| | | if(StringUtils.isNotEmpty(lswMaterialInventory.getWarehouseId())){ |
| | | String warehouseId = lswMaterialInventory.getWarehouseId(); |
| | | LineSideWarehouse warehouse = lineSideWarehouseService.getById(warehouseId); |
| | | lswMaterialInventory.setWarehouseName(warehouse.getWarehouseName()); |
| | | } |
| | | } |
| | | return Result.OK(lswMaterialInventoryList); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param lswMaterial |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, LswMaterial lswMaterial) { |
| | | // Step.1 ç»è£
æ¥è¯¢æ¡ä»¶æ¥è¯¢æ°æ® |
| | | QueryWrapper<LswMaterial> queryWrapper = QueryGenerator.initQueryWrapper(lswMaterial, request.getParameterMap()); |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param lswMaterial |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, LswMaterial lswMaterial) { |
| | | // Step.1 ç»è£
æ¥è¯¢æ¡ä»¶æ¥è¯¢æ°æ® |
| | | QueryWrapper<LswMaterial> queryWrapper = QueryGenerator.initQueryWrapper(lswMaterial, request.getParameterMap()); |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | //é
ç½®é䏿°æ®æ¥è¯¢æ¡ä»¶ |
| | | String selections = request.getParameter("selections"); |
| | | if(oConvertUtils.isNotEmpty(selections)) { |
| | | List<String> selectionList = Arrays.asList(selections.split(",")); |
| | | queryWrapper.in("id",selectionList); |
| | | } |
| | | //Step.2 è·åå¯¼åºæ°æ® |
| | | List<LswMaterial> lswMaterialList = lswMaterialService.list(queryWrapper); |
| | | //é
ç½®é䏿°æ®æ¥è¯¢æ¡ä»¶ |
| | | String selections = request.getParameter("selections"); |
| | | if (oConvertUtils.isNotEmpty(selections)) { |
| | | List<String> selectionList = Arrays.asList(selections.split(",")); |
| | | queryWrapper.in("id", selectionList); |
| | | } |
| | | //Step.2 è·åå¯¼åºæ°æ® |
| | | List<LswMaterial> lswMaterialList = lswMaterialService.list(queryWrapper); |
| | | |
| | | // Step.3 ç»è£
pageList |
| | | List<LswMaterialPage> pageList = new ArrayList<LswMaterialPage>(); |
| | | for (LswMaterial main : lswMaterialList) { |
| | | LswMaterialPage vo = new LswMaterialPage(); |
| | | BeanUtils.copyProperties(main, vo); |
| | | List<LswMaterialInventory> lswMaterialInventoryList = lswMaterialInventoryService.selectByMainId(main.getId()); |
| | | vo.setLswMaterialInventoryList(lswMaterialInventoryList); |
| | | pageList.add(vo); |
| | | } |
| | | // Step.3 ç»è£
pageList |
| | | List<LswMaterialPage> pageList = new ArrayList<LswMaterialPage>(); |
| | | for (LswMaterial main : lswMaterialList) { |
| | | LswMaterialPage vo = new LswMaterialPage(); |
| | | BeanUtils.copyProperties(main, vo); |
| | | List<LswMaterialInventory> lswMaterialInventoryList = lswMaterialInventoryService.selectByMainId(main.getId()); |
| | | vo.setLswMaterialInventoryList(lswMaterialInventoryList); |
| | | pageList.add(vo); |
| | | } |
| | | |
| | | // Step.4 AutoPoi 导åºExcel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "线边åºç©æä¿¡æ¯å表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, LswMaterialPage.class); |
| | | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("线边åºç©æä¿¡æ¯æ°æ®", "导åºäºº:"+sysUser.getRealname(), "线边åºç©æä¿¡æ¯")); |
| | | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
| | | return mv; |
| | | } |
| | | // Step.4 AutoPoi 导åºExcel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "线边åºç©æä¿¡æ¯å表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, LswMaterialPage.class); |
| | | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("线边åºç©æä¿¡æ¯æ°æ®", "导åºäºº:" + sysUser.getRealname(), "线边åºç©æä¿¡æ¯")); |
| | | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
| | | return mv; |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | // è·åä¸ä¼ æä»¶å¯¹è±¡ |
| | | MultipartFile file = entity.getValue(); |
| | | ImportParams params = new ImportParams(); |
| | | params.setTitleRows(2); |
| | | params.setHeadRows(1); |
| | | params.setNeedSave(true); |
| | | try { |
| | | List<LswMaterialPage> list = ExcelImportUtil.importExcel(file.getInputStream(), LswMaterialPage.class, params); |
| | | for (LswMaterialPage page : list) { |
| | | LswMaterial po = new LswMaterial(); |
| | | BeanUtils.copyProperties(page, po); |
| | | lswMaterialService.saveMain(po, page.getLswMaterialInventoryList()); |
| | | } |
| | | return Result.OK("æä»¶å¯¼å
¥æåï¼æ°æ®è¡æ°:" + list.size()); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(),e); |
| | | return Result.error("æä»¶å¯¼å
¥å¤±è´¥:"+e.getMessage()); |
| | | } finally { |
| | | try { |
| | | file.getInputStream().close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return Result.OK("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:lsw_material:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | // è·åä¸ä¼ æä»¶å¯¹è±¡ |
| | | MultipartFile file = entity.getValue(); |
| | | ImportParams params = new ImportParams(); |
| | | params.setTitleRows(2); |
| | | params.setHeadRows(1); |
| | | params.setNeedSave(true); |
| | | try { |
| | | List<LswMaterialPage> list = ExcelImportUtil.importExcel(file.getInputStream(), LswMaterialPage.class, params); |
| | | for (LswMaterialPage page : list) { |
| | | LswMaterial po = new LswMaterial(); |
| | | BeanUtils.copyProperties(page, po); |
| | | lswMaterialService.saveMain(po, page.getLswMaterialInventoryList()); |
| | | } |
| | | return Result.OK("æä»¶å¯¼å
¥æåï¼æ°æ®è¡æ°:" + list.size()); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | return Result.error("æä»¶å¯¼å
¥å¤±è´¥:" + e.getMessage()); |
| | | } finally { |
| | | try { |
| | | file.getInputStream().close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return Result.OK("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(LswMaterial lswMaterial, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | IPage<Map<String, Object>> pageList = lswMaterialService.getLswMaterialListData(pageNo, pageSize, req); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
| | |
| | | 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.modules.lsw.entity.LswMaterial; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInbound; |
| | | import org.jeecg.modules.lsw.service.ILswMaterialInboundService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå
¥åºå |
| | |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, LswMaterialInbound.class); |
| | | } |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(LswMaterialInbound lswMaterialInbound, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req){ |
| | | IPage<Map<String, Object>> pageList = lswMaterialInboundService.getlswMaterialInboundListData(pageNo,pageSize,req); |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
| | |
| | | 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.modules.lsw.entity.LswMaterialInbound; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialOutbound; |
| | | import org.jeecg.modules.lsw.service.ILswMaterialOutboundService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æåºåºå |
| | |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, LswMaterialOutbound.class); |
| | | } |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(LswMaterialOutbound lswMaterialOutbound, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req){ |
| | | IPage<Map<String, Object>> pageList = lswMaterialOutboundService.getlswMaterialOutboundListData(pageNo,pageSize,req); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | /**产线ID*/ |
| | | @Excel(name = "产线ID", width = 15) |
| | | @ApiModelProperty(value = "产线ID") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**åºåå°ID*/ |
| | | @Excel(name = "åºåå°ID", width = 15) |
| | | @ApiModelProperty(value = "åºåå°ID") |
| | | @Dict(dictTable = "base_line_side_warehouse", dicCode = "id", dicText = "warehouse_name") |
| | | private String warehouseId; |
| | | /**ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ", width = 15) |
| | |
| | | /**å
¥åºæ°é*/ |
| | | @Excel(name = "å
¥åºæ°é", width = 15) |
| | | @ApiModelProperty(value = "å
¥åºæ°é") |
| | | private Integer quantity; |
| | | private Double quantity; |
| | | /**æ¥æ¶äºº*/ |
| | | @Excel(name = "æ¥æ¶äºº", width = 15) |
| | | @ApiModelProperty(value = "æ¥æ¶äºº") |
| | |
| | | package org.jeecg.modules.lsw.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.persistence.Table; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | /**æ°é*/ |
| | | @Excel(name = "æ°é", width = 15) |
| | | @ApiModelProperty(value = "æ°é") |
| | | private String quantity; |
| | | private Double quantity; |
| | | /**åºåå°ID*/ |
| | | @Excel(name = "åºåå°ID", width = 15) |
| | | @Dict(dictTable = "base_line_side_warehouse", dicCode = "id", dicText = "warehouse_name") |
| | | @ApiModelProperty(value = "åºåå°ID") |
| | | private String warehouseId; |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "åºåå°") |
| | | private String warehouseName; |
| | | /**åºåç¶æ*/ |
| | | @Excel(name = "åºåç¶æ", width = 15) |
| | | @ApiModelProperty(value = "åºåç¶æ") |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | /**产线ID*/ |
| | | @Excel(name = "产线ID", width = 15) |
| | | @ApiModelProperty(value = "产线ID") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**æ¹æ¬¡å·*/ |
| | | @Excel(name = "æ¹æ¬¡å·", width = 15) |
| | |
| | | /**åºåºæ°é*/ |
| | | @Excel(name = "åºåºæ°é", width = 15) |
| | | @ApiModelProperty(value = "åºåºæ°é") |
| | | private String quantity; |
| | | private Double quantity; |
| | | /**å·¥åID*/ |
| | | @Excel(name = "å·¥åID", width = 15) |
| | | @ApiModelProperty(value = "å·¥åID") |
| | |
| | | package org.jeecg.modules.lsw.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInbound; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå
¥åºå |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface LswMaterialInboundMapper extends BaseMapper<LswMaterialInbound> { |
| | | |
| | | IPage<Map<String, Object>> getlswMaterialInboundListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.lsw.entity.LswMaterial; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 线边åºç©æä¿¡æ¯ |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface LswMaterialMapper extends BaseMapper<LswMaterial> { |
| | | |
| | | IPage<Map<String, Object>> getLswMaterialListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialOutbound; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æåºåºå |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface LswMaterialOutboundMapper extends BaseMapper<LswMaterialOutbound> { |
| | | |
| | | IPage<Map<String, Object>> getlswMaterialOutboundListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.lsw.mapper.LswMaterialInboundMapper"> |
| | | |
| | | <select id="getlswMaterialInboundListData" parameterType="Map" resultType="Map"> |
| | | select * from lsw_material_inbound WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | <if test="params.batchNumber != null and params.batchNumber != ''"> |
| | | AND batch_number LIKE CONCAT('%', #{params.batchNumber}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.lsw.mapper.LswMaterialMapper"> |
| | | |
| | | <select id="getLswMaterialListData" parameterType="Map" resultType="Map"> |
| | | select * from lsw_material WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | <if test="params.materialModel != null and params.materialModel != ''"> |
| | | AND material_model LIKE CONCAT('%', #{params.materialModel}, '%') |
| | | </if> |
| | | <if test="params.materialCategory != null and params.materialCategory != ''"> |
| | | AND material_category = #{params.materialCategory} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.lsw.mapper.LswMaterialOutboundMapper"> |
| | | |
| | | <select id="getlswMaterialOutboundListData" parameterType="Map" resultType="Map"> |
| | | select * from lsw_material_outbound WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | <if test="params.batchNumber != null and params.batchNumber != ''"> |
| | | AND batch_number LIKE CONCAT('%', #{params.batchNumber}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.lsw.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInbound; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå
¥åºå |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ILswMaterialInboundService extends IService<LswMaterialInbound> { |
| | | |
| | | IPage<Map<String, Object>> getlswMaterialInboundListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialOutbound; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æåºåºå |
| | |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ILswMaterialOutboundService extends IService<LswMaterialOutbound> { |
| | | |
| | | IPage<Map<String, Object>> getlswMaterialOutboundListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.lsw.entity.LswMaterial; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInventory; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 线边åºç©æä¿¡æ¯ |
| | |
| | | * @param idList |
| | | */ |
| | | public void delBatchMain (Collection<? extends Serializable> idList); |
| | | |
| | | IPage<Map<String, Object>> getLswMaterialListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInbound; |
| | | import org.jeecg.modules.lsw.mapper.LswMaterialInboundMapper; |
| | | import org.jeecg.modules.lsw.service.ILswMaterialInboundService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå
¥åºå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-06-30 |
| | | * @Date: 2025-06-30 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class LswMaterialInboundServiceImpl extends ServiceImpl<LswMaterialInboundMapper, LswMaterialInbound> implements ILswMaterialInboundService { |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getlswMaterialInboundListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("batchNumber") && StringUtils.isNotBlank(parameterMap.get("batchNumber")[0])) { |
| | | paramMap.put("batchNumber", parameterMap.get("batchNumber")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getlswMaterialInboundListData(pageData, paramMap); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialOutbound; |
| | | import org.jeecg.modules.lsw.mapper.LswMaterialOutboundMapper; |
| | | import org.jeecg.modules.lsw.service.ILswMaterialOutboundService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æåºåºå |
| | |
| | | @Service |
| | | public class LswMaterialOutboundServiceImpl extends ServiceImpl<LswMaterialOutboundMapper, LswMaterialOutbound> implements ILswMaterialOutboundService { |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getlswMaterialOutboundListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("batchNumber") && StringUtils.isNotBlank(parameterMap.get("batchNumber")[0])) { |
| | | paramMap.put("batchNumber", parameterMap.get("batchNumber")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getlswMaterialOutboundListData(pageData, paramMap); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.lsw.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.lsw.entity.LswMaterial; |
| | | import org.jeecg.modules.lsw.entity.LswMaterialInventory; |
| | | import org.jeecg.modules.lsw.mapper.LswMaterialInventoryMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 线边åºç©æä¿¡æ¯ |
| | |
| | | lswMaterialMapper.deleteById(id); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getLswMaterialListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("materialModel") && StringUtils.isNotBlank(parameterMap.get("materialModel")[0])) { |
| | | paramMap.put("materialModel", parameterMap.get("materialModel")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("materialCategory") && StringUtils.isNotBlank(parameterMap.get("materialCategory")[0])) { |
| | | paramMap.put("materialCategory", parameterMap.get("materialCategory")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getLswMaterialListData(pageData, paramMap); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.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.modules.pms.entity.PmsMaterialProcess; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail; |
| | | import org.jeecg.modules.pms.service.IPmsMaterialProcessService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå·¥åº |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="ç©æå·¥åº") |
| | | @RestController |
| | | @RequestMapping("/pms/pmsMaterialProcess") |
| | | @Slf4j |
| | | public class PmsMaterialProcessController extends JeecgController<PmsMaterialProcess, IPmsMaterialProcessService> { |
| | | @Autowired |
| | | private IPmsMaterialProcessService pmsMaterialProcessService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param pmsMaterialProcess |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ç©æå·¥åº-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ç©æå·¥åº-å页å表æ¥è¯¢", notes="ç©æå·¥åº-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<PmsMaterialProcess>> queryPageList(PmsMaterialProcess pmsMaterialProcess, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<PmsMaterialProcess> queryWrapper = QueryGenerator.initQueryWrapper(pmsMaterialProcess, req.getParameterMap()); |
| | | Page<PmsMaterialProcess> page = new Page<PmsMaterialProcess>(pageNo, pageSize); |
| | | IPage<PmsMaterialProcess> pageList = pmsMaterialProcessService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param pmsMaterialProcess |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©æå·¥åº-æ·»å ") |
| | | @ApiOperation(value="ç©æå·¥åº-æ·»å ", notes="ç©æå·¥åº-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_material_process:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody PmsMaterialProcess pmsMaterialProcess) { |
| | | pmsMaterialProcessService.save(pmsMaterialProcess); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param pmsMaterialProcess |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©æå·¥åº-ç¼è¾") |
| | | @ApiOperation(value="ç©æå·¥åº-ç¼è¾", notes="ç©æå·¥åº-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_material_process:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody PmsMaterialProcess pmsMaterialProcess) { |
| | | pmsMaterialProcessService.updateById(pmsMaterialProcess); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©æå·¥åº-éè¿idå é¤") |
| | | @ApiOperation(value="ç©æå·¥åº-éè¿idå é¤", notes="ç©æå·¥åº-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_material_process:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | pmsMaterialProcessService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©æå·¥åº-æ¹éå é¤") |
| | | @ApiOperation(value="ç©æå·¥åº-æ¹éå é¤", notes="ç©æå·¥åº-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_material_process:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.pmsMaterialProcessService.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<PmsMaterialProcess> queryById(@RequestParam(name="id",required=true) String id) { |
| | | PmsMaterialProcess pmsMaterialProcess = pmsMaterialProcessService.getById(id); |
| | | if(pmsMaterialProcess==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(pmsMaterialProcess); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param pmsMaterialProcess |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:pms_material_process:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, PmsMaterialProcess pmsMaterialProcess) { |
| | | return super.exportXls(request, pmsMaterialProcess, PmsMaterialProcess.class, "ç©æå·¥åº"); |
| | | } |
| | | |
| | | /**1·3 |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("pms_material_process:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, PmsMaterialProcess.class); |
| | | } |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(PmsMaterialProcess pmsMaterialProcess, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req){ |
| | | IPage<Map<String, Object>> pageList = pmsMaterialProcessService.getpmsMaterialProcessListData(pageNo,pageSize,req); |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.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.modules.lsw.entity.LswMaterialInbound; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterials; |
| | | import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 订åBOM |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="订åBOM") |
| | | @RestController |
| | | @RequestMapping("/pmsprocessbillmaterials/pmsProcessBillMaterials") |
| | | @Slf4j |
| | | public class PmsProcessBillMaterialsController extends JeecgController<PmsProcessBillMaterials, IPmsProcessBillMaterialsService> { |
| | | @Autowired |
| | | private IPmsProcessBillMaterialsService pmsProcessBillMaterialsService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param pmsProcessBillMaterials |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "订åBOM-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="订åBOM-å页å表æ¥è¯¢", notes="订åBOM-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<PmsProcessBillMaterials>> queryPageList(PmsProcessBillMaterials pmsProcessBillMaterials, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<PmsProcessBillMaterials> queryWrapper = QueryGenerator.initQueryWrapper(pmsProcessBillMaterials, req.getParameterMap()); |
| | | Page<PmsProcessBillMaterials> page = new Page<PmsProcessBillMaterials>(pageNo, pageSize); |
| | | IPage<PmsProcessBillMaterials> pageList = pmsProcessBillMaterialsService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param pmsProcessBillMaterials |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "订åBOM-æ·»å ") |
| | | @ApiOperation(value="订åBOM-æ·»å ", notes="订åBOM-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody PmsProcessBillMaterials pmsProcessBillMaterials) { |
| | | pmsProcessBillMaterialsService.save(pmsProcessBillMaterials); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param pmsProcessBillMaterials |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "订åBOM-ç¼è¾") |
| | | @ApiOperation(value="订åBOM-ç¼è¾", notes="订åBOM-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody PmsProcessBillMaterials pmsProcessBillMaterials) { |
| | | pmsProcessBillMaterialsService.updateById(pmsProcessBillMaterials); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "订åBOM-éè¿idå é¤") |
| | | @ApiOperation(value="订åBOM-éè¿idå é¤", notes="订åBOM-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | pmsProcessBillMaterialsService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "订åBOM-æ¹éå é¤") |
| | | @ApiOperation(value="订åBOM-æ¹éå é¤", notes="订åBOM-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.pmsProcessBillMaterialsService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "订åBOM-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="订åBOM-éè¿idæ¥è¯¢", notes="订åBOM-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<PmsProcessBillMaterials> queryById(@RequestParam(name="id",required=true) String id) { |
| | | PmsProcessBillMaterials pmsProcessBillMaterials = pmsProcessBillMaterialsService.getById(id); |
| | | if(pmsProcessBillMaterials==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(pmsProcessBillMaterials); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param pmsProcessBillMaterials |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, PmsProcessBillMaterials pmsProcessBillMaterials) { |
| | | return super.exportXls(request, pmsProcessBillMaterials, PmsProcessBillMaterials.class, "订åBOM"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("pms_process_bill_materials:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, PmsProcessBillMaterials.class); |
| | | } |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(PmsProcessBillMaterials pmsProcessBillMaterials, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req){ |
| | | IPage<Map<String, Object>> pageList = pmsProcessBillMaterialsService.getpmsProcessBillMaterialsListData(pageNo,pageSize,req); |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.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.modules.pms.entity.PmsProcessBillMaterials; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail; |
| | | import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©ææ¸
å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="ç©ææ¸
å") |
| | | @RestController |
| | | @RequestMapping("/pms/pmsProcessBillMaterialsDetail") |
| | | @Slf4j |
| | | public class PmsProcessBillMaterialsDetailController extends JeecgController<PmsProcessBillMaterialsDetail, IPmsProcessBillMaterialsDetailService> { |
| | | @Autowired |
| | | private IPmsProcessBillMaterialsDetailService pmsProcessBillMaterialsDetailService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param pmsProcessBillMaterialsDetail |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "ç©ææ¸
å-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ç©ææ¸
å-å页å表æ¥è¯¢", notes="ç©ææ¸
å-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<PmsProcessBillMaterialsDetail>> queryPageList(PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<PmsProcessBillMaterialsDetail> queryWrapper = QueryGenerator.initQueryWrapper(pmsProcessBillMaterialsDetail, req.getParameterMap()); |
| | | Page<PmsProcessBillMaterialsDetail> page = new Page<PmsProcessBillMaterialsDetail>(pageNo, pageSize); |
| | | IPage<PmsProcessBillMaterialsDetail> pageList = pmsProcessBillMaterialsDetailService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param pmsProcessBillMaterialsDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©ææ¸
å-æ·»å ") |
| | | @ApiOperation(value="ç©ææ¸
å-æ·»å ", notes="ç©ææ¸
å-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) { |
| | | pmsProcessBillMaterialsDetailService.save(pmsProcessBillMaterialsDetail); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param pmsProcessBillMaterialsDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©ææ¸
å-ç¼è¾") |
| | | @ApiOperation(value="ç©ææ¸
å-ç¼è¾", notes="ç©ææ¸
å-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) { |
| | | pmsProcessBillMaterialsDetailService.updateById(pmsProcessBillMaterialsDetail); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©ææ¸
å-éè¿idå é¤") |
| | | @ApiOperation(value="ç©ææ¸
å-éè¿idå é¤", notes="ç©ææ¸
å-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | pmsProcessBillMaterialsDetailService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç©ææ¸
å-æ¹éå é¤") |
| | | @ApiOperation(value="ç©ææ¸
å-æ¹éå é¤", notes="ç©ææ¸
å-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.pmsProcessBillMaterialsDetailService.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<PmsProcessBillMaterialsDetail> queryById(@RequestParam(name="id",required=true) String id) { |
| | | PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail = pmsProcessBillMaterialsDetailService.getById(id); |
| | | if(pmsProcessBillMaterialsDetail==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(pmsProcessBillMaterialsDetail); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param pmsProcessBillMaterialsDetail |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) { |
| | | return super.exportXls(request, pmsProcessBillMaterialsDetail, PmsProcessBillMaterialsDetail.class, "ç©ææ¸
å"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("pms_process_bill_materials_detail:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, PmsProcessBillMaterialsDetail.class); |
| | | } |
| | | @ApiOperation(value="ç©ææ¸
å-éè¿çäº§ç©æIDæ¥è¯¢", notes="ç©ææ¸
å-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryByMaterialId") |
| | | public Result<PmsProcessBillMaterialsDetail> queryByMaterialId(@RequestParam(name="materialId",required=true) String materialId) { |
| | | PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail = pmsProcessBillMaterialsDetailService.queryByMaterialId(materialId); |
| | | if(pmsProcessBillMaterialsDetail==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(pmsProcessBillMaterialsDetail); |
| | | } |
| | | |
| | | @GetMapping(value = "/searchlikeQuery") |
| | | public Result<?> searchlikeQuery(PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req){ |
| | | IPage<Map<String, Object>> pageList = pmsProcessBillMaterialsDetailService.getpmsProcessBillMaterialsDetailListData(pageNo,pageSize,req); |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: ç©æå·¥åº |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("pms_material_process") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="pms_material_process对象", description="ç©æå·¥åº") |
| | | public class PmsMaterialProcess implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ç©æç¼ç ") |
| | | private String materialNumber; |
| | | /**ç©æåç§°*/ |
| | | @Excel(name = "ç©æåç§°", width = 15) |
| | | @ApiModelProperty(value = "ç©æåç§°") |
| | | private String materialName; |
| | | /**产线ID(SAPå·¥ä½ä¸å¿)*/ |
| | | @Excel(name = "产线ID(SAPå·¥ä½ä¸å¿)", width = 15) |
| | | @ApiModelProperty(value = "产线ID(SAPå·¥ä½ä¸å¿)") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**å·¥åºå·*/ |
| | | @Excel(name = "å·¥åºå·", width = 15) |
| | | @ApiModelProperty(value = "å·¥åºå·") |
| | | private String processCode; |
| | | /**å·¥åºåç§°*/ |
| | | @Excel(name = "å·¥åºåç§°", width = 15) |
| | | @ApiModelProperty(value = "å·¥åºåç§°") |
| | | private String processName; |
| | | /**æ§å¶ç */ |
| | | @Excel(name = "æ§å¶ç ", width = 15) |
| | | @ApiModelProperty(value = "æ§å¶ç ") |
| | | private String controlCode; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: 订åBOM |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("pms_process_bill_materials") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="pms_process_bill_materials对象", description="订åBOM") |
| | | public class PmsProcessBillMaterials implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**çæè®¢åID*/ |
| | | @Excel(name = "çæè®¢åID", width = 15) |
| | | @ApiModelProperty(value = "çæè®¢åID") |
| | | private String orderId; |
| | | /**ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ç©æç¼ç ") |
| | | private String materialNumber; |
| | | /**ç©æåç§°*/ |
| | | @Excel(name = "ç©æåç§°", width = 15) |
| | | @ApiModelProperty(value = "ç©æåç§°") |
| | | private String materialName; |
| | | /**BOM代ç */ |
| | | @Excel(name = "BOM代ç ", width = 15) |
| | | @ApiModelProperty(value = "BOM代ç ") |
| | | private String billMaterialsCode; |
| | | /**åºæ¬åä½*/ |
| | | @Excel(name = "åºæ¬åä½", width = 15) |
| | | @ApiModelProperty(value = "åºæ¬åä½") |
| | | private String productionUnit; |
| | | /**è®¢åæ°é*/ |
| | | @Excel(name = "è®¢åæ°é", width = 15) |
| | | @ApiModelProperty(value = "è®¢åæ°é") |
| | | private Double productionQuantity; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: ç©ææ¸
å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("pms_process_bill_materials_detail") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="pms_process_bill_materials_detail对象", description="ç©ææ¸
å") |
| | | public class PmsProcessBillMaterialsDetail implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**çäº§ç©æID*/ |
| | | @Excel(name = "çäº§ç©æID", width = 15) |
| | | @ApiModelProperty(value = "çäº§ç©æID") |
| | | @Dict(dictTable = "pms_process_bill_materials", dicCode = "id", dicText = "material_number") |
| | | private String materialId; |
| | | /**ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "ç©æç¼ç ") |
| | | private String materialNumber; |
| | | /**ç©æåç§°*/ |
| | | @Excel(name = "ç©æåç§°", width = 15) |
| | | @ApiModelProperty(value = "ç©æåç§°") |
| | | private String materialName; |
| | | /**éæ±ç¨é*/ |
| | | @Excel(name = "éæ±ç¨é", width = 15) |
| | | @ApiModelProperty(value = "éæ±ç¨é") |
| | | private Double usageUnit; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.pms.entity.PmsMaterialProcess; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå·¥åº |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface PmsMaterialProcessMapper extends BaseMapper<PmsMaterialProcess> { |
| | | IPage<Map<String, Object>> getpmsMaterialProcessListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©ææ¸
å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface PmsProcessBillMaterialsDetailMapper extends BaseMapper<PmsProcessBillMaterialsDetail> { |
| | | PmsProcessBillMaterialsDetail queryByMaterialId(@Param("materialId") String materialId); |
| | | IPage<Map<String, Object>> getpmsProcessBillMaterialsDetailListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterials; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 订åBOM |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface PmsProcessBillMaterialsMapper extends BaseMapper<PmsProcessBillMaterials> { |
| | | IPage<Map<String, Object>> getpmsProcessBillMaterialsListData(IPage<Map> pageData, @Param("params")Map<String, String> paramMap); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.pms.mapper.PmsMaterialProcessMapper"> |
| | | <select id="getpmsMaterialProcessListData" parameterType="Map" resultType="Map"> |
| | | select * from pms_material_process WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.pms.mapper.PmsProcessBillMaterialsDetailMapper"> |
| | | <select id="queryByMaterialId" resultType="org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail"> |
| | | SELECT TOP 1 * FROM pms_process_bill_materials_detail |
| | | WHERE material_id = #{materialId} |
| | | </select> |
| | | <select id="getpmsProcessBillMaterialsDetailListData" parameterType="Map" resultType="Map"> |
| | | select * from pms_process_bill_materials_detail WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.pms.mapper.PmsProcessBillMaterialsMapper"> |
| | | <select id="getpmsProcessBillMaterialsListData" parameterType="Map" resultType="Map"> |
| | | select * from pms_process_bill_materials WHERE 1=1 |
| | | <if test="params.materialNumber != null and params.materialNumber != ''"> |
| | | AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%') |
| | | </if> |
| | | <if test="params.materialName != null and params.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{params.materialName}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.pms.entity.PmsMaterialProcess; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå·¥åº |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IPmsMaterialProcessService extends IService<PmsMaterialProcess> { |
| | | IPage<Map<String, Object>> getpmsMaterialProcessListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©ææ¸
å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IPmsProcessBillMaterialsDetailService extends IService<PmsProcessBillMaterialsDetail> { |
| | | PmsProcessBillMaterialsDetail queryByMaterialId(String materialId); |
| | | IPage<Map<String, Object>> getpmsProcessBillMaterialsDetailListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterials; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 订åBOM |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IPmsProcessBillMaterialsService extends IService<PmsProcessBillMaterials> { |
| | | IPage<Map<String, Object>> getpmsProcessBillMaterialsListData(Integer pageNo, Integer pageSize, HttpServletRequest req); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.pms.entity.PmsMaterialProcess; |
| | | import org.jeecg.modules.pms.mapper.PmsMaterialProcessMapper; |
| | | import org.jeecg.modules.pms.service.IPmsMaterialProcessService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©æå·¥åº |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class PmsMaterialProcessServiceImpl extends ServiceImpl<PmsMaterialProcessMapper, PmsMaterialProcess> implements IPmsMaterialProcessService { |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getpmsMaterialProcessListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("batchNumber") && StringUtils.isNotBlank(parameterMap.get("batchNumber")[0])) { |
| | | paramMap.put("batchNumber", parameterMap.get("batchNumber")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getpmsMaterialProcessListData(pageData, paramMap); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail; |
| | | import org.jeecg.modules.pms.mapper.PmsProcessBillMaterialsDetailMapper; |
| | | import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç©ææ¸
å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class PmsProcessBillMaterialsDetailServiceImpl extends ServiceImpl<PmsProcessBillMaterialsDetailMapper, PmsProcessBillMaterialsDetail> implements IPmsProcessBillMaterialsDetailService { |
| | | |
| | | @Override |
| | | public PmsProcessBillMaterialsDetail queryByMaterialId(String materialId) { |
| | | return baseMapper.queryByMaterialId(materialId); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getpmsProcessBillMaterialsDetailListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("batchNumber") && StringUtils.isNotBlank(parameterMap.get("batchNumber")[0])) { |
| | | paramMap.put("batchNumber", parameterMap.get("batchNumber")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getpmsProcessBillMaterialsDetailListData(pageData, paramMap); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.pms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.modules.pms.entity.PmsProcessBillMaterials; |
| | | import org.jeecg.modules.pms.mapper.PmsProcessBillMaterialsMapper; |
| | | import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 订åBOM |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-01 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class PmsProcessBillMaterialsServiceImpl extends ServiceImpl<PmsProcessBillMaterialsMapper, PmsProcessBillMaterials> implements IPmsProcessBillMaterialsService { |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getpmsProcessBillMaterialsListData(Integer pageNo, Integer pageSize, HttpServletRequest req) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | Map<String, String> paramMap = new HashMap<String, String>(); |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | if (null != parameterMap) { |
| | | if (parameterMap.containsKey("materialNumber") && StringUtils.isNotBlank(parameterMap.get("materialNumber")[0])) { |
| | | paramMap.put("materialNumber", parameterMap.get("materialNumber")[0]); |
| | | } |
| | | if (parameterMap.containsKey("materialName") && StringUtils.isNotBlank(parameterMap.get("materialName")[0])) { |
| | | paramMap.put("materialName", parameterMap.get("materialName")[0].trim()); |
| | | } |
| | | if (parameterMap.containsKey("batchNumber") && StringUtils.isNotBlank(parameterMap.get("batchNumber")[0])) { |
| | | paramMap.put("batchNumber", parameterMap.get("batchNumber")[0].trim()); |
| | | } |
| | | } |
| | | return super.getBaseMapper().getpmsProcessBillMaterialsListData(pageData, paramMap); |
| | | } |
| | | } |