| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationDto; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationTreeDto; |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | import com.ruoyi.warehouse.service.DocumentClassificationService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | public class DocumentClassificationController extends BaseController { |
| | | @Autowired |
| | | private DocumentClassificationService documentClassificationService; |
| | | //æ ç»æ |
| | | @GetMapping("/getList") |
| | | @ApiOperation("ææ¡£åç±»-æ¥è¯¢") |
| | | @Log(title = "ææ¡£åç±»-æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult getList() { |
| | | return AjaxResult.success(documentClassificationService.list()); |
| | | public List<DocumentClassificationTreeDto> getList(DocumentClassificationDto documentClassificationDto) { |
| | | return documentClassificationService.selectDocumentClassificationList(documentClassificationDto); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation("ææ¡£åç±»-æ·»å ") |
| | |
| | | public AjaxResult add(@RequestBody DocumentClassification documentClassification) { |
| | | return AjaxResult.success(documentClassificationService.save(documentClassification)); |
| | | } |
| | | @PostMapping("/update") |
| | | @PutMapping("/update") |
| | | @ApiOperation("ææ¡£åç±»-æ´æ°") |
| | | @Log(title = "ææ¡£åç±»-æ´æ°", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DocumentClassification documentClassification) { |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @Autowired |
| | | private DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("ææ¡£åé
管ç-å页æ¥è¯¢") |
| | | @Log(title = "ææ¡£åé
管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ææ¡£åé
管ç-åé
å页æ¥è¯¢") |
| | | @Log(title = "ææ¡£åé
管ç-åé
å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | IPage<DocumentationBorrowManagement> listPage = documentationBorrowManagementService.listPage(page, documentationBorrowManagement); |
| | | return AjaxResult.success(listPage); |
| | | return AjaxResult.success(documentationBorrowManagementService.listPage(page, documentationBorrowManagement)); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation("ææ¡£åé
管ç-æ·»å ") |
| | | @Log(title = "ææ¡£åé
管ç-æ·»å ", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ææ¡£åé
管ç-åé
") |
| | | @Log(title = "ææ¡£åé
管ç-åé
", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.add(documentationBorrowManagement)); |
| | | } |
| | | @PostMapping("/update") |
| | | @PutMapping("/revent") |
| | | @ApiOperation("ææ¡£åé
管ç-å½è¿") |
| | | @Log(title = "ææ¡£åé
管ç-å½è¿", businessType = BusinessType.UPDATE) |
| | | public AjaxResult reventdbm(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.reventdbm(documentationBorrowManagement)); |
| | | } |
| | | @PutMapping("/update") |
| | | @ApiOperation("ææ¡£åé
管ç-æ´æ°") |
| | | @Log(title = "ææ¡£åé
管ç-æ´æ°", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | // documentationBorrowManagementService.updateById(documentationBorrowManagement); |
| | | return AjaxResult.success(documentationBorrowManagementService.updateById(documentationBorrowManagement)); |
| | | } |
| | | @PostMapping("/delete") |
| | | @ApiOperation("ææ¡£åé
管ç-å é¤") |
| | | @Log(title = "ææ¡£åé
管ç-å é¤", businessType = BusinessType.DELETE) |
| | | @DeleteMapping ("/delete") |
| | | @ApiOperation("ææ¡£åé
管ç-åé
å é¤") |
| | | @Log(title = "ææ¡£åé
管ç-åé
å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(documentationBorrowManagementService.deleteByIds(ids)); |
| | | } |
| | | @DeleteMapping ("/reventDelete") |
| | | @ApiOperation("ææ¡£åé
管ç-å½è¿å é¤") |
| | | @Log(title = "ææ¡£åé
管ç-å½è¿å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult reventdelete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(documentationBorrowManagementService.reventDeleteByIds(ids)); |
| | | } |
| | | @PostMapping("/export") |
| | | @ApiOperation("ææ¡£åé
管ç-导åº") |
| | | @Log(title = "ææ¡£åé
管ç-导åº", businessType = BusinessType.EXPORT) |
| | | @ApiOperation("ææ¡£åé
管ç-åé
导åº") |
| | | @Log(title = "ææ¡£åé
管ç-åé
导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response,DocumentationBorrowManagement documentationBorrowManagement) { |
| | | String borrowStatus = documentationBorrowManagement.getBorrowStatus(); |
| | | List<DocumentationBorrowManagement> documentationBorrowManagements = documentationBorrowManagementMapper.selectList(new LambdaQueryWrapper<DocumentationBorrowManagement>().eq(DocumentationBorrowManagement::getBorrowStatus, borrowStatus)); |
| | | ExcelUtil<DocumentationBorrowManagement> util = new ExcelUtil<>(DocumentationBorrowManagement.class); |
| | | util.exportExcel(response, documentationBorrowManagements, "ææ¡£åé
-å½è¿è®°å½"); |
| | | documentationBorrowManagementService.export(response,documentationBorrowManagement); |
| | | } |
| | | @PostMapping("/exportrevent") |
| | | @ApiOperation("ææ¡£åé
管ç-å½è¿å¯¼åº") |
| | | @Log(title = "ææ¡£åé
管ç-å½è¿å¯¼åº", businessType = BusinessType.EXPORT) |
| | | public void exportrevent(HttpServletResponse response,DocumentationBorrowManagement documentationBorrowManagement) { |
| | | documentationBorrowManagementService.exportrevent(response,documentationBorrowManagement); |
| | | // List<DocumentationBorrowManagement> documentationBorrowManagements = documentationBorrowManagementMapper.selectList(new LambdaQueryWrapper<DocumentationBorrowManagement>().eq(DocumentationBorrowManagement::getBorrowStatus, "å½è¿")); |
| | | // ExcelUtil<DocumentationBorrowManagement> util = new ExcelUtil<>(DocumentationBorrowManagement.class); |
| | | // util.exportExcel(response, documentationBorrowManagements, "ææ¡£åé
-å½è¿è®°å½"); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | |
| | | @ApiOperation("ææ¡£ä¿¡æ¯è¡¨-å页æ¥è¯¢") |
| | | @Log(title = "ææ¡£ä¿¡æ¯è¡¨-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, Documentation documentation) { |
| | | IPage<Documentation> listPage = documentationService.listPage(page, documentation); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation("ææ¡£ä¿¡æ¯è¡¨") |
| | | @Log(title = "ææ¡£ä¿¡æ¯è¡¨", businessType = BusinessType.OTHER) |
| | | public AjaxResult list() { |
| | | List<Documentation> list = documentationService.list(); |
| | | List<DocumentationDto> list = documentationService.listPage(page, documentation); |
| | | return AjaxResult.success(list); |
| | | } |
| | | @PostMapping("/add") |
| | |
| | | public AjaxResult add(@RequestBody Documentation documentation) { |
| | | return AjaxResult.success(documentationService.save(documentation)); |
| | | } |
| | | @PostMapping("/update") |
| | | @PutMapping("/update") |
| | | @ApiOperation("ææ¡£ä¿¡æ¯è¡¨-æ´æ°") |
| | | @Log(title = "ææ¡£ä¿¡æ¯è¡¨-æ´æ°", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody Documentation documentation) { |
| | | return AjaxResult.success(documentationService.updateById(documentation)); |
| | | } |
| | | @PostMapping("/delete") |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("ææ¡£ä¿¡æ¯è¡¨-å é¤") |
| | | @Log(title = "ææ¡£ä¿¡æ¯è¡¨-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(documentationService.removeBatchByIds(ids)); |
| | | return AjaxResult.success(documentationService.deleteByIds(ids)); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation("ææ¡£ä¿¡æ¯è¡¨-导åº") |
| | | @Log(title = "ææ¡£ä¿¡æ¯è¡¨-导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | documentationService.export(response); |
| | | public void export(HttpServletResponse response,Documentation documentation ) { |
| | | documentationService.export(response,documentation); |
| | | } |
| | | //é件详æ
|
| | | // @GetMapping("/getDocumentation") |
| | | // public Documentation getDocumentation(Documentation documentation) { |
| | | // return documentationService.getById(id); |
| | | // } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountFile; |
| | | import com.ruoyi.account.service.AccountFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import com.ruoyi.warehouse.service.DocumentationFileService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ææ¡£éä»¶ |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/documentation/documentationFile") |
| | | public class DocumentationFileController { |
| | | |
| | | |
| | | @Resource |
| | | private DocumentationFileService documentationFileService; |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * @param documentationFile |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.save(documentationFile)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delDocumentationFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | //å 餿£éªéä»¶ |
| | | return AjaxResult.success(documentationFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢ |
| | | * @param page |
| | | * @param documentationFile |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult documentationFileListPage(Page page, DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.documentationFileListPage(page, documentationFile)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public class WarehouseController extends BaseController { |
| | | @Autowired |
| | | private WarehouseService warehouseService; |
| | | |
| | | @GetMapping("/tree") |
| | | @ApiOperation("ä»åº-æ¥è¯¢æ ") |
| | | @Log(title = "ä»åº-æ¥è¯¢æ ", businessType = BusinessType.OTHER) |
| | | public AjaxResult listTree() { |
| | | return AjaxResult.success(warehouseService.findListTree()); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation("ä»åº-æ¥è¯¢") |
| | | @Log(title = "ä»åº-æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(@RequestBody Warehouse warehouse) { |
| | | return AjaxResult.success(warehouseService.listPage( warehouse)); |
| | | public AjaxResult list(Warehouse warehouse) { |
| | | return AjaxResult.success(warehouseService.findList(warehouse)); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation("ä»åº-æ·»å ") |
| | |
| | | return AjaxResult.success(warehouseService.save(warehouse)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @PutMapping("/update") |
| | | @ApiOperation("ä»åº-æ´æ°") |
| | | @Log(title = "ä»åº-æ´æ°", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody Warehouse warehouse) { |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @GetMapping("/listById") |
| | | @ApiOperation("ååè´§æ¶-æ¥è¯¢") |
| | | @Log(title = "ååè´§æ¶-æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listById(Long warehouseId) { |
| | | List<WarehouseGoodsShelves> list = warehouseGoodsShelvesService.list(new QueryWrapper<WarehouseGoodsShelves>().lambda() |
| | | .eq(WarehouseGoodsShelves::getWarehouseId, warehouseId)); |
| | | public AjaxResult listById(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) { |
| | | List<WarehouseGoodsShelves> list = warehouseGoodsShelvesService.findList(warehouseGoodsShelves); |
| | | return AjaxResult.success(list); |
| | | } |
| | | @PostMapping("/add") |
| | |
| | | public AjaxResult add(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) { |
| | | return AjaxResult.success(warehouseGoodsShelvesService.add(warehouseGoodsShelves)); |
| | | } |
| | | @PostMapping("/update") |
| | | @PutMapping("/update") |
| | | @ApiOperation("ååè´§æ¶-æ´æ°") |
| | | @Log(title = "ååè´§æ¶-æ´æ°", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) { |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | 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.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class WarehouseGoodsShelvesRowcolController extends BaseController { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @GetMapping("/list") |
| | | @ApiOperation("ååè´§æ¶è¡å-æ¥è¯¢") |
| | | @Log(title = "ååè´§æ¶è¡å-æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Long warehouseGoodsShelvesId) { |
| | | List<WarehouseGoodsShelvesRowcol> list = warehouseGoodsShelvesRowcolService.list(new QueryWrapper<WarehouseGoodsShelvesRowcol>().lambda() |
| | | .eq(WarehouseGoodsShelvesRowcol::getWarehouseGoodsShelvesId, warehouseGoodsShelvesId)); |
| | | public AjaxResult list(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | |
| | | List<WarehouseGoodsShelvesRowcolDto> list = warehouseGoodsShelvesRowcolService.getList(warehouseGoodsShelvesRowcol); |
| | | return AjaxResult.success(list); |
| | | } |
| | | // @GetMapping("/listPage") |
| | | // @ApiOperation("ååè´§æ¶è¡å-å页æ¥è¯¢") |
| | | // @Log(title = "ååè´§æ¶è¡å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | // public AjaxResult listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | // IPage<WarehouseGoodsShelvesRowcol> listPage = warehouseGoodsShelvesRowcolService.listPage(page, warehouseGoodsShelvesRowcol); |
| | | // return AjaxResult.success(listPage); |
| | | // } |
| | | // @PostMapping("/add") |
| | | // @ApiOperation("ååè´§æ¶è¡å-æ·»å ") |
| | | // @Log(title = "ååè´§æ¶è¡å-æ·»å ", businessType = BusinessType.INSERT) |
| | | // public AjaxResult add(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | // return AjaxResult.success(warehouseGoodsShelvesRowcolService.save(warehouseGoodsShelvesRowcol)); |
| | | // } |
| | | // @PostMapping("/update") |
| | | // @ApiOperation("ååè´§æ¶è¡å-æ´æ°") |
| | | // @Log(title = "ååè´§æ¶è¡å-æ´æ°", businessType = BusinessType.UPDATE) |
| | | // public AjaxResult update(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | // return AjaxResult.success(warehouseGoodsShelvesRowcolService.updateById(warehouseGoodsShelvesRowcol)); |
| | | // } |
| | | // @PostMapping("/delete") |
| | | // @ApiOperation("ååè´§æ¶è¡å-å é¤") |
| | | // @Log(title = "ååè´§æ¶è¡å-å é¤", businessType = BusinessType.DELETE) |
| | | // public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | // if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | // return AjaxResult.success(warehouseGoodsShelvesRowcolService.removeByIds(ids)); |
| | | // } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DocumentClassificationDto extends DocumentClassification { |
| | | |
| | | private List<DocumentClassification> documentClassificationList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DocumentClassificationTreeDto { |
| | | private Long id; |
| | | private Long parentId; |
| | | private String category; |
| | | private List<DocumentClassificationTreeDto> children; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DocumentationBorrowManagementDto extends DocumentationBorrowManagement { |
| | | /** |
| | | * ææ¡£åç§° |
| | | */ |
| | | @Excel(name = "ææ¡£åç§°") |
| | | private String docName; |
| | | /** |
| | | * åé
人 |
| | | */ |
| | | @Excel(name = "åé
人") |
| | | private String nickName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DocumentationDto extends Documentation { |
| | | /** |
| | | * ç±»å«åç§° |
| | | */ |
| | | @Excel(name = "ç±»å«åç§°") |
| | | private String category; |
| | | /** |
| | | * ä½ç½®ä¿¡æ¯ |
| | | */ |
| | | @Excel(name = "ä½ç½®ä¿¡æ¯") |
| | | private String locationInfo; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.time.LocalDateTime; |
| | | |
| | | public class ReturnExportDto { |
| | | |
| | | private String id; // è®°å½ç¼å· |
| | | @Excel(name = "ææ¡£åç§°") |
| | | private String docName; // ææ¡£åç§° |
| | | @Excel(name = "ååé
人") |
| | | private String nickName; // åé
人 |
| | | @Excel(name = "å½è¿æ¶é´", dateFormat = "yyyy-MM-dd", width = 30) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime borrowTime; // åé
æ¶é´ï¼å¯è½éè¦ä¿çï¼ |
| | | @Excel(name = "å½è¿äºº") |
| | | @NotBlank(message = "å½è¿äººä¸è½ä¸ºç©º!!") |
| | | private String returnNickName; // å½è¿äºº |
| | | @Excel(name = "å½è¿æ¶é´", dateFormat = "yyyy-MM-dd", width = 30) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime updateTime; // å½è¿æ¶é´ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.warehouse.pojo.*; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseDto extends Warehouse { |
| | | |
| | | private String goodsShelvesName; |
| | | private String category; |
| | | // private List<DocumentationDto> documentationList; |
| | | // private List<WarehouseGoodsShelvesRowcolDto> warehouseGoodsShelvesRowcolList; |
| | | private List<WarehouseGoodsShelvesDto> warehouseGoodsShelvesList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class WarehouseGoodsShelvesDto extends WarehouseGoodsShelves { |
| | | private String warehouseName; |
| | | private String goodsShelvesName; |
| | | // private List<DocumentationDto> documentationList; |
| | | private List<WarehouseGoodsShelvesRowcolDto> warehouseGoodsShelvesRowcolList; |
| | | private String category; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseGoodsShelvesRowcolDto extends WarehouseGoodsShelvesRowcol { |
| | | private String warehouseName; |
| | | private String goodsShelvesName; |
| | | private List<DocumentationDto> documentationList; |
| | | private String category; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseTreeDto { |
| | | private Long id; |
| | | private String label; |
| | | private List<WarehouseTreeDto> children; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto; |
| | | import com.ruoyi.warehouse.dto.ReturnExportDto; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | @Mapper |
| | | public interface DocumentationBorrowManagementMapper extends BaseMapper<DocumentationBorrowManagement> { |
| | | |
| | | IPage<DocumentationBorrowManagement> listPage(Page page,@Param("documentationBorrowManagement") DocumentationBorrowManagement documentationBorrowManagement); |
| | | IPage<DocumentationBorrowManagement> listPage(Page page, @Param("documentationBorrowManagement") DocumentationBorrowManagement documentationBorrowManagement); |
| | | |
| | | List<DocumentationBorrowManagementDto> export(@Param("documentationBorrowManagement") DocumentationBorrowManagement documentationBorrowManagement); |
| | | |
| | | List<ReturnExportDto> exportrevent(DocumentationBorrowManagement documentationBorrowManagement); |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountFile; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface DocumentationFileMapper extends BaseMapper<DocumentationFile> { |
| | | |
| | | IPage<DocumentationFile> documentationFileListPage(Page page, @Param("documentationFile") DocumentationFile documentationFile); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | @Mapper |
| | | public interface DocumentationMapper extends BaseMapper<Documentation> { |
| | | |
| | | IPage<Documentation> listPage(Page page,@Param("documentation") Documentation documentation); |
| | | |
| | | List<Documentation> list(); |
| | | List<DocumentationDto> listPage(Page page, @Param("documentation") Documentation documentation); |
| | | List<DocumentationDto> listByDocumentClassificationId(@Param("documentClassificationId") Long documentClassificationId); |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseGoodsShelvesMapper extends BaseMapper<WarehouseGoodsShelves> { |
| | | IPage<WarehouseGoodsShelves> listPage(Page page,@Param("warehouseGoodsShelves") WarehouseGoodsShelves warehouseGoodsShelves); |
| | | |
| | | List<WarehouseGoodsShelves> list(@Param("warehouseGoodsShelves") WarehouseGoodsShelves warehouseGoodsShelves); |
| | | List<WarehouseGoodsShelvesDto> findList(@Param("warehouseGoodsShelves") WarehouseGoodsShelves warehouseGoodsShelves); |
| | | List<WarehouseGoodsShelves> listAll(@Param("warehouseGoodsShelves") WarehouseGoodsShelves warehouseGoodsShelves); |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.warehouse.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãwarehouse_goods_shelves_rowcol(ä»åºè´§æ¶å±ï¼å表)ãçæ°æ®åºæä½Mapper |
| | |
| | | @Mapper |
| | | public interface WarehouseGoodsShelvesRowcolMapper extends BaseMapper<WarehouseGoodsShelvesRowcol> { |
| | | |
| | | IPage<WarehouseGoodsShelvesRowcol> listPage(Page page,@Param("warehouseGoodsShelvesRowcol") WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol); |
| | | |
| | | List<WarehouseGoodsShelvesRowcolDto> findList(@Param("warehouseGoodsShelvesRowcol") WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol); |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.warehouse.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.ruoyi.warehouse.dto.WarehouseDto; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseMapper extends BaseMapper<Warehouse> { |
| | | |
| | | List<Warehouse> listPage(@Param("warehouse") Warehouse warehouse); |
| | | List<WarehouseDto> findList(@Param("warehouse") Warehouse warehouse); |
| | | List<Warehouse> listAll(@Param("warehouse") Warehouse warehouse); |
| | | } |
| | | |
| | | |
| | |
| | | * åå»ºç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | |
| | | * ä¿®æ¹ç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ç§æ·id |
| | |
| | | */ |
| | | @Excel(name = "ææ¡£ç¼å·") |
| | | @ApiModelProperty(value = "ææ¡£ç¼å·") |
| | | private Long docNumber; |
| | | private String docNumber; |
| | | |
| | | /** |
| | | * 年份 |
| | |
| | | * åå»ºç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | |
| | | * ä¿®æ¹ç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.dto.DateQueryDto; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * ææ¡£åé
-å½è¿è¡¨ |
| | |
| | | @TableName(value ="documentation_borrow_management") |
| | | @Data |
| | | @ApiModel(value = "ææ¡£åé
-å½è¿è¡¨") |
| | | public class DocumentationBorrowManagement implements Serializable { |
| | | public class DocumentationBorrowManagement extends DateQueryDto implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | |
| | | /** |
| | | * ææ¡£id |
| | | */ |
| | | @Excel(name = "ææ¡£id") |
| | | @ApiModelProperty(value = "ææ¡£id") |
| | | private Long documentationId; |
| | | |
| | | /** |
| | | * åé
人id |
| | | */ |
| | | @Excel(name = "åé
人id") |
| | | @ApiModelProperty(value = "åé
人id") |
| | | private Long borrowerId; |
| | | |
| | |
| | | @ApiModelProperty(value = "åé
æ¥æ") |
| | | @Excel(name = "åé
æ¥æ", dateFormat = "yyyy-MM-dd", width = 30) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime borrowDate; |
| | | |
| | | /** |
| | |
| | | * åå»ºç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | |
| | | * ä¿®æ¹ç¨æ· |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ç§æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ææ¡£ä¿¡æ¯è¡¨--éä»¶ |
| | | * documentation_file |
| | | */ |
| | | @TableName(value = "documentation_file") |
| | | @Data |
| | | public class DocumentationFile implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æä»¶è·¯å¾") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å¤§å°") |
| | | private int fileSize; |
| | | |
| | | @ApiModelProperty(value = "ææ¡£ID") |
| | | @NotBlank(message = "ææ¡£idä¸è½ä¸ºç©º!") |
| | | private Long documentationId; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.warehouse.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationDto; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationTreeDto; |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | |
| | | import java.util.List; |
| | |
| | | public interface DocumentClassificationService extends IService<DocumentClassification> { |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | |
| | | List<DocumentClassificationTreeDto> selectDocumentClassificationList(DocumentClassificationDto documentClassificationDto); |
| | | } |
| | |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | |
| | | boolean reventdbm(DocumentationBorrowManagement documentationBorrowManagement); |
| | | |
| | | boolean reventDeleteByIds(List<Long> ids); |
| | | |
| | | void export(HttpServletResponse response, DocumentationBorrowManagement documentationBorrowManagement); |
| | | |
| | | void exportrevent(HttpServletResponse response, DocumentationBorrowManagement documentationBorrowManagement); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.account.pojo.AccountFile; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | |
| | | public interface DocumentationFileService extends IService<DocumentationFile> { |
| | | |
| | | |
| | | IPage<DocumentationFile> documentationFileListPage(Page page, DocumentationFile documentationFile); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | */ |
| | | public interface DocumentationService extends IService<Documentation> { |
| | | |
| | | IPage<Documentation> listPage(Page page, Documentation documentation); |
| | | List<DocumentationDto> listPage(Page page, Documentation documentation); |
| | | |
| | | void export(HttpServletResponse response); |
| | | void export(HttpServletResponse response,Documentation documentation); |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | } |
| | |
| | | package com.ruoyi.warehouse.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface WarehouseGoodsShelvesRowcolService extends IService<WarehouseGoodsShelvesRowcol> { |
| | | |
| | | IPage<WarehouseGoodsShelvesRowcol> listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol); |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | |
| | | |
| | | // boolean add(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol); |
| | | List<WarehouseGoodsShelvesRowcolDto> getList(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | public interface WarehouseGoodsShelvesService extends IService<WarehouseGoodsShelves> { |
| | | |
| | | IPage<WarehouseGoodsShelves> listPage(Page page,WarehouseGoodsShelves warehouseGoodsShelves); |
| | | |
| | | boolean add(WarehouseGoodsShelves warehouseGoodsShelves); |
| | | |
| | |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | |
| | | List<WarehouseGoodsShelves> list(WarehouseGoodsShelves warehouseGoodsShelves); |
| | | |
| | | List<WarehouseGoodsShelves> findList(WarehouseGoodsShelves warehouseGoodsShelves); |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.warehouse.dto.WarehouseDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseTreeDto; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | public interface WarehouseService extends IService<Warehouse> { |
| | | |
| | | List<Warehouse> listPage( Warehouse warehouse); |
| | | |
| | | boolean deleteByIds(List<Long> ids); |
| | | |
| | | List<Warehouse> findList(Warehouse warehouse); |
| | | |
| | | List<WarehouseTreeDto> findListTree(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.ProductTreeDto; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationDto; |
| | | import com.ruoyi.warehouse.dto.DocumentClassificationTreeDto; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentClassification; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | implements DocumentClassificationService{ |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | |
| | | @Autowired |
| | | private DocumentClassificationMapper documentClassificationMapper; |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | List<Documentation> documentations = documentationMapper.selectList(new LambdaQueryWrapper<Documentation>().in(Documentation::getDocumentClassificationId, ids)); |
| | | if(!CollectionUtils.isEmpty(documentations)){ |
| | | return false; |
| | | List<DocumentClassification> list = documentClassificationMapper.selectList(new LambdaQueryWrapper<DocumentClassification>().in(DocumentClassification::getId, ids)); |
| | | for (DocumentClassification documentClassification : list) { |
| | | //妿æ¯é¡¹çç¶id为空ï¼è¯´ææ¯æ ¹èç¹ï¼éè¦å é¤ææ¡£ä¿¡æ¯è¡¨ä¸çæ°æ® |
| | | List<DocumentationDto> documentationDtos = documentationMapper.listByDocumentClassificationId(documentClassification.getId()); |
| | | if (CollectionUtils.isNotEmpty(documentationDtos)){ |
| | | throw new RuntimeException("åå¨ææ¡£ä¿¡æ¯ï¼ä¸è½å é¤"); |
| | | } |
| | | documentClassificationMapper.deleteById(documentClassification.getId()); |
| | | } |
| | | baseMapper.deleteBatchIds(ids); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public List<DocumentClassificationTreeDto> selectDocumentClassificationList(DocumentClassificationDto documentClassificationDto) { |
| | | // æ¥è¯¢æ ¹èç¹ï¼parentId 为 nullï¼ |
| | | LambdaQueryWrapper<DocumentClassification> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.isNull(DocumentClassification::getParentId); |
| | | |
| | | if (documentClassificationDto.getCategory() != null && !documentClassificationDto.getCategory().isEmpty()) { |
| | | queryWrapper.like(DocumentClassification::getCategory, documentClassificationDto.getCategory()); |
| | | } |
| | | |
| | | // æ¥è¯¢æ ¹èç¹å表 |
| | | List<DocumentClassification> rootList = baseMapper.selectList(queryWrapper); |
| | | |
| | | // 转æ¢ä¸ºæ èç¹å¹¶éå½æå»ºåæ |
| | | List<DocumentClassificationTreeDto> tree = new ArrayList<>(); |
| | | for (DocumentClassification documentClassification : rootList) { |
| | | DocumentClassificationTreeDto node = convertToTreeDto(documentClassification); |
| | | node.setChildren(buildDocumentChildrenNodes(documentClassification.getId())); |
| | | tree.add(node); |
| | | } |
| | | return tree; |
| | | } |
| | | // éå½æå»ºåèç¹ |
| | | private List<DocumentClassificationTreeDto> buildDocumentChildrenNodes(Long parentId) { |
| | | // æ¥è¯¢å½åç¶èç¹çåèç¹ |
| | | LambdaQueryWrapper<DocumentClassification> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(DocumentClassification::getParentId, parentId); |
| | | List<DocumentClassification> childList = baseMapper.selectList(queryWrapper); |
| | | |
| | | // 转æ¢åèç¹å¹¶éå½æå»ºå®ä»¬çåæ |
| | | List<DocumentClassificationTreeDto> children = new ArrayList<>(); |
| | | for (DocumentClassification child : childList) { |
| | | DocumentClassificationTreeDto childNode = convertToTreeDto(child); |
| | | childNode.setChildren(buildDocumentChildrenNodes(child.getId())); |
| | | children.add(childNode); |
| | | } |
| | | |
| | | return children; |
| | | } |
| | | // å° DocumentClassification 转æ¢ä¸º DocumentClassificationTreeDto |
| | | private DocumentClassificationTreeDto convertToTreeDto(DocumentClassification documentClassification) { |
| | | DocumentClassificationTreeDto dto = new DocumentClassificationTreeDto(); |
| | | BeanUtils.copyProperties(documentClassification, dto); |
| | | dto.setCategory(documentClassification.getCategory()); // 设置 label 为产ååç§° |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto; |
| | | import com.ruoyi.warehouse.dto.ReturnExportDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.service.DocumentationBorrowManagementService; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Override |
| | | public boolean add(DocumentationBorrowManagement documentationBorrowManagement) { |
| | | Long documentationId = documentationBorrowManagement.getDocumentationId(); |
| | | String borrowStatus = documentationBorrowManagement.getBorrowStatus(); |
| | | Documentation documentation = documentationService.getById(documentationId); |
| | | if (documentation==null){ |
| | | System.out.println("ææ¡£ä¸åå¨"); |
| | | return false; |
| | | } |
| | | if ("ååº".equals(documentation.getDocStatus())){ |
| | | if ("å½è¿".equals(borrowStatus)){ |
| | | documentation.setDocStatus("æ£å¸¸"); |
| | | documentationService.updateById(documentation); |
| | | documentationBorrowManagementMapper.insert(documentationBorrowManagement); |
| | | return true; |
| | | }else{ |
| | | System.out.println("ææ¡£å·²ååºï¼ä¸è½éå¤ååº"); |
| | | return false; |
| | | } |
| | | }else if("æ£å¸¸".equals(documentation.getDocStatus())){ |
| | | if ("å½è¿".equals(borrowStatus)){ |
| | | System.out.println("ææ¡£å·²å½è¿ï¼ä¸è½éå¤å½è¿"); |
| | | return false; |
| | | }else if("ååº".equals(borrowStatus)){ |
| | | documentation.setDocStatus("ååº"); |
| | | documentationService.updateById(documentation); |
| | | documentationBorrowManagementMapper.insert(documentationBorrowManagement); |
| | | return true; |
| | | } |
| | | }else{ |
| | | System.out.println("ææ¡£ç¶æå¼å¸¸"); |
| | | return false; |
| | | } |
| | | return false; |
| | | documentationBorrowManagementMapper.insert(documentationBorrowManagement); |
| | | Documentation documentation = documentationService.getById(documentationBorrowManagement.getDocumentationId()); |
| | | documentation.setDocStatus("ååº"); |
| | | documentationService.updateById(documentation); |
| | | return true; |
| | | } |
| | | // @Override |
| | | // public boolean updateDBMById(DocumentationBorrowManagement documentationBorrowManagement) { |
| | | // Long id = documentationBorrowManagement.getId(); |
| | | //// Long documentationId = documentationBorrowManagement.getDocumentationId(); |
| | | // //æ¥è¯¢ææ¡£æ¯å¦å·²å½è¿ |
| | | // DocumentationBorrowManagement dbm = documentationBorrowManagementMapper.selectById(id); |
| | | //// Long documentationId = dbm.getDocumentationId(); |
| | | // if ("å½è¿".equals(dbm.getBorrowStatus())){ |
| | | // System.out.println("ææ¡£å·²å½è¿ï¼ä¸è½æ´æ°"); |
| | | // return false; |
| | | // } |
| | | // //æ¥è¯¢ææ¡£ |
| | | // Documentation documentation = documentationService.getById(dbm.getDocumentationId()); |
| | | // String docStatus = documentation.getDocStatus(); |
| | | // if ("æ£å¸¸".equals(docStatus)){ |
| | | // System.out.println("ææ¡£å·²å½è¿ï¼ä¸è½æ´æ°"); |
| | | // return false; |
| | | // } |
| | | // return false; |
| | | // } |
| | | @Override |
| | | public boolean reventdbm(DocumentationBorrowManagement documentationBorrowManagement) { |
| | | DocumentationBorrowManagement documentationBorrowManagement1 = new DocumentationBorrowManagement(); |
| | | // æ´æ°åé
è®°å½ç¶æä¸ºå½è¿ |
| | | documentationBorrowManagement1.setBorrowStatus("å½è¿"); |
| | | documentationBorrowManagement1.setReturnDate(LocalDateTime.now()); |
| | | documentationBorrowManagementMapper.updateById(documentationBorrowManagement1); |
| | | documentationBorrowManagementMapper.update(documentationBorrowManagement1,new LambdaQueryWrapper<DocumentationBorrowManagement>().eq(DocumentationBorrowManagement::getId,documentationBorrowManagement.getId())); |
| | | |
| | | // æ´æ°ææ¡£ç¶æä¸ºæ£å¸¸ |
| | | Documentation documentation = documentationService.getById(documentationBorrowManagement.getDocumentationId()); |
| | | documentation.setDocStatus("æ£å¸¸"); |
| | | documentationService.updateById(documentation); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean reventDeleteByIds(List<Long> ids) { |
| | | QueryWrapper<DocumentationBorrowManagement> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.in("id", ids); |
| | | queryWrapper.eq("borrow_status", "å½è¿"); |
| | | List<DocumentationBorrowManagement> list = documentationBorrowManagementMapper.selectList(queryWrapper); |
| | | for (DocumentationBorrowManagement documentationBorrowManagement : list) { |
| | | try { |
| | | documentationBorrowManagement.setBorrowStatus("åé
"); |
| | | documentationBorrowManagement.setReturnDate(null); |
| | | documentationBorrowManagementMapper.updateById(documentationBorrowManagement); |
| | | |
| | | Documentation documentation = documentationService.getById(documentationBorrowManagement.getDocumentationId()); |
| | | if (documentation != null) { |
| | | documentation.setDocStatus("ååº"); |
| | | documentationService.updateById(documentation); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("æ´æ°åé
è®°å½åææ¡£ç¶ææ¶åºé", e); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | List<DocumentationBorrowManagementDto> documentationBorrowManagements = documentationBorrowManagementMapper.export(documentationBorrowManagement); |
| | | ExcelUtil<DocumentationBorrowManagementDto> util = new ExcelUtil<>(DocumentationBorrowManagementDto.class); |
| | | util.exportExcel(response, documentationBorrowManagements, "ææ¡£åé
-åé
è®°å½"); |
| | | } |
| | | |
| | | @Override |
| | | public void exportrevent(HttpServletResponse response, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | List<ReturnExportDto> documentationBorrowManagements = documentationBorrowManagementMapper.exportrevent(documentationBorrowManagement); |
| | | ExcelUtil<ReturnExportDto> util = new ExcelUtil<>(ReturnExportDto.class); |
| | | util.exportExcel(response, documentationBorrowManagements, "ææ¡£åé
-å½è¿è®°å½"); |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | List<DocumentationBorrowManagement> list = documentationBorrowManagementMapper.selectList(new LambdaQueryWrapper<DocumentationBorrowManagement>().in(DocumentationBorrowManagement::getId, ids)); |
| | | for (DocumentationBorrowManagement documentationBorrowManagement : list) { |
| | | String borrowStatus = documentationBorrowManagement.getBorrowStatus(); |
| | | if ("åé
".equals(borrowStatus)){ |
| | | System.out.println("ææ¡£å·²ååºï¼ä¸è½å é¤"); |
| | | return false; |
| | | Documentation documentation = documentationService.getById(documentationBorrowManagement.getDocumentationId()); |
| | | documentation.setDocStatus("æ£å¸¸"); |
| | | boolean b = documentationService.updateById(documentation); |
| | | if (!b){ |
| | | throw new RuntimeException("æ´æ°ææ¡£ç¶æå¤±è´¥"); |
| | | } |
| | | } |
| | | documentationBorrowManagementMapper.deleteBatchIds(ids); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.mapper.DocumentationFileMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import com.ruoyi.warehouse.service.DocumentationFileService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class DocumentationFileServiceImpl extends ServiceImpl<DocumentationFileMapper, DocumentationFile> implements DocumentationFileService { |
| | | |
| | | private DocumentationFileMapper documentationFileMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<DocumentationFile> documentationFileListPage(Page page, DocumentationFile documentationFile) { |
| | | return documentationFileMapper.documentationFileListPage(page,documentationFile); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.warehouse.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.warehouse.dto.DocumentationDto; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.service.DocumentationService; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @Override |
| | | public IPage<Documentation> listPage(Page page, Documentation documentation) { |
| | | public List<DocumentationDto> listPage(Page page, Documentation documentation) { |
| | | return documentationMapper.listPage(page, documentation); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<Documentation> list =documentationMapper.list(); |
| | | ExcelUtil<Documentation> util = new ExcelUtil<>(Documentation.class); |
| | | public void export(HttpServletResponse response,Documentation documentation) { |
| | | List<DocumentationDto> list = documentationMapper.listPage(null, documentation); |
| | | ExcelUtil<DocumentationDto> util = new ExcelUtil<>(DocumentationDto.class); |
| | | util.exportExcel(response, list, "ææ¡£ä¿¡æ¯è¡¨"); |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | List<Documentation> documentationList = documentationMapper.selectList(new LambdaQueryWrapper<Documentation>().in(Documentation::getId, ids)); |
| | | for (Documentation documentation : documentationList) { |
| | | //å¦æææ¡£ç¶ææ¯å·²ååºï¼ä¸è½å é¤ |
| | | if ("ååº".equals(documentation.getDocStatus()) || "ä½åº".equals(documentation.getDocStatus())) { |
| | | throw new RuntimeException("å½åææ¡£ç¶æä¸º " + documentation.getDocStatus() + "ï¼ä¸æ¯æå é¤"); |
| | | } |
| | | documentationMapper.deleteById(documentation.getId()); |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | private DocumentationMapper documentationMapper; |
| | | |
| | | @Override |
| | | public IPage<WarehouseGoodsShelvesRowcol> listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | IPage<WarehouseGoodsShelvesRowcol> list = warehouseGoodsShelvesRowcolMapper.listPage(page, warehouseGoodsShelvesRowcol); |
| | | public List<WarehouseGoodsShelvesRowcolDto> getList(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | List<WarehouseGoodsShelvesRowcolDto> list = warehouseGoodsShelvesRowcolMapper.findList(warehouseGoodsShelvesRowcol); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | // 3. æ£æ¥æ¯å¦æåå |
| | | Wrapper<Documentation> queryWrapper = new LambdaQueryWrapper<Documentation>() |
| | | .in(Documentation::getWarehouseGoodsShelvesRowcolId, ids); |
| | | List<Documentation> documentations = documentationMapper.selectList(queryWrapper); |
| | | if (!documentations.isEmpty()) return false; |
| | | if (!documentations.isEmpty()) throw new RuntimeException("è´§æ¶ä¸æååï¼ä¸è½å é¤"); |
| | | warehouseGoodsShelvesRowcolMapper.deleteBatchIds(ids); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | |
| | | private DocumentationService documentationService; |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | @Override |
| | | public IPage<WarehouseGoodsShelves> listPage(Page page, WarehouseGoodsShelves warehouseGoodsShelves) { |
| | | return warehouseGoodsShelvesMapper.listPage(page,warehouseGoodsShelves); |
| | | } |
| | | |
| | | @Override |
| | | public boolean add(WarehouseGoodsShelves warehouseGoodsShelves) { |
| | |
| | | Wrapper<Documentation> queryWrapper1 = new LambdaQueryWrapper<Documentation>() |
| | | .in(Documentation::getWarehouseGoodsShelvesRowcolId, rowcolIds); |
| | | List<Documentation> documentations = documentationMapper.selectList(queryWrapper1); |
| | | if (!documentations.isEmpty()) return false; |
| | | if (!documentations.isEmpty()) throw new RuntimeException("è´§æ¶ä¸æååï¼ä¸è½å é¤"); |
| | | |
| | | // å
æ´æ°è´§æ¶ä¸»ä¿¡æ¯ |
| | | updateById(warehouseGoodsShelves); |
| | |
| | | Wrapper<Documentation> queryWrapper1 = new LambdaQueryWrapper<Documentation>() |
| | | .in(Documentation::getWarehouseGoodsShelvesRowcolId, rowcolIds); |
| | | List<Documentation> documentations = documentationMapper.selectList(queryWrapper1); |
| | | if (!documentations.isEmpty()) return false; // ä»»ä¸è´§æ¶æåååç»æ¢å é¤ |
| | | if (!documentations.isEmpty()) throw new RuntimeException("è´§æ¶ä¸æååï¼ä¸è½å é¤"); // ä»»ä¸è´§æ¶æåååç»æ¢å é¤ |
| | | } |
| | | |
| | | // 3. å
å é¤è´§æ¶ä¸»è®°å½ |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<WarehouseGoodsShelves> list(WarehouseGoodsShelves warehouseGoodsShelves) { |
| | | return warehouseGoodsShelvesMapper.list(warehouseGoodsShelves); |
| | | public List<WarehouseGoodsShelves> findList(WarehouseGoodsShelves warehouseGoodsShelves) { |
| | | return warehouseGoodsShelvesMapper.listAll(warehouseGoodsShelves); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.WarehouseDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseTreeDto; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseMapper; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.springframework.beans.BeanUtils.copyProperties; |
| | | |
| | | /** |
| | | * @author 86151 |
| | |
| | | private WarehouseMapper warehouseMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | |
| | | @Override |
| | | public List<Warehouse> listPage(Warehouse warehouse) { |
| | | return warehouseMapper.listPage( warehouse); |
| | | } |
| | | |
| | | // @Override |
| | | // public boolean deleteByIds(List<Long> ids) { |
| | | // |
| | | // for (Long id : ids) { |
| | | // List<WarehouseGoodsShelves> list = warehouseGoodsShelvesService.list(new QueryWrapper<WarehouseGoodsShelves>().lambda() |
| | | // .eq(WarehouseGoodsShelves::getWarehouseId, id)); |
| | | // if(list.size()>0){ |
| | | // log.error("ä»åºä¸æè´§æ¶,ä¸è½å é¤ éæ°éæ©"); |
| | | // return false; |
| | | // } |
| | | // } |
| | | // return removeByIds(ids); |
| | | // } |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | // 1. æ£æ¥æ¯å¦æè´§æ¶ |
| | |
| | | .in(WarehouseGoodsShelves::getWarehouseId, ids); |
| | | List<WarehouseGoodsShelves> shelvesList = warehouseGoodsShelvesService.list(queryWrapper); |
| | | //è·å¾shelvesList䏿æçId |
| | | |
| | | List<Long> shelvesIds = shelvesList.stream().map(WarehouseGoodsShelves::getId).collect(Collectors.toList()); |
| | | // 2. å é¤è´§æ¶ |
| | | if (!shelvesIds.isEmpty()) { |
| | | warehouseGoodsShelvesService.deleteByIds(shelvesIds); |
| | | boolean b = warehouseGoodsShelvesService.deleteByIds(shelvesIds); |
| | | if (!b) { |
| | | throw new RuntimeException("å é¤è´§æ¶å¤±è´¥"); |
| | | } |
| | | } |
| | | return removeByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<Warehouse> findList(Warehouse warehouse) { |
| | | return warehouseMapper.listAll(warehouse); |
| | | } |
| | | /** |
| | | * æ¥è¯¢ä»åº-è´§æ¶-å±åä¸çº§æ ç»æ |
| | | */ |
| | | @Override |
| | | public List<WarehouseTreeDto> findListTree() { |
| | | |
| | | // æ¥è¯¢æææ ¹èç¹ï¼ä»åºï¼ |
| | | LambdaQueryWrapper<Warehouse> queryWrapper = new LambdaQueryWrapper<>(); |
| | | // æ¥è¯¢ä»åºå表ï¼ä¸çº§èç¹ï¼ |
| | | List<Warehouse> warehouseList = warehouseMapper.selectList(queryWrapper); |
| | | |
| | | // 转æ¢ä¸ºæ èç¹å¹¶æå»ºåæ |
| | | List<WarehouseTreeDto> tree = new ArrayList<>(); |
| | | for (Warehouse warehouse : warehouseList) { |
| | | WarehouseTreeDto node = convertToWarehouseTreeDto(warehouse); |
| | | // 为æ¯ä¸ªä»åºæ·»å è´§æ¶åèç¹ |
| | | node.setChildren(buildShelfChildrenNodes(warehouse.getId())); |
| | | tree.add(node); |
| | | } |
| | | return tree; |
| | | } |
| | | /** |
| | | * æå»ºè´§æ¶åèç¹ï¼äºçº§èç¹ï¼ |
| | | */ |
| | | private List<WarehouseTreeDto> buildShelfChildrenNodes(Long warehouseId) { |
| | | // æ¥è¯¢æå®ä»åºä¸çææè´§æ¶ |
| | | LambdaQueryWrapper<WarehouseGoodsShelves> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(WarehouseGoodsShelves::getWarehouseId, warehouseId); |
| | | List<WarehouseGoodsShelves> shelfList = warehouseGoodsShelvesMapper.selectList(queryWrapper); |
| | | |
| | | // 转æ¢ä¸ºæ èç¹å¹¶æå»ºå±ååèç¹ |
| | | List<WarehouseTreeDto> shelfNodes = new ArrayList<>(); |
| | | for (WarehouseGoodsShelves shelf : shelfList) { |
| | | WarehouseTreeDto shelfNode = convertToShelfTreeDto(shelf); |
| | | // 为æ¯ä¸ªè´§æ¶æ·»å å±ååèç¹ |
| | | shelfNode.setChildren(buildRowcolChildrenNodes(shelf.getId())); |
| | | shelfNodes.add(shelfNode); |
| | | } |
| | | |
| | | return shelfNodes; |
| | | } |
| | | |
| | | /** |
| | | * æå»ºå±ååèç¹ï¼ä¸çº§èç¹ï¼ |
| | | */ |
| | | private List<WarehouseTreeDto> buildRowcolChildrenNodes(Long shelfId) { |
| | | // æ¥è¯¢æå®è´§æ¶ä¸çææå±å |
| | | LambdaQueryWrapper<WarehouseGoodsShelvesRowcol> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(WarehouseGoodsShelvesRowcol::getWarehouseGoodsShelvesId, shelfId); |
| | | List<WarehouseGoodsShelvesRowcol> rowcolList = warehouseGoodsShelvesRowcolMapper.selectList(queryWrapper); |
| | | |
| | | // 转æ¢ä¸ºæ èç¹ï¼å±å没æåèç¹ï¼ |
| | | List<WarehouseTreeDto> rowcolNodes = new ArrayList<>(); |
| | | for (WarehouseGoodsShelvesRowcol rowcol : rowcolList) { |
| | | WarehouseTreeDto rowcolNode = convertToRowcolTreeDto(rowcol); |
| | | rowcolNodes.add(rowcolNode); |
| | | } |
| | | |
| | | return rowcolNodes; |
| | | } |
| | | |
| | | /** |
| | | * ä»åºå®ä½è½¬æ¢ä¸ºæ èç¹DTO |
| | | */ |
| | | private WarehouseTreeDto convertToWarehouseTreeDto(Warehouse warehouse) { |
| | | WarehouseTreeDto dto = new WarehouseTreeDto(); |
| | | copyProperties(warehouse, dto); |
| | | dto.setLabel(warehouse.getWarehouseName()); |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |
| | | |
| | | /** |
| | | * è´§æ¶å®ä½è½¬æ¢ä¸ºæ èç¹DTO |
| | | */ |
| | | private WarehouseTreeDto convertToShelfTreeDto(WarehouseGoodsShelves shelf) { |
| | | WarehouseTreeDto dto = new WarehouseTreeDto(); |
| | | copyProperties(shelf, dto); |
| | | dto.setLabel(shelf.getGoodsShelvesName()); |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |
| | | |
| | | /** |
| | | * å±åå®ä½è½¬æ¢ä¸ºæ èç¹DTO |
| | | */ |
| | | private WarehouseTreeDto convertToRowcolTreeDto(WarehouseGoodsShelvesRowcol rowcol) { |
| | | WarehouseTreeDto dto = new WarehouseTreeDto(); |
| | | copyProperties(rowcol, dto); |
| | | dto.setLabel(rowcol.getStorey() + "-" + rowcol.getArrange()); |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.DocumentationBorrowManagementMapper"> |
| | | |
| | | <!-- <resultMap id="BaseResultMap" type="com.ruoyi.warehouse.pojo.DocumentationBorrowManagement">--> |
| | | <!-- <id property="id" column="id" jdbcType="BIGINT"/>--> |
| | | <!-- <result property="documentationId" column="documentation_id" jdbcType="BIGINT"/>--> |
| | | <!-- <result property="borrowerId" column="borrower_id" jdbcType="BIGINT"/>--> |
| | | <!-- <result property="borrowPurpose" column="borrow_purpose" jdbcType="VARCHAR"/>--> |
| | | <!-- <result property="borrowDate" column="borrow_date" jdbcType="TIMESTAMP"/>--> |
| | | <!-- <result property="dueReturnDate" column="due_return_date" jdbcType="TIMESTAMP"/>--> |
| | | <!-- <result property="returnDate" column="return_date" jdbcType="TIMESTAMP"/>--> |
| | | <!-- <result property="borrowStatus" column="borrow_status" jdbcType="VARCHAR"/>--> |
| | | <!-- <result property="remark" column="remark" jdbcType="VARCHAR"/>--> |
| | | <!-- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>--> |
| | | <!-- <result property="createUser" column="create_user" jdbcType="BIGINT"/>--> |
| | | <!-- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>--> |
| | | <!-- <result property="updateUser" column="update_user" jdbcType="BIGINT"/>--> |
| | | <!-- <result property="tenantId" column="tenant_id" jdbcType="BIGINT"/>--> |
| | | <!-- </resultMap>--> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.warehouse.pojo.DocumentationBorrowManagement"> |
| | | <id property="id" column="id"/> |
| | | <result property="documentationId" column="documentation_id" /> |
| | | <result property="borrowerId" column="borrower_id" /> |
| | | <result property="borrowPurpose" column="borrow_purpose" /> |
| | | <result property="borrowDate" column="borrow_date"/> |
| | | <result property="dueReturnDate" column="due_return_date" /> |
| | | <result property="returnDate" column="return_date"/> |
| | | <result property="borrowStatus" column="borrow_status" /> |
| | | <result property="remark" column="remark"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="createUser" column="create_user"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="updateUser" column="update_user"/> |
| | | <result property="tenantId" column="tenant_id"/> |
| | | </resultMap> |
| | | |
| | | <!-- <sql id="Base_Column_List">--> |
| | | <!-- id,documentation_id,borrower_id,--> |
| | |
| | | <!-- update_user,tenant_id--> |
| | | <!-- </sql>--> |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.DocumentationBorrowManagement"> |
| | | select * from documentation_borrow_management |
| | | select *from documentation_borrow_management |
| | | where 1=1 |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | |
| | | <if test="documentationBorrowManagement.borrowerId != null"> |
| | | and borrower_id = #{documentationBorrowManagement.borrowerId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.borrowPurpose != null"> |
| | | and borrow_purpose = #{documentationBorrowManagement.borrowPurpose} |
| | | <if test="documentationBorrowManagement.entryDateStart != null and documentationBorrowManagement.entryDateStart != ''"> |
| | | and borrow_date >= DATE_FORMAT(#{documentationBorrowManagement.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="documentationBorrowManagement.borrowDate != null"> |
| | | and borrow_date = #{documentationBorrowManagement.borrowDate} |
| | | <if test="documentationBorrowManagement.entryDateEnd != null and documentationBorrowManagement.entryDateEnd != ''"> |
| | | and borrow_date <= DATE_FORMAT(#{documentationBorrowManagement.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="documentationBorrowManagement.dueReturnDate != null"> |
| | | and due_return_date = #{documentationBorrowManagement.dueReturnDate} |
| | | </select> |
| | | <select id="export" resultType="com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto"> |
| | | select dbm.*,doc.doc_name,su.nick_name |
| | | from documentation_borrow_management dbm |
| | | LEFT JOIN documentation doc on doc.id = dbm.documentation_id |
| | | LEFT JOIN sys_user su on su.user_id = dbm.borrower_id |
| | | where 1=1 |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | | </if> |
| | | <if test="documentationBorrowManagement.documentationId != null"> |
| | | and documentation_id = #{documentationBorrowManagement.documentationId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.borrowerId != null"> |
| | | and borrower_id = #{documentationBorrowManagement.borrowerId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.entryDateStart != null and documentationBorrowManagement.entryDateStart != ''"> |
| | | and borrow_date >= DATE_FORMAT(#{documentationBorrowManagement.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="documentationBorrowManagement.entryDateEnd != null and documentationBorrowManagement.entryDateEnd != ''"> |
| | | and borrow_date <= DATE_FORMAT(#{documentationBorrowManagement.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </select> |
| | | <select id="exportrevent" resultType="com.ruoyi.warehouse.dto.ReturnExportDto"> |
| | | select dbm.*,doc.doc_name,su.nick_name,su.nick_name as return_nick_name |
| | | from documentation_borrow_management dbm |
| | | LEFT JOIN documentation doc on doc.id = dbm.documentation_id |
| | | LEFT JOIN sys_user su on su.user_id = dbm.borrower_id |
| | | where 1=1 |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | | </if> |
| | | <if test="documentationBorrowManagement.documentationId != null"> |
| | | and documentation_id = #{documentationBorrowManagement.documentationId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.borrowerId != null"> |
| | | and borrower_id = #{documentationBorrowManagement.borrowerId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.entryDateStart != null and documentationBorrowManagement.entryDateStart != ''"> |
| | | and borrow_date >= DATE_FORMAT(#{documentationBorrowManagement.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="documentationBorrowManagement.entryDateEnd != null and documentationBorrowManagement.entryDateEnd != ''"> |
| | | and borrow_date <= DATE_FORMAT(#{documentationBorrowManagement.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.DocumentationFileMapper"> |
| | | <select id="documentationFileListPage" resultType="com.ruoyi.warehouse.pojo.DocumentationFile"> |
| | | SELECT |
| | | * |
| | | FROM documentation_file |
| | | where |
| | | 1=1 |
| | | <if test="documentationFile.name != null and documentationFile.name != '' "> |
| | | AND name = #{documentationFile.name} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.DocumentationMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.warehouse.pojo.Documentation"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="documentClassificationId" column="document_classification_id"/> |
| | | <result property="docName" column="doc_name" jdbcType="VARCHAR"/> |
| | | <result property="docNumber" column="doc_number" jdbcType="BIGINT"/> |
| | | <result property="year" column="year" jdbcType="BIGINT"/> |
| | | <result property="responsiblePerson" column="responsible_person" jdbcType="VARCHAR"/> |
| | | <result property="warehouseGoodsShelvesRowcolId" column="warehouse_goods_shelves_rowcol_id" jdbcType="BIGINT"/> |
| | | <result property="docDate" column="doc_date" jdbcType="TIMESTAMP"/> |
| | | <result property="retentionPeriod" column="retention_period" jdbcType="BIGINT"/> |
| | | <result property="securityLevel" column="security_level" jdbcType="VARCHAR"/> |
| | | <result property="copyCount" column="copy_count" jdbcType="BIGINT"/> |
| | | <result property="pageCount" column="page_count" jdbcType="BIGINT"/> |
| | | <result property="docCategory" column="doc_category" jdbcType="VARCHAR"/> |
| | | <result property="docType" column="doc_type" jdbcType="VARCHAR"/> |
| | | <result property="urgencyLevel" column="urgency_level" jdbcType="VARCHAR"/> |
| | | <result property="docStatus" column="doc_status" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="VARCHAR"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="VARCHAR"/> |
| | | <result property="tenantId" column="tenant_id" jdbcType="BIGINT"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,category_name,doc_name, |
| | | doc_number,year,responsible_person, |
| | | warehouse_goods_shelves_rowcol_id,doc_date,retention_period, |
| | | security_level,copy_count,page_count, |
| | | doc_category,doc_type,urgency_level, |
| | | doc_status,remark,create_time, |
| | | create_user,update_time,update_user, |
| | | tenant_id |
| | | </sql> |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.Documentation"> |
| | | select * from documentation |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> |
| | | SELECT |
| | | doc.*, |
| | | dc.category, |
| | | CONCAT( |
| | | w.warehouse_name, '-', |
| | | wgs.goods_shelves_name, '-', |
| | | wgsr.storey, 'å±-', |
| | | wgsr.arrange, 'å' |
| | | ) AS location_info -- åå¹¶åçåæ®µå |
| | | FROM documentation doc |
| | | LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id |
| | | LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id |
| | | LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id |
| | | LEFT JOIN warehouse w ON w.id = wgs.warehouse_id |
| | | where 1=1 |
| | | <if test="documentation.documentClassificationId != null"> |
| | | and document_classification_id = #{documentation.documentClassificationId} |
| | | and doc.document_classification_id = #{documentation.documentClassificationId} |
| | | </if> |
| | | <if test="documentation.docName != null"> |
| | | and doc_name = #{documentation.docName} |
| | | and doc.doc_name = #{documentation.docName} |
| | | </if> |
| | | <if test="documentation.docNumber != null"> |
| | | and doc_number = #{documentation.docNumber} |
| | | and doc.doc_number = #{documentation.docNumber} |
| | | </if> |
| | | <if test="documentation.id != null"> |
| | | and doc.id = #{documentation.id} |
| | | </if> |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.warehouse.pojo.Documentation"> |
| | | select * from documentation t1 |
| | | left join warehouse_goods_shelves_rowcol t2 on t1.warehouse_goods_shelves_rowcol_id = t2.id |
| | | left join warehouse_goods_shelves t3 on t2.warehouse_goods_shelves_id = t3.id |
| | | left join warehouse t4 on t3.warehouse_id = t4.id |
| | | <select id="listByDocumentClassificationId" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> |
| | | SELECT |
| | | doc.*, |
| | | dc.category, |
| | | CONCAT( |
| | | w.warehouse_name, '-', |
| | | wgs.goods_shelves_name, '-', |
| | | wgsr.storey, 'å±-', |
| | | wgsr.arrange, 'å' |
| | | ) AS location_info -- åå¹¶åçåæ®µå |
| | | FROM documentation doc |
| | | LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id |
| | | LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id |
| | | LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id |
| | | LEFT JOIN warehouse w ON w.id = wgs.warehouse_id |
| | | where doc.document_classification_id = #{documentClassificationId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper"> |
| | | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.WarehouseGoodsShelves"> |
| | | select * from warehouse_goods_shelves |
| | | <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto"> |
| | | SELECT |
| | | wgsr.*, |
| | | w.warehouse_name, |
| | | wgs.goods_shelves_name, |
| | | doc.*, |
| | | dc.category |
| | | FROM warehouse_goods_shelves_rowcol wgsr |
| | | LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id |
| | | LEFT JOIN warehouse w ON w.id = wgs.warehouse_id |
| | | LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id |
| | | LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id |
| | | <where> |
| | | 1=1 |
| | | <if test="goodsShelvesName != null and goodsShelvesName != ''"> |
| | | and goods_shelves_name like concat('%',#{goodsShelvesName},'%') |
| | | <if test="warehouseGoodsShelves.goodsShelvesName != null and warehouseGoodsShelves.goodsShelvesName != ''"> |
| | | and wgs.goods_shelves_name like concat('%',#{warehouseGoodsShelves.goodsShelvesName},'%') |
| | | </if> |
| | | <if test="warehouseId != null"> |
| | | and warehouse_id = #{warehouseId} |
| | | <if test="warehouseGoodsShelves.warehouseId != null"> |
| | | and wgs.warehouse_id = #{warehouseGoodsShelves.warehouseId} |
| | | </if> |
| | | <if test="warehouseGoodsShelves.id != null"> |
| | | and wgs.id = #{warehouseGoodsShelves.id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.warehouse.pojo.WarehouseGoodsShelves"> |
| | | <select id="listAll" resultType="com.ruoyi.warehouse.pojo.WarehouseGoodsShelves"> |
| | | select * from warehouse_goods_shelves |
| | | <where> |
| | | 1=1 |
| | |
| | | <if test="warehouseGoodsShelves.warehouseId != null"> |
| | | and warehouse_id = #{warehouseGoodsShelves.warehouseId} |
| | | </if> |
| | | <if test="warehouseGoodsShelves.id != null"> |
| | | and id = #{warehouseGoodsShelves.id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper"> |
| | | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol"> |
| | | select * from warehouse_goods_shelves_rowcol |
| | | <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto"> |
| | | SELECT |
| | | wgsr.*, |
| | | w.warehouse_name, |
| | | wgs.goods_shelves_name, |
| | | doc.*, |
| | | dc.category |
| | | FROM warehouse_goods_shelves_rowcol wgsr |
| | | LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id |
| | | LEFT JOIN warehouse w ON w.id = wgs.warehouse_id |
| | | LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id |
| | | LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id |
| | | <where> |
| | | 1=1 |
| | | <if test="warehouseGoodsShelvesRowcol.storey != null"> |
| | | and storey = #{warehouseGoodsShelvesRowcol.storey} |
| | | and wgsr.storey = #{warehouseGoodsShelvesRowcol.storey} |
| | | </if> |
| | | <if test="warehouseGoodsShelvesRowcol.arrange != null"> |
| | | and arrange = #{warehouseGoodsShelvesRowcol.arrange} |
| | | and wgsr.arrange = #{warehouseGoodsShelvesRowcol.arrange} |
| | | </if> |
| | | <if test="warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId != null"> |
| | | and warehouse_goods_shelves_id = #{warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId} |
| | | and wgsr.warehouse_goods_shelves_id = #{warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId} |
| | | </if> |
| | | <if test="warehouseGoodsShelvesRowcol.warehouseId != null"> |
| | | and warehouse_id = #{warehouseGoodsShelvesRowcol.warehouseId} |
| | | <if test="warehouseGoodsShelvesRowcol.id != null"> |
| | | and wgsr.id = #{warehouseGoodsShelvesRowcol.id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.warehouse.mapper.WarehouseMapper"> |
| | | |
| | | <!-- <!– å®ä¹ WarehouseDto ç resultMapï¼ä¼ååï¼ –>--> |
| | | <!-- <resultMap id="WarehouseDtoResultMap" type="com.ruoyi.warehouse.dto.WarehouseDto">--> |
| | | <!-- <!– æ å° Warehouse ç¶ç±»çåæ®µï¼ä»åºä¸»è¡¨ä¿¡æ¯ï¼ –>--> |
| | | <!-- <id property="id" column="w_id"/> <!– æç¡®å«åï¼é¿å
ä¸å表idå²çª –>--> |
| | | <!-- <result property="warehouseName" column="warehouse_name"/>--> |
| | | <!-- <!– å
¶ä»ç¶ç±»å段æéæ·»å ï¼å»ºè®®ç»ä¸å 表å«ååç¼ –>--> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.Warehouse"> |
| | | <!-- <!– ç§»é¤ WarehouseDto ä¸ç goodsShelvesName åæ®µæ å°--> |
| | | <!-- åå ï¼è¯¥å段å±äºå表 warehouse_goods_shelvesï¼åºéè¿åµå¥éåè·åï¼é¿å
æ°æ®æ§ä¹ –>--> |
| | | |
| | | <!-- <!– æ å° WarehouseDto èªèº«çåç±»åæ®µï¼è¥ä¸å¡éè¦å
³èææ¡£åç±»ï¼ –>--> |
| | | <!-- <result property="category" column="category"/>--> |
| | | |
| | | <!-- <!– æ å°åµå¥éåï¼ä»åº-è´§æ¶ï¼ä¸å¯¹å¤ï¼ –>--> |
| | | <!-- <collection property="warehouseGoodsShelvesList" ofType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto">--> |
| | | <!-- <id property="id" column="wgs_id"/> <!– è´§æ¶è¡¨ä¸»é®ï¼å¯ä¸æ è¯ –>--> |
| | | <!-- <result property="goodsShelvesName" column="goods_shelves_name"/>--> |
| | | <!-- <result property="warehouseId" column="w_id"/> <!– å
³èä»åºçå¤é®ï¼ä¾¿äºåå追溯 –>--> |
| | | <!-- <!– å
¶ä»è´§æ¶å段æéæ·»å ï¼å¦å建æ¶é´ãç¶æçï¼ –>--> |
| | | |
| | | <!-- <!– æ å°åµå¥éåï¼è´§æ¶-è¡åï¼ä¸å¯¹å¤ï¼ –>--> |
| | | <!-- <collection property="warehouseGoodsShelvesRowcolList" ofType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto">--> |
| | | <!-- <id property="id" column="wgsr_id"/> <!– è¡å表èªèº«ä¸»é®ï¼ä¿®æ£åå¤é®å«å导è´çæ§ä¹ –>--> |
| | | <!-- <result property="storey" column="storey"/>--> |
| | | <!-- <result property="arrange" column="arrange"/>--> |
| | | <!-- <result property="warehouseGoodsShelvesId" column="wgs_id"/> <!– å
³èè´§æ¶çå¤é® –>--> |
| | | <!-- <!– å
¶ä»è¡ååæ®µæéæ·»å ï¼å¦å®¹éãç¶æçï¼ –>--> |
| | | <!-- </collection>--> |
| | | <!-- </collection>--> |
| | | <!-- </resultMap>--> |
| | | |
| | | <!-- <select id="findList" resultMap="WarehouseDtoResultMap">--> |
| | | <!-- SELECT--> |
| | | <!-- w.id AS w_id, -- ä»åºè¡¨idå å«åï¼é¿å
ä¸å表idå²çª--> |
| | | <!-- w.warehouse_name,--> |
| | | <!-- wgs.id AS wgs_id, -- è´§æ¶è¡¨idå å«å--> |
| | | <!-- wgs.goods_shelves_name,--> |
| | | <!-- wgsr.id AS wgsr_id, -- è¡å表idå å«åï¼ä¿®æ£åå¤é®å«åï¼æç¡®ä¸ºä¸»é®ï¼--> |
| | | <!-- wgsr.storey,--> |
| | | <!-- wgsr.arrange,--> |
| | | <!-- dc.category--> |
| | | <!-- FROM warehouse_goods_shelves_rowcol wgsr--> |
| | | <!-- LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id--> |
| | | <!-- LEFT JOIN warehouse w ON w.id = wgs.warehouse_id--> |
| | | <!-- -- å
³èææ¡£è¡¨åå类表æ¶ï¼è¥æ éææ¡£è¯¦æ
ï¼å»ºè®®ç¨ EXISTS ä¼åï¼é¿å
é夿°æ®--> |
| | | <!-- LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id--> |
| | | <!-- LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id--> |
| | | <!-- <where>--> |
| | | <!-- <!– ç§»é¤ 1=1ï¼MyBatisçwhereæ ç¾ä¼èªå¨å¤çé¦ä¸ªAND –>--> |
| | | <!-- <if test="warehouse.warehouseName != null and warehouse.warehouseName != ''">--> |
| | | <!-- AND w.warehouse_name LIKE CONCAT('%', #{warehouse.warehouseName}, '%')--> |
| | | <!-- </if>--> |
| | | <!-- <if test="warehouse.id != null">--> |
| | | <!-- AND w.id = #{warehouse.id}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- -- åç»å»éï¼é¿å
å å¤è¡¨è¿æ¥å¯¼è´çé夿°æ®ï¼æ ¸å¿ä¼åç¹ï¼--> |
| | | <!-- GROUP BY w.id, wgs.id, wgsr.id--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseDto"> |
| | | SELECT |
| | | wgsr.*, |
| | | w.warehouse_name, |
| | | wgs.goods_shelves_name, |
| | | doc.doc_name, |
| | | dc.category |
| | | FROM warehouse_goods_shelves_rowcol wgsr |
| | | LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id |
| | | LEFT JOIN warehouse w ON w.id = wgs.warehouse_id |
| | | LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id |
| | | LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id |
| | | <where> |
| | | 1=1 |
| | | <if test="warehouse.warehouseName != null"> |
| | | and w.warehouse_name like concat('%',#{warehouse.warehouseName},'%') |
| | | </if> |
| | | <if test="warehouse.id != null"> |
| | | and w.id = #{warehouse.id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="listAll" resultType="com.ruoyi.warehouse.pojo.Warehouse"> |
| | | select * from warehouse |
| | | <where> |
| | | 1=1 |