fix:添加模具组在库状态

main
HuangHuiKang 1 week ago
parent 5d09204f8f
commit df9899ed09

@ -41,6 +41,9 @@ public class MoldBrandPageReqVO extends PageParam {
@Schema(description = "状态", example = "0") @Schema(description = "状态", example = "0")
private Integer status; private Integer status;
@Schema(description = "排除状态", example = "4")
private Integer excludeStatus;
@Schema(description = "当前位置", example = "一号机台") @Schema(description = "当前位置", example = "一号机台")
private String currentPosition; private String currentPosition;

@ -31,6 +31,7 @@ public interface MoldBrandMapper extends BaseMapperX<MoldBrandDO> {
.likeIfPresent(MoldBrandDO::getImages, reqVO.getImages()) .likeIfPresent(MoldBrandDO::getImages, reqVO.getImages())
.likeIfPresent(MoldBrandDO::getVersion, reqVO.getVersion()) .likeIfPresent(MoldBrandDO::getVersion, reqVO.getVersion())
.eqIfPresent(MoldBrandDO::getStatus, reqVO.getStatus()) .eqIfPresent(MoldBrandDO::getStatus, reqVO.getStatus())
.neIfPresent(MoldBrandDO::getStatus, reqVO.getExcludeStatus())
.likeIfPresent(MoldBrandDO::getCurrentPosition, reqVO.getCurrentPosition()) .likeIfPresent(MoldBrandDO::getCurrentPosition, reqVO.getCurrentPosition())
.eqIfPresent(MoldBrandDO::getUseTime, reqVO.getUseTime()) .eqIfPresent(MoldBrandDO::getUseTime, reqVO.getUseTime())
.eqIfPresent(MoldBrandDO::getMaintainType, reqVO.getMaintainType()) .eqIfPresent(MoldBrandDO::getMaintainType, reqVO.getMaintainType())

@ -13,7 +13,8 @@ public enum MoldBrandStatusEnum implements IntArrayValuable {
ON_MACHINE(0, "在机"), ON_MACHINE(0, "在机"),
STANDBY(1, "待用"), STANDBY(1, "待用"),
REPAIRING(2, "维修"), REPAIRING(2, "维修"),
SCRAPPED(3, "报废"); SCRAPPED(3, "报废"),
IN_STOCK(4, "在库");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MoldBrandStatusEnum::getStatus).toArray(); public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MoldBrandStatusEnum::getStatus).toArray();

@ -20,6 +20,9 @@ public class MoldBrandPageRespVO {
@Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") @Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
private Long standbyCount; private Long standbyCount;
@Schema(description = "在库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "8")
private Long inStockCount;
@Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5") @Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
private Long repairingCount; private Long repairingCount;

@ -16,6 +16,9 @@ public class MoldBrandStatusStatisticsRespVO {
@Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") @Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
private Long standbyCount; private Long standbyCount;
@Schema(description = "在库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "8")
private Long inStockCount;
@Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5") @Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
private Long repairingCount; private Long repairingCount;

@ -232,6 +232,7 @@ public class MoldBrandServiceImpl implements MoldBrandService {
respVO.setAllCount(statistics.getAllCount()); respVO.setAllCount(statistics.getAllCount());
respVO.setOnMachineCount(statistics.getOnMachineCount()); respVO.setOnMachineCount(statistics.getOnMachineCount());
respVO.setStandbyCount(statistics.getStandbyCount()); respVO.setStandbyCount(statistics.getStandbyCount());
respVO.setInStockCount(statistics.getInStockCount());
respVO.setRepairingCount(statistics.getRepairingCount()); respVO.setRepairingCount(statistics.getRepairingCount());
respVO.setScrappedCount(statistics.getScrappedCount()); respVO.setScrappedCount(statistics.getScrappedCount());
return respVO; return respVO;
@ -248,6 +249,7 @@ public class MoldBrandServiceImpl implements MoldBrandService {
respVO.setAllCount((long) list.size()); respVO.setAllCount((long) list.size());
respVO.setOnMachineCount(countByStatus(list, MoldBrandStatusEnum.ON_MACHINE.getStatus())); respVO.setOnMachineCount(countByStatus(list, MoldBrandStatusEnum.ON_MACHINE.getStatus()));
respVO.setStandbyCount(countByStatus(list, MoldBrandStatusEnum.STANDBY.getStatus())); respVO.setStandbyCount(countByStatus(list, MoldBrandStatusEnum.STANDBY.getStatus()));
respVO.setInStockCount(countByStatus(list, MoldBrandStatusEnum.IN_STOCK.getStatus()));
respVO.setRepairingCount(countByStatus(list, MoldBrandStatusEnum.REPAIRING.getStatus())); respVO.setRepairingCount(countByStatus(list, MoldBrandStatusEnum.REPAIRING.getStatus()));
respVO.setScrappedCount(countByStatus(list, MoldBrandStatusEnum.SCRAPPED.getStatus())); respVO.setScrappedCount(countByStatus(list, MoldBrandStatusEnum.SCRAPPED.getStatus()));
return respVO; return respVO;

Loading…
Cancel
Save