Browse Source

[feat]仓库管理:

仓库入库单
新增入库单详情Mapper
新增入库单详情Mapper.xml
新增入库单详情Service
新增入库单详情ServiceImpl
新增 暂收-采购单(仓库入库)页面temporaryPurchaseWarehouse.html
新增暂收按钮
后端新增暂收接口
后台新增 暂收-采购单(仓库入库) 供应商物料详情列表 接口
仓库入库单新增多个字段
dev
liuxiaoxu 6 months ago
parent
commit
02e9d90075
  1. 51
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java
  2. 27
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java
  3. 678
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrderDetail.java
  4. 83
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java
  5. 80
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderDetailService.java
  6. 135
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderDetailServiceImpl.java
  7. 262
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml
  8. 6
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml
  9. 20
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html
  10. 151
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html

51
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java

@ -1,6 +1,11 @@
package com.ruoyi.warehouse.controller; package com.ruoyi.warehouse.controller;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail;
import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -34,6 +39,9 @@ public class WarehouseStorageOrderController extends BaseController
@Autowired @Autowired
private IWarehouseStorageOrderService warehouseStorageOrderService; private IWarehouseStorageOrderService warehouseStorageOrderService;
@Autowired
private IWarehouseStorageOrderDetailService storageOrderDetailService;
@RequiresPermissions("warehouse:storageOrder:view") @RequiresPermissions("warehouse:storageOrder:view")
@GetMapping() @GetMapping()
public String storageOrder() public String storageOrder()
@ -112,40 +120,41 @@ public class WarehouseStorageOrderController extends BaseController
return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder)); return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder));
} }
/** /**
* 删除仓库入库单 * 暂收-采购单(仓库入库)
*/ */
@RequiresPermissions("warehouse:storageOrder:remove") @GetMapping("/temporaryPurchaseWarehouse/{warehouseStorageId}")
@Log(title = "仓库入库单", businessType = BusinessType.DELETE) public String temporaryPurchaseWarehouse(@PathVariable("warehouseStorageId") Long warehouseStorageId, ModelMap mmap)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{ {
return toAjax(warehouseStorageOrderService.deleteWarehouseStorageOrderByIds(ids)); WarehouseStorageOrder warehouseStorageOrder = warehouseStorageOrderService.selectWarehouseStorageOrderById(warehouseStorageId);
mmap.put("warehouseStorageOrder", warehouseStorageOrder);
return prefix + "/temporaryPurchaseWarehouse";
} }
/** /**
* 作废仓库入库单 * 修改保存暂收-采购单(仓库入库)
*/ */
@RequiresPermissions("warehouse:storageOrder:cancel") @RequiresPermissions("warehouse:storageOrder:temporaryPurchaseWarehouse")
@Log(title = "仓库入库单", businessType = BusinessType.CANCEL) @Log(title = "仓库入库单", businessType = BusinessType.UPDATE)
@GetMapping( "/cancel/{id}") @PostMapping("/temporaryPurchaseWarehouse")
@ResponseBody @ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){ public AjaxResult temporaryPurchaseWarehouseSave(WarehouseStorageOrder warehouseStorageOrder)
return toAjax(warehouseStorageOrderService.cancelWarehouseStorageOrderById(id)); {
return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder));
} }
/** /**
* 恢复仓库入库单 * 暂收-采购单(仓库入库) 供应商物料详情列表
*/ */
@RequiresPermissions("warehouse:storageOrder:restore")
@Log(title = "仓库入库单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody @ResponseBody
public AjaxResult restore(@PathVariable("id")Long id) @RequestMapping("/temporaryPurchaseWarehouseDetail")
{ public Map<String,List<WarehouseStorageOrderDetail>> temporaryPurchaseWarehouseDetail(String warehouseStorageCode){
return toAjax(warehouseStorageOrderService.restoreWarehouseStorageOrderById(id)); List<WarehouseStorageOrderDetail> allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode);
Map<String, List<WarehouseStorageOrderDetail>> groupedDetails = allDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode));
return groupedDetails;
} }
} }

27
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java

@ -1,6 +1,8 @@
package com.ruoyi.warehouse.domain; package com.ruoyi.warehouse.domain;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -115,6 +117,13 @@ public class WarehouseStorageOrder extends BaseEntity
@Excel(name = "仓库名称") @Excel(name = "仓库名称")
private String warehouseName; private String warehouseName;
/** 仓库详细地址 */
@Excel(name = "仓库详细地址")
private String warehouseDetailAddress;
/** 仓库入库单详情 */
@Excel(name = "仓库名称")
private List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList;
public void setWarehouseStorageId(Long warehouseStorageId) public void setWarehouseStorageId(Long warehouseStorageId)
{ {
this.warehouseStorageId = warehouseStorageId; this.warehouseStorageId = warehouseStorageId;
@ -323,6 +332,22 @@ public class WarehouseStorageOrder extends BaseEntity
return warehouseName; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -349,10 +374,12 @@ public class WarehouseStorageOrder extends BaseEntity
.append("warehouseEmployee", getWarehouseEmployee()) .append("warehouseEmployee", getWarehouseEmployee())
.append("warehouseCode", getWarehouseCode()) .append("warehouseCode", getWarehouseCode())
.append("warehouseName", getWarehouseName()) .append("warehouseName", getWarehouseName())
.append("warehouseDetailAddress",getWarehouseDetailAddress())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("warehouseStorageOrderDetailList",getWarehouseStorageOrderDetailList())
.toString(); .toString();
} }
} }

678
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrderDetail.java

@ -0,0 +1,678 @@
package com.ruoyi.warehouse.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 仓库入库单详情对象 warehouse_storage_order_detail
*
* @author 刘晓旭
* @date 2024-05-29
*/
public class WarehouseStorageOrderDetail extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 入库单详情id */
private Long warehouseStorageDetailId;
/** 入库单号 */
@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 warehouseStorageClass;
/** 仓库订单类型 */
@Excel(name = "仓库订单类型")
private String warehouseOrderType;
/** 仓库入库部门类型 */
@Excel(name = "仓库入库部门类型")
private String warehouseDeptType;
/** 仓库员工 */
@Excel(name = "仓库员工")
private String warehouseEmployee;
/** 仓库ID */
@Excel(name = "仓库ID")
private String warehouseCode;
/** 仓库名称 */
@Excel(name = "仓库名称")
private String warehouseName;
/** 仓库详细地址 */
@Excel(name = "仓库详细地址")
private String warehouseDetailAddress;
/** 供应商ID */
@Excel(name = "供应商ID")
private String supplierCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 退货联系人 */
@Excel(name = "退货联系人")
private String customerContact;
/** 联系人电话 */
@Excel(name = "联系人电话")
private String contactNumber;
/** 公司地址 */
@Excel(name = "公司地址")
private String supplierAddress;
/** 料号 */
@Excel(name = "料号")
private String materialNo;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料类型 */
@Excel(name = "物料类型")
private String materialType;
/** 物料图片地址 */
@Excel(name = "物料图片地址")
private String materialPhotourl;
/** 物料品牌 */
@Excel(name = "物料品牌")
private String materialBrand;
/** 物料单位 */
@Excel(name = "物料单位")
private String materialUnit;
/** 物料描述 */
@Excel(name = "物料描述")
private String materialDescribe;
/** 物料加工方式 */
@Excel(name = "物料加工方式")
private String materialProcessMethod;
/** 物料入库部门 */
@Excel(name = "物料入库部门")
private String materialDeptType;
/** 生产订单数 */
@Excel(name = "生产订单数")
private Integer makeTotal;
/** 通知已到货数量 */
@Excel(name = "通知已到货数量")
private Integer notifyHasArrivedNum;
/** 通知到货数量 */
@Excel(name = "通知到货数量")
private Integer notifyArriveNum;
/** 实际已到货数量 */
@Excel(name = "实际已到货数量")
private Integer actualHasArrivedNum;
/** 实际到货数量 */
@Excel(name = "实际到货数量")
private Integer actualArriveNum;
/** 暂收已合格数量 */
@Excel(name = "暂收已合格数量")
private Integer temporaryHasQualifiedNum;
/** 暂收合格数量 */
@Excel(name = "暂收合格数量")
private Integer temporaryQualifiedNum;
/** 已入库数量 */
@Excel(name = "已入库数量")
private Integer hasStorageNum;
/** 入库数量 */
@Excel(name = "入库数量")
private Integer storageNum;
/** 品质已合格数量 */
@Excel(name = "品质已合格数量")
private Integer qualityHasQualifiedNum;
/** 品质合格数量 */
@Excel(name = "品质合格数量")
private Integer qualityQualifiedNum;
/** 退换货数 */
@Excel(name = "退换货数")
private Integer refundsExchangesNum;
/** 到货时间 */
@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 temporaryRemark;
/** 暂收报告 */
@Excel(name = "暂收报告")
private String temporaryReportUrl;
public void setWarehouseStorageDetailId(Long warehouseStorageDetailId)
{
this.warehouseStorageDetailId = warehouseStorageDetailId;
}
public Long getWarehouseStorageDetailId()
{
return warehouseStorageDetailId;
}
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 setWarehouseStorageClass(String warehouseStorageClass)
{
this.warehouseStorageClass = warehouseStorageClass;
}
public String getWarehouseStorageClass()
{
return warehouseStorageClass;
}
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 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 void setWarehouseDetailAddress(String warehouseDetailAddress)
{
this.warehouseDetailAddress = warehouseDetailAddress;
}
public String getWarehouseDetailAddress()
{
return warehouseDetailAddress;
}
public void setSupplierCode(String supplierCode)
{
this.supplierCode = supplierCode;
}
public String getSupplierCode()
{
return supplierCode;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
public void setCustomerContact(String customerContact)
{
this.customerContact = customerContact;
}
public String getCustomerContact()
{
return customerContact;
}
public void setContactNumber(String contactNumber)
{
this.contactNumber = contactNumber;
}
public String getContactNumber()
{
return contactNumber;
}
public void setSupplierAddress(String supplierAddress)
{
this.supplierAddress = supplierAddress;
}
public String getSupplierAddress()
{
return supplierAddress;
}
public void setMaterialNo(String materialNo)
{
this.materialNo = materialNo;
}
public String getMaterialNo()
{
return materialNo;
}
public void setMaterialName(String materialName)
{
this.materialName = materialName;
}
public String getMaterialName()
{
return materialName;
}
public void setMaterialType(String materialType)
{
this.materialType = materialType;
}
public String getMaterialType()
{
return materialType;
}
public void setMaterialPhotourl(String materialPhotourl)
{
this.materialPhotourl = materialPhotourl;
}
public String getMaterialPhotourl()
{
return materialPhotourl;
}
public void setMaterialBrand(String materialBrand)
{
this.materialBrand = materialBrand;
}
public String getMaterialBrand()
{
return materialBrand;
}
public void setMaterialUnit(String materialUnit)
{
this.materialUnit = materialUnit;
}
public String getMaterialUnit()
{
return materialUnit;
}
public void setMaterialDescribe(String materialDescribe)
{
this.materialDescribe = materialDescribe;
}
public String getMaterialDescribe()
{
return materialDescribe;
}
public void setMaterialProcessMethod(String materialProcessMethod)
{
this.materialProcessMethod = materialProcessMethod;
}
public String getMaterialProcessMethod()
{
return materialProcessMethod;
}
public void setMaterialDeptType(String materialDeptType)
{
this.materialDeptType = materialDeptType;
}
public String getMaterialDeptType()
{
return materialDeptType;
}
public void setMakeTotal(Integer makeTotal)
{
this.makeTotal = makeTotal;
}
public Integer getMakeTotal()
{
return makeTotal;
}
public void setNotifyHasArrivedNum(Integer notifyHasArrivedNum)
{
this.notifyHasArrivedNum = notifyHasArrivedNum;
}
public Integer getNotifyHasArrivedNum()
{
return notifyHasArrivedNum;
}
public void setNotifyArriveNum(Integer notifyArriveNum)
{
this.notifyArriveNum = notifyArriveNum;
}
public Integer getNotifyArriveNum()
{
return notifyArriveNum;
}
public void setActualHasArrivedNum(Integer actualHasArrivedNum)
{
this.actualHasArrivedNum = actualHasArrivedNum;
}
public Integer getActualHasArrivedNum()
{
return actualHasArrivedNum;
}
public void setActualArriveNum(Integer actualArriveNum)
{
this.actualArriveNum = actualArriveNum;
}
public Integer getActualArriveNum()
{
return actualArriveNum;
}
public void setTemporaryHasQualifiedNum(Integer temporaryHasQualifiedNum)
{
this.temporaryHasQualifiedNum = temporaryHasQualifiedNum;
}
public Integer getTemporaryHasQualifiedNum()
{
return temporaryHasQualifiedNum;
}
public void setTemporaryQualifiedNum(Integer temporaryQualifiedNum)
{
this.temporaryQualifiedNum = temporaryQualifiedNum;
}
public Integer getTemporaryQualifiedNum()
{
return temporaryQualifiedNum;
}
public void setHasStorageNum(Integer hasStorageNum)
{
this.hasStorageNum = hasStorageNum;
}
public Integer getHasStorageNum()
{
return hasStorageNum;
}
public void setStorageNum(Integer storageNum)
{
this.storageNum = storageNum;
}
public Integer getStorageNum()
{
return storageNum;
}
public void setQualityHasQualifiedNum(Integer qualityHasQualifiedNum)
{
this.qualityHasQualifiedNum = qualityHasQualifiedNum;
}
public Integer getQualityHasQualifiedNum()
{
return qualityHasQualifiedNum;
}
public void setQualityQualifiedNum(Integer qualityQualifiedNum)
{
this.qualityQualifiedNum = qualityQualifiedNum;
}
public Integer getQualityQualifiedNum()
{
return qualityQualifiedNum;
}
public void setRefundsExchangesNum(Integer refundsExchangesNum)
{
this.refundsExchangesNum = refundsExchangesNum;
}
public Integer getRefundsExchangesNum()
{
return refundsExchangesNum;
}
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 setTemporaryRemark(String temporaryRemark)
{
this.temporaryRemark = temporaryRemark;
}
public String getTemporaryRemark()
{
return temporaryRemark;
}
public void setTemporaryReportUrl(String temporaryReportUrl)
{
this.temporaryReportUrl = temporaryReportUrl;
}
public String getTemporaryReportUrl()
{
return temporaryReportUrl;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("warehouseStorageDetailId", getWarehouseStorageDetailId())
.append("warehouseStorageCode", getWarehouseStorageCode())
.append("relatedOrderCode", getRelatedOrderCode())
.append("warehouseStorageStatus", getWarehouseStorageStatus())
.append("warehouseQualityStatus", getWarehouseQualityStatus())
.append("warehouseStorageType", getWarehouseStorageType())
.append("warehouseStorageClass", getWarehouseStorageClass())
.append("warehouseOrderType", getWarehouseOrderType())
.append("warehouseDeptType", getWarehouseDeptType())
.append("warehouseEmployee", getWarehouseEmployee())
.append("warehouseCode", getWarehouseCode())
.append("warehouseName", getWarehouseName())
.append("warehouseDetailAddress", getWarehouseDetailAddress())
.append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName())
.append("customerContact", getCustomerContact())
.append("contactNumber", getContactNumber())
.append("supplierAddress", getSupplierAddress())
.append("materialNo", getMaterialNo())
.append("materialName", getMaterialName())
.append("materialType", getMaterialType())
.append("materialPhotourl", getMaterialPhotourl())
.append("materialBrand", getMaterialBrand())
.append("materialUnit", getMaterialUnit())
.append("materialDescribe", getMaterialDescribe())
.append("materialProcessMethod", getMaterialProcessMethod())
.append("materialDeptType", getMaterialDeptType())
.append("makeTotal", getMakeTotal())
.append("notifyHasArrivedNum", getNotifyHasArrivedNum())
.append("notifyArriveNum", getNotifyArriveNum())
.append("actualHasArrivedNum", getActualHasArrivedNum())
.append("actualArriveNum", getActualArriveNum())
.append("temporaryHasQualifiedNum", getTemporaryHasQualifiedNum())
.append("temporaryQualifiedNum", getTemporaryQualifiedNum())
.append("hasStorageNum", getHasStorageNum())
.append("storageNum", getStorageNum())
.append("qualityHasQualifiedNum", getQualityHasQualifiedNum())
.append("qualityQualifiedNum", getQualityQualifiedNum())
.append("refundsExchangesNum", getRefundsExchangesNum())
.append("arrivedTime", getArrivedTime())
.append("temporaryTime", getTemporaryTime())
.append("deliveryInspectionTime", getDeliveryInspectionTime())
.append("qualityTime", getQualityTime())
.append("storageTime", getStorageTime())
.append("temporaryRemark", getTemporaryRemark())
.append("temporaryReportUrl", getTemporaryReportUrl())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

83
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java

@ -0,0 +1,83 @@
package com.ruoyi.warehouse.mapper;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail;
/**
* 仓库入库单详情Mapper接口
*
* @author 刘晓旭
* @date 2024-05-29
*/
public interface WarehouseStorageOrderDetailMapper
{
/**
* 查询仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 仓库入库单详情
*/
public WarehouseStorageOrderDetail selectWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 查询仓库入库单详情列表
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 仓库入库单详情集合
*/
public List<WarehouseStorageOrderDetail> selectWarehouseStorageOrderDetailList(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 新增仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
public int insertWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 修改仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
public int updateWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 删除仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
public int deleteWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 批量删除仓库入库单详情
*
* @param warehouseStorageDetailIds 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseStorageOrderDetailByIds(String[] warehouseStorageDetailIds);
/**
* 作废仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
public int cancelWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 恢复仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
public int restoreWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/*
* 根据入库单号查询入库单详情列表
* */
List<WarehouseStorageOrderDetail> selectStorageOrderDetailListByCode(String warehouseStorageCode);
}

80
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderDetailService.java

@ -0,0 +1,80 @@
package com.ruoyi.warehouse.service;
import java.util.List;
import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail;
/**
* 仓库入库单详情Service接口
*
* @author 刘晓旭
* @date 2024-05-29
*/
public interface IWarehouseStorageOrderDetailService
{
/**
* 查询仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 仓库入库单详情
*/
public WarehouseStorageOrderDetail selectWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 查询仓库入库单详情列表
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 仓库入库单详情集合
*/
public List<WarehouseStorageOrderDetail> selectWarehouseStorageOrderDetailList(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 新增仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
public int insertWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 修改仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
public int updateWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/**
* 批量删除仓库入库单详情
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehouseStorageOrderDetailByIds(String ids);
/**
* 删除仓库入库单详情信息
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
public int deleteWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 作废仓库入库单详情
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return
*/
int cancelWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/**
* 恢复仓库入库单详情
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return
*/
int restoreWarehouseStorageOrderDetailById(Long warehouseStorageDetailId);
/*
* 根据入库单号查询入库单详情列表
* */
List<WarehouseStorageOrderDetail> selectStorageOrderDetailListByCode(String warehouseStorageCode);
}

135
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderDetailServiceImpl.java

@ -0,0 +1,135 @@
package com.ruoyi.warehouse.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.WarehouseStorageOrderDetailMapper;
import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail;
import com.ruoyi.warehouse.service.IWarehouseStorageOrderDetailService;
import com.ruoyi.common.core.text.Convert;
/**
* 仓库入库单详情Service业务层处理
*
* @author 刘晓旭
* @date 2024-05-29
*/
@Service
public class WarehouseStorageOrderDetailServiceImpl implements IWarehouseStorageOrderDetailService
{
@Autowired
private WarehouseStorageOrderDetailMapper warehouseStorageOrderDetailMapper;
/**
* 查询仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 仓库入库单详情
*/
@Override
public WarehouseStorageOrderDetail selectWarehouseStorageOrderDetailById(Long warehouseStorageDetailId)
{
return warehouseStorageOrderDetailMapper.selectWarehouseStorageOrderDetailById(warehouseStorageDetailId);
}
/**
* 查询仓库入库单详情列表
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 仓库入库单详情
*/
@Override
public List<WarehouseStorageOrderDetail> selectWarehouseStorageOrderDetailList(WarehouseStorageOrderDetail warehouseStorageOrderDetail)
{
return warehouseStorageOrderDetailMapper.selectWarehouseStorageOrderDetailList(warehouseStorageOrderDetail);
}
/**
* 新增仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
@Override
public int insertWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail)
{
warehouseStorageOrderDetail.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
warehouseStorageOrderDetail.setCreateBy(loginName);
return warehouseStorageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
/**
* 修改仓库入库单详情
*
* @param warehouseStorageOrderDetail 仓库入库单详情
* @return 结果
*/
@Override
public int updateWarehouseStorageOrderDetail(WarehouseStorageOrderDetail warehouseStorageOrderDetail)
{
String loginName = ShiroUtils.getLoginName();
warehouseStorageOrderDetail.setUpdateBy(loginName);
warehouseStorageOrderDetail.setUpdateTime(DateUtils.getNowDate());
return warehouseStorageOrderDetailMapper.updateWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
/**
* 删除仓库入库单详情对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWarehouseStorageOrderDetailByIds(String ids)
{
return warehouseStorageOrderDetailMapper.deleteWarehouseStorageOrderDetailByIds(Convert.toStrArray(ids));
}
/**
* 删除仓库入库单详情信息
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
@Override
public int deleteWarehouseStorageOrderDetailById(Long warehouseStorageDetailId)
{
return warehouseStorageOrderDetailMapper.deleteWarehouseStorageOrderDetailById(warehouseStorageDetailId);
}
/**
* 作废仓库入库单详情
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
@Override
public int cancelWarehouseStorageOrderDetailById(Long warehouseStorageDetailId)
{
return warehouseStorageOrderDetailMapper.cancelWarehouseStorageOrderDetailById(warehouseStorageDetailId);
}
/**
* 恢复仓库入库单详情信息
*
* @param warehouseStorageDetailId 仓库入库单详情ID
* @return 结果
*/
@Override
public int restoreWarehouseStorageOrderDetailById(Long warehouseStorageDetailId)
{
return warehouseStorageOrderDetailMapper.restoreWarehouseStorageOrderDetailById(warehouseStorageDetailId);
}
/*
* 根据入库单号查询入库单详情列表
* */
@Override
public List<WarehouseStorageOrderDetail> selectStorageOrderDetailListByCode(String warehouseStorageCode) {
return warehouseStorageOrderDetailMapper.selectStorageOrderDetailListByCode(warehouseStorageCode);
}
}

262
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml

@ -0,0 +1,262 @@
<?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.warehouse.mapper.WarehouseStorageOrderDetailMapper">
<resultMap type="WarehouseStorageOrderDetail" id="WarehouseStorageOrderDetailResult">
<result property="warehouseStorageDetailId" column="warehouse_storage_detail_id" />
<result property="warehouseStorageCode" column="warehouse_storage_code" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="warehouseStorageStatus" column="warehouse_storage_status" />
<result property="warehouseQualityStatus" column="warehouse_quality_status" />
<result property="warehouseStorageType" column="warehouse_storage_type" />
<result property="warehouseStorageClass" column="warehouse_storage_class" />
<result property="warehouseOrderType" column="warehouse_order_type" />
<result property="warehouseDeptType" column="warehouse_dept_type" />
<result property="warehouseEmployee" column="warehouse_employee" />
<result property="warehouseCode" column="warehouse_code" />
<result property="warehouseName" column="warehouse_name" />
<result property="warehouseDetailAddress" column="warehouse_detail_address" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="customerContact" column="customer_contact" />
<result property="contactNumber" column="contact_number" />
<result property="supplierAddress" column="supplier_address" />
<result property="materialNo" column="material_no" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="materialPhotourl" column="material_photoUrl" />
<result property="materialBrand" column="material_brand" />
<result property="materialUnit" column="material_unit" />
<result property="materialDescribe" column="material_describe" />
<result property="materialProcessMethod" column="material_process_method" />
<result property="materialDeptType" column="material_dept_type" />
<result property="makeTotal" column="make_total" />
<result property="notifyHasArrivedNum" column="notify_has_arrived_num" />
<result property="notifyArriveNum" column="notify_arrive_num" />
<result property="actualHasArrivedNum" column="actual_has_arrived_num" />
<result property="actualArriveNum" column="actual_arrive_num" />
<result property="temporaryHasQualifiedNum" column="temporary_has_qualified_num" />
<result property="temporaryQualifiedNum" column="temporary_qualified_num" />
<result property="hasStorageNum" column="has_storage_num" />
<result property="storageNum" column="storage_num" />
<result property="qualityHasQualifiedNum" column="quality_has_qualified_num" />
<result property="qualityQualifiedNum" column="quality_qualified_num" />
<result property="refundsExchangesNum" column="refunds_exchanges_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="temporaryRemark" column="temporary_remark" />
<result property="temporaryReportUrl" column="temporary_report_url" />
<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="selectWarehouseStorageOrderDetailVo">
select warehouse_storage_detail_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_storage_class, warehouse_order_type, warehouse_dept_type, warehouse_employee, warehouse_code, warehouse_name, warehouse_detail_address, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, material_dept_type, make_total, notify_has_arrived_num, notify_arrive_num, actual_has_arrived_num, actual_arrive_num, temporary_has_qualified_num, temporary_qualified_num, has_storage_num, storage_num, quality_has_qualified_num, quality_qualified_num, refunds_exchanges_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, temporary_remark, temporary_report_url, create_time, create_by, update_by, update_time from warehouse_storage_order_detail
</sql>
<select id="selectWarehouseStorageOrderDetailList" parameterType="WarehouseStorageOrderDetail" resultMap="WarehouseStorageOrderDetailResult">
<include refid="selectWarehouseStorageOrderDetailVo"/>
<where>
</where>
</select>
<select id="selectWarehouseStorageOrderDetailById" parameterType="Long" resultMap="WarehouseStorageOrderDetailResult">
<include refid="selectWarehouseStorageOrderDetailVo"/>
where warehouse_storage_detail_id = #{warehouseStorageDetailId}
</select>
<select id="selectStorageOrderDetailListByCode" parameterType="String" resultMap="WarehouseStorageOrderDetailResult">
<include refid="selectWarehouseStorageOrderDetailVo"/>
where warehouse_storage_code = #{warehouseStorageCode}
</select>
<insert id="insertWarehouseStorageOrderDetail" parameterType="WarehouseStorageOrderDetail" useGeneratedKeys="true" keyProperty="warehouseStorageDetailId">
insert into warehouse_storage_order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseStorageCode != null">warehouse_storage_code,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="warehouseStorageStatus != null">warehouse_storage_status,</if>
<if test="warehouseQualityStatus != null">warehouse_quality_status,</if>
<if test="warehouseStorageType != null">warehouse_storage_type,</if>
<if test="warehouseStorageClass != null">warehouse_storage_class,</if>
<if test="warehouseOrderType != null">warehouse_order_type,</if>
<if test="warehouseDeptType != null">warehouse_dept_type,</if>
<if test="warehouseEmployee != null">warehouse_employee,</if>
<if test="warehouseCode != null">warehouse_code,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="warehouseDetailAddress != null">warehouse_detail_address,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="customerContact != null">customer_contact,</if>
<if test="contactNumber != null">contact_number,</if>
<if test="supplierAddress != null">supplier_address,</if>
<if test="materialNo != null">material_no,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialBrand != null">material_brand,</if>
<if test="materialUnit != null">material_unit,</if>
<if test="materialDescribe != null">material_describe,</if>
<if test="materialProcessMethod != null">material_process_method,</if>
<if test="materialDeptType != null">material_dept_type,</if>
<if test="makeTotal != null">make_total,</if>
<if test="notifyHasArrivedNum != null">notify_has_arrived_num,</if>
<if test="notifyArriveNum != null">notify_arrive_num,</if>
<if test="actualHasArrivedNum != null">actual_has_arrived_num,</if>
<if test="actualArriveNum != null">actual_arrive_num,</if>
<if test="temporaryHasQualifiedNum != null">temporary_has_qualified_num,</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num,</if>
<if test="hasStorageNum != null">has_storage_num,</if>
<if test="storageNum != null">storage_num,</if>
<if test="qualityHasQualifiedNum != null">quality_has_qualified_num,</if>
<if test="qualityQualifiedNum != null">quality_qualified_num,</if>
<if test="refundsExchangesNum != null">refunds_exchanges_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="temporaryRemark != null">temporary_remark,</if>
<if test="temporaryReportUrl != null">temporary_report_url,</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="warehouseStorageCode != null">#{warehouseStorageCode},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="warehouseStorageStatus != null">#{warehouseStorageStatus},</if>
<if test="warehouseQualityStatus != null">#{warehouseQualityStatus},</if>
<if test="warehouseStorageType != null">#{warehouseStorageType},</if>
<if test="warehouseStorageClass != null">#{warehouseStorageClass},</if>
<if test="warehouseOrderType != null">#{warehouseOrderType},</if>
<if test="warehouseDeptType != null">#{warehouseDeptType},</if>
<if test="warehouseEmployee != null">#{warehouseEmployee},</if>
<if test="warehouseCode != null">#{warehouseCode},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="warehouseDetailAddress != null">#{warehouseDetailAddress},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="customerContact != null">#{customerContact},</if>
<if test="contactNumber != null">#{contactNumber},</if>
<if test="supplierAddress != null">#{supplierAddress},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="materialPhotourl != null">#{materialPhotourl},</if>
<if test="materialBrand != null">#{materialBrand},</if>
<if test="materialUnit != null">#{materialUnit},</if>
<if test="materialDescribe != null">#{materialDescribe},</if>
<if test="materialProcessMethod != null">#{materialProcessMethod},</if>
<if test="materialDeptType != null">#{materialDeptType},</if>
<if test="makeTotal != null">#{makeTotal},</if>
<if test="notifyHasArrivedNum != null">#{notifyHasArrivedNum},</if>
<if test="notifyArriveNum != null">#{notifyArriveNum},</if>
<if test="actualHasArrivedNum != null">#{actualHasArrivedNum},</if>
<if test="actualArriveNum != null">#{actualArriveNum},</if>
<if test="temporaryHasQualifiedNum != null">#{temporaryHasQualifiedNum},</if>
<if test="temporaryQualifiedNum != null">#{temporaryQualifiedNum},</if>
<if test="hasStorageNum != null">#{hasStorageNum},</if>
<if test="storageNum != null">#{storageNum},</if>
<if test="qualityHasQualifiedNum != null">#{qualityHasQualifiedNum},</if>
<if test="qualityQualifiedNum != null">#{qualityQualifiedNum},</if>
<if test="refundsExchangesNum != null">#{refundsExchangesNum},</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="temporaryRemark != null">#{temporaryRemark},</if>
<if test="temporaryReportUrl != null">#{temporaryReportUrl},</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="updateWarehouseStorageOrderDetail" parameterType="WarehouseStorageOrderDetail">
update warehouse_storage_order_detail
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseStorageCode != null">warehouse_storage_code = #{warehouseStorageCode},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="warehouseStorageStatus != null">warehouse_storage_status = #{warehouseStorageStatus},</if>
<if test="warehouseQualityStatus != null">warehouse_quality_status = #{warehouseQualityStatus},</if>
<if test="warehouseStorageType != null">warehouse_storage_type = #{warehouseStorageType},</if>
<if test="warehouseStorageClass != null">warehouse_storage_class = #{warehouseStorageClass},</if>
<if test="warehouseOrderType != null">warehouse_order_type = #{warehouseOrderType},</if>
<if test="warehouseDeptType != null">warehouse_dept_type = #{warehouseDeptType},</if>
<if test="warehouseEmployee != null">warehouse_employee = #{warehouseEmployee},</if>
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="warehouseDetailAddress != null">warehouse_detail_address = #{warehouseDetailAddress},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="customerContact != null">customer_contact = #{customerContact},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
<if test="supplierAddress != null">supplier_address = #{supplierAddress},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialDeptType != null">material_dept_type = #{materialDeptType},</if>
<if test="makeTotal != null">make_total = #{makeTotal},</if>
<if test="notifyHasArrivedNum != null">notify_has_arrived_num = #{notifyHasArrivedNum},</if>
<if test="notifyArriveNum != null">notify_arrive_num = #{notifyArriveNum},</if>
<if test="actualHasArrivedNum != null">actual_has_arrived_num = #{actualHasArrivedNum},</if>
<if test="actualArriveNum != null">actual_arrive_num = #{actualArriveNum},</if>
<if test="temporaryHasQualifiedNum != null">temporary_has_qualified_num = #{temporaryHasQualifiedNum},</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num = #{temporaryQualifiedNum},</if>
<if test="hasStorageNum != null">has_storage_num = #{hasStorageNum},</if>
<if test="storageNum != null">storage_num = #{storageNum},</if>
<if test="qualityHasQualifiedNum != null">quality_has_qualified_num = #{qualityHasQualifiedNum},</if>
<if test="qualityQualifiedNum != null">quality_qualified_num = #{qualityQualifiedNum},</if>
<if test="refundsExchangesNum != null">refunds_exchanges_num = #{refundsExchangesNum},</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="temporaryRemark != null">temporary_remark = #{temporaryRemark},</if>
<if test="temporaryReportUrl != null">temporary_report_url = #{temporaryReportUrl},</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 warehouse_storage_detail_id = #{warehouseStorageDetailId}
</update>
<delete id="deleteWarehouseStorageOrderDetailById" parameterType="Long">
delete from warehouse_storage_order_detail where warehouse_storage_detail_id = #{warehouseStorageDetailId}
</delete>
<delete id="deleteWarehouseStorageOrderDetailByIds" parameterType="String">
delete from warehouse_storage_order_detail where warehouse_storage_detail_id in
<foreach item="warehouseStorageDetailId" collection="array" open="(" separator="," close=")">
#{warehouseStorageDetailId}
</foreach>
</delete>
<update id="cancelWarehouseStorageOrderDetailById" parameterType="Long">
update warehouse_storage_order_detail set del_flag = '1' where warehouse_storage_detail_id = #{warehouseStorageDetailId}
</update>
<update id="restoreWarehouseStorageOrderDetailById" parameterType="Long">
update warehouse_storage_order_detail set del_flag = '0' where warehouse_storage_detail_id = #{warehouseStorageDetailId}
</update>
</mapper>

6
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml

@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseEmployee" column="warehouse_employee" /> <result property="warehouseEmployee" column="warehouse_employee" />
<result property="warehouseCode" column="warehouse_code" /> <result property="warehouseCode" column="warehouse_code" />
<result property="warehouseName" column="warehouse_name" /> <result property="warehouseName" column="warehouse_name" />
<result property="warehouseDetailAddress" column="warehouse_detail_address" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
@ -35,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWarehouseStorageOrderVo"> <sql id="selectWarehouseStorageOrderVo">
select warehouse_storage_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_order_type, warehouse_dept_type, notify_arrived_num, actual_arrived_num, temporary_qualified_num, temporary_unqualified_num, quality_qualified_num, quality_unqualified_num ,storage_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, warehouse_employee, warehouse_code, warehouse_name, create_time, create_by, update_by, update_time from warehouse_storage_order select warehouse_storage_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_order_type, warehouse_dept_type, notify_arrived_num, actual_arrived_num, temporary_qualified_num, temporary_unqualified_num, quality_qualified_num, quality_unqualified_num ,storage_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, warehouse_employee, warehouse_code, warehouse_name, warehouse_detail_address ,create_time, create_by, update_by, update_time from warehouse_storage_order
</sql> </sql>
<select id="selectWarehouseStorageOrderList" parameterType="WarehouseStorageOrder" resultMap="WarehouseStorageOrderResult"> <select id="selectWarehouseStorageOrderList" parameterType="WarehouseStorageOrder" resultMap="WarehouseStorageOrderResult">
@ -81,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseEmployee != null">warehouse_employee,</if> <if test="warehouseEmployee != null">warehouse_employee,</if>
<if test="warehouseCode != null">warehouse_code,</if> <if test="warehouseCode != null">warehouse_code,</if>
<if test="warehouseName != null">warehouse_name,</if> <if test="warehouseName != null">warehouse_name,</if>
<if test="warehouseDetailAddress != null">warehouse_detail_address,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
@ -109,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseEmployee != null">#{warehouseEmployee},</if> <if test="warehouseEmployee != null">#{warehouseEmployee},</if>
<if test="warehouseCode != null">#{warehouseCode},</if> <if test="warehouseCode != null">#{warehouseCode},</if>
<if test="warehouseName != null">#{warehouseName},</if> <if test="warehouseName != null">#{warehouseName},</if>
<if test="warehouseDetailAddress != null">#{warehouseDetailAddress},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
@ -141,6 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseEmployee != null">warehouse_employee = #{warehouseEmployee},</if> <if test="warehouseEmployee != null">warehouse_employee = #{warehouseEmployee},</if>
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if> <if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if> <if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="warehouseDetailAddress != null">warehouse_detail_address = #{warehouseDetailAddress},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>

20
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('仓库入库单列表')" /> <th:block th:include="include :: header('仓库入库单')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
@ -75,9 +75,8 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('warehouse:storageOrder:edit')}]]; var editFlag = [[${@permission.hasPermi('warehouse:storageOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('warehouse:storageOrder:remove')}]]; var temporaryPurchaseWarehouseFlag = [[${@permission.hasPermi('warehouse:storageOrder:temporaryPurchaseWarehouse')}]];
var cancelFlag = [[${@permission.hasPermi('warehouse:storageOrder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('warehouse:storageOrder:restore')}]];
var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]]; var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]];
var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]]; var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]];
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]];
@ -124,7 +123,7 @@
field: 'relatedOrderCode', field: 'relatedOrderCode',
}, },
{ {
title: '仓库订单类型', title: '订单类型',
field: 'warehouseOrderType', field: 'warehouseOrderType',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value); return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
@ -226,6 +225,10 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.warehouseStorageId + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.warehouseStorageId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
if (row.warehouseDeptType == 1 && row.warehouseOrderType == 0){
actions.push('<a class="btn btn-success btn-xs ' + temporaryPurchaseWarehouseFlag + '" href="javascript:void(0)" onclick="temporaryPurchaseWarehouse(\'' + row.warehouseStorageId + '\')"><i class="fa fa-edit"></i>暂收</a> ');
}
return actions.join(''); return actions.join('');
} }
}] }]
@ -233,9 +236,10 @@
$.table.init(options); $.table.init(options);
}); });
/*暂收*/ /*暂收-采购单(仓库入库)*/
function temporaryCollection(warehouseStorageId){ function temporaryPurchaseWarehouse(warehouseStorageId){
var url = ctx + 'warehouse/storageOrder/temporaryPurchaseWarehouse/' + warehouseStorageId;
$.modal.open("暂收",url);
}; };
</script> </script>

151
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryCollection.html → ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/temporaryPurchaseWarehouse.html

@ -1,58 +1,54 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('开始品质')" /> <th:block th:include="include :: header('暂收-采购单(仓库入库)')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<style> <style>
.supplier-value span { .supplier-value span {
margin-right: 10px; margin-right: 10px;
} }
</style> </style>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-qualityOrder-edit" th:object="${qualityOrder}"> <form class="form-horizontal m" id="form-temporaryPurchaseWarehouse-edit" th:object="${warehouseStorageOrder}">
<input name="qualityOrderId" th:field="*{qualityOrderId}" type="hidden"> <input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">品质单号:</label>
<div class="col-sm-8">
<input name="qualityOrderCode" th:field="*{qualityOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label> <label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="inStorageCode" th:field="*{inStorageCode}" class="form-control" type="text"> <input name="warehouseStorageCode" th:field="*{warehouseStorageCode}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label> <label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text"> <input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="col-xs-12">
<label class="col-sm-3 control-label">品质单订单类型:</label> <label class="col-sm-1 control-label">入库类型:</label>
<div class="col-sm-8"> <div class="col-sm-4">
<select name="qualityOrderType" class="form-control m-b" th:with="type=${@dict.getType('quality_order_type')}"> <select name="warehouseStorageType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_storage_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityOrderType}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseStorageType}"></option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">品质单入库类型</label> <label class="col-sm-3 control-label">到货时间</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="qualityStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('quality_storage_status')}"> <div class="input-group date">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStorageStatus}"></option> <input name="arrivedTime" th:value="${#dates.format(warehouseStorageOrder.arrivedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
</select> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">付质检时间:</label> <label class="col-sm-3 control-label">交检时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="deliveryInspectionTime" th:value="${#dates.format(qualityOrder.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="deliveryInspectionTime" th:value="${#dates.format(warehouseStorageOrder.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -69,8 +65,15 @@
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text"> <input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库详情地址:</label>
<div class="col-sm-8">
<input name="warehouseDetailAddress" th:field="*{warehouseDetailAddress}" class="form-control" type="text">
</div>
</div>
<div class="container"> <div class="container">
<!--物料相关--> <!--供应商物料相关-->
<div class="row"> <div class="row">
<div class="col-sm-12" id="tablesContainer"> <div class="col-sm-12" id="tablesContainer">
<!-- 表格将在这里动态生成 --> <!-- 表格将在这里动态生成 -->
@ -84,19 +87,25 @@
<th:block th:include="include :: bootstrap-table-editable-js" /> <th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]] var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]
var prefix = ctx + "quality/qualityOrder"; var prefix = ctx + "warehouse/storageOrder";
$("#form-qualityOrder-edit").validate({ $("#form-temporaryPurchaseWarehouse-edit").validate({
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/startingQuality", $('#form-qualityOrder-edit').serialize()); $.operate.save(prefix + "/temporaryPurchaseWarehouse", $('#form-temporaryPurchaseWarehouse-edit').serialize());
} }
} }
$("input[name='arrivedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({ $("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
@ -105,9 +114,9 @@
$(function() { $(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 // 假设qualityOrderCode已经定义或者可以通过某种方式获取到
var qualityOrderCode = [[${qualityOrder.qualityOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + qualityOrderCode, function(data) { $.getJSON(prefix + "/temporaryPurchaseWarehouseDetail?warehouseStorageCode=" + warehouseStorageCode, function(data) {
for (var supplierCode in data) { for (var supplierCode in data) {
if (data.hasOwnProperty(supplierCode)) { if (data.hasOwnProperty(supplierCode)) {
var supplierData = data[supplierCode]; var supplierData = data[supplierCode];
@ -174,39 +183,69 @@
title: '物料加工方式', title: '物料加工方式',
field: 'materialProcessMethod', field: 'materialProcessMethod',
}, },
{
title: '通知已到货数',
field: 'notifyHasArrivedNum',
},
{
title: '实际已到货数',
field: 'actualHasArrivedNum',
},
{ {
title: '订单数', title: '暂收已合格数',
field: 'makeTotal', field: 'temporaryHasQualifiedNum',
}, },
{ {
title: '品质已合格数', title: '品质已合格数',
field: 'qualityHasqualifiedNum', field: 'qualityHasQualifiedNum',
}, },
{ {
title: '本次到货数', title: '已入库数',
field: 'thisArrivedNum', field: 'hasStorageNum',
editable:{
type:'text'
}, },
required:true {
title: '通知到货数',
field: 'notifyArriveNum',
},
{
title: '实际到货数',
field: 'actualArriveNum',
editable:{
type: 'text',
mode:'inline',
validate: function (v) {
if (!v) return '数量不能为空';
if (isNaN(v)) return '数量必须是数字';
var processBadNum = parseInt(v);
if (processBadNum <= 0) return '数量必须是正整数';
}
}
}, },
{ {
title: '品质报告', title: '暂收合格数',
align: 'center', field: 'temporaryQualifiedNum',
formatter: function(value, row, index) { editable:{
// 这里直接使用row对象获取supplierCode,假设它是存在的 type: 'text',
var actions = []; mode:'inline',
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.supplierCode + '\')"><i class="fa fa-plus"></i>报告</a> '); validate: function (v) {
return actions.join(''); if (!v) return '数量不能为空';
if (isNaN(v)) return '数量必须是数字';
var processBadNum = parseInt(v);
if (processBadNum <= 0) return '数量必须是正整数';
}
} }
}, },
{ {
title: '品质合格数', title: '暂收备注',
field: 'qualityQualifiedNum', field: 'temporaryRemark',
editable: true
}, },
{ {
title: '品质不合格数', title: '暂收报告',
field: 'qualityUnqualifiedNum', field: 'temporaryReportUrl',
}] }]
}); });
@ -214,20 +253,6 @@
$('#tablesContainer').append($tableWrapper); $('#tablesContainer').append($tableWrapper);
} }
/*品质报告*/
// function qualityReport(materialNo, supplierCode){
// var url = ctx + 'quality/qualityOrder/qualityReport/' + materialNo + '?supplierCode=' + encodeURIComponent(supplierCode);
// $.modal.open("品质报告", url);
// }
function qualityReport(materialNo, supplierCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString();
$.modal.open("品质报告", url);
}
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save