yaowanxin
5 天以前 73e27a267afa5eb2c94b3c70aa3556aaef690cea
修改完善1
已修改18个文件
110 ■■■■■ 文件已修改
src/main/java/com/ruoyi/warehouse/controller/DocumentClassificationController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/DocumentationFileController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/dto/WarehouseGoodsShelvesRowcolDto.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/mapper/DocumentationFileMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/DocumentationFile.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelves.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelvesRowcol.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/service/DocumentationFileService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/service/impl/DocumentationFileServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/service/impl/WarehouseGoodsShelvesServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/service/impl/WarehouseServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/DocumentationBorrowManagementMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/DocumentationFileMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/DocumentationMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/WarehouseGoodsShelvesRowcolMapper.xml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/WarehouseMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/DocumentClassificationController.java
@@ -26,8 +26,8 @@
    private DocumentClassificationService documentClassificationService;
    //树结构
    @GetMapping("/getList")
    public List<DocumentClassificationTreeDto> getList() {
        return documentClassificationService.selectDocumentClassificationList();
    public  AjaxResult getList() {
        return AjaxResult.success(documentClassificationService.selectDocumentClassificationList());
    }
    @PostMapping("/add")
    @ApiOperation("文档分类-添加")
src/main/java/com/ruoyi/warehouse/controller/DocumentationFileController.java
@@ -39,7 +39,7 @@
     * @return
     */
    @DeleteMapping("/del")
    public AjaxResult delDocumentationFile(@RequestBody List<Integer> ids) {
    public AjaxResult delDocumentationFile(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)){
            return AjaxResult.error("请选择至少一条数据");
        }
@@ -48,14 +48,14 @@
    }
    /**
     *分页查询
     * @param page
     *查询
     * @param
     * @param documentationFile
     * @return
     */
    @GetMapping("/listPage")
    public AjaxResult documentationFileListPage(Page page, DocumentationFile documentationFile) {
        return AjaxResult.success(documentationFileService.documentationFileListPage(page, documentationFile));
    public AjaxResult documentationFileListPage(DocumentationFile documentationFile) {
        return AjaxResult.success(documentationFileService.documentationFileListPage( documentationFile));
    }
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesController.java
@@ -28,7 +28,7 @@
    @GetMapping("/listById")
    @ApiOperation("商品货架-查询")
    @Log(title = "商品货架-查询", businessType = BusinessType.OTHER)
    public AjaxResult listById(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
    public AjaxResult listById(WarehouseGoodsShelves warehouseGoodsShelves) {
        List<WarehouseGoodsShelvesDto> list = warehouseGoodsShelvesService.findList(warehouseGoodsShelves);
        return AjaxResult.success(list);
    }
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java
@@ -23,7 +23,7 @@
    @GetMapping("/list")
    @ApiOperation("商品货架行列-查询")
    @Log(title = "商品货架行列-查询", businessType = BusinessType.OTHER)
    public AjaxResult list(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
    public AjaxResult list(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
        List<WarehouseGoodsShelvesRowcolDto> list = warehouseGoodsShelvesRowcolService.getList(warehouseGoodsShelvesRowcol);
        return AjaxResult.success(list);
src/main/java/com/ruoyi/warehouse/dto/WarehouseGoodsShelvesRowcolDto.java
@@ -9,8 +9,7 @@
@Data
public class WarehouseGoodsShelvesRowcolDto extends WarehouseGoodsShelvesRowcol {
    private String warehouseName;
    private String goodsShelvesName;
    private String docName;
    private String docNumber;
    private String name;
    private List<DocumentationDto> documentationDtoList;
    private String category;
}
src/main/java/com/ruoyi/warehouse/mapper/DocumentationFileMapper.java
@@ -8,8 +8,10 @@
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface DocumentationFileMapper extends BaseMapper<DocumentationFile> {
    IPage<DocumentationFile> documentationFileListPage(Page page, @Param("documentationFile") DocumentationFile documentationFile);
    List<DocumentationFile> documentationFileListPage(@Param("documentationFile") DocumentationFile documentationFile);
}
src/main/java/com/ruoyi/warehouse/pojo/DocumentationFile.java
@@ -30,7 +30,7 @@
    private String url;
    @ApiModelProperty(value = "文件大小")
    private int fileSize;
    private Long fileSize;
    @ApiModelProperty(value = "文档ID")
    @NotBlank(message = "文档id不能为空!")
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelves.java
@@ -26,16 +26,18 @@
    /**
     * 货架名称
     */
    private String goodsShelvesName;
    private String name;
    /**
     * 层数
     */
    private Long storey;
    @TableField("`row`")
    private Long row;
    /**
     * 列数
     */
    private Long arrange;
    @TableField("`col`")
    private Long col;
    /**
     * 仓库id
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelvesRowcol.java
@@ -28,12 +28,14 @@
    /**
     * 层数
     */
    private Long storey;
    @TableField("`row`")
    private Long row;
    /**
     * 列数
     */
    private Long arrange;
    @TableField("`col`")
    private Long col;
    /**
     * 货架id
src/main/java/com/ruoyi/warehouse/service/DocumentationFileService.java
@@ -6,8 +6,9 @@
import com.ruoyi.account.pojo.AccountFile;
import com.ruoyi.warehouse.pojo.DocumentationFile;
import java.util.List;
public interface DocumentationFileService extends IService<DocumentationFile> {
    IPage<DocumentationFile> documentationFileListPage(Page page, DocumentationFile documentationFile);
    List<DocumentationFile> documentationFileListPage(DocumentationFile documentationFile);
}
src/main/java/com/ruoyi/warehouse/service/impl/DocumentationFileServiceImpl.java
@@ -10,6 +10,8 @@
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@AllArgsConstructor
@Service
public class DocumentationFileServiceImpl extends ServiceImpl<DocumentationFileMapper, DocumentationFile> implements DocumentationFileService {
@@ -18,7 +20,7 @@
    @Override
    public IPage<DocumentationFile> documentationFileListPage(Page page, DocumentationFile documentationFile) {
        return documentationFileMapper.documentationFileListPage(page,documentationFile);
    public List<DocumentationFile> documentationFileListPage(DocumentationFile documentationFile) {
        return documentationFileMapper.documentationFileListPage(documentationFile);
    }
}
src/main/java/com/ruoyi/warehouse/service/impl/WarehouseGoodsShelvesServiceImpl.java
@@ -56,6 +56,9 @@
        WarehouseGoodsShelves one = warehouseGoodsShelvesMapper.selectOne(new LambdaQueryWrapper<WarehouseGoodsShelves>().eq(WarehouseGoodsShelves::getId, warehouseGoodsShelves.getId()));
        // 1. 检查货架名称是否已存在
        if (one == null) {
            if(warehouseGoodsShelves.getRow() == null || warehouseGoodsShelves.getRow() == 0 && warehouseGoodsShelves.getCol() == null || warehouseGoodsShelves.getCol() == 0){
                throw new IllegalArgumentException("层数和列数不能为空");
            }
            int insert = warehouseGoodsShelvesMapper.insert(warehouseGoodsShelves);
            if (insert <= 0) return false;
        }
@@ -64,11 +67,11 @@
        Long warehouseId = warehouseGoodsShelves.getWarehouseId();
        // 3. 批量创建行列记录
        List<WarehouseGoodsShelvesRowcol> rowcolList = new ArrayList<>();
        for (long i = 1; i <= warehouseGoodsShelves.getStorey(); i++) {
            for (long j = 1; j <= warehouseGoodsShelves.getArrange(); j++) {
        for (long i = 1; i <= warehouseGoodsShelves.getRow(); i++) {
            for (long j = 1; j <= warehouseGoodsShelves.getCol(); j++) {
                WarehouseGoodsShelvesRowcol rowcol = new WarehouseGoodsShelvesRowcol();
                rowcol.setStorey(i);
                rowcol.setArrange(j);
                rowcol.setRow(i);
                rowcol.setCol(j);
                rowcol.setWarehouseGoodsShelvesId(shelvesId);
                rowcolList.add(rowcol);
            }
src/main/java/com/ruoyi/warehouse/service/impl/WarehouseServiceImpl.java
@@ -150,7 +150,8 @@
    private WarehouseTreeDto convertToShelfTreeDto(WarehouseGoodsShelves shelf) {
        WarehouseTreeDto dto = new WarehouseTreeDto();
        copyProperties(shelf, dto);
        dto.setLabel(shelf.getGoodsShelvesName());
//        dto.setLabel(shelf.getGoodsShelvesName());
        dto.setLabel(shelf.getName());
        dto.setChildren(new ArrayList<>());
        return dto;
    }
@@ -161,7 +162,8 @@
    private WarehouseTreeDto convertToRowcolTreeDto(WarehouseGoodsShelvesRowcol rowcol) {
        WarehouseTreeDto dto = new WarehouseTreeDto();
        copyProperties(rowcol, dto);
        dto.setLabel(rowcol.getStorey() + "-" + rowcol.getArrange());
//        dto.setLabel(rowcol.getStorey() + "-" + rowcol.getArrange());
        dto.setLabel(rowcol.getRow() + "-" + rowcol.getCol());
        dto.setChildren(new ArrayList<>());
        return dto;
    }
src/main/resources/mapper/warehouse/DocumentationBorrowManagementMapper.xml
@@ -55,12 +55,11 @@
        </if>
    </select>
    <select id="export" resultType="com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto">
        select dbm.*,doc.doc_name,su.nick_name,sur.nick_name as return_nick_name
        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
        LEFT JOIN sys_user sur on sur.user_id = dbm.returner_id
        where sur.nick_name IS NOT NULL
        where 1=1
        <if test="documentationBorrowManagement.borrowStatus != null">
            and borrow_status = #{documentationBorrowManagement.borrowStatus}
        </if>
src/main/resources/mapper/warehouse/DocumentationFileMapper.xml
@@ -10,5 +10,8 @@
        <if test="documentationFile.name != null and documentationFile.name != '' ">
            AND name = #{documentationFile.name}
        </if>
        <if test="documentationFile.documentationId != null">
            AND documentation_id = #{documentationFile.documentationId}
        </if>
    </select>
</mapper>
src/main/resources/mapper/warehouse/DocumentationMapper.xml
@@ -10,9 +10,9 @@
        dc.category,
        CONCAT(
            w.warehouse_name, '-',
            wgs.goods_shelves_name, '-',
            wgsr.storey, '层-',
            wgsr.arrange, '列'
            wgs.name, '-',
            wgsr.row, '层-',
            wgsr.col, '列'
        ) AS location_info  -- 合并后的字段名
        FROM documentation doc
        LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id
@@ -39,9 +39,9 @@
        dc.category,
        CONCAT(
        w.warehouse_name, '-',
        wgs.goods_shelves_name, '-',
        wgsr.storey, '层-',
        wgsr.arrange, '列'
        wgs.name, '-',
        wgsr.row, '层-',
        wgsr.col, '列'
        ) AS location_info  -- 合并后的字段名
        FROM documentation doc
        LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id
src/main/resources/mapper/warehouse/WarehouseGoodsShelvesRowcolMapper.xml
@@ -5,24 +5,23 @@
<mapper namespace="com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper">
    <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto">
        SELECT
        doc.doc_name,
        doc.doc_number,
        wgsr.*,
        doc.*,
        w.warehouse_name,
        wgs.goods_shelves_name,
        wgs.name,
        dc.category
        FROM documentation doc
        LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id
        FROM warehouse_goods_shelves_rowcol wgsr
        LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.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
        LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id
        <where>
            1=1
            <if test="warehouseGoodsShelvesRowcol.storey != null">
                and wgsr.storey = #{warehouseGoodsShelvesRowcol.storey}
            <if test="warehouseGoodsShelvesRowcol.row != null">
                and wgsr.row = #{warehouseGoodsShelvesRowcol.row}
            </if>
            <if test="warehouseGoodsShelvesRowcol.arrange != null">
                and wgsr.arrange = #{warehouseGoodsShelvesRowcol.arrange}
            <if test="warehouseGoodsShelvesRowcol.col != null">
                and wgsr.col = #{warehouseGoodsShelvesRowcol.col}
            </if>
            <if test="warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId != null">
                and wgsr.warehouse_goods_shelves_id = #{warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId}
src/main/resources/mapper/warehouse/WarehouseMapper.xml
@@ -8,7 +8,7 @@
    <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseDto">
        SELECT
        w.*,
        wgs.goods_shelves_name,
        wgs.name,
        doc.doc_name,
        doc.doc_number,
        dc.category