fix:物料盘点 todo 库存数量需要带上仓库或库位条件。
This commit is contained in:
@@ -79,4 +79,12 @@ public interface ConfigWarehouseLocationService {
|
|||||||
* @return 存放位置列表
|
* @return 存放位置列表
|
||||||
*/
|
*/
|
||||||
List<ConfigWarehouseLocationDO> getListByIds(List<Long> ids);
|
List<ConfigWarehouseLocationDO> getListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得存放位置列表
|
||||||
|
*
|
||||||
|
* @param warehouseIds 仓库id集合
|
||||||
|
* @return 存放位置列表
|
||||||
|
*/
|
||||||
|
List<ConfigWarehouseLocationDO> getLocationsByWarehouseIds(List<Long> warehouseIds);
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.config.service;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionSaveReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionSaveReqVO;
|
||||||
@@ -194,4 +195,12 @@ public class ConfigWarehouseLocationServiceImpl implements ConfigWarehouseLocati
|
|||||||
|
|
||||||
return configWarehouseLocationMapper.selectByIds(ids);
|
return configWarehouseLocationMapper.selectByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConfigWarehouseLocationDO> getLocationsByWarehouseIds(List<Long> warehouseIds) {
|
||||||
|
if (CollUtil.isEmpty(warehouseIds)) return Collections.emptyList();
|
||||||
|
return configWarehouseLocationMapper.selectList(Wrappers.lambdaQuery(ConfigWarehouseLocationDO.class)
|
||||||
|
.eq(ConfigWarehouseLocationDO::getDataType, QmsWarehouseLocationConstant.DATA_TYPE_LOCATION)
|
||||||
|
.in(ConfigWarehouseLocationDO::getParentId, warehouseIds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,12 @@ public class MaterialInventoryCheckDetailController implements BusinessControlle
|
|||||||
return success(materialInventoryCheckDetailService.createMaterialInventoryCheckDetail(createReqVO));
|
return success(materialInventoryCheckDetailService.createMaterialInventoryCheckDetail(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/inventory-inf")
|
||||||
|
@Operation(summary = "盘点物料")
|
||||||
|
public CommonResult<MaterialInventoryCheckDetailRespVO> inventoryCheckInfomation(@Valid @RequestBody MaterialInventoryCheckDetailSaveReqVO inventoryReqVO) {
|
||||||
|
return success(materialInventoryCheckDetailService.inventoryCheckInfomation(inventoryReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
// @PutMapping("/update")
|
// @PutMapping("/update")
|
||||||
@Operation(summary = "更新库存盘点明细")
|
@Operation(summary = "更新库存盘点明细")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:material-inventory-check-detail:update')")
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-check-detail:update')")
|
||||||
@@ -85,8 +91,8 @@ public class MaterialInventoryCheckDetailController implements BusinessControlle
|
|||||||
@Operation(summary = "获得库存盘点明细分页")
|
@Operation(summary = "获得库存盘点明细分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-check-detail:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-check-detail:query')")
|
||||||
public CommonResult<PageResult<MaterialInventoryCheckDetailRespVO>> getMaterialInventoryCheckDetailPage(@Valid MaterialInventoryCheckDetailPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialInventoryCheckDetailRespVO>> getMaterialInventoryCheckDetailPage(@Valid MaterialInventoryCheckDetailPageReqVO pageReqVO) {
|
||||||
PageResult<MaterialInventoryCheckDetailDO> pageResult = materialInventoryCheckDetailService.getMaterialInventoryCheckDetailPage(pageReqVO);
|
PageResult<MaterialInventoryCheckDetailRespVO> pageResult = materialInventoryCheckDetailService.getPageWithInf(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, MaterialInventoryCheckDetailRespVO.class));
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
|
|||||||
@@ -16,12 +16,6 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class MaterialInfomationPageReqVO extends PageParam {
|
public class MaterialInfomationPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "业务类型 inventory_check_detail-盘点明细")
|
|
||||||
private MaterialInfomationPageBusinessType businessType;
|
|
||||||
|
|
||||||
@Schema(description = "盘点项id")
|
|
||||||
private Long checkItemId;
|
|
||||||
|
|
||||||
@Schema(description = "物料大类id", example = "2691")
|
@Schema(description = "物料大类id", example = "2691")
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
|||||||
@@ -194,6 +194,9 @@ public class MaterialInfomationRespVO {
|
|||||||
@Schema(description = "盘点明细id")
|
@Schema(description = "盘点明细id")
|
||||||
private Long checkDetailId;
|
private Long checkDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "是否在库")
|
||||||
|
private Integer present;
|
||||||
|
|
||||||
@Schema(description = "初始总量")
|
@Schema(description = "初始总量")
|
||||||
@ExcelProperty("初始总量")
|
@ExcelProperty("初始总量")
|
||||||
private BigDecimal initialVolume;
|
private BigDecimal initialVolume;
|
||||||
|
|||||||
@@ -13,8 +13,11 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class MaterialInventoryCheckDetailPageReqVO extends PageParam {
|
public class MaterialInventoryCheckDetailPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "盘点单id")
|
||||||
|
private Long checkId;
|
||||||
|
|
||||||
@Schema(description = "盘点项id", example = "1655")
|
@Schema(description = "盘点项id", example = "1655")
|
||||||
private Long parentId;
|
private Long itemId;
|
||||||
|
|
||||||
@Schema(description = "物料实例id", example = "6754")
|
@Schema(description = "物料实例id", example = "6754")
|
||||||
private Long infomationId;
|
private Long infomationId;
|
||||||
|
|||||||
@@ -26,14 +26,25 @@ public class MaterialInventoryCheckDetailRespVO {
|
|||||||
@ExcelProperty("物料实例id")
|
@ExcelProperty("物料实例id")
|
||||||
private Long infomationId;
|
private Long infomationId;
|
||||||
|
|
||||||
|
@Schema(description = "物料名称")
|
||||||
|
private String infomationName;
|
||||||
|
|
||||||
|
@Schema(description = "物料编号")
|
||||||
|
private String infomationCode;
|
||||||
|
|
||||||
|
@Schema(description = "批次号")
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
@Schema(description = "存放位置")
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
@Schema(description = "存放位置编码")
|
||||||
|
private String locationCode;
|
||||||
|
|
||||||
@Schema(description = "是否存在,1-存在,0-不存在")
|
@Schema(description = "是否存在,1-存在,0-不存在")
|
||||||
@ExcelProperty("是否存在,1-存在,0-不存在")
|
@ExcelProperty("是否存在,1-存在,0-不存在")
|
||||||
private Integer present;
|
private Integer present;
|
||||||
|
|
||||||
@Schema(description = "物料编号,系统不存在的临时存储起来")
|
|
||||||
@ExcelProperty("物料编号,系统不存在的临时存储起来")
|
|
||||||
private String infomationCode;
|
|
||||||
|
|
||||||
@Schema(description = "当前数量")
|
@Schema(description = "当前数量")
|
||||||
@ExcelProperty("当前数量")
|
@ExcelProperty("当前数量")
|
||||||
private String currentQuantity;
|
private String currentQuantity;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 库存盘点明细新增/修改 Request VO")
|
@Schema(description = "管理后台 - 库存盘点明细新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class MaterialInventoryCheckDetailSaveReqVO {
|
public class MaterialInventoryCheckDetailSaveReqVO {
|
||||||
@@ -27,7 +29,7 @@ public class MaterialInventoryCheckDetailSaveReqVO {
|
|||||||
private String infomationCode;
|
private String infomationCode;
|
||||||
|
|
||||||
@Schema(description = "当前数量")
|
@Schema(description = "当前数量")
|
||||||
private String currentQuantity;
|
private BigDecimal currentQuantity;
|
||||||
|
|
||||||
@Schema(description = "状态", example = "1")
|
@Schema(description = "状态", example = "1")
|
||||||
private String status;
|
private String status;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.resource.material.controller.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -91,6 +92,9 @@ public class MaterialLifecycleRespVO {
|
|||||||
@Schema(description = "事由/说明")
|
@Schema(description = "事由/说明")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
|
@Schema(description = "自定义json配置")
|
||||||
|
private String customConfig;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
@ExcelProperty("所属部门")
|
@ExcelProperty("所属部门")
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
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;
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@@ -15,6 +16,18 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class MaterialProductPageReqVO extends PageParam {
|
public class MaterialProductPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "业务类型")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "部门ids")
|
||||||
|
private List<Long> departmentIds;
|
||||||
|
|
||||||
|
@Schema(description = "仓库ids")
|
||||||
|
private List<Long> warehouseIds;
|
||||||
|
|
||||||
|
@Schema(description = "库位ids")
|
||||||
|
private List<Long> locationIds;
|
||||||
|
|
||||||
@Schema(description = "父id", example = "7533")
|
@Schema(description = "父id", example = "7533")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user