diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java deleted file mode 100644 index 9277800b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java +++ /dev/null @@ -1,197 +0,0 @@ -package com.ruoyi.purchase.controller; - -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import com.ruoyi.warehouse.domain.WarehouseStorageOrder; -import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; -import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService; -import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; -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.*; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.purchase.domain.PurchaseStorage; -import com.ruoyi.purchase.service.IPurchaseStorageService; -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-04-16 - */ -@Controller -@RequestMapping("/purchase/purchaseStorage") -public class PurchaseStorageController extends BaseController -{ - private String prefix = "purchase/purchaseStorage"; - - @Autowired - private IPurchaseStorageService purchaseStorageService; - - @Autowired - private IWarehouseStorageOrderService warehouseStorageOrderService; - - @Autowired - private IWarehouseStorageOrderDetailService storageOrderDetailService; - - @RequiresPermissions("purchase:purchaseStorage:view") - @GetMapping() - public String purchaseStorage() - { - return prefix + "/purchaseStorage"; - } - - /** - * 查询仓库入库单采购入库通知单列表 - */ - @RequiresPermissions("purchase:purchaseStorage:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(WarehouseStorageOrder warehouseStorageOrder) - { - startPage(); - List list = purchaseStorageService.selectWarehouseStorageList(warehouseStorageOrder); - return getDataTable(list); - } - - /** - * 导出采购入库通知单列表 - */ - @RequiresPermissions("purchase:purchaseStorage:export") - @Log(title = "采购入库通知单", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(WarehouseStorageOrder warehouseStorageOrder) - { - List list = purchaseStorageService.selectPurchaseStorageList(warehouseStorageOrder); - ExcelUtil util = new ExcelUtil(PurchaseStorage.class); - return util.exportExcel(list, "采购入库通知单数据"); - } - - - /** - * 采购入库单详情 - */ - @GetMapping("/detail/{warehouseStorageId}") - public String detail(@PathVariable("warehouseStorageId") Long warehouseStorageId, ModelMap mmap) - { - WarehouseStorageOrder warehouseStorageOrder = warehouseStorageOrderService.selectWarehouseStorageOrderById(warehouseStorageId); - mmap.put("warehouseStorageOrder", warehouseStorageOrder); - return prefix + "/detail"; - } - - /** - * 修改保存采购入库单详情 - */ - @RequiresPermissions("purchase:purchaseStorage:detail") - @Log(title = "仓库入库单", businessType = BusinessType.UPDATE) - @PostMapping("/detail") - @ResponseBody - public AjaxResult detailSave(@RequestBody WarehouseStorageOrder warehouseStorageOrder) - { - return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder)); - } - - - /** - * 采购入库单详情 供应商物料详情列表 - */ - @ResponseBody - @RequestMapping("/storagePurchaseDetailList") - public Map> storagePurchaseDetail(String warehouseStorageCode){ - List allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); - Map> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); - return groupedDetails; - } - - - /** - * 新增采购入库通知单 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } - - /** - * 新增保存采购入库通知单 - */ - @RequiresPermissions("purchase:purchaseStorage:add") - @Log(title = "采购入库通知单", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(PurchaseStorage purchaseStorage) - { - return toAjax(purchaseStorageService.insertPurchaseStorage(purchaseStorage)); - } - - /** - * 修改采购入库通知单 - */ - @GetMapping("/edit/{purchaseStorageId}") - public String edit(@PathVariable("purchaseStorageId") Long purchaseStorageId, ModelMap mmap) - { - PurchaseStorage purchaseStorage = purchaseStorageService.selectPurchaseStorageById(purchaseStorageId); - mmap.put("purchaseStorage", purchaseStorage); - return prefix + "/edit"; - } - - /** - * 修改保存采购入库通知单 - */ - @RequiresPermissions("purchase:purchaseStorage:edit") - @Log(title = "采购入库通知单", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(PurchaseStorage purchaseStorage) - { - return toAjax(purchaseStorageService.updatePurchaseStorage(purchaseStorage)); - } - - /** - * 删除采购入库通知单 - */ - @RequiresPermissions("purchase:purchaseStorage:remove") - @Log(title = "采购入库通知单", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(purchaseStorageService.deletePurchaseStorageByIds(ids)); - } - - /** - * 作废采购入库通知单 - */ - @RequiresPermissions("purchase:purchaseStorage:cancel") - @Log(title = "采购入库通知单", businessType = BusinessType.CANCEL) - @GetMapping( "/cancel/{id}") - @ResponseBody - public AjaxResult cancel(@PathVariable("id") Long id){ - return toAjax(purchaseStorageService.cancelPurchaseStorageById(id)); - } - - /** - * 恢复采购入库通知单 - */ - @RequiresPermissions("purchase:purchaseStorage:restore") - @Log(title = "采购入库通知单", businessType = BusinessType.RESTORE) - @GetMapping( "/restore/{id}") - @ResponseBody - public AjaxResult restore(@PathVariable("id")Long id) - { - return toAjax(purchaseStorageService.restorePurchaseStorageById(id)); - } - - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java deleted file mode 100644 index 5d24d48b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java +++ /dev/null @@ -1,386 +0,0 @@ -package com.ruoyi.purchase.domain; - -import java.util.Date; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; -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; - -/** - * 采购入库通知单对象 purchase_storage - * - * @author 刘晓旭 - * @date 2024-04-16 - */ -public class PurchaseStorage 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; - - /** 仓库详细地址 */ - @Excel(name = "仓库详细地址") - private String warehouseDetailAddress; - - /** 仓库入库单详情 */ - @Excel(name = "仓库名称") - private List warehouseStorageOrderDetailList; - 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; - } - - public String getWarehouseDetailAddress() { - return warehouseDetailAddress; - } - - public void setWarehouseDetailAddress(String warehouseDetailAddress) { - this.warehouseDetailAddress = warehouseDetailAddress; - } - - public List getWarehouseStorageOrderDetailList() { - return warehouseStorageOrderDetailList; - } - - public void setWarehouseStorageOrderDetailList(List warehouseStorageOrderDetailList) { - this.warehouseStorageOrderDetailList = warehouseStorageOrderDetailList; - } - - @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("warehouseDetailAddress",getWarehouseDetailAddress()) - .append("createTime", getCreateTime()) - .append("createBy", getCreateBy()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("warehouseStorageOrderDetailList",getWarehouseStorageOrderDetailList()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java deleted file mode 100644 index 1ad22cde..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.ruoyi.purchase.mapper; - -import java.util.List; -import com.ruoyi.purchase.domain.PurchaseStorage; - -/** - * 采购入库通知单Mapper接口 - * - * @author 刘晓旭 - * @date 2024-04-16 - */ -public interface PurchaseStorageMapper -{ - /** - * 查询采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 采购入库通知单 - */ - public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId); - - /** - * 查询采购入库通知单列表 - * - * @param purchaseStorage 采购入库通知单 - * @return 采购入库通知单集合 - */ - public List selectPurchaseStorageList(PurchaseStorage purchaseStorage); - - /** - * 新增采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - public int insertPurchaseStorage(PurchaseStorage purchaseStorage); - - /** - * 修改采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - public int updatePurchaseStorage(PurchaseStorage purchaseStorage); - - /** - * 删除采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - public int deletePurchaseStorageById(Long purchaseStorageId); - - /** - * 批量删除采购入库通知单 - * - * @param purchaseStorageIds 需要删除的数据ID - * @return 结果 - */ - public int deletePurchaseStorageByIds(String[] purchaseStorageIds); - - /** - * 作废采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - public int cancelPurchaseStorageById(Long purchaseStorageId); - - /** - * 恢复采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - public int restorePurchaseStorageById(Long purchaseStorageId); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java deleted file mode 100644 index c0ca219f..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.ruoyi.purchase.service; - -import java.util.List; -import com.ruoyi.purchase.domain.PurchaseStorage; -import com.ruoyi.warehouse.domain.WarehouseStorageOrder; - -/** - * 采购入库通知单Service接口 - * - * @author 刘晓旭 - * @date 2024-04-16 - */ -public interface IPurchaseStorageService -{ - /** - * 查询采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 采购入库通知单 - */ - public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId); - - /** - * 查询采购入库通知单列表 - * - * @param purchaseStorage 采购入库通知单 - * @return 采购入库通知单集合 - */ - public List selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder); - - - /** - * 从仓库入库单查询采购入库通知单列表 - * - * @param warehouseStorageOrder 仓库入库单 - * @return 采购入库通知单集合 - */ - public List selectWarehouseStorageList(WarehouseStorageOrder warehouseStorageOrder); - - - /** - * 新增采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - public int insertPurchaseStorage(PurchaseStorage purchaseStorage); - - /** - * 修改采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - public int updatePurchaseStorage(PurchaseStorage purchaseStorage); - - /** - * 批量删除采购入库通知单 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deletePurchaseStorageByIds(String ids); - - /** - * 删除采购入库通知单信息 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - public int deletePurchaseStorageById(Long purchaseStorageId); - - /** - * 作废采购入库通知单 - * @param purchaseStorageId 采购入库通知单ID - * @return - */ - int cancelPurchaseStorageById(Long purchaseStorageId); - - /** - * 恢复采购入库通知单 - * @param purchaseStorageId 采购入库通知单ID - * @return - */ - int restorePurchaseStorageById(Long purchaseStorageId); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java deleted file mode 100644 index 7aec9541..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -package com.ruoyi.purchase.service.impl; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.ShiroUtils; -import com.ruoyi.warehouse.domain.WarehouseStorageOrder; -import com.ruoyi.warehouse.mapper.WarehouseStorageOrderMapper; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.purchase.mapper.PurchaseStorageMapper; -import com.ruoyi.purchase.domain.PurchaseStorage; -import com.ruoyi.purchase.service.IPurchaseStorageService; -import com.ruoyi.common.core.text.Convert; - -/** - * 采购入库通知单Service业务层处理 - * - * @author 刘晓旭 - * @date 2024-04-16 - */ -@Service -public class PurchaseStorageServiceImpl implements IPurchaseStorageService -{ - @Autowired - private PurchaseStorageMapper purchaseStorageMapper; - - @Autowired - private WarehouseStorageOrderMapper warehouseStorageOrderMapper; - - /** - * 查询采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 采购入库通知单 - */ - @Override - public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId) - { - return purchaseStorageMapper.selectPurchaseStorageById(purchaseStorageId); - } - - /** - * 查询仓库入库单的采购入库通知单列表 用于数据的导出 - * - * @param warehouseStorageOrder 采购入库通知单 - * @return 采购入库通知单 - */ - @Override - public List selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder) - { -// List allWarehouseStorageOrders = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder); - List purchaseStorages = new ArrayList<>(); - // 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单 -// List filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream() -// .filter(s -> "0".equals(s.getWarehouseOrderType())) -// .collect(Collectors.toList()); - List allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder); - - for (WarehouseStorageOrder wso : allWarehouseStorageOrders) { - PurchaseStorage ps = new PurchaseStorage(); - BeanUtils.copyProperties(wso, ps); - purchaseStorages.add(ps); - } - return purchaseStorages; - } - - @Override - public List selectWarehouseStorageList(WarehouseStorageOrder warehouseStorageOrder) { - // 先获取所有仓储订单列表 - List allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder); - -// // 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单 -// List filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream() -// .filter(s -> "0".equals(s.getWarehouseOrderType())) -// .collect(Collectors.toList()); -// return filteredWarehouseStorageOrders; - return allWarehouseStorageOrders; - } - - /** - * 新增采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - @Override - public int insertPurchaseStorage(PurchaseStorage purchaseStorage) - { - purchaseStorage.setCreateTime(DateUtils.getNowDate()); - String loginName = ShiroUtils.getLoginName(); - purchaseStorage.setCreateBy(loginName); - return purchaseStorageMapper.insertPurchaseStorage(purchaseStorage); - } - - /** - * 修改采购入库通知单 - * - * @param purchaseStorage 采购入库通知单 - * @return 结果 - */ - @Override - public int updatePurchaseStorage(PurchaseStorage purchaseStorage) - { - String loginName = ShiroUtils.getLoginName(); - purchaseStorage.setUpdateBy(loginName); - purchaseStorage.setUpdateTime(DateUtils.getNowDate()); - return purchaseStorageMapper.updatePurchaseStorage(purchaseStorage); - } - - /** - * 删除采购入库通知单对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deletePurchaseStorageByIds(String ids) - { - return purchaseStorageMapper.deletePurchaseStorageByIds(Convert.toStrArray(ids)); - } - - /** - * 删除采购入库通知单信息 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - @Override - public int deletePurchaseStorageById(Long purchaseStorageId) - { - return purchaseStorageMapper.deletePurchaseStorageById(purchaseStorageId); - } - - /** - * 作废采购入库通知单 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - @Override - public int cancelPurchaseStorageById(Long purchaseStorageId) - { - return purchaseStorageMapper.cancelPurchaseStorageById(purchaseStorageId); - } - - /** - * 恢复采购入库通知单信息 - * - * @param purchaseStorageId 采购入库通知单ID - * @return 结果 - */ - @Override - public int restorePurchaseStorageById(Long purchaseStorageId) - { - return purchaseStorageMapper.restorePurchaseStorageById(purchaseStorageId); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml deleted file mode 100644 index 61bf85e4..00000000 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select purchase_storage_id, purchase_storage_code, purchase_order_code, storage_status, quality_status, purchase_storage_type, purchase_order_type, purchase_dept_type, notify_arrived_num, actual_arrived_num, temporary_qualified_num, temporary_unqualified_num, quality_qualified_num, storage_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, storage_employee, stock_id, stock_name, create_time, create_by, update_by, update_time from purchase_storage - - - - - - - - insert into purchase_storage - - purchase_storage_code, - purchase_order_code, - storage_status, - quality_status, - purchase_storage_type, - purchase_order_type, - purchase_dept_type, - notify_arrived_num, - actual_arrived_num, - temporary_qualified_num, - temporary_unqualified_num, - quality_qualified_num, - storage_num, - arrived_time, - temporary_time, - delivery_inspection_time, - quality_time, - storage_time, - storage_employee, - stock_id, - stock_name, - create_time, - create_by, - update_by, - update_time, - - - #{purchaseStorageCode}, - #{purchaseOrderCode}, - #{storageStatus}, - #{qualityStatus}, - #{purchaseStorageType}, - #{purchaseOrderType}, - #{purchaseDeptType}, - #{notifyArrivedNum}, - #{actualArrivedNum}, - #{temporaryQualifiedNum}, - #{temporaryUnqualifiedNum}, - #{qualityQualifiedNum}, - #{storageNum}, - #{arrivedTime}, - #{temporaryTime}, - #{deliveryInspectionTime}, - #{qualityTime}, - #{storageTime}, - #{storageEmployee}, - #{stockId}, - #{stockName}, - #{createTime}, - #{createBy}, - #{updateBy}, - #{updateTime}, - - - - - update purchase_storage - - purchase_storage_code = #{purchaseStorageCode}, - purchase_order_code = #{purchaseOrderCode}, - storage_status = #{storageStatus}, - quality_status = #{qualityStatus}, - purchase_storage_type = #{purchaseStorageType}, - purchase_order_type = #{purchaseOrderType}, - purchase_dept_type = #{purchaseDeptType}, - notify_arrived_num = #{notifyArrivedNum}, - actual_arrived_num = #{actualArrivedNum}, - temporary_qualified_num = #{temporaryQualifiedNum}, - temporary_unqualified_num = #{temporaryUnqualifiedNum}, - quality_qualified_num = #{qualityQualifiedNum}, - storage_num = #{storageNum}, - arrived_time = #{arrivedTime}, - temporary_time = #{temporaryTime}, - delivery_inspection_time = #{deliveryInspectionTime}, - quality_time = #{qualityTime}, - storage_time = #{storageTime}, - storage_employee = #{storageEmployee}, - stock_id = #{stockId}, - stock_name = #{stockName}, - create_time = #{createTime}, - create_by = #{createBy}, - update_by = #{updateBy}, - update_time = #{updateTime}, - - where purchase_storage_id = #{purchaseStorageId} - - - - delete from purchase_storage where purchase_storage_id = #{purchaseStorageId} - - - - delete from purchase_storage where purchase_storage_id in - - #{purchaseStorageId} - - - - - update purchase_storage set del_flag = '1' where purchase_storage_id = #{purchaseStorageId} - - - - update purchase_storage set del_flag = '0' where purchase_storage_id = #{purchaseStorageId} - - - \ No newline at end of file