From ea7b42ae8c34fcfda27f1bc5f1b31ca6207356b9 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 22 May 2024 16:24: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=85=A5=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95Contro?= =?UTF-8?q?ller=20=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95Mapper=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95Mapper.xml=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95Service=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95ServiceImpl=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=8D=95receivables.html?= =?UTF-8?q?=20=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=EF=BC=8C=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E8=AF=A2=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseStorageOrderController.java | 151 ++++++++ .../domain/WarehouseStorageOrder.java | 358 ++++++++++++++++++ .../mapper/WarehouseStorageOrderMapper.java | 77 ++++ .../IWarehouseStorageOrderService.java | 75 ++++ .../WarehouseStorageOrderServiceImpl.java | 126 ++++++ .../warehouse/WarehouseStorageOrderMapper.xml | 171 +++++++++ .../warehouse/storageOrder/storageOrder.html | 237 ++++++++++++ 7 files changed, 1195 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java new file mode 100644 index 00000000..c625e814 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java @@ -0,0 +1,151 @@ +package com.ruoyi.warehouse.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; +import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 仓库入库单Controller + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +@Controller +@RequestMapping("/warehouse/storageOrder") +public class WarehouseStorageOrderController extends BaseController +{ + private String prefix = "warehouse/storageOrder"; + + @Autowired + private IWarehouseStorageOrderService warehouseStorageOrderService; + + @RequiresPermissions("warehouse:storageOrder:view") + @GetMapping() + public String storageOrder() + { + return prefix + "/storageOrder"; + } + + /** + * 查询仓库入库单列表 + */ + @RequiresPermissions("warehouse:storageOrder:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(WarehouseStorageOrder warehouseStorageOrder) + { + startPage(); + List list = warehouseStorageOrderService.selectWarehouseStorageOrderList(warehouseStorageOrder); + return getDataTable(list); + } + + /** + * 导出仓库入库单列表 + */ + @RequiresPermissions("warehouse:storageOrder:export") + @Log(title = "仓库入库单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(WarehouseStorageOrder warehouseStorageOrder) + { + List list = warehouseStorageOrderService.selectWarehouseStorageOrderList(warehouseStorageOrder); + ExcelUtil util = new ExcelUtil(WarehouseStorageOrder.class); + return util.exportExcel(list, "仓库入库单数据"); + } + + /** + * 新增仓库入库单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存仓库入库单 + */ + @RequiresPermissions("warehouse:storageOrder:add") + @Log(title = "仓库入库单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(WarehouseStorageOrder warehouseStorageOrder) + { + return toAjax(warehouseStorageOrderService.insertWarehouseStorageOrder(warehouseStorageOrder)); + } + + /** + * 修改仓库入库单 + */ + @GetMapping("/edit/{warehouseStorageId}") + public String edit(@PathVariable("warehouseStorageId") Long warehouseStorageId, ModelMap mmap) + { + WarehouseStorageOrder warehouseStorageOrder = warehouseStorageOrderService.selectWarehouseStorageOrderById(warehouseStorageId); + mmap.put("warehouseStorageOrder", warehouseStorageOrder); + return prefix + "/edit"; + } + + /** + * 修改保存仓库入库单 + */ + @RequiresPermissions("warehouse:storageOrder:edit") + @Log(title = "仓库入库单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(WarehouseStorageOrder warehouseStorageOrder) + { + return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder)); + } + + /** + * 删除仓库入库单 + */ + @RequiresPermissions("warehouse:storageOrder:remove") + @Log(title = "仓库入库单", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(warehouseStorageOrderService.deleteWarehouseStorageOrderByIds(ids)); + } + + /** + * 作废仓库入库单 + */ + @RequiresPermissions("warehouse:storageOrder:cancel") + @Log(title = "仓库入库单", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(warehouseStorageOrderService.cancelWarehouseStorageOrderById(id)); + } + + /** + * 恢复仓库入库单 + */ + @RequiresPermissions("warehouse:storageOrder:restore") + @Log(title = "仓库入库单", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(warehouseStorageOrderService.restoreWarehouseStorageOrderById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java new file mode 100644 index 00000000..578cf6ee --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java @@ -0,0 +1,358 @@ +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_storage_order + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +public class WarehouseStorageOrder extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 入库单id */ + private Long warehouseStorageId; + + /** 入库单号 */ + @Excel(name = "入库单号") + private String warehouseStorageCode; + + /** 关联订单号(多种订单类型) */ + @Excel(name = "关联订单号", readConverterExp = "多=种订单类型") + private String relatedOrderCode; + + /** 仓库入库状态 */ + @Excel(name = "仓库入库状态") + private String warehouseStorageStatus; + + /** 仓库品质状态 */ + @Excel(name = "仓库品质状态") + private String warehouseQualityStatus; + + /** 仓库入库类型 */ + @Excel(name = "仓库入库类型") + private String warehouseStorageType; + + /** 仓库订单类型 */ + @Excel(name = "仓库订单类型") + private String warehouseOrderType; + + /** 仓库入库部门类型 */ + @Excel(name = "仓库入库部门类型") + private String warehouseDeptType; + + /** 通知已到货数量 */ + @Excel(name = "通知已到货数量") + private Integer notifyArrivedNum; + + /** 实际已到货数量 */ + @Excel(name = "实际已到货数量") + private Integer actualArrivedNum; + + /** 暂收合格数量 */ + @Excel(name = "暂收合格数量") + private Integer temporaryQualifiedNum; + + /** 暂收不合格数量 */ + @Excel(name = "暂收不合格数量") + private Integer temporaryUnqualifiedNum; + + /** 品质合格数量 */ + @Excel(name = "品质合格数量") + private Integer qualityQualifiedNum; + + + /** 品质不合格数量 */ + @Excel(name = "品质不合格数量") + private Integer qualityUnqualifiedNum; + + + /** 入库数量 */ + @Excel(name = "入库数量") + private Integer storageNum; + + /** 到货时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "到货时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date arrivedTime; + + /** 暂收时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "暂收时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date temporaryTime; + + /** 交付质检时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "交付质检时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date deliveryInspectionTime; + + /** 品质时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "品质时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date qualityTime; + + /** 入库时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date storageTime; + + /** 仓库员工 */ + @Excel(name = "仓库员工") + private String warehouseEmployee; + + /** 仓库ID */ + @Excel(name = "仓库ID") + private String warehouseCode; + + /** 仓库名称 */ + @Excel(name = "仓库名称") + private String warehouseName; + + public void setWarehouseStorageId(Long warehouseStorageId) + { + this.warehouseStorageId = warehouseStorageId; + } + + public Long getWarehouseStorageId() + { + return warehouseStorageId; + } + public void setWarehouseStorageCode(String warehouseStorageCode) + { + this.warehouseStorageCode = warehouseStorageCode; + } + + public String getWarehouseStorageCode() + { + return warehouseStorageCode; + } + public void setRelatedOrderCode(String relatedOrderCode) + { + this.relatedOrderCode = relatedOrderCode; + } + + public String getRelatedOrderCode() + { + return relatedOrderCode; + } + public void setWarehouseStorageStatus(String warehouseStorageStatus) + { + this.warehouseStorageStatus = warehouseStorageStatus; + } + + public String getWarehouseStorageStatus() + { + return warehouseStorageStatus; + } + public void setWarehouseQualityStatus(String warehouseQualityStatus) + { + this.warehouseQualityStatus = warehouseQualityStatus; + } + + public String getWarehouseQualityStatus() + { + return warehouseQualityStatus; + } + public void setWarehouseStorageType(String warehouseStorageType) + { + this.warehouseStorageType = warehouseStorageType; + } + + public String getWarehouseStorageType() + { + return warehouseStorageType; + } + public void setWarehouseOrderType(String warehouseOrderType) + { + this.warehouseOrderType = warehouseOrderType; + } + + public String getWarehouseOrderType() + { + return warehouseOrderType; + } + public void setWarehouseDeptType(String warehouseDeptType) + { + this.warehouseDeptType = warehouseDeptType; + } + + public String getWarehouseDeptType() + { + return warehouseDeptType; + } + public void setNotifyArrivedNum(Integer notifyArrivedNum) + { + this.notifyArrivedNum = notifyArrivedNum; + } + + public Integer getNotifyArrivedNum() + { + return notifyArrivedNum; + } + public void setActualArrivedNum(Integer actualArrivedNum) + { + this.actualArrivedNum = actualArrivedNum; + } + + public Integer getActualArrivedNum() + { + return actualArrivedNum; + } + public void setTemporaryQualifiedNum(Integer temporaryQualifiedNum) + { + this.temporaryQualifiedNum = temporaryQualifiedNum; + } + + public Integer getTemporaryQualifiedNum() + { + return temporaryQualifiedNum; + } + public void setTemporaryUnqualifiedNum(Integer temporaryUnqualifiedNum) + { + this.temporaryUnqualifiedNum = temporaryUnqualifiedNum; + } + + public Integer getTemporaryUnqualifiedNum() + { + return temporaryUnqualifiedNum; + } + public void setQualityQualifiedNum(Integer qualityQualifiedNum) + { + this.qualityQualifiedNum = qualityQualifiedNum; + } + + public Integer getQualityQualifiedNum() + { + return qualityQualifiedNum; + } + + public Integer getQualityUnqualifiedNum() { + return qualityUnqualifiedNum; + } + + public void setQualityUnqualifiedNum(Integer qualityUnqualifiedNum) { + this.qualityUnqualifiedNum = qualityUnqualifiedNum; + } + + public void setStorageNum(Integer storageNum) + { + this.storageNum = storageNum; + } + + public Integer getStorageNum() + { + return storageNum; + } + public void setArrivedTime(Date arrivedTime) + { + this.arrivedTime = arrivedTime; + } + + public Date getArrivedTime() + { + return arrivedTime; + } + public void setTemporaryTime(Date temporaryTime) + { + this.temporaryTime = temporaryTime; + } + + public Date getTemporaryTime() + { + return temporaryTime; + } + public void setDeliveryInspectionTime(Date deliveryInspectionTime) + { + this.deliveryInspectionTime = deliveryInspectionTime; + } + + public Date getDeliveryInspectionTime() + { + return deliveryInspectionTime; + } + public void setQualityTime(Date qualityTime) + { + this.qualityTime = qualityTime; + } + + public Date getQualityTime() + { + return qualityTime; + } + public void setStorageTime(Date storageTime) + { + this.storageTime = storageTime; + } + + public Date getStorageTime() + { + return storageTime; + } + public void setWarehouseEmployee(String warehouseEmployee) + { + this.warehouseEmployee = warehouseEmployee; + } + + public String getWarehouseEmployee() + { + return warehouseEmployee; + } + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("warehouseStorageId", getWarehouseStorageId()) + .append("warehouseStorageCode", getWarehouseStorageCode()) + .append("relatedOrderCode", getRelatedOrderCode()) + .append("warehouseStorageStatus", getWarehouseStorageStatus()) + .append("warehouseQualityStatus", getWarehouseQualityStatus()) + .append("warehouseStorageType", getWarehouseStorageType()) + .append("warehouseOrderType", getWarehouseOrderType()) + .append("warehouseDeptType", getWarehouseDeptType()) + .append("notifyArrivedNum", getNotifyArrivedNum()) + .append("actualArrivedNum", getActualArrivedNum()) + .append("temporaryQualifiedNum", getTemporaryQualifiedNum()) + .append("temporaryUnqualifiedNum", getTemporaryUnqualifiedNum()) + .append("qualityQualifiedNum", getQualityQualifiedNum()) + .append("qualityUnqualifiedNum", getQualityUnqualifiedNum()) + .append("storageNum", getStorageNum()) + .append("arrivedTime", getArrivedTime()) + .append("temporaryTime", getTemporaryTime()) + .append("deliveryInspectionTime", getDeliveryInspectionTime()) + .append("qualityTime", getQualityTime()) + .append("storageTime", getStorageTime()) + .append("warehouseEmployee", getWarehouseEmployee()) + .append("warehouseCode", getWarehouseCode()) + .append("warehouseName", getWarehouseName()) + .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/WarehouseStorageOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java new file mode 100644 index 00000000..fc768bb5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.warehouse.mapper; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; + +/** + * 仓库入库单Mapper接口 + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +public interface WarehouseStorageOrderMapper +{ + /** + * 查询仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 仓库入库单 + */ + public WarehouseStorageOrder selectWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 查询仓库入库单列表 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 仓库入库单集合 + */ + public List selectWarehouseStorageOrderList(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 新增仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + public int insertWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 修改仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + public int updateWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 删除仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + public int deleteWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 批量删除仓库入库单 + * + * @param warehouseStorageIds 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseStorageOrderByIds(String[] warehouseStorageIds); + + /** + * 作废仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + public int cancelWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 恢复仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + public int restoreWarehouseStorageOrderById(Long warehouseStorageId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java new file mode 100644 index 00000000..acd54b59 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java @@ -0,0 +1,75 @@ +package com.ruoyi.warehouse.service; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; + +/** + * 仓库入库单Service接口 + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +public interface IWarehouseStorageOrderService +{ + /** + * 查询仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 仓库入库单 + */ + public WarehouseStorageOrder selectWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 查询仓库入库单列表 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 仓库入库单集合 + */ + public List selectWarehouseStorageOrderList(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 新增仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + public int insertWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 修改仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + public int updateWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 批量删除仓库入库单 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseStorageOrderByIds(String ids); + + /** + * 删除仓库入库单信息 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + public int deleteWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 作废仓库入库单 + * @param warehouseStorageId 仓库入库单ID + * @return + */ + int cancelWarehouseStorageOrderById(Long warehouseStorageId); + + /** + * 恢复仓库入库单 + * @param warehouseStorageId 仓库入库单ID + * @return + */ + int restoreWarehouseStorageOrderById(Long warehouseStorageId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java new file mode 100644 index 00000000..9fc78669 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.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.WarehouseStorageOrderMapper; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; +import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; +import com.ruoyi.common.core.text.Convert; + +/** + * 仓库入库单Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-05-22 + */ +@Service +public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderService +{ + @Autowired + private WarehouseStorageOrderMapper warehouseStorageOrderMapper; + + /** + * 查询仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 仓库入库单 + */ + @Override + public WarehouseStorageOrder selectWarehouseStorageOrderById(Long warehouseStorageId) + { + return warehouseStorageOrderMapper.selectWarehouseStorageOrderById(warehouseStorageId); + } + + /** + * 查询仓库入库单列表 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 仓库入库单 + */ + @Override + public List selectWarehouseStorageOrderList(WarehouseStorageOrder warehouseStorageOrder) + { + return warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder); + } + + /** + * 新增仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + @Override + public int insertWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder) + { + warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + warehouseStorageOrder.setCreateBy(loginName); + return warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); + } + + /** + * 修改仓库入库单 + * + * @param warehouseStorageOrder 仓库入库单 + * @return 结果 + */ + @Override + public int updateWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder) + { + String loginName = ShiroUtils.getLoginName(); + warehouseStorageOrder.setUpdateBy(loginName); + warehouseStorageOrder.setUpdateTime(DateUtils.getNowDate()); + return warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); + } + + /** + * 删除仓库入库单对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteWarehouseStorageOrderByIds(String ids) + { + return warehouseStorageOrderMapper.deleteWarehouseStorageOrderByIds(Convert.toStrArray(ids)); + } + + /** + * 删除仓库入库单信息 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + @Override + public int deleteWarehouseStorageOrderById(Long warehouseStorageId) + { + return warehouseStorageOrderMapper.deleteWarehouseStorageOrderById(warehouseStorageId); + } + + /** + * 作废仓库入库单 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + @Override + public int cancelWarehouseStorageOrderById(Long warehouseStorageId) + { + return warehouseStorageOrderMapper.cancelWarehouseStorageOrderById(warehouseStorageId); + } + + /** + * 恢复仓库入库单信息 + * + * @param warehouseStorageId 仓库入库单ID + * @return 结果 + */ + @Override + public int restoreWarehouseStorageOrderById(Long warehouseStorageId) + { + return warehouseStorageOrderMapper.restoreWarehouseStorageOrderById(warehouseStorageId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml new file mode 100644 index 00000000..b11230cd --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select warehouse_storage_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_order_type, warehouse_dept_type, notify_arrived_num, actual_arrived_num, temporary_qualified_num, temporary_unqualified_num, quality_qualified_num, quality_unqualified_num ,storage_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, warehouse_employee, warehouse_code, warehouse_name, create_time, create_by, update_by, update_time from warehouse_storage_order + + + + + + + + insert into warehouse_storage_order + + warehouse_storage_code, + related_order_code, + warehouse_storage_status, + warehouse_quality_status, + warehouse_storage_type, + warehouse_order_type, + warehouse_dept_type, + notify_arrived_num, + actual_arrived_num, + temporary_qualified_num, + temporary_unqualified_num, + quality_qualified_num, + quality_unqualified_num, + storage_num, + arrived_time, + temporary_time, + delivery_inspection_time, + quality_time, + storage_time, + warehouse_employee, + warehouse_code, + warehouse_name, + create_time, + create_by, + update_by, + update_time, + + + #{warehouseStorageCode}, + #{relatedOrderCode}, + #{warehouseStorageStatus}, + #{warehouseQualityStatus}, + #{warehouseStorageType}, + #{warehouseOrderType}, + #{warehouseDeptType}, + #{notifyArrivedNum}, + #{actualArrivedNum}, + #{temporaryQualifiedNum}, + #{temporaryUnqualifiedNum}, + #{qualityQualifiedNum}, + #{qualityUnqualifiedNum}, + #{storageNum}, + #{arrivedTime}, + #{temporaryTime}, + #{deliveryInspectionTime}, + #{qualityTime}, + #{storageTime}, + #{warehouseEmployee}, + #{warehouseCode}, + #{warehouseName}, + #{createTime}, + #{createBy}, + #{updateBy}, + #{updateTime}, + + + + + update warehouse_storage_order + + warehouse_storage_code = #{warehouseStorageCode}, + related_order_code = #{relatedOrderCode}, + warehouse_storage_status = #{warehouseStorageStatus}, + warehouse_quality_status = #{warehouseQualityStatus}, + warehouse_storage_type = #{warehouseStorageType}, + warehouse_order_type = #{warehouseOrderType}, + warehouse_dept_type = #{warehouseDeptType}, + notify_arrived_num = #{notifyArrivedNum}, + actual_arrived_num = #{actualArrivedNum}, + temporary_qualified_num = #{temporaryQualifiedNum}, + temporary_unqualified_num = #{temporaryUnqualifiedNum}, + quality_qualified_num = #{qualityQualifiedNum}, + quality_unqualified_num = #{qualityUnqualifiedNum}, + storage_num = #{storageNum}, + arrived_time = #{arrivedTime}, + temporary_time = #{temporaryTime}, + delivery_inspection_time = #{deliveryInspectionTime}, + quality_time = #{qualityTime}, + storage_time = #{storageTime}, + warehouse_employee = #{warehouseEmployee}, + warehouse_code = #{warehouseCode}, + warehouse_name = #{warehouseName}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where warehouse_storage_id = #{warehouseStorageId} + + + + delete from warehouse_storage_order where warehouse_storage_id = #{warehouseStorageId} + + + + delete from warehouse_storage_order where warehouse_storage_id in + + #{warehouseStorageId} + + + + + update warehouse_storage_order set del_flag = '1' where warehouse_storage_id = #{warehouseStorageId} + + + + update warehouse_storage_order set del_flag = '0' where warehouse_storage_id = #{warehouseStorageId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html new file mode 100644 index 00000000..df7b0e7a --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html @@ -0,0 +1,237 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file