出库单据
This commit is contained in:
@@ -65,7 +65,6 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
* @return 出库主单
|
||||
*/
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout)
|
||||
{
|
||||
return outStockoutMapper.selectOutStockoutList(outStockout);
|
||||
@@ -132,6 +131,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
outStockout.setWarehouseId("01");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||
@@ -166,10 +166,10 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
|
||||
OutStockout outStockout = outStockoutMapper.selectOutStockoutByStockoutId(stockoutId);
|
||||
if (outStockout == null){
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message4"));
|
||||
return AjaxResult.warn("单据不存在,请检查!");
|
||||
}
|
||||
if ("1".equals(outStockout.getStatus())){
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message5"));
|
||||
return AjaxResult.warn("单据未审核,请审核无误后再分配!");
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class OutStockoutDetail extends BaseEntity
|
||||
|
||||
/** 物资名称 ASMAT_NAME */
|
||||
// @Excel(name = "物资名称 ASMAT_NAME")
|
||||
// private String productName;
|
||||
private String productName;
|
||||
|
||||
/** 供应商代码 SUPPLIER_CODE */
|
||||
@Excel(name = "供应商代码 SUPPLIER_CODE")
|
||||
@@ -138,9 +138,102 @@ public class OutStockoutDetail extends BaseEntity
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
private ExtraField extraField;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private String voltage;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private String power;
|
||||
|
||||
/** 相位 */
|
||||
@Excel(name = "相位")
|
||||
private String phase;
|
||||
|
||||
/** 净重 */
|
||||
@Excel(name = "净重")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
/** 毛重 */
|
||||
@Excel(name = "毛重")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
/** 分销 */
|
||||
@Excel(name = "分销")
|
||||
private String distribution;
|
||||
|
||||
/** 机型 */
|
||||
@Excel(name = "机型")
|
||||
private String model;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
public String getVoltage() {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setVoltage(String voltage) {
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public String getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(String power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getPhase() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setPhase(String phase) {
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight() {
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setNetWeight(BigDecimal netWeight) {
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight() {
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight) {
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public String getDistribution() {
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setDistribution(String distribution) {
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public void setStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
@@ -433,48 +526,55 @@ public class OutStockoutDetail extends BaseEntity
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public ExtraField getExtraField() {
|
||||
return extraField;
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setExtraField(ExtraField extraField) {
|
||||
this.extraField = extraField;
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutDetailId", getStockoutDetailId())
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("allotQuantity", getAllotQuantity())
|
||||
.append("allotQuantityX", getAllotQuantityX())
|
||||
.append("allotQuantityJ", getAllotQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("remark", getRemark())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("outId", getOutId())
|
||||
.append("bukechaiQuantity", getBukechaiQuantity())
|
||||
.append("kechaiQuantity", getKechaiQuantity())
|
||||
.append("entryid", getEntryid())
|
||||
.append("flatQuantity", getFlatQuantity())
|
||||
.append("fid", getFid())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("printDate", getPrintDate())
|
||||
.toString();
|
||||
return "OutStockoutDetail{" +
|
||||
"stockoutDetailId='" + stockoutDetailId + '\'' +
|
||||
", stockoutGuid='" + stockoutGuid + '\'' +
|
||||
", stockoutId='" + stockoutId + '\'' +
|
||||
", lotNo='" + lotNo + '\'' +
|
||||
", productGuid='" + productGuid + '\'' +
|
||||
", productId='" + productId + '\'' +
|
||||
", quantity=" + quantity +
|
||||
", quantityX=" + quantityX +
|
||||
", quantityJ=" + quantityJ +
|
||||
", assignNum=" + assignNum +
|
||||
", assignNumX=" + assignNumX +
|
||||
", assignNumJ=" + assignNumJ +
|
||||
", allotQuantity=" + allotQuantity +
|
||||
", allotQuantityX=" + allotQuantityX +
|
||||
", allotQuantityJ=" + allotQuantityJ +
|
||||
", price='" + price + '\'' +
|
||||
", warehouseId='" + warehouseId + '\'' +
|
||||
", outId='" + outId + '\'' +
|
||||
", bukechaiQuantity='" + bukechaiQuantity + '\'' +
|
||||
", kechaiQuantity='" + kechaiQuantity + '\'' +
|
||||
", entryid='" + entryid + '\'' +
|
||||
", flatQuantity='" + flatQuantity + '\'' +
|
||||
", fid='" + fid + '\'' +
|
||||
", erpStockoutId='" + erpStockoutId + '\'' +
|
||||
", unit='" + unit + '\'' +
|
||||
", spec='" + spec + '\'' +
|
||||
", productName='" + productName + '\'' +
|
||||
", supplierId='" + supplierId + '\'' +
|
||||
", cargoNo='" + cargoNo + '\'' +
|
||||
", printDate='" + printDate + '\'' +
|
||||
", voltage='" + voltage + '\'' +
|
||||
", power='" + power + '\'' +
|
||||
", phase='" + phase + '\'' +
|
||||
", netWeight=" + netWeight +
|
||||
", grossWeight=" + grossWeight +
|
||||
", distribution='" + distribution + '\'' +
|
||||
", model='" + model + '\'' +
|
||||
", orderId='" + orderId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
package com.ruoyi.out.productAndStock.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Controller
|
||||
*
|
||||
* 库存物资Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/productAndStock")
|
||||
@@ -29,7 +35,7 @@ public class ViewProductAndStockController extends BaseController
|
||||
private IViewProductAndStockService viewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
* 查询库存物资列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:list')")
|
||||
@GetMapping("/list")
|
||||
@@ -41,20 +47,20 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出可出库的库存物资信息列表
|
||||
* 导出库存物资列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:export')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "库存物资", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
ExcelUtil<ViewProductAndStock> util = new ExcelUtil<ViewProductAndStock>(ViewProductAndStock.class);
|
||||
util.exportExcel(response, list, "可出库的库存物资信息数据");
|
||||
util.exportExcel(response, list, "库存物资数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可出库的库存物资信息详细信息
|
||||
* 获取库存物资详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:query')")
|
||||
@GetMapping(value = "/{onlyIdentity}")
|
||||
@@ -64,10 +70,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:add')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.INSERT)
|
||||
@Log(title = "库存物资", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
@@ -75,10 +81,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:edit')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "库存物资", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
@@ -86,10 +92,10 @@ public class ViewProductAndStockController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
* 删除库存物资
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:remove')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.DELETE)
|
||||
@Log(title = "库存物资", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{onlyIdentitys}")
|
||||
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
package com.ruoyi.out.productAndStock.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息对象 view_product_and_stock
|
||||
*
|
||||
* 库存物资对象 view_product_and_stock
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public class ViewProductAndStock extends BaseEntity
|
||||
{
|
||||
@@ -19,95 +20,268 @@ public class ViewProductAndStock extends BaseEntity
|
||||
@Excel(name = "序号")
|
||||
private Long onlyIdentity;
|
||||
|
||||
/** 物资编码 */
|
||||
@Excel(name = "物资编码")
|
||||
/** 品号 */
|
||||
@Excel(name = "品号")
|
||||
private String productId;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 物资名称 */
|
||||
@Excel(name = "物资名称")
|
||||
/** 品名 */
|
||||
@Excel(name = "品名")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
private String warehouseName;
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String spare1;
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String spare3;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
/** 型号 */
|
||||
@Excel(name = "型号")
|
||||
private String spare4;
|
||||
|
||||
/** 颜色 */
|
||||
@Excel(name = "颜色")
|
||||
private String spare5;
|
||||
|
||||
/** 序列号 */
|
||||
@Excel(name = "序列号")
|
||||
private String spare6;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private String voltage;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private String power;
|
||||
|
||||
/** 相位 */
|
||||
@Excel(name = "相位")
|
||||
private String phase;
|
||||
|
||||
/** 净重 */
|
||||
@Excel(name = "净重")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
/** 毛重 */
|
||||
@Excel(name = "毛重")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
/** 分销 */
|
||||
@Excel(name = "分销")
|
||||
private String distribution;
|
||||
|
||||
/** 机型 */
|
||||
@Excel(name = "机型")
|
||||
private String model;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
public void setQuantity(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setVoltage(String voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public String getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setPower(String power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getPower()
|
||||
{
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPhase(String phase)
|
||||
{
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public String getPhase()
|
||||
{
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setNetWeight(BigDecimal netWeight)
|
||||
{
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight()
|
||||
{
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight)
|
||||
{
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight()
|
||||
{
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setDistribution(String distribution)
|
||||
{
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getDistribution()
|
||||
{
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@@ -117,6 +291,19 @@ public class ViewProductAndStock extends BaseEntity
|
||||
.append("productName", getProductName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("voltage", getVoltage())
|
||||
.append("power", getPower())
|
||||
.append("phase", getPhase())
|
||||
.append("netWeight", getNetWeight())
|
||||
.append("grossWeight", getGrossWeight())
|
||||
.append("distribution", getDistribution())
|
||||
.append("model", getModel())
|
||||
.append("orderId", getOrderId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,60 +1,59 @@
|
||||
package com.ruoyi.out.productAndStock.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Mapper接口
|
||||
*
|
||||
* 库存物资Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public interface ViewProductAndStockMapper
|
||||
public interface ViewProductAndStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -1,61 +1,60 @@
|
||||
package com.ruoyi.out.productAndStock.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service接口
|
||||
*
|
||||
* 库存物资Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public interface IViewProductAndStockService
|
||||
public interface IViewProductAndStockService
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键集合
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
package com.ruoyi.out.productAndStock.service.impl;
|
||||
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service业务层处理
|
||||
*
|
||||
* 库存物资Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@Service
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
{
|
||||
@Autowired
|
||||
private ViewProductAndStockMapper viewProductAndStockMapper;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
@Override
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity)
|
||||
@@ -33,10 +32,10 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息
|
||||
* 查询库存物资列表
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资
|
||||
*/
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock)
|
||||
@@ -45,9 +44,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 新增库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -57,9 +56,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* 修改库存物资
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -69,9 +68,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键
|
||||
* 批量删除库存物资
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -81,9 +80,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* 删除库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -67,21 +67,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="materialDesc" column="product_name" />
|
||||
<result property="englishDesc" column="englishDesc" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="netWeight" column="netWeight" />
|
||||
</association>
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
@@ -255,10 +252,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail_finish d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
@@ -32,21 +33,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="materialDesc" column="product_name" />
|
||||
<result property="englishDesc" column="englishDesc" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="netWeight" column="netWeight" />
|
||||
</association>
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
@@ -54,10 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
@@ -93,6 +91,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="supplierId != null and supplierId != ''"> and d.supplier_id like concat('%', #{supplierId}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and d.cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and d.print_date = #{printDate}</if>
|
||||
<if test="voltage != null and voltage != ''"> and d.voltage = #{voltage}</if>
|
||||
<if test="power != null and power != ''"> and d.power = #{power}</if>
|
||||
<if test="phase != null and phase != ''"> and d.phase = #{phase}</if>
|
||||
<if test="netWeight != null "> and d.net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and d.gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and d.distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and d.model = #{model}</if>
|
||||
<if test="orderId != null and orderId != ''"> and d.order_id = #{orderId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -110,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
@@ -131,11 +138,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
@@ -144,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
@@ -165,11 +180,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -206,6 +228,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
@@ -226,10 +256,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
from out_stockout_detail d
|
||||
left join bas_product bp on d.product_id = bp.product_id
|
||||
where d.stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
|
||||
left join bas_customer bc on bc.customer_no = o.customer_no
|
||||
left join out_stockout_detail d on d.stockout_id = o.stockout_id
|
||||
left join bas_product bp on bp.product_id = d.product_id
|
||||
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and o.stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and o.stockout_id = #{stockoutId}</if>
|
||||
@@ -55,17 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="FID != null and FID != ''"> and o.FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and o.erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
<if test="typeData != null and typeData.size()>0">
|
||||
and bw.warehouse_type in
|
||||
<foreach item="item" index="index" collection="typeData" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by o.create_date desc
|
||||
</select>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="productId" column="product_id" />
|
||||
@@ -11,25 +11,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id,warehouse_name from view_product_and_stock
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
|
||||
<if test="power != null and power != ''"> and power = #{power}</if>
|
||||
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
@@ -44,6 +69,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||
@@ -52,6 +90,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -63,6 +114,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
@@ -72,9 +136,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user