| | |
| | | return Result.OK(""); |
| | | } |
| | | } |
| | | @GetMapping("/listWithLedgerAndConfig") |
| | | public Result<IPage<StocktakingPoundVo>> listWithLedgerAndConfig( |
| | | StocktakingPoundVo stocktakingPoundVo, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | |
| | | // ä½¿ç¨ QueryGenerator æå»º QueryWrapper |
| | | QueryWrapper<StocktakingPoundVo> queryWrapper = QueryGenerator.initQueryWrapper(stocktakingPoundVo, req.getParameterMap()); |
| | | |
| | | Page<StocktakingPoundVo> page = new Page<>(pageNo, pageSize); |
| | | IPage<StocktakingPoundVo> resultPage = baseToolsService.pageWithLedgerAndConfig(page, queryWrapper); |
| | | return Result.OK(resultPage); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.controller; |
| | | |
| | | import java.util.List; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.tms.entity.ToolSharpening; |
| | | import org.jeecg.modules.tms.service.IToolsSharpeningService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | 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; |
| | | |
| | | /** |
| | | * @Description: åå
·åç£¨è®°å½ æ§å¶å¨ |
| | | * @Author: houjie |
| | | * @Date: 2025-05-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/tms/toolSharpening") |
| | | @Api(tags = "åå
·å磨记å½ç®¡ç") |
| | | public class ToolSharpeningController { |
| | | |
| | | @Autowired |
| | | private IToolsSharpeningService toolSharpeningService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "å页æ¥è¯¢", notes = "å页æ¥è¯¢") |
| | | public Result<IPage<ToolSharpening>> queryPageList(ToolSharpening toolSharpening, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) { |
| | | Page<ToolSharpening> page = new Page<>(pageNo, pageSize); |
| | | QueryWrapper<ToolSharpening> queryWrapper = new QueryWrapper<>(toolSharpening); |
| | | IPage<ToolSharpening> iPage = toolSharpeningService.page(page, queryWrapper); |
| | | return Result.OK(iPage); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æææ°æ® |
| | | */ |
| | | @GetMapping("/all") |
| | | @ApiOperation(value = "æ¥è¯¢æææ°æ®", notes = "æ¥è¯¢æææ°æ®") |
| | | public Result<List<ToolSharpening>> queryAll() { |
| | | List<ToolSharpening> list = toolSharpeningService.list(); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢", notes = "æ ¹æ®IDæ¥è¯¢") |
| | | public Result<ToolSharpening> queryById(@PathVariable String id) { |
| | | ToolSharpening entity = toolSharpeningService.getById(id); |
| | | return Result.OK(entity); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | */ |
| | | @PostMapping |
| | | @ApiOperation(value = "æ°å¢", notes = "æ°å¢") |
| | | public Result<ToolSharpening> add(@RequestBody ToolSharpening toolSharpening) { |
| | | toolSharpeningService.save(toolSharpening); |
| | | return Result.OK(toolSharpening); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ |
| | | */ |
| | | @PutMapping |
| | | @ApiOperation(value = "ä¿®æ¹", notes = "ä¿®æ¹") |
| | | public Result<ToolSharpening> edit(@RequestBody ToolSharpening toolSharpening) { |
| | | toolSharpeningService.updateById(toolSharpening); |
| | | return Result.OK(toolSharpening); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "å é¤", notes = "å é¤") |
| | | public Result<String> delete(@PathVariable String id) { |
| | | toolSharpeningService.removeById(id); |
| | | return Result.OK("å 餿å"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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.apache.shiro.SecurityUtils; |
| | | 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.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.tms.entity.OutboundDetail; |
| | | import org.jeecg.modules.tms.entity.OutboundOrder; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBoundDetail; |
| | | import org.jeecg.modules.tms.entity.vo.OutboundDetailVo; |
| | | import org.jeecg.modules.tms.enums.OutBillStatus; |
| | | import org.jeecg.modules.tms.service.IToolsLossBoundDetailService; |
| | | import org.jeecg.modules.tms.service.IToolsLossBoundService; |
| | | 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.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 javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: æèå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="æèå") |
| | | @RestController |
| | | @RequestMapping("/tms/toolsLossBound") |
| | | public class ToolsLossBoundController extends JeecgController<ToolsLossBound, IToolsLossBoundService> { |
| | | @Autowired |
| | | private IToolsLossBoundService toolsLossBoundService; |
| | | @Autowired |
| | | private IToolsLossBoundDetailService toolsLossBoundDetailService; |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param toolsLossBound |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æèå-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="æèå-å页å表æ¥è¯¢", notes="æèå-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(ToolsLossBound toolsLossBound, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<ToolsLossBound> queryWrapper = QueryGenerator.initQueryWrapper(toolsLossBound, req.getParameterMap()); |
| | | Page<ToolsLossBound> page = new Page<ToolsLossBound>(pageNo, pageSize); |
| | | IPage<ToolsLossBound> pageList = toolsLossBoundService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param toolsLossBound |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æèå-ç¼è¾") |
| | | @ApiOperation(value="æèå-ç¼è¾", notes="æèå-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody ToolsLossBound toolsLossBound) { |
| | | toolsLossBoundService.updateById(toolsLossBound); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | /** |
| | | * æ·»å |
| | | * @param toolsLossBound |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tms_loss_bound-æ·»å ") |
| | | @ApiOperation(value="tms_loss_bound-æ·»å ", notes="tms_loss_bound-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody ToolsLossBound toolsLossBound) { |
| | | toolsLossBoundService.save(toolsLossBound); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | @AutoLog(value = "tms_loss_bound-æ·»å æ¥æç³è¯·å主表åæç»ä¿¡æ¯") |
| | | @ApiOperation(value="tms_loss_bound-æ·»å æ¥æç³è¯·å主表åæç»ä¿¡æ¯", notes="tms_loss_bound-æ·»å æ¥æç³è¯·å主表åæç»ä¿¡æ¯") |
| | | @PostMapping(value = "/addTotal") |
| | | public Result<String> addTotal(@RequestBody ToolsLossBound toolsLossBound) { |
| | | toolsLossBoundService.addTotal(toolsLossBound); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | @AutoLog(value = "tms_loss_bound-ç¼è¾æ¥æå主表åæç»ä¿¡æ¯") |
| | | @ApiOperation(value="tms_loss_bound-ç¼è¾æ¥æå主表åæç»ä¿¡æ¯", notes="tms_loss_bound-ç¼è¾æ¥æå主表åæç»ä¿¡æ¯") |
| | | @RequestMapping(value = "/editTotal", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> editTotal(@RequestBody ToolsLossBound toolsLossBound) { |
| | | toolsLossBoundService.editTotal(toolsLossBound); |
| | | return Result.OK("ç¼è¾æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æ¥æåæç»-éè¿idå é¤") |
| | | @ApiOperation(value="æ¥æåæç»-éè¿idå é¤", notes="æ¥æåæç»-éè¿idå é¤") |
| | | @DeleteMapping(value = "/deleteLootboundDetail") |
| | | public Result<String> deleteLootboundDetail(@RequestParam(name="id",required=true) String id) { |
| | | toolsLossBoundService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æèå-éè¿idå é¤") |
| | | @ApiOperation(value="æèå-éè¿idå é¤", notes="æèå-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | toolsLossBoundService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | @AutoLog(value = "tms_loss_bound-æäº¤æ¥æå") |
| | | @ApiOperation(value="tms_loss_bound-æäº¤æ¥æå", notes="tms_loss_bound-æäº¤æ¥æå") |
| | | @GetMapping(value = "/submit") |
| | | public Result<String> submit(@RequestParam(name="id") String id) { |
| | | |
| | | |
| | | toolsLossBoundService.submintOrder(id); |
| | | return Result.OK("æäº¤æå"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "åºåºç³è¯·åæç»-æ¹éå é¤") |
| | | @ApiOperation(value="åºåºç³è¯·åæç»-æ¹éå é¤", notes="åºåºç³è¯·åæç»-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatchLossboundDetail") |
| | | public Result<String> deleteBatchLossboundDetail(@RequestParam(name="ids",required=true) String ids) { |
| | | this.toolsLossBoundDetailService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "æèå-æ¹éå é¤") |
| | | @ApiOperation(value="æèå-æ¹éå é¤", notes="æèå-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.toolsLossBoundService.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<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | ToolsLossBound toolsLossBound = toolsLossBoundService.getById(id); |
| | | return Result.OK(toolsLossBound); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param toolsLossBound |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, ToolsLossBound toolsLossBound) { |
| | | return super.exportXls(request, toolsLossBound, ToolsLossBound.class, "æèå"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/exportLossboundDetail") |
| | | public ModelAndView exportLossboundDetail(HttpServletRequest request, ToolsLossBoundDetail toolsLossBoundDetail) { |
| | | // Step.1 ç»è£
æ¥è¯¢æ¡ä»¶ |
| | | QueryWrapper<ToolsLossBoundDetail> queryWrapper = QueryGenerator.initQueryWrapper(toolsLossBoundDetail, request.getParameterMap()); |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | // Step.2 è·åå¯¼åºæ°æ® |
| | | List<ToolsLossBoundDetail> pageList = toolsLossBoundDetailService.list(queryWrapper); |
| | | List<ToolsLossBoundDetail> exportList = null; |
| | | |
| | | // è¿æ»¤é䏿°æ® |
| | | String selections = request.getParameter("selections"); |
| | | if (oConvertUtils.isNotEmpty(selections)) { |
| | | List<String> selectionList = Arrays.asList(selections.split(",")); |
| | | exportList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList()); |
| | | } else { |
| | | exportList = pageList; |
| | | } |
| | | |
| | | // Step.3 AutoPoi 导åºExcel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | //æ¤å¤è®¾ç½®çfilenameæ æ,å端ä¼éæ´æ°è®¾ç½®ä¸ä¸ |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "æ¥æåæç»"); |
| | | mv.addObject(NormalExcelConstants.CLASS, OutboundDetail.class); |
| | | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("æ¥æåæç»æ¥è¡¨", "导åºäºº:" + sysUser.getRealname(), "æ¥æåæç»")); |
| | | mv.addObject(NormalExcelConstants.DATA_LIST, exportList); |
| | | return mv; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导å
¥ |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importLossboundDetail/{mainId}") |
| | | public Result<?> importLossboundDetail(HttpServletRequest request, HttpServletResponse response, @PathVariable("mainId") String mainId) { |
| | | 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<ToolsLossBoundDetail> list = ExcelImportUtil.importExcel(file.getInputStream(), ToolsLossBoundDetail.class, params); |
| | | for (ToolsLossBoundDetail temp : list) { |
| | | temp.setLossBoundId(mainId); |
| | | } |
| | | long start = System.currentTimeMillis(); |
| | | toolsLossBoundDetailService.saveBatch(list); |
| | | log.info("æ¶èæ¶é´" + (System.currentTimeMillis() - start) + "毫ç§"); |
| | | 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.error("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, ToolsLossBound.class); |
| | | } |
| | | |
| | | |
| | | /*--------------------------------å表å¤ç-åºåºç³è¯·åæç»-begin----------------------------------------------*/ |
| | | /** |
| | | * éè¿ä¸»è¡¨IDæ¥è¯¢ |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "åºåºç³è¯·åæç»-éè¿ä¸»è¡¨IDæ¥è¯¢") |
| | | @ApiOperation(value="åºæ¥æç³è¯·åæç»-éè¿ä¸»è¡¨IDæ¥è¯¢", notes="åºæ¥æç³è¯·åæç»-éè¿ä¸»è¡¨IDæ¥è¯¢") |
| | | @GetMapping(value = "/listlossboundDetailByMainId") |
| | | public Result<IPage<ToolsLossBoundDetail>> listlossboundDetailByMainId(ToolsLossBoundDetail toolsLossBoundDetail, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | QueryWrapper<ToolsLossBoundDetail> queryWrapper = QueryGenerator.initQueryWrapper(toolsLossBoundDetail, parameterMap); |
| | | Page<ToolsLossBoundDetail> page = new Page<ToolsLossBoundDetail>(pageNo, pageSize); |
| | | IPage<ToolsLossBoundDetail> pageList = toolsLossBoundDetailService.queryPageList(page, parameterMap); |
| | | return Result.OK(pageList); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | 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.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.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.jeecg.modules.tms.entity.BaseTools; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBound; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | import org.jeecg.modules.tms.entity.vo.ToolsStocktakingVo; |
| | | import org.jeecg.modules.tms.enums.OutBillStatus; |
| | | import org.jeecg.modules.tms.mapper.ToolsStocktakingBoundMapper; |
| | | import org.jeecg.modules.tms.service.IToolsStocktakingBoundDetailService; |
| | | import org.jeecg.modules.tms.service.IToolsStocktakingBoundService; |
| | | import org.jeecgframework.poi.excel.ExcelImportUtil; |
| | | import org.jeecgframework.poi.excel.entity.ImportParams; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags = "çç¹å表") |
| | | @RestController |
| | | @RequestMapping("/tms/toolsStocktakingBound") |
| | | @Slf4j |
| | | public class ToolsStocktakingBoundController { |
| | | @Autowired |
| | | private IToolsStocktakingBoundService toolsStocktakingBoundService; |
| | | @Autowired |
| | | private IToolsStocktakingBoundDetailService toolsStocktakingBoundDetailService; |
| | | @Autowired |
| | | private ToolsStocktakingBoundMapper toolsStocktakingBoundMapper; |
| | | |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param toolsStocktakingBound |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "çç¹å表-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "çç¹å表-å页å表æ¥è¯¢", notes = "çç¹å表-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<ToolsStocktakingBound>> queryPageList(ToolsStocktakingBound toolsStocktakingBound, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<ToolsStocktakingBound> queryWrapper = QueryGenerator.initQueryWrapper(toolsStocktakingBound, req.getParameterMap()); |
| | | Page<ToolsStocktakingBound> page = new Page<ToolsStocktakingBound>(pageNo, pageSize); |
| | | IPage<ToolsStocktakingBound> pageList = toolsStocktakingBoundService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param toolsStocktakingBound |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tms_stocktaking_bound-æ·»å ") |
| | | @ApiOperation(value = "tms_stocktaking_bound-æ·»å ", notes = "tms_stocktaking_bound-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<String> add(@RequestBody ToolsStocktakingBound toolsStocktakingBound) { |
| | | toolsStocktakingBound.setApprovalStatus(OutBillStatus.DRAFT.getValue()); |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser != null) { |
| | | toolsStocktakingBound.setHandler(sysUser.getId()); |
| | | } |
| | | toolsStocktakingBound.setOrderCode(businessCodeRuleService.generateBusinessCodeSeq("stocktakingBound")); |
| | | //æ ¡éªç©æå¨åææå¨è½¬åºåä¸åå¨ |
| | | List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList = toolsStocktakingBound.getToolsStocktakingBoundDetailList(); |
| | | |
| | | toolsStocktakingBoundService.save(toolsStocktakingBound); |
| | | for (int i = 0; i < toolsStocktakingBoundDetailList.size(); i++) { |
| | | ToolsStocktakingBoundDetail toolsStocktakingBoundDetail = toolsStocktakingBoundDetailList.get(i); |
| | | toolsStocktakingBoundDetail.setAvailableQuantity(toolsStocktakingBoundDetail.getBookQuantity()); |
| | | toolsStocktakingBoundDetail.setPracticalQuantity(toolsStocktakingBoundDetail.getPracticalQuantity()); |
| | | toolsStocktakingBoundDetail.setSurplusDeficit(toolsStocktakingBoundDetail.getSurplusDeficit()); |
| | | toolsStocktakingBoundDetail.setStocktakingDate(toolsStocktakingBoundDetail.getStocktakingDate()); |
| | | toolsStocktakingBoundDetail.setRemark(toolsStocktakingBoundDetail.getRemark()); |
| | | toolsStocktakingBoundDetail.setToolId(toolsStocktakingBoundDetail.getToolId()); |
| | | toolsStocktakingBoundDetail.setToolCode(toolsStocktakingBoundDetail.getToolCode()); |
| | | toolsStocktakingBoundDetail.setStocktakingBoundId(toolsStocktakingBound.getId()); |
| | | toolsStocktakingBoundDetailService.save(toolsStocktakingBoundDetail); |
| | | } |
| | | return Result.OK(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å·¥å
·çç¹æç»-éè¿ä¸»è¡¨IDæ¥è¯¢", notes = "å·¥å
·çç¹æç»-éè¿ä¸»è¡¨IDæ¥è¯¢") |
| | | @GetMapping(value = "/listToolsStocktakingBoundControllerDetailsByMainId") |
| | | public Result<IPage<ToolsStocktakingBoundDetail>> listToolsStocktakingBoundControllerDetailsByMainId(BaseTools baseTools, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | Map<String, String[]> parameterMap = req.getParameterMap(); |
| | | Page<ToolsStocktakingBoundDetail> page = new Page<ToolsStocktakingBoundDetail>(pageNo, pageSize); |
| | | IPage<ToolsStocktakingBoundDetail> pageList = toolsStocktakingBoundDetailService.selectByMainId(page, parameterMap); |
| | | |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | |
| | | @AutoLog(value = "tms_stocktaking_bound-æäº¤çç¹å") |
| | | @ApiOperation(value = "tms_stocktaking_bound-æäº¤çç¹å", notes = "tms_stocktaking_bound-æäº¤çç¹å") |
| | | @GetMapping(value = "/submit") |
| | | public Result<String> submit(@RequestParam(name = "id") String id) { |
| | | |
| | | |
| | | toolsStocktakingBoundService.submintOrder(id); |
| | | return Result.OK("æäº¤æå"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param toolsStocktakingBound |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç¹å表-ç¼è¾") |
| | | @ApiOperation(value = "çç¹å表-ç¼è¾", notes = "çç¹å表-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<String> edit(@RequestBody ToolsStocktakingBound toolsStocktakingBound) { |
| | | if (toolsStocktakingBound == null || StringUtils.isBlank(toolsStocktakingBound.getId())) { |
| | | return Result.error("åæ°é误"); |
| | | } |
| | | |
| | | toolsStocktakingBoundDetailService.remove(new LambdaQueryWrapper<ToolsStocktakingBoundDetail>() |
| | | .eq(ToolsStocktakingBoundDetail::getStocktakingBoundId, toolsStocktakingBound.getId())); |
| | | |
| | | ToolsStocktakingBound stocktakingBound = new ToolsStocktakingBound(); |
| | | BeanUtils.copyProperties(stocktakingBound, toolsStocktakingBound); |
| | | toolsStocktakingBoundMapper.updateById(stocktakingBound); |
| | | |
| | | |
| | | List<ToolsStocktakingBoundDetail> detailList = toolsStocktakingBound.getToolsStocktakingBoundDetailList(); |
| | | if (CollectionUtils.isEmpty(detailList)) { |
| | | return Result.error("æç»ä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | detailList.forEach(item -> item.setStocktakingBoundId(stocktakingBound.getId())); |
| | | toolsStocktakingBoundDetailService.saveBatch(detailList); |
| | | |
| | | return Result.OK("ç¼è¾æå"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç¹å表-éè¿idå é¤") |
| | | @ApiOperation(value = "çç¹å表-éè¿idå é¤", notes = "çç¹å表-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
| | | toolsStocktakingBoundService.delMain(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "çç¹å表-æ¹éå é¤") |
| | | @ApiOperation(value = "çç¹å表-æ¹éå é¤", notes = "çç¹å表-æ¹éå é¤") |
| | | |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | this.toolsStocktakingBoundService.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<ToolsStocktakingBound> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | ToolsStocktakingBound toolsStocktakingBound = toolsStocktakingBoundService.getById(id); |
| | | if (toolsStocktakingBound == null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(toolsStocktakingBound); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @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<ToolsStocktakingVo> list = ExcelImportUtil.importExcel(file.getInputStream(), ToolsStocktakingVo.class, params); |
| | | for (ToolsStocktakingVo page : list) { |
| | | ToolsStocktakingBound po = new ToolsStocktakingBound(); |
| | | BeanUtils.copyProperties(page, po); |
| | | toolsStocktakingBoundService.saveMain(po, page.getToolsStocktakingBoundDetailList()); |
| | | } |
| | | 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("æä»¶å¯¼å
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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.tms.entity.ToolsStoreEarlyWarning; |
| | | import org.jeecg.modules.tms.service.IToolsStoreEarlyWarningService; |
| | | 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; |
| | | |
| | | /** |
| | | * @Description: tools_store_early warning |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="tools_store_early warning") |
| | | @RestController |
| | | @RequestMapping("/tms/toolsStoreEarlyWarning") |
| | | @Slf4j |
| | | public class ToolsStoreEarlyWarningController extends JeecgController<ToolsStoreEarlyWarning, IToolsStoreEarlyWarningService> { |
| | | @Autowired |
| | | private IToolsStoreEarlyWarningService toolsStoreEarlyWarningService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param tmsStoreEarlyWarning |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "tools_store_early warning-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="tools_store_early warning-å页å表æ¥è¯¢", notes="tools_store_early warning-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<ToolsStoreEarlyWarning>> queryPageList(ToolsStoreEarlyWarning tmsStoreEarlyWarning, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<ToolsStoreEarlyWarning> queryWrapper = QueryGenerator.initQueryWrapper(tmsStoreEarlyWarning, req.getParameterMap()); |
| | | Page<ToolsStoreEarlyWarning> page = new Page<ToolsStoreEarlyWarning>(pageNo, pageSize); |
| | | IPage<ToolsStoreEarlyWarning> pageList = toolsStoreEarlyWarningService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param toolsStoreEarlyWarning |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tools_store_early warning-æ·»å ") |
| | | @ApiOperation(value="tools_store_early warning-æ·»å ", notes="tools_store_early warning-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody ToolsStoreEarlyWarning toolsStoreEarlyWarning) { |
| | | toolsStoreEarlyWarningService.save(toolsStoreEarlyWarning); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param tmsStoreEarlyWarning |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tools_store_early warning-ç¼è¾") |
| | | @ApiOperation(value="tools_store_early warning-ç¼è¾", notes="tools_store_early warning-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody ToolsStoreEarlyWarning tmsStoreEarlyWarning) { |
| | | toolsStoreEarlyWarningService.updateById(tmsStoreEarlyWarning); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tools_store_early warning-éè¿idå é¤") |
| | | @ApiOperation(value="tools_store_early warning-éè¿idå é¤", notes="tools_store_early warning-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:tms_tools_config_property:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | toolsStoreEarlyWarningService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "tools_store_early warning-æ¹éå é¤") |
| | | @ApiOperation(value="tools_store_early warning-æ¹éå é¤", notes="tools_store_early warning-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:tms_tools_config_property:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.toolsStoreEarlyWarningService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "tools_store_early warning-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="tools_store_early warning-éè¿idæ¥è¯¢", notes="tools_store_early warning-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<ToolsStoreEarlyWarning> queryById(@RequestParam(name="id",required=true) String id) { |
| | | ToolsStoreEarlyWarning tmsStoreEarlyWarning = toolsStoreEarlyWarningService.getById(id); |
| | | if(tmsStoreEarlyWarning==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(tmsStoreEarlyWarning); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param tmsStoreEarlyWarning |
| | | */ |
| | | //@RequiresPermissions("tools_tools_config_property:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, ToolsStoreEarlyWarning tmsStoreEarlyWarning) { |
| | | return super.exportXls(request, tmsStoreEarlyWarning, ToolsStoreEarlyWarning.class, "tools_store_early warning"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("tools_tools_config_property:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, ToolsStoreEarlyWarning.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: tms_tool_sharpening |
| | | * @Author: houjie |
| | | * @Date: 2025-05-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("tms_tool_sharpening") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="ToolSharpening对象", description="åå
·å磨记å½å®ä½ç±»") |
| | | public class ToolSharpening implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®ID */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®ID") |
| | | private String id; |
| | | |
| | | /** å·¥å
·ç¼ç */ |
| | | @ApiModelProperty(value = "å·¥å
·ç¼ç ") |
| | | private String toolCode; |
| | | |
| | | /** å·¥å
·ç¼å· */ |
| | | @ApiModelProperty(value = "å·¥å
·ç¼å·") |
| | | private String toolId; |
| | | |
| | | /** å磨æ¶é´ */ |
| | | @ApiModelProperty(value = "å磨æ¶é´") |
| | | private Date sharpeningTime; |
| | | |
| | | /** åç£¨ç»æå建议 */ |
| | | @ApiModelProperty(value = "åç£¨ç»æå建议") |
| | | private String sharpeningResult; |
| | | |
| | | /** 责任人 */ |
| | | @ApiModelProperty(value = "责任人") |
| | | private String responsiblePerson; |
| | | |
| | | /** 夿³¨ */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | /** ç§æ·å· */ |
| | | @ApiModelProperty(value = "ç§æ·å·") |
| | | private String tenantId; |
| | | |
| | | /** å建人 */ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | |
| | | /** å建æ¶é´ */ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | |
| | | /** æ´æ°äºº */ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | |
| | | /** æ´æ°æ¶é´ */ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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 java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: æèå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | |
| | | @ApiModel(value = "tms_loss_bound对象", description = "æèå") |
| | | @Data |
| | | @TableName("tms_loss_bound") |
| | | public class ToolsLossBound implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | |
| | | /** |
| | | * losser |
| | | */ |
| | | @Excel(name = "æ¥æäºº", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | @ApiModelProperty(value = "losser") |
| | | private String losser; |
| | | |
| | | /** |
| | | * æ¥æåå· |
| | | */ |
| | | @Excel(name = "orderCode", width = 15) |
| | | @ApiModelProperty(value = "orderCode") |
| | | private String orderCode; |
| | | |
| | | /** |
| | | * ç»æäºº |
| | | */ |
| | | @Excel(name = "ç»æäºº", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | @ApiModelProperty(value = "ç»æäºº") |
| | | private String handler; |
| | | |
| | | /** |
| | | * æ¥ææ¶é´ |
| | | */ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ¥ææ¶é´") |
| | | private java.util.Date lossTime; |
| | | |
| | | /** |
| | | * å®¡æ ¸äºº |
| | | */ |
| | | @Excel(name = "å®¡æ ¸äºº", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | @ApiModelProperty(value = "reviewer") |
| | | @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") |
| | | private String reviewer; |
| | | /** |
| | | * å®¡æ ¸æ¶é´ |
| | | */ |
| | | @Excel(name = "approvalDate", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å®¡æ ¸æ¶é´") |
| | | private java.util.Date approvalDate; |
| | | /** |
| | | * å®¡æ ¸ç¶æ |
| | | */ |
| | | @Excel(name = "orderStatus", width = 15) |
| | | @ApiModelProperty(value = "orderStatus") |
| | | @Dict(dicCode = "out_bill_status") |
| | | private String orderStatus; |
| | | /** |
| | | * å®¡æ ¸æè§ |
| | | */ |
| | | @Excel(name = "approvalOpinion", width = 15) |
| | | @ApiModelProperty(value = "approvalOpinion") |
| | | private String approvalOpinion; |
| | | /** |
| | | * æ¥æåå |
| | | */ |
| | | @Excel(name = "lossReason", width = 15) |
| | | @ApiModelProperty(value = "lossReason") |
| | | private String lossReason; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "remark", width = 15) |
| | | @ApiModelProperty(value = "remark") |
| | | private String remark; |
| | | /** |
| | | * ç§æ·å· |
| | | */ |
| | | @Excel(name = "tenantId", width = 15) |
| | | @ApiModelProperty(value = "tenantId") |
| | | private String tenantId; |
| | | |
| | | |
| | | /**å建人*/ |
| | | @Excel(name = "createdBy", width = 15) |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "createTime") |
| | | private Date createTime; |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @Excel(name = "updateBy", width = 15) |
| | | @ApiModelProperty(value = "updateBy") |
| | | private String updateBy; |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "updateTime") |
| | | private Date updateTime; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private List<ToolsLossBoundDetail> toolsLossBoundDetailList; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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 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-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | |
| | | @ApiModel(value = "tms_loss_bound_detail对象", description = "æèåæç»") |
| | | @Data |
| | | @TableName("tms_loss_bound_detail") |
| | | public class ToolsLossBoundDetail implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | |
| | | /** |
| | | * å·¥å
·ç¼ç |
| | | */ |
| | | @Excel(name = "toolCode", width = 15) |
| | | @ApiModelProperty(value = "toolCode") |
| | | private String toolCode; |
| | | /** |
| | | * å·¥å
·ç¼å· |
| | | */ |
| | | @Excel(name = "toolId", width = 15) |
| | | @ApiModelProperty(value = "toolId") |
| | | private String toolId; |
| | | /** |
| | | * æ¥æåå |
| | | */ |
| | | @Excel(name = "lossReason", width = 15) |
| | | @ApiModelProperty(value = "lossReason") |
| | | private String lossReason; |
| | | /** |
| | | * æ¥ææ°é |
| | | */ |
| | | @Excel(name = "lossNumber", width = 15) |
| | | @ApiModelProperty(value = "lossNumber") |
| | | private java.math.BigDecimal lossNumber; |
| | | /** |
| | | * åå¨ä½ç½®ï¼åºä½å·ï¼ |
| | | */ |
| | | @Excel(name = "goodsShelvesId", width = 15) |
| | | @ApiModelProperty(value = "goodsShelvesId") |
| | | private String goodsShelvesId; |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | @Excel(name = "inStoreDate", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "inStoreDate") |
| | | private Date inStoreDate; |
| | | /** |
| | | * ç§æ·å· |
| | | */ |
| | | @Excel(name = "tenantId", width = 15) |
| | | @ApiModelProperty(value = "tenantId") |
| | | private String tenantId; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @Excel(name = "createBy", width = 15) |
| | | @ApiModelProperty(value = "createBy") |
| | | private String createBy; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "createTime") |
| | | private Date createTime; |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @Excel(name = "updateBy", width = 15) |
| | | @ApiModelProperty(value = "updateBy") |
| | | private String updateBy; |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "updateTime") |
| | | private Date updateTime; |
| | | /** |
| | | * æ¥æåå· |
| | | */ |
| | | @Excel(name = "lossBoundId", width = 15) |
| | | @ApiModelProperty(value = "lossBoundId") |
| | | private String lossBoundId; |
| | | |
| | | |
| | | @Dict(dictTable = "tms_tools_classify" , dicText = "type_name", dicCode = "id") |
| | | @TableField(exist = false) |
| | | private String classifyId; |
| | | |
| | | @TableField(exist = false) |
| | | private String paramaTableName; |
| | | |
| | | @TableField(exist = false) |
| | | private String foreignLanguageName; |
| | | |
| | | @TableField(exist = false) |
| | | private String chineseName; |
| | | |
| | | @TableField(exist = false) |
| | | private String supplierId; |
| | | |
| | | @TableField(exist = false) |
| | | private String storageLocation; |
| | | |
| | | @TableField(exist = false) |
| | | private String toolMaterial; |
| | | |
| | | @TableField(exist = false) |
| | | private String toolModel; |
| | | /** |
| | | * åºä½å· |
| | | */ |
| | | @TableField(exist = false) |
| | | private String positionCode; |
| | | |
| | | @TableField(exist = false) |
| | | @Dict(dicCode = "application_type") |
| | | private String applicationType; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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 java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @ApiModel(value="tms_stocktaking_bound对象", description="çç¹å表") |
| | | @Data |
| | | @TableName("tms_stocktaking_bound") |
| | | public class ToolsStocktakingBound 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 java.util.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 java.util.Date updateTime; |
| | | /**çç¹ç±»å*/ |
| | | @Excel(name = "çç¹ç±»å", width = 15) |
| | | @ApiModelProperty(value = "çç¹ç±»å") |
| | | private Integer stocktakingType; |
| | | /**çç¹åå·*/ |
| | | @Excel(name = "çç¹åå·", width = 15) |
| | | @ApiModelProperty(value = "çç¹åå·") |
| | | private String orderCode; |
| | | /**ç»æäºº*/ |
| | | @Excel(name = "ç»æäºº", width = 15) |
| | | @ApiModelProperty(value = "ç»æäºº") |
| | | @Dict(dicCode = "sys_user, realname, id") |
| | | private String handler; |
| | | /**å®¡æ ¸äºº*/ |
| | | @Excel(name = "å®¡æ ¸äºº", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸äºº") |
| | | @Dict(dicCode = "sys_user, realname, id") |
| | | private String reviewer; |
| | | /**çç¹åç§°*/ |
| | | @Excel(name = "çç¹åç§°", width = 15) |
| | | @ApiModelProperty(value = "çç¹åç§°") |
| | | private String stocktakingName; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /**å®¡æ ¸ç¶æ*/ |
| | | @Excel(name = "å®¡æ ¸ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸ç¶æ") |
| | | @Dict(dicCode = "approval_status") |
| | | private String approvalStatus; |
| | | /**å®¡æ ¸æè§*/ |
| | | @Excel(name = "å®¡æ ¸æè§", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸æè§") |
| | | private String approvalOpinion; |
| | | /**çç¹æ¶é´*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "çç¹æ¶é´") |
| | | private java.util.Date inventoryTime; |
| | | |
| | | @TableField(exist = false) |
| | | private List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @Description: çç¹åæç» |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @ApiModel(value="tms_stocktaking_bound_detail对象", description="çç¹åæç»") |
| | | @Data |
| | | @TableName("tms_stocktaking_bound_detail") |
| | | public class ToolsStocktakingBoundDetail implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | |
| | | /**çç¹åid*/ |
| | | @ApiModelProperty(value = "çç¹åid") |
| | | private String stocktakingBoundId; |
| | | |
| | | /**å建人*/ |
| | | @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 java.util.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 java.util.Date updateTime; |
| | | /**å·¥å
·ç¼ç */ |
| | | @Excel(name = "å·¥å
·ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "å·¥å
·ç¼ç ") |
| | | private String toolCode; |
| | | /**å·¥å
·ç¼å·*/ |
| | | @Excel(name = "å·¥å
·ç¼å·", width = 15) |
| | | @ApiModelProperty(value = "å·¥å
·ç¼å·") |
| | | private String toolId; |
| | | /**åºåå·*/ |
| | | @ApiModelProperty(value = "åºåå·") |
| | | private String goodsShelvesId; |
| | | /**è´¦å·æ°é*/ |
| | | @Excel(name = "è´¦é¢æ°é", width = 15) |
| | | @ApiModelProperty(value = "è´¦é¢æ°é") |
| | | private java.math.BigDecimal bookQuantity; |
| | | /**å¯ç¨æ°é*/ |
| | | @Excel(name = "å¯ç¨æ°é", width = 15) |
| | | @ApiModelProperty(value = "å¯ç¨æ°é") |
| | | private java.math.BigDecimal availableQuantity; |
| | | /**å®çæ°é*/ |
| | | @Excel(name = "å®çæ°é", width = 15) |
| | | @ApiModelProperty(value = "å®çæ°é") |
| | | private java.math.BigDecimal practicalQuantity; |
| | | /**çäºçç*/ |
| | | @Dict(dicCode = "surplusDeficit") |
| | | @Excel(name = "çäºçç", width = 15) |
| | | @ApiModelProperty(value = "çäºçç") |
| | | private String surplusDeficit; |
| | | /**çåºæ¶é´*/ |
| | | @Excel(name = "çåºæ¶é´", width = 20, format = "yyyy-MM-dd") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "çåºæ¶é´") |
| | | private java.util.Date stocktakingDate; |
| | | /**ç§æ·å·*/ |
| | | @Excel(name = "ç§æ·å·", width = 15) |
| | | @ApiModelProperty(value = "ç§æ·å·") |
| | | private String tenantId; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /**å·®å¼å¼*/ |
| | | @Excel(name = "å·®å¼å¼", width = 15) |
| | | @ApiModelProperty(value = "å·®å¼å¼") |
| | | private String differenceValue; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private String paramaTableName; |
| | | |
| | | @TableField(exist = false) |
| | | private String foreignLanguageName; |
| | | |
| | | @TableField(exist = false) |
| | | private String chineseName; |
| | | |
| | | @TableField(exist = false) |
| | | private String supplierId; |
| | | |
| | | @TableField(exist = false) |
| | | private String storageLocation; |
| | | |
| | | @TableField(exist = false) |
| | | private String toolMaterial; |
| | | |
| | | @TableField(exist = false) |
| | | private String toolModel; |
| | | /** |
| | | * åºä½å· |
| | | */ |
| | | @TableField(exist = false) |
| | | private String positionCode; |
| | | |
| | | |
| | | @Dict(dictTable = "tms_tools_classify" , dicText = "type_name", dicCode = "id") |
| | | @TableField(exist = false) |
| | | private String classifyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.entity; |
| | | |
| | | import java.io.Serializable; |
| | | 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 lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * @Description: tools_store_early warning |
| | | * @Author: HOUJIE |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("tools_store_early warning") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="tms_tools_config_property对象", description="tools_store_early warning") |
| | | public class ToolsStoreEarlyWarning implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å·¥å
·ç¼å·*/ |
| | | @Excel(name = "å·¥å
·ç¼å·", width = 15) |
| | | @ApiModelProperty(value = "å·¥å
·ç¼å·") |
| | | private String toolId; |
| | | /**䏿åç§°*/ |
| | | @Excel(name = "å·¥å
·ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "å·¥å
·ç¼ç ") |
| | | private String toolCode; |
| | | |
| | | /**åå®¶*/ |
| | | @Excel(name = "åå®¶", width = 15) |
| | | @ApiModelProperty(value = "åå®¶") |
| | | private String supplierId; |
| | | |
| | | /**æè´¨*/ |
| | | @Excel(name = "æè´¨", width = 15) |
| | | @ApiModelProperty(value = "æè´¨") |
| | | private String toolMaterial; |
| | | |
| | | |
| | | /**åå¨ä½ç½®ï¼åé£ä¸ªååºçåºï¼*/ |
| | | @Excel(name = "åå¨ä½ç½®ï¼", width = 15) |
| | | @ApiModelProperty(value = "åå¨ä½ç½®") |
| | | private String goodsShelvesId; |
| | | |
| | | |
| | | /**æ»åºåæ°é*/ |
| | | @Excel(name = "æ»åºåæ°é", width = 15) |
| | | @ApiModelProperty(value = "æ»åºåæ°é") |
| | | private BigDecimal totalCount; |
| | | |
| | | /**å¯ç¨åºåæ°é*/ |
| | | @Excel(name = "å¯ç¨åºåæ°é", width = 15) |
| | | @ApiModelProperty(value = "å¯ç¨åºåæ°é") |
| | | private BigDecimal availableQuantity; |
| | | |
| | | /**åºåä¸é*/ |
| | | @Excel(name = "åºåä¸é", width = 15) |
| | | @ApiModelProperty(value = "åºåä¸é") |
| | | private BigDecimal lowerInventory; |
| | | /**åºåä¸é*/ |
| | | @Excel(name = "åºåä¸é", width = 15) |
| | | @ApiModelProperty(value = "åºåä¸é") |
| | | private String highestInventory; |
| | | |
| | | |
| | | @Excel(name = "ç¶æ;1å·²å¤çï¼2.æªå¤ç", width = 15) |
| | | @ApiModelProperty(value = "ç¶æ;1å·²å¤çï¼2.æªå¤ç") |
| | | private String status; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /**ç§æ·å·*/ |
| | | @Excel(name = "ç§æ·å·", width = 15) |
| | | @ApiModelProperty(value = "ç§æ·å·") |
| | | private String tenantId; |
| | | /**å建人*/ |
| | | @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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.entity.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class StocktakingPoundVo { |
| | | private String id; |
| | | private String classifyId; |
| | | private String toolCode; |
| | | private String foreignLanguageName; |
| | | private String standardLevel; |
| | | private String standardCode; |
| | | private String toolModel; |
| | | private String paramaTableName; |
| | | private Integer totalCount; |
| | | private Integer availableCount; |
| | | @Dict(dicCode = "application_type") |
| | | private String applicationType; |
| | | private String chineseName; |
| | | private String supplierId; |
| | | private String storageLocation; |
| | | private String mainUnit; |
| | | private String toolId; |
| | | private String positionCode; |
| | | // æ¥èªä¸ååæ°è¡¨çåæ®µ |
| | | private String toolMaterial; |
| | | private String partMaterial; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.entity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.jeecgframework.poi.excel.annotation.ExcelCollection; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @ApiModel(value="tools_stocktaking_bound对象", description="çç¹å表") |
| | | public class ToolsStocktakingVo { |
| | | |
| | | /**主é®*/ |
| | | @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 = "çç¹ç±»å") |
| | | private Integer stocktakingType; |
| | | /**çç¹åå·*/ |
| | | @Excel(name = "çç¹åå·", width = 15) |
| | | @ApiModelProperty(value = "çç¹åå·") |
| | | private String orderCode; |
| | | /**ç»æäºº*/ |
| | | @Excel(name = "ç»æäºº", width = 15) |
| | | @ApiModelProperty(value = "ç»æäºº") |
| | | private String handler; |
| | | /**å®¡æ ¸äºº*/ |
| | | @Excel(name = "å®¡æ ¸äºº", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸äºº") |
| | | private String reviewer; |
| | | /**çç¹åç§°*/ |
| | | @Excel(name = "çç¹åç§°", width = 15) |
| | | @ApiModelProperty(value = "çç¹åç§°") |
| | | private String stocktakingName; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /**å®¡æ ¸ç¶æ*/ |
| | | @Excel(name = "å®¡æ ¸ç¶æ", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸ç¶æ") |
| | | private String approvalStatus; |
| | | /**å®¡æ ¸æè§*/ |
| | | @Excel(name = "å®¡æ ¸æè§", width = 15) |
| | | @ApiModelProperty(value = "å®¡æ ¸æè§") |
| | | private String approvalOpinion; |
| | | /**çç¹æ¶é´*/ |
| | | @Excel(name = "çç¹æ¶é´", width = 15, format = "yyyy-MM-dd") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "çç¹æ¶é´") |
| | | private Date inventoryTime; |
| | | |
| | | @ExcelCollection(name="çç¹åæç»") |
| | | @ApiModelProperty(value = "çç¹åæç»") |
| | | private List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList; |
| | | |
| | | } |
| | |
| | | IPage<ParaBladeVo> paraBladeList(Page<ParaBladeVo> page, |
| | | @Param(Constants.WRAPPER) Wrapper<ParaBladeVo> queryWrapper); |
| | | |
| | | IPage<StocktakingPoundVo> pageWithLedgerAndConfig(Page<StocktakingPoundVo> page, @Param(Constants.WRAPPER) Wrapper<StocktakingPoundVo> wrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBoundDetail; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: æèåæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ToolsLossBoundDetailMapper extends BaseMapper<ToolsLossBoundDetail> { |
| | | |
| | | |
| | | /** |
| | | * éè¿ä¸»è¡¨idå é¤åè¡¨æ°æ® |
| | | * |
| | | * @param mainId 主表id |
| | | * @return boolean |
| | | */ |
| | | public boolean deleteByMainId(@Param("mainId") String mainId); |
| | | |
| | | /** |
| | | * éè¿ä¸»è¡¨idæ¥è¯¢åè¡¨æ°æ® |
| | | * |
| | | * @param mainId 主表id |
| | | * @return List<ToolsLossBoundDetail> |
| | | */ |
| | | public List<ToolsLossBoundDetail> selectByMainId(@Param("mainId") String mainId); |
| | | |
| | | IPage<ToolsLossBoundDetail> queryPageList(Page<ToolsLossBoundDetail> page, |
| | | @Param(Constants.WRAPPER) Wrapper<ToolsLossBoundDetail> queryWrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | |
| | | /** |
| | | * @Description: æèå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ToolsLossBoundMapper extends BaseMapper<ToolsLossBound> { |
| | | |
| | | IPage<ToolsLossBound> queryPageList(Page<ToolsLossBound> page, |
| | | @Param(Constants.WRAPPER) Wrapper<ToolsLossBound> queryWrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.jeecg.modules.tms.entity.ToolSharpening; |
| | | |
| | | /** |
| | | * @Description: tms_tool_sharpening Mapper æ¥å£ |
| | | * @Author: ä¾¯æ° |
| | | * @Date: 2025-05-10 |
| | | */ |
| | | public interface ToolsSharpeningMapper extends BaseMapper<ToolSharpening> { |
| | | // å¯èªå®ä¹æ¥è¯¢æ¹æ³ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.tms.entity.ToolsClassify; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface ToolsStocktakingBoundDetailMapper extends BaseMapper<ToolsStocktakingBoundDetail> { |
| | | |
| | | /** |
| | | * éè¿ä¸»è¡¨idå é¤åè¡¨æ°æ® |
| | | * |
| | | * @param mainId 主表id |
| | | * @return boolean |
| | | */ |
| | | public boolean deleteByMainId(@Param("mainId") String mainId); |
| | | |
| | | |
| | | /** |
| | | * éè¿ä¸»è¡¨idå é¤åè¡¨æ°æ® |
| | | * |
| | | * @param mainId 主表id |
| | | * @return boolean |
| | | */ |
| | | public String getParamaTableNameByMainId(@Param("mainId") String mainId); |
| | | /** |
| | | * éè¿ä¸»è¡¨idæ¥è¯¢åè¡¨æ°æ® |
| | | * |
| | | * @param |
| | | * @return List<ToolsStocktakingBoundDetail> |
| | | */ |
| | | IPage<ToolsStocktakingBoundDetail> selectByMainId(Page<ToolsStocktakingBoundDetail> page, |
| | | @Param(Constants.WRAPPER) Wrapper<ToolsStocktakingBoundDetail> queryWrapper); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBound; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ToolsStocktakingBoundMapper extends BaseMapper<ToolsStocktakingBound> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.jeecg.modules.tms.entity.ToolsStoreEarlyWarning; |
| | | |
| | | /** |
| | | * @Description: tools_store_early warning |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface ToolsStoreEarlyWarningMapper extends BaseMapper<ToolsStoreEarlyWarning> { |
| | | |
| | | } |
| | |
| | | LEFT JOIN tms_tools_classify t3 ON t3.id = t.classify_id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="pageWithLedgerAndConfig" resultType="org.jeecg.modules.tms.entity.vo.StocktakingPoundVo"> |
| | | SELECT |
| | | t.id, |
| | | t.classify_id AS classifyId, |
| | | t.tool_code AS toolCode, |
| | | t.foreign_language_name AS foreignLanguageName, |
| | | t.standard_level AS standardLevel, |
| | | t.standard_code AS standardCode, |
| | | t.tool_model AS toolModel, |
| | | t.parama_table_name AS paramaTableName, |
| | | t.tool_id AS toolId, |
| | | t1.total_count AS totalCount, |
| | | t1.available_count AS availableCount, |
| | | t4.position_code AS positionCode, |
| | | t3.application_type AS applicationType, |
| | | t3.chinese_name AS chineseName, |
| | | t3.supplier_id AS supplierId, |
| | | t3.storage_location AS storageLocation, |
| | | t3.main_unit AS mainUnit, |
| | | |
| | | <!-- 卿忮µéæ©ï¼ä½¿ç¨è¡¨å«åï¼éç¡®ä¿è¡¨å·²å
³èï¼ --> |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | c.tool_material AS toolMaterial, |
| | | c.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | h.tool_material AS toolMaterial, |
| | | h.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | th.tool_material AS toolMaterial, |
| | | th.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | m.tool_material AS toolMaterial, |
| | | m.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | tr.tool_material AS toolMaterial, |
| | | tr.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | b.tool_material AS toolMaterial, |
| | | b.part_material AS partMaterial |
| | | </when> |
| | | <!-- é»è®¤æ
åµï¼paramaTableName ä¸ºç©ºææªä¼ éæ¶ï¼å
³è tms_para_common_tool 表 --> |
| | | <otherwise> |
| | | c.tool_material AS toolMaterial, |
| | | c.part_material AS partMaterial |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | FROM tms_base_tools t |
| | | LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id |
| | | LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id |
| | | LEFT JOIN tms_tool_ledger_detail t4 ON t4.tool_code = t.id |
| | | |
| | | <!-- å¨æè¡¨å
³èï¼ç¡®ä¿æææ
åµé½æå¯¹åºç LEFT JOIN --> |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | LEFT JOIN tms_para_hole_tools h ON h.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | LEFT JOIN tms_para_threading_tool th ON th.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | LEFT JOIN tms_para_mill_tool m ON m.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | LEFT JOIN tms_para_turning_tools tr ON tr.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | LEFT JOIN tms_para_blade b ON b.tool_code = t.id |
| | | </when> |
| | | <!-- é»è®¤æ
åµï¼æ·»å LEFT JOIN tms_para_common_tool c --> |
| | | <otherwise> |
| | | LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | <where> |
| | | <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''"> |
| | | AND t.tool_code LIKE CONCAT('%', #{ew.paramNameValuePairs.toolCode}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY t.create_time DESC |
| | | </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.tms.mapper.ToolsLossBoundDetailMapper"> |
| | | <delete id="deleteByMainId" parameterType="java.lang.String"> |
| | | DELETE |
| | | FROM tms_loss_bound_detail |
| | | WHERE loss_bound_id = #{mainId} |
| | | </delete> |
| | | |
| | | <select id="selectByMainId" parameterType="java.lang.String" |
| | | resultType="org.jeecg.modules.tms.entity.ToolsLossBoundDetail"> |
| | | SELECT * |
| | | FROM tms_loss_bound_detail |
| | | WHERE loss_bound_id = #{mainId} |
| | | </select> |
| | | <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.ToolsLossBoundDetail"> |
| | | SELECT |
| | | t1.*, |
| | | t2.chinese_name chineseName, |
| | | t2.tool_model toolModel, |
| | | t2.classify_id classifyId, |
| | | t2.parama_table_name paramaTableName, |
| | | t3.application_type applicationType, |
| | | t3.supplier_id supplierId, |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | t4.tool_material toolMaterial, |
| | | t4.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | t5.tool_material toolMaterial, |
| | | t5.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | t6.tool_material toolMaterial, |
| | | t6.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | t7.tool_material toolMaterial, |
| | | t7.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | t8.tool_material toolMaterial, |
| | | t8.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | t9.tool_material toolMaterial, |
| | | t9.part_material partMaterial |
| | | </when> |
| | | <otherwise> |
| | | t10.tool_material toolMaterial, |
| | | t10.part_material partMaterial |
| | | </otherwise> |
| | | </choose> |
| | | FROM tms_loss_bound_detail t1 |
| | | LEFT JOIN tms_base_tools t2 on t1.tool_id = t2.id |
| | | LEFT JOIN tms_tools_config_property t3 on t3.tool_code = t2.id |
| | | |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | LEFT JOIN tms_para_common_tool t4 on t4.tool_code = t2.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | LEFT JOIN tms_para_hole_tools t5 on t5.tool_code = t2.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | LEFT JOIN tms_para_threading_tool t6 on t6.tool_code = t2.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | LEFT JOIN tms_para_mill_tool t7 on t7.tool_code = t2.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | LEFT JOIN tms_para_turning_tools t8 on t8.tool_code = t2.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | LEFT JOIN tms_para_blade t9 on t9.tool_code = t2.id |
| | | </when> |
| | | <otherwise> |
| | | LEFT JOIN tms_para_common_tool t10 on t10.tool_code = t2.id |
| | | </otherwise> |
| | | </choose> |
| | | ${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.tms.mapper.ToolsLossBoundMapper"> |
| | | <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.ToolsLossBound"> |
| | | SELECT |
| | | t.* |
| | | FROM tms_loss_bound t |
| | | ${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.tms.mapper.ToolsSharpeningMapper"> |
| | | |
| | | </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.tms.mapper.ToolsStocktakingBoundDetailMapper"> |
| | | |
| | | <delete id="deleteByMainId" parameterType="java.lang.String"> |
| | | DELETE |
| | | FROM tools_stocktaking_bound_detail |
| | | WHERE goods_shelves_id = #{mainId} |
| | | </delete> |
| | | <select id="getParamaTableNameByMainId" parameterType="string" resultType="string"> |
| | | SELECT t1.parama_table_name |
| | | FROM tools_stocktaking_bound_detail t |
| | | LEFT JOIN tms_base_tools t1 ON t1.tool_id = t.id |
| | | WHERE t.goods_shelves_id = #{mainId} |
| | | </select> |
| | | |
| | | <select id="selectByMainId" resultType="org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail"> |
| | | SELECT |
| | | t.*, |
| | | t2.tool_code AS toolCode, <!-- ä¿®æ£ï¼å°t1æ¹ä¸ºt2 --> |
| | | t2.parama_table_name paramaTableName, |
| | | t2.classify_id AS classifyId, |
| | | t3.storage_location AS storageLocation, |
| | | t3.chinese_name AS chineseName, |
| | | t2.tool_model AS toolModel, |
| | | t3.supplier_id AS supplierId, |
| | | |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | c.tool_material AS toolMaterial, |
| | | c.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | h.tool_material AS toolMaterial, |
| | | h.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | th.tool_material AS toolMaterial, |
| | | th.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | m.tool_material AS toolMaterial, |
| | | m.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | tr.tool_material AS toolMaterial, |
| | | tr.part_material AS partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | b.tool_material AS toolMaterial, |
| | | b.part_material AS partMaterial |
| | | </when> |
| | | <!-- é»è®¤æ
åµï¼paramaTableName ä¸ºç©ºææªä¼ éæ¶ï¼å
³è tms_para_common_tool 表 --> |
| | | <otherwise> |
| | | c.tool_material AS toolMaterial, |
| | | c.part_material AS partMaterial |
| | | </otherwise> |
| | | </choose> |
| | | FROM tms_stocktaking_bound_detail t |
| | | LEFT JOIN tms_base_tools t2 on t.tool_id = t2.id |
| | | LEFT JOIN tms_tools_config_property t3 on t3.tool_code = t2.id |
| | | |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | LEFT JOIN tms_para_hole_tools h ON h.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | LEFT JOIN tms_para_threading_tool th ON th.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | LEFT JOIN tms_para_mill_tool m ON m.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | LEFT JOIN tms_para_turning_tools tr ON tr.tool_code = t.id |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | LEFT JOIN tms_para_blade b ON b.tool_code = t.id |
| | | </when> |
| | | <!-- é»è®¤æ
åµï¼æ·»å LEFT JOIN tms_para_common_tool c --> |
| | | <otherwise> |
| | | LEFT JOIN tms_para_common_tool c ON c.tool_code = t.id |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | ${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.tms.mapper.ToolsStocktakingBoundMapper"> |
| | | |
| | | </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.tms.mapper.ToolsStoreEarlyWarningMapper"> |
| | | |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.tms.entity.BaseTools; |
| | |
| | | IPage<ParaTurningToolsVo> paraTurningToolsList(Page<ParaTurningToolsVo> page, Map<String, String[]> parameterMap); |
| | | |
| | | IPage<ParaBladeVo> paraBladeList(Page<ParaBladeVo> page, Map<String, String[]> parameterMap); |
| | | IPage<StocktakingPoundVo> pageWithLedgerAndConfig(Page<StocktakingPoundVo> page, QueryWrapper<StocktakingPoundVo> queryWrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.tms.entity.OutboundDetail; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBoundDetail; |
| | | import org.jeecg.modules.tms.entity.vo.OutboundDetailVo; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: æèåæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IToolsLossBoundDetailService extends IService<ToolsLossBoundDetail> { |
| | | IPage<ToolsLossBoundDetail> queryPageList(Page<ToolsLossBoundDetail> page, Map<String, String[]> parameterMap); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: æèåæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IToolsLossBoundService extends IService<ToolsLossBound> { |
| | | |
| | | |
| | | /** |
| | | * å é¤ä¸å¯¹å¤ |
| | | * |
| | | * @param id |
| | | */ |
| | | public void delMain (String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¸å¯¹å¤ |
| | | * |
| | | * @param idList |
| | | */ |
| | | public void delBatchMain (Collection<? extends Serializable> idList); |
| | | |
| | | |
| | | void addTotal(ToolsLossBound toolsLossBound); |
| | | |
| | | IPage<ToolsLossBound> queryPageList(Page<ToolsLossBound> page, Map<String, String[]> parameterMap); |
| | | |
| | | void editTotal(ToolsLossBound toolsLossBound); |
| | | |
| | | /** |
| | | * æäº¤æ¥æå |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean submintOrder(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | import org.jeecg.modules.tms.entity.ToolSharpening; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: åå
·åç£¨è®°å½ Service æ¥å£ |
| | | * @Author: ä¾¯æ° |
| | | * @Date: 2025-05-10 |
| | | */ |
| | | public interface IToolsSharpeningService extends IService<ToolSharpening> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: çç¹åæç» |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IToolsStocktakingBoundDetailService extends IService<ToolsStocktakingBoundDetail> { |
| | | |
| | | |
| | | /** |
| | | * éè¿ä¸»è¡¨idæ¥è¯¢åè¡¨æ°æ® |
| | | * |
| | | * @param |
| | | * @return List<ToolsStocktakingBoundDetail> |
| | | */ |
| | | public IPage<ToolsStocktakingBoundDetail> selectByMainId(Page<ToolsStocktakingBoundDetail> page, Map<String, String[]> parameterMap); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBound; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IToolsStocktakingBoundService extends IService<ToolsStocktakingBound> { |
| | | |
| | | /** |
| | | * æ·»å ä¸å¯¹å¤ |
| | | * |
| | | * @param toolsStocktakingBound |
| | | * @param toolsStocktakingBoundDetailList |
| | | */ |
| | | public void saveMain(ToolsStocktakingBound toolsStocktakingBound, List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸å¯¹å¤ |
| | | * |
| | | * @param toolsStocktakingBound |
| | | * @param toolsStocktakingBoundDetailList |
| | | */ |
| | | public void updateMain(ToolsStocktakingBound toolsStocktakingBound, List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList); |
| | | |
| | | /** |
| | | * å é¤ä¸å¯¹å¤ |
| | | * |
| | | * @param id |
| | | */ |
| | | public void delMain(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¸å¯¹å¤ |
| | | * |
| | | * @param idList |
| | | */ |
| | | public void delBatchMain(Collection<? extends Serializable> idList); |
| | | |
| | | /** |
| | | * æäº¤çç¹å |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean submintOrder(String id); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.tms.entity.ToolsStoreEarlyWarning; |
| | | |
| | | /** |
| | | * @Description: tools_store_early warning |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IToolsStoreEarlyWarningService extends IService<ToolsStoreEarlyWarning> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.tms.entity.BaseTools; |
| | | import org.jeecg.modules.tms.entity.ParaCommonTool; |
| | | import org.jeecg.modules.tms.entity.vo.*; |
| | | import org.jeecg.modules.tms.mapper.BaseToolsMapper; |
| | | import org.jeecg.modules.tms.service.IBaseToolsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | queryWrapper.orderByDesc("t.create_time"); |
| | | return this.baseMapper.paraBladeList(page, queryWrapper); |
| | | } |
| | | @Override |
| | | public IPage<StocktakingPoundVo> pageWithLedgerAndConfig(Page<StocktakingPoundVo> page, QueryWrapper<StocktakingPoundVo> queryWrapper) { |
| | | return baseMapper.pageWithLedgerAndConfig(page, queryWrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.tms.entity.OutboundDetail; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBoundDetail; |
| | | import org.jeecg.modules.tms.entity.vo.OutboundDetailVo; |
| | | import org.jeecg.modules.tms.mapper.ToolsLossBoundDetailMapper; |
| | | import org.jeecg.modules.tms.service.IToolsLossBoundDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: æèåæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class ToolsLossBoundDetailServiceImpl extends ServiceImpl<ToolsLossBoundDetailMapper, ToolsLossBoundDetail> implements IToolsLossBoundDetailService { |
| | | |
| | | @Override |
| | | public IPage<ToolsLossBoundDetail> queryPageList(Page<ToolsLossBoundDetail> page, Map<String, String[]> parameterMap) { |
| | | QueryWrapper<ToolsLossBoundDetail> queryWrapper = Wrappers.query(); |
| | | String[] outStorehouseIds = parameterMap.get("lossBoundId"); |
| | | if (outStorehouseIds != null && outStorehouseIds.length > 0) { |
| | | queryWrapper.eq("t1.loss_bound_id", outStorehouseIds[0]); |
| | | } |
| | | return this.baseMapper.queryPageList(page, queryWrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBound; |
| | | import org.jeecg.modules.tms.entity.ToolsLossBoundDetail; |
| | | import org.jeecg.modules.tms.enums.OutBillStatus; |
| | | import org.jeecg.modules.tms.mapper.ToolsLossBoundDetailMapper; |
| | | import org.jeecg.modules.tms.mapper.ToolsLossBoundMapper; |
| | | import org.jeecg.modules.tms.service.IToolsLossBoundDetailService; |
| | | import org.jeecg.modules.tms.service.IToolsLossBoundService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Description: æèå |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-21 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service("IToolsLossBoundService") |
| | | public class ToolsLossBoundServiceImpl extends ServiceImpl<ToolsLossBoundMapper, ToolsLossBound> implements IToolsLossBoundService, FlowCallBackServiceI { |
| | | |
| | | @Autowired |
| | | private ToolsLossBoundMapper baseMapper; |
| | | |
| | | @Autowired |
| | | private ToolsLossBoundDetailMapper baseDetailMapper; |
| | | @Autowired |
| | | private IToolsLossBoundDetailService toolsLossBoundDetailService; |
| | | @Resource |
| | | private FlowCommonService flowCommonService; |
| | | @Resource |
| | | private IFlowDefinitionService flowDefinitionService; |
| | | @Autowired |
| | | private IFlowTaskService flowTaskService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | |
| | | @Override |
| | | public void delMain(String id) { |
| | | baseDetailMapper.deleteByMainId(id); |
| | | baseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delBatchMain(Collection<? extends Serializable> idList) { |
| | | for (Serializable id : idList) { |
| | | baseDetailMapper.deleteByMainId(id.toString()); |
| | | baseMapper.deleteById(id); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void addTotal(ToolsLossBound toolsLossBound) { |
| | | LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (loginUser != null){ |
| | | toolsLossBound.setHandler(loginUser.getId()); |
| | | } |
| | | toolsLossBound.setOrderCode(businessCodeRuleService.generateBusinessCodeSeq("LossBound")); |
| | | toolsLossBound.setOrderStatus(OutBillStatus.DRAFT.getValue()); |
| | | save(toolsLossBound); |
| | | |
| | | List<ToolsLossBoundDetail> detailList = toolsLossBound.getToolsLossBoundDetailList(); |
| | | List<ToolsLossBoundDetail> newDetailList = new ArrayList<>(); |
| | | |
| | | if (CollectionUtils.isNotEmpty(detailList)) { |
| | | detailList.forEach(item -> { |
| | | item.setLossBoundId(toolsLossBound.getId()); |
| | | newDetailList.add(item); |
| | | }); |
| | | |
| | | toolsLossBoundDetailService.saveBatch(newDetailList); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public IPage<ToolsLossBound> queryPageList(Page<ToolsLossBound> page, Map<String, String[]> parameterMap) { |
| | | QueryWrapper<ToolsLossBound> queryWrapper = Wrappers.query(); |
| | | String[] orderCode = parameterMap.get("orderCode"); |
| | | if (orderCode != null && orderCode.length > 0) { |
| | | queryWrapper.like("t.order_code", orderCode[0]); |
| | | } |
| | | String[] statuses = parameterMap.get("orderStatus"); |
| | | if (statuses != null && statuses.length > 0) { |
| | | queryWrapper.eq("t.order_status", statuses[0]); |
| | | } |
| | | return this.baseMapper.queryPageList(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void editTotal(ToolsLossBound toolsLossBound) { |
| | | //å 餿ææç» |
| | | toolsLossBoundDetailService.remove(new LambdaQueryWrapper<ToolsLossBoundDetail>() |
| | | .eq(ToolsLossBoundDetail::getLossBoundId, toolsLossBound.getId())); |
| | | ToolsLossBound toolsLossBound1 = BeanUtil.copyProperties(toolsLossBound, ToolsLossBound.class); |
| | | this.baseMapper.updateById(toolsLossBound1); |
| | | List<ToolsLossBoundDetail> detailList = CollectionUtil.newArrayList(); |
| | | toolsLossBound.getToolsLossBoundDetailList().forEach(item -> { |
| | | item.setLossBoundId(toolsLossBound1.getId()); |
| | | detailList.add(item); |
| | | }); |
| | | toolsLossBoundDetailService.saveBatch(detailList); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public boolean submintOrder(String id) { |
| | | |
| | | ToolsLossBound toolsLossBound = this.getById(id); |
| | | if (toolsLossBound == null) { |
| | | return false; |
| | | } else { |
| | | toolsLossBound.setReviewer(toolsLossBound.getReviewer()); |
| | | |
| | | flowCommonService.initActBusiness("æ¥æåå·:" + toolsLossBound.getOrderCode() + ";æ¥æäºº: " + toolsLossBound.getLosser() + ";è¿è¡æ¥æ", |
| | | toolsLossBound.getId(), "IToolsStocktakingBoundService", "tools_Loss_Approval", null); |
| | | Map<String, Object> variables = new HashMap<>(); |
| | | variables.put("dataId", toolsLossBound.getId()); |
| | | if (StrUtil.isEmpty(toolsLossBound.getReviewer())) { |
| | | variables.put("organization", "æ°å¢å·¥å
·æ¥æåé»è®¤å¯å¨æµç¨"); |
| | | variables.put("comment", "æ°å¢å·¥å
·æ¥æåé»è®¤å¯å¨æµç¨"); |
| | | } else { |
| | | variables.put("organization", toolsLossBound.getLossReason()); |
| | | variables.put("comment", toolsLossBound.getLossReason()); |
| | | } |
| | | variables.put("proofreading", true); |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(toolsLossBound.getReviewer()); |
| | | variables.put("NextAssignee", usernames); |
| | | Result result = flowDefinitionService.startProcessInstanceByKey("tools_Loss_Approval", variables); |
| | | if (result != null) { |
| | | toolsLossBound.setLossTime(new Date()); |
| | | toolsLossBound.setOrderStatus(OutBillStatus.SUBMITTED.getValue()); |
| | | //ä¿åå·¥å |
| | | baseMapper.updateById(toolsLossBound); |
| | | return result.isSuccess(); |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ |
| | | business.getValues();//åç«¯ä¼ è¿æ¥çåæ° |
| | | business.getActStatus(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getBusinessDataById(String dataId) { |
| | | return this.getById(dataId); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { |
| | | Object object = values.get("NextAssignee"); |
| | | return (List<String>) object; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | import org.jeecg.modules.tms.entity.ToolSharpening; |
| | | import org.jeecg.modules.tms.mapper.ToolsSharpeningMapper; |
| | | import org.jeecg.modules.tms.service.IToolsSharpeningService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: åå
·åç£¨è®°å½ Service å®ç°ç±» |
| | | * @Author: yourName |
| | | * @Date: 2025-05-10 |
| | | */ |
| | | @Service |
| | | public class ToolsSharpeningServiceImpl extends ServiceImpl<ToolsSharpeningMapper, ToolSharpening> implements IToolsSharpeningService { |
| | | // å¦éæ©å±é»è¾å¯å¨æ¤æ·»å |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | import org.jeecg.modules.tms.mapper.ToolsStocktakingBoundDetailMapper; |
| | | import org.jeecg.modules.tms.service.IToolsStocktakingBoundDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: çç¹åæç» |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class ToolsStocktakingBoundDetailServiceImpl extends ServiceImpl<ToolsStocktakingBoundDetailMapper, ToolsStocktakingBoundDetail> implements IToolsStocktakingBoundDetailService { |
| | | |
| | | @Autowired |
| | | private ToolsStocktakingBoundDetailMapper toolsStocktakingBoundDetailMapper; |
| | | |
| | | public IPage<ToolsStocktakingBoundDetail> selectByMainId(Page<ToolsStocktakingBoundDetail> page, Map<String, String[]> parameterMap) { |
| | | QueryWrapper<ToolsStocktakingBoundDetail> queryWrapper = Wrappers.query(); |
| | | |
| | | String[] stocktakingBoundIds = parameterMap.get("stocktakingBoundId"); |
| | | if (stocktakingBoundIds != null && stocktakingBoundIds.length > 0) { |
| | | queryWrapper.eq("t.stocktaking_bound_id", stocktakingBoundIds[0]); |
| | | } |
| | | return toolsStocktakingBoundDetailMapper.selectByMainId(page, queryWrapper); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecg.modules.tms.entity.BaseTools; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBound; |
| | | import org.jeecg.modules.tms.entity.ToolsStocktakingBoundDetail; |
| | | import org.jeecg.modules.tms.enums.OutBillStatus; |
| | | import org.jeecg.modules.tms.mapper.ToolsStocktakingBoundDetailMapper; |
| | | import org.jeecg.modules.tms.mapper.ToolsStocktakingBoundMapper; |
| | | import org.jeecg.modules.tms.service.IToolsStocktakingBoundService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Description: çç¹å表 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | |
| | | @Service("IToolsStocktakingBoundService") |
| | | public class ToolsStocktakingBoundServiceImpl extends ServiceImpl<ToolsStocktakingBoundMapper, ToolsStocktakingBound> implements IToolsStocktakingBoundService, FlowCallBackServiceI { |
| | | |
| | | |
| | | @Autowired |
| | | private ISysUserService systemUserService; |
| | | @Autowired |
| | | private ToolsStocktakingBoundMapper toolsStocktakingBoundMapper; |
| | | @Autowired |
| | | private ToolsStocktakingBoundDetailMapper toolsStocktakingBoundDetailMapper; |
| | | @Resource |
| | | private FlowCommonService flowCommonService; |
| | | @Resource |
| | | private IFlowDefinitionService flowDefinitionService; |
| | | @Autowired |
| | | private IFlowTaskService flowTaskService; |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveMain(ToolsStocktakingBound toolsStocktakingBound, List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList) { |
| | | toolsStocktakingBoundMapper.insert(toolsStocktakingBound); |
| | | if (toolsStocktakingBoundDetailList != null && toolsStocktakingBoundDetailList.size() > 0) { |
| | | for (ToolsStocktakingBoundDetail entity : toolsStocktakingBoundDetailList) { |
| | | //å¤é®è®¾ç½® |
| | | entity.setGoodsShelvesId(toolsStocktakingBound.getId()); |
| | | toolsStocktakingBoundDetailMapper.insert(entity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateMain(ToolsStocktakingBound toolsStocktakingBound, List<ToolsStocktakingBoundDetail> toolsStocktakingBoundDetailList) { |
| | | toolsStocktakingBoundMapper.updateById(toolsStocktakingBound); |
| | | |
| | | //1.å
å é¤åè¡¨æ°æ® |
| | | toolsStocktakingBoundDetailMapper.deleteByMainId(toolsStocktakingBound.getId()); |
| | | |
| | | //2.åè¡¨æ°æ®éæ°æå
¥ |
| | | if (toolsStocktakingBoundDetailList != null && toolsStocktakingBoundDetailList.size() > 0) { |
| | | for (ToolsStocktakingBoundDetail entity : toolsStocktakingBoundDetailList) { |
| | | //å¤é®è®¾ç½® |
| | | entity.setGoodsShelvesId(toolsStocktakingBound.getId()); |
| | | toolsStocktakingBoundDetailMapper.insert(entity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delMain(String id) { |
| | | toolsStocktakingBoundDetailMapper.deleteByMainId(id); |
| | | toolsStocktakingBoundMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delBatchMain(Collection<? extends Serializable> idList) { |
| | | for (Serializable id : idList) { |
| | | toolsStocktakingBoundDetailMapper.deleteByMainId(id.toString()); |
| | | toolsStocktakingBoundMapper.deleteById(id); |
| | | } |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean submintOrder(String id) { |
| | | |
| | | ToolsStocktakingBound toolsStocktakingBound = this.getById(id); |
| | | if (toolsStocktakingBound == null) { |
| | | return false; |
| | | } else { |
| | | toolsStocktakingBound.setReviewer(toolsStocktakingBound.getReviewer()); |
| | | //ä¿®æ¹ç¶æ |
| | | // toolsStocktakingBound.setApprovalStatus(OutBillStatus.SUBMITTED.getValue()); |
| | | flowCommonService.initActBusiness("çç¹åå·:" + toolsStocktakingBound.getOrderCode() + ";çç¹åç§°: " + toolsStocktakingBound.getStocktakingName() + ";è¿è¡çç¹", |
| | | toolsStocktakingBound.getId(), "IToolsStocktakingBoundService", "tools_stocktaking_bound", null); |
| | | Map<String, Object> variables = new HashMap<>(); |
| | | variables.put("dataId", toolsStocktakingBound.getId()); |
| | | if (StrUtil.isEmpty(toolsStocktakingBound.getReviewer())) { |
| | | variables.put("organization", "æ°å¢å·¥å
·çç¹åé»è®¤å¯å¨æµç¨"); |
| | | variables.put("comment", "æ°å¢å·¥å
·çç¹åé»è®¤å¯å¨æµç¨"); |
| | | } else { |
| | | variables.put("organization", toolsStocktakingBound.getRemark()); |
| | | variables.put("comment", toolsStocktakingBound.getRemark()); |
| | | } |
| | | variables.put("proofreading", true); |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(toolsStocktakingBound.getReviewer()); |
| | | variables.put("NextAssignee", usernames); |
| | | Result result = flowDefinitionService.startProcessInstanceByKey("tools_stocktaking_bound", variables); |
| | | if (result != null) { |
| | | toolsStocktakingBound.setInventoryTime(new Date()); |
| | | toolsStocktakingBound.setApprovalStatus(OutBillStatus.SUBMITTED.getValue()); |
| | | //ä¿åå·¥å |
| | | toolsStocktakingBoundMapper.updateById(toolsStocktakingBound); |
| | | return result.isSuccess(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ |
| | | business.getValues();//åç«¯ä¼ è¿æ¥çåæ° |
| | | business.getActStatus(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getBusinessDataById(String dataId) { |
| | | return this.getById(dataId); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { |
| | | Object object = values.get("NextAssignee"); |
| | | return (List<String>) object; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.tms.entity.ToolsStoreEarlyWarning; |
| | | import org.jeecg.modules.tms.mapper.ToolsStoreEarlyWarningMapper; |
| | | import org.jeecg.modules.tms.service.IToolsStoreEarlyWarningService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @Description: tools_store_early warning |
| | | * @Author: houjie |
| | | * @Date: 2025-05-16 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class ToolsStoreEarlyWarningServiceImpl extends ServiceImpl<ToolsStoreEarlyWarningMapper, ToolsStoreEarlyWarning> implements IToolsStoreEarlyWarningService { |
| | | |
| | | } |