From 98d8253743a547c57181834da9072bad0407f348 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 7 Jun 2024 11:06:28 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=9B=98=E7=82=B9=E8=AF=A6=E6=83=85=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98=E7=9B=98=E7=82=B9=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=AE=9E=E4=BD=93=E7=B1=BB=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=9B=98=E7=82=B9=E8=AF=A6=E6=83=85Service?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E8=AF=A6=E6=83=85ServiceImpl=20=E6=96=B0=E5=A2=9E=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E7=9B=98=E7=82=B9=E8=AF=A6=E6=83=85mapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/WarehouseInventoryCheckDetail.java | 247 ++++++++++++++++++ .../WarehouseInventoryCheckDetailMapper.java | 77 ++++++ ...IWarehouseInventoryCheckDetailService.java | 75 ++++++ ...ehouseInventoryCheckDetailServiceImpl.java | 126 +++++++++ .../WarehouseInventoryCheckDetailMapper.xml | 140 ++++++++++ 5 files changed, 665 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryCheckDetail.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryCheckDetailMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryCheckDetailService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryCheckDetailServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryCheckDetailMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryCheckDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryCheckDetail.java new file mode 100644 index 00000000..482b6eda --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryCheckDetail.java @@ -0,0 +1,247 @@ +package com.ruoyi.warehouse.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 仓库库存盘点详情对象 warehouse_inventory_check_detail + * + * @author 刘晓旭 + * @date 2024-06-07 + */ +public class WarehouseInventoryCheckDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 库存盘点详情ID */ + private Long inventoryCheckDetailId; + + /** 库存盘点单号 */ + private String inventoryCheckCode; + + /** 库存盘点人名 */ + private String inventoryCheckName; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 库存盘点数量 */ + @Excel(name = "库存盘点数量") + private Integer inventoryCheckNum; + + /** 当时库存账上数量 */ + @Excel(name = "当时库存账上数量") + private Integer inventoryAccountNum; + + /** 仓库存放地址 */ + @Excel(name = "仓库存放地址") + private String warehouseStoreAddress; + + /** 批号 */ + @Excel(name = "批号") + private Integer batchNumber; + + /** 仓库号 */ + private String warehouseCode; + + /** 仓库名称 */ + private String warehouseName; + + /** 库存盘点日期 */ + private Date inventoryCheckDate; + + /** 物料数合计 */ + private Integer materialTotal; + + /** 数量合计 */ + private Integer numTotal; + + public void setInventoryCheckDetailId(Long inventoryCheckDetailId) + { + this.inventoryCheckDetailId = inventoryCheckDetailId; + } + + public Long getInventoryCheckDetailId() + { + return inventoryCheckDetailId; + } + public void setInventoryCheckCode(String inventoryCheckCode) + { + this.inventoryCheckCode = inventoryCheckCode; + } + + public String getInventoryCheckCode() + { + return inventoryCheckCode; + } + public void setInventoryCheckName(String inventoryCheckName) + { + this.inventoryCheckName = inventoryCheckName; + } + + public String getInventoryCheckName() + { + return inventoryCheckName; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setInventoryCheckNum(Integer inventoryCheckNum) + { + this.inventoryCheckNum = inventoryCheckNum; + } + + public Integer getInventoryCheckNum() + { + return inventoryCheckNum; + } + public void setInventoryAccountNum(Integer inventoryAccountNum) + { + this.inventoryAccountNum = inventoryAccountNum; + } + + public Integer getInventoryAccountNum() + { + return inventoryAccountNum; + } + public void setWarehouseStoreAddress(String warehouseStoreAddress) + { + this.warehouseStoreAddress = warehouseStoreAddress; + } + + public String getWarehouseStoreAddress() + { + return warehouseStoreAddress; + } + public void setBatchNumber(Integer batchNumber) + { + this.batchNumber = batchNumber; + } + + public Integer getBatchNumber() + { + return batchNumber; + } + public void setWarehouseCode(String warehouseCode) + { + this.warehouseCode = warehouseCode; + } + + public String getWarehouseCode() + { + return warehouseCode; + } + public void setWarehouseName(String warehouseName) + { + this.warehouseName = warehouseName; + } + + public String getWarehouseName() + { + return warehouseName; + } + public void setInventoryCheckDate(Date inventoryCheckDate) + { + this.inventoryCheckDate = inventoryCheckDate; + } + + public Date getInventoryCheckDate() + { + return inventoryCheckDate; + } + public void setMaterialTotal(Integer materialTotal) + { + this.materialTotal = materialTotal; + } + + public Integer getMaterialTotal() + { + return materialTotal; + } + public void setNumTotal(Integer numTotal) + { + this.numTotal = numTotal; + } + + public Integer getNumTotal() + { + return numTotal; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("inventoryCheckDetailId", getInventoryCheckDetailId()) + .append("inventoryCheckCode", getInventoryCheckCode()) + .append("inventoryCheckName", getInventoryCheckName()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("materialUnit", getMaterialUnit()) + .append("materialDescribe", getMaterialDescribe()) + .append("inventoryCheckNum", getInventoryCheckNum()) + .append("inventoryAccountNum", getInventoryAccountNum()) + .append("warehouseStoreAddress", getWarehouseStoreAddress()) + .append("batchNumber", getBatchNumber()) + .append("warehouseCode", getWarehouseCode()) + .append("warehouseName", getWarehouseName()) + .append("inventoryCheckDate", getInventoryCheckDate()) + .append("materialTotal", getMaterialTotal()) + .append("numTotal", getNumTotal()) + .append("remark", getRemark()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryCheckDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryCheckDetailMapper.java new file mode 100644 index 00000000..2bde4d1b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryCheckDetailMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.warehouse.mapper; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseInventoryCheckDetail; + +/** + * 仓库库存盘点详情Mapper接口 + * + * @author 刘晓旭 + * @date 2024-06-07 + */ +public interface WarehouseInventoryCheckDetailMapper +{ + /** + * 查询仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 仓库库存盘点详情 + */ + public WarehouseInventoryCheckDetail selectWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 查询仓库库存盘点详情列表 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 仓库库存盘点详情集合 + */ + public List selectWarehouseInventoryCheckDetailList(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 新增仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + public int insertWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 修改仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + public int updateWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 删除仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + public int deleteWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 批量删除仓库库存盘点详情 + * + * @param inventoryCheckDetailIds 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseInventoryCheckDetailByIds(String[] inventoryCheckDetailIds); + + /** + * 作废仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + public int cancelWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 恢复仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + public int restoreWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryCheckDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryCheckDetailService.java new file mode 100644 index 00000000..5c113fa4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryCheckDetailService.java @@ -0,0 +1,75 @@ +package com.ruoyi.warehouse.service; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseInventoryCheckDetail; + +/** + * 仓库库存盘点详情Service接口 + * + * @author 刘晓旭 + * @date 2024-06-07 + */ +public interface IWarehouseInventoryCheckDetailService +{ + /** + * 查询仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 仓库库存盘点详情 + */ + public WarehouseInventoryCheckDetail selectWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 查询仓库库存盘点详情列表 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 仓库库存盘点详情集合 + */ + public List selectWarehouseInventoryCheckDetailList(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 新增仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + public int insertWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 修改仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + public int updateWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail); + + /** + * 批量删除仓库库存盘点详情 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseInventoryCheckDetailByIds(String ids); + + /** + * 删除仓库库存盘点详情信息 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + public int deleteWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 作废仓库库存盘点详情 + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return + */ + int cancelWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); + + /** + * 恢复仓库库存盘点详情 + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return + */ + int restoreWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryCheckDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryCheckDetailServiceImpl.java new file mode 100644 index 00000000..1198cf32 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryCheckDetailServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.warehouse.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.warehouse.mapper.WarehouseInventoryCheckDetailMapper; +import com.ruoyi.warehouse.domain.WarehouseInventoryCheckDetail; +import com.ruoyi.warehouse.service.IWarehouseInventoryCheckDetailService; +import com.ruoyi.common.core.text.Convert; + +/** + * 仓库库存盘点详情Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-06-07 + */ +@Service +public class WarehouseInventoryCheckDetailServiceImpl implements IWarehouseInventoryCheckDetailService +{ + @Autowired + private WarehouseInventoryCheckDetailMapper warehouseInventoryCheckDetailMapper; + + /** + * 查询仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 仓库库存盘点详情 + */ + @Override + public WarehouseInventoryCheckDetail selectWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId) + { + return warehouseInventoryCheckDetailMapper.selectWarehouseInventoryCheckDetailById(inventoryCheckDetailId); + } + + /** + * 查询仓库库存盘点详情列表 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 仓库库存盘点详情 + */ + @Override + public List selectWarehouseInventoryCheckDetailList(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail) + { + return warehouseInventoryCheckDetailMapper.selectWarehouseInventoryCheckDetailList(warehouseInventoryCheckDetail); + } + + /** + * 新增仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + @Override + public int insertWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail) + { + warehouseInventoryCheckDetail.setCreateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + warehouseInventoryCheckDetail.setCreateBy(loginName); + return warehouseInventoryCheckDetailMapper.insertWarehouseInventoryCheckDetail(warehouseInventoryCheckDetail); + } + + /** + * 修改仓库库存盘点详情 + * + * @param warehouseInventoryCheckDetail 仓库库存盘点详情 + * @return 结果 + */ + @Override + public int updateWarehouseInventoryCheckDetail(WarehouseInventoryCheckDetail warehouseInventoryCheckDetail) + { + String loginName = ShiroUtils.getLoginName(); + warehouseInventoryCheckDetail.setUpdateBy(loginName); + warehouseInventoryCheckDetail.setUpdateTime(DateUtils.getNowDate()); + return warehouseInventoryCheckDetailMapper.updateWarehouseInventoryCheckDetail(warehouseInventoryCheckDetail); + } + + /** + * 删除仓库库存盘点详情对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteWarehouseInventoryCheckDetailByIds(String ids) + { + return warehouseInventoryCheckDetailMapper.deleteWarehouseInventoryCheckDetailByIds(Convert.toStrArray(ids)); + } + + /** + * 删除仓库库存盘点详情信息 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + @Override + public int deleteWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId) + { + return warehouseInventoryCheckDetailMapper.deleteWarehouseInventoryCheckDetailById(inventoryCheckDetailId); + } + + /** + * 作废仓库库存盘点详情 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + @Override + public int cancelWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId) + { + return warehouseInventoryCheckDetailMapper.cancelWarehouseInventoryCheckDetailById(inventoryCheckDetailId); + } + + /** + * 恢复仓库库存盘点详情信息 + * + * @param inventoryCheckDetailId 仓库库存盘点详情ID + * @return 结果 + */ + @Override + public int restoreWarehouseInventoryCheckDetailById(Long inventoryCheckDetailId) + { + return warehouseInventoryCheckDetailMapper.restoreWarehouseInventoryCheckDetailById(inventoryCheckDetailId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryCheckDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryCheckDetailMapper.xml new file mode 100644 index 00000000..3d543a45 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryCheckDetailMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select inventory_check_detail_id, inventory_check_code, inventory_check_name, material_no, material_name, material_unit, material_describe, inventory_check_num, inventory_account_num, warehouse_store_address, batch_number, warehouse_code, warehouse_name, inventory_check_date, material_total, num_total, remark, create_time, create_by, update_by, update_time from warehouse_inventory_check_detail + + + + + + + + insert into warehouse_inventory_check_detail + + inventory_check_code, + inventory_check_name, + material_no, + material_name, + material_unit, + material_describe, + inventory_check_num, + inventory_account_num, + warehouse_store_address, + batch_number, + warehouse_code, + warehouse_name, + inventory_check_date, + material_total, + num_total, + remark, + create_time, + create_by, + update_by, + update_time, + + + #{inventoryCheckCode}, + #{inventoryCheckName}, + #{materialNo}, + #{materialName}, + #{materialUnit}, + #{materialDescribe}, + #{inventoryCheckNum}, + #{inventoryAccountNum}, + #{warehouseStoreAddress}, + #{batchNumber}, + #{warehouseCode}, + #{warehouseName}, + #{inventoryCheckDate}, + #{materialTotal}, + #{numTotal}, + #{remark}, + #{createTime}, + #{createBy}, + #{updateBy}, + #{updateTime}, + + + + + update warehouse_inventory_check_detail + + inventory_check_code = #{inventoryCheckCode}, + inventory_check_name = #{inventoryCheckName}, + material_no = #{materialNo}, + material_name = #{materialName}, + material_unit = #{materialUnit}, + material_describe = #{materialDescribe}, + inventory_check_num = #{inventoryCheckNum}, + inventory_account_num = #{inventoryAccountNum}, + warehouse_store_address = #{warehouseStoreAddress}, + batch_number = #{batchNumber}, + warehouse_code = #{warehouseCode}, + warehouse_name = #{warehouseName}, + inventory_check_date = #{inventoryCheckDate}, + material_total = #{materialTotal}, + num_total = #{numTotal}, + remark = #{remark}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where inventory_check_detail_id = #{inventoryCheckDetailId} + + + + delete from warehouse_inventory_check_detail where inventory_check_detail_id = #{inventoryCheckDetailId} + + + + delete from warehouse_inventory_check_detail where inventory_check_detail_id in + + #{inventoryCheckDetailId} + + + + + update warehouse_inventory_check_detail set del_flag = '1' where inventory_check_detail_id = #{inventoryCheckDetailId} + + + + update warehouse_inventory_check_detail set del_flag = '0' where inventory_check_detail_id = #{inventoryCheckDetailId} + + + \ No newline at end of file