| | |
| | | package org.jeecg.modules.dnc.controller; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "刀具信息") |
| | |
| | | @GetMapping("/getByBusinessId") |
| | | public Result<?> getByBusinessId( Cutter cutter,Integer pageNo,Integer pageSize){ |
| | | return service.query(cutter,pageNo,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 查询刀具List |
| | | * @param cutter |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-查询刀具List") |
| | | @ApiOperation(value = "刀具信息-查询刀具List", notes = "刀具信息-查询刀具List") |
| | | @GetMapping("/getList") |
| | | public Result<?> getList( Cutter cutter){ |
| | | QueryWrapper<Cutter> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq(StrUtil.isNotEmpty(cutter.getDocId()),"doc_id",cutter.getDocId()); |
| | | queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterName()),"cutter_name",cutter.getCutterName()); |
| | | queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterType()),"cutter_type",cutter.getCutterType()); |
| | | queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterSpacing()),"cutter_spacing",cutter.getCutterSpacing()); |
| | | queryWrapper.orderByDesc("create_time"); |
| | | List<Cutter> list = service.list(queryWrapper); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Cutter.class); |
| | | } |
| | | |
| | | /** |
| | | * 提取刀具 |
| | | * @param docId 文档Id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-提取刀具") |
| | | @ApiOperation(value = "刀具信息-提取刀具", notes = "刀具信息-提取刀具") |
| | | @GetMapping("/extractCutterInfo/{docId}/{attributionType}/{attributionId}") |
| | | public Result<?> extractCutterInfo(@PathVariable("docId") String docId |
| | | ,@PathVariable("attributionType") Integer attributionType |
| | | ,@PathVariable("attributionId") String attributionId) { |
| | | return service.extractAndSaveFromContent(docId,attributionId,attributionType); |
| | | } |
| | | |
| | | /** |
| | | * 发送刀具系统 |
| | | * @param docId 文档Id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-发送刀具系统") |
| | | @ApiOperation(value = "刀具信息-发送刀具系统", notes = "刀具信息-发送刀具系统") |
| | | @GetMapping("/sendCutterInfo/{docId}/{attributionType}/{attributionId}") |
| | | public Result<?> sendCutterInfo(@PathVariable("docId") String docId |
| | | ,@PathVariable("attributionType") Integer attributionType |
| | | ,@PathVariable("attributionId") String attributionId) { |
| | | return service.sendToCutterSystem(docId,attributionId,attributionType); |
| | | } |
| | | } |