From 2790ed7ea1bfccea7886ae337ab9c012beff7d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=81=E6=AD=A2=E5=91=B5=E5=91=B5?= Date: Tue, 9 Dec 2025 16:10:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E5=BA=93=E5=AD=98=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/MaterialBatchAssignController.java | 2 +- .../admin/MaterialInventoryController.java | 46 +++-- ...erialInventoryInboundDetailController.java | 2 +- .../vo/MaterialInventoryPageReqVO.java | 102 +++++++++++ .../vo/MaterialInventoryRespVO.java | 143 +++++++++++++++ .../dal/dataobject/MaterialInventoryDO.java | 169 ++++++++++++++++++ .../dal/mapper/MaterialInventoryMapper.java | 34 ++++ .../service/MaterialInventoryService.java | 26 +++ .../service/MaterialInventoryServiceImpl.java | 30 ++++ .../dal/mapper/MaterialBatchAssignMapper.xml | 0 .../dal/mapper/MaterialBatchMapper.xml | 0 .../dal/mapper/MaterialInfomationMapper.xml | 0 .../MaterialInventoryCheckBatchMapper.xml | 0 .../MaterialInventoryCheckDetailMapper.xml | 0 .../mapper/MaterialInventoryCheckMapper.xml | 0 .../MaterialInventoryInboundDetailMapper.xml | 0 .../mapper/MaterialInventoryInboundMapper.xml | 0 .../dal/mapper/MaterialInventoryMapper.xml | 103 +++++++++++ .../MaterialInventoryOutboundDetailMapper.xml | 0 .../MaterialInventoryOutboundMapper.xml | 0 .../mapper/MaterialLifecycleDetailMapper.xml | 0 .../dal/mapper/MaterialLifecycleMapper.xml | 0 .../dal/mapper/MaterialLocationMapper.xml | 0 .../dal/mapper/MaterialProductMapper.xml | 0 24 files changed, 645 insertions(+), 12 deletions(-) create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/dataobject/MaterialInventoryDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryServiceImpl.java rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialBatchAssignMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialBatchMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInfomationMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryCheckBatchMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryCheckDetailMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryCheckMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryInboundDetailMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryInboundMapper.xml (100%) create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.xml rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryOutboundDetailMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialInventoryOutboundMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialLifecycleDetailMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialLifecycleMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialLocationMapper.xml (100%) rename zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/{data => }/dal/mapper/MaterialProductMapper.xml (100%) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialBatchAssignController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialBatchAssignController.java index 5d703cb..d051f79 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialBatchAssignController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialBatchAssignController.java @@ -99,7 +99,7 @@ public class MaterialBatchAssignController extends AbstractFileUploadController @GetMapping("/get-by-inf") @Operation(summary = "获得物料批次分发") - @Parameter(name = "id", description = "编号", required = true, example = "1024") + @Parameter(name = "productId", description = "产品大类编号", required = true) // @PreAuthorize("@ss.hasPermission('qms:material-batch-assign:query')") public CommonResult> getMaterialBatchAssignByInfiId(MaterialBatchAssignPageReqVO pageReqVO) { diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryController.java index 8c0c8dc..aa717db 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryController.java @@ -10,11 +10,13 @@ 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.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; -import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailSaveReqVO; +import com.zt.plat.module.qms.resource.material.controller.vo.*; +import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryDO; import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryInboundDetailDO; +import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialProductDO; import com.zt.plat.module.qms.resource.material.service.MaterialInventoryInboundDetailService; +import com.zt.plat.module.qms.resource.material.service.MaterialInventoryService; +import com.zt.plat.module.qms.resource.material.service.MaterialProductService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -36,18 +38,22 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success; @RequestMapping("/qms/resource/material-inventory") @Validated @FileUploadController(source = "qms.materiainfo") -public class MaterialInventoryController extends AbstractFileUploadController implements BusinessControllerMarker{ +public class MaterialInventoryController extends AbstractFileUploadController implements BusinessControllerMarker { static { FileUploadController annotation = MaterialInventoryController.class.getAnnotation(FileUploadController.class); if (annotation != null) { - setFileUploadInfo(annotation); + setFileUploadInfo(annotation); } } @Resource private MaterialInventoryInboundDetailService materialInventoryInboundDetailService; + @Resource + private MaterialInventoryService mterialInventoryService; + + @PostMapping("/create") @Operation(summary = "创建入库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等") @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:create')") @@ -75,7 +81,7 @@ public class MaterialInventoryController extends AbstractFileUploadController im @DeleteMapping("/delete-list") @Parameter(name = "ids", description = "编号", required = true) @Operation(summary = "批量删除入库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等") - @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')") + @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')") public CommonResult deleteMaterialInventoryInboundDetailList(@RequestBody BatchDeleteReqVO req) { materialInventoryInboundDetailService.deleteMaterialInventoryInboundDetailListByIds(req.getIds()); return success(true); @@ -91,9 +97,9 @@ public class MaterialInventoryController extends AbstractFileUploadController im } @GetMapping("/page") - @Operation(summary = "获得入库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等分页") + @Operation(summary = "获得库存明细") // @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:query')") - public CommonResult> getMaterialInventoryInboundDetailPage(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO) { + public CommonResult> getMaterialInventoryPage(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO) { PageResult pageResult = materialInventoryInboundDetailService.getMaterialInventoryInboundDetailPage(pageReqVO); return success(BeanUtils.toBean(pageResult, MaterialInventoryInboundDetailRespVO.class)); } @@ -103,12 +109,32 @@ public class MaterialInventoryController extends AbstractFileUploadController im @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:export')") @ApiAccessLog(operateType = EXPORT) public void exportMaterialInventoryInboundDetailExcel(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { + HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = materialInventoryInboundDetailService.getMaterialInventoryInboundDetailPage(pageReqVO).getList(); // 导出 Excel ExcelUtils.write(response, "入库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等.xls", "数据", MaterialInventoryInboundDetailRespVO.class, - BeanUtils.toBean(list, MaterialInventoryInboundDetailRespVO.class)); + BeanUtils.toBean(list, MaterialInventoryInboundDetailRespVO.class)); } + + @GetMapping("/getList") + @Operation(summary = "获得库存列表") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult> getMaterialProduct(MaterialInventoryRespVO pageReqVO) { + + PageResult pageResult = mterialInventoryService.getMaterialInventoryPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialInventoryRespVO.class)); + } + + @GetMapping("/get_mtrl_inf") + @Operation(summary = "获取实例列表") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult> getInfomation(MaterialInventoryRespVO pageReqVO) { + + PageResult pageResult = mterialInventoryService.getMaterialInventoryPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialInventoryRespVO.class)); + } + + } \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryInboundDetailController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryInboundDetailController.java index e280688..1a793ad 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryInboundDetailController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/admin/MaterialInventoryInboundDetailController.java @@ -37,7 +37,7 @@ import com.zt.plat.module.qms.resource.material.service.MaterialInventoryInbound @Tag(name = "管理后台 - 入库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等") @RestController -@RequestMapping("/qms/material-inventory-inbound-detail") +@RequestMapping("/qms/resource/material-inventory-inbound-detail") @Validated @FileUploadController(source = "qms.materialinventoryinbounddetail") public class MaterialInventoryInboundDetailController extends AbstractFileUploadController implements BusinessControllerMarker{ diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryPageReqVO.java new file mode 100644 index 0000000..9ad6f34 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryPageReqVO.java @@ -0,0 +1,102 @@ +package com.zt.plat.module.qms.resource.material.controller.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +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 static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 库存列表分页 Request VO") +@Data +public class MaterialInventoryPageReqVO extends PageParam { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.AUTO, example = "32133") + private Long id; + + @Schema(description = "父id", example = "6098") + private Long parentId; + + @Schema(description = "id路径") + private String idPath; + + @Schema(description = "节点类型,分类|产品", example = "2") + private String nodeType; + + @Schema(description = "名称", example = "张三") + private String name; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "自定义表单") + private String customForm; + + @Schema(description = "扩展数据") + private String customData; + + @Schema(description = "标签") + private String tag; + + @Schema(description = "标签模板") + private String labelTemplateKey; + + @Schema(description = "型号") + private String modelNo; + + @Schema(description = "规格") + private String specification; + + @Schema(description = "技术参数") + private String parameter; + + @Schema(description = "制造商") + private String manufacturer; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "允许按量领取") + private String enablePartial; + + @Schema(description = "保质期(天)") + private Integer due; + + @Schema(description = "开封后保质期是否变化") + private String openDueFlag; + + @Schema(description = "开封后保质期(天)") + private Integer openDueAfter; + + @Schema(description = "是否危险品") + private String hazardous; + + @Schema(description = "是否标准溶液") + private String standardSolutionFlag; + + @Schema(description = "是否标准物质") + private String standardMaterialFlag; + + @Schema(description = "复标周期,单位:天。小于等于0-不复标") + private Integer reviewDue; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "禁用") + private String cancelFlag; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryRespVO.java new file mode 100644 index 0000000..efd5ab1 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/controller/vo/MaterialInventoryRespVO.java @@ -0,0 +1,143 @@ +package com.zt.plat.module.qms.resource.material.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableField; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.module.qms.core.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 库存列表 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialInventoryRespVO extends PageParam { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32133") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "父id", example = "6098") + @ExcelProperty("父id") + private Long parentId; + + @Schema(description = "id路径") + @ExcelProperty("id路径") + private String idPath; + + @Schema(description = "节点类型,分类|产品", example = "2") + @ExcelProperty("节点类型,分类|产品") + private String nodeType; + + @Schema(description = "名称", example = "张三") + @ExcelProperty("名称") + private String name; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "自定义表单") + @ExcelProperty("自定义表单") + private String customForm; + + @Schema(description = "扩展数据") + @ExcelProperty("扩展数据") + private String customData; + + @Schema(description = "标签") + @ExcelProperty("标签") + private String tag; + + @Schema(description = "标签模板") + @ExcelProperty("标签模板") + private String labelTemplateKey; + + @Schema(description = "型号") + @ExcelProperty("型号") + private String modelNo; + + @Schema(description = "规格") + @ExcelProperty("规格") + private String specification; + + @Schema(description = "技术参数") + @ExcelProperty("技术参数") + private String parameter; + + @Schema(description = "制造商") + @ExcelProperty("制造商") + private String manufacturer; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "允许按量领取") + @ExcelProperty("允许按量领取") + @Dict(dicCode = "yes_or_no") + private String enablePartial; + + @Schema(description = "保质期(天)") + @ExcelProperty("保质期(天)") + private Integer due; + + @Schema(description = "开封后保质期是否变化") + @ExcelProperty("开封后保质期是否变化") + @Dict(dicCode = "yes_or_no") + private String openDueFlag; + + @Schema(description = "开封后保质期(天)") + @ExcelProperty("开封后保质期(天)") + private Integer openDueAfter; + + @Schema(description = "是否危险品") + @ExcelProperty("是否危险品") + @Dict(dicCode = "yes_or_no") + private String hazardous; + + @Schema(description = "是否标准溶液") + @ExcelProperty("是否标准溶液") + @Dict(dicCode = "yes_or_no") + private String standardSolutionFlag; + + @Schema(description = "是否标准物质") + @ExcelProperty("是否标准物质") + @Dict(dicCode = "yes_or_no") + private String standardMaterialFlag; + + @Schema(description = "复标周期,单位:天。小于等于0-不复标") + @ExcelProperty("复标周期") + private Integer reviewDue; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + + @Schema(description = "禁用") + @ExcelProperty("禁用") + private String cancelFlag; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + /** + * 总数量 + */ + @TableField("INB_QTY") + @Schema(description = "库存总量") + @ExcelProperty("库存总量") + private Long inboundQuantity; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/dataobject/MaterialInventoryDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/dataobject/MaterialInventoryDO.java new file mode 100644 index 0000000..18a099d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/dataobject/MaterialInventoryDO.java @@ -0,0 +1,169 @@ +package com.zt.plat.module.qms.resource.material.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.*; +import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +import lombok.*; + +/** +* 物料大类 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_pdt") +@KeySequence("t_mtrl_pdt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialInventoryDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 父id + */ + @TableField("PRN_ID") + private Long parentId; + /** + * id路径 + */ + @TableField("ID_PATH") + private String idPath; + /** + * 节点类型,分类|产品 + */ + @TableField("NDE_TP") + private String nodeType; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 自定义表单 + */ + @TableField("CST_FORM") + private String customForm; + /** + * 扩展数据 + */ + @TableField("CST_DAT") + private String customData; + /** + * 标签 + */ + @TableField("TAG") + private String tag; + /** + * 标签模板 + */ + @TableField("LBL_TMPL_KY") + private String labelTemplateKey; + /** + * 型号 + */ + @TableField("MDL_NO") + private String modelNo; + /** + * 规格 + */ + @TableField("SPEC") + private String specification; + /** + * 技术参数 + */ + @TableField("PRM") + private String parameter; + /** + * 制造商 + */ + @TableField("MFR") + private String manufacturer; + /** + * 单位 + */ + @TableField("UNT") + private String unit; + /** + * 允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走 + */ + @TableField("ENB_PRTL") + private String enablePartial; + /** + * 保质期(天) + */ + @TableField("DUE") + private Integer due; + /** + * 开封后保质期是否变化 + */ + @TableField("OPN_DUE_FLG") + private String openDueFlag; + /** + * 开封后保质期(天) + */ + @TableField("OPN_DUE_AFT") + private Integer openDueAfter; + /** + * 是否危险品 + */ + @TableField("HZRD") + private String hazardous; + /** + * 是否标准溶液 + */ + @TableField("STD_SOL_FLG") + private String standardSolutionFlag; + /** + * 是否标准物质 + */ + @TableField("STD_MTRL_FLG") + private String standardMaterialFlag; + /** + * 复标周期,单位:天。小于等于0-不复标 + */ + @TableField("RVW_DUE") + private Integer reviewDue; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + /** + * 禁用 + */ + @TableField("CNL_FLG") + private String cancelFlag; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + + /** + * 总数量 + */ + @TableField("INB_QTY") + private Long inboundQuantity; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.java new file mode 100644 index 0000000..aa3cc30 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.java @@ -0,0 +1,34 @@ +package com.zt.plat.module.qms.resource.material.dal.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundPageReqVO; +import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryRespVO; +import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 入库 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialInventoryMapper extends BaseMapperX { + +// default PageResult selectPage(MaterialInventoryRespVO reqVO) { +// return selectPage(reqVO, new LambdaQueryWrapperX() +// +// .eqIfPresent(MaterialInventoryDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) +// .eqIfPresent(MaterialInventoryDO::getRemark, reqVO.getRemark()) +// .betweenIfPresent(MaterialInventoryDO::getCreateTime, reqVO.getCreateTime()) +// .orderByDesc(MaterialInventoryDO::getId)); +// } + + IPage selectPageList (IPage page,@Param("param")MaterialInventoryRespVO RespVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryService.java new file mode 100644 index 0000000..ee66633 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryService.java @@ -0,0 +1,26 @@ +package com.zt.plat.module.qms.resource.material.service; + +import com.zt.plat.framework.common.pojo.PageResult; + +import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryPageReqVO; +import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryRespVO; +import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 库存管理 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialInventoryService { + + + /** + * 单个入库/上架 + */ + PageResult getMaterialInventoryPage(MaterialInventoryRespVO pageReqVO); + + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryServiceImpl.java new file mode 100644 index 0000000..721622f --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/material/service/MaterialInventoryServiceImpl.java @@ -0,0 +1,30 @@ +package com.zt.plat.module.qms.resource.material.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationExtendRespVO; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import com.zt.plat.module.qms.enums.QmsCommonConstant; +import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryRespVO; +import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryDO; +import com.zt.plat.module.qms.resource.material.dal.mapper.MaterialInventoryMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service +public class MaterialInventoryServiceImpl implements MaterialInventoryService{ + @Resource + private MaterialInventoryMapper materialInventoryMapper; + + @Override + public PageResult getMaterialInventoryPage(MaterialInventoryRespVO pageReqVO){ + IPage page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + + IPage pageList = materialInventoryMapper.selectPageList(page, pageReqVO); + PageResult pageResult = new PageResult<>(pageList.getRecords(), pageList.getTotal()); + return BeanUtils.toBean(pageResult, MaterialInventoryDO.class); + + } +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialBatchAssignMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialBatchAssignMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialBatchAssignMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialBatchAssignMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialBatchMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialBatchMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialBatchMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialBatchMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInfomationMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInfomationMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInfomationMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInfomationMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckBatchMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckBatchMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckBatchMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckBatchMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckDetailMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckDetailMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckDetailMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckDetailMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryCheckMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryCheckMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryInboundDetailMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryInboundDetailMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryInboundDetailMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryInboundDetailMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryInboundMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryInboundMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryInboundMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryInboundMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.xml new file mode 100644 index 0000000..f145d6f --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryMapper.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryOutboundDetailMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryOutboundDetailMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryOutboundDetailMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryOutboundDetailMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryOutboundMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryOutboundMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialInventoryOutboundMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialInventoryOutboundMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLifecycleDetailMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLifecycleDetailMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLifecycleDetailMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLifecycleDetailMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLifecycleMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLifecycleMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLifecycleMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLifecycleMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLocationMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLocationMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialLocationMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialLocationMapper.xml diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialProductMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialProductMapper.xml similarity index 100% rename from zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/data/dal/mapper/MaterialProductMapper.xml rename to zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/material/dal/mapper/MaterialProductMapper.xml