yaowanxin
10 天以前 b7f2ba063db04ee0dbea09e632f413db7af25bac
仓库货架,文档借阅修改
已修改8个文件
102 ■■■■■ 文件已修改
src/main/java/com/ruoyi/warehouse/controller/DocumentationController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/WarehouseController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/Documentation.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/DocumentationBorrowManagement.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelvesRowcol.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/DocumentationMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/WarehouseGoodsShelvesRowcolMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/warehouse/WarehouseMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/warehouse/controller/DocumentationController.java
@@ -43,8 +43,7 @@
    @ApiOperation("文档信息表-添加")
    @Log(title = "文档信息表-添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody Documentation documentation) {
        boolean save = documentationService.save(documentation);
        return save ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败");
        return AjaxResult.success(documentationService.save(documentation));
    }
    @PostMapping("/update")
    @ApiOperation("文档信息表-更新")
@@ -57,9 +56,7 @@
    @Log(title = "文档信息表-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
        boolean remove = documentationService.removeBatchByIds(ids);
//        boolean remove = documentationService.deleteByIds(ids);
        return remove ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
        return AjaxResult.success(documentationService.removeBatchByIds(ids));
    }
    @PostMapping("/export")
src/main/java/com/ruoyi/warehouse/controller/WarehouseController.java
@@ -36,8 +36,7 @@
    @ApiOperation("仓库-添加")
    @Log(title = "仓库-添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody Warehouse warehouse) {
        boolean save = warehouseService.save(warehouse);
        return save ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败");
        return AjaxResult.success(warehouseService.save(warehouse));
    }
    @PostMapping("/update")
@@ -52,7 +51,6 @@
    @Log(title = "仓库-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
        boolean remove = warehouseService.deleteByIds(ids);
        return remove ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
        return AjaxResult.success(warehouseService.deleteByIds(ids));
    }
}
src/main/java/com/ruoyi/warehouse/pojo/Documentation.java
@@ -1,14 +1,14 @@
package com.ruoyi.warehouse.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -23,111 +23,149 @@
     * 
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "文档ID")
    private Long id;
    /**
     * 类别名称
     */
    @Excel(name = "类别名称")
    @ApiModelProperty(value = "类别名称")
    private String categoryName;
    /**
     * 文档名称
     */
    @Excel(name = "文档名称")
    @ApiModelProperty(value = "文档名称")
    private String docName;
    /**
     * 文档编号
     */
    @Excel(name = "文档编号")
    @ApiModelProperty(value = "文档编号")
    private Long docNumber;
    /**
     * 年份
     */
    @Excel(name = "年份")
    @ApiModelProperty(value = "年份")
    private Long year;
    /**
     * 责任人
     */
    @Excel(name = "责任人")
    @ApiModelProperty(value = "责任人")
    private String responsiblePerson;
    /**
     * 文档放置位置
     */
    @Excel(name = "文档放置位置")
    @ApiModelProperty(value = "文档放置位置")
    private Long warehouseGoodsShelvesRowcolId;
    /**
     * 文档日期
     */
    @Excel(name = "文档日期")
    @ApiModelProperty(value = "文档日期")
    private LocalDateTime docDate;
    /**
     * 保管期限
     */
    @Excel(name = "保管期限")
    @ApiModelProperty(value = "保管期限")
    private Long retentionPeriod;
    /**
     * 保密级别
     */
    @Excel(name = "保密级别")
    @ApiModelProperty(value = "保密级别")
    private String securityLevel;
    /**
     * 份数
     */
    @Excel(name = "份数")
    @ApiModelProperty(value = "份数")
    private Long copyCount;
    /**
     * 页数
     */
    @Excel(name = "页数")
    @ApiModelProperty(value = "页数")
    private Long pageCount;
    /**
     * 文档类别
     */
    @Excel(name = "文档类别")
    @ApiModelProperty(value = "文档类别")
    private String docCategory;
    /**
     * 文档种类
     */
    @Excel(name = "文档种类")
    @ApiModelProperty(value = "文档种类")
    private String docType;
    /**
     * 紧急程度
     */
    @Excel(name = "紧急程度")
    @ApiModelProperty(value = "紧急程度")
    private String urgencyLevel;
    /**
     * 文档状态
     */
    @Excel(name = "文档状态")
    @ApiModelProperty(value = "文档状态")
    private String docStatus;
    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 创建用户
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
     * 修改用户
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateUser;
    /**
     * 租户ID
     */
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
    private static final long serialVersionUID = 1L;
src/main/java/com/ruoyi/warehouse/pojo/DocumentationBorrowManagement.java
@@ -1,9 +1,7 @@
package com.ruoyi.warehouse.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
@@ -68,26 +66,31 @@
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 创建用户
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
     * 修改用户
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateUser;
    /**
     * 租户id
     */
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
    private static final long serialVersionUID = 1L;
src/main/java/com/ruoyi/warehouse/pojo/WarehouseGoodsShelvesRowcol.java
@@ -25,10 +25,7 @@
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 文档id
     */
    private Long documentationId;
    /**
     * 层数
     */
@@ -43,11 +40,6 @@
     * 货架id
     */
    private Long warehouseGoodsShelvesId;
    /**
     * 仓库id
     */
    private Long warehouseId;
    /**
     * 创建时间
src/main/resources/mapper/warehouse/DocumentationMapper.xml
@@ -59,6 +59,6 @@
        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 t2.warehouse_id = t4.id
              left join warehouse t4 on t3.warehouse_id = t4.id
    </select>
</mapper>
src/main/resources/mapper/warehouse/WarehouseGoodsShelvesRowcolMapper.xml
@@ -9,17 +9,17 @@
        select * from warehouse_goods_shelves_rowcol
        <where>
            1=1
            <if test="storey != null">
                and storey = #{storey}
            <if test="warehouseGoodsShelvesRowcol.storey != null">
                and storey = #{warehouseGoodsShelvesRowcol.storey}
            </if>
            <if test="arrange != null">
                and arrange = #{arrange}
            <if test="warehouseGoodsShelvesRowcol.arrange != null">
                and arrange = #{warehouseGoodsShelvesRowcol.arrange}
            </if>
            <if test="warehouseGoodsShelvesId != null">
                and warehouse_goods_shelves_id = #{warehouseGoodsShelvesId}
            <if test="warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId != null">
                and warehouse_goods_shelves_id = #{warehouseGoodsShelvesRowcol.warehouseGoodsShelvesId}
            </if>
            <if test="warehouseId != null">
                and warehouse_id = #{warehouseId}
            <if test="warehouseGoodsShelvesRowcol.warehouseId != null">
                and warehouse_id = #{warehouseGoodsShelvesRowcol.warehouseId}
            </if>
        </where>
    </select>
src/main/resources/mapper/warehouse/WarehouseMapper.xml
@@ -9,8 +9,8 @@
        select * from warehouse
        <where>
            1=1
            <if test="warehouseName != null">
                and warehouse_name like concat('%',#{warehouseName},'%')
            <if test="warehouse.warehouseName != null">
                and warehouse_name like concat('%',#{warehouse.warehouseName},'%')
            </if>
        </where>
    </select>