fix:物料入库

This commit is contained in:
shusir
2026-02-09 18:05:59 +08:00
parent 044053bc33
commit 3769261039
30 changed files with 1460 additions and 21 deletions

View File

@@ -36,7 +36,7 @@ import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 物料实例")
@RestController
@RequestMapping("/qms/material-infomation")
@RequestMapping("/qms/resource/material-infomation")
@Validated
public class MaterialInfomationController implements BusinessControllerMarker {
@@ -80,12 +80,21 @@ public class MaterialInfomationController implements BusinessControllerMarker {
@GetMapping("/get")
@Operation(summary = "获得物料实例")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")
// @PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")
public CommonResult<MaterialInfomationRespVO> getMaterialInfomation(@RequestParam("id") Long id) {
MaterialInfomationDO materialInfomation = materialInfomationService.getMaterialInfomation(id);
return success(BeanUtils.toBean(materialInfomation, MaterialInfomationRespVO.class));
}
@GetMapping("/get-by-code")
@Operation(summary = "根据物料编码获取物料")
@Parameter(name = "code", description = "编码", required = true, example = "SN001")
// @PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")
public CommonResult<MaterialInfomationRespVO> getMaterialInfomationWithPdtInfoByInfCode(@RequestParam("code") String code) {
MaterialInfomationRespVO materialInfomation = materialInfomationService.getMaterialInfomationWithPdtInfoByInfCode(code);
return success(materialInfomation);
}
@GetMapping("/page")
@Operation(summary = "获得物料实例分页")
// @PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")

View File

@@ -7,6 +7,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailPageReqVO;
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailRespVO;
@@ -33,20 +34,21 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController
@RequestMapping("/qms/resource/material-inventory-inbound-detail")
@Validated
@DeptDataPermissionIgnore(enable = "true")
public class MaterialInventoryInboundDetailController implements BusinessControllerMarker {
@Resource
private MaterialInventoryInboundDetailService materialInventoryInboundDetailService;
@PostMapping("/create")
// @PostMapping("/create")
@Operation(summary = "创建入库明细,验收入库、盘盈入库等")
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:create')")
public CommonResult<MaterialInventoryInboundDetailRespVO> createMaterialInventoryInboundDetail(@Valid @RequestBody MaterialInventoryInboundDetailSaveReqVO createReqVO) {
return success(materialInventoryInboundDetailService.createMaterialInventoryInboundDetail(createReqVO));
}
@PutMapping("/update")
// @PutMapping("/update")
@Operation(summary = "更新入库明细,验收入库、盘盈入库等")
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:update')")
public CommonResult<Boolean> updateMaterialInventoryInboundDetail(@Valid @RequestBody MaterialInventoryInboundDetailSaveReqVO updateReqVO) {
@@ -54,7 +56,7 @@ public class MaterialInventoryInboundDetailController implements BusinessControl
return success(true);
}
@DeleteMapping("/delete")
// @DeleteMapping("/delete")
@Operation(summary = "删除入库明细,验收入库、盘盈入库等")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')")
@@ -63,7 +65,7 @@ public class MaterialInventoryInboundDetailController implements BusinessControl
return success(true);
}
@DeleteMapping("/delete-list")
// @DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除入库明细,验收入库、盘盈入库等")
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')")

View File

@@ -26,10 +26,32 @@ public class MaterialInfomationRespVO {
@ExcelProperty("批次id")
private Long batchId;
@Schema(description = "批次编号")
@ExcelProperty("批次编号")
private String batchNo;
@Schema(description = "工段id")
@ExcelProperty("工段id")
private Long gongduanId;
@Schema(description = "工段部门id")
@ExcelProperty("工段部门id")
private Long assignDepartmentId;
/**
* 分配部门名称
*/
@Schema(description = "工段分配部门名称")
@ExcelProperty("工段分配部门名称")
private String assignDepartmentName;
@Schema(description = "存放位置", example = "13603")
@ExcelProperty("存放位置")
private String locationId;
@Schema(description = "存放位置编码")
@ExcelProperty("存放位置编码")
private String locationCode;
@Schema(description = "编码")
@ExcelProperty("编码")
private String code;

View File

@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.resource.material.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.math.BigDecimal;
@@ -18,6 +19,7 @@ public class MaterialInventoryInboundSaveReqVO {
private String title;
@Schema(description = "业务类型,【字典】【jy_material_in_bsn_type】验收入库、盘盈入库等", example = "2")
@NotNull(message = "业务类型不能为空")
private String businessType;
@Schema(description = "业务类型编码")

View File

@@ -0,0 +1,39 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 出库明细分页 Request VO")
@Data
public class MaterialInventoryOutboundDetailPageReqVO extends PageParam {
@Schema(description = "物料大类id", example = "13529")
private Long productId;
@Schema(description = "出库单id", example = "13529")
private Long outboundId;
@Schema(description = "物料实例id", example = "1502")
private Long infomationId;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@@ -0,0 +1,97 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 出库明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MaterialInventoryOutboundDetailRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17148")
@ExcelProperty("主键")
private Long id;
@Schema(description = "出库单id", example = "13529")
@ExcelProperty("出库单id")
private Long outboundId;
// 批次
@Schema(description = "批次id", example = "13529")
@ExcelProperty("批次id")
private Long batchId;
@Schema(description = "批次编号")
@ExcelProperty("批次编号")
private String batchNo;
// 工段
@Schema(description = "工段id", example = "13529")
@ExcelProperty("工段id")
private Long gongduanId;
@Schema(description = "工段名称", example = "13529")
@ExcelProperty("工段名称")
private String assignDepartmentName;
@Schema(description = "物料实例id", example = "1502")
@ExcelProperty("物料实例id")
private Long infomationId;
@Schema(description = "物料编码")
@ExcelProperty("物料编码")
private String infomationCode;
@Schema(description = "物料名称")
@ExcelProperty("物料名称")
private String infomationName;
@Schema(description = "业务类型")
@ExcelProperty("业务类型")
private String businessType;
@Schema(description = "存放位置名称")
@ExcelProperty("存放位置名称")
private String locationName;
@Schema(description = "存放位置编码")
@ExcelProperty("存放位置编码")
private String locationCode;
@Schema(description = "领用人id", example = "7209")
@ExcelProperty("领用人id")
private Long managerUserId;
@Schema(description = "领用人", example = "张三")
@ExcelProperty("领用人")
private String managerUserName;
@Schema(description = "数量")
@ExcelProperty("数量")
private BigDecimal quantity;
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "创建者")
@ExcelProperty("创建者")
private Long creator;
@Schema(description = "创建人名称")
@ExcelProperty("创建人名称")
private String creatorName;
}

View File

@@ -0,0 +1,30 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 出库明细新增/修改 Request VO")
@Data
public class MaterialInventoryOutboundDetailSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17148")
private Long id;
@Schema(description = "出库单id", example = "13529")
private Long outboundId;
@Schema(description = "物料实例id", example = "1502")
private Long infomationId;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
}

View File

@@ -0,0 +1,67 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.List;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 物料出库分页 Request VO")
@Data
public class MaterialInventoryOutboundPageReqVO extends PageParam {
@Schema(description = "标题")
private String title;
@Schema(description = "业务类型,领用出库、盘亏出库等", example = "2")
private String businessType;
@Schema(description = "业务类型编码")
private String businessTypeCode;
@Schema(description = "申请人")
private String applyUser;
@Schema(description = "申请人id", example = "13273")
private Long applyUserId;
@Schema(description = "申请部门")
private String applyDepartment;
@Schema(description = "申请部门id", example = "845")
private Long applyDepartmentId;
@Schema(description = "申请时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] applyTime;
@Schema(description = "监督人")
private String superviseUser;
@Schema(description = "监督人id", example = "14493")
private Long superviseUserId;
@Schema(description = "流程实例id", example = "6208")
private String flowInstanceId;
@Schema(description = "意见json")
private String commentJson;
@Schema(description = "流程审批状态", example = "1")
private String flowStatus;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

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