|
@@ -113,7 +113,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
SFilter.eq("parentCode","equipment"),
|
|
|
- SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).order("code").exec()
|
|
|
|
|
|
}
|
|
@@ -124,7 +125,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
// pageInfo = queryBuilder.pageQuery(1, 1000)
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
SFilter.eq("parentCode","component"),
|
|
|
- SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).order("code").exec()
|
|
|
}
|
|
|
"system" -> {
|
|
@@ -132,7 +134,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
// pageInfo = queryBuilder.pageQuery(1, 1000)
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
SFilter.eq("parentCode","system"),
|
|
|
- SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).exec()
|
|
|
}
|
|
|
"major" -> {
|
|
@@ -168,7 +171,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
defClass.aliasCode = dictMajor.aliasCode
|
|
|
val defClassList = defClassService.select(
|
|
|
SFilter.eq("parentCode", "system"),
|
|
|
- SFilter.eq("projectId",projectId!!),
|
|
|
+ SFilter.eq("type","common"),
|
|
|
+// SFilter.eq("projectId",projectId!!),
|
|
|
SFilter.eq("majorCode", defClass.code!!)
|
|
|
).exec()
|
|
|
defClass.children = defClassList
|
|
@@ -180,7 +184,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
/** 业务空间类型 */
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
SFilter.eq("parentCode","space"),
|
|
|
- SFilter.eq("projectId",projectId!!)
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("type","common")
|
|
|
).exec()
|
|
|
}
|
|
|
"majorEquipment" -> {
|
|
@@ -195,7 +200,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
defClass.aliasCode = dictMajor.aliasCode
|
|
|
val defClassList = defClassService.select(
|
|
|
SFilter.eq("parentCode", "equipment"),
|
|
|
- SFilter.eq("projectId",projectId!!),
|
|
|
+ SFilter.eq("type","common"),
|
|
|
+// SFilter.eq("projectId",projectId!!),
|
|
|
SFilter.eq("majorCode", defClass.code!!)
|
|
|
).exec()
|
|
|
defClass.children = defClassList
|
|
@@ -206,18 +212,23 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
"equipmentAndComponent" -> {
|
|
|
/** 设备和部件 */
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
- SFilter.or(SFilter.eq("parentCode","component"),SFilter.eq("parentCode","equipment")), SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.or(SFilter.eq("parentCode","component")
|
|
|
+ ,SFilter.eq("parentCode","equipment")),
|
|
|
+ SFilter.eq("type","common")
|
|
|
|
|
|
).exec()
|
|
|
}
|
|
|
"equipmentComponent" ->{
|
|
|
/** 设备下的部件 */
|
|
|
dictSchemeCategoryList = defClassService.select(
|
|
|
- SFilter.eq("parentCode","equipment"), SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("parentCode","equipment"),
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).exec()
|
|
|
val defClassList = defClassService.select(
|
|
|
SFilter.eq("parentCode", "component"),
|
|
|
- SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).exec()
|
|
|
if (dictSchemeCategoryList.size > 0){
|
|
|
for (dictSchemeCategory in dictSchemeCategoryList){
|
|
@@ -248,11 +259,15 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
}
|
|
|
/** 系统 */
|
|
|
val systemList = defClassService.select(
|
|
|
- SFilter.eq("parentCode", "system"), SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("parentCode", "system"),
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).exec()
|
|
|
/** 设备 */
|
|
|
val equipmentList = defClassService.select(
|
|
|
- SFilter.eq("parentCode","equipment"), SFilter.eq("projectId",projectId!!)
|
|
|
+ SFilter.eq("parentCode","equipment"),
|
|
|
+ SFilter.eq("type","common")
|
|
|
+// SFilter.eq("projectId",projectId!!)
|
|
|
).exec()
|
|
|
/** 系统下的设备 */
|
|
|
for (system in systemList){
|
|
@@ -320,7 +335,6 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
if (dictProject!=null) {
|
|
|
val dictDefFuncBuilder01 = dictDefFuncId.select(request.filters).filter(SFilter.eq("projectId", projectId),
|
|
|
SFilter.eq("classCode", request.type!!))
|
|
|
-
|
|
|
val dictDefFuncList01 = dictDefFuncBuilder01.table("dict.def_funcid_project").order("sort").exec()
|
|
|
logger.debug("测试 =${dictDefFuncList01.size}")
|
|
|
/** 项目定制已存在直接返回 */
|
|
@@ -329,7 +343,8 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
val familyList = equipFamilyService.select(SFilter.eq("family", request.type!!)).exec()
|
|
|
if (familyList.size>0){
|
|
|
val equipFamily = familyList[0]
|
|
|
- schemeService.dictInfoProperty(projectId, dictProject.groupCode!!, equipFamily.equipCode!!,request.type!!)
|
|
|
+// schemeService.dictInfoProperty(projectId, dictProject.groupCode!!, equipFamily.equipCode!!,request.type!!)
|
|
|
+ schemeService.dictInfoPropertyCommon("common",projectId, dictProject.groupCode!!, equipFamily.equipCode!!,request.type!!)
|
|
|
val dictDefFuncBuilder = dictDefFuncId.select(
|
|
|
SFilter.eq("projectId", projectId),
|
|
|
SFilter.eq("classCode", request.type!!)
|
|
@@ -339,9 +354,12 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
sQueryResponse.total = dictDefFuncList.size.toLong()
|
|
|
}
|
|
|
}else if (dictDefFuncList01.size == 0) {
|
|
|
- schemeService.dictInfo(projectId, dictProject.groupCode!!, request.type!!)
|
|
|
+// schemeService.dictInfo(projectId, dictProject.groupCode!!, request.type!!)
|
|
|
+ schemeService.dictInfoCommon("common",projectId,dictProject.groupCode!!,request.type!!)
|
|
|
}
|
|
|
- val dictDefFuncBuilder = dictDefFuncId.select(request.filters).filter(SFilter.eq("projectId", projectId),
|
|
|
+ val dictDefFuncBuilder = dictDefFuncId.select(request.filters).filter(
|
|
|
+// SFilter.eq("type","common"),
|
|
|
+ SFilter.eq("projectId", projectId),
|
|
|
SFilter.eq("groupCode", dictProject.groupCode!!),
|
|
|
SFilter.eq("classCode", request.type!!))
|
|
|
/** 过滤 */
|
|
@@ -497,18 +515,18 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
"schemeZero" -> {
|
|
|
if (!request.priorityList.isNullOrEmpty() && !request.firstNameList.isNullOrEmpty()) {
|
|
|
defFuncIdProjectService.delete(SFilter.eq("projectId",projectId))
|
|
|
- customMapper.dictSchemeData(projectId,dictProject!!.groupCode!!)
|
|
|
+ customMapper.dictSchemeData("common",projectId,dictProject!!.groupCode!!)
|
|
|
val defFuncIdProject = DefFuncIdProject()
|
|
|
defFuncIdProject.visible = false
|
|
|
defFuncIdProject.projectId = projectId
|
|
|
- defFuncIdProjectService.update(defFuncIdProject, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(defFuncIdProject, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId),SFilter.not(SFilter.eq("unDisabled",false))))
|
|
|
/** 一级标签 */
|
|
|
for (firstName in request.firstNameList!!) {
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = true
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId),SFilter.eq("firstName",firstName)))
|
|
|
}
|
|
|
/** 匹配优先级 */
|
|
@@ -516,7 +534,7 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = true
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId),SFilter.eq("priority",priority)))
|
|
|
}
|
|
|
}else if (!request.firstNameList.isNullOrEmpty() && request.firstNameList!!.size > 0) {
|
|
@@ -524,11 +542,11 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
/** 清除项目下的字典信息 */
|
|
|
defFuncIdProjectService.delete(SFilter.eq("projectId",projectId))
|
|
|
/** 导入原始字典数据 */
|
|
|
- customMapper.dictSchemeData(projectId,dictProject!!.groupCode!!)
|
|
|
+ customMapper.dictSchemeData("common",projectId,dictProject!!.groupCode!!)
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = false
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId), SFilter.not(SFilter.eq("unDisabled",false))))
|
|
|
|
|
|
/** 一级标签 */
|
|
@@ -536,7 +554,7 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = true
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId),SFilter.eq("firstName",firstName)))
|
|
|
}
|
|
|
} catch (e: Exception) {
|
|
@@ -548,11 +566,11 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
/** 清除项目下的字典信息 */
|
|
|
defFuncIdProjectService.delete(SFilter.eq("projectId",projectId))
|
|
|
/** 导入原始字典数据 */
|
|
|
- customMapper.dictSchemeData(projectId,dictProject!!.groupCode!!)
|
|
|
+ customMapper.dictSchemeData("common",projectId,dictProject!!.groupCode!!)
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = false
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId), SFilter.not(SFilter.eq("unDisabled",false))))
|
|
|
|
|
|
/** 匹配优先级 */
|
|
@@ -560,7 +578,7 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = true
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId),SFilter.eq("priority",priority)))
|
|
|
}
|
|
|
} catch (e: Exception) {
|
|
@@ -570,11 +588,11 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
/** 清除项目下的字典信息 */
|
|
|
defFuncIdProjectService.delete(SFilter.eq("projectId",projectId))
|
|
|
/** 导入原始字典数据 */
|
|
|
- customMapper.dictSchemeData(projectId,dictProject!!.groupCode!!)
|
|
|
+ customMapper.dictSchemeData("common",projectId,dictProject!!.groupCode!!)
|
|
|
val propertyDefProjectInfo = DefFuncIdProject()
|
|
|
propertyDefProjectInfo.visible = false
|
|
|
propertyDefProjectInfo.projectId = projectId
|
|
|
- defFuncIdProjectService.update(propertyDefProjectInfo, arrayListOf("visible"),
|
|
|
+ defFuncIdProjectService.update(propertyDefProjectInfo, null,
|
|
|
arrayListOf(SFilter.eq("projectId",projectId), SFilter.not(SFilter.eq("unDisabled",false))))
|
|
|
}
|
|
|
}
|
|
@@ -599,8 +617,4 @@ object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::clas
|
|
|
}
|
|
|
} // Fun setSchemeProject()
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
} // Object DictDefClassService
|