|
@@ -30,6 +30,7 @@ import com.persagy.base.extensions.toJson
|
|
|
import com.persagy.database.SFilter
|
|
|
import com.persagy.mybatis.SMybatisDao
|
|
|
import com.persagy.server.dao.mappers.ZoneSpaceMapper
|
|
|
+import com.persagy.server.datacenter.models.entities.dictnew.DefClass
|
|
|
import com.persagy.server.datacenter.models.entities.objects.ZoneSpace
|
|
|
import com.persagy.server.datacenter.models.requests.UpZoneSpaceBaseRequest
|
|
|
import com.persagy.service.SObjectService
|
|
@@ -53,6 +54,8 @@ import org.springframework.web.bind.annotation.RequestBody
|
|
|
@Service
|
|
|
open class ZoneSpaceService {
|
|
|
|
|
|
+ /** 平台集团对象类型 */
|
|
|
+ private val defClassService = SObjectService(SMybatisDao(DefClass::class.java))
|
|
|
@Autowired
|
|
|
lateinit var mapper: ZoneSpaceMapper
|
|
|
/**
|
|
@@ -79,7 +82,21 @@ open class ZoneSpaceService {
|
|
|
}
|
|
|
if(idList.size>0){
|
|
|
list.add(SFilter.inList("id",idList))
|
|
|
- return zoneSpaceBaseTableService.pageQuery(request,list)
|
|
|
+
|
|
|
+ val pageQuery = zoneSpaceBaseTableService.pageQuery(request, list)
|
|
|
+ if (!pageQuery.content.isNullOrEmpty()) {
|
|
|
+ for (content in pageQuery.content!!) {
|
|
|
+ val entity = defClassService.select(
|
|
|
+ SFilter.eq("projectId", projectId),
|
|
|
+ SFilter.eq("code", content.classCode!!)
|
|
|
+ ).entity()
|
|
|
+ if (entity!=null){
|
|
|
+ content.zoneName = entity
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return pageQuery
|
|
|
}else{
|
|
|
val sQueryResponse = SQueryResponse<ZoneSpace>(SResponseType.success)
|
|
|
sQueryResponse.content = ArrayList<ZoneSpace>()
|