diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceLandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceLandController.java new file mode 100644 index 0000000..da9b5c2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceLandController.java @@ -0,0 +1,199 @@ +package com.ruoyi.web.controller.business; + +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.core.domain.pdf.PageSet; +import com.ruoyi.common.core.domain.pdf.PdfProperty; +import com.ruoyi.common.core.domain.pdf.ShoulderItem; +import com.ruoyi.common.utils.pdf.PdfUtils; +import com.ruoyi.common.utils.translation.TranslateUtils; +import org.apache.commons.compress.utils.Lists; +import org.springframework.security.access.prepost.PreAuthorize; +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.web.multipart.MultipartFile; + +/** + * 地块属性Controller + * + * @author yfd + * @date 2025-09-05 + */ +@RestController +@RequestMapping("/business/resourceLand") +public class TResourceLandController extends BaseController +{ + @Autowired + private ITResourceLandService tResourceLandService; + + /** + * 查询地块属性列表 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:list')") + @GetMapping("/list") + public TableDataInfo list(TResourceLand tResourceLand) + { + startPage(); + List list = tResourceLandService.selectTResourceLandList(tResourceLand); + return getDataTable(list); + } + + + /** + * 导出地块属性列表 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:export')") + @Log(title = "地块属性", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TResourceLand tResourceLand) + { + List list = tResourceLandService.selectTResourceLandList(tResourceLand); + ExcelUtil util = new ExcelUtil(TResourceLand.class); + util.exportExcel(response, list, "地块属性数据"); + } + + /** + * 地块属性导入模板 + */ + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil(TResourceLand.class); + util.importTemplateExcel(response, "地块属性数据"); + } + + /** + * 地块属性导入 + */ + @Log(title = "地块属性", businessType = BusinessType.IMPORT) + @PreAuthorize("@ss.hasPermi('business:resourceLand:import')") + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { + ExcelUtil util = new ExcelUtil(TResourceLand.class); + List list = util.importExcel(file.getInputStream(), 0); + String message = tResourceLandService.importTResourceLand(list, updateSupport, getUsername()); + return AjaxResult.success(message); + } + + /** + * 获取地块属性详细信息 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:query')") + @GetMapping(value = "/{DKBM}") + public AjaxResult getInfo(@PathVariable("DKBM") String DKBM) + { + return success(tResourceLandService.selectTResourceLandByDKBM(DKBM)); + } + + /** + * 获取地块属性详细信息,翻译字典 + */ + @GetMapping(value = "/detail/{DKBM}") + public AjaxResult detail(@PathVariable("DKBM") String DKBM) + { + TResourceLand detail = tResourceLandService.selectTResourceLandByDKBM(DKBM); + TranslateUtils.translate(detail, false); + return success(detail); + } + + /** + * 新增地块属性 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:add')") + @Log(title = "地块属性", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody TResourceLand tResourceLand) + { + return toAjax(tResourceLandService.insertTResourceLand(tResourceLand)); + } + + /** + * 修改地块属性 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:edit')") + @Log(title = "地块属性", businessType = BusinessType.UPDATE) + @PostMapping("/update") + public AjaxResult edit(@RequestBody TResourceLand tResourceLand) + { + return toAjax(tResourceLandService.updateTResourceLand(tResourceLand)); + } + + /** + * 删除地块属性 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:remove')") + @Log(title = "地块属性", businessType = BusinessType.DELETE) + @GetMapping("/delete/{DKBMs}") + public AjaxResult remove(@PathVariable String[] DKBMs) + { + return toAjax(tResourceLandService.deleteTResourceLandByDKBMs(DKBMs)); + } + + /** + * 打印地块属性 + */ + @PreAuthorize("@ss.hasPermi('business:resourceLand:print')") + @Log(title = "地块属性", businessType = BusinessType.PRINT) + @GetMapping("/print") + public void printPdf(TResourceLand tResourceLand, HttpServletResponse response) throws Exception{ + + List list = tResourceLandService.selectTResourceLandList(tResourceLand); + TranslateUtils.translateList(list, false); + + PdfProperty pdf = new PdfProperty(); + pdf.setTitle("地块属性"); + //pdf.setRowHeight(20f); + + ShoulderItem shoulder = new ShoulderItem(); + shoulder.setLeftItem("编制单位:"); + shoulder.setCenterItem("日期:" ); + shoulder.setRightItem("单位:"); + pdf.setShoulder(shoulder); + + float[] columnWidth = new float[]{20, 40, 10, 10, 10, 10}; + pdf.setColumnWidth(columnWidth); + String[] header = new String[]{"A列", "B列", "C列", "D列", "E列", "F列"}; + pdf.setHeader(header); + int[] aligns = new int[]{0, 0, 1, 1, 2, 2}; + pdf.setAligns(aligns); + + List contentList = Lists.newArrayList(); + list.forEach(a ->{ + String[] str = new String[6]; + str[0] = ""; + str[1] = ""; + str[2] = ""; + str[3] = ""; + str[4] = ""; + str[5] = ""; + contentList.add(str); + }); + pdf.setContentList(contentList); + + PageSet ps = new PageSet(); + ps.setPaperWidth(595.0f); + ps.setPaperHeight(842.0f); + ps.setPrintDirection("1"); + ps.setTableTotalWidth(520); + ps.setMarginLeft(50); + ps.setMarginRight(50); + ps.setMarginTop(50); + ps.setMarginBottom(50); + pdf.setPageSet(ps); + + PdfUtils.initPdf(response, pdf); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceOperationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceOperationController.java new file mode 100644 index 0000000..950871c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/TResourceOperationController.java @@ -0,0 +1,201 @@ +package com.ruoyi.web.controller.business; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +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.utils.pdf.PdfUtils; +import com.ruoyi.common.utils.translation.TranslateUtils; +import org.apache.commons.compress.utils.Lists; +import org.springframework.security.access.prepost.PreAuthorize; +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.web.multipart.MultipartFile; + +/** + * 地块经营Controller + * + * @author yfd + * @date 2025-09-05 + */ +@RestController +@RequestMapping("/business/resourceOperation") +public class TResourceOperationController extends BaseController +{ + @Autowired + private ITResourceOperationService tResourceOperationService; + + /** + * 查询地块经营列表 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:list')") + @GetMapping("/list") + public TableDataInfo list(TResourceOperation tResourceOperation) + { + startPage(); + List list = tResourceOperationService.selectTResourceOperationList(tResourceOperation); + return getDataTable(list); + } + + + /** + * 导出地块经营列表 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:export')") + @Log(title = "地块经营", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TResourceOperation tResourceOperation) + { + List list = tResourceOperationService.selectTResourceOperationList(tResourceOperation); + ExcelUtil util = new ExcelUtil(TResourceOperation.class); + util.exportExcel(response, list, "地块经营数据"); + } + + /** + * 地块经营导入模板 + */ + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil(TResourceOperation.class); + util.importTemplateExcel(response, "地块经营数据"); + } + + /** + * 地块经营导入 + */ + @Log(title = "地块经营", businessType = BusinessType.IMPORT) + @PreAuthorize("@ss.hasPermi('business:resourceOperation:import')") + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { + ExcelUtil util = new ExcelUtil(TResourceOperation.class); + List list = util.importExcel(file.getInputStream(), 0); + String message = tResourceOperationService.importTResourceOperation(list, updateSupport, getUsername()); + return AjaxResult.success(message); + } + + /** + * 获取地块经营详细信息 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(tResourceOperationService.selectTResourceOperationById(id)); + } + + /** + * 获取地块经营详细信息,翻译字典 + */ + @GetMapping(value = "/detail/{id}") + public AjaxResult detail(@PathVariable("id") Long id) + { + TResourceOperation detail = tResourceOperationService.selectTResourceOperationById(id); + TranslateUtils.translate(detail, false); + return success(detail); + } + + /** + * 新增地块经营 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:add')") + @Log(title = "地块经营", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody TResourceOperation tResourceOperation) + { + return toAjax(tResourceOperationService.insertTResourceOperation(tResourceOperation)); + } + + /** + * 修改地块经营 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:edit')") + @Log(title = "地块经营", businessType = BusinessType.UPDATE) + @PostMapping("/update") + public AjaxResult edit(@RequestBody TResourceOperation tResourceOperation) + { + return toAjax(tResourceOperationService.updateTResourceOperation(tResourceOperation)); + } + + /** + * 删除地块经营 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:remove')") + @Log(title = "地块经营", businessType = BusinessType.DELETE) + @GetMapping("/delete/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tResourceOperationService.deleteTResourceOperationByIds(ids)); + } + + /** + * 打印地块经营 + */ + @PreAuthorize("@ss.hasPermi('business:resourceOperation:print')") + @Log(title = "地块经营", businessType = BusinessType.PRINT) + @GetMapping("/print") + public void printPdf(TResourceOperation tResourceOperation, HttpServletResponse response) throws Exception{ + + List list = tResourceOperationService.selectTResourceOperationList(tResourceOperation); + TranslateUtils.translateList(list, false); + + PdfProperty pdf = new PdfProperty(); + pdf.setTitle("地块经营"); + //pdf.setRowHeight(20f); + + ShoulderItem shoulder = new ShoulderItem(); + shoulder.setLeftItem("编制单位:"); + shoulder.setCenterItem("日期:" ); + shoulder.setRightItem("单位:"); + pdf.setShoulder(shoulder); + + float[] columnWidth = new float[]{20, 40, 10, 10, 10, 10}; + pdf.setColumnWidth(columnWidth); + String[] header = new String[]{"A列", "B列", "C列", "D列", "E列", "F列"}; + pdf.setHeader(header); + int[] aligns = new int[]{0, 0, 1, 1, 2, 2}; + pdf.setAligns(aligns); + + List contentList = Lists.newArrayList(); + list.forEach(a ->{ + String[] str = new String[6]; + str[0] = ""; + str[1] = ""; + str[2] = ""; + str[3] = ""; + str[4] = ""; + str[5] = ""; + contentList.add(str); + }); + pdf.setContentList(contentList); + + PageSet ps = new PageSet(); + ps.setPaperWidth(595.0f); + ps.setPaperHeight(842.0f); + ps.setPrintDirection("1"); + ps.setTableTotalWidth(520); + ps.setMarginLeft(50); + ps.setMarginRight(50); + ps.setMarginTop(50); + ps.setMarginBottom(50); + pdf.setPageSet(ps); + + PdfUtils.initPdf(response, pdf); + } +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceLand.java b/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceLand.java new file mode 100644 index 0000000..1236208 --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceLand.java @@ -0,0 +1,121 @@ +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; + +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceOperation.java b/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceOperation.java new file mode 100644 index 0000000..b442a6d --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/domain/TResourceOperation.java @@ -0,0 +1,95 @@ +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; +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceLandMapper.java b/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceLandMapper.java new file mode 100644 index 0000000..7e607cf --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceLandMapper.java @@ -0,0 +1,85 @@ +package com.ruoyi.business.mapper; + +import java.util.List; +import com.ruoyi.business.domain.TResourceLand; + +/** + * 地块属性Mapper接口 + * + * @author yfd + * @date 2025-09-05 + */ +public interface TResourceLandMapper +{ + /** + * 查询地块属性 + * + * @param DKBM 地块属性主键 + * @return 地块属性 + */ + public TResourceLand selectTResourceLandByDKBM(String DKBM); + + /** + * 查询地块属性列表 + * + * @param tResourceLand 地块属性 + * @return 地块属性集合 + */ + public List selectTResourceLandList(TResourceLand tResourceLand); + + /** + * 新增地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + public int insertTResourceLand(TResourceLand tResourceLand); + + /** + * 批量新增地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + public int insertTResourceLandBatch(List list); + + /** + * 修改地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + public int updateTResourceLand(TResourceLand tResourceLand); + + /** + * 批量修改 地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + public int updateTResourceLandBatch(List list); + + /** + * 删除地块属性 + * + * @param DKBM 地块属性主键 + * @return 结果 + */ + public int deleteTResourceLandByDKBM(String DKBM); + + /** + * 批量删除地块属性 + * + * @param DKBMs 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTResourceLandByDKBMs(String[] DKBMs); + + /** + * 删除地块属性 + * + * @param DKBM 地块属性主键 + * @return 结果 + */ + public String selectTResourceLandMaxDKBM(String orgCode); +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceOperationMapper.java b/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceOperationMapper.java new file mode 100644 index 0000000..63ed637 --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/mapper/TResourceOperationMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.business.mapper; + +import java.util.List; +import com.ruoyi.business.domain.TResourceOperation; + +/** + * 地块经营Mapper接口 + * + * @author yfd + * @date 2025-09-05 + */ +public interface TResourceOperationMapper +{ + /** + * 查询地块经营 + * + * @param id 地块经营主键 + * @return 地块经营 + */ + public TResourceOperation selectTResourceOperationById(Long id); + + /** + * 查询地块经营列表 + * + * @param tResourceOperation 地块经营 + * @return 地块经营集合 + */ + public List selectTResourceOperationList(TResourceOperation tResourceOperation); + + /** + * 新增地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + public int insertTResourceOperation(TResourceOperation tResourceOperation); + + /** + * 批量新增地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + public int insertTResourceOperationBatch(List list); + + /** + * 修改地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + public int updateTResourceOperation(TResourceOperation tResourceOperation); + + /** + * 批量修改 地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + public int updateTResourceOperationBatch(List list); + + /** + * 删除地块经营 + * + * @param id 地块经营主键 + * @return 结果 + */ + public int deleteTResourceOperationById(Long id); + + /** + * 批量删除地块经营 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTResourceOperationByIds(Long[] ids); +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceLandService.java b/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceLandService.java new file mode 100644 index 0000000..cd5d8ea --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceLandService.java @@ -0,0 +1,87 @@ +package com.ruoyi.business.service; + +import java.util.List; +import com.ruoyi.business.domain.TResourceLand; + +/** + * 地块属性Service接口 + * + * @author yfd + * @date 2025-09-05 + */ +public interface ITResourceLandService +{ + /** + * 查询地块属性 + * + * @param DKBM 地块属性主键 + * @return 地块属性 + */ + public TResourceLand selectTResourceLandByDKBM(String DKBM); + + /** + * 查询地块属性列表 + * + * @param tResourceLand 地块属性 + * @return 地块属性集合 + */ + public List selectTResourceLandList(TResourceLand tResourceLand); + + /** + * 导入地块属性数据 + * + * @param list 地块属性数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param userName 操作用户 + * @return 结果 + */ + public String importTResourceLand(List list, Boolean isUpdateSupport, String userName); + + /** + * 新增地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + public int insertTResourceLand(TResourceLand tResourceLand); + + /** + * 批量新增地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + public int insertTResourceLandBatch(List list); + + /** + * 修改地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + public int updateTResourceLand(TResourceLand tResourceLand); + + /** + * 批量修改 地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + public int updateTResourceLandBatch(List list); + + /** + * 批量删除地块属性 + * + * @param DKBMs 需要删除的地块属性主键集合 + * @return 结果 + */ + public int deleteTResourceLandByDKBMs(String[] DKBMs); + + /** + * 删除地块属性信息 + * + * @param DKBM 地块属性主键 + * @return 结果 + */ + public int deleteTResourceLandByDKBM(String DKBM); +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceOperationService.java b/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceOperationService.java new file mode 100644 index 0000000..4ada1d9 --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/service/ITResourceOperationService.java @@ -0,0 +1,87 @@ +package com.ruoyi.business.service; + +import java.util.List; +import com.ruoyi.business.domain.TResourceOperation; + +/** + * 地块经营Service接口 + * + * @author yfd + * @date 2025-09-05 + */ +public interface ITResourceOperationService +{ + /** + * 查询地块经营 + * + * @param id 地块经营主键 + * @return 地块经营 + */ + public TResourceOperation selectTResourceOperationById(Long id); + + /** + * 查询地块经营列表 + * + * @param tResourceOperation 地块经营 + * @return 地块经营集合 + */ + public List selectTResourceOperationList(TResourceOperation tResourceOperation); + + /** + * 导入地块经营数据 + * + * @param list 地块经营数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param userName 操作用户 + * @return 结果 + */ + public String importTResourceOperation(List list, Boolean isUpdateSupport, String userName); + + /** + * 新增地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + public int insertTResourceOperation(TResourceOperation tResourceOperation); + + /** + * 批量新增地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + public int insertTResourceOperationBatch(List list); + + /** + * 修改地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + public int updateTResourceOperation(TResourceOperation tResourceOperation); + + /** + * 批量修改 地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + public int updateTResourceOperationBatch(List list); + + /** + * 批量删除地块经营 + * + * @param ids 需要删除的地块经营主键集合 + * @return 结果 + */ + public int deleteTResourceOperationByIds(Long[] ids); + + /** + * 删除地块经营信息 + * + * @param id 地块经营主键 + * @return 结果 + */ + public int deleteTResourceOperationById(Long id); +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceLandServiceImpl.java b/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceLandServiceImpl.java new file mode 100644 index 0000000..38a24cb --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceLandServiceImpl.java @@ -0,0 +1,235 @@ +package com.ruoyi.business.service.impl; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.DateUtils; +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; + +/** + * 地块属性Service业务层处理 + * + * @author yfd + * @date 2025-09-05 + */ +@Service +public class TResourceLandServiceImpl implements ITResourceLandService +{ + @Autowired + private TResourceLandMapper tResourceLandMapper; + + /** + * 查询地块属性 + * + * @param DKBM 地块属性主键 + * @return 地块属性 + */ + @Override + public TResourceLand selectTResourceLandByDKBM(String DKBM) + { + return tResourceLandMapper.selectTResourceLandByDKBM(DKBM); + } + + /** + * 查询地块属性列表 + * + * @param tResourceLand 地块属性 + * @return 地块属性 + */ + @Override + public List selectTResourceLandList(TResourceLand tResourceLand) + { + return tResourceLandMapper.selectTResourceLandList(tResourceLand); + } + + /** + * 导入地块属性数据 + * + * @param list 地块属性数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param operName 操作用户 + * @return 结果 + */ + @Override + @Transactional + public String importTResourceLand(List list, Boolean isUpdateSupport, String operName) { + if (StringUtils.isEmpty(list)) { + throw new ServiceException("导入地块属性数据不能为空!"); + } + + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + List insertList = Lists.newArrayList(); + List updateList = Lists.newArrayList(); + + // 检验excel表中 【xxx】 是否存在重复,有重复的终止导入 + List 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() + " 个重复错错误如下:"); + for (int i = 0; i < repeatList.size(); i++) { + String item = repeatList.get(i); + failureNum++; + failureMsg.append("
" + failureNum + "、项目名 " + item + " 重复"); + } + return failureMsg.toString(); + } + + // 缓存已存在的数据 + TResourceLand tResourceLand = new TResourceLand(); + List tResourceLandList = tResourceLandMapper.selectTResourceLandList(tResourceLand); + + for (TResourceLand item : list) { + // 一定层次上校验并跳过空白行,最好是不空的唯一字段 + if(StringUtils.isEmpty(item.getDKBM())){ + continue; + } + // 验证是否存在这个地块属性信息 + String id = item.getDKBM(); + List filters = tResourceLandList.stream().filter(a -> a.getDKBM().equals(id)).collect(Collectors.toList()); + if (StringUtils.isEmpty(filters)) { //不存在时,直接插入 + item.setCreateBy(operName); + item.setCreateTime(DateUtils.getNowDate()); + insertList.add(item); + successNum++; + } else { //存在时 + if(isUpdateSupport){ //勾选则更新 + item.setUpdateBy(operName); + item.setUpdateTime(DateUtils.getNowDate()); + item.setDKBM(filters.get(0).getDKBM()); + updateList.add(item); + successNum++; + } + } + } + + // 执行更新或者保存 + List> insertSplists = ListUtils.partition(insertList, 50); + insertSplists.forEach(insertSplist ->{ + tResourceLandMapper.insertTResourceLandBatch(insertSplist); + }); + List> updateSplists = ListUtils.partition(updateList, 30); + updateSplists.forEach(updateSplist ->{ + tResourceLandMapper.updateTResourceLandBatch(updateSplist); + }); + + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); + 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; + } + + /** + * 新增地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + @Override + public int insertTResourceLand(TResourceLand tResourceLand) + { + tResourceLand.setDKBM(calculatorDKBM(tResourceLand.getOrgCode())); + tResourceLand.setCreateTime(DateUtils.getNowDate()); + return tResourceLandMapper.insertTResourceLand(tResourceLand); + } + + /** + * 批量新增地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + @Override + @Transactional + public int insertTResourceLandBatch(List list){ + List> splists = ListUtils.partition(list, 50); + splists.forEach(splist->{ + tResourceLandMapper.insertTResourceLandBatch(splist); + }); + return 1; + } + + /** + * 修改地块属性 + * + * @param tResourceLand 地块属性 + * @return 结果 + */ + @Override + public int updateTResourceLand(TResourceLand tResourceLand) + { + tResourceLand.setUpdateTime(DateUtils.getNowDate()); + return tResourceLandMapper.updateTResourceLand(tResourceLand); + } + + /** + * 批量修改 地块属性 + * + * @param list 地块属性 + * @return 结果 + */ + @Override + @Transactional + public int updateTResourceLandBatch(List list) { + List> splists = ListUtils.partition(list, 30); + splists.forEach(splist->{ + tResourceLandMapper.updateTResourceLandBatch(splist); + }); + return 1; + } + + /** + * 批量删除地块属性 + * + * @param DKBMs 需要删除的地块属性主键 + * @return 结果 + */ + @Override + public int deleteTResourceLandByDKBMs(String[] DKBMs) + { + return tResourceLandMapper.deleteTResourceLandByDKBMs(DKBMs); + } + + /** + * 删除地块属性信息 + * + * @param DKBM 地块属性主键 + * @return 结果 + */ + @Override + public int deleteTResourceLandByDKBM(String DKBM) + { + return tResourceLandMapper.deleteTResourceLandByDKBM(DKBM); + } +} diff --git a/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceOperationServiceImpl.java b/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceOperationServiceImpl.java new file mode 100644 index 0000000..6ba43f9 --- /dev/null +++ b/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TResourceOperationServiceImpl.java @@ -0,0 +1,214 @@ +package com.ruoyi.business.service.impl; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.DateUtils; +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; + +/** + * 地块经营Service业务层处理 + * + * @author yfd + * @date 2025-09-05 + */ +@Service +public class TResourceOperationServiceImpl implements ITResourceOperationService +{ + @Autowired + private TResourceOperationMapper tResourceOperationMapper; + + /** + * 查询地块经营 + * + * @param id 地块经营主键 + * @return 地块经营 + */ + @Override + public TResourceOperation selectTResourceOperationById(Long id) + { + return tResourceOperationMapper.selectTResourceOperationById(id); + } + + /** + * 查询地块经营列表 + * + * @param tResourceOperation 地块经营 + * @return 地块经营 + */ + @Override + public List selectTResourceOperationList(TResourceOperation tResourceOperation) + { + return tResourceOperationMapper.selectTResourceOperationList(tResourceOperation); + } + + /** + * 导入地块经营数据 + * + * @param list 地块经营数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param operName 操作用户 + * @return 结果 + */ + @Override + @Transactional + public String importTResourceOperation(List list, Boolean isUpdateSupport, String operName) { + if (StringUtils.isEmpty(list)) { + throw new ServiceException("导入地块经营数据不能为空!"); + } + + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + List insertList = Lists.newArrayList(); + List updateList = Lists.newArrayList(); + + // 检验excel表中 【xxx】 是否存在重复,有重复的终止导入 + List repeatList = list.stream().collect(Collectors.groupingBy(TResourceOperation::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() + " 个重复错错误如下:"); + for (int i = 0; i < repeatList.size(); i++) { + String item = repeatList.get(i); + failureNum++; + failureMsg.append("
" + failureNum + "、项目名 " + item + " 重复"); + } + return failureMsg.toString(); + } + + // 缓存已存在的数据 + TResourceOperation tResourceOperation = new TResourceOperation(); + List tResourceOperationList = tResourceOperationMapper.selectTResourceOperationList(tResourceOperation); + + for (TResourceOperation item : list) { + // 一定层次上校验并跳过空白行,最好是不空的唯一字段 + if(StringUtils.isEmpty(item.getDkbm())){ + continue; + } + // 验证是否存在这个地块经营信息 + Long id = item.getId(); + List filters = tResourceOperationList.stream().filter(a -> a.getId().equals(id)).collect(Collectors.toList()); + if (StringUtils.isEmpty(filters)) { //不存在时,直接插入 + item.setCreateBy(operName); + item.setCreateTime(DateUtils.getNowDate()); + insertList.add(item); + successNum++; + } else { //存在时 + if(isUpdateSupport){ //勾选则更新 + item.setUpdateBy(operName); + item.setUpdateTime(DateUtils.getNowDate()); + item.setId(filters.get(0).getId()); + updateList.add(item); + successNum++; + } + } + } + + // 执行更新或者保存 + List> insertSplists = ListUtils.partition(insertList, 50); + insertSplists.forEach(insertSplist ->{ + tResourceOperationMapper.insertTResourceOperationBatch(insertSplist); + }); + List> updateSplists = ListUtils.partition(updateList, 30); + updateSplists.forEach(updateSplist ->{ + tResourceOperationMapper.updateTResourceOperationBatch(updateSplist); + }); + + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); + return successMsg.toString(); + } + + + /** + * 新增地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + @Override + public int insertTResourceOperation(TResourceOperation tResourceOperation) + { + tResourceOperation.setCreateTime(DateUtils.getNowDate()); + return tResourceOperationMapper.insertTResourceOperation(tResourceOperation); + } + + /** + * 批量新增地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + @Override + @Transactional + public int insertTResourceOperationBatch(List list){ + List> splists = ListUtils.partition(list, 50); + splists.forEach(splist->{ + tResourceOperationMapper.insertTResourceOperationBatch(splist); + }); + return 1; + } + + /** + * 修改地块经营 + * + * @param tResourceOperation 地块经营 + * @return 结果 + */ + @Override + public int updateTResourceOperation(TResourceOperation tResourceOperation) + { + tResourceOperation.setUpdateTime(DateUtils.getNowDate()); + return tResourceOperationMapper.updateTResourceOperation(tResourceOperation); + } + + /** + * 批量修改 地块经营 + * + * @param list 地块经营 + * @return 结果 + */ + @Override + @Transactional + public int updateTResourceOperationBatch(List list) { + List> splists = ListUtils.partition(list, 30); + splists.forEach(splist->{ + tResourceOperationMapper.updateTResourceOperationBatch(splist); + }); + return 1; + } + + /** + * 批量删除地块经营 + * + * @param ids 需要删除的地块经营主键 + * @return 结果 + */ + @Override + public int deleteTResourceOperationByIds(Long[] ids) + { + return tResourceOperationMapper.deleteTResourceOperationByIds(ids); + } + + /** + * 删除地块经营信息 + * + * @param id 地块经营主键 + * @return 结果 + */ + @Override + public int deleteTResourceOperationById(Long id) + { + return tResourceOperationMapper.deleteTResourceOperationById(id); + } +} diff --git a/ruoyi-business/src/main/resources/mapper/business/TResourceLandMapper.xml b/ruoyi-business/src/main/resources/mapper/business/TResourceLandMapper.xml new file mode 100644 index 0000000..eebe62a --- /dev/null +++ b/ruoyi-business/src/main/resources/mapper/business/TResourceLandMapper.xml @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into t_resource_land + + 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, + + + #{fid}, + #{BSM}, + #{YSDM}, + #{DKBM}, + #{DKMC}, + #{SYQXZ}, + #{DKLB}, + #{TDLYLX}, + #{DLDJ}, + #{TDYT}, + #{SFJBNT}, + #{DKDZ}, + #{DKXZ}, + #{DKNZ}, + #{DKBZ}, + #{DKBZXX}, + #{ZJRXM}, + #{KJZB}, + #{SCMJ}, + #{SCMJM}, + #{theGeom}, + #{surveyStatus}, + #{importCode}, + #{deptName}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into t_resource_land + + 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, + + values + + + #{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}, + + + + + + update t_resource_land + + fid = #{fid}, + BSM = #{BSM}, + YSDM = #{YSDM}, + DKMC = #{DKMC}, + SYQXZ = #{SYQXZ}, + DKLB = #{DKLB}, + TDLYLX = #{TDLYLX}, + DLDJ = #{DLDJ}, + TDYT = #{TDYT}, + SFJBNT = #{SFJBNT}, + DKDZ = #{DKDZ}, + DKXZ = #{DKXZ}, + DKNZ = #{DKNZ}, + DKBZ = #{DKBZ}, + DKBZXX = #{DKBZXX}, + ZJRXM = #{ZJRXM}, + KJZB = #{KJZB}, + SCMJ = #{SCMJ}, + SCMJM = #{SCMJM}, + the_geom = #{theGeom}, + survey_status = #{surveyStatus}, + import_code = #{importCode}, + dept_name = #{deptName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where DKBM = #{DKBM} + + + + + + update t_resource_land + + fid = #{item.fid}, + BSM = #{item.BSM}, + YSDM = #{item.YSDM}, + DKMC = #{item.DKMC}, + SYQXZ = #{item.SYQXZ}, + DKLB = #{item.DKLB}, + TDLYLX = #{item.TDLYLX}, + DLDJ = #{item.DLDJ}, + TDYT = #{item.TDYT}, + SFJBNT = #{item.SFJBNT}, + DKDZ = #{item.DKDZ}, + DKXZ = #{item.DKXZ}, + DKNZ = #{item.DKNZ}, + DKBZ = #{item.DKBZ}, + DKBZXX = #{item.DKBZXX}, + ZJRXM = #{item.ZJRXM}, + KJZB = #{item.KJZB}, + SCMJ = #{item.SCMJ}, + SCMJM = #{item.SCMJM}, + the_geom = #{item.theGeom}, + survey_status = #{item.surveyStatus}, + import_code = #{item.importCode}, + dept_name = #{item.deptName}, + create_by = #{item.createBy}, + create_time = #{item.createTime}, + update_by = #{item.updateBy}, + update_time = #{item.updateTime}, + + where DKBM = #{item.DKBM} + + + + + delete from t_resource_land where DKBM = #{DKBM} + + + + delete from t_resource_land where DKBM in + + #{DKBM} + + + + + diff --git a/ruoyi-business/src/main/resources/mapper/business/TResourceOperationMapper.xml b/ruoyi-business/src/main/resources/mapper/business/TResourceOperationMapper.xml new file mode 100644 index 0000000..5e2d2ff --- /dev/null +++ b/ruoyi-business/src/main/resources/mapper/business/TResourceOperationMapper.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, dkbm, dkmc, dkdz, dkxz, dknz, dkbz, jymj, jyfs, jydxmc, jykssj, jyjssj, cbje, bz, dk_img, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_operation + + + + + + + + insert into t_resource_operation + + dkbm, + dkmc, + dkdz, + dkxz, + dknz, + dkbz, + jymj, + jyfs, + jydxmc, + jykssj, + jyjssj, + cbje, + bz, + dk_img, + survey_status, + import_code, + dept_name, + create_by, + create_time, + update_by, + update_time, + + + #{dkbm}, + #{dkmc}, + #{dkdz}, + #{dkxz}, + #{dknz}, + #{dkbz}, + #{jymj}, + #{jyfs}, + #{jydxmc}, + #{jykssj}, + #{jyjssj}, + #{cbje}, + #{bz}, + #{dkImg}, + #{surveyStatus}, + #{importCode}, + #{deptName}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + insert into t_resource_operation + + dkbm, + dkmc, + dkdz, + dkxz, + dknz, + dkbz, + jymj, + jyfs, + jydxmc, + jykssj, + jyjssj, + cbje, + bz, + dk_img, + survey_status, + import_code, + dept_name, + create_by, + create_time, + update_by, + update_time, + + values + + + #{item.dkbm}, + #{item.dkmc}, + #{item.dkdz}, + #{item.dkxz}, + #{item.dknz}, + #{item.dkbz}, + #{item.jymj}, + #{item.jyfs}, + #{item.jydxmc}, + #{item.jykssj}, + #{item.jyjssj}, + #{item.cbje}, + #{item.bz}, + #{item.dkImg}, + #{item.surveyStatus}, + #{item.importCode}, + #{item.deptName}, + #{item.createBy}, + #{item.createTime}, + #{item.updateBy}, + #{item.updateTime}, + + + + + + update t_resource_operation + + dkbm = #{dkbm}, + dkmc = #{dkmc}, + dkdz = #{dkdz}, + dkxz = #{dkxz}, + dknz = #{dknz}, + dkbz = #{dkbz}, + jymj = #{jymj}, + jyfs = #{jyfs}, + jydxmc = #{jydxmc}, + jykssj = #{jykssj}, + jyjssj = #{jyjssj}, + cbje = #{cbje}, + bz = #{bz}, + dk_img = #{dkImg}, + survey_status = #{surveyStatus}, + import_code = #{importCode}, + dept_name = #{deptName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + + + update t_resource_operation + + dkbm = #{item.dkbm}, + dkmc = #{item.dkmc}, + dkdz = #{item.dkdz}, + dkxz = #{item.dkxz}, + dknz = #{item.dknz}, + dkbz = #{item.dkbz}, + jymj = #{item.jymj}, + jyfs = #{item.jyfs}, + jydxmc = #{item.jydxmc}, + jykssj = #{item.jykssj}, + jyjssj = #{item.jyjssj}, + cbje = #{item.cbje}, + bz = #{item.bz}, + dk_img = #{item.dkImg}, + survey_status = #{item.surveyStatus}, + import_code = #{item.importCode}, + dept_name = #{item.deptName}, + create_by = #{item.createBy}, + create_time = #{item.createTime}, + update_by = #{item.updateBy}, + update_time = #{item.updateTime}, + + where id = #{item.id} + + + + + delete from t_resource_operation where id = #{id} + + + + delete from t_resource_operation where id in + + #{id} + + +