Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -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
|
||||
|
||||
# 复制应用文件
|
||||
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
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/base-server.jar"]
|
||||
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
|
||||
@@ -53,6 +53,12 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode DEPARTMENT_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_004, "组织物料不存在");
|
||||
ErrorCode MATERIAL_HAS_CLASSES_NOT_EXISTS = new ErrorCode(1_027_101_004, "物料持有属性不存在");
|
||||
|
||||
ErrorCode MATERIAL_CLASSES_HIERARCHY_INVALID = new ErrorCode(1_027_101_101, "物料分类层级不符合 1-2-3 的层级规则");
|
||||
ErrorCode MATERIAL_CLASSES_PARENT_NOT_EXISTS = new ErrorCode(1_027_101_102, "上级物料分类不存在");
|
||||
ErrorCode MATERIAL_CLASSES_MAX_LEVEL_EXCEEDED = new ErrorCode(1_027_101_103, "物料分类最多支持三级");
|
||||
ErrorCode MATERIAL_CLASSES_LEVEL_CONFLICT_WITH_CHILDREN = new ErrorCode(1_027_101_104, "存在下级分类,无法调整当前分类层级");
|
||||
ErrorCode MATERIAL_CLASSES_LEVEL3_REQUIRED_FOR_MATERIAL = new ErrorCode(1_027_101_105, "仅允许三级物料分类关联物料");
|
||||
|
||||
// ========== 工艺信息属性 ==========
|
||||
ErrorCode PROCESSING_INFOMATION_NOT_EXISTS = new ErrorCode(1_027_101_005, "工艺信息不存在");
|
||||
ErrorCode PROCESSING_INFOMATION_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_006, "工艺工序不存在");
|
||||
|
||||
@@ -5,12 +5,12 @@ import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialInfomationDO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSimplePageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSimpleRespVO;
|
||||
import com.zt.plat.module.base.service.base.MaterialInfomationService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -76,16 +76,23 @@ public class MaterialInfomationController {
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<MaterialInfomationRespVO> getMaterialInfomation(@RequestParam("id") Long id) {
|
||||
MaterialInfomationDO materialInfomation = materialInfomationService.getMaterialInfomation(id);
|
||||
return success(BeanUtils.toBean(materialInfomation, MaterialInfomationRespVO.class));
|
||||
MaterialInfomationRespVO materialInfomation = materialInfomationService.getMaterialInfomation(id);
|
||||
return success(materialInfomation);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<PageResult<MaterialInfomationRespVO>> getMaterialInfomationPage(@Valid MaterialInfomationPageReqVO pageReqVO) {
|
||||
PageResult<MaterialInfomationDO> pageResult = materialInfomationService.getMaterialInfomationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialInfomationRespVO.class));
|
||||
PageResult<MaterialInfomationRespVO> pageResult = materialInfomationService.getMaterialInfomationPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/simple-page")
|
||||
@Operation(summary = "获得物料信息精简分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<PageResult<MaterialInfomationSimpleRespVO>> getMaterialInfomationSimplePage(@Valid MaterialInfomationSimplePageReqVO pageReqVO) {
|
||||
return success(materialInfomationService.getMaterialInfomationSimplePage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@@ -95,10 +102,10 @@ public class MaterialInfomationController {
|
||||
public void exportMaterialInfomationExcel(@Valid MaterialInfomationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MaterialInfomationDO> list = materialInfomationService.getMaterialInfomationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物料信息.xls", "数据", MaterialInfomationRespVO.class,
|
||||
BeanUtils.toBean(list, MaterialInfomationRespVO.class));
|
||||
List<MaterialInfomationRespVO> list = materialInfomationService.getMaterialInfomationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物料信息.xls", "数据", MaterialInfomationRespVO.class,
|
||||
list);
|
||||
}
|
||||
|
||||
@GetMapping("/getOneTest")
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -116,4 +116,12 @@ public class BusinessDictionaryTypeController implements BusinessControllerMarke
|
||||
return success(businessDictionaryTypeService.getBusinessDictionaryDataListByDictionaryTypeId(dictionaryTypeId));
|
||||
}
|
||||
|
||||
@GetMapping("/business-dictionary-data/list-by-type")
|
||||
@Operation(summary = "根据字典类型编码获取业务字典数据列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:business-dictionary-type:query')")
|
||||
public CommonResult<List<BusinessDictionaryDataDO>> getBusinessDictionaryDataListByType(@RequestParam("type") String type) {
|
||||
// 通过类型编码直接获取对应的业务字典项,避免前端重复查询字典类型 ID
|
||||
return success(businessDictionaryTypeService.getBusinessDictionaryDataListByType(type));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
@@ -79,8 +78,8 @@ public class DepartmentMaterialController {
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:department-material:query')")
|
||||
public CommonResult<DepartmentMaterialRespVO> getDepartmentMaterial(@RequestParam("id") Long id) {
|
||||
DepartmentMaterialDO departmentMaterial = departmentMaterialService.getDepartmentMaterial(id);
|
||||
return success(BeanUtils.toBean(departmentMaterial, DepartmentMaterialRespVO.class));
|
||||
DepartmentMaterialRespVO departmentMaterial = departmentMaterialService.getDepartmentMaterial(id);
|
||||
return success(departmentMaterial);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
|
||||
@@ -29,7 +29,8 @@ public class DepartmentMaterialPageReqVO extends PageParam {
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "状态编码", example = "1")
|
||||
private String isEnable;
|
||||
// 对应系统字典 base_material_status,用于前端筛选
|
||||
private String status;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@@ -74,10 +74,7 @@ public class DepartmentMaterialRespVO {
|
||||
|
||||
@Schema(description = "状态编码")
|
||||
@ExcelProperty("状态编码")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "状态名称")
|
||||
@ExcelProperty("状态")
|
||||
private String statusLabel;
|
||||
// base_material_status 系统字典取值
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -12,6 +12,10 @@ public class DepartmentMaterialSaveReqVO {
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5674")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
|
||||
@NotNull(message = "部门ID不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "物料信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3923")
|
||||
@NotNull(message = "物料信息ID不能为空")
|
||||
private Long infomationId;
|
||||
@@ -23,6 +27,11 @@ public class DepartmentMaterialSaveReqVO {
|
||||
@NotEmpty(message = "字典数据值-物料类型不能为空")
|
||||
private String dictionaryDataValue;
|
||||
|
||||
@Schema(description = "状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
// 对应系统字典 base_material_status
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
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