Merge branch 'dev' into test

This commit is contained in:
chenbowen
2025-11-06 09:24:50 +08:00
9 changed files with 242 additions and 7 deletions

View File

@@ -1,13 +1,23 @@
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
FROM ${BASE_IMAGE}
# 设置应用目录 # 设置应用目录
RUN mkdir -p /app
WORKDIR /app WORKDIR /app
# 复制应用文件 # 复制应用文件
COPY target/base-server.jar /app/base-server.jar COPY target/base-server.jar app.jar
# 设置环境变量
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms512m -Xmx512m"
ENV SW_AGENT_HOME=/opt/skywalking/agent
ENV SW_AGENT_NAME=base-server
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"
# 暴露端口 # 暴露端口
EXPOSE 48200 EXPOSE 48200
# 运行应用 # 运行应用
ENTRYPOINT ["java", "-jar", "/app/base-server.jar"] CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar

View File

@@ -0,0 +1,22 @@
package com.zt.plat.module.base.controller.admin.base.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.zt.plat.framework.common.pojo.PageParam;
/**
* 物料信息精简分页 Request VO
*/
@Schema(description = "管理后台 - 物料信息精简分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class MaterialInfomationSimplePageReqVO extends PageParam {
@Schema(description = "关键字(编码/名称模糊匹配)")
private String keyword;
@Schema(description = "分类 ID")
private Long classesId;
}

View File

@@ -0,0 +1,26 @@
package com.zt.plat.module.base.controller.admin.base.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 精简的物料信息 Response VO
*/
@Data
public class MaterialInfomationSimpleRespVO {
@Schema(description = "物料信息ID", example = "1024")
private Long id;
@Schema(description = "物料编码")
private String code;
@Schema(description = "物料名称")
private String name;
@Schema(description = "分类ID")
private Long classesId;
@Schema(description = "备注")
private String remark;
}

View File

@@ -91,6 +91,13 @@ public class QuantityUnitRelationController implements BusinessControllerMarker
return success(BeanUtils.toBean(pageResult, QuantityUnitRelationRespVO.class)); return success(BeanUtils.toBean(pageResult, QuantityUnitRelationRespVO.class));
} }
@GetMapping("/simple-page")
@Operation(summary = "获得计量单位量与单位关联精简分页")
@PreAuthorize("@ss.hasPermission('unitmanagement:quantity-unit-relation:query')")
public CommonResult<PageResult<QuantityUnitRelationSimpleRespVO>> getQuantityUnitRelationSimplePage(@Valid QuantityUnitRelationSimplePageReqVO pageReqVO) {
return success(quantityUnitRelationService.getQuantityUnitRelationSimplePage(pageReqVO));
}
@GetMapping("/export-excel") @GetMapping("/export-excel")
@Operation(summary = "导出计量单位量与单位关联 Excel") @Operation(summary = "导出计量单位量与单位关联 Excel")
@PreAuthorize("@ss.hasPermission('unitmanagement:quantity-unit-relation:export')") @PreAuthorize("@ss.hasPermission('unitmanagement:quantity-unit-relation:export')")

View File

@@ -0,0 +1,22 @@
package com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 计量单位量与单位关联精简分页 Request VO
*/
@Schema(description = "管理后台 - 计量单位量与单位关联精简分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class QuantityUnitRelationSimplePageReqVO extends PageParam {
@Schema(description = "量纲ID")
private Long untQtyId;
@Schema(description = "关键字(量纲/单位名称、符号模糊匹配)")
private String keyword;
}

View File

@@ -0,0 +1,33 @@
package com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 精简的量纲-单位关联响应
*/
@Data
public class QuantityUnitRelationSimpleRespVO {
@Schema(description = "关联关系ID", example = "1001")
private Long id;
@Schema(description = "量纲ID", example = "2001")
private Long untQtyId;
@Schema(description = "量纲名称")
private String untQtyName;
@Schema(description = "计量单位ID", example = "3001")
private Long untId;
@Schema(description = "计量单位名称")
private String untName;
@Schema(description = "计量单位符号")
private String untSymbol;
@Schema(description = "是否基准单位1表示是0表示否")
private Integer isBse;
}

View File

@@ -1,13 +1,14 @@
package com.zt.plat.module.base.dal.dao.quantityUnitRelation; package com.zt.plat.module.base.dal.dao.quantityUnitRelation;
import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult; 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.mapper.BaseMapperX;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.QuantityUnitRelationPageReqVO;
import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.QuantityUnitRelationSimplePageReqVO;
import com.zt.plat.module.base.dal.dataobject.quantityUnitRelation.QuantityUnitRelationDO; import com.zt.plat.module.base.dal.dataobject.quantityUnitRelation.QuantityUnitRelationDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.*;
import java.util.List;
/** /**
* 计量单位量与单位关联 Mapper * 计量单位量与单位关联 Mapper
@@ -24,6 +25,10 @@ public interface QuantityUnitRelationMapper extends BaseMapperX<QuantityUnitRela
.orderByDesc(QuantityUnitRelationDO::getUntQtyId)); .orderByDesc(QuantityUnitRelationDO::getUntQtyId));
} }
default PageResult<QuantityUnitRelationDO> selectSimplePage(QuantityUnitRelationSimplePageReqVO reqVO, LambdaQueryWrapperX<QuantityUnitRelationDO> wrapper) {
return BaseMapperX.super.selectPage(reqVO, wrapper);
}
/** /**
* 根据量纲ID查询所有关联关系 * 根据量纲ID查询所有关联关系
* *

View File

@@ -5,6 +5,7 @@ import jakarta.validation.*;
import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.*; import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.*;
import com.zt.plat.module.base.dal.dataobject.quantityUnitRelation.QuantityUnitRelationDO; import com.zt.plat.module.base.dal.dataobject.quantityUnitRelation.QuantityUnitRelationDO;
import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.base.controller.admin.quantityUnitRelation.vo.QuantityUnitRelationSimplePageReqVO;
/** /**
* 计量单位量与单位关联 Service 接口 * 计量单位量与单位关联 Service 接口
@@ -85,4 +86,12 @@ public interface QuantityUnitRelationService {
*/ */
void deleteUnitWithRelation(@Valid DeleteUnitWithRelationReqVO deleteReqVO); void deleteUnitWithRelation(@Valid DeleteUnitWithRelationReqVO deleteReqVO);
/**
* 查询精简的量纲-单位关联分页,用于下拉框
*
* @param pageReqVO 分页查询条件
* @return 关联关系列表
*/
PageResult<QuantityUnitRelationSimpleRespVO> getQuantityUnitRelationSimplePage(QuantityUnitRelationSimplePageReqVO pageReqVO);
} }