Browse Source

资源

master
张泽亮 1 day ago
parent
commit
465e5994ae
18 changed files with 1400 additions and 714 deletions
  1. +90
    -38
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java
  2. +72
    -31
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceOperationController.java
  3. +1
    -1
      ruoyi-admin/src/main/resources/application-druid.yml
  4. +0
    -121
      ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceLand.java
  5. +0
    -95
      ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceOperation.java
  6. +385
    -0
      ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLand.java
  7. +310
    -0
      ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceOperation.java
  8. +138
    -0
      ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceVo.java
  9. +14
    -17
      ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java
  10. +6
    -3
      ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceOperationMapper.java
  11. +14
    -9
      ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java
  12. +6
    -3
      ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceOperationService.java
  13. +42
    -48
      ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java
  14. +18
    -16
      ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceOperationServiceImpl.java
  15. +0
    -293
      ruoyi-business/src/main/resources/mapper/business/TResourceLandMapper.xml
  16. +274
    -0
      ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml
  17. +27
    -35
      ruoyi-business/src/main/resources/mapper/resource/TResourceOperationMapper.xml
  18. +3
    -4
      ruoyi-generator/src/main/resources/vm/vue/index.vue.vm

ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceLandController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java View File

@@ -1,49 +1,57 @@
package com.ruoyi.web.controller.business;
package com.ruoyi.web.controller.resource;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.ruoyi.business.domain.TResourceLand;
import com.ruoyi.business.service.ITResourceLandService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.pdf.PageSet;
import com.ruoyi.common.core.domain.pdf.PdfProperty;
import com.ruoyi.common.core.domain.pdf.ShoulderItem;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.pdf.PdfUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.translation.TranslateUtils;
import com.ruoyi.resource.domain.TResourceLand;
import com.ruoyi.resource.domain.TResourceOperation;
import com.ruoyi.resource.domain.TResourceVo;
import com.ruoyi.resource.service.ITResourceLandService;
import com.ruoyi.resource.service.ITResourceOperationService;
import com.ruoyi.system.service.ISysDeptService;
import org.apache.commons.compress.utils.Lists;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* 地块属性Controller
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
@RestController
@RequestMapping("/business/resourceLand")
@RequestMapping("/resource/land")
public class TResourceLandController extends BaseController
{
@Autowired
private ITResourceLandService tResourceLandService;

@Autowired
private ITResourceOperationService tResourceOperationService;

@Autowired
private ISysDeptService deptService;

/**
* 查询地块属性列表
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:list')")
@PreAuthorize("@ss.hasPermi('resource:land:list')")
@GetMapping("/list")
public TableDataInfo list(TResourceLand tResourceLand)
{
@@ -56,7 +64,7 @@ public class TResourceLandController extends BaseController
/**
* 导出地块属性列表
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:export')")
@PreAuthorize("@ss.hasPermi('resource:land:export')")
@Log(title = "地块属性", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TResourceLand tResourceLand)
@@ -79,7 +87,7 @@ public class TResourceLandController extends BaseController
* 地块属性导入
*/
@Log(title = "地块属性", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('business:resourceLand:import')")
@PreAuthorize("@ss.hasPermi('resource:land:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
ExcelUtil<TResourceLand> util = new ExcelUtil<TResourceLand>(TResourceLand.class);
@@ -91,39 +99,83 @@ public class TResourceLandController extends BaseController
/**
* 获取地块属性详细信息
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:query')")
@GetMapping(value = "/{DKBM}")
public AjaxResult getInfo(@PathVariable("DKBM") String DKBM)
@PreAuthorize("@ss.hasPermi('resource:land:query')")
@GetMapping(value = "/{fid}")
public AjaxResult getInfo(@PathVariable("fid") Long fid)
{
return success(tResourceLandService.selectTResourceLandByDKBM(DKBM));
return success(tResourceLandService.selectTResourceLandByFid(fid));
}

/**
* 获取地块属性详细信息,翻译字典
*/
@GetMapping(value = "/detail/{DKBM}")
public AjaxResult detail(@PathVariable("DKBM") String DKBM)
@GetMapping(value = "/detail/{fid}")
public AjaxResult detail(@PathVariable("fid") Long fid)
{
TResourceLand detail = tResourceLandService.selectTResourceLandByDKBM(DKBM);
TResourceLand detail = tResourceLandService.selectTResourceLandByFid(fid);
TranslateUtils.translate(detail, false);
return success(detail);
}

/**
* 获取地块属性详细信息,翻译字典 ,合并属性及经营数据
*/
@GetMapping(value = "/detailByDkbm/{dkbm}")
public AjaxResult detailByDkbm(@PathVariable("dkbm") String dkbm)
{
TResourceVo resource = new TResourceVo();

TResourceLand land = tResourceLandService.selectTResourceLandByDkbm(dkbm);

BeanUtils.copyProperties(land, resource);

TResourceOperation operation = tResourceOperationService.selectTResourceOperationByDkbm(dkbm);

resource.setJymj(operation.getJymj());
resource.setJyfs(operation.getJyfs());
resource.setJydxmc(operation.getJydxmc());
resource.setJykssj(operation.getJykssj());
resource.setJyjssj(operation.getJyjssj());
resource.setCbje(operation.getCbje());
resource.setBz(operation.getBz());
resource.setDkImg(operation.getDkImg());
resource.setSurveyStatus(operation.getSurveyStatus());

TranslateUtils.translate(resource, false);
return success(resource);
}




/**
* 新增地块属性
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:add')")
@PreAuthorize("@ss.hasPermi('resource:land:add')")
@Log(title = "地块属性", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody TResourceLand tResourceLand)
{
SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId());
if(dept.getOrgCode().length() < 12){
return error("非村、组级行政区划,不允许添加地块!");
}

tResourceLand.setImportCode(dept.getImportCode());
if(StringUtils.isNull(tResourceLand.getDkbm())){
if(dept.getOrgCode().length() == 12){ // 12 村级,要后缀 00
tResourceLand.setDkbm(tResourceLandService.selectTResourceLandAutoGenCode(dept.getOrgCode() + "00"));
}else{ // 14 组级
tResourceLand.setDkbm(tResourceLandService.selectTResourceLandAutoGenCode(dept.getOrgCode()));
}
}
return toAjax(tResourceLandService.insertTResourceLand(tResourceLand));
}

/**
* 修改地块属性
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:edit')")
@PreAuthorize("@ss.hasPermi('resource:land:edit')")
@Log(title = "地块属性", businessType = BusinessType.UPDATE)
@PostMapping("/update")
public AjaxResult edit(@RequestBody TResourceLand tResourceLand)
@@ -134,18 +186,18 @@ public class TResourceLandController extends BaseController
/**
* 删除地块属性
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:remove')")
@PreAuthorize("@ss.hasPermi('resource:land:remove')")
@Log(title = "地块属性", businessType = BusinessType.DELETE)
@GetMapping("/delete/{DKBMs}")
public AjaxResult remove(@PathVariable String[] DKBMs)
@GetMapping("/delete/{fids}")
public AjaxResult remove(@PathVariable Long[] fids)
{
return toAjax(tResourceLandService.deleteTResourceLandByDKBMs(DKBMs));
return toAjax(tResourceLandService.deleteTResourceLandByFids(fids));
}

/**
* 打印地块属性
*/
@PreAuthorize("@ss.hasPermi('business:resourceLand:print')")
@PreAuthorize("@ss.hasPermi('resource:land:print')")
@Log(title = "地块属性", businessType = BusinessType.PRINT)
@GetMapping("/print")
public void printPdf(TResourceLand tResourceLand, HttpServletResponse response) throws Exception{

ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceOperationController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceOperationController.java View File

@@ -1,51 +1,57 @@
package com.ruoyi.web.controller.business;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
package com.ruoyi.web.controller.resource;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.pdf.PageSet;
import com.ruoyi.common.core.domain.pdf.PdfProperty;
import com.ruoyi.common.core.domain.pdf.ShoulderItem;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.pdf.PdfUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.translation.TranslateUtils;
import com.ruoyi.resource.domain.TResourceLand;
import com.ruoyi.resource.domain.TResourceOperation;
import com.ruoyi.resource.domain.TResourceVo;
import com.ruoyi.resource.service.ITResourceLandService;
import com.ruoyi.resource.service.ITResourceOperationService;
import com.ruoyi.system.service.ISysDeptService;
import org.apache.commons.compress.utils.Lists;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.business.domain.TResourceOperation;
import com.ruoyi.business.service.ITResourceOperationService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* 地块经营Controller
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
@RestController
@RequestMapping("/business/resourceOperation")
@RequestMapping("/resource/operation")
public class TResourceOperationController extends BaseController
{
@Autowired
private ITResourceOperationService tResourceOperationService;

@Autowired
private ITResourceLandService tResourceLandService;

@Autowired
private ISysDeptService deptService;


/**
* 查询地块经营列表
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:list')")
@PreAuthorize("@ss.hasPermi('resource:operation:list')")
@GetMapping("/list")
public TableDataInfo list(TResourceOperation tResourceOperation)
{
@@ -58,7 +64,7 @@ public class TResourceOperationController extends BaseController
/**
* 导出地块经营列表
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:export')")
@PreAuthorize("@ss.hasPermi('resource:operation:export')")
@Log(title = "地块经营", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TResourceOperation tResourceOperation)
@@ -81,7 +87,7 @@ public class TResourceOperationController extends BaseController
* 地块经营导入
*/
@Log(title = "地块经营", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('business:resourceOperation:import')")
@PreAuthorize("@ss.hasPermi('resource:operation:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
ExcelUtil<TResourceOperation> util = new ExcelUtil<TResourceOperation>(TResourceOperation.class);
@@ -93,7 +99,7 @@ public class TResourceOperationController extends BaseController
/**
* 获取地块经营详细信息
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:query')")
@PreAuthorize("@ss.hasPermi('resource:operation:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@@ -111,21 +117,56 @@ public class TResourceOperationController extends BaseController
return success(detail);
}

/**
* 获取地块经营详细信息,翻译字典,合并属性及经营数据
*/
@GetMapping(value = "/detailByDkbm/{dkbm}")
public AjaxResult detailByDkbm(@PathVariable("dkbm") String dkbm)
{
TResourceVo resource = new TResourceVo();

TResourceLand land = tResourceLandService.selectTResourceLandByDkbm(dkbm);

BeanUtils.copyProperties(land, resource);

TResourceOperation operation = tResourceOperationService.selectTResourceOperationByDkbm(dkbm);

resource.setJymj(operation.getJymj());
resource.setJyfs(operation.getJyfs());
resource.setJydxmc(operation.getJydxmc());
resource.setJykssj(operation.getJykssj());
resource.setJyjssj(operation.getJyjssj());
resource.setCbje(operation.getCbje());
resource.setBz(operation.getBz());
resource.setDkImg(operation.getDkImg());
resource.setSurveyStatus(operation.getSurveyStatus());

TranslateUtils.translate(resource, false);
return success(resource);
}


/**
* 新增地块经营
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:add')")
@PreAuthorize("@ss.hasPermi('resource:operation:add')")
@Log(title = "地块经营", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody TResourceOperation tResourceOperation)
{
SysDept dept = deptService.selectDeptById(tResourceOperation.getDeptId());
if(dept.getOrgCode().length() < 12){
return error("非村、组级行政区划,不允许添加地块!");
}

tResourceOperation.setImportCode(dept.getImportCode());
return toAjax(tResourceOperationService.insertTResourceOperation(tResourceOperation));
}

/**
* 修改地块经营
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:edit')")
@PreAuthorize("@ss.hasPermi('resource:operation:edit')")
@Log(title = "地块经营", businessType = BusinessType.UPDATE)
@PostMapping("/update")
public AjaxResult edit(@RequestBody TResourceOperation tResourceOperation)
@@ -136,7 +177,7 @@ public class TResourceOperationController extends BaseController
/**
* 删除地块经营
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:remove')")
@PreAuthorize("@ss.hasPermi('resource:operation:remove')")
@Log(title = "地块经营", businessType = BusinessType.DELETE)
@GetMapping("/delete/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
@@ -147,7 +188,7 @@ public class TResourceOperationController extends BaseController
/**
* 打印地块经营
*/
@PreAuthorize("@ss.hasPermi('business:resourceOperation:print')")
@PreAuthorize("@ss.hasPermi('resource:operation:print')")
@Log(title = "地块经营", businessType = BusinessType.PRINT)
@GetMapping("/print")
public void printPdf(TResourceOperation tResourceOperation, HttpServletResponse response) throws Exception{

+ 1
- 1
ruoyi-admin/src/main/resources/application-druid.yml View File

@@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://192.168.0.119:3318/rongxin_base?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3318/rongxin_base?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: nsbjgkwh
password: ns61GK32x%
# 从库数据源


+ 0
- 121
ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceLand.java View File

@@ -1,121 +0,0 @@
package com.ruoyi.business.domain;

import java.math.BigDecimal;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
* 地块属性对象 t_resource_land
*
* @author yfd
* @date 2025-09-05
*/
@Data
public class TResourceLand extends BaseEntity
{
private static final long serialVersionUID = 1L;

/** fid */
@Excel(name = "fid ")
private Long fid;

/** 标识码 */
@Excel(name = "标识码")
private Integer BSM;

/** 要素代码 */
@Excel(name = "要素代码")
private String YSDM;

/** 地块代码 :14位行政区划代码(村级12位+‘00’,组级14位) + 5位顺序码 */
@Excel(name = "地块代码")
private String DKBM;

/** 地块名称 */
@Excel(name = "地块名称")
private String DKMC;

/** 所有权性质 字典 ownership_type */
@Excel(name = "所有权性质",dictType = "ownership_type")
private String SYQXZ;

/** 地块类别 字典 land_type */
@Excel(name = "地块类别",dictType = "land_type")
private String DKLB;

/** 土地利用类型 字典 land_use */
@Excel(name = "土地利用类型",dictType = "land_use")
private String TDLYLX;

/** 地力等级 字典 land_grade_type */
@Excel(name = "地力等级",dictType = "land_grade_type")
private String DLDJ;

/** 土地用途 字典 land_use_type */
@Excel(name = "土地用途",dictType = "land_use_type")
private String TDYT;

/** 是否基本农田 字典 sys_yes_no */
@Excel(name = "是否基本农田",dictType = "sys_yes_no")
private String SFJBNT;

/** 地块东至 */
@Excel(name = "地块东至")
private String DKDZ;

/** 地块西至 */
@Excel(name = "地块西至")
private String DKXZ;

/** 地块南至 */
@Excel(name = "地块南至")
private String DKNZ;

/** 地块北至 */
@Excel(name = "地块北至")
private String DKBZ;

/** 备注信息 */
@Excel(name = "备注信息")
private String DKBZXX;

/** 指界人姓名 */
@Excel(name = "指界人姓名")
private String ZJRXM;

/** 空间坐标 */
@Excel(name = "空间坐标")
private String KJZB;

/** 实测面积( ㎡) */
@Excel(name = "实测面积( ㎡)")
private BigDecimal SCMJ;

/** 实测面积(亩) */
@Excel(name = "实测面积", readConverterExp = "亩=")
private BigDecimal SCMJM;

/** 地块轮廓坐标 */
@Excel(name = "地块轮廓坐标")
private String theGeom;

/** 调查状态 字典 survey_status */
@Excel(name = "调查状态",dictType = "survey_status")
private String surveyStatus;

/** 部门级联代码 */
@Excel(name = "部门级联代码")
private String importCode;

/** 区域位置名称 */
@Excel(name = "区域位置名称")
private String deptName;

/** 行政区划代码 */
private String orgCode;

}

+ 0
- 95
ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceOperation.java View File

@@ -1,95 +0,0 @@
package com.ruoyi.business.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
* 地块经营对象 t_resource_operation
*
* @author yfd
* @date 2025-09-05
*/
@Data
public class TResourceOperation extends BaseEntity
{
private static final long serialVersionUID = 1L;

/** id */
private Long id;

/** 地块代码 */
@Excel(name = "地块代码")
private String dkbm;

/** 地块名称 */
@Excel(name = "地块名称")
private String dkmc;

/** 地块东至 */
@Excel(name = "地块东至")
private String dkdz;

/** 地块西至 */
@Excel(name = "地块西至")
private String dkxz;

/** 地块南至 */
@Excel(name = "地块南至")
private String dknz;

/** 地块北至 */
@Excel(name = "地块北至")
private String dkbz;

/** 经营面积(亩) */
@Excel(name = "经营面积(亩)")
private BigDecimal jymj;

/** 经营方式 */
@Excel(name = "经营方式")
private String jyfs;

/** 经营对象名称 */
@Excel(name = "经营对象名称")
private String jydxmc;

/** 经营开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "经营开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date jykssj;

/** 经营结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "经营结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date jyjssj;

/** 承包金额(元) */
@Excel(name = "承包金额(元)")
private BigDecimal cbje;

/** 备注 */
@Excel(name = "备注")
private String bz;

/** 实物图 */
@Excel(name = "实物图")
private String dkImg;

/** 调查状态 字典 survey_status */
@Excel(name = "调查状态 字典 survey_status")
private String surveyStatus;

/** 部门级联代码 */
@Excel(name = "部门级联代码")
private String importCode;

/** 区域位置名称 */
@Excel(name = "区域位置名称")
private String deptName;
}

+ 385
- 0
ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceLand.java View File

@@ -0,0 +1,385 @@
package com.ruoyi.resource.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
* 地块属性对象 t_resource_land
*
* @author rongxin
* @date 2025-09-05
*/
public class TResourceLand extends BaseEntity
{
private static final long serialVersionUID = 1L;

/** fid */
private Long fid;

/** 部门级联代码 */
@Excel(name = "部门级联代码")
private String importCode;

/** 区域位置名称 */
@Excel(name = "区域位置名称")
private String deptName;

/** 标识码 */
@Excel(name = "标识码 */")
private Integer bsm;

/** 要素代码 */
@Excel(name = "要素代码")
private String ysdm;

/** 地块代码 */
@Excel(name = "地块代码")
private String dkbm;

/** 地块名称 */
@Excel(name = "地块名称")
private String dkmc;

/** 所有权性质 */
@Excel(name = "所有权性质", dictType = "ownership_type")
private String syqxz;

/** 地块类别 */
@Excel(name = "地块类别", dictType = "land_type")
private String dklb;

/** 土地利用类型 */
@Excel(name = "土地利用类型", dictType = "land_use")
private String tdlylx;

/** 地力等级 */
@Excel(name = "地力等级", dictType = "land_grade_type")
private String dldj;

/** 土地用途 */
@Excel(name = "土地用途", dictType = "land_use_type")
private String tdyt;

/** 是否基本农田 */
@Excel(name = "是否基本农田", dictType = "is_common")
private String sfjbnt;

/** 地块东至 */
@Excel(name = "地块东至")
private String dkdz;

/** 地块西至 */
@Excel(name = "地块西至")
private String dkxz;

/** 地块南至 */
@Excel(name = "地块南至")
private String dknz;

/** 地块北至 */
@Excel(name = "地块北至")
private String dkbz;

/** 备注信息 */
@Excel(name = "备注信息")
private String dkbzxx;

/** 指界人姓名 */
@Excel(name = "指界人姓名")
private String zjrxm;

/** 实测面积( ㎡) */
@Excel(name = "实测面积(㎡)")
private BigDecimal scmj;

/** 实测面积(亩) */
@Excel(name = "实测面积(亩)")
private BigDecimal scmjm;

/** 地块矢量 */
private String theGeom;

/** 调查状态 */
@Excel(name = "调查状态", dictType = "survey_status")
private String surveyStatus;



/** 行政区划id */
private Long deptId;

public void setFid(Long fid)
{
this.fid = fid;
}

public Long getFid()
{
return fid;
}

public void setBsm(Integer bsm)
{
this.bsm = bsm;
}

public Integer getBsm()
{
return bsm;
}

public void setYsdm(String ysdm)
{
this.ysdm = ysdm;
}

public String getYsdm()
{
return ysdm;
}

public void setDkbm(String dkbm)
{
this.dkbm = dkbm;
}

public String getDkbm()
{
return dkbm;
}

public void setDkmc(String dkmc)
{
this.dkmc = dkmc;
}

public String getDkmc()
{
return dkmc;
}

public void setSyqxz(String syqxz)
{
this.syqxz = syqxz;
}

public String getSyqxz()
{
return syqxz;
}

public void setDklb(String dklb)
{
this.dklb = dklb;
}

public String getDklb()
{
return dklb;
}

public void setTdlylx(String tdlylx)
{
this.tdlylx = tdlylx;
}

public String getTdlylx()
{
return tdlylx;
}

public void setDldj(String dldj)
{
this.dldj = dldj;
}

public String getDldj()
{
return dldj;
}

public void setTdyt(String tdyt)
{
this.tdyt = tdyt;
}

public String getTdyt()
{
return tdyt;
}

public void setSfjbnt(String sfjbnt)
{
this.sfjbnt = sfjbnt;
}

public String getSfjbnt()
{
return sfjbnt;
}

public void setDkdz(String dkdz)
{
this.dkdz = dkdz;
}

public String getDkdz()
{
return dkdz;
}

public void setDkxz(String dkxz)
{
this.dkxz = dkxz;
}

public String getDkxz()
{
return dkxz;
}

public void setDknz(String dknz)
{
this.dknz = dknz;
}

public String getDknz()
{
return dknz;
}

public void setDkbz(String dkbz)
{
this.dkbz = dkbz;
}

public String getDkbz()
{
return dkbz;
}

public void setDkbzxx(String dkbzxx)
{
this.dkbzxx = dkbzxx;
}

public String getDkbzxx()
{
return dkbzxx;
}

public void setZjrxm(String zjrxm)
{
this.zjrxm = zjrxm;
}

public String getZjrxm()
{
return zjrxm;
}

public void setScmj(BigDecimal scmj)
{
this.scmj = scmj;
}

public BigDecimal getScmj()
{
return scmj;
}

public void setScmjm(BigDecimal scmjm)
{
this.scmjm = scmjm;
}

public BigDecimal getScmjm()
{
return scmjm;
}

public void setTheGeom(String theGeom)
{
this.theGeom = theGeom;
}

public String getTheGeom()
{
return theGeom;
}

public void setSurveyStatus(String surveyStatus)
{
this.surveyStatus = surveyStatus;
}

public String getSurveyStatus()
{
return surveyStatus;
}

public void setImportCode(String importCode)
{
this.importCode = importCode;
}

public String getImportCode()
{
return importCode;
}

public void setDeptName(String deptName)
{
this.deptName = deptName;
}

public String getDeptName()
{
return deptName;
}

public Long getDeptId() {
return deptId;
}

public void setDeptId(Long deptId) {
this.deptId = deptId;
}

@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fid", getFid())
.append("bsm", getBsm())
.append("ysdm", getYsdm())
.append("dkbm", getDkbm())
.append("dkmc", getDkmc())
.append("syqxz", getSyqxz())
.append("dklb", getDklb())
.append("tdlylx", getTdlylx())
.append("dldj", getDldj())
.append("tdyt", getTdyt())
.append("sfjbnt", getSfjbnt())
.append("dkdz", getDkdz())
.append("dkxz", getDkxz())
.append("dknz", getDknz())
.append("dkbz", getDkbz())
.append("dkbzxx", getDkbzxx())
.append("zjrxm", getZjrxm())
.append("scmj", getScmj())
.append("scmjm", getScmjm())
.append("theGeom", getTheGeom())
.append("surveyStatus", getSurveyStatus())
.append("importCode", getImportCode())
.append("deptName", getDeptName())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

+ 310
- 0
ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceOperation.java View File

@@ -0,0 +1,310 @@
package com.ruoyi.resource.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
* 地块经营对象 t_resource_operation
*
* @author rongxin
* @date 2025-09-05
*/
public class TResourceOperation extends BaseEntity
{
private static final long serialVersionUID = 1L;

/** id */
private Long id;

/** 部门级联代码 */
@Excel(name = "部门级联代码")
private String importCode;

/** 区域位置名称 */
@Excel(name = "区域位置名称")
private String deptName;

/** 地块代码 */
@Excel(name = "地块代码")
private String dkbm;

/** 地块名称 */
@Excel(name = "地块名称")
private String dkmc;

/** 地块东至 */
@Excel(name = "地块东至")
private String dkdz;

/** 地块西至 */
@Excel(name = "地块西至")
private String dkxz;

/** 地块南至 */
@Excel(name = "地块南至")
private String dknz;

/** 地块北至 */
@Excel(name = "地块北至")
private String dkbz;

/** 经营面积(亩) */
@Excel(name = "经营面积(亩)")
private BigDecimal jymj;

/** 经营方式 */
@Excel(name = "经营方式")
private String jyfs;

/** 经营对象名称 */
@Excel(name = "经营对象名称")
private String jydxmc;

/** 经营开始时间 */
@Excel(name = "经营开始时间")
private String jykssj;

/** 经营结束时间 */
@Excel(name = "经营结束时间")
private String jyjssj;

/** 承包金额(元) */
@Excel(name = "承包金额(元)")
private BigDecimal cbje;

/** 备注 */
@Excel(name = "备注")
private String bz;

/** 实物图 */
private String dkImg;

/** 调查状态 */
@Excel(name = "调查状态", dictType = "survey_status")
private String surveyStatus;



/** 行政区划id */
private Long deptId;

public void setId(Long id)
{
this.id = id;
}

public Long getId()
{
return id;
}

public void setDkbm(String dkbm)
{
this.dkbm = dkbm;
}

public String getDkbm()
{
return dkbm;
}

public void setDkmc(String dkmc)
{
this.dkmc = dkmc;
}

public String getDkmc()
{
return dkmc;
}

public void setDkdz(String dkdz)
{
this.dkdz = dkdz;
}

public String getDkdz()
{
return dkdz;
}

public void setDkxz(String dkxz)
{
this.dkxz = dkxz;
}

public String getDkxz()
{
return dkxz;
}

public void setDknz(String dknz)
{
this.dknz = dknz;
}

public String getDknz()
{
return dknz;
}

public void setDkbz(String dkbz)
{
this.dkbz = dkbz;
}

public String getDkbz()
{
return dkbz;
}

public void setJymj(BigDecimal jymj)
{
this.jymj = jymj;
}

public BigDecimal getJymj()
{
return jymj;
}

public void setJyfs(String jyfs)
{
this.jyfs = jyfs;
}

public String getJyfs()
{
return jyfs;
}

public void setJydxmc(String jydxmc)
{
this.jydxmc = jydxmc;
}

public String getJydxmc()
{
return jydxmc;
}

public void setJykssj(String jykssj)
{
this.jykssj = jykssj;
}

public String getJykssj()
{
return jykssj;
}

public void setJyjssj(String jyjssj)
{
this.jyjssj = jyjssj;
}

public String getJyjssj()
{
return jyjssj;
}

public void setCbje(BigDecimal cbje)
{
this.cbje = cbje;
}

public BigDecimal getCbje()
{
return cbje;
}

public void setBz(String bz)
{
this.bz = bz;
}

public String getBz()
{
return bz;
}

public void setDkImg(String dkImg)
{
this.dkImg = dkImg;
}

public String getDkImg()
{
return dkImg;
}

public void setSurveyStatus(String surveyStatus)
{
this.surveyStatus = surveyStatus;
}

public String getSurveyStatus()
{
return surveyStatus;
}

public void setImportCode(String importCode)
{
this.importCode = importCode;
}

public String getImportCode()
{
return importCode;
}

public void setDeptName(String deptName)
{
this.deptName = deptName;
}

public String getDeptName()
{
return deptName;
}

public Long getDeptId() {
return deptId;
}

public void setDeptId(Long deptId) {
this.deptId = deptId;
}

@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("dkbm", getDkbm())
.append("dkmc", getDkmc())
.append("dkdz", getDkdz())
.append("dkxz", getDkxz())
.append("dknz", getDknz())
.append("dkbz", getDkbz())
.append("jymj", getJymj())
.append("jyfs", getJyfs())
.append("jydxmc", getJydxmc())
.append("jykssj", getJykssj())
.append("jyjssj", getJyjssj())
.append("cbje", getCbje())
.append("bz", getBz())
.append("dkImg", getDkImg())
.append("surveyStatus", getSurveyStatus())
.append("importCode", getImportCode())
.append("deptName", getDeptName())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

+ 138
- 0
ruoyi-business/src/main/java/com/ruoyi/resource/domain/TResourceVo.java View File

@@ -0,0 +1,138 @@
package com.ruoyi.resource.domain;

import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;

/**
* 地块属性对象 t_resource_land
*
* @author rongxin
* @date 2025-09-05
*/
@Data
public class TResourceVo {
private static final long serialVersionUID = 1L;



/** 区域位置名称 */
@Excel(name = "区域位置名称")
private String deptName;

/** 标识码 */
@Excel(name = "标识码 */")
private Integer bsm;

/** 要素代码 */
@Excel(name = "要素代码")
private String ysdm;

/** 地块代码 */
@Excel(name = "地块代码")
private String dkbm;

/** 地块名称 */
@Excel(name = "地块名称")
private String dkmc;

/** 所有权性质 */
@Excel(name = "所有权性质", dictType = "ownership_type")
private String syqxz;

/** 地块类别 */
@Excel(name = "地块类别", dictType = "land_type")
private String dklb;

/** 土地利用类型 */
@Excel(name = "土地利用类型", dictType = "land_use")
private String tdlylx;

/** 地力等级 */
@Excel(name = "地力等级", dictType = "land_grade_type")
private String dldj;

/** 土地用途 */
@Excel(name = "土地用途", dictType = "land_use_type")
private String tdyt;

/** 是否基本农田 */
@Excel(name = "是否基本农田", dictType = "is_common")
private String sfjbnt;

/** 地块东至 */
@Excel(name = "地块东至")
private String dkdz;

/** 地块西至 */
@Excel(name = "地块西至")
private String dkxz;

/** 地块南至 */
@Excel(name = "地块南至")
private String dknz;

/** 地块北至 */
@Excel(name = "地块北至")
private String dkbz;

/** 备注信息 */
@Excel(name = "备注信息")
private String dkbzxx;

/** 指界人姓名 */
@Excel(name = "指界人姓名")
private String zjrxm;

/** 实测面积( ㎡) */
@Excel(name = "实测面积( ㎡)")
private BigDecimal scmj;

/** 实测面积(亩) */
@Excel(name = "实测面积(亩)")
private BigDecimal scmjm;


// ------------------------------


/** 经营面积(亩) */
@Excel(name = "经营面积(亩)")
private BigDecimal jymj;

/** 经营方式 */
@Excel(name = "经营方式")
private String jyfs;

/** 经营对象名称 */
@Excel(name = "经营对象名称")
private String jydxmc;

/** 经营开始时间 */
@Excel(name = "经营开始时间")
private String jykssj;

/** 经营结束时间 */
@Excel(name = "经营结束时间")
private String jyjssj;

/** 承包金额(元) */
@Excel(name = "承包金额(元)")
private BigDecimal cbje;

/** 备注 */
@Excel(name = "备注")
private String bz;

/** 实物图 */
private String dkImg;

/** 调查状态 */
@Excel(name = "调查状态", dictType = "survey_status")
private String surveyStatus;




}

ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceLandMapper.java → ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceLandMapper.java View File

@@ -1,12 +1,13 @@
package com.ruoyi.business.mapper;
package com.ruoyi.resource.mapper;

import com.ruoyi.resource.domain.TResourceLand;

import java.util.List;
import com.ruoyi.business.domain.TResourceLand;

/**
* 地块属性Mapper接口
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
public interface TResourceLandMapper
@@ -14,10 +15,14 @@ public interface TResourceLandMapper
/**
* 查询地块属性
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 地块属性
*/
public TResourceLand selectTResourceLandByDKBM(String DKBM);
public TResourceLand selectTResourceLandByFid(Long fid);

public TResourceLand selectTResourceLandByDkbm(String dkbm);

public String selectTResourceLandAutoGenCode(String orgCode);

/**
* 查询地块属性列表
@@ -62,24 +67,16 @@ public interface TResourceLandMapper
/**
* 删除地块属性
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 结果
*/
public int deleteTResourceLandByDKBM(String DKBM);
public int deleteTResourceLandByFid(Long fid);

/**
* 批量删除地块属性
*
* @param DKBMs 需要删除的数据主键集合
* @return 结果
*/
public int deleteTResourceLandByDKBMs(String[] DKBMs);

/**
* 删除地块属性
*
* @param DKBM 地块属性主键
* @param fids 需要删除的数据主键集合
* @return 结果
*/
public String selectTResourceLandMaxDKBM(String orgCode);
public int deleteTResourceLandByFids(Long[] fids);
}

ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceOperationMapper.java → ruoyi-business/src/main/java/com/ruoyi/resource/mapper/TResourceOperationMapper.java View File

@@ -1,12 +1,13 @@
package com.ruoyi.business.mapper;
package com.ruoyi.resource.mapper;

import com.ruoyi.resource.domain.TResourceOperation;

import java.util.List;
import com.ruoyi.business.domain.TResourceOperation;

/**
* 地块经营Mapper接口
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
public interface TResourceOperationMapper
@@ -19,6 +20,8 @@ public interface TResourceOperationMapper
*/
public TResourceOperation selectTResourceOperationById(Long id);

public TResourceOperation selectTResourceOperationByDkbm(String dkbm);

/**
* 查询地块经营列表
*

ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceLandService.java → ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceLandService.java View File

@@ -1,12 +1,13 @@
package com.ruoyi.business.service;
package com.ruoyi.resource.service;

import com.ruoyi.resource.domain.TResourceLand;

import java.util.List;
import com.ruoyi.business.domain.TResourceLand;

/**
* 地块属性Service接口
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
public interface ITResourceLandService
@@ -14,10 +15,14 @@ public interface ITResourceLandService
/**
* 查询地块属性
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 地块属性
*/
public TResourceLand selectTResourceLandByDKBM(String DKBM);
public TResourceLand selectTResourceLandByFid(Long fid);

public TResourceLand selectTResourceLandByDkbm(String dkbm);

public String selectTResourceLandAutoGenCode(String orgCode);

/**
* 查询地块属性列表
@@ -72,16 +77,16 @@ public interface ITResourceLandService
/**
* 批量删除地块属性
*
* @param DKBMs 需要删除的地块属性主键集合
* @param fids 需要删除的地块属性主键集合
* @return 结果
*/
public int deleteTResourceLandByDKBMs(String[] DKBMs);
public int deleteTResourceLandByFids(Long[] fids);

/**
* 删除地块属性信息
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 结果
*/
public int deleteTResourceLandByDKBM(String DKBM);
public int deleteTResourceLandByFid(Long fid);
}

ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceOperationService.java → ruoyi-business/src/main/java/com/ruoyi/resource/service/ITResourceOperationService.java View File

@@ -1,12 +1,13 @@
package com.ruoyi.business.service;
package com.ruoyi.resource.service;

import com.ruoyi.resource.domain.TResourceOperation;

import java.util.List;
import com.ruoyi.business.domain.TResourceOperation;

/**
* 地块经营Service接口
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
public interface ITResourceOperationService
@@ -19,6 +20,8 @@ public interface ITResourceOperationService
*/
public TResourceOperation selectTResourceOperationById(Long id);

public TResourceOperation selectTResourceOperationByDkbm(String dkbm);

/**
* 查询地块经营列表
*

ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceLandServiceImpl.java → ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceLandServiceImpl.java View File

@@ -1,25 +1,26 @@
package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
package com.ruoyi.resource.service.impl;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.resource.domain.TResourceLand;
import com.ruoyi.resource.mapper.TResourceLandMapper;
import com.ruoyi.resource.service.ITResourceLandService;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TResourceLandMapper;
import com.ruoyi.business.domain.TResourceLand;
import com.ruoyi.business.service.ITResourceLandService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* 地块属性Service业务层处理
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
@Service
@@ -31,13 +32,30 @@ public class TResourceLandServiceImpl implements ITResourceLandService
/**
* 查询地块属性
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 地块属性
*/
@Override
public TResourceLand selectTResourceLandByDKBM(String DKBM)
public TResourceLand selectTResourceLandByFid(Long fid)
{
return tResourceLandMapper.selectTResourceLandByDKBM(DKBM);
return tResourceLandMapper.selectTResourceLandByFid(fid);
}

@Override
public TResourceLand selectTResourceLandByDkbm(String dkbm)
{
return tResourceLandMapper.selectTResourceLandByDkbm(dkbm);
}

@Override
public String selectTResourceLandAutoGenCode(String orgCode) {
final int MAX_CODE_LENGTH = 19;
String code = tResourceLandMapper.selectTResourceLandAutoGenCode(orgCode);
// 第一个时,取第一个编号
if (StringUtils.isEmpty(code)){
code = orgCode + StrUtil.padPre("1", MAX_CODE_LENGTH - orgCode.length(), "0");
}
return code;
}

/**
@@ -75,7 +93,7 @@ public class TResourceLandServiceImpl implements ITResourceLandService
List<TResourceLand> updateList = Lists.newArrayList();

// 检验excel表中 【xxx】 是否存在重复,有重复的终止导入
List<String> repeatList = list.stream().collect(Collectors.groupingBy(TResourceLand::getDKBM, Collectors.counting()))
List<String> repeatList = list.stream().collect(Collectors.groupingBy(TResourceLand::getDkbm, Collectors.counting()))
.entrySet().stream().filter(e -> e.getValue() > 1).map(Map.Entry::getKey).collect(Collectors.toList());
if (StringUtils.isNotEmpty(repeatList)) {
failureMsg.insert(0, "很抱歉,存在重复项,导入失败!共 " + repeatList.size() + " 个重复错错误如下:");
@@ -92,13 +110,10 @@ public class TResourceLandServiceImpl implements ITResourceLandService
List<TResourceLand> tResourceLandList = tResourceLandMapper.selectTResourceLandList(tResourceLand);

for (TResourceLand item : list) {
// 一定层次上校验并跳过空白行,最好是不空的唯一字段
if(StringUtils.isEmpty(item.getDKBM())){
continue;
}

// 验证是否存在这个地块属性信息
String id = item.getDKBM();
List<TResourceLand> filters = tResourceLandList.stream().filter(a -> a.getDKBM().equals(id)).collect(Collectors.toList());
String dkbm = item.getDkbm();
List<TResourceLand> filters = tResourceLandList.stream().filter(a -> a.getDkbm().equals(dkbm)).collect(Collectors.toList());
if (StringUtils.isEmpty(filters)) { //不存在时,直接插入
item.setCreateBy(operName);
item.setCreateTime(DateUtils.getNowDate());
@@ -108,7 +123,7 @@ public class TResourceLandServiceImpl implements ITResourceLandService
if(isUpdateSupport){ //勾选则更新
item.setUpdateBy(operName);
item.setUpdateTime(DateUtils.getNowDate());
item.setDKBM(filters.get(0).getDKBM());
item.setFid(filters.get(0).getFid());
updateList.add(item);
successNum++;
}
@@ -129,26 +144,6 @@ public class TResourceLandServiceImpl implements ITResourceLandService
return successMsg.toString();
}

/**
* 计算地块属性地块代码
*
* @param tResourceLand 地块属性
* @return 结果
*/
public String calculatorDKBM(String orgCode)
{
String DKBM = orgCode;
if(StringUtils.isNotEmpty(DKBM) && DKBM.length() == 12){
DKBM = DKBM + "00";
}
String DKBMMax = tResourceLandMapper.selectTResourceLandMaxDKBM(DKBM);
if(StringUtils.isNotEmpty(DKBMMax)){
DKBM = DKBM + (Integer.parseInt(DKBMMax.substring(DKBMMax.length() - 5)) + 1);
}else {
DKBM = DKBM + "00001";
}
return DKBM;
}

/**
* 新增地块属性
@@ -159,7 +154,6 @@ public class TResourceLandServiceImpl implements ITResourceLandService
@Override
public int insertTResourceLand(TResourceLand tResourceLand)
{
tResourceLand.setDKBM(calculatorDKBM(tResourceLand.getOrgCode()));
tResourceLand.setCreateTime(DateUtils.getNowDate());
return tResourceLandMapper.insertTResourceLand(tResourceLand);
}
@@ -212,24 +206,24 @@ public class TResourceLandServiceImpl implements ITResourceLandService
/**
* 批量删除地块属性
*
* @param DKBMs 需要删除的地块属性主键
* @param fids 需要删除的地块属性主键
* @return 结果
*/
@Override
public int deleteTResourceLandByDKBMs(String[] DKBMs)
public int deleteTResourceLandByFids(Long[] fids)
{
return tResourceLandMapper.deleteTResourceLandByDKBMs(DKBMs);
return tResourceLandMapper.deleteTResourceLandByFids(fids);
}

/**
* 删除地块属性信息
*
* @param DKBM 地块属性主键
* @param fid 地块属性主键
* @return 结果
*/
@Override
public int deleteTResourceLandByDKBM(String DKBM)
public int deleteTResourceLandByFid(Long fid)
{
return tResourceLandMapper.deleteTResourceLandByDKBM(DKBM);
return tResourceLandMapper.deleteTResourceLandByFid(fid);
}
}

ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceOperationServiceImpl.java → ruoyi-business/src/main/java/com/ruoyi/resource/service/impl/TResourceOperationServiceImpl.java View File

@@ -1,25 +1,25 @@
package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
package com.ruoyi.resource.service.impl;

import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.resource.domain.TResourceOperation;
import com.ruoyi.resource.mapper.TResourceOperationMapper;
import com.ruoyi.resource.service.ITResourceOperationService;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TResourceOperationMapper;
import com.ruoyi.business.domain.TResourceOperation;
import com.ruoyi.business.service.ITResourceOperationService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* 地块经营Service业务层处理
*
* @author yfd
* @author rongxin
* @date 2025-09-05
*/
@Service
@@ -40,6 +40,11 @@ public class TResourceOperationServiceImpl implements ITResourceOperationService
return tResourceOperationMapper.selectTResourceOperationById(id);
}

@Override
public TResourceOperation selectTResourceOperationByDkbm(String dkbm) {
return tResourceOperationMapper.selectTResourceOperationByDkbm(dkbm);
}

/**
* 查询地块经营列表
*
@@ -92,13 +97,10 @@ public class TResourceOperationServiceImpl implements ITResourceOperationService
List<TResourceOperation> tResourceOperationList = tResourceOperationMapper.selectTResourceOperationList(tResourceOperation);

for (TResourceOperation item : list) {
// 一定层次上校验并跳过空白行,最好是不空的唯一字段
if(StringUtils.isEmpty(item.getDkbm())){
continue;
}

// 验证是否存在这个地块经营信息
Long id = item.getId();
List<TResourceOperation> filters = tResourceOperationList.stream().filter(a -> a.getId().equals(id)).collect(Collectors.toList());
String dkbm = item.getDkbm();
List<TResourceOperation> filters = tResourceOperationList.stream().filter(a -> a.getDkbm().equals(dkbm)).collect(Collectors.toList());
if (StringUtils.isEmpty(filters)) { //不存在时,直接插入
item.setCreateBy(operName);
item.setCreateTime(DateUtils.getNowDate());

+ 0
- 293
ruoyi-business/src/main/resources/mapper/business/TResourceLandMapper.xml View File

@@ -1,293 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.TResourceLandMapper">

<resultMap type="TResourceLand" id="TResourceLandResult">
<result property="fid" column="fid" />
<result property="BSM" column="BSM" />
<result property="YSDM" column="YSDM" />
<result property="DKBM" column="DKBM" />
<result property="DKMC" column="DKMC" />
<result property="SYQXZ" column="SYQXZ" />
<result property="DKLB" column="DKLB" />
<result property="TDLYLX" column="TDLYLX" />
<result property="DLDJ" column="DLDJ" />
<result property="TDYT" column="TDYT" />
<result property="SFJBNT" column="SFJBNT" />
<result property="DKDZ" column="DKDZ" />
<result property="DKXZ" column="DKXZ" />
<result property="DKNZ" column="DKNZ" />
<result property="DKBZ" column="DKBZ" />
<result property="DKBZXX" column="DKBZXX" />
<result property="ZJRXM" column="ZJRXM" />
<result property="KJZB" column="KJZB" />
<result property="SCMJ" column="SCMJ" />
<result property="SCMJM" column="SCMJM" />
<result property="theGeom" column="the_geom" />
<result property="surveyStatus" column="survey_status" />
<result property="importCode" column="import_code" />
<result property="deptName" column="dept_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>

<sql id="selectTResourceLandVo">
select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, KJZB, SCMJ, SCMJM, the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land
</sql>

<select id="selectTResourceLandList" parameterType="TResourceLand" resultMap="TResourceLandResult">
<include refid="selectTResourceLandVo"/>
<where>
<if test="fid != null "> and fid = #{fid}</if>
<if test="BSM != null "> and BSM = #{BSM}</if>
<if test="YSDM != null and YSDM != ''"> and YSDM = #{YSDM}</if>
<if test="DKBM != null and DKBM != ''"> and DKBM = #{DKBM}</if>
<if test="DKMC != null and DKMC != ''"> and DKMC = #{DKMC}</if>
<if test="SYQXZ != null and SYQXZ != ''"> and SYQXZ = #{SYQXZ}</if>
<if test="DKLB != null and DKLB != ''"> and DKLB = #{DKLB}</if>
<if test="TDLYLX != null and TDLYLX != ''"> and TDLYLX = #{TDLYLX}</if>
<if test="DLDJ != null and DLDJ != ''"> and DLDJ = #{DLDJ}</if>
<if test="TDYT != null and TDYT != ''"> and TDYT = #{TDYT}</if>
<if test="SFJBNT != null and SFJBNT != ''"> and SFJBNT = #{SFJBNT}</if>
<if test="DKDZ != null and DKDZ != ''"> and DKDZ = #{DKDZ}</if>
<if test="DKXZ != null and DKXZ != ''"> and DKXZ = #{DKXZ}</if>
<if test="DKNZ != null and DKNZ != ''"> and DKNZ = #{DKNZ}</if>
<if test="DKBZ != null and DKBZ != ''"> and DKBZ = #{DKBZ}</if>
<if test="DKBZXX != null and DKBZXX != ''"> and DKBZXX = #{DKBZXX}</if>
<if test="ZJRXM != null and ZJRXM != ''"> and ZJRXM = #{ZJRXM}</if>
<if test="KJZB != null and KJZB != ''"> and KJZB = #{KJZB}</if>
<if test="SCMJ != null "> and SCMJ = #{SCMJ}</if>
<if test="SCMJM != null "> and SCMJM = #{SCMJM}</if>
<if test="theGeom != null and theGeom != ''"> and the_geom = #{theGeom}</if>
<if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
<if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
</where>
</select>

<select id="selectTResourceLandByDKBM" parameterType="String" resultMap="TResourceLandResult">
<include refid="selectTResourceLandVo"/>
where DKBM = #{DKBM}
</select>

<insert id="insertTResourceLand" parameterType="TResourceLand">
insert into t_resource_land
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fid != null">fid,</if>
<if test="BSM != null">BSM,</if>
<if test="YSDM != null">YSDM,</if>
<if test="DKBM != null">DKBM,</if>
<if test="DKMC != null and DKMC != ''">DKMC,</if>
<if test="SYQXZ != null">SYQXZ,</if>
<if test="DKLB != null">DKLB,</if>
<if test="TDLYLX != null">TDLYLX,</if>
<if test="DLDJ != null">DLDJ,</if>
<if test="TDYT != null">TDYT,</if>
<if test="SFJBNT != null">SFJBNT,</if>
<if test="DKDZ != null">DKDZ,</if>
<if test="DKXZ != null">DKXZ,</if>
<if test="DKNZ != null">DKNZ,</if>
<if test="DKBZ != null">DKBZ,</if>
<if test="DKBZXX != null">DKBZXX,</if>
<if test="ZJRXM != null">ZJRXM,</if>
<if test="KJZB != null">KJZB,</if>
<if test="SCMJ != null">SCMJ,</if>
<if test="SCMJM != null">SCMJM,</if>
<if test="theGeom != null">the_geom,</if>
<if test="surveyStatus != null and surveyStatus != ''">survey_status,</if>
<if test="importCode != null and importCode != ''">import_code,</if>
<if test="deptName != null">dept_name,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fid != null">#{fid},</if>
<if test="BSM != null">#{BSM},</if>
<if test="YSDM != null">#{YSDM},</if>
<if test="DKBM != null">#{DKBM},</if>
<if test="DKMC != null and DKMC != ''">#{DKMC},</if>
<if test="SYQXZ != null">#{SYQXZ},</if>
<if test="DKLB != null">#{DKLB},</if>
<if test="TDLYLX != null">#{TDLYLX},</if>
<if test="DLDJ != null">#{DLDJ},</if>
<if test="TDYT != null">#{TDYT},</if>
<if test="SFJBNT != null">#{SFJBNT},</if>
<if test="DKDZ != null">#{DKDZ},</if>
<if test="DKXZ != null">#{DKXZ},</if>
<if test="DKNZ != null">#{DKNZ},</if>
<if test="DKBZ != null">#{DKBZ},</if>
<if test="DKBZXX != null">#{DKBZXX},</if>
<if test="ZJRXM != null">#{ZJRXM},</if>
<if test="KJZB != null">#{KJZB},</if>
<if test="SCMJ != null">#{SCMJ},</if>
<if test="SCMJM != null">#{SCMJM},</if>
<if test="theGeom != null">#{theGeom},</if>
<if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if>
<if test="importCode != null and importCode != ''">#{importCode},</if>
<if test="deptName != null">#{deptName},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>

<insert id="insertTResourceLandBatch" parameterType="list" >
insert into t_resource_land
<trim prefix="(" suffix=")" suffixOverrides=",">
fid,
BSM,
YSDM,
DKBM,
DKMC,
SYQXZ,
DKLB,
TDLYLX,
DLDJ,
TDYT,
SFJBNT,
DKDZ,
DKXZ,
DKNZ,
DKBZ,
DKBZXX,
ZJRXM,
KJZB,
SCMJ,
SCMJM,
the_geom,
survey_status,
import_code,
dept_name,
create_by,
create_time,
update_by,
update_time,
</trim>
values
<foreach item="item" collection="list" separator="," >
<trim prefix="(" suffix=")" suffixOverrides=",">
#{item.fid},
#{item.BSM},
#{item.YSDM},
#{item.DKBM},
#{item.DKMC},
#{item.SYQXZ},
#{item.DKLB},
#{item.TDLYLX},
#{item.DLDJ},
#{item.TDYT},
#{item.SFJBNT},
#{item.DKDZ},
#{item.DKXZ},
#{item.DKNZ},
#{item.DKBZ},
#{item.DKBZXX},
#{item.ZJRXM},
#{item.KJZB},
#{item.SCMJ},
#{item.SCMJM},
#{item.theGeom},
#{item.surveyStatus},
#{item.importCode},
#{item.deptName},
#{item.createBy},
#{item.createTime},
#{item.updateBy},
#{item.updateTime},
</trim>
</foreach>
</insert>

<update id="updateTResourceLand" parameterType="TResourceLand">
update t_resource_land
<trim prefix="SET" suffixOverrides=",">
<if test="fid != null">fid = #{fid},</if>
<if test="BSM != null">BSM = #{BSM},</if>
<if test="YSDM != null">YSDM = #{YSDM},</if>
<if test="DKMC != null and DKMC != ''">DKMC = #{DKMC},</if>
<if test="SYQXZ != null">SYQXZ = #{SYQXZ},</if>
<if test="DKLB != null">DKLB = #{DKLB},</if>
<if test="TDLYLX != null">TDLYLX = #{TDLYLX},</if>
<if test="DLDJ != null">DLDJ = #{DLDJ},</if>
<if test="TDYT != null">TDYT = #{TDYT},</if>
<if test="SFJBNT != null">SFJBNT = #{SFJBNT},</if>
<if test="DKDZ != null">DKDZ = #{DKDZ},</if>
<if test="DKXZ != null">DKXZ = #{DKXZ},</if>
<if test="DKNZ != null">DKNZ = #{DKNZ},</if>
<if test="DKBZ != null">DKBZ = #{DKBZ},</if>
<if test="DKBZXX != null">DKBZXX = #{DKBZXX},</if>
<if test="ZJRXM != null">ZJRXM = #{ZJRXM},</if>
<if test="KJZB != null">KJZB = #{KJZB},</if>
<if test="SCMJ != null">SCMJ = #{SCMJ},</if>
<if test="SCMJM != null">SCMJM = #{SCMJM},</if>
<if test="theGeom != null">the_geom = #{theGeom},</if>
<if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if>
<if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where DKBM = #{DKBM}
</update>

<!--批量更新-->
<update id="updateTResourceLandBatch" parameterType="list" >
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update t_resource_land
<set>
<if test="item.fid != null">fid = #{item.fid},</if>
<if test="item.BSM != null">BSM = #{item.BSM},</if>
<if test="item.YSDM != null">YSDM = #{item.YSDM},</if>
<if test="item.DKMC != null and item.DKMC != ''">DKMC = #{item.DKMC},</if>
<if test="item.SYQXZ != null">SYQXZ = #{item.SYQXZ},</if>
<if test="item.DKLB != null">DKLB = #{item.DKLB},</if>
<if test="item.TDLYLX != null">TDLYLX = #{item.TDLYLX},</if>
<if test="item.DLDJ != null">DLDJ = #{item.DLDJ},</if>
<if test="item.TDYT != null">TDYT = #{item.TDYT},</if>
<if test="item.SFJBNT != null">SFJBNT = #{item.SFJBNT},</if>
<if test="item.DKDZ != null">DKDZ = #{item.DKDZ},</if>
<if test="item.DKXZ != null">DKXZ = #{item.DKXZ},</if>
<if test="item.DKNZ != null">DKNZ = #{item.DKNZ},</if>
<if test="item.DKBZ != null">DKBZ = #{item.DKBZ},</if>
<if test="item.DKBZXX != null">DKBZXX = #{item.DKBZXX},</if>
<if test="item.ZJRXM != null">ZJRXM = #{item.ZJRXM},</if>
<if test="item.KJZB != null">KJZB = #{item.KJZB},</if>
<if test="item.SCMJ != null">SCMJ = #{item.SCMJ},</if>
<if test="item.SCMJM != null">SCMJM = #{item.SCMJM},</if>
<if test="item.theGeom != null">the_geom = #{item.theGeom},</if>
<if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if>
<if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
<if test="item.deptName != null">dept_name = #{item.deptName},</if>
<if test="item.createBy != null">create_by = #{item.createBy},</if>
<if test="item.createTime != null">create_time = #{item.createTime},</if>
<if test="item.updateBy != null">update_by = #{item.updateBy},</if>
<if test="item.updateTime != null">update_time = #{item.updateTime},</if>
</set>
where DKBM = #{item.DKBM}
</foreach>
</update>

<delete id="deleteTResourceLandByDKBM" parameterType="String">
delete from t_resource_land where DKBM = #{DKBM}
</delete>

<delete id="deleteTResourceLandByDKBMs" parameterType="String">
delete from t_resource_land where DKBM in
<foreach item="DKBM" collection="array" open="(" separator="," close=")">
#{DKBM}
</foreach>
</delete>

<select id="selectTResourceLandMaxDKBM" parameterType="String">
select max(DKBM) from t_resource_land where DKBM like concat(#{orgCode}, '%')
</select>
</mapper>

+ 274
- 0
ruoyi-business/src/main/resources/mapper/resource/TResourceLandMapper.xml View File

@@ -0,0 +1,274 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.resource.mapper.TResourceLandMapper">

<resultMap type="TResourceLand" id="TResourceLandResult">
<result property="fid" column="fid" />
<result property="bsm" column="BSM" />
<result property="ysdm" column="YSDM" />
<result property="dkbm" column="DKBM" />
<result property="dkmc" column="DKMC" />
<result property="syqxz" column="SYQXZ" />
<result property="dklb" column="DKLB" />
<result property="tdlylx" column="TDLYLX" />
<result property="dldj" column="DLDJ" />
<result property="tdyt" column="TDYT" />
<result property="sfjbnt" column="SFJBNT" />
<result property="dkdz" column="DKDZ" />
<result property="dkxz" column="DKXZ" />
<result property="dknz" column="DKNZ" />
<result property="dkbz" column="DKBZ" />
<result property="dkbzxx" column="DKBZXX" />
<result property="zjrxm" column="ZJRXM" />
<result property="scmj" column="SCMJ" />
<result property="scmjm" column="SCMJM" />
<result property="theGeom" column="the_geom" />
<result property="surveyStatus" column="survey_status" />
<result property="importCode" column="import_code" />
<result property="deptName" column="dept_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>

<sql id="selectTResourceLandVo">
select fid, BSM, YSDM, DKBM, DKMC, SYQXZ, DKLB, TDLYLX, DLDJ, TDYT, SFJBNT, DKDZ, DKXZ, DKNZ, DKBZ, DKBZXX, ZJRXM, SCMJ, SCMJM, the_geom, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_land
</sql>

<select id="selectTResourceLandList" parameterType="TResourceLand" resultMap="TResourceLandResult">
<include refid="selectTResourceLandVo"/>
<where>
<if test="bsm != null "> and BSM = #{bsm}</if>
<if test="dkbm != null and dkbm != ''"> and DKBM = #{dkbm}</if>
<if test="dkmc != null and dkmc != ''"> and DKMC like concat('%', #{dkmc}, '%')</if>
<if test="syqxz != null and syqxz != ''"> and SYQXZ = #{syqxz}</if>
<if test="dklb != null and dklb != ''"> and DKLB = #{dklb}</if>
<if test="tdlylx != null and tdlylx != ''"> and TDLYLX = #{tdlylx}</if>
<if test="dldj != null and dldj != ''"> and DLDJ = #{dldj}</if>
<if test="tdyt != null and tdyt != ''"> and TDYT = #{tdyt}</if>
<if test="sfjbnt != null and sfjbnt != ''"> and SFJBNT = #{sfjbnt}</if>
<if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
<if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if>
</where>
</select>

<select id="selectTResourceLandByFid" parameterType="Long" resultMap="TResourceLandResult">
<include refid="selectTResourceLandVo"/>
where fid = #{fid}
</select>

<select id="selectTResourceLandByDkbm" parameterType="String" resultMap="TResourceLandResult">
<include refid="selectTResourceLandVo"/>
where DKBM = #{dkbm}
</select>

<select id="selectTResourceLandAutoGenCode" parameterType="String" resultType="String">
SELECT CONVERT(CONVERT(MAX(DKBM), DECIMAL(19, 0)) + 1, CHAR) FROM t_resource_land WHERE DKBM LIKE CONCAT(#{orgCode}, '%')
</select>

<insert id="insertTResourceLand" parameterType="TResourceLand" useGeneratedKeys="true" keyProperty="fid">
insert into t_resource_land
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bsm != null">BSM,</if>
<if test="ysdm != null">YSDM,</if>
<if test="dkbm != null and dkbm != ''">DKBM,</if>
<if test="dkmc != null and dkmc != ''">DKMC,</if>
<if test="syqxz != null">SYQXZ,</if>
<if test="dklb != null">DKLB,</if>
<if test="tdlylx != null">TDLYLX,</if>
<if test="dldj != null">DLDJ,</if>
<if test="tdyt != null">TDYT,</if>
<if test="sfjbnt != null">SFJBNT,</if>
<if test="dkdz != null">DKDZ,</if>
<if test="dkxz != null">DKXZ,</if>
<if test="dknz != null">DKNZ,</if>
<if test="dkbz != null">DKBZ,</if>
<if test="dkbzxx != null">DKBZXX,</if>
<if test="zjrxm != null">ZJRXM,</if>
<if test="scmj != null">SCMJ,</if>
<if test="scmjm != null">SCMJM,</if>
<if test="theGeom != null">the_geom,</if>
<if test="surveyStatus != null and surveyStatus != ''">survey_status,</if>
<if test="importCode != null and importCode != ''">import_code,</if>
<if test="deptName != null">dept_name,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bsm != null">#{bsm},</if>
<if test="ysdm != null">#{ysdm},</if>
<if test="dkbm != null and dkbm != ''">#{dkbm},</if>
<if test="dkmc != null and dkmc != ''">#{dkmc},</if>
<if test="syqxz != null">#{syqxz},</if>
<if test="dklb != null">#{dklb},</if>
<if test="tdlylx != null">#{tdlylx},</if>
<if test="dldj != null">#{dldj},</if>
<if test="tdyt != null">#{tdyt},</if>
<if test="sfjbnt != null">#{sfjbnt},</if>
<if test="dkdz != null">#{dkdz},</if>
<if test="dkxz != null">#{dkxz},</if>
<if test="dknz != null">#{dknz},</if>
<if test="dkbz != null">#{dkbz},</if>
<if test="dkbzxx != null">#{dkbzxx},</if>
<if test="zjrxm != null">#{zjrxm},</if>
<if test="scmj != null">#{scmj},</if>
<if test="scmjm != null">#{scmjm},</if>
<if test="theGeom != null">#{theGeom},</if>
<if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if>
<if test="importCode != null and importCode != ''">#{importCode},</if>
<if test="deptName != null">#{deptName},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>

<insert id="insertTResourceLandBatch" parameterType="list" useGeneratedKeys="true" keyProperty="fid">
insert into t_resource_land
<trim prefix="(" suffix=")" suffixOverrides=",">
BSM,
YSDM,
DKBM,
DKMC,
SYQXZ,
DKLB,
TDLYLX,
DLDJ,
TDYT,
SFJBNT,
DKDZ,
DKXZ,
DKNZ,
DKBZ,
DKBZXX,
ZJRXM,
SCMJ,
SCMJM,
the_geom,
survey_status,
import_code,
dept_name,
create_by,
create_time,
update_by,
update_time,
</trim>
values
<foreach item="item" collection="list" separator="," >
<trim prefix="(" suffix=")" suffixOverrides=",">
#{item.bsm},
#{item.ysdm},
#{item.dkbm},
#{item.dkmc},
#{item.syqxz},
#{item.dklb},
#{item.tdlylx},
#{item.dldj},
#{item.tdyt},
#{item.sfjbnt},
#{item.dkdz},
#{item.dkxz},
#{item.dknz},
#{item.dkbz},
#{item.dkbzxx},
#{item.zjrxm},
#{item.scmj},
#{item.scmjm},
#{item.theGeom},
#{item.surveyStatus},
#{item.importCode},
#{item.deptName},
#{item.createBy},
#{item.createTime},
#{item.updateBy},
#{item.updateTime},
</trim>
</foreach>
</insert>

<update id="updateTResourceLand" parameterType="TResourceLand">
update t_resource_land
<trim prefix="SET" suffixOverrides=",">
<if test="bsm != null">BSM = #{bsm},</if>
<if test="ysdm != null">YSDM = #{ysdm},</if>
<if test="dkbm != null and dkbm != ''">DKBM = #{dkbm},</if>
<if test="dkmc != null and dkmc != ''">DKMC = #{dkmc},</if>
<if test="syqxz != null">SYQXZ = #{syqxz},</if>
<if test="dklb != null">DKLB = #{dklb},</if>
<if test="tdlylx != null">TDLYLX = #{tdlylx},</if>
<if test="dldj != null">DLDJ = #{dldj},</if>
<if test="tdyt != null">TDYT = #{tdyt},</if>
<if test="sfjbnt != null">SFJBNT = #{sfjbnt},</if>
<if test="dkdz != null">DKDZ = #{dkdz},</if>
<if test="dkxz != null">DKXZ = #{dkxz},</if>
<if test="dknz != null">DKNZ = #{dknz},</if>
<if test="dkbz != null">DKBZ = #{dkbz},</if>
<if test="dkbzxx != null">DKBZXX = #{dkbzxx},</if>
<if test="zjrxm != null">ZJRXM = #{zjrxm},</if>
<if test="scmj != null">SCMJ = #{scmj},</if>
<if test="scmjm != null">SCMJM = #{scmjm},</if>
<if test="theGeom != null">the_geom = #{theGeom},</if>
<if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if>
<if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where fid = #{fid}
</update>

<!--批量更新-->
<update id="updateTResourceLandBatch" parameterType="list" >
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update t_resource_land
<set>
<if test="item.bsm != null">BSM = #{item.bsm},</if>
<if test="item.ysdm != null">YSDM = #{item.ysdm},</if>
<if test="item.dkbm != null and item.dkbm != ''">DKBM = #{item.dkbm},</if>
<if test="item.dkmc != null and item.dkmc != ''">DKMC = #{item.dkmc},</if>
<if test="item.syqxz != null">SYQXZ = #{item.syqxz},</if>
<if test="item.dklb != null">DKLB = #{item.dklb},</if>
<if test="item.tdlylx != null">TDLYLX = #{item.tdlylx},</if>
<if test="item.dldj != null">DLDJ = #{item.dldj},</if>
<if test="item.tdyt != null">TDYT = #{item.tdyt},</if>
<if test="item.sfjbnt != null">SFJBNT = #{item.sfjbnt},</if>
<if test="item.dkdz != null">DKDZ = #{item.dkdz},</if>
<if test="item.dkxz != null">DKXZ = #{item.dkxz},</if>
<if test="item.dknz != null">DKNZ = #{item.dknz},</if>
<if test="item.dkbz != null">DKBZ = #{item.dkbz},</if>
<if test="item.dkbzxx != null">DKBZXX = #{item.dkbzxx},</if>
<if test="item.zjrxm != null">ZJRXM = #{item.zjrxm},</if>
<if test="item.scmj != null">SCMJ = #{item.scmj},</if>
<if test="item.scmjm != null">SCMJM = #{item.scmjm},</if>
<if test="item.theGeom != null">the_geom = #{item.theGeom},</if>
<if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if>
<if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
<if test="item.deptName != null">dept_name = #{item.deptName},</if>
<if test="item.createBy != null">create_by = #{item.createBy},</if>
<if test="item.createTime != null">create_time = #{item.createTime},</if>
<if test="item.updateBy != null">update_by = #{item.updateBy},</if>
<if test="item.updateTime != null">update_time = #{item.updateTime},</if>
</set>
where fid = #{item.fid}
</foreach>
</update>

<delete id="deleteTResourceLandByFid" parameterType="Long">
delete from t_resource_land where fid = #{fid}
</delete>

<delete id="deleteTResourceLandByFids" parameterType="String">
delete from t_resource_land where fid in
<foreach item="fid" collection="array" open="(" separator="," close=")">
#{fid}
</foreach>
</delete>
</mapper>

ruoyi-business/src/main/resources/mapper/business/TResourceOperationMapper.xml → ruoyi-business/src/main/resources/mapper/resource/TResourceOperationMapper.xml View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.TResourceOperationMapper">
<mapper namespace="com.ruoyi.resource.mapper.TResourceOperationMapper">

<resultMap type="TResourceOperation" id="TResourceOperationResult">
<result property="id" column="id" />
@@ -38,21 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="dkbm != null and dkbm != ''"> and dkbm = #{dkbm}</if>
<if test="dkmc != null and dkmc != ''"> and dkmc = #{dkmc}</if>
<if test="dkdz != null and dkdz != ''"> and dkdz = #{dkdz}</if>
<if test="dkxz != null and dkxz != ''"> and dkxz = #{dkxz}</if>
<if test="dknz != null and dknz != ''"> and dknz = #{dknz}</if>
<if test="dkbz != null and dkbz != ''"> and dkbz = #{dkbz}</if>
<if test="jymj != null "> and jymj = #{jymj}</if>
<if test="jyfs != null and jyfs != ''"> and jyfs = #{jyfs}</if>
<if test="jydxmc != null and jydxmc != ''"> and jydxmc = #{jydxmc}</if>
<if test="jykssj != null "> and jykssj = #{jykssj}</if>
<if test="jyjssj != null "> and jyjssj = #{jyjssj}</if>
<if test="cbje != null "> and cbje = #{cbje}</if>
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="dkImg != null and dkImg != ''"> and dk_img = #{dkImg}</if>
<if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
<if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if>
</where>
</select>

@@ -61,20 +48,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>

<select id="selectTResourceOperationByDkbm" parameterType="String" resultMap="TResourceOperationResult">
<include refid="selectTResourceOperationVo"/>
where dkbm = #{dkbm}
</select>

<insert id="insertTResourceOperation" parameterType="TResourceOperation" useGeneratedKeys="true" keyProperty="id">
insert into t_resource_operation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dkbm != null">dkbm,</if>
<if test="dkbm != null and dkbm != ''">dkbm,</if>
<if test="dkmc != null and dkmc != ''">dkmc,</if>
<if test="dkdz != null">dkdz,</if>
<if test="dkxz != null">dkxz,</if>
<if test="dknz != null">dknz,</if>
<if test="dkbz != null">dkbz,</if>
<if test="jymj != null">jymj,</if>
<if test="jyfs != null">jyfs,</if>
<if test="jydxmc != null">jydxmc,</if>
<if test="jykssj != null">jykssj,</if>
<if test="jyjssj != null">jyjssj,</if>
<if test="jyfs != null and jyfs != ''">jyfs,</if>
<if test="jydxmc != null and jydxmc != ''">jydxmc,</if>
<if test="jykssj != null and jykssj != ''">jykssj,</if>
<if test="jyjssj != null and jyjssj != ''">jyjssj,</if>
<if test="cbje != null">cbje,</if>
<if test="bz != null">bz,</if>
<if test="dkImg != null">dk_img,</if>
@@ -87,17 +79,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dkbm != null">#{dkbm},</if>
<if test="dkbm != null and dkbm != ''">#{dkbm},</if>
<if test="dkmc != null and dkmc != ''">#{dkmc},</if>
<if test="dkdz != null">#{dkdz},</if>
<if test="dkxz != null">#{dkxz},</if>
<if test="dknz != null">#{dknz},</if>
<if test="dkbz != null">#{dkbz},</if>
<if test="jymj != null">#{jymj},</if>
<if test="jyfs != null">#{jyfs},</if>
<if test="jydxmc != null">#{jydxmc},</if>
<if test="jykssj != null">#{jykssj},</if>
<if test="jyjssj != null">#{jyjssj},</if>
<if test="jyfs != null and jyfs != ''">#{jyfs},</if>
<if test="jydxmc != null and jydxmc != ''">#{jydxmc},</if>
<if test="jykssj != null and jykssj != ''">#{jykssj},</if>
<if test="jyjssj != null and jyjssj != ''">#{jyjssj},</if>
<if test="cbje != null">#{cbje},</if>
<if test="bz != null">#{bz},</if>
<if test="dkImg != null">#{dkImg},</if>
@@ -167,17 +159,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTResourceOperation" parameterType="TResourceOperation">
update t_resource_operation
<trim prefix="SET" suffixOverrides=",">
<if test="dkbm != null">dkbm = #{dkbm},</if>
<if test="dkbm != null and dkbm != ''">dkbm = #{dkbm},</if>
<if test="dkmc != null and dkmc != ''">dkmc = #{dkmc},</if>
<if test="dkdz != null">dkdz = #{dkdz},</if>
<if test="dkxz != null">dkxz = #{dkxz},</if>
<if test="dknz != null">dknz = #{dknz},</if>
<if test="dkbz != null">dkbz = #{dkbz},</if>
<if test="jymj != null">jymj = #{jymj},</if>
<if test="jyfs != null">jyfs = #{jyfs},</if>
<if test="jydxmc != null">jydxmc = #{jydxmc},</if>
<if test="jykssj != null">jykssj = #{jykssj},</if>
<if test="jyjssj != null">jyjssj = #{jyjssj},</if>
<if test="jyfs != null and jyfs != ''">jyfs = #{jyfs},</if>
<if test="jydxmc != null and jydxmc != ''">jydxmc = #{jydxmc},</if>
<if test="jykssj != null and jykssj != ''">jykssj = #{jykssj},</if>
<if test="jyjssj != null and jyjssj != ''">jyjssj = #{jyjssj},</if>
<if test="cbje != null">cbje = #{cbje},</if>
<if test="bz != null">bz = #{bz},</if>
<if test="dkImg != null">dk_img = #{dkImg},</if>
@@ -197,17 +189,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update t_resource_operation
<set>
<if test="item.dkbm != null">dkbm = #{item.dkbm},</if>
<if test="item.dkbm != null and item.dkbm != ''">dkbm = #{item.dkbm},</if>
<if test="item.dkmc != null and item.dkmc != ''">dkmc = #{item.dkmc},</if>
<if test="item.dkdz != null">dkdz = #{item.dkdz},</if>
<if test="item.dkxz != null">dkxz = #{item.dkxz},</if>
<if test="item.dknz != null">dknz = #{item.dknz},</if>
<if test="item.dkbz != null">dkbz = #{item.dkbz},</if>
<if test="item.jymj != null">jymj = #{item.jymj},</if>
<if test="item.jyfs != null">jyfs = #{item.jyfs},</if>
<if test="item.jydxmc != null">jydxmc = #{item.jydxmc},</if>
<if test="item.jykssj != null">jykssj = #{item.jykssj},</if>
<if test="item.jyjssj != null">jyjssj = #{item.jyjssj},</if>
<if test="item.jyfs != null and item.jyfs != ''">jyfs = #{item.jyfs},</if>
<if test="item.jydxmc != null and item.jydxmc != ''">jydxmc = #{item.jydxmc},</if>
<if test="item.jykssj != null and item.jykssj != ''">jykssj = #{item.jykssj},</if>
<if test="item.jyjssj != null and item.jyjssj != ''">jyjssj = #{item.jyjssj},</if>
<if test="item.cbje != null">cbje = #{item.cbje},</if>
<if test="item.bz != null">bz = #{item.bz},</if>
<if test="item.dkImg != null">dk_img = #{item.dkImg},</if>

+ 3
- 4
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm View File

@@ -92,7 +92,6 @@
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
</el-col>
-->

<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['${permissionPrefix}:import']">导入</el-button>
</el-col>
@@ -119,7 +118,7 @@
#if($column.pk)
<el-table-column label="${comment}" align="center" prop="${javaField}" min-width="60"/>
#elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" prop="${javaField}" />
<el-table-column label="${comment}" align="center" prop="${javaField}" />
#elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
<template slot-scope="scope">
@@ -127,11 +126,11 @@
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "fileUpload")
<el-table-column label="${comment}" header-align="center" align="left" prop="${javaField}" >
<el-table-column label="${comment}" header-align="center" align="left" prop="${javaField}" >
<template slot-scope="scope">
<div v-if="!!scope.row.${javaField}"><el-tooltip effect="light" :content="item.substr(item.lastIndexOf('/') + 1)" placement="bottom" v-for="(item, index) in scope.row.${javaField}.split(',')" :key="index"><a :href="baseRoutingUrll + item" target="_blank" style="height: 32px; width: 32px; margin: 2px; display: inline-block; text-align: center;"><img :src="getFileIcon(item)" style="height: 100%;"/></a></el-tooltip></div>
</template>
</el-table-column>
</el-table-column>
#elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}">
<template slot-scope="scope">


Loading…
Cancel
Save