From 851c6659ff42e2655fbe247ab4c51e5e5c656408 Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Mon, 10 Aug 2026 16:38:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=87=E7=AD=BE=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=B1=BB=E5=9E=8B=E5=A2=9E=E5=88=A0=E6=94=B9?= =?UTF-8?q?=E5=92=8C=E6=97=A7=E6=95=B0=E6=8D=AE=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/enums/ErrorCodeConstants.java | 3 + .../admin/label/LabelController.java | 6 +- .../admin/label/vo/LabelGroupRespVO.java | 20 +++ .../admin/label/vo/LabelRespVO.java | 5 +- .../admin/label/vo/LabelSaveReqVO.java | 5 +- .../labeltemplate/vo/LabelTemplateRespVO.java | 5 +- .../admin/labeltype/LabelTypeController.java | 60 ++++++++ .../admin/labeltype/vo/LabelTypeRespVO.java | 18 +++ .../labeltype/vo/LabelTypeSaveReqVO.java | 19 +++ .../labeltemplate/LabelTemplateDO.java | 4 +- .../dal/dataobject/labeltype/LabelTypeDO.java | 36 +++++ .../system/dal/dataobject/lable/LabelDO.java | 4 +- .../system/dal/mysql/label/LabelMapper.java | 13 +- .../labeltemplate/LabelTemplateMapper.java | 9 +- .../dal/mysql/labeltype/LabelTypeMapper.java | 40 +++++ .../dict/DictDataChangeOperationEnum.java | 5 + .../event/dict/DictDataChangedEvent.java | 21 +++ .../event/dict/LabelTypeDictSyncHandler.java | 90 +++++++++++ .../service/dict/DictDataServiceImpl.java | 15 ++ .../LabelTemplateServiceImpl.java | 26 +++- .../service/labeltype/LabelTypeService.java | 23 +++ .../labeltype/LabelTypeServiceImpl.java | 145 ++++++++++++++++++ .../system/service/lable/LabelService.java | 6 +- .../service/lable/LabelServiceImpl.java | 97 ++++++++---- .../resources/message_errorcode.properties | 5 + .../message_errorcode_cht.properties | 5 + .../resources/message_errorcode_en.properties | 5 + .../resources/message_errorcode_zh.properties | 5 + 28 files changed, 645 insertions(+), 50 deletions(-) create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelGroupRespVO.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/LabelTypeController.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeRespVO.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeSaveReqVO.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltype/LabelTypeDO.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltype/LabelTypeMapper.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangeOperationEnum.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangedEvent.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/LabelTypeDictSyncHandler.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeService.java create mode 100644 cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeServiceImpl.java diff --git a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java index 4dfe3c330..454afe109 100644 --- a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java +++ b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java @@ -225,6 +225,9 @@ public class ErrorCodeConstants { public static final ErrorCode DEFAULT_NOT_DELETED = new ErrorCode(1_002_300_004, "default.not.deleted"); public static final ErrorCode LABEL_IS_USE_ERROR = new ErrorCode(1_002_300_006, "label.is.use.error"); public static final ErrorCode LABEL_SYSTEM_TYPE_NOT_OPERABLE = new ErrorCode(1_002_300_007, "label.type.not.operable"); + public static final ErrorCode LABEL_TYPE_NOT_EXISTS = new ErrorCode(1_002_300_008, "label.type.not.exists"); + public static final ErrorCode LABEL_TYPE_DUPLICATE = new ErrorCode(1_002_300_009, "label.type.duplicate"); + public static final ErrorCode LABEL_TYPE_IS_USE_ERROR = new ErrorCode(1_002_300_010, "label.type.is.use.error"); // ========== 系统数据源 1_002_301_000 ========== diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/LabelController.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/LabelController.java index 2d53685f9..80b6ac9c8 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/LabelController.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/LabelController.java @@ -10,6 +10,7 @@ import com.cf.imes.framework.operatelog.core.annotations.OperateLog; import com.cf.imes.module.system.controller.admin.label.vo.LabelPageReqVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelRespVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelSaveReqVO; +import com.cf.imes.module.system.controller.admin.label.vo.LabelGroupRespVO; import com.cf.imes.module.system.dal.dataobject.lable.LabelDO; import com.cf.imes.module.system.service.lable.LabelService; import com.cf.imes.module.system.validation.label.LabelTemplateTypeValid; @@ -25,7 +26,6 @@ import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import java.io.IOException; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; import static com.cf.imes.framework.common.pojo.CommonResult.success; @@ -97,7 +97,7 @@ public class LabelController { @Operation(summary = "获得分组标签列表") @PreAuthorize("@ss.hasAnyPermissions('system:label-template:query','sysTagDesignManager:query')") @OperateLog(enable = false) - public CommonResult>> getGroupList(@RequestParam(value = "organId", required = false) Long organId) { + public CommonResult> getGroupList(@RequestParam(value = "organId", required = false) Long organId) { return success(labelService.getGroupList(organId)); } @@ -115,4 +115,4 @@ public class LabelController { BeanUtils.toBean(list, LabelRespVO.class)); } -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelGroupRespVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelGroupRespVO.java new file mode 100644 index 000000000..44e6169fb --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelGroupRespVO.java @@ -0,0 +1,20 @@ +package com.cf.imes.module.system.controller.admin.label.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "标签分组 Response VO") +@Data +public class LabelGroupRespVO { + + @Schema(description = "标签类型主键") + private Long typeId; + + @Schema(description = "标签类型名称") + private String type; + + @Schema(description = "标签列表") + private List list; +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelRespVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelRespVO.java index ef07d4bf9..f1e644f17 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelRespVO.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelRespVO.java @@ -21,6 +21,9 @@ public class LabelRespVO { @ExcelProperty("主键") private Long id; + @Schema(description = "标签类型主键") + private Long labelTypeId; + @Schema(description = "标签类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @ExcelProperty("标签类型") private String type; @@ -52,4 +55,4 @@ public class LabelRespVO { @Schema(description = "配置") private String template; -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelSaveReqVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelSaveReqVO.java index 00172f5f2..d194591b4 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelSaveReqVO.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/label/vo/LabelSaveReqVO.java @@ -3,7 +3,6 @@ package com.cf.imes.module.system.controller.admin.label.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; @@ -15,8 +14,10 @@ public class LabelSaveReqVO { @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "939") private Long id; + @Schema(description = "标签类型主键;兼容旧调用时可仅传 type") + private Long labelTypeId; + @Schema(description = "标签类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "materialLabel") - @NotBlank(message = "label.save.type.notBlank") @Size(max = 32, message = "label.save.type.size") private String type; diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltemplate/vo/LabelTemplateRespVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltemplate/vo/LabelTemplateRespVO.java index cb583dc56..ab8b957aa 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltemplate/vo/LabelTemplateRespVO.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltemplate/vo/LabelTemplateRespVO.java @@ -19,6 +19,9 @@ public class LabelTemplateRespVO { @ExcelProperty("主键") private Long id; + @Schema(description = "标签类型主键") + private Long labelTypeId; + @Schema(description = "标签类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @ExcelProperty("标签类型") private String type; @@ -49,4 +52,4 @@ public class LabelTemplateRespVO { @Schema(description = "配置") private String template; -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/LabelTypeController.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/LabelTypeController.java new file mode 100644 index 000000000..54e14fb1f --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/LabelTypeController.java @@ -0,0 +1,60 @@ +package com.cf.imes.module.system.controller.admin.labeltype; + +import com.cf.imes.framework.common.pojo.CommonResult; +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeRespVO; +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeSaveReqVO; +import com.cf.imes.module.system.service.labeltype.LabelTypeService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static com.cf.imes.framework.common.pojo.CommonResult.success; + +@Tag(name = "标签类型管理") +@RestController +@RequestMapping("/system/label-type") +@Validated +public class LabelTypeController { + + @Resource + private LabelTypeService labelTypeService; + + @GetMapping("/list") + @Operation(summary = "获得标签类型列表") + @PreAuthorize("@ss.hasPermission('sysTagDesignManager:query')") + public CommonResult> getList(@RequestParam(value = "organId", required = false) Long organId) { + return success(labelTypeService.getLabelTypeList(organId)); + } + + @PostMapping("/create") + @Operation(summary = "创建自定义标签类型") + @PreAuthorize("@ss.hasPermission('sysTagDesignManager:create')") + public CommonResult create(@Valid @RequestBody LabelTypeSaveReqVO reqVO) { + return success(labelTypeService.createLabelType(reqVO)); + } + + @PutMapping("/update") + @Operation(summary = "修改自定义标签类型") + @PreAuthorize("@ss.hasPermission('sysTagDesignManager:update')") + public CommonResult update(@Valid @RequestBody LabelTypeSaveReqVO reqVO) { + labelTypeService.updateLabelType(reqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除自定义标签类型") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('sysTagDesignManager:delete')") + public CommonResult delete(@RequestParam("id") @NotNull Long id) { + labelTypeService.deleteLabelType(id); + return success(true); + } +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeRespVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeRespVO.java new file mode 100644 index 000000000..096f63a81 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeRespVO.java @@ -0,0 +1,18 @@ +package com.cf.imes.module.system.controller.admin.labeltype.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 标签类型 Response VO") +@Data +public class LabelTypeRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED) + private Long id; + + @Schema(description = "标签类型名称", requiredMode = Schema.RequiredMode.REQUIRED) + private String type; + + @Schema(description = "来源:SYSTEM/CUSTOM") + private String source; +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeSaveReqVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeSaveReqVO.java new file mode 100644 index 000000000..7aa077767 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/labeltype/vo/LabelTypeSaveReqVO.java @@ -0,0 +1,19 @@ +package com.cf.imes.module.system.controller.admin.labeltype.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import lombok.Data; + +@Schema(description = "管理后台 - 标签类型新增/修改 Request VO") +@Data +public class LabelTypeSaveReqVO { + + @Schema(description = "主键", example = "1") + private Long id; + + @Schema(description = "标签类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单自定义标签") + @NotBlank(message = "label.type.name.notBlank") + @Size(max = 32, message = "label.type.name.size") + private String type; +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltemplate/LabelTemplateDO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltemplate/LabelTemplateDO.java index e9a2f4270..b09259bf2 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltemplate/LabelTemplateDO.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltemplate/LabelTemplateDO.java @@ -27,6 +27,8 @@ public class LabelTemplateDO extends BaseDO { */ @TableId private Long id; + /** 标签类型主键;type 保留用于兼容历史调用方 */ + private Long labelTypeId; /** * 标签类型 */ @@ -56,4 +58,4 @@ public class LabelTemplateDO extends BaseDO { */ private String template; -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltype/LabelTypeDO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltype/LabelTypeDO.java new file mode 100644 index 000000000..509c46644 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/labeltype/LabelTypeDO.java @@ -0,0 +1,36 @@ +package com.cf.imes.module.system.dal.dataobject.labeltype; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.cf.imes.framework.organ.core.db.OrganBaseDO; +import lombok.*; + +/** + * 标签类型 DO。系统类型来自 labelType 字典,自定义类型归属于组织。 + */ +@TableName("system_label_type") +@KeySequence("system_label_type_seq") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class LabelTypeDO extends OrganBaseDO { + + @TableId + private Long id; + + /** 前端展示及兼容字段使用的类型名称 */ + private String type; + + /** SYSTEM / CUSTOM */ + private String source; + + /** 系统类型对应的字典数据 ID */ + private Long dictDataId; + + /** 系统类型跟随字典启用禁用;自定义类型固定启用 */ + private Integer status; +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/lable/LabelDO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/lable/LabelDO.java index 87ad61358..779cf087c 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/lable/LabelDO.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/dataobject/lable/LabelDO.java @@ -27,6 +27,8 @@ public class LabelDO extends OrganBaseDO { */ @TableId private Long id; + /** 标签类型主键;type 保留用于兼容历史调用方 */ + private Long labelTypeId; /** * 标签类型 */ @@ -52,4 +54,4 @@ public class LabelDO extends OrganBaseDO { */ private String template; -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/label/LabelMapper.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/label/LabelMapper.java index fcbea427d..2bf476085 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/label/LabelMapper.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/label/LabelMapper.java @@ -3,6 +3,7 @@ package com.cf.imes.module.system.dal.mysql.label; import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX; import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.cf.imes.module.system.controller.admin.label.vo.LabelPageReqVO; import com.cf.imes.module.system.dal.dataobject.lable.LabelDO; import org.apache.ibatis.annotations.Mapper; @@ -15,6 +16,16 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface LabelMapper extends BaseMapperX { + default long selectCountByLabelTypeId(Long labelTypeId) { + return selectCount(LabelDO::getLabelTypeId, labelTypeId); + } + + default int updateTypeByLabelTypeId(Long labelTypeId, String type) { + return update(null, new LambdaUpdateWrapper() + .eq(LabelDO::getLabelTypeId, labelTypeId) + .set(LabelDO::getType, type)); + } + default PageResult selectPage(LabelPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(LabelDO::getType, reqVO.getType()) @@ -26,4 +37,4 @@ public interface LabelMapper extends BaseMapperX { .orderByDesc(LabelDO::getId)); } -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltemplate/LabelTemplateMapper.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltemplate/LabelTemplateMapper.java index 2868eb8ef..65e1147d8 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltemplate/LabelTemplateMapper.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltemplate/LabelTemplateMapper.java @@ -5,6 +5,7 @@ import java.util.*; import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.cf.imes.module.system.dal.dataobject.labeltemplate.LabelTemplateDO; import org.apache.ibatis.annotations.Mapper; import com.cf.imes.module.system.controller.admin.labeltemplate.vo.*; @@ -17,6 +18,12 @@ import com.cf.imes.module.system.controller.admin.labeltemplate.vo.*; @Mapper public interface LabelTemplateMapper extends BaseMapperX { + default int updateTypeByLabelTypeId(Long labelTypeId, String type) { + return update(null, new LambdaUpdateWrapper() + .eq(LabelTemplateDO::getLabelTypeId, labelTypeId) + .set(LabelTemplateDO::getType, type)); + } + default PageResult selectPage(LabelTemplatePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(LabelTemplateDO::getType, reqVO.getType()) @@ -28,4 +35,4 @@ public interface LabelTemplateMapper extends BaseMapperX { .orderByDesc(LabelTemplateDO::getId)); } -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltype/LabelTypeMapper.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltype/LabelTypeMapper.java new file mode 100644 index 000000000..0d4332652 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/dal/mysql/labeltype/LabelTypeMapper.java @@ -0,0 +1,40 @@ +package com.cf.imes.module.system.dal.mysql.labeltype; + +import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX; +import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface LabelTypeMapper extends BaseMapperX { + + default LabelTypeDO selectByTypeAndOrgan(String type, Long organId) { + return selectOne(new LambdaQueryWrapperX() + .eq(LabelTypeDO::getType, type) + .eq(LabelTypeDO::getSource, "CUSTOM") + .eq(LabelTypeDO::getOrganId, organId)); + } + + default LabelTypeDO selectSystemByType(String type) { + return selectOne(new LambdaQueryWrapperX() + .eq(LabelTypeDO::getType, type) + .eq(LabelTypeDO::getSource, "SYSTEM")); + } + + default LabelTypeDO selectByDictDataId(Long dictDataId) { + return selectOne(new LambdaQueryWrapperX() + .eq(LabelTypeDO::getDictDataId, dictDataId)); + } + + default List selectAvailable(Long organId) { + return selectList(new LambdaQueryWrapperX() + .and(wrapper -> wrapper + .and(system -> system.eq(LabelTypeDO::getSource, "SYSTEM") + .eq(LabelTypeDO::getStatus, 0)) + .or(custom -> custom.eq(LabelTypeDO::getSource, "CUSTOM") + .eq(LabelTypeDO::getOrganId, organId))) + .orderByAsc(LabelTypeDO::getId)); + } +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangeOperationEnum.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangeOperationEnum.java new file mode 100644 index 000000000..803883e10 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangeOperationEnum.java @@ -0,0 +1,5 @@ +package com.cf.imes.module.system.event.dict; + +public enum DictDataChangeOperationEnum { + CREATE, UPDATE, DELETE +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangedEvent.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangedEvent.java new file mode 100644 index 000000000..5881afefc --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/DictDataChangedEvent.java @@ -0,0 +1,21 @@ +package com.cf.imes.module.system.event.dict; + +import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO; +import lombok.Getter; +import org.springframework.context.ApplicationEvent; + +@Getter +public class DictDataChangedEvent extends ApplicationEvent { + + private final DictDataChangeOperationEnum operation; + private final DictDataDO before; + private final DictDataDO after; + + public DictDataChangedEvent(Object source, DictDataChangeOperationEnum operation, + DictDataDO before, DictDataDO after) { + super(source); + this.operation = operation; + this.before = before; + this.after = after; + } +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/LabelTypeDictSyncHandler.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/LabelTypeDictSyncHandler.java new file mode 100644 index 000000000..ed921b512 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/event/dict/LabelTypeDictSyncHandler.java @@ -0,0 +1,90 @@ +package com.cf.imes.module.system.event.dict; + +import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; +import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper; +import com.cf.imes.module.system.dal.mysql.labeltype.LabelTypeMapper; +import com.cf.imes.module.system.dal.mysql.label.LabelMapper; +import com.cf.imes.module.system.dal.mysql.labeltemplate.LabelTemplateMapper; +import com.cf.imes.module.system.enums.DictTypeConstants; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** labelType 字典到标签类型模型的通用事件处理器。 */ +@Component +public class LabelTypeDictSyncHandler { + + private static final String SOURCE_SYSTEM = "SYSTEM"; + + @Resource + private DictDataMapper dictDataMapper; + @Resource + private LabelTypeMapper labelTypeMapper; + @Resource + private LabelMapper labelMapper; + @Resource + private LabelTemplateMapper labelTemplateMapper; + + @PostConstruct + public void syncExisting() { + List dictDataList = dictDataMapper.selectListByStatusAndDictType(null, DictTypeConstants.LABEL_TYPE); + dictDataList.forEach(this::syncUpsert); + } + + @EventListener + public void onDictDataChanged(DictDataChangedEvent event) { + DictDataDO data = event.getAfter() != null ? event.getAfter() : event.getBefore(); + if (data == null || !DictTypeConstants.LABEL_TYPE.equals(data.getDictType())) { + if (event.getBefore() == null || !DictTypeConstants.LABEL_TYPE.equals(event.getBefore().getDictType())) { + return; + } + } + if (event.getOperation() == DictDataChangeOperationEnum.UPDATE + && event.getAfter() != null + && !DictTypeConstants.LABEL_TYPE.equals(event.getAfter().getDictType())) { + deleteType(event.getBefore()); + return; + } + if (event.getOperation() == DictDataChangeOperationEnum.DELETE) { + deleteType(data); + return; + } + LabelTypeDO typeDO = syncUpsert(data); + if (typeDO != null) { + labelMapper.updateTypeByLabelTypeId(typeDO.getId(), typeDO.getType()); + labelTemplateMapper.updateTypeByLabelTypeId(typeDO.getId(), typeDO.getType()); + } + } + + private void deleteType(DictDataDO dictData) { + if (dictData == null) { + return; + } + LabelTypeDO typeDO = labelTypeMapper.selectByDictDataId(dictData.getId()); + if (typeDO != null) { + labelTypeMapper.deleteById(typeDO.getId()); + } + } + + private LabelTypeDO syncUpsert(DictDataDO dictData) { + LabelTypeDO typeDO = labelTypeMapper.selectByDictDataId(dictData.getId()); + if (typeDO == null) { + typeDO = LabelTypeDO.builder().type(dictData.getValue()).source(SOURCE_SYSTEM) + .dictDataId(dictData.getId()).status(dictData.getStatus()).build(); + labelTypeMapper.insert(typeDO); + return typeDO; + } + LabelTypeDO update = new LabelTypeDO(); + update.setId(typeDO.getId()); + update.setType(dictData.getValue()); + update.setStatus(dictData.getStatus()); + labelTypeMapper.updateById(update); + typeDO.setType(dictData.getValue()); + typeDO.setStatus(dictData.getStatus()); + return typeDO; + } +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictDataServiceImpl.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictDataServiceImpl.java index ce77e6ec2..d0e3d70bc 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictDataServiceImpl.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictDataServiceImpl.java @@ -24,6 +24,8 @@ import com.cf.imes.module.system.dal.mysql.dict.DictDataI18nMapper; import com.cf.imes.module.system.dal.mysql.dict.DictDataI18nVersionMapper; import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper; import com.cf.imes.module.system.enums.ErrorCodeConstants; +import com.cf.imes.module.system.event.dict.DictDataChangeOperationEnum; +import com.cf.imes.module.system.event.dict.DictDataChangedEvent; import com.cf.imes.module.system.enums.common.LanguageEnum; import com.cf.imes.module.system.framework.trans.config.TransApi; import com.cf.imes.module.system.util.locale.DictDataI18nCacheUtils; @@ -31,6 +33,7 @@ import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Service; import jakarta.annotation.Resource; @@ -84,6 +87,9 @@ public class DictDataServiceImpl implements DictDataService { @Resource private StringRedisTemplate stringRedisTemplate; + @Resource + private ApplicationEventPublisher applicationEventPublisher; + @Override public List getDictDataList(Integer status, String dictType) { List list = dictDataMapper.selectListByStatusAndDictType(status, dictType); @@ -111,11 +117,14 @@ public class DictDataServiceImpl implements DictDataService { // 插入字典类型 DictDataDO dictData = BeanUtils.toBean(createReqVO, DictDataDO.class); dictDataMapper.insert(dictData); + applicationEventPublisher.publishEvent(new DictDataChangedEvent(this, + DictDataChangeOperationEnum.CREATE, null, dictData)); return dictData.getId(); } @Override public void updateDictData(DictDataSaveReqVO updateReqVO) { + DictDataDO before = dictDataMapper.selectById(updateReqVO.getId()); // 校验自己存在 validateDictDataExists(updateReqVO.getId()); // 校验字典类型有效 @@ -126,6 +135,9 @@ public class DictDataServiceImpl implements DictDataService { // 更新字典类型 DictDataDO updateObj = BeanUtils.toBean(updateReqVO, DictDataDO.class); dictDataMapper.updateById(updateObj); + DictDataDO after = dictDataMapper.selectById(updateReqVO.getId()); + applicationEventPublisher.publishEvent(new DictDataChangedEvent(this, + DictDataChangeOperationEnum.UPDATE, before, after)); } @Override @@ -134,7 +146,10 @@ public class DictDataServiceImpl implements DictDataService { validateDictDataExists(id); // 删除字典数据 + DictDataDO before = dictDataMapper.selectById(id); dictDataMapper.deleteById(id); + applicationEventPublisher.publishEvent(new DictDataChangedEvent(this, + DictDataChangeOperationEnum.DELETE, before, null)); } @Override diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltemplate/LabelTemplateServiceImpl.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltemplate/LabelTemplateServiceImpl.java index fee0a63f5..49a2ec1b4 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltemplate/LabelTemplateServiceImpl.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltemplate/LabelTemplateServiceImpl.java @@ -14,6 +14,8 @@ import com.cf.imes.module.system.controller.admin.labeltemplate.vo.*; import com.cf.imes.module.system.dal.dataobject.labeltemplate.LabelTemplateDO; import com.cf.imes.framework.common.util.object.BeanUtils; import com.cf.imes.module.system.dal.mysql.labeltemplate.LabelTemplateMapper; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; +import com.cf.imes.module.system.dal.mysql.labeltype.LabelTypeMapper; import jakarta.annotation.Resource; import static com.cf.imes.module.system.enums.ErrorCodeConstants.*; @@ -30,10 +32,16 @@ public class LabelTemplateServiceImpl implements LabelTemplateService { @Resource private LabelTemplateMapper labelTemplateMapper; + @Resource + private LabelTypeMapper labelTypeMapper; + @Override public Long createLabelTemplate(LabelTemplateSaveReqVO createReqVO) { // 插入 LabelTemplateDO labelTemplate = BeanUtils.toBean(createReqVO, LabelTemplateDO.class); + LabelTypeDO labelType = requireSystemType(createReqVO.getType()); + labelTemplate.setLabelTypeId(labelType.getId()); + labelTemplate.setType(labelType.getType()); labelTemplate.setTemplate(JsonUtils.zipString(labelTemplate.getTemplate())); labelTemplateMapper.insert(labelTemplate); // 返回 @@ -46,6 +54,9 @@ public class LabelTemplateServiceImpl implements LabelTemplateService { validateLabelTemplateExists(updateReqVO.getId()); // 更新 LabelTemplateDO updateObj = BeanUtils.toBean(updateReqVO, LabelTemplateDO.class); + LabelTypeDO labelType = requireSystemType(updateReqVO.getType()); + updateObj.setLabelTypeId(labelType.getId()); + updateObj.setType(labelType.getType()); if(!updateReqVO.getTemplate().isEmpty()){ updateObj.setTemplate(JsonUtils.zipString(updateObj.getTemplate())); @@ -84,9 +95,10 @@ public class LabelTemplateServiceImpl implements LabelTemplateService { @Override public LabelTemplateRespVO getDefaultLabelTemplate(String type) { + LabelTypeDO labelType = requireSystemType(type); List labelTemplateDOS = labelTemplateMapper.selectList(new LambdaQueryWrapperX() .eq(LabelTemplateDO::getIsDefault, Boolean.TRUE) - .eq(LabelTemplateDO::getType, type) + .eq(LabelTemplateDO::getLabelTypeId, labelType.getId()) ); if(CollUtil.isNotEmpty(labelTemplateDOS)) { if (labelTemplateDOS.size() > 1) { @@ -109,7 +121,7 @@ public class LabelTemplateServiceImpl implements LabelTemplateService { } List labelTemplateDOS = labelTemplateMapper.selectList(new LambdaQueryWrapperX() .eq(LabelTemplateDO::getIsDefault, Boolean.TRUE) - .eq(LabelTemplateDO::getType, labelTemplateDO.getType()) + .eq(LabelTemplateDO::getLabelTypeId, labelTemplateDO.getLabelTypeId()) ); // if(CollectionUtil.isEmpty(labelTemplateDOS) || labelTemplateDOS.size()>1) { // throw new ServiceException(DEFAULT_TEMPLATE_COUNT); @@ -127,4 +139,12 @@ public class LabelTemplateServiceImpl implements LabelTemplateService { return Boolean.TRUE; } -} \ No newline at end of file + private LabelTypeDO requireSystemType(String type) { + LabelTypeDO labelType = labelTypeMapper.selectSystemByType(type == null ? null : type.trim()); + if (labelType == null || !Integer.valueOf(0).equals(labelType.getStatus())) { + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + return labelType; + } + +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeService.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeService.java new file mode 100644 index 000000000..347450557 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeService.java @@ -0,0 +1,23 @@ +package com.cf.imes.module.system.service.labeltype; + +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeRespVO; +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeSaveReqVO; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; + +import jakarta.validation.Valid; +import java.util.List; + +public interface LabelTypeService { + + Long createLabelType(@Valid LabelTypeSaveReqVO reqVO); + + void updateLabelType(@Valid LabelTypeSaveReqVO reqVO); + + void deleteLabelType(Long id); + + List getLabelTypeList(Long organId); + + LabelTypeDO getAvailableLabelType(Long id, Long organId); + + LabelTypeDO getAvailableLabelType(String type, Long organId); +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeServiceImpl.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeServiceImpl.java new file mode 100644 index 000000000..18861bd6d --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/labeltype/LabelTypeServiceImpl.java @@ -0,0 +1,145 @@ +package com.cf.imes.module.system.service.labeltype; + +import com.cf.imes.framework.common.enums.CommonStatusEnum; +import com.cf.imes.framework.common.exception.ServiceException; +import com.cf.imes.framework.common.util.object.BeanUtils; +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeRespVO; +import com.cf.imes.module.system.controller.admin.labeltype.vo.LabelTypeSaveReqVO; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; +import com.cf.imes.module.system.dal.mysql.label.LabelMapper; +import com.cf.imes.module.system.dal.mysql.labeltype.LabelTypeMapper; +import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper; +import com.cf.imes.module.system.enums.DictTypeConstants; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId; +import static com.cf.imes.module.system.enums.ErrorCodeConstants.*; + +@Service +@Validated +public class LabelTypeServiceImpl implements LabelTypeService { + + private static final String SOURCE_SYSTEM = "SYSTEM"; + private static final String SOURCE_CUSTOM = "CUSTOM"; + + @Resource + private LabelTypeMapper labelTypeMapper; + @Resource + private DictDataMapper dictDataMapper; + @Resource + private LabelMapper labelMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public Long createLabelType(LabelTypeSaveReqVO reqVO) { + Long organId = getUserOrganId(); + String type = normalize(reqVO.getType()); + validateNotSystemType(type); + if (labelTypeMapper.selectByTypeAndOrgan(type, organId) != null) { + throw new ServiceException(LABEL_TYPE_DUPLICATE); + } + LabelTypeDO typeDO = LabelTypeDO.builder().type(type).source(SOURCE_CUSTOM) + .status(CommonStatusEnum.ENABLE.getStatus()).build(); + typeDO.setOrganId(organId); + labelTypeMapper.insert(typeDO); + return typeDO.getId(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateLabelType(LabelTypeSaveReqVO reqVO) { + LabelTypeDO typeDO = getOwnedCustomType(reqVO.getId()); + String type = normalize(reqVO.getType()); + validateNotSystemType(type); + LabelTypeDO duplicate = labelTypeMapper.selectByTypeAndOrgan(type, typeDO.getOrganId()); + if (duplicate != null && !duplicate.getId().equals(typeDO.getId())) { + throw new ServiceException(LABEL_TYPE_DUPLICATE); + } + LabelTypeDO update = new LabelTypeDO(); + update.setId(typeDO.getId()); + update.setType(type); + labelTypeMapper.updateById(update); + labelMapper.updateTypeByLabelTypeId(typeDO.getId(), type); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteLabelType(Long id) { + LabelTypeDO typeDO = getOwnedCustomType(id); + if (labelMapper.selectCountByLabelTypeId(id) > 0) { + throw new ServiceException(LABEL_TYPE_IS_USE_ERROR); + } + labelTypeMapper.deleteById(typeDO.getId()); + } + + @Override + public List getLabelTypeList(Long organId) { + Long currentOrganId = organId == null ? getUserOrganId() : organId; + return BeanUtils.toBean(labelTypeMapper.selectAvailable(currentOrganId), LabelTypeRespVO.class); + } + + @Override + public LabelTypeDO getAvailableLabelType(Long id, Long organId) { + if (id == null) { + return null; + } + LabelTypeDO typeDO = labelTypeMapper.selectById(id); + if (typeDO == null || !isAvailable(typeDO, organId)) { + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + return typeDO; + } + + @Override + public LabelTypeDO getAvailableLabelType(String type, Long organId) { + String normalized = normalize(type); + LabelTypeDO system = labelTypeMapper.selectSystemByType(normalized); + if (system != null && isAvailable(system, organId)) { + return system; + } + LabelTypeDO custom = labelTypeMapper.selectByTypeAndOrgan(normalized, organId); + if (custom != null && isAvailable(custom, organId)) { + return custom; + } + // 兼容迁移完成前的旧数据:系统字典仍是唯一可信来源。 + if (dictDataMapper.selectByDictTypeAndValue(DictTypeConstants.LABEL_TYPE, normalized) != null) { + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + + private LabelTypeDO getOwnedCustomType(Long id) { + LabelTypeDO typeDO = labelTypeMapper.selectById(id); + if (typeDO == null || !SOURCE_CUSTOM.equals(typeDO.getSource()) + || !getUserOrganId().equals(typeDO.getOrganId())) { + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + return typeDO; + } + + private void validateNotSystemType(String type) { + if (dictDataMapper.selectAllValuesByDictType(DictTypeConstants.LABEL_TYPE).contains(type)) { + throw new ServiceException(LABEL_SYSTEM_TYPE_NOT_OPERABLE); + } + // 查询包含逻辑删除记录,保证系统历史名称不能被自定义类型复用。 + if (dictDataMapper.selectAllValuesByDictType(DictTypeConstants.LABEL_TYPE).contains(type)) { + throw new ServiceException(LABEL_SYSTEM_TYPE_NOT_OPERABLE); + } + } + + private boolean isAvailable(LabelTypeDO typeDO, Long organId) { + if (SOURCE_SYSTEM.equals(typeDO.getSource())) { + return CommonStatusEnum.ENABLE.getStatus().equals(typeDO.getStatus()); + } + return organId != null && organId.equals(typeDO.getOrganId()); + } + + private String normalize(String type) { + return type == null ? null : type.trim(); + } +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelService.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelService.java index f44c7aa3e..515f82898 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelService.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelService.java @@ -4,11 +4,11 @@ import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.module.system.controller.admin.label.vo.LabelPageReqVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelRespVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelSaveReqVO; +import com.cf.imes.module.system.controller.admin.label.vo.LabelGroupRespVO; import com.cf.imes.module.system.dal.dataobject.lable.LabelDO; import jakarta.validation.Valid; import java.util.List; -import java.util.Map; /** * 标签模板 Service 接口 @@ -56,7 +56,7 @@ public interface LabelService { PageResult getLabelPage(LabelPageReqVO pageReqVO); - Map> getGroupList(Long organId); + List getGroupList(Long organId); List list(String type); @@ -66,4 +66,4 @@ public interface LabelService { * @param organId */ void copyInitalLabel(Long organId); -} \ No newline at end of file +} diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelServiceImpl.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelServiceImpl.java index dce4924e9..369317c8e 100644 --- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelServiceImpl.java +++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/lable/LabelServiceImpl.java @@ -2,7 +2,6 @@ package com.cf.imes.module.system.service.lable; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; -import com.cf.imes.framework.common.enums.CommonStatusEnum; import com.cf.imes.framework.common.enums.DeletedCodeEnum; import com.cf.imes.framework.common.enums.UserSettingTypeEnum; import com.cf.imes.framework.common.exception.ServiceException; @@ -13,17 +12,17 @@ import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.cf.imes.module.system.controller.admin.label.vo.LabelPageReqVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelRespVO; import com.cf.imes.module.system.controller.admin.label.vo.LabelSaveReqVO; -import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO; +import com.cf.imes.module.system.controller.admin.label.vo.LabelGroupRespVO; import com.cf.imes.module.system.dal.dataobject.labeltemplate.LabelTemplateDO; import com.cf.imes.module.system.dal.dataobject.lable.LabelDO; +import com.cf.imes.module.system.dal.dataobject.labeltype.LabelTypeDO; import com.cf.imes.module.system.dal.dataobject.machine.MachineDO; import com.cf.imes.module.system.dal.dataobject.setting.PackageConfigDO; import com.cf.imes.module.system.dal.mysql.label.LabelMapper; -import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper; import com.cf.imes.module.system.dal.mysql.labeltemplate.LabelTemplateMapper; +import com.cf.imes.module.system.dal.mysql.labeltype.LabelTypeMapper; import com.cf.imes.module.system.dal.mysql.machine.MachineMapper; import com.cf.imes.module.system.dal.mysql.setting.PackageConfigMapper; -import com.cf.imes.module.system.enums.DictTypeConstants; import com.cf.imes.module.system.enums.label.LabelTemplateType; import com.fasterxml.jackson.databind.JsonNode; import lombok.extern.slf4j.Slf4j; @@ -33,11 +32,9 @@ import org.springframework.validation.annotation.Validated; import jakarta.annotation.Resource; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; +import java.util.LinkedHashMap; import static com.cf.imes.framework.common.util.json.JsonUtils.parseTree; import static com.cf.imes.framework.common.util.json.JsonUtils.unzipString; @@ -57,9 +54,6 @@ public class LabelServiceImpl implements LabelService { @Resource private LabelMapper labelMapper; - @Resource - private DictDataMapper dictDataMapper; - @Resource private LabelTemplateMapper labelTemplateMapper; @@ -69,15 +63,21 @@ public class LabelServiceImpl implements LabelService { @Resource private PackageConfigMapper packageConfigMapper; + @Resource + private LabelTypeMapper labelTypeMapper; + @Override @Transactional(rollbackFor = Exception.class) public Long createLabel(LabelSaveReqVO createReqVO) { - String type = normalizeType(createReqVO.getType()); - validateCustomType(type); + Long organId = createReqVO.getOrganId() == null ? getUserOrganId() : createReqVO.getOrganId(); + LabelTypeDO labelType = resolveLabelType(createReqVO.getLabelTypeId(), createReqVO.getType(), organId); + validateCustomType(labelType); // 插入 LabelDO label = BeanUtils.toBean(createReqVO, LabelDO.class); - label.setType(type); + label.setLabelTypeId(labelType.getId()); + label.setType(labelType.getType()); + label.setOrganId(organId); label.setTemplate(JsonUtils.zipString(label.getTemplate())); labelMapper.insert(label); // 返回 @@ -90,14 +90,16 @@ public class LabelServiceImpl implements LabelService { // 校验存在 LabelDO labelDO = validateLabelExists(updateReqVO.getId()); - validateCustomType(labelDO.getType()); + LabelTypeDO oldType = resolveLabelType(labelDO.getLabelTypeId(), labelDO.getType(), labelDO.getOrganId()); + validateCustomType(oldType); - String type = normalizeType(updateReqVO.getType()); - validateCustomType(type); + LabelTypeDO newType = resolveLabelType(updateReqVO.getLabelTypeId(), updateReqVO.getType(), labelDO.getOrganId()); + validateCustomType(newType); // 更新 LabelDO updateObj = BeanUtils.toBean(updateReqVO, LabelDO.class); - updateObj.setType(type); + updateObj.setLabelTypeId(newType.getId()); + updateObj.setType(newType.getType()); if(!updateReqVO.getTemplate().isEmpty()){ updateObj.setTemplate(JsonUtils.zipString(updateObj.getTemplate())); } @@ -111,7 +113,7 @@ public class LabelServiceImpl implements LabelService { public void deleteLabel(Long id) { // 校验存在 LabelDO labelDO = validateLabelExists(id); - validateCustomType(labelDO.getType()); + validateCustomType(resolveLabelType(labelDO.getLabelTypeId(), labelDO.getType(), labelDO.getOrganId())); List machineDOS = machineMapper.selectList(new LambdaQueryWrapperX() .select(MachineDO::getId) @@ -178,20 +180,28 @@ public class LabelServiceImpl implements LabelService { @Override - public Map> getGroupList(Long organId) { - Set dictTypes = new HashSet<>(dictDataMapper.selectAllValuesByDictType(DictTypeConstants.LABEL_TYPE)); - Set enabledDictTypes = dictDataMapper - .selectListByStatusAndDictType(CommonStatusEnum.ENABLE.getStatus(), DictTypeConstants.LABEL_TYPE) - .stream().map(DictDataDO::getValue).collect(Collectors.toSet()); + public List getGroupList(Long organId) { + Long currentOrganId = organId == null ? getUserOrganId() : organId; + List typeList = labelTypeMapper.selectAvailable(currentOrganId); + Map groups = new LinkedHashMap<>(); + typeList.forEach(type -> { + LabelGroupRespVO group = new LabelGroupRespVO(); + group.setTypeId(type.getId()); + group.setType(type.getType()); + group.setList(new ArrayList<>()); + groups.put(type.getId(), group); + }); - List LabelDOS = labelMapper.selectList(new LambdaQueryWrapperX() - .eqIfPresent(LabelDO::getOrganId, organId) - ) - .stream() - .filter(label -> !dictTypes.contains(label.getType()) || enabledDictTypes.contains(label.getType())) - .map(m -> m.setTemplate(unzipString(m.getTemplate()))).toList(); - List LabelRespVOS = BeanUtils.toBean(LabelDOS, LabelRespVO.class); - return LabelRespVOS.stream().collect(Collectors.groupingBy(LabelRespVO::getType)); + List labels = labelMapper.selectList(new LambdaQueryWrapperX() + .eq(LabelDO::getOrganId, currentOrganId)) + .stream().map(m -> m.setTemplate(unzipString(m.getTemplate()))).toList(); + for (LabelDO label : labels) { + LabelGroupRespVO group = groups.get(label.getLabelTypeId()); + if (group != null) { + group.getList().add(BeanUtils.toBean(label, LabelRespVO.class)); + } + } + return new ArrayList<>(groups.values()); } private String normalizeType(String type) { @@ -199,12 +209,32 @@ public class LabelServiceImpl implements LabelService { } /** 标签接口只能操作自定义类型,系统默认类型由字段管理维护。 */ - private void validateCustomType(String type) { - if (type != null && dictDataMapper.selectByDictTypeAndValue(DictTypeConstants.LABEL_TYPE, type) != null) { + private void validateCustomType(LabelTypeDO type) { + if (type == null || "SYSTEM".equals(type.getSource())) { throw new ServiceException(LABEL_SYSTEM_TYPE_NOT_OPERABLE); } } + private LabelTypeDO resolveLabelType(Long labelTypeId, String type, Long organId) { + if (labelTypeId != null) { + LabelTypeDO labelType = labelTypeMapper.selectById(labelTypeId); + if (labelType != null && ("SYSTEM".equals(labelType.getSource()) + || organId != null && organId.equals(labelType.getOrganId()))) { + return labelType; + } + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + String normalizedType = normalizeType(type); + LabelTypeDO labelType = labelTypeMapper.selectSystemByType(normalizedType); + if (labelType == null) { + labelType = labelTypeMapper.selectByTypeAndOrgan(normalizedType, organId); + } + if (labelType == null) { + throw new ServiceException(LABEL_TYPE_NOT_EXISTS); + } + return labelType; + } + @Override public List list(String type) { @@ -233,6 +263,7 @@ public class LabelServiceImpl implements LabelService { // 复制标签内容a if (ObjectUtil.isNotNull(labelTemplateDO)) { LabelDO labelDO = LabelDO.builder() + .labelTypeId(labelTypeMapper.selectSystemByType(labelType).getId()) .type(labelType) .name(labelTemplateDO.getName()) .remark(labelTemplateDO.getRemark()) diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode.properties b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode.properties index 9dc78eb07..e820bdedd 100644 --- a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode.properties +++ b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode.properties @@ -1,5 +1,10 @@ label.system.type.not.operable=系统默认标签类型只能在字段管理中操作 label.type.not.operable=当前标签类型不可操作 +label.type.not.exists=标签类型不存在或不可用 +label.type.duplicate=标签类型已存在 +label.type.is.use.error=标签类型已被标签使用,无法删除 +label.type.name.notBlank=标签类型不能为空 +label.type.name.size=标签类型长度不能超过32个字符 label.save.type.notBlank=标签类型不能为空 label.save.type.size=标签类型长度不能超过32个字符 label.save.name.notEmpty=标签名称不能为空 diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_cht.properties b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_cht.properties index eda50cb48..4d89e2873 100644 --- a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_cht.properties +++ b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_cht.properties @@ -1,6 +1,11 @@ global.error.request.param.missing=請求參數缺失:{0} global.error.bad.request=請求參數不正確:{0} global.error.request.param.type.error=請求參數類型錯誤:{0} global.error.request.not.found=請求未找到:{0} global.error.request.method.error=請求方法不正確:{0} global.error.request.too.many=請求過於頻繁,請稍後重試 global.error.request.duplicate.data.error=請求數據已存在,請檢查 global.error.default.error=系統繁忙,請稍後再試 global.error.no.permission=您沒有該操作的權限 global.error.no.permission.to.visit.org=您無權訪問該組織的數據 global.error.request.organId.notExist=請求的組織標識未傳遞,請進行排查 global.org.product.not.exist=帳號登入異常,套餐資訊不存在,請重新登入 global.org.product.expired=組織產品套餐已過期,請續費後繼續使用 global.not.login=賬號未登錄 be.kicked.out=您的賬號於 {0} 在別處登錄,已被迫下線。登錄IP:[{1}] auth.login.bad_credentials=登入失敗,帳號或密碼不正確 auth.login.user_disabled=登入失敗,帳號已被停用 auth.login.captcha_code_error=驗證碼不正確,原因:{0} auth.login.third_not_bind=尚未綁定帳號,需要進行綁定 auth.mobile.not_exists=手機號碼不存在 auth.mobile.no_change=手機號碼未發生變更,無需修改 auth.manage_endpoint.login_permission_error=登入失敗,管理端帳號不存在 auth.login.user.not.exist=手機號未註冊 menu.name.duplicate=已存在相同名稱的選單 menu.parent.not_exists=父選單不存在 menu.parent.error=不能將自身設定為父選單 menu.not_exists=選單不存在 menu.exists_children=存在子選單,無法刪除 menu.parent.not_dir_or_menu=父選單的類型必須是目錄或選單 menu.operation_permission_error=管理端選單操作權限不足 menu.trans_error=選單翻譯異常,error_code:{0} role.not_exists=角色不存在 role.name.duplicate=已存在名稱為[{0}]的角色 role.code.duplicate=已存在編碼為[{0}]的角色 role.can_not_update_system_type=不能操作系統內建的角色 role.is_disable=名稱為[{0}]的角色已被停用 role.admin_code_error=編碼[{0}]不能使用 role.me_error=不可為自身分配角色 role.not_superadmin_no_organ_id_oper_error=非超級管理員不可分配權限 role.buildin.modify_permission_error=修改內建角色下選單權限的權限不足 role.self.modify_permission_error=無法修改自身角色的選單權限 role.self.modify_error=無法修改自身的角色 user.username.exists=手機號已經存在 user.mobile.exists=手機號已經存在 user.email.exists=郵箱已經存在 user.not_exists=用戶不存在 user.import.empty=導入用戶數據不能為空! user.password.failed=當前密碼不正確,請重新輸入 user.is_disable=名字為[{0}]的用戶已被禁用 user.count.max=超過組織用戶配額({0}),創建用戶失敗! user.me.error=不允許操作用戶自身 user.password.length_at_least_8=密碼長度不少於8位,且包含大小寫字母、數字和特殊字符 user.username.multiple_error=存在[{0}]重複用戶,請聯繫系統管理員 user.operate_self_status_error=不允許操作用戶自身狀態 user.mobile_update_not_allow=該用戶已通過手機號認證,如需修改手機號請前往個人中心 user.organ_admin_user.delete_not_allow=組織管理員不允許刪除 dept.name.duplicate=已經存在該名字的部門 dept.parent.not_exists=父級部門不存在 dept.not_found=當前部門不存在 dept.exists_children=存在子部門,無法刪除 dept.parent.error=不能設置自己為父部門 dept.exists_user=部門中存在員工,無法刪除 dept.parent_is_child=不能設置自己的子部門為父部門 dept.user_oper_not_allow=不允許操作用戶自身部門 dept.parent_user_oper_not_allow=不允許操作用戶自身部門及其上級部門 dept.disable=部門({0})已被禁用 dept.not_allowed_login=部門({0})已被禁用,無法登入 dept.parent_disable=上級部門({0})已被禁用,請開啟後操作或選擇其他上級部門 dict_type.not_exists=當前字典類型不存在 dict_type.not_enable=字典類型處於關閉狀態,不允許新增或編輯 dict_type.name.duplicate=已經存在該名字的字典類型 dict_type.type.duplicate=已經存在該類型的字典類型 dict_type.has_children=無法刪除,該字典類型還有字典數據 dict_data.not_exists=當前字典數據不存在 dict_data.not_enable=字典數據({0})不處於開啟狀態,不允許選擇 dict_data.value.duplicate=已經存在該值的字典數據 dict_data.trans_error=字典數據標籤翻譯異常,error_code :{0} notice.not_found=當前通知公告不存在 notice.name_unique_error=公告標題已存在,請編輯後重試 notice.buildin.modify_permission_error=內置通知公告編輯權限不足 sms.channel.not_exists=短信渠道不存在 sms.template.not_exists=短信模板不存在 sms.template.code.duplicate=已經存在編碼為[{0}]的短信模板 sms.template.api_error=短信 API 模板調用失敗,原因是:{0} sms.template.api.audit_checking=短信 API 模版無法使用,原因:審批中 sms.template.api.audit_fail=短信 API 模版無法使用,原因:審批不通過,{0} sms.template.api.not_found=短信 API 模版無法使用,原因:模版不存在 sms.send.mobile.not_exists=手機號碼不存在 sms.send.mobile.template_param_miss=短信模板參數({0})缺失 sms.send.template.not_exists=短信模板不存在 sms.code.not_found=驗證碼不存在,請點擊獲取 sms.code.not_correct=驗證碼不正確 sms.code.send_too_fast=短信發送過於頻繁 sms.code.is_valid=驗證碼在有效期內,5 分鐘內請勿重複發送! organ.not_exists=組織不存在 organ.disable=[{0}]組織已被禁用 organ.expire=[{0}]組織已過期 organ.can_not_update_system=系統組織不能進行修改、刪除等操作! organ.name.duplicate=名字為[{0}]的組織已存在 organ.website.duplicate=域名為[{0}]的組織已存在 organ.data_code.not_exists=組織未配置資料源標識 organ.already_exists=該新增組織已授權機台數量無需重複新增! organ.user_oper.not_allow=不允許操作用戶自身組織 organ.contact_mobile.duplicate=手機號為[{0}]的組織已存在 organ.expiretime.product_id_lack=請選擇要購買的產品 notify.template.not.exists=站內信模版不存在 notify.template.code.duplicate=已經存在編碼為[{}]的站內信模板 notify.send.template.param.miss=站內信模板參數({})缺失 machine.not.exists=機台不存在 machine.template.not.exists=機台模板不存在 default.template.count=預設模板數量異常 the.current.machine.is.already.in.use=當前機台已使用,禁止刪除 machine.error=當前機台錯誤,請重新選擇機台 the.current.brand.of.the.machine.exists=當前機台配置的模板中,該品牌已存在,請重新輸入品牌名稱 the.model.of.the.machine.does.not.exist=該型號的機台模板不存在,請進行配置 the.current.brand=品牌ID錯誤,或品牌不存在 machine.num.error=當前組織該類型的機台創建已達到最大值,無法繼續創建 machine.name.error=當前機台名稱已存在,請重新輸入機台名稱 machinetemplate.name.error=當前機台模板的名稱已存在,請重新輸入機台模板名稱 labelingmachine.related.data.error=當前機台關聯的貼標機數據有誤,請在高級配置中重新配置貼標機或選擇其他模板 drillmachine.related.data.error=當前機台關聯的鑽孔機數據有誤,請在鑽孔模塊中重新配置鑽孔機或選擇其他模板 machine.data.error=當前組織尚未進行機台授權,請聯繫組織管理員或客服進行授權 machine.num.data.error=組織授權的機台數量不能超過127台 machine.used.already=當前機台在加工方案組中已使用,無法刪除 label.template.not.exists=標籤模板不存在 label.not.exists=標籤不存在 default.label.not.exists=該類型標籤的預設模板不存在 machine.use.label=當前標籤已有機台使用,無法刪除 default.not.deleted=預設標籤模板無法刪除 label.is.use.error=當前標籤在打包設定中已有使用者使用,無法刪除 data.source.not.exists=系統資料來源不存在 order.parts.import.list.is.empty=生產配件匯入資料不可為空 remain.plate.status.used=餘料板正在使用中,禁止修改 remain.plate.status.no.used=餘料板未使用 remain.plate.usr.type=餘料板使用類型為不可核銷類型 remain.plate.id.not.exists=未選中餘料板,請選擇餘料板 remain.plate.count.max=每次新增餘料板數量最大為 999 system.config.not_exists=系統配置不存在 system.config.type_not_support=不支援的系統配置類型 system.config.custom_plate_no.rule_save_format_error=自訂板編號配置:自訂板編號保存格式錯誤,請檢查配置規則 system.config.custom_plate_no.rule_reset_not_support=自訂板編號配置:該規則不支援手動復位/清零 system.config.custom_plate_no.rule_item_not_found=自訂板編號配置:找不到對應的規則項進行手動復位/清零 system.config.custom_plate_no.rule_order_reset_failed=自訂板編號配置:手動復位/清零訂單下序號失敗,請聯繫客服 custom.plate_no.rule.code_empty=規則編碼不能為空 custom.plate_no.rule.code_not_match=規則編碼[{0}]不合法,請檢查配置規則 custom.plate_no.rule.date_format_error=時間格式[{0}]不合法,請檢查配置規則 custom.plate_no.rule.custom_value_empty=自訂字元值不能為空,請檢查配置規則 custom.plate_no.rule.reset_mode_error=規則[{0}]復位/清零模式不合法,請檢查配置規則 custom.plate_no.rule.int_type_empty={0} 下的 {1} 不能為空,請檢查配置規則 custom.plate_no.rule.int_type_convert_error={0} 下的數值類型參數 {1}:{2} 轉換異常,請檢查配置規則 custom.plate_no.rule.bool_type_convert_error={0} 下的布林類型參數 {1}:{2} 轉換異常,請檢查配置規則 process.scheme.data_empty=加工方案組的:{0} 為空,無法保存,請進行配置 process.scheme.config.data_empty=加工方案組的:{0} 為空,請檢查配置信息 process.scheme.config.field_error=當前方案組的配置異常,請重新配置 process.scheme.config.in_use=當前方案組已在排單中使用,無法刪除 process.scheme.config.machine_label_empty=當前方案組對應解析器的機台標籤數據為空,請檢查機台標籤配置信息 config.data_error=當前系統配置的數據有誤,請重新嘗試排序 process.config.used_already=當前加工分線配置已在加工方案組中使用,無法刪除 optimization.config.used_already=當前數據處理配置已在加工方案組中使用,無法刪除 sealedge.config.item_empty=第 {0} 條配置中,有欄位值為空,請新增數據 sealedge.config.max_value_error=第 {0} 條配置中,{1} 要大於等於 {2},請修改數據 sealedge.config.data_error=當前封邊條配置有誤,請重新檢查後新增 sealedge.config.name_exists=當前配置的名稱已存在,請重新命名 sealedge.config.decimal_places_max_three=第 {0} 條配置中,小數位數最多為 3 位,請修改 sealedge.config.min_value_gt_zero=第 {0} 條配置中,寬最小值:{1} 要大於 0,請修改 sealedge.config.max_value_gt_zero=第 {0} 條配置中,寬最大值:{1} 要大於 0,請修改 sealedge.config.value_range_error=第 {0} 條配置中,寬最大值 要大於 寬最小值,請修改 token.app_type.exist=當前應用已存在token配置,無法繼續新增 token.config.not_exists=當前應用的token配置不存在 token.time.is_expires=當前token已過期,請重新配置或延長時間 token.app_type.no_update=應用名稱不允許更改 token.data.is_null=當前token的配置為空,無需刪除 token.expires_time.is_null=當前未選擇有效時間,請選擇後再新增 token.expires_time.data_error=當前選擇的有效時間已過期,請增加有效時間 token.insert.data_error=token新增失敗,請重新嘗試 invoice.no_exist=當前發票記錄有誤,請重新查看 invoicing.reject_reason=請填寫拒絕開票原因 purchase_record.no_exist=當前發票對應的購買記錄有誤,請退回組織後重新申請開票 invoice.is_fail=當前發票已開票,無法再次進行開票 products.is_exist=產品[{0}]已存在,請修改產品名稱後再次操作 products.no_delete=當前產品已上架,無法刪除,請下架後再刪除 products.no_update=當前產品已上架,無法進行修改 products.detail.no_update=定價規則對應的產品已上架,無法進行修改 advertisement.time_error=投放時間錯誤,結束時間應大於開始時間 advertisement.name.is_exist=當前廣告名稱已存在,請重新命名 advertisement.no_delete=當前廣告已經發布,無法刪除,請結束發布後再刪除 product_promotion.active.name.is_exist=當前優惠活動名稱已存在,請修改 product_promotion.purchaseduration.is_exist=當前所選產品下{0}{1}購買時長的優惠活動已存在,請修改 invoice_title.not_exists=發票抬頭不存在,請先創建發票抬頭 org_invoice.purchase_record.update_num.not_match=當前勾選的購買記錄中部分可能已開票,請查詢後重新勾選提交開票 org_invoice.agree_file.null=確認開票發票附件不能為空,請上傳後再提交 invoice_title.org.exists=組織下已存在發票抬頭,請刷新後編輯抬頭內容 invoice_title.taxpayerid.exists=統一社會信用代碼已存在,請檢查 products.not_nolist=當前產品未上架 org_product.purchase.lock=組織下存在購買中的產品操作,請稍後再試 invoice_title.enterprise.taxnumber.empty=企業統一信用代碼不能為空 invoice.amount.zero=可開票金額為0,請檢查購買記錄 invoice.apply.uninvoiceable.exist=當前提交記錄中存在不可開票記錄,請刷新列表後重新選擇提交 pay.channel_not_support=暫不支援的支付渠道,請使用其他支付渠道 pay.order_not_exist=支付訂單不存在,支付編號[{0}],請重新發起支付 pay.order_channel_query_not_exist=若您已確認掃碼支付,請稍後重新整理頁面,支付平台可能存在延遲入帳 pay.order_notify_data_parse_error=解析支付回調資料異常 pay.order_status_is_not_waiting=支付訂單不處於待支付狀態 pay.order_submit_channel_error=發起渠道支付異常,請聯繫客服 pay.notify_passback_tradetype_not_support_error=不支援的支付回調tradeType:[{0}],請檢查支付渠道 product.no_exist=當前產品不存在 product.detail_no_exist=當前產品的規則不存在 product.detail_duration_exist=當前產品下已存在產品時長[{0}/{1}]的定價規則,請修改後重新操作 product.promotion_no_exist=當前優惠活動不存在 product.detail_duration_unit_not_support=不支援的時長單位,請檢查該定價規則的時長單位 org.product_purchase_wait_pay_error=組織下存在當前產品的待支付記錄,請支付或{0}分鐘後再次發起軟件購買 product.price_null_error=產品建議價格為空,請聯繫客服 org.product_purchase_not_exist_error=組織訂購紀錄不存在,請檢查資料 org.product_purchase_exist_error=組織[{0}]訂購記錄已存在,請勿重複訂購 org.product_purchase_delay_record.paid.error=組織[{0}]首購記錄[{1}]存在已支付的延期記錄,請勿刪除 advertisement.no_exist=廣告不存在 advertisement.status_endtime_expired=當前廣告投放結束時間已逾期,請重新發布選擇投放時間或重新編輯投放時間 advertisement.image_empty_error=廣告圖片檔案為空,請重新上傳 advertisement.image_upload_fail=廣告圖片上傳失敗,請稍後再試 advertisement.update_status_error=當前廣告已經發布,若要編輯請先結束發布 parser.no_exist=當前解析器不存在,請重新選擇 parser.template_no_exist=當前解析器模板不存在,請重新選擇 product_purchase.no_exist=當前購買記錄不存在,請檢查 product_purchase.endtime_before_delaytime_error=當前產品訂購有效期{0}未超過當前日期,請調整訂購時長 product.delay_duration_unit_not_support=不支持的產品延期時長單位 assembly.config.import.order_components.query.error=裝配設定導入失敗:訂單部件査詢失敗,請檢查訂單狀態 assembly.config.not_exist=裝配設定不存在 assembly.config.do_config_exist=裝配設定[{0}]已存在 assembly.config.new_config_name_exist=新裝配設定名稱[{0}]已存在,請重新查詢後再次操作 assembly.config.save_topname_exist=當前配寘中頂級節點名稱[{0}]已存在,請修改後再次保存 assembly.config.no_need_new_config=不存在名為[{0}]的已配寘重複設定,請重新查詢後再次操作 label.system.type.not.operable=系統預設標籤類型只能在欄位管理中操作 label.type.not.operable=目前標籤類型不可操作 +label.type.not.exists=標籤類型不存在或不可用 +label.type.duplicate=標籤類型已存在 +label.type.is.use.error=標籤類型已被標籤使用,無法刪除 +label.type.name.notBlank=標籤類型不能為空 +label.type.name.size=標籤類型長度不能超過32個字元 label.save.type.notBlank=標籤類型不能為空 label.save.type.size=標籤類型長度不能超過32個字元 label.save.name.notEmpty=標籤名稱不能為空 diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_en.properties b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_en.properties index d41ef8d2b..0c8b94ef8 100644 --- a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_en.properties +++ b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_en.properties @@ -1,6 +1,11 @@ global.error.request.param.missing=Missing request parameter: {0} global.error.bad.request=Invalid request parameter: {0} global.error.request.param.type.error=Request parameter type mismatch: {0} global.error.request.not.found=Request not found: {0} global.error.request.method.error=Incorrect request method: {0} global.error.request.too.many=Too many requests, please try again later global.error.request.duplicate.data.error=Data already exists, please check global.error.default.error=System is busy, please try again later global.error.no.permission=You do not have permission to perform this action global.error.no.permission.to.visit.org=You do not have permission to access this organization’s data global.error.request.organId.notExist=The requested organization ID was not provided, please check global.org.product.not.exist=Account login exception: product package does not exist, please log in again global.org.product.expired=The organization's product package has expired, please renew before continuing to use the service global.not.login=The account is not logged in be.kicked.out=Your account was logged in elsewhere at {0} and has been forced to log off. Login IP: [{1}] auth.login.bad_credentials=Login failed, incorrect account or password auth.login.user_disabled=Login failed, the account has been disabled auth.login.captcha_code_error=Incorrect verification code, reason: {0} auth.login.third_not_bind=No account is bound, binding is required auth.mobile.not_exists=Mobile number does not exist auth.mobile.no_change=Mobile number has not changed, no update needed auth.manage_endpoint.login_permission_error=Login failed, management account does not exist auth.login.user.not.exist=The mobile phone number has not been registered menu.name.duplicate=A menu with the same name already exists menu.parent.not_exists=Parent menu does not exist menu.parent.error=Cannot set the menu itself as its parent menu.not_exists=Menu does not exist menu.exists_children=Cannot delete because child menus exist menu.parent.not_dir_or_menu=The parent menu type must be directory or menu menu.operation_permission_error=Insufficient permissions for management menu operations menu.trans_error=Menu translation error, error_code: {0} role.not_exists=Role does not exist role.name.duplicate=A role named [{0}] already exists role.code.duplicate=A role with code [{0}] already exists role.can_not_update_system_type=Cannot operate on system-built-in roles role.is_disable=The role named [{0}] has been disabled role.admin_code_error=Code [{0}] cannot be used role.me_error=Cannot assign a role to yourself role.not_superadmin_no_organ_id_oper_error=Non-super admin is not allowed to assign permissions role.buildin.modify_permission_error=Insufficient permissions to modify built-in role menu permissions role.self.modify_permission_error=Cannot modify your own role menu permissions role.self.modify_error=Cannot modify your own role user.username.exists=The mobile number already exists user.mobile.exists=The mobile number already exists user.email.exists=The email address already exists user.not_exists=User does not exist user.import.empty=Imported user data cannot be empty! user.password.failed=The current password is incorrect. Please re-enter it user.is_disable=The user named [{0}] has been disabled user.count.max=Exceeded the organization user quota ({0}), failed to create user! user.me.error=Operation on the user itself is not allowed user.password.length_at_least_8=Password must be at least 8 characters long and contain uppercase letters, lowercase letters, numbers, and special characters user.username.multiple_error=Duplicate users named [{0}] exist, please contact the system administrator user.operate_self_status_error=Operation on the user's own status is not allowed user.mobile_update_not_allow=This user has been verified by mobile number. To change the mobile number, please go to the personal center user.organ_admin_user.delete_not_allow=The organization administrator does not allow deletion dept.name.duplicate=The department name already exists dept.parent.not_exists=The parent department does not exist dept.not_found=The department does not exist dept.exists_children=There are sub-departments, deletion is not allowed dept.parent.error=Cannot set the department itself as its parent dept.exists_user=There are employees in the department, deletion is not allowed dept.parent_is_child=Cannot set a sub-department as the parent dept.user_oper_not_allow=Operation on the user's own department is not allowed dept.parent_user_oper_not_allow=Operation on the user's own department and its parent departments is not allowed dept.disable=The department ({0}) has been disabled dept.not_allowed_login=The department ({0}) has been disabled, login is not allowed dept.parent_disable=The parent department ({0}) has been disabled, please enable it first or choose another parent department dict_type.not_exists=The dictionary type does not exist dict_type.not_enable=The dictionary type is disabled, adding or editing is not allowed dict_type.name.duplicate=The dictionary type name already exists dict_type.type.duplicate=The dictionary type already exists dict_type.has_children=Cannot delete, the dictionary type still has dictionary data dict_data.not_exists=The dictionary data does not exist dict_data.not_enable=The dictionary data ({0}) is not enabled and cannot be selected dict_data.value.duplicate=The dictionary data value already exists dict_data.trans_error=Dictionary data label translation error, error_code :{0} notice.not_found=The notification announcement does not exist notice.name_unique_error=The announcement title already exists, please edit and try again notice.buildin.modify_permission_error=Insufficient permissions to modify built-in announcement sms.channel.not_exists=The SMS channel does not exist sms.template.not_exists=SMS template does not exist sms.template.code.duplicate=An SMS template with code [{0}] already exists sms.template.api_error=SMS API template call failed, reason: {0} sms.template.api.audit_checking=SMS API template cannot be used, reason: under review sms.template.api.audit_fail=SMS API template cannot be used, reason: review failed, {0} sms.template.api.not_found=SMS API template cannot be used, reason: template not found sms.send.mobile.not_exists=Mobile number does not exist sms.send.mobile.template_param_miss=SMS template parameter ({0}) is missing sms.send.template.not_exists=SMS template does not exist sms.code.not_found=Verification code does not exist, please click to obtain sms.code.not_correct=Incorrect verification code sms.code.send_too_fast=SMS sending is too frequent sms.code.is_valid=The verification code is still valid, please do not resend within 5 minutes organ.not_exists=Organization does not exist organ.disable=Organization [{0}] has been disabled organ.expire=Organization [{0}] has expired organ.can_not_update_system=System organization cannot be modified or deleted organ.name.duplicate=Organization with name [{0}] already exists organ.website.duplicate=Organization with domain [{0}] already exists organ.data_code.not_exists=Organization has not configured a data source identifier organ.already_exists=The newly added organization has already been authorized device quota, cannot add again organ.user_oper.not_allow=Not allowed to operate on the user's own organization organ.contact_mobile.duplicate=Organization with mobile number [{0}] already exists organ.expiretime.product_id_lack=Please select the product to purchase notify.template.not.exists=Notification template does not exist notify.template.code.duplicate=A notification template with code [{}] already exists notify.send.template.param.miss=Notification template parameter ({}) is missing machine.not.exists=Machine does not exist machine.template.not.exists=Machine template does not exist default.template.count=Default template count error the.current.machine.is.already.in.use=The current machine is in use and cannot be deleted machine.error=The current machine is incorrect, please select a machine again the.current.brand.of.the.machine.exists=The brand already exists in the templates configured for the current machine, please enter a different brand name the.model.of.the.machine.does.not.exist=The template for this machine model does not exist, please configure it the.current.brand=Brand ID error, or brand does not exist machine.num.error=The number of machines of this type in the organization has reached the maximum limit and cannot be created machine.name.error=The machine name already exists, please enter another machine name machinetemplate.name.error=The machine template name already exists, please enter another machine template name labelingmachine.related.data.error=The labeling machine data associated with the current machine is incorrect, please reconfigure it or select another template drillmachine.related.data.error=The drilling machine data associated with the current machine is incorrect, please reconfigure it or select another template machine.data.error=The organization has not authorized machines yet, please contact the organization administrator or customer service for authorization machine.num.data.error=The authorized number of machines cannot exceed 127 machine.used.already=The current machine is used in a processing solution group and cannot be deleted label.template.not.exists=Label template does not exist label.not.exists=Label does not exist default.label.not.exists=The default label template for this type does not exist machine.use.label=The current label is used by machines and cannot be deleted default.not.deleted=The default label template cannot be deleted label.is.use.error=The label is used in packaging settings by users and cannot be deleted data.source.not.exists=System data source does not exist order.parts.import.list.is.empty=The imported production part list cannot be empty remain.plate.status.used=The remaining plate is in use and cannot be modified remain.plate.status.no.used=The remaining plate is not in use remain.plate.usr.type=The remaining plate usage type is non-verifiable remain.plate.id.not.exists=No remaining plate selected, please select a remaining plate remain.plate.count.max=The maximum number of remaining plates that can be added at one time is 999 system.config.not_exists=System configuration does not exist system.config.type_not_support=Unsupported system configuration type system.config.custom_plate_no.rule_save_format_error=Custom plate number configuration: invalid save format, please check the rule system.config.custom_plate_no.rule_reset_not_support=Custom plate number configuration: this rule does not support manual reset/clear system.config.custom_plate_no.rule_item_not_found=Custom plate number configuration: rule item not found for manual reset/clear system.config.custom_plate_no.rule_order_reset_failed=Custom plate number configuration: failed to reset/clear order sequence, please contact support custom.plate_no.rule.code_empty=Rule code cannot be empty custom.plate_no.rule.code_not_match=Rule code [{0}] is invalid, please check the configuration rule custom.plate_no.rule.date_format_error=Date format [{0}] is invalid, please check the configuration rule custom.plate_no.rule.custom_value_empty=Custom character value cannot be empty, please check the configuration rule custom.plate_no.rule.reset_mode_error=Reset/Clear mode for rule [{0}] is invalid, please check the configuration rule custom.plate_no.rule.int_type_empty=The field \"{1}\" under \"{0}\" cannot be empty, please check the configuration rule custom.plate_no.rule.int_type_convert_error=Value conversion error for numeric parameter {1}:{2} under \"{0}\", please check the configuration rule custom.plate_no.rule.bool_type_convert_error=Value conversion error for boolean parameter {1}:{2} under \"{0}\", please check the configuration rule process.scheme.data_empty=Field \"{0}\" in the process scheme group is empty and cannot be saved, please configure it process.scheme.config.data_empty=Field \"{0}\" in the process scheme group is empty, please check the configuration process.scheme.config.field_error=The current scheme group configuration is invalid, please reconfigure process.scheme.config.in_use=The current scheme group is in use in scheduling and cannot be deleted process.scheme.config.machine_label_empty=Machine label data for the scheme group's parser is empty, please check the machine label configuration config.data_error=Current system configuration data is incorrect, please try sorting again process.config.used_already=The current line configuration is already used in a process scheme group and cannot be deleted optimization.config.used_already=The current optimization configuration is already used in a process scheme group and cannot be deleted sealedge.config.item_empty=There are empty fields in configuration #{0}, please fill in the data sealedge.config.max_value_error=In configuration #{0}, the value of {1} must be greater than or equal to {2}, please modify sealedge.config.data_error=The current edge band configuration is incorrect, please re-check before adding sealedge.config.name_exists=Configuration name already exists, please rename sealedge.config.decimal_places_max_three=In configuration #{0}, decimal places must not exceed 3, please modify sealedge.config.min_value_gt_zero=In configuration #{0}, minimum width {1} must be greater than 0, please modify sealedge.config.max_value_gt_zero=In configuration #{0}, maximum width {1} must be greater than 0, please modify sealedge.config.value_range_error=In configuration #{0}, maximum width must be greater than minimum width, please modify token.app_type.exist=The current application already has a token configuration and cannot add a new one token.config.not_exists=The token configuration for the current application does not exist token.time.is_expires=The current token has expired. Please reconfigure or extend the validity period token.app_type.no_update=The application name cannot be modified token.data.is_null=The token configuration is empty and does not need to be deleted token.expires_time.is_null=No valid time was selected. Please select one before adding token.expires_time.data_error=The selected validity time has expired. Please extend the validity time token.insert.data_error=Failed to add token. Please try again invoice.no_exist=The invoice record is incorrect. Please check again. invoicing.reject_reason=Please provide the reason for rejecting the invoice. purchase_record.no_exist=The purchase record corresponding to the invoice is invalid. Please return it to the organization and reapply. invoice.is_fail=The invoice has already been issued and cannot be issued again. products.is_exist=Product [{0}] already exists. Please modify the product name and try again. products.no_delete=The product is currently listed and cannot be deleted. Please delist it first. products.no_update=The product is currently listed and cannot be modified. products.detail.no_update=The product corresponding to the pricing rule is listed and cannot be modified. advertisement.time_error=Invalid delivery time. The end time must be later than the start time. advertisement.name.is_exist=The advertisement name already exists. Please rename it. advertisement.no_delete=The advertisement has been published and cannot be deleted. End publication first. product_promotion.active.name.is_exist=The promotion name already exists. Please modify it. product_promotion.purchaseduration.is_exist=A promotion with purchase duration {0}{1} already exists under the selected product. Please modify. invoice_title.not_exists=The invoice title does not exist. Please create it first. org_invoice.purchase_record.update_num.not_match=Some selected purchase records may have already been invoiced. Please reselect and submit. org_invoice.agree_file.null=The invoice confirmation file cannot be empty. Please upload it. invoice_title.org.exists=The organization already has an invoice title. Please refresh and edit it. invoice_title.taxpayerid.exists=The taxpayer identification number already exists. Please check. products.not_nolist=The product is not listed. org_product.purchase.lock=There are ongoing product purchase operations under the organization. Please try again later. invoice_title.enterprise.taxnumber.empty=The enterprise tax number cannot be empty. invoice.amount.zero=The invoiceable amount is 0. Please check the purchase record. invoice.apply.uninvoiceable.exist=There are records that cannot be invoiced. Please refresh and select again. pay.channel_not_support=Unsupported payment channel, please use another one pay.order_not_exist=Payment order does not exist, order number [{0}], please initiate payment again pay.order_channel_query_not_exist=If you have confirmed the QR code payment, please refresh the page later. The payment platform may experience delays pay.order_notify_data_parse_error=Failed to parse payment notification data pay.order_status_is_not_waiting=The payment order is not in a waiting state pay.order_submit_channel_error=Failed to initiate channel payment, please contact customer service pay.notify_passback_tradetype_not_support_error=Unsupported payment callback tradeType:[{0}], please check the payment channel product.no_exist=The product does not exist product.detail_no_exist=The product's pricing rule does not exist product.detail_duration_exist=A pricing rule for product duration [{0}/{1}] already exists, please modify and try again product.promotion_no_exist=The promotion does not exist product.detail_duration_unit_not_support=Unsupported duration unit, please check the pricing rule's duration unit org.product_purchase_wait_pay_error=There is a pending payment record for the current product under the organization. Please make the payment or initiate the software purchase again in {0} minutes product.price_null_error=Suggested product price is empty, please contact customer service org.product_purchase_not_exist_error=The organization's purchase record does not exist, please check the data org.product_purchase_exist_error=The order record of organization [{0}] already exists. Please do not place duplicate orders org.product_purchase_delay_record.paid.error=The first purchase record of organization [{0}] [{1}] has a deferred payment record. Please do not delete it advertisement.no_exist=The advertisement does not exist advertisement.status_endtime_expired=The advertisement's end time has expired. Please republish or edit the delivery time advertisement.image_empty_error=The advertisement image file is empty, please upload again advertisement.image_upload_fail=Failed to upload the advertisement image, please try again later advertisement.update_status_error=The advertisement has already been published. Please end the publication before editing parser.no_exist=The parser does not exist, please reselect parser.template_no_exist=The parser template does not exist, please reselect product_purchase.no_exist=The purchase record does not exist, please check product_purchase.endtime_before_delaytime_error=The product subscription validity period {0} has not exceeded the current date, please adjust the subscription duration product.delay_duration_unit_not_support=Units of extension duration for unsupported products assembly.config.import.order_components.query.error=Assembly settings import failed: Order component query failed, please check production order status assembly.config.not_exist=Assembly setting does not exist assembly.config.do_config_exist=Assembly setting [{0}] already exists assembly.config.new_config_name_exist=The new assembly setting name [{0}] already exists. Please query again and try again assembly.config.save_topname_exist=The top-level node name [{0}] already exists in the current configuration. Please modify it and save it again assembly.config.no_need_new_config=There is no configured duplicate setting named [{0}]. Please query again and perform the operation again label.system.type.not.operable=System default label types can only be operated in field management label.type.not.operable=The current label type cannot be operated +label.type.not.exists=The label type does not exist or is unavailable +label.type.duplicate=The label type already exists +label.type.is.use.error=The label type is in use and cannot be deleted +label.type.name.notBlank=Label type cannot be empty +label.type.name.size=Label type length cannot exceed 32 characters label.save.type.notBlank=Label type cannot be empty label.save.type.size=Label type length cannot exceed 32 characters label.save.name.notEmpty=Label name cannot be empty diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_zh.properties b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_zh.properties index d07978860..96ecc7b44 100644 --- a/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_zh.properties +++ b/cf-module-system/cf-module-system-biz/src/main/resources/message_errorcode_zh.properties @@ -1,6 +1,11 @@ global.error.request.param.missing=请求参数缺失:{0} global.error.bad.request=请求参数不正确:{0} global.error.request.param.type.error=请求参数类型错误:{0} global.error.request.not.found=请求未找到:{0} global.error.request.method.error=请求方法不正确:{0} global.error.request.too.many=请求过于频繁,请稍后重试 global.error.request.duplicate.data.error=请求数据已存在,请检查 global.error.default.error=系统繁忙,请稍后再试 global.error.no.permission=没有该操作权限 global.error.no.permission.to.visit.org=您无权访问该组织的数据 global.error.request.organId.notExist=请求的组织标识未传递,请进行排查 global.org.product.not.exist=账号登录异常,套餐信息不存在,请重新登陆 global.org.product.expired=组织产品套餐已过期,请续费后继续使用 global.not.login=账号未登录 be.kicked.out=您的账号于 {0} 在别处登录,已被迫下线。登录IP:[{1}] auth.login.bad_credentials=登录失败,账号密码不正确 auth.login.user_disabled=登录失败,账号被禁用 auth.login.captcha_code_error=验证码不正确,原因:{0} auth.login.third_not_bind=未绑定账号,需要进行绑定 auth.mobile.not_exists=手机号不存在 auth.mobile.no_change=手机号未发生改变,无需修改 auth.manage_endpoint.login_permission_error=登录失败,管理端账号不存在 auth.login.user.not.exist=手机号未注册 menu.name.duplicate=已经存在该名字的菜单 menu.parent.not_exists=父菜单不存在 menu.parent.error=不能设置自己为父菜单 menu.not_exists=菜单不存在 menu.exists_children=存在子菜单,无法删除 menu.parent.not_dir_or_menu=父菜单的类型必须是目录或者菜单 menu.operation_permission_error=管理端菜单操作权限不足 menu.trans_error=菜单翻译异常,error_code :{0} role.not_exists=角色不存在 role.name.duplicate=已经存在名为[{0}]的角色 role.code.duplicate=已经存在编码为[{0}]的角色 role.can_not_update_system_type=不能操作类型为系统内置的角色 role.is_disable=名字为[{0}]的角色已被禁用 role.admin_code_error=编码[{0}]不能使用 role.me_error=不可为自身分配角色 role.not_superadmin_no_organ_id_oper_error=非超管分配权限 role.buildin.modify_permission_error=修改内置角色下菜单权限的权限不足 role.self.modify_permission_error=无法修改自身的角色菜单权限 role.self.modify_error=无法修改自身的角色 user.username.exists=手机号已经存在 user.mobile.exists=手机号已经存在 user.email.exists=邮箱已经存在 user.not_exists=用户不存在 user.import.empty=导入用户数据不能为空! user.password.failed=当前密码不正确,请重新输入 user.is_disable=名字为[{0}]的用户已被禁用 user.count.max=超过组织用户配额({0}),创建用户失败! user.me.error=不允许操作用户自身 user.password.length_at_least_8=密码长度不少于8位,且包含大小写字母、数字和特殊字符 user.username.multiple_error=存在[{0}]重复用户,请联系系统管理员 user.operate_self_status_error=不允许操作用户自身状态 user.mobile_update_not_allow=该用户已通过手机号认证,如需修改手机号请前往个人中心 user.organ_admin_user.delete_not_allow=组织管理员不允许删除 dept.name.duplicate=已经存在该名字的部门 dept.parent.not_exists=父级部门不存在 dept.not_found=当前部门不存在 dept.exists_children=存在子部门,无法删除 dept.parent.error=不能设置自己为父部门 dept.exists_user=部门中存在员工,无法删除 dept.parent_is_child=不能设置自己的子部门为父部门 dept.user_oper_not_allow=不允许操作用户自身部门 dept.parent_user_oper_not_allow=不允许操作用户自身部门及其上级部门 dept.disable=部门({0})已被禁用 dept.not_allowed_login=部门({0})已被禁用,无法登录 dept.parent_disable=上级部门({0})已被禁用,请开启后操作或选择其他上级部门 dict_type.not_exists=当前字典类型不存在 dict_type.not_enable=字典类型处于关闭状态,不允许新增或编辑 dict_type.name.duplicate=已经存在该名字的字典类型 dict_type.type.duplicate=已经存在该类型的字典类型 dict_type.has_children=无法删除,该字典类型还有字典数据 dict_data.not_exists=当前字典数据不存在 dict_data.not_enable=字典数据({0})不处于开启状态,不允许选择 dict_data.value.duplicate=已经存在该值的字典数据 dict_data.trans_error=字典数据标签翻译异常,error_code :{0} notice.not_found=当前通知公告不存在 notice.name_unique_error=公告标题已存在,请编辑后重试 notice.buildin.modify_permission_error=内置通知公告编辑权限不足 sms.channel.not_exists=短信渠道不存在 sms.template.not_exists=短信模板不存在 sms.template.code.duplicate=已经存在编码为[{0}]的短信模板 sms.template.api_error=短信 API 模板调用失败,原因是:{0} sms.template.api.audit_checking=短信 API 模版无法使用,原因:审批中 sms.template.api.audit_fail=短信 API 模版无法使用,原因:审批不通过,{0} sms.template.api.not_found=短信 API 模版无法使用,原因:模版不存在 sms.send.mobile.not_exists=手机号不存在 sms.send.mobile.template_param_miss=短信模板参数({0})缺失 sms.send.template.not_exists=短信模板不存在 sms.code.not_found=验证码不存在,请点击获取 sms.code.not_correct=验证码不正确 sms.code.send_too_fast=短信发送过于频率 sms.code.is_valid=验证码在有效期内,5分钟内请勿重复发送! organ.not_exists=组织不存在 organ.disable=[{0}]组织已被禁用 organ.expire=[{0}]组织已过期 organ.can_not_update_system=系统组织不能进行修改、删除等操作! organ.name.duplicate=名字为[{0}]的组织已存在 organ.website.duplicate=域名为[{0}]的组织已存在 organ.data_code.not_exists=组织未配置数据源标识 organ.already_exists=该新增组织已授权机台数量无需重复新增! organ.user_oper.not_allow=不允许操作用户自身组织 organ.contact_mobile.duplicate=手机号为[{0}]的组织已存在 organ.expiretime.product_id_lack=请选择要购买的产品 notify.template.not.exists=站内信模版不存在 notify.template.code.duplicate=已经存在编码为[{}]的站内信模板 notify.send.template.param.miss=站内信模板参数({})缺失 machine.not.exists=机台不存在 machine.template.not.exists=机台模板不存在 default.template.count=默认模板数量异常 the.current.machine.is.already.in.use=当前机台已使用,禁止删除 machine.error=当前机台错误,请重新选择机台 the.current.brand.of.the.machine.exists=当前机台配置的模板中,该品牌已存在,请重新输入品牌名称 the.model.of.the.machine.does.not.exist=该型号的机台模板不存在,请进行配置 the.current.brand=品牌ID错误,或品牌不存在 machine.num.error=当前组织该类型的机台创建已达到最大值,无法继续创建 machine.name.error=当前机台名称已存在,请重新输入机台名称 machinetemplate.name.error=当前机台模板的名称已存在,请重新输入机台模板名称 labelingmachine.related.data.error=当前机台关联的贴标机数据有误,请在高级配置中重新配置贴标机或选择其他模板 drillmachine.related.data.error=当前机台关联的钻孔机数据有误,请在钻孔模块中重新配置钻孔机或选择其他模板 machine.data.error=当前组织还未进行机台授权,请联系组织管理员在基础管理里对当前组织进行机台授权,或联系客服进行授权 machine.num.data.error=组织授权的机台数量不能超过127台 machine.used.already=当前机台在加工方案组中已使用,无法删除 label.template.not.exists=标签模板不存在 label.not.exists=标签不存在 default.label.not.exists=该类型标签默认模板不存在 machine.use.label=当前标签已有机台使用,无法删除 default.not.deleted=默认标签模板无法删除 label.is.use.error=当前标签打包设置中已有用户使用,无法删除 data.source.not.exists=系统数据源不存在 order.parts.import.list.is.empty=生产配件导入数据不可以为空 remain.plate.status.used=余料板正在使用中,禁止修改 remain.plate.status.no.used=余料板未使用 remain.plate.usr.type=余料板使用类型为不可核销类型 remain.plate.id.not.exists=未选中余料板,请选择余料板 remain.plate.count.max=每次新增余料板数量,最大为999 system.config.not_exists=系统配置不存在 system.config.type_not_support=不支持的系统配置类型 system.config.custom_plate_no.rule_save_format_error=自定义板编号配置:自定义板编号保存格式错误,请检查配置规则 system.config.custom_plate_no.rule_reset_not_support=自定义板编号配置:该规则不支持手动复位/清零 system.config.custom_plate_no.rule_item_not_found=自定义板编号配置:找不到对应的规则项进行手动复位/清零 system.config.custom_plate_no.rule_order_reset_failed=自定义板编号配置:手动复位/清零订单下序号失败,请联系客服 custom.plate_no.rule.code_empty=规则编码不能为空 custom.plate_no.rule.code_not_match=规则编码[{0}]不合法,请检查配置规则 custom.plate_no.rule.date_format_error=时间格式[{0}]不合法,请检查配置规则 custom.plate_no.rule.custom_value_empty=自定义字符值不能为空,请检查配置规则 custom.plate_no.rule.reset_mode_error=规则[{0}]复位/清零模式不合法,请检查配置规则 custom.plate_no.rule.int_type_empty={0} 下的 {1} 不能为空,请检查配置规则 custom.plate_no.rule.int_type_convert_error={0} 下的数值类型参数 {1}:{2} 转换异常,请检查配置规则 custom.plate_no.rule.bool_type_convert_error={0} 下的布尔类型参数 {1}:{2} 转换异常,请检查配置规则 process.scheme.data_empty=加工方案组的:{0} 为空,无法保存,请进行配置 process.scheme.config.data_empty=加工方案组的:{0} 为空,请检查配置信息 process.scheme.config.field_error=当前方案组的配置异常,请重新配置 process.scheme.config.in_use=当前方案组已在排单中使用,无法删除 process.scheme.config.machine_label_empty=当前方案组对应的解析器的机台的标签数据为空,请检查机台的标签配置信息 config.data_error=当前系统配置的数据有误,请重新尝试排序 process.config.used_already=当前加工分线配置在加工方案组中已使用,无法删除 optimization.config.used_already=当前数据处理配置在加工方案组中已使用,无法删除 sealedge.config.item_empty=第 {0} 条配置中,有字段值为空,请添加数据 sealedge.config.max_value_error=第 {0} 条配置中,{1} 要大于等于 {2},请修改数据 sealedge.config.data_error=当前封边条配置有误,请重新检查后新增 sealedge.config.name_exists=当前配置的名称已存在,请重新命名 sealedge.config.decimal_places_max_three=第 {0} 条配置中,小数位数最大为 3 位,请进行修改 sealedge.config.min_value_gt_zero=第 {0} 条配置中,宽最小值:{1} 要大于 0,请修改数据 sealedge.config.max_value_gt_zero=第 {0} 条配置中,宽最大值:{1} 要大于 0,请修改数据 sealedge.config.value_range_error=第 {0} 条配置中,宽最大值 要大于 宽最小值,请修改数据 token.app_type.exist=当前应用已存在token配置,无法继续新增 token.config.not_exists=当前应用的token配置不存在 token.time.is_expires=当前token已过期,请重新配置或延长时间 token.app_type.no_update=应用名称不允许更改 token.data.is_null=当前token的配置为空,无需删除 token.expires_time.is_null=当前未选择有效时间,请选择再进行新增 token.expires_time.data_error=当前选择的有效时间已过期,请增加有效时间 token.insert.data_error=token新增失败,请重新尝试 invoice.no_exist=当前发票记录有误,请重新查看 invoicing.reject_reason=请填写拒绝开票原因 purchase_record.no_exist=当前发票对应的购买记录有误,请退回组织后重新申请开票 invoice.is_fail=当前发票已开票,无法再次进行开票 products.is_exist=产品[{0}]已存在,请修改产品名称后再次操作 products.no_delete=当前产品已上架,无法删除,请下架后再删除 products.no_update=当前产品已上架,无法进行修改 products.detail.no_update=定价规则对应的产品已上架,无法进行修改 advertisement.time_error=投放时间错误,结束时间应大于开始时间 advertisement.name.is_exist=当前广告名称已存在,请重新命名 advertisement.no_delete=当前广告已经发布,无法删除,请结束发布后再删除 product_promotion.active.name.is_exist=当前优惠活动名称已存在,请修改 product_promotion.purchaseduration.is_exist=当前所选产品下{0}{1}购买时长的优惠活动已存在,请修改 invoice_title.not_exists=发票抬头不存在,请先创建发票抬头 org_invoice.purchase_record.update_num.not_match=当前勾选的购买记录中部分可能已开票,请查询后重新勾选提交开票 org_invoice.agree_file.null=确认开票发票附件不能为空,请上传后再提交 invoice_title.org.exists=组织下已存在发票抬头,请刷新后编辑抬头内容 invoice_title.taxpayerid.exists=统一社会信用代码已存在,请检查 products.not_nolist=当前产品未上架 org_product.purchase.lock=组织下存在购买中的产品操作,请稍后再试 invoice_title.enterprise.taxnumber.empty=企业统一信用代码不能为空 invoice.amount.zero=可开票金额为0,请检查购买记录 invoice.apply.uninvoiceable.exist=当前提交记录中存在不可开票记录,请刷新列表后重新选择提交 pay.channel_not_support=暂不支持的支付渠道,请使用其他支付渠道 pay.order_not_exist=支付订单不存在,支付编号[{0}],请重新发起支付 pay.order_channel_query_not_exist=如果您已确认扫码支付,请稍后刷新页面,支付平台可能存在延迟到账 pay.order_notify_data_parse_error=解析支付回调数据异常 pay.order_status_is_not_waiting=支付订单不处于待支付 pay.order_submit_channel_error=发起渠道支付异常,请联系客服 pay.notify_passback_tradetype_not_support_error=不支持的支付回调tradeType:[{0}],请检查支付渠道 product.no_exist=当前产品不存在 product.detail_no_exist=当前产品的规则不存在 product.detail_duration_exist=当前产品下已存在产品时长[{0}/{1}]的定价规则,请修改后重新操作 product.promotion_no_exist=当前优惠活动不存在 product.detail_duration_unit_not_support=不支持的时长单位,请检查该定价规则的时长单位 org.product_purchase_wait_pay_error=组织下存在当前产品的待支付记录,请支付或{0}分钟后再次发起软件购买 product.price_null_error=产品建议价格为空,请联系客服 org.product_purchase_not_exist_error=组织订购记录不存在,请检查数据 org.product_purchase_exist_error=组织[{0}]订购记录已存在,请勿重复订购 org.product_purchase_delay_record.paid.error=组织[{0}]首购记录[{1}]存在已支付的延期记录,请勿删除 advertisement.no_exist=广告不存在 advertisement.status_endtime_expired=当前广告投放结束时间已超期,请重新发布选择投放时间或重新编辑投放时间 advertisement.image_empty_error=广告图片文件为空,请重新上传 advertisement.image_upload_fail=广告图片上传失败,请稍后再试 advertisement.update_status_error=当前广告已经发布,若要编辑请先结束发布 parser.no_exist=当前解析器不存在,请重新选择 parser.template_no_exist=当前解析器模板不存在,请重新选择 product_purchase.no_exist=当前购买记录不存在,请检查 product_purchase.endtime_before_delaytime_error=当前产品订购有效期{0}未超过当前日期,请调整订购时长 product.delay_duration_unit_not_support=不支持的产品延期时长单位 assembly.config.import.order_components.query.error=装配设置导入失败:订单部件查询失败,请检查订单状态 assembly.config.not_exist=装配设置不存在 assembly.config.do_config_exist=装配设置[{0}]已存在 assembly.config.new_config_name_exist=新装配设置名称[{0}]已存在,请重新查询后再次操作 assembly.config.save_topname_exist=当前配置中顶级节点名称[{0}]已存在,请修改后再次保存 assembly.config.no_need_new_config=不存在名为[{0}]的已配置重复设置,请重新查询后再次操作 label.system.type.not.operable=系统默认标签类型只能在字段管理中操作 label.type.not.operable=当前标签类型不可操作 +label.type.not.exists=标签类型不存在或不可用 +label.type.duplicate=标签类型已存在 +label.type.is.use.error=标签类型已被标签使用,无法删除 +label.type.name.notBlank=标签类型不能为空 +label.type.name.size=标签类型长度不能超过32个字符 label.save.type.notBlank=标签类型不能为空 label.save.type.size=标签类型长度不能超过32个字符 label.save.name.notEmpty=标签名称不能为空