fix:物料准备盘点接口及修复其他接口问题
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleDispatchDetailDO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigPermissionDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationParDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -26,7 +29,9 @@ public interface ConfigWarehouseLocationMapper extends BaseMapperX<ConfigWarehou
|
||||
|
||||
MPJLambdaWrapperX<ConfigWarehouseLocationDO> wrapper = new MPJLambdaWrapperX<>();
|
||||
//仓库
|
||||
wrapper.leftJoin(ConfigWarehouseLocationParDO.class, ConfigWarehouseLocationParDO::getId, ConfigWarehouseLocationDO::getParentId);
|
||||
wrapper.leftJoin(ConfigWarehouseLocationParDO.class, ConfigWarehouseLocationParDO::getId, ConfigWarehouseLocationDO::getParentId)
|
||||
// 权限
|
||||
.leftJoin(ConfigPermissionDO.class, ConfigPermissionDO::getSourceId, ConfigWarehouseLocationDO::getId);
|
||||
wrapper.selectAll(ConfigWarehouseLocationDO.class)
|
||||
.selectAs(ConfigWarehouseLocationParDO::getName, ConfigWarehouseLocationRespVO::getWarehouseName)
|
||||
.selectAs(ConfigWarehouseLocationParDO::getCode, ConfigWarehouseLocationRespVO::getWarehouseCode)
|
||||
@@ -43,6 +48,11 @@ public interface ConfigWarehouseLocationMapper extends BaseMapperX<ConfigWarehou
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigWarehouseLocationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getRemark, reqVO.getRemark())
|
||||
// 角色权限
|
||||
.and(CollUtil.isNotEmpty(reqVO.getRoleIds()), wrapper1 ->
|
||||
wrapper1.in(ConfigPermissionDO::getTargetId, reqVO.getRoleIds())
|
||||
.or()
|
||||
.eqIfExists(ConfigWarehouseLocationDO::getCreator, SecurityFrameworkUtils.getLoginUserId()))
|
||||
.orderByDesc(ConfigWarehouseLocationDO::getSortNo);
|
||||
|
||||
return selectJoinPage(reqVO, ConfigWarehouseLocationRespVO.class, wrapper);
|
||||
|
||||
@@ -2,12 +2,16 @@ package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
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.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationSaveReqVO;
|
||||
import com.zt.plat.module.qms.enums.QmsPermissionConstant;
|
||||
import com.zt.plat.module.qms.enums.QmsWarehouseLocationConstant;
|
||||
import com.zt.plat.module.system.api.permission.PermissionApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
@@ -38,6 +42,9 @@ public class ConfigWarehouseLocationServiceImpl implements ConfigWarehouseLocati
|
||||
@Resource
|
||||
private ConfigWarehouseLocationMapper configWarehouseLocationMapper;
|
||||
|
||||
@Autowired
|
||||
private PermissionApi permissionApi;
|
||||
|
||||
@Override
|
||||
public ConfigWarehouseLocationRespVO save(ConfigWarehouseLocationSaveReqVO reqVo) {
|
||||
Long id = reqVo.getId();
|
||||
@@ -171,6 +178,9 @@ public class ConfigWarehouseLocationServiceImpl implements ConfigWarehouseLocati
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocationPage(ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
// 获取当前用户角色
|
||||
CommonResult<Set<Long>> userRoleIds = permissionApi.getUserRoleIdListByUserId(SecurityFrameworkUtils.getLoginUserId());
|
||||
pageReqVO.setRoleIds(userRoleIds.getData());
|
||||
return configWarehouseLocationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
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 static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 库存盘点明细分页 Request VO")
|
||||
@Data
|
||||
public class MaterialInventoryCheckDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "盘点项id", example = "1655")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "物料实例id", example = "6754")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "是否存在,1-存在,0-不存在")
|
||||
private Integer present;
|
||||
|
||||
@Schema(description = "物料编号,系统不存在的临时存储起来")
|
||||
private String infomationCode;
|
||||
|
||||
@Schema(description = "当前数量")
|
||||
private String currentQuantity;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "处置方式,字典配置")
|
||||
private String disposalMethod;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 库存盘点明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialInventoryCheckDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24954")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "盘点项id", example = "1655")
|
||||
@ExcelProperty("盘点项id")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "物料实例id", example = "6754")
|
||||
@ExcelProperty("物料实例id")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "是否存在,1-存在,0-不存在")
|
||||
@ExcelProperty("是否存在,1-存在,0-不存在")
|
||||
private Integer present;
|
||||
|
||||
@Schema(description = "物料编号,系统不存在的临时存储起来")
|
||||
@ExcelProperty("物料编号,系统不存在的临时存储起来")
|
||||
private String infomationCode;
|
||||
|
||||
@Schema(description = "当前数量")
|
||||
@ExcelProperty("当前数量")
|
||||
private String currentQuantity;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "处置方式,字典配置")
|
||||
@ExcelProperty("处置方式,字典配置")
|
||||
private String disposalMethod;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 库存盘点明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialInventoryCheckDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24954")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "盘点项id", example = "1655")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "物料实例id", example = "6754")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "是否存在,1-存在,0-不存在")
|
||||
private Integer present;
|
||||
|
||||
@Schema(description = "物料编号,系统不存在的临时存储起来")
|
||||
private String infomationCode;
|
||||
|
||||
@Schema(description = "当前数量")
|
||||
private String currentQuantity;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "处置方式,字典配置")
|
||||
private String disposalMethod;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 MaterialInventoryCheckItemPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "父id", example = "20320")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "盘点物料大类ID", example = "15446")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "应有量")
|
||||
private BigDecimal expected;
|
||||
|
||||
@Schema(description = "实有量")
|
||||
private BigDecimal actual;
|
||||
|
||||
@Schema(description = "差异")
|
||||
private String difference;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
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 MaterialInventoryCheckItemRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1246")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父id", example = "20320")
|
||||
@ExcelProperty("父id")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "盘点物料大类ID", example = "15446")
|
||||
@ExcelProperty("盘点物料大类ID")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "盘点物料大类名称")
|
||||
@ExcelProperty("盘点物料大类名称")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "应有量")
|
||||
@ExcelProperty("应有量")
|
||||
private BigDecimal expected;
|
||||
|
||||
@Schema(description = "实有量")
|
||||
@ExcelProperty("实有量")
|
||||
private BigDecimal actual;
|
||||
|
||||
@Schema(description = "差异")
|
||||
@ExcelProperty("差异")
|
||||
private String difference;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
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 MaterialInventoryCheckItemSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1246")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父id", example = "20320")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "盘点物料大类ID", example = "15446")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "应有量")
|
||||
private BigDecimal expected;
|
||||
|
||||
@Schema(description = "实有量")
|
||||
private BigDecimal actual;
|
||||
|
||||
@Schema(description = "差异")
|
||||
private String difference;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user