Browse Source

[delete]

删除旧版采购入库通知单实体类、Controller、Services、impl、Mapper、Mapper.xml文件
dev
liuxiaoxu 5 days ago
parent
commit
a5eba782a2
  1. 197
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java
  2. 386
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java
  3. 77
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java
  4. 86
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java
  5. 161
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java
  6. 167
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml

197
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java

@ -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<WarehouseStorageOrder> 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<PurchaseStorage> list = purchaseStorageService.selectPurchaseStorageList(warehouseStorageOrder);
ExcelUtil<PurchaseStorage> util = new ExcelUtil<PurchaseStorage>(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<String,List<WarehouseStorageOrderDetail>> storagePurchaseDetail(String warehouseStorageCode){
List<WarehouseStorageOrderDetail> allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode);
Map<String, List<WarehouseStorageOrderDetail>> 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));
}
}

386
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java

@ -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<WarehouseStorageOrderDetail> 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<WarehouseStorageOrderDetail> getWarehouseStorageOrderDetailList() {
return warehouseStorageOrderDetailList;
}
public void setWarehouseStorageOrderDetailList(List<WarehouseStorageOrderDetail> 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();
}
}

77
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java

@ -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<PurchaseStorage> 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);
}

86
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java

@ -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<PurchaseStorage> selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder);
/**
* 从仓库入库单查询采购入库通知单列表
*
* @param warehouseStorageOrder 仓库入库单
* @return 采购入库通知单集合
*/
public List<WarehouseStorageOrder> 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);
}

161
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java

@ -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<PurchaseStorage> selectPurchaseStorageList(WarehouseStorageOrder warehouseStorageOrder)
{
// List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder);
List<PurchaseStorage> purchaseStorages = new ArrayList<>();
// 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单
// List<WarehouseStorageOrder> filteredWarehouseStorageOrders = allWarehouseStorageOrders.stream()
// .filter(s -> "0".equals(s.getWarehouseOrderType()))
// .collect(Collectors.toList());
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder);
for (WarehouseStorageOrder wso : allWarehouseStorageOrders) {
PurchaseStorage ps = new PurchaseStorage();
BeanUtils.copyProperties(wso, ps);
purchaseStorages.add(ps);
}
return purchaseStorages;
}
@Override
public List<WarehouseStorageOrder> selectWarehouseStorageList(WarehouseStorageOrder warehouseStorageOrder) {
// 先获取所有仓储订单列表
List<WarehouseStorageOrder> allWarehouseStorageOrders = warehouseStorageOrderMapper.selectPurchaseStorageList(warehouseStorageOrder);
// // 使用流过滤出warehouseOrderType为"0"的记录 也就是采购订单
// List<WarehouseStorageOrder> 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);
}
}

167
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml

@ -1,167 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.purchase.mapper.PurchaseStorageMapper">
<resultMap type="PurchaseStorage" id="PurchaseStorageResult">
<result property="purchaseStorageId" column="purchase_storage_id" />
<result property="purchaseStorageCode" column="purchase_storage_code" />
<result property="purchaseOrderCode" column="purchase_order_code" />
<result property="storageStatus" column="storage_status" />
<result property="qualityStatus" column="quality_status" />
<result property="purchaseStorageType" column="purchase_storage_type" />
<result property="purchaseOrderType" column="purchase_order_type" />
<result property="purchaseDeptType" column="purchase_dept_type" />
<result property="notifyArrivedNum" column="notify_arrived_num" />
<result property="actualArrivedNum" column="actual_arrived_num" />
<result property="temporaryQualifiedNum" column="temporary_qualified_num" />
<result property="temporaryUnqualifiedNum" column="temporary_unqualified_num" />
<result property="qualityQualifiedNum" column="quality_qualified_num" />
<result property="storageNum" column="storage_num" />
<result property="arrivedTime" column="arrived_time" />
<result property="temporaryTime" column="temporary_time" />
<result property="deliveryInspectionTime" column="delivery_inspection_time" />
<result property="qualityTime" column="quality_time" />
<result property="storageTime" column="storage_time" />
<result property="storageEmployee" column="storage_employee" />
<result property="stockId" column="stock_id" />
<result property="stockName" column="stock_name" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectPurchaseStorageVo">
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
</sql>
<select id="selectPurchaseStorageList" parameterType="PurchaseStorage" resultMap="PurchaseStorageResult">
<include refid="selectPurchaseStorageVo"/>
<where>
<if test="purchaseStorageCode != null and purchaseStorageCode != ''"> and purchase_storage_code = #{purchaseStorageCode}</if>
<if test="purchaseOrderCode != null and purchaseOrderCode != ''"> and purchase_order_code = #{purchaseOrderCode}</if>
<if test="storageStatus != null and storageStatus != ''"> and storage_status = #{storageStatus}</if>
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
<if test="purchaseDeptType != null and purchaseDeptType != ''"> and purchase_dept_type = #{purchaseDeptType}</if>
<if test="storageEmployee != null and storageEmployee != ''"> and storage_employee like concat('%', #{storageEmployee}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectPurchaseStorageById" parameterType="Long" resultMap="PurchaseStorageResult">
<include refid="selectPurchaseStorageVo"/>
where purchase_storage_id = #{purchaseStorageId}
</select>
<insert id="insertPurchaseStorage" parameterType="PurchaseStorage" useGeneratedKeys="true" keyProperty="purchaseStorageId">
insert into purchase_storage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchaseStorageCode != null">purchase_storage_code,</if>
<if test="purchaseOrderCode != null">purchase_order_code,</if>
<if test="storageStatus != null">storage_status,</if>
<if test="qualityStatus != null">quality_status,</if>
<if test="purchaseStorageType != null">purchase_storage_type,</if>
<if test="purchaseOrderType != null">purchase_order_type,</if>
<if test="purchaseDeptType != null">purchase_dept_type,</if>
<if test="notifyArrivedNum != null">notify_arrived_num,</if>
<if test="actualArrivedNum != null">actual_arrived_num,</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num,</if>
<if test="temporaryUnqualifiedNum != null">temporary_unqualified_num,</if>
<if test="qualityQualifiedNum != null">quality_qualified_num,</if>
<if test="storageNum != null">storage_num,</if>
<if test="arrivedTime != null">arrived_time,</if>
<if test="temporaryTime != null">temporary_time,</if>
<if test="deliveryInspectionTime != null">delivery_inspection_time,</if>
<if test="qualityTime != null">quality_time,</if>
<if test="storageTime != null">storage_time,</if>
<if test="storageEmployee != null">storage_employee,</if>
<if test="stockId != null">stock_id,</if>
<if test="stockName != null">stock_name,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseStorageCode != null">#{purchaseStorageCode},</if>
<if test="purchaseOrderCode != null">#{purchaseOrderCode},</if>
<if test="storageStatus != null">#{storageStatus},</if>
<if test="qualityStatus != null">#{qualityStatus},</if>
<if test="purchaseStorageType != null">#{purchaseStorageType},</if>
<if test="purchaseOrderType != null">#{purchaseOrderType},</if>
<if test="purchaseDeptType != null">#{purchaseDeptType},</if>
<if test="notifyArrivedNum != null">#{notifyArrivedNum},</if>
<if test="actualArrivedNum != null">#{actualArrivedNum},</if>
<if test="temporaryQualifiedNum != null">#{temporaryQualifiedNum},</if>
<if test="temporaryUnqualifiedNum != null">#{temporaryUnqualifiedNum},</if>
<if test="qualityQualifiedNum != null">#{qualityQualifiedNum},</if>
<if test="storageNum != null">#{storageNum},</if>
<if test="arrivedTime != null">#{arrivedTime},</if>
<if test="temporaryTime != null">#{temporaryTime},</if>
<if test="deliveryInspectionTime != null">#{deliveryInspectionTime},</if>
<if test="qualityTime != null">#{qualityTime},</if>
<if test="storageTime != null">#{storageTime},</if>
<if test="storageEmployee != null">#{storageEmployee},</if>
<if test="stockId != null">#{stockId},</if>
<if test="stockName != null">#{stockName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updatePurchaseStorage" parameterType="PurchaseStorage">
update purchase_storage
<trim prefix="SET" suffixOverrides=",">
<if test="purchaseStorageCode != null">purchase_storage_code = #{purchaseStorageCode},</if>
<if test="purchaseOrderCode != null">purchase_order_code = #{purchaseOrderCode},</if>
<if test="storageStatus != null">storage_status = #{storageStatus},</if>
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
<if test="purchaseStorageType != null">purchase_storage_type = #{purchaseStorageType},</if>
<if test="purchaseOrderType != null">purchase_order_type = #{purchaseOrderType},</if>
<if test="purchaseDeptType != null">purchase_dept_type = #{purchaseDeptType},</if>
<if test="notifyArrivedNum != null">notify_arrived_num = #{notifyArrivedNum},</if>
<if test="actualArrivedNum != null">actual_arrived_num = #{actualArrivedNum},</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num = #{temporaryQualifiedNum},</if>
<if test="temporaryUnqualifiedNum != null">temporary_unqualified_num = #{temporaryUnqualifiedNum},</if>
<if test="qualityQualifiedNum != null">quality_qualified_num = #{qualityQualifiedNum},</if>
<if test="storageNum != null">storage_num = #{storageNum},</if>
<if test="arrivedTime != null">arrived_time = #{arrivedTime},</if>
<if test="temporaryTime != null">temporary_time = #{temporaryTime},</if>
<if test="deliveryInspectionTime != null">delivery_inspection_time = #{deliveryInspectionTime},</if>
<if test="qualityTime != null">quality_time = #{qualityTime},</if>
<if test="storageTime != null">storage_time = #{storageTime},</if>
<if test="storageEmployee != null">storage_employee = #{storageEmployee},</if>
<if test="stockId != null">stock_id = #{stockId},</if>
<if test="stockName != null">stock_name = #{stockName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where purchase_storage_id = #{purchaseStorageId}
</update>
<delete id="deletePurchaseStorageById" parameterType="Long">
delete from purchase_storage where purchase_storage_id = #{purchaseStorageId}
</delete>
<delete id="deletePurchaseStorageByIds" parameterType="String">
delete from purchase_storage where purchase_storage_id in
<foreach item="purchaseStorageId" collection="array" open="(" separator="," close=")">
#{purchaseStorageId}
</foreach>
</delete>
<update id="cancelPurchaseStorageById" parameterType="Long">
update purchase_storage set del_flag = '1' where purchase_storage_id = #{purchaseStorageId}
</update>
<update id="restorePurchaseStorageById" parameterType="Long">
update purchase_storage set del_flag = '0' where purchase_storage_id = #{purchaseStorageId}
</update>
</mapper>
Loading…
Cancel
Save