| | |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.qms.entity.Defect; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import org.jeecg.modules.qms.service.IDefectService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: 缺é·ç»´æ¤ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="缺é·ç»´æ¤") |
| | | @RestController |
| | | @RequestMapping("/qms/defect") |
| | | @Slf4j |
| | | public class DefectController extends JeecgController<Defect, IDefectService> { |
| | | @Autowired |
| | | private IDefectService defectService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param defect |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "缺é·ç»´æ¤-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="缺é·ç»´æ¤-å页å表æ¥è¯¢", notes="缺é·ç»´æ¤-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<Defect>> queryPageList(Defect defect, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Defect> queryWrapper = QueryGenerator.initQueryWrapper(defect, req.getParameterMap()); |
| | | Page<Defect> page = new Page<Defect>(pageNo, pageSize); |
| | | IPage<Defect> pageList = defectService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param defect |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "缺é·ç»´æ¤-æ·»å ") |
| | | @ApiOperation(value="缺é·ç»´æ¤-æ·»å ", notes="缺é·ç»´æ¤-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_defect:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody Defect defect) { |
| | | defect.setDefectStatus(CommonConstant.STATUS_1); |
| | | defectService.save(defect); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param defect |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "缺é·ç»´æ¤-ç¼è¾") |
| | | @ApiOperation(value="缺é·ç»´æ¤-ç¼è¾", notes="缺é·ç»´æ¤-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_defect:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody Defect defect) { |
| | | defectService.updateById(defect); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "缺é·ç»´æ¤-éè¿idå é¤") |
| | | @ApiOperation(value="缺é·ç»´æ¤-éè¿idå é¤", notes="缺é·ç»´æ¤-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_defect:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | defectService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "缺é·ç»´æ¤-æ¹éå é¤") |
| | | @ApiOperation(value="缺é·ç»´æ¤-æ¹éå é¤", notes="缺é·ç»´æ¤-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_defect:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.defectService.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<Defect> queryById(@RequestParam(name="id",required=true) String id) { |
| | | Defect defect = defectService.getById(id); |
| | | if(defect==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(defect); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param defect |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:qms_defect:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, Defect defect) { |
| | | return super.exportXls(request, defect, Defect.class, "缺é·ç»´æ¤"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("qms_defect:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Defect.class); |
| | | } |
| | | |
| | | @AutoLog(value = "缺é·ç»´æ¤-å¯ç¨&ç¦ç¨") |
| | | @ApiOperation(value = "缺é·ç»´æ¤-å¯ç¨&ç¦ç¨", notes = "缺é·ç»´æ¤-å¯ç¨&ç¦ç¨") |
| | | @PutMapping(value = "/active") |
| | | public Result<?> active(@RequestParam(name = "id", required = true) String id) { |
| | | Defect defect = defectService.getById(id); |
| | | if (CommonConstant.STATUS_1.equals(defect.getDefectStatus())) { |
| | | defect.setDefectStatus(CommonConstant.STATUS_0); |
| | | } else { |
| | | defect.setDefectStatus(CommonConstant.STATUS_1); |
| | | } |
| | | defectService.updateById(defect); |
| | | return Result.ok("æä½æåï¼"); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.qms.controller; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import org.jeecg.modules.qms.entity.InspectionTools; |
| | | import org.jeecg.modules.qms.service.IInspectionItemService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecg.modules.qms.service.IInspectionToolsService; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | |
| | | public class InspectionItemController extends JeecgController<InspectionItem, IInspectionItemService> { |
| | | @Autowired |
| | | private IInspectionItemService inspectionItemService; |
| | | |
| | | @Autowired |
| | | private IInspectionToolsService inspectionToolsService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | |
| | | return super.importExcel(request, response, InspectionItem.class); |
| | | } |
| | | |
| | | @AutoLog(value = "æ£éªé¡¹ç®-å¯ç¨&ç¦ç¨") |
| | | @ApiOperation(value = "æ£éªé¡¹ç®-å¯ç¨&ç¦ç¨", notes = "æ£éªé¡¹ç®-å¯ç¨&ç¦ç¨") |
| | | @PutMapping(value = "/active") |
| | | public Result<?> active(@RequestParam(name = "id", required = true) String id) { |
| | | InspectionItem inspectionItem = inspectionItemService.getById(id); |
| | | if (CommonConstant.STATUS_1.equals(inspectionItem.getItemStatus())) { |
| | | inspectionItem.setItemStatus(CommonConstant.STATUS_0); |
| | | } else { |
| | | inspectionItem.setItemStatus(CommonConstant.STATUS_1); |
| | | } |
| | | inspectionItemService.updateById(inspectionItem); |
| | | return Result.ok("æä½æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param inspectionItem |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="æ£éªé¡¹ç®-å页å表æ¥è¯¢", notes="æ£éªé¡¹ç®-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryList") |
| | | public Result<?> queryList(InspectionItem inspectionItem, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | @RequestParam Map<String, String> query) { |
| | | IPage<Map<String, Object>> pageList = inspectionItemService.queryList(pageNo,pageSize, query); |
| | | for(Map<String, Object> r : pageList.getRecords()){ |
| | | String inspectionTools = (String) r.get("inspectionTools"); |
| | | if(StringUtils.isNotBlank(inspectionTools)){ |
| | | List<String> inspectionToolsList = Arrays.asList(inspectionTools.split(",")); |
| | | List<String> inspectionToolsNameList = new ArrayList<>(); |
| | | String inspectionToolsNames = ""; |
| | | for(String inspectionTool : inspectionToolsList){ |
| | | InspectionTools inspectionTools1 = inspectionToolsService.getById(inspectionTool); |
| | | if(inspectionTools1 != null){ |
| | | inspectionToolsNameList.add(inspectionTools1.getToolName()); |
| | | } |
| | | } |
| | | inspectionToolsNames = inspectionToolsNameList.stream() |
| | | .collect(Collectors.joining(",")); |
| | | r.put("inspectionToolsNames",inspectionToolsNames); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.qms.entity.Defect; |
| | | import org.jeecg.modules.qms.entity.InspectionPlan; |
| | | import org.jeecg.modules.qms.service.IInspectionPlanService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="æ£éªæ¹æ¡") |
| | | @RestController |
| | | @RequestMapping("/qms/inspectionPlan") |
| | | @Slf4j |
| | | public class InspectionPlanController extends JeecgController<InspectionPlan, IInspectionPlanService> { |
| | | @Autowired |
| | | private IInspectionPlanService inspectionPlanService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param inspectionPlan |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "æ£éªæ¹æ¡-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="æ£éªæ¹æ¡-å页å表æ¥è¯¢", notes="æ£éªæ¹æ¡-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<InspectionPlan>> queryPageList(InspectionPlan inspectionPlan, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<InspectionPlan> queryWrapper = QueryGenerator.initQueryWrapper(inspectionPlan, req.getParameterMap()); |
| | | Page<InspectionPlan> page = new Page<InspectionPlan>(pageNo, pageSize); |
| | | IPage<InspectionPlan> pageList = inspectionPlanService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param inspectionPlan |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡-æ·»å ") |
| | | @ApiOperation(value="æ£éªæ¹æ¡-æ·»å ", notes="æ£éªæ¹æ¡-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody InspectionPlan inspectionPlan) { |
| | | inspectionPlan.setPlanStatus(CommonConstant.STATUS_1); |
| | | inspectionPlanService.save(inspectionPlan); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param inspectionPlan |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡-ç¼è¾") |
| | | @ApiOperation(value="æ£éªæ¹æ¡-ç¼è¾", notes="æ£éªæ¹æ¡-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody InspectionPlan inspectionPlan) { |
| | | inspectionPlanService.updateById(inspectionPlan); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡-éè¿idå é¤") |
| | | @ApiOperation(value="æ£éªæ¹æ¡-éè¿idå é¤", notes="æ£éªæ¹æ¡-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | inspectionPlanService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡-æ¹éå é¤") |
| | | @ApiOperation(value="æ£éªæ¹æ¡-æ¹éå é¤", notes="æ£éªæ¹æ¡-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.inspectionPlanService.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<InspectionPlan> queryById(@RequestParam(name="id",required=true) String id) { |
| | | InspectionPlan inspectionPlan = inspectionPlanService.getById(id); |
| | | if(inspectionPlan==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(inspectionPlan); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param inspectionPlan |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, InspectionPlan inspectionPlan) { |
| | | return super.exportXls(request, inspectionPlan, InspectionPlan.class, "æ£éªæ¹æ¡"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("qms_inspection_plan:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, InspectionPlan.class); |
| | | } |
| | | |
| | | @AutoLog(value = "æ£éªæ¹æ¡-å¯ç¨&ç¦ç¨") |
| | | @ApiOperation(value = "æ£éªæ¹æ¡-å¯ç¨&ç¦ç¨", notes = "æ£éªæ¹æ¡-å¯ç¨&ç¦ç¨") |
| | | @PutMapping(value = "/active") |
| | | public Result<?> active(@RequestParam(name = "id", required = true) String id) { |
| | | InspectionPlan inspectionPlan = inspectionPlanService.getById(id); |
| | | if (CommonConstant.STATUS_1.equals(inspectionPlan.getPlanStatus())) { |
| | | inspectionPlan.setPlanStatus(CommonConstant.STATUS_0); |
| | | } else { |
| | | inspectionPlan.setPlanStatus(CommonConstant.STATUS_1); |
| | | } |
| | | inspectionPlanService.updateById(inspectionPlan); |
| | | return Result.ok("æä½æåï¼"); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.qms.entity.InspectionPlanItem; |
| | | import org.jeecg.modules.qms.service.IInspectionPlanItemService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡æ£éªé¡¹ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="æ£éªæ¹æ¡æ£éªé¡¹") |
| | | @RestController |
| | | @RequestMapping("/qms/inspectionPlanItem") |
| | | @Slf4j |
| | | public class InspectionPlanItemController extends JeecgController<InspectionPlanItem, IInspectionPlanItemService> { |
| | | @Autowired |
| | | private IInspectionPlanItemService inspectionPlanItemService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param inspectionPlanItem |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "æ£éªæ¹æ¡æ£éªé¡¹-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="æ£éªæ¹æ¡æ£éªé¡¹-å页å表æ¥è¯¢", notes="æ£éªæ¹æ¡æ£éªé¡¹-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<InspectionPlanItem>> queryPageList(InspectionPlanItem inspectionPlanItem, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<InspectionPlanItem> queryWrapper = QueryGenerator.initQueryWrapper(inspectionPlanItem, req.getParameterMap()); |
| | | Page<InspectionPlanItem> page = new Page<InspectionPlanItem>(pageNo, pageSize); |
| | | IPage<InspectionPlanItem> pageList = inspectionPlanItemService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param inspectionPlanItem |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡æ£éªé¡¹-æ·»å ") |
| | | @ApiOperation(value="æ£éªæ¹æ¡æ£éªé¡¹-æ·»å ", notes="æ£éªæ¹æ¡æ£éªé¡¹-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan_item:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody InspectionPlanItem inspectionPlanItem) { |
| | | inspectionPlanItemService.save(inspectionPlanItem); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param inspectionPlanItem |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡æ£éªé¡¹-ç¼è¾") |
| | | @ApiOperation(value="æ£éªæ¹æ¡æ£éªé¡¹-ç¼è¾", notes="æ£éªæ¹æ¡æ£éªé¡¹-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan_item:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody InspectionPlanItem inspectionPlanItem) { |
| | | inspectionPlanItemService.updateById(inspectionPlanItem); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡æ£éªé¡¹-éè¿idå é¤") |
| | | @ApiOperation(value="æ£éªæ¹æ¡æ£éªé¡¹-éè¿idå é¤", notes="æ£éªæ¹æ¡æ£éªé¡¹-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan_item:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | inspectionPlanItemService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ£éªæ¹æ¡æ£éªé¡¹-æ¹éå é¤") |
| | | @ApiOperation(value="æ£éªæ¹æ¡æ£éªé¡¹-æ¹éå é¤", notes="æ£éªæ¹æ¡æ£éªé¡¹-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan_item:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.inspectionPlanItemService.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<InspectionPlanItem> queryById(@RequestParam(name="id",required=true) String id) { |
| | | InspectionPlanItem inspectionPlanItem = inspectionPlanItemService.getById(id); |
| | | if(inspectionPlanItem==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(inspectionPlanItem); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param inspectionPlanItem |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:qms_inspection_plan_item:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, InspectionPlanItem inspectionPlanItem) { |
| | | return super.exportXls(request, inspectionPlanItem, InspectionPlanItem.class, "æ£éªæ¹æ¡æ£éªé¡¹"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("qms_inspection_plan_item:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, InspectionPlanItem.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import org.jeecg.modules.qms.entity.SamplingRules; |
| | | import org.jeecg.modules.qms.service.ISamplingRulesService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | | import org.jeecgframework.poi.excel.entity.ExportParams; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import com.alibaba.fastjson.JSON; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | |
| | | /** |
| | | * @Description: æ½æ ·è§å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="æ½æ ·è§å") |
| | | @RestController |
| | | @RequestMapping("/qms/samplingRules") |
| | | @Slf4j |
| | | public class SamplingRulesController extends JeecgController<SamplingRules, ISamplingRulesService> { |
| | | @Autowired |
| | | private ISamplingRulesService samplingRulesService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param samplingRules |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "æ½æ ·è§å-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="æ½æ ·è§å-å页å表æ¥è¯¢", notes="æ½æ ·è§å-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<SamplingRules>> queryPageList(SamplingRules samplingRules, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<SamplingRules> queryWrapper = QueryGenerator.initQueryWrapper(samplingRules, req.getParameterMap()); |
| | | Page<SamplingRules> page = new Page<SamplingRules>(pageNo, pageSize); |
| | | IPage<SamplingRules> pageList = samplingRulesService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param samplingRules |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ½æ ·è§å-æ·»å ") |
| | | @ApiOperation(value="æ½æ ·è§å-æ·»å ", notes="æ½æ ·è§å-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_sampling_rules:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody SamplingRules samplingRules) { |
| | | samplingRules.setRuleStatus(CommonConstant.STATUS_1); |
| | | samplingRulesService.save(samplingRules); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param samplingRules |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ½æ ·è§å-ç¼è¾") |
| | | @ApiOperation(value="æ½æ ·è§å-ç¼è¾", notes="æ½æ ·è§å-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_sampling_rules:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody SamplingRules samplingRules) { |
| | | samplingRulesService.updateById(samplingRules); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ½æ ·è§å-éè¿idå é¤") |
| | | @ApiOperation(value="æ½æ ·è§å-éè¿idå é¤", notes="æ½æ ·è§å-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_sampling_rules:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | samplingRulesService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ½æ ·è§å-æ¹éå é¤") |
| | | @ApiOperation(value="æ½æ ·è§å-æ¹éå é¤", notes="æ½æ ·è§å-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:qms_sampling_rules:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.samplingRulesService.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<SamplingRules> queryById(@RequestParam(name="id",required=true) String id) { |
| | | SamplingRules samplingRules = samplingRulesService.getById(id); |
| | | if(samplingRules==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(samplingRules); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param samplingRules |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:qms_sampling_rules:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, SamplingRules samplingRules) { |
| | | return super.exportXls(request, samplingRules, SamplingRules.class, "æ½æ ·è§å"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("qms_sampling_rules:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, SamplingRules.class); |
| | | } |
| | | |
| | | @AutoLog(value = "æ½æ ·è§å-å¯ç¨&ç¦ç¨") |
| | | @ApiOperation(value = "æ½æ ·è§å-å¯ç¨&ç¦ç¨", notes = "æ½æ ·è§å-å¯ç¨&ç¦ç¨") |
| | | @PutMapping(value = "/active") |
| | | public Result<?> active(@RequestParam(name = "id", required = true) String id) { |
| | | SamplingRules samplingRules = samplingRulesService.getById(id); |
| | | if (CommonConstant.STATUS_1.equals(samplingRules.getRuleStatus())) { |
| | | samplingRules.setRuleStatus(CommonConstant.STATUS_0); |
| | | } else { |
| | | samplingRules.setRuleStatus(CommonConstant.STATUS_1); |
| | | } |
| | | samplingRulesService.updateById(samplingRules); |
| | | return Result.ok("æä½æåï¼"); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: 缺é·ç»´æ¤ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("qms_defect") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="qms_defect对象", description="缺é·ç»´æ¤") |
| | | public class Defect 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") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**缺é·ç¼ç */ |
| | | @Excel(name = "缺é·ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "缺é·ç¼ç ") |
| | | private String defectCode; |
| | | /**缺é·åç§°*/ |
| | | @Excel(name = "缺é·åç§°", width = 15) |
| | | @ApiModelProperty(value = "缺é·åç§°") |
| | | private String defectName; |
| | | /**缺é·åç±»*/ |
| | | @Excel(name = "缺é·åç±»", width = 15) |
| | | @ApiModelProperty(value = "缺é·åç±»") |
| | | @Dict(dicCode = "defect_category") |
| | | private String defectCategory; |
| | | /**缺é·ç¶æ*/ |
| | | @Excel(name = "缺é·ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "缺é·ç¶æ") |
| | | private String defectStatus; |
| | | /**ç¼ºé·æè¿°*/ |
| | | @Excel(name = "ç¼ºé·æè¿°", width = 15) |
| | | @ApiModelProperty(value = "ç¼ºé·æè¿°") |
| | | private String descreption; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("qms_inspection_plan") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="qms_inspection_plan对象", description="æ£éªæ¹æ¡") |
| | | public class InspectionPlan 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") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**æ¹æ¡ç¼ç */ |
| | | @Excel(name = "æ¹æ¡ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "æ¹æ¡ç¼ç ") |
| | | private String planCode; |
| | | /**æ¹æ¡åç§°*/ |
| | | @Excel(name = "æ¹æ¡åç§°", width = 15) |
| | | @ApiModelProperty(value = "æ¹æ¡åç§°") |
| | | private String planName; |
| | | /**ç©æç¼ç */ |
| | | @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 String planStatus; |
| | | /**æ¹æ¡åç±»;馿£ãå·¡æ£ãå®å·¥æ£*/ |
| | | @Excel(name = "æ¹æ¡åç±»;馿£ãå·¡æ£ãå®å·¥æ£", width = 15) |
| | | @ApiModelProperty(value = "æ¹æ¡åç±»;馿£ãå·¡æ£ãå®å·¥æ£") |
| | | @Dict(dicCode = "plan_category") |
| | | private String planCategory; |
| | | /**æ½æ ·è§åID*/ |
| | | @Excel(name = "æ½æ ·è§åID", width = 15) |
| | | @ApiModelProperty(value = "æ½æ ·è§åID") |
| | | private String ruleId; |
| | | /**æ¹æ¡æè¿°*/ |
| | | @Excel(name = "æ¹æ¡æè¿°", width = 15) |
| | | @ApiModelProperty(value = "æ¹æ¡æè¿°") |
| | | private String descreption; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡æ£éªé¡¹ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("qms_inspection_plan_item") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="qms_inspection_plan_item对象", description="æ£éªæ¹æ¡æ£éªé¡¹") |
| | | public class InspectionPlanItem 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") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ¹æ¡ID*/ |
| | | @Excel(name = "æ¹æ¡ID", width = 15) |
| | | @ApiModelProperty(value = "æ¹æ¡ID") |
| | | private String planId; |
| | | /**æ£éªé¡¹ID*/ |
| | | @Excel(name = "æ£éªé¡¹ID", width = 15) |
| | | @ApiModelProperty(value = "æ£éªé¡¹ID") |
| | | private String itemId; |
| | | /**æåº*/ |
| | | @Excel(name = "æåº", width = 15) |
| | | @ApiModelProperty(value = "æåº") |
| | | private Integer sorter; |
| | | /**æ åå¼*/ |
| | | @Excel(name = "æ åå¼", width = 15) |
| | | @ApiModelProperty(value = "æ åå¼") |
| | | private BigDecimal standardValue; |
| | | /**ä¸å
¬å·®(æå¤§å¼)*/ |
| | | @Excel(name = "ä¸å
¬å·®(æå¤§å¼)", width = 15) |
| | | @ApiModelProperty(value = "ä¸å
¬å·®(æå¤§å¼)") |
| | | private BigDecimal maxValue; |
| | | /**ä¸å
¬å·®(æå°å¼)*/ |
| | | @Excel(name = "ä¸å
¬å·®(æå°å¼)", width = 15) |
| | | @ApiModelProperty(value = "ä¸å
¬å·®(æå°å¼)") |
| | | private BigDecimal minValue; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: æ½æ ·è§å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("qms_sampling_rules") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="qms_sampling_rules对象", description="æ½æ ·è§å") |
| | | public class SamplingRules 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") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag = CommonConstant.DEL_FLAG_0; |
| | | /**è§åç¼ç */ |
| | | @Excel(name = "è§åç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "è§åç¼ç ") |
| | | private String ruleCode; |
| | | /**è§ååç§°*/ |
| | | @Excel(name = "è§ååç§°", width = 15) |
| | | @ApiModelProperty(value = "è§ååç§°") |
| | | private String ruleName; |
| | | /**æ½æ ·åç±»*/ |
| | | @Excel(name = "æ½æ ·åç±»", width = 15) |
| | | @ApiModelProperty(value = "æ½æ ·åç±»") |
| | | @Dict(dicCode = "rule_category") |
| | | private String ruleCategory; |
| | | /**è§åç¶æ*/ |
| | | @Excel(name = "è§åç¶æ", width = 15) |
| | | @ApiModelProperty(value = "è§åç¶æ") |
| | | private String ruleStatus; |
| | | /**æå¤§ä¸åæ ¼æ°*/ |
| | | @Excel(name = "æå¤§ä¸åæ ¼æ°", width = 15) |
| | | @ApiModelProperty(value = "æå¤§ä¸åæ ¼æ°") |
| | | private BigDecimal maxUnqualifiedQuantity; |
| | | /**æ½æ ·æ°é*/ |
| | | @Excel(name = "æ½æ ·æ°é", width = 15) |
| | | @ApiModelProperty(value = "æ½æ ·æ°é") |
| | | private BigDecimal samplingQuantity; |
| | | /**æ¹éä¸éå¼*/ |
| | | @Excel(name = "æ¹éä¸éå¼", width = 15) |
| | | @ApiModelProperty(value = "æ¹éä¸éå¼") |
| | | private BigDecimal batchLowerLimit; |
| | | /**æ¹éä¸éå¼*/ |
| | | @Excel(name = "æ¹éä¸éå¼", width = 15) |
| | | @ApiModelProperty(value = "æ¹éä¸éå¼") |
| | | private BigDecimal batchUpperLimit; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.qms.entity.Defect; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: 缺é·ç»´æ¤ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface DefectMapper extends BaseMapper<Defect> { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.qms.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | */ |
| | | public interface InspectionItemMapper extends BaseMapper<InspectionItem> { |
| | | |
| | | public IPage<Map<String, Object>> queryList(IPage<Map> pageData, @Param(Constants.WRAPPER) Wrapper<Map> wrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.qms.entity.InspectionPlanItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡æ£éªé¡¹ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface InspectionPlanItemMapper extends BaseMapper<InspectionPlanItem> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.qms.entity.InspectionPlan; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface InspectionPlanMapper extends BaseMapper<InspectionPlan> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.qms.entity.SamplingRules; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: æ½æ ·è§å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface SamplingRulesMapper extends BaseMapper<SamplingRules> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.qms.mapper.DefectMapper"> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.qms.mapper.InspectionItemMapper"> |
| | | |
| | | |
| | | <select id="queryList" resultType="map" parameterType="String"> |
| | | SELECT |
| | | t1.id, |
| | | t1.item_code itemCode, |
| | | t1.item_name itemName, |
| | | t1.item_category itemCategory, |
| | | t1.qualitative_or_quantitative qualitativeOrQuantitative, |
| | | t1.inspection_tools inspectionTools, |
| | | t1.item_status itemStatus, |
| | | t1.create_time createTime, |
| | | t2.item_text itemCategoryName, |
| | | t3.item_text qualitativeOrQuantitativeName, |
| | | t1.remark |
| | | FROM |
| | | qms_inspection_item t1 |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'item_category' ) t2 ON t2.item_value = t1.item_category |
| | | left join ( SELECT * FROM v_sys_dict WHERE dict_code = 'qualitative_or_quantitative' ) t3 on t3.item_value = t1.qualitative_or_quantitative |
| | | ${ew.customSqlSegment} |
| | | </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.qms.mapper.InspectionPlanItemMapper"> |
| | | |
| | | </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.qms.mapper.InspectionPlanMapper"> |
| | | |
| | | </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.qms.mapper.SamplingRulesMapper"> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service; |
| | | |
| | | import org.jeecg.modules.qms.entity.Defect; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: 缺é·ç»´æ¤ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IDefectService extends IService<Defect> { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.qms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: æ£éªé¡¹ç® |
| | |
| | | */ |
| | | public interface IInspectionItemService extends IService<InspectionItem> { |
| | | |
| | | IPage<Map<String, Object>> queryList(Integer pageNo, Integer pageSize, Map<String, String> query); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service; |
| | | |
| | | import org.jeecg.modules.qms.entity.InspectionPlanItem; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡æ£éªé¡¹ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IInspectionPlanItemService extends IService<InspectionPlanItem> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service; |
| | | |
| | | import org.jeecg.modules.qms.entity.InspectionPlan; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IInspectionPlanService extends IService<InspectionPlan> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service; |
| | | |
| | | import org.jeecg.modules.qms.entity.SamplingRules; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: æ½æ ·è§å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ISamplingRulesService extends IService<SamplingRules> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service.impl; |
| | | |
| | | import org.jeecg.modules.qms.entity.Defect; |
| | | import org.jeecg.modules.qms.mapper.DefectMapper; |
| | | import org.jeecg.modules.qms.service.IDefectService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: 缺é·ç»´æ¤ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class DefectServiceImpl extends ServiceImpl<DefectMapper, Defect> implements IDefectService { |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.qms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.common.exception.ExceptionCast; |
| | | import org.jeecg.modules.qms.entity.InspectionItem; |
| | | import org.jeecg.modules.qms.mapper.InspectionItemMapper; |
| | | import org.jeecg.modules.qms.service.IInspectionItemService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: æ£éªé¡¹ç® |
| | |
| | | @Service |
| | | public class InspectionItemServiceImpl extends ServiceImpl<InspectionItemMapper, InspectionItem> implements IInspectionItemService { |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> queryList(Integer pageNo, Integer pageSize, Map<String, String> query) { |
| | | if (pageNo == null || pageNo < 1 || pageSize == null || pageSize < 1) { |
| | | ExceptionCast.cast("åæ°é误"); |
| | | } |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | QueryWrapper<Map> queryWrapper = Wrappers.query(); |
| | | if (null != query) { |
| | | String itemCode = query.get("itemCode"); |
| | | if (StringUtils.isNotBlank(itemCode)) { |
| | | queryWrapper.like("t1.item_code", itemCode); |
| | | } |
| | | String itemName = query.get("itemName"); |
| | | if (StringUtils.isNotBlank(itemName)) { |
| | | queryWrapper.like("t2.item_name", itemName); |
| | | } |
| | | |
| | | // æåºåæ³ |
| | | List<OrderItem> orderItems = new ArrayList<>(); |
| | | orderItems.add(OrderItem.desc("t1.create_time")); |
| | | ((Page<Map>) pageData).setOrders(orderItems); |
| | | } |
| | | return super.getBaseMapper().queryList(pageData,queryWrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service.impl; |
| | | |
| | | import org.jeecg.modules.qms.entity.InspectionPlanItem; |
| | | import org.jeecg.modules.qms.mapper.InspectionPlanItemMapper; |
| | | import org.jeecg.modules.qms.service.IInspectionPlanItemService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡æ£éªé¡¹ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class InspectionPlanItemServiceImpl extends ServiceImpl<InspectionPlanItemMapper, InspectionPlanItem> implements IInspectionPlanItemService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service.impl; |
| | | |
| | | import org.jeecg.modules.qms.entity.InspectionPlan; |
| | | import org.jeecg.modules.qms.mapper.InspectionPlanMapper; |
| | | import org.jeecg.modules.qms.service.IInspectionPlanService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: æ£éªæ¹æ¡ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class InspectionPlanServiceImpl extends ServiceImpl<InspectionPlanMapper, InspectionPlan> implements IInspectionPlanService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.qms.service.impl; |
| | | |
| | | import org.jeecg.modules.qms.entity.SamplingRules; |
| | | import org.jeecg.modules.qms.mapper.SamplingRulesMapper; |
| | | import org.jeecg.modules.qms.service.ISamplingRulesService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: æ½æ ·è§å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-02 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class SamplingRulesServiceImpl extends ServiceImpl<SamplingRulesMapper, SamplingRules> implements ISamplingRulesService { |
| | | |
| | | } |