入库单据管理
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.in.stockin.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.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库单据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/in/stockIn")
|
||||
public class InStockinController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InStockin inStockin)
|
||||
{
|
||||
startPage();
|
||||
List<InStockin> list = inStockinService.selectInStockinList(inStockin);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库单据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:export')")
|
||||
@Log(title = "入库单据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InStockin inStockin)
|
||||
{
|
||||
List<InStockin> list = inStockinService.selectInStockinList(inStockin);
|
||||
ExcelUtil<InStockin> util = new ExcelUtil<InStockin>(InStockin.class);
|
||||
util.exportExcel(response, list, "入库单据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:query')")
|
||||
@GetMapping(value = "/{stockinGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinGuid") String stockinGuid)
|
||||
{
|
||||
return success(inStockinService.selectInStockinByStockinGuid(stockinGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:add')")
|
||||
@Log(title = "入库单据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockin inStockin)
|
||||
{
|
||||
return toAjax(inStockinService.insertInStockin(inStockin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:edit')")
|
||||
@Log(title = "入库单据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockin inStockin)
|
||||
{
|
||||
return toAjax(inStockinService.updateInStockin(inStockin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockIn:remove')")
|
||||
@Log(title = "入库单据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return toAjax(inStockinService.deleteInStockinByStockinGuids(stockinGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
package com.ruoyi.in.stockin.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;
|
||||
|
||||
/**
|
||||
* 入库单据对象 in_stockin
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class InStockin extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID */
|
||||
private String stockinGuid;
|
||||
|
||||
/** 入库订单ID */
|
||||
@Excel(name = "入库订单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 入库类型 */
|
||||
@Excel(name = "入库类型")
|
||||
private String inType;
|
||||
|
||||
/** 建立时间 */
|
||||
@Excel(name = "建立时间")
|
||||
private String createDate;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createManId;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 仓库ID */
|
||||
@Excel(name = "仓库ID")
|
||||
private String warehouseId;
|
||||
|
||||
/** 完成日期 */
|
||||
@Excel(name = " 完成日期")
|
||||
private String finishDate;
|
||||
|
||||
/** erp单号 */
|
||||
@Excel(name = "erp单号")
|
||||
private String erpBill;
|
||||
|
||||
/** 单据来源 */
|
||||
@Excel(name = "单据来源")
|
||||
private String stockSource;
|
||||
|
||||
/** 部门编码 */
|
||||
@Excel(name = "部门编码")
|
||||
private String departmentNo;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
private String customerNo;
|
||||
|
||||
/** 班组编码 */
|
||||
@Excel(name = "班组编码")
|
||||
private String classNo;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierNo;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setInType(String inType)
|
||||
{
|
||||
this.inType = inType;
|
||||
}
|
||||
|
||||
public String getInType()
|
||||
{
|
||||
return inType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateManId(String createManId)
|
||||
{
|
||||
this.createManId = createManId;
|
||||
}
|
||||
|
||||
public String getCreateManId()
|
||||
{
|
||||
return createManId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setErpBill(String erpBill)
|
||||
{
|
||||
this.erpBill = erpBill;
|
||||
}
|
||||
|
||||
public String getErpBill()
|
||||
{
|
||||
return erpBill;
|
||||
}
|
||||
|
||||
public void setStockSource(String stockSource)
|
||||
{
|
||||
this.stockSource = stockSource;
|
||||
}
|
||||
|
||||
public String getStockSource()
|
||||
{
|
||||
return stockSource;
|
||||
}
|
||||
|
||||
public void setDepartmentNo(String departmentNo)
|
||||
{
|
||||
this.departmentNo = departmentNo;
|
||||
}
|
||||
|
||||
public String getDepartmentNo()
|
||||
{
|
||||
return departmentNo;
|
||||
}
|
||||
|
||||
public void setCustomerNo(String customerNo)
|
||||
{
|
||||
this.customerNo = customerNo;
|
||||
}
|
||||
|
||||
public String getCustomerNo()
|
||||
{
|
||||
return customerNo;
|
||||
}
|
||||
|
||||
public void setClassNo(String classNo)
|
||||
{
|
||||
this.classNo = classNo;
|
||||
}
|
||||
|
||||
public String getClassNo()
|
||||
{
|
||||
return classNo;
|
||||
}
|
||||
|
||||
public void setSupplierNo(String supplierNo)
|
||||
{
|
||||
this.supplierNo = supplierNo;
|
||||
}
|
||||
|
||||
public String getSupplierNo()
|
||||
{
|
||||
return supplierNo;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("inType", getInType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("erpBill", getErpBill())
|
||||
.append("stockSource", getStockSource())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("classNo", getClassNo())
|
||||
.append("supplierNo", getSupplierNo())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare5", getSpare5())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockin.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
|
||||
/**
|
||||
* 入库单据Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface InStockinMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库单据
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 入库单据
|
||||
*/
|
||||
public InStockin selectInStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 入库单据集合
|
||||
*/
|
||||
public List<InStockin> selectInStockinList(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 新增入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockin(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 修改入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockin(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 删除入库单据
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinByStockinGuids(String[] stockinGuids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockin.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
|
||||
/**
|
||||
* 入库单据Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IInStockinService
|
||||
{
|
||||
/**
|
||||
* 查询入库单据
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 入库单据
|
||||
*/
|
||||
public InStockin selectInStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 入库单据集合
|
||||
*/
|
||||
public List<InStockin> selectInStockinList(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 新增入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockin(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 修改入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockin(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinByStockinGuids(String[] stockinGuids);
|
||||
|
||||
/**
|
||||
* 删除入库单据信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinByStockinGuid(String stockinGuid);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.in.stockin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.in.stockin.mapper.InStockinMapper;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
|
||||
/**
|
||||
* 入库单据Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class InStockinServiceImpl implements IInStockinService
|
||||
{
|
||||
@Autowired
|
||||
private InStockinMapper inStockinMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单据
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 入库单据
|
||||
*/
|
||||
@Override
|
||||
public InStockin selectInStockinByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return inStockinMapper.selectInStockinByStockinGuid(stockinGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 入库单据
|
||||
*/
|
||||
@Override
|
||||
public List<InStockin> selectInStockinList(InStockin inStockin)
|
||||
{
|
||||
return inStockinMapper.selectInStockinList(inStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInStockin(InStockin inStockin)
|
||||
{
|
||||
return inStockinMapper.insertInStockin(inStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据
|
||||
*
|
||||
* @param inStockin 入库单据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInStockin(InStockin inStockin)
|
||||
{
|
||||
return inStockinMapper.updateInStockin(inStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinByStockinGuids(String[] stockinGuids)
|
||||
{
|
||||
return inStockinMapper.deleteInStockinByStockinGuids(stockinGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return inStockinMapper.deleteInStockinByStockinGuid(stockinGuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.in.stockindetail.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.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库单据子表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/in/stockInDetail")
|
||||
public class InStockinDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
|
||||
/**
|
||||
* 查询入库单据子表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InStockinDetail inStockinDetail)
|
||||
{
|
||||
startPage();
|
||||
List<InStockinDetail> list = inStockinDetailService.selectInStockinDetailList(inStockinDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库单据子表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:export')")
|
||||
@Log(title = "入库单据子表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InStockinDetail inStockinDetail)
|
||||
{
|
||||
List<InStockinDetail> list = inStockinDetailService.selectInStockinDetailList(inStockinDetail);
|
||||
ExcelUtil<InStockinDetail> util = new ExcelUtil<InStockinDetail>(InStockinDetail.class);
|
||||
util.exportExcel(response, list, "入库单据子表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据子表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:query')")
|
||||
@GetMapping(value = "/{stockinDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinDetailId") String stockinDetailId)
|
||||
{
|
||||
return success(inStockinDetailService.selectInStockinDetailByStockinDetailId(stockinDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:add')")
|
||||
@Log(title = "入库单据子表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockinDetail inStockinDetail)
|
||||
{
|
||||
return toAjax(inStockinDetailService.insertInStockinDetail(inStockinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:edit')")
|
||||
@Log(title = "入库单据子表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockinDetail inStockinDetail)
|
||||
{
|
||||
return toAjax(inStockinDetailService.updateInStockinDetail(inStockinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockInDetail:remove')")
|
||||
@Log(title = "入库单据子表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinDetailIds)
|
||||
{
|
||||
return toAjax(inStockinDetailService.deleteInStockinDetailByStockinDetailIds(stockinDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
package com.ruoyi.in.stockindetail.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;
|
||||
|
||||
/**
|
||||
* 入库单据子表对象 in_stockin_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class InStockinDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子单ID */
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 主单GUID */
|
||||
@Excel(name = "主单GUID")
|
||||
private String stockinGuid;
|
||||
|
||||
/** 主单ID */
|
||||
@Excel(name = "主单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private String productGuid;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private String quantity;
|
||||
|
||||
/** 计划数量(箱) */
|
||||
@Excel(name = "计划数量(箱)")
|
||||
private String quantityX;
|
||||
|
||||
/** 计划数量(件) */
|
||||
@Excel(name = "计划数量(件)")
|
||||
private String quantityJ;
|
||||
|
||||
/** 参考单价 */
|
||||
@Excel(name = "参考单价")
|
||||
private String price;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String cargoNo;
|
||||
|
||||
/** 实际数量 */
|
||||
@Excel(name = "实际数量")
|
||||
private String assignNum;
|
||||
|
||||
/** 实际数量(箱) */
|
||||
@Excel(name = "实际数量(箱)")
|
||||
private String assignNumX;
|
||||
|
||||
/** 实际数量(件) */
|
||||
@Excel(name = "实际数量(件)")
|
||||
private String assignNumJ;
|
||||
|
||||
/** 入库日期 */
|
||||
@Excel(name = "入库日期")
|
||||
private String printDate;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String stockStatus;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierId;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
private String customerId;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String spec;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
/** 备用字段6 */
|
||||
@Excel(name = "备用字段6")
|
||||
private String spare6;
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getStockinDetailId()
|
||||
{
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantityX(String quantityX)
|
||||
{
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public String getQuantityX()
|
||||
{
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(String quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public String getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setAssignNum(String assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public String getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(String assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public String getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(String assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public String getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinDetailId", getStockinDetailId())
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("remark", getRemark())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("stockStatus", getStockStatus())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockindetail.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
|
||||
/**
|
||||
* 入库单据子表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface InStockinDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库单据子表
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 入库单据子表
|
||||
*/
|
||||
public InStockinDetail selectInStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询入库单据子表列表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 入库单据子表集合
|
||||
*/
|
||||
public List<InStockinDetail> selectInStockinDetailList(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 新增入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinDetail(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 修改入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinDetail(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 删除入库单据子表
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子表
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailByStockinDetailIds(String[] stockinDetailIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockindetail.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
|
||||
/**
|
||||
* 入库单据子表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IInStockinDetailService
|
||||
{
|
||||
/**
|
||||
* 查询入库单据子表
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 入库单据子表
|
||||
*/
|
||||
public InStockinDetail selectInStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询入库单据子表列表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 入库单据子表集合
|
||||
*/
|
||||
public List<InStockinDetail> selectInStockinDetailList(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 新增入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinDetail(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 修改入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinDetail(InStockinDetail inStockinDetail);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子表
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的入库单据子表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailByStockinDetailIds(String[] stockinDetailIds);
|
||||
|
||||
/**
|
||||
* 删除入库单据子表信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.in.stockindetail.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.in.stockindetail.mapper.InStockinDetailMapper;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
|
||||
/**
|
||||
* 入库单据子表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class InStockinDetailServiceImpl implements IInStockinDetailService
|
||||
{
|
||||
@Autowired
|
||||
private InStockinDetailMapper inStockinDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单据子表
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 入库单据子表
|
||||
*/
|
||||
@Override
|
||||
public InStockinDetail selectInStockinDetailByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return inStockinDetailMapper.selectInStockinDetailByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据子表列表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 入库单据子表
|
||||
*/
|
||||
@Override
|
||||
public List<InStockinDetail> selectInStockinDetailList(InStockinDetail inStockinDetail)
|
||||
{
|
||||
return inStockinDetailMapper.selectInStockinDetailList(inStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInStockinDetail(InStockinDetail inStockinDetail)
|
||||
{
|
||||
return inStockinDetailMapper.insertInStockinDetail(inStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据子表
|
||||
*
|
||||
* @param inStockinDetail 入库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInStockinDetail(InStockinDetail inStockinDetail)
|
||||
{
|
||||
return inStockinDetailMapper.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子表
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的入库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinDetailByStockinDetailIds(String[] stockinDetailIds)
|
||||
{
|
||||
return inStockinDetailMapper.deleteInStockinDetailByStockinDetailIds(stockinDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据子表信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinDetailByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return inStockinDetailMapper.deleteInStockinDetailByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<?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.in.stockindetail.mapper.InStockinDetailMapper">
|
||||
|
||||
<resultMap type="InStockinDetail" id="InStockinDetailResult">
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinGuid" column="stockin_guid" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinDetailVo">
|
||||
select stockin_detail_id, stockin_guid, stockin_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j, print_date, stock_status, supplier_id, customer_id, unit, spec, spare1, spare2, spare3, spare4, spare5, spare6 from in_stockin_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinDetailList" parameterType="InStockinDetail" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
<where>
|
||||
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid = #{stockinGuid}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinDetailByStockinDetailId" parameterType="String" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinDetail" parameterType="InStockinDetail">
|
||||
insert into in_stockin_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''">#{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockinDetail" parameterType="InStockinDetail">
|
||||
update in_stockin_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="lotNo != null and lotNo != ''">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</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>
|
||||
</trim>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinDetailByStockinDetailId" parameterType="String">
|
||||
delete from in_stockin_detail where stockin_detail_id = #{stockinDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinDetailByStockinDetailIds" parameterType="String">
|
||||
delete from in_stockin_detail where stockin_detail_id in
|
||||
<foreach item="stockinDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockinDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
143
ruoyi-admin/src/main/resources/mapper/in/InStockinMapper.xml
Normal file
143
ruoyi-admin/src/main/resources/mapper/in/InStockinMapper.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?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.in.stockin.mapper.InStockinMapper">
|
||||
|
||||
<resultMap type="InStockin" id="InStockinResult">
|
||||
<result property="stockinGuid" column="stockin_guid" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="classNo" column="class_no" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare5" column="spare5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinVo">
|
||||
select stockin_guid, stockin_id, in_type, create_date, create_man_id, status, warehouse_id, finish_date, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no, spare1, spare2, spare4, spare3, spare5 from in_stockin
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinList" parameterType="InStockin" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinVo"/>
|
||||
<where>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinByStockinGuid" parameterType="String" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinVo"/>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockin" parameterType="InStockin">
|
||||
insert into in_stockin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">stockin_guid,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="inType != null and inType != ''">in_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="stockSource != null">stock_source,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="classNo != null">class_no,</if>
|
||||
<if test="supplierNo != null">supplier_no,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">#{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="inType != null and inType != ''">#{inType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="stockSource != null">#{stockSource},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="classNo != null">#{classNo},</if>
|
||||
<if test="supplierNo != null">#{supplierNo},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockin" parameterType="InStockin">
|
||||
update in_stockin
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="inType != null and inType != ''">in_type = #{inType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="stockSource != null">stock_source = #{stockSource},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="classNo != null">class_no = #{classNo},</if>
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
</trim>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinByStockinGuid" parameterType="String">
|
||||
delete from in_stockin where stockin_guid = #{stockinGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinByStockinGuids" parameterType="String">
|
||||
delete from in_stockin where stockin_guid in
|
||||
<foreach item="stockinGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockinGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user