添加入库单据
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.bas.BasProduct.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -7,10 +9,12 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 物料管理对象 bas_product
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BasProduct extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -70,164 +74,9 @@ public class BasProduct extends BaseEntity
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String quantity;
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("parentId", getParentId())
|
||||
.append("price", getPrice())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("remark", getRemark())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("productName", getProductName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,19 @@ package com.ruoyi.bas.BasProduct.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 物料管理Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface BasProductMapper
|
||||
public interface BasProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -21,7 +22,7 @@ public interface BasProductMapper
|
||||
|
||||
/**
|
||||
* 查询物料管理列表
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 物料管理集合
|
||||
*/
|
||||
@@ -29,7 +30,7 @@ public interface BasProductMapper
|
||||
|
||||
/**
|
||||
* 新增物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +38,7 @@ public interface BasProductMapper
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ public interface BasProductMapper
|
||||
|
||||
/**
|
||||
* 删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +54,16 @@ public interface BasProductMapper
|
||||
|
||||
/**
|
||||
* 批量删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasProductByProductGuids(String[] productGuids);
|
||||
|
||||
/**
|
||||
* 通过物料id列表批量查询物料信息
|
||||
* @param collect
|
||||
* @return
|
||||
*/
|
||||
List<BasProduct> selectBasProductListByProductGuids(@Param("productGuids") List<String> collect);
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
|
||||
/**
|
||||
* 物料管理Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IBasProductService
|
||||
public interface IBasProductService
|
||||
{
|
||||
/**
|
||||
* 查询物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface IBasProductService
|
||||
|
||||
/**
|
||||
* 查询物料管理列表
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 物料管理集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface IBasProductService
|
||||
|
||||
/**
|
||||
* 新增物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface IBasProductService
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface IBasProductService
|
||||
|
||||
/**
|
||||
* 批量删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuids 需要删除的物料管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +53,16 @@ public interface IBasProductService
|
||||
|
||||
/**
|
||||
* 删除物料管理信息
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasProductByProductGuid(String productGuid);
|
||||
|
||||
/**
|
||||
* 通过物料id列表查询物料信息
|
||||
* @param collect
|
||||
* @return
|
||||
*/
|
||||
List<BasProduct> selectBasProductListByProductGuids(List<String> collect);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.ruoyi.bas.BasProduct.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
|
||||
@@ -9,19 +12,19 @@ import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
|
||||
/**
|
||||
* 物料管理Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class BasProductServiceImpl implements IBasProductService
|
||||
public class BasProductServiceImpl implements IBasProductService
|
||||
{
|
||||
@Autowired
|
||||
private BasProductMapper basProductMapper;
|
||||
|
||||
/**
|
||||
* 查询物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -33,7 +36,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 查询物料管理列表
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -45,7 +48,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 新增物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -57,7 +60,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -69,7 +72,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 批量删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuids 需要删除的物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -81,7 +84,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 删除物料管理信息
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -90,4 +93,16 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
{
|
||||
return basProductMapper.deleteBasProductByProductGuid(productGuid);
|
||||
}
|
||||
/**
|
||||
* 通过物料id列表查询物料信息
|
||||
* @param collect
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BasProduct> selectBasProductListByProductGuids(List<String> collect) {
|
||||
if (CollUtil.isEmpty(collect)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return basProductMapper.selectBasProductListByProductGuids(collect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
存放入库相关的业务代码和配置文件
|
||||
|
||||
## 主要功能
|
||||
- 处理商品入库业务流程
|
||||
- 处理物料入库业务流程
|
||||
- 管理入库单据信息
|
||||
- 处理入库质检和验收
|
||||
- 入库数据统计和分析
|
||||
@@ -17,4 +17,4 @@ in/
|
||||
├── model/ # 入库数据模型
|
||||
├── service/ # 入库业务逻辑
|
||||
└── utils/ # 入库相关工具类
|
||||
```
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
存放出库相关的业务代码和配置文件
|
||||
|
||||
## 主要功能
|
||||
- 处理商品出库业务流程
|
||||
- 处理物料出库业务流程
|
||||
- 管理出库单据信息
|
||||
- 处理出库复核和交接
|
||||
- 出库数据统计和分析
|
||||
@@ -17,4 +17,4 @@ out/
|
||||
├── model/ # 出库数据模型
|
||||
├── service/ # 出库业务逻辑
|
||||
└── utils/ # 出库相关工具类
|
||||
```
|
||||
```
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.ruoyi.receive.stockin.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveProductVo;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveStockVo;
|
||||
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.receive.stockin.domain.ReceiveStockin;
|
||||
import com.ruoyi.receive.stockin.service.IReceiveStockinService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 收货单据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/receive/stockin")
|
||||
public class ReceiveStockinController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IReceiveStockinService receiveStockinService;
|
||||
|
||||
/**
|
||||
* 查询收货单据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReceiveStockin receiveStockin)
|
||||
{
|
||||
startPage();
|
||||
List<ReceiveStockin> list = receiveStockinService.selectReceiveStockinList(receiveStockin);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出收货单据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:export')")
|
||||
@Log(title = "收货单据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ReceiveStockin receiveStockin)
|
||||
{
|
||||
List<ReceiveStockin> list = receiveStockinService.selectReceiveStockinList(receiveStockin);
|
||||
ExcelUtil<ReceiveStockin> util = new ExcelUtil<ReceiveStockin>(ReceiveStockin.class);
|
||||
util.exportExcel(response, list, "收货单据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收货单据详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:query')")
|
||||
@GetMapping(value = "/{stockinGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinGuid") String stockinGuid)
|
||||
{
|
||||
return success(receiveStockinService.selectReceiveStockinByStockinGuid(stockinGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收货单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:add')")
|
||||
@Log(title = "收货单据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ReceiveStockVo receiveStockin)
|
||||
{
|
||||
return receiveStockinService.insertReceiveStockin(receiveStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入收货单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:import')")
|
||||
@Log(title = "收货单据", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/analyseExportFile")
|
||||
public AjaxResult analyseExportFile(MultipartFile file) throws IOException {
|
||||
ExcelUtil<ReceiveProductVo> util = new ExcelUtil<ReceiveProductVo>(ReceiveProductVo.class);
|
||||
List<ReceiveProductVo> list = util.importExcel(file.getInputStream());
|
||||
return receiveStockinService.analyseExportFile(list);
|
||||
}
|
||||
/**
|
||||
* 下载收货单据模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<ReceiveProductVo> util = new ExcelUtil<ReceiveProductVo>(ReceiveProductVo.class);
|
||||
util.importTemplateExcel(response, "物料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收货单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:edit')")
|
||||
@Log(title = "收货单据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ReceiveStockin receiveStockin)
|
||||
{
|
||||
return toAjax(receiveStockinService.updateReceiveStockin(receiveStockin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收货单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockin:remove')")
|
||||
@Log(title = "收货单据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return toAjax(receiveStockinService.deleteReceiveStockinByStockinGuids(stockinGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
package com.ruoyi.receive.stockin.domain;
|
||||
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
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;
|
||||
import org.apache.commons.math3.stat.descriptive.summary.Product;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收货单据对象 receive_stockin
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class ReceiveStockin extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID */
|
||||
private String stockinGuid;
|
||||
|
||||
/** 入库订单ID */
|
||||
@Excel(name = "入库订单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 入库类型 */
|
||||
@Excel(name = "入库类型")
|
||||
private String inType;
|
||||
|
||||
/** 建立时间 */
|
||||
@Excel(name = "建立时间")
|
||||
private String createDate;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createManId;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 仓库ID */
|
||||
@Excel(name = "仓库ID")
|
||||
private String warehouseId;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 完成日期 */
|
||||
@Excel(name = " 完成日期")
|
||||
private String finishDate;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** erp单号 */
|
||||
@Excel(name = "erp单号")
|
||||
private String erpBill;
|
||||
|
||||
/** 单据来源 */
|
||||
@Excel(name = "单据来源")
|
||||
private String stockSource;
|
||||
|
||||
/** 部门编码 */
|
||||
@Excel(name = "部门编码")
|
||||
private String departmentNo;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
private String customerNo;
|
||||
|
||||
/** 班组编码 */
|
||||
@Excel(name = "班组编码")
|
||||
private String classNo;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierNo;
|
||||
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setInType(String inType)
|
||||
{
|
||||
this.inType = inType;
|
||||
}
|
||||
|
||||
public String getInType()
|
||||
{
|
||||
return inType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateManId(String createManId)
|
||||
{
|
||||
this.createManId = createManId;
|
||||
}
|
||||
|
||||
public String getCreateManId()
|
||||
{
|
||||
return createManId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setErpBill(String erpBill)
|
||||
{
|
||||
this.erpBill = erpBill;
|
||||
}
|
||||
|
||||
public String getErpBill()
|
||||
{
|
||||
return erpBill;
|
||||
}
|
||||
|
||||
public void setStockSource(String stockSource)
|
||||
{
|
||||
this.stockSource = stockSource;
|
||||
}
|
||||
|
||||
public String getStockSource()
|
||||
{
|
||||
return stockSource;
|
||||
}
|
||||
|
||||
public void setDepartmentNo(String departmentNo)
|
||||
{
|
||||
this.departmentNo = departmentNo;
|
||||
}
|
||||
|
||||
public String getDepartmentNo()
|
||||
{
|
||||
return departmentNo;
|
||||
}
|
||||
|
||||
public void setCustomerNo(String customerNo)
|
||||
{
|
||||
this.customerNo = customerNo;
|
||||
}
|
||||
|
||||
public String getCustomerNo()
|
||||
{
|
||||
return customerNo;
|
||||
}
|
||||
|
||||
public void setClassNo(String classNo)
|
||||
{
|
||||
this.classNo = classNo;
|
||||
}
|
||||
|
||||
public String getClassNo()
|
||||
{
|
||||
return classNo;
|
||||
}
|
||||
|
||||
public void setSupplierNo(String supplierNo)
|
||||
{
|
||||
this.supplierNo = supplierNo;
|
||||
}
|
||||
|
||||
public String getSupplierNo()
|
||||
{
|
||||
return supplierNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("inType", getInType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare3", getSpare3())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare1", getSpare1())
|
||||
.append("erpBill", getErpBill())
|
||||
.append("stockSource", getStockSource())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("classNo", getClassNo())
|
||||
.append("supplierNo", getSupplierNo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.receive.stockin.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class ReceiveProductVo {
|
||||
@Excel(name = "物料编码")
|
||||
private String productGuid;
|
||||
@Excel(name = "物料数量")
|
||||
private String quantity;
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.receive.stockin.domain.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class ReceiveStockVo {
|
||||
@NotBlank
|
||||
private String warehouseId;
|
||||
@NotBlank
|
||||
private String supplierId;
|
||||
private String remark;
|
||||
@NotEmpty
|
||||
private List<ReceiveProductVo> productVoList;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.receive.stockin.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.receive.stockin.domain.ReceiveStockin;
|
||||
|
||||
/**
|
||||
* 收货单据Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface ReceiveStockinMapper
|
||||
{
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 收货单据
|
||||
*/
|
||||
public ReceiveStockin selectReceiveStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询收货单据列表
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 收货单据集合
|
||||
*/
|
||||
public List<ReceiveStockin> selectReceiveStockinList(ReceiveStockin receiveStockin);
|
||||
|
||||
/**
|
||||
* 新增收货单据
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReceiveStockin(ReceiveStockin receiveStockin);
|
||||
|
||||
/**
|
||||
* 修改收货单据
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReceiveStockin(ReceiveStockin receiveStockin);
|
||||
|
||||
/**
|
||||
* 删除收货单据
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 批量删除收货单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinByStockinGuids(String[] stockinGuids);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.receive.stockin.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.receive.stockin.domain.ReceiveStockin;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveProductVo;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveStockVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 收货单据Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IReceiveStockinService
|
||||
{
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 收货单据
|
||||
*/
|
||||
public ReceiveStockin selectReceiveStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询收货单据列表
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 收货单据集合
|
||||
*/
|
||||
public List<ReceiveStockin> selectReceiveStockinList(ReceiveStockin receiveStockin);
|
||||
|
||||
/**
|
||||
* 新增收货单据
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult insertReceiveStockin(ReceiveStockVo receiveStockin);
|
||||
|
||||
/**
|
||||
* 修改收货单据
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReceiveStockin(ReceiveStockin receiveStockin);
|
||||
|
||||
/**
|
||||
* 批量删除收货单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的收货单据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinByStockinGuids(String[] stockinGuids);
|
||||
|
||||
/**
|
||||
* 删除收货单据信息
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 解析导入文件物料数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
AjaxResult analyseExportFile(List<ReceiveProductVo> list );
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.ruoyi.receive.stockin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.Hutool;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveProductVo;
|
||||
import com.ruoyi.receive.stockin.domain.vo.ReceiveStockVo;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
import com.ruoyi.receive.stockindetail.service.IReceiveStockinDetailService;
|
||||
import com.ruoyi.receive.stockindetail.service.impl.ReceiveStockinDetailServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.receive.stockin.mapper.ReceiveStockinMapper;
|
||||
import com.ruoyi.receive.stockin.domain.ReceiveStockin;
|
||||
import com.ruoyi.receive.stockin.service.IReceiveStockinService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 收货单据Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
||||
{
|
||||
@Autowired
|
||||
private ReceiveStockinMapper receiveStockinMapper;
|
||||
@Autowired
|
||||
private IReceiveStockinDetailService iReceiveStockinDetailService;
|
||||
@Autowired
|
||||
private IBasProductService iBasProductService;
|
||||
|
||||
/**
|
||||
* 查询收货单据
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 收货单据
|
||||
*/
|
||||
@Override
|
||||
public ReceiveStockin selectReceiveStockinByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return receiveStockinMapper.selectReceiveStockinByStockinGuid(stockinGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收货单据列表
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 收货单据
|
||||
*/
|
||||
@Override
|
||||
public List<ReceiveStockin> selectReceiveStockinList(ReceiveStockin receiveStockin)
|
||||
{
|
||||
return receiveStockinMapper.selectReceiveStockinList(receiveStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收货单据
|
||||
*
|
||||
* @param receiveStockVo 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult insertReceiveStockin(ReceiveStockVo receiveStockVo)
|
||||
{
|
||||
List<ReceiveProductVo> productVoList = receiveStockVo.getProductVoList();
|
||||
if (CollUtil.isEmpty(productVoList)){
|
||||
return AjaxResult.error();
|
||||
}
|
||||
ReceiveStockin receiveStockin = new ReceiveStockin();
|
||||
receiveStockin.setStockinGuid(IdUtil.fastSimpleUUID());
|
||||
receiveStockin.setSupplierNo(receiveStockVo.getSupplierId());
|
||||
receiveStockin.setWarehouseId(receiveStockVo.getWarehouseId());
|
||||
receiveStockin.setCreateDate(DateUtil.format(DateUtil.date(),"yyyy-MM-dd HH:mm:ss"));
|
||||
receiveStockin.setInType("1");
|
||||
receiveStockin.setStockSource("1");
|
||||
//receiveStockin.setSpare1(receiveStockVo.getBatchId());
|
||||
receiveStockin.setCreateManId(Convert.toStr(SecurityUtils.getUserId()));
|
||||
receiveStockin.setStockinId(IdUtil.fastSimpleUUID());
|
||||
receiveStockin.setStatus("0");
|
||||
receiveStockinMapper.insertReceiveStockin(receiveStockin);
|
||||
for (ReceiveProductVo receiveProductVo : productVoList) {
|
||||
BasProduct basProduct = iBasProductService.selectBasProductByProductGuid(receiveProductVo.getProductGuid());
|
||||
ReceiveStockinDetail receiveStockinDetail = new ReceiveStockinDetail();
|
||||
receiveStockinDetail.setQuantity(receiveProductVo.getQuantity());
|
||||
receiveStockinDetail.setProductGuid(receiveProductVo.getProductGuid());
|
||||
receiveStockinDetail.setProductId(basProduct.getProductId());
|
||||
receiveStockinDetail.setStockinGuid(receiveStockin.getStockinGuid());
|
||||
receiveStockinDetail.setStockinId(receiveStockin.getStockinId());
|
||||
receiveStockinDetail.setStockinDetailId(IdUtil.fastSimpleUUID());
|
||||
receiveStockinDetail.setUnit(basProduct.getUnit());
|
||||
receiveStockinDetail.setSpec(basProduct.getSpec());
|
||||
receiveStockinDetail.setSpare1(basProduct.getSpare1());
|
||||
receiveStockinDetail.setSpare2(basProduct.getSpare2());
|
||||
receiveStockinDetail.setSpare3(basProduct.getSpare3());
|
||||
receiveStockinDetail.setSpare4(basProduct.getSpare4());
|
||||
receiveStockinDetail.setSpare5(basProduct.getSpare5());
|
||||
receiveStockinDetail.setSpare6(basProduct.getSpare6());
|
||||
receiveStockinDetail.setCargoNo(basProduct.getCargoNo());
|
||||
receiveStockinDetail.setPrice(basProduct.getPrice());
|
||||
receiveStockinDetail.setRemark(basProduct.getRemark());
|
||||
receiveStockinDetail.setStockStatus("0");
|
||||
receiveStockinDetail.setLotNo(receiveProductVo.getLotNo());
|
||||
iReceiveStockinDetailService.insertReceiveStockinDetail(receiveStockinDetail);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收货单据
|
||||
*
|
||||
* @param receiveStockin 收货单据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReceiveStockin(ReceiveStockin receiveStockin)
|
||||
{
|
||||
return receiveStockinMapper.updateReceiveStockin(receiveStockin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收货单据
|
||||
*
|
||||
* @param stockinGuids 需要删除的收货单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReceiveStockinByStockinGuids(String[] stockinGuids)
|
||||
{
|
||||
return receiveStockinMapper.deleteReceiveStockinByStockinGuids(stockinGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收货单据信息
|
||||
*
|
||||
* @param stockinGuid 收货单据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReceiveStockinByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return receiveStockinMapper.deleteReceiveStockinByStockinGuid(stockinGuid);
|
||||
}
|
||||
/**
|
||||
* 解析导入文件物料数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult analyseExportFile(List<ReceiveProductVo> list) {
|
||||
if (CollUtil.isEmpty(list)){
|
||||
return AjaxResult.error("导入数据为空");
|
||||
}
|
||||
List<String> collect = list.stream().map(ReceiveProductVo::getProductGuid).collect(Collectors.toList());
|
||||
List<BasProduct> result = iBasProductService.selectBasProductListByProductGuids(collect);
|
||||
for (BasProduct basProduct : result) {
|
||||
Optional<ReceiveProductVo> first = list.stream().filter(x -> x.getProductGuid().equals(basProduct.getProductGuid())).findFirst();
|
||||
first.ifPresent(receiveProductVo -> basProduct.setQuantity(receiveProductVo.getQuantity()));
|
||||
}
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.receive.stockindetail.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
import com.ruoyi.receive.stockindetail.service.IReceiveStockinDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 收货单据子单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/receive/stockInDetail")
|
||||
public class ReceiveStockinDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IReceiveStockinDetailService receiveStockinDetailService;
|
||||
|
||||
/**
|
||||
* 查询收货单据子单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
startPage();
|
||||
List<ReceiveStockinDetail> list = receiveStockinDetailService.selectReceiveStockinDetailList(receiveStockinDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出收货单据子单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:export')")
|
||||
@Log(title = "收货单据子单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
List<ReceiveStockinDetail> list = receiveStockinDetailService.selectReceiveStockinDetailList(receiveStockinDetail);
|
||||
ExcelUtil<ReceiveStockinDetail> util = new ExcelUtil<ReceiveStockinDetail>(ReceiveStockinDetail.class);
|
||||
util.exportExcel(response, list, "收货单据子单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收货单据子单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:query')")
|
||||
@GetMapping(value = "/{stockinDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinDetailId") String stockinDetailId)
|
||||
{
|
||||
return success(receiveStockinDetailService.selectReceiveStockinDetailByStockinDetailId(stockinDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收货单据子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:add')")
|
||||
@Log(title = "收货单据子单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
return toAjax(receiveStockinDetailService.insertReceiveStockinDetail(receiveStockinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收货单据子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:edit')")
|
||||
@Log(title = "收货单据子单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
return toAjax(receiveStockinDetailService.updateReceiveStockinDetail(receiveStockinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收货单据子单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('receive:stockInDetail:remove')")
|
||||
@Log(title = "收货单据子单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinDetailIds)
|
||||
{
|
||||
return toAjax(receiveStockinDetailService.deleteReceiveStockinDetailByStockinDetailIds(stockinDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
package com.ruoyi.receive.stockindetail.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 收货单据子单对象 receive_stockin_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public class ReceiveStockinDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子单ID */
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 主单GUID */
|
||||
@Excel(name = "主单GUID")
|
||||
private String stockinGuid;
|
||||
|
||||
/** 主单ID */
|
||||
@Excel(name = "主单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private String productGuid;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private String quantity;
|
||||
|
||||
/** 计划数量(箱) */
|
||||
@Excel(name = "计划数量(箱)")
|
||||
private String quantityX;
|
||||
|
||||
/** 计划数量(件) */
|
||||
@Excel(name = "计划数量(件)")
|
||||
private String quantityJ;
|
||||
|
||||
/** 参考单价 */
|
||||
@Excel(name = "参考单价")
|
||||
private String price;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String cargoNo;
|
||||
|
||||
/** 实际数量 */
|
||||
@Excel(name = "实际数量")
|
||||
private String assignNum;
|
||||
|
||||
/** 实际数量(箱) */
|
||||
@Excel(name = "实际数量(箱)")
|
||||
private String assignNumX;
|
||||
|
||||
/** 实际数量(件) */
|
||||
@Excel(name = "实际数量(件)")
|
||||
private String assignNumJ;
|
||||
|
||||
/** 入库日期 */
|
||||
@Excel(name = "入库日期")
|
||||
private String printDate;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String stockStatus;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierId;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
private String customerId;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String spec;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
/** 备用字段6 */
|
||||
@Excel(name = "备用字段6")
|
||||
private String spare6;
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getStockinDetailId()
|
||||
{
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantityX(String quantityX)
|
||||
{
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public String getQuantityX()
|
||||
{
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(String quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public String getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setAssignNum(String assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public String getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(String assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public String getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(String assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public String getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinDetailId", getStockinDetailId())
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("remark", getRemark())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("stockStatus", getStockStatus())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.receive.stockindetail.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
|
||||
/**
|
||||
* 收货单据子单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface ReceiveStockinDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询收货单据子单
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 收货单据子单
|
||||
*/
|
||||
public ReceiveStockinDetail selectReceiveStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询收货单据子单列表
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 收货单据子单集合
|
||||
*/
|
||||
public List<ReceiveStockinDetail> selectReceiveStockinDetailList(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 新增收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 修改收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 删除收货单据子单
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除收货单据子单
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinDetailByStockinDetailIds(String[] stockinDetailIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.receive.stockindetail.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
|
||||
/**
|
||||
* 收货单据子单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IReceiveStockinDetailService
|
||||
{
|
||||
/**
|
||||
* 查询收货单据子单
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 收货单据子单
|
||||
*/
|
||||
public ReceiveStockinDetail selectReceiveStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询收货单据子单列表
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 收货单据子单集合
|
||||
*/
|
||||
public List<ReceiveStockinDetail> selectReceiveStockinDetailList(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 新增收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 修改收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail);
|
||||
|
||||
/**
|
||||
* 批量删除收货单据子单
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的收货单据子单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinDetailByStockinDetailIds(String[] stockinDetailIds);
|
||||
|
||||
/**
|
||||
* 删除收货单据子单信息
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteReceiveStockinDetailByStockinDetailId(String stockinDetailId);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.receive.stockindetail.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.receive.stockindetail.mapper.ReceiveStockinDetailMapper;
|
||||
import com.ruoyi.receive.stockindetail.domain.ReceiveStockinDetail;
|
||||
import com.ruoyi.receive.stockindetail.service.IReceiveStockinDetailService;
|
||||
|
||||
/**
|
||||
* 收货单据子单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class ReceiveStockinDetailServiceImpl implements IReceiveStockinDetailService
|
||||
{
|
||||
@Autowired
|
||||
private ReceiveStockinDetailMapper receiveStockinDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询收货单据子单
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 收货单据子单
|
||||
*/
|
||||
@Override
|
||||
public ReceiveStockinDetail selectReceiveStockinDetailByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return receiveStockinDetailMapper.selectReceiveStockinDetailByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收货单据子单列表
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 收货单据子单
|
||||
*/
|
||||
@Override
|
||||
public List<ReceiveStockinDetail> selectReceiveStockinDetailList(ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
return receiveStockinDetailMapper.selectReceiveStockinDetailList(receiveStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
return receiveStockinDetailMapper.insertReceiveStockinDetail(receiveStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收货单据子单
|
||||
*
|
||||
* @param receiveStockinDetail 收货单据子单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail)
|
||||
{
|
||||
return receiveStockinDetailMapper.updateReceiveStockinDetail(receiveStockinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收货单据子单
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的收货单据子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReceiveStockinDetailByStockinDetailIds(String[] stockinDetailIds)
|
||||
{
|
||||
return receiveStockinDetailMapper.deleteReceiveStockinDetailByStockinDetailIds(stockinDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收货单据子单信息
|
||||
*
|
||||
* @param stockinDetailId 收货单据子单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReceiveStockinDetailByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return receiveStockinDetailMapper.deleteReceiveStockinDetailByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user