台湾繁體字

taiwan-lingli-new
yiming 4 years ago
parent bb56c8e89f
commit ce5930cd54

@ -40,7 +40,7 @@ public class PLCController {
try { try {
ksecNettyClient.createClient(configProperties.getKsec()); ksecNettyClient.createClient(configProperties.getKsec());
}catch (Exception e){ }catch (Exception e){
Assert.isTrue(false,"连接失败ip"+configProperties.getKsec().getIp()+",port:"+configProperties.getKsec().getPort()); Assert.isTrue(false,"連接失敗ip"+configProperties.getKsec().getIp()+",port:"+configProperties.getKsec().getPort());
} }
}else { }else {
@ -51,7 +51,7 @@ public class PLCController {
try { try {
nettyClient.createClient(street); nettyClient.createClient(street);
}catch (Exception e){ }catch (Exception e){
Assert.isTrue(false,"连接失败ip"+street.getPlcIp()+",port:"+street.getPlcPort()); Assert.isTrue(false,"連接失敗ip"+street.getPlcIp()+",port:"+street.getPlcPort());
} }
} }
} }

@ -98,7 +98,7 @@ public class CameraService {
public void del(Integer id) { public void del(Integer id) {
Integer count = streetMapper.checkCamera(id); Integer count = streetMapper.checkCamera(id);
Assert.isTrue(count == null || count == 0, "球机已被绑定"); Assert.isTrue(count == null || count == 0, "球機已被綁定");
cameraMapper.deleteById(id); cameraMapper.deleteById(id);
} }

@ -59,9 +59,13 @@ public class CategoryService {
} }
public void edit(Category category){ public void edit(Category category){
Assert.notNull(category.getId(),"ID不能为空"); Assert.notNull(category.getId(),"ID空");
category.setUpdateTime(LocalDateTime.now()); category.setUpdateTime(LocalDateTime.now());
try {
categoryMapper.updateById(category); categoryMapper.updateById(category);
}catch (DuplicateKeyException e){
Assert.isTrue(false,"品規已存在");
}
} }
public void del(Integer id){ public void del(Integer id){
@ -73,7 +77,7 @@ public class CategoryService {
try { try {
categoryMapper.insert(category); categoryMapper.insert(category);
}catch (DuplicateKeyException e){ }catch (DuplicateKeyException e){
Assert.isTrue(false,"品已存在"); Assert.isTrue(false,"品已存在");
} }
return category.getId(); return category.getId();
} }

@ -42,7 +42,7 @@ public class StockService {
try { try {
EasyExcel.read(file.getInputStream(), StockExcel.class, new StockImport(stockMapper)).sheet().doRead(); EasyExcel.read(file.getInputStream(), StockExcel.class, new StockImport(stockMapper)).sheet().doRead();
}catch (Exception e){ }catch (Exception e){
Assert.isTrue(false,"导入出错"); Assert.isTrue(false,"導入出錯");
} }
} }
@ -305,7 +305,7 @@ public class StockService {
*/ */
public Stock checkCorrect(StockCheck stockCheck) { public Stock checkCorrect(StockCheck stockCheck) {
Stock stock = stockInfo(stockCheck); Stock stock = stockInfo(stockCheck);
Assert.isTrue(stock != null && stock.getId() != null, "该货位暂时没有记录"); Assert.isTrue(stock != null && stock.getId() != null, "該貨位暫時沒有記錄");
Integer oldStatus = stock.getStatus(); Integer oldStatus = stock.getStatus();
if(StockStatus.SUCCESS.getStatus().equals(oldStatus)){ if(StockStatus.SUCCESS.getStatus().equals(oldStatus)){
return stock; return stock;
@ -339,9 +339,9 @@ public class StockService {
*/ */
public Stock checkByMan(CheckByMan checkByMan) { public Stock checkByMan(CheckByMan checkByMan) {
Stock stock = stockMapper.getByShelveIdAndRowColumn(checkByMan.getShelveId(), checkByMan.getRow(), checkByMan.getColumn()); Stock stock = stockMapper.getByShelveIdAndRowColumn(checkByMan.getShelveId(), checkByMan.getRow(), checkByMan.getColumn());
Assert.notNull(stock, "该货位暂时没有记录"); Assert.notNull(stock, "該貨位暫時沒有記錄");
Boolean same = checkByMan.getCategory().equals(stock.getCategory()) && checkByMan.getCount().equals(stock.getCount()); Boolean same = checkByMan.getCategory().equals(stock.getCategory()) && checkByMan.getCount().equals(stock.getCount());
Assert.isTrue(!same, "品规和数量与原有记录相同"); Assert.isTrue(!same, "品規、數量與原有紀錄相同");
Integer oldStatus = stock.getStatus(); Integer oldStatus = stock.getStatus();
String oldCategory = stock.getCategory(); String oldCategory = stock.getCategory();
Integer count = stock.getCount(); Integer count = stock.getCount();

Loading…
Cancel
Save