|
@@ -2,26 +2,27 @@ package com.onemap.apply.service.impl.tdgy;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
+import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
+import com.onemap.apply.domain.tdgy.dto.FileObj;
|
|
import com.onemap.apply.domain.tdgy.dto.LandIdleConfirmDTO;
|
|
import com.onemap.apply.domain.tdgy.dto.LandIdleConfirmDTO;
|
|
import com.onemap.apply.domain.tdgy.dto.LandIdleDisposalDTO;
|
|
import com.onemap.apply.domain.tdgy.dto.LandIdleDisposalDTO;
|
|
|
|
+import com.onemap.apply.domain.tdgy.dto.TdgySjDTO;
|
|
|
|
+import com.onemap.apply.domain.tdgy.res.TdgySjRes;
|
|
import com.onemap.apply.domain.tdgy.vo.IdleLandListVo;
|
|
import com.onemap.apply.domain.tdgy.vo.IdleLandListVo;
|
|
import com.onemap.apply.domain.tdgy.vo.LandIdleConfirmVo;
|
|
import com.onemap.apply.domain.tdgy.vo.LandIdleConfirmVo;
|
|
import com.onemap.apply.domain.tdgy.vo.LandIdleDisposalVo;
|
|
import com.onemap.apply.domain.tdgy.vo.LandIdleDisposalVo;
|
|
|
|
+import com.onemap.apply.domain.tdgy.vo.UpdateTdgyVo;
|
|
import com.onemap.apply.mapper.tdgy.LandIdleConfirmMapper;
|
|
import com.onemap.apply.mapper.tdgy.LandIdleConfirmMapper;
|
|
import com.onemap.apply.mapper.tdgy.LandIdleDisposalMapper;
|
|
import com.onemap.apply.mapper.tdgy.LandIdleDisposalMapper;
|
|
-import com.onemap.apply.utils.DozerUtils;
|
|
|
|
-import com.onemap.common.core.utils.uuid.IdUtils;
|
|
|
|
-import com.onemap.common.datasource.annotation.Master;
|
|
|
|
-
|
|
|
|
-import com.onemap.apply.domain.tdgy.dto.TdgySjDTO;
|
|
|
|
-import com.onemap.apply.domain.tdgy.res.TdgySjRes;
|
|
|
|
-import com.onemap.apply.domain.tdgy.vo.UpdateTdgyVo;
|
|
|
|
import com.onemap.apply.mapper.tdgy.TdgyMapper;
|
|
import com.onemap.apply.mapper.tdgy.TdgyMapper;
|
|
import com.onemap.apply.service.tdgy.TdgyService;
|
|
import com.onemap.apply.service.tdgy.TdgyService;
|
|
|
|
+import com.onemap.apply.utils.DozerUtils;
|
|
|
|
+import com.onemap.common.core.utils.uuid.IdUtils;
|
|
import com.onemap.common.core.web.domain.RequestResult;
|
|
import com.onemap.common.core.web.domain.RequestResult;
|
|
|
|
+import com.onemap.common.datasource.annotation.Master;
|
|
import com.onemap.common.datasource.annotation.Slave;
|
|
import com.onemap.common.datasource.annotation.Slave;
|
|
-
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -162,9 +163,16 @@ public class TdgyServiceImp implements TdgyService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public RequestResult getIdleLandConfirm(String landId) {
|
|
|
|
|
|
+ public RequestResult getIdleLandConfirm(String landId) throws JsonProcessingException {
|
|
// 根据landId查询判定信息
|
|
// 根据landId查询判定信息
|
|
- LandIdleConfirmDTO landIdleConfirmDTO = landIdleConfirmMapper.selectOne(new UpdateWrapper<LandIdleConfirmDTO>().eq("land_id", landId));
|
|
|
|
|
|
+ LandIdleConfirmDTO landIdleConfirmDTO = landIdleConfirmMapper.getByLandId(landId);
|
|
|
|
+ if (landIdleConfirmDTO.getFilesStr() != null && !landIdleConfirmDTO.getFilesStr().equals("")) {
|
|
|
|
+ ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
+ List<FileObj> files = objectMapper.readValue(landIdleConfirmDTO.getFilesStr(), new TypeReference<List<FileObj>>() {
|
|
|
|
+ });
|
|
|
|
+ landIdleConfirmDTO.setFiles(files);
|
|
|
|
+ }
|
|
|
|
+
|
|
return RequestResult.success(landIdleConfirmDTO);
|
|
return RequestResult.success(landIdleConfirmDTO);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -217,9 +225,7 @@ public class TdgyServiceImp implements TdgyService {
|
|
|
|
|
|
// 根据landId更新表t_land_idle_confirm的is_disposal字段
|
|
// 根据landId更新表t_land_idle_confirm的is_disposal字段
|
|
if (landIdleDisposalDTO.getDisposalTime() != null) {
|
|
if (landIdleDisposalDTO.getDisposalTime() != null) {
|
|
- Wrapper<LandIdleConfirmDTO> wrapperConfirm = new UpdateWrapper<LandIdleConfirmDTO>().eq("land_id", landId);
|
|
|
|
-
|
|
|
|
- LandIdleConfirmDTO landIdleConfirmDTO = landIdleConfirmMapper.selectOne(wrapperConfirm);
|
|
|
|
|
|
+ LandIdleConfirmDTO landIdleConfirmDTO = landIdleConfirmMapper.getByLandId(landId);
|
|
landIdleConfirmDTO.setIsDisposal(true);
|
|
landIdleConfirmDTO.setIsDisposal(true);
|
|
landIdleConfirmMapper.updateById(landIdleConfirmDTO);
|
|
landIdleConfirmMapper.updateById(landIdleConfirmDTO);
|
|
}
|
|
}
|
|
@@ -231,9 +237,18 @@ public class TdgyServiceImp implements TdgyService {
|
|
* 获取闲置土地处置详情
|
|
* 获取闲置土地处置详情
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public RequestResult getIdleLandDisposal(String landId) {
|
|
|
|
|
|
+ public RequestResult getIdleLandDisposal(String landId) throws JsonProcessingException {
|
|
// 根据landId查询处置信息
|
|
// 根据landId查询处置信息
|
|
- LandIdleDisposalDTO landIdleDisposalDTO = landIdleDisposalMapper.selectOne(new UpdateWrapper<LandIdleDisposalDTO>().eq("land_id", landId));
|
|
|
|
|
|
+ // LandIdleDisposalDTO landIdleDisposalDTO = landIdleDisposalMapper.selectOne(new UpdateWrapper<LandIdleDisposalDTO>().eq("land_id", landId));
|
|
|
|
+ // 根据landId查询判定信息
|
|
|
|
+ LandIdleDisposalDTO landIdleDisposalDTO = landIdleDisposalMapper.getByLandId(landId);
|
|
|
|
+ if (landIdleDisposalDTO.getFilesStr() != null && !landIdleDisposalDTO.getFilesStr().equals("")) {
|
|
|
|
+ ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
+ List<FileObj> files = objectMapper.readValue(landIdleDisposalDTO.getFilesStr(), new TypeReference<List<FileObj>>() {
|
|
|
|
+ });
|
|
|
|
+ landIdleDisposalDTO.setFiles(files);
|
|
|
|
+ }
|
|
|
|
+
|
|
return RequestResult.success(landIdleDisposalDTO);
|
|
return RequestResult.success(landIdleDisposalDTO);
|
|
}
|
|
}
|
|
|
|
|