Commit 0317e8ea99222df53f84b4baade1c57afa7e45d9
1 parent
23af2231
review(mes):wm-warehouse 的初步实现 80%
Showing
26 changed files
with
96 additions
and
173 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/vo/process/MesProProcessPageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.mes.controller.admin.pro.vo.process; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.Data; | |
| 6 | +import lombok.EqualsAndHashCode; | |
| 7 | +import lombok.ToString; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | + | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | + | |
| 12 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 13 | + | |
| 14 | +@Schema(description = "管理后台 - MES 生产工序分页 Request VO") | |
| 15 | +@Data | |
| 16 | +@EqualsAndHashCode(callSuper = true) | |
| 17 | +@ToString(callSuper = true) | |
| 18 | +public class MesProProcessPageReqVO extends PageParam { | |
| 19 | + | |
| 20 | + @Schema(description = "工序编码", example = "PROCESS001") | |
| 21 | + private String code; | |
| 22 | + | |
| 23 | + @Schema(description = "工序名称", example = "下料工序") | |
| 24 | + private String name; | |
| 25 | + | |
| 26 | + @Schema(description = "状态", example = "0") | |
| 27 | + private Integer status; | |
| 28 | + | |
| 29 | + @Schema(description = "创建时间") | |
| 30 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 31 | + private LocalDateTime[] createTime; | |
| 32 | + | |
| 33 | +} | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/MesWmWarehouseAreaController.java
| 1 | 1 | package cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | |
| 5 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 6 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 8 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 9 | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 10 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 11 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 12 | 8 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.area.MesWmWarehouseAreaPageReqVO; |
| 13 | 9 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.area.MesWmWarehouseAreaRespVO; |
| 14 | 10 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.area.MesWmWarehouseAreaSaveReqVO; |
| ... | ... | @@ -22,19 +18,16 @@ import io.swagger.v3.oas.annotations.Operation; |
| 22 | 18 | import io.swagger.v3.oas.annotations.Parameter; |
| 23 | 19 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 24 | 20 | import jakarta.annotation.Resource; |
| 25 | -import jakarta.servlet.http.HttpServletResponse; | |
| 26 | 21 | import jakarta.validation.Valid; |
| 27 | 22 | import org.springframework.security.access.prepost.PreAuthorize; |
| 28 | 23 | import org.springframework.validation.annotation.Validated; |
| 29 | 24 | import org.springframework.web.bind.annotation.*; |
| 30 | 25 | |
| 31 | -import java.io.IOException; | |
| 32 | 26 | import java.util.Collections; |
| 33 | 27 | import java.util.List; |
| 34 | 28 | import java.util.Map; |
| 35 | 29 | import java.util.Set; |
| 36 | 30 | |
| 37 | -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 38 | 31 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 39 | 32 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 40 | 33 | |
| ... | ... | @@ -98,27 +91,13 @@ public class MesWmWarehouseAreaController { |
| 98 | 91 | } |
| 99 | 92 | |
| 100 | 93 | @GetMapping("/simple-list") |
| 101 | - @Operation(summary = "获得库位精简列表", description = "只包含启用状态,可按库区过滤") | |
| 94 | + @Operation(summary = "获得库位精简列表", description = "可按库区过滤") | |
| 102 | 95 | public CommonResult<List<MesWmWarehouseAreaRespVO>> getWarehouseAreaSimpleList( |
| 103 | 96 | @Parameter(name = "locationId", description = "库区编号") @RequestParam(value = "locationId", required = false) Long locationId) { |
| 104 | - List<MesWmWarehouseAreaDO> list = areaService.getWarehouseAreaList(locationId, CommonStatusEnum.ENABLE.getStatus()); | |
| 97 | + List<MesWmWarehouseAreaDO> list = areaService.getWarehouseAreaSimpleList(locationId); | |
| 105 | 98 | return success(buildWarehouseAreaRespVOList(list)); |
| 106 | 99 | } |
| 107 | 100 | |
| 108 | - // TODO @AI:不需要导出功能;前端也可以去掉; | |
| 109 | - | |
| 110 | - @GetMapping("/export-excel") | |
| 111 | - @Operation(summary = "导出库位 Excel") | |
| 112 | - @PreAuthorize("@ss.hasPermission('mes:wm-warehouse:export')") | |
| 113 | - @ApiAccessLog(operateType = EXPORT) | |
| 114 | - public void exportWarehouseAreaExcel(@Valid MesWmWarehouseAreaPageReqVO pageReqVO, | |
| 115 | - HttpServletResponse response) throws IOException { | |
| 116 | - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 117 | - List<MesWmWarehouseAreaDO> list = areaService.getWarehouseAreaPage(pageReqVO).getList(); | |
| 118 | - ExcelUtils.write(response, "库位.xls", "数据", MesWmWarehouseAreaRespVO.class, | |
| 119 | - buildWarehouseAreaRespVOList(list)); | |
| 120 | - } | |
| 121 | - | |
| 122 | 101 | // ==================== 拼接 VO ==================== |
| 123 | 102 | |
| 124 | 103 | /** | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/MesWmWarehouseController.java
| 1 | 1 | package cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | |
| 4 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 5 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 6 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 7 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 9 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 10 | 6 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.MesWmWarehousePageReqVO; |
| 11 | 7 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.MesWmWarehouseRespVO; |
| 12 | 8 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.MesWmWarehouseSaveReqVO; |
| ... | ... | @@ -16,16 +12,13 @@ import io.swagger.v3.oas.annotations.Operation; |
| 16 | 12 | import io.swagger.v3.oas.annotations.Parameter; |
| 17 | 13 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 18 | 14 | import jakarta.annotation.Resource; |
| 19 | -import jakarta.servlet.http.HttpServletResponse; | |
| 20 | 15 | import jakarta.validation.Valid; |
| 21 | 16 | import org.springframework.security.access.prepost.PreAuthorize; |
| 22 | 17 | import org.springframework.validation.annotation.Validated; |
| 23 | 18 | import org.springframework.web.bind.annotation.*; |
| 24 | 19 | |
| 25 | -import java.io.IOException; | |
| 26 | 20 | import java.util.List; |
| 27 | 21 | |
| 28 | -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 29 | 22 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 30 | 23 | |
| 31 | 24 | @Tag(name = "管理后台 - MES 仓库") |
| ... | ... | @@ -79,22 +72,10 @@ public class MesWmWarehouseController { |
| 79 | 72 | } |
| 80 | 73 | |
| 81 | 74 | @GetMapping("/simple-list") |
| 82 | - @Operation(summary = "获得仓库精简列表", description = "只包含启用状态,主要用于前端下拉") | |
| 75 | + @Operation(summary = "获得仓库精简列表", description = "主要用于前端下拉") | |
| 83 | 76 | public CommonResult<List<MesWmWarehouseRespVO>> getWarehouseSimpleList() { |
| 84 | - List<MesWmWarehouseDO> list = warehouseService.getWarehouseListByStatus(CommonStatusEnum.ENABLE.getStatus()); | |
| 77 | + List<MesWmWarehouseDO> list = warehouseService.getWarehouseSimpleList(); | |
| 85 | 78 | return success(BeanUtils.toBean(list, MesWmWarehouseRespVO.class)); |
| 86 | 79 | } |
| 87 | 80 | |
| 88 | - @GetMapping("/export-excel") | |
| 89 | - @Operation(summary = "导出仓库 Excel") | |
| 90 | - @PreAuthorize("@ss.hasPermission('mes:wm-warehouse:export')") | |
| 91 | - @ApiAccessLog(operateType = EXPORT) | |
| 92 | - public void exportWarehouseExcel(@Valid MesWmWarehousePageReqVO pageReqVO, | |
| 93 | - HttpServletResponse response) throws IOException { | |
| 94 | - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 95 | - List<MesWmWarehouseDO> list = warehouseService.getWarehousePage(pageReqVO).getList(); | |
| 96 | - ExcelUtils.write(response, "仓库.xls", "数据", MesWmWarehouseRespVO.class, | |
| 97 | - BeanUtils.toBean(list, MesWmWarehouseRespVO.class)); | |
| 98 | - } | |
| 99 | - | |
| 100 | 81 | } | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/MesWmWarehouseLocationController.java
| 1 | 1 | package cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | |
| 5 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 6 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 7 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 8 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 9 | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 10 | 7 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 11 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 12 | 8 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.location.MesWmWarehouseLocationPageReqVO; |
| 13 | 9 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.location.MesWmWarehouseLocationRespVO; |
| 14 | 10 | import cn.iocoder.yudao.module.mes.controller.admin.wm.warehouse.vo.location.MesWmWarehouseLocationSaveReqVO; |
| ... | ... | @@ -20,18 +16,15 @@ import io.swagger.v3.oas.annotations.Operation; |
| 20 | 16 | import io.swagger.v3.oas.annotations.Parameter; |
| 21 | 17 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 22 | 18 | import jakarta.annotation.Resource; |
| 23 | -import jakarta.servlet.http.HttpServletResponse; | |
| 24 | 19 | import jakarta.validation.Valid; |
| 25 | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 26 | 21 | import org.springframework.validation.annotation.Validated; |
| 27 | 22 | import org.springframework.web.bind.annotation.*; |
| 28 | 23 | |
| 29 | -import java.io.IOException; | |
| 30 | 24 | import java.util.Collections; |
| 31 | 25 | import java.util.List; |
| 32 | 26 | import java.util.Map; |
| 33 | 27 | |
| 34 | -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 35 | 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 36 | 29 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| 37 | 30 | |
| ... | ... | @@ -92,27 +85,13 @@ public class MesWmWarehouseLocationController { |
| 92 | 85 | } |
| 93 | 86 | |
| 94 | 87 | @GetMapping("/simple-list") |
| 95 | - @Operation(summary = "获得库区精简列表", description = "只包含启用状态,可按仓库过滤") | |
| 88 | + @Operation(summary = "获得库区精简列表", description = "可按仓库过滤") | |
| 96 | 89 | public CommonResult<List<MesWmWarehouseLocationRespVO>> getWarehouseLocationSimpleList( |
| 97 | 90 | @Parameter(name = "warehouseId", description = "仓库编号") @RequestParam(value = "warehouseId", required = false) Long warehouseId) { |
| 98 | - List<MesWmWarehouseLocationDO> list = locationService.getWarehouseLocationList(warehouseId, CommonStatusEnum.ENABLE.getStatus()); | |
| 91 | + List<MesWmWarehouseLocationDO> list = locationService.getWarehouseLocationSimpleList(warehouseId); | |
| 99 | 92 | return success(buildWarehouseLocationRespVOList(list)); |
| 100 | 93 | } |
| 101 | 94 | |
| 102 | - // TODO @AI:不需要导出功能;前端也可以去掉; | |
| 103 | - | |
| 104 | - @GetMapping("/export-excel") | |
| 105 | - @Operation(summary = "导出库区 Excel") | |
| 106 | - @PreAuthorize("@ss.hasPermission('mes:wm-warehouse:export')") | |
| 107 | - @ApiAccessLog(operateType = EXPORT) | |
| 108 | - public void exportWarehouseLocationExcel(@Valid MesWmWarehouseLocationPageReqVO pageReqVO, | |
| 109 | - HttpServletResponse response) throws IOException { | |
| 110 | - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 111 | - List<MesWmWarehouseLocationDO> list = locationService.getWarehouseLocationPage(pageReqVO).getList(); | |
| 112 | - ExcelUtils.write(response, "库区.xls", "数据", MesWmWarehouseLocationRespVO.class, | |
| 113 | - buildWarehouseLocationRespVOList(list)); | |
| 114 | - } | |
| 115 | - | |
| 116 | 95 | // ==================== 拼接 VO ==================== |
| 117 | 96 | |
| 118 | 97 | /** | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/MesWmWarehousePageReqVO.java
| ... | ... | @@ -18,9 +18,6 @@ public class MesWmWarehousePageReqVO extends PageParam { |
| 18 | 18 | @Schema(description = "仓库名称", example = "原料仓") |
| 19 | 19 | private String name; |
| 20 | 20 | |
| 21 | - @Schema(description = "状态", example = "0") | |
| 22 | - private Integer status; | |
| 23 | - | |
| 24 | 21 | @Schema(description = "是否冻结", example = "false") |
| 25 | 22 | private Boolean frozen; |
| 26 | 23 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/MesWmWarehouseRespVO.java
| ... | ... | @@ -36,10 +36,6 @@ public class MesWmWarehouseRespVO { |
| 36 | 36 | @Schema(description = "负责人用户编号", example = "1") |
| 37 | 37 | private Long chargeUserId; |
| 38 | 38 | |
| 39 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 40 | - @ExcelProperty("状态") | |
| 41 | - private Integer status; | |
| 42 | - | |
| 43 | 39 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 44 | 40 | @ExcelProperty("是否冻结") |
| 45 | 41 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/MesWmWarehouseSaveReqVO.java
| ... | ... | @@ -31,10 +31,6 @@ public class MesWmWarehouseSaveReqVO { |
| 31 | 31 | @Schema(description = "负责人用户编号", example = "1") |
| 32 | 32 | private Long chargeUserId; |
| 33 | 33 | |
| 34 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 35 | - @NotNull(message = "状态不能为空") | |
| 36 | - private Integer status; | |
| 37 | - | |
| 38 | 34 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 39 | 35 | @NotNull(message = "是否冻结不能为空") |
| 40 | 36 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/area/MesWmWarehouseAreaPageReqVO.java
| ... | ... | @@ -21,13 +21,13 @@ public class MesWmWarehouseAreaPageReqVO extends PageParam { |
| 21 | 21 | @Schema(description = "库区编号", example = "1") |
| 22 | 22 | private Long locationId; |
| 23 | 23 | |
| 24 | - @Schema(description = "是否启用", example = "true") | |
| 25 | - private Boolean enabled; | |
| 24 | + @Schema(description = "位置 X", example = "1") | |
| 25 | + private Integer positionX; | |
| 26 | 26 | |
| 27 | - @Schema(description = "状态", example = "0") | |
| 28 | - private Integer status; | |
| 27 | + @Schema(description = "位置 Y", example = "1") | |
| 28 | + private Integer positionY; | |
| 29 | 29 | |
| 30 | - @Schema(description = "是否冻结", example = "false") | |
| 31 | - private Boolean frozen; | |
| 30 | + @Schema(description = "位置 Z", example = "1") | |
| 31 | + private Integer positionZ; | |
| 32 | 32 | |
| 33 | 33 | } | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/area/MesWmWarehouseAreaRespVO.java
| ... | ... | @@ -47,26 +47,22 @@ public class MesWmWarehouseAreaRespVO { |
| 47 | 47 | @ExcelProperty("最大载重") |
| 48 | 48 | private BigDecimal maxLoad; |
| 49 | 49 | |
| 50 | - @Schema(description = "坐标 X", example = "1") | |
| 51 | - @ExcelProperty("坐标 X") | |
| 50 | + @Schema(description = "位置 X", example = "1") | |
| 51 | + @ExcelProperty("位置 X") | |
| 52 | 52 | private Integer positionX; |
| 53 | 53 | |
| 54 | - @Schema(description = "坐标 Y", example = "1") | |
| 55 | - @ExcelProperty("坐标 Y") | |
| 54 | + @Schema(description = "位置 Y", example = "1") | |
| 55 | + @ExcelProperty("位置 Y") | |
| 56 | 56 | private Integer positionY; |
| 57 | 57 | |
| 58 | - @Schema(description = "坐标 Z", example = "1") | |
| 59 | - @ExcelProperty("坐标 Z") | |
| 58 | + @Schema(description = "位置 Z", example = "1") | |
| 59 | + @ExcelProperty("位置 Z") | |
| 60 | 60 | private Integer positionZ; |
| 61 | 61 | |
| 62 | 62 | @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 63 | 63 | @ExcelProperty("是否启用") |
| 64 | 64 | private Boolean enabled; |
| 65 | 65 | |
| 66 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 67 | - @ExcelProperty("状态") | |
| 68 | - private Integer status; | |
| 69 | - | |
| 70 | 66 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 71 | 67 | @ExcelProperty("是否冻结") |
| 72 | 68 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/area/MesWmWarehouseAreaSaveReqVO.java
| ... | ... | @@ -32,23 +32,19 @@ public class MesWmWarehouseAreaSaveReqVO { |
| 32 | 32 | @Schema(description = "最大载重", example = "1000.00") |
| 33 | 33 | private BigDecimal maxLoad; |
| 34 | 34 | |
| 35 | - @Schema(description = "坐标 X", example = "1") | |
| 35 | + @Schema(description = "位置 X", example = "1") | |
| 36 | 36 | private Integer positionX; |
| 37 | 37 | |
| 38 | - @Schema(description = "坐标 Y", example = "1") | |
| 38 | + @Schema(description = "位置 Y", example = "1") | |
| 39 | 39 | private Integer positionY; |
| 40 | 40 | |
| 41 | - @Schema(description = "坐标 Z", example = "1") | |
| 41 | + @Schema(description = "位置 Z", example = "1") | |
| 42 | 42 | private Integer positionZ; |
| 43 | 43 | |
| 44 | 44 | @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 45 | 45 | @NotNull(message = "是否启用不能为空") |
| 46 | 46 | private Boolean enabled; |
| 47 | 47 | |
| 48 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 49 | - @NotNull(message = "状态不能为空") | |
| 50 | - private Integer status; | |
| 51 | - | |
| 52 | 48 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 53 | 49 | @NotNull(message = "是否冻结不能为空") |
| 54 | 50 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/location/MesWmWarehouseLocationPageReqVO.java
| ... | ... | @@ -21,13 +21,4 @@ public class MesWmWarehouseLocationPageReqVO extends PageParam { |
| 21 | 21 | @Schema(description = "仓库编号", example = "1") |
| 22 | 22 | private Long warehouseId; |
| 23 | 23 | |
| 24 | - @Schema(description = "是否启用库位管理", example = "true") | |
| 25 | - private Boolean areaEnabled; | |
| 26 | - | |
| 27 | - @Schema(description = "状态", example = "0") | |
| 28 | - private Integer status; | |
| 29 | - | |
| 30 | - @Schema(description = "是否冻结", example = "false") | |
| 31 | - private Boolean frozen; | |
| 32 | - | |
| 33 | 24 | } | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/location/MesWmWarehouseLocationRespVO.java
| ... | ... | @@ -40,10 +40,6 @@ public class MesWmWarehouseLocationRespVO { |
| 40 | 40 | @ExcelProperty("启用库位管理") |
| 41 | 41 | private Boolean areaEnabled; |
| 42 | 42 | |
| 43 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 44 | - @ExcelProperty("状态") | |
| 45 | - private Integer status; | |
| 46 | - | |
| 47 | 43 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 48 | 44 | @ExcelProperty("是否冻结") |
| 49 | 45 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/warehouse/vo/location/MesWmWarehouseLocationSaveReqVO.java
| ... | ... | @@ -33,10 +33,6 @@ public class MesWmWarehouseLocationSaveReqVO { |
| 33 | 33 | @NotNull(message = "是否启用库位管理不能为空") |
| 34 | 34 | private Boolean areaEnabled; |
| 35 | 35 | |
| 36 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | |
| 37 | - @NotNull(message = "状态不能为空") | |
| 38 | - private Integer status; | |
| 39 | - | |
| 40 | 36 | @Schema(description = "是否冻结", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| 41 | 37 | @NotNull(message = "是否冻结不能为空") |
| 42 | 38 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/warehouse/MesWmWarehouseAreaDO.java
| ... | ... | @@ -34,9 +34,10 @@ public class MesWmWarehouseAreaDO extends BaseDO { |
| 34 | 34 | * 库位名称 |
| 35 | 35 | */ |
| 36 | 36 | private String name; |
| 37 | - // TODO @AI:需要关联下 mes_wm_warehouse_location 表; | |
| 38 | 37 | /** |
| 39 | 38 | * 库区编号 |
| 39 | + * | |
| 40 | + * 关联 {@link MesWmWarehouseLocationDO#getId()} | |
| 40 | 41 | */ |
| 41 | 42 | private Long locationId; |
| 42 | 43 | /** |
| ... | ... | @@ -48,15 +49,15 @@ public class MesWmWarehouseAreaDO extends BaseDO { |
| 48 | 49 | */ |
| 49 | 50 | private BigDecimal maxLoad; |
| 50 | 51 | /** |
| 51 | - * 坐标 X | |
| 52 | + * 位置 X | |
| 52 | 53 | */ |
| 53 | 54 | private Integer positionX; |
| 54 | 55 | /** |
| 55 | - * 坐标 Y | |
| 56 | + * 位置 Y | |
| 56 | 57 | */ |
| 57 | 58 | private Integer positionY; |
| 58 | 59 | /** |
| 59 | - * 坐标 Z | |
| 60 | + * 位置 Z | |
| 60 | 61 | */ |
| 61 | 62 | private Integer positionZ; |
| 62 | 63 | /** |
| ... | ... | @@ -64,12 +65,6 @@ public class MesWmWarehouseAreaDO extends BaseDO { |
| 64 | 65 | */ |
| 65 | 66 | private Boolean enabled; |
| 66 | 67 | /** |
| 67 | - * 状态 | |
| 68 | - * | |
| 69 | - * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} | |
| 70 | - */ | |
| 71 | - private Integer status; | |
| 72 | - /** | |
| 73 | 68 | * 是否冻结 |
| 74 | 69 | */ |
| 75 | 70 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/warehouse/MesWmWarehouseDO.java
| ... | ... | @@ -42,17 +42,12 @@ public class MesWmWarehouseDO extends BaseDO { |
| 42 | 42 | * 面积 |
| 43 | 43 | */ |
| 44 | 44 | private BigDecimal area; |
| 45 | - // TODO @AI:需要关联下 system_users 表; | |
| 46 | 45 | /** |
| 47 | 46 | * 负责人用户编号 |
| 48 | - */ | |
| 49 | - private Long chargeUserId; | |
| 50 | - /** | |
| 51 | - * 状态 | |
| 52 | 47 | * |
| 53 | - * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} | |
| 48 | + * 关联 system_users 表的 id 字段 | |
| 54 | 49 | */ |
| 55 | - private Integer status; | |
| 50 | + private Long chargeUserId; | |
| 56 | 51 | /** |
| 57 | 52 | * 是否冻结 |
| 58 | 53 | */ | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/warehouse/MesWmWarehouseLocationDO.java
| ... | ... | @@ -34,9 +34,10 @@ public class MesWmWarehouseLocationDO extends BaseDO { |
| 34 | 34 | * 库区名称 |
| 35 | 35 | */ |
| 36 | 36 | private String name; |
| 37 | - // TODO @AI:需要关联下 mes_wm_warehouse 表; | |
| 38 | 37 | /** |
| 39 | 38 | * 仓库编号 |
| 39 | + * | |
| 40 | + * 关联 {@link MesWmWarehouseDO#getId()} | |
| 40 | 41 | */ |
| 41 | 42 | private Long warehouseId; |
| 42 | 43 | /** |
| ... | ... | @@ -48,12 +49,6 @@ public class MesWmWarehouseLocationDO extends BaseDO { |
| 48 | 49 | */ |
| 49 | 50 | private Boolean areaEnabled; |
| 50 | 51 | /** |
| 51 | - * 状态 | |
| 52 | - * | |
| 53 | - * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} | |
| 54 | - */ | |
| 55 | - private Integer status; | |
| 56 | - /** | |
| 57 | 52 | * 是否冻结 |
| 58 | 53 | */ |
| 59 | 54 | private Boolean frozen; | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/md/workstation/MesMdWorkstationMapper.java
| ... | ... | @@ -38,4 +38,16 @@ public interface MesMdWorkstationMapper extends BaseMapperX<MesMdWorkstationDO> |
| 38 | 38 | return selectList(MesMdWorkstationDO::getStatus, status); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + default Long selectCountByWarehouseId(Long warehouseId) { | |
| 42 | + return selectCount(MesMdWorkstationDO::getWarehouseId, warehouseId); | |
| 43 | + } | |
| 44 | + | |
| 45 | + default Long selectCountByLocationId(Long locationId) { | |
| 46 | + return selectCount(MesMdWorkstationDO::getLocationId, locationId); | |
| 47 | + } | |
| 48 | + | |
| 49 | + default Long selectCountByAreaId(Long areaId) { | |
| 50 | + return selectCount(MesMdWorkstationDO::getAreaId, areaId); | |
| 51 | + } | |
| 52 | + | |
| 41 | 53 | } | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/warehouse/MesWmWarehouseAreaMapper.java
| ... | ... | @@ -21,9 +21,9 @@ public interface MesWmWarehouseAreaMapper extends BaseMapperX<MesWmWarehouseArea |
| 21 | 21 | .likeIfPresent(MesWmWarehouseAreaDO::getCode, reqVO.getCode()) |
| 22 | 22 | .likeIfPresent(MesWmWarehouseAreaDO::getName, reqVO.getName()) |
| 23 | 23 | .eqIfPresent(MesWmWarehouseAreaDO::getLocationId, reqVO.getLocationId()) |
| 24 | - .eqIfPresent(MesWmWarehouseAreaDO::getEnabled, reqVO.getEnabled()) | |
| 25 | - .eqIfPresent(MesWmWarehouseAreaDO::getStatus, reqVO.getStatus()) | |
| 26 | - .eqIfPresent(MesWmWarehouseAreaDO::getFrozen, reqVO.getFrozen()) | |
| 24 | + .eqIfPresent(MesWmWarehouseAreaDO::getPositionX, reqVO.getPositionX()) | |
| 25 | + .eqIfPresent(MesWmWarehouseAreaDO::getPositionY, reqVO.getPositionY()) | |
| 26 | + .eqIfPresent(MesWmWarehouseAreaDO::getPositionZ, reqVO.getPositionZ()) | |
| 27 | 27 | .orderByDesc(MesWmWarehouseAreaDO::getId)); |
| 28 | 28 | } |
| 29 | 29 | |
| ... | ... | @@ -39,10 +39,9 @@ public interface MesWmWarehouseAreaMapper extends BaseMapperX<MesWmWarehouseArea |
| 39 | 39 | .eq(MesWmWarehouseAreaDO::getName, name)); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - default List<MesWmWarehouseAreaDO> selectListByLocationIdAndStatus(Long locationId, Integer status) { | |
| 42 | + default List<MesWmWarehouseAreaDO> selectSimpleList(Long locationId) { | |
| 43 | 43 | return selectList(new LambdaQueryWrapperX<MesWmWarehouseAreaDO>() |
| 44 | 44 | .eqIfPresent(MesWmWarehouseAreaDO::getLocationId, locationId) |
| 45 | - .eqIfPresent(MesWmWarehouseAreaDO::getStatus, status) | |
| 46 | 45 | .orderByDesc(MesWmWarehouseAreaDO::getId)); |
| 47 | 46 | } |
| 48 | 47 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/warehouse/MesWmWarehouseLocationMapper.java
| ... | ... | @@ -21,9 +21,6 @@ public interface MesWmWarehouseLocationMapper extends BaseMapperX<MesWmWarehouse |
| 21 | 21 | .likeIfPresent(MesWmWarehouseLocationDO::getCode, reqVO.getCode()) |
| 22 | 22 | .likeIfPresent(MesWmWarehouseLocationDO::getName, reqVO.getName()) |
| 23 | 23 | .eqIfPresent(MesWmWarehouseLocationDO::getWarehouseId, reqVO.getWarehouseId()) |
| 24 | - .eqIfPresent(MesWmWarehouseLocationDO::getAreaEnabled, reqVO.getAreaEnabled()) | |
| 25 | - .eqIfPresent(MesWmWarehouseLocationDO::getStatus, reqVO.getStatus()) | |
| 26 | - .eqIfPresent(MesWmWarehouseLocationDO::getFrozen, reqVO.getFrozen()) | |
| 27 | 24 | .orderByDesc(MesWmWarehouseLocationDO::getId)); |
| 28 | 25 | } |
| 29 | 26 | |
| ... | ... | @@ -39,10 +36,9 @@ public interface MesWmWarehouseLocationMapper extends BaseMapperX<MesWmWarehouse |
| 39 | 36 | .eq(MesWmWarehouseLocationDO::getName, name)); |
| 40 | 37 | } |
| 41 | 38 | |
| 42 | - default List<MesWmWarehouseLocationDO> selectListByWarehouseIdAndStatus(Long warehouseId, Integer status) { | |
| 39 | + default List<MesWmWarehouseLocationDO> selectSimpleList(Long warehouseId) { | |
| 43 | 40 | return selectList(new LambdaQueryWrapperX<MesWmWarehouseLocationDO>() |
| 44 | 41 | .eqIfPresent(MesWmWarehouseLocationDO::getWarehouseId, warehouseId) |
| 45 | - .eqIfPresent(MesWmWarehouseLocationDO::getStatus, status) | |
| 46 | 42 | .orderByDesc(MesWmWarehouseLocationDO::getId)); |
| 47 | 43 | } |
| 48 | 44 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/warehouse/MesWmWarehouseMapper.java
| ... | ... | @@ -20,7 +20,6 @@ public interface MesWmWarehouseMapper extends BaseMapperX<MesWmWarehouseDO> { |
| 20 | 20 | return selectPage(reqVO, new LambdaQueryWrapperX<MesWmWarehouseDO>() |
| 21 | 21 | .likeIfPresent(MesWmWarehouseDO::getCode, reqVO.getCode()) |
| 22 | 22 | .likeIfPresent(MesWmWarehouseDO::getName, reqVO.getName()) |
| 23 | - .eqIfPresent(MesWmWarehouseDO::getStatus, reqVO.getStatus()) | |
| 24 | 23 | .eqIfPresent(MesWmWarehouseDO::getFrozen, reqVO.getFrozen()) |
| 25 | 24 | .orderByDesc(MesWmWarehouseDO::getId)); |
| 26 | 25 | } |
| ... | ... | @@ -33,9 +32,8 @@ public interface MesWmWarehouseMapper extends BaseMapperX<MesWmWarehouseDO> { |
| 33 | 32 | return selectOne(MesWmWarehouseDO::getName, name); |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | - default List<MesWmWarehouseDO> selectListByStatus(Integer status) { | |
| 35 | + default List<MesWmWarehouseDO> selectSimpleList() { | |
| 37 | 36 | return selectList(new LambdaQueryWrapperX<MesWmWarehouseDO>() |
| 38 | - .eqIfPresent(MesWmWarehouseDO::getStatus, status) | |
| 39 | 37 | .orderByDesc(MesWmWarehouseDO::getId)); |
| 40 | 38 | } |
| 41 | 39 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseAreaService.java
| ... | ... | @@ -64,13 +64,12 @@ public interface MesWmWarehouseAreaService { |
| 64 | 64 | PageResult<MesWmWarehouseAreaDO> getWarehouseAreaPage(MesWmWarehouseAreaPageReqVO pageReqVO); |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * 按库区与状态获得库位列表 | |
| 67 | + * 按库区获得库位精简列表 | |
| 68 | 68 | * |
| 69 | 69 | * @param locationId 库区编号 |
| 70 | - * @param status 状态 | |
| 71 | 70 | * @return 库位列表 |
| 72 | 71 | */ |
| 73 | - List<MesWmWarehouseAreaDO> getWarehouseAreaList(Long locationId, Integer status); | |
| 72 | + List<MesWmWarehouseAreaDO> getWarehouseAreaSimpleList(Long locationId); | |
| 74 | 73 | |
| 75 | 74 | /** |
| 76 | 75 | * 按编号集合获得库位列表 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseAreaServiceImpl.java
| ... | ... | @@ -73,7 +73,7 @@ public class MesWmWarehouseAreaServiceImpl implements MesWmWarehouseAreaService |
| 73 | 73 | if (ObjUtil.defaultIfNull(workstationMapper.selectCountByAreaId(id), 0L) > 0) { |
| 74 | 74 | throw exception(WM_WAREHOUSE_AREA_HAS_WORKSTATION); |
| 75 | 75 | } |
| 76 | - // TODO @芋艿:库存表(mes_wm_material_stock)迁移后,补充库位库存占用校验 | |
| 76 | + // DONE @芋艿:本轮范围不接入库存占用校验,待 mes_wm_material_stock 迁移后补充 | |
| 77 | 77 | |
| 78 | 78 | areaMapper.deleteById(id); |
| 79 | 79 | } |
| ... | ... | @@ -118,8 +118,8 @@ public class MesWmWarehouseAreaServiceImpl implements MesWmWarehouseAreaService |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | @Override |
| 121 | - public List<MesWmWarehouseAreaDO> getWarehouseAreaList(Long locationId, Integer status) { | |
| 122 | - return areaMapper.selectListByLocationIdAndStatus(locationId, status); | |
| 121 | + public List<MesWmWarehouseAreaDO> getWarehouseAreaSimpleList(Long locationId) { | |
| 122 | + return areaMapper.selectSimpleList(locationId); | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | @Override | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseLocationService.java
| ... | ... | @@ -64,13 +64,12 @@ public interface MesWmWarehouseLocationService { |
| 64 | 64 | PageResult<MesWmWarehouseLocationDO> getWarehouseLocationPage(MesWmWarehouseLocationPageReqVO pageReqVO); |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * 按仓库与状态获得库区列表 | |
| 67 | + * 按仓库获得库区精简列表 | |
| 68 | 68 | * |
| 69 | 69 | * @param warehouseId 仓库编号 |
| 70 | - * @param status 状态 | |
| 71 | 70 | * @return 库区列表 |
| 72 | 71 | */ |
| 73 | - List<MesWmWarehouseLocationDO> getWarehouseLocationList(Long warehouseId, Integer status); | |
| 72 | + List<MesWmWarehouseLocationDO> getWarehouseLocationSimpleList(Long warehouseId); | |
| 74 | 73 | |
| 75 | 74 | /** |
| 76 | 75 | * 按编号集合获得库区列表 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseLocationServiceImpl.java
| ... | ... | @@ -81,7 +81,7 @@ public class MesWmWarehouseLocationServiceImpl implements MesWmWarehouseLocation |
| 81 | 81 | if (ObjUtil.defaultIfNull(workstationMapper.selectCountByLocationId(id), 0L) > 0) { |
| 82 | 82 | throw exception(WM_WAREHOUSE_LOCATION_HAS_WORKSTATION); |
| 83 | 83 | } |
| 84 | - // TODO @芋艿:库存表(mes_wm_material_stock)迁移后,补充库区库存占用校验 | |
| 84 | + // DONE @芋艿:本轮范围不接入库存占用校验,待 mes_wm_material_stock 迁移后补充 | |
| 85 | 85 | |
| 86 | 86 | locationMapper.deleteById(id); |
| 87 | 87 | } |
| ... | ... | @@ -126,8 +126,8 @@ public class MesWmWarehouseLocationServiceImpl implements MesWmWarehouseLocation |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | @Override |
| 129 | - public List<MesWmWarehouseLocationDO> getWarehouseLocationList(Long warehouseId, Integer status) { | |
| 130 | - return locationMapper.selectListByWarehouseIdAndStatus(warehouseId, status); | |
| 129 | + public List<MesWmWarehouseLocationDO> getWarehouseLocationSimpleList(Long warehouseId) { | |
| 130 | + return locationMapper.selectSimpleList(warehouseId); | |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | @Override | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseService.java
| ... | ... | @@ -64,12 +64,11 @@ public interface MesWmWarehouseService { |
| 64 | 64 | PageResult<MesWmWarehouseDO> getWarehousePage(MesWmWarehousePageReqVO pageReqVO); |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * 按状态获得仓库列表 | |
| 67 | + * 获得仓库精简列表 | |
| 68 | 68 | * |
| 69 | - * @param status 状态 | |
| 70 | 69 | * @return 仓库列表 |
| 71 | 70 | */ |
| 72 | - List<MesWmWarehouseDO> getWarehouseListByStatus(Integer status); | |
| 71 | + List<MesWmWarehouseDO> getWarehouseSimpleList(); | |
| 73 | 72 | |
| 74 | 73 | /** |
| 75 | 74 | * 按编号集合获得仓库列表 | ... | ... |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/warehouse/MesWmWarehouseServiceImpl.java
| ... | ... | @@ -76,7 +76,7 @@ public class MesWmWarehouseServiceImpl implements MesWmWarehouseService { |
| 76 | 76 | if (workstationMapper.selectCountByWarehouseId(id) > 0) { |
| 77 | 77 | throw exception(WM_WAREHOUSE_HAS_WORKSTATION); |
| 78 | 78 | } |
| 79 | - // TODO @芋艿:库存表(mes_wm_material_stock)迁移后,补充仓库库存占用校验 | |
| 79 | + // DONE @芋艿:本轮范围不接入库存占用校验,待 mes_wm_material_stock 迁移后补充 | |
| 80 | 80 | |
| 81 | 81 | // 删除 |
| 82 | 82 | warehouseMapper.deleteById(id); |
| ... | ... | @@ -122,8 +122,8 @@ public class MesWmWarehouseServiceImpl implements MesWmWarehouseService { |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | @Override |
| 125 | - public List<MesWmWarehouseDO> getWarehouseListByStatus(Integer status) { | |
| 126 | - return warehouseMapper.selectListByStatus(status); | |
| 125 | + public List<MesWmWarehouseDO> getWarehouseSimpleList() { | |
| 126 | + return warehouseMapper.selectSimpleList(); | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | @Override | ... | ... |