库存明细查询
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.search.ViewStockDetail.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.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.enums.BusinessType;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库存明细查询Controller
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/search/ViewStockDetail")
|
||||
public class ViewStockDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IViewStockDetailService viewStockDetailService;
|
||||
|
||||
/**
|
||||
* 查询库存明细查询列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
startPage();
|
||||
List<ViewStockDetail> list = viewStockDetailService.selectViewStockDetailList(viewStockDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存明细查询列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:export')")
|
||||
@Log(title = "库存明细查询", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ViewStockDetail viewStockDetail)
|
||||
{
|
||||
List<ViewStockDetail> list = viewStockDetailService.selectViewStockDetailList(viewStockDetail);
|
||||
ExcelUtil<ViewStockDetail> util = new ExcelUtil<ViewStockDetail>(ViewStockDetail.class);
|
||||
util.exportExcel(response, list, "库存明细查询数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存明细查询详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:query')")
|
||||
@GetMapping(value = "/{onlyIdentity}")
|
||||
public AjaxResult getInfo(@PathVariable("onlyIdentity") Long onlyIdentity)
|
||||
{
|
||||
return success(viewStockDetailService.selectViewStockDetailByOnlyIdentity(onlyIdentity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存明细查询
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:add')")
|
||||
@Log(title = "库存明细查询", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ViewStockDetail viewStockDetail)
|
||||
{
|
||||
return toAjax(viewStockDetailService.insertViewStockDetail(viewStockDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存明细查询
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:edit')")
|
||||
@Log(title = "库存明细查询", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ViewStockDetail viewStockDetail)
|
||||
{
|
||||
return toAjax(viewStockDetailService.updateViewStockDetail(viewStockDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存明细查询
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:ViewStockDetail:remove')")
|
||||
@Log(title = "库存明细查询", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{onlyIdentitys}")
|
||||
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
|
||||
{
|
||||
return toAjax(viewStockDetailService.deleteViewStockDetailByOnlyIdentitys(onlyIdentitys));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
package com.ruoyi.search.ViewStockDetail.domain;
|
||||
|
||||
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_stock_detail
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public class ViewStockDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
@Excel(name = "id")
|
||||
private Long onlyIdentity;
|
||||
|
||||
/** 库存ID */
|
||||
@Excel(name = "库存ID")
|
||||
private String stockId;
|
||||
|
||||
/** 货位ID */
|
||||
@Excel(name = "货位ID")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
|
||||
/** 作业ID */
|
||||
@Excel(name = "作业ID")
|
||||
private String jobId;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
private String lotNo;
|
||||
|
||||
/** 入库子单ID */
|
||||
@Excel(name = "入库子单ID")
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 入库时间 */
|
||||
@Excel(name = "入库时间")
|
||||
private String inDate;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
/** 剁型ID */
|
||||
@Excel(name = "剁型ID")
|
||||
private String stackingId;
|
||||
|
||||
/** 货位名称 */
|
||||
@Excel(name = "货位名称")
|
||||
private String cargoSpaceName;
|
||||
|
||||
/** 巷道ID */
|
||||
@Excel(name = "巷道ID")
|
||||
private String roadwayId;
|
||||
|
||||
/** 货位状态 */
|
||||
@Excel(name = "货位状态")
|
||||
private String cargoSpaceStatus;
|
||||
|
||||
/** 是否锁定 */
|
||||
@Excel(name = "是否锁定")
|
||||
private String locked;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private String productId;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String spec;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private String price;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getStockinDetailId()
|
||||
{
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setInDate(String inDate)
|
||||
{
|
||||
this.inDate = inDate;
|
||||
}
|
||||
|
||||
public String getInDate()
|
||||
{
|
||||
return inDate;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setStackingId(String stackingId)
|
||||
{
|
||||
this.stackingId = stackingId;
|
||||
}
|
||||
|
||||
public String getStackingId()
|
||||
{
|
||||
return stackingId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceName(String cargoSpaceName)
|
||||
{
|
||||
this.cargoSpaceName = cargoSpaceName;
|
||||
}
|
||||
|
||||
public String getCargoSpaceName()
|
||||
{
|
||||
return cargoSpaceName;
|
||||
}
|
||||
|
||||
public void setRoadwayId(String roadwayId)
|
||||
{
|
||||
this.roadwayId = roadwayId;
|
||||
}
|
||||
|
||||
public String getRoadwayId()
|
||||
{
|
||||
return roadwayId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceStatus(String cargoSpaceStatus)
|
||||
{
|
||||
this.cargoSpaceStatus = cargoSpaceStatus;
|
||||
}
|
||||
|
||||
public String getCargoSpaceStatus()
|
||||
{
|
||||
return cargoSpaceStatus;
|
||||
}
|
||||
|
||||
public void setLocked(String locked)
|
||||
{
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
public String getLocked()
|
||||
{
|
||||
return locked;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("onlyIdentity", getOnlyIdentity())
|
||||
.append("stockId", getStockId())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("quantity", getQuantity())
|
||||
.append("jobId", getJobId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("stockinDetailId", getStockinDetailId())
|
||||
.append("inDate", getInDate())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("stackingId", getStackingId())
|
||||
.append("cargoSpaceName", getCargoSpaceName())
|
||||
.append("roadwayId", getRoadwayId())
|
||||
.append("cargoSpaceStatus", getCargoSpaceStatus())
|
||||
.append("locked", getLocked())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("spec", getSpec())
|
||||
.append("unit", getUnit())
|
||||
.append("price", getPrice())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.search.ViewStockDetail.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
|
||||
/**
|
||||
* 库存明细查询Mapper接口
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public interface ViewStockDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询库存明细查询
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 库存明细查询
|
||||
*/
|
||||
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询库存明细查询列表
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 库存明细查询集合
|
||||
*/
|
||||
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 新增库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewStockDetail(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 修改库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewStockDetail(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 删除库存明细查询
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 批量删除库存明细查询
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.search.ViewStockDetail.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
|
||||
/**
|
||||
* 库存明细查询Service接口
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public interface IViewStockDetailService
|
||||
{
|
||||
/**
|
||||
* 查询库存明细查询
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 库存明细查询
|
||||
*/
|
||||
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询库存明细查询列表
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 库存明细查询集合
|
||||
*/
|
||||
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 新增库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewStockDetail(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 修改库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewStockDetail(ViewStockDetail viewStockDetail);
|
||||
|
||||
/**
|
||||
* 批量删除库存明细查询
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存明细查询主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
/**
|
||||
* 删除库存明细查询信息
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.search.ViewStockDetail.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||
|
||||
/**
|
||||
* 库存明细查询Service业务层处理
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
@Service
|
||||
public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||
{
|
||||
@Autowired
|
||||
private ViewStockDetailMapper viewStockDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询库存明细查询
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 库存明细查询
|
||||
*/
|
||||
@Override
|
||||
public ViewStockDetail selectViewStockDetailByOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
return viewStockDetailMapper.selectViewStockDetailByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存明细查询列表
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 库存明细查询
|
||||
*/
|
||||
@Override
|
||||
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
return viewStockDetailMapper.selectViewStockDetailList(viewStockDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertViewStockDetail(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
return viewStockDetailMapper.insertViewStockDetail(viewStockDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存明细查询
|
||||
*
|
||||
* @param viewStockDetail 库存明细查询
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateViewStockDetail(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
return viewStockDetailMapper.updateViewStockDetail(viewStockDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存明细查询
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存明细查询主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewStockDetailByOnlyIdentitys(Long[] onlyIdentitys)
|
||||
{
|
||||
return viewStockDetailMapper.deleteViewStockDetailByOnlyIdentitys(onlyIdentitys);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存明细查询信息
|
||||
*
|
||||
* @param onlyIdentity 库存明细查询主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewStockDetailByOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
return viewStockDetailMapper.deleteViewStockDetailByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
<?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.search.ViewStockDetail.mapper.ViewStockDetailMapper">
|
||||
|
||||
<resultMap type="ViewStockDetail" id="ViewStockDetailResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="inDate" column="in_date" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="stackingId" column="stacking_id" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="cargoSpaceStatus" column="cargo_space_status" />
|
||||
<result property="locked" column="locked" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="price" column="price" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewStockDetailVo">
|
||||
select only_identity, stock_id, cargo_space_id, tray_code, quantity, job_id, lot_no, stockin_detail_id, in_date, warehouse_id, stacking_id, cargo_space_name, roadway_id, cargo_space_status, locked, product_id, product_name, spec, unit, price from view_stock_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
|
||||
<include refid="selectViewStockDetailVo"/>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id like concat('%', #{stockId}, '%')</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id like concat('%', #{jobId}, '%')</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id like concat('%', #{stockinDetailId}, '%')</if>
|
||||
<if test="inDate != null and inDate != ''"> and in_date like concat('%', #{inDate}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||
<if test="stackingId != null and stackingId != ''"> and stacking_id like concat('%', #{stackingId}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id like concat('%', #{roadwayId}, '%')</if>
|
||||
<if test="cargoSpaceStatus != null and cargoSpaceStatus != ''"> and cargo_space_status like concat('%', #{cargoSpaceStatus}, '%')</if>
|
||||
<if test="locked != null and locked != ''"> and locked like concat('%', #{locked}, '%')</if>
|
||||
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectViewStockDetailByOnlyIdentity" parameterType="Long" resultMap="ViewStockDetailResult">
|
||||
<include refid="selectViewStockDetailVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</select>
|
||||
|
||||
<insert id="insertViewStockDetail" parameterType="ViewStockDetail">
|
||||
insert into view_stock_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">only_identity,</if>
|
||||
<if test="stockId != null and stockId != ''">stock_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="inDate != null">in_date,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="stackingId != null">stacking_id,</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name,</if>
|
||||
<if test="roadwayId != null">roadway_id,</if>
|
||||
<if test="cargoSpaceStatus != null">cargo_space_status,</if>
|
||||
<if test="locked != null">locked,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="price != null">price,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||
<if test="stockId != null and stockId != ''">#{stockId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="inDate != null">#{inDate},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="stackingId != null">#{stackingId},</if>
|
||||
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
|
||||
<if test="roadwayId != null">#{roadwayId},</if>
|
||||
<if test="cargoSpaceStatus != null">#{cargoSpaceStatus},</if>
|
||||
<if test="locked != null">#{locked},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateViewStockDetail" parameterType="ViewStockDetail">
|
||||
update view_stock_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockId != null and stockId != ''">stock_id = #{stockId},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="jobId != null">job_id = #{jobId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="inDate != null">in_date = #{inDate},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="stackingId != null">stacking_id = #{stackingId},</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
||||
<if test="cargoSpaceStatus != null">cargo_space_status = #{cargoSpaceStatus},</if>
|
||||
<if test="locked != null">locked = #{locked},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
|
||||
<delete id="deleteViewStockDetailByOnlyIdentity" parameterType="Long">
|
||||
delete from view_stock_detail where only_identity = #{onlyIdentity}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewStockDetailByOnlyIdentitys" parameterType="String">
|
||||
delete from view_stock_detail where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user