fix:新增物料批次接口及批次拆分及接口。

This commit is contained in:
shusir
2026-01-26 18:05:23 +08:00
parent 2336c370fa
commit 0d164c660e
11 changed files with 251 additions and 72 deletions

View File

@@ -171,25 +171,30 @@ public interface ErrorCodeConstants {
ErrorCode DEVICE_CONFIG_FLOW_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备通用流程配置不存在"); ErrorCode DEVICE_CONFIG_FLOW_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备通用流程配置不存在");
// -------------物料试剂------------- // -------------物料试剂-------------
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材不存在"); ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "试剂耗材不存在");
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料大类不存在"); ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类不存在");
ErrorCode MATERIAL_PRODUCT_CODE_EXISTED = new ErrorCode(1_032_160_000, "物料大类编码重复"); ErrorCode MATERIAL_PRODUCT_CODE_EXISTED = new ErrorCode(1_032_160_000, "物料大类编码重复");
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程明细不存在"); ErrorCode MATERIAL_CATEGORY_EXISTS_CHILDREN = new ErrorCode(1_032_160_000, "分类下含有子分类或物料大类,不可删除");
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程不存在"); ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程明细不存在");
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程不存在");
ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料批次不存在"); ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次不存在");
ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料批次分发不存在"); ErrorCode MATERIAL_BATCH_ASSIGN_END = new ErrorCode(1_032_160_000, "物料批次已拆分,不可操作");
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_150_000, "入库,出库不存在"); ErrorCode GONGDUAN_BELONG_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段所属的物料批次不一致");
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "入库明细,出库明细等不存在"); ErrorCode GONGDUAN_QUANTITY_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段累加数量和批次数量不一致");
ErrorCode SYSTEM_VERSION_MANAGEMENT_NOT_EXISTS = new ErrorCode(1_032_150_000, "客户端版本管理不存在"); ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次分发不存在");
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库,出库不存在");
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库明细,出库明细等不存在");
ErrorCode MATERIAL_LOCATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "存放位置不存在"); ErrorCode SYSTEM_VERSION_MANAGEMENT_NOT_EXISTS = new ErrorCode(1_032_160_000, "客户端版本管理不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_BATCH_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点项不存在"); ErrorCode MATERIAL_LOCATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "存放位置不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点明细不存在"); ErrorCode MATERIAL_INVENTORY_CHECK_NOT_EXISTS = new ErrorCode(1_032_160_000, "库存盘点不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_NOT_EXISTS = new ErrorCode(1_032_150_000, "库不存在"); ErrorCode MATERIAL_INVENTORY_CHECK_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "存盘点项不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "出库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等不存在"); ErrorCode MATERIAL_INVENTORY_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "库存盘点明细不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "出库不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "出库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等不存在");

View File

@@ -5,6 +5,8 @@ import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchRespV
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchSaveReqVO; import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchSaveReqVO;
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialBatchDO; import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialBatchDO;
import com.zt.plat.module.qms.resource.material.service.MaterialBatchService; import com.zt.plat.module.qms.resource.material.service.MaterialBatchService;
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -35,7 +37,7 @@ import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 物料批次") @Tag(name = "管理后台 - 物料批次")
@RestController @RestController
@RequestMapping("/qms/material-batch") @RequestMapping("/qms/resource/material-batch")
@Validated @Validated
public class MaterialBatchController implements BusinessControllerMarker { public class MaterialBatchController implements BusinessControllerMarker {
@@ -45,15 +47,15 @@ public class MaterialBatchController implements BusinessControllerMarker {
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建物料批次") @Operation(summary = "创建物料批次")
@PreAuthorize("@ss.hasPermission('qms:material-batch:create')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:create')")
public CommonResult<MaterialBatchRespVO> createMaterialBatch(@Valid @RequestBody MaterialBatchSaveReqVO createReqVO) { public CommonResult<MaterialBatchRespVO> createMaterialBatch(@Validated(AddGroup.class) @RequestBody MaterialBatchSaveReqVO createReqVO) {
return success(materialBatchService.createMaterialBatch(createReqVO)); return success(materialBatchService.createMaterialBatch(createReqVO));
} }
@PutMapping("/update") @PutMapping("/update")
@Operation(summary = "更新物料批次") @Operation(summary = "更新物料批次")
@PreAuthorize("@ss.hasPermission('qms:material-batch:update')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:update')")
public CommonResult<Boolean> updateMaterialBatch(@Valid @RequestBody MaterialBatchSaveReqVO updateReqVO) { public CommonResult<Boolean> updateMaterialBatch(@Validated(UpdateGroup.class) @RequestBody MaterialBatchSaveReqVO updateReqVO) {
materialBatchService.updateMaterialBatch(updateReqVO); materialBatchService.updateMaterialBatch(updateReqVO);
return success(true); return success(true);
} }
@@ -61,7 +63,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除物料批次") @Operation(summary = "删除物料批次")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:material-batch:delete')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:delete')")
public CommonResult<Boolean> deleteMaterialBatch(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteMaterialBatch(@RequestParam("id") Long id) {
materialBatchService.deleteMaterialBatch(id); materialBatchService.deleteMaterialBatch(id);
return success(true); return success(true);
@@ -70,7 +72,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@DeleteMapping("/delete-list") @DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true) @Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除物料批次") @Operation(summary = "批量删除物料批次")
@PreAuthorize("@ss.hasPermission('qms:material-batch:delete')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:delete')")
public CommonResult<Boolean> deleteMaterialBatchList(@RequestBody BatchDeleteReqVO req) { public CommonResult<Boolean> deleteMaterialBatchList(@RequestBody BatchDeleteReqVO req) {
materialBatchService.deleteMaterialBatchListByIds(req.getIds()); materialBatchService.deleteMaterialBatchListByIds(req.getIds());
return success(true); return success(true);
@@ -79,7 +81,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@GetMapping("/get") @GetMapping("/get")
@Operation(summary = "获得物料批次") @Operation(summary = "获得物料批次")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:material-batch:query')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
public CommonResult<MaterialBatchRespVO> getMaterialBatch(@RequestParam("id") Long id) { public CommonResult<MaterialBatchRespVO> getMaterialBatch(@RequestParam("id") Long id) {
MaterialBatchDO materialBatch = materialBatchService.getMaterialBatch(id); MaterialBatchDO materialBatch = materialBatchService.getMaterialBatch(id);
return success(BeanUtils.toBean(materialBatch, MaterialBatchRespVO.class)); return success(BeanUtils.toBean(materialBatch, MaterialBatchRespVO.class));
@@ -87,7 +89,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得物料批次分页") @Operation(summary = "获得物料批次分页")
@PreAuthorize("@ss.hasPermission('qms:material-batch:query')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) { public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
PageResult<MaterialBatchDO> pageResult = materialBatchService.getMaterialBatchPage(pageReqVO); PageResult<MaterialBatchDO> pageResult = materialBatchService.getMaterialBatchPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialBatchRespVO.class)); return success(BeanUtils.toBean(pageResult, MaterialBatchRespVO.class));
@@ -106,4 +108,11 @@ public class MaterialBatchController implements BusinessControllerMarker {
BeanUtils.toBean(list, MaterialBatchRespVO.class)); BeanUtils.toBean(list, MaterialBatchRespVO.class));
} }
@PostMapping("/assign-gongduan")
@Operation(summary = "批次工段拆分")
// @PreAuthorize("@ss.hasPermission('qms:material-batch:create')")
public CommonResult<List<MaterialBatchRespVO>> assignMaterialBatchGongduan(@Valid @RequestBody List<MaterialBatchSaveReqVO> createReqVOs) {
return success(materialBatchService.assignMaterialBatchGongduan(createReqVOs));
}
} }

View File

@@ -62,6 +62,7 @@ public class MaterialProductController extends AbstractFileUploadController impl
return success(materialProductService.getMaterialCategoryTree()); return success(materialProductService.getMaterialCategoryTree());
} }
// TODO
@GetMapping("/orig-material/{code}") @GetMapping("/orig-material/{code}")
@Operation(summary = "根据物料编码获取外部系统原始物料") @Operation(summary = "根据物料编码获取外部系统原始物料")
public CommonResult<Object> getOriginalMaterial(@PathVariable String code) { public CommonResult<Object> getOriginalMaterial(@PathVariable String code) {
@@ -84,18 +85,18 @@ public class MaterialProductController extends AbstractFileUploadController impl
} }
@PutMapping("/update") // @PutMapping("/update")
@Operation(summary = "更新物料") // @Operation(summary = "更新物料")
@PreAuthorize("@ss.hasPermission('qms:material-product:update')") // @PreAuthorize("@ss.hasPermission('qms:material-product:update')")
public CommonResult<Boolean> updateMaterialProduct(@Valid @RequestBody MaterialProductSaveReqVO updateReqVO) { // public CommonResult<Boolean> updateMaterialProduct(@Valid @RequestBody MaterialProductSaveReqVO updateReqVO) {
materialProductService.updateMaterialProduct(updateReqVO); // materialProductService.updateMaterialProduct(updateReqVO);
return success(true); // return success(true);
} // }
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除物料") @Operation(summary = "删除物料分类或大类")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:material-product:delete')") // @PreAuthorize("@ss.hasPermission('qms:material-product:delete')")
public CommonResult<Boolean> deleteMaterialProduct(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteMaterialProduct(@RequestParam("id") Long id) {
materialProductService.deleteMaterialProduct(id); materialProductService.deleteMaterialProduct(id);
return success(true); return success(true);

View File

@@ -1,10 +1,12 @@
package com.zt.plat.module.qms.resource.material.controller.vo; package com.zt.plat.module.qms.resource.material.controller.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*; import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam; import com.zt.plat.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@@ -20,8 +22,8 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "批次编号") @Schema(description = "批次编号")
private String batchNo; private String batchNo;
@Schema(description = "总数量") // @Schema(description = "总数量")
private String inboundQuantity; // private BigDecimal inboundQuantity;
@Schema(description = "存放位置描述") @Schema(description = "存放位置描述")
private String location; private String location;
@@ -37,6 +39,12 @@ public class MaterialBatchPageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate[] dueDate; private LocalDate[] dueDate;
@Schema(description = "分配部门id")
private Long assignDepartmentId;
@Schema(description = "分配部门名称")
private String assignDepartmentName;
@Schema(description = "验收状态", example = "1") @Schema(description = "验收状态", example = "1")
private String acceptanceStatus; private String acceptanceStatus;
@@ -46,8 +54,8 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "检化验状态,NOT_STARTED-未开始IN_PROGRESS-进行中PASSED-通过NOT_PASSED-未通过", example = "2") @Schema(description = "检化验状态,NOT_STARTED-未开始IN_PROGRESS-进行中PASSED-通过NOT_PASSED-未通过", example = "2")
private String assayStatus; private String assayStatus;
@Schema(description = "检化验结果") // @Schema(description = "检化验结果")
private String assayResult; // private String assayResult;
@Schema(description = "所属部门") @Schema(description = "所属部门")
private String systemDepartmentCode; private String systemDepartmentCode;

View File

@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*; import com.alibaba.excel.annotation.*;
@@ -17,6 +18,10 @@ public class MaterialBatchRespVO {
@ExcelProperty("主键") @ExcelProperty("主键")
private Long id; private Long id;
@Schema(description = "父id,为0时是批次不为0时是工段", example = "1035")
@ExcelProperty("父id,为0时是批次不为0时是工段")
private Long parentId;
@Schema(description = "物料大类id", example = "9381") @Schema(description = "物料大类id", example = "9381")
@ExcelProperty("物料大类id") @ExcelProperty("物料大类id")
private Long productId; private Long productId;
@@ -27,7 +32,7 @@ public class MaterialBatchRespVO {
@Schema(description = "总数量") @Schema(description = "总数量")
@ExcelProperty("总数量") @ExcelProperty("总数量")
private String inboundQuantity; private BigDecimal inboundQuantity;
@Schema(description = "存放位置描述") @Schema(description = "存放位置描述")
@ExcelProperty("存放位置描述") @ExcelProperty("存放位置描述")
@@ -45,6 +50,14 @@ public class MaterialBatchRespVO {
@ExcelProperty("到期日期") @ExcelProperty("到期日期")
private LocalDate dueDate; private LocalDate dueDate;
@Schema(description = "分配部门id")
@ExcelProperty("分配部门id")
private Long assignDepartmentId;
@Schema(description = "分配部门名称")
@ExcelProperty("分配部门名称")
private String assignDepartmentName;
@Schema(description = "验收状态", example = "1") @Schema(description = "验收状态", example = "1")
@ExcelProperty("验收状态") @ExcelProperty("验收状态")
private String acceptanceStatus; private String acceptanceStatus;

View File

@@ -1,26 +1,39 @@
package com.zt.plat.module.qms.resource.material.controller.vo; package com.zt.plat.module.qms.resource.material.controller.vo;
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.*; import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
@Schema(description = "管理后台 - 物料批次新增/修改 Request VO") @Schema(description = "管理后台 - 物料批次新增/修改 Request VO")
@Data @Data
public class MaterialBatchSaveReqVO { public class MaterialBatchSaveReqVO {
@Null(groups = AddGroup.class, message = "新增数据 ID 必须为空")
@NotNull(groups = UpdateGroup.class, message = "修改数据 ID 不能为空")
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9716") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9716")
private Long id; private Long id;
@Schema(description = "父id,为0时是批次不为0时是工段", example = "1035")
private Long parentId;
@Schema(description = "物料大类id", example = "9381") @Schema(description = "物料大类id", example = "9381")
@NotNull(groups = AddGroup.class, message = "物料大类 ID 不能为空")
private Long productId; private Long productId;
@Schema(description = "批次编号") // @Schema(description = "批次编号")
private String batchNo; // private String batchNo;
@Schema(description = "总数量") @Schema(description = "总数量")
private String inboundQuantity; @NotNull(groups = AddGroup.class, message = "总数量不能为空")
@Min(value = 0, message = "总数量不能小于0")
private BigDecimal inboundQuantity;
@Schema(description = "存放位置描述") @Schema(description = "存放位置描述")
private String location; private String location;
@@ -29,22 +42,29 @@ public class MaterialBatchSaveReqVO {
private Long supplierId; private Long supplierId;
@Schema(description = "生产日期") @Schema(description = "生产日期")
@NotNull(groups = AddGroup.class, message = "生产日期不能为空")
private LocalDate manufacturerDate; private LocalDate manufacturerDate;
@Schema(description = "到期日期") @Schema(description = "到期日期")
private LocalDate dueDate; private LocalDate dueDate;
@Schema(description = "验收状态", example = "1") @Schema(description = "分配部门id")
private String acceptanceStatus; private Long assignDepartmentId;
@Schema(description = "分配部门名称")
private String assignDepartmentName;
// @Schema(description = "验收状态", example = "1")
// private String acceptanceStatus;
@Schema(description = "是否检化验,1-是0-否") @Schema(description = "是否检化验,1-是0-否")
private Integer assayFlag; private Integer assayFlag;
@Schema(description = "检化验状态,NOT_STARTED-未开始IN_PROGRESS-进行中PASSED-通过NOT_PASSED-未通过", example = "2") // @Schema(description = "检化验状态,NOT_STARTED-未开始IN_PROGRESS-进行中PASSED-通过NOT_PASSED-未通过", example = "IN_PROGRESS")
private String assayStatus; // private String assayStatus;
@Schema(description = "检化验结果") // @Schema(description = "检化验结果")
private String assayResult; // private String assayResult;
@Schema(description = "所属部门") @Schema(description = "所属部门")
private String systemDepartmentCode; private String systemDepartmentCode;

View File

@@ -4,6 +4,7 @@ import lombok.*;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
/** /**
@@ -31,6 +32,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/**
* 父id,为0时是批次不为0时是工段
*/
@TableField("PRN_ID")
private Long parentId;
/** /**
* 物料大类id * 物料大类id
*/ */
@@ -45,7 +51,7 @@ public class MaterialBatchDO extends BusinessBaseDO {
* 总数量 * 总数量
*/ */
@TableField("INB_QTY") @TableField("INB_QTY")
private String inboundQuantity; private BigDecimal inboundQuantity;
/** /**
* 存放位置描述 * 存放位置描述
*/ */
@@ -66,6 +72,16 @@ public class MaterialBatchDO extends BusinessBaseDO {
*/ */
@TableField("DUE_DT") @TableField("DUE_DT")
private LocalDate dueDate; private LocalDate dueDate;
/**
* 分配部门id
*/
@TableField("ASN_DEPT_ID")
private Long assignDepartmentId;
/**
* 分配部门名称
*/
@TableField("ASN_DEPT_NAME")
private String assignDepartmentName;
/** /**
* 验收状态 * 验收状态
*/ */

View File

@@ -18,16 +18,17 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
default PageResult<MaterialBatchDO> selectPage(MaterialBatchPageReqVO reqVO) { default PageResult<MaterialBatchDO> selectPage(MaterialBatchPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialBatchDO>() return selectPage(reqVO, new LambdaQueryWrapperX<MaterialBatchDO>()
.eqIfPresent(MaterialBatchDO::getProductId, reqVO.getProductId()) .eqIfPresent(MaterialBatchDO::getProductId, reqVO.getProductId())
.eqIfPresent(MaterialBatchDO::getBatchNo, reqVO.getBatchNo()) .likeIfPresent(MaterialBatchDO::getBatchNo, reqVO.getBatchNo())
.eqIfPresent(MaterialBatchDO::getInboundQuantity, reqVO.getInboundQuantity()) .likeIfPresent(MaterialBatchDO::getLocation, reqVO.getLocation())
.eqIfPresent(MaterialBatchDO::getLocation, reqVO.getLocation())
.eqIfPresent(MaterialBatchDO::getSupplierId, reqVO.getSupplierId()) .eqIfPresent(MaterialBatchDO::getSupplierId, reqVO.getSupplierId())
.betweenIfPresent(MaterialBatchDO::getManufacturerDate, reqVO.getManufacturerDate()) .betweenIfPresent(MaterialBatchDO::getManufacturerDate, reqVO.getManufacturerDate())
.betweenIfPresent(MaterialBatchDO::getDueDate, reqVO.getDueDate()) .betweenIfPresent(MaterialBatchDO::getDueDate, reqVO.getDueDate())
.eqIfPresent(MaterialBatchDO::getAssignDepartmentId, reqVO.getAssignDepartmentId())
.likeIfPresent(MaterialBatchDO::getAssignDepartmentName, reqVO.getAssignDepartmentName())
.eqIfPresent(MaterialBatchDO::getAcceptanceStatus, reqVO.getAcceptanceStatus()) .eqIfPresent(MaterialBatchDO::getAcceptanceStatus, reqVO.getAcceptanceStatus())
.eqIfPresent(MaterialBatchDO::getAssayFlag, reqVO.getAssayFlag()) .eqIfPresent(MaterialBatchDO::getAssayFlag, reqVO.getAssayFlag())
.eqIfPresent(MaterialBatchDO::getAssayStatus, reqVO.getAssayStatus()) .eqIfPresent(MaterialBatchDO::getAssayStatus, reqVO.getAssayStatus())
.eqIfPresent(MaterialBatchDO::getAssayResult, reqVO.getAssayResult()) //.eqIfPresent(MaterialBatchDO::getAssayResult, reqVO.getAssayResult())
.eqIfPresent(MaterialBatchDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(MaterialBatchDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.eqIfPresent(MaterialBatchDO::getRemark, reqVO.getRemark()) .eqIfPresent(MaterialBatchDO::getRemark, reqVO.getRemark())
.betweenIfPresent(MaterialBatchDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(MaterialBatchDO::getCreateTime, reqVO.getCreateTime())

View File

@@ -61,4 +61,11 @@ public interface MaterialBatchService {
*/ */
PageResult<MaterialBatchDO> getMaterialBatchPage(MaterialBatchPageReqVO pageReqVO); PageResult<MaterialBatchDO> getMaterialBatchPage(MaterialBatchPageReqVO pageReqVO);
/**
* 批次工段拆分
*
* @param createReqVOs 创建信息
* @return 工段编号
*/
List<MaterialBatchRespVO> assignMaterialBatchGongduan(@Valid List<MaterialBatchSaveReqVO> createReqVOs);
} }

Some files were not shown because too many files have changed in this diff Show More