From b58f8f5d902abde4a184ef433c888f203e653f0c Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Tue, 4 Jun 2024 14:37:48 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E5=87=BA?= =?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=A2warehouseOutOrder.html=20=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=8D=95Controller=20=E6=96=B0=E5=A2=9E=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=8D=95Mapper=20=E6=96=B0=E5=A2=9E=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95Mapper.xml=20=E6=96=B0=E5=A2=9E=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95Service=20=E6=96=B0=E5=A2=9E=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95ServiceImpl=20=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A1=AB=E5=85=85=EF=BC=8C=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E7=B1=BB=E5=90=8D=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=20WarehouseOutOrderController=20=20->=20Afte?= =?UTF-8?q?rsalesWarehouseOutController=20IWarehouseOutOrderService=20->?= =?UTF-8?q?=20IAftersalesWarehouseOutService=20IWarehouseOutOrderServiceIm?= =?UTF-8?q?pl=20->=20IAftersalesWarehouseOutServiceImpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... => AftersalesWarehouseOutController.java} | 10 +- ...va => IAftersalesWarehouseOutService.java} | 6 +- ...=> AftersalesWarehouseOutServiceImpl.java} | 10 +- .../WarehouseOutOrderController.java | 151 +++++++++++ .../domain/WarehouseOutOrder.java | 85 +++++- .../mapper/WarehouseOutOrderMapper.java | 42 +-- .../service/IWarehouseOutOrderService.java | 75 ++++++ .../impl/WarehouseOutOrderServiceImpl.java | 126 +++++++++ .../WarehouseOutOrderMapper.xml | 31 ++- .../returnAfterStorageDetail.html | 2 +- .../warehouse/warehouseOutOrder/add.html | 252 +++++++++++++++++ .../warehouse/warehouseOutOrder/edit.html | 253 ++++++++++++++++++ .../warehouseOutOrder/warehouseOutOrder.html | 184 +++++++++++++ 13 files changed, 1176 insertions(+), 51 deletions(-) rename ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/{WarehouseOutOrderController.java => AftersalesWarehouseOutController.java} (95%) rename ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/{IWarehouseOutOrderService.java => IAftersalesWarehouseOutService.java} (94%) rename ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/{WarehouseOutOrderServiceImpl.java => AftersalesWarehouseOutServiceImpl.java} (96%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java rename ruoyi-admin/src/main/java/com/ruoyi/{aftersales => warehouse}/domain/WarehouseOutOrder.java (83%) rename ruoyi-admin/src/main/java/com/ruoyi/{aftersales => warehouse}/mapper/WarehouseOutOrderMapper.java (58%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java rename ruoyi-admin/src/main/resources/mapper/{aftersales => warehouse}/WarehouseOutOrderMapper.xml (82%) create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/WarehouseOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java similarity index 95% rename from ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/WarehouseOutOrderController.java rename to ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java index 6d7c72c8..a11d8b61 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/WarehouseOutOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java @@ -2,10 +2,9 @@ package com.ruoyi.aftersales.controller; import java.util.List; -import com.ruoyi.aftersales.domain.AftersalesOrder; -import com.ruoyi.aftersales.domain.vo.SelectDeviceVO; import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -17,8 +16,7 @@ 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.aftersales.domain.WarehouseOutOrder; -import com.ruoyi.aftersales.service.IWarehouseOutOrderService; +import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -32,12 +30,12 @@ import com.ruoyi.common.core.page.TableDataInfo; */ @Controller @RequestMapping("/aftersales/warehouseOutOrder") -public class WarehouseOutOrderController extends BaseController +public class AftersalesWarehouseOutController extends BaseController { private String prefix = "aftersales/warehouseOutOrder"; @Autowired - private IWarehouseOutOrderService warehouseOutOrderService; + private IAftersalesWarehouseOutService warehouseOutOrderService; @RequiresPermissions("aftersales:warehouseOutOrder:view") @GetMapping() diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IWarehouseOutOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java similarity index 94% rename from ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IWarehouseOutOrderService.java rename to ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java index eb6a33c6..f044a02d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IWarehouseOutOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java @@ -1,10 +1,10 @@ package com.ruoyi.aftersales.service; import java.util.List; -import com.ruoyi.aftersales.domain.WarehouseOutOrder; -import com.ruoyi.aftersales.domain.vo.SelectDeviceVO; + import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; /** * 出库单Service接口 @@ -12,7 +12,7 @@ import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; * @author 刘晓旭 * @date 2024-04-23 */ -public interface IWarehouseOutOrderService +public interface IAftersalesWarehouseOutService { /** * 查询出库单 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java similarity index 96% rename from ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/WarehouseOutOrderServiceImpl.java rename to ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java index 656c8eb2..8ceb3275 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/WarehouseOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java @@ -12,14 +12,12 @@ import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.mapper.SysSalesOrderChildMapper; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper; import lombok.extern.slf4j.Slf4j; -import net.bytebuddy.implementation.bytecode.Throw; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.parameters.P; import org.springframework.stereotype.Service; -import com.ruoyi.aftersales.mapper.WarehouseOutOrderMapper; -import com.ruoyi.aftersales.domain.WarehouseOutOrder; -import com.ruoyi.aftersales.service.IWarehouseOutOrderService; +import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; import com.ruoyi.common.core.text.Convert; /** @@ -30,7 +28,7 @@ import com.ruoyi.common.core.text.Convert; */ @Service @Slf4j -public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService +public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOutService { @Autowired private WarehouseOutOrderMapper warehouseOutOrderMapper; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java new file mode 100644 index 00000000..4b9db4b1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.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.WarehouseOutOrder; +import com.ruoyi.warehouse.service.IWarehouseOutOrderService; +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-06-04 + */ +@Controller +@RequestMapping("/warehouse/warehouseOutOrder") +public class WarehouseOutOrderController extends BaseController +{ + private String prefix = "warehouse/warehouseOutOrder"; + + @Autowired + private IWarehouseOutOrderService warehouseOutOrderService; + + @RequiresPermissions("warehouse:warehouseOutOrder:view") + @GetMapping() + public String warehouseOutOrder() + { + return prefix + "/warehouseOutOrder"; + } + + /** + * 查询仓库出库单列表 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(WarehouseOutOrder warehouseOutOrder) + { + startPage(); + List list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder); + return getDataTable(list); + } + + /** + * 导出仓库出库单列表 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:export") + @Log(title = "仓库出库单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(WarehouseOutOrder warehouseOutOrder) + { + List list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder); + ExcelUtil util = new ExcelUtil(WarehouseOutOrder.class); + return util.exportExcel(list, "仓库出库单数据"); + } + + /** + * 新增仓库出库单 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存仓库出库单 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:add") + @Log(title = "仓库出库单", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(WarehouseOutOrder warehouseOutOrder) + { + return toAjax(warehouseOutOrderService.insertWarehouseOutOrder(warehouseOutOrder)); + } + + /** + * 修改仓库出库单 + */ + @GetMapping("/edit/{outOrderId}") + public String edit(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) + { + WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); + mmap.put("warehouseOutOrder", warehouseOutOrder); + return prefix + "/edit"; + } + + /** + * 修改保存仓库出库单 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:edit") + @Log(title = "仓库出库单", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(WarehouseOutOrder warehouseOutOrder) + { + return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); + } + + /** + * 删除仓库出库单 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:remove") + @Log(title = "仓库出库单", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(warehouseOutOrderService.deleteWarehouseOutOrderByIds(ids)); + } + + /** + * 作废仓库出库单 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:cancel") + @Log(title = "仓库出库单", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(warehouseOutOrderService.cancelWarehouseOutOrderById(id)); + } + + /** + * 恢复仓库出库单 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:restore") + @Log(title = "仓库出库单", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(warehouseOutOrderService.restoreWarehouseOutOrderById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/WarehouseOutOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java similarity index 83% rename from ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/WarehouseOutOrder.java rename to ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java index 0f39126a..f0b5aa73 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/WarehouseOutOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java @@ -1,4 +1,4 @@ -package com.ruoyi.aftersales.domain; +package com.ruoyi.warehouse.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -8,10 +8,10 @@ import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** - * 出库单对象 warehouse_out_order + * 仓库出库单对象 warehouse_out_order * * @author 刘晓旭 - * @date 2024-04-23 + * @date 2024-06-04 */ public class WarehouseOutOrder extends BaseEntity { @@ -42,15 +42,21 @@ public class WarehouseOutOrder extends BaseEntity @Excel(name = "订单类型") private String warehouseOrderType; + /** 委外单号 */ + private String outMakeCode; + /** 出库类型 */ + @Excel(name = "出库类型") private String warehouseOutType; + /** 请购单号 */ + private String requisitioningCode; + /** 业务人员 */ @Excel(name = "业务人员") private String businessName; /** 售后人员 */ - @Excel(name = "售后人员") private String aftersalesName; /** 仓库员 */ @@ -75,6 +81,7 @@ public class WarehouseOutOrder extends BaseEntity private Integer enterpriseSum; /** 出库数 */ + @Excel(name = "出库数") private Integer outOrderSum; /** 出库对象 */ @@ -94,27 +101,30 @@ public class WarehouseOutOrder extends BaseEntity /** 申请人员 */ private String applyName; + /** 供应商ID */ + private String supplierCode; + /** 计划交付时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "计划交付时间", width = 30, dateFormat = "yyyy-MM-dd") private Date planDeliveryTime; + /** 供应商名称 */ + private String supplierName; + /** 交付条件 */ - @Excel(name = "交付条件") private String deliveryCondition; /** 收货地址 */ - @Excel(name = "收货地址") private String deliveryAddress; /** 联系人 */ - @Excel(name = "联系人") private String deliveryName; /** 联系电话 */ - @Excel(name = "联系电话") private String deliveryNumber; + /** 送货日期 */ + private Date deliveryDate; + public void setOutOrderId(Long outOrderId) { this.outOrderId = outOrderId; @@ -178,6 +188,15 @@ public class WarehouseOutOrder extends BaseEntity { return warehouseOrderType; } + public void setOutMakeCode(String outMakeCode) + { + this.outMakeCode = outMakeCode; + } + + public String getOutMakeCode() + { + return outMakeCode; + } public void setWarehouseOutType(String warehouseOutType) { this.warehouseOutType = warehouseOutType; @@ -187,6 +206,15 @@ public class WarehouseOutOrder extends BaseEntity { return warehouseOutType; } + public void setRequisitioningCode(String requisitioningCode) + { + this.requisitioningCode = requisitioningCode; + } + + public String getRequisitioningCode() + { + return requisitioningCode; + } public void setBusinessName(String businessName) { this.businessName = businessName; @@ -313,6 +341,15 @@ public class WarehouseOutOrder extends BaseEntity { return applyName; } + public void setSupplierCode(String supplierCode) + { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() + { + return supplierCode; + } public void setPlanDeliveryTime(Date planDeliveryTime) { this.planDeliveryTime = planDeliveryTime; @@ -322,6 +359,15 @@ public class WarehouseOutOrder extends BaseEntity { return planDeliveryTime; } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } public void setDeliveryCondition(String deliveryCondition) { this.deliveryCondition = deliveryCondition; @@ -349,15 +395,24 @@ public class WarehouseOutOrder extends BaseEntity { return deliveryName; } - public void setDeliveryNumber(String deliveryNumber) + public void setDeliveryNumber(String deliveryNumber) { this.deliveryNumber = deliveryNumber; } - public String getDeliveryNumber() + public String getDeliveryNumber() { return deliveryNumber; } + public void setDeliveryDate(Date deliveryDate) + { + this.deliveryDate = deliveryDate; + } + + public Date getDeliveryDate() + { + return deliveryDate; + } @Override public String toString() { @@ -369,7 +424,9 @@ public class WarehouseOutOrder extends BaseEntity .append("relatedOrderCode", getRelatedOrderCode()) .append("salesOrderCode", getSalesOrderCode()) .append("warehouseOrderType", getWarehouseOrderType()) + .append("outMakeCode", getOutMakeCode()) .append("warehouseOutType", getWarehouseOutType()) + .append("requisitioningCode", getRequisitioningCode()) .append("businessName", getBusinessName()) .append("aftersalesName", getAftersalesName()) .append("warehouseName", getWarehouseName()) @@ -384,15 +441,19 @@ public class WarehouseOutOrder extends BaseEntity .append("customerId", getCustomerId()) .append("customerName", getCustomerName()) .append("applyName", getApplyName()) + .append("supplierCode", getSupplierCode()) .append("planDeliveryTime", getPlanDeliveryTime()) + .append("supplierName", getSupplierName()) .append("deliveryCondition", getDeliveryCondition()) .append("deliveryAddress", getDeliveryAddress()) .append("deliveryName", getDeliveryName()) .append("deliveryNumber", getDeliveryNumber()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) + .append("deliveryDate", getDeliveryDate()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/WarehouseOutOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java similarity index 58% rename from ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/WarehouseOutOrderMapper.java rename to ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java index 9600a657..33fd32fc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/WarehouseOutOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java @@ -1,58 +1,58 @@ -package com.ruoyi.aftersales.mapper; +package com.ruoyi.warehouse.mapper; import java.util.List; -import com.ruoyi.aftersales.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; /** - * 出库单Mapper接口 + * 仓库出库单Mapper接口 * * @author 刘晓旭 - * @date 2024-04-23 + * @date 2024-06-04 */ public interface WarehouseOutOrderMapper { /** - * 查询出库单 + * 查询仓库出库单 * - * @param outOrderId 出库单ID - * @return 出库单 + * @param outOrderId 仓库出库单ID + * @return 仓库出库单 */ public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId); /** - * 查询出库单列表 + * 查询仓库出库单列表 * - * @param warehouseOutOrder 出库单 - * @return 出库单集合 + * @param warehouseOutOrder 仓库出库单 + * @return 仓库出库单集合 */ public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); /** - * 新增出库单 + * 新增仓库出库单 * - * @param warehouseOutOrder 出库单 + * @param warehouseOutOrder 仓库出库单 * @return 结果 */ public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); /** - * 修改出库单 + * 修改仓库出库单 * - * @param warehouseOutOrder 出库单 + * @param warehouseOutOrder 仓库出库单 * @return 结果 */ public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); /** - * 删除出库单 + * 删除仓库出库单 * - * @param outOrderId 出库单ID + * @param outOrderId 仓库出库单ID * @return 结果 */ public int deleteWarehouseOutOrderById(Long outOrderId); /** - * 批量删除出库单 + * 批量删除仓库出库单 * * @param outOrderIds 需要删除的数据ID * @return 结果 @@ -60,17 +60,17 @@ public interface WarehouseOutOrderMapper public int deleteWarehouseOutOrderByIds(String[] outOrderIds); /** - * 作废出库单 + * 作废仓库出库单 * - * @param outOrderId 出库单ID + * @param outOrderId 仓库出库单ID * @return 结果 */ public int cancelWarehouseOutOrderById(Long outOrderId); /** - * 恢复出库单 + * 恢复仓库出库单 * - * @param outOrderId 出库单ID + * @param outOrderId 仓库出库单ID * @return 结果 */ public int restoreWarehouseOutOrderById(Long outOrderId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java new file mode 100644 index 00000000..6a8d342d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java @@ -0,0 +1,75 @@ +package com.ruoyi.warehouse.service; + +import java.util.List; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; + +/** + * 仓库出库单Service接口 + * + * @author 刘晓旭 + * @date 2024-06-04 + */ +public interface IWarehouseOutOrderService +{ + /** + * 查询仓库出库单 + * + * @param outOrderId 仓库出库单ID + * @return 仓库出库单 + */ + public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId); + + /** + * 查询仓库出库单列表 + * + * @param warehouseOutOrder 仓库出库单 + * @return 仓库出库单集合 + */ + public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); + + /** + * 新增仓库出库单 + * + * @param warehouseOutOrder 仓库出库单 + * @return 结果 + */ + public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); + + /** + * 修改仓库出库单 + * + * @param warehouseOutOrder 仓库出库单 + * @return 结果 + */ + public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); + + /** + * 批量删除仓库出库单 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWarehouseOutOrderByIds(String ids); + + /** + * 删除仓库出库单信息 + * + * @param outOrderId 仓库出库单ID + * @return 结果 + */ + public int deleteWarehouseOutOrderById(Long outOrderId); + + /** + * 作废仓库出库单 + * @param outOrderId 仓库出库单ID + * @return + */ + int cancelWarehouseOutOrderById(Long outOrderId); + + /** + * 恢复仓库出库单 + * @param outOrderId 仓库出库单ID + * @return + */ + int restoreWarehouseOutOrderById(Long outOrderId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java new file mode 100644 index 00000000..6676f307 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.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.WarehouseOutOrderMapper; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.service.IWarehouseOutOrderService; +import com.ruoyi.common.core.text.Convert; + +/** + * 仓库出库单Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-06-04 + */ +@Service +public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService +{ + @Autowired + private WarehouseOutOrderMapper warehouseOutOrderMapper; + + /** + * 查询仓库出库单 + * + * @param outOrderId 仓库出库单ID + * @return 仓库出库单 + */ + @Override + public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId) + { + return warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId); + } + + /** + * 查询仓库出库单列表 + * + * @param warehouseOutOrder 仓库出库单 + * @return 仓库出库单 + */ + @Override + public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder) + { + return warehouseOutOrderMapper.selectWarehouseOutOrderList(warehouseOutOrder); + } + + /** + * 新增仓库出库单 + * + * @param warehouseOutOrder 仓库出库单 + * @return 结果 + */ + @Override + public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder) + { + String loginName = ShiroUtils.getLoginName(); + warehouseOutOrder.setCreateBy(loginName); + warehouseOutOrder.setCreateTime(DateUtils.getNowDate()); + return warehouseOutOrderMapper.insertWarehouseOutOrder(warehouseOutOrder); + } + + /** + * 修改仓库出库单 + * + * @param warehouseOutOrder 仓库出库单 + * @return 结果 + */ + @Override + public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder) + { + String loginName = ShiroUtils.getLoginName(); + warehouseOutOrder.setUpdateBy(loginName); + warehouseOutOrder.setUpdateTime(DateUtils.getNowDate()); + return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + } + + /** + * 删除仓库出库单对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteWarehouseOutOrderByIds(String ids) + { + return warehouseOutOrderMapper.deleteWarehouseOutOrderByIds(Convert.toStrArray(ids)); + } + + /** + * 删除仓库出库单信息 + * + * @param outOrderId 仓库出库单ID + * @return 结果 + */ + @Override + public int deleteWarehouseOutOrderById(Long outOrderId) + { + return warehouseOutOrderMapper.deleteWarehouseOutOrderById(outOrderId); + } + + /** + * 作废仓库出库单 + * + * @param outOrderId 仓库出库单ID + * @return 结果 + */ + @Override + public int cancelWarehouseOutOrderById(Long outOrderId) + { + return warehouseOutOrderMapper.cancelWarehouseOutOrderById(outOrderId); + } + + /** + * 恢复仓库出库单信息 + * + * @param outOrderId 仓库出库单ID + * @return 结果 + */ + @Override + public int restoreWarehouseOutOrderById(Long outOrderId) + { + return warehouseOutOrderMapper.restoreWarehouseOutOrderById(outOrderId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/WarehouseOutOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml similarity index 82% rename from ruoyi-admin/src/main/resources/mapper/aftersales/WarehouseOutOrderMapper.xml rename to ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml index 391d1506..ec7f8d83 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/WarehouseOutOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml @@ -2,7 +2,7 @@ - + @@ -12,7 +12,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -27,19 +29,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + - select out_order_id, out_order_code, make_no, warehouse_out_status, related_order_code, sales_order_code, warehouse_order_type, warehouse_out_type, business_name, aftersales_name, warehouse_name, shipping_device_id, material_no, material_name, material_sum, enterprise_sum, out_order_sum, out_order_name, out_order_time, customer_id, customer_name, apply_name, plan_delivery_time, delivery_condition, delivery_address, delivery_name, delivery_number, create_by, create_time, update_by, update_time from warehouse_out_order + select out_order_id, out_order_code, make_no, warehouse_out_status, related_order_code, sales_order_code, warehouse_order_type, out_make_code, warehouse_out_type, requisitioning_code, business_name, aftersales_name, warehouse_name, shipping_device_id, material_no, material_name, material_sum, enterprise_sum, out_order_sum, out_order_name, out_order_time, customer_id, customer_name, apply_name, supplier_code, plan_delivery_time, supplier_name, delivery_condition, delivery_address, delivery_name, delivery_number, create_by, create_time, delivery_date, update_by, update_time, remark from warehouse_out_order @@ -69,7 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" related_order_code, sales_order_code, warehouse_order_type, + out_make_code, warehouse_out_type, + requisitioning_code, business_name, aftersales_name, warehouse_name, @@ -84,15 +95,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" customer_id, customer_name, apply_name, + supplier_code, plan_delivery_time, + supplier_name, delivery_condition, delivery_address, delivery_name, delivery_number, create_by, create_time, + delivery_date, update_by, update_time, + remark, #{outOrderCode}, @@ -101,7 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{relatedOrderCode}, #{salesOrderCode}, #{warehouseOrderType}, + #{outMakeCode}, #{warehouseOutType}, + #{requisitioningCode}, #{businessName}, #{aftersalesName}, #{warehouseName}, @@ -116,15 +133,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{customerId}, #{customerName}, #{applyName}, + #{supplierCode}, #{planDeliveryTime}, + #{supplierName}, #{deliveryCondition}, #{deliveryAddress}, #{deliveryName}, #{deliveryNumber}, #{createBy}, #{createTime}, + #{deliveryDate}, #{updateBy}, #{updateTime}, + #{remark}, @@ -137,7 +158,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" related_order_code = #{relatedOrderCode}, sales_order_code = #{salesOrderCode}, warehouse_order_type = #{warehouseOrderType}, + out_make_code = #{outMakeCode}, warehouse_out_type = #{warehouseOutType}, + requisitioning_code = #{requisitioningCode}, business_name = #{businessName}, aftersales_name = #{aftersalesName}, warehouse_name = #{warehouseName}, @@ -152,15 +175,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" customer_id = #{customerId}, customer_name = #{customerName}, apply_name = #{applyName}, + supplier_code = #{supplierCode}, plan_delivery_time = #{planDeliveryTime}, + supplier_name = #{supplierName}, delivery_condition = #{deliveryCondition}, delivery_address = #{deliveryAddress}, delivery_name = #{deliveryName}, delivery_number = #{deliveryNumber}, create_by = #{createBy}, create_time = #{createTime}, + delivery_date = #{deliveryDate}, update_by = #{updateBy}, update_time = #{updateTime}, + remark = #{remark}, where out_order_id = #{outOrderId} diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html index f8125ea6..10fb5961 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html @@ -1,7 +1,7 @@ - + diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html new file mode 100644 index 00000000..6568aa39 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/add.html @@ -0,0 +1,252 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html new file mode 100644 index 00000000..3bcb1b00 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/edit.html @@ -0,0 +1,253 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html new file mode 100644 index 00000000..79a6c2e1 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html @@ -0,0 +1,184 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file