From 877f0f4171f51576d41e1d6539a81f218414ecab Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 7 Jun 2024 08:48:27 +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=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2=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=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85Service?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= =?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=E6=9F=A5=E8=AF=A2=E6=9F=A5=E8=AF=A2mapper=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=BA=93=E5=AD=98=E5=8E=86=E5=8F=B2=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=8C=89=E9=92=AE=E5=8F=AA=E8=83=BD=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=B8=80=E6=9D=A1=E6=95=B0=E6=8D=AE=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=BA=93=E5=AD=98=E5=8E=86=E5=8F=B2=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?inventoryHistory.html=20=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=90=8E=E7=AB=AF=E6=9F=A5=E8=AF=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E5=8E=86=E5=8F=B2=E5=90=8E=E7=AB=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BB=93=E5=BA=93=E5=BA=93=E5=AD=98=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8F=B7=E6=9F=A5=E8=AF=A2=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseInventoryInquiryController.java | 46 +- .../WarehouseInventoryInquiryDetail.java | 421 ++++++++++++++++++ ...WarehouseInventoryInquiryDetailMapper.java | 82 ++++ .../WarehouseInventoryInquiryMapper.java | 5 + ...arehouseInventoryInquiryDetailService.java | 80 ++++ .../IWarehouseInventoryInquiryService.java | 5 + ...ouseInventoryInquiryDetailServiceImpl.java | 135 ++++++ .../WarehouseInventoryInquiryServiceImpl.java | 9 + .../WarehouseInventoryInquiryDetailMapper.xml | 198 ++++++++ .../WarehouseInventoryInquiryMapper.xml | 8 +- .../inventoryInquiry/inventoryHistory.html | 145 ++++++ .../inventoryInquiry/inventoryInquiry.html | 17 + 12 files changed, 1130 insertions(+), 21 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiryDetail.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryDetailMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryDetailService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryDetailServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryDetailMapper.xml create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java index 38958ff6..ec82d5da 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java @@ -1,6 +1,10 @@ package com.ruoyi.warehouse.controller; import java.util.List; + +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiryDetail; +import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamage; +import com.ruoyi.warehouse.service.IWarehouseInventoryInquiryDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -34,6 +38,9 @@ public class WarehouseInventoryInquiryController extends BaseController @Autowired private IWarehouseInventoryInquiryService warehouseInventoryInquiryService; + @Autowired + private IWarehouseInventoryInquiryDetailService inventoryInquiryDetailService; + @RequiresPermissions("warehouse:inventoryInquiry:view") @GetMapping() public String inventoryInquiry() @@ -113,39 +120,38 @@ public class WarehouseInventoryInquiryController extends BaseController } /** - * 删除仓库库存查询 + * 修改仓库库存历史 */ - @RequiresPermissions("warehouse:inventoryInquiry:remove") - @Log(title = "仓库库存查询", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) + @GetMapping("/inventoryHistory/{materialNo}") + public String inventoryHistory(@PathVariable("materialNo") String materialNo, ModelMap mmap) { - return toAjax(warehouseInventoryInquiryService.deleteWarehouseInventoryInquiryByIds(ids)); + WarehouseInventoryInquiry warehouseInventoryInquiry = warehouseInventoryInquiryService.selectWarehouseInventoryInquiryByMaterialNo(materialNo); + mmap.put("warehouseInventoryInquiry", warehouseInventoryInquiry); + return prefix + "/inventoryHistory"; } /** - * 作废仓库库存查询 + * 修改保存仓库库存历史 */ - @RequiresPermissions("warehouse:inventoryInquiry:cancel") - @Log(title = "仓库库存查询", businessType = BusinessType.CANCEL) - @GetMapping( "/cancel/{id}") + @RequiresPermissions("warehouse:inventoryInquiry:inventoryHistory") + @Log(title = "仓库库存查询", businessType = BusinessType.UPDATE) + @PostMapping("/inventoryHistory") @ResponseBody - public AjaxResult cancel(@PathVariable("id") Long id){ - return toAjax(warehouseInventoryInquiryService.cancelWarehouseInventoryInquiryById(id)); + public AjaxResult inventoryHistorySave(WarehouseInventoryInquiry warehouseInventoryInquiry) + { + return toAjax(warehouseInventoryInquiryService.updateWarehouseInventoryInquiry(warehouseInventoryInquiry)); } /** - * 恢复仓库库存查询 + * 仓库库存历史详情列表 */ - @RequiresPermissions("warehouse:inventoryInquiry:restore") - @Log(title = "仓库库存查询", businessType = BusinessType.RESTORE) - @GetMapping( "/restore/{id}") + @PostMapping("/getMaterialInventoryHistoricalList") @ResponseBody - public AjaxResult restore(@PathVariable("id")Long id) + public TableDataInfo getMaterialInventoryHistoricalList(WarehouseInventoryInquiry warehouseInventoryInquiry) { - return toAjax(warehouseInventoryInquiryService.restoreWarehouseInventoryInquiryById(id)); + startPage(); + List list = inventoryInquiryDetailService.selectWarehouseInventoryInquiryDetailByMaterialNo(warehouseInventoryInquiry.getMaterialNo()); + return getDataTable(list); } - } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiryDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiryDetail.java new file mode 100644 index 00000000..a50cb972 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiryDetail.java @@ -0,0 +1,421 @@ +package com.ruoyi.warehouse.domain; + +import java.math.BigDecimal; +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_inquiry_detail + * + * @author 刘晓旭 + * @date 2024-06-06 + */ +public class WarehouseInventoryInquiryDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 库存查询详情id */ + private Long inventoryInquiryDetailId; + + /** 料号 */ + private String materialNo; + + /** 物料名称 */ + private String materialName; + + /** 物料类型 */ + private String materialType; + + /** 物料图片地址 */ + private String materialPhotourl; + + /** 物料品牌 */ + private String materialBrand; + + /** 物料单位 */ + private String materialUnit; + + /** 物料描述 */ + private String materialDescribe; + + /** 物料加工方式 */ + private String materialProcessMethod; + + /** 物料型号 */ + private String materialModel; + + /** 物料规格 */ + private String materialSpecification; + + /** 物料历史总数量 */ + private Integer historicalTotal; + + /** 可用库存数 */ + private Integer availableStockNum; + + /** 物料归属可用库存数 */ + private Integer attributionAvailableStockNum; + + /** 物料无归属可用库存数 */ + private Integer noattributionAvailableStockNum; + + /** 物料使用数 */ + private Integer useNum; + + /** 物料报损数 */ + private Integer reportDamageNum; + + /** 物料使用状态 */ + private String materialUseStatus; + + /** 库存归属单号 */ + @Excel(name = "库存归属单号") + private String inventoryAttributionCode; + + /** 库存使用单号 */ + @Excel(name = "库存使用单号") + private String inventoryUseCode; + + /** 库存历史时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "库存历史时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date inventoryHistoricalTime; + + /** 库存历史类型 */ + @Excel(name = "库存历史类型") + private String inventoryHistoricalType; + + /** 库存增减 */ + @Excel(name = "库存增减") + private String inventoryIncreaseDecrease; + + /** 库存历史数量 */ + @Excel(name = "库存历史数量") + private Integer inventoryHistoricalNum; + + /** 不含税采购总价 */ + @Excel(name = "不含税采购总价") + private BigDecimal purchasePriceExcludingTax; + + /** 含税总价 */ + @Excel(name = "含税总价") + private BigDecimal purchasePriceIncludesTax; + + /** 采购单号 */ + @Excel(name = "采购单号") + private String purchaseOrderCode; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private String supplierCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + public void setInventoryInquiryDetailId(Long inventoryInquiryDetailId) + { + this.inventoryInquiryDetailId = inventoryInquiryDetailId; + } + + public Long getInventoryInquiryDetailId() + { + return inventoryInquiryDetailId; + } + 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 setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setMaterialPhotourl(String materialPhotourl) + { + this.materialPhotourl = materialPhotourl; + } + + public String getMaterialPhotourl() + { + return materialPhotourl; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + 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 setMaterialProcessMethod(String materialProcessMethod) + { + this.materialProcessMethod = materialProcessMethod; + } + + public String getMaterialProcessMethod() + { + return materialProcessMethod; + } + public void setMaterialModel(String materialModel) + { + this.materialModel = materialModel; + } + + public String getMaterialModel() + { + return materialModel; + } + public void setMaterialSpecification(String materialSpecification) + { + this.materialSpecification = materialSpecification; + } + + public String getMaterialSpecification() + { + return materialSpecification; + } + public void setHistoricalTotal(Integer historicalTotal) + { + this.historicalTotal = historicalTotal; + } + + public Integer getHistoricalTotal() + { + return historicalTotal; + } + public void setAvailableStockNum(Integer availableStockNum) + { + this.availableStockNum = availableStockNum; + } + + public Integer getAvailableStockNum() + { + return availableStockNum; + } + public void setAttributionAvailableStockNum(Integer attributionAvailableStockNum) + { + this.attributionAvailableStockNum = attributionAvailableStockNum; + } + + public Integer getAttributionAvailableStockNum() + { + return attributionAvailableStockNum; + } + public void setNoattributionAvailableStockNum(Integer noattributionAvailableStockNum) + { + this.noattributionAvailableStockNum = noattributionAvailableStockNum; + } + + public Integer getNoattributionAvailableStockNum() + { + return noattributionAvailableStockNum; + } + public void setUseNum(Integer useNum) + { + this.useNum = useNum; + } + + public Integer getUseNum() + { + return useNum; + } + public void setReportDamageNum(Integer reportDamageNum) + { + this.reportDamageNum = reportDamageNum; + } + + public Integer getReportDamageNum() + { + return reportDamageNum; + } + public void setMaterialUseStatus(String materialUseStatus) + { + this.materialUseStatus = materialUseStatus; + } + + public String getMaterialUseStatus() + { + return materialUseStatus; + } + public void setInventoryAttributionCode(String inventoryAttributionCode) + { + this.inventoryAttributionCode = inventoryAttributionCode; + } + + public String getInventoryAttributionCode() + { + return inventoryAttributionCode; + } + public void setInventoryUseCode(String inventoryUseCode) + { + this.inventoryUseCode = inventoryUseCode; + } + + public String getInventoryUseCode() + { + return inventoryUseCode; + } + public void setInventoryHistoricalTime(Date inventoryHistoricalTime) + { + this.inventoryHistoricalTime = inventoryHistoricalTime; + } + + public Date getInventoryHistoricalTime() + { + return inventoryHistoricalTime; + } + public void setInventoryHistoricalType(String inventoryHistoricalType) + { + this.inventoryHistoricalType = inventoryHistoricalType; + } + + public String getInventoryHistoricalType() + { + return inventoryHistoricalType; + } + public void setInventoryIncreaseDecrease(String inventoryIncreaseDecrease) + { + this.inventoryIncreaseDecrease = inventoryIncreaseDecrease; + } + + public String getInventoryIncreaseDecrease() + { + return inventoryIncreaseDecrease; + } + public void setInventoryHistoricalNum(Integer inventoryHistoricalNum) + { + this.inventoryHistoricalNum = inventoryHistoricalNum; + } + + public Integer getInventoryHistoricalNum() + { + return inventoryHistoricalNum; + } + public void setPurchasePriceExcludingTax(BigDecimal purchasePriceExcludingTax) + { + this.purchasePriceExcludingTax = purchasePriceExcludingTax; + } + + public BigDecimal getPurchasePriceExcludingTax() + { + return purchasePriceExcludingTax; + } + public void setPurchasePriceIncludesTax(BigDecimal purchasePriceIncludesTax) + { + this.purchasePriceIncludesTax = purchasePriceIncludesTax; + } + + public BigDecimal getPurchasePriceIncludesTax() + { + return purchasePriceIncludesTax; + } + public void setPurchaseOrderCode(String purchaseOrderCode) + { + this.purchaseOrderCode = purchaseOrderCode; + } + + public String getPurchaseOrderCode() + { + return purchaseOrderCode; + } + public void setSupplierCode(String supplierCode) + { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() + { + return supplierCode; + } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("inventoryInquiryDetailId", getInventoryInquiryDetailId()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialPhotourl", getMaterialPhotourl()) + .append("materialBrand", getMaterialBrand()) + .append("materialUnit", getMaterialUnit()) + .append("materialDescribe", getMaterialDescribe()) + .append("materialProcessMethod", getMaterialProcessMethod()) + .append("materialModel", getMaterialModel()) + .append("materialSpecification", getMaterialSpecification()) + .append("historicalTotal", getHistoricalTotal()) + .append("availableStockNum", getAvailableStockNum()) + .append("attributionAvailableStockNum", getAttributionAvailableStockNum()) + .append("noattributionAvailableStockNum", getNoattributionAvailableStockNum()) + .append("useNum", getUseNum()) + .append("reportDamageNum", getReportDamageNum()) + .append("materialUseStatus", getMaterialUseStatus()) + .append("inventoryAttributionCode", getInventoryAttributionCode()) + .append("inventoryUseCode", getInventoryUseCode()) + .append("inventoryHistoricalTime", getInventoryHistoricalTime()) + .append("inventoryHistoricalType", getInventoryHistoricalType()) + .append("inventoryIncreaseDecrease", getInventoryIncreaseDecrease()) + .append("inventoryHistoricalNum", getInventoryHistoricalNum()) + .append("purchasePriceExcludingTax", getPurchasePriceExcludingTax()) + .append("purchasePriceIncludesTax", getPurchasePriceIncludesTax()) + .append("purchaseOrderCode", getPurchaseOrderCode()) + .append("supplierCode", getSupplierCode()) + .append("supplierName", getSupplierName()) + .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/WarehouseInventoryInquiryDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryDetailMapper.java new file mode 100644 index 00000000..fee76a32 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryDetailMapper.java @@ -0,0 +1,82 @@ +package com.ruoyi.warehouse.mapper; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiryDetail; + +/** + * 仓库库存查询详情Mapper接口 + * + * @author 刘晓旭 + * @date 2024-06-06 + */ +public interface WarehouseInventoryInquiryDetailMapper +{ + /** + * 查询仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 仓库库存查询详情 + */ + public WarehouseInventoryInquiryDetail selectWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 查询仓库库存查询详情列表 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 仓库库存查询详情集合 + */ + public List selectWarehouseInventoryInquiryDetailList(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 新增仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + public int insertWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 修改仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + public int updateWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 删除仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + public int deleteWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 批量删除仓库库存查询详情 + * + * @param inventoryInquiryDetailIds 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseInventoryInquiryDetailByIds(String[] inventoryInquiryDetailIds); + + /** + * 作废仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + public int cancelWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 恢复仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + public int restoreWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /* + * 根据物料号查询库存查询详情列表 + * */ + List selectWarehouseInventoryInquiryDetailByMaterialNo(String materialNo); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryMapper.java index fc53d363..8db09ffb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseInventoryInquiryMapper.java @@ -74,4 +74,9 @@ public interface WarehouseInventoryInquiryMapper * @return 结果 */ public int restoreWarehouseInventoryInquiryById(Long inventoryInquiryId); + + /* + * 根据物料号查询库存查询信息 + * */ + WarehouseInventoryInquiry selectWarehouseInventoryInquiryByMaterialNo(String materialNo); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryDetailService.java new file mode 100644 index 00000000..aa485d0a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryDetailService.java @@ -0,0 +1,80 @@ +package com.ruoyi.warehouse.service; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiryDetail; + +/** + * 仓库库存查询详情Service接口 + * + * @author 刘晓旭 + * @date 2024-06-06 + */ +public interface IWarehouseInventoryInquiryDetailService +{ + /** + * 查询仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 仓库库存查询详情 + */ + public WarehouseInventoryInquiryDetail selectWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 查询仓库库存查询详情列表 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 仓库库存查询详情集合 + */ + public List selectWarehouseInventoryInquiryDetailList(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 新增仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + public int insertWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 修改仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + public int updateWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail); + + /** + * 批量删除仓库库存查询详情 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseInventoryInquiryDetailByIds(String ids); + + /** + * 删除仓库库存查询详情信息 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + public int deleteWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 作废仓库库存查询详情 + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return + */ + int cancelWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /** + * 恢复仓库库存查询详情 + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return + */ + int restoreWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId); + + /* + * 根据物料号查询库存查询详情列表 + * */ + List selectWarehouseInventoryInquiryDetailByMaterialNo(String materialNo); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java index 152b8679..4f6094ad 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java @@ -72,4 +72,9 @@ public interface IWarehouseInventoryInquiryService * @return */ int restoreWarehouseInventoryInquiryById(Long inventoryInquiryId); + + /* + * 根据物料号查询库存查询信息 + * */ + public WarehouseInventoryInquiry selectWarehouseInventoryInquiryByMaterialNo(String materialNo); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryDetailServiceImpl.java new file mode 100644 index 00000000..b18c064d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryDetailServiceImpl.java @@ -0,0 +1,135 @@ +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.WarehouseInventoryInquiryDetailMapper; +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiryDetail; +import com.ruoyi.warehouse.service.IWarehouseInventoryInquiryDetailService; +import com.ruoyi.common.core.text.Convert; + +/** + * 仓库库存查询详情Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-06-06 + */ +@Service +public class WarehouseInventoryInquiryDetailServiceImpl implements IWarehouseInventoryInquiryDetailService +{ + @Autowired + private WarehouseInventoryInquiryDetailMapper warehouseInventoryInquiryDetailMapper; + + /** + * 查询仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 仓库库存查询详情 + */ + @Override + public WarehouseInventoryInquiryDetail selectWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId) + { + return warehouseInventoryInquiryDetailMapper.selectWarehouseInventoryInquiryDetailById(inventoryInquiryDetailId); + } + + /** + * 查询仓库库存查询详情列表 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 仓库库存查询详情 + */ + @Override + public List selectWarehouseInventoryInquiryDetailList(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail) + { + return warehouseInventoryInquiryDetailMapper.selectWarehouseInventoryInquiryDetailList(warehouseInventoryInquiryDetail); + } + + /** + * 新增仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + @Override + public int insertWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail) + { + warehouseInventoryInquiryDetail.setCreateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + warehouseInventoryInquiryDetail.setCreateBy(loginName); + return warehouseInventoryInquiryDetailMapper.insertWarehouseInventoryInquiryDetail(warehouseInventoryInquiryDetail); + } + + /** + * 修改仓库库存查询详情 + * + * @param warehouseInventoryInquiryDetail 仓库库存查询详情 + * @return 结果 + */ + @Override + public int updateWarehouseInventoryInquiryDetail(WarehouseInventoryInquiryDetail warehouseInventoryInquiryDetail) + { + String loginName = ShiroUtils.getLoginName(); + warehouseInventoryInquiryDetail.setUpdateBy(loginName); + warehouseInventoryInquiryDetail.setUpdateTime(DateUtils.getNowDate()); + return warehouseInventoryInquiryDetailMapper.updateWarehouseInventoryInquiryDetail(warehouseInventoryInquiryDetail); + } + + /** + * 删除仓库库存查询详情对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteWarehouseInventoryInquiryDetailByIds(String ids) + { + return warehouseInventoryInquiryDetailMapper.deleteWarehouseInventoryInquiryDetailByIds(Convert.toStrArray(ids)); + } + + /** + * 删除仓库库存查询详情信息 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + @Override + public int deleteWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId) + { + return warehouseInventoryInquiryDetailMapper.deleteWarehouseInventoryInquiryDetailById(inventoryInquiryDetailId); + } + + /** + * 作废仓库库存查询详情 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + @Override + public int cancelWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId) + { + return warehouseInventoryInquiryDetailMapper.cancelWarehouseInventoryInquiryDetailById(inventoryInquiryDetailId); + } + + /** + * 恢复仓库库存查询详情信息 + * + * @param inventoryInquiryDetailId 仓库库存查询详情ID + * @return 结果 + */ + @Override + public int restoreWarehouseInventoryInquiryDetailById(Long inventoryInquiryDetailId) + { + return warehouseInventoryInquiryDetailMapper.restoreWarehouseInventoryInquiryDetailById(inventoryInquiryDetailId); + } + + /* + * 根据物料号查询库存查询详情列表 + * */ + @Override + public List selectWarehouseInventoryInquiryDetailByMaterialNo(String materialNo) { + + return warehouseInventoryInquiryDetailMapper.selectWarehouseInventoryInquiryDetailByMaterialNo(materialNo); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java index afae57e4..d6b5d112 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java @@ -123,4 +123,13 @@ public class WarehouseInventoryInquiryServiceImpl implements IWarehouseInventory { return warehouseInventoryInquiryMapper.restoreWarehouseInventoryInquiryById(inventoryInquiryId); } + + /* + * 根据物料号查询库存查询信息 + * */ + @Override + public WarehouseInventoryInquiry selectWarehouseInventoryInquiryByMaterialNo(String materialNo) { + + return warehouseInventoryInquiryMapper.selectWarehouseInventoryInquiryByMaterialNo(materialNo); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryDetailMapper.xml new file mode 100644 index 00000000..3e0f79d8 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryDetailMapper.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select inventory_inquiry_detail_id, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, material_model, material_specification, historical_total, available_stock_num, attribution_available_stock_num, noattribution_available_stock_num, use_num, report_damage_num, material_use_status, inventory_attribution_code, inventory_use_code, inventory_historical_time, inventory_historical_type, inventory_increase_decrease, inventory_historical_num, purchase_price_excluding_tax, purchase_price_includes_tax, purchase_order_code, supplier_code, supplier_name, remark, create_time, create_by, update_by, update_time from warehouse_inventory_inquiry_detail + + + + + + + + + + + insert into warehouse_inventory_inquiry_detail + + material_no, + material_name, + material_type, + material_photoUrl, + material_brand, + material_unit, + material_describe, + material_process_method, + material_model, + material_specification, + historical_total, + available_stock_num, + attribution_available_stock_num, + noattribution_available_stock_num, + use_num, + report_damage_num, + material_use_status, + inventory_attribution_code, + inventory_use_code, + inventory_historical_time, + inventory_historical_type, + inventory_increase_decrease, + inventory_historical_num, + purchase_price_excluding_tax, + purchase_price_includes_tax, + purchase_order_code, + supplier_code, + supplier_name, + remark, + create_time, + create_by, + update_by, + update_time, + + + #{materialNo}, + #{materialName}, + #{materialType}, + #{materialPhotourl}, + #{materialBrand}, + #{materialUnit}, + #{materialDescribe}, + #{materialProcessMethod}, + #{materialModel}, + #{materialSpecification}, + #{historicalTotal}, + #{availableStockNum}, + #{attributionAvailableStockNum}, + #{noattributionAvailableStockNum}, + #{useNum}, + #{reportDamageNum}, + #{materialUseStatus}, + #{inventoryAttributionCode}, + #{inventoryUseCode}, + #{inventoryHistoricalTime}, + #{inventoryHistoricalType}, + #{inventoryIncreaseDecrease}, + #{inventoryHistoricalNum}, + #{purchasePriceExcludingTax}, + #{purchasePriceIncludesTax}, + #{purchaseOrderCode}, + #{supplierCode}, + #{supplierName}, + #{remark}, + #{createTime}, + #{createBy}, + #{updateBy}, + #{updateTime}, + + + + + update warehouse_inventory_inquiry_detail + + material_no = #{materialNo}, + material_name = #{materialName}, + material_type = #{materialType}, + material_photoUrl = #{materialPhotourl}, + material_brand = #{materialBrand}, + material_unit = #{materialUnit}, + material_describe = #{materialDescribe}, + material_process_method = #{materialProcessMethod}, + material_model = #{materialModel}, + material_specification = #{materialSpecification}, + historical_total = #{historicalTotal}, + available_stock_num = #{availableStockNum}, + attribution_available_stock_num = #{attributionAvailableStockNum}, + noattribution_available_stock_num = #{noattributionAvailableStockNum}, + use_num = #{useNum}, + report_damage_num = #{reportDamageNum}, + material_use_status = #{materialUseStatus}, + inventory_attribution_code = #{inventoryAttributionCode}, + inventory_use_code = #{inventoryUseCode}, + inventory_historical_time = #{inventoryHistoricalTime}, + inventory_historical_type = #{inventoryHistoricalType}, + inventory_increase_decrease = #{inventoryIncreaseDecrease}, + inventory_historical_num = #{inventoryHistoricalNum}, + purchase_price_excluding_tax = #{purchasePriceExcludingTax}, + purchase_price_includes_tax = #{purchasePriceIncludesTax}, + purchase_order_code = #{purchaseOrderCode}, + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + remark = #{remark}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where inventory_inquiry_detail_id = #{inventoryInquiryDetailId} + + + + delete from warehouse_inventory_inquiry_detail where inventory_inquiry_detail_id = #{inventoryInquiryDetailId} + + + + delete from warehouse_inventory_inquiry_detail where inventory_inquiry_detail_id in + + #{inventoryInquiryDetailId} + + + + + update warehouse_inventory_inquiry_detail set del_flag = '1' where inventory_inquiry_detail_id = #{inventoryInquiryDetailId} + + + + update warehouse_inventory_inquiry_detail set del_flag = '0' where inventory_inquiry_detail_id = #{inventoryInquiryDetailId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml index 3f41b556..3366624b 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml @@ -47,7 +47,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where inventory_inquiry_id = #{inventoryInquiryId} - + + + + insert into warehouse_inventory_inquiry diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html new file mode 100644 index 00000000..4326c48c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html @@ -0,0 +1,145 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html index 2400fb27..550d9a0f 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html @@ -34,6 +34,9 @@
+ + 库存历史 + 导出 @@ -165,6 +168,20 @@ }; $.table.init(options); }); + + + /*查看库存历史*/ + function add() { + var rows = $("#bootstrap-table").bootstrapTable('getSelections'); + console.log("rows" + rows); + if (rows.length == 1){ + var url = ctx + 'warehouse/inventoryInquiry/inventoryHistory/' +rows[0].materialNo; + $.modal.open("库存历史",url); + }else{ + $.modal.msgWarning("只能查看一种物料的库存历史!") + } + + }; \ No newline at end of file