车车 преди 5 месеца
родител
ревизия
a3f852ee8b
променени са 99 файла, в които са добавени 1312 реда и са изтрити 587 реда
  1. 4 3
      ktg-admin/src/main/java/com/ktg/web/controller/iscs/ResApiController.java
  2. 6 3
      ktg-admin/src/main/java/com/ktg/web/controller/system/SysProfileController.java
  3. 8 4
      ktg-admin/src/main/java/com/ktg/web/controller/system/SysUserController.java
  4. 11 21
      ktg-admin/src/main/java/com/ktg/web/controller/tool/TestController.java
  5. 303 1
      ktg-admin/src/main/resources/i18n/messages.properties
  6. 339 1
      ktg-admin/src/main/resources/i18n/messages_en_US.properties
  7. 18 15
      ktg-common/src/main/java/com/ktg/common/core/domain/AjaxResult.java
  8. 7 7
      ktg-common/src/main/java/com/ktg/common/utils/SecurityUtils.java
  9. 8 7
      ktg-common/src/main/java/com/ktg/common/utils/face/ArcSoftMothodUtil.java
  10. 2 1
      ktg-common/src/main/java/com/ktg/common/utils/face/FaceCutUtil.java
  11. 2 1
      ktg-common/src/main/java/com/ktg/common/utils/face/FaceCutUtil1.java
  12. 2 1
      ktg-framework/src/main/java/com/ktg/framework/aspectj/MarsDataScopeAspect.java
  13. 12 10
      ktg-framework/src/main/java/com/ktg/framework/aspectj/RateLimiterAspect.java
  14. 10 8
      ktg-framework/src/main/java/com/ktg/framework/web/exception/GlobalExceptionHandler.java
  15. 6 7
      ktg-framework/src/main/java/com/ktg/framework/web/service/MobileLoginService.java
  16. 8 8
      ktg-framework/src/main/java/com/ktg/framework/web/service/SysLoginService.java
  17. 7 6
      ktg-framework/src/main/java/com/ktg/framework/web/service/UserDetailsServiceImpl.java
  18. 31 29
      ktg-generator/src/main/java/com/ktg/generator/service/GenTableServiceImpl.java
  19. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsBlacklistController.java
  20. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsExceptionController.java
  21. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsHardwareController.java
  22. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLockCabinetSlotsController.java
  23. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLotoStationController.java
  24. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLotoSwitchMapController.java
  25. 3 2
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMailNotifyConfigController.java
  26. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMailSendTaskItemController.java
  27. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMapController.java
  28. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMapPointController.java
  29. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsChangeRecordController.java
  30. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsCheckRecordController.java
  31. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsLoanExceptionController.java
  32. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsPropertyValueController.java
  33. 3 7
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsTicketOperLogController.java
  34. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsUnitController.java
  35. 3 2
      ktg-iscs/src/main/java/com/ktg/iscs/controller/IsWorkstationController.java
  36. 1 1
      ktg-iscs/src/main/java/com/ktg/iscs/controller/TestIscsController.java
  37. 14 13
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/FlexibleJobServiceImpl.java
  38. 76 75
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareApiServiceImpl.java
  39. 46 45
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareMaterialApiServiceImpl.java
  40. 8 6
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsCheckTaskMailServiceImpl.java
  41. 5 4
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsCheckTaskServiceImpl.java
  42. 12 11
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsHardwareServiceImpl.java
  43. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsHardwareTypeServiceImpl.java
  44. 16 15
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsIsolationPointServiceImpl.java
  45. 13 12
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobCardServiceImpl.java
  46. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketKeyServiceImpl.java
  47. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketLockServiceImpl.java
  48. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketLocksetServiceImpl.java
  49. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketPointsServiceImpl.java
  50. 22 21
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketServiceImpl.java
  51. 13 9
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketStepServiceImpl.java
  52. 5 4
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketUserServiceImpl.java
  53. 4 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsKeyServiceImpl.java
  54. 8 7
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockCabinetServiceImpl.java
  55. 4 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockCabinetSlotsServiceImpl.java
  56. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockServiceImpl.java
  57. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockTypeServiceImpl.java
  58. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLocksetServiceImpl.java
  59. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLocksetTypeServiceImpl.java
  60. 11 10
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoStationServiceImpl.java
  61. 8 7
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoSwitchMapServiceImpl.java
  62. 12 11
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMachineryServiceImpl.java
  63. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMailSendTaskItemServiceImpl.java
  64. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMailTemplateServiceImpl.java
  65. 11 18
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMarsSopServiceImpl.java
  66. 4 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsCabinetServiceImpl.java
  67. 3 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsChangeRecordServiceImpl.java
  68. 4 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsCheckPlanServiceImpl.java
  69. 3 2
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsInstructionsServiceImpl.java
  70. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsLoanExceptionServiceImpl.java
  71. 4 3
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsLoanServiceImpl.java
  72. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsPlanCabinetServiceImpl.java
  73. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsPropertyServiceImpl.java
  74. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsReminderServiceImpl.java
  75. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsRestitutionRulesServiceImpl.java
  76. 18 17
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsServiceImpl.java
  77. 8 7
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsTypeServiceImpl.java
  78. 6 5
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMotorServiceImpl.java
  79. 3 2
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsRfidTokenServiceImpl.java
  80. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopPointsServiceImpl.java
  81. 13 12
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopServiceImpl.java
  82. 8 6
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopUserServiceImpl.java
  83. 6 5
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSystemAttributeServiceImpl.java
  84. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsUserWorkstationServiceImpl.java
  85. 12 11
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsWorkareaServiceImpl.java
  86. 9 8
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsWorkstationServiceImpl.java
  87. 2 1
      ktg-iscs/src/main/java/com/ktg/iscs/service/impl/StatisticsApiServiceImpl.java
  88. 3 2
      ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMachineryController.java
  89. 3 2
      ktg-quartz/src/main/java/com/ktg/quartz/task/SendEmailsTask.java
  90. 3 2
      ktg-system/src/main/java/com/ktg/system/service/impl/SysAutoCodePartServiceImpl.java
  91. 4 1
      ktg-system/src/main/java/com/ktg/system/service/impl/SysConfigServiceImpl.java
  92. 10 8
      ktg-system/src/main/java/com/ktg/system/service/impl/SysDeptServiceImpl.java
  93. 3 2
      ktg-system/src/main/java/com/ktg/system/service/impl/SysDictDataServiceImpl.java
  94. 3 2
      ktg-system/src/main/java/com/ktg/system/service/impl/SysRoleServiceImpl.java
  95. 2 1
      ktg-system/src/main/java/com/ktg/system/service/impl/SysUploadFileServiceImpl.java
  96. 18 17
      ktg-system/src/main/java/com/ktg/system/service/impl/SysUserCharacteristicServiceImpl.java
  97. 4 3
      ktg-system/src/main/java/com/ktg/system/service/impl/SysUserServiceImpl.java
  98. 7 6
      ktg-system/src/main/java/com/ktg/system/strategy/AutoCodeUtil.java
  99. 3 2
      ktg-system/src/main/java/com/ktg/system/strategy/PartTypeInputCharHandler.java

+ 4 - 3
ktg-admin/src/main/java/com/ktg/web/controller/iscs/ResApiController.java

@@ -7,6 +7,7 @@ import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.exception.job.TaskException;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsCheckTask;
 import com.ktg.iscs.service.IIsCheckTaskService;
@@ -54,7 +55,7 @@ public class ResApiController extends BaseController
     @PostMapping("/insertIsCheckTask")
     public CommonResult<Boolean> insertIsCheckTask(@RequestBody @Parameter(name = "isCheckTask", description = "新增数据类,放到body") IsCheckTask isCheckTask) throws SchedulerException, TaskException {
         // 1.检查数据
-        Assert.notBlank(isCheckTask.getCheckName(), "任务名称不可为空!");
+        Assert.notBlank(isCheckTask.getCheckName(), MessageUtils.message("assert.business.task.name.not.null"));
         Assert.notBlank(isCheckTask.getCabinetIdStr(), "请选择需要检查的物资柜信息!");
         Assert.notBlank(isCheckTask.getUserIdStr(), "请选择参与人员信息!");
         Assert.notBlank(isCheckTask.getCron(), "请告知我cron!");
@@ -87,7 +88,7 @@ public class ResApiController extends BaseController
         // 1.检查数据
         Assert.notNull(isCheckTask.getCheckId(), "checkId不可为空!");
         IsCheckTask checkTask = iIsCheckTaskService.getById(isCheckTask.getCheckId());
-        Assert.notNull(checkTask, "数据不存在!");
+        Assert.notNull(checkTask, MessageUtils.message("assert.business.data.not.exist"));
         // 2.开始更新操作
         iIsCheckTaskService.update(Wrappers.<IsCheckTask>lambdaUpdate()
                 .eq(IsCheckTask::getCheckId, isCheckTask.getCheckId())
@@ -111,7 +112,7 @@ public class ResApiController extends BaseController
     @Log(title = "检查任务", businessType = BusinessType.DELETE)
     @PostMapping("/deleteIsCheckTaskByCheckIds")
     public CommonResult<Boolean> deleteIsCheckTaskByCheckIds(String checkIds) throws SchedulerException {
-        Assert.notBlank(checkIds, "请选择需要删除的数据!");
+        Assert.notBlank(checkIds, MessageUtils.message("assert.common.delete.select.data"));
         List<String> longIds = Arrays.asList(checkIds);
         // 1.获取数据在删除
         List<IsCheckTask> list = iIsCheckTaskService.list(Wrappers.<IsCheckTask>lambdaQuery()

+ 6 - 3
ktg-admin/src/main/java/com/ktg/web/controller/system/SysProfileController.java

@@ -8,6 +8,7 @@ import com.ktg.common.core.domain.AjaxResult;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.domain.model.LoginUser;
 import com.ktg.common.enums.BusinessType;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.file.FileUploadUtils;
@@ -68,12 +69,14 @@ public class SysProfileController extends BaseController
         if (StringUtils.isNotEmpty(user.getPhonenumber())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
         {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+            // return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+            return AjaxResult.error(MessageUtils.message("user.update.fail.phone.exist", user.getUserName()));
         }
         if (StringUtils.isNotEmpty(user.getEmail())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
         {
-            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+            // return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+            return AjaxResult.error(MessageUtils.message("user.update.fail.email.exist", user.getUserName()));
         }
         user.setUserId(sysUser.getUserId());
         user.setPassword(null);
@@ -87,7 +90,7 @@ public class SysProfileController extends BaseController
             tokenService.setLoginUser(loginUser);
             return AjaxResult.success();
         }
-        return AjaxResult.error("修改个人信息异常,请联系管理员");
+        return AjaxResult.error(MessageUtils.message("user.update.user.detail.exception"));
     }
 
     /**

+ 8 - 4
ktg-admin/src/main/java/com/ktg/web/controller/system/SysUserController.java

@@ -11,6 +11,7 @@ import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.page.TableDataInfo;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanValidators;
@@ -117,7 +118,7 @@ public class SysUserController extends BaseController
         // String message = userService.importUser(userList, updateSupport, operName);
 
         if (StringUtils.isNull(userList) || userList.size() == 0) {
-            throw new ServiceException("导入用户数据不能为空!");
+            throw new ServiceException(MessageUtils.message("user.service.import.data.not.null"));
         }
         int successNum = 0;
         int failureNum = 0;
@@ -250,17 +251,20 @@ public class SysUserController extends BaseController
     {
         if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
         {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
+            // return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
+            return AjaxResult.error(MessageUtils.message("user.add.fail.login.account.exist",user.getUserName()));
         }
         else if (StringUtils.isNotEmpty(user.getPhonenumber())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
         {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
+            // return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
+            return AjaxResult.error(MessageUtils.message("user.add.fail.phone.exist", user.getUserName()));
         }
         else if (StringUtils.isNotEmpty(user.getEmail())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
         {
-            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+            // return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+            return AjaxResult.error(MessageUtils.message("user.add.fail.email.exist", user.getUserName()));
         }
         user.setCreateBy(getUsername());
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));

+ 11 - 21
ktg-admin/src/main/java/com/ktg/web/controller/tool/TestController.java

@@ -1,30 +1,20 @@
 package com.ktg.web.controller.tool;
 
+import com.ktg.common.core.controller.BaseController;
+import com.ktg.common.core.domain.AjaxResult;
+import com.ktg.common.utils.MessageUtils;
+import com.ktg.common.utils.StringUtils;
+import io.swagger.annotations.*;
+import org.springframework.web.bind.annotation.*;
+
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ktg.common.core.controller.BaseController;
-import com.ktg.common.core.domain.AjaxResult;
-import com.ktg.common.utils.StringUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import io.swagger.annotations.ApiOperation;
 
 /**
  * swagger 用户测试方法
- * 
+ *
  * @author ruoyi
  */
 @Api("用户信息管理")
@@ -57,7 +47,7 @@ public class TestController extends BaseController
         }
         else
         {
-            return error("用户不存在");
+            return error(MessageUtils.message("assert.business.user.not.exist"));
         }
     }
 
@@ -88,7 +78,7 @@ public class TestController extends BaseController
         }
         if (users.isEmpty() || !users.containsKey(user.getUserId()))
         {
-            return error("用户不存在");
+            return error(MessageUtils.message("assert.business.user.not.exist"));
         }
         users.remove(user.getUserId());
         return AjaxResult.success(users.put(user.getUserId(), user));
@@ -106,7 +96,7 @@ public class TestController extends BaseController
         }
         else
         {
-            return error("用户不存在");
+            return error(MessageUtils.message("assert.business.user.not.exist"));
         }
     }
 }

+ 303 - 1
ktg-admin/src/main/resources/i18n/messages.properties

@@ -1,3 +1,6 @@
+#test
+no.exit.key=\u94A5\u5319\u4FE1\u606F\u4E0D\u5B58\u5728
+
 #\u9519\u8BEF\u6D88\u606F
 not.null=* \u5FC5\u987B\u586B\u5199
 user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF
@@ -37,4 +40,303 @@ no.export.permission=\u60A8\u6CA1\u6709\u5BFC\u51FA\u6570\u636E\u7684\u6743\u965
 no.view.permission=\u60A8\u6CA1\u6709\u67E5\u770B\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
 
 
-no.exit.key=\u94A5\u5319\u4FE1\u606F\u4E0D\u5B58\u5728
+##\u56DB\u3001\u5168\u5C40\u5F02\u5E38\u5904\u7406\u5668
+exception.auth.no.permission=\u6CA1\u6709\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6388\u6743
+exception.demo.mode.not.allow=\u6F14\u793A\u6A21\u5F0F\uFF0C\u4E0D\u5141\u8BB8\u64CD\u4F5C
+
+##\u4E94\u3001AjaxResult \u9ED8\u8BA4\u6D88\u606F
+ajax.result.success=\u64CD\u4F5C\u6210\u529F
+ajax.result.error=\u64CD\u4F5C\u5931\u8D25
+
+##\u516D\u3001Controller \u7528\u6237\u7BA1\u7406\u76F8\u5173\u63D0\u793A
+user.add.fail.login.account.exist=\u65B0\u589E\u7528\u6237 '{0}' \u5931\u8D25\uFF0C\u767B\u5F55\u8D26\u53F7\u5DF2\u5B58\u5728
+user.add.fail.phone.exist=\u65B0\u589E\u7528\u6237 '{0}' \u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728
+user.add.fail.email.exist=\u65B0\u589E\u7528\u6237 '{0}' \u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728
+user.update.fail.phone.exist=\u4FEE\u6539\u7528\u6237 '{0}' \u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728
+user.update.fail.email.exist=\u4FEE\u6539\u7528\u6237 '{0}' \u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728
+user.update.user.detail.exception=\u4FEE\u6539\u4E2A\u4EBA\u4FE1\u606F\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
+
+
+##\u4E03\u3001Service \u5F02\u5E38\u63D0\u793A
+##\u7528\u6237\u670D\u52A1
+user.service.import.data.not.null=\u5BFC\u5165\u7528\u6237\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+user.service.operate.super.admin.not.allow=\u4E0D\u5141\u8BB8\u64CD\u4F5C\u8D85\u7EA7\u7BA1\u7406\u5458\u7528\u6237
+user.service.access.data.no.permission=\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u7528\u6237\u6570\u636E\uFF01
+##\u5C97\u4F4D\u670D\u52A1
+post.service.delete.assigned.not.allow={0} \u5DF2\u5206\u914D\uFF0C\u4E0D\u80FD\u5220\u9664
+##\u89D2\u8272\u670D\u52A1
+role.service.operate.super.admin.not.allow=\u4E0D\u5141\u8BB8\u64CD\u4F5C\u8D85\u7EA7\u7BA1\u7406\u5458\u89D2\u8272
+role.service.access.data.no.permission=\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u89D2\u8272\u6570\u636E\uFF01
+role.service.delete.assigned.not.allow={0} \u5DF2\u5206\u914D\uFF0C\u4E0D\u80FD\u5220\u9664
+##\u914D\u7F6E\u670D\u52A1
+config.service.built.in.param.delete.not.allow=\u5185\u7F6E\u53C2\u6570\u3010{0}\u3011\u4E0D\u80FD\u5220\u9664
+##\u5B57\u5178\u7C7B\u578B\u670D\u52A1
+dict.type.service.delete.assigned.not.allow={0} \u5DF2\u5206\u914D\uFF0C\u4E0D\u80FD\u5220\u9664
+##\u90E8\u95E8\u670D\u52A1
+dept.service.access.data.no.permission=\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u90E8\u95E8\u6570\u636E\uFF01
+dept.service.add.disabled.not.allow=\u90E8\u95E8\u505C\u7528\uFF0C\u4E0D\u5141\u8BB8\u65B0\u589E
+##\u4EE3\u7801\u751F\u6210\u670D\u52A1
+code.gen.service.import.fail=\u5BFC\u5165\u5931\u8D25\uFF1A{0}
+code.gen.service.render.template.fail=\u6E32\u67D3\u6A21\u677F\u5931\u8D25\uFF0C\u8868\u540D\uFF1A{0}
+code.gen.service.sync.data.fail.table.not.exist=\u540C\u6B65\u6570\u636E\u5931\u8D25\uFF0C\u539F\u8868\u7ED3\u6784\u4E0D\u5B58\u5728
+code.gen.service.tree.code.field.not.null=\u6811\u7F16\u7801\u5B57\u6BB5\u4E0D\u80FD\u4E3A\u7A7A
+code.gen.service.tree.parent.code.field.not.null=\u6811\u7236\u7F16\u7801\u5B57\u6BB5\u4E0D\u80FD\u4E3A\u7A7A
+code.gen.service.tree.name.field.not.null=\u6811\u540D\u79F0\u5B57\u6BB5\u4E0D\u80FD\u4E3A\u7A7A
+code.gen.service.sub.table.name.not.null=\u5173\u8054\u5B50\u8868\u7684\u8868\u540D\u4E0D\u80FD\u4E3A\u7A7A
+code.gen.service.sub.table.fk.name.not.null=\u5B50\u8868\u5173\u8054\u7684\u5916\u952E\u540D\u4E0D\u80FD\u4E3A\u7A7A
+##\u7528\u6237\u8BE6\u60C5\u670D\u52A1
+user.detail.service.login.user.not.exist=\u767B\u5F55\u7528\u6237\uFF1A{0} \u4E0D\u5B58\u5728
+user.detail.service.account.deleted=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\uFF1A{0} \u5DF2\u88AB\u5220\u9664
+user.detail.service.account.disabled=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\uFF1A{0} \u5DF2\u505C\u7528
+user.detail.service.account.blacklisted=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\uFF1A{0} \u5DF2\u88AB\u62C9\u5165 {1} \u6A21\u5757\u9ED1\u540D\u5355\uFF0C\u6682\u65F6\u65E0\u6CD5\u767B\u5F55\uFF01
+user.detail.service.account.lack.role.permission=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\uFF1A{0} \u7F3A\u5931\u89D2\u8272\u6743\u9650\uFF0C\u6682\u65F6\u65E0\u6CD5\u767B\u5F55\u3002\u8BF7\u524D\u5F80\u89D2\u8272\u6216\u57FA\u7840\u6570\u636E\u914D\u7F6E\uFF01
+##\u79FB\u52A8\u7AEF\u767B\u5F55\u670D\u52A1
+mobile.login.service.sys.config.register.role.code.not.config=\u8BF7\u524D\u5F80\u6570\u636E\u5B57\u5178\u3010sys_config\u3011\u4E2D\u7EF4\u62A4\u6CE8\u518C\u7528\u6237\u89D2\u8272\u7F16\u7801\u3010register_role_code\u3011
+mobile.login.service.sys.config.register.dept.code.not.config=\u8BF7\u524D\u5F80\u6570\u636E\u5B57\u5178\u3010sys_config\u3011\u4E2D\u7EF4\u62A4\u6CE8\u518C\u7528\u6237\u90E8\u95E8\u7F16\u7801\u3010register_dept_code\u3011
+mobile.login.service.sys.config.register.post.code.not.config=\u8BF7\u524D\u5F80\u6570\u636E\u5B57\u5178\u3010sys_config\u3011\u4E2D\u7EF4\u62A4\u6CE8\u518C\u7528\u6237\u5C97\u4F4D\u7F16\u7801\u3010register_post_code\u3011
+##\u9650\u6D41\u670D\u52A1
+limit.service.access.too.frequent=\u8BBF\u95EE\u8FC7\u4E8E\u9891\u7E41\uFF0C\u8BF7\u7A0D\u5019\u518D\u8BD5
+##\u5B89\u5168\u5DE5\u5177
+security.util.get.user.id.error=\u83B7\u53D6\u7528\u6237ID\u5F02\u5E38
+security.util.get.dept.id.error=\u83B7\u53D6\u90E8\u95E8ID\u5F02\u5E38
+security.util.get.user.account.error=\u83B7\u53D6\u7528\u6237\u8D26\u6237\u5F02\u5E38
+security.util.get.user.info.error=\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u5F02\u5E38
+##\u516B\u3001CommonResult \u6210\u529F\u6D88\u606F
+common.result.success.device.info= \u8BBE\u5907\u4FE1\u606F:{0}
+common.result.success.import.data=\u5BFC\u5165\u6210\u529F\uFF0C\u5171\u5BFC\u5165 {0} \u6761\u6570\u636E
+##\u4E5D\u3001Assert \u53C2\u6570\u6821\u9A8C\u63D0\u793A
+##\u901A\u7528\u63D0\u793A
+assert.common.delete.select.data=\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E\uFF01
+assert.common.param.id.not.null=ID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.common.param.primary.key.id.not.null=\u4E3B\u952EID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.common.param.invalid=\u65E0\u6548\u53C2\u6570\uFF01
+##\u4F5C\u4E1A\u7968\u76F8\u5173
+assert.work.order.info.not.exist=\u4F5C\u4E1A\u7968\u4FE1\u606F\u4E0D\u5B58\u5728\uFF01
+assert.work.order.data.lost=\u4F5C\u4E1A\u7968\u6570\u636E\u4E22\u5931\uFF01
+assert.work.order.id.not.null=\u4F5C\u4E1A\u7968ID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.order.current.id.not.null=\u5F53\u524D\u4F5C\u4E1A\u7968ID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.work.order.step.six.cannot.cancel=\u8BE5\u4F5C\u4E1A\u7968\u5DF2\u6267\u884C\u81F3\u7B2C\u516D\u6B65\uFF0C\u65E0\u6CD5\u53D6\u6D88\uFF01
+assert.work.order.wait.lock.complete=\u8BF7\u7B49\u5F85\u4F5C\u4E1A\u7968 [{0}] \u4E0A\u9501\u5B8C\u6210\uFF01
+assert.work.order.specify=\u8BF7\u544A\u8BC9\u6211\u5173\u4E8E\u54EA\u4E2A\u4F5C\u4E1A\u7968\uFF01
+assert.work.order.job.id.not.null=\u4F5C\u4E1AID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.work.order.device.taken.cannot.operate=\u4F5C\u4E1A\u7968\u5DF2\u5B8C\u6210\u8BBE\u5907\u62FF\u53D6\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01
+assert.work.order.not.started.cannot.co.lock=\u8BE5\u4F5C\u4E1A\u7968\u672A\u5F00\u59CB\uFF0C\u8BF7\u52FF\u5171\u9501\uFF01
+assert.work.order.already.co.locked.cannot.repeat=\u60A8\u5DF2\u5171\u9501\uFF0C\u8BF7\u52FF\u91CD\u590D\u5171\u9501\uFF01
+assert.work.order.not.co.locked.cannot.unlock=\u60A8\u8FD8\u672A\u5171\u9501\uFF0C\u8BF7\u52FF\u64CD\u4F5C\u89E3\u9664\u5171\u9501\uFF01
+assert.work.order.already.unlocked.cannot.repeat=\u60A8\u5DF2\u89E3\u9664\u5171\u9501\uFF0C\u8BF7\u52FF\u91CD\u590D\u89E3\u9664\u9501\uFF01
+assert.work.order.code.not.null=\u4F5C\u4E1A\u7968\u7F16\u53F7\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.order.name.not.null=\u4F5C\u4E1A\u7968\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.order.select.isolation.point=\u8BF7\u9009\u62E9\u9694\u79BB\u70B9\uFF01
+assert.work.order.person.info.not.null=\u4EBA\u5458\u4FE1\u606F\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.order.point.info.not.null=\u70B9\u4F4D\u4FE1\u606F\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u94A5\u5319\u76F8\u5173
+assert.key.data.lost=\u94A5\u5319\u6570\u636E\u4E22\u5931\u5566\uFF01
+assert.key.nfc.no.corresponding.info= \u8BE5NFC\u65E0\u5BF9\u5E94\u7684\u94A5\u5319\u4FE1\u606F
+assert.key.specify.nfc=\u8BF7\u544A\u8BC9\u6211\u94A5\u5319\u7684NFC!
+assert.key.nfc.not.null=\u94A5\u5319NFC\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.key.nfc.corresponding.info.not.exist={0} \u5BF9\u5E94\u7684\u94A5\u5319\u4FE1\u606F\u4E0D\u5B58\u5728\uFF01
+##\u6302\u9501\u76F8\u5173
+assert.lock.data.lost=\u6302\u9501\u6570\u636E\u4E22\u5931\u5566\uFF01
+assert.lock.nfc.no.corresponding.info= \u8BE5NFC\u65E0\u5BF9\u5E94\u7684\u6302\u9501\u4FE1\u606F\uFF01
+assert.lock.nfc.not.null=\u8BE5\u9501NFC\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.lock.nfc.corresponding.data.not.exist={0} \u5BF9\u5E94\u7684\u6302\u9501\u6570\u636E\u4E0D\u5B58\u5728\uFF01
+assert.lock.nfc.missing=\u6302\u9501NFC\u7F3A\u5931\uFF01
+assert.lock.specify.nfc=\u8BF7\u544A\u8BC9\u6211\u6302\u9501\u7684NFC!
+assert.lock.name.already.taken={0} \u5DF2\u88AB\u53D6\u51FA\uFF01
+assert.lock.point.error.duplicate=\u70B9\u4F4D\u6302\u9501\u9519\u8BEF\uFF0C\u91CD\u590D\u70B9\u4F4D [{0}] \u8BF7\u591A\u9501\u5B8C\u6210\u91CD\u590D\u70B9\u4F4D\u4E0A\u9501\uFF01
+assert.lock.take.at.least.one=\u8BF7\u53D6\u51FA\u81F3\u5C11\u4E00\u628A\u6302\u9501\uFF01
+##\u786C\u4EF6\u76F8\u5173
+assert.hardware.serial.no.corresponding.info= \u8BE5\u5E8F\u5217\u53F7\u65E0\u5BF9\u5E94\u7684\u786C\u4EF6\u4FE1\u606F\uFF01
+assert.hardware.lock.no.init.data.for.update=\u65E0\u521D\u59CB\u5316\u6570\u636E\u6765\u63D0\u4F9B\u7ED9\u8BE5\u6302\u9501\u66F4\u65B0
+assert.hardware.accessory.no.init.data.for.update=\u65E0\u521D\u59CB\u5316\u6570\u636E\u6765\u63D0\u4F9B\u7ED9\u8BE5\u8F85\u4EF6\u66F4\u65B0
+assert.hardware.code.not.null=\u786C\u4EF6\u7F16\u7801\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.hardware.name.not.null=\u786C\u4EF6\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.hardware.code.already.used={0} \u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.hardware.specify.return.location=\u8BF7\u544A\u77E5\u5F52\u8FD8\u5230\u54EA\u91CC\uFF01
+assert.hardware.specify.return.cabinet=\u8BF7\u544A\u77E5\u5F52\u8FD8\u5230\u54EA\u4E00\u4E2A\u67DC\u5B50\uFF01
+##\u9694\u79BB\u70B9\u76F8\u5173
+assert.isolation.point.nfc.no.corresponding.info=\u8BE5NFC\u65E0\u5BF9\u5E94\u7684\u9694\u79BB\u70B9\u4FE1\u606F
+assert.isolation.point.name.used.by.sop.cannot.delete={0} \u70B9\u4F4D\u6B63\u5728\u88ABSOP\u4F7F\u7528\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
+assert.isolation.point.used.by.loto.cannot.delete={0} \u6B63\u5728\u88AB {1} \u9501\u5B9A\u7AD9\u4F7F\u7528\uFF0C\u8BF7\u5148\u4ECE\u9501\u5B9A\u7AD9\u89E3\u9664\u7ED1\u5B9A\uFF01
+assert.isolation.point.name.not.null=\u9694\u79BB\u70B9\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.isolation.point.code.name.not.null=\u9694\u79BB\u70B9\u7F16\u53F7\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.isolation.point.id.not.null=\u9694\u79BB\u70B9ID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.isolation.point.name.already.used=\u8BE5\u9694\u79BB\u70B9\u540D\u79F0\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.isolation.point.nfc.already.used=\u8BE5NFC\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.isolation.point.code.already.used=\u8BE5\u7F16\u53F7\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.isolation.point.serial.no.already.used=\u8BE5\u5E8F\u5217\u53F7\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.isolation.point.query.error=\u67E5\u8BE2\u9694\u79BB\u70B9\u4FE1\u606F\u51FA\u9519\uFF01
+##\u8F85\u4EF6\u76F8\u5173
+assert.accessory.nfc.no.corresponding.info= \u8BE5NFC\u65E0\u5BF9\u5E94\u7684\u8F85\u4EF6\u4FE1\u606F
+assert.accessory.nfc.missing=\u8F85\u4EF6NFC\u7F3A\u5931\uFF01
+assert.accessory.take.at.least.one=\u8BF7\u53D6\u51FA\u81F3\u5C11\u4E00\u4E2A\u8F85\u4EF6\uFF01
+##\u5C97\u4F4D\u76F8\u5173
+assert.post.info.not.exist=\u5C97\u4F4D\u4FE1\u606F\u4E0D\u5B58\u5728\uFF01
+assert.post.name.not.null=\u5C97\u4F4D\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.post.name.already.used=\u8BE5\u5C97\u4F4D\u540D\u79F0\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.post.id.not.null=\u5C97\u4F4DID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.post.not.null=\u5C97\u4F4D\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.post.used.by.user.cannot.delete=\u5C97\u4F4D\u6B63\u5728\u88AB\u7528\u6237\u4F7F\u7528\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
+assert.post.has.children.cannot.delete=\u5C97\u4F4D\u4E0B\u6709\u5B50\u5C97\u4F4D\uFF0C\u65E0\u6CD5\u5220\u9664\uFF01
+##SOP \u76F8\u5173
+assert.sop.data.not.exist=SOP\u6570\u636E\u4E0D\u5B58\u5728\uFF01
+assert.sop.id.not.null=SOPID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.sop.name.not.null=SOP\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.sop.code.name.not.null=SOP\u7F16\u53F7\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.sop.code.already.used=\u8BE5SOP\u7F16\u53F7\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.sop.sort.data.not.null=\u6392\u5E8F\u6570\u636E\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+##\u8BBE\u5907\u5DE5\u827A\u76F8\u5173
+assert.machinery.process.info.not.exist=\u8BBE\u5907\u5DE5\u827A\u4FE1\u606F\u4E0D\u5B58\u5728\uFF01
+assert.machinery.process.name.not.null=\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.machinery.process.parent.id.not.null=\u7236ID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.machinery.process.name.already.used=[{0}] \u540D\u79F0\u5DF2\u88AB\u5DE5\u827A / \u8BBE\u5907\u4F7F\u7528\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\uFF01
+assert.machinery.process.select.isolation.point=\u8BF7\u9009\u62E9\u9694\u79BB\u70B9\uFF01
+##\u5DE5\u4F5C\u533A\u57DF\u76F8\u5173
+assert.work.area.name.not.null=\u533A\u57DF\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.area.code.name.not.null=\u533A\u57DF\u7F16\u53F7\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.area.id.not.null=\u533A\u57DFID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.work.area.code.already.used=\u8BE5\u533A\u57DF\u7F16\u53F7\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.work.area.has.isolation.point.cannot.delete={0} \u4E0B\u6709\u9694\u79BB\u70B9\uFF0C\u6682\u4E0D\u53EF\u5220\u9664\uFF01
+assert.work.area.pass.id=\u8BF7\u4F20\u5165\u533A\u57DFID
+##\u9501\u63A7\u67DC / \u7269\u8D44\u67DC\u76F8\u5173
+assert.cabinet.lock.id.not.null=\u9501\u63A7\u67DCID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.cabinet.material.code.not.null=\u7269\u8D44\u67DCCODE\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.cabinet.material.info.not.exist=\u7269\u8D44\u67DC\u4FE1\u606F\u4E0D\u5B58\u5728\uFF01
+assert.cabinet.material.code.identity.unrecognized=\u65E0\u6CD5\u8BC6\u522B {0} \u7269\u8D44\u67DC\u8EAB\u4EFD\uFF01
+assert.cabinet.not.exist=\u67DC\u5B50\u4E0D\u5B58\u5728\uFF01
+assert.cabinet.material.specify=\u8BF7\u544A\u8BC9\u6211\u8FD9\u662F\u54EA\u53F0\u7269\u8D44\u67DC\uFF01
+assert.cabinet.code.not.null=cabinetCode \u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.cabinet.material.no.inspection.plan=\u8BE5\u7269\u8D44\u67DC\u5F53\u524D\u65E0\u60A8\u7684\u68C0\u67E5\u8BA1\u5212\uFF01
+assert.cabinet.material.no.executable.inspection.plan=\u5F53\u524D\u7269\u8D44\u67DC\u65E0\u9700\u60A8\u6267\u884C\u7684\u68C0\u67E5\u8BA1\u5212\uFF01
+assert.cabinet.clear.position.info.first=\u8BF7\u5148\u6E05\u7406\u67DC\u5B50\u4E0B\u7684\u4ED3\u4F4D\u4FE1\u606F\uFF01
+assert.cabinet.code.already.used=\u8BE5\u7F16\u7801\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u66F4\u6362\uFF01
+assert.cabinet.name.already.used=\u8BE5\u540D\u79F0\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u66F4\u6362\uFF01
+assert.cabinet.electric.id.not.null=\u7535\u67DCID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.cabinet.electric.pass.id=\u8BF7\u4F20\u5165\u7535\u67DCID
+assert.cabinet.name.not.null=\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.cabinet.name.already.used.retry=\u8BE5\u540D\u79F0\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\uFF01
+##\u7269\u8D44\u76F8\u5173
+assert.material.rfid.not.null=\u7269\u8D44RFID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.material.rfid.not.found=\u901A\u8FC7RFID:{0} \u672A\u67E5\u8BE2\u5230\u7269\u8D44\uFF01
+assert.material.cabinet.code.not.found=\u901A\u8FC7\u7269\u8D44\u67DC CODE:{0} \u672A\u67E5\u8BE2\u5230\u7269\u8D44\u67DC\u4FE1\u606F\uFF01
+assert.material.put.new.in.cabinet=\u8BF7\u5728\u8BE5\u67DC\u4E2D\u653E\u5165\u65B0\u7269\u8D44\uFF01
+assert.material.original.not.exist=\u539F\u7269\u8D44\u4E0D\u5B58\u5728
+assert.material.new.not.exist=\u65B0\u7269\u8D44\u4E0D\u5B58\u5728
+assert.material.code.already.used=\u8BE5\u7269\u8D44\u7F16\u7801\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.material.rfid.already.used=\u8BE5RFID\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.material.not.exist=\u8BE5\u7269\u8D44\u4E0D\u5B58\u5728\uFF01
+assert.material.specify.rfid=\u8BF7\u544A\u8BC9\u6211\u7269\u8D44\u7684
+rfid!assert.material.specify.borrow.or.return=\u8BF7\u544A\u8BC9\u6211\u662F\u501F\u51FA\u8FD8\u662F\u5F52\u8FD8\uFF01
+assert.material.rfid.already.borrowed={0} \u7269\u8D44\u5DF2\u7ECF\u662F\u501F\u51FA\u72B6\u6001\uFF0C\u65E0\u6CD5\u518D\u501F\u51FA\uFF01
+assert.material.rfid.already.in.cabinet={0} \u7269\u8D44\u5DF2\u7ECF\u662F\u67DC\u4E2D\u72B6\u6001\uFF0C\u65E0\u6CD5\u518D\u653E\u5165\uFF01
+assert.material.cabinet.info.not.null=\u7269\u8D44\u67DC\u4FE1\u606F\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.material.select=\u8BF7\u9009\u62E9\u7269\u8D44
+assert.material.old.id.not.null =\u65E7\u7269\u8D44ID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.material.new.rfid.not.null=\u65B0\u7269\u8D44RFID\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.material.to.replace.not.taken=\u9700\u8981\u66F4\u6362\u7684\u7269\u8D44\u672A\u53D6\u51FA\uFF01
+assert.material.has.cabinet.cannot.replace=\u8BE5\u7269\u8D44\u5B58\u5728\u6240\u5C5E\u67DC\u5B50\uFF0C\u4E0D\u53EF\u66F4\u6362\uFF01
+assert.material.replace.abnormal=\u66F4\u6362\u7684\u7269\u8D44\u5F02\u5E38\uFF0C\u4E0D\u53EF\u66F4\u6362\uFF01
+assert.material.no.maintain.or.replace=\u6CA1\u6709\u786E\u5B9A\u8981\u7EF4\u4FEE\u6216\u66F4\u6362\u7684\u7269\u8D44\uFF01
+assert.material.import.data.not.null=\u5BFC\u5165\u7269\u8D44\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u7269\u8D44\u5206\u7C7B\u76F8\u5173
+assert.material.category.has.materials.cannot.delete={0} \u5206\u7C7B\u4E0B\u6709\u7269\u8D44\uFF0C\u4E0D\u53EF\u5220\u9664\uFF01
+assert.material.category.has.children.cannot.delete={0} \u5206\u7C7B\u4E0B\u6709\u5B50\u7C7B\uFF0C\u4E0D\u53EF\u5220\u9664\uFF01
+assert.material.category.code.already.used=\u8BE5\u7269\u8D44\u7C7B\u578B\u7F16\u7801\u5DF2\u88AB\u4F7F\u7528\uFF01
+assert.material.category.borrow.duration.gte.reminder=\u501F\u7528\u65F6\u957F\u9700\u8981\u5927\u4E8E\u7B49\u4E8E\u63D0\u9192\u65F6\u957F\uFF01
+##\u7535\u673A\u76F8\u5173
+assert.motor.data.not.exist=\u8BE5\u7535\u673A\u6570\u636E\u4E0D\u5B58\u5728\uFF01
+assert.motor.map.primary.key.not.null=\u5730\u56FE\u4E3B\u952E\u4E0D\u80FD\u4E3A\u7A7A
+##\u5730\u56FE\u76F8\u5173
+assert.map.data.parse.fail=map\u6570\u636E\u89E3\u6790\u5931\u8D25\uFF01
+assert.map.provide.loto.cabinet.serial.no=\u8BF7\u63D0\u4F9BLOTO\u67DC\u5E8F\u5217\u53F7\uFF01
+##\u68C0\u67E5\u8BA1\u5212\u76F8\u5173
+assert.inspection.plan.configure.template=\u8BF7\u5728\u57FA\u7840\u6570\u636E\u4E2D\u914D\u7F6E\u7269\u8D44\u68C0\u67E5\u8BA1\u5212\u6A21\u677F\uFF01
+assert.inspection.plan.id.not.null=\u68C0\u67E5\u8BA1\u5212planId\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u6307\u7EB9\u76F8\u5173
+assert.fingerprint.specify.user=\u8BF7\u544A\u77E5\u6211\u8FD9\u662F\u54EA\u4E2A\u7528\u6237\u7684\u6307\u7EB9\uFF01
+assert.fingerprint.group.not.null=\u6307\u7EB9\u5206\u7EC4\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.fingerprint.entry.limit.reached=\u8BE5\u4EBA\u5458\u7684\u6307\u7EB9\u5F55\u5165\u5DF2\u4E0A\u9650\uFF0C\u6700\u5927 {0} \u6761\uFF01
+assert.fingerprint.unrecognizable.retry=\u8BE5\u6587\u4EF6\u6307\u7EB9\u65E0\u6CD5\u8BC6\u522B\uFF0C\u8BF7\u91CD\u65B0\u5F55\u5165\uFF01
+assert.fingerprint.similarity.low.retry=\u6307\u7EB9\u76F8\u4F3C\u5EA6\u76F8\u5DEE\u8F83\u5927\uFF0C\u8BF7\u91CD\u65B0\u5F55\u5165\uFF01
+assert.fingerprint.info.not.null=\u6307\u7EB9\u4FE1\u606F\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u4EBA\u8138\u76F8\u5173
+assert.face.specify.user=\u8BF7\u544A\u77E5\u6211\u8FD9\u662F\u54EA\u4E2A\u7528\u6237\u7684\u4EBA\u8138\uFF01
+assert.face.entry.limit.reached=\u8BE5\u4EBA\u5458\u7684\u4EBA\u8138\u5F55\u5165\u5DF2\u4E0A\u9650\uFF0C\u6700\u5927 {0} \u6761\uFF01
+assert.face.file.parse.fail=\u4EBA\u8138\u6587\u4EF6\u65E0\u6CD5\u89E3\u6790\uFF01
+assert.face.upload.file=\u8BF7\u4E0A\u4F20\u4EBA\u8138\u6587\u4EF6\uFF01
+assert.face.get.fail=\u83B7\u53D6\u4EBA\u8138\u5931\u8D25\uFF01
+assert.face.get.feature.fail=\u83B7\u53D6\u4EBA\u8138\u7279\u5F81\u503C\u5931\u8D25\uFF01
+assert.face.not.recognized=\u672A\u8BC6\u522B\u5230\u4EBA\u8138\uFF01
+assert.face.comparison.error=\u4EBA\u8138\u5BF9\u6BD4\u5F02\u5E38 {0}\uFF01
+assert.face.info.not.null=\u4EBA\u8138\u4FE1\u606F\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u767B\u5F55\u76F8\u5173
+assert.login.fingerprint.identity.unknown=\u65E0\u6CD5\u6839\u636E\u6307\u7EB9\u786E\u5B9A\u60A8\u7684\u8EAB\u4EFD\uFF0C\u8BF7\u901A\u8FC7\u5176\u5B83\u65B9\u5F0F\u767B\u5F55\uFF01
+assert.login.face.identity.unknown=\u65E0\u6CD5\u6839\u636E\u4EBA\u8138\u786E\u5B9A\u60A8\u7684\u8EAB\u4EFD\uFF0C\u8BF7\u901A\u8FC7\u5176\u5B83\u65B9\u5F0F\u767B\u5F55\uFF01
+##\u7F16\u7801\u89C4\u5219\u76F8\u5173
+assert.code.rule.input.char.not.null=\u7F16\u7801\u89C4\u5219\u4F20\u5165\u5B57\u7B26\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.code.rule.type.not.found=\u672A\u83B7\u53D6\u5230\u6307\u5B9A\u7C7B\u578B:[{0}] \u7684\u4E1A\u52A1\u7F16\u7801\u751F\u6210\u89C4\u5219
+assert.code.rule.result.record.not.found=\u672A\u67E5\u8BE2\u5230\u89C4\u5219 {[]} \u5BF9\u5E94\u7684\u7ED3\u679C\u8BB0\u5F55
+assert.code.rule.input.char.length.error=\u4F20\u5165\u5B57\u7B26\u7684\u957F\u5EA6\u9519\u8BEF\uFF01
+assert.code.rule.serial.number.component.unique=\u7F16\u7801\u89C4\u5219 [{0}] \u6D41\u6C34\u53F7\u65B9\u5F0F\u7684\u7EC4\u6210\u53EA\u80FD\u5B58\u5728\u4E00\u4E2A
+assert.code.rule.generated.code.empty=\u89C4\u5219\uFF1A[{0}] \u751F\u6210\u7684\u7F16\u7801\u4E3A\u7A7A\uFF01
+assert.code.rule.generated.code.exceed.max.length=\u751F\u6210\u7684\u7F16\u7801 [{0}] \u5DF2\u7ECF\u8D85\u51FA\u89C4\u5219\u4E2D\u914D\u7F6E\u7684\u6700\u5927\u957F\u5EA6\uFF1A[{1}]
+##\u4E1A\u52A1\u7F16\u7801\u76F8\u5173
+assert.business.code.max.length.less.than.sum=\u6700\u5927\u957F\u5EA6 {0} \u5C0F\u4E8E\u5206\u6BB5\u957F\u5EA6\u603B\u548C {1}, \u8BF7\u6269\u5BB9\u6700\u5927\u957F\u5EA6\uFF01
+##\u6587\u4EF6\u4E0A\u4F20\u76F8\u5173
+assert.file.upload.param.invalid=\u65E0\u6548\u53C2\u6570\uFF01
+##\u7EDF\u8BA1\u76F8\u5173
+assert.statistics.type.not.null=TYPE\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u7528\u6237\u76F8\u5173
+assert.user.data.duplicate.name.modify=\u7528\u6237\u6570\u636E\u5B58\u5728\u540C\u540D\u60C5\u51B5\uFF0C\u8BF7\u4FEE\u6539\uFF01
+assert.user.not.exist.in.system=\u7CFB\u7EDF\u4E2D\u65E0\u8BE5\u7528\u6237\uFF01
+assert.user.work.card.not.bound=\u8BE5\u5DE5\u4F5C\u5361\u672A\u7ED1\u5B9A\u7528\u6237\uFF01
+assert.user.employee.card.no.work.task=\u8BE5\u5458\u5DE5\u5361\u7ED1\u5B9A\u7684\u5458\u5DE5\u6682\u65E0\u4F5C\u4E1A\u4EFB\u52A1\uFF01
+assert.user.operate.co.lock.status.not.null=\u64CD\u4F5C\u7684\u5171\u9501/\u89E3\u9501\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.user.work.card.nfc.not.null=\u5DE5\u4F5C\u5361NFC\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+##\u5B57\u5178\u6570\u636E\u76F8\u5173
+assert.dict.data.key.value.exist=\u8BE5\u5B57\u5178\u7C7B\u578B\u4E0B\u5DF2\u5B58\u5728\u952E\u503C\uFF1A{0}\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\uFF01
+##\u5176\u4ED6\u4E1A\u52A1\u903B\u8F91
+assert.business.no.data.received=\u6CA1\u6709\u63A5\u6536\u5230\u6570\u636E\u554A\uFF01
+assert.business.specify.isolation.point.info=\u8BF7\u544A\u77E5\u9694\u79BB\u70B9\u4FE1\u606F\uFF01
+assert.business.specify.lock.or.unlock=\u8BF7\u544A\u6211\u662F\u53BB\u6302\u9501\u8FD8\u662F\u89E3\u9501\uFF01
+assert.business.specify.task.status=\u8BF7\u544A\u6211\u4EFB\u52A1\u5F53\u524D\u72B6\u6001\uFF01
+assert.business.point.switch.data.not.null=\u70B9\u4F4D\u5F00\u5173\u6570\u636E\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.loto.serial.no.not.null=\u9501\u5B9A\u7AD9\u5E8F\u5217\u53F7\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.point.serial.no.not.null=\u70B9\u4F4D\u5E8F\u5217\u53F7\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.nfc.no.lock.info.found=\u901A\u8FC7NFC\u67E5\u8BE2\u4E0D\u5230\u76F8\u5173\u6302\u9501\u4FE1\u606F\uFF01
+assert.business.multiple.faces.recognized.adjust=\u8BC6\u522B\u5230\u591A\u5F20\u4EBA\u8138\uFF0C\u8BF7\u91CD\u65B0\u8C03\u6574\u4F4D\u7F6E\uFF01
+
+
+assert.business.task.name.not.null=\u4EFB\u52A1\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A!
+assert.business.key.required=\u8BF7\u4F20\u5165KEY
+assert.business.config.param.not.exist=\u8BE5\u914D\u7F6E\u53C2\u6570\u4E0D\u5B58\u5728\uFF01
+assert.business.email.param.missing.check=\u90AE\u7BB1\u53C2\u6570\u7F3A\u5931\uFF0C\u8BF7\u68C0\u67E5\uFF01
+assert.business.step4.executed.cannot.change.locker=\u60A8\u5DF2\u6267\u884C\u5B8C\u7B2C4\u6B65\uFF0C\u65E0\u6CD5\u66F4\u6362\u4E0A\u9501\u4EBA\uFF01
+assert.business.card.no.required=\u8BF7\u8F93\u5165\u5361\u53F7!
+assert.business.card.not.exist=\u5361\u4E0D\u5B58\u5728!
+assert.business.no.associated.user=\u6CA1\u6709\u5173\u8054\u7528\u6237!
+assert.business.please.login.first=\u8BF7\u5148\u767B\u5F55!
+assert.business.user.not.exist=\u7528\u6237\u4E0D\u5B58\u5728!
+assert.business.user.not.bound.card=\u7528\u6237\u672A\u7ED1\u5B9A\u5361!
+assert.business.card.invalid=\u8BE5\u5361\u65E0\u6548!
+assert.business.current.user.info.not.exist=\u5F53\u524D\u7528\u6237\u4FE1\u606F\u4E0D\u5B58\u5728!
+assert.business.data.not.exist=\u6570\u636E\u4E0D\u5B58\u5728!
+assert.business.current.task.param.missing=\u5F53\u524D\u4EFB\u52A1\u7F3A\u5931\u53C2\u6570
+assert.business.task.not.exist=\u8BE5\u4EFB\u52A1\u4E0D\u5B58\u5728
+assert.business.template.code.not.null=templateCode\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.type.not.null=TYPE\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.business.cabinet.code.not.exist=\u7269\u8D44\u67DCCODE\u4E0D\u5B58\u5728
+assert.business.recipient.not.exist=\u63A5\u6536\u4EBA\u4E0D\u5B58\u5728!
+assert.business.key.info.not.null=\u94A5\u5319\u4FE1\u606F\u4E0D\u53EF\u4E3A\u7A7A!
+assert.business.no.corresponding.accessory.info=\u65E0\u5BF9\u5E94\u7684\u8F85\u4EF6\u4FE1\u606F!
+
+assert.business.please.select.personnel.info=\u8BF7\u9009\u62E9\u4EBA\u5458\u4FE1\u606F\uFF01
+assert.business.please.configure.person.post.first=\u8BF7\u5148\u7ED9\u8BE5\u4EBA\u5458\u914D\u7F6E\u5C97\u4F4D\u4FE1\u606F\uFF01
+assert.business.step.id.not.null=\u6B65\u9AA4ID\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.status.not.null=\u72B6\u6001\u4E0D\u53EF\u4E3A\u7A7A\uFF01
+assert.business.please.execute.previous.step.first=\u8BF7\u5148\u6267\u884C\u4E0A\u4E00\u6B65\uFF01
+assert.business.please.set.locker.first=\u8BF7\u5148\u8BBE\u5B9A\u4E0A\u9501\u4EBA\uFF01
+assert.business.at.least.one.co.locker.required=\u8BF7\u81F3\u5C11\u8BBE\u5B9A\u4E00\u4E2A\u5171\u9501\u4EBA\uFF01
+assert.business.work.permit.step.lost.check.data=\u8BE5\u4F5C\u4E1A\u7968\u6B65\u9AA4\u5DF2\u4E22\u5931\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\uFF01
+assert.business.input.fingerprint.not.null=\u8F93\u5165\u7684\u6307\u7EB9\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+assert.business.no.fingerprint.in.database=\u6307\u7EB9\u5E93\u4E2D\u6682\u65E0\u60A8\u7684\u6307\u7EB9\u4FE1\u606F\uFF01

+ 339 - 1
ktg-admin/src/main/resources/i18n/messages_en_US.properties

@@ -1,5 +1,343 @@
+#test
+no.exit.key=The key information does not exist
+
 #\u9519\u8BEF\u6D88\u606F
+not.null=* Required
+user.jcaptcha.error=Verification code error
+user.jcaptcha.expire=Verification code has expired
+user.not.exists=User does not exist/Incorrect password
+user.password.not.match=User does not exist/Incorrect password
+user.password.retry.limit.count=Incorrect password entered {0} times
+user.password.retry.limit.exceed=Incorrect password entered {0} times, account locked for 10 minutes
+user.password.delete=Sorry, your account has been deleted
+user.blocked=User has been blocked, please contact the administrator
+role.blocked=Role has been blocked, please contact the administrator
+user.logout.success=Logout successful
 
+length.not.valid=Length must be between {min} and {max} characters
 
+user.username.not.valid=* Composed of 2-20 Chinese characters, letters, numbers or underscores, and must start with a non-digit
+user.password.not.valid=* 5-50 characters
 
-no.exit.key=The key information does not exist
+user.email.not.valid=Invalid email format
+user.mobile.phone.number.not.valid=Invalid mobile phone number format
+user.login.success=Login successful
+user.register.success=Registration successful
+user.notfound=Please log in again
+user.forcelogout=Forced logout by administrator, please log in again
+user.unknown.error=Unknown error, please log in again
+
+##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F
+upload.exceed.maxSize=The size of the uploaded file exceeds the limit!<br/>The maximum allowed file size is: {0}MB!
+upload.filename.exceed.length=The maximum length of the uploaded file name is {0} characters
+
+##\u6743\u9650
+no.permission=You do not have permission to access the data, please contact the administrator to add permission [{0}]
+no.create.permission=You do not have permission to create data, please contact the administrator to add permission [{0}]
+no.update.permission=You do not have permission to modify data, please contact the administrator to add permission [{0}]
+no.delete.permission=You do not have permission to delete data, please contact the administrator to add permission [{0}]
+no.export.permission=You do not have permission to export data, please contact the administrator to add permission [{0}]
+no.view.permission=You do not have permission to view data, please contact the administrator to add permission [{0}]
+
+
+##\u56DB\u3001\u5168\u5C40\u5F02\u5E38\u5904\u7406\u5668
+exception.auth.no.permission=No permission, please contact the administrator for authorization
+exception.demo.mode.not.allow=Demo mode, operation not allowed
+
+##\u4E94\u3001AjaxResult \u9ED8\u8BA4\u6D88\u606F
+ajax.result.success=Operation successful
+ajax.result.error=Operation failed
+
+##\u516D\u3001Controller \u7528\u6237\u7BA1\u7406\u76F8\u5173\u63D0\u793A
+user.add.fail.login.account.exist=Failed to add user '{0}', login account already exists
+user.add.fail.phone.exist=Failed to add user '{0}', mobile phone number already exists
+user.add.fail.email.exist=Failed to add user '{0}', email account already exists
+user.update.fail.phone.exist=Failed to update user '{0}', mobile phone number already exists
+user.update.fail.email.exist=Failed to update user '{0}', email account already exists
+user.update.user.detail.exception=Error updating personal information. Please contact the administrator.
+
+
+##\u4E03\u3001Service \u5F02\u5E38\u63D0\u793A
+##\u7528\u6237\u670D\u52A1
+user.service.import.data.not.null=Imported user data cannot be empty!
+user.service.operate.super.admin.not.allow=Operation on super administrator user is not allowed
+user.service.access.data.no.permission=No permission to access user data!
+##\u5C97\u4F4D\u670D\u52A1
+post.service.delete.assigned.not.allow={0} has been assigned and cannot be deleted
+##\u89D2\u8272\u670D\u52A1
+role.service.operate.super.admin.not.allow=Operation on super administrator role is not allowed
+role.service.access.data.no.permission=No permission to access role data!
+role.service.delete.assigned.not.allow={0} has been assigned and cannot be deleted
+##\u914D\u7F6E\u670D\u52A1
+config.service.built.in.param.delete.not.allow=Built-in parameter [{0}] cannot be deleted
+##\u5B57\u5178\u7C7B\u578B\u670D\u52A1
+dict.type.service.delete.assigned.not.allow={0} has been assigned and cannot be deleted
+##\u90E8\u95E8\u670D\u52A1
+dept.service.access.data.no.permission=No permission to access department data!
+dept.service.add.disabled.not.allow=Department is disabled, new additions are not allowed
+##\u4EE3\u7801\u751F\u6210\u670D\u52A1
+code.gen.service.import.fail=Import failed: {0}
+code.gen.service.render.template.fail=Template rendering failed, table name: {0}
+code.gen.service.sync.data.fail.table.not.exist=Data synchronization failed, original table structure does not exist
+code.gen.service.tree.code.field.not.null=Tree code field cannot be empty
+code.gen.service.tree.parent.code.field.not.null=Tree parent code field cannot be empty
+code.gen.service.tree.name.field.not.null=Tree name field cannot be empty
+code.gen.service.sub.table.name.not.null=The table name of the associated sub-table cannot be empty
+code.gen.service.sub.table.fk.name.not.null=The foreign key name associated with the sub-table cannot be empty
+##\u7528\u6237\u8BE6\u60C5\u670D\u52A1
+user.detail.service.login.user.not.exist=Logged-in user: {0} does not exist
+user.detail.service.account.deleted=Sorry, your account: {0} has been deleted
+user.detail.service.account.disabled=Sorry, your account: {0} has been disabled
+user.detail.service.account.blacklisted=Sorry, your account: {0} has been added to the blacklist of the {1} module and cannot log in temporarily!
+user.detail.service.account.lack.role.permission=Sorry, your account: {0} lacks role permissions and cannot log in temporarily. Please go to role or basic data configuration!
+##\u79FB\u52A8\u7AEF\u767B\u5F55\u670D\u52A1
+mobile.login.service.sys.config.register.role.code.not.config=Please maintain the registered user role code [register_role_code] in the data dictionary [sys_config]
+mobile.login.service.sys.config.register.dept.code.not.config=Please maintain the registered user department code [register_dept_code] in the data dictionary [sys_config]
+mobile.login.service.sys.config.register.post.code.not.config=Please maintain the registered user post code [register_post_code] in the data dictionary [sys_config]
+##\u9650\u6D41\u670D\u52A1
+limit.service.access.too.frequent=Access is too frequent, please try again later
+##\u5B89\u5168\u5DE5\u5177
+security.util.get.user.id.error=Exception when obtaining user ID
+security.util.get.dept.id.error=Exception when obtaining department ID
+security.util.get.user.account.error=Exception when obtaining user account
+security.util.get.user.info.error=Exception when obtaining user information
+##\u516B\u3001CommonResult \u6210\u529F\u6D88\u606F
+common.result.success.device.info=Device information: {0}
+common.result.success.import.data=Import successful, a total of {0} data records imported
+##\u4E5D\u3001Assert \u53C2\u6570\u6821\u9A8C\u63D0\u793A
+##\u901A\u7528\u63D0\u793A
+assert.common.delete.select.data=Please select the data to be deleted!
+assert.common.param.id.not.null=ID cannot be empty!
+assert.common.param.primary.key.id.not.null=Primary key ID cannot be empty!
+assert.common.param.invalid=Invalid parameter!
+##\u4F5C\u4E1A\u7968\u76F8\u5173
+assert.work.order.info.not.exist=Work order information does not exist!
+assert.work.order.data.lost=Work order data is lost!
+assert.work.order.id.not.null=Work order ID cannot be empty!
+assert.work.order.current.id.not.null=Current work order ID cannot be empty!
+assert.work.order.step.six.cannot.cancel=This work order has been executed to the sixth step and cannot be canceled!
+assert.work.order.wait.lock.complete=Please wait for the locking of work order [{0}] to complete!
+assert.work.order.specify=Please specify which work order!
+assert.work.order.job.id.not.null=Job ID cannot be empty!
+assert.work.order.device.taken.cannot.operate=The equipment for the work order has been taken, operation not allowed!
+assert.work.order.not.started.cannot.co.lock=This work order has not started, do not co-lock!
+assert.work.order.already.co.locked.cannot.repeat=You have already co-locked, do not repeat co-locking!
+assert.work.order.not.co.locked.cannot.unlock=You have not co-locked yet, do not unlock!
+assert.work.order.already.unlocked.cannot.repeat=You have already unlocked, do not repeat unlocking!
+assert.work.order.code.not.null=Work order number cannot be empty!
+assert.work.order.name.not.null=Work order name cannot be empty!
+assert.work.order.select.isolation.point=Please select an isolation point!
+assert.work.order.person.info.not.null=Personnel information cannot be empty!
+assert.work.order.point.info.not.null=Point information cannot be empty!
+##\u94A5\u5319\u76F8\u5173
+assert.key.data.lost=Key data is lost!
+assert.key.nfc.no.corresponding.info=This NFC has no corresponding key information
+assert.key.specify.nfc=Please specify the NFC of the key!
+assert.key.nfc.not.null=Key NFC cannot be empty!
+assert.key.nfc.corresponding.info.not.exist={0} corresponding key information does not exist!
+##\u6302\u9501\u76F8\u5173
+assert.lock.data.lost=Padlock data is lost!
+assert.lock.nfc.no.corresponding.info=This NFC has no corresponding padlock information!
+assert.lock.nfc.not.null=The padlock's NFC cannot be empty!
+assert.lock.nfc.corresponding.data.not.exist={0} corresponding padlock data does not exist!
+assert.lock.nfc.missing=Padlock NFC is missing!
+assert.lock.specify.nfc=Please specify the NFC of the padlock!
+assert.lock.name.already.taken={0} has been taken out!
+assert.lock.point.error.duplicate=Point padlock error, duplicate point [{0}]. Please use multiple locks to complete the locking of duplicate points!
+assert.lock.take.at.least.one=Please take out at least one padlock!
+##\u786C\u4EF6\u76F8\u5173
+assert.hardware.serial.no.corresponding.info=This serial number has no corresponding hardware information!
+assert.hardware.lock.no.init.data.for.update=No initialization data available for updating this padlock
+assert.hardware.accessory.no.init.data.for.update=No initialization data available for updating this accessory
+assert.hardware.code.not.null=Hardware code cannot be empty!
+assert.hardware.name.not.null=Hardware name cannot be empty!
+assert.hardware.code.already.used={0} is already in use!
+assert.hardware.specify.return.location=Please specify where to return it!
+assert.hardware.specify.return.cabinet=Please specify which cabinet to return it to!
+##\u9694\u79BB\u70B9\u76F8\u5173
+assert.isolation.point.nfc.no.corresponding.info=This NFC has no corresponding isolation point information
+assert.isolation.point.name.used.by.sop.cannot.delete=Point {0} is being used by SOP and cannot be deleted!
+assert.isolation.point.used.by.loto.cannot.delete={0} is being used by the {1} lockout station. Please unbind it from the lockout station first!
+assert.isolation.point.name.not.null=Isolation point name cannot be empty!
+assert.isolation.point.code.name.not.null=Isolation point code name cannot be empty!
+assert.isolation.point.id.not.null=Isolation point ID cannot be empty!
+assert.isolation.point.name.already.used=This isolation point name is already in use!
+assert.isolation.point.nfc.already.used=This NFC is already in use!
+assert.isolation.point.code.already.used=This code is already in use!
+assert.isolation.point.serial.no.already.used=This serial number is already in use!
+assert.isolation.point.query.error=Error querying isolation point information!
+##\u8F85\u4EF6\u76F8\u5173
+assert.accessory.nfc.no.corresponding.info=This NFC has no corresponding accessory information
+assert.accessory.nfc.missing=Accessory NFC is missing!
+assert.accessory.take.at.least.one=Please take out at least one accessory!
+##\u5C97\u4F4D\u76F8\u5173
+assert.post.info.not.exist=Post information does not exist!
+assert.post.name.not.null=Post name cannot be empty!
+assert.post.name.already.used=This post name is already in use!
+assert.post.id.not.null=Post ID cannot be empty!
+assert.post.not.null=Post cannot be empty!
+assert.post.used.by.user.cannot.delete=The post is being used by users and cannot be deleted!
+assert.post.has.children.cannot.delete=The post has sub-posts and cannot be deleted!
+##SOP \u76F8\u5173
+assert.sop.data.not.exist=SOP data does not exist!
+assert.sop.id.not.null=sopId cannot be empty!
+assert.sop.name.not.null=SOP name cannot be empty!
+assert.sop.code.name.not.null=SOP code name cannot be empty!
+assert.sop.code.already.used=This SOP code is already in use!
+assert.sop.sort.data.not.null=Sorting data cannot be empty!
+##\u8BBE\u5907\u5DE5\u827A\u76F8\u5173
+assert.machinery.process.info.not.exist=Equipment process information does not exist!
+assert.machinery.process.name.not.null=Name cannot be empty!
+assert.machinery.process.parent.id.not.null=Parent ID cannot be empty!
+assert.machinery.process.name.already.used=[{0}] name is already used by a process/equipment, please re-enter!
+assert.machinery.process.select.isolation.point=Please select an isolation point!
+##\u5DE5\u4F5C\u533A\u57DF\u76F8\u5173
+assert.work.area.name.not.null=Work area name cannot be empty!
+assert.work.area.code.name.not.null=Work area code name cannot be empty!
+assert.work.area.id.not.null=Work area ID cannot be empty!
+assert.work.area.code.already.used=This work area code is already in use!
+assert.work.area.has.isolation.point.cannot.delete={0} has isolation points and cannot be deleted temporarily!
+assert.work.area.pass.id=Please pass the work area ID
+##\u9501\u63A7\u67DC / \u7269\u8D44\u67DC\u76F8\u5173
+assert.cabinet.lock.id.not.null=Lock cabinet ID cannot be empty!
+assert.cabinet.material.code.not.null=Material cabinet code cannot be empty!
+assert.cabinet.material.info.not.exist=Material cabinet information does not exist!
+assert.cabinet.material.code.identity.unrecognized=Unable to recognize the identity of the {0} material cabinet!
+assert.cabinet.not.exist=Cabinet does not exist!
+assert.cabinet.material.specify=Please specify which material cabinet this is!
+assert.cabinet.code.not.null=cabinetCode cannot be empty!
+assert.cabinet.material.no.inspection.plan=There is currently no inspection plan for you for this material cabinet!
+assert.cabinet.material.no.executable.inspection.plan=There is no inspection plan for you to execute for the current material cabinet!
+assert.cabinet.clear.position.info.first=Please clear the position information under the cabinet first!
+assert.cabinet.code.already.used=This code is already in use, please replace it!
+assert.cabinet.name.already.used=This name is already in use, please replace it!
+assert.cabinet.electric.id.not.null=Electrical cabinet ID cannot be empty!
+assert.cabinet.electric.pass.id=Please pass the electrical cabinet ID
+assert.cabinet.name.not.null=Name cannot be empty!
+assert.cabinet.name.already.used.retry=This name is already in use, please re-enter!
+##\u7269\u8D44\u76F8\u5173
+assert.material.rfid.not.null=Material RFID cannot be empty!
+assert.material.rfid.not.found=No material found via RFID: {0}!
+assert.material.cabinet.code.not.found=No material cabinet information found via material cabinet code: {0}!
+assert.material.put.new.in.cabinet=Please put new materials in this cabinet!
+assert.material.original.not.exist=Original material does not exist
+assert.material.new.not.exist=New material does not exist
+assert.material.code.already.used=This material code is already in use!
+assert.material.rfid.already.used=This RFID is already in use!
+assert.material.not.exist=This material does not exist!
+assert.material.specify.rfid=Please specify the material's RFID!
+assert.material.specify.borrow.or.return=Please specify whether to borrow or return!
+assert.material.rfid.already.borrowed={0} material is already in borrowed status and cannot be borrowed again!
+assert.material.rfid.already.in.cabinet={0} material is already in the cabinet and cannot be put in again!
+assert.material.cabinet.info.not.null=Material cabinet information cannot be empty!
+assert.material.select=Please select materials
+assert.material.old.id.not.null=Old material ID cannot be empty!
+assert.material.new.rfid.not.null=New material RFID cannot be empty!
+assert.material.to.replace.not.taken=The material to be replaced has not been taken out!
+assert.material.has.cabinet.cannot.replace=This material has an associated cabinet and cannot be replaced!
+assert.material.replace.abnormal=The material to be replaced is abnormal and cannot be replaced!
+assert.material.no.maintain.or.replace=No materials to be maintained or replaced have been confirmed!
+assert.material.import.data.not.null=Imported material data cannot be empty!
+##\u7269\u8D44\u5206\u7C7B\u76F8\u5173
+assert.material.category.has.materials.cannot.delete={0} category has materials and cannot be deleted!
+assert.material.category.has.children.cannot.delete={0} category has subcategories and cannot be deleted!
+assert.material.category.code.already.used=This material category code is already in use!
+assert.material.category.borrow.duration.gte.reminder=The borrowing duration must be greater than or equal to the reminder duration!
+##\u7535\u673A\u76F8\u5173
+assert.motor.data.not.exist=This motor data does not exist!
+assert.motor.map.primary.key.not.null=Map primary key cannot be empty
+##\u5730\u56FE\u76F8\u5173
+assert.map.data.parse.fail=Map data parsing failed!
+assert.map.provide.loto.cabinet.serial.no=Please provide the LOTO cabinet serial number!
+##\u68C0\u67E5\u8BA1\u5212\u76F8\u5173
+assert.inspection.plan.configure.template=Please configure the material inspection plan template in the basic data!
+assert.inspection.plan.id.not.null=Inspection plan planId cannot be empty!
+##\u6307\u7EB9\u76F8\u5173
+assert.fingerprint.specify.user=Please specify which user's fingerprint this is!
+assert.fingerprint.group.not.null=Fingerprint group cannot be empty!
+assert.fingerprint.entry.limit.reached=The fingerprint entry limit for this person has been reached, maximum {0} entries!
+assert.fingerprint.unrecognizable.retry=This file fingerprint is unrecognizable, please re-enter!
+assert.fingerprint.similarity.low.retry=The fingerprint similarity is too low, please re-enter!
+assert.fingerprint.info.not.null=Fingerprint information cannot be empty!
+##\u4EBA\u8138\u76F8\u5173
+assert.face.specify.user=Please specify which user's face this is!
+assert.face.entry.limit.reached=The face entry limit for this person has been reached, maximum {0} entries!
+assert.face.file.parse.fail=Face file parsing failed!
+assert.face.upload.file=Please upload a face file!
+assert.face.get.fail=Failed to obtain face!
+assert.face.get.feature.fail=Failed to obtain face feature value!
+assert.face.not.recognized=No face recognized!
+assert.face.comparison.error=Face comparison error {0}!
+assert.face.info.not.null=Face information cannot be empty!
+##\u767B\u5F55\u76F8\u5173
+assert.login.fingerprint.identity.unknown=Unable to confirm your identity via fingerprint, please log in through other methods!
+assert.login.face.identity.unknown=Unable to confirm your identity via face recognition, please log in through other methods!
+##\u7F16\u7801\u89C4\u5219\u76F8\u5173
+assert.code.rule.input.char.not.null=The input character for the coding rule cannot be empty!
+assert.code.rule.type.not.found=Business coding generation rule for the specified type: [{0}] not found
+assert.code.rule.result.record.not.found=Result record corresponding to rule {[]} not found
+assert.code.rule.input.char.length.error=Incorrect length of input character!
+assert.code.rule.serial.number.component.unique=There can only be one serial number component in the coding rule [{0}]
+assert.code.rule.generated.code.empty=The code generated by rule: [{0}] is empty!
+assert.code.rule.generated.code.exceed.max.length=The generated code [{0}] exceeds the maximum length configured in the rule: [{1}]
+##\u4E1A\u52A1\u7F16\u7801\u76F8\u5173
+assert.business.code.max.length.less.than.sum=The maximum length {0} is less than the sum of segment lengths {1}, please expand the maximum length!
+##\u6587\u4EF6\u4E0A\u4F20\u76F8\u5173
+assert.file.upload.param.invalid=Invalid parameter!
+##\u7EDF\u8BA1\u76F8\u5173
+assert.statistics.type.not.null=Type cannot be empty!
+##\u7528\u6237\u76F8\u5173
+assert.user.data.duplicate.name.modify=Duplicate user names exist in the user data, please modify!
+assert.user.not.exist.in.system=This user does not exist in the system!
+assert.user.work.card.not.bound=This work card is not bound to a user!
+assert.user.employee.card.no.work.task=The employee bound to this employee card has no work tasks temporarily!
+assert.user.operate.co.lock.status.not.null=The co-lock/unlock status of the operation cannot be empty!
+assert.user.work.card.nfc.not.null=Work card NFC cannot be empty!
+##\u5B57\u5178\u6570\u636E\u76F8\u5173
+assert.dict.data.key.value.exist=The key value: {0} already exists under this dictionary type, please re-enter!
+##\u5176\u4ED6\u4E1A\u52A1\u903B\u8F91
+assert.business.no.data.received=No data received!
+assert.business.specify.isolation.point.info=Please provide isolation point information!
+assert.business.specify.lock.or.unlock=Please specify whether to lock or unlock!
+assert.business.specify.task.status=Please specify the current status of the task!
+assert.business.point.switch.data.not.null=Point switch data cannot be empty!
+assert.business.loto.serial.no.not.null=Lockout station serial number cannot be empty!
+assert.business.point.serial.no.not.null=Point serial number cannot be empty!
+assert.business.nfc.no.lock.info.found=No relevant padlock information found via NFC!
+assert.business.multiple.faces.recognized.adjust=Multiple faces recognized, please readjust the position!
+
+
+assert.business.task.name.not.null=Task name cannot be empty!
+assert.business.key.required=Please pass the key
+assert.business.config.param.not.exist=This configuration parameter does not exist!
+assert.business.email.param.missing.check=Email parameter is missing, please check!
+assert.business.step4.executed.cannot.change.locker=You have completed Step 4 and cannot change the locker!
+assert.business.card.no.required=Please enter the card number!
+assert.business.card.not.exist=The card does not exist!
+assert.business.no.associated.user=No associated user!
+assert.business.please.login.first=Please log in first!
+assert.business.user.not.exist=The user does not exist!
+assert.business.user.not.bound.card=The user has not bound a card!
+assert.business.card.invalid=This card is invalid!
+assert.business.current.user.info.not.exist=Current user information does not exist!
+assert.business.data.not.exist=The data does not exist!
+assert.business.current.task.param.missing=Current task is missing parameters
+assert.business.task.not.exist=This task does not exist
+assert.business.template.code.not.null=templateCode cannot be empty!
+assert.business.type.not.null=type cannot be empty!
+assert.business.cabinet.code.not.exist=Material cabinet code does not exist
+assert.business.recipient.not.exist=The recipient does not exist!
+assert.business.key.info.not.null=Key information cannot be empty!
+assert.business.no.corresponding.accessory.info=No corresponding accessory information!
+
+
+assert.business.please.select.personnel.info=Please select personnel information!
+assert.business.please.configure.person.post.first=Please configure post information for this personnel first!
+assert.business.step.id.not.null=Step ID cannot be empty!
+assert.business.status.not.null=Status cannot be empty!
+assert.business.please.execute.previous.step.first=Please execute the previous step first!
+assert.business.please.set.locker.first=Please set the locker first!
+assert.business.at.least.one.co.locker.required=Please set at least one co-locker!
+assert.business.work.permit.step.lost.check.data=This work permit step has been lost, please check the data!
+assert.business.input.fingerprint.not.null=The input fingerprint cannot be empty!
+assert.business.no.fingerprint.in.database=There is no your fingerprint information in the fingerprint database!

+ 18 - 15
ktg-common/src/main/java/com/ktg/common/core/domain/AjaxResult.java

@@ -1,12 +1,14 @@
 package com.ktg.common.core.domain;
 
-import java.util.HashMap;
 import com.ktg.common.constant.HttpStatus;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 
+import java.util.HashMap;
+
 /**
  * 操作消息提醒
- * 
+ *
  * @author ruoyi
  */
 public class AjaxResult extends HashMap<String, Object>
@@ -31,7 +33,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 初始化一个新创建的 AjaxResult 对象
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      */
@@ -43,7 +45,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 初始化一个新创建的 AjaxResult 对象
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      * @param data 数据对象
@@ -60,27 +62,28 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回成功消息
-     * 
+     *
      * @return 成功消息
      */
     public static AjaxResult success()
     {
-        return AjaxResult.success("操作成功");
+        return AjaxResult.success("" +
+                MessageUtils.message("ajax.result.success"));
     }
 
     /**
      * 返回成功数据
-     * 
+     *
      * @return 成功消息
      */
     public static AjaxResult success(Object data)
     {
-        return AjaxResult.success("操作成功", data);
+        return AjaxResult.success(MessageUtils.message("ajax.result.success"), data);
     }
 
     /**
      * 返回成功消息
-     * 
+     *
      * @param msg 返回内容
      * @return 成功消息
      */
@@ -91,7 +94,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回成功消息
-     * 
+     *
      * @param msg 返回内容
      * @param data 数据对象
      * @return 成功消息
@@ -103,17 +106,17 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @return
      */
     public static AjaxResult error()
     {
-        return AjaxResult.error("操作失败");
+        return AjaxResult.error(MessageUtils.message("ajax.result.error"));
     }
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param msg 返回内容
      * @return 警告消息
      */
@@ -124,7 +127,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param msg 返回内容
      * @param data 数据对象
      * @return 警告消息
@@ -136,7 +139,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      * @return 警告消息

+ 7 - 7
ktg-common/src/main/java/com/ktg/common/utils/SecurityUtils.java

@@ -9,7 +9,7 @@ import com.ktg.common.exception.ServiceException;
 
 /**
  * 安全服务工具类
- * 
+ *
  * @author ruoyi
  */
 public class SecurityUtils
@@ -25,7 +25,7 @@ public class SecurityUtils
         }
         catch (Exception e)
         {
-            throw new ServiceException("获取用户ID异常", HttpStatus.UNAUTHORIZED);
+            throw new ServiceException(MessageUtils.message("security.util.get.user.id.error"), HttpStatus.UNAUTHORIZED);
         }
     }
 
@@ -40,10 +40,10 @@ public class SecurityUtils
         }
         catch (Exception e)
         {
-            throw new ServiceException("获取部门ID异常", HttpStatus.UNAUTHORIZED);
+            throw new ServiceException(MessageUtils.message("security.util.get.dept.id.error"), HttpStatus.UNAUTHORIZED);
         }
     }
-    
+
     /**
      * 获取用户账户
      **/
@@ -55,7 +55,7 @@ public class SecurityUtils
         }
         catch (Exception e)
         {
-            throw new ServiceException("获取用户账户异常", HttpStatus.UNAUTHORIZED);
+            throw new ServiceException(MessageUtils.message("security.util.get.user.account.error"), HttpStatus.UNAUTHORIZED);
         }
     }
 
@@ -70,7 +70,7 @@ public class SecurityUtils
         }
         catch (Exception e)
         {
-            throw new ServiceException("获取用户信息异常", HttpStatus.UNAUTHORIZED);
+            throw new ServiceException(MessageUtils.message("security.util.get.user.info.error"), HttpStatus.UNAUTHORIZED);
         }
     }
 
@@ -109,7 +109,7 @@ public class SecurityUtils
 
     /**
      * 是否为管理员
-     * 
+     *
      * @param userId 用户ID
      * @return 结果
      */

+ 8 - 7
ktg-common/src/main/java/com/ktg/common/utils/face/ArcSoftMothodUtil.java

@@ -11,6 +11,7 @@ import com.arcsoft.face.toolkit.ImageInfo;
 import com.google.common.collect.Lists;
 import com.ktg.common.config.RuoYiConfig;
 import com.ktg.common.utils.FileDriveLetterUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.vo.FaceCutVO;
 import com.ktg.common.vo.FaceMatchVO;
@@ -116,7 +117,7 @@ public class ArcSoftMothodUtil {
         int errorCode;
         String prodApi = RuoYiConfig.getProd();
         // 1.判断这个文件是否有效
-        Assert.isFalse(file.isEmpty(), "请上传人脸文件!");
+        Assert.isFalse(file.isEmpty(), MessageUtils.message("assert.face.upload.file"));
         // 2.-----------------开始存储上传的照片--------------------
         // 人脸存储基础路径
         String profile = RuoYiConfig.getProfile();
@@ -163,11 +164,11 @@ public class ArcSoftMothodUtil {
         } catch (Exception e) {
             // 如果解析失败 直接删除人脸文件
             new File(imagePath).delete();
-            Assert.isTrue(false, "人脸文件无法解析!");
+            Assert.isTrue(false, MessageUtils.message("assert.face.file.parse.fail"));
         }
         List<FaceInfo> faceInfoList = new ArrayList<>();
         errorCode = faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList);
-        Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), "获取人脸失败!");
+        Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), MessageUtils.message("assert.face.get.fail"));
 
         //特征提取
         FaceFeature faceFeature = new FaceFeature();
@@ -175,7 +176,7 @@ public class ArcSoftMothodUtil {
         // errorCode = faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature);
         // 离线激活4.1 / 4.2
         errorCode = faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), ExtractType.RECOGNIZE, 0, faceFeature);
-        Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), "获取人脸特征值失败!");
+        Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), MessageUtils.message("assert.face.get.feature.fail"));
         byte[] featureData = faceFeature.getFeatureData();
         // 4------------------------返回解析的数据---------------------
         FaceCutVO faceCutVO = new FaceCutVO();
@@ -218,7 +219,7 @@ public class ArcSoftMothodUtil {
             ImageInfo imageInfo = getRGBData(new File(fileName));
             List<FaceInfo> faceInfoList = new ArrayList<>();
             errorCode = faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList);
-            Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), "未识别到人脸!");
+            Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), MessageUtils.message("assert.face.not.recognized"));
             System.out.println("人脸检测完成---------");
             //特征提取
             FaceFeature faceFeature = new FaceFeature();
@@ -226,7 +227,7 @@ public class ArcSoftMothodUtil {
             // errorCode = faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature);
             // 离线激活
             errorCode = faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), ExtractType.RECOGNIZE, 0, faceFeature);
-            Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), "获取人脸特征值失败!");
+            Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), MessageUtils.message("assert.face.get.feature.fail"));
             byte[] featureData = faceFeature.getFeatureData();
             System.out.println("特征提取完成---------");
             // 转成list
@@ -304,7 +305,7 @@ public class ArcSoftMothodUtil {
                     //特征比对
                     sourceFaceFeature.setFeatureData(matchData);
                     int errorCode = faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar);
-                    Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), "人脸对比异常" + errorCode + "!");
+                    Assert.isFalse(errorCode != ErrorInfo.MOK.getValue(), MessageUtils.message("assert.face.comparison.error", errorCode));
                     // 相似度
                     float score = faceSimilar.getScore();
                     if (score > high) {

+ 2 - 1
ktg-common/src/main/java/com/ktg/common/utils/face/FaceCutUtil.java

@@ -3,6 +3,7 @@ package com.ktg.common.utils.face;
 import cn.hutool.core.lang.Assert;
 import com.ktg.common.config.RuoYiConfig;
 import com.ktg.common.utils.FileDriveLetterUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.vo.FaceCutVO;
 import org.opencv.core.*;
@@ -101,7 +102,7 @@ public class FaceCutUtil
         // 匹配Rect矩阵
         Rect[] rects = face.toArray();
         System.out.println("识别人脸个数: " + rects.length);
-        Assert.isFalse(rects.length > 1, "识别到多张人脸,请重新调整位置!");
+        Assert.isFalse(rects.length > 1, MessageUtils.message("assert.business.multiple.faces.recognized.adjust"));
 
         // 识别图片中的所有人脸并分别保存
         // int i = 1;

+ 2 - 1
ktg-common/src/main/java/com/ktg/common/utils/face/FaceCutUtil1.java

@@ -3,6 +3,7 @@ package com.ktg.common.utils.face;
 import cn.hutool.core.lang.Assert;
 import com.ktg.common.config.RuoYiConfig;
 import com.ktg.common.utils.FileDriveLetterUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.vo.FaceCutVO;
 import org.opencv.core.*;
@@ -101,7 +102,7 @@ public class FaceCutUtil1
         // 匹配Rect矩阵
         Rect[] rects = face.toArray();
         System.out.println("识别人脸个数: " + rects.length);
-        Assert.isFalse(rects.length > 1, "识别到多张人脸,请重新调整位置!");
+        Assert.isFalse(rects.length > 1, MessageUtils.message("assert.business.multiple.faces.recognized.adjust"));
 
         // 识别图片中的所有人脸并分别保存
         // int i = 1;

+ 2 - 1
ktg-framework/src/main/java/com/ktg/framework/aspectj/MarsDataScopeAspect.java

@@ -6,6 +6,7 @@ import com.ktg.common.core.domain.BaseEntity;
 import com.ktg.common.core.domain.entity.SysRole;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.domain.model.LoginUser;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.service.ISysUserService;
@@ -105,7 +106,7 @@ public class MarsDataScopeAspect {
                 sqlString.append(StringUtils.format(" OR {}.workstation_id IN ( SELECT workstation_id FROM is_user_workstation WHERE user_id = {} )", workstationAlias, user.getUserId()));
             } else if (MARS_DATA_SCOPE_WORKSTATION_AND_CHILD.equals(marsDataScope)) {
                // 4.自身部门及以下数据权限
-                Assert.isFalse(allChildWorkstationByUserIds.isEmpty(), "请先给该人员配置岗位信息!");
+                Assert.isFalse(allChildWorkstationByUserIds.isEmpty(), MessageUtils.message("assert.business.please.configure.person.post.first"));
                 String result = allChildWorkstationByUserIds.stream()
                         .map(String::valueOf)
                         .collect(Collectors.joining(","));

+ 12 - 10
ktg-framework/src/main/java/com/ktg/framework/aspectj/RateLimiterAspect.java

@@ -1,8 +1,12 @@
 package com.ktg.framework.aspectj;
 
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
+import com.ktg.common.annotation.RateLimiter;
+import com.ktg.common.enums.LimitType;
+import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
+import com.ktg.common.utils.ServletUtils;
+import com.ktg.common.utils.StringUtils;
+import com.ktg.common.utils.ip.IpUtils;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
@@ -13,12 +17,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.script.RedisScript;
 import org.springframework.stereotype.Component;
-import com.ktg.common.annotation.RateLimiter;
-import com.ktg.common.enums.LimitType;
-import com.ktg.common.exception.ServiceException;
-import com.ktg.common.utils.ServletUtils;
-import com.ktg.common.utils.StringUtils;
-import com.ktg.common.utils.ip.IpUtils;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * 限流处理
@@ -61,7 +63,7 @@ public class RateLimiterAspect
             Long number = redisTemplate.execute(limitScript, keys, count, time);
             if (StringUtils.isNull(number) || number.intValue() > count)
             {
-                throw new ServiceException("访问过于频繁,请稍候再试");
+                throw new ServiceException(MessageUtils.message("limit.service.access.too.frequent"));
             }
             log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), key);
         }

+ 10 - 8
ktg-framework/src/main/java/com/ktg/framework/web/exception/GlobalExceptionHandler.java

@@ -1,6 +1,11 @@
 package com.ktg.framework.web.exception;
 
-import javax.servlet.http.HttpServletRequest;
+import com.ktg.common.constant.HttpStatus;
+import com.ktg.common.core.domain.AjaxResult;
+import com.ktg.common.exception.DemoModeException;
+import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
+import com.ktg.common.utils.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.access.AccessDeniedException;
@@ -9,11 +14,8 @@ import org.springframework.web.HttpRequestMethodNotSupportedException;
 import org.springframework.web.bind.MethodArgumentNotValidException;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 import org.springframework.web.bind.annotation.RestControllerAdvice;
-import com.ktg.common.constant.HttpStatus;
-import com.ktg.common.core.domain.AjaxResult;
-import com.ktg.common.exception.DemoModeException;
-import com.ktg.common.exception.ServiceException;
-import com.ktg.common.utils.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
 
 /**
  * 全局异常处理器
@@ -33,7 +35,7 @@ public class GlobalExceptionHandler
     {
         String requestURI = request.getRequestURI();
         log.error("请求地址'{}',权限校验失败'{}'", requestURI, e.getMessage());
-        return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权");
+        return AjaxResult.error(HttpStatus.FORBIDDEN, MessageUtils.message("exception.auth.no.permission"));
     }
 
     /**
@@ -109,6 +111,6 @@ public class GlobalExceptionHandler
     @ExceptionHandler(DemoModeException.class)
     public AjaxResult handleDemoModeException(DemoModeException e)
     {
-        return AjaxResult.error("演示模式,不允许操作");
+        return AjaxResult.error(MessageUtils.message("exception.demo.mode.not.allow"));
     }
 }

+ 6 - 7
ktg-framework/src/main/java/com/ktg/framework/web/service/MobileLoginService.java

@@ -14,7 +14,6 @@ import com.ktg.common.utils.StringUtils;
 import com.ktg.framework.manager.AsyncManager;
 import com.ktg.framework.manager.factory.AsyncFactory;
 import com.ktg.system.domain.LoginParams;
-import com.ktg.system.service.ISysPostService;
 import com.ktg.system.service.ISysRoleService;
 import com.ktg.system.service.ISysUserService;
 import org.slf4j.Logger;
@@ -26,12 +25,9 @@ import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 
 import java.util.Objects;
-import java.util.Set;
 
 /**
  * 移动端登录服务接口
@@ -218,15 +214,18 @@ public class MobileLoginService  {
     private void setUserDefaultInfo(SysUser registerUser ){
         String registerRoleCode = DictUtils.getDictValue("sys_config","register_role_code","");
         if (StringUtils.isBlank(registerRoleCode)) {
-            throw new ServiceException("请前往数据字典【sys_config】中维护注册用户角色编码【register_role_code】");
+            // throw new ServiceException("请前往数据字典【sys_config】中维护注册用户角色编码【register_role_code】");
+            throw new ServiceException(MessageUtils.message("mobile.login.service.sys.config.register.role.code.not.config"));
         }
         String registerDeptCode = DictUtils.getDictValue("sys_config","register_dept_code","");
         if (StringUtils.isBlank(registerDeptCode)) {
-            throw new ServiceException("请前往数据字典【sys_config】中维护注册用户部门编码【register_dept_code】");
+            // throw new ServiceException("请前往数据字典【sys_config】中维护注册用户部门编码【register_dept_code】");
+            throw new ServiceException(MessageUtils.message("mobile.login.service.sys.config.register.dept.code.not.config"));
         }
         String registerPostCode = DictUtils.getDictValue("sys_config","register_post_code","");
         if (StringUtils.isBlank(registerPostCode)) {
-            throw new ServiceException("请前往数据字典【sys_config】中维护注册用户岗位编码【register_post_code】");
+            // throw new ServiceException("请前往数据字典【sys_config】中维护注册用户岗位编码【register_post_code】");
+            throw new ServiceException(MessageUtils.message("mobile.login.service.sys.config.register.post.code.not.config"));
         }
 
     }

+ 8 - 8
ktg-framework/src/main/java/com/ktg/framework/web/service/SysLoginService.java

@@ -211,15 +211,15 @@ public class SysLoginService {
     }
 
     public AjaxResult loginByFingerprint(FingerprintLoginBody loginBody) {
-        Assert.notBlank(loginBody.getInputImg(), "输入的指纹不能为空!");
+        Assert.notBlank(loginBody.getInputImg(), MessageUtils.message("assert.business.input.fingerprint.not.null"));
         // 获取所有的用户指纹
         List<SysUserCharacteristic> list = iSysUserCharacteristicService.list(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getType, "0"));
-        Assert.isFalse(list.isEmpty(), "指纹库中暂无您的指纹信息!");
+        Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.business.no.fingerprint.in.database"));
         List<String> collect = list.stream().map(SysUserCharacteristic::getContent).collect(Collectors.toList());
         // 通过指纹获取最相似的用户
         VerificationVO verificationVO = FingerprintComparisonByImg.completableFutureComparison(loginBody.getInputImg(), new HashSet<>(collect));
-        Assert.notNull(verificationVO, "无法根据指纹确定您的身份,请通过其它方式登录!");
+        Assert.notNull(verificationVO, MessageUtils.message("assert.login.fingerprint.identity.unknown"));
         String fingerprintImg = verificationVO.getFingerprintImg();
         SysUserCharacteristic one = iSysUserCharacteristicService.getOne(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getContent, fingerprintImg));
@@ -233,15 +233,15 @@ public class SysLoginService {
     }
 
     public AjaxResult loginByFingerprintDat(MultipartFile file) throws IOException {
-        Assert.isTrue(file.getSize() > 0, "输入的指纹不能为空!");
+        Assert.isTrue(file.getSize() > 0, MessageUtils.message("assert.business.input.fingerprint.not.null"));
         // 获取所有的用户指纹
         List<SysUserCharacteristic> list = iSysUserCharacteristicService.list(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getType, "1"));
-        Assert.isFalse(list.isEmpty(), "指纹库中暂无您的指纹信息!");
+        Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.business.no.fingerprint.in.database"));
         List<String> collect = list.stream().map(SysUserCharacteristic::getContent).collect(Collectors.toList());
         // 通过指纹获取最相似的用户
         VerificationVO verificationVO = FingerprintComparisonByDat.completableFutureComparison(file, new HashSet<>(collect));
-        Assert.notNull(verificationVO, "无法根据指纹确定您的身份,请通过其它方式登录!");
+        Assert.notNull(verificationVO, MessageUtils.message("assert.login.fingerprint.identity.unknown"));
         String fingerprint = verificationVO.getFingerprint();
         SysUserCharacteristic one = iSysUserCharacteristicService.getOne(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getContent, fingerprint)
@@ -275,7 +275,7 @@ public class SysLoginService {
         // 计算时间差(毫秒)
         long duration1 = endTime1 - startTime1;
         System.out.println("Execution time in milliseconds: " + duration1);
-        Assert.notNull(faceMatchVO, "无法根据人脸确定您的身份,请通过其它方式登录!");
+        Assert.notNull(faceMatchVO, MessageUtils.message("assert.login.face.identity.unknown"));
         String okFace = faceMatchVO.getContent();
         SysUserCharacteristic one = iSysUserCharacteristicService.getOne(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getContent, okFace)
@@ -302,7 +302,7 @@ public class SysLoginService {
         // 通过人脸获取最相似的用户
         // FaceMatchVO faceMatchVO = ArcSoftMothodUtil.completableFutureComparison(file, collect);
         FaceMatchVO faceMatchVO = ArcSoftMothodUtil.completableFutureComparison(file, new HashSet<>(collect));
-        Assert.notNull(faceMatchVO, "无法根据人脸确定您的身份,请通过其它方式登录!");
+        Assert.notNull(faceMatchVO, MessageUtils.message("assert.login.face.identity.unknown"));
         String okFace = faceMatchVO.getContent();
         SysUserCharacteristic one = iSysUserCharacteristicService.getOne(Wrappers.<SysUserCharacteristic>lambdaQuery()
                 .eq(SysUserCharacteristic::getContent, okFace)

+ 7 - 6
ktg-framework/src/main/java/com/ktg/framework/web/service/UserDetailsServiceImpl.java

@@ -8,6 +8,7 @@ import com.ktg.common.core.text.Convert;
 import com.ktg.common.enums.UserStatus;
 import com.ktg.common.exception.ServiceException;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.ServletUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.domain.vo.IsSystemAttributeVO;
@@ -71,13 +72,13 @@ public class UserDetailsServiceImpl implements UserDetailsService {
 
         if (StringUtils.isNull(user)) {
             log.info("登录用户:{} 不存在.", username);
-            throw new ServiceException("登录用户:" + username + " 不存在");
+            throw new ServiceException(MessageUtils.message("user.detail.service.login.user.not.exist", username));
         } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
             log.info("登录用户:{} 已被删除.", username);
-            throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
+            throw new ServiceException(MessageUtils.message("user.detail.service.account.deleted", username));
         } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
             log.info("登录用户:{} 已被停用.", username);
-            throw new ServiceException("对不起,您的账号:" + username + " 已停用");
+            throw new ServiceException(MessageUtils.message("user.detail.service.account.disabled", username));
         } else {
             // 检查用户在该模块是否是黑名单
             UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
@@ -89,11 +90,11 @@ public class UserDetailsServiceImpl implements UserDetailsService {
                     String module = DictUtils.getDictLabel("module", userBlackVo.getModule());
                     if (StringUtils.isNotBlank(module) && userAgent.getOperatingSystem().getName().contains(module)) {
                         log.info("登录用户:{} 已被拉入 {} 模块黑名单.", username, module);
-                        throw new ServiceException("对不起,您的账号:" + username + " 已被拉入" + module + "模块黑名单,暂时无法登录!");
+                        throw new ServiceException(MessageUtils.message("user.detail.service.account.blacklisted", username, module));
                     }
                     if (StringUtils.isNotBlank(headerModule) && headerModule.equals(module)) {
                         log.info("登录用户:{} 已被拉入 {} 模块黑名单.", username, module);
-                        throw new ServiceException("对不起,您的账号:" + username + " 已被拉入" + module + "模块黑名单,暂时无法登录!");
+                        throw new ServiceException(MessageUtils.message("user.detail.service.account.blacklisted", username, module));
                     }
                 }
             }
@@ -102,7 +103,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
                 Boolean b = checkLoginByAttrModule(headerModule, user.getUserId());
                 if (!b) {
                     log.info("登录用户:{} 正在登录 {} 模块,由于您无相关角色,无法登录.", username, headerModule);
-                    throw new ServiceException("对不起,您的账号:" + username + " 缺失角色权限,暂时无法登录。请前往角色或基础数据配置!");
+                    throw new ServiceException(MessageUtils.message("user.detail.service.account.lack.role.permission", username));
                 }
             }
         }

+ 31 - 29
ktg-generator/src/main/java/com/ktg/generator/service/GenTableServiceImpl.java

@@ -1,32 +1,12 @@
 package com.ktg.generator.service;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ktg.common.constant.Constants;
 import com.ktg.common.constant.GenConstants;
 import com.ktg.common.core.text.CharsetKit;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.generator.domain.GenTable;
@@ -36,6 +16,28 @@ import com.ktg.generator.mapper.GenTableMapper;
 import com.ktg.generator.util.GenUtils;
 import com.ktg.generator.util.VelocityInitializer;
 import com.ktg.generator.util.VelocityUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
 
 /**
  * 业务 服务层实现
@@ -270,7 +272,7 @@ public class GenTableServiceImpl implements IGenTableService
                 }
                 catch (IOException e)
                 {
-                    throw new ServiceException("渲染模板失败,表名:" + table.getTableName());
+                    throw new ServiceException(MessageUtils.message("code.gen.service.render.template.fail", table.getTableName()));
                 }
             }
         }
@@ -292,7 +294,7 @@ public class GenTableServiceImpl implements IGenTableService
         List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
         if (StringUtils.isEmpty(dbTableColumns))
         {
-            throw new ServiceException("同步数据失败,原表结构不存在");
+            throw new ServiceException(MessageUtils.message("code.gen.service.sync.data.fail.table.not.exist"));
         }
         List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
 
@@ -385,7 +387,7 @@ public class GenTableServiceImpl implements IGenTableService
             }
             catch (IOException e)
             {
-                log.error("渲染模板失败,表名:" + table.getTableName(), e);
+                log.error(MessageUtils.message("code.gen.service.render.template.fail", table.getTableName()), e);
             }
         }
     }
@@ -404,25 +406,25 @@ public class GenTableServiceImpl implements IGenTableService
             JSONObject paramsObj = JSONObject.parseObject(options);
             if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE)))
             {
-                throw new ServiceException("树编码字段不能为空");
+                throw new ServiceException(MessageUtils.message("code.gen.service.tree.code.field.not.null"));
             }
             else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE)))
             {
-                throw new ServiceException("树父编码字段不能为空");
+                throw new ServiceException(MessageUtils.message("code.gen.service.tree.parent.code.field.not.null"));
             }
             else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME)))
             {
-                throw new ServiceException("树名称字段不能为空");
+                throw new ServiceException(MessageUtils.message("code.gen.service.tree.name.field.not.null"));
             }
             else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory()))
             {
                 if (StringUtils.isEmpty(genTable.getSubTableName()))
                 {
-                    throw new ServiceException("关联子表的表名不能为空");
+                    throw new ServiceException(MessageUtils.message("code.gen.service.sub.table.name.not.null"));
                 }
                 else if (StringUtils.isEmpty(genTable.getSubTableFkName()))
                 {
-                    throw new ServiceException("子表关联的外键名不能为空");
+                    throw new ServiceException(MessageUtils.message("code.gen.service.sub.table.fk.name.not.null"));
                 }
             }
         }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsBlacklistController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsBlacklist;
 import com.ktg.iscs.domain.vo.user.WhiteUserVO;
 import com.ktg.iscs.service.IIsBlacklistService;
@@ -78,7 +79,7 @@ public class IsBlacklistController extends BaseController
 	@PostMapping("/deleteIsBlacklistByRecordIds")
     public CommonResult<Boolean> deleteIsBlacklistByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return CommonResult.success(isBlacklistService.remove(Wrappers.<IsBlacklist>lambdaQuery()
                 .in(IsBlacklist::getRecordId, Arrays.asList(longIds))));

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsExceptionController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsException;
 import com.ktg.iscs.service.IIsExceptionService;
@@ -102,7 +103,7 @@ public class IsExceptionController extends BaseController
 	@PostMapping("/deleteIsExceptionByExceptionIds")
     public CommonResult<Boolean> deleteIsExceptionByExceptionIds(String exceptionIds)
     {
-        Assert.notBlank(exceptionIds, "请选择需要删除的数据!");
+        Assert.notBlank(exceptionIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(exceptionIds);
         return CommonResult.success(isExceptionService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsHardwareController.java

@@ -5,6 +5,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsHardware;
@@ -133,6 +134,6 @@ public class IsHardwareController extends BaseController
         List<IsHardware> hardwareList = util.importExcel(file.getInputStream());
         String operName = SecurityUtils.getUsername();
         String message = isHardwareService.importHardware(hardwareList, updateSupport, operName);
-        return CommonResult.success("导入成功,共导入 " + message + " 条数据");
+        return CommonResult.success(MessageUtils.message("common.result.success.import.data", message));
     }
 }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLockCabinetSlotsController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsLockCabinetSlots;
 import com.ktg.iscs.service.IIsLockCabinetSlotsService;
@@ -99,7 +100,7 @@ public class IsLockCabinetSlotsController extends BaseController
 	@PostMapping("/deleteIsLockCabinetSlotsBySlotIds")
     public CommonResult<Boolean> deleteIsLockCabinetSlotsBySlotIds(String slotIds)
     {
-        Assert.notBlank(slotIds, "请选择需要删除的数据!");
+        Assert.notBlank(slotIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(slotIds);
         return CommonResult.success(isLockCabinetSlotsService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLotoStationController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsLotoStation;
 import com.ktg.iscs.domain.dto.point.BindingPointDTO;
@@ -129,7 +130,7 @@ public class IsLotoStationController extends BaseController
 	@PostMapping("/deleteIsLotoStationByLotoIds")
     public CommonResult<Boolean> deleteIsLotoStationByLotoIds(String lotoIds)
     {
-        Assert.notBlank(lotoIds, "请选择需要删除的数据!");
+        Assert.notBlank(lotoIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(lotoIds);
         return CommonResult.success(isLotoStationService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsLotoSwitchMapController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsLotoSwitchMap;
 import com.ktg.iscs.domain.dto.point.SwitchBindingPointDTO;
@@ -110,7 +111,7 @@ public class IsLotoSwitchMapController extends BaseController
 	@PostMapping("/deleteIsLotoSwitchMapBySwitchMapIds")
     public CommonResult<Boolean> deleteIsLotoSwitchMapBySwitchMapIds(String switchMapIds)
     {
-        Assert.notBlank(switchMapIds, "请选择需要删除的数据!");
+        Assert.notBlank(switchMapIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(switchMapIds);
         return CommonResult.success(isLotoSwitchMapService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 3 - 2
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMailNotifyConfigController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMailNotifyConfig;
 import com.ktg.iscs.service.IIsMailNotifyConfigService;
@@ -99,7 +100,7 @@ public class IsMailNotifyConfigController extends BaseController
 	@PostMapping("/deleteIsMailNotifyConfigByConfigIds")
     public CommonResult<Boolean> deleteIsMailNotifyConfigByConfigIds(String configIds)
     {
-        Assert.notBlank(configIds, "请选择需要删除的数据!");
+        Assert.notBlank(configIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(configIds);
         return CommonResult.success(isMailNotifyConfigService.removeBatchByIds(Arrays.asList(longIds)));
     }
@@ -119,7 +120,7 @@ public class IsMailNotifyConfigController extends BaseController
     @GetMapping(value = "/selectIsMailNotifyConfigByCode")
     public CommonResult<IsMailNotifyConfig> selectIsMailNotifyConfigByCode(String templateCode)
     {
-        Assert.notBlank(templateCode, "templateCode不可为空!");
+        Assert.notBlank(templateCode, MessageUtils.message("assert.business.template.code.not.null"));
         return CommonResult.success(isMailNotifyConfigService.getOne(Wrappers.<IsMailNotifyConfig>lambdaQuery()
                 .eq(IsMailNotifyConfig::getTemplateCode, templateCode)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMailSendTaskItemController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMailSendTaskItem;
 import com.ktg.iscs.service.IIsMailSendTaskItemService;
@@ -99,7 +100,7 @@ public class IsMailSendTaskItemController extends BaseController
 	@PostMapping("/deleteIsMailSendTaskItemByMailIds")
     public CommonResult<Boolean> deleteIsMailSendTaskItemByMailIds(String mailIds)
     {
-        Assert.notBlank(mailIds, "请选择需要删除的数据!");
+        Assert.notBlank(mailIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(mailIds);
         return CommonResult.success(isMailSendTaskItemService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMapController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMap;
 import com.ktg.iscs.service.IIsMapService;
@@ -99,7 +100,7 @@ public class IsMapController extends BaseController
 	@PostMapping("/deleteIsMapByIds")
     public CommonResult<Boolean> deleteIsMapByIds(String ids)
     {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         return CommonResult.success(isMapService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMapPointController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMapPoint;
 import com.ktg.iscs.domain.dto.mapPoint.MapPointParamDTO;
@@ -100,7 +101,7 @@ public class IsMapPointController extends BaseController
 	@PostMapping("/deleteIsMapPointByIds")
     public CommonResult<Boolean> deleteIsMapPointByIds(String ids)
     {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         return CommonResult.success(isMapPointService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsChangeRecordController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMaterialsChangeRecord;
 import com.ktg.iscs.domain.dto.change.ChangeRecordDTO;
@@ -101,7 +102,7 @@ public class IsMaterialsChangeRecordController extends BaseController
 	@PostMapping("/deleteIsMaterialsChangeRecordByChangeIds")
     public CommonResult<Boolean> deleteIsMaterialsChangeRecordByChangeIds(String changeIds)
     {
-        Assert.notBlank(changeIds, "请选择需要删除的数据!");
+        Assert.notBlank(changeIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(changeIds);
         return CommonResult.success(isMaterialsChangeRecordService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsCheckRecordController.java

@@ -7,6 +7,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMaterialsCheckRecord;
 import com.ktg.iscs.domain.dto.checkRecord.CheckRecordPageDTO;
@@ -100,7 +101,7 @@ public class IsMaterialsCheckRecordController extends BaseController
 	@PostMapping("/deleteIsMaterialsCheckRecordByRecordIds")
     public CommonResult<Boolean> deleteIsMaterialsCheckRecordByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return CommonResult.success(isMaterialsCheckRecordService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsLoanExceptionController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMaterialsLoanException;
 import com.ktg.iscs.domain.vo.exception.IsMaterialsLoanExceptionPageVO;
@@ -100,7 +101,7 @@ public class IsMaterialsLoanExceptionController extends BaseController
 	@PostMapping("/deleteIsMaterialsLoanExceptionByExceptionIds")
     public CommonResult<Boolean> deleteIsMaterialsLoanExceptionByExceptionIds(String exceptionIds)
     {
-        Assert.notBlank(exceptionIds, "请选择需要删除的数据!");
+        Assert.notBlank(exceptionIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(exceptionIds);
         return CommonResult.success(isMaterialsLoanExceptionService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsMaterialsPropertyValueController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsMaterialsPropertyValue;
 import com.ktg.iscs.service.IIsMaterialsPropertyValueService;
@@ -99,7 +100,7 @@ public class IsMaterialsPropertyValueController extends BaseController
 	@PostMapping("/deleteIsMaterialsPropertyValueByRecordIds")
     public CommonResult<Boolean> deleteIsMaterialsPropertyValueByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return CommonResult.success(isMaterialsPropertyValueService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 3 - 7
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsTicketOperLogController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsTicketOperLog;
 import com.ktg.iscs.service.IIsTicketOperLogService;
@@ -20,13 +21,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.util.List;
 import java.util.Arrays;
-
-
-
-
-import com.ktg.common.core.page.TableDataInfo;
+import java.util.List;
 
 /**
  * 作业操作过程Controller
@@ -104,7 +100,7 @@ public class IsTicketOperLogController extends BaseController
 	@PostMapping("/deleteIsTicketOperLogByOperationIds")
     public CommonResult<Boolean> deleteIsTicketOperLogByOperationIds(String operationIds)
     {
-        Assert.notBlank(operationIds, "请选择需要删除的数据!");
+        Assert.notBlank(operationIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(operationIds);
         return CommonResult.success(isTicketOperLogService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsUnitController.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsUnit;
@@ -129,7 +130,7 @@ public class IsUnitController extends BaseController
 	@PostMapping("/deleteIsUnitByUnitIds")
     public CommonResult<Boolean> deleteIsUnitByUnitIds(String unitIds)
     {
-        Assert.notBlank(unitIds, "请选择需要删除的数据!");
+        Assert.notBlank(unitIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(unitIds);
         return CommonResult.success(isUnitService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 3 - 2
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsWorkstationController.java

@@ -7,6 +7,7 @@ import com.ktg.common.annotation.Log;
 import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.pojo.CommonResult;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.iscs.domain.IsWorkstation;
 import com.ktg.iscs.service.IIsUserWorkstationService;
@@ -103,8 +104,8 @@ public class IsWorkstationController extends BaseController {
     @Log(title = "mars岗位", businessType = BusinessType.UPDATE)
     @PostMapping("/updateIsWorkstationStatus")
     public CommonResult<Boolean> updateIsWorkstationStatus(@RequestBody @Parameter(name = "isWorkstation", description = "修改数据类,放到body") IsWorkstation isWorkstation) {
-        Assert.notNull(isWorkstation.getWorkstationId(), "id不可为空!");
-        Assert.notBlank(isWorkstation.getStatus(), "状态不可为空!");
+        Assert.notNull(isWorkstation.getWorkstationId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.notBlank(isWorkstation.getStatus(), MessageUtils.message("assert.business.status.not.null"));
         return CommonResult.success(isWorkstationService.update(Wrappers.<IsWorkstation>lambdaUpdate()
                 .eq(IsWorkstation::getWorkstationId, isWorkstation.getWorkstationId())
                 .set(IsWorkstation::getStatus, isWorkstation.getStatus())));

+ 1 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/TestIscsController.java

@@ -118,7 +118,7 @@ public class TestIscsController extends BaseController {
     @Log(title = "测试用", businessType = BusinessType.DELETE)
     @PostMapping("/deleteTestIscsByIds")
     public CommonResult<Boolean> deleteTestIscsByIds(String ids) {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         return CommonResult.success(testIscsService.removeBatchByIds(Arrays.asList(longIds)));
     }

+ 14 - 13
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/FlexibleJobServiceImpl.java

@@ -3,6 +3,7 @@ package com.ktg.iscs.service.impl;
 import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.iscs.domain.*;
 import com.ktg.iscs.domain.dto.flexiblejob.AddFlexibleJobDTO;
@@ -93,7 +94,7 @@ public class FlexibleJobServiceImpl implements FlexibleJobService {
         int counter = 1;
         // 2.如果不是sop生成的,则根据数据自己生成
         IsWorkstation workstation = iIsWorkstationService.getById(workstationId);
-        Assert.notNull(workstation, "岗位信息不存在!");
+        Assert.notNull(workstation, MessageUtils.message("assert.post.info.not.exist"));
         String workstationName = workstation.getWorkstationName();
         // 2.1如果岗位是有父级的,则处理
         if (!"0".equals(workstation.getAncestors())) {
@@ -128,10 +129,10 @@ public class FlexibleJobServiceImpl implements FlexibleJobService {
     @Override
     public Boolean insertTakeOutKey(List<TakeOutKeyDTO> list) {
         for (TakeOutKeyDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "作业id不能为空!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.job.id.not.null"));
             // 检查钥匙是否存在
             IsKey key = iIsKeyService.getOne(Wrappers.<IsKey>lambdaQuery().eq(IsKey::getKeyNfc, dto.getKeyNfc()));
-            Assert.notNull(key, dto.getKeyNfc() + "对应的钥匙信息不存在!");
+            Assert.notNull(key, MessageUtils.message("assert.key.nfc.corresponding.info.not.exist", dto.getKeyNfc()));
             // 如果已经有了取出记录
             IsJobTicketKey jobTicketKey = iIsJobTicketKeyService.getOne(Wrappers.<IsJobTicketKey>lambdaQuery()
                     .eq(IsJobTicketKey::getTicketId, dto.getTicketId())
@@ -156,14 +157,14 @@ public class FlexibleJobServiceImpl implements FlexibleJobService {
     public Boolean updateTakeBackKey(List<TakeOutKeyDTO> list) {
         Date date = new Date();
         for (TakeOutKeyDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-            Assert.notBlank(dto.getKeyNfc(), "请告诉我钥匙的NFC!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+            Assert.notBlank(dto.getKeyNfc(), MessageUtils.message("assert.key.specify.nfc"));
             // 1.获取作业票数据
             IsJobTicket jobTicket = iIsJobTicketService.getById(dto.getTicketId());
-            Assert.notNull(jobTicket, "作业票数据丢失啦!");
+            Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.data.lost"));
             // 1.1获取上锁时取出的锁的信息
             IsKey startKey = iIsKeyService.getOne(Wrappers.<IsKey>lambdaQuery().eq(IsKey::getKeyNfc, dto.getKeyNfc()));
-            Assert.notNull(startKey, "钥匙数据丢失啦!");
+            Assert.notNull(startKey, MessageUtils.message("assert.key.data.lost"));
             // 1.4修改为归还
             iIsJobTicketKeyService.update(Wrappers.<IsJobTicketKey>lambdaUpdate()
                     .eq(IsJobTicketKey::getTicketId, jobTicket.getTicketId())
@@ -179,10 +180,10 @@ public class FlexibleJobServiceImpl implements FlexibleJobService {
     public Boolean insertTakeOutLock(List<TakeTicketLockDTO> list) {
         Date date = new Date();
         for (TakeTicketLockDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "作业id不能为空!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.job.id.not.null"));
             // 检查锁是否存在
             IsLock lock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery().eq(IsLock::getLockNfc, dto.getLockNfc()));
-            Assert.notNull(lock, dto.getLockNfc() + "对应的挂锁信息不存在!");
+            Assert.notNull(lock, MessageUtils.message("assert.lock.nfc.corresponding.info.not.exist",dto.getLockNfc()));
             // 如果已经有了取出记录
             IsJobTicketLock jobTicketLock = iIsJobTicketLockService.getOne(Wrappers.<IsJobTicketLock>lambdaQuery()
                     .eq(IsJobTicketLock::getTicketId, dto.getTicketId())
@@ -205,14 +206,14 @@ public class FlexibleJobServiceImpl implements FlexibleJobService {
     @Override
     public Boolean updateTakeBackLock(List<TakeTicketLockDTO> list) {
         for (TakeTicketLockDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-            Assert.notBlank(dto.getLockNfc(), "请告诉我挂锁的NFC!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+            Assert.notBlank(dto.getLockNfc(), MessageUtils.message("assert.lock.specify.nfc"));
             // 1.获取作业票数据
             IsJobTicket jobTicket = iIsJobTicketService.getById(dto.getTicketId());
-            Assert.notNull(jobTicket, "作业票数据丢失啦!");
+            Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.data.lost"));
             // 1.1获取锁的信息
             IsLock isLock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery().eq(IsLock::getLockNfc, dto.getLockNfc()));
-            Assert.notNull(isLock, "挂锁数据丢失啦!");
+            Assert.notNull(isLock, MessageUtils.message("assert.lock.data.lost"));
             // 1.4修改为归还
             iIsJobTicketLockService.update(Wrappers.<IsJobTicketLock>lambdaUpdate()
                     .eq(IsJobTicketLock::getTicketId, jobTicket.getTicketId())

+ 76 - 75
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareApiServiceImpl.java

@@ -3,6 +3,7 @@ package com.ktg.iscs.service.impl;
 import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ktg.common.core.redis.RedisCache;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanUtils;
@@ -87,19 +88,19 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Boolean updateTakeOutKey(TakeOutKeyDTO dto) {
-        Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-        Assert.notBlank(dto.getKeyNfc(), "请告诉我钥匙的NFC!");
-        Assert.notBlank(dto.getSerialNumber(), "请告知归还到哪里!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+        Assert.notBlank(dto.getKeyNfc(), MessageUtils.message("assert.key.specify.nfc"));
+        Assert.notBlank(dto.getSerialNumber(), MessageUtils.message("assert.hardware.specify.return.location"));
         // 1.获取作业票数据
         IsJobTicket jobTicket = isJobTicketService.getById(dto.getTicketId());
-        Assert.notNull(jobTicket, "作业票数据丢失啦!");
+        Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.data.lost"));
         // 1.1获取上锁时取出的锁的信息
         IsKey startKey = isKeyService.getOne(Wrappers.<IsKey>lambdaQuery().eq(IsKey::getKeyNfc, dto.getKeyNfc()));
-        Assert.notNull(startKey, "钥匙数据丢失啦!");
+        Assert.notNull(startKey, MessageUtils.message("assert.key.data.lost"));
         // 1.2通过序列号查询柜子信息
         IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-        Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+        Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
         // 1.3初始化时间参数
         Date date = new Date();
         // 1.4获取上锁时的数据
@@ -152,10 +153,10 @@ public class HardwareApiServiceImpl implements HardwareApiService {
         IsJobTicketUser jobTicketUser = iIsJobTicketUserService.getOne(Wrappers.<IsJobTicketUser>lambdaQuery()
                 .eq(IsJobTicketUser::getTicketId, ticketId)
                 .eq(IsJobTicketUser::getUserRole, isSystemAttributeService.getIsSystemAttributeByKey("role.jtlocker").getSysAttrValue()));
-        Assert.isFalse(Integer.parseInt(jobTicketUser.getJobStatus()) > JobStatusEnum.ACQUIRE_KEY.status, "作业票已完成设备拿取,无法操作!");
+        Assert.isFalse(Integer.parseInt(jobTicketUser.getJobStatus()) > JobStatusEnum.ACQUIRE_KEY.status, MessageUtils.message("assert.work.order.device.taken.cannot.operate"));
         IsJobTicket isJobTicket = isJobTicketService.getOne(Wrappers.<IsJobTicket>lambdaQuery()
                 .eq(IsJobTicket::getTicketId, ticketId));
-        Assert.isFalse(Integer.parseInt(isJobTicket.getTicketStatus()) > Integer.parseInt(TicketStatusEnum.READY_TO_LOCK.status), "作业票已完成设备拿取,无法进行操作!");
+        Assert.isFalse(Integer.parseInt(isJobTicket.getTicketStatus()) > Integer.parseInt(TicketStatusEnum.READY_TO_LOCK.status), MessageUtils.message("assert.work.order.device.taken.cannot.operate"));
         // 上锁阶段取钥匙,更新is_job_ticket_user和is_job_ticket
         // 1.新更人员状态
         iIsJobTicketUserService.update(Wrappers.<IsJobTicketUser>lambdaUpdate()
@@ -207,19 +208,19 @@ public class HardwareApiServiceImpl implements HardwareApiService {
     @Transactional
     @Override
     public Boolean updateReturnKey(ReturnKeyDTO dto) {
-        Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-        Assert.notBlank(dto.getKeyNfc(), "请告诉我钥匙的NFC!");
-        Assert.notBlank(dto.getSerialNumber(), "请告知归还到哪里!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+        Assert.notBlank(dto.getKeyNfc(), MessageUtils.message("assert.key.specify.nfc"));
+        Assert.notBlank(dto.getSerialNumber(), MessageUtils.message("assert.hardware.specify.return.location"));
         // 1.获取作业票数据
         IsJobTicket jobTicket = isJobTicketService.getById(dto.getTicketId());
-        Assert.notNull(jobTicket, "作业票数据丢失啦!");
+        Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.data.lost"));
         // 1.1获取上锁时取出的锁的信息
         IsKey startKey = isKeyService.getOne(Wrappers.<IsKey>lambdaQuery().eq(IsKey::getKeyNfc, dto.getKeyNfc()));
-        Assert.notNull(startKey, "钥匙数据丢失啦!");
+        Assert.notNull(startKey, MessageUtils.message("assert.key.data.lost"));
         // 1.2通过序列号查询柜子信息
         IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-        Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+        Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
         // 1.3初始化时间参数
         Date date = new Date();
         // 1.4获取上锁时的数据
@@ -302,32 +303,32 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public synchronized Boolean updateTicketLockTake(List<TakeTicketLockDTO> list) {
-        Assert.isFalse(list.isEmpty(), "请取出至少一把挂锁!");
+        Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.lock.take.at.least.one"));
         // 情况复杂,遍历处理吧
         for (TakeTicketLockDTO dto : list) {
-            Assert.notBlank(dto.getLockNfc(), "挂锁nfc缺失!");
-            Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-            Assert.notBlank(dto.getSerialNumber(), "请告知归还到哪一个柜子!");
+            Assert.notBlank(dto.getLockNfc(), MessageUtils.message("assert.lock.nfc.missing"));
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+            Assert.notBlank(dto.getSerialNumber(), MessageUtils.message("assert.hardware.specify.return.cabinet"));
             // 1.查询挂锁信息
             IsLock lock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery()
                     .eq(IsLock::getLockNfc, dto.getLockNfc()));
-            Assert.notNull(lock, "该nfc无对应的挂锁信息!");
+            Assert.notNull(lock, MessageUtils.message("assert.lock.nfc.no.corresponding.info"));
             // 1.1检查这把锁是不是已经在该作业票中使用
             List<IsJobTicketLock> jobTicketLockList = iIsJobTicketLockService.list(Wrappers.<IsJobTicketLock>lambdaQuery()
                     .eq(IsJobTicketLock::getTicketId, dto.getTicketId())
                     .eq(IsJobTicketLock::getLockId, lock.getLockId()));
-            Assert.isFalse(!jobTicketLockList.isEmpty(), lock.getLockName() + "已被取出!");
+            Assert.isFalse(!jobTicketLockList.isEmpty(), MessageUtils.message("assert.lock.name.already.taken",lock.getLockName()));
             // 1.2通过序列号查询柜子信息
             IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery()
                     .eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-            Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+            Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
             // 2.获取本次作业票产生的和挂锁关联的数据,按照从上到下的顺序,取一个可以使用的
             IsJobTicketLock isJobTicketLock = iIsJobTicketLockService.getOne(Wrappers.<IsJobTicketLock>lambdaQuery()
                     .eq(IsJobTicketLock::getTicketId, dto.getTicketId())
                     .isNull(IsJobTicketLock::getLockId)
                     .orderByAsc(IsJobTicketLock::getRecordId)
                     .last("offset 0 rows fetch next 1 rows only"));
-            Assert.notNull(isJobTicketLock, "无初始化数据来提供给该挂锁更新");
+            Assert.notNull(isJobTicketLock, MessageUtils.message("assert.hardware.lock.no.init.data.for.update"));
             // 1.2开始补充该条数据
             isJobTicketLock.setLockId(lock.getLockId());
             isJobTicketLock.setFromHardwareId(isHardware.getId());
@@ -353,7 +354,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
         // 1.查询挂锁信息
         List<IsLock> lockList = iIsLockService.list(Wrappers.<IsLock>lambdaQuery()
                 .in(IsLock::getLockNfc, nfcList));
-        Assert.isFalse(lockList.isEmpty(), "通过nfc查询不到相关挂锁信息!");
+        Assert.isFalse(lockList.isEmpty(), MessageUtils.message("assert.business.nfc.no.lock.info.found"));
         // 2.获取本次作业票产生的和挂锁关联的数据,因为取挂锁可能分批,多以按顺序更新关联数据的前几个
         List<IsJobTicketLock> jobTicketLockList = iIsJobTicketLockService.list(Wrappers.<IsJobTicketLock>lambdaQuery()
                 .eq(IsJobTicketLock::getTicketId, list.get(0).getTicketId())
@@ -386,16 +387,16 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Boolean updateTicketLockReturn(ReturnTicketLockDTO dto) {
-        // Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-        Assert.notBlank(dto.getLockNfc(), "挂锁nfc缺失!");
-        Assert.notBlank(dto.getSerialNumber(), "请告知归还到哪一个柜子!");
+        // Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+        Assert.notBlank(dto.getLockNfc(), MessageUtils.message("assert.lock.nfc.missing"));
+        Assert.notBlank(dto.getSerialNumber(), MessageUtils.message("assert.hardware.specify.return.cabinet"));
         // 1.通过nfc查询挂锁信息
         IsLock lock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery()
                 .eq(IsLock::getLockNfc, dto.getLockNfc()));
-        Assert.notNull(lock, "该nfc无对应的挂锁信息!");
+        Assert.notNull(lock, MessageUtils.message("assert.lock.nfc.no.corresponding.info"));
         // 1.1通过序列号查询柜子信息
         IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery().eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-        Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+        Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
         // 2.开始更新归还信息
         if (dto.getTicketId() != null) {
             // 2.1登陆后归还, 判断钥匙在哪个阶段,根据不同阶段更新不一样
@@ -479,29 +480,29 @@ public class HardwareApiServiceImpl implements HardwareApiService {
     @Transactional
     @Override
     public Boolean updateLockPointBatch(List<LockPointBatchDTO> list) {
-        Assert.isFalse(list.isEmpty(), "没有接收到数据啊!");
+        Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.business.no.data.received"));
         // 情况复杂,循环处理
         for (LockPointBatchDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
             // 1.获取作业票数据
             IsJobTicket jobTicket = isJobTicketService.getById(dto.getTicketId());
-            Assert.notNull(jobTicket, "作业票数据丢失啦!");
-            Assert.notBlank(dto.getLockNfc(), "挂锁nfc缺失!");
-            Assert.notBlank(dto.getPointNfc(), "请告知隔离点信息!");
-            Assert.notNull(dto.getTarget(), "请告我是去挂锁还是解锁!");
-            Assert.notNull(dto.getStatus(), "请告我任务当前状态!");
-            Assert.notBlank(dto.getKeyNfc(), "钥匙信息不可为空!");
+            Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.data.lost"));
+            Assert.notBlank(dto.getLockNfc(), MessageUtils.message("assert.lock.nfc.missing"));
+            Assert.notBlank(dto.getPointNfc(), MessageUtils.message("assert.business.specify.isolation.point.info"));
+            Assert.notNull(dto.getTarget(), MessageUtils.message("assert.business.specify.lock.or.unlock"));
+            Assert.notNull(dto.getStatus(), MessageUtils.message("assert.business.specify.task.status"));
+            Assert.notBlank(dto.getKeyNfc(), MessageUtils.message("assert.business.key.info.not.null"));
             // 1.通过nfc查询挂锁信息
             IsLock lock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery()
                     .eq(IsLock::getLockNfc, dto.getLockNfc()));
-            Assert.notNull(lock, "该nfc无对应的挂锁信息");
+            Assert.notNull(lock, MessageUtils.message("assert.lock.nfc.no.corresponding.info"));
             // 1.1通过nfc查询钥匙信息
             IsKey key = isKeyService.getOne(Wrappers.<IsKey>lambdaQuery()
                     .eq(IsKey::getKeyNfc, dto.getKeyNfc()));
-            Assert.notNull(lock, "该nfc无对应的钥匙信息");
+            Assert.notNull(lock, MessageUtils.message("assert.key.nfc.no.corresponding.info"));
             // 2.通过nfc查询隔离点信息
             IsIsolationPoint point = iIsIsolationPointService.getOneByNfc(dto.getPointNfc());
-            Assert.notNull(point, "该nfc无对应的隔离点信息");
+            Assert.notNull(point, MessageUtils.message("assert.isolation.point.nfc.no.corresponding.info"));
             Date date = new Date();
             if (dto.getTarget().equals(0)) {
                 log.info("--------------开始上锁-----------");
@@ -641,7 +642,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
             // 开始查询已经上锁的点位信息
             IsJobTicketPoints lockingData = iIsJobTicketPointsService.getLockingData(point.getPointId());
             if (lockingData != null) {
-                Assert.isFalse(lock.getLockId().equals(lockingData.getLockId()), "点位挂锁错误,重复点位[" + point.getPointName() + "]请多锁完成重复点位上锁!");
+                Assert.isFalse(lock.getLockId().equals(lockingData.getLockId()), MessageUtils.message("assert.lock.point.error.duplicate", point.getPointName() ));
             }
         }
     }
@@ -695,18 +696,18 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Boolean updateLocksetTake(List<TakeLocksetDTO> list) {
-        Assert.isFalse(list.isEmpty(), "请取出至少一个辅件!");
+        Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.accessory.take.at.least.one"));
         // 情况复杂,软条件过多,单条剥离处理吧
         for (TakeLocksetDTO dto : list) {
-            Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-            Assert.notBlank(dto.getLocksetNfc(), "辅件nfc缺失!");
+            Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+            Assert.notBlank(dto.getLocksetNfc(), MessageUtils.message("assert.accessory.nfc.missing"));
             // 1.查询辅件的详情
             IsLockset lockset = iIsLocksetService.getOne(Wrappers.<IsLockset>lambdaQuery().eq(IsLockset::getLocksetNfc, dto.getLocksetNfc()));
-            Assert.notNull(lockset, dto.getLocksetNfc() + "无对应的辅件信息!");
+            Assert.notNull(lockset, MessageUtils.message("assert.business.no.corresponding.accessory.info",dto.getLocksetNfc()));
             // 1.1通过序列号查询柜子信息
             IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery()
                     .eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-            Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+            Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
             // 1.2获取该辅件的类型,找到is_job_ticket_lockset有没有对应的,可能会有多条,取其中一条即可,
             IsJobTicketLockset jobTicketLockset = iIsJobTicketLocksetService.getOne(Wrappers.<IsJobTicketLockset>lambdaQuery()
                     .eq(IsJobTicketLockset::getJobTicketId, dto.getTicketId())
@@ -715,7 +716,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
                     // 处理下多条取一条用,按照从上倒下顺序使用
                     .orderByAsc(IsJobTicketLockset::getRecordId)
                     .last("offset 0 rows fetch next 1 rows only"));
-            Assert.notNull(jobTicketLockset, "无初始化数据来提供给该辅件更新");
+            Assert.notNull(jobTicketLockset, MessageUtils.message("assert.hardware.accessory.no.init.data.for.update"));
             // 1.3开始补充该条数据
             jobTicketLockset.setLocksetId(lockset.getLocksetId());
             jobTicketLockset.setFromHardwareId(isHardware.getId());
@@ -734,16 +735,16 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Boolean updateLocksetPoint(LocksetPointDTO dto) {
-        Assert.notNull(dto.getTicketId(), "请告诉我关于哪个作业票!");
-        Assert.notBlank(dto.getLocksetNfc(), "辅件nfc缺失!");
-        Assert.notNull(dto.getPointNfc(), "请告知隔离点信息!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.specify"));
+        Assert.notBlank(dto.getLocksetNfc(), MessageUtils.message("assert.accessory.nfc.missing"));
+        Assert.notNull(dto.getPointNfc(), MessageUtils.message("assert.business.specify.isolation.point.info"));
         // 1.通过nfc查询挂锁信息
         IsLockset lockset = iIsLocksetService.getOne(Wrappers.<IsLockset>lambdaQuery()
                 .eq(IsLockset::getLocksetNfc, dto.getLocksetNfc()));
-        Assert.notNull(lockset, "该nfc无对应的辅件信息");
+        Assert.notNull(lockset, MessageUtils.message("assert.accessory.nfc.no.corresponding.info"));
         // 2.通过nfc查询隔离点信息
         IsIsolationPoint point = iIsIsolationPointService.getOneByNfc(dto.getPointNfc());
-        Assert.notNull(point, "该nfc无对应的隔离点信息");
+        Assert.notNull(point, MessageUtils.message("assert.isolation.point.nfc.no.corresponding.info"));
         // 3.开始更新绑定关系
         iIsJobTicketLocksetService.update(Wrappers.<IsJobTicketLockset>lambdaUpdate()
                 .eq(IsJobTicketLockset::getJobTicketId, dto.getTicketId())
@@ -761,15 +762,15 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Boolean updateLocksetReturn(ReturnLocksetDTO dto) {
-        Assert.notBlank(dto.getLocksetNfc(), "辅件nfc缺失!");
-        Assert.notBlank(dto.getSerialNumber(), "请告知归还到哪一个柜子!");
+        Assert.notBlank(dto.getLocksetNfc(), MessageUtils.message("assert.accessory.nfc.missing"));
+        Assert.notBlank(dto.getSerialNumber(), MessageUtils.message("assert.hardware.specify.return.cabinet"));
         // 1.通过nfc查询辅件信息
         IsLockset lockset = iIsLocksetService.getOne(Wrappers.<IsLockset>lambdaQuery()
                 .eq(IsLockset::getLocksetNfc, dto.getLocksetNfc()));
-        Assert.notNull(lockset, "该nfc无对应的辅件信息!");
+        Assert.notNull(lockset, MessageUtils.message("assert.accessory.nfc.no.corresponding.info"));
         // 1.1通过序列号查询柜子信息
         IsHardware isHardware = isHardwareService.getOne(Wrappers.<IsHardware>lambdaQuery().eq(IsHardware::getSerialNumber, dto.getSerialNumber()));
-        Assert.notNull(isHardware, "该序列号无对应的硬件信息!");
+        Assert.notNull(isHardware, MessageUtils.message("assert.hardware.serial.no.corresponding.info"));
         // 2.开始更新归还信息
         if (dto.getTicketId() != null) {
             // 2.1登陆后归还
@@ -808,7 +809,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public JobTicketVO selectTicketDetailById(Long ticketId) {
-        Assert.notNull(ticketId, "作业票id不可为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.id.not.null"));
         // 0.作业前检查
         /*List<IsJobTicketStep> steps = iIsJobTicketStepService.list(Wrappers.<IsJobTicketStep>lambdaQuery()
                 .eq(IsJobTicketStep::getTicketId, ticketId));
@@ -826,7 +827,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
         }*/
         // 1.查询作业票信息
         IsJobTicket isJobTicket = isJobTicketService.getById(ticketId);
-        Assert.notNull(isJobTicket, "作业票信息丢失!");
+        Assert.notNull(isJobTicket, MessageUtils.message("assert.work.order.data.lost"));
         JobTicketVO jobTicketVO = BeanUtils.toBean(isJobTicket, JobTicketVO.class);
         // 2.查询钥匙数据
         List<IsJobTicketKey> ticketKeyList = iIsJobTicketKeyService.list(Wrappers.<IsJobTicketKey>lambdaQuery()
@@ -924,24 +925,24 @@ public class HardwareApiServiceImpl implements HardwareApiService {
 
     @Override
     public Boolean updateColockerStatus(UpdateColockerStatusDTO dto) {
-        Assert.notNull(dto.getTicketId(), "作业票id不能为空!");
-        Assert.notBlank(dto.getJobStatus(), "操作的共锁/解锁状态不能为空!");
-        Assert.notBlank(dto.getCardNfc(), "工作卡NFC不能为空!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.id.not.null"));
+        Assert.notBlank(dto.getJobStatus(), MessageUtils.message("assert.user.operate.co.lock.status.not.null"));
+        Assert.notBlank(dto.getCardNfc(), MessageUtils.message("assert.user.work.card.nfc.not.null"));
         // 1.根据作业卡获取当前人员状态
         IsJobCard card = iIsJobCardService.getOne(Wrappers.<IsJobCard>lambdaQuery().eq(IsJobCard::getCardNfc, dto.getCardNfc()));
-        Assert.isFalse(card == null, "该工作卡未绑定用户!");
+        Assert.isFalse(card == null, MessageUtils.message("assert.user.work.card.not.bound"));
         // 2.检测获取这个人在该作业票中状态
         IsJobTicketUser jobTicketUser = iIsJobTicketUserService.getOne(Wrappers.<IsJobTicketUser>lambdaQuery()
                 .eq(IsJobTicketUser::getUserId, card.getUserId())
                 .eq(IsJobTicketUser::getUserRole, isSystemAttributeService.getIsSystemAttributeByKey("role.jtcolocker").getSysAttrValue())
                 .eq(IsJobTicketUser::getTicketId, dto.getTicketId()));
-        Assert.isFalse(jobTicketUser == null, "该员工卡绑定的员工暂无作业任务!");
+        Assert.isFalse(jobTicketUser == null, MessageUtils.message("assert.user.employee.card.no.work.task"));
         // 2.1判断状态
         IsJobTicket isJobTicket = isJobTicketService.getById(dto.getTicketId());
-        Assert.isFalse("0".equals(isJobTicket.getTicketStatus()), "该作业票未开始,请勿共锁!");
-        Assert.isFalse("4".equals(dto.getJobStatus()) && "4".equals(jobTicketUser.getJobStatus()), "您已共锁,请勿重复共锁!");
-        Assert.isFalse(Integer.parseInt(jobTicketUser.getJobStatus()) < 4 && "5".equals(dto.getJobStatus()), "您还未共锁,请勿操作解除共锁!");
-        Assert.isFalse("5".equals(jobTicketUser.getJobStatus()) && "5".equals(dto.getJobStatus()), "您已解除共锁,请勿重复解除锁!");
+        Assert.isFalse("0".equals(isJobTicket.getTicketStatus()), MessageUtils.message("assert.work.order.not.started.cannot.co.lock"));
+        Assert.isFalse("4".equals(dto.getJobStatus()) && "4".equals(jobTicketUser.getJobStatus()), MessageUtils.message("assert.work.order.already.co.locked.cannot.repeat"));
+        Assert.isFalse(Integer.parseInt(jobTicketUser.getJobStatus()) < 4 && "5".equals(dto.getJobStatus()), MessageUtils.message("assert.work.order.not.co.locked.cannot.unlock"));
+        Assert.isFalse("5".equals(jobTicketUser.getJobStatus()) && "5".equals(dto.getJobStatus()), MessageUtils.message("assert.work.order.already.unlocked.cannot.repeat"));
         // 3.开始操作
         iIsJobTicketUserService.update(Wrappers.<IsJobTicketUser>lambdaUpdate()
                 .eq(IsJobTicketUser::getTicketId, dto.getTicketId())
@@ -967,11 +968,11 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Integer updateSwitchList(UpdateSwitchParam dto) {
-        Assert.isFalse(dto.getList().isEmpty(), "点位开关数据不可为空!");
+        Assert.isFalse(dto.getList().isEmpty(), MessageUtils.message("assert.business.point.switch.data.not.null"));
         Date date = new Date();
         dto.getList().forEach(o -> {
-            Assert.notBlank(o.getLotoSerialNumber(), "锁定站序列号不可为空!");
-            Assert.notBlank(o.getPointSerialNumber(), "点位序列号不可为空!");
+            Assert.notBlank(o.getLotoSerialNumber(), MessageUtils.message("assert.business.loto.serial.no.not.null"));
+            Assert.notBlank(o.getPointSerialNumber(), MessageUtils.message("assert.business.point.serial.no.not.null"));
             o.setSwitchLastUpdateTime(date);
         });
         int result = 1;
@@ -1007,7 +1008,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
     @Override
     public Boolean checkBeforeToLock(Long ticketId) {
         boolean b = false;
-        Assert.notNull(ticketId, "当前作业票id不能为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.current.id.not.null"));
         // 0.检查是不是取了锁 但是没有取钥匙,如果是说明数据有问题,断过网
         // checkExTakeLock(ticketId);
         IsJobTicket isJobTicket = isJobTicketService.getById(ticketId);
@@ -1024,7 +1025,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
             // 2.如果有重复点位,取了钥匙去上锁没有归还的作业
             List<JobTicketDetailVO> jobTicketDetailVOS1 = isJobTicketService.selectConflictTicket1(points, ticketId);
             if (!jobTicketDetailVOS1.isEmpty()) {
-                Assert.isFalse(true, "请等待作业票[" + jobTicketDetailVOS1.get(0).getTicketName() + "]上锁完成!");
+                Assert.isFalse(true, MessageUtils.message("assert.work.order.wait.lock.complete", jobTicketDetailVOS1.get(0).getTicketName()));
             }
             // 3.如果上锁钥匙已经归还,需要使用别人的数据帮我们的重复点位上锁了
             // 找到别人已经上锁的并且没有解锁的,而且点位和我重复的作业
@@ -1117,7 +1118,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
 
     @Override
     public Boolean checkBeforeToUnlock(Long ticketId) {
-        Assert.notNull(ticketId, "当前作业票id不能为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.current.id.not.null"));
         // 1.查询当前作业票需要解锁的点位信息
         List<IsJobTicketPoints> listByTicketId = iIsJobTicketPointsService.list(Wrappers.<IsJobTicketPoints>lambdaQuery()
                 .eq(IsJobTicketPoints::getTicketId, ticketId));
@@ -1127,7 +1128,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
             // 2.如果有重复点位,取了钥匙去上锁没有归还的作业
             List<JobTicketDetailVO> jobTicketDetailVOS1 = isJobTicketService.selectConflictTicket1(points, ticketId);
             if (!jobTicketDetailVOS1.isEmpty()) {
-                Assert.isFalse(true, "请等待作业票[" + jobTicketDetailVOS1.get(0).getTicketName() + "]上锁完成!");
+                Assert.isFalse(true, MessageUtils.message("assert.work.order.wait.lock.complete", jobTicketDetailVOS1.get(0).getTicketName()));
             }
             // 3.如果取了钥匙去上锁已经归还,代表别的上锁已经完成,我可以解除不是重复的点位,然后手动完成作业,这样别人作业结束以后可以直接解除物理锁
             // List<JobTicketDetailVO> jobTicketDetailVOS2 = isJobTicketService.selectConflictTicket2(points, ticketId);
@@ -1279,11 +1280,11 @@ public class HardwareApiServiceImpl implements HardwareApiService {
      */
     @Override
     public Integer getLockStateByNfc(String nfc, Long ticketId) {
-        Assert.notBlank(nfc, "该锁nfc不能为空!");
+        Assert.notBlank(nfc, MessageUtils.message("assert.lock.nfc.not.null"));
         // 查询当前锁是否存在
         IsLock lock = iIsLockService.getOne(Wrappers.<IsLock>lambdaQuery()
                 .eq(IsLock::getLockNfc, nfc));
-        Assert.isFalse(lock == null, nfc + "对应的挂锁数据不存在!");
+        Assert.isFalse(lock == null, MessageUtils.message("assert.lock.nfc.corresponding.data.not.exist",nfc ));
         // 查询这个挂锁有没有不是完成或者取消的作业,然后判断作业能不能
         IsJobTicketLock lockJobByBfc = iIsJobTicketLockService.getLockJobByBfc(nfc, ticketId);
         if (lockJobByBfc != null) {

+ 46 - 45
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareMaterialApiServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanUtils;
@@ -62,10 +63,10 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         // Assert.notNull(cabinetId, "物资柜ID不能为空!");
         if (cabinetId != null) {
         } else {
-            Assert.notBlank(cabinetCode, "物资柜code不能为空!");
+            Assert.notBlank(cabinetCode, MessageUtils.message("assert.cabinet.material.code.not.null"));
             IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                     .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode));
-            Assert.isFalse(cabinet == null, "物资柜信息不存在!");
+            Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
             cabinetId = cabinet.getCabinetId();
         }
         // 0.构造返回值
@@ -135,8 +136,8 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public Boolean checkReplaceData(ReplaceMaterialDTO dto) {
-        Assert.notNull(dto.getOldMaterialsId(), "旧物资ID不能为空!");
-        Assert.notBlank(dto.getMaterialsRfid(), "新物资RFID不能为空!");
+        Assert.notNull(dto.getOldMaterialsId(), MessageUtils.message("assert.material.old.id.not.null"));
+        Assert.notBlank(dto.getMaterialsRfid(), MessageUtils.message("assert.material.new.rfid.not.null"));
         // 1.获取旧物资信息
         IsMaterials oldMaterials = iIsMaterialsService.getById(dto.getOldMaterialsId());
         // 判断旧物资和新物资的rfid是否更换
@@ -147,11 +148,11 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         } else {
             // 3.更换rfid
             // 判断是否在柜子外 判断rfid是否重复,如果重复,判断重复数据是否绑定物资柜,如果没有绑定直接用,如果绑定,报异常
-            Assert.isFalse(oldMaterials.getLoanState().equals("1"), "需要更换的物资未取出!");
+            Assert.isFalse(oldMaterials.getLoanState().equals("1"), MessageUtils.message("assert.material.to.replace.not.taken"));
             // 判断新物资RFID是否被使用
             IsMaterials one = iIsMaterialsService.getOne(Wrappers.<IsMaterials>lambdaQuery()
                     .eq(IsMaterials::getMaterialsRfid, dto.getMaterialsRfid()));
-            Assert.isFalse(one != null && one.getMaterialsCabinetId() != null && one.getMaterialsCabinetId() != 0, "该RFID已被使用!");
+            Assert.isFalse(one != null && one.getMaterialsCabinetId() != null && one.getMaterialsCabinetId() != 0, MessageUtils.message("assert.material.rfid.already.used"));
             // 判断新物资是否在物资当前柜子中
             /*if (one != null) {
                 IsMaterialsLoanException one1 = isMaterialsLoanExceptionService.getOne(Wrappers.<IsMaterialsLoanException>lambdaQuery()
@@ -160,7 +161,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
                         .eq(IsMaterialsLoanException::getRestitutionToId, oldMaterials.getMaterialsCabinetId())
                         .orderByDesc(IsMaterialsLoanException::getMisplaceId)
                         .last("offset 0 rows fetch next 1 rows only"));
-                Assert.isTrue(one1 != null, "请在该柜中放入新物资!");
+                Assert.isTrue(one1 != null, MessageUtils.message("assert.business.cabinet.put.new.material"));
             }*/
 
         }
@@ -170,7 +171,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
     @Transactional
     @Override
     public Boolean insertCheckedRecord(ReplaceMaterialParamDTO dto) throws JsonProcessingException {
-        Assert.isFalse(dto.getList().isEmpty(), "没有确定要维修或更换的物资!");
+        Assert.isFalse(dto.getList().isEmpty(), MessageUtils.message("assert.material.no.maintain.or.replace"));
         Long cabinetId = null;
         // 因为比较复杂,循环处理
         for (ReplaceMaterialDTO replaceMaterialDTO : dto.getList()) {
@@ -179,7 +180,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
                 System.out.println("进来了-------------------");
                 continue;
             }
-            Assert.notNull(replaceMaterialDTO.getOldMaterialsId(), "旧物资ID不能为空!");
+            Assert.notNull(replaceMaterialDTO.getOldMaterialsId(), MessageUtils.message("assert.material.old.id.not.null"));
             IsMaterials oldMaterial = iIsMaterialsService.getById(replaceMaterialDTO.getOldMaterialsId());
             cabinetId = oldMaterial.getMaterialsCabinetId();
             // 查询该物资的最新报异常记录
@@ -274,8 +275,8 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
             if (!oldMaterial.getMaterialsRfid().equals(replaceMaterialDTO.getMaterialsRfid()) && newMaterials != null) {
                 // 如果发现物资是存在的,判断下有没有绑定柜子
-                Assert.isFalse(newMaterials.getMaterialsCabinetId() != null && newMaterials.getMaterialsCabinetId() != 0, "该物资存在所属柜子,不可更换!");
-                Assert.isTrue(newMaterials.getStatus().equals("0"), "更换的物资异常,不可更换!");
+                Assert.isFalse(newMaterials.getMaterialsCabinetId() != null && newMaterials.getMaterialsCabinetId() != 0, MessageUtils.message("assert.material.has.cabinet.cannot.replace"));
+                Assert.isTrue(newMaterials.getStatus().equals("0"), MessageUtils.message("assert.material.replace.abnormal"));
                 // 如果没有绑定柜子,则可以开始绑定
                 iIsMaterialsService.update(Wrappers.<IsMaterials>lambdaUpdate()
                         .eq(IsMaterials::getMaterialsId, newMaterials.getMaterialsId())
@@ -332,10 +333,10 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
     @Transactional
     @Override
     public Boolean insertReplaceRecord(ReplaceMaterialParamDTO dto) throws JsonProcessingException {
-        Assert.isFalse(dto.getList().isEmpty(), "没有确定要维修或更换的物资!");
+        Assert.isFalse(dto.getList().isEmpty(), MessageUtils.message("assert.material.no.maintain.or.replace"));
         // 因为比较复杂,循环处理
         for (ReplaceMaterialDTO replaceMaterialDTO : dto.getList()) {
-            Assert.notNull(replaceMaterialDTO.getOldMaterialsId(), "旧物资ID不能为空!");
+            Assert.notNull(replaceMaterialDTO.getOldMaterialsId(), MessageUtils.message("assert.material.old.id.not.null"));
             IsMaterials oldMaterial = iIsMaterialsService.getById(replaceMaterialDTO.getOldMaterialsId());
             // 1.查询该物资的最新报异常记录
             IsMaterialsCheckRecord checkRecord = isMaterialsCheckRecordService.getOne(Wrappers.<IsMaterialsCheckRecord>lambdaQuery()
@@ -440,7 +441,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         } else {
             Assert.notBlank(dto.getLoanFromCode(), "物资柜code不能空!");
             IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(dto.getLoanFromCode());
-            Assert.isTrue(cabinetByCode != null, "物资柜不存在!");
+            Assert.isTrue(cabinetByCode != null, MessageUtils.message("assert.cabinet.material.not.exist"));
             dto.setLoanFromId(cabinetByCode.getCabinetId());
         }
         IsMaterialsLoanException loanException = new IsMaterialsLoanException();
@@ -459,7 +460,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         } else {
             Assert.notBlank(dto.getLoanFromCode(), "物资柜code不能空!");
             IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(dto.getLoanFromCode());
-            Assert.isTrue(cabinetByCode != null, "物资柜不存在!");
+            Assert.isTrue(cabinetByCode != null, MessageUtils.message("assert.cabinet.material.not.exist"));
             dto.setLoanFromId(cabinetByCode.getCabinetId());
         }
         isMaterialsLoanExceptionService.update(Wrappers.<IsMaterialsLoanException>lambdaUpdate()
@@ -479,7 +480,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
             Assert.notBlank(dto.getCabinetCode(), "请告诉我物资柜code!");
             IsMaterialsCabinet one = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                     .eq(IsMaterialsCabinet::getCabinetCode, dto.getCabinetCode()));
-            Assert.isFalse(one == null, "物资柜信息不存在!");
+            Assert.isFalse(one == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
             dto.setCabinetId(one.getCabinetId());
         }
         Assert.notBlank(dto.getOpenType(), "开门类型不可为空!");
@@ -497,7 +498,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
             Assert.notBlank(dto.getCabinetCode(), "请告诉我物资柜code!");
             IsMaterialsCabinet one = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                     .eq(IsMaterialsCabinet::getCabinetCode, dto.getCabinetCode()));
-            Assert.isFalse(one == null, "物资柜信息不存在!");
+            Assert.isFalse(one == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
             dto.setCabinetId(one.getCabinetId());
         }
         iIsCabinetOpenRecordService.update(Wrappers.<IsCabinetOpenRecord>lambdaUpdate()
@@ -521,7 +522,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         } else {
             IsMaterialsCabinet one = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                     .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode));
-            Assert.isFalse(one == null, "无法识别" + cabinetCode + "物资柜身份!");
+            Assert.isFalse(one == null, MessageUtils.message("assert.cabinet.material.code.identity.unrecognized", cabinetCode));
             cabinetId = one.getCabinetId();
         }
         // 0.构造返回值
@@ -599,7 +600,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public IsMaterials selectMaterialByRfid(String rfid) {
-        Assert.notBlank(rfid, "物资RFID不能为空!");
+        Assert.notBlank(rfid, MessageUtils.message("assert.material.rfid.not.null"));
         IsMaterials materials = iIsMaterialsService.getOne(Wrappers.<IsMaterials>lambdaQuery()
                 .eq(IsMaterials::getMaterialsRfid, rfid));
         if (materials != null && materials.getMaterialsTypeId() != null) {
@@ -615,7 +616,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public List<IsMaterials> selectMaterialsByRfidList(RfidListDTO dto) {
-        Assert.isFalse(dto.getList().isEmpty(), "物资RFID不能为空!");
+        Assert.isFalse(dto.getList().isEmpty(), MessageUtils.message("assert.material.rfid.not.null"));
         List<IsMaterials> materialsList = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
                 .in(IsMaterials::getMaterialsRfid, dto.getList()));
         if (!materialsList.isEmpty()) {
@@ -641,7 +642,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         Assert.notBlank(dto.getCabinetCode(), "物资柜子code不能为空!");
         Assert.isFalse(dto.getList().isEmpty(), "物资中无物资!");
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getCabinetByCode(dto.getCabinetCode());
-        Assert.isFalse(cabinet == null, dto.getCabinetCode() + "物资柜code不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.business.cabinet.code.not.exist",dto.getCabinetCode()));
         List<IsMaterials> list = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
                 .eq(IsMaterials::getMaterialsCabinetId, cabinet.getCabinetId())
                 .in(IsMaterials::getMaterialsRfid, dto.getList()));
@@ -668,22 +669,22 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
             List<String> failRfidList = new ArrayList<>();
             for (RecRetMaterialDTO dto : recRetParamDTO.getList()) {
                 // 1.断言判断
-                Assert.notBlank(dto.getMaterialsRfid(), "请告诉我物资的rfid!");
-                Assert.notBlank(dto.getLoanState(), "请告诉我是借出还是归还!");
+                Assert.notBlank(dto.getMaterialsRfid(), MessageUtils.message("assert.material.specify.rfid"));
+                Assert.notBlank(dto.getLoanState(), MessageUtils.message("assert.material.specify.borrow.or.return"));
                 try {
                     // 1.1 开始查询物资,物资柜传的rfid
                     IsMaterials materials = iIsMaterialsService.getOne(Wrappers.<IsMaterials>lambdaQuery()
                             .eq(IsMaterials::getMaterialsRfid, dto.getMaterialsRfid()));
-                    Assert.isFalse(materials == null, "通过RFID:" + dto.getMaterialsRfid() + "未查询到物资!");
+                    Assert.isFalse(materials == null, MessageUtils.message("assert.material.rfid.not.found", dto.getMaterialsRfid()));
                     // 如果物资是借出状态,又来借出就报错
                     if ("0".equals(materials.getLoanState()) && "0".equals(dto.getLoanState())) {
-                        failRfidList.add(dto.getMaterialsRfid() + "物资已经是借出状态,无法再借出!");
-                        Assert.isFalse(true, dto.getMaterialsRfid() + "物资已经是借出状态,无法再借出!");
+                        failRfidList.add(MessageUtils.message("assert.material.rfid.already.borrowed",dto.getMaterialsRfid()));
+                        Assert.isFalse(true, MessageUtils.message("assert.material.rfid.already.borrowed",dto.getMaterialsRfid()));
                     }
                     // 如果已经再柜中,又来放入
                     if ("1".equals(materials.getLoanState()) && "1".equals(dto.getLoanState())) {
-                        failRfidList.add(dto.getMaterialsRfid() + "物资已经是柜中状态,无法再放入!");
-                        Assert.isFalse(true, dto.getMaterialsRfid() + "物资已经是柜中状态,无法再放入!");
+                        failRfidList.add(MessageUtils.message("assert.material.rfid.already.in.cabinet", dto.getMaterialsRfid()));
+                        Assert.isFalse(true, MessageUtils.message("assert.material.rfid.already.in.cabinet", dto.getMaterialsRfid()));
                     }
                     // 2.开始更新物资状态
                     iIsMaterialsService.update(Wrappers.<IsMaterials>lambdaUpdate()
@@ -701,7 +702,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
                         // 1.2 开始查询物资柜子,物资柜传的code
                         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                                 .eq(IsMaterialsCabinet::getCabinetCode, dto.getRestitutionToCabinetCode()));
-                        Assert.isFalse(cabinet == null, "通过物资柜code:" + dto.getRestitutionToCabinetCode() + "未查询到物资柜信息!");
+                        Assert.isFalse(cabinet == null, MessageUtils.message("assert.material.cabinet.code.not.found",dto.getRestitutionToCabinetCode()));
                         // 4.2开始更新归还记录表
                         ReturnLoanDTO returnLoanDTO = new ReturnLoanDTO();
                         returnLoanDTO.setMaterialsId(materials.getMaterialsId());
@@ -763,13 +764,13 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public CabinetCheckVO getLastCheckPlanByCabinetCode(String cabinetCode) {
-        Assert.notBlank(cabinetCode, "请告诉我这是哪台物资柜!");
+        Assert.notBlank(cabinetCode, MessageUtils.message("assert.cabinet.material.specify"));
         // 1.获取物资柜信息
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                 .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode)
                 .orderByDesc(IsMaterialsCabinet::getCabinetId)
                 .last("offset 0 rows fetch next 1 rows only"));
-        Assert.isFalse(cabinet == null, "物资柜信息不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
         // 2.获取用户信息
         Long userId = SecurityUtils.getUserId();
         // 3.获取这个物资柜当前最近一次未完成的检查计划
@@ -779,12 +780,12 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
                 .ne(IsMaterialsPlanCabinet::getStatus, "1")
                 .orderByDesc(IsMaterialsPlanCabinet::getPlanId)
                 .last("offset 0 rows fetch next 1 rows only"));
-        Assert.isFalse(planCabinet == null, "该物资柜当前无您的检查计划!");
+        Assert.isFalse(planCabinet == null, MessageUtils.message("assert.cabinet.material.no.inspection.plan"));
         // 3.1检查当前登陆人的账号是否有检查计划
         IsMaterialsCheckPlan checkPlan = iIsMaterialsCheckPlanService.getOne(Wrappers.<IsMaterialsCheckPlan>lambdaQuery()
                 .eq(IsMaterialsCheckPlan::getPlanId, planCabinet.getPlanId())
                 .eq(IsMaterialsCheckPlan::getCheckUserId, userId));
-        Assert.isFalse(checkPlan == null, "当前物资柜无需您执行的检查计划!");
+        Assert.isFalse(checkPlan == null, MessageUtils.message("assert.cabinet.material.no.executable.inspection.plan"));
         // 3.2查询此次检查记录
         List<IsMaterialsCheckRecord> checkRecords = isMaterialsCheckRecordService.list(Wrappers.<IsMaterialsCheckRecord>lambdaQuery()
                 .eq(IsMaterialsCheckRecord::getPlanId, planCabinet.getPlanId()));
@@ -886,13 +887,13 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public CabinetHomePageVO getCabinetHomePage(String cabinetCode) {
-        Assert.notBlank(cabinetCode, "请告诉我这是哪台物资柜!");
+        Assert.notBlank(cabinetCode, MessageUtils.message("assert.cabinet.material.specify"));
         // 1.获取物资柜信息
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                 .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode)
                 .orderByDesc(IsMaterialsCabinet::getCabinetId)
                 .last("offset 0 rows fetch next 1 rows only"));
-        Assert.isFalse(cabinet == null, "物资柜信息不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
         // 1.1柜子中的物资信息
         List<IsMaterials> isMaterials = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
                 .eq(IsMaterials::getMaterialsCabinetId, cabinet.getCabinetId()));
@@ -979,11 +980,11 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public MaterialsCheckInitVO getCheckMaterialsByCabinetCode(String cabinetCode, Long planId) {
-        Assert.notBlank(cabinetCode, "cabinetCode不能为空!");
-        Assert.notNull(planId, "检查计划planId不能为空!");
+        Assert.notBlank(cabinetCode, MessageUtils.message("assert.cabinet.code.not.null"));
+        Assert.notNull(planId, MessageUtils.message("assert.inspection.plan.id.not.null"));
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                 .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode));
-        Assert.isFalse(cabinet == null, "物资柜信息不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
         MaterialsCheckInitVO materialsCheckInitVO = new MaterialsCheckInitVO();
         // 检查此次数据是否初始化,初始化了,就不用生成直接查
         List<IsMaterialsCheckRecord> checkRecords = isMaterialsCheckRecordService.getCheckMaterialsByCabinetCode(planId, cabinet.getCabinetId());
@@ -1074,9 +1075,9 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
     @Override
     public Boolean insertSubmitPlan(SubmitPlanDTO dto) {
         Assert.notNull(dto.getPlanId(), "计划id不能空!");
-        Assert.notBlank(dto.getCabinetCode(), "物资柜code不能为空!");
+        Assert.notBlank(dto.getCabinetCode(), MessageUtils.message("assert.cabinet.material.code.not.null"));
         IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(dto.getCabinetCode());
-        Assert.isFalse(cabinetByCode == null, "物资柜信息不存在!");
+        Assert.isFalse(cabinetByCode == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
         // 1.检查初始化的物资检查数据有没有检查完毕
         List<IsMaterialsCheckRecord> list = isMaterialsCheckRecordService.list(Wrappers.<IsMaterialsCheckRecord>lambdaQuery()
                 .eq(IsMaterialsCheckRecord::getCabinetId, cabinetByCode.getCabinetId())
@@ -1124,12 +1125,12 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public Boolean insertSign(SignDTO dto) {
-        Assert.notBlank(dto.getCabinetCode(), "物资柜code不能为空!");
+        Assert.notBlank(dto.getCabinetCode(), MessageUtils.message("assert.cabinet.material.code.not.null"));
         Assert.notNull(dto.getPlanId(), "计划id不能为空!");
         Assert.notBlank(dto.getSignatureImg(), "签名不能为空!");
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                 .eq(IsMaterialsCabinet::getCabinetCode, dto.getCabinetCode()));
-        Assert.isFalse(cabinet == null, "物资柜信息不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.material.info.not.exist"));
         /*IsMaterialsPlanCabinet one = iIsMaterialsPlanCabinetService.getOne(Wrappers.<IsMaterialsPlanCabinet>lambdaQuery()
                 .eq(IsMaterialsPlanCabinet::getPlanId, dto.getPlanId())
                 .eq(IsMaterialsPlanCabinet::getCabinetId, cabinet.getCabinetId()));
@@ -1144,7 +1145,7 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public AutoReplaceReportVO insertAutoChange(AutoChangeDTO dto) {
-        Assert.notBlank(dto.getCabinetCode(), "物资柜CODE不能为空!");
+        Assert.notBlank(dto.getCabinetCode(), MessageUtils.message("assert.cabinet.material.code.not.null"));
         IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(dto.getCabinetCode());
         // 0.构造记录的集合
         List<IsMaterialsChangeRecord> isMaterialsChangeRecords = new ArrayList<>();
@@ -1250,10 +1251,10 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
 
     @Override
     public Boolean startCheckPlan(StartCheckPlanDTO dto) {
-        Assert.notNull(dto.getPlanId(), "planId不可为空!");
+        Assert.notNull(dto.getPlanId(), MessageUtils.message("assert.common.param.id.not.null"));
         Assert.notBlank(dto.getCabinetCode(), "物资柜code不可为空!");
         IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(dto.getCabinetCode());
-        Assert.isTrue(cabinetByCode != null, dto.getCabinetCode() + "物资柜不存在!");
+        Assert.isTrue(cabinetByCode != null, dto.getCabinetCode() + MessageUtils.message("assert.cabinet.material.not.exist"));
         IsMaterialsCheckPlan checkPlan = iIsMaterialsCheckPlanService.getOne(Wrappers.<IsMaterialsCheckPlan>lambdaQuery()
                 .eq(IsMaterialsCheckPlan::getPlanId, dto.getPlanId()));
         IsMaterialsPlanCabinet planCabinet = iIsMaterialsPlanCabinetService.getOne(Wrappers.<IsMaterialsPlanCabinet>lambdaQuery()

+ 8 - 6
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsCheckTaskMailServiceImpl.java

@@ -1,15 +1,17 @@
 package com.ktg.iscs.service.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import java.util.List;
 import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ktg.iscs.mapper.IsCheckTaskMailMapper;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsCheckTaskMail;
+import com.ktg.iscs.mapper.IsCheckTaskMailMapper;
 import com.ktg.iscs.service.IIsCheckTaskMailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 检查任务关联邮件Service业务层处理
@@ -82,7 +84,7 @@ public class IsCheckTaskMailServiceImpl extends ServiceImpl<IsCheckTaskMailMappe
     @Override
     public int deleteIsCheckTaskMailByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isCheckTaskMailMapper.deleteIsCheckTaskMailByRecordIds(longIds);
     }

+ 5 - 4
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsCheckTaskServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsCheckTask;
 import com.ktg.iscs.mapper.IsCheckTaskMapper;
 import com.ktg.iscs.service.IIsCheckTaskService;
@@ -60,7 +61,7 @@ public class IsCheckTaskServiceImpl extends ServiceImpl<IsCheckTaskMapper, IsChe
     @Override
     public int insertIsCheckTask(IsCheckTask isCheckTask) {
         /*// 1.检查数据
-        Assert.notBlank(isCheckTask.getCheckName(), "任务名称不可为空!");
+        Assert.notBlank(isCheckTask.getCheckName(), MessageUtils.message("assert.business.task.name.not.null"));
         Assert.notBlank(isCheckTask.getCabinetIdStr(), "请选择需要检查的物资柜信息!");
         Assert.notBlank(isCheckTask.getUserIdStr(), "请选择参与人员信息!");
         Assert.notBlank(isCheckTask.getCron(), "请告知我cron!");
@@ -105,7 +106,7 @@ public class IsCheckTaskServiceImpl extends ServiceImpl<IsCheckTaskMapper, IsChe
     @Override
     public int deleteIsCheckTaskByCheckIds(String checkIds)
     {
-        Assert.notBlank(checkIds, "请选择需要删除的数据!");
+        Assert.notBlank(checkIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(checkIds);
         return isCheckTaskMapper.deleteIsCheckTaskByCheckIds(longIds);
     }
@@ -125,10 +126,10 @@ public class IsCheckTaskServiceImpl extends ServiceImpl<IsCheckTaskMapper, IsChe
     @Override
     public Boolean checkMaterialsCabinet(Long checkId) {
         // 1.开始检查参数
-        Assert.notNull(checkId, "当前任务缺失参数");
+        Assert.notNull(checkId, MessageUtils.message("assert.business.current.task.param.missing"));
         // 2.查询当前任务
         IsCheckTask checkTask = getById(checkId);
-        Assert.notNull(checkTask, "该任务不存在");
+        Assert.notNull(checkTask, MessageUtils.message("assert.business.task.not.exist"));
         // 3.开始检查人员信息
         //iSysUserService.
 

+ 12 - 11
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsHardwareServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsHardware;
 import com.ktg.iscs.domain.dto.hardware.HardwareAutomaticDTO;
 import com.ktg.iscs.domain.dto.hardware.HardwarePageDTO;
@@ -63,16 +64,16 @@ public class IsHardwareServiceImpl extends ServiceImpl<IsHardwareMapper, IsHardw
     public int insertIsHardware(IsHardware isHardware)
     {
         // 断言判断
-        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareCode()), "硬件编码不可为空!");
-        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareName()), "硬件名称不可为空!");
+        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareCode()), MessageUtils.message("assert.hardware.code.not.null"));
+        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareName()), MessageUtils.message("assert.hardware.name.not.null"));
         // 检查hardwareCode是否被占用
         List<IsHardware> list = list(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getHardwareCode, isHardware.getHardwareCode()));
-        Assert.isTrue(list.isEmpty(), isHardware.getHardwareCode() + "已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.hardware.code.already.used",isHardware.getHardwareCode()));
         // 检查序列号是否被占用
         List<IsHardware> list1 = list(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getSerialNumber, isHardware.getSerialNumber()));
-        Assert.isTrue(list1.isEmpty(), isHardware.getSerialNumber() + "已被使用!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.hardware.code.already.used"),isHardware.getSerialNumber());
         return isHardwareMapper.insertIsHardware(isHardware);
     }
 
@@ -86,19 +87,19 @@ public class IsHardwareServiceImpl extends ServiceImpl<IsHardwareMapper, IsHardw
     public int updateIsHardware(IsHardware isHardware)
     {
         // 断言判断
-        Assert.notNull(isHardware.getId(), "id不可为空!");
-        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareCode()), "硬件编码不可为空!");
-        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareName()), "硬件名称不可为空!");
+        Assert.notNull(isHardware.getId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareCode()), MessageUtils.message("assert.hardware.code.not.null"));
+        Assert.isFalse(StringUtils.isBlank(isHardware.getHardwareName()), MessageUtils.message("assert.hardware.name.not.null"));
         // 检查hardwareCode是否被占用
         List<IsHardware> list = list(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getHardwareCode, isHardware.getHardwareCode())
                 .ne(IsHardware::getId, isHardware.getId()));
-        Assert.isTrue(list.isEmpty(), isHardware.getHardwareCode() + "已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.hardware.code.already.used",isHardware.getHardwareCode()));
         // 检查序列号是否被占用
         List<IsHardware> list1 = list(Wrappers.<IsHardware>lambdaQuery()
                 .eq(IsHardware::getSerialNumber, isHardware.getSerialNumber())
                 .ne(IsHardware::getId, isHardware.getId()));
-        Assert.isTrue(list1.isEmpty(), isHardware.getSerialNumber() + "已被使用!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.hardware.code.already.used",isHardware.getSerialNumber()));
         return isHardwareMapper.updateIsHardware(isHardware);
     }
 
@@ -111,7 +112,7 @@ public class IsHardwareServiceImpl extends ServiceImpl<IsHardwareMapper, IsHardw
     @Override
     public int deleteIsHardwareByIds(String ids)
     {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         return isHardwareMapper.deleteIsHardwareByIds(longIds);
     }
@@ -161,7 +162,7 @@ public class IsHardwareServiceImpl extends ServiceImpl<IsHardwareMapper, IsHardw
     @Override
     public Boolean insertIsHardware(HardwareAutomaticDTO dto) {
         // 断言判断
-        Assert.notNull(dto.getId(), "id不可为空!");
+        Assert.notNull(dto.getId(), MessageUtils.message("assert.common.param.id.not.null"));
         if (StringUtils.isBlank(dto.getStatus())
                 || dto.getUsedTimes() != null
                 || dto.getUsedLife() != null) {

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsHardwareTypeServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.constant.UserConstants;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.obj.BeanUtils;
 import com.ktg.iscs.domain.IsHardware;
@@ -107,7 +108,7 @@ public class IsHardwareTypeServiceImpl extends ServiceImpl<IsHardwareTypeMapper,
     @Override
     public int deleteIsHardwareTypeByIds(String ids)
     {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         for (Long longId : longIds) {
             List<IsHardware> list = iIsHardwareService.list(Wrappers.<IsHardware>lambdaQuery()

+ 16 - 15
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsIsolationPointServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.redis.RedisCache;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.*;
 import com.ktg.iscs.domain.dto.hardwareApi.UpdateSwitchStatusDTO;
 import com.ktg.iscs.domain.dto.point.PagePointDTO;
@@ -83,21 +84,21 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
     public int insertIsIsolationPoint(IsIsolationPoint isIsolationPoint)
     {
         // 断言校验
-        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointName()), "隔离点名称不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointCode()), "隔离点编号名称不可为空!");
+        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointName()), MessageUtils.message("assert.isolation.point.name.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointCode()), MessageUtils.message("assert.isolation.point.code.name.not.null"));
         List<IsIsolationPoint> list = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointName, isIsolationPoint.getPointName()));
-        Assert.isTrue(list.isEmpty(), "该隔离点名称已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.isolation.point.name.already.used"));
         List<IsIsolationPoint> list2 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getRfidId, isIsolationPoint.getRfidId()));
-        Assert.isTrue(list2.isEmpty(), "该NFC已被使用!");
+        Assert.isTrue(list2.isEmpty(), MessageUtils.message("assert.isolation.point.nfc.already.used"));
         List<IsIsolationPoint> list3 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointCode, isIsolationPoint.getPointCode()));
-        Assert.isTrue(list3.isEmpty(), "该编号已被使用!");
+        Assert.isTrue(list3.isEmpty(), MessageUtils.message("assert.isolation.point.code.already.used"));
         List<IsIsolationPoint> list4 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getLotoId, isIsolationPoint.getLotoId())
                 .eq(IsIsolationPoint::getPointSerialNumber, isIsolationPoint.getPointSerialNumber()));
-        Assert.isTrue(list4.isEmpty(), "该序列号已被使用!");
+        Assert.isTrue(list4.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         int i = isIsolationPointMapper.insertIsIsolationPoint(isIsolationPoint);
         // 如果绑定的loto站已经绑定了mapId,则需要往is_map_point插入数据
         if (isIsolationPoint.getLotoId() != null) {
@@ -134,27 +135,27 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
     public int updateIsIsolationPoint(IsIsolationPoint isIsolationPoint)
     {
         // 断言校验
-        Assert.notNull(isIsolationPoint.getPointId(), "隔离点ID不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointName()), "隔离点名称不可为空!");
+        Assert.notNull(isIsolationPoint.getPointId(), MessageUtils.message("assert.isolation.point.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointName()), MessageUtils.message("assert.isolation.point.name.not.null"));
         // Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointCode()), "隔离点编号名称不可为空!");
         // Assert.notNull(isIsolationPoint.getWorkareaId(), "所属区域不可为空!");
         List<IsIsolationPoint> list = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointName, isIsolationPoint.getPointName())
                 .ne(IsIsolationPoint::getPointId, isIsolationPoint.getPointId()));
-        Assert.isTrue(list.isEmpty(), "该隔离点名称已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.isolation.point.name.already.used"));
         List<IsIsolationPoint> list2 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getRfidId, isIsolationPoint.getRfidId())
                 .ne(IsIsolationPoint::getPointId, isIsolationPoint.getPointId()));
-        Assert.isTrue(list2.isEmpty(), "该NFC已被使用!");
+        Assert.isTrue(list2.isEmpty(), MessageUtils.message("assert.isolation.point.nfc.already.used"));
         List<IsIsolationPoint> list3 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointCode, isIsolationPoint.getPointCode())
                 .ne(IsIsolationPoint::getPointId, isIsolationPoint.getPointId()));
-        Assert.isTrue(list3.isEmpty(), "该编号已被使用!");
+        Assert.isTrue(list3.isEmpty(), MessageUtils.message("assert.isolation.point.code.already.used"));
         List<IsIsolationPoint> list4 = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointSerialNumber, isIsolationPoint.getPointSerialNumber())
                 .eq(IsIsolationPoint::getLotoId, isIsolationPoint.getLotoId())
                 .ne(IsIsolationPoint::getPointId, isIsolationPoint.getPointId()));
-        Assert.isTrue(list4.isEmpty(), "该序列号已被使用!");
+        Assert.isTrue(list4.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         isIsolationPoint.setUpdateTime(DateUtils.getNowDate());
         return isIsolationPointMapper.updateIsIsolationPoint(isIsolationPoint);
     }
@@ -168,7 +169,7 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
     @Override
     public int deleteIsIsolationPointByPointIds(String pointIds)
     {
-        Assert.notBlank(pointIds, "请选择需要删除的数据!");
+        Assert.notBlank(pointIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(pointIds);
         // 查询有没有sop使用改隔离点,有的话不允许删除
         checkPointUsed(longIds);
@@ -182,7 +183,7 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
             List<Long> usedPointIds = sopPoints.stream().map(IsSopPoints::getPointId).collect(Collectors.toList());
             List<IsIsolationPoint> isIsolationPoints = listByIds(usedPointIds);
             List<String> usedPointNames = isIsolationPoints.stream().map(IsIsolationPoint::getPointName).collect(Collectors.toList());
-            Assert.isTrue(false, usedPointNames + "点位正在被sop使用,无法删除!");
+            Assert.isTrue(false, MessageUtils.message("assert.isolation.point.name.used.by.sop.cannot.delete",usedPointNames ));
         }
         // 检查电柜有没有配置该隔离点,如果还在配置中,需要先从电柜解除绑定
         for (Long longId : longIds) {
@@ -224,7 +225,7 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
 
     @Override
     public List<PointDetailVO> getPointDetailList(List<Long> pointIds) {
-        Assert.isTrue(!pointIds.isEmpty(), "查询隔离点信息出错!");
+        Assert.isTrue(!pointIds.isEmpty(), MessageUtils.message("assert.isolation.point.query.error"));
         List<PointDetailVO> isIsolationPoints = isIsolationPointMapper.getPointDetailList(pointIds);
         return isIsolationPoints;
     }

+ 13 - 12
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobCardServiceImpl.java

@@ -11,6 +11,7 @@ import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.domain.model.LoginUser;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.framework.web.service.SysLoginService;
@@ -115,7 +116,7 @@ public class IsJobCardServiceImpl extends ServiceImpl<IsJobCardMapper, IsJobCard
     @Override
     public int deleteIsJobCardByCardIds(String cardIds)
     {
-        Assert.notBlank(cardIds, "请选择需要删除的数据!");
+        Assert.notBlank(cardIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(cardIds);
         return isJobCardMapper.deleteIsJobCardByCardIds(longIds);
     }
@@ -134,24 +135,24 @@ public class IsJobCardServiceImpl extends ServiceImpl<IsJobCardMapper, IsJobCard
 
     @Override
     public String loginByCard(IsJobCardLoginReqVO reqVO) {
-        Assert.notBlank(reqVO.cardNfc, "请输入卡号!");
+        Assert.notBlank(reqVO.cardNfc, MessageUtils.message("assert.business.card.no.required"));
         IsJobCard isJobCard = isJobCardMapper.selectByNfc(reqVO.cardNfc);
-        Assert.notNull(isJobCard, "卡不存在!");
+        Assert.notNull(isJobCard, MessageUtils.message("assert.business.card.not.exist"));
         Long userId = isJobCard.getUserId();
         SysUser sysUser = sysUserMapper.selectUserById(userId);
-        Assert.notNull(sysUser, "没有关联用户!");
+        Assert.notNull(sysUser, MessageUtils.message("assert.business.no.associated.user"));
         String token = sysLoginService.loginWithoutPassword(sysUser);
         return token;
     }
 
     @Override
     public AjaxResult loginByCard1(IsJobCardLoginReqVO reqVO) {
-        Assert.notBlank(reqVO.cardNfc, "请输入卡号!");
+        Assert.notBlank(reqVO.cardNfc, MessageUtils.message("assert.business.card.no.required"));
         IsJobCard isJobCard = isJobCardMapper.selectByNfc(reqVO.cardNfc);
-        Assert.notNull(isJobCard, "卡不存在!");
+        Assert.notNull(isJobCard, MessageUtils.message("assert.business.card.not.exist"));
         Long userId = isJobCard.getUserId();
         SysUser sysUser = sysUserMapper.selectUserById(userId);
-        Assert.notNull(sysUser, "没有关联用户!");
+        Assert.notNull(sysUser, MessageUtils.message("assert.business.no.associated.user"));
         String token = sysLoginService.loginWithoutPassword(sysUser);
         // 生成令牌
         AjaxResult ajax = AjaxResult.success();
@@ -165,11 +166,11 @@ public class IsJobCardServiceImpl extends ServiceImpl<IsJobCardMapper, IsJobCard
     @Override
     public IsJobCardInfoRespVO getCardInfoByLoginUser(HttpServletRequest request) {
         LoginUser loginUser = tokenService.getLoginUser(request);
-        Assert.notNull(loginUser, "请先登录!");
+        Assert.notNull(loginUser, MessageUtils.message("assert.business.please.login.first"));
         SysUser user = sysUserService.selectUserById(loginUser.getUser().getUserId());
-        Assert.notNull(user, "用户不存在!");
+        Assert.notNull(user, MessageUtils.message("assert.business.user.not.exist"));
         IsJobCard isJobCard = isJobCardMapper.selectByUserId(user.getUserId());
-        Assert.notNull(isJobCard, "用户未绑定卡!");
+        Assert.notNull(isJobCard, MessageUtils.message("assert.business.user.not.bound.card"));
 
         List<SysRole> roleList = iSysRoleService.getRolesByUserId(user.getUserId());
 
@@ -180,9 +181,9 @@ public class IsJobCardServiceImpl extends ServiceImpl<IsJobCardMapper, IsJobCard
 
     @Override
     public IsJobCard getCardInfoByCardNfc(String cardNfc) {
-        Assert.notBlank(cardNfc, "请输入卡号!");
+        Assert.notBlank(cardNfc, MessageUtils.message("assert.business.card.no.required"));
         IsJobCard isJobCard = isJobCardMapper.selectByNfc(cardNfc);
-        Assert.notNull(isJobCard, "该卡无效!");
+        Assert.notNull(isJobCard, MessageUtils.message("assert.business.card.invalid"));
         SysUser user = sysUserService.selectUserById(isJobCard.getUserId());
         isJobCard.setNickName(user.getNickName());
         isJobCard.setUserName(user.getUserName());

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketKeyServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsJobTicketKey;
 import com.ktg.iscs.domain.vo.ticketKey.IsJobTicketKeyVO;
 import com.ktg.iscs.mapper.IsJobTicketKeyMapper;
@@ -84,7 +85,7 @@ public class IsJobTicketKeyServiceImpl extends ServiceImpl<IsJobTicketKeyMapper,
     @Override
     public int deleteIsJobTicketKeyByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isJobTicketKeyMapper.deleteIsJobTicketKeyByRecordIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketLockServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsJobTicketLock;
 import com.ktg.iscs.domain.vo.hardwareApi.JobTicketLockVO;
 import com.ktg.iscs.mapper.IsJobTicketLockMapper;
@@ -84,7 +85,7 @@ public class IsJobTicketLockServiceImpl extends ServiceImpl<IsJobTicketLockMappe
     @Override
     public int deleteIsJobTicketLockByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isJobTicketLockMapper.deleteIsJobTicketLockByRecordIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketLocksetServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsJobTicketLockset;
 import com.ktg.iscs.domain.vo.ticketLockset.IsJobTicketLocksetVO;
 import com.ktg.iscs.mapper.IsJobTicketLocksetMapper;
@@ -84,7 +85,7 @@ public class IsJobTicketLocksetServiceImpl extends ServiceImpl<IsJobTicketLockse
     @Override
     public int deleteIsJobTicketLocksetByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isJobTicketLocksetMapper.deleteIsJobTicketLocksetByRecordIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketPointsServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsJobTicketPoints;
 import com.ktg.iscs.domain.vo.ticketPoints.IsJobTicketPointsVO;
 import com.ktg.iscs.mapper.IsJobTicketPointsMapper;
@@ -84,7 +85,7 @@ public class IsJobTicketPointsServiceImpl extends ServiceImpl<IsJobTicketPointsM
     @Override
     public int deleteIsJobTicketPointsByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isJobTicketPointsMapper.deleteIsJobTicketPointsByRecordIds(longIds);
     }

+ 22 - 21
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketServiceImpl.java

@@ -8,6 +8,7 @@ import com.ktg.common.core.redis.RedisCache;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.*;
@@ -99,7 +100,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
     public JobTicketDetailVO selectIsJobTicketByTicketId(Long ticketId) {
         // 1.查询基础数据
         IsJobTicket jobTicket = isJobTicketMapper.selectIsJobTicketByTicketId(ticketId);
-        Assert.notNull(jobTicket, "作业票信息不存在!");
+        Assert.notNull(jobTicket, MessageUtils.message("assert.work.order.info.not.exist"));
         JobTicketDetailVO jobTicketDetailVO = BeanUtils.toBean(jobTicket, JobTicketDetailVO.class);
         // 1.1 查询工作区域数据
         if (jobTicket != null && jobTicket.getWorkareaId() != null) {
@@ -165,9 +166,9 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
     @Override
     public Long insertJobTicketBySop(AddMarsJobDTO dto) {
         // 1.断言判断必填
-        Assert.notNull(dto.getSopId(), "sopid不可为空!");
+        Assert.notNull(dto.getSopId(), MessageUtils.message("assert.sop.id.not.null"));
         IsSop sop = iIsSopService.getById(dto.getSopId());
-        Assert.notNull(sop, "sop数据不存在!");
+        Assert.notNull(sop, MessageUtils.message("assert.sop.data.not.exist"));
         // 1.1自动生成名称
         String jobName = generateJobName(dto.getWorkstationId(), dto.getMachineryId(), dto.getSopId(), sop.getSopType());
         // 1.2获取隔离点数据
@@ -202,7 +203,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
         saveJobTicketKey(jobTicket.getTicketId());
         // 3.2新增作业票和挂锁的关联关// 3.3新增作业票和锁具的关联关系
         List<Long> pointIds = points.stream().map(IsMachineryPoints::getPointId).collect(Collectors.toList());
-        Assert.isFalse(pointIds.isEmpty(), "点位信息不能为空!");
+        Assert.isFalse(pointIds.isEmpty(), MessageUtils.message("assert.work.order.point.info.not.null"));
         List<IsIsolationPoint> pointList = iIsIsolationPointService.listByIds(pointIds);
         saveJobTicketLockAndSet(pointList, jobTicket.getTicketId());
 
@@ -234,7 +235,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
     @Override
     public Boolean insertJobByMachinery(AddMarsJobDTO dto) {
         // 1.断言判断必填
-        Assert.notNull(dto.getWorkstationId(), "岗位不可为空!");
+        Assert.notNull(dto.getWorkstationId(), MessageUtils.message("assert.post.not.null"));
         Assert.notNull(dto.getMachineryId(), "工艺不可为空!");
         // 1.1自动生成名称
         String jobName = generateJobName(dto.getWorkstationId(), dto.getMachineryId(), dto.getSopId(), null);
@@ -363,12 +364,12 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
         // 1.如果sop生成的,直接拿sop名称加上日期
         if (sopId != null) {
             IsSop sop = iIsSopService.getById(sopId);
-            Assert.notNull(sop, "sop不存在");
+            Assert.notNull(sop, MessageUtils.message("assert.sop.not.exist"));
             jobName = sop.getSopName() + "-" + DateUtils.parseDateToStr("yyyy-MM-dd", new Date());
         } else {
             // 2.如果不是sop生成的,则根据数据自己生成
             IsWorkstation workstation = iIsWorkstationService.getById(workstationId);
-            Assert.notNull(workstation, "岗位信息不存在!");
+            Assert.notNull(workstation, MessageUtils.message("assert.post.info.not.exist"));
             String workstationName = workstation.getWorkstationName();
             // 2.1如果岗位是有父级的,则处理
             if (!"0".equals(workstation.getAncestors())) {
@@ -385,7 +386,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
 
             }
             IsMachinery machinery = isMachineryService.getById(machineryId);
-            Assert.notNull(machinery, "设备工艺信息不存在!");
+            Assert.notNull(machinery, MessageUtils.message("assert.machinery.process.info.not.exist"));
             String ticketTypeValue;
             if (StringUtils.isNotBlank(ticketType)) {
                 ticketTypeValue = DictUtils.getDictValue("ticket_type", ticketType);
@@ -413,18 +414,18 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
     @Override
     public Boolean updateIsJobTicket(AddJobTicketDTO dto) {
         // 1.断言判断必填
-        Assert.notNull(dto.getTicketId(), "id不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getTicketCode()), "作业票编号不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getTicketName()), "作业票名称不可为空!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getTicketCode()), MessageUtils.message("assert.work.order.code.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getTicketName()), MessageUtils.message("assert.work.order.name.not.null"));
         // Assert.notNull(dto.getWorkshopId(), "所属车间不可为空!");
-        Assert.isFalse(dto.getPointsList().isEmpty(), "请选择隔离点!");
-        Assert.isFalse(dto.getTicketUserDTOList().isEmpty(), "人员信息不可为空!");
+        Assert.isFalse(dto.getPointsList().isEmpty(), MessageUtils.message("assert.work.order.select.isolation.point"));
+        Assert.isFalse(dto.getTicketUserDTOList().isEmpty(), MessageUtils.message("assert.work.order.person.info.not.null"));
         // 1.2人员信息是否存在重复
         boolean b = dto.getTicketUserDTOList().size() == dto.getTicketUserDTOList().stream().distinct().count();
-        Assert.isTrue(b, "用户数据存在同名情况,请修改!");
+        Assert.isTrue(b, MessageUtils.message("assert.user.data.duplicate.name.modify"));
         // 1.3检查作业票编码是否唯一
         List<IsJobTicket> list = list(Wrappers.<IsJobTicket>lambdaQuery().eq(IsJobTicket::getTicketCode, dto.getTicketCode()).ne(IsJobTicket::getTicketId, dto.getTicketId()));
-        Assert.isTrue(list.isEmpty(), "该编码已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.code.already.used"));
         // 1.4检查区域有没有变,区域变了的话隔离点肯定变了,因为隔离点是从区域数据中解析的
         // IsJobTicket isJobTicket = getById(dto.getTicketId());
         // 2.修改作业票
@@ -484,7 +485,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
     @Override
     public Boolean deleteIsJobTicketByTicketIds(String ticketIds) {
         // 1.断言判断
-        Assert.notBlank(ticketIds, "请选择需要删除的数据!");
+        Assert.notBlank(ticketIds, MessageUtils.message("assert.common.delete.select.data"));
         // 2.删除主数据
         Long[] longIds = Convert.toLongArray(ticketIds);
         isJobTicketMapper.deleteIsJobTicketByTicketIds(longIds);
@@ -813,10 +814,10 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
 
     @Override
     public MonitorJobTicketDetailVO selectMonitorJobTicketDetail(Long ticketId) {
-        Assert.notNull(ticketId, "作业票id不可为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.id.not.null"));
         // 1.获取作业票
         IsJobTicket isJobTicket = getById(ticketId);
-        Assert.notNull(isJobTicket, "作业票信息丢失了!");
+        Assert.notNull(isJobTicket, MessageUtils.message("assert.work.order.data.lost"));
         // 2.获取关联钥匙
         List<IsJobTicketKeyVO> listByTicketId = iIsJobTicketKeyService.getListByTicketId(ticketId);
         // 3.获取上锁人信息
@@ -856,7 +857,7 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
 
     @Override
     public Boolean updateJobToFinish(IsJobTicket isJobTicket) {
-        Assert.notNull(isJobTicket.getTicketId(), "作业票ID不可为空!");
+        Assert.notNull(isJobTicket.getTicketId(), MessageUtils.message("assert.work.order.id.not.null"));
         // 1.查询未完成的八大步骤
         List<IsJobTicketStep> list = iIsJobTicketStepService.list(Wrappers.<IsJobTicketStep>lambdaQuery()
                 .eq(IsJobTicketStep::getTicketId, isJobTicket.getTicketId())
@@ -873,13 +874,13 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
 
     @Override
     public Boolean updateJobToCancel(IsJobTicket isJobTicket) {
-        Assert.notNull(isJobTicket.getTicketId(), "作业票ID不可为空!");
+        Assert.notNull(isJobTicket.getTicketId(), MessageUtils.message("assert.work.order.id.not.null"));
         // 1.检查第六步有没有被执行,被执行了不能取消
         IsJobTicketStep jobTicketStep = iIsJobTicketStepService.getOne(Wrappers.<IsJobTicketStep>lambdaQuery()
                 .eq(IsJobTicketStep::getTicketId, isJobTicket.getTicketId())
                 .eq(IsJobTicketStep::getStepIndex, 6)
                 .eq(IsJobTicketStep::getStepStatus, 1));
-        Assert.isFalse(jobTicketStep != null, "该作业票已执行至第六步,无法取消!");
+        Assert.isFalse(jobTicketStep != null, MessageUtils.message("assert.work.order.step.six.cannot.cancel"));
         // 2.既然走到这了,说明可以取消
         update(Wrappers.<IsJobTicket>lambdaUpdate().eq(IsJobTicket::getTicketId, isJobTicket.getTicketId())
                 .set(IsJobTicket::getTicketStatus, 6));

+ 13 - 9
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketStepServiceImpl.java

@@ -3,9 +3,13 @@ package com.ktg.iscs.service.impl;
 import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.bean.BeanUtils;
-import com.ktg.iscs.domain.*;
+import com.ktg.iscs.domain.IsJobTicket;
+import com.ktg.iscs.domain.IsJobTicketPoints;
+import com.ktg.iscs.domain.IsJobTicketStep;
+import com.ktg.iscs.domain.IsJobTicketUser;
 import com.ktg.iscs.domain.dto.step.IsJobTicketStepDTO;
 import com.ktg.iscs.domain.vo.hardwareApi.JobTicketVO;
 import com.ktg.iscs.domain.vo.step.IsJobTicketStepVO;
@@ -48,15 +52,15 @@ public class IsJobTicketStepServiceImpl extends ServiceImpl<IsJobTicketStepMappe
     @Transactional
     @Override
     public Boolean updateJobStep(IsJobTicketStepDTO dto) {
-        Assert.notNull(dto.getStepId(), "步骤Id不可为空!");
-        Assert.notNull(dto.getStepStatus(), "状态不可为空!");
+        Assert.notNull(dto.getStepId(), MessageUtils.message("assert.business.step.id.not.null"));
+        Assert.notNull(dto.getStepStatus(), MessageUtils.message("assert.business.status.not.null"));
         // 1.检查上一步骤有没有检查完成
         IsJobTicketStep jobTicketStep = getById(dto.getStepId());
         if (jobTicketStep.getStepIndex() - 1 > 0) {
             IsJobTicketStep one = getOne(Wrappers.<IsJobTicketStep>lambdaQuery()
                     .eq(IsJobTicketStep::getTicketId, jobTicketStep.getTicketId())
                     .eq(IsJobTicketStep::getStepIndex, jobTicketStep.getStepIndex() - 1));
-            Assert.isFalse("0".equals(one.getStepStatus()), "请先执行上一步!");
+            Assert.isFalse("0".equals(one.getStepStatus()), MessageUtils.message("assert.business.please.execute.previous.step.first"));
         }
         IsJobTicket jobTicket = isJobTicketService.getById(jobTicketStep.getTicketId());
         // 3.如果这个状态是第三步,需要设定上锁人,则开始作业票
@@ -64,7 +68,7 @@ public class IsJobTicketStepServiceImpl extends ServiceImpl<IsJobTicketStepMappe
             List<IsJobTicketUser> list = iIsJobTicketUserService.list(Wrappers.<IsJobTicketUser>lambdaQuery()
                     .eq(IsJobTicketUser::getTicketId, jobTicketStep.getTicketId())
                     .eq(IsJobTicketUser::getUserRole, isSystemAttributeService.getIsSystemAttributeByKey("role.jtlocker").getSysAttrValue()));
-            Assert.isFalse(list.isEmpty(), "请先设定上锁人!");
+            Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.business.please.set.locker.first"));
             iIsJobTicketService.update(Wrappers.<IsJobTicket>lambdaUpdate()
                     .eq(IsJobTicket::getTicketId, jobTicketStep.getTicketId())
                     .set(IsJobTicket::getTicketStartTime, new Date())
@@ -75,7 +79,7 @@ public class IsJobTicketStepServiceImpl extends ServiceImpl<IsJobTicketStepMappe
             List<IsJobTicketUser> list = iIsJobTicketUserService.list(Wrappers.<IsJobTicketUser>lambdaQuery()
                     .eq(IsJobTicketUser::getTicketId, jobTicketStep.getTicketId())
                     .eq(IsJobTicketUser::getUserRole, isSystemAttributeService.getIsSystemAttributeByKey("role.jtcolocker").getSysAttrValue()));
-            Assert.isFalse(list.isEmpty(), "请至少设定一个共锁人!");
+            Assert.isFalse(list.isEmpty(), MessageUtils.message("assert.business.at.least.one.co.locker.required"));
         }
         // 更新步骤状态
         update(Wrappers.<IsJobTicketStep>lambdaUpdate().eq(IsJobTicketStep::getStepId, dto.getStepId())
@@ -87,9 +91,9 @@ public class IsJobTicketStepServiceImpl extends ServiceImpl<IsJobTicketStepMappe
 
     @Override
     public List<IsJobTicketStepVO> selectStepsByTicketId(Long ticketId) {
-        Assert.notNull(ticketId, "作业票id不能为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.id.not.null"));
         List<IsJobTicketStep> stepList = list(Wrappers.<IsJobTicketStep>lambdaQuery().eq(IsJobTicketStep::getTicketId, ticketId));
-        Assert.isFalse(stepList.isEmpty(), "该作业票步骤已丢失,请检查数据!");
+        Assert.isFalse(stepList.isEmpty(), MessageUtils.message("assert.business.work.permit.step.lost.check.data"));
         List<IsJobTicketStepVO> stepVOList = BeanUtils.toBean(stepList, IsJobTicketStepVO.class);
         // 1.获取需要分析的数据
         List<IsJobTicketPoints> pointList = iIsJobTicketPointsService.list(Wrappers.<IsJobTicketPoints>lambdaQuery()
@@ -136,7 +140,7 @@ public class IsJobTicketStepServiceImpl extends ServiceImpl<IsJobTicketStepMappe
 
     @Override
     public List<JobTicketVO> getStepEight(Long ticketId) {
-        Assert.notNull(ticketId, "作业票id不可为空!");
+        Assert.notNull(ticketId, MessageUtils.message("assert.work.order.id.not.null"));
         List<IsJobTicketPoints> pointList = iIsJobTicketPointsService.list(Wrappers.<IsJobTicketPoints>lambdaQuery()
                 .eq(IsJobTicketPoints::getTicketId, ticketId));
         List<JobTicketVO> jobTicketVOS = new ArrayList<>();

+ 5 - 4
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketUserServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.IsJobTicket;
 import com.ktg.iscs.domain.IsJobTicketStep;
@@ -48,10 +49,10 @@ public class IsJobTicketUserServiceImpl extends ServiceImpl<IsJobTicketUserMappe
     @Transactional
     @Override
     public Boolean addJobUsers(AddJobTicketDTO dto) {
-        Assert.notNull(dto.getTicketId(), "作业票id不可为空!");
-        Assert.isFalse(dto.getTicketUserDTOList().isEmpty(), "请选择人员信息!");
+        Assert.notNull(dto.getTicketId(), MessageUtils.message("assert.work.order.id.not.null"));
+        Assert.isFalse(dto.getTicketUserDTOList().isEmpty(), MessageUtils.message("assert.business.please.select.personnel.info"));
         IsJobTicket byId = isJobTicketService.getById(dto.getTicketId());
-        Assert.isTrue(byId != null, "作业不存在!");
+        Assert.isTrue(byId != null, MessageUtils.message("assert.work.order.info.not.exist"));
         // 1.检查,如果第四步已经完成,就不允许再更改上锁人
         String jtlocker = isSystemAttributeService.getIsSystemAttributeByKey("role.jtlocker").getSysAttrValue();
         IsJobTicketStep step4 = iIsJobTicketStepService.getOne(Wrappers.<IsJobTicketStep>lambdaQuery()
@@ -66,7 +67,7 @@ public class IsJobTicketUserServiceImpl extends ServiceImpl<IsJobTicketUserMappe
             if (collect.containsAll(collect1) && collect1.containsAll(collect)) {
                 log.info("两个列表内容相等(忽略顺序)");
             } else {
-                Assert.isFalse(true, "您已执行完第4步,无法更换上锁人!");
+                Assert.isFalse(true, MessageUtils.message("assert.business.step4.executed.cannot.change.locker"));
             }
         }
         // 1.1执行完第六步后不可修改共锁人

+ 4 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsKeyServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsKey;
 import com.ktg.iscs.domain.vo.key.IsKeyVO;
@@ -79,7 +80,7 @@ public class IsKeyServiceImpl extends ServiceImpl<IsKeyMapper, IsKey> implements
         // 3.检查nfc是否重复
         if (StringUtils.isNotBlank(isKey.getKeyNfc())) {
             List<IsKey> isKeys1 = list(Wrappers.<IsKey>lambdaQuery().eq(IsKey::getKeyNfc, isKey.getKeyNfc()));
-            Assert.isFalse(!isKeys1.isEmpty(), "该NFC已被使用!");
+            Assert.isFalse(!isKeys1.isEmpty(), MessageUtils.message("assert.isolation.point.nfc.already.used"));
         }
         // 4.检查MAC是否重复
         if (StringUtils.isNotBlank(isKey.getMacAddress())) {
@@ -115,7 +116,7 @@ public class IsKeyServiceImpl extends ServiceImpl<IsKeyMapper, IsKey> implements
             List<IsKey> isKeys1 = list(Wrappers.<IsKey>lambdaQuery()
                     .eq(IsKey::getKeyNfc, isKey.getKeyNfc())
                     .ne(IsKey::getKeyId, isKey.getKeyId()));
-            Assert.isFalse(!isKeys1.isEmpty(), "该NFC已被使用!");
+            Assert.isFalse(!isKeys1.isEmpty(), MessageUtils.message("assert.isolation.point.nfc.already.used"));
         }
         // 4.检查MAC是否重复
         if (StringUtils.isNotBlank(isKey.getMacAddress())) {
@@ -137,7 +138,7 @@ public class IsKeyServiceImpl extends ServiceImpl<IsKeyMapper, IsKey> implements
     @Override
     public int deleteIsKeyByKeyIds(String keyIds)
     {
-        Assert.notBlank(keyIds, "请选择需要删除的数据!");
+        Assert.notBlank(keyIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(keyIds);
         return isKeyMapper.deleteIsKeyByKeyIds(longIds);
     }

+ 8 - 7
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockCabinetServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.framework.websocket.WebSocketAndroid;
 import com.ktg.iscs.domain.IsLockCabinet;
@@ -50,13 +51,13 @@ public class IsLockCabinetServiceImpl extends ServiceImpl<IsLockCabinetMapper, I
 
     @Override
     public Boolean deleteIsLockCabinetByCabinetIds(String cabinetIds) {
-        Assert.notBlank(cabinetIds, "请选择需要删除的数据!");
+        Assert.notBlank(cabinetIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(cabinetIds);
         List<Long> ids = Arrays.asList(longIds);
         // 开始检测下面有没有正在使用的仓位信息,有的话不能删
         List<IsLockCabinetSlots> list = iIsLockCabinetSlotsService.list(Wrappers.<IsLockCabinetSlots>lambdaQuery()
                 .in(IsLockCabinetSlots::getCabinetId, ids));
-        Assert.isTrue(list.isEmpty(), "请先清理柜子下的仓位信息!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.clear.position.info.first"));
         return removeBatchByIds(ids);
     }
 
@@ -66,30 +67,30 @@ public class IsLockCabinetServiceImpl extends ServiceImpl<IsLockCabinetMapper, I
         if (StringUtils.isNotBlank(isLockCabinet.getCabinetCode())) {
             List<IsLockCabinet> list = list(Wrappers.<IsLockCabinet>lambdaQuery()
                     .eq(IsLockCabinet::getCabinetCode, isLockCabinet.getCabinetCode()));
-            Assert.isTrue(list.isEmpty(), "该编码已被使用,请更换!");
+            Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.code.already.used"));
         }
         // 判断名称是否重复
         List<IsLockCabinet> list1 = list(Wrappers.<IsLockCabinet>lambdaQuery()
                 .eq(IsLockCabinet::getCabinetName, isLockCabinet.getCabinetName()));
-        Assert.isTrue(list1.isEmpty(), "该名称已被使用,请更换!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used"));
         return save(isLockCabinet);
     }
 
     @Override
     public Boolean updateIsLockCabinet(IsLockCabinet isLockCabinet) {
-        Assert.notNull(isLockCabinet.getCabinetId(), "主键id不能为空!");
+        Assert.notNull(isLockCabinet.getCabinetId(), MessageUtils.message("assert.common.param.primary.key.id.not.null"));
         // 开始判断编码是否重复
         if (StringUtils.isNotBlank(isLockCabinet.getCabinetCode())) {
             List<IsLockCabinet> list = list(Wrappers.<IsLockCabinet>lambdaQuery()
                     .eq(IsLockCabinet::getCabinetCode, isLockCabinet.getCabinetCode())
                     .ne(IsLockCabinet::getCabinetId, isLockCabinet.getCabinetId()));
-            Assert.isTrue(list.isEmpty(), "该编码已被使用,请更换!");
+            Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.code.already.used"));
         }
         // 判断名称是否重复
         List<IsLockCabinet> list1 = list(Wrappers.<IsLockCabinet>lambdaQuery()
                 .eq(IsLockCabinet::getCabinetName, isLockCabinet.getCabinetName())
                 .ne(IsLockCabinet::getCabinetId, isLockCabinet.getCabinetId()));
-        Assert.isTrue(list1.isEmpty(), "该名称已被使用,请更换!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used"));
         return updateById(isLockCabinet);
     }
 

+ 4 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockCabinetSlotsServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsLockCabinetSlots;
 import com.ktg.iscs.mapper.IsLockCabinetSlotsMapper;
@@ -43,20 +44,20 @@ public class IsLockCabinetSlotsServiceImpl extends ServiceImpl<IsLockCabinetSlot
         if (StringUtils.isNotBlank(isLockCabinetSlots.getSlotCode())) {
             List<IsLockCabinetSlots> list = list(Wrappers.<IsLockCabinetSlots>lambdaQuery()
                     .eq(IsLockCabinetSlots::getSlotCode, isLockCabinetSlots.getSlotCode()));
-            Assert.isTrue(list.isEmpty(), "该编码已被使用,请更换!");
+            Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.code.already.used"));
         }
         return save(isLockCabinetSlots);
     }
 
     @Override
     public Boolean updateIsLockCabinetSlots(IsLockCabinetSlots isLockCabinetSlots) {
-        Assert.notNull(isLockCabinetSlots.getSlotId(), "主键id不能为空!");
+        Assert.notNull(isLockCabinetSlots.getSlotId(), MessageUtils.message("assert.common.param.primary.key.id.not.null"));
         // 开始判断编码是否重复
         if (StringUtils.isNotBlank(isLockCabinetSlots.getSlotCode())) {
             List<IsLockCabinetSlots> list = list(Wrappers.<IsLockCabinetSlots>lambdaQuery()
                     .eq(IsLockCabinetSlots::getSlotCode, isLockCabinetSlots.getSlotCode())
                     .ne(IsLockCabinetSlots::getCabinetId, isLockCabinetSlots.getCabinetId()));
-            Assert.isTrue(list.isEmpty(), "该编码已被使用,请更换!");
+            Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.code.already.used"));
         }
         return updateById(isLockCabinetSlots);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsLock;
 import com.ktg.iscs.domain.vo.lock.IsLockVO;
@@ -118,7 +119,7 @@ public class IsLockServiceImpl extends ServiceImpl<IsLockMapper, IsLock> impleme
     @Override
     public int deleteIsLockByLockIds(String lockIds)
     {
-        Assert.notBlank(lockIds, "请选择需要删除的数据!");
+        Assert.notBlank(lockIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(lockIds);
         return isLockMapper.deleteIsLockByLockIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLockTypeServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsIsolationPoint;
 import com.ktg.iscs.domain.IsLockType;
 import com.ktg.iscs.domain.vo.lockType.IsLockTypeVO;
@@ -108,7 +109,7 @@ public class IsLockTypeServiceImpl extends ServiceImpl<IsLockTypeMapper, IsLockT
     @Override
     public int deleteIsLockTypeByLockTypeIds(String lockTypeIds)
     {
-        Assert.notBlank(lockTypeIds, "请选择需要删除的数据!");
+        Assert.notBlank(lockTypeIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(lockTypeIds);
         // 判断下面有没有子类,有则不能删除
         List<IsLockType> lockTypeList = list(Wrappers.<IsLockType>lambdaQuery().in(IsLockType::getParentTypeId, longIds));

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLocksetServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsLockset;
 import com.ktg.iscs.domain.vo.lockset.IsLocksetVO;
 import com.ktg.iscs.mapper.IsLocksetMapper;
@@ -104,7 +105,7 @@ public class IsLocksetServiceImpl extends ServiceImpl<IsLocksetMapper, IsLockset
     @Override
     public int deleteIsLocksetByLocksetIds(String locksetIds)
     {
-        Assert.notBlank(locksetIds, "请选择需要删除的数据!");
+        Assert.notBlank(locksetIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(locksetIds);
         return isLocksetMapper.deleteIsLocksetByLocksetIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLocksetTypeServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsLocksetType;
 import com.ktg.iscs.domain.vo.locksetType.IsLocksetTypeVO;
 import com.ktg.iscs.mapper.IsLocksetTypeMapper;
@@ -104,7 +105,7 @@ public class IsLocksetTypeServiceImpl extends ServiceImpl<IsLocksetTypeMapper, I
     @Override
     public int deleteIsLocksetTypeByLocksetTypeIds(String locksetTypeIds)
     {
-        Assert.notBlank(locksetTypeIds, "请选择需要删除的数据!");
+        Assert.notBlank(locksetTypeIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(locksetTypeIds);
         // 检查有没有子集
         List<IsLocksetType> list = list(Wrappers.<IsLocksetType>lambdaQuery()

+ 11 - 10
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoStationServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsIsolationPoint;
 import com.ktg.iscs.domain.IsLotoStation;
@@ -48,7 +49,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
     @Override
     public List<PointsMapVO> selectLotoMapById(Long lotoId, Long sopId, Long ticketId) {
         // 1.断言校验
-        Assert.notNull(lotoId, "请传入电柜id");
+        Assert.notNull(lotoId, MessageUtils.message("assert.cabinet.electric.pass.id"));
         // 2.查询区域信息
         IsLotoStation lotoStation = getById(lotoId);
         // 3.解析map
@@ -119,7 +120,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
                     return true;
                 }).collect(Collectors.toList());
             } catch (IOException e) {
-                Assert.isTrue(false, "map数据解析失败!");
+                Assert.isTrue(false, MessageUtils.message("assert.business.map.data.parse.fail"));
                 e.printStackTrace();
             }
         }*/
@@ -128,7 +129,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
 
     @Override
     public Boolean updatePointsBindingLoto(BindingPointDTO dto) {
-        Assert.notNull(dto.getLotoId(), "电柜ID不能为空!");
+        Assert.notNull(dto.getLotoId(), MessageUtils.message("assert.cabinet.electric.id.not.null"));
         if (!dto.getBindingPointIds().isEmpty()) {
             // 开始绑定
             iIsIsolationPointService.update(Wrappers.<IsIsolationPoint>lambdaUpdate()
@@ -146,17 +147,17 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
 
     @Override
     public Boolean updateIsLotoStation(IsLotoStation isLotoStation) {
-        Assert.notNull(isLotoStation.getLotoId(), "主键id不能为空!");
+        Assert.notNull(isLotoStation.getLotoId(), MessageUtils.message("assert.common.param.primary.key.id.not.null"));
         // 判断名称重复
         List<IsLotoStation> list = list(Wrappers.<IsLotoStation>lambdaQuery()
                 .eq(IsLotoStation::getLotoName, isLotoStation.getLotoName())
                 .ne(IsLotoStation::getLotoId, isLotoStation.getLotoId()));
-        Assert.isTrue(list.isEmpty(), "该名称已被使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used.retry"));
         // 判断序列号重复
         List<IsLotoStation> list1 = list(Wrappers.<IsLotoStation>lambdaQuery()
                 .eq(IsLotoStation::getLotoSerialNumber, isLotoStation.getLotoSerialNumber())
                 .ne(IsLotoStation::getLotoId, isLotoStation.getLotoId()));
-        Assert.isTrue(list1.isEmpty(), "该序列号已被使用,请重新填写!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         update(Wrappers.<IsLotoStation>lambdaUpdate()
                 .eq(IsLotoStation::getLotoId, isLotoStation.getLotoId())
                 .set(IsLotoStation::getLotoName, isLotoStation.getLotoName())
@@ -171,15 +172,15 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
 
     @Override
     public Boolean insertIsLotoStation(IsLotoStation isLotoStation) {
-        Assert.notBlank(isLotoStation.getLotoName(), "名称不可为空!");
+        Assert.notBlank(isLotoStation.getLotoName(), MessageUtils.message("assert.machinery.process.name.not.null"));
         // 判断名称重复
         List<IsLotoStation> list = list(Wrappers.<IsLotoStation>lambdaQuery()
                 .eq(IsLotoStation::getLotoName, isLotoStation.getLotoName()));
-        Assert.isTrue(list.isEmpty(), "该名称已被使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used.retry"));
         // 判断序列号重复
         List<IsLotoStation> list1 = list(Wrappers.<IsLotoStation>lambdaQuery()
                 .eq(IsLotoStation::getLotoSerialNumber, isLotoStation.getLotoSerialNumber()));
-        Assert.isTrue(list1.isEmpty(), "该序列号已被使用,请重新填写!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         return save(isLotoStation);
     }
 
@@ -197,7 +198,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
 
     @Override
     public IsLotoStation selectLotoBySerialNumber(String lotoSerialNumber) {
-        Assert.notBlank(lotoSerialNumber, "请提供loto柜序列号!");
+        Assert.notBlank(lotoSerialNumber, MessageUtils.message("assert.map.provide.loto.cabinet.serial.no"));
         IsLotoStation one = getOne(Wrappers.<IsLotoStation>lambdaQuery()
                 .eq(IsLotoStation::getLotoSerialNumber, lotoSerialNumber));
         return one;

+ 8 - 7
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoSwitchMapServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsIsolationPoint;
 import com.ktg.iscs.domain.IsLotoSwitchMap;
@@ -42,31 +43,31 @@ public class IsLotoSwitchMapServiceImpl extends ServiceImpl<IsLotoSwitchMapMappe
 
     @Override
     public Boolean insertIsLotoSwitchMap(IsLotoSwitchMap isLotoSwitchMap) {
-        Assert.notBlank(isLotoSwitchMap.getSwitchMapName(), "名称不可为空!");
+        Assert.notBlank(isLotoSwitchMap.getSwitchMapName(), MessageUtils.message("assert.cabinet.name.not.null"));
         // 判断名称重复
         List<IsLotoSwitchMap> list = list(Wrappers.<IsLotoSwitchMap>lambdaQuery()
                 .eq(IsLotoSwitchMap::getSwitchMapName, isLotoSwitchMap.getSwitchMapName()));
-        Assert.isTrue(list.isEmpty(), "该名称已被使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used.retry"));
         // 判断序列号重复
         List<IsLotoSwitchMap> list1 = list(Wrappers.<IsLotoSwitchMap>lambdaQuery()
                 .eq(IsLotoSwitchMap::getSerialNumber, isLotoSwitchMap.getSerialNumber()));
-        Assert.isTrue(list1.isEmpty(), "该序列号已被使用,请重新填写!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         return save(isLotoSwitchMap);
     }
 
     @Override
     public Boolean updateIsLotoSwitchMap(IsLotoSwitchMap isLotoSwitchMap) {
-        Assert.notNull(isLotoSwitchMap.getSwitchMapId(), "主键id不能为空!");
+        Assert.notNull(isLotoSwitchMap.getSwitchMapId(), MessageUtils.message("assert.common.param.primary.key.id.not.null"));
         // 判断名称重复
         List<IsLotoSwitchMap> list = list(Wrappers.<IsLotoSwitchMap>lambdaQuery()
                 .eq(IsLotoSwitchMap::getSwitchMapName, isLotoSwitchMap.getSwitchMapName())
                 .ne(IsLotoSwitchMap::getSwitchMapId, isLotoSwitchMap.getSwitchMapId()));
-        Assert.isTrue(list.isEmpty(), "该名称已被使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.cabinet.name.already.used.retry"));
         // 判断序列号重复
         List<IsLotoSwitchMap> list1 = list(Wrappers.<IsLotoSwitchMap>lambdaQuery()
                 .eq(IsLotoSwitchMap::getSerialNumber, isLotoSwitchMap.getSerialNumber())
                 .ne(IsLotoSwitchMap::getSwitchMapId, isLotoSwitchMap.getSwitchMapId()));
-        Assert.isTrue(list1.isEmpty(), "该序列号已被使用,请重新填写!");
+        Assert.isTrue(list1.isEmpty(), MessageUtils.message("assert.isolation.point.serial.no.already.used"));
         update(Wrappers.<IsLotoSwitchMap>lambdaUpdate()
                 .eq(IsLotoSwitchMap::getSwitchMapId, isLotoSwitchMap.getSwitchMapId())
                 .set(IsLotoSwitchMap::getSwitchMapName, isLotoSwitchMap.getSwitchMapName())
@@ -92,7 +93,7 @@ public class IsLotoSwitchMapServiceImpl extends ServiceImpl<IsLotoSwitchMapMappe
 
     @Override
     public IsLotoSwitchMap selectSwitchMapBySerialNumber(String serialNumber) {
-        Assert.notBlank(serialNumber, "请提供柜序列号!");
+        Assert.notBlank(serialNumber, MessageUtils.message("assert.map.provide.loto.cabinet.serial.no"));
         return getOne(Wrappers.<IsLotoSwitchMap>lambdaQuery()
                 .eq(IsLotoSwitchMap::getSerialNumber, serialNumber));
     }

+ 12 - 11
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMachineryServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.domain.entity.SysDictData;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.IsMachinery;
@@ -75,12 +76,12 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
     @Override
     public Boolean insertIsMachinery(IsMachinery isMachinery) {
         // 断言校验
-        Assert.isTrue(StringUtils.isNotBlank(isMachinery.getMachineryName()), "名称不可为空!");
-        Assert.notNull(isMachinery.getParentId(), "父id不可为空!");
+        Assert.isTrue(StringUtils.isNotBlank(isMachinery.getMachineryName()), MessageUtils.message("assert.cabinet.name.not.null"));
+        Assert.notNull(isMachinery.getParentId(), MessageUtils.message("assert.machinery.process.parent.id.not.null"));
         // 判断名称重复
         List<IsMachinery> list = list(Wrappers.<IsMachinery>lambdaQuery()
                 .eq(IsMachinery::getMachineryName, isMachinery.getMachineryName()));
-        Assert.isTrue(list.isEmpty(), "[" + isMachinery.getMachineryName() + "]名称已被工艺/设备使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.machinery.process.name.already.used", isMachinery.getMachineryName()));
         IsMachinery one = getById(isMachinery.getParentId());
         String ancestors;
         if (one != null) {
@@ -96,14 +97,14 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
     @Override
     public Boolean updateIsMachinery(IsMachinery isMachinery) {
         // 断言校验
-        Assert.notNull(isMachinery.getMachineryId(), "id不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isMachinery.getMachineryName()), "名称不可为空!");
-        Assert.notNull(isMachinery.getParentId(), "父id不可为空!");
+        Assert.notNull(isMachinery.getMachineryId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isMachinery.getMachineryName()), MessageUtils.message("assert.cabinet.name.not.null"));
+        Assert.notNull(isMachinery.getParentId(), MessageUtils.message("assert.machinery.process.parent.id.not.null"));
         // 判断名称重复
         List<IsMachinery> list = list(Wrappers.<IsMachinery>lambdaQuery()
                 .eq(IsMachinery::getMachineryName, isMachinery.getMachineryName())
                 .ne(IsMachinery::getMachineryId, isMachinery.getMachineryId()));
-        Assert.isTrue(list.isEmpty(), "[" + isMachinery.getMachineryName() + "]名称已被工艺/设备使用,请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.machinery.process.name.already.used", isMachinery.getMachineryName()));
         IsMachinery one = getById(isMachinery.getParentId());
         String ancestors;
         if (one != null) {
@@ -126,8 +127,8 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
     @Override
     public Boolean saveMachineryPoints(IsMachineryDTO dto) {
         // 断言校验
-        Assert.notNull(dto.getMachineryId(), "id不可为空!");
-        Assert.isFalse(dto.getPointIdList().isEmpty(), "请选择隔离点!");
+        Assert.notNull(dto.getMachineryId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.isFalse(dto.getPointIdList().isEmpty(), MessageUtils.message("assert.machinery.process.select.isolation.point"));
         // 开始存储工艺和隔离点的关联关系
         iIsMachineryPointsService.remove(Wrappers.<IsMachineryPoints>lambdaQuery()
                 .eq(IsMachineryPoints::getMachineryId, dto.getMachineryId()));
@@ -147,7 +148,7 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
     @Override
     public Boolean deleteIsMachineryByMachineryIds(String machineryIds) {
 
-        Assert.notBlank(machineryIds, "请选择需要删除的数据!");
+        Assert.notBlank(machineryIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(machineryIds);
         removeBatchByIds(Arrays.asList(longIds));
         // 移除关联的点位信息
@@ -158,7 +159,7 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
 
     @Override
     public IsMachineryVO selectIsMachineryById(Long machineryId) {
-        Assert.notNull(machineryId, "id不可为空!");
+        Assert.notNull(machineryId, MessageUtils.message("assert.common.param.id.not.null"));
         IsMachinery machinery = getById(machineryId);
         IsMachineryVO bean = BeanUtils.toBean(machinery, IsMachineryVO.class);
         // 查询关联的点位信息

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMailSendTaskItemServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.domain.entity.SysUser;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsMailSendTaskItem;
 import com.ktg.iscs.domain.IsMailTemplate;
 import com.ktg.iscs.mapper.IsMailSendTaskItemMapper;
@@ -46,7 +47,7 @@ public class IsMailSendTaskItemServiceImpl extends ServiceImpl<IsMailSendTaskIte
         Assert.notNull(taskItem.getEmailTemplateId(), "邮件模板不能为空");
         Assert.notNull(taskItem.getScheduledSendTime(), "计划发送时间不能为空");
         SysUser user = iSysUserService.getById(taskItem.getSendToUserId());
-        Assert.isFalse(user == null, "接收人不存在!");
+        Assert.isFalse(user == null, MessageUtils.message("assert.business.recipient.not.exist"));
         // 2.根据模板获取邮件内容
         IsMailTemplate template = iIsMailTemplateService.getById(taskItem.getEmailTemplateId());
         map.keySet().forEach(key -> {

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMailTemplateServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsMailNotifyConfig;
 import com.ktg.iscs.domain.IsMailTemplate;
@@ -64,7 +65,7 @@ public class IsMailTemplateServiceImpl extends ServiceImpl<IsMailTemplateMapper,
 
     @Override
     public Boolean deleteIsMailTemplateByTemplateCodes(String templateIds) {
-        Assert.notBlank(templateIds, "请选择需要删除的数据!");
+        Assert.notBlank(templateIds, MessageUtils.message("assert.common.delete.select.data"));
         List<Long> ids = Arrays.asList(Convert.toLongArray(templateIds));
         List<IsMailTemplate> isMailTemplates = listByIds(ids);
         List<String> codes = isMailTemplates.stream().map(IsMailTemplate::getTemplateCode).collect(Collectors.toList());

+ 11 - 18
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMarsSopServiceImpl.java

@@ -8,6 +8,7 @@ import com.ktg.common.annotation.MarsDataScope;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.exception.ServiceException;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.*;
 import com.ktg.iscs.domain.dto.sop.AddMarsSopDTO;
@@ -88,10 +89,7 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
     public Boolean insertIsMarsSop(AddMarsSopDTO dto) {
         // 断言校验
         // 1.判断工艺必选
-        Assert.notNull(dto.getWorkstationId(), "岗位id不可为空!");
-        // Assert.notNull(dto.getMachineryId(), "设备工艺id不可为空!");
-        // List<IsSop> list = list(Wrappers.<IsSop>lambdaQuery().eq(IsSop::getSopCode, dto.getSopCode()));
-        // Assert.isTrue(list.isEmpty(), "该SOP编号已被使用!");
+        Assert.notNull(dto.getWorkstationId(), MessageUtils.message("assert.post.id.not.null"));
         // 1.1开始生成默认名称
         String sopName = generateName(dto.getWorkstationId(), dto.getMachineryId(), dto.getSopType(), dto.getSopId());
         dto.setSopName(sopName);
@@ -113,13 +111,8 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
     @Override
     public Boolean updateIsMarsSop(AddMarsSopDTO dto) {
         // 断言校验
-        Assert.notNull(dto.getSopId(), "sopId不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), "SOP名称不可为空!");
-        // Assert.isTrue(StringUtils.isNotBlank(dto.getSopCode()), "SOP编号名称不可为空!");
-        /*List<IsSop> list = list(Wrappers.<IsSop>lambdaQuery()
-                .eq(IsSop::getSopCode, dto.getSopCode())
-                .ne(IsSop::getSopId, dto.getSopId()));
-        Assert.isTrue(list.isEmpty(), "该SOP编号已被使用!");*/
+        Assert.notNull(dto.getSopId(), MessageUtils.message("assert.sop.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), MessageUtils.message("assert.sop.name.not.null"));
         // 1.判断工艺必选
         Assert.notNull(dto.getMachineryId(), "设备工艺id不可为空!");
         // 1.1开始生成默认名称
@@ -144,11 +137,11 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
      */
     public String generateName(Long workstationId, Long machineryId, String sopType, Long sopId) {
         IsWorkstation workstation = iIsWorkstationService.getById(workstationId);
-        Assert.notNull(workstation, "岗位信息不存在!");
+        Assert.notNull(workstation, MessageUtils.message("assert.post.info.not.exist"));
         IsMachinery machinery = isMachineryService.getById(machineryId);
-        Assert.notNull(machinery, "设备工艺信息不存在!");
+        Assert.notNull(machinery, MessageUtils.message("assert.machinery.process.info.not.exist"));
         // 如果岗位是多级
-        Assert.notNull(workstation, "岗位信息不存在!");
+        Assert.notNull(workstation, MessageUtils.message("assert.post.info.not.exist"));
         String workstationName = workstation.getWorkstationName();
         // 2.1如果岗位是有父级的,则处理
         if (!"0".equals(workstation.getAncestors())) {
@@ -199,7 +192,7 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
     @Override
     public Boolean deleteIsMarsSopBySopIds(String sopIds) {
         // 1.断言判断
-        Assert.notBlank(sopIds, "请选择需要删除的数据!");
+        Assert.notBlank(sopIds, MessageUtils.message("assert.common.delete.select.data"));
         // 2.删除主数据
         Long[] longIds = Convert.toLongArray(sopIds);
         isSopMapper.deleteIsSopBySopIds(longIds);
@@ -229,8 +222,8 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
 
     @Override
     public Boolean updateIsMarsSopIndex(IsSop isSop) {
-        Assert.notNull(isSop.getSopId(), "主键id不可为空!");
-        Assert.notNull(isSop.getSopIndex(), "排序数据不可为空!");
+        Assert.notNull(isSop.getSopId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.notNull(isSop.getSopIndex(), MessageUtils.message("assert.sop.sort.data.not.null"));
         update(Wrappers.<IsSop>lambdaUpdate()
                 .eq(IsSop::getSopId, isSop.getSopId())
                 .set(IsSop::getSopIndex, isSop.getSopIndex()));
@@ -252,7 +245,7 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
             // 1.---------------SOP如果没有名称,直接返回报错--------------------
             if (StringUtils.isBlank(vo.getSopName())) {
                 result = false;
-                failureMsg.append("<br/>" + failureNum + "、SOP名称不可为空 ");
+                failureMsg.append("<br/>" + failureNum + "、" + MessageUtils.message("assert.sop.name.not.null"));
             }
             // 1.1检查SOP的名称是否可用
             List<IsSop> sopNameList = list(Wrappers.<IsSop>lambdaQuery()

+ 4 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsCabinetServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsMaterials;
 import com.ktg.iscs.domain.IsMaterialsCabinet;
 import com.ktg.iscs.domain.IsMaterialsLoanException;
@@ -117,7 +118,7 @@ public class IsMaterialsCabinetServiceImpl extends ServiceImpl<IsMaterialsCabine
     @Override
     public int deleteIsMaterialsCabinetByCabinetIds(String cabinetIds)
     {
-        Assert.notBlank(cabinetIds, "请选择需要删除的数据!");
+        Assert.notBlank(cabinetIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(cabinetIds);
         // 检查物资柜下面有没有物资,有物资就不可以删除
         List<IsMaterials> list = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
@@ -220,10 +221,10 @@ public class IsMaterialsCabinetServiceImpl extends ServiceImpl<IsMaterialsCabine
 
     @Override
     public IsMaterialsCabinet getCabinetByCode(String cabinetCode) {
-        Assert.notBlank(cabinetCode, "物资柜CODE不能为空!");
+        Assert.notBlank(cabinetCode, MessageUtils.message("assert.cabinet.material.code.not.null"));
         IsMaterialsCabinet one = getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                 .eq(IsMaterialsCabinet::getCabinetCode, cabinetCode));
-        Assert.isFalse(one == null, "该物资柜不存在!");
+        Assert.isFalse(one == null, MessageUtils.message("assert.cabinet.material.not.exist"));
         return one;
     }
 }

+ 3 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsChangeRecordServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsMaterials;
 import com.ktg.iscs.domain.IsMaterialsChangeRecord;
 import com.ktg.iscs.domain.IsMaterialsCheckRecord;
@@ -13,7 +14,6 @@ import com.ktg.iscs.mapper.IsMaterialsChangeRecordMapper;
 import com.ktg.iscs.service.IIsMaterialsChangeRecordService;
 import com.ktg.iscs.service.IIsMaterialsCheckRecordService;
 import com.ktg.iscs.service.IIsMaterialsService;
-import com.ktg.system.domain.SysUserCharacteristic;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -63,10 +63,10 @@ public class IsMaterialsChangeRecordServiceImpl extends ServiceImpl<IsMaterialsC
             // 1.物资全部换新
             // 原物资的数据
             IsMaterials oldMaterials = iIsMaterialsService.getById(changeRecord.getOldMaterialsId());
-            Assert.isFalse(oldMaterials == null, "原物资不存在");
+            Assert.isFalse(oldMaterials == null, MessageUtils.message("assert.material.original.not.exist"));
             // 新物资的数据
             IsMaterials newMaterials = iIsMaterialsService.getById(changeRecord.getNewMaterialsId());
-            Assert.isFalse(newMaterials == null, "新物资不存在");
+            Assert.isFalse(newMaterials == null, MessageUtils.message("assert.material.new.not.exist"));
             // 检测新物资有没有绑定该物资柜,那现在绑定下,如果已经绑定,判断是否跟原来的一样,不一样直接报错
             if (newMaterials.getMaterialsCabinetId() != null && newMaterials.getMaterialsCabinetId() != 0) {
                 Assert.isTrue(oldMaterials.getMaterialsCabinetId().equals(newMaterials.getMaterialsCabinetId()), "新物资不属于当前物资柜,请检查数据!");

+ 4 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsCheckPlanServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.*;
 import com.ktg.iscs.domain.dto.checkPlan.AddCheckPlanDTO;
@@ -116,7 +117,7 @@ public class IsMaterialsCheckPlanServiceImpl extends ServiceImpl<IsMaterialsChec
     private Boolean addMail(AddCheckPlanDTO dto, IsMaterialsCheckPlan materialsCheckPlan) {
         // 4.1获取模板
         IsSystemAttribute isSystemAttributeByKey = isSystemAttributeService.getIsSystemAttributeByKey("sys.template.check_plan");
-        Assert.isFalse(isSystemAttributeByKey == null, "请在基础数据中配置物资检查计划模板!");
+        Assert.isFalse(isSystemAttributeByKey == null, MessageUtils.message("assert.inspection.plan.configure.template"));
         IsMailTemplate template = iIsMailTemplateService.getOne(Wrappers.<IsMailTemplate>lambdaQuery()
                 .eq(IsMailTemplate::getTemplateCode, isSystemAttributeByKey.getSysAttrValue()));
         // 4.2获取配置的时间
@@ -172,7 +173,7 @@ public class IsMaterialsCheckPlanServiceImpl extends ServiceImpl<IsMaterialsChec
     @Override
     public Boolean updateIsMaterialsCheckPlan(AddCheckPlanDTO dto) {
         // 1.断言检测
-        Assert.notNull(dto.getPlanId(), "主键ID不可为空!");
+        Assert.notNull(dto.getPlanId(), MessageUtils.message("assert.common.param.id.not.null"));
         Assert.notNull(dto.getPlanDate(), "检查日期不可为空!");
         Assert.notNull(dto.getCheckUserId(), "检查员不可为空!");
         Assert.isFalse(dto.getCabinetIds().isEmpty(), "请选择需要检查的柜子!");
@@ -205,7 +206,7 @@ public class IsMaterialsCheckPlanServiceImpl extends ServiceImpl<IsMaterialsChec
     @Transactional
     @Override
     public Boolean deleteIsMaterialsCheckPlanByPlanIds(String planIds) {
-        Assert.notBlank(planIds, "请选择需要删除的数据!");
+        Assert.notBlank(planIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(planIds);
         removeBatchByIds(Arrays.asList(longIds));
         // 开始删除关联的物资柜数据

+ 3 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsInstructionsServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.PDFToImgUtil;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsMaterialsInstructions;
@@ -40,7 +41,7 @@ public class IsMaterialsInstructionsServiceImpl extends ServiceImpl<IsMaterialsI
 
     @Override
     public Boolean deleteIsMaterialsInstructionsByInstructionsIds(String instructionsIds) {
-        Assert.notBlank(instructionsIds, "请选择需要删除的数据!");
+        Assert.notBlank(instructionsIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(instructionsIds);
         List<IsMaterialsInstructions> isMaterialsInstructions = listByIds(Arrays.asList(longIds));
         boolean b = removeBatchByIds(Arrays.asList(longIds));
@@ -82,7 +83,7 @@ public class IsMaterialsInstructionsServiceImpl extends ServiceImpl<IsMaterialsI
 
     @Override
     public Boolean updateIsMaterialsInstructions(IsMaterialsInstructions dto) {
-        Assert.notNull(dto.getInstructionsId(), "主键id不能为空!");
+        Assert.notNull(dto.getInstructionsId(), MessageUtils.message("assert.common.param.primary.key.id.not.null"));
         IsMaterialsInstructions instructions = getById(dto.getInstructionsId());
         if (StringUtils.isNotBlank(dto.getFileUrl())) {
             if (dto.getFileUrl().contains(".pdf")) {

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsLoanExceptionServiceImpl.java

@@ -2,6 +2,7 @@ package com.ktg.iscs.service.impl;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsMaterialsCabinet;
 import com.ktg.iscs.domain.IsMaterialsLoanException;
@@ -31,7 +32,7 @@ public class IsMaterialsLoanExceptionServiceImpl extends ServiceImpl<IsMaterials
     public Page<IsMaterialsLoanExceptionPageVO> getIsMaterialsLoanExceptionPage(Page<IsMaterialsLoanException> page, IsMaterialsLoanExceptionPageVO isMaterialsLoanException) {
         if (StringUtils.isNotBlank(isMaterialsLoanException.getLoanFromCode())) {
             IsMaterialsCabinet cabinetByCode = iIsMaterialsCabinetService.getCabinetByCode(isMaterialsLoanException.getLoanFromCode());
-            Assert.isTrue(cabinetByCode != null, "物资柜code不存在");
+            Assert.isTrue(cabinetByCode != null, MessageUtils.message("assert.business.cabinet.code.not.exist"));
             isMaterialsLoanException.setLoanFromId(cabinetByCode.getCabinetId());
         }
         Page<IsMaterialsLoanExceptionPageVO> result = isMaterialsLoanExceptionMapper.getIsMaterialsLoanExceptionPage(page, isMaterialsLoanException);

+ 4 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsLoanServiceImpl.java

@@ -9,6 +9,7 @@ import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.redis.RedisCache;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.*;
 import com.ktg.iscs.domain.dto.materialsLoan.AddLoanDTO;
@@ -385,10 +386,10 @@ public class IsMaterialsLoanServiceImpl extends ServiceImpl<IsMaterialsLoanMappe
             }
             int i = isMaterialsLoanMapper.insertIsMaterialsLoan(isMaterialsLoan);
             // 2.邮件的发送
-            if (materialsTypePageVO != null && materialsTypePageVO.getRestitutionRequired().equals(1) && materials != null) {
+            if (materialsTypePageVO != null && materialsTypePageVO.getRestitutionRequired().equals(1)) {
                 // 2.1获取收件人
                 SysUser user = iSysUserService.getById(isMaterialsLoan.getLoanUserId());
-                Assert.isFalse(user == null, "当前用户信息不存在!");
+                Assert.isFalse(user == null, MessageUtils.message("assert.business.current.user.info.not.exist"));
                 IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getById(materials.getMaterialsCabinetId());
                 // 2.2整理可配置的字段
                 // [收件人],[物资名称],[借用时间],[到期时间],[告警时间],[归还地址],[邮件发送日期]
@@ -476,7 +477,7 @@ public class IsMaterialsLoanServiceImpl extends ServiceImpl<IsMaterialsLoanMappe
      */
     @Override
     public int deleteIsMaterialsLoanByMaterialsLoanIds(String materialsLoanIds) {
-        Assert.notBlank(materialsLoanIds, "请选择需要删除的数据!");
+        Assert.notBlank(materialsLoanIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(materialsLoanIds);
         return isMaterialsLoanMapper.deleteIsMaterialsLoanByMaterialsLoanIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsPlanCabinetServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.iscs.domain.IsMaterials;
 import com.ktg.iscs.domain.IsMaterialsCabinet;
@@ -55,7 +56,7 @@ public class IsMaterialsPlanCabinetServiceImpl extends ServiceImpl<IsMaterialsPl
     @Override
     public Boolean autoChangeCheckRecord(String cabinetCode) {
         IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getCabinetByCode(cabinetCode);
-        Assert.isFalse(cabinet == null, "柜子不存在!");
+        Assert.isFalse(cabinet == null, MessageUtils.message("assert.cabinet.not.exist"));
         // 1.获取这个物资柜当前最近一次未完成的检查计划
         IsMaterialsPlanCabinet planCabinet = getOne(Wrappers.<IsMaterialsPlanCabinet>lambdaQuery()
                 .eq(IsMaterialsPlanCabinet::getCabinetId, cabinet.getCabinetId())

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsPropertyServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsMaterialsProperty;
 import com.ktg.iscs.domain.IsMaterialsPropertyValue;
@@ -44,7 +45,7 @@ public class IsMaterialsPropertyServiceImpl extends ServiceImpl<IsMaterialsPrope
 
     @Override
     public Boolean deleteIsMaterialsPropertyByPropertyIds(String propertyIds) {
-        Assert.notBlank(propertyIds, "请选择需要删除的数据!");
+        Assert.notBlank(propertyIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(propertyIds);
         // 检查下面有没有属性值,有的话先删属性值
         List<IsMaterialsPropertyValue> list = iIsMaterialsPropertyValueService.list(Wrappers.<IsMaterialsPropertyValue>lambdaQuery()

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsReminderServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsMaterialsReminder;
 import com.ktg.iscs.domain.dto.materialsReminder.MaterialsReminderPageDTO;
 import com.ktg.iscs.domain.vo.materialsReminder.MaterialsReminderVO;
@@ -86,7 +87,7 @@ public class IsMaterialsReminderServiceImpl extends ServiceImpl<IsMaterialsRemin
     @Override
     public int deleteIsMaterialsReminderByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isMaterialsReminderMapper.deleteIsMaterialsReminderByRecordIds(longIds);
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsRestitutionRulesServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsMaterialsRestitutionRules;
 import com.ktg.iscs.mapper.IsMaterialsRestitutionRulesMapper;
 import com.ktg.iscs.service.IIsMaterialsRestitutionRulesService;
@@ -83,7 +84,7 @@ public class IsMaterialsRestitutionRulesServiceImpl extends ServiceImpl<IsMateri
     @Override
     public int deleteIsMaterialsRestitutionRulesByRuleIds(String ruleIds)
     {
-        Assert.notBlank(ruleIds, "请选择需要删除的数据!");
+        Assert.notBlank(ruleIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ruleIds);
         return isMaterialsRestitutionRulesMapper.deleteIsMaterialsRestitutionRulesByRuleIds(longIds);
     }

+ 18 - 17
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsServiceImpl.java

@@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.exception.ServiceException;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.*;
@@ -101,12 +102,12 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
     public int insertIsMaterials(IsMaterials isMaterials) {
         // 1.检查物资编码有没有被使用
         List<IsMaterials> list = list(Wrappers.<IsMaterials>lambdaQuery().eq(IsMaterials::getMaterialsCode, isMaterials.getMaterialsCode()));
-        Assert.isFalse(!list.isEmpty(), "该物资编码已被使用!");
+        Assert.isFalse(!list.isEmpty(), MessageUtils.message("assert.material.code.already.used"));
         // 2.检查rfid重复
         if (StringUtils.isNotBlank(isMaterials.getMaterialsRfid())) {
             List<IsMaterials> rfidList = list(Wrappers.<IsMaterials>lambdaQuery()
                     .eq(IsMaterials::getMaterialsRfid, isMaterials.getMaterialsRfid()));
-            Assert.isTrue(rfidList.isEmpty(), "该RFID已被使用!");
+            Assert.isTrue(rfidList.isEmpty(), MessageUtils.message("assert.material.rfid.already.used"));
         }
         // 3.如果设置了物资柜信息,把loan_state变更
         if (isMaterials.getMaterialsCabinetId() == null || isMaterials.getMaterialsCabinetId() == 0) {
@@ -127,13 +128,13 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
         // 1.检查物资编码有没有被使用
         List<IsMaterials> list = list(Wrappers.<IsMaterials>lambdaQuery()
                 .eq(IsMaterials::getMaterialsCode, isMaterials.getMaterialsCode()).ne(IsMaterials::getMaterialsId, isMaterials.getMaterialsId()));
-        Assert.isFalse(!list.isEmpty(), "该物资编码已被使用!");
+        Assert.isFalse(!list.isEmpty(), MessageUtils.message("assert.material.code.already.used"));
         // 2.检查rfid重复
         if (StringUtils.isNotBlank(isMaterials.getMaterialsRfid())) {
             List<IsMaterials> rfidList = list(Wrappers.<IsMaterials>lambdaQuery()
                     .eq(IsMaterials::getMaterialsRfid, isMaterials.getMaterialsRfid())
                     .ne(IsMaterials::getMaterialsId, isMaterials.getMaterialsId()));
-            Assert.isTrue(rfidList.isEmpty(), "该RFID已被使用!");
+            Assert.isTrue(rfidList.isEmpty(), MessageUtils.message("assert.material.rfid.already.used"));
         }
         // 3.如果设置了物资柜信息,把loan_state变更
         if (isMaterials.getMaterialsCabinetId() == null || isMaterials.getMaterialsCabinetId() == 0) {
@@ -154,7 +155,7 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
      */
     @Override
     public int deleteIsMaterialsByMaterialsIds(String materialsIds) {
-        Assert.notBlank(materialsIds, "请选择需要删除的数据!");
+        Assert.notBlank(materialsIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(materialsIds);
         return isMaterialsMapper.deleteIsMaterialsByMaterialsIds(longIds);
     }
@@ -204,8 +205,8 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
             List<String> failRfidList = new ArrayList<>();
             for (LoanMaterialDTO dto : loanParamDTO.getList()) {
                 // 1.断言判断
-                Assert.isFalse(dto.getMaterialsId() == null && StringUtils.isBlank(dto.getMaterialsRfid()), "请告诉我物资的rfid!");
-                Assert.isFalse(StringUtils.isBlank(dto.getLoanState()), "请告诉我是借出还是归还!");
+                Assert.isFalse(dto.getMaterialsId() == null && StringUtils.isBlank(dto.getMaterialsRfid()), MessageUtils.message("assert.material.specify.rfid"));
+                Assert.isFalse(StringUtils.isBlank(dto.getLoanState()), MessageUtils.message("assert.material.specify.borrow.or.return"));
 
                 try {
                     // 1.1 开始查询物资,模拟传的id,物资柜传的rfid
@@ -217,24 +218,24 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
                         if (materials == null) {
                             // 物资不存在
                             handleOutSystemMaterials(dto.getMaterialsRfid(), dto.getLoanState(), dto.getRestitutionToCabinetCode());
-                            Assert.isFalse(true, "通过RFID:" + dto.getMaterialsRfid() + "未查询到物资!");
+                            Assert.isFalse(true, MessageUtils.message("assert.material.rfid.not.found",dto.getMaterialsRfid()));
                             return "true";
                         }
                         dto.setMaterialsId(materials.getMaterialsId());
                     }
                     // 2.物资信息
                     IsMaterials materials = getById(dto.getMaterialsId());
-                    Assert.notNull(materials, "该物资不存在!");
+                    Assert.notNull(materials, MessageUtils.message("assert.material.not.exist"));
                     // 如果物资是借出状态,又来借出就报错
                     // if ("0".equals(materials.getLoanState()) && "0".equals(dto.getLoanState()) && materials.getStatus().equals("0")) {
                     if ("0".equals(materials.getLoanState()) && "0".equals(dto.getLoanState())) {
-                        failRfidList.add(dto.getMaterialsRfid() + "物资已经是借出状态,无法再借出!");
-                        Assert.isFalse(true, dto.getMaterialsRfid() + "物资已经是借出状态,无法再借出!");
+                        failRfidList.add(MessageUtils.message("assert.material.rfid.already.borrowed",dto.getMaterialsRfid()));
+                        Assert.isFalse(true, MessageUtils.message("assert.material.rfid.already.borrowed",dto.getMaterialsRfid()));
                     }
                     // 如果已经再柜中,又来放入
                     if ("1".equals(materials.getLoanState()) && "1".equals(dto.getLoanState())) {
-                        failRfidList.add(dto.getMaterialsRfid() + "物资已经是柜中状态,无法再放入!");
-                        Assert.isFalse(true, dto.getMaterialsRfid() + "物资已经是柜中状态,无法再放入!");
+                        failRfidList.add(MessageUtils.message("assert.material.rfid.already.in.cabinet", dto.getMaterialsRfid()));
+                        Assert.isFalse(true, MessageUtils.message("assert.material.rfid.already.in.cabinet", dto.getMaterialsRfid()));
                     }
                     // 3.开始更新物资状态
                     update(Wrappers.<IsMaterials>lambdaUpdate()
@@ -258,7 +259,7 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
                         } else {
                             IsMaterialsCabinet cabinet = iIsMaterialsCabinetService.getOne(Wrappers.<IsMaterialsCabinet>lambdaQuery()
                                     .eq(IsMaterialsCabinet::getCabinetCode, dto.getRestitutionToCabinetCode()));
-                            Assert.isFalse(cabinet == null, "通过物资柜code:" + dto.getRestitutionToCabinetCode() + "未查询到物资柜信息!");
+                            Assert.isFalse(cabinet == null, MessageUtils.message("assert.material.cabinet.code.not.found",dto.getRestitutionToCabinetCode()));
                             dto.setRestitutionToId(cabinet.getCabinetId());
                         }
                         // 4.2开始更新归还记录表
@@ -309,7 +310,7 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
     @Transactional
     @Override
     public String importMaterials(List<ImportMaterialsVO> itemList, boolean updateSupport, String operName) throws JsonProcessingException {
-        Assert.notNull(itemList, "导入物资数据不能为空!");
+        Assert.notNull(itemList, MessageUtils.message("assert.material.import.data.not.null"));
         int successNum = 0;
         int failureNum = 0;
         StringBuilder successMsg = new StringBuilder();
@@ -411,8 +412,8 @@ public class IsMaterialsServiceImpl extends ServiceImpl<IsMaterialsMapper, IsMat
     @Override
     public Boolean updateMaterialsBinding(MaterialBindingDTO dto) {
         // 1.断言开道,bug闪开
-        Assert.notNull(dto.getMaterialsCabinetId(), "物资柜信息不可为空!");
-        Assert.isFalse(dto.getMaterialsIds().isEmpty(), "请选择物资!");
+        Assert.notNull(dto.getMaterialsCabinetId(), MessageUtils.message("assert.material.cabinet.info.not.null"));
+        Assert.isFalse(dto.getMaterialsIds().isEmpty(), MessageUtils.message("assert.material.select"));
         // 2.开始更新啊
         return update(Wrappers.<IsMaterials>lambdaUpdate()
                 .in(IsMaterials::getMaterialsId, dto.getMaterialsIds())

+ 8 - 7
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsTypeServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.IsMaterials;
 import com.ktg.iscs.domain.IsMaterialsRestitutionRules;
@@ -76,8 +77,8 @@ public class IsMaterialsTypeServiceImpl extends ServiceImpl<IsMaterialsTypeMappe
         // 2.检查物资类型编码是否重复
         List<IsMaterialsType> list = list(Wrappers.<IsMaterialsType>lambdaQuery()
                 .eq(IsMaterialsType::getMaterialsTypeCode, dto.getMaterialsTypeCode()));
-        Assert.isFalse(!list.isEmpty(), "该物资类型编码已被使用!");
-        Assert.isTrue(dto.getLoanDuration() >= dto.getReminderTime(), "借用时长需要大于等于提醒时长!");
+        Assert.isFalse(!list.isEmpty(), MessageUtils.message("assert.material.category.code.already.used"));
+        Assert.isTrue(dto.getLoanDuration() >= dto.getReminderTime(), MessageUtils.message("assert.material.category.borrow.duration.gte.reminder"));
         dto.setCreateTime(DateUtils.getNowDate());
         IsMaterialsType isMaterialsType = BeanUtils.toBean(dto, IsMaterialsType.class);
         save(isMaterialsType);
@@ -108,8 +109,8 @@ public class IsMaterialsTypeServiceImpl extends ServiceImpl<IsMaterialsTypeMappe
         List<IsMaterialsType> list = list(Wrappers.<IsMaterialsType>lambdaQuery()
                 .eq(IsMaterialsType::getMaterialsTypeCode, dto.getMaterialsTypeCode())
                 .ne(IsMaterialsType::getMaterialsTypeId, dto.getMaterialsTypeId()));
-        Assert.isFalse(!list.isEmpty(), "该物资类型编码已被使用!");
-        Assert.isTrue(dto.getLoanDuration() >= dto.getReminderTime(), "借用时长需要大于等于提醒时长!");
+        Assert.isFalse(!list.isEmpty(), MessageUtils.message("assert.material.category.code.already.used"));
+        Assert.isTrue(dto.getLoanDuration() >= dto.getReminderTime(), MessageUtils.message("assert.material.category.borrow.duration.gte.reminder"));
         dto.setUpdateTime(DateUtils.getNowDate());
         IsMaterialsType isMaterialsType = BeanUtils.toBean(dto, IsMaterialsType.class);
         int i = isMaterialsTypeMapper.updateIsMaterialsType(isMaterialsType);
@@ -136,7 +137,7 @@ public class IsMaterialsTypeServiceImpl extends ServiceImpl<IsMaterialsTypeMappe
     @Override
     public int deleteIsMaterialsTypeByMaterialsTypeIds(String materialsTypeIds)
     {
-        Assert.notBlank(materialsTypeIds, "请选择需要删除的数据!");
+        Assert.notBlank(materialsTypeIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(materialsTypeIds);
         // 检查删除时下面有没有物资,有的话不可以删除
         List<IsMaterials> materialsList = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
@@ -145,7 +146,7 @@ public class IsMaterialsTypeServiceImpl extends ServiceImpl<IsMaterialsTypeMappe
             List<Long> materialsTypeIdList = materialsList.stream().map(IsMaterials::getMaterialsTypeId).collect(Collectors.toList());
             List<IsMaterialsType> isMaterialsTypes = listByIds(materialsTypeIdList);
             String collect = isMaterialsTypes.stream().map(IsMaterialsType::getMaterialsTypeName).collect(Collectors.joining(","));
-            Assert.isTrue(false, collect + "分类下有物资,不可删除!");
+            Assert.isTrue(false, MessageUtils.message("assert.material.category.has.materials.cannot.delete",collect));
 
         }
         // 查询有没有子类,有的话不能删除
@@ -153,7 +154,7 @@ public class IsMaterialsTypeServiceImpl extends ServiceImpl<IsMaterialsTypeMappe
                 .in(IsMaterialsType::getParentId, materialsTypeIds));
         if (!materialsTypes.isEmpty()) {
             String collect = materialsTypes.stream().map(IsMaterialsType::getMaterialsTypeName).collect(Collectors.joining(","));
-            Assert.isTrue(false, collect + "分类下有子类,不可删除!");
+            Assert.isTrue(false, MessageUtils.message("assert.material.category.has.children.cannot.delete",collect));
 
         }
         // 开始删除

+ 6 - 5
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMotorServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.redis.RedisCache;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsIsolationPoint;
 import com.ktg.iscs.domain.IsLotoStation;
@@ -58,9 +59,9 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
 
     @Override
     public List<IsMotor> getIsMotorListByLotoId(Long lotoId) {
-        Assert.notNull(lotoId, "锁控柜id不能为空!");
+        Assert.notNull(lotoId, MessageUtils.message("assert.cabinet.lock.id.not.null"));
         IsLotoStation lotoStation = isLotoStationService.getById(lotoId);
-        Assert.notNull(lotoStation, "物资柜存在!");
+        Assert.notNull(lotoStation, MessageUtils.message("assert.cabinet.material.not.exist"));
         List<IsMotor> motorList = null;
         if (lotoStation.getMotorMapId() != null) {
             List<IsIsolationPoint> points = iIsIsolationPointService.list(Wrappers.<IsIsolationPoint>lambdaQuery()
@@ -112,7 +113,7 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
         if (!dto.getMoveList().isEmpty()) {
             Date date = new Date();
             for (MotorMoveDetailDTO motorMoveDetailDTO : dto.getMoveList()) {
-                Assert.notNull(motorMoveDetailDTO.getMapId(), "地图主键不能为空");
+                Assert.notNull(motorMoveDetailDTO.getMapId(), MessageUtils.message("assert.motor.map.primary.key.not.null"));
                 if (motorMoveDetailDTO.getMapPointId() != null) {
                     isMapPointService.update(Wrappers.<IsMapPoint>lambdaUpdate()
                             .eq(IsMapPoint::getId, motorMoveDetailDTO.getMapPointId())
@@ -136,7 +137,7 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
     @Transactional
     @Override
     public Boolean deleteIsMotorByMotorIds(String motorIds) {
-        Assert.notBlank(motorIds, "请选择需要删除的数据!");
+        Assert.notBlank(motorIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(motorIds);
         removeBatchByIds(Arrays.asList(longIds));
         // 需要删除is_map_point中的相关数据
@@ -150,7 +151,7 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
     @Override
     public Boolean updateIsMotor(IsMotor isMotor) {
         IsMotor byId = getById(isMotor.getMotorId());
-        Assert.isTrue(byId != null, "该电机数据不存在!");
+        Assert.isTrue(byId != null, MessageUtils.message("assert.motor.data.not.exist"));
         update(Wrappers.<IsMotor>lambdaUpdate()
                 .eq(IsMotor::getMotorId, isMotor.getMotorId())
                 .set(IsMotor::getMotorName, isMotor.getMotorName())

+ 3 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsRfidTokenServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsIsolationPoint;
 import com.ktg.iscs.domain.IsRfidToken;
@@ -62,7 +63,7 @@ public class IsRfidTokenServiceImpl extends ServiceImpl<IsRfidTokenMapper, IsRfi
 
     @Override
     public Boolean updateIsRfidToken(IsRfidToken isRfidToken) {
-        Assert.notNull(isRfidToken.getRfidId(), "主键ID不可为空!");
+        Assert.notNull(isRfidToken.getRfidId(), MessageUtils.message("assert.common.param.id.not.null"));
         // 检查编码重复
         if (StringUtils.isNotBlank(isRfidToken.getRfidCode())) {
             List<IsRfidToken> list = list(Wrappers.<IsRfidToken>lambdaQuery()
@@ -80,7 +81,7 @@ public class IsRfidTokenServiceImpl extends ServiceImpl<IsRfidTokenMapper, IsRfi
 
     @Override
     public Boolean deleteIsRfidTokenByRfidIds(String rfidIds) {
-        cn.hutool.core.lang.Assert.notBlank(rfidIds, "请选择需要删除的数据!");
+        cn.hutool.core.lang.Assert.notBlank(rfidIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(rfidIds);
         // 查询有没有正在使用的点位,如果有则不能删除
         List<IsIsolationPoint> list = iIsIsolationPointService.list(Wrappers.<IsIsolationPoint>lambdaQuery()

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopPointsServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsSopPoints;
 import com.ktg.iscs.mapper.IsSopPointsMapper;
 import com.ktg.iscs.service.IIsSopPointsService;
@@ -83,7 +84,7 @@ public class IsSopPointsServiceImpl extends ServiceImpl<IsSopPointsMapper, IsSop
     @Override
     public int deleteIsSopPointsByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isSopPointsMapper.deleteIsSopPointsByRecordIds(longIds);
     }

+ 13 - 12
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.domain.entity.SysDictData;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.IsJobTicketPoints;
 import com.ktg.iscs.domain.IsSop;
@@ -113,12 +114,12 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
     @Override
     public Boolean insertIsSop(AddSopDTO dto) {
         // 断言校验
-        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), "SOP名称不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getSopCode()), "SOP编号名称不可为空!");
+        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), MessageUtils.message("assert.sop.name.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getSopCode()), MessageUtils.message("assert.sop.code.name.not.null"));
         List<IsSop> list = list(Wrappers.<IsSop>lambdaQuery().eq(IsSop::getSopCode, dto.getSopCode()));
-        Assert.isTrue(list.isEmpty(), "该SOP编号已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.sop.code.already.used"));
         // 1.判断隔离点必选
-        Assert.isFalse(dto.getPointsList().isEmpty(), "隔离点id不可为空!");
+        Assert.isFalse(dto.getPointsList().isEmpty(), MessageUtils.message("assert.isolation.point.id.not.null"));
         // 2.开始新增sop数据
         IsSop isSop = BeanUtils.toBean(dto, IsSop.class);
         save(isSop);
@@ -156,15 +157,15 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
     @Override
     public Boolean updateIsSop(AddSopDTO dto) {
         // 断言校验
-        Assert.notNull(dto.getSopId(), "sopId不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), "SOP名称不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(dto.getSopCode()), "SOP编号名称不可为空!");
+        Assert.notNull(dto.getSopId(), MessageUtils.message("assert.sop.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getSopName()), MessageUtils.message("assert.sop.name.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(dto.getSopCode()), MessageUtils.message("assert.sop.code.name.not.null"));
         List<IsSop> list = list(Wrappers.<IsSop>lambdaQuery()
                 .eq(IsSop::getSopCode, dto.getSopCode())
                 .ne(IsSop::getSopId, dto.getSopId()));
-        Assert.isTrue(list.isEmpty(), "该SOP编号已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.sop.code.already.used"));
         // 1.判断隔离点必选
-        Assert.isFalse(dto.getPointsList().isEmpty(), "隔离点id不可为空!");
+        Assert.isFalse(dto.getPointsList().isEmpty(), MessageUtils.message("assert.isolation.point.id.not.null"));
         // 1.1检查区域有没有变,区域变了的话隔离点肯定变了,因为隔离点是从区域数据中解析的
         // IsSop sop = getById(dto.getSopId());
         // 2.开始检查隔离点有没有变更
@@ -215,7 +216,7 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
     @Override
     public Boolean deleteIsSopBySopIds(String sopIds) {
         // 1.断言判断
-        Assert.notBlank(sopIds, "请选择需要删除的数据!");
+        Assert.notBlank(sopIds, MessageUtils.message("assert.common.delete.select.data"));
         // 2.删除主数据
         Long[] longIds = Convert.toLongArray(sopIds);
         isSopMapper.deleteIsSopBySopIds(longIds);
@@ -253,8 +254,8 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
 
     @Override
     public Boolean updateIsSopIndex(IsSop isSop) {
-        Assert.notNull(isSop.getSopId(), "主键id不可为空!");
-        Assert.notNull(isSop.getSopIndex(), "排序数据不可为空!");
+        Assert.notNull(isSop.getSopId(), MessageUtils.message("assert.common.param.id.not.null"));
+        Assert.notNull(isSop.getSopIndex(), MessageUtils.message("assert.sop.sort.data.not.null"));
         update(Wrappers.<IsSop>lambdaUpdate()
                 .eq(IsSop::getSopId, isSop.getSopId())
                 .set(IsSop::getSopIndex, isSop.getSopIndex()));

+ 8 - 6
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopUserServiceImpl.java

@@ -1,15 +1,17 @@
 package com.ktg.iscs.service.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import java.util.List;
 import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ktg.iscs.mapper.IsSopUserMapper;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsSopUser;
+import com.ktg.iscs.mapper.IsSopUserMapper;
 import com.ktg.iscs.service.IIsSopUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * SOP用户Service业务层处理
@@ -82,7 +84,7 @@ public class IsSopUserServiceImpl extends ServiceImpl<IsSopUserMapper, IsSopUser
     @Override
     public int deleteIsSopUserByRecordIds(String recordIds)
     {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         return isSopUserMapper.deleteIsSopUserByRecordIds(longIds);
     }

+ 6 - 5
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSystemAttributeServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.redis.RedisCache;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanUtils;
 import com.ktg.iscs.domain.IsSystemAttribute;
@@ -49,7 +50,7 @@ public class IsSystemAttributeServiceImpl extends ServiceImpl<IsSystemAttributeM
 
     @Override
     public IsSystemAttribute getIsSystemAttributeByKey(String sysAttrKey) {
-        Assert.notBlank(sysAttrKey, "请传入key");
+        Assert.notBlank(sysAttrKey, MessageUtils.message("assert.business.key.required"));
         IsSystemAttributeVO cacheObject = redisCache.getCacheObject(SYS_ATTR + sysAttrKey);
         if (cacheObject != null) {
             return BeanUtils.toBean(cacheObject, IsSystemAttribute.class);
@@ -60,7 +61,7 @@ public class IsSystemAttributeServiceImpl extends ServiceImpl<IsSystemAttributeM
                 redisCache.setCacheObject(SYS_ATTR + sysAttrKey, BeanUtils.toBean(one, IsSystemAttributeVO.class));
                 return one;
             } else {
-                Assert.isTrue(false, "该配置参数不存在!");
+                Assert.isTrue(false, MessageUtils.message("assert.business.config.param.not.exist"));
             }
         }
         return null;
@@ -88,7 +89,7 @@ public class IsSystemAttributeServiceImpl extends ServiceImpl<IsSystemAttributeM
             mailVO.setCompany(list.stream().filter(o -> "info.mail.company".equals(o.getSysAttrKey())).limit(1).collect(Collectors.toList()).get(0).getSysAttrValue());
 
         } catch (Exception e) {
-            Assert.isTrue(false, "邮箱参数缺失,请检查!");
+            Assert.isTrue(false, MessageUtils.message("assert.business.email.param.missing.check"));
         }
         return mailVO;
     }
@@ -110,7 +111,7 @@ public class IsSystemAttributeServiceImpl extends ServiceImpl<IsSystemAttributeM
 
     @Override
     public Boolean updateIsSystemAttribute(IsSystemAttribute isSystemAttribute) {
-        Assert.notNull(isSystemAttribute.getSysAttrId(), "主键id不可为空!");
+        Assert.notNull(isSystemAttribute.getSysAttrId(), MessageUtils.message("assert.common.param.id.not.null"));
         Assert.notBlank(isSystemAttribute.getSysAttrKey(), "键名不可为空");
         Assert.notBlank(isSystemAttribute.getSysAttrValue(), "键值不可为空");
         // 1.判断键名不可重复
@@ -129,7 +130,7 @@ public class IsSystemAttributeServiceImpl extends ServiceImpl<IsSystemAttributeM
 
     @Override
     public Boolean deleteIsSystemAttributeByIds(String ids) {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         List<Long> idList = Arrays.asList(longIds);
         // 开始清理缓存

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsUserWorkstationServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsUserWorkstation;
 import com.ktg.iscs.mapper.IsUserWorkstationMapper;
 import com.ktg.iscs.service.IIsUserWorkstationService;
@@ -82,7 +83,7 @@ public class IsUserWorkstationServiceImpl extends ServiceImpl<IsUserWorkstationM
     @Override
     public int deleteIsUserWorkstationByUserIds(String userIds)
     {
-        Assert.notBlank(userIds, "请选择需要删除的数据!");
+        Assert.notBlank(userIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(userIds);
         return isUserWorkstationMapper.deleteIsUserWorkstationByUserIds(longIds);
     }

+ 12 - 11
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsWorkareaServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ktg.common.core.text.Convert;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsJobTicketPoints;
 import com.ktg.iscs.domain.IsSopPoints;
 import com.ktg.iscs.domain.IsWorkarea;
@@ -80,11 +81,11 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
     public int insertIsWorkarea(IsWorkarea isWorkarea)
     {
         // 断言校验
-        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaName()), "区域名称不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaCode()), "区域编号名称不可为空!");
+        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaName()), MessageUtils.message("assert.work.area.name.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaCode()), MessageUtils.message("assert.work.area.code.name.not.null"));
         List<IsWorkarea> list = list(Wrappers.<IsWorkarea>lambdaQuery()
                 .eq(IsWorkarea::getWorkareaCode, isWorkarea.getWorkareaCode()));
-        Assert.isTrue(list.isEmpty(), "该区域编号已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.work.area.code.already.used"));
         IsWorkarea one =getById(isWorkarea.getParentId());
         String ancestors;
         if (one != null) {
@@ -106,14 +107,14 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
     public int updateIsWorkarea(IsWorkarea isWorkarea)
     {
         // 断言校验
-        Assert.notNull(isWorkarea.getWorkareaId(), "区域ID不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaName()), "区域名称不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaCode()), "区域编号名称不可为空!");
+        Assert.notNull(isWorkarea.getWorkareaId(), MessageUtils.message("assert.work.area.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaName()), MessageUtils.message("assert.work.area.name.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isWorkarea.getWorkareaCode()), MessageUtils.message("assert.work.area.code.name.not.null"));
         // Assert.notNull(isWorkarea.getWorkshopId(), "所属车间不可为空!");
         List<IsWorkarea> list = list(Wrappers.<IsWorkarea>lambdaQuery()
                 .eq(IsWorkarea::getWorkareaCode, isWorkarea.getWorkareaCode())
                 .ne(IsWorkarea::getWorkareaId, isWorkarea.getWorkareaId()));
-        Assert.isTrue(list.isEmpty(), "该区域编号已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.work.area.code.already.used"));
         isWorkarea.setUpdateTime(new Date());
         return isWorkareaMapper.updateIsWorkarea(isWorkarea);
     }
@@ -127,7 +128,7 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
     @Override
     public int deleteIsWorkareaByWorkareaIds(String workareaIds)
     {
-        Assert.notBlank(workareaIds, "请选择需要删除的数据!");
+        Assert.notBlank(workareaIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(workareaIds);
         // 1.判断下面有没有隔离点信息
         for (Long longId : longIds) {
@@ -135,7 +136,7 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
                     .eq(IsSopPoints::getWorkareaId, longId));
             if (!list.isEmpty()) {
                 IsWorkarea byId = getById(longId);
-                Assert.isTrue(false, byId.getWorkareaName() + "下有隔离点,暂不可删除!");
+                Assert.isTrue(false, MessageUtils.message("assert.work.area.has.isolation.point.cannot.delete", byId.getWorkareaName()));
             }
         }
         return isWorkareaMapper.deleteIsWorkareaByWorkareaIds(longIds);
@@ -161,7 +162,7 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
     @Override
     public List<PointsMapVO> selectIsWorkareaMapById(Long workareaId, Long sopId, Long ticketId) {
         // 1.断言校验
-        Assert.notNull(workareaId, "请传入区域id");
+        Assert.notNull(workareaId, MessageUtils.message("assert.work.area.pass.id"));
         // 2.查询区域信息
         IsWorkarea workarea = getById(workareaId);
         // 3.解析map
@@ -231,7 +232,7 @@ public class IsWorkareaServiceImpl extends ServiceImpl<IsWorkareaMapper, IsWorka
                     return true;
                 }).collect(Collectors.toList());
             } catch (IOException e) {
-                Assert.isTrue(false, "map数据解析失败!");
+                Assert.isTrue(false, MessageUtils.message("assert.map.data.parse.fail"));
                 e.printStackTrace();
             }
         }

+ 9 - 8
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsWorkstationServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.annotation.MarsDataScope;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.iscs.domain.IsUserWorkstation;
 import com.ktg.iscs.domain.IsWorkstation;
 import com.ktg.iscs.mapper.IsWorkstationMapper;
@@ -68,11 +69,11 @@ public class IsWorkstationServiceImpl extends ServiceImpl<IsWorkstationMapper, I
     public int insertIsWorkstation(IsWorkstation isWorkstation)
     {
         // 断言校验
-        Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationName()), "岗位名称不可为空!");
+        Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationName()), MessageUtils.message("assert.post.name.not.null"));
         // Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationCode()), "岗位编号名称不可为空!");
         List<IsWorkstation> list = list(Wrappers.<IsWorkstation>lambdaQuery()
                 .eq(IsWorkstation::getWorkstationName, isWorkstation.getWorkstationName()));
-        Assert.isTrue(list.isEmpty(), "该岗位名称已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.post.name.already.used"));
         IsWorkstation one =getById(isWorkstation.getParentId());
         String ancestors;
         if (one != null) {
@@ -94,13 +95,13 @@ public class IsWorkstationServiceImpl extends ServiceImpl<IsWorkstationMapper, I
     public int updateIsWorkstation(IsWorkstation isWorkstation)
     {
         // 断言校验
-        Assert.notNull(isWorkstation.getWorkstationId(), "岗位ID不可为空!");
-        Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationName()), "岗位名称不可为空!");
+        Assert.notNull(isWorkstation.getWorkstationId(), MessageUtils.message("assert.post.id.not.null"));
+        Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationName()), MessageUtils.message("assert.post.name.not.null"));
         // Assert.isTrue(StringUtils.isNotBlank(isWorkstation.getWorkstationCode()), "岗位编号名称不可为空!");
         List<IsWorkstation> list = list(Wrappers.<IsWorkstation>lambdaQuery()
                 .eq(IsWorkstation::getWorkstationName, isWorkstation.getWorkstationName())
                 .ne(IsWorkstation::getWorkstationId, isWorkstation.getWorkstationId()));
-        Assert.isTrue(list.isEmpty(), "该岗位名称已被使用!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.post.name.already.used"));
         isWorkstation.setUpdateTime(DateUtils.getNowDate());
         return isWorkstationMapper.updateIsWorkstation(isWorkstation);
     }
@@ -114,13 +115,13 @@ public class IsWorkstationServiceImpl extends ServiceImpl<IsWorkstationMapper, I
     @Override
     public int deleteIsWorkstationByWorkstationIds(String workstationIds)
     {
-        Assert.notBlank(workstationIds, "请选择需要删除的数据!");
+        Assert.notBlank(workstationIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(workstationIds);
         List<IsUserWorkstation> list = iIsUserWorkstationService.list(Wrappers.<IsUserWorkstation>lambdaQuery()
                 .in(IsUserWorkstation::getWorkstationId, longIds));
-        Assert.isTrue(list.isEmpty(), "岗位正在被用户使用,无法删除!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.post.used.by.user.cannot.delete"));
         List<IsWorkstation> isWorkstationList = list(Wrappers.<IsWorkstation>lambdaQuery().in(IsWorkstation::getParentId, longIds));
-        Assert.isTrue(isWorkstationList.isEmpty(), "岗位下有子岗位,无法删除!");
+        Assert.isTrue(isWorkstationList.isEmpty(), MessageUtils.message("assert.post.has.children.cannot.delete"));
         return isWorkstationMapper.deleteIsWorkstationByWorkstationIds(longIds);
     }
 

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/StatisticsApiServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ktg.common.core.domain.entity.SysDictData;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.domain.IsMaterials;
 import com.ktg.iscs.domain.IsMaterialsCabinet;
@@ -115,7 +116,7 @@ public class StatisticsApiServiceImpl implements StatisticsApiService {
 
     @Override
     public List<InventoryVO> getMaterialInventory(Integer type) {
-        Assert.notNull(type, "type不能为空!");
+        Assert.notNull(type, MessageUtils.message("assert.business.type.not.null"));
         // 1.获取所有在柜子中的物资
         List<IsMaterials> allMaterials = iIsMaterialsService.list(Wrappers.<IsMaterials>lambdaQuery()
                 .isNotNull(IsMaterials::getMaterialsCabinetId)

+ 3 - 2
ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMachineryController.java

@@ -6,6 +6,7 @@ import com.ktg.common.core.controller.BaseController;
 import com.ktg.common.core.domain.AjaxResult;
 import com.ktg.common.core.page.TableDataInfo;
 import com.ktg.common.enums.BusinessType;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.poi.ExcelUtil;
 import com.ktg.mes.dv.domain.DvMachinery;
@@ -21,7 +22,7 @@ import java.util.List;
 
 /**
  * 设备Controller
- * 
+ *
  * @author yinjinlu
  * @date 2022-05-08
  */
@@ -116,7 +117,7 @@ public class DvMachineryController extends BaseController
         List<DvMachinery> dvMachineryList = util.importExcel(file.getInputStream());
         String operName = SecurityUtils.getUsername();
         String message = dvMachineryService.importMachinery(dvMachineryList, updateSupport, operName);
-        return AjaxResult.success("导入成功,共导入 " + message + " 条数据");
+        return AjaxResult.success(MessageUtils.message("common.result.success.import.data", message));
     }
 
 }

+ 3 - 2
ktg-quartz/src/main/java/com/ktg/quartz/task/SendEmailsTask.java

@@ -3,6 +3,7 @@ package com.ktg.quartz.task;
 import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ktg.common.core.domain.entity.SysUser;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.iscs.config.EmailSender;
 import com.ktg.iscs.domain.IsCheckTask;
@@ -44,7 +45,7 @@ public class SendEmailsTask {
     private IIsSystemAttributeService isSystemAttributeService;
 
     public void checkMaterialsCabinet(Long checkId) {
-        Assert.notNull(checkId, "无效参数!");
+        Assert.notNull(checkId, MessageUtils.message("assert.common.param.invalid"));
         // 1.获取数据
         IsCheckTask checkTask = iIsCheckTaskService.getById(checkId);
         if (checkTask != null && StringUtils.isNotBlank(checkTask.getCabinetIdStr()) && StringUtils.isNotBlank(checkTask.getUserIdStr())) {
@@ -96,7 +97,7 @@ public class SendEmailsTask {
                             .eq(IsMailSendTaskItem::getMailId, sendTaskItem.getMailId())
                             .set(IsMailSendTaskItem::getIsCancelled, 2)
                             .set(IsMailSendTaskItem::getCancelTime, date)
-                            .set(IsMailSendTaskItem::getRemark, "[该用户不存在!]"));
+                            .set(IsMailSendTaskItem::getRemark, MessageUtils.message("assert.business.user.not.exist")));
                     continue;
                 }
                 if (StringUtils.isBlank(user.getEmail())) {

+ 3 - 2
ktg-system/src/main/java/com/ktg/system/service/impl/SysAutoCodePartServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.ktg.common.constant.UserConstants;
 import com.ktg.common.core.domain.entity.SysAutoCodePart;
 import com.ktg.common.core.domain.entity.SysAutoCodeRule;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.mapper.SysAutoCodePartMapper;
 import com.ktg.system.mapper.SysAutoCodeRuleMapper;
@@ -57,7 +58,7 @@ public class SysAutoCodePartServiceImpl implements IAutoCodePartService {
             long sum = sysAutoCodeParts.stream().mapToLong(SysAutoCodePart::getPartLength).sum();
             lengthSum = Math.toIntExact(lengthSum + sum);
         }
-        Assert.isFalse(maxLength != null && lengthSum != null && maxLength < lengthSum, "最大长度" + maxLength + "小于分段长度总和" + lengthSum + ",请扩容最大长度!");
+        Assert.isFalse(maxLength != null && lengthSum != null && maxLength < lengthSum, MessageUtils.message("assert.business.code.max.length.less.than.sum",maxLength, lengthSum));
         return sysAutoCodePartMapper.add(sysAutoCodePart);
     }
 
@@ -76,7 +77,7 @@ public class SysAutoCodePartServiceImpl implements IAutoCodePartService {
             long sum = sysAutoCodeParts.stream().filter(o -> !Objects.equals(o.getPartId(), sysAutoCodePart.getPartId())).mapToLong(SysAutoCodePart::getPartLength).sum();
             lengthSum = Math.toIntExact(lengthSum + sum);
         }
-        Assert.isFalse(maxLength != null && lengthSum != null && maxLength < lengthSum, "最大长度" + maxLength + "小于分段长度总和" + lengthSum + ",请扩容最大长度!");
+        Assert.isFalse(maxLength != null && lengthSum != null && maxLength < lengthSum, MessageUtils.message("assert.business.code.max.length.less.than.sum",maxLength, lengthSum));
         return sysAutoCodePartMapper.updateSysAutoCodePart(sysAutoCodePart);
     }
 

+ 4 - 1
ktg-system/src/main/java/com/ktg/system/service/impl/SysConfigServiceImpl.java

@@ -7,12 +7,14 @@ import com.ktg.common.core.redis.RedisCache;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.enums.DataSourceType;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.domain.SysConfig;
 import com.ktg.system.mapper.SysConfigMapper;
 import com.ktg.system.service.ISysConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
 import javax.annotation.PostConstruct;
 import java.util.Collection;
 import java.util.List;
@@ -155,7 +157,8 @@ public class SysConfigServiceImpl implements ISysConfigService
             SysConfig config = selectConfigById(configId);
             if (StringUtils.equals(UserConstants.YES, config.getConfigType()))
             {
-                throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
+                // throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
+                throw new ServiceException(MessageUtils.message("config.service.built.in.param.delete.not.allow", config.getConfigKey()));
             }
             configMapper.deleteConfigById(configId);
             redisCache.deleteObject(getCacheKey(config.getConfigKey()));

+ 10 - 8
ktg-system/src/main/java/com/ktg/system/service/impl/SysDeptServiceImpl.java

@@ -1,11 +1,5 @@
 package com.ktg.system.service.impl;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.stream.Collectors;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.ktg.common.annotation.DataScope;
 import com.ktg.common.constant.UserConstants;
 import com.ktg.common.core.domain.TreeSelect;
@@ -14,12 +8,20 @@ import com.ktg.common.core.domain.entity.SysRole;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.spring.SpringUtils;
 import com.ktg.system.mapper.SysDeptMapper;
 import com.ktg.system.mapper.SysRoleMapper;
 import com.ktg.system.service.ISysDeptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 部门管理 服务实现
@@ -188,7 +190,7 @@ public class SysDeptServiceImpl implements ISysDeptService
             List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
             if (StringUtils.isEmpty(depts))
             {
-                throw new ServiceException("没有权限访问部门数据!");
+                throw new ServiceException(MessageUtils.message("dept.service.access.data.no.permission"));
             }
         }
     }
@@ -206,7 +208,7 @@ public class SysDeptServiceImpl implements ISysDeptService
         // 如果父节点不为正常状态,则不允许新增子节点
         if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
         {
-            throw new ServiceException("部门停用,不允许新增");
+            throw new ServiceException(MessageUtils.message("dept.service.add.disabled.not.allow"));
         }
         dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
         return deptMapper.insertDept(dept);

+ 3 - 2
ktg-system/src/main/java/com/ktg/system/service/impl/SysDictDataServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.domain.entity.SysDictData;
 import com.ktg.common.utils.DictUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.system.mapper.SysDictDataMapper;
 import com.ktg.system.service.ISysDictDataService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -90,7 +91,7 @@ public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDi
         List<SysDictData> list = list(Wrappers.<SysDictData>lambdaQuery()
                 .eq(SysDictData::getDictType, data.getDictType())
                 .eq(SysDictData::getDictValue, data.getDictValue()));
-        Assert.isTrue(list.isEmpty(), "该字典类型下已存在键值:" + data.getDictValue() + ",请重新填写!");
+        Assert.isTrue(list.isEmpty(), MessageUtils.message("assert.dict.data.key.value.exist",data.getDictValue()));
         int row = dictDataMapper.insertDictData(data);
         if (row > 0)
         {
@@ -114,7 +115,7 @@ public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDi
                 .eq(SysDictData::getDictType, data.getDictType())
                 .eq(SysDictData::getDictValue, data.getDictValue())
                 .ne(SysDictData::getDictCode, data.getDictCode()));
-        Assert.isTrue(list.isEmpty(), "该字典类型下已存在键值:" + data.getDictValue() + ",请重新填写!");
+        Assert.isTrue(list.isEmpty(),  MessageUtils.message("assert.dict.data.key.value.exist",data.getDictValue()));
 
         int row = dictDataMapper.updateDictData(data);
         if (row > 0)

+ 3 - 2
ktg-system/src/main/java/com/ktg/system/service/impl/SysRoleServiceImpl.java

@@ -7,6 +7,7 @@ import com.ktg.common.constant.UserConstants;
 import com.ktg.common.core.domain.entity.SysRole;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.spring.SpringUtils;
@@ -182,7 +183,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
     @Override
     public void checkRoleAllowed(SysRole role) {
         if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) {
-            throw new ServiceException("不允许操作超级管理员角色");
+            throw new ServiceException(MessageUtils.message("role.service.operate.super.admin.not.allow"));
         }
     }
 
@@ -198,7 +199,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
             role.setRoleId(roleId);
             List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role);
             if (StringUtils.isEmpty(roles)) {
-                throw new ServiceException("没有权限访问角色数据!");
+                throw new ServiceException(MessageUtils.message("role.service.access.data.no.permission"));
             }
         }
     }

+ 2 - 1
ktg-system/src/main/java/com/ktg/system/service/impl/SysUploadFileServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.core.text.Convert;
 import com.ktg.common.utils.DateUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.domain.SysUploadFile;
 import com.ktg.system.mapper.SysUploadFileMapper;
@@ -79,7 +80,7 @@ public class SysUploadFileServiceImpl extends ServiceImpl<SysUploadFileMapper, S
      */
     @Override
     public int deleteSysUploadFileByIds(String ids) {
-        Assert.notBlank(ids, "请选择需要删除的数据!");
+        Assert.notBlank(ids, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(ids);
         return sysUploadFileMapper.deleteSysUploadFileByIds(longIds);
     }

+ 18 - 17
ktg-system/src/main/java/com/ktg/system/service/impl/SysUserCharacteristicServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ktg.common.config.RuoYiConfig;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.utils.FileDriveLetterUtils;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.face.ArcSoftMothodUtil;
 import com.ktg.common.utils.face.FaceCutUtil;
@@ -62,12 +63,12 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
 
     @Override
     public Long insertUserFingerprintDat(MultipartFile file, String userName, String sysAttrValue, String url, String group) throws IOException {
-        Assert.notBlank(userName, "请告知我这是哪个用户的指纹!");
-        Assert.notBlank(group, "指纹分组不可为空!");
-        Assert.isTrue(file.getSize() > 0, "指纹信息不能为空!");
+        Assert.notBlank(userName, MessageUtils.message("assert.fingerprint.specify.user"));
+        Assert.notBlank(group, MessageUtils.message("assert.fingerprint.group.not.null"));
+        Assert.isTrue(file.getSize() > 0, MessageUtils.message("assert.fingerprint.info.not.null"));
         SysUser user = iSysUserService.getOne(Wrappers.<SysUser>lambdaQuery()
                 .eq(SysUser::getUserName, userName));
-        Assert.isFalse(user == null, "系统中无该用户!");
+        Assert.isFalse(user == null, MessageUtils.message("assert.user.not.exist.in.system"));
         Long userId = user.getUserId();
         if (StringUtils.isNotBlank(sysAttrValue)) {
             // 检查人员指纹上限
@@ -75,7 +76,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
                     .eq(SysUserCharacteristic::getType, "1")
                     .eq(SysUserCharacteristic::getUserId, userId));
             int i = Integer.parseInt(sysAttrValue);
-            Assert.isFalse(count >= i, "该人员的指纹录入已上限,最大" + i + "条!");
+            Assert.isFalse(count >= i, MessageUtils.message("assert.fingerprint.entry.limit.reached", i));
         }
         // 时间戳
         long currentTimestamp = System.currentTimeMillis();
@@ -123,7 +124,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
             e.printStackTrace();
             // 删除指纹图片
             deleteFileByPath(imagePath);
-            Assert.isFalse(true, "该文件指纹无法识别,请重新录入!");
+            Assert.isFalse(true, MessageUtils.message("assert.fingerprint.unrecognizable.retry"));
         }
         // 查询该人员的分组有没有指纹
         List<SysUserCharacteristic> list = list(Wrappers.<SysUserCharacteristic>lambdaQuery()
@@ -140,7 +141,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
                 if (score < THRESHOLD) {
                     deleteFileByPath(imagePath);
                     deleteFileByPath(filePath + userId + "_" + currentTimestamp + ".dat");
-                    Assert.isTrue(false, "指纹相似度相差较大,请重新录入!");
+                    Assert.isTrue(false, MessageUtils.message("assert.fingerprint.similarity.low.retry"));
                 }
             }
         }
@@ -172,18 +173,18 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
             // 导出为 byte[] 保存特征值
             return template.serialize().getBytes();
         } catch (Exception e) {
-            Assert.isFalse(true, "该文件指纹无法识别,请重新录入!");
+            Assert.isFalse(true, MessageUtils.message("assert.fingerprint.unrecognizable.retry"));
         }
         return null;
     }
 
     @Override
     public FaceCutVO insertUserCutFace(MultipartFile file, String userName, String sysAttrValue, String url) throws IOException {
-        Assert.notBlank(userName, "请告知我这是哪个用户的人脸!");
-        Assert.isTrue(file.getSize() > 0, "人脸信息不能为空!");
+        Assert.notBlank(userName, MessageUtils.message("assert.face.specify.user"));
+        Assert.isTrue(file.getSize() > 0, MessageUtils.message("assert.face.info.not.null"));
         SysUser user = iSysUserService.getOne(Wrappers.<SysUser>lambdaQuery()
                 .eq(SysUser::getUserName, userName));
-        Assert.isFalse(user == null, "系统中无该用户!");
+        Assert.isFalse(user == null, MessageUtils.message("assert.user.not.exist.in.system"));
         Long userId = user.getUserId();
         if (StringUtils.isNotBlank(sysAttrValue)) {
             // 检查人员人脸上限
@@ -191,7 +192,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
                     .eq(SysUserCharacteristic::getUserId, userId)
                     .eq(SysUserCharacteristic::getType, "2"));
             int i = Integer.parseInt(sysAttrValue);
-            Assert.isFalse(count >= i, "该人员的人脸录入已上限,最大" + i + "条!");
+            Assert.isFalse(count >= i, MessageUtils.message("assert.face.entry.limit.reached",i ));
         }
         FaceCutVO faceCutVO = FaceCutUtil.imageFaceDetection(file, userId, url);
         SysUserCharacteristic sysUserCharacteristic = new SysUserCharacteristic();
@@ -211,11 +212,11 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
 
     @Override
     public FaceCutVO insertUserFace(MultipartFile file, String userName, String sysAttrValue, String url) throws IOException {
-        Assert.notBlank(userName, "请告知我这是哪个用户的人脸!");
-        Assert.isTrue(file.getSize() > 0, "人脸信息不能为空!");
+        Assert.notBlank(userName, MessageUtils.message("assert.face.specify.user"));
+        Assert.isTrue(file.getSize() > 0, MessageUtils.message("assert.face.info.not.null"));
         SysUser user = iSysUserService.getOne(Wrappers.<SysUser>lambdaQuery()
                 .eq(SysUser::getUserName, userName));
-        Assert.isFalse(user == null, "系统中无该用户!");
+        Assert.isFalse(user == null, MessageUtils.message("assert.user.not.exist.in.system"));
         Long userId = user.getUserId();
         if (StringUtils.isNotBlank(sysAttrValue)) {
             // 检查人员人脸上限
@@ -223,7 +224,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
                     .eq(SysUserCharacteristic::getUserId, userId)
                     .eq(SysUserCharacteristic::getType, "2"));
             int i = Integer.parseInt(sysAttrValue);
-            Assert.isFalse(count >= i, "该人员的人脸录入已上限,最大" + i + "条!");
+            Assert.isFalse(count >= i, MessageUtils.message("assert.face.entry.limit.reached",i ));
         }
         FaceCutVO faceCutVO = ArcSoftMothodUtil.saveArcData(file, userId, url);
         SysUserCharacteristic sysUserCharacteristic = new SysUserCharacteristic();
@@ -239,7 +240,7 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
 
     @Override
     public Boolean deleteSysUserCharacteristicByRecordIds(String recordIds) {
-        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Assert.notBlank(recordIds, MessageUtils.message("assert.common.delete.select.data"));
         Long[] longIds = Convert.toLongArray(recordIds);
         List<Long> list = Arrays.asList(longIds);
         List<SysUserCharacteristic> sysUserCharacteristics = listByIds(list);

+ 4 - 3
ktg-system/src/main/java/com/ktg/system/service/impl/SysUserServiceImpl.java

@@ -8,6 +8,7 @@ import com.ktg.common.constant.UserConstants;
 import com.ktg.common.core.domain.entity.SysRole;
 import com.ktg.common.core.domain.entity.SysUser;
 import com.ktg.common.exception.ServiceException;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.SecurityUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.common.utils.bean.BeanValidators;
@@ -258,7 +259,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Override
     public void checkUserAllowed(SysUser user) {
         if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) {
-            throw new ServiceException("不允许操作超级管理员用户");
+            throw new ServiceException(MessageUtils.message("user.service.operate.super.admin.not.allow"));
         }
     }
 
@@ -274,7 +275,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
             user.setUserId(userId);
             List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
             if (StringUtils.isEmpty(users)) {
-                throw new ServiceException("没有权限访问用户数据!");
+                throw new ServiceException(MessageUtils.message("user.service.access.data.no.permission"));
             }
         }
     }
@@ -523,7 +524,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Override
     public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) {
         if (StringUtils.isNull(userList) || userList.size() == 0) {
-            throw new ServiceException("导入用户数据不能为空!");
+            throw new ServiceException(MessageUtils.message("user.service.import.data.not.null"));
         }
         int successNum = 0;
         int failureNum = 0;

+ 7 - 6
ktg-system/src/main/java/com/ktg/system/strategy/AutoCodeUtil.java

@@ -9,6 +9,7 @@ import com.ktg.common.core.domain.entity.SysAutoCodeResult;
 import com.ktg.common.core.domain.entity.SysAutoCodeRule;
 import com.ktg.common.enums.BusinessType;
 import com.ktg.common.enums.PartTypeEnum;
+import com.ktg.common.utils.MessageUtils;
 import com.ktg.common.utils.StringUtils;
 import com.ktg.system.service.IAutoCodePartService;
 import com.ktg.system.service.IAutoCodeResultService;
@@ -46,7 +47,7 @@ public class AutoCodeUtil {
         // SysAutoCodeRule rule = iAutoCodeRuleService.getOne(ruleCode);
         SysAutoCodeRule rule = iAutoCodeRuleService.getOne(Wrappers.<SysAutoCodeRule>lambdaQuery()
                 .eq(SysAutoCodeRule::getRuleCode, ruleCode));
-        Assert.notNull(rule, "未获取到指定类型:[{}]的业务编码生成规则", ruleCode);
+        Assert.notNull(rule, MessageUtils.message("assert.code.rule.type.not.found", ruleCode));
 
         //查找规则组成
         SysAutoCodePart partParam = new SysAutoCodePart();
@@ -54,7 +55,7 @@ public class AutoCodeUtil {
         List<SysAutoCodePart> parts = iAutoCodePartService.listPart(partParam);
         List<SysAutoCodePart> collect = parts.stream().filter(part -> PartTypeEnum.PART_TYPE_SERIALNO.getCode().equals(part.getPartType())).collect(Collectors.toList());
 
-        Assert.isTrue(collect.size() < 2, "编码规则[{}]流水号方式的组成只能存在一个", ruleCode);
+        Assert.isTrue(collect.size() < 2, MessageUtils.message("assert.code.rule.serial.number.component.unique", ruleCode));
 
         StringBuilder buff = new StringBuilder();
         parts.forEach(codePart -> {
@@ -70,7 +71,7 @@ public class AutoCodeUtil {
             buff.append(partStr);
         });
 
-        Assert.notBlank(buff.toString(), "规则:[{}]生成的编码为空!", ruleCode);
+        Assert.notBlank(buff.toString(), MessageUtils.message("assert.code.rule.generated.code.empty", ruleCode));
 
         String autoCode = paddingStr(rule, buff);
 
@@ -124,10 +125,10 @@ public class AutoCodeUtil {
                     }
                 }
             }
-            Assert.isTrue(maxLength >= resultStr.length(), "生成的编码[{}]已经超出规则中配置的最大长度:[{}]", sb.toString(), maxLength);
+            Assert.isTrue(maxLength >= resultStr.length(), MessageUtils.message("assert.code.rule.generated.code.exceed.max.length", sb.toString(), maxLength));
             return resultStr.toString();
         }
-        Assert.isTrue(maxLength >= sb.length(), "生成的编码[{}]已经超出规则中配置的最大长度:[{}]", sb.toString(), maxLength);
+        Assert.isTrue(maxLength >= sb.length(), MessageUtils.message("assert.code.rule.generated.code.exceed.max.length", sb.toString(), maxLength));
         return sb.toString(); //如果不需要补齐,则直接返回
     }
 
@@ -147,7 +148,7 @@ public class AutoCodeUtil {
             SysAutoCodeResult bo = new SysAutoCodeResult();
             bo.setRuleId(rule.getRuleId());
             List<SysAutoCodeResult> results = iAutoCodeResultService.list(bo);
-            Assert.notEmpty(results, "未查询到规则{[]}对应的结果记录", rule.getRuleCode());
+            Assert.notEmpty(results, MessageUtils.message("assert.code.rule.result.record.not.found", rule.getRuleCode()));
             SysAutoCodeResult rs = results.get(0);
             rs.setLastResult(autoCode);
             rs.setGenDate(DateUtil.format(LocalDateTime.now(), "yyyyMMddHHmmss"));

+ 3 - 2
ktg-system/src/main/java/com/ktg/system/strategy/PartTypeInputCharHandler.java

@@ -1,6 +1,7 @@
 package com.ktg.system.strategy;
 
 import com.ktg.common.core.domain.entity.SysAutoCodePart;
+import com.ktg.common.utils.MessageUtils;
 import org.springframework.core.annotation.Order;
 import org.springframework.stereotype.Component;
 import org.springframework.util.Assert;
@@ -13,8 +14,8 @@ public class PartTypeInputCharHandler implements PartTypeTemplate {
     @Override
     public String partHandle(SysAutoCodePart sysAutoCodePart) {
         String inputCharacter = sysAutoCodePart.getInputCharacter();
-        Assert.notNull(inputCharacter,"编码规则传入字符不能为空!");
-        Assert.isTrue(inputCharacter.length() == sysAutoCodePart.getPartLength(),"传入字符的长度错误!");
+        Assert.notNull(inputCharacter, MessageUtils.message("assert.code.rule.input.char.not.null"));
+        Assert.isTrue(inputCharacter.length() == sysAutoCodePart.getPartLength(),MessageUtils.message("assert.code.rule.input.char.length.error"));
         return inputCharacter;
     }
 }