add:国际化配置文件
This commit is contained in:
@@ -23,6 +23,7 @@ import org.nl.acs.address.service.AddressService;
|
||||
import org.nl.acs.address.service.dto.AddressDto;
|
||||
import org.nl.acs.address.service.dto.AddressQueryParam;
|
||||
import org.nl.acs.address.service.mapper.AddressMapper;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -200,7 +201,7 @@ public class AddressServiceImpl extends CommonServiceImpl<AddressMapper, Address
|
||||
String Methods_code = dto.getMethods_code();
|
||||
AddressDto methodsDto = this.findByCode(Methods_code);
|
||||
if (methodsDto != null && methodsDto.getIs_delete().equals("0") && dto.getMethods_code().equals(methodsDto.getMethods_code())) {
|
||||
throw new BadRequestException("存在相同的方法编码");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",methodsDto.getMethods_code()));
|
||||
}
|
||||
Long userId = Long.valueOf(SecurityUtils.getCurrentUserId());
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
@@ -228,7 +229,7 @@ public class AddressServiceImpl extends CommonServiceImpl<AddressMapper, Address
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(AddressDto dto) {
|
||||
AddressDto entity = this.findById(dto.getMethods_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
Long userId = Long.valueOf(SecurityUtils.getCurrentUserId());
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||
import org.nl.acs.device.enums.DeviceType;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -93,7 +94,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
||||
String device_code = pathlist.get(i);
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new BadRequestException("未找到该设备【" + device_code + "】");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkNull",device_code));
|
||||
}
|
||||
if (i == 0) {
|
||||
ja.add(destination(device_code, "Load", "1", "1"));
|
||||
@@ -714,7 +715,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Device doordevice = deviceAppService.findDeviceByCode(list.get(i).getDevice_code());
|
||||
if (ObjectUtil.isEmpty(doordevice)) {
|
||||
throw new BadRequestException("未找到对应设备");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkNull",list.get(i).getDevice_code()));
|
||||
}
|
||||
String mes = null;
|
||||
|
||||
@@ -725,7 +726,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
||||
} else {
|
||||
Device doordevice = deviceAppService.findDeviceByCode(device);
|
||||
if (ObjectUtil.isEmpty(doordevice)) {
|
||||
throw new BadRequestException("未找到对应设备");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkNull",device));
|
||||
}
|
||||
String mes = null;
|
||||
JSONObject jo = JSONObject.parseObject(mes);
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.nl.acs.log.LokiLogType;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.device.enums.DeviceType;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -434,7 +435,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Device doordevice = deviceAppService.findDeviceByCode(list.get(i).getDevice_code());
|
||||
if (ObjectUtil.isEmpty(doordevice)) {
|
||||
throw new BadRequestException("未找到对应设备");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkNull",list.get(i).getDevice_code()));
|
||||
}
|
||||
String mes = null;
|
||||
JSONObject jo = JSONObject.parseObject(mes);
|
||||
@@ -446,7 +447,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
} else {
|
||||
Device doordevice = deviceAppService.findDeviceByCode(device);
|
||||
if (ObjectUtil.isEmpty(doordevice)) {
|
||||
throw new BadRequestException("未找到对应设备");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkNull",device));
|
||||
}
|
||||
String mes = null;
|
||||
JSONObject jo = JSONObject.parseObject(mes);
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.nl.acs.auto.initial.ApplicationAutoInitialExecuter;
|
||||
import org.nl.acs.auto.initial.WebAutoInitialExecuter;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Order(50)
|
||||
@ConditionalOnProperty(value = "spring.profiles.active",havingValue = "prod")
|
||||
public class AcsInit implements ApplicationRunner {
|
||||
private final ApplicationAutoInitialExecuter applicationAutoInitialExecuter;
|
||||
private final WebAutoInitialExecuter webAutoInitialExecuter;
|
||||
|
||||
@@ -5,9 +5,11 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -30,9 +32,9 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
public synchronized void startThread(String threadCode) {
|
||||
Thread thread = this.getThreadByCode(threadCode);
|
||||
if (thread == null) {
|
||||
throw new BadRequestException("线程不存在");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",threadCode));
|
||||
} else if (thread.isAlive()) {
|
||||
throw new BadRequestException("已运行的无法开启运行");
|
||||
throw new BadRequestException(LangProcess.msg("error_status",threadCode));
|
||||
} else {
|
||||
int index = this.thread_code_index.indexOf(threadCode);
|
||||
thread = new Thread(this.getRunablebyCode(threadCode));
|
||||
@@ -45,9 +47,9 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
public synchronized void stopThread(String threadCode) {
|
||||
Thread thread = this.getThreadByCode(threadCode);
|
||||
if (thread == null) {
|
||||
throw new BadRequestException("线程不存在");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",threadCode));
|
||||
} else if (!thread.isAlive()) {
|
||||
throw new BadRequestException("已停止的无法再次停止");
|
||||
throw new BadRequestException(LangProcess.msg("error_status",threadCode));
|
||||
} else {
|
||||
AbstractAutoRunnable runable = this.getRunablebyCode(threadCode);
|
||||
runable.stop();
|
||||
|
||||
@@ -174,7 +174,7 @@ public class DeviceErpmappingServiceImpl extends CommonServiceImpl<DeviceErpmapp
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(AcsDeviceErpmappingDto dto) {
|
||||
AcsDeviceErpmappingDto entity = this.findById(dto.getDevice_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -192,7 +192,7 @@ public class DeviceExtraServiceImpl extends CommonServiceImpl<DeviceExtraMapper,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(DeviceExtraDto dto) {
|
||||
DeviceExtraDto entity = this.findById(dto.getExtra_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -70,6 +70,7 @@ import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.acs.device.service.dto.DeviceQueryParam;
|
||||
import org.nl.acs.device.service.mapper.DeviceMapper;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dict.ISysDictService;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.logicflow.dao.mapper.StageMapper;
|
||||
@@ -289,7 +290,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
String device_code = dto.getDevice_code();
|
||||
DeviceDto deviceDto = this.findByCode(device_code);
|
||||
if (deviceDto != null && deviceDto.getIs_delete().equals("0")) {
|
||||
throw new BadRequestException("存在相同的设备编码");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",device_code));
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
@@ -311,14 +312,14 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
public void update(DeviceDto dto) {
|
||||
DeviceDto entity = this.findById(dto.getDevice_id());
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
|
||||
String device_code = dto.getDevice_code();
|
||||
DeviceDto deviceDto = this.findByCode(device_code);
|
||||
if (deviceDto != null && deviceDto.getIs_delete().equals("0")
|
||||
&& !deviceDto.getDevice_id().equals(dto.getDevice_id())) {
|
||||
throw new BadRequestException("存在相同的设备编码");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",device_code));
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
@@ -356,7 +357,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
.or().eq(RouteLine::getNext_device_code,device_code)
|
||||
.one();
|
||||
if (json != null) {
|
||||
throw new BadRequestException("设备:【" + device_code + "】在路由已存在,无法删除!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkRoute",device_code));
|
||||
}
|
||||
log.debug("删除舞台里面的设备!");
|
||||
// Map<String, String> map = new HashMap<>();
|
||||
@@ -860,7 +861,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
String driver_code = parentForm.getString("driver_code");
|
||||
|
||||
if (StrUtil.isEmpty(device_id)) {
|
||||
throw new BadRequestException("设备标识不能为空!");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull","device_id"));
|
||||
}
|
||||
|
||||
log.info("更新设备主表信息");
|
||||
@@ -1097,7 +1098,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
}
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new BadRequestException("未找到对应设备:" + device_code);
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",device_code));
|
||||
}
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
SlitTwoManipulatorDeviceDriver slitTwoManipulatorDeviceDriver;
|
||||
@@ -1215,14 +1216,14 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
String material_type = form.getString("material_type");
|
||||
String remark = form.getString("remark");
|
||||
if (StrUtil.isEmpty(quantity) || StrUtil.isEmpty(material_type)) {
|
||||
throw new BadRequestException("数量及物料不可为空,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull","quantity or material_type"));
|
||||
}
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardOrdinarySiteDeviceDriver.getBranchProtocol() == 2) {
|
||||
throw new BadRequestException("该设备已有呼叫请求未响应,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkStatus"));
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setBranchProtocol(2);
|
||||
standardOrdinarySiteDeviceDriver.setQty(quantity);
|
||||
@@ -1633,7 +1634,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
//校验数据 格式为: RD1.RD1.A1.mode
|
||||
int num = countStr(extra_code, ".");
|
||||
if (num != 3) {
|
||||
throw new BadRequestException(extra_code + "数据格式不正确");
|
||||
throw new BadRequestException(LangProcess.msg("error_config",extra_code));
|
||||
}
|
||||
|
||||
extra_code = extra_code.substring(extra_code.indexOf(".") + 1, extra_code.length());
|
||||
@@ -1703,7 +1704,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
//校验数据 格式为: RD1.RD1.A1.mode
|
||||
int num = countStr(extra_code, ".");
|
||||
if (num != 3) {
|
||||
throw new BadRequestException(extra_code + "数据格式不正确");
|
||||
throw new BadRequestException(LangProcess.msg("error_config",extra_code));
|
||||
}
|
||||
|
||||
extra_code = extra_code.substring(extra_code.indexOf(".") + 1, extra_code.length());
|
||||
@@ -2062,7 +2063,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
//校验数据 格式为: RD1.RD1.A1.mode
|
||||
int num = countStr(extra_code, ".");
|
||||
if (num != 3) {
|
||||
throw new BadRequestException(extra_code + "数据格式不正确");
|
||||
throw new BadRequestException(LangProcess.msg("error_config",extra_code));
|
||||
}
|
||||
|
||||
extra_code = extra_code.substring(extra_code.indexOf(".") + 1, extra_code.length());
|
||||
@@ -2107,7 +2108,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
//校验数据 格式为: RD1.RD1.A1.mode
|
||||
int num = countStr(extra_code, ".");
|
||||
if (num != 3) {
|
||||
throw new BadRequestException(extra_code + "数据格式不正确");
|
||||
throw new BadRequestException(LangProcess.msg("error_config",extra_code));
|
||||
}
|
||||
|
||||
extra_code = extra_code.substring(extra_code.indexOf(".") + 1, extra_code.length());
|
||||
@@ -2144,7 +2145,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void excelImport(MultipartFile file, HttpServletRequest request) {
|
||||
if (file.isEmpty()) {
|
||||
throw new BadRequestException("文件为空,请添加数据后重新导入");
|
||||
throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
}
|
||||
Long currentUserId = Long.valueOf(SecurityUtils.getCurrentUserId());
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
@@ -2173,7 +2174,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
String is_route = list.get(4).toString();
|
||||
String region = list.get(5).toString();
|
||||
if (StrUtil.isEmpty(device_code)) {
|
||||
throw new BadRequestException("设备编号为空!");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull","device_code"));
|
||||
}
|
||||
if (StrUtil.isEmpty(device_name)) {
|
||||
device_name = device_code;
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
@@ -29,6 +30,7 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -516,10 +518,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
||||
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkAdd",startDevice.getDevice_code()));
|
||||
}
|
||||
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkAdd",nextDevice.getDevice_code()));
|
||||
}
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
@@ -596,12 +598,13 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
||||
notCreateInstMessage = "设备:" + startDevice.getDevice_code() + "未设置电气调度号!";
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkAdd",startDevice.getDevice_code()));
|
||||
}
|
||||
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
|
||||
notCreateInstMessage = "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!";
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkAdd",nextDevice.getDevice_code()));
|
||||
|
||||
}
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
@@ -667,7 +670,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||
if (ObjectUtil.isEmpty(startDevice)) {
|
||||
throw new BadRequestException("设备号:" + start_device_code + "不存在!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",start_device_code));
|
||||
}
|
||||
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
@@ -676,7 +679,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
for (String deviceCode : deviceCodes) {
|
||||
Device linkDevice = deviceAppService.findDeviceByCode(deviceCode);
|
||||
if (ObjectUtil.isEmpty(linkDevice)) {
|
||||
throw new BadRequestException("设备:" + start_device_code + "关联设备->" + deviceCode + "为空!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkrelate",start_device_code,deviceCode,"is null"));
|
||||
}
|
||||
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
||||
@@ -692,7 +695,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(nextDevice)) {
|
||||
throw new BadRequestException("设备号:" + next_device_code + "不存在!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",next_device_code));
|
||||
}
|
||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
@@ -701,7 +704,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
for (String deviceCode : deviceCodes) {
|
||||
Device linkDevice = deviceAppService.findDeviceByCode(deviceCode);
|
||||
if (ObjectUtil.isEmpty(linkDevice)) {
|
||||
throw new BadRequestException("设备:" + next_device_code + "关联设备->" + deviceCode + "为空!");
|
||||
throw new BadRequestException(LangProcess.msg("device_checkrelate",next_device_code,deviceCode,"is null"));
|
||||
}
|
||||
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.nl.acs.log.LokiLog;
|
||||
import org.nl.acs.log.LokiLogType;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
@@ -28,7 +29,7 @@ public class AcsUtil {
|
||||
//判断是否连接立库WCS系统
|
||||
String isConnect = paramService.findByCode("is_connect_liKu_Wcs").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
throw new BadRequestException("参数配置表中-is_connect_liKu_Wcs为:0");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
String liKu_wcs_url = paramService.findByCode("liKu_wcs_url").getValue();
|
||||
try {
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.nl.acs.storage_cell.service.mapper.StorageCellMapper;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
|
||||
import org.nl.config.SpringContextHolder;
|
||||
@@ -74,7 +75,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String vehicle_code = request.getVehicle_code();
|
||||
Map<String, String> params = request.getParams();
|
||||
if (StrUtil.isEmpty(task_code)) {
|
||||
throw new BadRequestException("任务号不能为空");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull","task_code"));
|
||||
}
|
||||
TaskDto taskDto = taskService.findByCodeFromCache(task_code);
|
||||
String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue();
|
||||
@@ -194,7 +195,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
||||
|
||||
if (datas.size() == 0) {
|
||||
throw new BadRequestException("缺少输入参数!");
|
||||
throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
}
|
||||
|
||||
for (int i = 0; i < datas.size(); i++) {
|
||||
|
||||
@@ -58,6 +58,7 @@ import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.mapper.InstructionMapper;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
@@ -451,7 +452,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(route)) {
|
||||
throw new BadRequestException("未查询到相关路由!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull","route"));
|
||||
}
|
||||
if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@@ -558,7 +559,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(route)) {
|
||||
throw new BadRequestException("未查询到相关路由!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull","route"));
|
||||
}
|
||||
if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
@@ -739,7 +740,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finish(String id) {
|
||||
InstructionDto entity = this.findById(id);
|
||||
// if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
// if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_time(now);
|
||||
@@ -752,7 +753,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
Device startdevice = appService.findDeviceByCode(entity.getStart_device_code());
|
||||
if (ObjectUtils.isEmpty(startdevice)) {
|
||||
log.debug("地址对应设备未找到");
|
||||
throw new BadRequestException("地址对应设备未找到");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",entity.getStart_device_code()));
|
||||
}
|
||||
if (instnextdevice.indexOf(".") != -1) {
|
||||
instnextdevice = instnextdevice.substring(0, instnextdevice.indexOf("."));
|
||||
@@ -760,7 +761,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
Device device = appService.findDeviceByCode(instnextdevice);
|
||||
if (device == null) {
|
||||
log.debug("地址对应设备未找到");
|
||||
throw new BadRequestException("地址对应设备未找到");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",instnextdevice));
|
||||
}
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
||||
|
||||
@@ -772,7 +773,8 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(start_device_code);
|
||||
if (deviceByCode == null) {
|
||||
log.debug("地址对应设备未找到");
|
||||
throw new BadRequestException("地址对应设备未找到");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",start_device_code));
|
||||
|
||||
}
|
||||
|
||||
jo1.put("hasGoodStatus", "1");
|
||||
@@ -907,7 +909,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
routeLineService.getShortPathLines(
|
||||
dto.getNext_device_code(), acsTask.getNext_device_code(), acsTask.getRoute_plan_code());
|
||||
if (ObjectUtils.isEmpty(list)) {
|
||||
throw new BadRequestException("路由不通");
|
||||
throw new BadRequestException(LangProcess.msg("route_isNull"));
|
||||
}
|
||||
RouteLineDto routeLineDto = (RouteLineDto) list.get(0);
|
||||
String[] path = routeLineDto.getPath().split("->");
|
||||
@@ -983,7 +985,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
boolean flag = false;
|
||||
InstructionDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(entity.getTask_code());
|
||||
if (StrUtil.isEmpty(entity.getRoute_plan_code())) {
|
||||
@@ -1092,7 +1094,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
boolean flag = false;
|
||||
InstructionDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(entity.getTask_code());
|
||||
if (StrUtil.isEmpty(entity.getRoute_plan_code())) {
|
||||
@@ -1148,7 +1150,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
// flag= true时取消指令
|
||||
InstructionDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(entity.getTask_code());
|
||||
if (StrUtil.isEmpty(entity.getRoute_plan_code())) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.jinterop.dcom.core.*;
|
||||
import org.nl.acs.device_driver.driver.ItemValue;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.openscada.opc.lib.common.ConnectionInformation;
|
||||
import org.openscada.opc.lib.da.*;
|
||||
|
||||
@@ -123,7 +124,7 @@ public class OpcUtl {
|
||||
} else if (object instanceof JIVariant) {
|
||||
return (JIVariant)object;
|
||||
} else {
|
||||
throw new BadRequestException("未实现目前支持是int,string,byte[]");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkTypes","int,string,byte[]"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ public class OpcServiceImpl extends CommonServiceImpl<OpcMapper, Opc> implements
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(OpcDto dto) {
|
||||
OpcDto entity = this.findById(dto.getOpc_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
dto.setUpdate_time(now);
|
||||
|
||||
@@ -352,7 +352,7 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(RouteLineDto dto) throws SQLException {
|
||||
RouteLineDto entity = this.findById(dto.getLine_uuid());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -182,7 +182,7 @@ public class RouteLocServiceImpl extends CommonServiceImpl<RouteLocMapper, Route
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(RouteLocDto dto) {
|
||||
RouteLocDto entity = this.findById(dto.getIoc_uuid());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -182,7 +182,7 @@ public class RoutePlanServiceImpl extends CommonServiceImpl<RoutePlanMapper, Rou
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(RoutePlanDto dto) {
|
||||
RoutePlanDto entity = this.findById(dto.getPlan_uuid());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import org.nl.acs.udw.UnifiedDataAccessor;
|
||||
import org.nl.acs.udw.UnifiedDataAccessorFactory;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -44,7 +45,7 @@ public class ClientUDWReceive implements Runnable {
|
||||
|
||||
os.close();
|
||||
if (n == -1) {
|
||||
throw new BadRequestException("通信结束");
|
||||
throw new BadRequestException(LangProcess.msg("error_communication"));
|
||||
}
|
||||
|
||||
byte[] bytes = os.toByteArray();
|
||||
|
||||
@@ -215,7 +215,7 @@ public class StorageCellServiceImpl extends CommonServiceImpl<StorageCellMapper,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(StorageCellDto dto) {
|
||||
StorageCellDto entity = this.findById(dto.getStorage_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.nl.acs.utils.ConvertUtil;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.acs.utils.PageUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -220,7 +221,7 @@ public class TaskFeedbackServiceImpl extends CommonServiceImpl<TaskFeedbackMappe
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(TaskFeedbackDto dto) {
|
||||
TaskFeedbackDto entity = this.findById(dto.getTaskback_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -55,6 +55,7 @@ import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.acs.task.service.dto.TaskQueryParam;
|
||||
import org.nl.acs.task.service.mapper.TaskMapper;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
|
||||
@@ -617,7 +618,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (!StrUtil.isEmpty(dto.getVehicle_code())) {
|
||||
TaskDto vehicle_dto = this.findByContainer(dto.getVehicle_code());
|
||||
if (vehicle_dto != null) {
|
||||
throw new BadRequestException("已存在该载具号的任务!");
|
||||
throw new BadRequestException(LangProcess.msg("task_checkExist",dto.getVehicle_code()));
|
||||
}
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
@@ -775,7 +776,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
next_device_code = jo.get("next_device_code").toString();
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(this.findByStartCode(device_code))) {
|
||||
throw new BadRequestException("已存在该起点的任务!");
|
||||
throw new BadRequestException(LangProcess.msg("task_checkExist",device_code));
|
||||
}
|
||||
if (StrUtil.equals(material_type, "") || StrUtil.equals(quantity, "")) {
|
||||
throw new RuntimeException("请填写物料信息!");
|
||||
@@ -840,10 +841,10 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
|
||||
if (ObjectUtil.isNotEmpty(this.findByStartCode(start_device_code))
|
||||
|| ObjectUtil.isNotEmpty(this.findByNextCode(next_device_code))) {
|
||||
throw new BadRequestException("已存在该起点或终点的任务!");
|
||||
throw new BadRequestException(LangProcess.msg("task_checkExist",start_device_code+" or "+next_device_code));
|
||||
}
|
||||
if (StrUtil.equals(material_type, "") || StrUtil.equals(quantity, "")) {
|
||||
throw new RuntimeException("请填写物料信息!");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull","quantity or material_type"));
|
||||
}
|
||||
dto.setRoute_plan_code("two");
|
||||
dto.setStart_device_code(start_device_code);
|
||||
@@ -862,7 +863,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
|
||||
TaskDto entity = this.findById(dto.getTask_id());
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
@@ -922,10 +923,10 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finish(String id) {
|
||||
TaskDto entity = this.findById(id);
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
|
||||
if (instdto != null) throw new BadRequestException("有指令未完成!");
|
||||
if (instdto != null) throw new BadRequestException(LangProcess.msg("task_insHas"));
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_time(now);
|
||||
@@ -973,12 +974,12 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public void cancel(String id) throws Exception {
|
||||
TaskDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
|
||||
if (instdto != null) {
|
||||
throw new BadRequestException("有指令未完成!");
|
||||
throw new BadRequestException(LangProcess.msg("task_insRun"));
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
@@ -1042,12 +1043,12 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public void cancelNoSendWms(String id) throws Exception {
|
||||
TaskDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
|
||||
if (instdto != null) {
|
||||
throw new BadRequestException("有指令未完成!");
|
||||
throw new BadRequestException(LangProcess.msg("task_insRun"));
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
@@ -1090,7 +1091,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
@Override
|
||||
public Instruction createTemporaryInst(TaskDto acsTask) {
|
||||
if (acsTask == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
acsTask = foramte(acsTask);
|
||||
ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
|
||||
@@ -1221,13 +1222,13 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public Instruction createInst(String ids) throws Exception {
|
||||
TaskDto acsTask = this.findById(ids);
|
||||
if (acsTask == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
InstructionDto inst = instructionservice.findByTaskid(ids, "instruction_status < 2 ");
|
||||
if (inst != null) {
|
||||
throw new BadRequestException("有指令未完成!");
|
||||
throw new BadRequestException(LangProcess.msg("task_insRun"));
|
||||
}
|
||||
|
||||
String taskid = acsTask.getTask_id();
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.nl.acs.opc.domain.Opc;
|
||||
import org.nl.acs.opc.service.mapper.OpcMapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.openscada.opc.dcom.list.ClassDetails;
|
||||
import org.openscada.opc.lib.common.AlreadyConnectedException;
|
||||
import org.openscada.opc.lib.common.ConnectionInformation;
|
||||
@@ -151,7 +152,7 @@ public class ReadUtil {
|
||||
return listResult;
|
||||
} catch (UnknownHostException | JIException | IllegalArgumentException e) {
|
||||
log.error("连接异常{}",e,e.getMessage());
|
||||
throw new BadRequestException("用户名或密码错误");
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.nl.common.annotation.Limit;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.RequestHolder;
|
||||
import org.nl.common.utils.StringUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@@ -81,7 +82,7 @@ public class LimitAspect {
|
||||
log.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name());
|
||||
return joinPoint.proceed();
|
||||
} else {
|
||||
throw new BadRequestException("访问次数受限制");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysLimit"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import cn.hutool.poi.excel.ExcelUtil;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -249,7 +250,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
// 1M
|
||||
int len = 1024 * 1024;
|
||||
if (size > (maxSize * len)) {
|
||||
throw new BadRequestException("文件超出规定大小");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkFileSize"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.PageUtil;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dept.ISysDeptService;
|
||||
import org.nl.system.service.dept.dao.SysDept;
|
||||
import org.nl.system.service.dept.dto.DeptQuery;
|
||||
@@ -96,7 +97,7 @@ public class DeptController {
|
||||
// @SaCheckPermission("dept:edit")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SysDept dept){
|
||||
if (dept.getPid() != null && dept.getDept_id().equals(dept.getPid())) {
|
||||
throw new BadRequestException("上级不能为自己");
|
||||
throw new BadRequestException(LangProcess.msg("login_childError"));
|
||||
}
|
||||
deptService.updateDept(dept);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
@@ -3,9 +3,11 @@ package org.nl.system.controller.generator;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.generator.ICodeGenConfigService;
|
||||
import org.nl.system.service.generator.ICodeGeneratorService;
|
||||
import org.nl.system.service.generator.dao.CodeColumnConfig;
|
||||
@@ -72,7 +74,7 @@ public class CodeGeneratorController {
|
||||
@PostMapping(value = "/{tableName}/{type}")
|
||||
public ResponseEntity<Object> generator(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response){
|
||||
if(!generatorEnabled && type == 0){
|
||||
throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!");
|
||||
throw new BadRequestException(LangProcess.msg("执行失败"));
|
||||
}
|
||||
switch (type){
|
||||
// 生成代码
|
||||
@@ -83,7 +85,7 @@ public class CodeGeneratorController {
|
||||
// 打包
|
||||
case 2: generatorService.download(genConfigService.findByTableName(tableName), generatorService.getColumns(tableName), request, response);
|
||||
break;
|
||||
default: throw new BadRequestException("没有这个选项");
|
||||
default: throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.RsaUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.nl.system.service.user.dao.SysUser;
|
||||
import org.nl.system.service.user.dto.UserQuery;
|
||||
@@ -86,7 +87,7 @@ public class UserController {
|
||||
// @PutMapping(value = "center")
|
||||
public ResponseEntity<Object> center(@RequestBody SysUser resources){
|
||||
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
|
||||
throw new BadRequestException("不能修改他人资料");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
userService.saveOrUpdate(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -109,10 +110,10 @@ public class UserController {
|
||||
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getString("newPass"));
|
||||
SysUser user = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, SecurityUtils.getCurrentUsername()));
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(oldPass, "salt"))) {
|
||||
throw new BadRequestException("修改失败,旧密码错误");
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_1"));
|
||||
}
|
||||
if (!SaSecureUtil.md5BySalt(user.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(newPass, "salt"))) {
|
||||
throw new BadRequestException("新密码不能与旧密码相同");
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong_2"));
|
||||
}
|
||||
user.setPassword(SaSecureUtil.md5BySalt(newPass, "salt"));
|
||||
userService.updateById(user);
|
||||
@@ -132,7 +133,7 @@ public class UserController {
|
||||
String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,user.getPassword());
|
||||
SysUser userInfo = userService.getOne(new QueryWrapper<SysUser>().eq("username",SecurityUtils.getCurrentUsername()));
|
||||
if(!SaSecureUtil.md5BySalt(userInfo.getPassword(), "salt").equals(SaSecureUtil.md5BySalt(password, "salt"))){
|
||||
throw new BadRequestException("密码错误");
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong"));
|
||||
}
|
||||
userService.update(new UpdateWrapper<SysUser>().set(userInfo.getUsername(),user.getEmail()));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.dto.CurrentUser;
|
||||
import org.nl.common.domain.vo.DeptVo;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dept.dto.DeptTree;
|
||||
import org.nl.common.utils.CopyUtil;
|
||||
import org.nl.config.IdUtil;
|
||||
@@ -157,7 +158,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
||||
if (!CollectionUtils.isEmpty(depeIds)){
|
||||
List<Map> deptRelation = sysDeptMapper.getDeptRelation(depeIds);
|
||||
if (!CollectionUtils.isEmpty(deptRelation)){
|
||||
throw new BadRequestException("部门存在绑定的人员,请先解绑人员对应部门");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkRelate"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dict.ISysDictService;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
||||
@@ -39,7 +41,9 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
@Override
|
||||
public IPage<Dict> queryAll(Map whereJson, PageQuery page) {
|
||||
String blurry = null;
|
||||
if (ObjectUtil.isNotEmpty(whereJson.get("blurry"))) blurry = whereJson.get("blurry").toString();
|
||||
if (ObjectUtil.isNotEmpty(whereJson.get("blurry"))) {
|
||||
blurry = whereJson.get("blurry").toString();
|
||||
}
|
||||
IPage<Dict> pages = this.page(new Page<>(page.getPage() + 1, page.getSize()), new QueryWrapper<Dict>()
|
||||
.select("MAX(dict_id) AS dict_id, code, name")
|
||||
.lambda()
|
||||
@@ -59,7 +63,9 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
String date = DateUtil.now();
|
||||
List<Dict> oldDict = sysDictMapper.selectList(new LambdaQueryWrapper<Dict>()
|
||||
.eq(ObjectUtil.isNotEmpty(dict.getCode()), Dict::getCode, dict.getCode()));
|
||||
if (ObjectUtil.isNotEmpty(oldDict)) throw new BadRequestException("字典[" + dict.getCode() + "]已存在");
|
||||
if (ObjectUtil.isNotEmpty(oldDict)) {
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",dict.getCode()));
|
||||
}
|
||||
dict.setDict_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
dict.setCreate_id(currentUserId);
|
||||
dict.setCreate_name(nickName);
|
||||
@@ -75,11 +81,12 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
public void updateDict(Dict dto) {
|
||||
Dict dict = sysDictMapper.selectById(dto.getDict_id());
|
||||
if (ObjectUtil.isEmpty(dict)) {
|
||||
throw new BadRequestException("字典不存在");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",dto.getDict_id()));
|
||||
}
|
||||
List<Dict> dictList = sysDictMapper.selectList(new LambdaQueryWrapper<Dict>().eq(Dict::getCode, dto.getCode()));
|
||||
if (ObjectUtil.isNotEmpty(dictList) && !dto.getCode().equals(dict.getCode()))
|
||||
throw new BadRequestException("字典[" + dto.getCode() + "]已存在");
|
||||
if (ObjectUtil.isNotEmpty(dictList) && !dto.getCode().equals(dict.getCode())) {
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",dto.getCode()));
|
||||
}
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentNickName = SecurityUtils.getCurrentNickName();
|
||||
// 根据code获取所有字典
|
||||
@@ -130,7 +137,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
// 校验是否已经有标签
|
||||
Dict one = sysDictMapper.selectOne(new LambdaQueryWrapper<Dict>().eq(Dict::getLabel, dict.getLabel())
|
||||
.eq(Dict::getCode, dict.getCode()));
|
||||
if (ObjectUtil.isNotEmpty(one)) throw new BadRequestException("标签[" + dict.getLabel() + "]已存在");
|
||||
if (ObjectUtil.isNotEmpty(one)) throw new BadRequestException(LangProcess.msg("error_checkExist",dict.getLabel()));
|
||||
// 判断是否有空的值
|
||||
List<Dict> selectOne = sysDictMapper.selectList(new LambdaQueryWrapper<Dict>().eq(Dict::getCode, dict.getCode()));
|
||||
Dict dic = selectOne.get(0);
|
||||
@@ -165,13 +172,13 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
public void updateDetail(Dict resources) {
|
||||
Dict dict = sysDictMapper.selectById(resources.getDict_id());
|
||||
if (ObjectUtil.isEmpty(dict)) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
// 校验是否已经有标签
|
||||
List<Dict> dictList = sysDictMapper.selectList(new LambdaQueryWrapper<Dict>().eq(Dict::getLabel, resources.getLabel())
|
||||
.eq(Dict::getCode, resources.getCode()));
|
||||
if (ObjectUtil.isNotEmpty(dictList) && !resources.getLabel().equals(dict.getLabel())) {
|
||||
throw new BadRequestException("标签[" + resources.getLabel() + "]已存在");
|
||||
throw new BadRequestException(LangProcess.msg("error_checkExist",resources.getLabel()));
|
||||
}
|
||||
resources.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
resources.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.common.utils.GenUtil;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.generator.ICodeGeneratorService;
|
||||
import org.nl.system.service.generator.dao.CodeColumnConfig;
|
||||
import org.nl.system.service.generator.dao.CodeGenConfig;
|
||||
@@ -141,7 +142,7 @@ public class CodeGeneratorServiceImpl extends ServiceImpl<CodeColumnConfigMapper
|
||||
public ResponseEntity<Object> preview(CodeGenConfig genConfig, IPage<CodeColumnConfig> columns) {
|
||||
List<CodeColumnConfig> columnsRecords = columns.getRecords();
|
||||
if (genConfig.getConfig_id() == null) {
|
||||
throw new BadRequestException("请先配置生成器");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
List<Map<String, Object>> genList = GenUtil.preview(columnsRecords, genConfig);
|
||||
return new ResponseEntity<>(genList, HttpStatus.OK);
|
||||
@@ -151,7 +152,7 @@ public class CodeGeneratorServiceImpl extends ServiceImpl<CodeColumnConfigMapper
|
||||
public void download(CodeGenConfig genConfig, IPage<CodeColumnConfig> columnsPage, HttpServletRequest request, HttpServletResponse response) {
|
||||
List<CodeColumnConfig> columns = columnsPage.getRecords();
|
||||
if (genConfig.getConfig_id() == null) {
|
||||
throw new BadRequestException("请先配置生成器");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
try {
|
||||
File file = new File(GenUtil.download(columns, genConfig));
|
||||
@@ -159,7 +160,7 @@ public class CodeGeneratorServiceImpl extends ServiceImpl<CodeColumnConfigMapper
|
||||
ZipUtil.zip(file.getPath(), zipPath);
|
||||
FileUtil.downloadFile(request, response, new File(zipPath), true);
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException("打包失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_sys"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,13 +168,13 @@ public class CodeGeneratorServiceImpl extends ServiceImpl<CodeColumnConfigMapper
|
||||
public void generator(CodeGenConfig genConfig, IPage<CodeColumnConfig> columnsPage) {
|
||||
List<CodeColumnConfig> columns = columnsPage.getRecords();
|
||||
if (genConfig.getConfig_id() == null) {
|
||||
throw new BadRequestException("请先配置生成器");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
try {
|
||||
GenUtil.generatorCode(columns, genConfig);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BadRequestException("生成失败,请手动处理已生成的文件");
|
||||
throw new BadRequestException(LangProcess.msg("error_sys"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class StageImageServiceImpl extends ServiceImpl<StageImageMapper, StageIm
|
||||
public void update(StageImage entity) {
|
||||
StageImage dto = stageImageMapper.selectOne(new LambdaQueryWrapper<StageImage>()
|
||||
.eq(StageImage::getImage_uuid, entity.getImage_uuid()));
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (dto == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
|
||||
@@ -65,7 +65,7 @@ public class StageServiceImpl extends ServiceImpl<StageMapper, Stage> implements
|
||||
@Override
|
||||
public void update(Stage dto) {
|
||||
Stage entity = stageMapper.selectOne(new LambdaQueryWrapper<Stage>().eq(Stage::getStage_uuid, dto.getStage_uuid()));
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.NoticeEnum;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
@@ -19,6 +20,7 @@ import org.nl.common.mnt.websocket.MsgType;
|
||||
import org.nl.common.mnt.websocket.SocketMsg;
|
||||
import org.nl.common.mnt.websocket.WebSocketServer;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
@@ -83,7 +85,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
|
||||
@Override
|
||||
public void update(SysNotice entity) {
|
||||
SysNotice dto = sysNoticeMapper.selectById(entity.getNotice_id());
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (dto == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
sysNoticeMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@@ -120,7 +122,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
|
||||
public void read(String id) {
|
||||
SysNotice notice = this.getById(id);
|
||||
if (ObjectUtil.isEmpty(notice)) {
|
||||
throw new BadRequestException("该信息不存在!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",id));
|
||||
}
|
||||
notice.setHave_read(NoticeEnum.HAVE_READ_ON.getValue());
|
||||
notice.setRead_time(DateUtil.now());
|
||||
@@ -131,7 +133,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
|
||||
public void deal(String id) {
|
||||
SysNotice notice = this.getById(id);
|
||||
if (ObjectUtil.isEmpty(notice)) {
|
||||
throw new BadRequestException("该信息不存在!");
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull",id));
|
||||
}
|
||||
// 设置处理
|
||||
notice.setDeal_status(NoticeEnum.DEAL_STATUS_YES.getValue());
|
||||
@@ -178,7 +180,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
|
||||
try {
|
||||
webSocketServer.sendInfo(messageInfo, "messageInfo");
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException("消息发送失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_send"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class SysParamServiceImpl extends ServiceImpl<SysParamMapper, Param> impl
|
||||
public void update(Param param) {
|
||||
Param paramObj = paramMapper.selectById(param.getId());
|
||||
if (ObjectUtil.isEmpty(paramObj)) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
Param param1 = paramMapper.selectOne(new LambdaQueryWrapper<Param>().eq(Param::getCode, param.getCode())
|
||||
.and(lam -> lam.ne(Param::getId, param.getId())));
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
||||
import org.nl.system.service.permission.ISysDataPermissionService;
|
||||
@@ -55,7 +56,7 @@ public class SysDataPermissionServiceImpl extends ServiceImpl<SysDataPermissionM
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(SysDataPermission permission) {
|
||||
SysDataPermission sysDataPermission = dataPermissionMapper.selectOne(new LambdaQueryWrapper<SysDataPermission>().eq(SysDataPermission::getCode, permission.getCode()));
|
||||
if (ObjectUtil.isNotEmpty(sysDataPermission)) throw new BadRequestException("编码为[" + permission.getCode() + "]的数据权限已存在");
|
||||
if (ObjectUtil.isNotEmpty(sysDataPermission)) throw new BadRequestException(LangProcess.msg("error_checkExist",permission.getCode()));
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
@@ -74,7 +75,7 @@ public class SysDataPermissionServiceImpl extends ServiceImpl<SysDataPermissionM
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(SysDataPermission permission) {
|
||||
SysDataPermission dataPermission = dataPermissionMapper.selectById(permission.getPermission_id());
|
||||
if (ObjectUtil.isEmpty(dataPermission)) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (ObjectUtil.isEmpty(dataPermission)) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
permission.setUpdate_time(DateUtil.now());
|
||||
permission.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
permission.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
@@ -86,7 +87,7 @@ public class SysDataPermissionServiceImpl extends ServiceImpl<SysDataPermissionM
|
||||
public void deleteAll(Set<String> ids) {
|
||||
ids.forEach(id -> {
|
||||
List<UserDataPermissionDto> permissions = userService.getUserDataPermissionByPermissionId(id);
|
||||
if (ObjectUtil.isNotEmpty(permissions)) throw new BadRequestException("存在相关联的数据权限,请解除关联后删除");
|
||||
if (ObjectUtil.isNotEmpty(permissions)) throw new BadRequestException(LangProcess.msg("error_checkRelate"));
|
||||
dataPermissionMapper.deleteById(id);
|
||||
});
|
||||
}
|
||||
@@ -126,7 +127,7 @@ public class SysDataPermissionServiceImpl extends ServiceImpl<SysDataPermissionM
|
||||
public void savePermission(JSONObject datas) {
|
||||
String user_id = datas.getString("user_id");
|
||||
JSONArray data = datas.getJSONArray("datas");
|
||||
if (ObjectUtil.isEmpty(user_id)) throw new BadRequestException("用户不能为空");
|
||||
if (ObjectUtil.isEmpty(user_id)) throw new BadRequestException(LangProcess.msg("error_isNull","user_id"));
|
||||
// 删除用户绑定的数据
|
||||
userService.deleteDataPermissionById(user_id);
|
||||
dataPermissionMapper.deleteScopeBySelfUserId(user_id);
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -16,6 +17,7 @@ import java.util.List;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Order(100)
|
||||
@ConditionalOnProperty(value = "spring.profiles.active",havingValue = "prod")
|
||||
public class JobRunner implements ApplicationRunner {
|
||||
private static final Logger log = LoggerFactory.getLogger(JobRunner.class);
|
||||
private final ISysQuartzJobService quartzJobService;
|
||||
|
||||
@@ -8,10 +8,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.ibatis.annotations.Lang;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.RedisUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.quartz.ISysQuartzJobService;
|
||||
import org.nl.system.service.quartz.dao.SysQuartzJob;
|
||||
import org.nl.system.service.quartz.dao.SysQuartzLog;
|
||||
@@ -71,7 +73,7 @@ public class SysQuartzJobServiceImpl extends ServiceImpl<SysQuartzJobMapper, Sys
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createJob(SysQuartzJob resources) {
|
||||
if (!CronExpression.isValidExpression(resources.getCron_expression())) {
|
||||
throw new BadRequestException("cron表达式格式错误");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
@@ -92,12 +94,12 @@ public class SysQuartzJobServiceImpl extends ServiceImpl<SysQuartzJobMapper, Sys
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateJob(SysQuartzJob resources) {
|
||||
if (!CronExpression.isValidExpression(resources.getCron_expression())) {
|
||||
throw new BadRequestException("cron表达式格式错误");
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(resources.getSub_task())) {
|
||||
List<String> tasks = Arrays.asList(resources.getSub_task().split("[,,]"));
|
||||
if (tasks.contains(resources.getJob_id())) {
|
||||
throw new BadRequestException("子任务中不能添加当前任务ID");
|
||||
throw new BadRequestException(LangProcess.msg("login_childError"));
|
||||
}
|
||||
}
|
||||
resources.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.system.service.quartz.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.quartz.dao.SysQuartzJob;
|
||||
import org.quartz.*;
|
||||
import org.quartz.impl.triggers.CronTriggerImpl;
|
||||
@@ -52,7 +53,7 @@ public class QuartzManage {
|
||||
}
|
||||
} catch (Exception e){
|
||||
log.error("创建定时任务失败", e);
|
||||
throw new BadRequestException("创建定时任务失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_dbCreate"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +83,7 @@ public class QuartzManage {
|
||||
}
|
||||
} catch (Exception e){
|
||||
log.error("更新定时任务失败", e);
|
||||
throw new BadRequestException("更新定时任务失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_dbUpdate"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +103,7 @@ public class QuartzManage {
|
||||
scheduler.resumeJob(jobKey);
|
||||
} catch (Exception e){
|
||||
log.error("恢复定时任务失败", e);
|
||||
throw new BadRequestException("恢复定时任务失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_dbUpdate"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +117,7 @@ public class QuartzManage {
|
||||
scheduler.pauseJob(jobKey);
|
||||
} catch (Exception e){
|
||||
log.error("定时任务暂停失败", e);
|
||||
throw new BadRequestException("定时任务暂停失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_dbUpdate"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ public class QuartzManage {
|
||||
scheduler.triggerJob(jobKey,dataMap);
|
||||
} catch (Exception e){
|
||||
log.error("定时任务执行失败", e);
|
||||
throw new BadRequestException("定时任务执行失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_run"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +154,7 @@ public class QuartzManage {
|
||||
scheduler.deleteJob(jobKey);
|
||||
} catch (Exception e){
|
||||
log.error("删除定时任务失败", e);
|
||||
throw new BadRequestException("删除定时任务失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_dbDelete"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.menu.dao.mapper.SysMenuMapper;
|
||||
import org.nl.system.service.role.ISysRoleService;
|
||||
import org.nl.system.service.role.dao.SysRole;
|
||||
@@ -59,12 +60,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
public void create(JSONObject param) {
|
||||
//判断角色名字是否存在
|
||||
String name = param.getString("name");
|
||||
if (StrUtil.isEmpty(name)) throw new BadRequestException("角色名字不能为空!");
|
||||
if (StrUtil.isEmpty(name)) throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
SysRole sysRole = JSONObject.parseObject(JSONObject.toJSONString(param), SysRole.class);
|
||||
|
||||
//判断角色名字是否存在
|
||||
SysRole role = roleMapper.selectOne(new LambdaQueryWrapper<SysRole>().eq(SysRole::getName, sysRole.getName()));
|
||||
if (ObjectUtil.isNotEmpty(role)) throw new BadRequestException("角色【" + name + "】已存在!");
|
||||
if (ObjectUtil.isNotEmpty(role)) throw new BadRequestException(LangProcess.msg("error_checkExist",name));
|
||||
String userId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
@@ -85,12 +86,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
SysRole sysRole = JSONObject.parseObject(JSONObject.toJSONString(param), SysRole.class);
|
||||
//判断角色名字是否存在
|
||||
String name = sysRole.getName();
|
||||
if (StrUtil.isEmpty(name)) throw new BadRequestException("角色名字不能为空!");
|
||||
if (StrUtil.isEmpty(name)) throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
|
||||
//判断角色名字是否存在
|
||||
SysRole role = roleMapper.selectOne(new LambdaQueryWrapper<SysRole>().eq(SysRole::getName, sysRole.getName())
|
||||
.ne(SysRole::getRole_id, sysRole.getRole_id()));
|
||||
if (ObjectUtil.isNotEmpty(role)) throw new BadRequestException("角色【" + name + "】已存在!");
|
||||
if (ObjectUtil.isNotEmpty(role)) throw new BadRequestException(LangProcess.msg("error_checkExist",name));
|
||||
String userId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.nl.common.utils.*;
|
||||
import org.nl.config.RsaProperties;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.dto.CurrentUser;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.secutiry.dto.UserDto;
|
||||
import org.nl.system.service.role.ISysRoleService;
|
||||
import org.nl.system.service.secutiry.dto.AuthUserDto;
|
||||
@@ -220,16 +221,16 @@ public class OnlineUserService {
|
||||
// 清除验证码
|
||||
redisUtils.del(authUser.getUuid());
|
||||
if (StrUtil.isEmpty(code)) {
|
||||
throw new BadRequestException("验证码不存在或已过期");
|
||||
throw new BadRequestException(LangProcess.msg("login_codeNull"));
|
||||
}
|
||||
if (StrUtil.isEmpty(authUser.getCode()) || !authUser.getCode().equalsIgnoreCase(code)) {
|
||||
throw new BadRequestException("验证码错误");
|
||||
throw new BadRequestException(LangProcess.msg("login_codeError"));
|
||||
}
|
||||
// 校验数据库
|
||||
// 根据用户名查询,在比对密码
|
||||
SysUser userInfo = sysUserService.getOne(new QueryWrapper<SysUser>().eq("username",authUser.getUsername()));
|
||||
if (userInfo == null||!userInfo.getPassword().equals(SaSecureUtil.md5BySalt(password, "salt"))) { // 这里需要密码加密
|
||||
throw new BadRequestException("账号或密码错误");
|
||||
throw new BadRequestException(LangProcess.msg("login_pwdWrong"));
|
||||
}
|
||||
|
||||
// 获取权限列表 - 登录查找权限
|
||||
@@ -237,7 +238,7 @@ public class OnlineUserService {
|
||||
|
||||
|
||||
if (!userInfo.getIs_used()) {
|
||||
throw new BadRequestException("账号未激活");
|
||||
throw new BadRequestException(LangProcess.msg("login_account"));
|
||||
}
|
||||
|
||||
// 登录输入,登出删除
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.nl.config.FileProperties;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.tools.dao.ToolLocalStorage;
|
||||
import org.nl.system.service.tools.dao.mapper.ToolLocalStorageMapper;
|
||||
import org.nl.system.service.tools.IToolLocalStorageService;
|
||||
@@ -52,7 +53,7 @@ public class ToolLocalStorageServiceImpl extends ServiceImpl<ToolLocalStorageMap
|
||||
String type = FileUtil.getFileType(suffix);
|
||||
File file = FileUtil.upload(multipartFile, properties.getPath().getPath() + type + File.separator);
|
||||
if(ObjectUtil.isNull(file)){
|
||||
throw new BadRequestException("上传失败");
|
||||
throw new BadRequestException(LangProcess.msg("error_sysFile"));
|
||||
}
|
||||
try {
|
||||
String userId = SecurityUtils.getCurrentUserId();
|
||||
@@ -85,7 +86,7 @@ public class ToolLocalStorageServiceImpl extends ServiceImpl<ToolLocalStorageMap
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ToolLocalStorage resources) {
|
||||
ToolLocalStorage storage = localStorageMapper.selectById(resources.getStorage_id());
|
||||
if (ObjectUtil.isEmpty(storage)) throw new BadRequestException("文件信息不存在");
|
||||
if (ObjectUtil.isEmpty(storage)) throw new BadRequestException(LangProcess.msg("error_isNull",resources.getStorage_id()));
|
||||
resources.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
resources.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
resources.setUpdate_time(DateUtil.now());
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
dept_has=部门存在绑定的人员,请先解绑人员对应部门
|
||||
device_check=设备编号不能为空
|
||||
device_orderRun=设备工单已在生产
|
||||
genrator_cfg=请先配置生成器
|
||||
material_cfg=物料{0}配置信息异常,请维护
|
||||
material_check=物料ID{0}不存在
|
||||
material_notEq=物料不一致
|
||||
menu_url=外链必须以http\://或者https\://开头
|
||||
per_auth=存在关联的数据权限,请解除关联后删除
|
||||
point_checkNull=点位不能为空
|
||||
point_checkNull_1=起点或终点不能同时为空
|
||||
quartz_check=子任务中不能添加当前任务ID
|
||||
role_Check_1=角色名字不能为空
|
||||
task_isNull=任务信息不存在{0}
|
||||
task_statusWrong=任务已完成或已取消
|
||||
vehicle_check=载具编码不能为空
|
||||
vehicle_check_1=载具{0}组盘信息不存在
|
||||
workorder_checkNull=工单不存在{0}
|
||||
workorder_checkRun=该设备{0}不在生产中的工单
|
||||
workorder_statusError=工单状态不正确
|
||||
device_checkAdd=设备{0}未设置电气调度号
|
||||
device_checkNull=未找到该设备{0}
|
||||
device_checkRoute=设备{0}路由已存在,无法操作
|
||||
device_checkStatus=该设备已有呼叫请求未响应,操作失败\!
|
||||
device_checkrelate=设备{0}关联信息{1}异常\:{2}
|
||||
route_isNull=路由不通
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
dept_has=Ada personal terikat di departments Tolong lepaskan departments yang sama dari personal persona
|
||||
device_check=Equipment number cannot be empty
|
||||
device_orderRun=The equipment work order is already in production
|
||||
genrator_cfg=Please configure the generator first
|
||||
material_cfg=Abnormal configuration information for material {0}, please maintain
|
||||
material_check=Item ID {0} does not exist
|
||||
material_notEq=Material inconsistency
|
||||
menu_url=External links must start with http\://or https\://
|
||||
per_auth=There is an associated data permission, please remove it after disassociation
|
||||
point_checkNull=The point cannot be empty
|
||||
point_checkNull_1=The starting or ending points cannot both be empty
|
||||
quartz_check=The current task ID cannot be added to a subtask
|
||||
role_Check_1=The character name cannot be empty
|
||||
task_isNull=Task information does not exist {0}
|
||||
task_statusWrong=Task completed or canceled
|
||||
vehicle_check=Vehicle code cannot be empty
|
||||
vehicle_check_1=The disk information of vehicle {0} does not exist
|
||||
workorder_checkNull=The work order does not exist {0}
|
||||
workorder_checkRun=The equipment {0} is not in production for a work order
|
||||
workorder_statusError=The work order status is incorrect
|
||||
device_checkAdd=Device {0} has not set an electrical dispatch number
|
||||
device_checkNull=The device {0} was not found
|
||||
device_checkRoute=Device {0} route already exists and cannot be operated
|
||||
device_checkStatus=The device has an unresponsive call request and the operation has failed\!
|
||||
device_checkrelate=Device {0} association information {1} exception\: {2}
|
||||
route_isNull=Routing not working
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
dept_has=Ada personil terikat di departemen. Tolong lepaskan departemen yang sama dari personil pertama
|
||||
device_check=Nomor peralatan tidak dapat kosong
|
||||
device_orderRun=Perintah kerja peralatan sudah dalam produksi
|
||||
genrator_cfg=Silakan konfigur generator pertama
|
||||
material_cfg=Informasi konfigurasi abnormal untuk material {0}, silakan tetap
|
||||
material_check=ID Item {0} tidak ada
|
||||
material_notEq=Tidak konsistens materi
|
||||
menu_url=Hubungan luar harus dimulai dengan http\://atau https\://
|
||||
per_auth=Ada izin data terkait, silakan hapuskan setelah pemisahan
|
||||
point_checkNull=Titik tidak dapat kosong
|
||||
point_checkNull_1=Titik awal atau akhir tidak dapat berdua kosong
|
||||
quartz_check=ID tugas saat ini tidak dapat ditambah ke subtask
|
||||
role_Check_1=Nama karakter tidak dapat kosong
|
||||
task_isNull=Informasi tugas tidak ada {0}
|
||||
task_statusWrong=Tugas selesai atau dibatalkan
|
||||
vehicle_check=Kode kendaraan tidak dapat kosong
|
||||
vehicle_check_1=Informasi disk dari kendaraan {0} tidak ada
|
||||
workorder_checkNull=Perintah kerja tidak ada {0}
|
||||
workorder_checkRun=Perangkat {0} tidak dalam produksi untuk perintah kerja
|
||||
workorder_statusError=Status perintah kerja tidak benar
|
||||
@@ -1,20 +1,6 @@
|
||||
dept_has=Ada personil terikat di departemen. Tolong lepaskan departemen yang sama dari personil pertama
|
||||
device_check=Nomor peralatan tidak dapat kosong
|
||||
device_orderRun=Perintah kerja peralatan sudah dalam produksi
|
||||
genrator_cfg=Silakan konfigur generator pertama
|
||||
material_cfg=Informasi konfigurasi abnormal untuk material {0}, silakan tetap
|
||||
material_check=ID Item {0} tidak ada
|
||||
material_notEq=Tidak konsistens materi
|
||||
menu_url=Hubungan luar harus dimulai dengan http\://atau https\://
|
||||
per_auth=Ada izin data terkait, silakan hapuskan setelah pemisahan
|
||||
point_checkNull=Titik tidak dapat kosong
|
||||
point_checkNull_1=Titik awal atau akhir tidak dapat berdua kosong
|
||||
quartz_check=ID tugas saat ini tidak dapat ditambah ke subtask
|
||||
role_Check_1=Nama karakter tidak dapat kosong
|
||||
task_isNull=Informasi tugas tidak ada {0}
|
||||
task_statusWrong=Tugas selesai atau dibatalkan
|
||||
vehicle_check=Kode kendaraan tidak dapat kosong
|
||||
vehicle_check_1=Informasi disk dari kendaraan {0} tidak ada
|
||||
workorder_checkNull=Perintah kerja tidak ada {0}
|
||||
workorder_checkRun=Perangkat {0} tidak dalam produksi untuk perintah kerja
|
||||
workorder_statusError=Status perintah kerja tidak benar
|
||||
device_checkAdd=Peranti {0} tidak menetapkan nomor pengiriman listrik
|
||||
device_checkNull=Perangkat {0} tidak ditemukan
|
||||
device_checkRoute=Jalan perangkat {0} sudah ada dan tidak dapat beroperasi
|
||||
device_checkStatus=Perangkat memiliki permintaan panggilan yang tidak respon dan operasinya gagal\!
|
||||
device_checkrelate=Informasi asosiasi perangkat {0} pengecualian {1}\: {2}
|
||||
route_isNull=Jalan tidak bekerja
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
dept_has=部门存在绑定的人员,请先解绑人员对应部门
|
||||
device_check=设备编号不能为空
|
||||
device_orderRun=设备工单已在生产
|
||||
genrator_cfg=请先配置生成器
|
||||
material_cfg=物料{0}配置信息异常,请维护
|
||||
material_check=物料ID{0}不存在
|
||||
material_notEq=物料不一致
|
||||
menu_url=外链必须以http\://或者https\://开头
|
||||
per_auth=存在关联的数据权限,请解除关联后删除
|
||||
point_checkNull=点位不能为空
|
||||
point_checkNull_1=起点或终点不能同时为空
|
||||
quartz_check=子任务中不能添加当前任务ID
|
||||
role_Check_1=角色名字不能为空
|
||||
task_isNull=任务信息不存在{0}
|
||||
task_statusWrong=任务已完成或已取消
|
||||
vehicle_check=载具编码不能为空
|
||||
vehicle_check_1=载具{0}组盘信息不存在
|
||||
workorder_checkNull=工单不存在{0}
|
||||
workorder_checkRun=该设备{0}不在生产中的工单
|
||||
workorder_statusError=工单状态不正确
|
||||
device_checkAdd=设备{0}未设置电气调度号
|
||||
device_checkNull=未找到该设备{0}
|
||||
device_checkRoute=设备{0}路由已存在,无法操作
|
||||
device_checkStatus=该设备已有呼叫请求未响应,操作失败\!
|
||||
device_checkrelate=设备{0}关联信息{1}异常\:{2}
|
||||
route_isNull=路由不通
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
error_AccessLimit=访问次数限制\!
|
||||
error_CodeGenerator=此环境不允许生成代码,请选择预览或者下载查看
|
||||
error_Config=配置信息不正确
|
||||
error_Create=创建失败
|
||||
error_Delete=删除失败
|
||||
error_File_1=文件超出规定大小\!
|
||||
error_File_2=只能上传图片
|
||||
error_File_3=上传失败
|
||||
error_LockOut=操作锁被占用{0},等待结束
|
||||
error_NotEq=参数校验异常:信息不一致
|
||||
error_NullPoint=信息为空
|
||||
error_NumberError_1=长度不是偶数\!
|
||||
error_ParamError=参数不正确
|
||||
error_ParamExist=信息已经存在{0}
|
||||
error_Point=点位错误
|
||||
error_Send=消息发送失败
|
||||
error_StatusError={0}信息状态不正确
|
||||
error_SystemAuthError=权限不足,操作失败
|
||||
error_SystemError=系统繁忙,稍后在试
|
||||
error_Update=更新失败
|
||||
error_checkEq=参数校验异常:信息不一致
|
||||
error_checkExist=信息已经存在{0}
|
||||
error_checkFile=只能上传图片
|
||||
error_checkFileSize=文件超出规定大小\!
|
||||
error_checkNull={0}信息为空
|
||||
error_checkNumber=长度不是偶数\!
|
||||
error_checkParam=参数不正确
|
||||
error_checkRelate=存在相关联的数据权限
|
||||
error_checkTypes=未实现目前支持是{0}
|
||||
error_communication=通信结束
|
||||
error_config=配置信息不正确
|
||||
error_dbCreate=创建失败
|
||||
error_dbDelete=删除失败
|
||||
error_dbUpdate=更新失败
|
||||
error_generator=此环境不允许生成代码,请选择预览或者下载查看
|
||||
error_isNull={0}查询信息不存在
|
||||
error_lockOut=操作锁被占用{0},等待结束
|
||||
error_nullPoint=信息为空
|
||||
error_run=执行失败
|
||||
error_send=消息发送失败
|
||||
error_status={0}信息状态不正确
|
||||
error_sys=系统繁忙,稍后在试
|
||||
error_sysAuth=权限不足,操作失败
|
||||
error_sysFile=上传失败
|
||||
error_sysLimit=访问次数限制\!
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
error_AccessLimit=Access limit\!
|
||||
error_CodeGenerator=This environment does not allow code generation. Please choose to preview or download to view
|
||||
error_Config=Incorrect configuration information
|
||||
error_Create=Creation failed
|
||||
error_Delete=Delete failed
|
||||
error_File_1=The file exceeds the specified size\!
|
||||
error_File_2=Only uploadable images
|
||||
error_File_3=Upload failed
|
||||
error_LockOut=Operation lock is occupied {0}, waiting for end
|
||||
error_NotEq=Parameter verification exception\: inconsistent information
|
||||
error_NullPoint=Only Empty Question
|
||||
error_NumberError_1=It's not even long\!
|
||||
error_ParamError=invalid parameter
|
||||
error_ParamExist=Parameter already exists {0}
|
||||
error_Point=point error
|
||||
error_Send=Message sending failed
|
||||
error_StatusError={0} information status is incorrect
|
||||
error_SystemAuthError=Insufficient permissions, operation failed
|
||||
error_SystemError=The system is busy, please try again later
|
||||
error_Update=Update failed
|
||||
error_checkEq=Parameter verification exception\: inconsistent information
|
||||
error_checkExist=Parameter already exists {0}
|
||||
error_checkFile=Only uploadable images
|
||||
error_checkFileSize=The file exceeds the specified size\!
|
||||
error_checkNull={0}Information is empty
|
||||
error_checkNumber=It's not even long\!
|
||||
error_checkParam=invalid parameter
|
||||
error_checkRelate=There are associated data permissions present
|
||||
error_checkTypes=Not implemented. Currently supported is {0}
|
||||
error_communication=End of communication
|
||||
error_config=Incorrect configuration information
|
||||
error_dbCreate=Creation failed
|
||||
error_dbDelete=Delete failed
|
||||
error_dbUpdate=Update failed
|
||||
error_generator=This environment does not allow code generation. Please choose to preview or download to view
|
||||
error_isNull={0}query is null
|
||||
error_lockOut=Operation lock is occupied {0}, waiting for end
|
||||
error_nullPoint=Only Empty Question
|
||||
error_run=Execution failed
|
||||
error_send=Message sending failed
|
||||
error_status={0} information status is incorrect
|
||||
error_sys=The system is busy, please try again later
|
||||
error_sysAuth=Insufficient permissions, operation failed
|
||||
error_sysFile=Upload failed
|
||||
error_sysLimit=Access limit\!
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
error_AccessLimit=Batas akses\!
|
||||
error_CodeGenerator=lingkungan ini tidak memungkinkan generasi kode. Silakan pilih untuk melihat atau mengunduh untuk melihat
|
||||
error_Config=Informasi konfigurasi yang salah
|
||||
error_Create=Penciptaan gagal
|
||||
error_Delete=Hapus gagal
|
||||
error_File_1=Berkas melebihi ukuran yang ditentukan\!
|
||||
error_File_2=Hanya gambar yang dapat diunggah
|
||||
error_File_3=Upload gagal
|
||||
error_LockOut=Operasi kunci sedang sibuk {0}, menunggu akhir
|
||||
error_NotEq=Pengecualian verifikasi parameter\: informasi yang tidak konsisten
|
||||
error_NullPoint=Pertanyaan Hanya Kosong
|
||||
error_NumberError_1=Panjangnya bahkan tidak\!
|
||||
error_ParamError=parameter tidak benar
|
||||
error_ParamExist=Parameter sudah ada {0}
|
||||
error_Point=Kesalahan titik
|
||||
error_Send=Pengiriman pesan gagal
|
||||
error_StatusError=Status informasi {0} tidak benar
|
||||
error_SystemAuthError=Keizinan tidak cukup, operasi gagal
|
||||
error_SystemError=Sistemnya sibuk, tolong coba lagi nanti
|
||||
error_Update=Kemaskini gagal
|
||||
error_isNull={0}Pertanyaan Tidak ada
|
||||
@@ -1,21 +1,25 @@
|
||||
error_AccessLimit=Batas akses\!
|
||||
error_CodeGenerator=lingkungan ini tidak memungkinkan generasi kode. Silakan pilih untuk melihat atau mengunduh untuk melihat
|
||||
error_Config=Informasi konfigurasi yang salah
|
||||
error_Create=Penciptaan gagal
|
||||
error_Delete=Hapus gagal
|
||||
error_File_1=Berkas melebihi ukuran yang ditentukan\!
|
||||
error_File_2=Hanya gambar yang dapat diunggah
|
||||
error_File_3=Upload gagal
|
||||
error_LockOut=Operasi kunci sedang sibuk {0}, menunggu akhir
|
||||
error_NotEq=Pengecualian verifikasi parameter\: informasi yang tidak konsisten
|
||||
error_NullPoint=Pertanyaan Hanya Kosong
|
||||
error_NumberError_1=Panjangnya bahkan tidak\!
|
||||
error_ParamError=parameter tidak benar
|
||||
error_ParamExist=Parameter sudah ada {0}
|
||||
error_Point=Kesalahan titik
|
||||
error_Send=Pengiriman pesan gagal
|
||||
error_StatusError=Status informasi {0} tidak benar
|
||||
error_SystemAuthError=Keizinan tidak cukup, operasi gagal
|
||||
error_SystemError=Sistemnya sibuk, tolong coba lagi nanti
|
||||
error_Update=Kemaskini gagal
|
||||
error_checkEq=Pengecualian verifikasi parameter\: informasi yang tidak konsisten
|
||||
error_checkExist=Parameter sudah ada {0}
|
||||
error_checkFile=Hanya gambar yang dapat diunggah
|
||||
error_checkFileSize=Berkas melebihi ukuran yang ditentukan\!
|
||||
error_checkNull={0} Informasi kosong
|
||||
error_checkNumber=Panjangnya bahkan tidak\!
|
||||
error_checkParam=parameter tidak benar
|
||||
error_checkRelate=Ada keizinan data terkait yang ada
|
||||
error_checkTypes=Tidak diimplementasikan. Saat ini didukung adalah {0}
|
||||
error_communication=Komunikasi berakhir
|
||||
error_config=Informasi konfigurasi yang salah
|
||||
error_dbCreate=Penciptaan gagal
|
||||
error_dbDelete=Hapus gagal
|
||||
error_dbUpdate=Kemaskini gagal
|
||||
error_generator=lingkungan ini tidak memungkinkan generasi kode. Silakan pilih untuk melihat atau mengunduh untuk melihat
|
||||
error_isNull={0}Pertanyaan Tidak ada
|
||||
error_lockOut=Operasi kunci sedang sibuk {0}, menunggu akhir
|
||||
error_nullPoint=Pertanyaan Hanya Kosong
|
||||
error_run=Eksekusi gagal
|
||||
error_send=Pengiriman pesan gagal
|
||||
error_status=Status informasi {0} tidak benar
|
||||
error_sys=Sistemnya sibuk, tolong coba lagi nanti
|
||||
error_sysAuth=Keizinan tidak cukup, operasi gagal
|
||||
error_sysFile=Upload gagal
|
||||
error_sysLimit=Batas akses\!
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
error_AccessLimit=访问次数限制\!
|
||||
error_CodeGenerator=此环境不允许生成代码,请选择预览或者下载查看
|
||||
error_Config=配置信息不正确
|
||||
error_Create=创建失败
|
||||
error_Delete=删除失败
|
||||
error_File_1=文件超出规定大小\!
|
||||
error_File_2=只能上传图片
|
||||
error_File_3=上传失败
|
||||
error_LockOut=操作锁被占用{0},等待结束
|
||||
error_NotEq=参数校验异常:信息不一致
|
||||
error_NullPoint=信息为空
|
||||
error_NumberError_1=长度不是偶数\!
|
||||
error_ParamError=参数不正确
|
||||
error_ParamExist=信息已经存在{0}
|
||||
error_Point=点位错误
|
||||
error_Send=消息发送失败
|
||||
error_StatusError={0}信息状态不正确
|
||||
error_SystemAuthError=权限不足,操作失败
|
||||
error_SystemError=系统繁忙,稍后在试
|
||||
error_Update=更新失败
|
||||
error_checkEq=参数校验异常:信息不一致
|
||||
error_checkExist=信息已经存在{0}
|
||||
error_checkFile=只能上传图片
|
||||
error_checkFileSize=文件超出规定大小\!
|
||||
error_checkNull={0}信息为空
|
||||
error_checkNumber=长度不是偶数\!
|
||||
error_checkParam=参数不正确
|
||||
error_checkRelate=存在相关联的数据权限
|
||||
error_checkTypes=未实现目前支持是{0}
|
||||
error_communication=通信结束
|
||||
error_config=配置信息不正确
|
||||
error_dbCreate=创建失败
|
||||
error_dbDelete=删除失败
|
||||
error_dbUpdate=更新失败
|
||||
error_generator=此环境不允许生成代码,请选择预览或者下载查看
|
||||
error_isNull={0}查询信息不存在
|
||||
error_lockOut=操作锁被占用{0},等待结束
|
||||
error_nullPoint=信息为空
|
||||
error_run=执行失败
|
||||
error_send=消息发送失败
|
||||
error_status={0}信息状态不正确
|
||||
error_sys=系统繁忙,稍后在试
|
||||
error_sysAuth=权限不足,操作失败
|
||||
error_sysFile=上传失败
|
||||
error_sysLimit=访问次数限制\!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
login_CodeError=验证码配置信息错误!
|
||||
login_CodeNull=验证码不存在或者过期
|
||||
login_account=账号未激活
|
||||
login_childError=上级不能为自己或自己的下级
|
||||
login_pwd=账号或者密码不正确
|
||||
login_pwd_1=修改失败,旧密码错误
|
||||
login_pwd_2=新密码不能与旧密码相同
|
||||
login_codeError=验证码配置信息错误!
|
||||
login_codeNull=验证码不存在或者过期
|
||||
login_pwdWrong=账号或者密码不正确
|
||||
login_pwdWrong_1=修改失败,旧密码错误
|
||||
login_pwdWrong_2=新密码不能与旧密码相同
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
login_CodeError=Verification code configuration information error\!
|
||||
login_CodeNull=The verification code does not exist or has expired
|
||||
login_account=Account not activated
|
||||
login_childError=The superior cannot act for themselves
|
||||
login_pwd=Incorrect account or password
|
||||
login_pwd_1=Modification failed, old password error
|
||||
login_pwd_2=The new password cannot be the same as the old password
|
||||
login_codeError=Verification code configuration information error\!
|
||||
login_codeNull=The verification code does not exist or has expired
|
||||
login_pwdWrong=Incorrect account or password
|
||||
login_pwdWrong_1=Modification failed, old password error
|
||||
login_pwdWrong_2=The new password cannot be the same as the old password
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
login_CodeError=Galat konfigurasi kode verifikasi\!
|
||||
login_CodeNull=Kode verifikasi tidak ada atau sudah habis
|
||||
login_account=Akaun tidak diaktifkan
|
||||
login_childError=Atasan tidak bisa bertindak untuk diri mereka sendiri
|
||||
login_pwd=Akaun atau kata sandi yang salah
|
||||
login_pwd_1=Modifikasi gagal, kesalahan kata sandi lama
|
||||
login_pwd_2=Kata sandi baru tidak dapat sama dengan kata sandi lama
|
||||
@@ -1,7 +1,7 @@
|
||||
login_CodeError=Galat konfigurasi kode verifikasi\!
|
||||
login_CodeNull=Kode verifikasi tidak ada atau sudah habis
|
||||
login_account=Akaun tidak diaktifkan
|
||||
login_childError=Atasan tidak bisa bertindak untuk diri mereka sendiri
|
||||
login_pwd=Akaun atau kata sandi yang salah
|
||||
login_pwd_1=Modifikasi gagal, kesalahan kata sandi lama
|
||||
login_pwd_2=Kata sandi baru tidak dapat sama dengan kata sandi lama
|
||||
login_codeError=Galat konfigurasi kode verifikasi\!
|
||||
login_codeNull=Kode verifikasi tidak ada atau sudah habis
|
||||
login_pwdWrong=Akaun atau kata sandi yang salah
|
||||
login_pwdWrong_1=Modifikasi gagal, kesalahan kata sandi lama
|
||||
login_pwdWrong_2=Kata sandi baru tidak dapat sama dengan kata sandi lama
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
login_CodeError=验证码配置信息错误!
|
||||
login_CodeNull=验证码不存在或者过期
|
||||
login_account=账号未激活
|
||||
login_childError=上级不能为自己或自己的下级
|
||||
login_pwd=账号或者密码不正确
|
||||
login_pwd_1=修改失败,旧密码错误
|
||||
login_pwd_2=新密码不能与旧密码相同
|
||||
login_codeError=验证码配置信息错误!
|
||||
login_codeNull=验证码不存在或者过期
|
||||
login_pwdWrong=账号或者密码不正确
|
||||
login_pwdWrong_1=修改失败,旧密码错误
|
||||
login_pwdWrong_2=新密码不能与旧密码相同
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
task_checkExist={0}任务已存在
|
||||
task_insHas=指令已存在
|
||||
task_insRun=有指令未完成
|
||||
task_isNull={0}查询信息不存在
|
||||
@@ -0,0 +1,4 @@
|
||||
task_checkExist=Task {0} already exists
|
||||
task_insHas=Instruction already exists
|
||||
task_insRun=There are instructions that are not completed
|
||||
task_isNull={0}query is null
|
||||
@@ -0,0 +1,4 @@
|
||||
task_checkExist=Tugas {0} sudah ada
|
||||
task_insHas=Instruksi sudah ada
|
||||
task_insRun=Ada instruksi yang belum selesai
|
||||
task_isNull={0}Pertanyaan Tidak ada
|
||||
@@ -0,0 +1,4 @@
|
||||
task_checkExist={0}任务已存在
|
||||
task_insHas=指令已存在
|
||||
task_insRun=有指令未完成
|
||||
task_isNull={0}查询信息不存在
|
||||
@@ -59,7 +59,7 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
|
||||
@Override
|
||||
public void update(${className} entity) {
|
||||
${className} dto = ${changeClassName}Mapper.selectById(entity.get${pkChangeColName ? cap_first }());
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (dto == null) throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
Reference in New Issue
Block a user