feat(mat): 添加配料管理系统核心功能模块
- 新增配料出库服务接口及实现类 - 实现配料配件基础信息服务及CRUD操作 - 添加配料价格变动历史记录功能 - 创建产品-配料关联中间表服务 - 实现采购单主服务管理在途库存 - 添加入库记录详情管理功能 - 完善配料出入库流程控制逻辑
This commit is contained in:
23
gear-mat/pom.xml
Normal file
23
gear-mat/pom.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.gear</groupId>
|
||||
<artifactId>FURNITURE-OA</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
<artifactId>gear-mat</artifactId>
|
||||
<name>Archetype - gear-mat</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.gear</groupId>
|
||||
<artifactId>gear-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatMatPriceHistoryVo;
|
||||
import com.gear.mat.domain.bo.MatMatPriceHistoryBo;
|
||||
import com.gear.mat.service.IMatMatPriceHistoryService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/matPriceHistory")
|
||||
public class MatMatPriceHistoryController extends BaseController {
|
||||
|
||||
private final IMatMatPriceHistoryService iMatMatPriceHistoryService;
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatMatPriceHistoryVo> list(MatMatPriceHistoryBo bo, PageQuery pageQuery) {
|
||||
return iMatMatPriceHistoryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配料价格/均价变动历史列表
|
||||
*/
|
||||
@Log(title = "配料价格/均价变动历史", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatMatPriceHistoryBo bo, HttpServletResponse response) {
|
||||
List<MatMatPriceHistoryVo> list = iMatMatPriceHistoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "配料价格/均价变动历史", MatMatPriceHistoryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配料价格/均价变动历史详细信息
|
||||
*
|
||||
* @param historyId 主键
|
||||
*/
|
||||
@GetMapping("/{historyId}")
|
||||
public R<MatMatPriceHistoryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long historyId) {
|
||||
return R.ok(iMatMatPriceHistoryService.queryById(historyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料价格/均价变动历史
|
||||
*/
|
||||
@Log(title = "配料价格/均价变动历史", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatMatPriceHistoryBo bo) {
|
||||
return toAjax(iMatMatPriceHistoryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料价格/均价变动历史
|
||||
*/
|
||||
@Log(title = "配料价格/均价变动历史", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMatPriceHistoryBo bo) {
|
||||
return toAjax(iMatMatPriceHistoryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配料价格/均价变动历史
|
||||
*
|
||||
* @param historyIds 主键串
|
||||
*/
|
||||
@Log(title = "配料价格/均价变动历史", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{historyIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] historyIds) {
|
||||
return toAjax(iMatMatPriceHistoryService.deleteWithValidByIds(Arrays.asList(historyIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatMaterialVo;
|
||||
import com.gear.mat.domain.bo.MatMaterialBo;
|
||||
import com.gear.mat.service.IMatMaterialService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/material")
|
||||
public class MatMaterialController extends BaseController {
|
||||
|
||||
private final IMatMaterialService iMatMaterialService;
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatMaterialVo> list(MatMaterialBo bo, PageQuery pageQuery) {
|
||||
return iMatMaterialService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配料配件基础信息列表
|
||||
*/
|
||||
@Log(title = "配料配件基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatMaterialBo bo, HttpServletResponse response) {
|
||||
List<MatMaterialVo> list = iMatMaterialService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "配料配件基础信息", MatMaterialVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配料配件基础信息详细信息
|
||||
*
|
||||
* @param materialId 主键
|
||||
*/
|
||||
@GetMapping("/{materialId}")
|
||||
public R<MatMaterialVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long materialId) {
|
||||
return R.ok(iMatMaterialService.queryById(materialId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料配件基础信息
|
||||
*/
|
||||
@Log(title = "配料配件基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatMaterialBo bo) {
|
||||
return toAjax(iMatMaterialService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料配件基础信息
|
||||
*/
|
||||
@Log(title = "配料配件基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialBo bo) {
|
||||
return toAjax(iMatMaterialService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配料配件基础信息
|
||||
*
|
||||
* @param materialIds 主键串
|
||||
*/
|
||||
@Log(title = "配料配件基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{materialIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] materialIds) {
|
||||
return toAjax(iMatMaterialService.deleteWithValidByIds(Arrays.asList(materialIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatMaterialOutVo;
|
||||
import com.gear.mat.domain.bo.MatMaterialOutBo;
|
||||
import com.gear.mat.service.IMatMaterialOutService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 配料出库
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/materialOut")
|
||||
public class MatMaterialOutController extends BaseController {
|
||||
|
||||
private final IMatMaterialOutService iMatMaterialOutService;
|
||||
|
||||
/**
|
||||
* 查询配料出库列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatMaterialOutVo> list(MatMaterialOutBo bo, PageQuery pageQuery) {
|
||||
return iMatMaterialOutService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配料出库列表
|
||||
*/
|
||||
@Log(title = "配料出库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatMaterialOutBo bo, HttpServletResponse response) {
|
||||
List<MatMaterialOutVo> list = iMatMaterialOutService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "配料出库", MatMaterialOutVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配料出库详细信息
|
||||
*
|
||||
* @param outId 主键
|
||||
*/
|
||||
@GetMapping("/{outId}")
|
||||
public R<MatMaterialOutVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long outId) {
|
||||
return R.ok(iMatMaterialOutService.queryById(outId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料出库
|
||||
*/
|
||||
@Log(title = "配料出库", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatMaterialOutBo bo) {
|
||||
return toAjax(iMatMaterialOutService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料出库
|
||||
*/
|
||||
@Log(title = "配料出库", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialOutBo bo) {
|
||||
return toAjax(iMatMaterialOutService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配料出库
|
||||
*
|
||||
* @param outIds 主键串
|
||||
*/
|
||||
@Log(title = "配料出库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{outIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] outIds) {
|
||||
return toAjax(iMatMaterialOutService.deleteWithValidByIds(Arrays.asList(outIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatProductVo;
|
||||
import com.gear.mat.domain.bo.MatProductBo;
|
||||
import com.gear.mat.service.IMatProductService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产品基础信息
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/product")
|
||||
public class MatProductController extends BaseController {
|
||||
|
||||
private final IMatProductService iMatProductService;
|
||||
|
||||
/**
|
||||
* 查询产品基础信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatProductVo> list(MatProductBo bo, PageQuery pageQuery) {
|
||||
return iMatProductService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品基础信息列表
|
||||
*/
|
||||
@Log(title = "产品基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatProductBo bo, HttpServletResponse response) {
|
||||
List<MatProductVo> list = iMatProductService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品基础信息", MatProductVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品基础信息详细信息
|
||||
*
|
||||
* @param productId 主键
|
||||
*/
|
||||
@GetMapping("/{productId}")
|
||||
public R<MatProductVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long productId) {
|
||||
return R.ok(iMatProductService.queryById(productId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品基础信息
|
||||
*/
|
||||
@Log(title = "产品基础信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatProductBo bo) {
|
||||
return toAjax(iMatProductService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品基础信息
|
||||
*/
|
||||
@Log(title = "产品基础信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatProductBo bo) {
|
||||
return toAjax(iMatProductService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品基础信息
|
||||
*
|
||||
* @param productIds 主键串
|
||||
*/
|
||||
@Log(title = "产品基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{productIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] productIds) {
|
||||
return toAjax(iMatProductService.deleteWithValidByIds(Arrays.asList(productIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatProductMaterialRelationVo;
|
||||
import com.gear.mat.domain.bo.MatProductMaterialRelationBo;
|
||||
import com.gear.mat.service.IMatProductMaterialRelationService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/productMaterialRelation")
|
||||
public class MatProductMaterialRelationController extends BaseController {
|
||||
|
||||
private final IMatProductMaterialRelationService iMatProductMaterialRelationService;
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatProductMaterialRelationVo> list(MatProductMaterialRelationBo bo, PageQuery pageQuery) {
|
||||
return iMatProductMaterialRelationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品-配料关联中间列表
|
||||
*/
|
||||
@Log(title = "产品-配料关联中间", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatProductMaterialRelationBo bo, HttpServletResponse response) {
|
||||
List<MatProductMaterialRelationVo> list = iMatProductMaterialRelationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品-配料关联中间", MatProductMaterialRelationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品-配料关联中间详细信息
|
||||
*
|
||||
* @param relationId 主键
|
||||
*/
|
||||
@GetMapping("/{relationId}")
|
||||
public R<MatProductMaterialRelationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long relationId) {
|
||||
return R.ok(iMatProductMaterialRelationService.queryById(relationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品-配料关联中间
|
||||
*/
|
||||
@Log(title = "产品-配料关联中间", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatProductMaterialRelationBo bo) {
|
||||
return toAjax(iMatProductMaterialRelationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品-配料关联中间
|
||||
*/
|
||||
@Log(title = "产品-配料关联中间", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatProductMaterialRelationBo bo) {
|
||||
return toAjax(iMatProductMaterialRelationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品-配料关联中间
|
||||
*
|
||||
* @param relationIds 主键串
|
||||
*/
|
||||
@Log(title = "产品-配料关联中间", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{relationIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] relationIds) {
|
||||
return toAjax(iMatProductMaterialRelationService.deleteWithValidByIds(Arrays.asList(relationIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatPurchaseVo;
|
||||
import com.gear.mat.domain.bo.MatPurchaseBo;
|
||||
import com.gear.mat.service.IMatPurchaseService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/purchase")
|
||||
public class MatPurchaseController extends BaseController {
|
||||
|
||||
private final IMatPurchaseService iMatPurchaseService;
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatPurchaseVo> list(MatPurchaseBo bo, PageQuery pageQuery) {
|
||||
return iMatPurchaseService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购单主(管理在途库存)列表
|
||||
*/
|
||||
@Log(title = "采购单主(管理在途库存)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatPurchaseBo bo, HttpServletResponse response) {
|
||||
List<MatPurchaseVo> list = iMatPurchaseService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "采购单主(管理在途库存)", MatPurchaseVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购单主(管理在途库存)详细信息
|
||||
*
|
||||
* @param purchaseId 主键
|
||||
*/
|
||||
@GetMapping("/{purchaseId}")
|
||||
public R<MatPurchaseVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long purchaseId) {
|
||||
return R.ok(iMatPurchaseService.queryById(purchaseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购单主(管理在途库存)
|
||||
*/
|
||||
@Log(title = "采购单主(管理在途库存)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatPurchaseBo bo) {
|
||||
return toAjax(iMatPurchaseService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购单主(管理在途库存)
|
||||
*/
|
||||
@Log(title = "采购单主(管理在途库存)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatPurchaseBo bo) {
|
||||
return toAjax(iMatPurchaseService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购单主(管理在途库存)
|
||||
*
|
||||
* @param purchaseIds 主键串
|
||||
*/
|
||||
@Log(title = "采购单主(管理在途库存)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{purchaseIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] purchaseIds) {
|
||||
return toAjax(iMatPurchaseService.deleteWithValidByIds(Arrays.asList(purchaseIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mat.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.core.validate.QueryGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mat.domain.vo.MatPurchaseInDetailVo;
|
||||
import com.gear.mat.domain.bo.MatPurchaseInDetailBo;
|
||||
import com.gear.mat.service.IMatPurchaseInDetailService;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库记录
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mat/purchaseInDetail")
|
||||
public class MatPurchaseInDetailController extends BaseController {
|
||||
|
||||
private final IMatPurchaseInDetailService iMatPurchaseInDetailService;
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MatPurchaseInDetailVo> list(MatPurchaseInDetailBo bo, PageQuery pageQuery) {
|
||||
return iMatPurchaseInDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库记录列表
|
||||
*/
|
||||
@Log(title = "入库记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MatPurchaseInDetailBo bo, HttpServletResponse response) {
|
||||
List<MatPurchaseInDetailVo> list = iMatPurchaseInDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "入库记录", MatPurchaseInDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库记录详细信息
|
||||
*
|
||||
* @param detailId 主键
|
||||
*/
|
||||
@GetMapping("/{detailId}")
|
||||
public R<MatPurchaseInDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long detailId) {
|
||||
return R.ok(iMatPurchaseInDetailService.queryById(detailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*/
|
||||
@Log(title = "入库记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MatPurchaseInDetailBo bo) {
|
||||
return toAjax(iMatPurchaseInDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*/
|
||||
@Log(title = "入库记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatPurchaseInDetailBo bo) {
|
||||
return toAjax(iMatPurchaseInDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库记录
|
||||
*
|
||||
* @param detailIds 主键串
|
||||
*/
|
||||
@Log(title = "入库记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{detailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] detailIds) {
|
||||
return toAjax(iMatPurchaseInDetailService.deleteWithValidByIds(Arrays.asList(detailIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史对象 mat_mat_price_history
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_mat_price_history")
|
||||
public class MatMatPriceHistory extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "history_id")
|
||||
private Long historyId;
|
||||
/**
|
||||
* 配料ID
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 本次入库价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 本次计算后的均价
|
||||
*/
|
||||
private BigDecimal avgPrice;
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
65
gear-mat/src/main/java/com/gear/mat/domain/MatMaterial.java
Normal file
65
gear-mat/src/main/java/com/gear/mat/domain/MatMaterial.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息对象 mat_material
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_material")
|
||||
public class MatMaterial extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 配料ID 主键
|
||||
*/
|
||||
@TableId(value = "material_id")
|
||||
private Long materialId;
|
||||
/**
|
||||
* 配料名称
|
||||
*/
|
||||
private String materialName;
|
||||
/**
|
||||
* 配料规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 配料型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
/**
|
||||
* 计量单位 个/公斤/米等
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 现存库存(已入库) 不能为负
|
||||
*/
|
||||
private BigDecimal currentStock;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料出库对象 mat_material_out
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_material_out")
|
||||
public class MatMaterialOut extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 出库ID 主键
|
||||
*/
|
||||
@TableId(value = "out_id")
|
||||
private Long outId;
|
||||
/**
|
||||
* 出库单号 唯一 如O20260130001
|
||||
*/
|
||||
private String outNo;
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 本次出库数量 不能超过现存库存
|
||||
*/
|
||||
private BigDecimal outNum;
|
||||
/**
|
||||
* 出库原因 生产使用/样品/报废等
|
||||
*/
|
||||
private String outReason;
|
||||
/**
|
||||
* 出库操作人
|
||||
*/
|
||||
private String operator;
|
||||
/**
|
||||
* 实际出库时间
|
||||
*/
|
||||
private Date outTime;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
57
gear-mat/src/main/java/com/gear/mat/domain/MatProduct.java
Normal file
57
gear-mat/src/main/java/com/gear/mat/domain/MatProduct.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品基础信息对象 mat_product
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_product")
|
||||
public class MatProduct extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 产品ID 主键
|
||||
*/
|
||||
@TableId(value = "product_id")
|
||||
private Long productId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 产品规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 产品型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 产品单价 可手动维护
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间对象 mat_product_material_relation
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_product_material_relation")
|
||||
public class MatProductMaterialRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 关联ID 主键
|
||||
*/
|
||||
@TableId(value = "relation_id")
|
||||
private Long relationId;
|
||||
/**
|
||||
* 产品ID 关联t_product.id
|
||||
*/
|
||||
private Long productId;
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 单产品所需配料数量 默认为1
|
||||
*/
|
||||
private BigDecimal materialNum;
|
||||
/**
|
||||
* 配料排序 用于前端展示顺序
|
||||
*/
|
||||
private Long sort;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
79
gear-mat/src/main/java/com/gear/mat/domain/MatPurchase.java
Normal file
79
gear-mat/src/main/java/com/gear/mat/domain/MatPurchase.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)对象 mat_purchase
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_purchase")
|
||||
public class MatPurchase extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 采购单ID 主键
|
||||
*/
|
||||
@TableId(value = "purchase_id")
|
||||
private Long purchaseId;
|
||||
/**
|
||||
* 采购单号 唯一 如P20260130001
|
||||
*/
|
||||
private String purchaseNo;
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
/**
|
||||
* 配料ID 关联material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 采购计划数量
|
||||
*/
|
||||
private BigDecimal planNum;
|
||||
/**
|
||||
* 采购单价(本次录入价格)
|
||||
*/
|
||||
private BigDecimal purchasePrice;
|
||||
/**
|
||||
* 采购截止日期(要求入库日期)
|
||||
*/
|
||||
private Date deadline;
|
||||
/**
|
||||
* 采购状态 1-待入(在途) 2-已完成(全部入库) 3-已取消(归零) 4-部分入库
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 取消时间 状态为3时赋值
|
||||
*/
|
||||
private Date cancelTime;
|
||||
/**
|
||||
* 采购人/操作人
|
||||
*/
|
||||
private String operator;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gear.mat.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入库记录对象 mat_purchase_in_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mat_purchase_in_detail")
|
||||
public class MatPurchaseInDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 入库明细ID 主键
|
||||
*/
|
||||
@TableId(value = "detail_id")
|
||||
private Long detailId;
|
||||
/**
|
||||
* 采购单ID 关联t_purchase.id
|
||||
*/
|
||||
private Long purchaseId;
|
||||
/**
|
||||
* 配料ID 关联t_material.id 冗余字段 提升查询效率
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
private BigDecimal inNum;
|
||||
/**
|
||||
* 本次入库单价(同采购单单价)
|
||||
*/
|
||||
private BigDecimal inPrice;
|
||||
/**
|
||||
* 本次入库金额 计算列
|
||||
*/
|
||||
private BigDecimal inAmount;
|
||||
/**
|
||||
* 实际入库时间
|
||||
*/
|
||||
private Date inTime;
|
||||
/**
|
||||
* 入库操作人
|
||||
*/
|
||||
private String operator;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史业务对象 mat_mat_price_history
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatMatPriceHistoryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long historyId;
|
||||
|
||||
/**
|
||||
* 配料ID
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次入库价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 本次计算后的均价
|
||||
*/
|
||||
private BigDecimal avgPrice;
|
||||
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息业务对象 mat_material
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatMaterialBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 配料ID 主键
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 配料名称
|
||||
*/
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 配料规格
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 配料型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 计量单位 个/公斤/米等
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 现存库存(已入库) 不能为负
|
||||
*/
|
||||
private BigDecimal currentStock;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 配料出库业务对象 mat_material_out
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatMaterialOutBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 出库ID 主键
|
||||
*/
|
||||
private Long outId;
|
||||
|
||||
/**
|
||||
* 出库单号 唯一 如O20260130001
|
||||
*/
|
||||
private String outNo;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次出库数量 不能超过现存库存
|
||||
*/
|
||||
private BigDecimal outNum;
|
||||
|
||||
/**
|
||||
* 出库原因 生产使用/样品/报废等
|
||||
*/
|
||||
private String outReason;
|
||||
|
||||
/**
|
||||
* 出库操作人
|
||||
*/
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 实际出库时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date outTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品基础信息业务对象 mat_product
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatProductBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 产品ID 主键
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品规格
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 产品型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 产品单价 可手动维护
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间业务对象 mat_product_material_relation
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatProductMaterialRelationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 关联ID 主键
|
||||
*/
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 产品ID 关联t_product.id
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 单产品所需配料数量 默认为1
|
||||
*/
|
||||
private BigDecimal materialNum;
|
||||
|
||||
/**
|
||||
* 配料排序 用于前端展示顺序
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)业务对象 mat_purchase
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatPurchaseBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 采购单ID 主键
|
||||
*/
|
||||
private Long purchaseId;
|
||||
|
||||
/**
|
||||
* 采购单号 唯一 如P20260130001
|
||||
*/
|
||||
private String purchaseNo;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 配料ID 关联material.id
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 采购计划数量
|
||||
*/
|
||||
private BigDecimal planNum;
|
||||
|
||||
/**
|
||||
* 采购单价(本次录入价格)
|
||||
*/
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/**
|
||||
* 采购截止日期(要求入库日期)
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
* 采购状态 1-待入(在途) 2-已完成(全部入库) 3-已取消(归零) 4-部分入库
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 取消时间 状态为3时赋值
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 采购人/操作人
|
||||
*/
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.gear.mat.domain.bo;
|
||||
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入库记录业务对象 mat_purchase_in_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MatPurchaseInDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 入库明细ID 主键
|
||||
*/
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 采购单ID 关联t_purchase.id
|
||||
*/
|
||||
private Long purchaseId;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id 冗余字段 提升查询效率
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
private BigDecimal inNum;
|
||||
|
||||
/**
|
||||
* 本次入库单价(同采购单单价)
|
||||
*/
|
||||
private BigDecimal inPrice;
|
||||
|
||||
/**
|
||||
* 本次入库金额 计算列
|
||||
*/
|
||||
private BigDecimal inAmount;
|
||||
|
||||
/**
|
||||
* 实际入库时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date inTime;
|
||||
|
||||
/**
|
||||
* 入库操作人
|
||||
*/
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史视图对象 mat_mat_price_history
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatMatPriceHistoryVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long historyId;
|
||||
|
||||
/**
|
||||
* 配料ID
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次入库价格
|
||||
*/
|
||||
@ExcelProperty(value = "本次入库价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 本次计算后的均价
|
||||
*/
|
||||
@ExcelProperty(value = "本次计算后的均价")
|
||||
private BigDecimal avgPrice;
|
||||
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
@ExcelProperty(value = "本次入库数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配料出库视图对象 mat_material_out
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatMaterialOutVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出库ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "出库ID 主键")
|
||||
private Long outId;
|
||||
|
||||
/**
|
||||
* 出库单号 唯一 如O20260130001
|
||||
*/
|
||||
@ExcelProperty(value = "出库单号 唯一 如O20260130001")
|
||||
private String outNo;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID 关联t_material.id")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次出库数量 不能超过现存库存
|
||||
*/
|
||||
@ExcelProperty(value = "本次出库数量 不能超过现存库存")
|
||||
private BigDecimal outNum;
|
||||
|
||||
/**
|
||||
* 出库原因 生产使用/样品/报废等
|
||||
*/
|
||||
@ExcelProperty(value = "出库原因 生产使用/样品/报废等")
|
||||
private String outReason;
|
||||
|
||||
/**
|
||||
* 出库操作人
|
||||
*/
|
||||
@ExcelProperty(value = "出库操作人")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 实际出库时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际出库时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date outTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配料配件基础信息视图对象 mat_material
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatMaterialVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 配料ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID 主键")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 配料名称
|
||||
*/
|
||||
@ExcelProperty(value = "配料名称")
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 配料规格
|
||||
*/
|
||||
@ExcelProperty(value = "配料规格")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 配料型号
|
||||
*/
|
||||
@ExcelProperty(value = "配料型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
@ExcelProperty(value = "厂家")
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 计量单位 个/公斤/米等
|
||||
*/
|
||||
@ExcelProperty(value = "计量单位 个/公斤/米等")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 现存库存(已入库) 不能为负
|
||||
*/
|
||||
@ExcelProperty(value = "现存库存", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "已=入库")
|
||||
private BigDecimal currentStock;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间视图对象 mat_product_material_relation
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatProductMaterialRelationVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "关联ID 主键")
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 产品ID 关联t_product.id
|
||||
*/
|
||||
@ExcelProperty(value = "产品ID 关联t_product.id")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID 关联t_material.id")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 单产品所需配料数量 默认为1
|
||||
*/
|
||||
@ExcelProperty(value = "单产品所需配料数量 默认为1")
|
||||
private BigDecimal materialNum;
|
||||
|
||||
/**
|
||||
* 配料排序 用于前端展示顺序
|
||||
*/
|
||||
@ExcelProperty(value = "配料排序 用于前端展示顺序")
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 产品基础信息视图对象 mat_product
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatProductVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "产品ID 主键")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@ExcelProperty(value = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品规格
|
||||
*/
|
||||
@ExcelProperty(value = "产品规格")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 产品型号
|
||||
*/
|
||||
@ExcelProperty(value = "产品型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 产品单价 可手动维护
|
||||
*/
|
||||
@ExcelProperty(value = "产品单价 可手动维护")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 入库记录视图对象 mat_purchase_in_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatPurchaseInDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 入库明细ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "入库明细ID 主键")
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 采购单ID 关联t_purchase.id
|
||||
*/
|
||||
@ExcelProperty(value = "采购单ID 关联t_purchase.id")
|
||||
private Long purchaseId;
|
||||
|
||||
/**
|
||||
* 配料ID 关联t_material.id 冗余字段 提升查询效率
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID 关联t_material.id 冗余字段 提升查询效率")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 本次入库数量
|
||||
*/
|
||||
@ExcelProperty(value = "本次入库数量")
|
||||
private BigDecimal inNum;
|
||||
|
||||
/**
|
||||
* 本次入库单价(同采购单单价)
|
||||
*/
|
||||
@ExcelProperty(value = "本次入库单价", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "同=采购单单价")
|
||||
private BigDecimal inPrice;
|
||||
|
||||
/**
|
||||
* 本次入库金额 计算列
|
||||
*/
|
||||
@ExcelProperty(value = "本次入库金额 计算列")
|
||||
private BigDecimal inAmount;
|
||||
|
||||
/**
|
||||
* 实际入库时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际入库时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date inTime;
|
||||
|
||||
/**
|
||||
* 入库操作人
|
||||
*/
|
||||
@ExcelProperty(value = "入库操作人")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
101
gear-mat/src/main/java/com/gear/mat/domain/vo/MatPurchaseVo.java
Normal file
101
gear-mat/src/main/java/com/gear/mat/domain/vo/MatPurchaseVo.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package com.gear.mat.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)视图对象 mat_purchase
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MatPurchaseVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 采购单ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "采购单ID 主键")
|
||||
private Long purchaseId;
|
||||
|
||||
/**
|
||||
* 采购单号 唯一 如P20260130001
|
||||
*/
|
||||
@ExcelProperty(value = "采购单号 唯一 如P20260130001")
|
||||
private String purchaseNo;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
@ExcelProperty(value = "厂家")
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 配料ID 关联material.id
|
||||
*/
|
||||
@ExcelProperty(value = "配料ID 关联material.id")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 采购计划数量
|
||||
*/
|
||||
@ExcelProperty(value = "采购计划数量")
|
||||
private BigDecimal planNum;
|
||||
|
||||
/**
|
||||
* 采购单价(本次录入价格)
|
||||
*/
|
||||
@ExcelProperty(value = "采购单价", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "本=次录入价格")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/**
|
||||
* 采购截止日期(要求入库日期)
|
||||
*/
|
||||
@ExcelProperty(value = "采购截止日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "要=求入库日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
* 采购状态 1-待入(在途) 2-已完成(全部入库) 3-已取消(归零) 4-部分入库
|
||||
*/
|
||||
@ExcelProperty(value = "采购状态 1-待入", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "在=途")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 取消时间 状态为3时赋值
|
||||
*/
|
||||
@ExcelProperty(value = "取消时间 状态为3时赋值")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 采购人/操作人
|
||||
*/
|
||||
@ExcelProperty(value = "采购人/操作人")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatMatPriceHistory;
|
||||
import com.gear.mat.domain.vo.MatMatPriceHistoryVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatMatPriceHistoryMapper extends BaseMapperPlus<MatMatPriceHistoryMapper, MatMatPriceHistory, MatMatPriceHistoryVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatMaterial;
|
||||
import com.gear.mat.domain.vo.MatMaterialVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatMaterialMapper extends BaseMapperPlus<MatMaterialMapper, MatMaterial, MatMaterialVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatMaterialOut;
|
||||
import com.gear.mat.domain.vo.MatMaterialOutVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 配料出库Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatMaterialOutMapper extends BaseMapperPlus<MatMaterialOutMapper, MatMaterialOut, MatMaterialOutVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatProduct;
|
||||
import com.gear.mat.domain.vo.MatProductVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 产品基础信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatProductMapper extends BaseMapperPlus<MatProductMapper, MatProduct, MatProductVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatProductMaterialRelation;
|
||||
import com.gear.mat.domain.vo.MatProductMaterialRelationVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatProductMaterialRelationMapper extends BaseMapperPlus<MatProductMaterialRelationMapper, MatProductMaterialRelation, MatProductMaterialRelationVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatPurchaseInDetail;
|
||||
import com.gear.mat.domain.vo.MatPurchaseInDetailVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 入库记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatPurchaseInDetailMapper extends BaseMapperPlus<MatPurchaseInDetailMapper, MatPurchaseInDetail, MatPurchaseInDetailVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mat.mapper;
|
||||
|
||||
import com.gear.mat.domain.MatPurchase;
|
||||
import com.gear.mat.domain.vo.MatPurchaseVo;
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface MatPurchaseMapper extends BaseMapperPlus<MatPurchaseMapper, MatPurchase, MatPurchaseVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatMatPriceHistory;
|
||||
import com.gear.mat.domain.vo.MatMatPriceHistoryVo;
|
||||
import com.gear.mat.domain.bo.MatMatPriceHistoryBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatMatPriceHistoryService {
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史
|
||||
*/
|
||||
MatMatPriceHistoryVo queryById(Long historyId);
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史列表
|
||||
*/
|
||||
TableDataInfo<MatMatPriceHistoryVo> queryPageList(MatMatPriceHistoryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史列表
|
||||
*/
|
||||
List<MatMatPriceHistoryVo> queryList(MatMatPriceHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 新增配料价格/均价变动历史
|
||||
*/
|
||||
Boolean insertByBo(MatMatPriceHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 修改配料价格/均价变动历史
|
||||
*/
|
||||
Boolean updateByBo(MatMatPriceHistoryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除配料价格/均价变动历史信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatMaterialOut;
|
||||
import com.gear.mat.domain.vo.MatMaterialOutVo;
|
||||
import com.gear.mat.domain.bo.MatMaterialOutBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配料出库Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatMaterialOutService {
|
||||
|
||||
/**
|
||||
* 查询配料出库
|
||||
*/
|
||||
MatMaterialOutVo queryById(Long outId);
|
||||
|
||||
/**
|
||||
* 查询配料出库列表
|
||||
*/
|
||||
TableDataInfo<MatMaterialOutVo> queryPageList(MatMaterialOutBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询配料出库列表
|
||||
*/
|
||||
List<MatMaterialOutVo> queryList(MatMaterialOutBo bo);
|
||||
|
||||
/**
|
||||
* 新增配料出库
|
||||
*/
|
||||
Boolean insertByBo(MatMaterialOutBo bo);
|
||||
|
||||
/**
|
||||
* 修改配料出库
|
||||
*/
|
||||
Boolean updateByBo(MatMaterialOutBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除配料出库信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatMaterial;
|
||||
import com.gear.mat.domain.vo.MatMaterialVo;
|
||||
import com.gear.mat.domain.bo.MatMaterialBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatMaterialService {
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息
|
||||
*/
|
||||
MatMaterialVo queryById(Long materialId);
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息列表
|
||||
*/
|
||||
TableDataInfo<MatMaterialVo> queryPageList(MatMaterialBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息列表
|
||||
*/
|
||||
List<MatMaterialVo> queryList(MatMaterialBo bo);
|
||||
|
||||
/**
|
||||
* 新增配料配件基础信息
|
||||
*/
|
||||
Boolean insertByBo(MatMaterialBo bo);
|
||||
|
||||
/**
|
||||
* 修改配料配件基础信息
|
||||
*/
|
||||
Boolean updateByBo(MatMaterialBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除配料配件基础信息信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatProductMaterialRelation;
|
||||
import com.gear.mat.domain.vo.MatProductMaterialRelationVo;
|
||||
import com.gear.mat.domain.bo.MatProductMaterialRelationBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatProductMaterialRelationService {
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间
|
||||
*/
|
||||
MatProductMaterialRelationVo queryById(Long relationId);
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间列表
|
||||
*/
|
||||
TableDataInfo<MatProductMaterialRelationVo> queryPageList(MatProductMaterialRelationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间列表
|
||||
*/
|
||||
List<MatProductMaterialRelationVo> queryList(MatProductMaterialRelationBo bo);
|
||||
|
||||
/**
|
||||
* 新增产品-配料关联中间
|
||||
*/
|
||||
Boolean insertByBo(MatProductMaterialRelationBo bo);
|
||||
|
||||
/**
|
||||
* 修改产品-配料关联中间
|
||||
*/
|
||||
Boolean updateByBo(MatProductMaterialRelationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除产品-配料关联中间信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatProduct;
|
||||
import com.gear.mat.domain.vo.MatProductVo;
|
||||
import com.gear.mat.domain.bo.MatProductBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品基础信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatProductService {
|
||||
|
||||
/**
|
||||
* 查询产品基础信息
|
||||
*/
|
||||
MatProductVo queryById(Long productId);
|
||||
|
||||
/**
|
||||
* 查询产品基础信息列表
|
||||
*/
|
||||
TableDataInfo<MatProductVo> queryPageList(MatProductBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询产品基础信息列表
|
||||
*/
|
||||
List<MatProductVo> queryList(MatProductBo bo);
|
||||
|
||||
/**
|
||||
* 新增产品基础信息
|
||||
*/
|
||||
Boolean insertByBo(MatProductBo bo);
|
||||
|
||||
/**
|
||||
* 修改产品基础信息
|
||||
*/
|
||||
Boolean updateByBo(MatProductBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除产品基础信息信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatPurchaseInDetail;
|
||||
import com.gear.mat.domain.vo.MatPurchaseInDetailVo;
|
||||
import com.gear.mat.domain.bo.MatPurchaseInDetailBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatPurchaseInDetailService {
|
||||
|
||||
/**
|
||||
* 查询入库记录
|
||||
*/
|
||||
MatPurchaseInDetailVo queryById(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
TableDataInfo<MatPurchaseInDetailVo> queryPageList(MatPurchaseInDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
List<MatPurchaseInDetailVo> queryList(MatPurchaseInDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*/
|
||||
Boolean insertByBo(MatPurchaseInDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*/
|
||||
Boolean updateByBo(MatPurchaseInDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除入库记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.mat.service;
|
||||
|
||||
import com.gear.mat.domain.MatPurchase;
|
||||
import com.gear.mat.domain.vo.MatPurchaseVo;
|
||||
import com.gear.mat.domain.bo.MatPurchaseBo;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
public interface IMatPurchaseService {
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)
|
||||
*/
|
||||
MatPurchaseVo queryById(Long purchaseId);
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)列表
|
||||
*/
|
||||
TableDataInfo<MatPurchaseVo> queryPageList(MatPurchaseBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)列表
|
||||
*/
|
||||
List<MatPurchaseVo> queryList(MatPurchaseBo bo);
|
||||
|
||||
/**
|
||||
* 新增采购单主(管理在途库存)
|
||||
*/
|
||||
Boolean insertByBo(MatPurchaseBo bo);
|
||||
|
||||
/**
|
||||
* 修改采购单主(管理在途库存)
|
||||
*/
|
||||
Boolean updateByBo(MatPurchaseBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除采购单主(管理在途库存)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatMatPriceHistoryBo;
|
||||
import com.gear.mat.domain.vo.MatMatPriceHistoryVo;
|
||||
import com.gear.mat.domain.MatMatPriceHistory;
|
||||
import com.gear.mat.mapper.MatMatPriceHistoryMapper;
|
||||
import com.gear.mat.service.IMatMatPriceHistoryService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 配料价格/均价变动历史Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatMatPriceHistoryServiceImpl implements IMatMatPriceHistoryService {
|
||||
|
||||
private final MatMatPriceHistoryMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史
|
||||
*/
|
||||
@Override
|
||||
public MatMatPriceHistoryVo queryById(Long historyId){
|
||||
return baseMapper.selectVoById(historyId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatMatPriceHistoryVo> queryPageList(MatMatPriceHistoryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatMatPriceHistory> lqw = buildQueryWrapper(bo);
|
||||
Page<MatMatPriceHistoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料价格/均价变动历史列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatMatPriceHistoryVo> queryList(MatMatPriceHistoryBo bo) {
|
||||
LambdaQueryWrapper<MatMatPriceHistory> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatMatPriceHistory> buildQueryWrapper(MatMatPriceHistoryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatMatPriceHistory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getMaterialId() != null, MatMatPriceHistory::getMaterialId, bo.getMaterialId());
|
||||
lqw.eq(bo.getPrice() != null, MatMatPriceHistory::getPrice, bo.getPrice());
|
||||
lqw.eq(bo.getAvgPrice() != null, MatMatPriceHistory::getAvgPrice, bo.getAvgPrice());
|
||||
lqw.eq(bo.getQuantity() != null, MatMatPriceHistory::getQuantity, bo.getQuantity());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料价格/均价变动历史
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatMatPriceHistoryBo bo) {
|
||||
MatMatPriceHistory add = BeanUtil.toBean(bo, MatMatPriceHistory.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setHistoryId(add.getHistoryId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料价格/均价变动历史
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatMatPriceHistoryBo bo) {
|
||||
MatMatPriceHistory update = BeanUtil.toBean(bo, MatMatPriceHistory.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatMatPriceHistory entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配料价格/均价变动历史
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatMaterialOutBo;
|
||||
import com.gear.mat.domain.vo.MatMaterialOutVo;
|
||||
import com.gear.mat.domain.MatMaterialOut;
|
||||
import com.gear.mat.mapper.MatMaterialOutMapper;
|
||||
import com.gear.mat.service.IMatMaterialOutService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 配料出库Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatMaterialOutServiceImpl implements IMatMaterialOutService {
|
||||
|
||||
private final MatMaterialOutMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询配料出库
|
||||
*/
|
||||
@Override
|
||||
public MatMaterialOutVo queryById(Long outId){
|
||||
return baseMapper.selectVoById(outId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料出库列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatMaterialOutVo> queryPageList(MatMaterialOutBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatMaterialOut> lqw = buildQueryWrapper(bo);
|
||||
Page<MatMaterialOutVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料出库列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatMaterialOutVo> queryList(MatMaterialOutBo bo) {
|
||||
LambdaQueryWrapper<MatMaterialOut> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatMaterialOut> buildQueryWrapper(MatMaterialOutBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatMaterialOut> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOutNo()), MatMaterialOut::getOutNo, bo.getOutNo());
|
||||
lqw.eq(bo.getMaterialId() != null, MatMaterialOut::getMaterialId, bo.getMaterialId());
|
||||
lqw.eq(bo.getOutNum() != null, MatMaterialOut::getOutNum, bo.getOutNum());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOutReason()), MatMaterialOut::getOutReason, bo.getOutReason());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOperator()), MatMaterialOut::getOperator, bo.getOperator());
|
||||
lqw.eq(bo.getOutTime() != null, MatMaterialOut::getOutTime, bo.getOutTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料出库
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatMaterialOutBo bo) {
|
||||
MatMaterialOut add = BeanUtil.toBean(bo, MatMaterialOut.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOutId(add.getOutId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料出库
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatMaterialOutBo bo) {
|
||||
MatMaterialOut update = BeanUtil.toBean(bo, MatMaterialOut.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatMaterialOut entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配料出库
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatMaterialBo;
|
||||
import com.gear.mat.domain.vo.MatMaterialVo;
|
||||
import com.gear.mat.domain.MatMaterial;
|
||||
import com.gear.mat.mapper.MatMaterialMapper;
|
||||
import com.gear.mat.service.IMatMaterialService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 配料配件基础信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatMaterialServiceImpl implements IMatMaterialService {
|
||||
|
||||
private final MatMaterialMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息
|
||||
*/
|
||||
@Override
|
||||
public MatMaterialVo queryById(Long materialId){
|
||||
return baseMapper.selectVoById(materialId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatMaterialVo> queryPageList(MatMaterialBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatMaterial> lqw = buildQueryWrapper(bo);
|
||||
Page<MatMaterialVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配料配件基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatMaterialVo> queryList(MatMaterialBo bo) {
|
||||
LambdaQueryWrapper<MatMaterial> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatMaterial> buildQueryWrapper(MatMaterialBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatMaterial> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMaterialName()), MatMaterial::getMaterialName, bo.getMaterialName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpec()), MatMaterial::getSpec, bo.getSpec());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), MatMaterial::getModel, bo.getModel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactory()), MatMaterial::getFactory, bo.getFactory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), MatMaterial::getUnit, bo.getUnit());
|
||||
lqw.eq(bo.getCurrentStock() != null, MatMaterial::getCurrentStock, bo.getCurrentStock());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配料配件基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatMaterialBo bo) {
|
||||
MatMaterial add = BeanUtil.toBean(bo, MatMaterial.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setMaterialId(add.getMaterialId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配料配件基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatMaterialBo bo) {
|
||||
MatMaterial update = BeanUtil.toBean(bo, MatMaterial.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatMaterial entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配料配件基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatProductMaterialRelationBo;
|
||||
import com.gear.mat.domain.vo.MatProductMaterialRelationVo;
|
||||
import com.gear.mat.domain.MatProductMaterialRelation;
|
||||
import com.gear.mat.mapper.MatProductMaterialRelationMapper;
|
||||
import com.gear.mat.service.IMatProductMaterialRelationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 产品-配料关联中间Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatProductMaterialRelationServiceImpl implements IMatProductMaterialRelationService {
|
||||
|
||||
private final MatProductMaterialRelationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间
|
||||
*/
|
||||
@Override
|
||||
public MatProductMaterialRelationVo queryById(Long relationId){
|
||||
return baseMapper.selectVoById(relationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatProductMaterialRelationVo> queryPageList(MatProductMaterialRelationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatProductMaterialRelation> lqw = buildQueryWrapper(bo);
|
||||
Page<MatProductMaterialRelationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品-配料关联中间列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatProductMaterialRelationVo> queryList(MatProductMaterialRelationBo bo) {
|
||||
LambdaQueryWrapper<MatProductMaterialRelation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatProductMaterialRelation> buildQueryWrapper(MatProductMaterialRelationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatProductMaterialRelation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getProductId() != null, MatProductMaterialRelation::getProductId, bo.getProductId());
|
||||
lqw.eq(bo.getMaterialId() != null, MatProductMaterialRelation::getMaterialId, bo.getMaterialId());
|
||||
lqw.eq(bo.getMaterialNum() != null, MatProductMaterialRelation::getMaterialNum, bo.getMaterialNum());
|
||||
lqw.eq(bo.getSort() != null, MatProductMaterialRelation::getSort, bo.getSort());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品-配料关联中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatProductMaterialRelationBo bo) {
|
||||
MatProductMaterialRelation add = BeanUtil.toBean(bo, MatProductMaterialRelation.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRelationId(add.getRelationId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品-配料关联中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatProductMaterialRelationBo bo) {
|
||||
MatProductMaterialRelation update = BeanUtil.toBean(bo, MatProductMaterialRelation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatProductMaterialRelation entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品-配料关联中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatProductBo;
|
||||
import com.gear.mat.domain.vo.MatProductVo;
|
||||
import com.gear.mat.domain.MatProduct;
|
||||
import com.gear.mat.mapper.MatProductMapper;
|
||||
import com.gear.mat.service.IMatProductService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 产品基础信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatProductServiceImpl implements IMatProductService {
|
||||
|
||||
private final MatProductMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询产品基础信息
|
||||
*/
|
||||
@Override
|
||||
public MatProductVo queryById(Long productId){
|
||||
return baseMapper.selectVoById(productId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatProductVo> queryPageList(MatProductBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatProduct> lqw = buildQueryWrapper(bo);
|
||||
Page<MatProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品基础信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatProductVo> queryList(MatProductBo bo) {
|
||||
LambdaQueryWrapper<MatProduct> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatProduct> buildQueryWrapper(MatProductBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatProduct> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProductName()), MatProduct::getProductName, bo.getProductName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpec()), MatProduct::getSpec, bo.getSpec());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), MatProduct::getModel, bo.getModel());
|
||||
lqw.eq(bo.getUnitPrice() != null, MatProduct::getUnitPrice, bo.getUnitPrice());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatProductBo bo) {
|
||||
MatProduct add = BeanUtil.toBean(bo, MatProduct.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setProductId(add.getProductId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatProductBo bo) {
|
||||
MatProduct update = BeanUtil.toBean(bo, MatProduct.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatProduct entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品基础信息
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatPurchaseInDetailBo;
|
||||
import com.gear.mat.domain.vo.MatPurchaseInDetailVo;
|
||||
import com.gear.mat.domain.MatPurchaseInDetail;
|
||||
import com.gear.mat.mapper.MatPurchaseInDetailMapper;
|
||||
import com.gear.mat.service.IMatPurchaseInDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 入库记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatPurchaseInDetailServiceImpl implements IMatPurchaseInDetailService {
|
||||
|
||||
private final MatPurchaseInDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询入库记录
|
||||
*/
|
||||
@Override
|
||||
public MatPurchaseInDetailVo queryById(Long detailId){
|
||||
return baseMapper.selectVoById(detailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatPurchaseInDetailVo> queryPageList(MatPurchaseInDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatPurchaseInDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<MatPurchaseInDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatPurchaseInDetailVo> queryList(MatPurchaseInDetailBo bo) {
|
||||
LambdaQueryWrapper<MatPurchaseInDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatPurchaseInDetail> buildQueryWrapper(MatPurchaseInDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatPurchaseInDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getPurchaseId() != null, MatPurchaseInDetail::getPurchaseId, bo.getPurchaseId());
|
||||
lqw.eq(bo.getMaterialId() != null, MatPurchaseInDetail::getMaterialId, bo.getMaterialId());
|
||||
lqw.eq(bo.getInNum() != null, MatPurchaseInDetail::getInNum, bo.getInNum());
|
||||
lqw.eq(bo.getInPrice() != null, MatPurchaseInDetail::getInPrice, bo.getInPrice());
|
||||
lqw.eq(bo.getInAmount() != null, MatPurchaseInDetail::getInAmount, bo.getInAmount());
|
||||
lqw.eq(bo.getInTime() != null, MatPurchaseInDetail::getInTime, bo.getInTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOperator()), MatPurchaseInDetail::getOperator, bo.getOperator());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatPurchaseInDetailBo bo) {
|
||||
MatPurchaseInDetail add = BeanUtil.toBean(bo, MatPurchaseInDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setDetailId(add.getDetailId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatPurchaseInDetailBo bo) {
|
||||
MatPurchaseInDetail update = BeanUtil.toBean(bo, MatPurchaseInDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatPurchaseInDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.gear.mat.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.gear.mat.domain.bo.MatPurchaseBo;
|
||||
import com.gear.mat.domain.vo.MatPurchaseVo;
|
||||
import com.gear.mat.domain.MatPurchase;
|
||||
import com.gear.mat.mapper.MatPurchaseMapper;
|
||||
import com.gear.mat.service.IMatPurchaseService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 采购单主(管理在途库存)Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MatPurchaseServiceImpl implements IMatPurchaseService {
|
||||
|
||||
private final MatPurchaseMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)
|
||||
*/
|
||||
@Override
|
||||
public MatPurchaseVo queryById(Long purchaseId){
|
||||
return baseMapper.selectVoById(purchaseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MatPurchaseVo> queryPageList(MatPurchaseBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MatPurchase> lqw = buildQueryWrapper(bo);
|
||||
Page<MatPurchaseVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购单主(管理在途库存)列表
|
||||
*/
|
||||
@Override
|
||||
public List<MatPurchaseVo> queryList(MatPurchaseBo bo) {
|
||||
LambdaQueryWrapper<MatPurchase> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MatPurchase> buildQueryWrapper(MatPurchaseBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MatPurchase> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPurchaseNo()), MatPurchase::getPurchaseNo, bo.getPurchaseNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactory()), MatPurchase::getFactory, bo.getFactory());
|
||||
lqw.eq(bo.getMaterialId() != null, MatPurchase::getMaterialId, bo.getMaterialId());
|
||||
lqw.eq(bo.getPlanNum() != null, MatPurchase::getPlanNum, bo.getPlanNum());
|
||||
lqw.eq(bo.getPurchasePrice() != null, MatPurchase::getPurchasePrice, bo.getPurchasePrice());
|
||||
lqw.eq(bo.getDeadline() != null, MatPurchase::getDeadline, bo.getDeadline());
|
||||
lqw.eq(bo.getStatus() != null, MatPurchase::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getCancelTime() != null, MatPurchase::getCancelTime, bo.getCancelTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOperator()), MatPurchase::getOperator, bo.getOperator());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购单主(管理在途库存)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MatPurchaseBo bo) {
|
||||
MatPurchase add = BeanUtil.toBean(bo, MatPurchase.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setPurchaseId(add.getPurchaseId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购单主(管理在途库存)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MatPurchaseBo bo) {
|
||||
MatPurchase update = BeanUtil.toBean(bo, MatPurchase.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MatPurchase entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购单主(管理在途库存)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.gear.mat.mapper.MatMatPriceHistoryMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatMatPriceHistory" id="MatMatPriceHistoryResult">
|
||||
<result property="historyId" column="history_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="avgPrice" column="avg_price"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
24
gear-mat/src/main/resources/mapper/MatMaterialMapper.xml
Normal file
24
gear-mat/src/main/resources/mapper/MatMaterialMapper.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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.gear.mat.mapper.MatMaterialMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatMaterial" id="MatMaterialResult">
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="factory" column="factory"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="currentStock" column="current_stock"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
24
gear-mat/src/main/resources/mapper/MatMaterialOutMapper.xml
Normal file
24
gear-mat/src/main/resources/mapper/MatMaterialOutMapper.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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.gear.mat.mapper.MatMaterialOutMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatMaterialOut" id="MatMaterialOutResult">
|
||||
<result property="outId" column="out_id"/>
|
||||
<result property="outNo" column="out_no"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="outNum" column="out_num"/>
|
||||
<result property="outReason" column="out_reason"/>
|
||||
<result property="operator" column="operator"/>
|
||||
<result property="outTime" column="out_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
22
gear-mat/src/main/resources/mapper/MatProductMapper.xml
Normal file
22
gear-mat/src/main/resources/mapper/MatProductMapper.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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.gear.mat.mapper.MatProductMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatProduct" id="MatProductResult">
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="productName" column="product_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.gear.mat.mapper.MatProductMaterialRelationMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatProductMaterialRelation" id="MatProductMaterialRelationResult">
|
||||
<result property="relationId" column="relation_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialNum" column="material_num"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.gear.mat.mapper.MatPurchaseInDetailMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatPurchaseInDetail" id="MatPurchaseInDetailResult">
|
||||
<result property="detailId" column="detail_id"/>
|
||||
<result property="purchaseId" column="purchase_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="inNum" column="in_num"/>
|
||||
<result property="inPrice" column="in_price"/>
|
||||
<result property="inAmount" column="in_amount"/>
|
||||
<result property="inTime" column="in_time"/>
|
||||
<result property="operator" column="operator"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
27
gear-mat/src/main/resources/mapper/MatPurchaseMapper.xml
Normal file
27
gear-mat/src/main/resources/mapper/MatPurchaseMapper.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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.gear.mat.mapper.MatPurchaseMapper">
|
||||
|
||||
<resultMap type="com.gear.mat.domain.MatPurchase" id="MatPurchaseResult">
|
||||
<result property="purchaseId" column="purchase_id"/>
|
||||
<result property="purchaseNo" column="purchase_no"/>
|
||||
<result property="factory" column="factory"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="planNum" column="plan_num"/>
|
||||
<result property="purchasePrice" column="purchase_price"/>
|
||||
<result property="deadline" column="deadline"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="cancelTime" column="cancel_time"/>
|
||||
<result property="operator" column="operator"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user