| @@ -89,6 +89,18 @@ public class TGisCjqyController extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('business:cjqy:query')") | |||
| @GetMapping(value = "/{CJQYDM}") | |||
| public AjaxResult getInfo(@PathVariable("CJQYDM") String CJQYDM) | |||
| { | |||
| TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | |||
| return success(detail); | |||
| } | |||
| /** | |||
| * 获取村级区域详细信息,翻译字典 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:cjqy:query')") | |||
| @GetMapping(value = "/detail/{CJQYDM}") | |||
| public AjaxResult detail(@PathVariable("CJQYDM") String CJQYDM) | |||
| { | |||
| TGisCjqy detail = tGisCjqyService.selectTGisCjqyByCJQYDM(CJQYDM); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -100,7 +112,7 @@ public class TGisCjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:cjqy:add')") | |||
| @Log(title = "村级区域", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody TGisCjqy tGisCjqy) | |||
| { | |||
| return toAjax(tGisCjqyService.insertTGisCjqy(tGisCjqy)); | |||
| @@ -111,7 +123,7 @@ public class TGisCjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:cjqy:edit')") | |||
| @Log(title = "村级区域", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody TGisCjqy tGisCjqy) | |||
| { | |||
| return toAjax(tGisCjqyService.updateTGisCjqy(tGisCjqy)); | |||
| @@ -122,7 +134,7 @@ public class TGisCjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:cjqy:remove')") | |||
| @Log(title = "村级区域", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{CJQYDMs}") | |||
| @GetMapping("/delete/{CJQYDMs}") | |||
| public AjaxResult remove(@PathVariable String[] CJQYDMs) | |||
| { | |||
| return toAjax(tGisCjqyService.deleteTGisCjqyByCJQYDMs(CJQYDMs)); | |||
| @@ -89,6 +89,14 @@ public class TGisXjqyController extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('business:xjqy:query')") | |||
| @GetMapping(value = "/{XJQYDM}") | |||
| public AjaxResult getInfo(@PathVariable("XJQYDM") String XJQYDM) | |||
| { | |||
| TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | |||
| return success(detail); | |||
| } | |||
| @PreAuthorize("@ss.hasPermi('business:xjqy:query')") | |||
| @GetMapping(value = "/detail/{XJQYDM}") | |||
| public AjaxResult detail(@PathVariable("XJQYDM") String XJQYDM) | |||
| { | |||
| TGisXjqy detail = tGisXjqyService.selectTGisXjqyByXJQYDM(XJQYDM); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -100,7 +108,7 @@ public class TGisXjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjqy:add')") | |||
| @Log(title = "乡级区域", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody TGisXjqy tGisXjqy) | |||
| { | |||
| return toAjax(tGisXjqyService.insertTGisXjqy(tGisXjqy)); | |||
| @@ -111,7 +119,7 @@ public class TGisXjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjqy:edit')") | |||
| @Log(title = "乡级区域", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody TGisXjqy tGisXjqy) | |||
| { | |||
| return toAjax(tGisXjqyService.updateTGisXjqy(tGisXjqy)); | |||
| @@ -122,7 +130,7 @@ public class TGisXjqyController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjqy:remove')") | |||
| @Log(title = "乡级区域", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{XJQYDMs}") | |||
| @GetMapping("/delete/{XJQYDMs}") | |||
| public AjaxResult remove(@PathVariable String[] XJQYDMs) | |||
| { | |||
| return toAjax(tGisXjqyService.deleteTGisXjqyByXJQYDMs(XJQYDMs)); | |||
| @@ -89,6 +89,14 @@ public class TGisXjxzqController extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | |||
| @GetMapping(value = "/{XZQDM}") | |||
| public AjaxResult getInfo(@PathVariable("XZQDM") String XZQDM) | |||
| { | |||
| TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | |||
| return success(detail); | |||
| } | |||
| @PreAuthorize("@ss.hasPermi('business:xjxzq:query')") | |||
| @GetMapping(value = "/detail/{XZQDM}") | |||
| public AjaxResult detail(@PathVariable("XZQDM") String XZQDM) | |||
| { | |||
| TGisXjxzq detail = tGisXjxzqService.selectTGisXjxzqByXZQDM(XZQDM); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -100,7 +108,7 @@ public class TGisXjxzqController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjxzq:add')") | |||
| @Log(title = "县级区域", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody TGisXjxzq tGisXjxzq) | |||
| { | |||
| return toAjax(tGisXjxzqService.insertTGisXjxzq(tGisXjxzq)); | |||
| @@ -111,7 +119,7 @@ public class TGisXjxzqController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjxzq:edit')") | |||
| @Log(title = "县级区域", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody TGisXjxzq tGisXjxzq) | |||
| { | |||
| return toAjax(tGisXjxzqService.updateTGisXjxzq(tGisXjxzq)); | |||
| @@ -122,7 +130,7 @@ public class TGisXjxzqController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:xjxzq:remove')") | |||
| @Log(title = "县级区域", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{XZQDMs}") | |||
| @GetMapping("/delete/{XZQDMs}") | |||
| public AjaxResult remove(@PathVariable String[] XZQDMs) | |||
| { | |||
| return toAjax(tGisXjxzqService.deleteTGisXjxzqByXZQDMs(XZQDMs)); | |||
| @@ -89,6 +89,13 @@ public class TTaskExportController extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('business:export:query')") | |||
| @GetMapping(value = "/{id}") | |||
| public AjaxResult getInfo(@PathVariable("id") Long id) | |||
| { | |||
| return success(tTaskExportService.selectTTaskExportById(id)); | |||
| } | |||
| @PreAuthorize("@ss.hasPermi('business:export:query')") | |||
| @GetMapping(value = "/detail/{id}") | |||
| public AjaxResult detail(@PathVariable("id") Long id) | |||
| { | |||
| TTaskExport detail = tTaskExportService.selectTTaskExportById(id); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -100,7 +107,7 @@ public class TTaskExportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:export:add')") | |||
| @Log(title = "导出任务", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody TTaskExport tTaskExport) | |||
| { | |||
| return toAjax(tTaskExportService.insertTTaskExport(tTaskExport)); | |||
| @@ -111,7 +118,7 @@ public class TTaskExportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:export:edit')") | |||
| @Log(title = "导出任务", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody TTaskExport tTaskExport) | |||
| { | |||
| return toAjax(tTaskExportService.updateTTaskExport(tTaskExport)); | |||
| @@ -122,7 +129,7 @@ public class TTaskExportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:export:remove')") | |||
| @Log(title = "导出任务", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{ids}") | |||
| @GetMapping("/delete/{ids}") | |||
| public AjaxResult remove(@PathVariable Long[] ids) | |||
| { | |||
| return toAjax(tTaskExportService.deleteTTaskExportByIds(ids)); | |||
| @@ -89,6 +89,16 @@ public class TTaskImportController extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('business:import:query')") | |||
| @GetMapping(value = "/{id}") | |||
| public AjaxResult getInfo(@PathVariable("id") Long id) | |||
| { | |||
| return success(tTaskImportService.selectTTaskImportById(id)); | |||
| } | |||
| /** | |||
| * 获取导入任务详细信息 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:import:query')") | |||
| @GetMapping(value = "/detail/{id}") | |||
| public AjaxResult detail(@PathVariable("id") Long id) | |||
| { | |||
| TTaskImport detail = tTaskImportService.selectTTaskImportById(id); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -100,7 +110,7 @@ public class TTaskImportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:import:add')") | |||
| @Log(title = "导入任务", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody TTaskImport tTaskImport) | |||
| { | |||
| return toAjax(tTaskImportService.insertTTaskImport(tTaskImport)); | |||
| @@ -111,7 +121,7 @@ public class TTaskImportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:import:edit')") | |||
| @Log(title = "导入任务", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody TTaskImport tTaskImport) | |||
| { | |||
| return toAjax(tTaskImportService.updateTTaskImport(tTaskImport)); | |||
| @@ -122,7 +132,7 @@ public class TTaskImportController extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('business:import:remove')") | |||
| @Log(title = "导入任务", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{ids}") | |||
| @GetMapping("/delete/{ids}") | |||
| public AjaxResult remove(@PathVariable Long[] ids) | |||
| { | |||
| return toAjax(tTaskImportService.deleteTTaskImportByIds(ids)); | |||
| @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <select id="selectTTaskExportList" parameterType="TTaskExport" resultMap="TTaskExportResult"> | |||
| <include refid="selectTTaskExportVo"/> | |||
| <where> | |||
| <if test="deptId != null "> and dept_id = #{deptId}</if> | |||
| <if test="deptId != null "> and (dept_id = #{deptId} OR dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</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> | |||
| @@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| <select id="selectTTaskImportList" parameterType="TTaskImport" resultMap="TTaskImportResult"> | |||
| <include refid="selectTTaskImportVo"/> | |||
| <where> | |||
| <if test="deptId != null "> and dept_id = #{deptId}</if> | |||
| <if test="deptId != null "> and (dept_id = #{deptId} OR dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</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> | |||
| @@ -99,6 +99,16 @@ public class ${ClassName}Controller extends BaseController | |||
| @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") | |||
| @GetMapping(value = "/{${pkColumn.javaField}}") | |||
| public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) | |||
| { | |||
| return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); | |||
| } | |||
| /** | |||
| * 获取${functionName}详细信息,翻译字典 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") | |||
| @GetMapping(value = "/detail/{${pkColumn.javaField}}") | |||
| public AjaxResult detail(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) | |||
| { | |||
| ${ClassName} detail = ${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); | |||
| TranslateUtils.translate(detail, false); | |||
| @@ -110,7 +120,7 @@ public class ${ClassName}Controller extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") | |||
| @Log(title = "${functionName}", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| @PostMapping("/add") | |||
| public AjaxResult add(@RequestBody ${ClassName} ${className}) | |||
| { | |||
| return toAjax(${className}Service.insert${ClassName}(${className})); | |||
| @@ -121,7 +131,7 @@ public class ${ClassName}Controller extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") | |||
| @Log(title = "${functionName}", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| @PostMapping("/update") | |||
| public AjaxResult edit(@RequestBody ${ClassName} ${className}) | |||
| { | |||
| return toAjax(${className}Service.update${ClassName}(${className})); | |||
| @@ -132,7 +142,7 @@ public class ${ClassName}Controller extends BaseController | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") | |||
| @Log(title = "${functionName}", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{${pkColumn.javaField}s}") | |||
| @GetMapping("/delete/{${pkColumn.javaField}s}") | |||
| public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) | |||
| { | |||
| return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); | |||
| @@ -17,11 +17,19 @@ export function get${BusinessName}(${pkColumn.javaField}) { | |||
| }) | |||
| } | |||
| // 查询${functionName}详细 | |||
| export function get${BusinessName}Detail(${pkColumn.javaField}) { | |||
| return request({ | |||
| url: '/${moduleName}/${businessName}/detail/' + ${pkColumn.javaField}, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| // 新增${functionName} | |||
| export function add${BusinessName}(data) { | |||
| return request({ | |||
| url: '/${moduleName}/${businessName}', | |||
| url: '/${moduleName}/${businessName}/add', | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| @@ -30,8 +38,8 @@ export function add${BusinessName}(data) { | |||
| // 修改${functionName} | |||
| export function update${BusinessName}(data) { | |||
| return request({ | |||
| url: '/${moduleName}/${businessName}', | |||
| method: 'put', | |||
| url: '/${moduleName}/${businessName}/update', | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| } | |||
| @@ -39,8 +47,8 @@ export function update${BusinessName}(data) { | |||
| // 删除${functionName} | |||
| export function del${BusinessName}(${pkColumn.javaField}) { | |||
| return request({ | |||
| url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, | |||
| method: 'delete' | |||
| url: '/${moduleName}/${businessName}/delete/' + ${pkColumn.javaField}, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| @@ -209,8 +209,8 @@ | |||
| </el-dialog> | |||
| <!-- 添加或修改${functionName}对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |||
| <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="100px"> | |||
| #foreach($column in $columns) | |||
| #set($field=$column.javaField) | |||
| #if($column.insert && !$column.pk) | |||
| @@ -359,7 +359,7 @@ | |||
| </template> | |||
| <script> | |||
| import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, print${BusinessName} } from "@/api/${moduleName}/${businessName}" | |||
| import { list${BusinessName}, get${BusinessName}, get${BusinessName}Detail, del${BusinessName}, add${BusinessName}, update${BusinessName}, print${BusinessName} } from "@/api/${moduleName}/${businessName}" | |||
| import { getToken } from "@/utils/auth" | |||
| export default { | |||
| name: "${BusinessName}", | |||
| @@ -563,7 +563,7 @@ export default { | |||
| /** 查看按钮操作 */ | |||
| handleLook(row) { | |||
| const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids | |||
| get${BusinessName}(${pkColumn.javaField}).then(response => { | |||
| get${BusinessName}Detail(${pkColumn.javaField}).then(response => { | |||
| this.form = response.data; | |||
| #foreach ($column in $columns) | |||
| #if($column.htmlType == "checkbox") | |||