|
@@ -1,6 +1,14 @@
|
|
|
package com.onemap.apply.service.impl.tdgy;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.onemap.apply.domain.tdgy.dto.LandIdleConfirmDTO;
|
|
|
+import com.onemap.apply.domain.tdgy.dto.LandIdleDisposalDTO;
|
|
|
+import com.onemap.apply.domain.tdgy.vo.LandIdleConfirmVo;
|
|
|
+import com.onemap.apply.domain.tdgy.vo.LandIdleDisposalVo;
|
|
|
+import com.onemap.apply.mapper.tdgy.LandIdleConfirmMapper;
|
|
|
+import com.onemap.apply.mapper.tdgy.LandIdleDisposalMapper;
|
|
|
+import com.onemap.common.core.utils.uuid.IdUtils;
|
|
|
+import com.onemap.common.datasource.annotation.Master;
|
|
|
import org.dozer.DozerBeanMapper;
|
|
|
import com.onemap.apply.domain.tdgy.dto.TdgySjDTO;
|
|
|
import com.onemap.apply.domain.tdgy.res.TdgySjRes;
|
|
@@ -21,9 +29,21 @@ import java.util.Map;
|
|
|
@Service
|
|
|
public class TdgyServiceImp implements TdgyService {
|
|
|
@Resource
|
|
|
- private TdgyMapper tdgyMapper;
|
|
|
+ DozerBeanMapper dozerMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private TdgyMapper tdgyMapper;
|
|
|
+ @Resource
|
|
|
+ private LandIdleConfirmMapper landIdleConfirmMapper;
|
|
|
+ @Resource
|
|
|
+ private LandIdleDisposalMapper landIdleDisposalMapper;
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改土地供应
|
|
|
+ *
|
|
|
+ * @param updateTdgyVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Slave
|
|
|
@Override
|
|
|
public RequestResult updateTdgy(UpdateTdgyVo updateTdgyVo) {
|
|
@@ -52,24 +72,89 @@ public class TdgyServiceImp implements TdgyService {
|
|
|
return RequestResult.success();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取土地供应详情
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Slave
|
|
|
@Override
|
|
|
public RequestResult getTdgyDetail(Integer id) {
|
|
|
- DozerBeanMapper mapper = new DozerBeanMapper();
|
|
|
+ // DozerBeanMapper mapper = new DozerBeanMapper();
|
|
|
|
|
|
TdgySjDTO tdgySjDTO = tdgyMapper.selectById(id);
|
|
|
if (tdgySjDTO == null) {
|
|
|
return RequestResult.error("地块不存在");
|
|
|
}
|
|
|
|
|
|
- TdgySjRes tdgySjRes = mapper.map(tdgySjDTO, TdgySjRes.class);
|
|
|
+ TdgySjRes tdgySjRes = dozerMapper.map(tdgySjDTO, TdgySjRes.class);
|
|
|
return RequestResult.success(tdgySjRes);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取疑似闲置土地
|
|
|
+ *
|
|
|
+ * @param key
|
|
|
+ * @param xzqh
|
|
|
+ * @param limit
|
|
|
+ * @param offset
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Slave
|
|
|
@Override
|
|
|
public RequestResult getSuspectedIdleLand(String key, String xzqh, Integer limit, Integer offset) {
|
|
|
List<Map<String, Object>> list = tdgyMapper.getSuspectedIdleLand(key, xzqh, limit, offset);
|
|
|
return RequestResult.success(list);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加闲置土地认定
|
|
|
+ *
|
|
|
+ * @param landIdleConfirmVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Master
|
|
|
+ @Override
|
|
|
+ public RequestResult addIdleLandConfirm(LandIdleConfirmVo landIdleConfirmVo) {
|
|
|
+ String landId = landIdleConfirmVo.getLandId();
|
|
|
+ // 查询认定信息是否存在
|
|
|
+ LandIdleConfirmDTO landIdleConfirmDTO = landIdleConfirmMapper.selectById(landId);
|
|
|
+ if (landIdleConfirmDTO != null) {
|
|
|
+ return RequestResult.error("认定信息已存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 添加认定信息
|
|
|
+ landIdleConfirmDTO = new LandIdleConfirmDTO();
|
|
|
+ dozerMapper.map(landIdleConfirmVo, landIdleConfirmDTO);
|
|
|
+
|
|
|
+ String uuid = IdUtils.simpleUUID();
|
|
|
+ landIdleConfirmDTO.setId(uuid);
|
|
|
+ landIdleConfirmMapper.insert(landIdleConfirmDTO);
|
|
|
+ return RequestResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加闲置土地处置
|
|
|
+ *
|
|
|
+ * @param landIdleDisposalVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public RequestResult addIdleLandDisposal(LandIdleDisposalVo landIdleDisposalVo) {
|
|
|
+ String landId = landIdleDisposalVo.getLandId();
|
|
|
+ // 查询处置信息是否存在
|
|
|
+ LandIdleDisposalDTO landIdleDisposalDTO = landIdleDisposalMapper.selectById(landId);
|
|
|
+ if (landIdleDisposalDTO != null) {
|
|
|
+ return RequestResult.error("认定信息已存在");
|
|
|
+ }
|
|
|
+ // 添加处置信息
|
|
|
+ landIdleDisposalDTO = new LandIdleDisposalDTO();
|
|
|
+ dozerMapper.map(landIdleDisposalVo, landIdleDisposalDTO);
|
|
|
+ String uuid = IdUtils.simpleUUID();
|
|
|
+ landIdleDisposalDTO.setId(uuid);
|
|
|
+ landIdleDisposalMapper.insert(landIdleDisposalDTO);
|
|
|
+
|
|
|
+ return RequestResult.success();
|
|
|
+ }
|
|
|
}
|