Browse Source

ifs 配方 jar代码提交

master
Rui_Li 1 year ago
parent
commit
4aec9d851c
  1. 2
      src/main/java/com/spring/ifs/bean/BaseSearchBean.java
  2. 2
      src/main/java/com/spring/ifs/bean/BomServiceBean.java
  3. 32
      src/main/java/com/spring/ifs/bean/InventoryServiceBean.java
  4. 6
      src/main/java/com/spring/ifs/bean/MasterServiceBean.java
  5. 32
      src/main/java/com/spring/ifs/bean/RecipeServiceBean.java
  6. 30
      src/main/java/com/spring/ifs/bean/RoutingServiceBean.java
  7. 10
      src/main/java/com/spring/ifs/bean/TechnicalClassBean.java
  8. 24
      src/main/java/com/spring/ifs/bean/ToolServiceBean.java

2
src/main/java/com/spring/ifs/bean/BaseSearchBean.java

@ -67,7 +67,7 @@ public class BaseSearchBean {
int startIndex = i * pageSize;
List<LocationInformationVo> tempList = BaseSearchApi.getWarehouseLocations(srv, siteCon, ifsRowVersion, startIndex, pageSize);
//判断查询是否结束
if(tempList != null && tempList.size() > 0) {
if(tempList.size() > 0) {
resultList.addAll(tempList);
}else {
break;

2
src/main/java/com/spring/ifs/bean/BomServiceBean.java

@ -460,7 +460,7 @@ public class BomServiceBean {
//查询结果集
List<BomIfsItem> resultList = BomApi.getBomItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo);
//判断是否查询数据
if(resultList == null ||resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.size() == 0 || resultList.isEmpty()) {
throw new APException("不存在此bom组件信息!");
}
returnMap.put("resultCode", "200");

32
src/main/java/com/spring/ifs/bean/InventoryServiceBean.java

@ -85,7 +85,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
//调用api
Map<String, String> resultMap = InventoryPartApi.insertInventoryPart(srv, inData);
//设置ifs 信息
@ -123,7 +123,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//设置ifs 信息
@ -199,7 +199,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//设置ifs 信息
@ -238,7 +238,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!");
}else {
//获取库存件Plan配置的信息
@ -279,7 +279,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
throw new APException("域:" + contract + "库存件:" + partNo + "不存在!");
}
//编辑处理需要处理的数据
@ -318,7 +318,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo);
//判断是否需要插入到ifs
if(locationMap == null || locationMap.size() == 0) {
if(locationMap == null || locationMap.isEmpty()) {
throw new APException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!");
}
//设置ifs 信息
@ -357,7 +357,7 @@ public class InventoryServiceBean {
//获取库存件Plan配置的信息
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo);
//判断是否需要插入到ifs
if(locationMap == null || locationMap.size() == 0) {
if(locationMap == null || locationMap.isEmpty()) {
throw new APException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!");
}
//设置ifs 信息
@ -394,7 +394,7 @@ public class InventoryServiceBean {
//查询制造商信息
Map<String, String> manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo);
//判断是否需要插入到ifs
if(manufMap == null || manufMap.size() == 0) {
if(manufMap == null || manufMap.isEmpty()) {
throw new APException("域:"+contract+"库存件:"+partNo+"不存在制造商信息!");
}else {
//设置ifs 信息
@ -434,7 +434,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null || revisionMap.size() == 0) {
if(revisionMap == null || revisionMap.isEmpty()) {
revisionMap.put("resultCode", "400");
revisionMap.put("resultMsg", "当前版本信息不存在!");
}else{
@ -511,7 +511,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null || revisionMap.size() == 0) {
if(revisionMap == null || revisionMap.isEmpty()) {
throw new APException("当前版本信息不存在!");
}
//设置ifs 信息
@ -551,7 +551,7 @@ public class InventoryServiceBean {
//获取数据
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel);
//判断是否需要插入到ifs
if(revisionMap == null || revisionMap.size() == 0) {
if(revisionMap == null || revisionMap.isEmpty()) {
throw new APException("当前版本信息不存在!");
}
//设置ifs 信息
@ -589,7 +589,7 @@ public class InventoryServiceBean {
for(PartIfsInventoryProperty characteristic : inDatas) {
String characteristicCode = characteristic.getCharacteristicCode();
Map<String, String> characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode);
if(characteristicMap != null && characteristicMap.size() > 0) {
if(characteristicMap != null && !characteristicMap.isEmpty()) {
throw new APException("属性编码已存在!");
}
//校验通过继续新增
@ -627,7 +627,7 @@ public class InventoryServiceBean {
//查询当前物料的属性 先删除物料属性 再删除库存件
List<PartIfsInventoryProperty> characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo);
//如果存在就批量删掉数据
if(characteristicList != null && characteristicList.size() > 0) {
if(!characteristicList.isEmpty()) {
for(PartIfsInventoryProperty characteristic : characteristicList) {
//一个一个删掉库存件的属性
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic);
@ -662,7 +662,7 @@ public class InventoryServiceBean {
//按照条件查询Bom的相关信息 按照海波的要求 删除Bom Header
List<BomIfsHeader> bomHeaders = BomApi.getBomHeadersByPartNo(srv, contract, partNo);
//判断是否存在
if(bomHeaders != null && bomHeaders.size() > 0) {
if(!bomHeaders.isEmpty()) {
for(BomIfsHeader bomHeader : bomHeaders) {
//执行删除的操作
BomApi.removeBomHeader(srv, bomHeader);
@ -672,7 +672,7 @@ public class InventoryServiceBean {
//按照条件查询Routing的相关信息 按照海波的要求
List<RoutingIfsHeader> routingHeaders = RoutingApi.getRoutingHeadersByPartNo(srv, contract, partNo);
//判断是否存在
if(routingHeaders != null && routingHeaders.size() > 0) {
if(!routingHeaders.isEmpty()) {
for(RoutingIfsHeader routingHeader : routingHeaders) {
//执行删除的操作
RoutingApi.removeRoutingHeader(srv, routingHeader);
@ -686,7 +686,7 @@ public class InventoryServiceBean {
//查询当前物料的属性 先删除物料属性 再删除库存件
List<PartIfsInventoryProperty> characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo);
//如果存在就批量删掉数据
if(characteristicCodes.size() > 0) {
if(!characteristicCodes.isEmpty()) {
for(PartIfsInventoryProperty characteristic : characteristicCodes) {
//一个一个删掉库存件的属性
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic);

6
src/main/java/com/spring/ifs/bean/MasterServiceBean.java

@ -73,7 +73,7 @@ public class MasterServiceBean {
try{
Map<String, String> partMap = MasterPartApi.getMasterPart(srv, partNo);
//判断是否需要插入到ifs
if(partMap == null || partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
Map<String, String> resultMap = MasterPartApi.insertMasterPart(srv, inData);
//设置ifs 信息
inData.setIfsRowId(resultMap.get("OBJID"));
@ -109,7 +109,7 @@ public class MasterServiceBean {
//查询数据
Map<String, String> partMap = MasterPartApi.getMasterPart(srv, partNo);
//判断是否需要插入到ifs
if (partMap == null && partMap.size() == 0) {
if (partMap == null || partMap.isEmpty()) {
throw new APException("物料件不存在!");
} else {
//设置ifs 信息
@ -146,7 +146,7 @@ public class MasterServiceBean {
try{
Map<String, String> partMap = MasterPartApi.getMasterPart(srv, partNo);
//判断是否需要插入到ifs
if(partMap == null && partMap.size() == 0) {
if(partMap == null || partMap.isEmpty()) {
throw new APException("物料件不存在!");
}else {
//设置ifs 信息

32
src/main/java/com/spring/ifs/bean/RecipeServiceBean.java

@ -51,7 +51,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType);
//判断是否需要插入到ifs
if(RecipeMap == null || RecipeMap.size() == 0) {
if(RecipeMap == null || RecipeMap.isEmpty()) {
throw new RuntimeException("Recipe不存在!");
}
//设置ifs 信息
@ -88,7 +88,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType);
//判断是否需要插入到ifs
if(RecipeMap != null && RecipeMap.size() > 0) {
if(RecipeMap != null && !RecipeMap.isEmpty()) {
throw new APException("Recipe已存在!");
}
@ -128,7 +128,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType);
//判断是否需要插入到ifs
if(RecipeMap == null || RecipeMap.size() == 0) {
if(RecipeMap == null || RecipeMap.isEmpty()) {
throw new APException("Recipe不存在!");
}
//设置ifs 信息
@ -168,7 +168,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType);
//判断是否需要插入到ifs
if(RecipeMap == null || RecipeMap.size() == 0) {
if(RecipeMap == null || RecipeMap.isEmpty()) {
throw new APException("Recipe不存在!");
}
//设置ifs 信息
@ -245,7 +245,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap != null && alternativeMap.size() > 0) {
if(alternativeMap != null && !alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative 已存在!");
}
@ -286,7 +286,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//设置ifs 信息
@ -329,7 +329,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//设置ifs 信息
@ -369,7 +369,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//设置ifs 信息
@ -411,7 +411,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//设置ifs 信息
@ -453,13 +453,13 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//查询结果集
List<RecipeIfsItem> resultList = RecipeApi.getRecipeItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo);
//判断是否查询数据
if(resultList == null ||resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.isEmpty()) {
throw new APException("不存在此查Recipe组件信息!");
}
returnMap.put("resultCode", "200");
@ -495,7 +495,7 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//查询结果集
@ -553,7 +553,7 @@ public class RecipeServiceBean {
//查询结果集
List<RecipeIfsItem> itemList = RecipeApi.getRecipeItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo);
//打印查询出的日志
if(itemList != null && itemList.size() > 0){
if(!itemList.isEmpty()){
throw new APException("已存在此查Recipe组件信息!");
}
//调用api
@ -594,13 +594,13 @@ public class RecipeServiceBean {
//查询数据
Map<String, String> alternativeMap = RecipeApi.getRecipeAlternative(srv, contract, partNo, engChgLevel, bomType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Recipe Alternative不存在!");
}
//查询结果集
List<RecipeIfsItem> resultList = RecipeApi.getRecipeItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo);
//判断是否查询数据
if(resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.isEmpty()) {
throw new APException("不存在此Recipe组件信息!");
}
@ -702,7 +702,7 @@ public class RecipeServiceBean {
List<RecipeIfsItem> itemList = RecipeApi.getRecipeItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo);
// 判断是否已经存在
if (itemList == null || itemList.isEmpty()) {
if (itemList.isEmpty()) {
throw new APException("不存在此Recipe组件信息! LineItemNo:" + lineItemNo);
}

30
src/main/java/com/spring/ifs/bean/RoutingServiceBean.java

@ -49,7 +49,7 @@ public class RoutingServiceBean {
//查询相关
Map<String, String> routingMap = RoutingApi.getRoutingHeader(srv, contract, partNo, routingRevision, routingType);
//判断是否需要插入到ifs
if(routingMap == null || routingMap.size() == 0) {
if(routingMap == null || routingMap.isEmpty()) {
throw new APException("Routing Header不存在!");
}
//设置ifs 信息
@ -86,7 +86,7 @@ public class RoutingServiceBean {
//查询相关
Map<String, String> routingMap = RoutingApi.getRoutingHeader(srv, contract, partNo, routingRevision, routingType);
//判断是否需要插入到ifs
if(routingMap != null && routingMap.size() > 0) {
if(routingMap != null && !routingMap.isEmpty()) {
throw new APException("Routing已存在!");
}
@ -126,7 +126,7 @@ public class RoutingServiceBean {
//查询相关
Map<String, String> routingMap = RoutingApi.getRoutingHeader(srv, contract, partNo, routingRevision, routingType);
//判断是否需要插入到ifs
if(routingMap == null || routingMap.size() == 0) {
if(routingMap == null || routingMap.isEmpty()) {
throw new APException("Routing不存在!");
}
//设置ifs 信息
@ -166,7 +166,7 @@ public class RoutingServiceBean {
//查询相关
Map<String, String> routingMap = RoutingApi.getRoutingHeader(srv, contract, partNo, routingRevision, routingType);
//判断是否需要插入到ifs
if(routingMap == null || routingMap.size() == 0) {
if(routingMap == null || routingMap.isEmpty()) {
throw new APException("Routing不存在!");
}
//设置ifs 信息
@ -205,7 +205,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative 不存在!");
}
//设置ifs 信息
@ -244,7 +244,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap != null && alternativeMap.size() > 0) {
if(alternativeMap != null && !alternativeMap.isEmpty()) {
throw new APException("Routing Alternative 已存在!");
}
//调用新增api
@ -285,7 +285,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//设置ifs 信息
@ -327,7 +327,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//设置ifs 信息
@ -366,7 +366,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//设置ifs 信息
@ -408,7 +408,7 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//设置ifs 信息
@ -450,13 +450,13 @@ public class RoutingServiceBean {
//查询Alternative信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//查询结果集
List<RoutingIfsItem> resultList = RoutingApi.getRoutingItems(srv, contract, partNo, routingRevision, routingType, alternativeNo, operationNo);
//判断是否查询数据
if(resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.isEmpty()) {
throw new APException("不存在此Routing组件信息!");
}
returnMap.put("resultCode", "200");
@ -492,7 +492,7 @@ public class RoutingServiceBean {
//查询制造商信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//查询结果集
@ -550,13 +550,13 @@ public class RoutingServiceBean {
//查询制造商信息
Map<String, String> alternativeMap = RoutingApi.getRoutingAlternative(srv, contract, partNo, routingRevision, routingType, alternativeNo);
//判断是否需要插入到ifs
if(alternativeMap == null || alternativeMap.size() == 0) {
if(alternativeMap == null || alternativeMap.isEmpty()) {
throw new APException("Routing Alternative不存在!");
}
//查询结果集
List<RoutingIfsItem> resultList = RoutingApi.getRoutingItems(srv, contract, partNo, routingRevision, routingType, alternativeNo, operationNo);
//判断是否查询数据
if(resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.isEmpty()) {
throw new APException("不存在此Routing组件信息!");
}

10
src/main/java/com/spring/ifs/bean/TechnicalClassBean.java

@ -82,7 +82,7 @@ public class TechnicalClassBean {
//查询对象
Map<String, String> technicalMap = TechnicalClassApi.getTechnicalClass(srv, luName, keyRef);
//判断查询导数据
if(technicalMap != null && technicalMap.size() > 0) {
if(technicalMap != null && !technicalMap.isEmpty()) {
throw new APException("已存在此技术等级的信息!");
}
@ -119,7 +119,7 @@ public class TechnicalClassBean {
//查询对象
Map<String, String> technicalMap = TechnicalClassApi.getTechnicalClass(srv, luName, keyRef);
//判断查询导数据
if(technicalMap == null || technicalMap.size() == 0) {
if(technicalMap == null || technicalMap.isEmpty()) {
throw new APException("不存在此技术等级的信息!");
}
//设置IFS的信息
@ -159,7 +159,7 @@ public class TechnicalClassBean {
//查询对象
Map<String, String> technicalMap = TechnicalClassApi.getTechnicalClass(srv, luName, keyRef);
//判断查询导数据
if(technicalMap == null || technicalMap.size() == 0) {
if(technicalMap == null || technicalMap.isEmpty()) {
throw new APException("不存在此技术等级的信息!");
}
//设置IFS的信息
@ -198,7 +198,7 @@ public class TechnicalClassBean {
Map<String, String> technicalMap = TechnicalClassApi.getTechnicalClass(srv, luName, keyRef);
//判断查询导数据
//判断查询导数据
if(technicalMap == null || technicalMap.size() == 0) {
if(technicalMap == null || technicalMap.isEmpty()) {
throw new APException("不存在此技术等级的信息!");
}
//设置唯一键和版本
@ -209,7 +209,7 @@ public class TechnicalClassBean {
String attribute = tempData.getAttribute();
//查询属性信息
Map<String, String> attributeMap = TechnicalClassApi.getTechnicalAttribute(srv, technicalSpecNo, technicalClass, attribute);
if(attributeMap == null || attributeMap.size() == 0) {
if(attributeMap == null || attributeMap.isEmpty()) {
throw new APException("不存在此技术等级的属性信息!");
}
//设置替代的ifs的key

24
src/main/java/com/spring/ifs/bean/ToolServiceBean.java

@ -46,7 +46,7 @@ public class ToolServiceBean {
try{
Map<String, String> headerMap = ToolApi.getToolHeader(srv, contract, toolId);
//判断是否需要插入到ifs
if(headerMap == null || headerMap.size() == 0) {
if(headerMap == null || headerMap.isEmpty()) {
throw new APException("Tool Header不存在!");
}
//设置ifs 信息
@ -80,7 +80,7 @@ public class ToolServiceBean {
try{
Map<String, String> headerMap = ToolApi.getToolHeader(srv, contract, toolId);
//判断是否需要插入到ifs
if(headerMap != null && headerMap.size() > 0) {
if(headerMap != null && !headerMap.isEmpty()) {
throw new APException("Tool Header已存在!");
}
//调用api
@ -117,7 +117,7 @@ public class ToolServiceBean {
//查询
Map<String, String> headerMap = ToolApi.getToolHeader(srv, contract, toolId);
//判断是否需要插入到ifs
if(headerMap == null || headerMap.size() == 0) {
if(headerMap == null || headerMap.isEmpty()) {
throw new APException("Tool Header不存在!");
}
//设置ifs 信息
@ -156,7 +156,7 @@ public class ToolServiceBean {
//查询
Map<String, String> headerMap = ToolApi.getToolHeader(srv, contract, toolId);
//判断是否需要插入到ifs
if(headerMap == null || headerMap.size() == 0) {
if(headerMap == null || headerMap.isEmpty()) {
throw new APException("Tool Header不存在!");
}
//设置ifs 信息
@ -229,7 +229,7 @@ public class ToolServiceBean {
//查询工具实例的信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap != null && instanceMap.size() > 0) {
if(instanceMap != null && !instanceMap.isEmpty()) {
throw new APException("Tool Instance 已存在!");
}
//调用新增api
@ -267,7 +267,7 @@ public class ToolServiceBean {
//查询工具实例的信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//设置ifs 信息
@ -307,7 +307,7 @@ public class ToolServiceBean {
//查询工具实例的信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//设置ifs 信息
@ -345,13 +345,13 @@ public class ToolServiceBean {
//查询制造商信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//查询结果集
List<ToolInstanceDate> resultList = ToolApi.getToolInstanceDateList(srv, contract, toolId, toolInstance);
//判断是否查询数据
if(resultList.size() == 0 || resultList.isEmpty()) {
if(resultList.isEmpty()) {
throw new APException("工具实例不存在时间信息!");
}
returnMap.put("resultCode", "200");
@ -384,7 +384,7 @@ public class ToolServiceBean {
//查询制造商信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//调用api
@ -422,7 +422,7 @@ public class ToolServiceBean {
//查询制造商信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//调用api
@ -459,7 +459,7 @@ public class ToolServiceBean {
//查询制造商信息
Map<String, String> instanceMap = ToolApi.getToolInstance(srv, contract, toolId, toolInstance);
//判断是否需要插入到ifs
if(instanceMap == null || instanceMap.size() == 0) {
if(instanceMap == null || instanceMap.isEmpty()) {
throw new APException("Tool Instance不存在!");
}
//调用api删除数据

Loading…
Cancel
Save