`
yansuihehe
  • 浏览: 1431 次
  • 性别: Icon_minigender_1
  • 来自: 济南
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

MOSTDaoImpl

 
阅读更多
package com.inspur.pmv5.dao.impl.momgt;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.inspur.pmv5.dao.api.momgt.MOSTDao;
import com.inspur.pmv5.dao.impl.BaseDao;
import com.inspur.pmv5.pojo.momgt.KeyValueVO;
import com.inspur.pmv5.pojo.momgt.MOAttribute;
import com.inspur.pmv5.pojo.momgt.MOEntity;
import com.inspur.pmv5.pojo.momgt.MOType;
import com.inspur.pmv5.pojo.momgt.Othersys;
import com.inspur.pmv5.pojo.momgt.OthersysAttribute;

/**
* MOSTDao接口的实现类
*
* @author user
*
*/
public class MOSTDaoImpl extends BaseDao implements MOSTDao {

private static String MOSTDAO_NAMESPACE = "com.inspur.pmv5.dao.api.momgt.MOSTDao";

@Override
public List<Othersys> getEnableOthersys(String othersysId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getEnableOthersys",
othersysId);
} finally {
closeMO();
}

return list;
}

@Override
public List<Othersys> getOthersysModel(String othersysId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(
"com.inspur.pmv5.dao.api.momgt.MOSTDao.getOthersysModel",
othersysId);
} finally {
closeMO();
}
return list;
}

@Override
public List<OthersysAttribute> getPMAttribute(String moTypeId, String isPMRelation) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("moTypeId", moTypeId);
paramMap.put("isPMRelation", isPMRelation);
List<OthersysAttribute> list = null;
try {
openMO();
list = sqlMO().selectList(
"com.inspur.pmv5.dao.api.momgt.MOSTDao.getPMAttribute",
paramMap);
} finally {
closeMO();
}
return list;
}

@Override
public List<Othersys> checkOthersysExist(String othersysId,
String otherMotypeCode, String isRelation) {
List<Othersys> list = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("othersysId", othersysId);
map.put("otherMotypeCode", otherMotypeCode);
map.put("isRelation", new Integer(isRelation));
try {
openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".checkOthersysExist", map);
} finally {
closeMO();
}

return list;
}

@Override
public List<Othersys> getOthersysByCode(String othersysId,
String otherMotypeCode) {
List<Othersys> list = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("othersysId", othersysId);
map.put("otherMotypeCode", otherMotypeCode);
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getOthersysByCode",
map);
} finally {
closeMO();
}
return list;
}

@Override
public int updateOthersys(Othersys othersys) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateOthersys", othersys);
} finally {
this.closeMO();
}

return num;
}

@Override
public int updateOthersysAttr(OthersysAttribute attr) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateOthersysAttr", attr);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public int updateOthersysKeyAttributeId(Othersys othersys) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateOthersysKeyAttributeId",
othersys);
} finally {
this.closeMO();
}

return num;
}

@Override
public int addOthersys(Othersys othersys) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().insert(MOSTDAO_NAMESPACE + ".addOthersys",
othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public List<OthersysAttribute> checkOthersysAttributeExist(
String othersysId, String otherMotypeId, String othersysAttributeId) {
List<OthersysAttribute> list = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("othersysId", othersysId);
map.put("otherMotypeId", otherMotypeId);
map.put("othersysAttributeId", othersysAttributeId);
try {
this.openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".checkOthersysAttributeExist", map);
} finally {
this.closeMO();
}

return list;
}

@Override
public int addOthersysAttr(OthersysAttribute attr) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().insert(
MOSTDAO_NAMESPACE + ".addOthersysAttr", attr);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public List<OthersysAttribute> checkOthersysAttrRelationExist(
String otherMotypeId, String othersysAttributeId,
String othersysLabelName, String othersysId) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("otherMotypeId", otherMotypeId);
map.put("othersysAttributeId", othersysAttributeId);
map.put("othersysLabelName", othersysLabelName);
map.put("othersysId", othersysId);
List<OthersysAttribute> list = null;
try {
this.openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".checkOthersysAttrRelationExist", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return list;
}

@Override
public int addRelation(OthersysAttribute oa) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().insert(MOSTDAO_NAMESPACE + ".addRelation",
oa);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public int updateOthersysAttrRelation(OthersysAttribute oa) {
int num = 0;
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateOthersysAttrRelation", oa);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public List<Othersys> getOthersysByDomainId(String domainId) {
this.openMO();
List<Othersys> resultList = null;
try {
Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("domainId", domainId);
resultList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getOthersysByDomainId", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return resultList;
}

@Override
public List<OthersysAttribute> getMostAttributeByModelId(String mostModelId) {
List<OthersysAttribute> attrList = null;
Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("mostModelId", mostModelId);
try {
this.openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMostAttributeByModelId", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public List<Othersys> getOthersysByDomainIdFuzzy(String domainId,
String name) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("domainId", domainId);
map.put("name", name);
List<Othersys> list = null;
try {
this.openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getOthersysByDomainIdFuzzy", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return list;
}

@Override
public int setAttributeEnableToZero(String othersysId,
String otherMotypeId, List<String> attrIds) {
int num = 0;
HashMap<String, Object> hashmap = new HashMap<String, Object>();
hashmap.put("othersysId", othersysId);
hashmap.put("otherMotypeId", otherMotypeId);
hashmap.put("attrIds", attrIds);
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".setAttributeEnableToZero", hashmap);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int setRelationEnableToZero(List<String> pathList, String moTypeId,
String othersysId) {
int num = 0;
HashMap<String, Object> hashmap = new HashMap<String, Object>();
hashmap.put("pathList", pathList);
hashmap.put("moTypeId", moTypeId);
hashmap.put("othersysId", othersysId);
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".setRelationEnableToZero", hashmap);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int setOthersysEnableToZero(String othersysId,
List<String> othersysIds) {
int num = 0;
HashMap<String, Object> hashmap = new HashMap<String, Object>();
hashmap.put("othersysId", othersysId);
hashmap.put("othersysIds", othersysIds);
try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".setOthersysEnableToZero", hashmap);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int deleteOthersysModelMapping(String mappingId) {
int num = 0;
HashMap<String, Object> hashmap = new HashMap<String, Object>();
hashmap.put("mappingId", mappingId);

try {
this.openMO();
num = (Integer) sqlMO().delete(
MOSTDAO_NAMESPACE + ".deleteOthersysModelMapping", hashmap);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public int updateOthersysMapping(Othersys othersys) {
int num = 0;

try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateOthersysMapping", othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int addOthersysModelMapping(Othersys othersys) {
int num = 0;

try {
this.openMO();
num = (Integer) sqlMO().insert(
MOSTDAO_NAMESPACE + ".addOthersysModelMapping", othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int addOthersysAttrMapping(OthersysAttribute oa) {
int num = 0;

try {
this.openMO();
num = (Integer) sqlMO().insert(
MOSTDAO_NAMESPACE + ".addOthersysAttrMapping", oa);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int deleteOthersysAttrMapping(String attrMappingId) {
int num = 0;

try {
this.openMO();
num = (Integer) sqlMO().delete(
MOSTDAO_NAMESPACE + ".deleteOthersysAttrMapping",
attrMappingId);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int updateAttrMapping(OthersysAttribute oa) {
int num = 0;

try {
this.openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".updateAttrMapping", oa);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public void changeDeleteModelEnable() {
try {
this.openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".changeDeleteModelEnable");
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
}

@Override
public void changeModelEnable() {
try {
this.openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".changeModelEnable");
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
}

@Override
public void updateDeleteAttrEnable() {
try {
this.openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateDeleteAttrEnable");
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
}

@Override
public void updateAttrEnable() {
try {
this.openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateAttrEnable");
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
}

@Override
public List<Othersys> getMOSTMOTypeByCIName(String ciName) {
Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("CIName", ciName);
List<Othersys> othersysList = null;
try {
this.openMO();
othersysList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMOSTMOTypeByCIName", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return othersysList;
}

@Override
public List<Othersys> getAllEnableModel(String othersysId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getAllEnableModel",
othersysId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return list;
}

@Override
public List<OthersysAttribute> getMOSTAttributeByMostMOTypeId(
String othersysMOTypeId) {
Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("othersysMOTypeId", othersysMOTypeId);
List<OthersysAttribute> attrList = null;
try {
openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMOSTAttributeByMostMOTypeId",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public List<Othersys> getOthersysModelMappings(String otherModelId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getOthersysModelMappings",
otherModelId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public List<OthersysAttribute> getAttrMapping(List<String> attrIds,
List<String> otherAttrIds) {
List<OthersysAttribute> list = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("attrIds", attrIds);
map.put("otherAttrIds", otherAttrIds);

try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getAttrMapping",
map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public List<String> getAttrByModelId(String otherModelId, String othersysId) {
List<String> list = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("otherModelId", otherModelId);
map.put("othersysId", othersysId);

try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getAttrByModelId",
map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public int getMOCount(String tableName, String columnName, String value) {
int count = 0;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("tableName", tableName);
map.put("columnName", columnName);
map.put("value", value);
try {
openMO();
count = (Integer) sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getMOCount", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return count;
}

@Override
public String getMOAttrName(String attrID) {
String name = null;
try {
openMO();
name = (String) sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getMOAttrName", attrID);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return name;
}

@Override
public String getMOSTAttrName(String mostAttrID) {
String name = null;
try {
openMO();
name = (String) sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getMOSTAttrName", mostAttrID);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return name;
}

@Override
public void updateEntity(String sql) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("sql", sql);
try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateEntity", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void addEntity(String sql) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("sql", sql);
try {
openMO();
sqlMO().insert(MOSTDAO_NAMESPACE + ".addEntity", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public List<OthersysAttribute> checkBasicAttributeExist(String othersysId,
String otherModelId, String basicAttrName) {
List<OthersysAttribute> oas = null;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("othersysId", othersysId);
map.put("otherModelId", otherModelId);
map.put("basicAttrName", basicAttrName);

try {
openMO();
oas = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".checkBasicAttributeExist", map);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return oas;
}

@Override
public int setOthersysEnableToZeroByMoTypeId(String othersysId,
List<String> othersysIds) {
int num = 0;
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("othersysId", othersysId);
map.put("othersysIds", othersysIds);

try {
openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".setOthersysEnableToZeroByMoTypeId",
map);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public int changeOthersysUpdateDate(Othersys othersys) {
int num = 0;

try {
openMO();
num = (Integer) sqlMO().update(
MOSTDAO_NAMESPACE + ".changeOthersysUpdateDate", othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;
}

@Override
public List<Othersys> getAllEnableRelation(String othersyId) {
List<Othersys> list = null;

try {
openMO();
list = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getAllEnableRelation", othersyId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public void updateMOSTSynDate(String otherModelId) {
try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateMOSTSynDate",
otherModelId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateMOSTSynDateByCiName (String ciName){
try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateMOSTSynDateByCiName",
ciName);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public List<Othersys> getRelationMappings(String otherModelId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getRelationMappings",
otherModelId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public boolean checkEntityExist(String objId, String tableName, String keyAttrColumnName) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("objId", objId);
map.put("tableName", tableName);
map.put("columnName", keyAttrColumnName);

String s = "";
try {
openMO();
s = sqlMO().selectOne(MOSTDAO_NAMESPACE + ".checkEntityExist",
map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
if("1".equals(s)){
return true;
}
return false;
}

@Override
public void addOrUpdateMOSTEntity(MOEntity moEntity) throws Exception{
try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".addOrUpdateMOSTEntity",
moEntity);
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeMO();
}
}

@Override
public void updateEntityRelation(String objId, String tableName,
String columnName, String columnValue) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("objId", objId);
map.put("tableName", tableName);
map.put("columnValue", columnValue);
map.put("columnName", columnName);

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateEntityRelation",
map);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

}

@Override
public boolean checkMappingExist(String pmModelId, String mostCIName) {
boolean flag = false;
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("pmModelId", pmModelId);
paramMap.put("mostCIName", mostCIName);
String s = "";
try {
openMO();
s = sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".checkMappingExist", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
if ("1".equals(s)) {
flag = true;
}
return flag;
}

@Override
public String getObjIdByCIID(String tableName, String ciID, String columnName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("tableName", tableName);
paramMap.put("CIID", ciID);
paramMap.put("columnName", columnName);
String objId = "";
try {
openMO();
objId = sqlMO().selectOne(MOSTDAO_NAMESPACE + ".getObjIdByCIID",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return objId;
}

@Override
public List<MOEntity> getMOEntityByMOSTId(String tableName,
String columnName, String primaryValue) {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("tableName", tableName);
map.put("columnName", columnName);
map.put("primaryValue", primaryValue);
List<MOEntity> list = null;

try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getMOEntityByMOSTId", map);
} finally {
closeMO();
}
return list;
}

@Override
public List<String> getBasicAttributeId(String motypeId) {
List<String> list = null;
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getBasicAttributeId", motypeId);
} finally {
closeMO();
}

return list;
}

@Override
public String getSimpleMOAttrName(String attributeId) {
String columnName = null;
try {
openMO();
columnName = sqlMO().selectOne(MOSTDAO_NAMESPACE + ".getSimpleMOAttrName", attributeId);
}finally {
closeMO();
}

return columnName;
}

@Override
public List<MOAttribute> getMetaModelAttribute(String moTypeId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("moTypeId", moTypeId);
List<MOAttribute> attrList = null;
try {
openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMetaModelAttribute", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public String getIDColumnNameByMOSTMOType(String mostCIName,
String pmModelId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("mostCIName", mostCIName);
paramMap.put("pmModelId", pmModelId);
String columnName = "";
try {
openMO();
columnName = sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getIDColumnNameByMOSTMOType",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return columnName;
}

@Override
public Othersys getOthersysByCIName(String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("CIName", ciName);
Othersys othersys = null;
try {
openMO();
othersys = sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getOthersysByCIName", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersys;
}

@Override
public List<MOType> getPMParamModel(String modelId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("modelId", modelId);
List<MOType> moTypeList = null;
try {
openMO();
moTypeList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getPMParamModel", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return moTypeList;
}

@Override
public int checkOthersysAttrHasOne(OthersysAttribute oa) {
int num = 0;
try {
openMO();
num = (Integer)sqlMO().selectOne(MOSTDAO_NAMESPACE + ".checkOthersysAttrHasOne", oa);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return num;
}

@Override
public List<Othersys> getAllOthersysModelAttrMapping(String modelId) {
List<Othersys> list = null;
try {
openMO();
list = sqlMO().selectList(MOSTDAO_NAMESPACE + ".getModelAttrMappings",
modelId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}

return list;
}

@Override
public int deleteAllOthersModelAttrMapping(String modelId) {
int num = 0;
Map<String,String> map = new HashMap<String,String>();
map.put("modelId", modelId);
map.put("enable", "-1");
try {
this.openMO();
num = (Integer) sqlMO().delete(
MOSTDAO_NAMESPACE + ".deleteModelAttrMappings", modelId);

sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelAttrEnable", map);
//删除模型映射
sqlMO().delete(MOSTDAO_NAMESPACE + ".deleteModelMappings", modelId);
sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelEnable", map);

} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

return num;

}

@Override
public boolean addAllOthersModelAttrMapping(List<Othersys> otherSysList) {
boolean result = false;
try {
openMO();

for (Othersys otherSys : otherSysList) {
if(otherSys.getOthersAttributeId() == null) {
continue;
}
sqlMO().insert(MOSTDAO_NAMESPACE + ".addModelAttrMappings",otherSys);
Map<String,String> map = new HashMap<String,String>();
map.put("othersAttributeId", otherSys.getOthersAttributeId());
map.put("enable", "1");
sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelAttrEnable1",map);
}
if (otherSysList != null && otherSysList.size() > 0) {
String modelId = otherSysList.get(0).getModelId();
//插入模型映射
sqlMO().insert(MOSTDAO_NAMESPACE + ".addModelMappings",modelId
);
Map<String,String> map = new HashMap<String,String>();
map.put("modelId", modelId);
map.put("enable", "1");
sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelEnable",map
);
result = true;
}

} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

// @Override
// public List<Othersys> getMOSTParamModel(String modelId) {
// // TODO Auto-generated method stub
// return null;
// }

@Override
public List<Othersys> getMOSTParamModel() {
List<Othersys> othersysList = null;
try {
openMO();
othersysList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMOSTParamModel");
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersysList;
}

@Override
public List<OthersysAttribute> getParamAttrByMOTypeId(String modelId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("modelId", modelId);
List<OthersysAttribute> attrList = null;
try {
openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getParamAttrByMOTypeId", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public List<Othersys> getMappedModel(String modelId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("modelId", modelId);
List<Othersys> othersysList = null;
try {
openMO();
othersysList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMappedModel", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersysList;
}

@Override
public List<OthersysAttribute> getMOSTParamAttribute(String otherModelId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("otherModelId", otherModelId);
List<OthersysAttribute> attrList = null;
try {
openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMOSTParamAttribute", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public Othersys getModelAndAttributeByMOST(Othersys othersys) {
Othersys result = null;
try {
openMO();
List<Othersys> resultList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getModelAndAttributeByMOST", othersys);
if (resultList.size() > 0) {
result = resultList.get(0);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public List<Othersys> getIndexKeyAttributeIdList(String othersysMotypeId) {
List<Othersys> result = null;
try {
openMO();
result = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getIndexKeyAttributeIdByMOSTMotypeId", othersysMotypeId);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}
@Override
public List<Map<String,String>> getMOSTModelEnityIdByModelIdObjId(String othersysMotypeId,
String moId,String objId) {
Map<String,String> map = null;
Map<String,String> result = new HashMap<String,String>();
List<Map<String,String>> resultList = new ArrayList<Map<String,String>>();
//根据most模型id获取obj表名和对应的采集列名

try {
openMO();
map = sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getTableNameAndColumnNameByMOST", othersysMotypeId);
result.put("modelId", map.get("MODELID"));

Map<String,String> parameterMap = new HashMap<String,String>();
parameterMap.put("tableName", map.get("TABLENAME"));
String columnName = map.get("COLUMNNAME");
parameterMap.put("columnName", columnName);

if (moId != null) {
parameterMap.put("moId", moId);
List<Map<String,String>> rList = sqlMO().selectList(MOSTDAO_NAMESPACE+".getMoentity",
parameterMap);
for (Map<String,String> m : rList) {
m.put("modelId", map.get("MODELID"));
}
return rList;
} else if (objId != null){
parameterMap.put("objId", objId);
Map<String,String> m2 = (Map)sqlMO().selectOne(MOSTDAO_NAMESPACE+".getMo",
parameterMap);
String rMoId = m2.get(columnName.toUpperCase());
result.put("moId", rMoId);
resultList.add(result);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return resultList;

}

@Override
public String getUpperNEModelIdByLowerNEModelId(String lowerNEModelId) {
String result = "";
try {
openMO();
Map<String,String> map = sqlMO().selectMap(MOSTDAO_NAMESPACE + ".getUpperNEModelIdByLowerNEModelId",
lowerNEModelId);
result = map.get("MODELID");
} catch (Exception e) {

} finally {
this.closeMO();
}
return result;
}

@Override
public int deleteMappingAttributesByMappingId(String mappingId) {
int num = 0;
try {
this.openMO();
//删除模型映射
num = sqlMO().delete(MOSTDAO_NAMESPACE + ".deleteModelAttrMappingById", mappingId);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public void deleteModelAttrMappingByOtherAttrId(String otherAttrId) {
try {
this.openMO();
//删除模型映射
sqlMO().delete(MOSTDAO_NAMESPACE + ".deleteModelAttrMappingByOtherAttrId", otherAttrId);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

}

@Override
public void addModelMappingByModelIdAndOtherModelId(Othersys othersys) {
try {
this.openMO();
//新增模型映射
sqlMO().insert(MOSTDAO_NAMESPACE + ".addModelMappingByModelIdAndOtherModelId", othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}

}

@Override
public int updateOtherModelAttrMapping(OthersysAttribute othersys) {
int num = 0;
try {
this.openMO();
if (!"".endsWith(othersys.getOthersysAttributeName() )) {
//更新模型属性映射
num = sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelAttrMapping", othersys);

//将othersysAttr表中的enable字段置为1
Map<String,String> map = new HashMap<String,String>();
map.put("othersAttributeId", othersys.getOthersysAttributeId());
map.put("enable", "1");
sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelAttrEnable1",map);
} else if(othersys.getMappingId() != null){
sqlMO().delete(MOSTDAO_NAMESPACE + ".deleteModelAttrMappingByAttrMappingId", othersys.getMappingId());
}


} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int addOtherModelAttrMapping(OthersysAttribute othersysAttr) {
// addOtherModelAttrMapping
int num = 0;
try {
this.openMO();
//删除模型映射
num = sqlMO().insert(MOSTDAO_NAMESPACE + ".addOtherModelAttrMapping", othersysAttr);
//将othersysAttr表中的enable字段置为1
Map<String,String> map = new HashMap<String,String>();
map.put("othersAttributeId", othersysAttr.getOthersysAttributeName());
map.put("enable", "1");
sqlMO().update(MOSTDAO_NAMESPACE + ".updateOtherModelAttrEnable1",map);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int updateModelMappingById(Othersys othersys) {
int num = 0;
try {
this.openMO();
//更新模型映射
num = sqlMO().update(MOSTDAO_NAMESPACE + ".updateModelMappingById", othersys);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public int deleteModelAttrMappingByAttrMappingId(String mappingId) {
int num = 0;
try {
this.openMO();
//删除模型属性映射
num = sqlMO().delete(MOSTDAO_NAMESPACE + ".deleteModelAttrMappingByAttrMappingId", mappingId);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return num;
}

@Override
public List<Map<String, String>> validateAttrMappingByOtherAttrId(
String otherAttributeId) {
List<Map<String, String>> result = null;
try {
this.openMO();
//删除模型属性映射
result = sqlMO().selectList(MOSTDAO_NAMESPACE + ".validateAttrMappingByOtherAttrId", otherAttributeId);
} catch (Exception e) {
e.printStackTrace();
} finally {
this.closeMO();
}
return result;
}

@Override
public List<OthersysAttribute> getMappedInstanceSelectAttribute(
String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
List<OthersysAttribute> attrList = null;
try {
openMO();
attrList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMappedInstanceSelectAttribute",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return attrList;
}

@Override
public Othersys getMappingOthersysByCIName(String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
Othersys othersys = null;
try {
openMO();
othersys = sqlMO()
.selectOne(
MOSTDAO_NAMESPACE + ".getMappingOthersysByCIName",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersys;
}

@Override
public String getColumnNameByOthersysAttributeId(String attrId, String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("attrId", attrId);
paramMap.put("ciName", ciName);
String columnName = "";
try {
openMO();
columnName = sqlMO()
.selectOne(
MOSTDAO_NAMESPACE + ".getColumnNameByOthersysAttributeId",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return columnName;
}

@Override
public List<String> getDistinctedValue(String tableName, String columnName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("tableName", tableName);
paramMap.put("columnName", columnName);
List<String> valueList = null;
try {
openMO();
valueList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getDistinctedValue", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return valueList;
}

@Override
public void updateToObjId(String tableName, String columnName,
String oldValue, String objId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("tableName", tableName);
paramMap.put("columnName", columnName);
paramMap.put("oldValue", oldValue);
paramMap.put("objId", objId);

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateToObjId", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public List<Map<String, String>> getPrimaryKeyAttributeMapping(
String otherMOTypeId) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("otherMOTypeId", otherMOTypeId);
List<Map<String,String>> result = null;
try {
openMO();
result = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getPrimaryKeyAttributeMapping",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public List<MOEntity> getMOEntityByPrimaryKey(String tableName,
List<KeyValueVO> keyValueList) {
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("tableName", tableName);
paramMap.put("keyValueList", keyValueList);
List<MOEntity> result = null;
try {
openMO();
result = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getMOEntityByPrimaryKey",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public String getRelationColumnByOthersysAttributeName(
String otherMOTypeCode, String otherAttributeCode) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("otherMOTypeCode", otherMOTypeCode);
paramMap.put("otherAttributeCode", otherAttributeCode);
String result = "";
try {
openMO();
result = sqlMO().selectOne(
MOSTDAO_NAMESPACE
+ "getRelationColumnByOthersysAttributeName",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public String getLabelNameRelatedTabelName(String otherMOTypeCode,
String otherAttributeCode) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("otherMOTypeCode", otherMOTypeCode);
paramMap.put("otherAttributeCode", otherAttributeCode);
String result = "";
try {
openMO();
result = sqlMO().selectOne(
MOSTDAO_NAMESPACE
+ "getLabelNameRelatedTabelName",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public String getLabelName(String otherMOTypeCode, String otherAttributeCode) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("otherMOTypeCode", otherMOTypeCode);
paramMap.put("otherAttributeCode", otherAttributeCode);
String result = "";
try {
openMO();
result = sqlMO().selectOne(
MOSTDAO_NAMESPACE
+ "getLabelName",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return result;
}

@Override
public boolean isExistN2NRelation(String objAId, String objBId,
String tableName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("objAId", objAId);
paramMap.put("objBId", objBId);
paramMap.put("tableName", tableName);
List<String> result = null;
try {
openMO();
result = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".isExistN2NRelation", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
if(result == null || result.size() == 0){
return false;
} else {
return true;
}
}

@Override
public void insertN2NRelation(String objAId, String objBId, String tableName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("objAId", objAId);
paramMap.put("objBId", objBId);
paramMap.put("tableName", tableName);
try {
openMO();
sqlMO().insert(MOSTDAO_NAMESPACE + ".insertN2NRelation", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateCurSyncDate(String ciName, Long systemTime) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
paramMap.put("systemTime", String.valueOf(systemTime));

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateCurSyncDate", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateCurTotalPage(String ciName, int totalPage) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
paramMap.put("totalPage", String.valueOf(totalPage));

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateCurTotalPage", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateCurPage(String ciName, int currentPage) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
paramMap.put("currentPage", String.valueOf(currentPage));

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateCurPage", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateTwoDate(String ciName, Long totalMaxDate) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
paramMap.put("totalMaxDate", String.valueOf(totalMaxDate));

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateTwoDate", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public void updateCurPageAndTotalPageToNull(String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);

try {
openMO();
sqlMO().update(MOSTDAO_NAMESPACE + ".updateCurPageAndTotalPageToNull", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
}

@Override
public Othersys getOthersysMappingByPMModelId(String modelId) {
Map<String,String> paramMap = new HashMap<String, String>();
paramMap.put("modelId", modelId);
Othersys othersys = null;
try {
openMO();
othersys = sqlMO().selectOne(
MOSTDAO_NAMESPACE + ".getOthersysMappingByPMModelId",
paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersys;
}

@Override
public List<Othersys> getAllOthersysParamMappingFor12n(String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
List<Othersys> othersysList = null;
try {
openMO();
othersysList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getAllOthersysParamMappingFor12n", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersysList;
}

@Override
public List<OthersysAttribute> getAllOthersysAttrParamMappingFor12n(
String ciName) {
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("ciName", ciName);
List<OthersysAttribute> othersysList = null;
try {
openMO();
othersysList = sqlMO().selectList(
MOSTDAO_NAMESPACE + ".getAllOthersysAttrParamMappingFor12n", paramMap);
} catch (Exception e) {
e.printStackTrace();
} finally {
closeMO();
}
return othersysList;
}

}
分享到:
评论

相关推荐

    java毕设项目之ssm基于SSM的高校共享单车管理系统的设计与实现+vue(完整前后端+说明文档+mysql+lw).zip

    项目包含完整前后端源码和数据库文件 环境说明: 开发语言:Java 框架:ssm,mybatis JDK版本:JDK1.8 数据库:mysql 5.7 数据库工具:Navicat11 开发软件:eclipse/idea Maven包:Maven3.3 服务器:tomcat7

    YOLO算法-贴纸检测数据集-212张图像带标签-部分覆盖-未涵盖-完全覆盖.zip

    YOLO系列算法目标检测数据集,包含标签,可以直接训练模型和验证测试,数据集已经划分好,包含数据集配置文件data.yaml,适用yolov5,yolov8,yolov9,yolov7,yolov10,yolo11算法; 包含两种标签格:yolo格式(txt文件)和voc格式(xml文件),分别保存在两个文件夹中,文件名末尾是部分类别名称; yolo格式:<class> <x_center> <y_center> <width> <height>, 其中: <class> 是目标的类别索引(从0开始)。 <x_center> 和 <y_center> 是目标框中心点的x和y坐标,这些坐标是相对于图像宽度和高度的比例值,范围在0到1之间。 <width> 和 <height> 是目标框的宽度和高度,也是相对于图像宽度和高度的比例值; 【注】可以下拉页面,在资源详情处查看标签具体内容;

    zigbee CC2530无线自组网协议栈系统代码实现协调器按键控制终端LED灯和继电器动作.zip

    1、嵌入式物联网单片机项目开发例程,简单、方便、好用,节省开发时间。 2、代码使用IAR软件开发,当前在CC2530上运行,如果是其他型号芯片,请自行移植。 3、软件下载时,请注意接上硬件,并确认烧录器连接正常。 4、有偿指导v:wulianjishu666; 5、如果接入其他传感器,请查看账号发布的其他资料。 6、单片机与模块的接线,在代码当中均有定义,请自行对照。 7、若硬件有差异,请根据自身情况调整代码,程序仅供参考学习。 8、代码有注释说明,请耐心阅读。 9、例程具有一定专业性,非专业人士请谨慎操作。

    手语图像分类数据集【已标注,约2,500张数据】

    手语图像分类数据集【已标注,约2,500张数据】 分类个数【36】:0、1、a、b等【具体查看json文件】 划分了训练集、测试集。存放各自的同一类数据图片。如果想可视化数据集,可以运行资源中的show脚本。 CNN分类网络改进:https://blog.csdn.net/qq_44886601/category_12858320.html 【更多图像分类、图像分割(医学)、目标检测(yolo)的项目以及相应网络的改进,可以参考本人主页:https://blog.csdn.net/qq_44886601/category_12803200.html】

    CNCAP 2024打分表

    CNCAP 2024打分表

    基于小程序的智慧校园管理系统源代码(java+小程序+mysql+LW).zip

    系统可以提供信息显示和相应服务,其管理智慧校园管理系统信息,查看智慧校园管理系统信息,管理智慧校园管理系统。 项目包含完整前后端源码和数据库文件 环境说明: 开发语言:Java JDK版本:JDK1.8 数据库:mysql 5.7 数据库工具:Navicat11 开发软件:eclipse/idea Maven包:Maven3.3 部署容器:tomcat7 小程序开发工具:hbuildx/微信开发者工具

    【图像去噪】基于matlab PolSAR GWLS滤波器图像去噪【含Matlab源码 9937期】.zip

    Matlab领域上传的视频均有对应的完整代码,皆可运行,亲测可用,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作

    影音互动科普网站-JAVA-基于SpringBoot的哈利波特书影音互动科普网站设计与实现(毕业论文)

    影音互动科普网站功能描述 影音互动科普网站旨在通过多媒体形式(视频、音频、互动内容等)传播科学知识,提高公众的科学素养。该网站结合娱乐与教育,提供易于理解的科普内容,吸引不同年龄层次的用户参与和学习。以下是该网站的主要功能描述: 1. 用户注册与登录 用户注册:用户可以通过电子邮箱、手机号或社交账号(如微信、微博等)注册,提供基本信息并设置密码。 用户登录:支持通过注册的账号登录,保障个人信息的安全性,并提供自动登录功能。 2. 科普视频与音频库 视频内容:网站提供各类科普视频,包括短视频、纪录片、讲座、实验演示等,覆盖物理、化学、生物、地理、天文等多个领域。 音频内容:提供科普音频节目,如科普广播、播客、专题讲座等,便于用户在日常生活中进行学习。 视频分类:按科目、难度、年龄层、时长等维度对视频和音频进行分类,帮助用户更精准地找到感兴趣的内容。 字幕与多语言支持:提供字幕、翻译和多语种版本,帮助不同语言的用户学习。 3. 互动问答与讨论区 专家问答:用户可以向科普专家提问,专家提供详尽的解答,解决用户的科学疑惑。 社区讨论:用户可以在视频下方或专题页面中发表评论、提问或与其他用户

    倪海厦讲义及笔记,易学数据测算

    倪海厦讲义及笔记,易学数据测算

    【组合数学答案】组合数学-苏大李凡长版-课后习题答案

    内容概要:本文档是《组合数学答案-网络流传版.pdf》的内容,主要包含了排列组合的基础知识以及一些经典的组合数学题目。这些题目涵盖了从排列数计算、二项式定理的应用到容斥原理的实际应用等方面。通过对这些题目的解析,帮助读者加深对组合数学概念和技巧的理解。 适用人群:适合初学者和有一定基础的学习者。 使用场景及目标:可以在学习组合数学课程时作为练习题参考,也可以在复习考试或准备竞赛时使用,目的是提高解决组合数学问题的能力。 其他说明:文档中的题目覆盖了组合数学的基本知识点,适合逐步深入学习。每个题目都有详细的解答步骤,有助于读者掌握解题思路和方法。

    管理系统开发指南:功能要求、技术栈及安全控制

    内容概要:本文是一篇完整的管理系统开发指南,详细介绍了功能要求、技术栈选择、数据库设计、用户界面搭建以及安全控制等方面的内容。功能要求包括用户管理、权限控制、数据管理、系统日志、通知与消息、统计分析和扩展模块。使用的技术栈涵盖了后端(Java、Python、C#等)和前端(React、Vue.js、Angular等)技术,以及数据库设计和安全控制措施。 适合人群:具备一定开发经验的软件工程师和技术管理人员。 使用场景及目标:适用于企业级管理系统开发项目,旨在构建一个高效、安全且易于扩展的系统。开发者可以参考本文档进行系统的设计和实现,确保系统满足业务需求。 其他说明:本文档提供了详细的步骤和最佳实践,帮助开发者更好地理解和应用管理系统开发的各种技术。通过结合实际案例和实践经验,本文档能够为开发者提供有价值的指导。

    听器听力损伤程度分级表.docx

    听器听力损伤程度分级表.docx

    MATLAB代码:基于条件风险价值的合作型Stackerlberg博弈微网动态定价与优化调度 关键词:微网优化调度 条件风险价值 合作博弈 纳什谈判 参考文档:A cooperative Stack

    MATLAB代码:基于条件风险价值的合作型Stackerlberg博弈微网动态定价与优化调度 关键词:微网优化调度 条件风险价值 合作博弈 纳什谈判 参考文档:《A cooperative Stackelberg game based energy management considering price discrimination and risk assessment》完美复现 仿真平台:MATLAB yalmip+cplex+mosek 主要内容:代码主要做的是一个基于合作型Stackerlberg博弈的考虑差别定价和风险管理的微网动态定价与调度策略,提出了一个双层能源管理框架,实现多个微网间的P2P能源交易,上层为零商的动态定价模型,目标是社会福利最大化;下层是多个产消者的合作博弈模型,优化各产消者的能量管理策略。 同时,采用纳什谈判法对多个产消者的合作剩余进行公平分配,还考虑了运行风险,采用条件风险价值(CVaR)随机规划方法来描述零商的预期损失。 求解方面,双层模型被基于KKT条件转为单层模型,模型可以高效求解。 这段代码是一个基于合作型Stackelberg博弈的微网

    YOLO算法-监控数据集-873张图像带标签-警方-警车-救护车-消防车-跌倒的人-消防员.zip

    YOLO系列算法目标检测数据集,包含标签,可以直接训练模型和验证测试,数据集已经划分好,包含数据集配置文件data.yaml,适用yolov5,yolov8,yolov9,yolov7,yolov10,yolo11算法; 包含两种标签格:yolo格式(txt文件)和voc格式(xml文件),分别保存在两个文件夹中,文件名末尾是部分类别名称; yolo格式:<class> <x_center> <y_center> <width> <height>, 其中: <class> 是目标的类别索引(从0开始)。 <x_center> 和 <y_center> 是目标框中心点的x和y坐标,这些坐标是相对于图像宽度和高度的比例值,范围在0到1之间。 <width> 和 <height> 是目标框的宽度和高度,也是相对于图像宽度和高度的比例值; 【注】可以下拉页面,在资源详情处查看标签具体内容;

    (175526236)【动漫网页设计】源码免费分享,让你的网站更有趣!

    20块钱买的【动漫网页设计】源码,免费分享出来啦,如果要积分那是系统自动涨的啦。 内容概要:本资源是一份动漫网页设计的源码,价格仅为20元,作者将其免费分享给大家。该源码包含了动漫元素的设计,包括背景、图标、按钮等,同时也提供了一些常见的网页布局和交互效果。通过该资源,可以学习到动漫网页设计的基本原理和技巧。 适用人群:本资源适用于对动漫网页设计感兴趣的人群,包括网页设计师、UI设计师、前端开发工程师等。同时,对于想要学习动漫网页设计的初学者也非常适用。 使用场景及目标:该资源可以用于学习和实践动漫网页设计的技巧和原理。通过学习该源码,可以了解到动漫网页设计的基本要素和设计思路,同时也可以借鉴其中的设计元素和交互效果,应用到自己的网页设计中。 其他说明:本资源是作者自己设计的,经过了多次修改和优化,具有一定的参考价值。同时,作者也将其价格设置的非常低,希望更多的人可以学习到动漫网页设计的技巧和方法。如果您对该资源有任何疑问或建议,欢迎在评论区留言,作者会尽快回复。。内容来源于网络分享,如有侵权请联系我删除。另外如果没有积分的同学需要下载,请私信我。

    C++程序设计-参考答案

    自考 本科 C++程序设计-课本 参考答案

    每周质量安全排查报告.docx

    每周质量安全排查报告.docx

    YOLO算法-杂草检测项目数据集-3970张图像带标签-杂草.zip

    YOLO算法-杂草检测项目数据集-3970张图像带标签-杂草.zip

    内存搜索工具(易).rar

    内存搜索工具(易).rar

    2024 AGM Meritech Market Section (External).pdf

    AI大模型研究相关报告

Global site tag (gtag.js) - Google Analytics