出库部分
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
# API目录说明
|
||||
|
||||
## 目录用途
|
||||
存放API相关配置文件和接口模块
|
||||
|
||||
## 主要功能
|
||||
- 提供系统对外的API接口定义
|
||||
- 存放API相关的配置文件
|
||||
- 管理接口的版本控制
|
||||
- 处理API的认证和授权
|
||||
|
||||
## 目录结构
|
||||
```
|
||||
api/
|
||||
├── config/ # API配置文件
|
||||
├── controller/ # API控制器
|
||||
├── model/ # API数据模型
|
||||
└── service/ # API业务逻辑
|
||||
```
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.ruoyi.out.outStockout.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
|
||||
import com.ruoyi.out.outStockoutFinish.service.IOutStockoutFinishService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库主单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockout")
|
||||
public class OutStockoutController extends BaseController {
|
||||
@Autowired
|
||||
private IOutStockoutService outStockoutService;
|
||||
@Autowired
|
||||
private IOutStockoutFinishService outStockoutFinishService;
|
||||
|
||||
/**
|
||||
* 查询出库主单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockout outStockout) {
|
||||
startPage();
|
||||
List<OutStockout> list = new ArrayList<>();
|
||||
if(Integer.parseInt(outStockout.getStatus())<4){
|
||||
list =outStockoutService.selectOutStockoutList(outStockout);
|
||||
}else{
|
||||
list=outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库主单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:export')")
|
||||
@Log(title = "出库主单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockout outStockout) {
|
||||
List<OutStockout> list = outStockoutService.selectOutStockoutList(outStockout);
|
||||
ExcelUtil<OutStockout> util = new ExcelUtil<OutStockout>(OutStockout.class);
|
||||
util.exportExcel(response, list, "出库主单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库主单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:query')")
|
||||
@GetMapping(value = "/{stockoutGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid) {
|
||||
return success(outStockoutService.selectOutStockoutByStockoutGuid(stockoutGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库主单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:add')")
|
||||
@Log(title = "出库主单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockout outStockout) {
|
||||
return toAjax(outStockoutService.insertOutStockout(outStockout));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库主单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:edit')")
|
||||
@Log(title = "出库主单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockout outStockout) {
|
||||
return toAjax(outStockoutService.updateOutStockout(outStockout));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库主单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockout:remove')")
|
||||
@Log(title = "出库主单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutGuids) {
|
||||
return toAjax(outStockoutService.deleteOutStockoutByStockoutGuids(stockoutGuids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库单据保存
|
||||
*
|
||||
* @param outStockoutVo
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "出库主单保存", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/saveBill")
|
||||
@ResponseBody
|
||||
public AjaxResult saveBill(@RequestBody OutStockoutVo outStockoutVo) {
|
||||
String stockOutId = outStockoutService.saveBill(outStockoutVo);
|
||||
return AjaxResult.success(stockOutId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库单据状态改变
|
||||
*/
|
||||
@Log(title = "出库主单状态改变", businessType = BusinessType.OTHER)
|
||||
@RequestMapping("/changeStatus")
|
||||
@ResponseBody
|
||||
public String changeStatus(@RequestParam("stockoutIds") String[] stockoutIds, @RequestParam("status") String status,@RequestParam("newStatus")String newStatus) {
|
||||
String s = outStockoutService.updateOutStockoutStatus(stockoutIds, status, newStatus);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,271 @@
|
||||
package com.ruoyi.out.outStockout.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;
|
||||
|
||||
/**
|
||||
* 出库主单对象 out_stockout
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class OutStockout extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库单guid */
|
||||
@Excel(name = "出库单guid")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** 出库单编号 */
|
||||
@Excel(name = "出库单编号")
|
||||
private String stockoutId;
|
||||
|
||||
/** 出库类型 */
|
||||
@Excel(name = "出库类型")
|
||||
private String outType;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private String createDate;
|
||||
|
||||
/** 部门编号 */
|
||||
@Excel(name = "部门编号")
|
||||
private String departmentNo;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
private String customerNo;
|
||||
|
||||
/** 建单人 */
|
||||
@Excel(name = "建单人")
|
||||
private String createManId;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 单据来源 */
|
||||
@Excel(name = "单据来源")
|
||||
private String stockoutSource;
|
||||
|
||||
/** 仓库编号 */
|
||||
@Excel(name = "仓库编号")
|
||||
private String warehouseId;
|
||||
|
||||
/** 班组编码 */
|
||||
@Excel(name = "班组编码")
|
||||
private String classNowId;
|
||||
|
||||
/** 出口 */
|
||||
@Excel(name = "出口")
|
||||
private String exitId;
|
||||
|
||||
/** 车牌 */
|
||||
@Excel(name = "车牌")
|
||||
private String carNumber;
|
||||
|
||||
/** 外部订单号 */
|
||||
@Excel(name = "外部订单号")
|
||||
private String FID;
|
||||
|
||||
/** erp订单号 */
|
||||
@Excel(name = "erp订单号")
|
||||
private String erpStockoutId;
|
||||
|
||||
@Excel(name = "开始时间")
|
||||
private String startDate;
|
||||
|
||||
@Excel(name = "确认时间")
|
||||
private String finishDate;
|
||||
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getFinishDate() {
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate) {
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setOutType(String outType)
|
||||
{
|
||||
this.outType = outType;
|
||||
}
|
||||
|
||||
public String getOutType()
|
||||
{
|
||||
return outType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
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 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 setStockoutSource(String stockoutSource)
|
||||
{
|
||||
this.stockoutSource = stockoutSource;
|
||||
}
|
||||
|
||||
public String getStockoutSource()
|
||||
{
|
||||
return stockoutSource;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setClassNowId(String classNowId)
|
||||
{
|
||||
this.classNowId = classNowId;
|
||||
}
|
||||
|
||||
public String getClassNowId()
|
||||
{
|
||||
return classNowId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber)
|
||||
{
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCarNumber()
|
||||
{
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setFID(String FID)
|
||||
{
|
||||
this.FID = FID;
|
||||
}
|
||||
|
||||
public String getFID()
|
||||
{
|
||||
return FID;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("outType", getOutType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("stockoutSource", getStockoutSource())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("classNowId", getClassNowId())
|
||||
.append("exitId", getExitId())
|
||||
.append("carNumber", getCarNumber())
|
||||
.append("FID", getFID())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.out.outStockout.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OutStockoutVo {
|
||||
|
||||
private OutStockout outStockout;
|
||||
|
||||
private List<OutStockoutDetail> detailList;
|
||||
|
||||
|
||||
public OutStockout getOutStockout() {
|
||||
return outStockout;
|
||||
}
|
||||
|
||||
public void setOutStockout(OutStockout outStockout) {
|
||||
this.outStockout = outStockout;
|
||||
}
|
||||
|
||||
public List<OutStockoutDetail> getDetailList() {
|
||||
return detailList;
|
||||
}
|
||||
|
||||
public void setDetailList(List<OutStockoutDetail> detailList) {
|
||||
this.detailList = detailList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.out.outStockout.mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
|
||||
/**
|
||||
* 出库主单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface OutStockoutMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库主单
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 出库主单
|
||||
*/
|
||||
public OutStockout selectOutStockoutByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 查询出库主单列表
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 出库主单集合
|
||||
*/
|
||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 新增出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockout(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 修改出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockout(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 删除出库主单
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 批量删除出库主单
|
||||
*
|
||||
* @param stockoutGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutByStockoutGuids(String[] stockoutGuids);
|
||||
|
||||
public void updateOutStockoutStatus(HashMap<String,String> map);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.out.outStockout.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
|
||||
/**
|
||||
* 出库主单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IOutStockoutService
|
||||
{
|
||||
/**
|
||||
* 查询出库主单
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 出库主单
|
||||
*/
|
||||
public OutStockout selectOutStockoutByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 查询出库主单列表
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 出库主单集合
|
||||
*/
|
||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 新增出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockout(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 修改出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockout(OutStockout outStockout);
|
||||
|
||||
/**
|
||||
* 批量删除出库主单
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库主单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutByStockoutGuids(String[] stockoutGuids);
|
||||
|
||||
/**
|
||||
* 删除出库主单信息
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutByStockoutGuid(String stockoutGuid);
|
||||
/**
|
||||
* 保存单据
|
||||
*/
|
||||
public String saveBill(OutStockoutVo outStockoutVo);
|
||||
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status,String newStatus);
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.ruoyi.out.outStockout.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockout.mapper.OutStockoutMapper;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 出库主单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutMapper outStockoutMapper;
|
||||
@Autowired
|
||||
private IBasJobIdService basJobIdService;
|
||||
|
||||
@Autowired
|
||||
private OutStockoutDetailMapper outStockoutDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询出库主单
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 出库主单
|
||||
*/
|
||||
@Override
|
||||
public OutStockout selectOutStockoutByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutMapper.selectOutStockoutByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库主单列表
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 出库主单
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockout> selectOutStockoutList(OutStockout outStockout)
|
||||
{
|
||||
return outStockoutMapper.selectOutStockoutList(outStockout);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockout(OutStockout outStockout)
|
||||
{
|
||||
return outStockoutMapper.insertOutStockout(outStockout);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库主单
|
||||
*
|
||||
* @param outStockout 出库主单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockout(OutStockout outStockout)
|
||||
{
|
||||
return outStockoutMapper.updateOutStockout(outStockout);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库主单
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库主单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutByStockoutGuids(String[] stockoutGuids)
|
||||
{
|
||||
return outStockoutMapper.deleteOutStockoutByStockoutGuids(stockoutGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库主单信息
|
||||
*
|
||||
* @param stockoutGuid 出库主单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutMapper.deleteOutStockoutByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String saveBill(OutStockoutVo outStockoutVo) {
|
||||
OutStockout outStockout = outStockoutVo.getOutStockout();
|
||||
List<OutStockoutDetail> detailList = outStockoutVo.getDetailList();
|
||||
String stockOutId = basJobIdService.getJobId("CKD");
|
||||
outStockout.setStockoutId(stockOutId);
|
||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||
outStockoutDetail.setStockoutGuid(outStockout.getStockoutGuid());
|
||||
outStockoutDetail.setStockoutId(stockOutId);
|
||||
outStockoutDetail.setAllotQuantity(BigDecimal.ZERO);
|
||||
outStockoutDetail.setAssignNum(BigDecimal.ZERO);
|
||||
outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
outStockoutMapper.insertOutStockout(outStockout);
|
||||
|
||||
return stockOutId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for(String stockoutId:stockoutIds){
|
||||
map.put("outStockId",stockoutId);
|
||||
map.put("status",status);
|
||||
map.put("newStatus",newStatus);
|
||||
outStockoutMapper.updateOutStockoutStatus(map);
|
||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.ruoyi.out.outStockoutDetail.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.out.outStockoutDetailFinish.service.IOutStockoutDetailFinishService;
|
||||
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.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库子单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockoutDetail")
|
||||
public class OutStockoutDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockoutDetailService outStockoutDetailService;
|
||||
@Autowired
|
||||
IOutStockoutDetailFinishService outStockoutDetailFinishService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询出库子单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutDetail> list = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库子单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:export')")
|
||||
@Log(title = "出库子单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
List<OutStockoutDetail> list = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail);
|
||||
ExcelUtil<OutStockoutDetail> util = new ExcelUtil<OutStockoutDetail>(OutStockoutDetail.class);
|
||||
util.exportExcel(response, list, "出库子单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库子单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:query')")
|
||||
@GetMapping(value = "/getStockoutByDetailId")
|
||||
public AjaxResult getInfo(String stockoutDetailId)
|
||||
{
|
||||
return success(outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(stockoutDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:add')")
|
||||
@Log(title = "出库子单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
return toAjax(outStockoutDetailService.insertOutStockoutDetail(outStockoutDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:edit')")
|
||||
@Log(title = "出库子单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
return toAjax(outStockoutDetailService.updateOutStockoutDetail(outStockoutDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:remove')")
|
||||
@Log(title = "出库子单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutDetailIds)
|
||||
{
|
||||
return toAjax(outStockoutDetailService.deleteOutStockoutDetailByStockoutDetailIds(stockoutDetailIds));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetail:queryByGuid')")
|
||||
@GetMapping(value = "/getDetailByGuid")
|
||||
public TableDataInfo getStockoutInfo(String stockoutGuid,String status)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutDetail> outStockoutDetails=new ArrayList<>();
|
||||
if(Integer.parseInt(status)<4){
|
||||
outStockoutDetails = outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(stockoutGuid);
|
||||
}else{
|
||||
outStockoutDetails=outStockoutDetailFinishService.selectOutStockoutDetailFinishListByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
return getDataTable(outStockoutDetails);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,476 @@
|
||||
package com.ruoyi.out.outStockoutDetail.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 出库子单对象 out_stockout_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class OutStockoutDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库子单编号 */
|
||||
@Excel(name = "出库子单编号")
|
||||
private String stockoutDetailId;
|
||||
|
||||
/** 出库单guid */
|
||||
@Excel(name = "出库单guid")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** 出库单编号 */
|
||||
@Excel(name = "出库单编号")
|
||||
private String stockoutId;
|
||||
|
||||
/** 批次 */
|
||||
@Excel(name = "批次")
|
||||
private String lotNo;
|
||||
|
||||
/** 物资guid */
|
||||
@Excel(name = "物资guid")
|
||||
private String productGuid;
|
||||
|
||||
/** 物资编码 */
|
||||
@Excel(name = "物资编码")
|
||||
private String productId;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 计划数量(箱) */
|
||||
@Excel(name = "计划数量", readConverterExp = "箱=")
|
||||
private BigDecimal quantityX;
|
||||
|
||||
/** 计划数量(件) */
|
||||
@Excel(name = "计划数量", readConverterExp = "件=")
|
||||
private BigDecimal quantityJ;
|
||||
|
||||
/** 实际数量 */
|
||||
@Excel(name = "实际数量")
|
||||
private BigDecimal assignNum;
|
||||
|
||||
/** 实际数量(箱) */
|
||||
@Excel(name = "实际数量", readConverterExp = "箱=")
|
||||
private BigDecimal assignNumX;
|
||||
|
||||
/** 实际数量(件) */
|
||||
@Excel(name = "实际数量", readConverterExp = "件=")
|
||||
private BigDecimal assignNumJ;
|
||||
|
||||
/** 分配数量 */
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allotQuantity;
|
||||
|
||||
/** 分配数量(箱) */
|
||||
@Excel(name = "分配数量", readConverterExp = "箱=")
|
||||
private BigDecimal allotQuantityX;
|
||||
|
||||
/** 分配数量(件) */
|
||||
@Excel(name = "分配数量", readConverterExp = "件=")
|
||||
private BigDecimal allotQuantityJ;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private String price;
|
||||
|
||||
/** 仓库编码 */
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseId;
|
||||
|
||||
/** 出口 */
|
||||
@Excel(name = "出口")
|
||||
private String outId;
|
||||
|
||||
/** 可拆数量 */
|
||||
@Excel(name = "可拆数量")
|
||||
private String bukechaiQuantity;
|
||||
|
||||
/** 不可拆数量 */
|
||||
@Excel(name = "不可拆数量")
|
||||
private String kechaiQuantity;
|
||||
|
||||
/** 入口 */
|
||||
@Excel(name = "入口")
|
||||
private String entryid;
|
||||
|
||||
/** 浮动数量 */
|
||||
@Excel(name = "浮动数量")
|
||||
private String flatQuantity;
|
||||
|
||||
/** 外部订单号 */
|
||||
@Excel(name = "外部订单号")
|
||||
private String fid;
|
||||
|
||||
/** erp订单号 */
|
||||
@Excel(name = "erp订单号")
|
||||
private String erpStockoutId;
|
||||
|
||||
/** 单位 UNIT */
|
||||
@Excel(name = "单位 UNIT")
|
||||
private String unit;
|
||||
|
||||
/** 规格 SPEC */
|
||||
@Excel(name = "规格 SPEC")
|
||||
private String spec;
|
||||
|
||||
/** 物资名称 ASMAT_NAME */
|
||||
@Excel(name = "物资名称 ASMAT_NAME")
|
||||
private String productName;
|
||||
|
||||
/** 供应商代码 SUPPLIER_CODE */
|
||||
@Excel(name = "供应商代码 SUPPLIER_CODE")
|
||||
private String supplierId;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String cargoNo;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
public void setStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
this.stockoutDetailId = stockoutDetailId;
|
||||
}
|
||||
|
||||
public String getStockoutDetailId()
|
||||
{
|
||||
return stockoutDetailId;
|
||||
}
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
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(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantityX(BigDecimal quantityX)
|
||||
{
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityX()
|
||||
{
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(BigDecimal quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setAssignNum(BigDecimal assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(BigDecimal assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(BigDecimal assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setAllotQuantity(BigDecimal allotQuantity)
|
||||
{
|
||||
this.allotQuantity = allotQuantity;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantity()
|
||||
{
|
||||
return allotQuantity;
|
||||
}
|
||||
|
||||
public void setAllotQuantityX(BigDecimal allotQuantityX)
|
||||
{
|
||||
this.allotQuantityX = allotQuantityX;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityX()
|
||||
{
|
||||
return allotQuantityX;
|
||||
}
|
||||
|
||||
public void setAllotQuantityJ(BigDecimal allotQuantityJ)
|
||||
{
|
||||
this.allotQuantityJ = allotQuantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityJ()
|
||||
{
|
||||
return allotQuantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setOutId(String outId)
|
||||
{
|
||||
this.outId = outId;
|
||||
}
|
||||
|
||||
public String getOutId()
|
||||
{
|
||||
return outId;
|
||||
}
|
||||
|
||||
public void setBukechaiQuantity(String bukechaiQuantity)
|
||||
{
|
||||
this.bukechaiQuantity = bukechaiQuantity;
|
||||
}
|
||||
|
||||
public String getBukechaiQuantity()
|
||||
{
|
||||
return bukechaiQuantity;
|
||||
}
|
||||
|
||||
public void setKechaiQuantity(String kechaiQuantity)
|
||||
{
|
||||
this.kechaiQuantity = kechaiQuantity;
|
||||
}
|
||||
|
||||
public String getKechaiQuantity()
|
||||
{
|
||||
return kechaiQuantity;
|
||||
}
|
||||
|
||||
public void setEntryid(String entryid)
|
||||
{
|
||||
this.entryid = entryid;
|
||||
}
|
||||
|
||||
public String getEntryid()
|
||||
{
|
||||
return entryid;
|
||||
}
|
||||
|
||||
public void setFlatQuantity(String flatQuantity)
|
||||
{
|
||||
this.flatQuantity = flatQuantity;
|
||||
}
|
||||
|
||||
public String getFlatQuantity()
|
||||
{
|
||||
return flatQuantity;
|
||||
}
|
||||
|
||||
public void setFid(String fid)
|
||||
{
|
||||
this.fid = fid;
|
||||
}
|
||||
|
||||
public String getFid()
|
||||
{
|
||||
return fid;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
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 setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
@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("productName", getProductName())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("printDate", getPrintDate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.out.outStockoutDetail.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
|
||||
/**
|
||||
* 出库子单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface OutStockoutDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库子单
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 出库子单
|
||||
*/
|
||||
public OutStockoutDetail selectOutStockoutDetailByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询出库子单列表
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 出库子单集合
|
||||
*/
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailList(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 新增出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 修改出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetail(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 删除出库子单
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除出库子单
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
/**
|
||||
* 根据主单guid查询出库子单信息
|
||||
* @param stockoutId
|
||||
* @return
|
||||
*/
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailByStockoutGuid(String stockoutId);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.out.outStockoutDetail.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
|
||||
/**
|
||||
* 出库子单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IOutStockoutDetailService
|
||||
{
|
||||
/**
|
||||
* 查询出库子单
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 出库子单
|
||||
*/
|
||||
public OutStockoutDetail selectOutStockoutDetailByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询出库子单列表
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 出库子单集合
|
||||
*/
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailList(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 新增出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 修改出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetail(OutStockoutDetail outStockoutDetail);
|
||||
|
||||
/**
|
||||
* 批量删除出库子单
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的出库子单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
/**
|
||||
* 删除出库子单信息
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailByStockoutDetailId(String stockoutDetailId);
|
||||
/**
|
||||
* 根据主单guid查询出库子单信息
|
||||
*/
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailByStockoutGuid(String stockoutGuid);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.ruoyi.out.outStockoutDetail.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
|
||||
/**
|
||||
* 出库子单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutDetailServiceImpl implements IOutStockoutDetailService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutDetailMapper outStockoutDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询出库子单
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 出库子单
|
||||
*/
|
||||
@Override
|
||||
public OutStockoutDetail selectOutStockoutDetailByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailMapper.selectOutStockoutDetailByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库子单列表
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 出库子单
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailList(OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
return outStockoutDetailMapper.selectOutStockoutDetailList(outStockoutDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
outStockoutDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库子单
|
||||
*
|
||||
* @param outStockoutDetail 出库子单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockoutDetail(OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
return outStockoutDetailMapper.updateOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库子单
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的出库子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailByStockoutDetailIds(String[] stockoutDetailIds)
|
||||
{
|
||||
return outStockoutDetailMapper.deleteOutStockoutDetailByStockoutDetailIds(stockoutDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库子单信息
|
||||
*
|
||||
* @param stockoutDetailId 出库子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailMapper.deleteOutStockoutDetailByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主单guid查询出库子单信息
|
||||
* @param stockoutGuid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailByStockoutGuid(String stockoutGuid) {
|
||||
return outStockoutDetailMapper.selectOutStockoutDetailByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.outStockoutDetailFinish.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.out.outStockoutDetailFinish.domain.OutStockoutDetailFinish;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.service.IOutStockoutDetailFinishService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库单据子表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockoutDetailFinish")
|
||||
public class OutStockoutDetailFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockoutDetailFinishService outStockoutDetailFinishService;
|
||||
|
||||
/**
|
||||
* 查询出库单据子表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutDetailFinish> list = outStockoutDetailFinishService.selectOutStockoutDetailFinishList(outStockoutDetailFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库单据子表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:export')")
|
||||
@Log(title = "出库单据子表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
List<OutStockoutDetailFinish> list = outStockoutDetailFinishService.selectOutStockoutDetailFinishList(outStockoutDetailFinish);
|
||||
ExcelUtil<OutStockoutDetailFinish> util = new ExcelUtil<OutStockoutDetailFinish>(OutStockoutDetailFinish.class);
|
||||
util.exportExcel(response, list, "出库单据子表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单据子表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:query')")
|
||||
@GetMapping(value = "/{stockoutDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutDetailId") String stockoutDetailId)
|
||||
{
|
||||
return success(outStockoutDetailFinishService.selectOutStockoutDetailFinishByStockoutDetailId(stockoutDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:add')")
|
||||
@Log(title = "出库单据子表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
return toAjax(outStockoutDetailFinishService.insertOutStockoutDetailFinish(outStockoutDetailFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:edit')")
|
||||
@Log(title = "出库单据子表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
return toAjax(outStockoutDetailFinishService.updateOutStockoutDetailFinish(outStockoutDetailFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据子表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailFinish:remove')")
|
||||
@Log(title = "出库单据子表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutDetailIds)
|
||||
{
|
||||
return toAjax(outStockoutDetailFinishService.deleteOutStockoutDetailFinishByStockoutDetailIds(stockoutDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,476 @@
|
||||
package com.ruoyi.out.outStockoutDetailFinish.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 出库单据子表对象 out_stockout_detail_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class OutStockoutDetailFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子单编码 */
|
||||
@Excel(name = "子单编码")
|
||||
private String stockoutDetailId;
|
||||
|
||||
/** 主单guid */
|
||||
@Excel(name = "主单guid")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** 出库单号 */
|
||||
@Excel(name = "出库单号")
|
||||
private String stockoutId;
|
||||
|
||||
/** 批次 */
|
||||
@Excel(name = "批次")
|
||||
private String lotNo;
|
||||
|
||||
/** 物资guid */
|
||||
@Excel(name = "物资guid")
|
||||
private String productGuid;
|
||||
|
||||
/** 物资编码 */
|
||||
@Excel(name = "物资编码")
|
||||
private String productId;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 计划数量(箱) */
|
||||
@Excel(name = "计划数量", readConverterExp = "箱=")
|
||||
private BigDecimal quantityX;
|
||||
|
||||
/** 计划数量(件) */
|
||||
@Excel(name = "计划数量", readConverterExp = "件=")
|
||||
private BigDecimal quantityJ;
|
||||
|
||||
/** 实际数量 */
|
||||
@Excel(name = "实际数量")
|
||||
private BigDecimal assignNum;
|
||||
|
||||
/** 实际数量(箱) */
|
||||
@Excel(name = "实际数量", readConverterExp = "箱=")
|
||||
private BigDecimal assignNumX;
|
||||
|
||||
/** 实际数量(件) */
|
||||
@Excel(name = "实际数量", readConverterExp = "件=")
|
||||
private BigDecimal assignNumJ;
|
||||
|
||||
/** 分配数量 */
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allotQuantity;
|
||||
|
||||
/** 分配数量(箱) */
|
||||
@Excel(name = "分配数量", readConverterExp = "箱=")
|
||||
private BigDecimal allotQuantityX;
|
||||
|
||||
/** 分配数量(件) */
|
||||
@Excel(name = "分配数量", readConverterExp = "件=")
|
||||
private BigDecimal allotQuantityJ;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private String price;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
/** 出口 */
|
||||
@Excel(name = "出口")
|
||||
private String outId;
|
||||
|
||||
/** 不可拆数量 */
|
||||
@Excel(name = "不可拆数量")
|
||||
private String bukechaiQuantity;
|
||||
|
||||
/** 可拆数量 */
|
||||
@Excel(name = "可拆数量")
|
||||
private String kechaiQuantity;
|
||||
|
||||
/** 入口 */
|
||||
@Excel(name = "入口")
|
||||
private String entryid;
|
||||
|
||||
/** 浮动数量 */
|
||||
@Excel(name = "浮动数量")
|
||||
private String flatQuantity;
|
||||
|
||||
/** 外部订单号 */
|
||||
@Excel(name = "外部订单号")
|
||||
private String fid;
|
||||
|
||||
/** erp订单号 */
|
||||
@Excel(name = "erp订单号")
|
||||
private String erpStockoutId;
|
||||
|
||||
/** 单位 UNIT */
|
||||
@Excel(name = "单位 UNIT")
|
||||
private String unit;
|
||||
|
||||
/** 规格 SPEC */
|
||||
@Excel(name = "规格 SPEC")
|
||||
private String spec;
|
||||
|
||||
/** 资材名称 ASMAT_NAME */
|
||||
@Excel(name = "资材名称 ASMAT_NAME")
|
||||
private String productName;
|
||||
|
||||
/** 供应商代码 SUPPLIER_CODE */
|
||||
@Excel(name = "供应商代码 SUPPLIER_CODE")
|
||||
private String supplierId;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String cargoNo;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
public void setStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
this.stockoutDetailId = stockoutDetailId;
|
||||
}
|
||||
|
||||
public String getStockoutDetailId()
|
||||
{
|
||||
return stockoutDetailId;
|
||||
}
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
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(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantityX(BigDecimal quantityX)
|
||||
{
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityX()
|
||||
{
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(BigDecimal quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setAssignNum(BigDecimal assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(BigDecimal assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(BigDecimal assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setAllotQuantity(BigDecimal allotQuantity)
|
||||
{
|
||||
this.allotQuantity = allotQuantity;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantity()
|
||||
{
|
||||
return allotQuantity;
|
||||
}
|
||||
|
||||
public void setAllotQuantityX(BigDecimal allotQuantityX)
|
||||
{
|
||||
this.allotQuantityX = allotQuantityX;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityX()
|
||||
{
|
||||
return allotQuantityX;
|
||||
}
|
||||
|
||||
public void setAllotQuantityJ(BigDecimal allotQuantityJ)
|
||||
{
|
||||
this.allotQuantityJ = allotQuantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityJ()
|
||||
{
|
||||
return allotQuantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setOutId(String outId)
|
||||
{
|
||||
this.outId = outId;
|
||||
}
|
||||
|
||||
public String getOutId()
|
||||
{
|
||||
return outId;
|
||||
}
|
||||
|
||||
public void setBukechaiQuantity(String bukechaiQuantity)
|
||||
{
|
||||
this.bukechaiQuantity = bukechaiQuantity;
|
||||
}
|
||||
|
||||
public String getBukechaiQuantity()
|
||||
{
|
||||
return bukechaiQuantity;
|
||||
}
|
||||
|
||||
public void setKechaiQuantity(String kechaiQuantity)
|
||||
{
|
||||
this.kechaiQuantity = kechaiQuantity;
|
||||
}
|
||||
|
||||
public String getKechaiQuantity()
|
||||
{
|
||||
return kechaiQuantity;
|
||||
}
|
||||
|
||||
public void setEntryid(String entryid)
|
||||
{
|
||||
this.entryid = entryid;
|
||||
}
|
||||
|
||||
public String getEntryid()
|
||||
{
|
||||
return entryid;
|
||||
}
|
||||
|
||||
public void setFlatQuantity(String flatQuantity)
|
||||
{
|
||||
this.flatQuantity = flatQuantity;
|
||||
}
|
||||
|
||||
public String getFlatQuantity()
|
||||
{
|
||||
return flatQuantity;
|
||||
}
|
||||
|
||||
public void setFid(String fid)
|
||||
{
|
||||
this.fid = fid;
|
||||
}
|
||||
|
||||
public String getFid()
|
||||
{
|
||||
return fid;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
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 setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
@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("productName", getProductName())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("printDate", getPrintDate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.out.outStockoutDetailFinish.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.domain.OutStockoutDetailFinish;
|
||||
|
||||
/**
|
||||
* 出库单据子表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface OutStockoutDetailFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库单据子表
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 出库单据子表
|
||||
*/
|
||||
public OutStockoutDetailFinish selectOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询出库单据子表列表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 出库单据子表集合
|
||||
*/
|
||||
public List<OutStockoutDetailFinish> selectOutStockoutDetailFinishList(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 新增出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 修改出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 删除出库单据子表
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据子表
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailFinishListByStockoutGuid(String stockoutGuid);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.out.outStockoutDetailFinish.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.domain.OutStockoutDetailFinish;
|
||||
|
||||
/**
|
||||
* 出库单据子表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IOutStockoutDetailFinishService
|
||||
{
|
||||
/**
|
||||
* 查询出库单据子表
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 出库单据子表
|
||||
*/
|
||||
public OutStockoutDetailFinish selectOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询出库单据子表列表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 出库单据子表集合
|
||||
*/
|
||||
public List<OutStockoutDetailFinish> selectOutStockoutDetailFinishList(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 新增出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 修改出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据子表
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的出库单据子表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
/**
|
||||
* 删除出库单据子表信息
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailFinishListByStockoutGuid(String stockoutGuid);
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.ruoyi.out.outStockoutDetailFinish.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.mapper.OutStockoutDetailFinishMapper;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.domain.OutStockoutDetailFinish;
|
||||
import com.ruoyi.out.outStockoutDetailFinish.service.IOutStockoutDetailFinishService;
|
||||
|
||||
/**
|
||||
* 出库单据子表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutDetailFinishServiceImpl implements IOutStockoutDetailFinishService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutDetailFinishMapper outStockoutDetailFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单据子表
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 出库单据子表
|
||||
*/
|
||||
@Override
|
||||
public OutStockoutDetailFinish selectOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailFinishMapper.selectOutStockoutDetailFinishByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库单据子表列表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 出库单据子表
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutDetailFinish> selectOutStockoutDetailFinishList(OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
return outStockoutDetailFinishMapper.selectOutStockoutDetailFinishList(outStockoutDetailFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
outStockoutDetailFinish.setCreateTime(DateUtils.getNowDate());
|
||||
return outStockoutDetailFinishMapper.insertOutStockoutDetailFinish(outStockoutDetailFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据子表
|
||||
*
|
||||
* @param outStockoutDetailFinish 出库单据子表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockoutDetailFinish(OutStockoutDetailFinish outStockoutDetailFinish)
|
||||
{
|
||||
return outStockoutDetailFinishMapper.updateOutStockoutDetailFinish(outStockoutDetailFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单据子表
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的出库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailIds(String[] stockoutDetailIds)
|
||||
{
|
||||
return outStockoutDetailFinishMapper.deleteOutStockoutDetailFinishByStockoutDetailIds(stockoutDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据子表信息
|
||||
*
|
||||
* @param stockoutDetailId 出库单据子表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailFinishByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailFinishMapper.deleteOutStockoutDetailFinishByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutStockoutDetail> selectOutStockoutDetailFinishListByStockoutGuid(String stockoutGuid) {
|
||||
return outStockoutDetailFinishMapper.selectOutStockoutDetailFinishListByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.outStockoutFinish.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.out.outStockoutFinish.domain.OutStockoutFinish;
|
||||
import com.ruoyi.out.outStockoutFinish.service.IOutStockoutFinishService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库单据完成表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockoutFinish")
|
||||
public class OutStockoutFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockoutFinishService outStockoutFinishService;
|
||||
|
||||
/**
|
||||
* 查询出库单据完成表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutFinish> list = outStockoutFinishService.selectOutStockoutFinishList(outStockoutFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库单据完成表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:export')")
|
||||
@Log(title = "出库单据完成表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
List<OutStockoutFinish> list = outStockoutFinishService.selectOutStockoutFinishList(outStockoutFinish);
|
||||
ExcelUtil<OutStockoutFinish> util = new ExcelUtil<OutStockoutFinish>(OutStockoutFinish.class);
|
||||
util.exportExcel(response, list, "出库单据完成表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单据完成表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:query')")
|
||||
@GetMapping(value = "/{stockoutGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid)
|
||||
{
|
||||
return success(outStockoutFinishService.selectOutStockoutFinishByStockoutGuid(stockoutGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据完成表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:add')")
|
||||
@Log(title = "出库单据完成表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
return toAjax(outStockoutFinishService.insertOutStockoutFinish(outStockoutFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据完成表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:edit')")
|
||||
@Log(title = "出库单据完成表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
return toAjax(outStockoutFinishService.updateOutStockoutFinish(outStockoutFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据完成表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutFinish:remove')")
|
||||
@Log(title = "出库单据完成表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutGuids)
|
||||
{
|
||||
return toAjax(outStockoutFinishService.deleteOutStockoutFinishByStockoutGuids(stockoutGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
package com.ruoyi.out.outStockoutFinish.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;
|
||||
|
||||
/**
|
||||
* 出库单据完成表对象 out_stockout_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class OutStockoutFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库单据guid */
|
||||
@Excel(name = "出库单据guid")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** 出库单编码 */
|
||||
@Excel(name = "出库单编码")
|
||||
private String stockoutId;
|
||||
|
||||
/** 出库类型 */
|
||||
@Excel(name = "出库类型")
|
||||
private String outType;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private String createDate;
|
||||
|
||||
/** 部门编号 */
|
||||
@Excel(name = "部门编号")
|
||||
private String departmentNo;
|
||||
|
||||
/** 客户编号 */
|
||||
@Excel(name = "客户编号")
|
||||
private String customerNo;
|
||||
|
||||
/** 建单人 */
|
||||
@Excel(name = "建单人")
|
||||
private String createManId;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 单据来源 */
|
||||
@Excel(name = "单据来源")
|
||||
private String stockoutSource;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
/** 班组 */
|
||||
@Excel(name = "班组")
|
||||
private String classNowId;
|
||||
|
||||
/** 出口 */
|
||||
@Excel(name = "出口")
|
||||
private String exitId;
|
||||
|
||||
/** 车牌 */
|
||||
@Excel(name = "车牌")
|
||||
private String carNumber;
|
||||
|
||||
/** 外部订单号 */
|
||||
@Excel(name = "外部订单号")
|
||||
private String FID;
|
||||
|
||||
/** erp订单号 */
|
||||
@Excel(name = "erp订单号")
|
||||
private String erpStockoutId;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startDate;
|
||||
|
||||
/** 完成时间 */
|
||||
@Excel(name = "完成时间")
|
||||
private String finishDate;
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setOutType(String outType)
|
||||
{
|
||||
this.outType = outType;
|
||||
}
|
||||
|
||||
public String getOutType()
|
||||
{
|
||||
return outType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
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 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 setStockoutSource(String stockoutSource)
|
||||
{
|
||||
this.stockoutSource = stockoutSource;
|
||||
}
|
||||
|
||||
public String getStockoutSource()
|
||||
{
|
||||
return stockoutSource;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setClassNowId(String classNowId)
|
||||
{
|
||||
this.classNowId = classNowId;
|
||||
}
|
||||
|
||||
public String getClassNowId()
|
||||
{
|
||||
return classNowId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber)
|
||||
{
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCarNumber()
|
||||
{
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setFID(String FID)
|
||||
{
|
||||
this.FID = FID;
|
||||
}
|
||||
|
||||
public String getFID()
|
||||
{
|
||||
return FID;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("outType", getOutType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("stockoutSource", getStockoutSource())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("classNowId", getClassNowId())
|
||||
.append("exitId", getExitId())
|
||||
.append("carNumber", getCarNumber())
|
||||
.append("FID", getFID())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.append("startDate", getStartDate())
|
||||
.append("finishDate", getFinishDate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.out.outStockoutFinish.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
|
||||
|
||||
/**
|
||||
* 出库单据完成表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface OutStockoutFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库单据完成表
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 出库单据完成表
|
||||
*/
|
||||
public OutStockoutFinish selectOutStockoutFinishByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 查询出库单据完成表列表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 出库单据完成表集合
|
||||
*/
|
||||
public List<OutStockoutFinish> selectOutStockoutFinishList(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 新增出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutFinish(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 修改出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutFinish(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 删除出库单据完成表
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutFinishByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据完成表
|
||||
*
|
||||
* @param stockoutGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutFinishByStockoutGuids(String[] stockoutGuids);
|
||||
|
||||
public List<OutStockout> selectOutStockoutFinishListByOutStockout(OutStockout outStockout);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.out.outStockoutFinish.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
|
||||
|
||||
/**
|
||||
* 出库单据完成表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IOutStockoutFinishService
|
||||
{
|
||||
/**
|
||||
* 查询出库单据完成表
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 出库单据完成表
|
||||
*/
|
||||
public OutStockoutFinish selectOutStockoutFinishByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 查询出库单据完成表列表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 出库单据完成表集合
|
||||
*/
|
||||
public List<OutStockoutFinish> selectOutStockoutFinishList(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 新增出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutFinish(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 修改出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutFinish(OutStockoutFinish outStockoutFinish);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据完成表
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库单据完成表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutFinishByStockoutGuids(String[] stockoutGuids);
|
||||
|
||||
/**
|
||||
* 删除出库单据完成表信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutFinishByStockoutGuid(String stockoutGuid);
|
||||
|
||||
public List<OutStockout> selectOutStockoutFinishListByOutStockout(OutStockout outStockout);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.out.outStockoutFinish.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockoutFinish.mapper.OutStockoutFinishMapper;
|
||||
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
|
||||
import com.ruoyi.out.outStockoutFinish.service.IOutStockoutFinishService;
|
||||
|
||||
/**
|
||||
* 出库单据完成表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutFinishServiceImpl implements IOutStockoutFinishService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutFinishMapper outStockoutFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单据完成表
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 出库单据完成表
|
||||
*/
|
||||
@Override
|
||||
public OutStockoutFinish selectOutStockoutFinishByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutFinishMapper.selectOutStockoutFinishByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库单据完成表列表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 出库单据完成表
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutFinish> selectOutStockoutFinishList(OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
return outStockoutFinishMapper.selectOutStockoutFinishList(outStockoutFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockoutFinish(OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
return outStockoutFinishMapper.insertOutStockoutFinish(outStockoutFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据完成表
|
||||
*
|
||||
* @param outStockoutFinish 出库单据完成表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockoutFinish(OutStockoutFinish outStockoutFinish)
|
||||
{
|
||||
return outStockoutFinishMapper.updateOutStockoutFinish(outStockoutFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单据完成表
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库单据完成表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutFinishByStockoutGuids(String[] stockoutGuids)
|
||||
{
|
||||
return outStockoutFinishMapper.deleteOutStockoutFinishByStockoutGuids(stockoutGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据完成表信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据完成表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutFinishByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutFinishMapper.deleteOutStockoutFinishByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutStockout> selectOutStockoutFinishListByOutStockout(OutStockout outStockout) {
|
||||
return outStockoutFinishMapper.selectOutStockoutFinishListByOutStockout(outStockout);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.productAndStock.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.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/productAndStock")
|
||||
public class ViewProductAndStockController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IViewProductAndStockService viewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
startPage();
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出可出库的库存物资信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock: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, "可出库的库存物资信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可出库的库存物资信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:query')")
|
||||
@GetMapping(value = "/{onlyIdentity}")
|
||||
public AjaxResult getInfo(@PathVariable("onlyIdentity") Long onlyIdentity)
|
||||
{
|
||||
return success(viewProductAndStockService.selectViewProductAndStockByOnlyIdentity(onlyIdentity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:add')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
return toAjax(viewProductAndStockService.insertViewProductAndStock(viewProductAndStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:edit')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
return toAjax(viewProductAndStockService.updateViewProductAndStock(viewProductAndStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:remove')")
|
||||
@Log(title = "可出库的库存物资信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{onlyIdentitys}")
|
||||
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
|
||||
{
|
||||
return toAjax(viewProductAndStockService.deleteViewProductAndStockByOnlyIdentitys(onlyIdentitys));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.out.productAndStock.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_product_and_stock
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
public class ViewProductAndStock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
@Excel(name = "序号")
|
||||
private Long onlyIdentity;
|
||||
|
||||
/** 物资编码 */
|
||||
@Excel(name = "物资编码")
|
||||
private String productId;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
private String lotNo;
|
||||
|
||||
/** 物资名称 */
|
||||
@Excel(name = "物资名称")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("onlyIdentity", getOnlyIdentity())
|
||||
.append("productId", getProductId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productName", getProductName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.productAndStock.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
public interface ViewProductAndStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.productAndStock.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
public interface IViewProductAndStockService
|
||||
{
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
*/
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息集合
|
||||
*/
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.out.productAndStock.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper;
|
||||
import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 可出库的库存物资信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
@Service
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
{
|
||||
@Autowired
|
||||
private ViewProductAndStockMapper viewProductAndStockMapper;
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 可出库的库存物资信息
|
||||
*/
|
||||
@Override
|
||||
public ViewProductAndStock selectViewProductAndStockByOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
return viewProductAndStockMapper.selectViewProductAndStockByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可出库的库存物资信息列表
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 可出库的库存物资信息
|
||||
*/
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectViewProductAndStockList(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
return viewProductAndStockMapper.selectViewProductAndStockList(viewProductAndStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertViewProductAndStock(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
return viewProductAndStockMapper.insertViewProductAndStock(viewProductAndStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可出库的库存物资信息
|
||||
*
|
||||
* @param viewProductAndStock 可出库的库存物资信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateViewProductAndStock(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
return viewProductAndStockMapper.updateViewProductAndStock(viewProductAndStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可出库的库存物资信息
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的可出库的库存物资信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys)
|
||||
{
|
||||
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentitys(onlyIdentitys);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可出库的库存物资信息信息
|
||||
*
|
||||
* @param onlyIdentity 可出库的库存物资信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<?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.out.outStockoutDetailFinish.mapper.OutStockoutDetailFinishMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetailFinish" id="OutStockoutDetailFinishResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_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="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="allotQuantity" column="allot_quantity" />
|
||||
<result property="allotQuantityX" column="allot_quantity_x" />
|
||||
<result property="allotQuantityJ" column="allot_quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="bukechaiQuantity" column="bukechai_quantity" />
|
||||
<result property="kechaiQuantity" column="kechai_quantity" />
|
||||
<result property="entryid" column="entryid" />
|
||||
<result property="flatQuantity" column="flat_quantity" />
|
||||
<result property="fid" column="fid" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, supplier_id, cargo_no, create_time, print_date from out_stockout_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishList" parameterType="OutStockoutDetailFinish" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</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 = #{quantity}</if>
|
||||
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
|
||||
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
|
||||
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
|
||||
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
|
||||
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
|
||||
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
|
||||
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
|
||||
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
|
||||
insert into out_stockout_detail_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
|
||||
<if test="stockoutGuid != null">stockout_guid,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">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="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="allotQuantity != null">allot_quantity,</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x,</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="outId != null">out_id,</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity,</if>
|
||||
<if test="entryid != null">entryid,</if>
|
||||
<if test="flatQuantity != null">flat_quantity,</if>
|
||||
<if test="fid != null">fid,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="productName != null">product_name,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="productName != null">#{productName},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
|
||||
update out_stockout_detail_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">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="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="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
|
||||
<if test="entryid != null">entryid = #{entryid},</if>
|
||||
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
|
||||
<if test="fid != null">fid = #{fid},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailFinishByStockoutDetailId" parameterType="String">
|
||||
delete from out_stockout_detail_finish where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailFinishByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail_finish where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishListByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,212 @@
|
||||
<?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.out.outStockoutDetail.mapper.OutStockoutDetailMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_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="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="allotQuantity" column="allot_quantity" />
|
||||
<result property="allotQuantityX" column="allot_quantity_x" />
|
||||
<result property="allotQuantityJ" column="allot_quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="bukechaiQuantity" column="bukechai_quantity" />
|
||||
<result property="kechaiQuantity" column="kechai_quantity" />
|
||||
<result property="entryid" column="entryid" />
|
||||
<result property="flatQuantity" column="flat_quantity" />
|
||||
<result property="fid" column="fid" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, supplier_id, cargo_no, create_time, print_date from out_stockout_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
<where>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
|
||||
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
|
||||
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
|
||||
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
|
||||
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
|
||||
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
|
||||
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
|
||||
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id like concat('%', #{supplierId}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
insert into out_stockout_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
|
||||
<if test="stockoutGuid != null">stockout_guid,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">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="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="allotQuantity != null">allot_quantity,</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x,</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="outId != null">out_id,</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity,</if>
|
||||
<if test="entryid != null">entryid,</if>
|
||||
<if test="flatQuantity != null">flat_quantity,</if>
|
||||
<if test="fid != null">fid,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="productName != null">product_name,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="productName != null">#{productName},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
update out_stockout_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">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="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="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
|
||||
<if test="entryid != null">entryid = #{entryid},</if>
|
||||
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
|
||||
<if test="fid != null">fid = #{fid},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailId" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.out.outStockoutFinish.mapper.OutStockoutFinishMapper">
|
||||
|
||||
<resultMap type="OutStockoutFinish" id="OutStockoutFinishResult">
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="stockoutSource" column="stockout_source" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="classNowId" column="class_now_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="carNumber" column="car_number" />
|
||||
<result property="FID" column="FID" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutFinishVo">
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date from out_stockout_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutFinishList" parameterType="OutStockoutFinish" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</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="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutFinishByStockoutGuid" parameterType="String" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutFinish" parameterType="OutStockoutFinish">
|
||||
insert into out_stockout_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="stockoutSource != null">stockout_source,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="classNowId != null">class_now_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="stockoutSource != null">#{stockoutSource},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="classNowId != null">#{classNowId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutFinish" parameterType="OutStockoutFinish">
|
||||
update out_stockout_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="carNumber != null">car_number = #{carNumber},</if>
|
||||
<if test="FID != null">FID = #{FID},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutFinishByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout_finish where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutFinishByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout_finish where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOutStockoutFinishListByOutStockout" parameterType="OutStockout" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</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="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
140
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
140
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
@@ -0,0 +1,140 @@
|
||||
<?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.out.outStockout.mapper.OutStockoutMapper">
|
||||
|
||||
<resultMap type="OutStockout" id="OutStockoutResult">
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="stockoutSource" column="stockout_source" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="classNowId" column="class_now_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="carNumber" column="car_number" />
|
||||
<result property="FID" column="FID" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutVo">
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date from out_stockout
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</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="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutByStockoutGuid" parameterType="String" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockout" parameterType="OutStockout">
|
||||
insert into out_stockout
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="stockoutSource != null">stockout_source,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="classNowId != null">class_now_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="stockoutSource != null">#{stockoutSource},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="classNowId != null">#{classNowId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockout" parameterType="OutStockout">
|
||||
update out_stockout
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="carNumber != null">car_number = #{carNumber},</if>
|
||||
<if test="FID != null">FID = #{FID},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="updateOutStockoutStatus" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{
|
||||
call proc_update_outbill_status(
|
||||
#{outStockId,mode=IN,jdbcType=VARCHAR},
|
||||
#{status,mode=IN,jdbcType=VARCHAR},
|
||||
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)
|
||||
}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.out.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<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="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</select>
|
||||
|
||||
<insert id="insertViewProductAndStock" parameterType="ViewProductAndStock">
|
||||
insert into view_product_and_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">only_identity,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateViewProductAndStock" parameterType="ViewProductAndStock">
|
||||
update view_product_and_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentity" parameterType="Long">
|
||||
delete from view_product_and_stock where only_identity = #{onlyIdentity}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -55,7 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
FROM
|
||||
sys.columns c
|
||||
INNER JOIN
|
||||
sys.tables t ON c.object_id = t.object_id
|
||||
(SELECT object_id, name FROM sys.tables
|
||||
UNION ALL
|
||||
SELECT object_id, name FROM sys.views) t ON c.object_id = t.object_id
|
||||
LEFT JOIN
|
||||
sys.types ty ON c.user_type_id = ty.user_type_id
|
||||
LEFT JOIN (
|
||||
|
||||
@@ -77,7 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
|
||||
from (
|
||||
select name, object_id, create_date, modify_date from sys.tables
|
||||
union all
|
||||
select name, object_id, create_date, modify_date from sys.views
|
||||
) t
|
||||
LEFT JOIN
|
||||
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
|
||||
AND ep.name = 'MS_Description' -- 标准注释名称
|
||||
@@ -98,7 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableListByNames" resultMap="GenTableResult">
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
|
||||
from (
|
||||
select name, object_id, create_date, modify_date from sys.tables
|
||||
union all
|
||||
select name, object_id, create_date, modify_date from sys.views
|
||||
) t
|
||||
LEFT JOIN
|
||||
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
|
||||
AND ep.name = 'MS_Description' -- 标准注释名称
|
||||
|
||||
66
ruoyi-ui/src/api/out/outStockout.js
Normal file
66
ruoyi-ui/src/api/out/outStockout.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询出库主单列表
|
||||
export function listOutStockout(query) {
|
||||
return request({
|
||||
url: '/out/outStockout/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询出库子单详细
|
||||
export function getOutStockoutDetail(query) {
|
||||
return request({
|
||||
url: '/out/outStockoutDetail/getDetailByGuid',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取仓库列表
|
||||
export function getWarehouseList() {
|
||||
return request({
|
||||
url: '/bas/warehouse/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询可出库的库存物资信息列表
|
||||
export function listProductAndStock(query) {
|
||||
return request({
|
||||
url: '/out/productAndStock/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//单据保存
|
||||
export function saveOutStock(data)
|
||||
{
|
||||
return request({
|
||||
url: '/out/outStockout/saveBill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//修改单据状态
|
||||
export function updateOutStockStatus(params)
|
||||
{
|
||||
const searchParams = new URLSearchParams();
|
||||
if (Array.isArray(params.stockoutIds)) {
|
||||
params.stockoutIds.forEach(id => searchParams.append('stockoutIds', id));
|
||||
}
|
||||
if (params.status) {
|
||||
searchParams.append('status', params.status);
|
||||
}
|
||||
if (params.newStatus) {
|
||||
searchParams.append('newStatus', params.newStatus);
|
||||
}
|
||||
return request({
|
||||
url: '/out/outStockout/changeStatus?' + searchParams.toString(),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
306
ruoyi-ui/src/views/out/addOutStockout.vue
Normal file
306
ruoyi-ui/src/views/out/addOutStockout.vue
Normal file
@@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 主表信息录入 -->
|
||||
<el-form :model="formData" ref="formRef" size="small" :inline="true" label-width="68px" :rules="rules">
|
||||
<el-form-item label="仓库" prop="warehouseId" required>
|
||||
<el-select v-model="formData.warehouseId" placeholder="请选择仓库" clearable>
|
||||
<el-option
|
||||
v-for="dict in warehouseOptions"
|
||||
:key="dict.warehouseId"
|
||||
:label="dict.warehouseName"
|
||||
:value="dict.warehouseId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customerNo" required>
|
||||
<el-input
|
||||
v-model="formData.customerNo"
|
||||
placeholder="请输入客户编号"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="outType" required>
|
||||
<el-select v-model="formData.outType" placeholder="请选择单据类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="warning" icon="el-icon-refresh" size="mini" @click="reset">重置</el-button>
|
||||
<el-button type="success" icon="el-icon-check" size="mini" @click="handleSave">保存单据</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb8">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleSelectMaterials">选择物资</el-button>
|
||||
<el-button type="info" icon="el-icon-refresh-right" size="mini" @click="handleReload">重新建单</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 物资明细表格 -->
|
||||
<el-table v-loading="loading" :data="materialList">
|
||||
<el-table-column label="物资编号" align="center" prop="productId" />
|
||||
<el-table-column label="物资名称" align="center" prop="productName" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="数量" align="center" prop="quantity">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.quantity" :min="1" size="mini" @change="handleQuantityChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 选择物资弹窗 -->
|
||||
<el-dialog title="选择物资" :visible.sync="materialDialog" width="800px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="物资编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物资编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="materialLoading" :data="materialOptions" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="物资编码" align="center" prop="productId" />
|
||||
<el-table-column label="物资名称" align="center" prop="productName" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" />
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmSelectMaterials">确 定</el-button>
|
||||
<el-button @click="cancelSelectMaterials">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWarehouseList,listProductAndStock,saveOutStock } from "@/api/out/outStockout";
|
||||
|
||||
|
||||
export default {
|
||||
name: "AddOutStock",
|
||||
dicts: ['out_bill_type', 'bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
materialLoading: false,
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
warehouseId: [
|
||||
{ required: true, message: "请选择仓库", trigger: "change" }
|
||||
],
|
||||
customerNo: [
|
||||
{ required: true, message: "请输入客户编号", trigger: "blur" }
|
||||
],
|
||||
billType: [
|
||||
{ required: true, message: "请选择单据类型", trigger: "change" }
|
||||
]
|
||||
},
|
||||
// 主表数据
|
||||
formData: {
|
||||
warehouseId: null,
|
||||
customerNo: null,
|
||||
outType: null
|
||||
},
|
||||
// 仓库选项
|
||||
warehouseOptions: [],
|
||||
// 物资明细列表
|
||||
materialList: [],
|
||||
// 选择物资弹窗
|
||||
materialDialog: false,
|
||||
// 物资选项数据
|
||||
materialOptions: [],
|
||||
// 已选择的物资
|
||||
selectedMaterials: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
onlyIdentity: null,
|
||||
productId: null,
|
||||
lotNo: null,
|
||||
productName: null,
|
||||
quantity: null,
|
||||
warehouseId: null
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getWarehouseOptions();
|
||||
},
|
||||
methods: {
|
||||
/** 获取仓库选项 */
|
||||
getWarehouseOptions() {
|
||||
|
||||
this.warehouseOptions = [
|
||||
{
|
||||
warehouseName: "仓库1",
|
||||
warehouseId: "1"
|
||||
},
|
||||
{
|
||||
warehouseName: "仓库2",
|
||||
warehouseId: "2"
|
||||
}
|
||||
];
|
||||
|
||||
// getWarehouseList().then(response => {
|
||||
// this.warehouseOptions = response.data;
|
||||
// });
|
||||
},
|
||||
/** 打开选择物资弹窗 */
|
||||
handleSelectMaterials() {
|
||||
this.materialDialog = true;
|
||||
this.getMaterialList();
|
||||
},
|
||||
/** 获取物资列表 */
|
||||
getMaterialList() {
|
||||
this.materialLoading = true;
|
||||
listProductAndStock(this.queryParams).then(response => {
|
||||
this.materialOptions = response.rows;
|
||||
this.materialLoading = false;
|
||||
});
|
||||
},
|
||||
/** 物资选择变更 */
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedMaterials = selection;
|
||||
},
|
||||
/** 确认选择物资 */
|
||||
confirmSelectMaterials() {
|
||||
if (this.selectedMaterials.length === 0) {
|
||||
this.$modal.msgError("请选择物资");
|
||||
return;
|
||||
}
|
||||
// 过滤掉已经存在的物资
|
||||
const newMaterials = this.selectedMaterials.filter(item => {
|
||||
return !this.materialList.some(existing => existing.onlyIdentity === item.onlyIdentity);
|
||||
});
|
||||
|
||||
if (newMaterials.length === 0) {
|
||||
this.$modal.msgWarning("所选物资已存在,请重新选择");
|
||||
return;
|
||||
}
|
||||
|
||||
this.materialList = this.materialList.concat(
|
||||
newMaterials.map(item => ({
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
quantity: item.quantity,
|
||||
quantityOrignal: item.quantity,
|
||||
lotNo: item.lotNo,
|
||||
onlyIdentity: item.onlyIdentity
|
||||
}))
|
||||
);
|
||||
this.materialDialog = false;
|
||||
this.selectedMaterials = [];
|
||||
},
|
||||
/** 取消选择物资 */
|
||||
cancelSelectMaterials() {
|
||||
this.selectedMaterials = [];
|
||||
this.materialDialog = false;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getMaterialList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 删除物资 */
|
||||
handleDelete(index) {
|
||||
this.materialList.splice(index, 1);
|
||||
},
|
||||
/** 数量变更 */
|
||||
handleQuantityChange(row) {
|
||||
// 如果没有初始数量,则设置初始数量
|
||||
|
||||
// 如果修改后的数量大于初始数量,给出提示并重置为当前值
|
||||
if (row.quantity > row.quantityOrignal) {
|
||||
this.$modal.msgError("数量不能大于库存数量");
|
||||
row.quantity = row.quantityOrignal;
|
||||
}
|
||||
},
|
||||
/** 保存单据 */
|
||||
handleSave() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.materialList.length === 0) {
|
||||
this.$modal.msgError("请选择物资");
|
||||
return;
|
||||
}
|
||||
const data = {
|
||||
outStockout: this.formData,
|
||||
detailList: this.materialList
|
||||
};
|
||||
// 这里需要调用保存接口
|
||||
saveOutStock(data).then(response => {
|
||||
console.log(response)
|
||||
this.$modal.msgSuccess("单据"+response.msg+"保存成功");
|
||||
this.$tab.refreshPage(this.$route);
|
||||
// this.reset();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 重置数据 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
warehouseId: null,
|
||||
customerNo: null,
|
||||
outType: null
|
||||
};
|
||||
this.materialList = [];
|
||||
},
|
||||
/** 重新建单 */
|
||||
handleReload() {
|
||||
this.$tab.refreshPage(this.$route);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
293
ruoyi-ui/src/views/out/outStockoutManage.vue
Normal file
293
ruoyi-ui/src/views/out/outStockoutManage.vue
Normal file
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 查询表单 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="出库单编号" prop="stockoutId">
|
||||
<el-input
|
||||
v-model="queryParams.stockoutId"
|
||||
placeholder="请输入出库单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.out_bill_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户编码" prop="customerNo">
|
||||
<el-input
|
||||
v-model="queryParams.customerNo"
|
||||
placeholder="请输入客户编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="handleAudit(2)"
|
||||
>单据审核</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-circle-check"
|
||||
size="mini"
|
||||
@click="handleAudit(4)"
|
||||
>单据确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleAudit(5)"
|
||||
>单据作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-s-promotion"
|
||||
size="mini"
|
||||
@click="handleAutoAllot"
|
||||
>自动分配</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-s-tools"
|
||||
size="mini"
|
||||
@click="handleManualAllot"
|
||||
>手动分配</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 主表数据 -->
|
||||
<el-table v-loading="loading" :data="outStockoutList" @selection-change="handleSelectionChange" @row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="出库单编号" align="center" prop="stockoutId" />
|
||||
<el-table-column label="出库类型" align="center" prop="outType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_bill_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户编码" align="center" prop="customerNo" />
|
||||
<el-table-column label="建单人" align="center" prop="createManId" />
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" />
|
||||
<el-table-column label="开始时间" align="center" prop="startDate" />
|
||||
<el-table-column label="确认时间" align="center" prop="finishDate" />
|
||||
<el-table-column label="仓库编号" align="center" prop="warehouseId" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 子表数据 -->
|
||||
<el-table v-loading="detailLoading" :data="outStockDetailList.slice((detailQueryParams.pageNum-1)*detailQueryParams.pageSize, detailQueryParams.pageNum*detailQueryParams.pageSize)" style="margin-top: 20px;">
|
||||
<el-table-column label="出库子单编号" align="center" prop="stockoutDetailId" />
|
||||
<el-table-column label="物资编码" align="center" prop="productId" />
|
||||
|
||||
<el-table-column label="批次" align="center" prop="lotNo" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column label="实际数量" align="center" prop="assignNum" />
|
||||
<el-table-column label="分配数量" align="center" prop="allotQuantity" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="detailQueryParams.pageNum"
|
||||
:limit.sync="detailQueryParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOutStockout } from "@/api/out/outStockout"
|
||||
import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout"
|
||||
|
||||
export default {
|
||||
name: "OutStockWithDetail",
|
||||
dicts: ['out_bill_type', 'out_bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
detailLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表数据
|
||||
outStockoutList: [],
|
||||
// 子表数据
|
||||
outStockDetailList: [],
|
||||
// 选中数据
|
||||
selectedRows: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
stockoutId: null,
|
||||
outType: null,
|
||||
customerNo: null,
|
||||
status: '1'
|
||||
},
|
||||
// 子表分页参数
|
||||
detailQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
status:null,
|
||||
stockoutGuid:null
|
||||
|
||||
},
|
||||
// 子表总条数
|
||||
detailTotal: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询主表数据 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listOutStockout(this.queryParams).then(response => {
|
||||
this.outStockoutList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 查询子表数据 */
|
||||
getDetailList(stockoutGuid,status) {
|
||||
this.detailLoading = true
|
||||
this.detailQueryParams.stockoutGuid = stockoutGuid
|
||||
this.detailQueryParams.status = status
|
||||
getOutStockoutDetail(this.detailQueryParams).then(response => {
|
||||
this.outStockDetailList = response.rows
|
||||
this.detailTotal = response.total
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 点击行加载明细数据 */
|
||||
handleRowClick(row) {
|
||||
this.getDetailList(row.stockoutGuid,row.status)
|
||||
},
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection
|
||||
},
|
||||
/** 单据状态修改按钮操作 */
|
||||
handleAudit(status) {
|
||||
if (this.selectedRows.length === 0) {
|
||||
this.$modal.msgError("请选择至少一条数据")
|
||||
return
|
||||
}
|
||||
|
||||
for(var i=0;i<this.selectedRows.length;i++){
|
||||
if (this.selectedRows[i].status != "1" && status == "2") {
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据已审核,请勿重复审核")
|
||||
return
|
||||
}
|
||||
if (this.selectedRows[i].status < 3 && status == "4") {
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据未开始,无法确认")
|
||||
return
|
||||
}
|
||||
if (this.selectedRows[i].status != "1" && status == "5"){
|
||||
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据已审核,无法作废")
|
||||
return;
|
||||
}
|
||||
}
|
||||
const params = {
|
||||
stockoutIds: this.selectedRows.map(row => row.stockoutId),
|
||||
status: this.selectedRows[0].status,
|
||||
newStatus: status
|
||||
}
|
||||
console.log("单据状态修改:", params)
|
||||
|
||||
//调用单据状态改变接口
|
||||
updateOutStockStatus(params).then(response => {
|
||||
this.$modal.msgSuccess(response)
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
/** 自动分配按钮操作 */
|
||||
handleAutoAllot() {
|
||||
if (this.selectedRows.length === 0) {
|
||||
this.$modal.msgError("请选择至少一条数据")
|
||||
return
|
||||
}
|
||||
const stockoutIds = this.selectedRows.map(row => row.stockoutId)
|
||||
// TODO: 调用自动分配接口
|
||||
console.log("自动分配:", stockoutIds)
|
||||
},
|
||||
/** 手动分配按钮操作 */
|
||||
handleManualAllot() {
|
||||
if (this.selectedRows.length === 0) {
|
||||
this.$modal.msgError("请选择至少一条数据")
|
||||
return
|
||||
}
|
||||
const stockoutIds = this.selectedRows.map(row => row.stockoutId)
|
||||
// TODO: 调用手动分配接口
|
||||
console.log("手动分配:", stockoutIds)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
142
ruoyi-ui/src/views/out/productAndStock.vue
Normal file
142
ruoyi-ui/src/views/out/productAndStock.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="序号" prop="onlyIdentity">
|
||||
<el-input
|
||||
v-model="queryParams.onlyIdentity"
|
||||
placeholder="请输入序号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入物资编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
placeholder="请输入批号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入物资名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['out:productAndStock:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="productAndStockList">
|
||||
<el-table-column label="序号" align="center" prop="onlyIdentity" />
|
||||
<el-table-column label="物资编码" align="center" prop="productId" />
|
||||
<el-table-column label="批号" align="center" prop="lotNo" />
|
||||
<el-table-column label="物资名称" align="center" prop="productName" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProductAndStock } from "@/api/out/outStockout"
|
||||
|
||||
export default {
|
||||
name: "ProductAndStock",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 可出库的库存物资信息表格数据
|
||||
productAndStockList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
onlyIdentity: null,
|
||||
productId: null,
|
||||
lotNo: null,
|
||||
productName: null,
|
||||
quantity: null,
|
||||
warehouseId: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询可出库的库存物资信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listProductAndStock(this.queryParams).then(response => {
|
||||
this.productAndStockList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('out/productAndStock/export', {
|
||||
...this.queryParams
|
||||
}, `productAndStock_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user