@@ -0,0 +1,185 @@ | |||
package com.ruoyi.web.controller.business; | |||
import com.ruoyi.business.domain.TGisCjqy; | |||
import com.ruoyi.business.service.ITGisCjqyService; | |||
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.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 org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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 rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@RestController | |||
@RequestMapping("/business/cjqy") | |||
public class TGisCjqyController extends BaseController | |||
{ | |||
@Autowired | |||
private ITGisCjqyService tGisCjqyService; | |||
/** | |||
* 查询村级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:list')") | |||
@GetMapping("/list") | |||
public TableDataInfo list(TGisCjqy tGisCjqy) | |||
{ | |||
startPage(); | |||
List<TGisCjqy> list = tGisCjqyService.selectTGisCjqyList(tGisCjqy); | |||
return getDataTable(list); | |||
} | |||
/** | |||
* 导出村级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:export')") | |||
@Log(title = "村级区域", businessType = BusinessType.EXPORT) | |||
@PostMapping("/export") | |||
public void export(HttpServletResponse response, TGisCjqy tGisCjqy) | |||
{ | |||
List<TGisCjqy> list = tGisCjqyService.selectTGisCjqyList(tGisCjqy); | |||
ExcelUtil<TGisCjqy> util = new ExcelUtil<TGisCjqy>(TGisCjqy.class); | |||
util.exportExcel(response, list, "村级区域数据"); | |||
} | |||
/** | |||
* 村级区域导入模板 | |||
*/ | |||
@PostMapping("/importTemplate") | |||
public void importTemplate(HttpServletResponse response) { | |||
ExcelUtil<TGisCjqy> util = new ExcelUtil<TGisCjqy>(TGisCjqy.class); | |||
util.importTemplateExcel(response, "村级区域数据"); | |||
} | |||
/** | |||
* 村级区域导入 | |||
*/ | |||
@Log(title = "村级区域", businessType = BusinessType.IMPORT) | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:import')") | |||
@PostMapping("/importData") | |||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { | |||
ExcelUtil<TGisCjqy> util = new ExcelUtil<TGisCjqy>(TGisCjqy.class); | |||
List<TGisCjqy> list = util.importExcel(file.getInputStream(), 0); | |||
String message = tGisCjqyService.importTGisCjqy(list, updateSupport, getUsername()); | |||
return AjaxResult.success(message); | |||
} | |||
/** | |||
* 获取村级区域详细信息 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:query')") | |||
@GetMapping(value = "/{CJQYDM}") | |||
public AjaxResult getInfo(@PathVariable("CJQYDM") String CJQYDM) | |||
{ | |||
TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | |||
TranslateUtils.translate(detail, false); | |||
return success(detail); | |||
} | |||
/** | |||
* 新增村级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:add')") | |||
@Log(title = "村级区域", businessType = BusinessType.INSERT) | |||
@PostMapping | |||
public AjaxResult add(@RequestBody TGisCjqy tGisCjqy) | |||
{ | |||
return toAjax(tGisCjqyService.insertTGisCjqy(tGisCjqy)); | |||
} | |||
/** | |||
* 修改村级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:edit')") | |||
@Log(title = "村级区域", businessType = BusinessType.UPDATE) | |||
@PutMapping | |||
public AjaxResult edit(@RequestBody TGisCjqy tGisCjqy) | |||
{ | |||
return toAjax(tGisCjqyService.updateTGisCjqy(tGisCjqy)); | |||
} | |||
/** | |||
* 删除村级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:remove')") | |||
@Log(title = "村级区域", businessType = BusinessType.DELETE) | |||
@DeleteMapping("/{CJQYDMs}") | |||
public AjaxResult remove(@PathVariable String[] CJQYDMs) | |||
{ | |||
return toAjax(tGisCjqyService.deleteTGisCjqyByCJQYDMs(CJQYDMs)); | |||
} | |||
/** | |||
* 打印村级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:cjqy:print')") | |||
@Log(title = "村级区域", businessType = BusinessType.PRINT) | |||
@GetMapping("/print") | |||
public void printPdf(TGisCjqy tGisCjqy, HttpServletResponse response) throws Exception{ | |||
List<TGisCjqy> list = tGisCjqyService.selectTGisCjqyList(tGisCjqy); | |||
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<String[]> 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); | |||
} | |||
} |
@@ -0,0 +1,186 @@ | |||
package com.ruoyi.web.controller.business; | |||
import com.ruoyi.business.domain.TGisXjqy; | |||
import com.ruoyi.business.service.ITGisXjqyService; | |||
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.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 org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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 rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@RestController | |||
@RequestMapping("/business/xjqy") | |||
public class TGisXjqyController extends BaseController | |||
{ | |||
@Autowired | |||
private ITGisXjqyService tGisXjqyService; | |||
/** | |||
* 查询乡级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:list')") | |||
@GetMapping("/list") | |||
public TableDataInfo list(TGisXjqy tGisXjqy) | |||
{ | |||
startPage(); | |||
List<TGisXjqy> list = tGisXjqyService.selectTGisXjqyList(tGisXjqy); | |||
return getDataTable(list); | |||
} | |||
/** | |||
* 导出乡级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:export')") | |||
@Log(title = "乡级区域", businessType = BusinessType.EXPORT) | |||
@PostMapping("/export") | |||
public void export(HttpServletResponse response, TGisXjqy tGisXjqy) | |||
{ | |||
List<TGisXjqy> list = tGisXjqyService.selectTGisXjqyList(tGisXjqy); | |||
ExcelUtil<TGisXjqy> util = new ExcelUtil<TGisXjqy>(TGisXjqy.class); | |||
util.exportExcel(response, list, "乡级区域数据"); | |||
} | |||
/** | |||
* 乡级区域导入模板 | |||
*/ | |||
@PostMapping("/importTemplate") | |||
public void importTemplate(HttpServletResponse response) { | |||
ExcelUtil<TGisXjqy> util = new ExcelUtil<TGisXjqy>(TGisXjqy.class); | |||
util.importTemplateExcel(response, "乡级区域数据"); | |||
} | |||
/** | |||
* 乡级区域导入 | |||
*/ | |||
@Log(title = "乡级区域", businessType = BusinessType.IMPORT) | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:import')") | |||
@PostMapping("/importData") | |||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { | |||
ExcelUtil<TGisXjqy> util = new ExcelUtil<TGisXjqy>(TGisXjqy.class); | |||
List<TGisXjqy> list = util.importExcel(file.getInputStream(), 0); | |||
String message = tGisXjqyService.importTGisXjqy(list, updateSupport, getUsername()); | |||
return AjaxResult.success(message); | |||
} | |||
/** | |||
* 获取乡级区域详细信息 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:query')") | |||
@GetMapping(value = "/{XJQYDM}") | |||
public AjaxResult getInfo(@PathVariable("XJQYDM") String XJQYDM) | |||
{ | |||
TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | |||
TranslateUtils.translate(detail, false); | |||
return success(detail); | |||
} | |||
/** | |||
* 新增乡级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:add')") | |||
@Log(title = "乡级区域", businessType = BusinessType.INSERT) | |||
@PostMapping | |||
public AjaxResult add(@RequestBody TGisXjqy tGisXjqy) | |||
{ | |||
return toAjax(tGisXjqyService.insertTGisXjqy(tGisXjqy)); | |||
} | |||
/** | |||
* 修改乡级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:edit')") | |||
@Log(title = "乡级区域", businessType = BusinessType.UPDATE) | |||
@PutMapping | |||
public AjaxResult edit(@RequestBody TGisXjqy tGisXjqy) | |||
{ | |||
return toAjax(tGisXjqyService.updateTGisXjqy(tGisXjqy)); | |||
} | |||
/** | |||
* 删除乡级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:remove')") | |||
@Log(title = "乡级区域", businessType = BusinessType.DELETE) | |||
@DeleteMapping("/{XJQYDMs}") | |||
public AjaxResult remove(@PathVariable String[] XJQYDMs) | |||
{ | |||
return toAjax(tGisXjqyService.deleteTGisXjqyByXJQYDMs(XJQYDMs)); | |||
} | |||
/** | |||
* 打印乡级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjqy:print')") | |||
@Log(title = "乡级区域", businessType = BusinessType.PRINT) | |||
@GetMapping("/print") | |||
public void printPdf(TGisXjqy tGisXjqy, HttpServletResponse response) throws Exception{ | |||
List<TGisXjqy> list = tGisXjqyService.selectTGisXjqyList(tGisXjqy); | |||
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<String[]> 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); | |||
} | |||
} |
@@ -0,0 +1,185 @@ | |||
package com.ruoyi.web.controller.business; | |||
import com.ruoyi.business.domain.TGisXjxzq; | |||
import com.ruoyi.business.service.ITGisXjxzqService; | |||
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.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 org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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 rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@RestController | |||
@RequestMapping("/business/xjxzq") | |||
public class TGisXjxzqController extends BaseController | |||
{ | |||
@Autowired | |||
private ITGisXjxzqService tGisXjxzqService; | |||
/** | |||
* 查询县级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:list')") | |||
@GetMapping("/list") | |||
public TableDataInfo list(TGisXjxzq tGisXjxzq) | |||
{ | |||
startPage(); | |||
List<TGisXjxzq> list = tGisXjxzqService.selectTGisXjxzqList(tGisXjxzq); | |||
return getDataTable(list); | |||
} | |||
/** | |||
* 导出县级区域列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:export')") | |||
@Log(title = "县级区域", businessType = BusinessType.EXPORT) | |||
@PostMapping("/export") | |||
public void export(HttpServletResponse response, TGisXjxzq tGisXjxzq) | |||
{ | |||
List<TGisXjxzq> list = tGisXjxzqService.selectTGisXjxzqList(tGisXjxzq); | |||
ExcelUtil<TGisXjxzq> util = new ExcelUtil<TGisXjxzq>(TGisXjxzq.class); | |||
util.exportExcel(response, list, "县级区域数据"); | |||
} | |||
/** | |||
* 县级区域导入模板 | |||
*/ | |||
@PostMapping("/importTemplate") | |||
public void importTemplate(HttpServletResponse response) { | |||
ExcelUtil<TGisXjxzq> util = new ExcelUtil<TGisXjxzq>(TGisXjxzq.class); | |||
util.importTemplateExcel(response, "县级区域数据"); | |||
} | |||
/** | |||
* 县级区域导入 | |||
*/ | |||
@Log(title = "县级区域", businessType = BusinessType.IMPORT) | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:import')") | |||
@PostMapping("/importData") | |||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { | |||
ExcelUtil<TGisXjxzq> util = new ExcelUtil<TGisXjxzq>(TGisXjxzq.class); | |||
List<TGisXjxzq> list = util.importExcel(file.getInputStream(), 0); | |||
String message = tGisXjxzqService.importTGisXjxzq(list, updateSupport, getUsername()); | |||
return AjaxResult.success(message); | |||
} | |||
/** | |||
* 获取县级区域详细信息 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | |||
@GetMapping(value = "/{XZQDM}") | |||
public AjaxResult getInfo(@PathVariable("XZQDM") String XZQDM) | |||
{ | |||
TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | |||
TranslateUtils.translate(detail, false); | |||
return success(detail); | |||
} | |||
/** | |||
* 新增县级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:add')") | |||
@Log(title = "县级区域", businessType = BusinessType.INSERT) | |||
@PostMapping | |||
public AjaxResult add(@RequestBody TGisXjxzq tGisXjxzq) | |||
{ | |||
return toAjax(tGisXjxzqService.insertTGisXjxzq(tGisXjxzq)); | |||
} | |||
/** | |||
* 修改县级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:edit')") | |||
@Log(title = "县级区域", businessType = BusinessType.UPDATE) | |||
@PutMapping | |||
public AjaxResult edit(@RequestBody TGisXjxzq tGisXjxzq) | |||
{ | |||
return toAjax(tGisXjxzqService.updateTGisXjxzq(tGisXjxzq)); | |||
} | |||
/** | |||
* 删除县级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:remove')") | |||
@Log(title = "县级区域", businessType = BusinessType.DELETE) | |||
@DeleteMapping("/{XZQDMs}") | |||
public AjaxResult remove(@PathVariable String[] XZQDMs) | |||
{ | |||
return toAjax(tGisXjxzqService.deleteTGisXjxzqByXZQDMs(XZQDMs)); | |||
} | |||
/** | |||
* 打印县级区域 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:xjxzq:print')") | |||
@Log(title = "县级区域", businessType = BusinessType.PRINT) | |||
@GetMapping("/print") | |||
public void printPdf(TGisXjxzq tGisXjxzq, HttpServletResponse response) throws Exception{ | |||
List<TGisXjxzq> list = tGisXjxzqService.selectTGisXjxzqList(tGisXjxzq); | |||
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<String[]> 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); | |||
} | |||
} |
@@ -0,0 +1,185 @@ | |||
package com.ruoyi.web.controller.business; | |||
import com.ruoyi.business.domain.TTaskExport; | |||
import com.ruoyi.business.service.ITTaskExportService; | |||
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.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 org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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 rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@RestController | |||
@RequestMapping("/business/export") | |||
public class TTaskExportController extends BaseController | |||
{ | |||
@Autowired | |||
private ITTaskExportService tTaskExportService; | |||
/** | |||
* 查询导出任务列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:list')") | |||
@GetMapping("/list") | |||
public TableDataInfo list(TTaskExport tTaskExport) | |||
{ | |||
startPage(); | |||
List<TTaskExport> list = tTaskExportService.selectTTaskExportList(tTaskExport); | |||
return getDataTable(list); | |||
} | |||
/** | |||
* 导出导出任务列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:export')") | |||
@Log(title = "导出任务", businessType = BusinessType.EXPORT) | |||
@PostMapping("/export") | |||
public void export(HttpServletResponse response, TTaskExport tTaskExport) | |||
{ | |||
List<TTaskExport> list = tTaskExportService.selectTTaskExportList(tTaskExport); | |||
ExcelUtil<TTaskExport> util = new ExcelUtil<TTaskExport>(TTaskExport.class); | |||
util.exportExcel(response, list, "导出任务数据"); | |||
} | |||
/** | |||
* 导出任务导入模板 | |||
*/ | |||
@PostMapping("/importTemplate") | |||
public void importTemplate(HttpServletResponse response) { | |||
ExcelUtil<TTaskExport> util = new ExcelUtil<TTaskExport>(TTaskExport.class); | |||
util.importTemplateExcel(response, "导出任务数据"); | |||
} | |||
/** | |||
* 导出任务导入 | |||
*/ | |||
@Log(title = "导出任务", businessType = BusinessType.IMPORT) | |||
@PreAuthorize("@ss.hasPermi('business:export:import')") | |||
@PostMapping("/importData") | |||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { | |||
ExcelUtil<TTaskExport> util = new ExcelUtil<TTaskExport>(TTaskExport.class); | |||
List<TTaskExport> list = util.importExcel(file.getInputStream(), 0); | |||
String message = tTaskExportService.importTTaskExport(list, updateSupport, getUsername()); | |||
return AjaxResult.success(message); | |||
} | |||
/** | |||
* 获取导出任务详细信息 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:query')") | |||
@GetMapping(value = "/{id}") | |||
public AjaxResult getInfo(@PathVariable("id") Long id) | |||
{ | |||
TTaskExport detail = tTaskExportService.selectTTaskExportById(id); | |||
TranslateUtils.translate(detail, false); | |||
return success(detail); | |||
} | |||
/** | |||
* 新增导出任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:add')") | |||
@Log(title = "导出任务", businessType = BusinessType.INSERT) | |||
@PostMapping | |||
public AjaxResult add(@RequestBody TTaskExport tTaskExport) | |||
{ | |||
return toAjax(tTaskExportService.insertTTaskExport(tTaskExport)); | |||
} | |||
/** | |||
* 修改导出任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:edit')") | |||
@Log(title = "导出任务", businessType = BusinessType.UPDATE) | |||
@PutMapping | |||
public AjaxResult edit(@RequestBody TTaskExport tTaskExport) | |||
{ | |||
return toAjax(tTaskExportService.updateTTaskExport(tTaskExport)); | |||
} | |||
/** | |||
* 删除导出任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:remove')") | |||
@Log(title = "导出任务", businessType = BusinessType.DELETE) | |||
@DeleteMapping("/{ids}") | |||
public AjaxResult remove(@PathVariable Long[] ids) | |||
{ | |||
return toAjax(tTaskExportService.deleteTTaskExportByIds(ids)); | |||
} | |||
/** | |||
* 打印导出任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:export:print')") | |||
@Log(title = "导出任务", businessType = BusinessType.PRINT) | |||
@GetMapping("/print") | |||
public void printPdf(TTaskExport tTaskExport, HttpServletResponse response) throws Exception{ | |||
List<TTaskExport> list = tTaskExportService.selectTTaskExportList(tTaskExport); | |||
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<String[]> 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); | |||
} | |||
} |
@@ -0,0 +1,185 @@ | |||
package com.ruoyi.web.controller.business; | |||
import com.ruoyi.business.domain.TTaskImport; | |||
import com.ruoyi.business.service.ITTaskImportService; | |||
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.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 org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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 rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@RestController | |||
@RequestMapping("/business/import") | |||
public class TTaskImportController extends BaseController | |||
{ | |||
@Autowired | |||
private ITTaskImportService tTaskImportService; | |||
/** | |||
* 查询导入任务列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:list')") | |||
@GetMapping("/list") | |||
public TableDataInfo list(TTaskImport tTaskImport) | |||
{ | |||
startPage(); | |||
List<TTaskImport> list = tTaskImportService.selectTTaskImportList(tTaskImport); | |||
return getDataTable(list); | |||
} | |||
/** | |||
* 导出导入任务列表 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:export')") | |||
@Log(title = "导入任务", businessType = BusinessType.EXPORT) | |||
@PostMapping("/export") | |||
public void export(HttpServletResponse response, TTaskImport tTaskImport) | |||
{ | |||
List<TTaskImport> list = tTaskImportService.selectTTaskImportList(tTaskImport); | |||
ExcelUtil<TTaskImport> util = new ExcelUtil<TTaskImport>(TTaskImport.class); | |||
util.exportExcel(response, list, "导入任务数据"); | |||
} | |||
/** | |||
* 导入任务导入模板 | |||
*/ | |||
@PostMapping("/importTemplate") | |||
public void importTemplate(HttpServletResponse response) { | |||
ExcelUtil<TTaskImport> util = new ExcelUtil<TTaskImport>(TTaskImport.class); | |||
util.importTemplateExcel(response, "导入任务数据"); | |||
} | |||
/** | |||
* 导入任务导入 | |||
*/ | |||
@Log(title = "导入任务", businessType = BusinessType.IMPORT) | |||
@PreAuthorize("@ss.hasPermi('business:import:import')") | |||
@PostMapping("/importData") | |||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { | |||
ExcelUtil<TTaskImport> util = new ExcelUtil<TTaskImport>(TTaskImport.class); | |||
List<TTaskImport> list = util.importExcel(file.getInputStream(), 0); | |||
String message = tTaskImportService.importTTaskImport(list, updateSupport, getUsername()); | |||
return AjaxResult.success(message); | |||
} | |||
/** | |||
* 获取导入任务详细信息 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:query')") | |||
@GetMapping(value = "/{id}") | |||
public AjaxResult getInfo(@PathVariable("id") Long id) | |||
{ | |||
TTaskImport detail = tTaskImportService.selectTTaskImportById(id); | |||
TranslateUtils.translate(detail, false); | |||
return success(detail); | |||
} | |||
/** | |||
* 新增导入任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:add')") | |||
@Log(title = "导入任务", businessType = BusinessType.INSERT) | |||
@PostMapping | |||
public AjaxResult add(@RequestBody TTaskImport tTaskImport) | |||
{ | |||
return toAjax(tTaskImportService.insertTTaskImport(tTaskImport)); | |||
} | |||
/** | |||
* 修改导入任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:edit')") | |||
@Log(title = "导入任务", businessType = BusinessType.UPDATE) | |||
@PutMapping | |||
public AjaxResult edit(@RequestBody TTaskImport tTaskImport) | |||
{ | |||
return toAjax(tTaskImportService.updateTTaskImport(tTaskImport)); | |||
} | |||
/** | |||
* 删除导入任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:remove')") | |||
@Log(title = "导入任务", businessType = BusinessType.DELETE) | |||
@DeleteMapping("/{ids}") | |||
public AjaxResult remove(@PathVariable Long[] ids) | |||
{ | |||
return toAjax(tTaskImportService.deleteTTaskImportByIds(ids)); | |||
} | |||
/** | |||
* 打印导入任务 | |||
*/ | |||
@PreAuthorize("@ss.hasPermi('business:import:print')") | |||
@Log(title = "导入任务", businessType = BusinessType.PRINT) | |||
@GetMapping("/print") | |||
public void printPdf(TTaskImport tTaskImport, HttpServletResponse response) throws Exception{ | |||
List<TTaskImport> list = tTaskImportService.selectTTaskImportList(tTaskImport); | |||
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<String[]> 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); | |||
} | |||
} |
@@ -0,0 +1,126 @@ | |||
package com.ruoyi.business.domain; | |||
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_gis_cjqy | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public class TGisCjqy extends BaseEntity | |||
{ | |||
private static final long serialVersionUID = 1L; | |||
/** 区划代码 */ | |||
@Excel(name = "区划代码") | |||
private String CJQYDM; | |||
/** 区划名称 */ | |||
@Excel(name = "区划名称") | |||
private String CJQYMC; | |||
/** 空间矢量 */ | |||
private String theGeom; | |||
/** 标识码 */ | |||
@Excel(name = "标识码") | |||
private Long BSM; | |||
/** 要素代码 */ | |||
@Excel(name = "要素代码") | |||
private String YSDM; | |||
/** fid */ | |||
private Long fid; | |||
/** 部门级联代码 */ | |||
@Excel(name = "部门级联代码") | |||
private String importCode; | |||
public void setCJQYDM(String CJQYDM) | |||
{ | |||
this.CJQYDM = CJQYDM; | |||
} | |||
public String getCJQYDM() | |||
{ | |||
return CJQYDM; | |||
} | |||
public void setCJQYMC(String CJQYMC) | |||
{ | |||
this.CJQYMC = CJQYMC; | |||
} | |||
public String getCJQYMC() | |||
{ | |||
return CJQYMC; | |||
} | |||
public void setTheGeom(String theGeom) | |||
{ | |||
this.theGeom = theGeom; | |||
} | |||
public String getTheGeom() | |||
{ | |||
return theGeom; | |||
} | |||
public void setBSM(Long BSM) | |||
{ | |||
this.BSM = BSM; | |||
} | |||
public Long getBSM() | |||
{ | |||
return BSM; | |||
} | |||
public void setYSDM(String YSDM) | |||
{ | |||
this.YSDM = YSDM; | |||
} | |||
public String getYSDM() | |||
{ | |||
return YSDM; | |||
} | |||
public void setFid(Long fid) | |||
{ | |||
this.fid = fid; | |||
} | |||
public Long getFid() | |||
{ | |||
return fid; | |||
} | |||
public void setImportCode(String importCode) | |||
{ | |||
this.importCode = importCode; | |||
} | |||
public String getImportCode() | |||
{ | |||
return importCode; | |||
} | |||
@Override | |||
public String toString() { | |||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
.append("CJQYDM", getCJQYDM()) | |||
.append("CJQYMC", getCJQYMC()) | |||
.append("theGeom", getTheGeom()) | |||
.append("BSM", getBSM()) | |||
.append("YSDM", getYSDM()) | |||
.append("fid", getFid()) | |||
.append("importCode", getImportCode()) | |||
.toString(); | |||
} | |||
} |
@@ -0,0 +1,126 @@ | |||
package com.ruoyi.business.domain; | |||
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_gis_xjqy | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public class TGisXjqy extends BaseEntity | |||
{ | |||
private static final long serialVersionUID = 1L; | |||
/** 区划代码 */ | |||
@Excel(name = "区划代码") | |||
private String XJQYDM; | |||
/** 区划名称 */ | |||
@Excel(name = "区划名称") | |||
private String XJQYMC; | |||
/** 空间矢量 */ | |||
private String theGeom; | |||
/** 标识码 */ | |||
@Excel(name = "标识码") | |||
private Long BSM; | |||
/** 要素代码 */ | |||
@Excel(name = "要素代码") | |||
private String YSDM; | |||
/** fid */ | |||
private Long fid; | |||
/** 部门级联代码 */ | |||
@Excel(name = "部门级联代码") | |||
private String importCode; | |||
public void setXJQYDM(String XJQYDM) | |||
{ | |||
this.XJQYDM = XJQYDM; | |||
} | |||
public String getXJQYDM() | |||
{ | |||
return XJQYDM; | |||
} | |||
public void setXJQYMC(String XJQYMC) | |||
{ | |||
this.XJQYMC = XJQYMC; | |||
} | |||
public String getXJQYMC() | |||
{ | |||
return XJQYMC; | |||
} | |||
public void setTheGeom(String theGeom) | |||
{ | |||
this.theGeom = theGeom; | |||
} | |||
public String getTheGeom() | |||
{ | |||
return theGeom; | |||
} | |||
public void setBSM(Long BSM) | |||
{ | |||
this.BSM = BSM; | |||
} | |||
public Long getBSM() | |||
{ | |||
return BSM; | |||
} | |||
public void setYSDM(String YSDM) | |||
{ | |||
this.YSDM = YSDM; | |||
} | |||
public String getYSDM() | |||
{ | |||
return YSDM; | |||
} | |||
public void setFid(Long fid) | |||
{ | |||
this.fid = fid; | |||
} | |||
public Long getFid() | |||
{ | |||
return fid; | |||
} | |||
public void setImportCode(String importCode) | |||
{ | |||
this.importCode = importCode; | |||
} | |||
public String getImportCode() | |||
{ | |||
return importCode; | |||
} | |||
@Override | |||
public String toString() { | |||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
.append("XJQYDM", getXJQYDM()) | |||
.append("XJQYMC", getXJQYMC()) | |||
.append("theGeom", getTheGeom()) | |||
.append("BSM", getBSM()) | |||
.append("YSDM", getYSDM()) | |||
.append("fid", getFid()) | |||
.append("importCode", getImportCode()) | |||
.toString(); | |||
} | |||
} |
@@ -0,0 +1,126 @@ | |||
package com.ruoyi.business.domain; | |||
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_gis_xjxzq | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public class TGisXjxzq extends BaseEntity | |||
{ | |||
private static final long serialVersionUID = 1L; | |||
/** 区划代码 */ | |||
@Excel(name = "区划代码") | |||
private String XZQDM; | |||
/** 区划名称 */ | |||
@Excel(name = "区划名称") | |||
private String XZQMC; | |||
/** 空间矢量 */ | |||
private String theGeom; | |||
/** 标识码 */ | |||
@Excel(name = "标识码") | |||
private Long BSM; | |||
/** 要素代码 */ | |||
@Excel(name = "要素代码") | |||
private String YSDM; | |||
/** fid */ | |||
private Long fid; | |||
/** 部门级联代码 */ | |||
@Excel(name = "部门级联代码") | |||
private String importCode; | |||
public void setXZQDM(String XZQDM) | |||
{ | |||
this.XZQDM = XZQDM; | |||
} | |||
public String getXZQDM() | |||
{ | |||
return XZQDM; | |||
} | |||
public void setXZQMC(String XZQMC) | |||
{ | |||
this.XZQMC = XZQMC; | |||
} | |||
public String getXZQMC() | |||
{ | |||
return XZQMC; | |||
} | |||
public void setTheGeom(String theGeom) | |||
{ | |||
this.theGeom = theGeom; | |||
} | |||
public String getTheGeom() | |||
{ | |||
return theGeom; | |||
} | |||
public void setBSM(Long BSM) | |||
{ | |||
this.BSM = BSM; | |||
} | |||
public Long getBSM() | |||
{ | |||
return BSM; | |||
} | |||
public void setYSDM(String YSDM) | |||
{ | |||
this.YSDM = YSDM; | |||
} | |||
public String getYSDM() | |||
{ | |||
return YSDM; | |||
} | |||
public void setFid(Long fid) | |||
{ | |||
this.fid = fid; | |||
} | |||
public Long getFid() | |||
{ | |||
return fid; | |||
} | |||
public void setImportCode(String importCode) | |||
{ | |||
this.importCode = importCode; | |||
} | |||
public String getImportCode() | |||
{ | |||
return importCode; | |||
} | |||
@Override | |||
public String toString() { | |||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
.append("XZQDM", getXZQDM()) | |||
.append("XZQMC", getXZQMC()) | |||
.append("theGeom", getTheGeom()) | |||
.append("BSM", getBSM()) | |||
.append("YSDM", getYSDM()) | |||
.append("fid", getFid()) | |||
.append("importCode", getImportCode()) | |||
.toString(); | |||
} | |||
} |
@@ -0,0 +1,145 @@ | |||
package com.ruoyi.business.domain; | |||
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_task_export | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public class TTaskExport extends BaseEntity | |||
{ | |||
private static final long serialVersionUID = 1L; | |||
/** id */ | |||
private Long id; | |||
/** 行政区划id */ | |||
private Long deptId; | |||
/** 行政区划名称 */ | |||
@Excel(name = "行政区划名称") | |||
private String deptName; | |||
/** 行政区划代码(不作为查询条件) */ | |||
@Excel(name = "行政区划代码") | |||
private String orgCode; | |||
/** 文件格式 字典 */ | |||
@Excel(name = "文件格式", dictType = "file_type") | |||
private String fileType; | |||
/** 坐标系 字典 */ | |||
@Excel(name = "坐标系", dictType = "coordinate_system") | |||
private String coordinateSystem; | |||
/** 文件路径(这个是生成文件后回写的) */ | |||
@Excel(name = "文件路径") | |||
private String fileUrl; | |||
/** 任务状态 字典 */ | |||
@Excel(name = "任务状态", dictType = "task_status") | |||
private String taskStatus; | |||
public void setId(Long id) | |||
{ | |||
this.id = id; | |||
} | |||
public Long getId() | |||
{ | |||
return id; | |||
} | |||
public void setDeptId(Long deptId) | |||
{ | |||
this.deptId = deptId; | |||
} | |||
public Long getDeptId() | |||
{ | |||
return deptId; | |||
} | |||
public void setDeptName(String deptName) | |||
{ | |||
this.deptName = deptName; | |||
} | |||
public String getDeptName() | |||
{ | |||
return deptName; | |||
} | |||
public void setOrgCode(String orgCode) | |||
{ | |||
this.orgCode = orgCode; | |||
} | |||
public String getOrgCode() | |||
{ | |||
return orgCode; | |||
} | |||
public void setFileType(String fileType) | |||
{ | |||
this.fileType = fileType; | |||
} | |||
public String getFileType() | |||
{ | |||
return fileType; | |||
} | |||
public void setCoordinateSystem(String coordinateSystem) | |||
{ | |||
this.coordinateSystem = coordinateSystem; | |||
} | |||
public String getCoordinateSystem() | |||
{ | |||
return coordinateSystem; | |||
} | |||
public void setFileUrl(String fileUrl) | |||
{ | |||
this.fileUrl = fileUrl; | |||
} | |||
public String getFileUrl() | |||
{ | |||
return fileUrl; | |||
} | |||
public void setTaskStatus(String taskStatus) | |||
{ | |||
this.taskStatus = taskStatus; | |||
} | |||
public String getTaskStatus() | |||
{ | |||
return taskStatus; | |||
} | |||
@Override | |||
public String toString() { | |||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
.append("id", getId()) | |||
.append("deptId", getDeptId()) | |||
.append("deptName", getDeptName()) | |||
.append("orgCode", getOrgCode()) | |||
.append("fileType", getFileType()) | |||
.append("coordinateSystem", getCoordinateSystem()) | |||
.append("fileUrl", getFileUrl()) | |||
.append("taskStatus", getTaskStatus()) | |||
.append("createBy", getCreateBy()) | |||
.append("createTime", getCreateTime()) | |||
.append("updateBy", getUpdateBy()) | |||
.append("updateTime", getUpdateTime()) | |||
.toString(); | |||
} | |||
} |
@@ -0,0 +1,160 @@ | |||
package com.ruoyi.business.domain; | |||
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_task_import | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public class TTaskImport extends BaseEntity | |||
{ | |||
private static final long serialVersionUID = 1L; | |||
/** id */ | |||
private Long id; | |||
/** 行政区划id */ | |||
private Long deptId; | |||
/** 行政区划名称 */ | |||
@Excel(name = "行政区划名称") | |||
private String deptName; | |||
/** 行政区划代码(不作为查询条件) */ | |||
@Excel(name = "行政区划代码") | |||
private String orgCode; | |||
/** 文件格式 字典 */ | |||
@Excel(name = "文件格式", dictType = "file_type") | |||
private String fileType; | |||
/** 导入方式 字典 */ | |||
@Excel(name = "导入方式", dictType = "import_type") | |||
private String importType; | |||
/** 坐标系 字典 */ | |||
@Excel(name = "坐标系", dictType = "coordinate_system") | |||
private String coordinateSystem; | |||
/** 文件路径(这是上传文件的路径) */ | |||
@Excel(name = "文件路径") | |||
private String fileUrl; | |||
/** 任务状态 字典 */ | |||
@Excel(name = "任务状态", dictType = "task_status") | |||
private String taskStatus; | |||
public void setId(Long id) | |||
{ | |||
this.id = id; | |||
} | |||
public Long getId() | |||
{ | |||
return id; | |||
} | |||
public void setDeptId(Long deptId) | |||
{ | |||
this.deptId = deptId; | |||
} | |||
public Long getDeptId() | |||
{ | |||
return deptId; | |||
} | |||
public void setDeptName(String deptName) | |||
{ | |||
this.deptName = deptName; | |||
} | |||
public String getDeptName() | |||
{ | |||
return deptName; | |||
} | |||
public void setOrgCode(String orgCode) | |||
{ | |||
this.orgCode = orgCode; | |||
} | |||
public String getOrgCode() | |||
{ | |||
return orgCode; | |||
} | |||
public void setFileType(String fileType) | |||
{ | |||
this.fileType = fileType; | |||
} | |||
public String getFileType() | |||
{ | |||
return fileType; | |||
} | |||
public void setImportType(String importType) | |||
{ | |||
this.importType = importType; | |||
} | |||
public String getImportType() | |||
{ | |||
return importType; | |||
} | |||
public void setCoordinateSystem(String coordinateSystem) | |||
{ | |||
this.coordinateSystem = coordinateSystem; | |||
} | |||
public String getCoordinateSystem() | |||
{ | |||
return coordinateSystem; | |||
} | |||
public void setFileUrl(String fileUrl) | |||
{ | |||
this.fileUrl = fileUrl; | |||
} | |||
public String getFileUrl() | |||
{ | |||
return fileUrl; | |||
} | |||
public void setTaskStatus(String taskStatus) | |||
{ | |||
this.taskStatus = taskStatus; | |||
} | |||
public String getTaskStatus() | |||
{ | |||
return taskStatus; | |||
} | |||
@Override | |||
public String toString() { | |||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
.append("id", getId()) | |||
.append("deptId", getDeptId()) | |||
.append("deptName", getDeptName()) | |||
.append("orgCode", getOrgCode()) | |||
.append("fileType", getFileType()) | |||
.append("importType", getImportType()) | |||
.append("coordinateSystem", getCoordinateSystem()) | |||
.append("fileUrl", getFileUrl()) | |||
.append("taskStatus", getTaskStatus()) | |||
.append("createBy", getCreateBy()) | |||
.append("createTime", getCreateTime()) | |||
.append("updateBy", getUpdateBy()) | |||
.append("updateTime", getUpdateTime()) | |||
.toString(); | |||
} | |||
} |
@@ -0,0 +1,77 @@ | |||
package com.ruoyi.business.mapper; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisCjqy; | |||
/** | |||
* 村级区域Mapper接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface TGisCjqyMapper | |||
{ | |||
/** | |||
* 查询村级区域 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 村级区域 | |||
*/ | |||
public TGisCjqy selectTGisCjqyByCJQYDM(String CJQYDM); | |||
/** | |||
* 查询村级区域列表 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 村级区域集合 | |||
*/ | |||
public List<TGisCjqy> selectTGisCjqyList(TGisCjqy tGisCjqy); | |||
/** | |||
* 新增村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisCjqy(TGisCjqy tGisCjqy); | |||
/** | |||
* 批量新增村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisCjqyBatch(List<TGisCjqy> list); | |||
/** | |||
* 修改村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisCjqy(TGisCjqy tGisCjqy); | |||
/** | |||
* 批量修改 村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisCjqyBatch(List<TGisCjqy> list); | |||
/** | |||
* 删除村级区域 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisCjqyByCJQYDM(String CJQYDM); | |||
/** | |||
* 批量删除村级区域 | |||
* | |||
* @param CJQYDMs 需要删除的数据主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisCjqyByCJQYDMs(String[] CJQYDMs); | |||
} |
@@ -0,0 +1,77 @@ | |||
package com.ruoyi.business.mapper; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisXjqy; | |||
/** | |||
* 乡级区域Mapper接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface TGisXjqyMapper | |||
{ | |||
/** | |||
* 查询乡级区域 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 乡级区域 | |||
*/ | |||
public TGisXjqy selectTGisXjqyByXJQYDM(String XJQYDM); | |||
/** | |||
* 查询乡级区域列表 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 乡级区域集合 | |||
*/ | |||
public List<TGisXjqy> selectTGisXjqyList(TGisXjqy tGisXjqy); | |||
/** | |||
* 新增乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjqy(TGisXjqy tGisXjqy); | |||
/** | |||
* 批量新增乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjqyBatch(List<TGisXjqy> list); | |||
/** | |||
* 修改乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjqy(TGisXjqy tGisXjqy); | |||
/** | |||
* 批量修改 乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjqyBatch(List<TGisXjqy> list); | |||
/** | |||
* 删除乡级区域 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjqyByXJQYDM(String XJQYDM); | |||
/** | |||
* 批量删除乡级区域 | |||
* | |||
* @param XJQYDMs 需要删除的数据主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjqyByXJQYDMs(String[] XJQYDMs); | |||
} |
@@ -0,0 +1,77 @@ | |||
package com.ruoyi.business.mapper; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisXjxzq; | |||
/** | |||
* 县级区域Mapper接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface TGisXjxzqMapper | |||
{ | |||
/** | |||
* 查询县级区域 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 县级区域 | |||
*/ | |||
public TGisXjxzq selectTGisXjxzqByXZQDM(String XZQDM); | |||
/** | |||
* 查询县级区域列表 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 县级区域集合 | |||
*/ | |||
public List<TGisXjxzq> selectTGisXjxzqList(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 新增县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjxzq(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 批量新增县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjxzqBatch(List<TGisXjxzq> list); | |||
/** | |||
* 修改县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjxzq(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 批量修改 县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjxzqBatch(List<TGisXjxzq> list); | |||
/** | |||
* 删除县级区域 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjxzqByXZQDM(String XZQDM); | |||
/** | |||
* 批量删除县级区域 | |||
* | |||
* @param XZQDMs 需要删除的数据主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjxzqByXZQDMs(String[] XZQDMs); | |||
} |
@@ -0,0 +1,77 @@ | |||
package com.ruoyi.business.mapper; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TTaskExport; | |||
/** | |||
* 导出任务Mapper接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface TTaskExportMapper | |||
{ | |||
/** | |||
* 查询导出任务 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 导出任务 | |||
*/ | |||
public TTaskExport selectTTaskExportById(Long id); | |||
/** | |||
* 查询导出任务列表 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 导出任务集合 | |||
*/ | |||
public List<TTaskExport> selectTTaskExportList(TTaskExport tTaskExport); | |||
/** | |||
* 新增导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskExport(TTaskExport tTaskExport); | |||
/** | |||
* 批量新增导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskExportBatch(List<TTaskExport> list); | |||
/** | |||
* 修改导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskExport(TTaskExport tTaskExport); | |||
/** | |||
* 批量修改 导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskExportBatch(List<TTaskExport> list); | |||
/** | |||
* 删除导出任务 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskExportById(Long id); | |||
/** | |||
* 批量删除导出任务 | |||
* | |||
* @param ids 需要删除的数据主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskExportByIds(Long[] ids); | |||
} |
@@ -0,0 +1,77 @@ | |||
package com.ruoyi.business.mapper; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TTaskImport; | |||
/** | |||
* 导入任务Mapper接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface TTaskImportMapper | |||
{ | |||
/** | |||
* 查询导入任务 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 导入任务 | |||
*/ | |||
public TTaskImport selectTTaskImportById(Long id); | |||
/** | |||
* 查询导入任务列表 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 导入任务集合 | |||
*/ | |||
public List<TTaskImport> selectTTaskImportList(TTaskImport tTaskImport); | |||
/** | |||
* 新增导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskImport(TTaskImport tTaskImport); | |||
/** | |||
* 批量新增导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskImportBatch(List<TTaskImport> list); | |||
/** | |||
* 修改导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskImport(TTaskImport tTaskImport); | |||
/** | |||
* 批量修改 导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskImportBatch(List<TTaskImport> list); | |||
/** | |||
* 删除导入任务 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskImportById(Long id); | |||
/** | |||
* 批量删除导入任务 | |||
* | |||
* @param ids 需要删除的数据主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskImportByIds(Long[] ids); | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.ruoyi.business.service; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisCjqy; | |||
/** | |||
* 村级区域Service接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface ITGisCjqyService | |||
{ | |||
/** | |||
* 查询村级区域 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 村级区域 | |||
*/ | |||
public TGisCjqy selectTGisCjqyByCJQYDM(String CJQYDM); | |||
/** | |||
* 查询村级区域列表 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 村级区域集合 | |||
*/ | |||
public List<TGisCjqy> selectTGisCjqyList(TGisCjqy tGisCjqy); | |||
/** | |||
* 导入村级区域数据 | |||
* | |||
* @param list 村级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param userName 操作用户 | |||
* @return 结果 | |||
*/ | |||
public String importTGisCjqy(List<TGisCjqy> list, Boolean isUpdateSupport, String userName); | |||
/** | |||
* 新增村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisCjqy(TGisCjqy tGisCjqy); | |||
/** | |||
* 批量新增村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisCjqyBatch(List<TGisCjqy> list); | |||
/** | |||
* 修改村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisCjqy(TGisCjqy tGisCjqy); | |||
/** | |||
* 批量修改 村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisCjqyBatch(List<TGisCjqy> list); | |||
/** | |||
* 批量删除村级区域 | |||
* | |||
* @param CJQYDMs 需要删除的村级区域主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisCjqyByCJQYDMs(String[] CJQYDMs); | |||
/** | |||
* 删除村级区域信息 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisCjqyByCJQYDM(String CJQYDM); | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.ruoyi.business.service; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisXjqy; | |||
/** | |||
* 乡级区域Service接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface ITGisXjqyService | |||
{ | |||
/** | |||
* 查询乡级区域 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 乡级区域 | |||
*/ | |||
public TGisXjqy selectTGisXjqyByXJQYDM(String XJQYDM); | |||
/** | |||
* 查询乡级区域列表 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 乡级区域集合 | |||
*/ | |||
public List<TGisXjqy> selectTGisXjqyList(TGisXjqy tGisXjqy); | |||
/** | |||
* 导入乡级区域数据 | |||
* | |||
* @param list 乡级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param userName 操作用户 | |||
* @return 结果 | |||
*/ | |||
public String importTGisXjqy(List<TGisXjqy> list, Boolean isUpdateSupport, String userName); | |||
/** | |||
* 新增乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjqy(TGisXjqy tGisXjqy); | |||
/** | |||
* 批量新增乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjqyBatch(List<TGisXjqy> list); | |||
/** | |||
* 修改乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjqy(TGisXjqy tGisXjqy); | |||
/** | |||
* 批量修改 乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjqyBatch(List<TGisXjqy> list); | |||
/** | |||
* 批量删除乡级区域 | |||
* | |||
* @param XJQYDMs 需要删除的乡级区域主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjqyByXJQYDMs(String[] XJQYDMs); | |||
/** | |||
* 删除乡级区域信息 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjqyByXJQYDM(String XJQYDM); | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.ruoyi.business.service; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TGisXjxzq; | |||
/** | |||
* 县级区域Service接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface ITGisXjxzqService | |||
{ | |||
/** | |||
* 查询县级区域 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 县级区域 | |||
*/ | |||
public TGisXjxzq selectTGisXjxzqByXZQDM(String XZQDM); | |||
/** | |||
* 查询县级区域列表 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 县级区域集合 | |||
*/ | |||
public List<TGisXjxzq> selectTGisXjxzqList(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 导入县级区域数据 | |||
* | |||
* @param list 县级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param userName 操作用户 | |||
* @return 结果 | |||
*/ | |||
public String importTGisXjxzq(List<TGisXjxzq> list, Boolean isUpdateSupport, String userName); | |||
/** | |||
* 新增县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjxzq(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 批量新增县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int insertTGisXjxzqBatch(List<TGisXjxzq> list); | |||
/** | |||
* 修改县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjxzq(TGisXjxzq tGisXjxzq); | |||
/** | |||
* 批量修改 县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
public int updateTGisXjxzqBatch(List<TGisXjxzq> list); | |||
/** | |||
* 批量删除县级区域 | |||
* | |||
* @param XZQDMs 需要删除的县级区域主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjxzqByXZQDMs(String[] XZQDMs); | |||
/** | |||
* 删除县级区域信息 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTGisXjxzqByXZQDM(String XZQDM); | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.ruoyi.business.service; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TTaskExport; | |||
/** | |||
* 导出任务Service接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface ITTaskExportService | |||
{ | |||
/** | |||
* 查询导出任务 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 导出任务 | |||
*/ | |||
public TTaskExport selectTTaskExportById(Long id); | |||
/** | |||
* 查询导出任务列表 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 导出任务集合 | |||
*/ | |||
public List<TTaskExport> selectTTaskExportList(TTaskExport tTaskExport); | |||
/** | |||
* 导入导出任务数据 | |||
* | |||
* @param list 导出任务数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param userName 操作用户 | |||
* @return 结果 | |||
*/ | |||
public String importTTaskExport(List<TTaskExport> list, Boolean isUpdateSupport, String userName); | |||
/** | |||
* 新增导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskExport(TTaskExport tTaskExport); | |||
/** | |||
* 批量新增导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskExportBatch(List<TTaskExport> list); | |||
/** | |||
* 修改导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskExport(TTaskExport tTaskExport); | |||
/** | |||
* 批量修改 导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskExportBatch(List<TTaskExport> list); | |||
/** | |||
* 批量删除导出任务 | |||
* | |||
* @param ids 需要删除的导出任务主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskExportByIds(Long[] ids); | |||
/** | |||
* 删除导出任务信息 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskExportById(Long id); | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.ruoyi.business.service; | |||
import java.util.List; | |||
import com.ruoyi.business.domain.TTaskImport; | |||
/** | |||
* 导入任务Service接口 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
public interface ITTaskImportService | |||
{ | |||
/** | |||
* 查询导入任务 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 导入任务 | |||
*/ | |||
public TTaskImport selectTTaskImportById(Long id); | |||
/** | |||
* 查询导入任务列表 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 导入任务集合 | |||
*/ | |||
public List<TTaskImport> selectTTaskImportList(TTaskImport tTaskImport); | |||
/** | |||
* 导入导入任务数据 | |||
* | |||
* @param list 导入任务数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param userName 操作用户 | |||
* @return 结果 | |||
*/ | |||
public String importTTaskImport(List<TTaskImport> list, Boolean isUpdateSupport, String userName); | |||
/** | |||
* 新增导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskImport(TTaskImport tTaskImport); | |||
/** | |||
* 批量新增导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int insertTTaskImportBatch(List<TTaskImport> list); | |||
/** | |||
* 修改导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskImport(TTaskImport tTaskImport); | |||
/** | |||
* 批量修改 导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
public int updateTTaskImportBatch(List<TTaskImport> list); | |||
/** | |||
* 批量删除导入任务 | |||
* | |||
* @param ids 需要删除的导入任务主键集合 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskImportByIds(Long[] ids); | |||
/** | |||
* 删除导入任务信息 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 结果 | |||
*/ | |||
public int deleteTTaskImportById(Long id); | |||
} |
@@ -0,0 +1,207 @@ | |||
package com.ruoyi.business.service.impl; | |||
import com.ruoyi.business.domain.TGisCjqy; | |||
import com.ruoyi.business.mapper.TGisCjqyMapper; | |||
import com.ruoyi.business.service.ITGisCjqyService; | |||
import com.ruoyi.common.exception.ServiceException; | |||
import com.ruoyi.common.utils.DateUtils; | |||
import com.ruoyi.common.utils.StringUtils; | |||
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 org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 村级区域Service业务层处理 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@Service | |||
public class TGisCjqyServiceImpl implements ITGisCjqyService | |||
{ | |||
@Autowired | |||
private TGisCjqyMapper tGisCjqyMapper; | |||
/** | |||
* 查询村级区域 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 村级区域 | |||
*/ | |||
@Override | |||
public TGisCjqy selectTGisCjqyByCJQYDM(String CJQYDM) | |||
{ | |||
return tGisCjqyMapper.selectTGisCjqyByCJQYDM(CJQYDM); | |||
} | |||
/** | |||
* 查询村级区域列表 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 村级区域 | |||
*/ | |||
@Override | |||
public List<TGisCjqy> selectTGisCjqyList(TGisCjqy tGisCjqy) | |||
{ | |||
return tGisCjqyMapper.selectTGisCjqyList(tGisCjqy); | |||
} | |||
/** | |||
* 导入村级区域数据 | |||
* | |||
* @param list 村级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param operName 操作用户 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public String importTGisCjqy(List<TGisCjqy> 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<TGisCjqy> insertList = Lists.newArrayList(); | |||
List<TGisCjqy> updateList = Lists.newArrayList(); | |||
// 检验excel表中 【xxx】 是否存在重复,有重复的终止导入 | |||
List<String> repeatList = list.stream().collect(Collectors.groupingBy(TGisCjqy::getImportCode, 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("<br/>" + failureNum + "、项目名 " + item + " 重复"); | |||
} | |||
return failureMsg.toString(); | |||
} | |||
// 缓存已存在的数据 | |||
TGisCjqy tGisCjqy = new TGisCjqy(); | |||
List<TGisCjqy> tGisCjqyList = tGisCjqyMapper.selectTGisCjqyList(tGisCjqy); | |||
for (TGisCjqy item : list) { | |||
String code = item.getImportCode(); | |||
List<TGisCjqy> filters = tGisCjqyList.stream().filter(a -> a.getImportCode().equals(code)).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.setCJQYDM(filters.get(0).getCJQYDM()); | |||
updateList.add(item); | |||
successNum++; | |||
} | |||
} | |||
} | |||
// 执行更新或者保存 | |||
List<List<TGisCjqy>> insertSplists = ListUtils.partition(insertList, 50); | |||
insertSplists.forEach(insertSplist ->{ | |||
tGisCjqyMapper.insertTGisCjqyBatch(insertSplist); | |||
}); | |||
List<List<TGisCjqy>> updateSplists = ListUtils.partition(updateList, 30); | |||
updateSplists.forEach(updateSplist ->{ | |||
tGisCjqyMapper.updateTGisCjqyBatch(updateSplist); | |||
}); | |||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); | |||
return successMsg.toString(); | |||
} | |||
/** | |||
* 新增村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int insertTGisCjqy(TGisCjqy tGisCjqy) | |||
{ | |||
return tGisCjqyMapper.insertTGisCjqy(tGisCjqy); | |||
} | |||
/** | |||
* 批量新增村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int insertTGisCjqyBatch(List<TGisCjqy> list){ | |||
List<List<TGisCjqy>> splists = ListUtils.partition(list, 50); | |||
splists.forEach(splist->{ | |||
tGisCjqyMapper.insertTGisCjqyBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 修改村级区域 | |||
* | |||
* @param tGisCjqy 村级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int updateTGisCjqy(TGisCjqy tGisCjqy) | |||
{ | |||
return tGisCjqyMapper.updateTGisCjqy(tGisCjqy); | |||
} | |||
/** | |||
* 批量修改 村级区域 | |||
* | |||
* @param list 村级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int updateTGisCjqyBatch(List<TGisCjqy> list) { | |||
List<List<TGisCjqy>> splists = ListUtils.partition(list, 30); | |||
splists.forEach(splist->{ | |||
tGisCjqyMapper.updateTGisCjqyBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 批量删除村级区域 | |||
* | |||
* @param CJQYDMs 需要删除的村级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisCjqyByCJQYDMs(String[] CJQYDMs) | |||
{ | |||
return tGisCjqyMapper.deleteTGisCjqyByCJQYDMs(CJQYDMs); | |||
} | |||
/** | |||
* 删除村级区域信息 | |||
* | |||
* @param CJQYDM 村级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisCjqyByCJQYDM(String CJQYDM) | |||
{ | |||
return tGisCjqyMapper.deleteTGisCjqyByCJQYDM(CJQYDM); | |||
} | |||
} |
@@ -0,0 +1,207 @@ | |||
package com.ruoyi.business.service.impl; | |||
import com.ruoyi.business.domain.TGisXjqy; | |||
import com.ruoyi.business.mapper.TGisXjqyMapper; | |||
import com.ruoyi.business.service.ITGisXjqyService; | |||
import com.ruoyi.common.exception.ServiceException; | |||
import com.ruoyi.common.utils.DateUtils; | |||
import com.ruoyi.common.utils.StringUtils; | |||
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 org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 乡级区域Service业务层处理 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@Service | |||
public class TGisXjqyServiceImpl implements ITGisXjqyService | |||
{ | |||
@Autowired | |||
private TGisXjqyMapper tGisXjqyMapper; | |||
/** | |||
* 查询乡级区域 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 乡级区域 | |||
*/ | |||
@Override | |||
public TGisXjqy selectTGisXjqyByXJQYDM(String XJQYDM) | |||
{ | |||
return tGisXjqyMapper.selectTGisXjqyByXJQYDM(XJQYDM); | |||
} | |||
/** | |||
* 查询乡级区域列表 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 乡级区域 | |||
*/ | |||
@Override | |||
public List<TGisXjqy> selectTGisXjqyList(TGisXjqy tGisXjqy) | |||
{ | |||
return tGisXjqyMapper.selectTGisXjqyList(tGisXjqy); | |||
} | |||
/** | |||
* 导入乡级区域数据 | |||
* | |||
* @param list 乡级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param operName 操作用户 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public String importTGisXjqy(List<TGisXjqy> 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<TGisXjqy> insertList = Lists.newArrayList(); | |||
List<TGisXjqy> updateList = Lists.newArrayList(); | |||
// 检验excel表中 【xxx】 是否存在重复,有重复的终止导入 | |||
List<String> repeatList = list.stream().collect(Collectors.groupingBy(TGisXjqy::getImportCode, 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("<br/>" + failureNum + "、项目名 " + item + " 重复"); | |||
} | |||
return failureMsg.toString(); | |||
} | |||
// 缓存已存在的数据 | |||
TGisXjqy tGisXjqy = new TGisXjqy(); | |||
List<TGisXjqy> tGisXjqyList = tGisXjqyMapper.selectTGisXjqyList(tGisXjqy); | |||
for (TGisXjqy item : list) { | |||
String code = item.getImportCode(); | |||
List<TGisXjqy> filters = tGisXjqyList.stream().filter(a -> a.getImportCode().equals(code)).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.setXJQYDM(filters.get(0).getXJQYDM()); | |||
updateList.add(item); | |||
successNum++; | |||
} | |||
} | |||
} | |||
// 执行更新或者保存 | |||
List<List<TGisXjqy>> insertSplists = ListUtils.partition(insertList, 50); | |||
insertSplists.forEach(insertSplist ->{ | |||
tGisXjqyMapper.insertTGisXjqyBatch(insertSplist); | |||
}); | |||
List<List<TGisXjqy>> updateSplists = ListUtils.partition(updateList, 30); | |||
updateSplists.forEach(updateSplist ->{ | |||
tGisXjqyMapper.updateTGisXjqyBatch(updateSplist); | |||
}); | |||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); | |||
return successMsg.toString(); | |||
} | |||
/** | |||
* 新增乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int insertTGisXjqy(TGisXjqy tGisXjqy) | |||
{ | |||
return tGisXjqyMapper.insertTGisXjqy(tGisXjqy); | |||
} | |||
/** | |||
* 批量新增乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int insertTGisXjqyBatch(List<TGisXjqy> list){ | |||
List<List<TGisXjqy>> splists = ListUtils.partition(list, 50); | |||
splists.forEach(splist->{ | |||
tGisXjqyMapper.insertTGisXjqyBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 修改乡级区域 | |||
* | |||
* @param tGisXjqy 乡级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int updateTGisXjqy(TGisXjqy tGisXjqy) | |||
{ | |||
return tGisXjqyMapper.updateTGisXjqy(tGisXjqy); | |||
} | |||
/** | |||
* 批量修改 乡级区域 | |||
* | |||
* @param list 乡级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int updateTGisXjqyBatch(List<TGisXjqy> list) { | |||
List<List<TGisXjqy>> splists = ListUtils.partition(list, 30); | |||
splists.forEach(splist->{ | |||
tGisXjqyMapper.updateTGisXjqyBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 批量删除乡级区域 | |||
* | |||
* @param XJQYDMs 需要删除的乡级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisXjqyByXJQYDMs(String[] XJQYDMs) | |||
{ | |||
return tGisXjqyMapper.deleteTGisXjqyByXJQYDMs(XJQYDMs); | |||
} | |||
/** | |||
* 删除乡级区域信息 | |||
* | |||
* @param XJQYDM 乡级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisXjqyByXJQYDM(String XJQYDM) | |||
{ | |||
return tGisXjqyMapper.deleteTGisXjqyByXJQYDM(XJQYDM); | |||
} | |||
} |
@@ -0,0 +1,209 @@ | |||
package com.ruoyi.business.service.impl; | |||
import com.ruoyi.business.domain.TGisXjxzq; | |||
import com.ruoyi.business.mapper.TGisXjxzqMapper; | |||
import com.ruoyi.business.service.ITGisXjxzqService; | |||
import com.ruoyi.common.exception.ServiceException; | |||
import com.ruoyi.common.utils.DateUtils; | |||
import com.ruoyi.common.utils.StringUtils; | |||
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 org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 县级区域Service业务层处理 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@Service | |||
public class TGisXjxzqServiceImpl implements ITGisXjxzqService | |||
{ | |||
@Autowired | |||
private TGisXjxzqMapper tGisXjxzqMapper; | |||
/** | |||
* 查询县级区域 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 县级区域 | |||
*/ | |||
@Override | |||
public TGisXjxzq selectTGisXjxzqByXZQDM(String XZQDM) | |||
{ | |||
return tGisXjxzqMapper.selectTGisXjxzqByXZQDM(XZQDM); | |||
} | |||
/** | |||
* 查询县级区域列表 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 县级区域 | |||
*/ | |||
@Override | |||
public List<TGisXjxzq> selectTGisXjxzqList(TGisXjxzq tGisXjxzq) | |||
{ | |||
return tGisXjxzqMapper.selectTGisXjxzqList(tGisXjxzq); | |||
} | |||
/** | |||
* 导入县级区域数据 | |||
* | |||
* @param list 县级区域数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param operName 操作用户 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public String importTGisXjxzq(List<TGisXjxzq> 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<TGisXjxzq> insertList = Lists.newArrayList(); | |||
List<TGisXjxzq> updateList = Lists.newArrayList(); | |||
// 检验excel表中 【xxx】 是否存在重复,有重复的终止导入 | |||
List<String> repeatList = list.stream().collect(Collectors.groupingBy(TGisXjxzq::getImportCode, 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("<br/>" + failureNum + "、项目名 " + item + " 重复"); | |||
} | |||
return failureMsg.toString(); | |||
} | |||
// 缓存已存在的数据 | |||
TGisXjxzq tGisXjxzq = new TGisXjxzq(); | |||
List<TGisXjxzq> tGisXjxzqList = tGisXjxzqMapper.selectTGisXjxzqList(tGisXjxzq); | |||
for (TGisXjxzq item : list) { | |||
// 验证是否存在这个县级区域信息 | |||
String code = item.getImportCode(); | |||
List<TGisXjxzq> filters = tGisXjxzqList.stream().filter(a -> a.getImportCode().equals(code)).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.setXZQDM(filters.get(0).getXZQDM()); | |||
updateList.add(item); | |||
successNum++; | |||
} | |||
} | |||
} | |||
// 执行更新或者保存 | |||
List<List<TGisXjxzq>> insertSplists = ListUtils.partition(insertList, 50); | |||
insertSplists.forEach(insertSplist ->{ | |||
tGisXjxzqMapper.insertTGisXjxzqBatch(insertSplist); | |||
}); | |||
List<List<TGisXjxzq>> updateSplists = ListUtils.partition(updateList, 30); | |||
updateSplists.forEach(updateSplist ->{ | |||
tGisXjxzqMapper.updateTGisXjxzqBatch(updateSplist); | |||
}); | |||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); | |||
return successMsg.toString(); | |||
} | |||
/** | |||
* 新增县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int insertTGisXjxzq(TGisXjxzq tGisXjxzq) | |||
{ | |||
return tGisXjxzqMapper.insertTGisXjxzq(tGisXjxzq); | |||
} | |||
/** | |||
* 批量新增县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int insertTGisXjxzqBatch(List<TGisXjxzq> list){ | |||
List<List<TGisXjxzq>> splists = ListUtils.partition(list, 50); | |||
splists.forEach(splist->{ | |||
tGisXjxzqMapper.insertTGisXjxzqBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 修改县级区域 | |||
* | |||
* @param tGisXjxzq 县级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int updateTGisXjxzq(TGisXjxzq tGisXjxzq) | |||
{ | |||
return tGisXjxzqMapper.updateTGisXjxzq(tGisXjxzq); | |||
} | |||
/** | |||
* 批量修改 县级区域 | |||
* | |||
* @param list 县级区域 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int updateTGisXjxzqBatch(List<TGisXjxzq> list) { | |||
List<List<TGisXjxzq>> splists = ListUtils.partition(list, 30); | |||
splists.forEach(splist->{ | |||
tGisXjxzqMapper.updateTGisXjxzqBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 批量删除县级区域 | |||
* | |||
* @param XZQDMs 需要删除的县级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisXjxzqByXZQDMs(String[] XZQDMs) | |||
{ | |||
return tGisXjxzqMapper.deleteTGisXjxzqByXZQDMs(XZQDMs); | |||
} | |||
/** | |||
* 删除县级区域信息 | |||
* | |||
* @param XZQDM 县级区域主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTGisXjxzqByXZQDM(String XZQDM) | |||
{ | |||
return tGisXjxzqMapper.deleteTGisXjxzqByXZQDM(XZQDM); | |||
} | |||
} |
@@ -0,0 +1,197 @@ | |||
package com.ruoyi.business.service.impl; | |||
import com.ruoyi.business.domain.TTaskExport; | |||
import com.ruoyi.business.mapper.TTaskExportMapper; | |||
import com.ruoyi.business.service.ITTaskExportService; | |||
import com.ruoyi.common.exception.ServiceException; | |||
import com.ruoyi.common.utils.DateUtils; | |||
import com.ruoyi.common.utils.StringUtils; | |||
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 org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 导出任务Service业务层处理 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@Service | |||
public class TTaskExportServiceImpl implements ITTaskExportService | |||
{ | |||
@Autowired | |||
private TTaskExportMapper tTaskExportMapper; | |||
/** | |||
* 查询导出任务 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 导出任务 | |||
*/ | |||
@Override | |||
public TTaskExport selectTTaskExportById(Long id) | |||
{ | |||
return tTaskExportMapper.selectTTaskExportById(id); | |||
} | |||
/** | |||
* 查询导出任务列表 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 导出任务 | |||
*/ | |||
@Override | |||
public List<TTaskExport> selectTTaskExportList(TTaskExport tTaskExport) | |||
{ | |||
return tTaskExportMapper.selectTTaskExportList(tTaskExport); | |||
} | |||
/** | |||
* 导入导出任务数据 | |||
* | |||
* @param list 导出任务数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param operName 操作用户 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public String importTTaskExport(List<TTaskExport> 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<TTaskExport> insertList = Lists.newArrayList(); | |||
List<TTaskExport> updateList = Lists.newArrayList(); | |||
// 缓存已存在的数据 | |||
TTaskExport tTaskExport = new TTaskExport(); | |||
List<TTaskExport> tTaskExportList = tTaskExportMapper.selectTTaskExportList(tTaskExport); | |||
for (TTaskExport item : list) { | |||
// 验证是否存在这个导出任务信息 | |||
Long id = item.getId(); | |||
List<TTaskExport> filters = tTaskExportList.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<List<TTaskExport>> insertSplists = ListUtils.partition(insertList, 50); | |||
insertSplists.forEach(insertSplist ->{ | |||
tTaskExportMapper.insertTTaskExportBatch(insertSplist); | |||
}); | |||
List<List<TTaskExport>> updateSplists = ListUtils.partition(updateList, 30); | |||
updateSplists.forEach(updateSplist ->{ | |||
tTaskExportMapper.updateTTaskExportBatch(updateSplist); | |||
}); | |||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); | |||
return successMsg.toString(); | |||
} | |||
/** | |||
* 新增导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int insertTTaskExport(TTaskExport tTaskExport) | |||
{ | |||
tTaskExport.setCreateTime(DateUtils.getNowDate()); | |||
return tTaskExportMapper.insertTTaskExport(tTaskExport); | |||
} | |||
/** | |||
* 批量新增导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int insertTTaskExportBatch(List<TTaskExport> list){ | |||
List<List<TTaskExport>> splists = ListUtils.partition(list, 50); | |||
splists.forEach(splist->{ | |||
tTaskExportMapper.insertTTaskExportBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 修改导出任务 | |||
* | |||
* @param tTaskExport 导出任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int updateTTaskExport(TTaskExport tTaskExport) | |||
{ | |||
tTaskExport.setUpdateTime(DateUtils.getNowDate()); | |||
return tTaskExportMapper.updateTTaskExport(tTaskExport); | |||
} | |||
/** | |||
* 批量修改 导出任务 | |||
* | |||
* @param list 导出任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int updateTTaskExportBatch(List<TTaskExport> list) { | |||
List<List<TTaskExport>> splists = ListUtils.partition(list, 30); | |||
splists.forEach(splist->{ | |||
tTaskExportMapper.updateTTaskExportBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 批量删除导出任务 | |||
* | |||
* @param ids 需要删除的导出任务主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTTaskExportByIds(Long[] ids) | |||
{ | |||
return tTaskExportMapper.deleteTTaskExportByIds(ids); | |||
} | |||
/** | |||
* 删除导出任务信息 | |||
* | |||
* @param id 导出任务主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTTaskExportById(Long id) | |||
{ | |||
return tTaskExportMapper.deleteTTaskExportById(id); | |||
} | |||
} |
@@ -0,0 +1,198 @@ | |||
package com.ruoyi.business.service.impl; | |||
import com.ruoyi.business.domain.TTaskImport; | |||
import com.ruoyi.business.mapper.TTaskImportMapper; | |||
import com.ruoyi.business.service.ITTaskImportService; | |||
import com.ruoyi.common.exception.ServiceException; | |||
import com.ruoyi.common.utils.DateUtils; | |||
import com.ruoyi.common.utils.StringUtils; | |||
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 org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 导入任务Service业务层处理 | |||
* | |||
* @author rongxin | |||
* @date 2025-09-04 | |||
*/ | |||
@Service | |||
public class TTaskImportServiceImpl implements ITTaskImportService | |||
{ | |||
@Autowired | |||
private TTaskImportMapper tTaskImportMapper; | |||
/** | |||
* 查询导入任务 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 导入任务 | |||
*/ | |||
@Override | |||
public TTaskImport selectTTaskImportById(Long id) | |||
{ | |||
return tTaskImportMapper.selectTTaskImportById(id); | |||
} | |||
/** | |||
* 查询导入任务列表 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 导入任务 | |||
*/ | |||
@Override | |||
public List<TTaskImport> selectTTaskImportList(TTaskImport tTaskImport) | |||
{ | |||
return tTaskImportMapper.selectTTaskImportList(tTaskImport); | |||
} | |||
/** | |||
* 导入导入任务数据 | |||
* | |||
* @param list 导入任务数据列表 | |||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 | |||
* @param operName 操作用户 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public String importTTaskImport(List<TTaskImport> 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<TTaskImport> insertList = Lists.newArrayList(); | |||
List<TTaskImport> updateList = Lists.newArrayList(); | |||
// 缓存已存在的数据 | |||
TTaskImport tTaskImport = new TTaskImport(); | |||
List<TTaskImport> tTaskImportList = tTaskImportMapper.selectTTaskImportList(tTaskImport); | |||
for (TTaskImport item : list) { | |||
// 验证是否存在这个导入任务信息 | |||
Long id = item.getId(); | |||
List<TTaskImport> filters = tTaskImportList.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<List<TTaskImport>> insertSplists = ListUtils.partition(insertList, 50); | |||
insertSplists.forEach(insertSplist ->{ | |||
tTaskImportMapper.insertTTaskImportBatch(insertSplist); | |||
}); | |||
List<List<TTaskImport>> updateSplists = ListUtils.partition(updateList, 30); | |||
updateSplists.forEach(updateSplist ->{ | |||
tTaskImportMapper.updateTTaskImportBatch(updateSplist); | |||
}); | |||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。"); | |||
return successMsg.toString(); | |||
} | |||
/** | |||
* 新增导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int insertTTaskImport(TTaskImport tTaskImport) | |||
{ | |||
tTaskImport.setCreateTime(DateUtils.getNowDate()); | |||
return tTaskImportMapper.insertTTaskImport(tTaskImport); | |||
} | |||
/** | |||
* 批量新增导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int insertTTaskImportBatch(List<TTaskImport> list){ | |||
List<List<TTaskImport>> splists = ListUtils.partition(list, 50); | |||
splists.forEach(splist->{ | |||
tTaskImportMapper.insertTTaskImportBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 修改导入任务 | |||
* | |||
* @param tTaskImport 导入任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int updateTTaskImport(TTaskImport tTaskImport) | |||
{ | |||
tTaskImport.setUpdateTime(DateUtils.getNowDate()); | |||
return tTaskImportMapper.updateTTaskImport(tTaskImport); | |||
} | |||
/** | |||
* 批量修改 导入任务 | |||
* | |||
* @param list 导入任务 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
@Transactional | |||
public int updateTTaskImportBatch(List<TTaskImport> list) { | |||
List<List<TTaskImport>> splists = ListUtils.partition(list, 30); | |||
splists.forEach(splist->{ | |||
tTaskImportMapper.updateTTaskImportBatch(splist); | |||
}); | |||
return 1; | |||
} | |||
/** | |||
* 批量删除导入任务 | |||
* | |||
* @param ids 需要删除的导入任务主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTTaskImportByIds(Long[] ids) | |||
{ | |||
return tTaskImportMapper.deleteTTaskImportByIds(ids); | |||
} | |||
/** | |||
* 删除导入任务信息 | |||
* | |||
* @param id 导入任务主键 | |||
* @return 结果 | |||
*/ | |||
@Override | |||
public int deleteTTaskImportById(Long id) | |||
{ | |||
return tTaskImportMapper.deleteTTaskImportById(id); | |||
} | |||
} |
@@ -0,0 +1,120 @@ | |||
<?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.TGisCjqyMapper"> | |||
<resultMap type="TGisCjqy" id="TGisCjqyResult"> | |||
<result property="CJQYDM" column="CJQYDM" /> | |||
<result property="CJQYMC" column="CJQYMC" /> | |||
<result property="theGeom" column="the_geom" /> | |||
<result property="BSM" column="BSM" /> | |||
<result property="YSDM" column="YSDM" /> | |||
<result property="fid" column="fid" /> | |||
<result property="importCode" column="import_code" /> | |||
</resultMap> | |||
<sql id="selectTGisCjqyVo"> | |||
select CJQYDM, CJQYMC, the_geom, BSM, YSDM, fid, import_code from t_gis_cjqy | |||
</sql> | |||
<select id="selectTGisCjqyList" parameterType="TGisCjqy" resultMap="TGisCjqyResult"> | |||
<include refid="selectTGisCjqyVo"/> | |||
<where> | |||
<if test="CJQYDM != null and CJQYDM != ''"> and CJQYDM = #{CJQYDM}</if> | |||
<if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if> | |||
</where> | |||
</select> | |||
<select id="selectTGisCjqyByCJQYDM" parameterType="String" resultMap="TGisCjqyResult"> | |||
<include refid="selectTGisCjqyVo"/> | |||
where CJQYDM = #{CJQYDM} | |||
</select> | |||
<insert id="insertTGisCjqy" parameterType="TGisCjqy"> | |||
insert into t_gis_cjqy | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="CJQYDM != null">CJQYDM,</if> | |||
<if test="CJQYMC != null and CJQYMC != ''">CJQYMC,</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom,</if> | |||
<if test="BSM != null">BSM,</if> | |||
<if test="YSDM != null">YSDM,</if> | |||
<if test="fid != null">fid,</if> | |||
<if test="importCode != null and importCode != ''">import_code,</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="CJQYDM != null">#{CJQYDM},</if> | |||
<if test="CJQYMC != null and CJQYMC != ''">#{CJQYMC},</if> | |||
<if test="theGeom != null and theGeom != ''">#{theGeom},</if> | |||
<if test="BSM != null">#{BSM},</if> | |||
<if test="YSDM != null">#{YSDM},</if> | |||
<if test="fid != null">#{fid},</if> | |||
<if test="importCode != null and importCode != ''">#{importCode},</if> | |||
</trim> | |||
</insert> | |||
<insert id="insertTGisCjqyBatch" parameterType="list" > | |||
insert into t_gis_cjqy | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
CJQYDM, | |||
CJQYMC, | |||
the_geom, | |||
BSM, | |||
YSDM, | |||
fid, | |||
import_code, | |||
</trim> | |||
values | |||
<foreach item="item" collection="list" separator="," > | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
#{item.CJQYDM}, | |||
#{item.CJQYMC}, | |||
#{item.theGeom}, | |||
#{item.BSM}, | |||
#{item.YSDM}, | |||
#{item.fid}, | |||
#{item.importCode}, | |||
</trim> | |||
</foreach> | |||
</insert> | |||
<update id="updateTGisCjqy" parameterType="TGisCjqy"> | |||
update t_gis_cjqy | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="CJQYMC != null and CJQYMC != ''">CJQYMC = #{CJQYMC},</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom = #{theGeom},</if> | |||
<if test="BSM != null">BSM = #{BSM},</if> | |||
<if test="YSDM != null">YSDM = #{YSDM},</if> | |||
<if test="fid != null">fid = #{fid},</if> | |||
<if test="importCode != null and importCode != ''">import_code = #{importCode},</if> | |||
</trim> | |||
where CJQYDM = #{CJQYDM} | |||
</update> | |||
<!--批量更新--> | |||
<update id="updateTGisCjqyBatch" parameterType="list" > | |||
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> | |||
update t_gis_cjqy | |||
<set> | |||
<if test="item.CJQYMC != null and item.CJQYMC != ''">CJQYMC = #{item.CJQYMC},</if> | |||
<if test="item.theGeom != null and item.theGeom != ''">the_geom = #{item.theGeom},</if> | |||
<if test="item.BSM != null">BSM = #{item.BSM},</if> | |||
<if test="item.YSDM != null">YSDM = #{item.YSDM},</if> | |||
<if test="item.fid != null">fid = #{item.fid},</if> | |||
<if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if> | |||
</set> | |||
where CJQYDM = #{item.CJQYDM} | |||
</foreach> | |||
</update> | |||
<delete id="deleteTGisCjqyByCJQYDM" parameterType="String"> | |||
delete from t_gis_cjqy where CJQYDM = #{CJQYDM} | |||
</delete> | |||
<delete id="deleteTGisCjqyByCJQYDMs" parameterType="String"> | |||
delete from t_gis_cjqy where CJQYDM in | |||
<foreach item="CJQYDM" collection="array" open="(" separator="," close=")"> | |||
#{CJQYDM} | |||
</foreach> | |||
</delete> | |||
</mapper> |
@@ -0,0 +1,120 @@ | |||
<?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.TGisXjqyMapper"> | |||
<resultMap type="TGisXjqy" id="TGisXjqyResult"> | |||
<result property="XJQYDM" column="XJQYDM" /> | |||
<result property="XJQYMC" column="XJQYMC" /> | |||
<result property="theGeom" column="the_geom" /> | |||
<result property="BSM" column="BSM" /> | |||
<result property="YSDM" column="YSDM" /> | |||
<result property="fid" column="fid" /> | |||
<result property="importCode" column="import_code" /> | |||
</resultMap> | |||
<sql id="selectTGisXjqyVo"> | |||
select XJQYDM, XJQYMC, the_geom, BSM, YSDM, fid, import_code from t_gis_xjqy | |||
</sql> | |||
<select id="selectTGisXjqyList" parameterType="TGisXjqy" resultMap="TGisXjqyResult"> | |||
<include refid="selectTGisXjqyVo"/> | |||
<where> | |||
<if test="XJQYDM != null and XJQYDM != ''"> and XJQYDM = #{XJQYDM}</if> | |||
<if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if> | |||
</where> | |||
</select> | |||
<select id="selectTGisXjqyByXJQYDM" parameterType="String" resultMap="TGisXjqyResult"> | |||
<include refid="selectTGisXjqyVo"/> | |||
where XJQYDM = #{XJQYDM} | |||
</select> | |||
<insert id="insertTGisXjqy" parameterType="TGisXjqy"> | |||
insert into t_gis_xjqy | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="XJQYDM != null">XJQYDM,</if> | |||
<if test="XJQYMC != null and XJQYMC != ''">XJQYMC,</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom,</if> | |||
<if test="BSM != null">BSM,</if> | |||
<if test="YSDM != null">YSDM,</if> | |||
<if test="fid != null">fid,</if> | |||
<if test="importCode != null and importCode != ''">import_code,</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="XJQYDM != null">#{XJQYDM},</if> | |||
<if test="XJQYMC != null and XJQYMC != ''">#{XJQYMC},</if> | |||
<if test="theGeom != null and theGeom != ''">#{theGeom},</if> | |||
<if test="BSM != null">#{BSM},</if> | |||
<if test="YSDM != null">#{YSDM},</if> | |||
<if test="fid != null">#{fid},</if> | |||
<if test="importCode != null and importCode != ''">#{importCode},</if> | |||
</trim> | |||
</insert> | |||
<insert id="insertTGisXjqyBatch" parameterType="list" > | |||
insert into t_gis_xjqy | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
XJQYDM, | |||
XJQYMC, | |||
the_geom, | |||
BSM, | |||
YSDM, | |||
fid, | |||
import_code, | |||
</trim> | |||
values | |||
<foreach item="item" collection="list" separator="," > | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
#{item.XJQYDM}, | |||
#{item.XJQYMC}, | |||
#{item.theGeom}, | |||
#{item.BSM}, | |||
#{item.YSDM}, | |||
#{item.fid}, | |||
#{item.importCode}, | |||
</trim> | |||
</foreach> | |||
</insert> | |||
<update id="updateTGisXjqy" parameterType="TGisXjqy"> | |||
update t_gis_xjqy | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="XJQYMC != null and XJQYMC != ''">XJQYMC = #{XJQYMC},</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom = #{theGeom},</if> | |||
<if test="BSM != null">BSM = #{BSM},</if> | |||
<if test="YSDM != null">YSDM = #{YSDM},</if> | |||
<if test="fid != null">fid = #{fid},</if> | |||
<if test="importCode != null and importCode != ''">import_code = #{importCode},</if> | |||
</trim> | |||
where XJQYDM = #{XJQYDM} | |||
</update> | |||
<!--批量更新--> | |||
<update id="updateTGisXjqyBatch" parameterType="list" > | |||
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> | |||
update t_gis_xjqy | |||
<set> | |||
<if test="item.XJQYMC != null and item.XJQYMC != ''">XJQYMC = #{item.XJQYMC},</if> | |||
<if test="item.theGeom != null and item.theGeom != ''">the_geom = #{item.theGeom},</if> | |||
<if test="item.BSM != null">BSM = #{item.BSM},</if> | |||
<if test="item.YSDM != null">YSDM = #{item.YSDM},</if> | |||
<if test="item.fid != null">fid = #{item.fid},</if> | |||
<if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if> | |||
</set> | |||
where XJQYDM = #{item.XJQYDM} | |||
</foreach> | |||
</update> | |||
<delete id="deleteTGisXjqyByXJQYDM" parameterType="String"> | |||
delete from t_gis_xjqy where XJQYDM = #{XJQYDM} | |||
</delete> | |||
<delete id="deleteTGisXjqyByXJQYDMs" parameterType="String"> | |||
delete from t_gis_xjqy where XJQYDM in | |||
<foreach item="XJQYDM" collection="array" open="(" separator="," close=")"> | |||
#{XJQYDM} | |||
</foreach> | |||
</delete> | |||
</mapper> |
@@ -0,0 +1,120 @@ | |||
<?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.TGisXjxzqMapper"> | |||
<resultMap type="TGisXjxzq" id="TGisXjxzqResult"> | |||
<result property="XZQDM" column="XZQDM" /> | |||
<result property="XZQMC" column="XZQMC" /> | |||
<result property="theGeom" column="the_geom" /> | |||
<result property="BSM" column="BSM" /> | |||
<result property="YSDM" column="YSDM" /> | |||
<result property="fid" column="fid" /> | |||
<result property="importCode" column="import_code" /> | |||
</resultMap> | |||
<sql id="selectTGisXjxzqVo"> | |||
select XZQDM, XZQMC, the_geom, BSM, YSDM, fid, import_code from t_gis_xjxzq | |||
</sql> | |||
<select id="selectTGisXjxzqList" parameterType="TGisXjxzq" resultMap="TGisXjxzqResult"> | |||
<include refid="selectTGisXjxzqVo"/> | |||
<where> | |||
<if test="XZQDM != null and XZQDM != ''"> and XZQDM = #{XZQDM}</if> | |||
<if test="importCode != null and importCode != ''"> and import_code = #{importCode}</if> | |||
</where> | |||
</select> | |||
<select id="selectTGisXjxzqByXZQDM" parameterType="String" resultMap="TGisXjxzqResult"> | |||
<include refid="selectTGisXjxzqVo"/> | |||
where XZQDM = #{XZQDM} | |||
</select> | |||
<insert id="insertTGisXjxzq" parameterType="TGisXjxzq"> | |||
insert into t_gis_xjxzq | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="XZQDM != null">XZQDM,</if> | |||
<if test="XZQMC != null and XZQMC != ''">XZQMC,</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom,</if> | |||
<if test="BSM != null">BSM,</if> | |||
<if test="YSDM != null">YSDM,</if> | |||
<if test="fid != null">fid,</if> | |||
<if test="importCode != null and importCode != ''">import_code,</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="XZQDM != null">#{XZQDM},</if> | |||
<if test="XZQMC != null and XZQMC != ''">#{XZQMC},</if> | |||
<if test="theGeom != null and theGeom != ''">#{theGeom},</if> | |||
<if test="BSM != null">#{BSM},</if> | |||
<if test="YSDM != null">#{YSDM},</if> | |||
<if test="fid != null">#{fid},</if> | |||
<if test="importCode != null and importCode != ''">#{importCode},</if> | |||
</trim> | |||
</insert> | |||
<insert id="insertTGisXjxzqBatch" parameterType="list" > | |||
insert into t_gis_xjxzq | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
XZQDM, | |||
XZQMC, | |||
the_geom, | |||
BSM, | |||
YSDM, | |||
fid, | |||
import_code, | |||
</trim> | |||
values | |||
<foreach item="item" collection="list" separator="," > | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
#{item.XZQDM}, | |||
#{item.XZQMC}, | |||
#{item.theGeom}, | |||
#{item.BSM}, | |||
#{item.YSDM}, | |||
#{item.fid}, | |||
#{item.importCode}, | |||
</trim> | |||
</foreach> | |||
</insert> | |||
<update id="updateTGisXjxzq" parameterType="TGisXjxzq"> | |||
update t_gis_xjxzq | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="XZQMC != null and XZQMC != ''">XZQMC = #{XZQMC},</if> | |||
<if test="theGeom != null and theGeom != ''">the_geom = #{theGeom},</if> | |||
<if test="BSM != null">BSM = #{BSM},</if> | |||
<if test="YSDM != null">YSDM = #{YSDM},</if> | |||
<if test="fid != null">fid = #{fid},</if> | |||
<if test="importCode != null and importCode != ''">import_code = #{importCode},</if> | |||
</trim> | |||
where XZQDM = #{XZQDM} | |||
</update> | |||
<!--批量更新--> | |||
<update id="updateTGisXjxzqBatch" parameterType="list" > | |||
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> | |||
update t_gis_xjxzq | |||
<set> | |||
<if test="item.XZQMC != null and item.XZQMC != ''">XZQMC = #{item.XZQMC},</if> | |||
<if test="item.theGeom != null and item.theGeom != ''">the_geom = #{item.theGeom},</if> | |||
<if test="item.BSM != null">BSM = #{item.BSM},</if> | |||
<if test="item.YSDM != null">YSDM = #{item.YSDM},</if> | |||
<if test="item.fid != null">fid = #{item.fid},</if> | |||
<if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if> | |||
</set> | |||
where XZQDM = #{item.XZQDM} | |||
</foreach> | |||
</update> | |||
<delete id="deleteTGisXjxzqByXZQDM" parameterType="String"> | |||
delete from t_gis_xjxzq where XZQDM = #{XZQDM} | |||
</delete> | |||
<delete id="deleteTGisXjxzqByXZQDMs" parameterType="String"> | |||
delete from t_gis_xjxzq where XZQDM in | |||
<foreach item="XZQDM" collection="array" open="(" separator="," close=")"> | |||
#{XZQDM} | |||
</foreach> | |||
</delete> | |||
</mapper> |
@@ -0,0 +1,156 @@ | |||
<?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.TTaskExportMapper"> | |||
<resultMap type="TTaskExport" id="TTaskExportResult"> | |||
<result property="id" column="id" /> | |||
<result property="deptId" column="dept_id" /> | |||
<result property="deptName" column="dept_name" /> | |||
<result property="orgCode" column="org_code" /> | |||
<result property="fileType" column="file_type" /> | |||
<result property="coordinateSystem" column="coordinate_system" /> | |||
<result property="fileUrl" column="file_url" /> | |||
<result property="taskStatus" column="task_status" /> | |||
<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="selectTTaskExportVo"> | |||
select id, dept_id, dept_name, org_code, file_type, coordinate_system, file_url, task_status, create_by, create_time, update_by, update_time from t_task_export | |||
</sql> | |||
<select id="selectTTaskExportList" parameterType="TTaskExport" resultMap="TTaskExportResult"> | |||
<include refid="selectTTaskExportVo"/> | |||
<where> | |||
<if test="deptId != null "> and dept_id = #{deptId}</if> | |||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | |||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | |||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''"> and coordinate_system = #{coordinateSystem}</if> | |||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if> | |||
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if> | |||
</where> | |||
</select> | |||
<select id="selectTTaskExportById" parameterType="Long" resultMap="TTaskExportResult"> | |||
<include refid="selectTTaskExportVo"/> | |||
where id = #{id} | |||
</select> | |||
<insert id="insertTTaskExport" parameterType="TTaskExport" useGeneratedKeys="true" keyProperty="id"> | |||
insert into t_task_export | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="deptId != null">dept_id,</if> | |||
<if test="deptName != null and deptName != ''">dept_name,</if> | |||
<if test="orgCode != null and orgCode != ''">org_code,</if> | |||
<if test="fileType != null and fileType != ''">file_type,</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">coordinate_system,</if> | |||
<if test="fileUrl != null">file_url,</if> | |||
<if test="taskStatus != null and taskStatus != ''">task_status,</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="deptId != null">#{deptId},</if> | |||
<if test="deptName != null and deptName != ''">#{deptName},</if> | |||
<if test="orgCode != null and orgCode != ''">#{orgCode},</if> | |||
<if test="fileType != null and fileType != ''">#{fileType},</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">#{coordinateSystem},</if> | |||
<if test="fileUrl != null">#{fileUrl},</if> | |||
<if test="taskStatus != null and taskStatus != ''">#{taskStatus},</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="insertTTaskExportBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id"> | |||
insert into t_task_export | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
dept_id, | |||
dept_name, | |||
org_code, | |||
file_type, | |||
coordinate_system, | |||
file_url, | |||
task_status, | |||
create_by, | |||
create_time, | |||
update_by, | |||
update_time, | |||
</trim> | |||
values | |||
<foreach item="item" collection="list" separator="," > | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
#{item.deptId}, | |||
#{item.deptName}, | |||
#{item.orgCode}, | |||
#{item.fileType}, | |||
#{item.coordinateSystem}, | |||
#{item.fileUrl}, | |||
#{item.taskStatus}, | |||
#{item.createBy}, | |||
#{item.createTime}, | |||
#{item.updateBy}, | |||
#{item.updateTime}, | |||
</trim> | |||
</foreach> | |||
</insert> | |||
<update id="updateTTaskExport" parameterType="TTaskExport"> | |||
update t_task_export | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="deptId != null">dept_id = #{deptId},</if> | |||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> | |||
<if test="orgCode != null and orgCode != ''">org_code = #{orgCode},</if> | |||
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">coordinate_system = #{coordinateSystem},</if> | |||
<if test="fileUrl != null">file_url = #{fileUrl},</if> | |||
<if test="taskStatus != null and taskStatus != ''">task_status = #{taskStatus},</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 id = #{id} | |||
</update> | |||
<!--批量更新--> | |||
<update id="updateTTaskExportBatch" parameterType="list" > | |||
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> | |||
update t_task_export | |||
<set> | |||
<if test="item.deptId != null">dept_id = #{item.deptId},</if> | |||
<if test="item.deptName != null and item.deptName != ''">dept_name = #{item.deptName},</if> | |||
<if test="item.orgCode != null and item.orgCode != ''">org_code = #{item.orgCode},</if> | |||
<if test="item.fileType != null and item.fileType != ''">file_type = #{item.fileType},</if> | |||
<if test="item.coordinateSystem != null and item.coordinateSystem != ''">coordinate_system = #{item.coordinateSystem},</if> | |||
<if test="item.fileUrl != null">file_url = #{item.fileUrl},</if> | |||
<if test="item.taskStatus != null and item.taskStatus != ''">task_status = #{item.taskStatus},</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 id = #{item.id} | |||
</foreach> | |||
</update> | |||
<delete id="deleteTTaskExportById" parameterType="Long"> | |||
delete from t_task_export where id = #{id} | |||
</delete> | |||
<delete id="deleteTTaskExportByIds" parameterType="String"> | |||
delete from t_task_export where id in | |||
<foreach item="id" collection="array" open="(" separator="," close=")"> | |||
#{id} | |||
</foreach> | |||
</delete> | |||
</mapper> |
@@ -0,0 +1,164 @@ | |||
<?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.TTaskImportMapper"> | |||
<resultMap type="TTaskImport" id="TTaskImportResult"> | |||
<result property="id" column="id" /> | |||
<result property="deptId" column="dept_id" /> | |||
<result property="deptName" column="dept_name" /> | |||
<result property="orgCode" column="org_code" /> | |||
<result property="fileType" column="file_type" /> | |||
<result property="importType" column="import_type" /> | |||
<result property="coordinateSystem" column="coordinate_system" /> | |||
<result property="fileUrl" column="file_url" /> | |||
<result property="taskStatus" column="task_status" /> | |||
<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="selectTTaskImportVo"> | |||
select id, dept_id, dept_name, org_code, file_type, import_type, coordinate_system, file_url, task_status, create_by, create_time, update_by, update_time from t_task_import | |||
</sql> | |||
<select id="selectTTaskImportList" parameterType="TTaskImport" resultMap="TTaskImportResult"> | |||
<include refid="selectTTaskImportVo"/> | |||
<where> | |||
<if test="deptId != null "> and dept_id = #{deptId}</if> | |||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> | |||
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> | |||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> | |||
<if test="importType != null and importType != ''"> and import_type = #{importType}</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''"> and coordinate_system = #{coordinateSystem}</if> | |||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if> | |||
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if> | |||
</where> | |||
</select> | |||
<select id="selectTTaskImportById" parameterType="Long" resultMap="TTaskImportResult"> | |||
<include refid="selectTTaskImportVo"/> | |||
where id = #{id} | |||
</select> | |||
<insert id="insertTTaskImport" parameterType="TTaskImport" useGeneratedKeys="true" keyProperty="id"> | |||
insert into t_task_import | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="deptId != null">dept_id,</if> | |||
<if test="deptName != null and deptName != ''">dept_name,</if> | |||
<if test="orgCode != null and orgCode != ''">org_code,</if> | |||
<if test="fileType != null and fileType != ''">file_type,</if> | |||
<if test="importType != null and importType != ''">import_type,</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">coordinate_system,</if> | |||
<if test="fileUrl != null and fileUrl != ''">file_url,</if> | |||
<if test="taskStatus != null and taskStatus != ''">task_status,</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="deptId != null">#{deptId},</if> | |||
<if test="deptName != null and deptName != ''">#{deptName},</if> | |||
<if test="orgCode != null and orgCode != ''">#{orgCode},</if> | |||
<if test="fileType != null and fileType != ''">#{fileType},</if> | |||
<if test="importType != null and importType != ''">#{importType},</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">#{coordinateSystem},</if> | |||
<if test="fileUrl != null and fileUrl != ''">#{fileUrl},</if> | |||
<if test="taskStatus != null and taskStatus != ''">#{taskStatus},</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="insertTTaskImportBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id"> | |||
insert into t_task_import | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
dept_id, | |||
dept_name, | |||
org_code, | |||
file_type, | |||
import_type, | |||
coordinate_system, | |||
file_url, | |||
task_status, | |||
create_by, | |||
create_time, | |||
update_by, | |||
update_time, | |||
</trim> | |||
values | |||
<foreach item="item" collection="list" separator="," > | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
#{item.deptId}, | |||
#{item.deptName}, | |||
#{item.orgCode}, | |||
#{item.fileType}, | |||
#{item.importType}, | |||
#{item.coordinateSystem}, | |||
#{item.fileUrl}, | |||
#{item.taskStatus}, | |||
#{item.createBy}, | |||
#{item.createTime}, | |||
#{item.updateBy}, | |||
#{item.updateTime}, | |||
</trim> | |||
</foreach> | |||
</insert> | |||
<update id="updateTTaskImport" parameterType="TTaskImport"> | |||
update t_task_import | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="deptId != null">dept_id = #{deptId},</if> | |||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> | |||
<if test="orgCode != null and orgCode != ''">org_code = #{orgCode},</if> | |||
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if> | |||
<if test="importType != null and importType != ''">import_type = #{importType},</if> | |||
<if test="coordinateSystem != null and coordinateSystem != ''">coordinate_system = #{coordinateSystem},</if> | |||
<if test="fileUrl != null and fileUrl != ''">file_url = #{fileUrl},</if> | |||
<if test="taskStatus != null and taskStatus != ''">task_status = #{taskStatus},</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 id = #{id} | |||
</update> | |||
<!--批量更新--> | |||
<update id="updateTTaskImportBatch" parameterType="list" > | |||
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> | |||
update t_task_import | |||
<set> | |||
<if test="item.deptId != null">dept_id = #{item.deptId},</if> | |||
<if test="item.deptName != null and item.deptName != ''">dept_name = #{item.deptName},</if> | |||
<if test="item.orgCode != null and item.orgCode != ''">org_code = #{item.orgCode},</if> | |||
<if test="item.fileType != null and item.fileType != ''">file_type = #{item.fileType},</if> | |||
<if test="item.importType != null and item.importType != ''">import_type = #{item.importType},</if> | |||
<if test="item.coordinateSystem != null and item.coordinateSystem != ''">coordinate_system = #{item.coordinateSystem},</if> | |||
<if test="item.fileUrl != null and item.fileUrl != ''">file_url = #{item.fileUrl},</if> | |||
<if test="item.taskStatus != null and item.taskStatus != ''">task_status = #{item.taskStatus},</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 id = #{item.id} | |||
</foreach> | |||
</update> | |||
<delete id="deleteTTaskImportById" parameterType="Long"> | |||
delete from t_task_import where id = #{id} | |||
</delete> | |||
<delete id="deleteTTaskImportByIds" parameterType="String"> | |||
delete from t_task_import where id in | |||
<foreach item="id" collection="array" open="(" separator="," close=")"> | |||
#{id} | |||
</foreach> | |||
</delete> | |||
</mapper> |
@@ -153,7 +153,6 @@ public class ${ClassName}Controller extends BaseController | |||
pdf.setTitle("${functionName}"); | |||
//pdf.setRowHeight(20f); | |||
FinanceBook book = financeBookService.selectFinanceBookById(getSysUser().getLoginBookid()); | |||
ShoulderItem shoulder = new ShoulderItem(); | |||
shoulder.setLeftItem("编制单位:"); | |||
shoulder.setCenterItem("日期:" ); | |||
@@ -1,6 +1,8 @@ | |||
package ${packageName}.service.impl; | |||
import java.util.List; | |||
import java.util.Map; | |||
import com.ruoyi.common.utils.StringUtils; | |||
#foreach ($column in $columns) | |||
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime') | |||
import com.ruoyi.common.utils.DateUtils; | |||
@@ -22,9 +22,9 @@ insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame | |||
values('导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); | |||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) | |||
values('导入', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); | |||
values('导入', @parentId, '6', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); | |||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) | |||
values('打印', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:import', '#', 'admin', sysdate(), '', null, ''); | |||
values('打印', @parentId, '7', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:import', '#', 'admin', sysdate(), '', null, ''); | |||
@@ -117,7 +117,7 @@ | |||
#set($comment=$column.columnComment) | |||
#end | |||
#if($column.pk) | |||
<el-table-column label="${comment}" align="center" prop="${javaField}" /> | |||
<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}" /> | |||
#elseif($column.list && $column.htmlType == "imageUpload") | |||
@@ -146,11 +146,16 @@ | |||
<el-table-column label="${comment}" align="center" prop="${javaField}" /> | |||
#end | |||
#end | |||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="250"> | |||
<template slot-scope="scope"> | |||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleLook(scope.row)" v-hasPermi="['${moduleName}:${businessName}:query']">查看</el-button> | |||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button> | |||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button> | |||
<el-dropdown size="mini" v-hasPermi="['${permissionPrefix}:remove']"> | |||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> | |||
<el-dropdown-menu slot="dropdown" style="padding: 5px"> | |||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button> | |||
</el-dropdown-menu> | |||
</el-dropdown> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -726,7 +731,7 @@ export default { | |||
/** 下载模板操作 */ | |||
importTemplate() { | |||
this.download('${moduleName}/${businessName}/importTemplate', { | |||
}, `${businessName}_template.xlsx`) | |||
}, `${functionName}_template.xlsx`) | |||
}, | |||
// 文件上传中处理 | |||
handleFileUploadProgress(event, file, fileList) { | |||