Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ public class ImportExcelUtil {
|
||||
|
||||
}
|
||||
|
||||
public static Result imporReturnRes(int errorLines, int successLines, List<String> errorMessage){
|
||||
public static Result<JSONObject> imporReturnRes(int errorLines, int successLines, List<String> errorMessage){
|
||||
if (errorLines == 0) {
|
||||
return Result.OK("共" + successLines + "行数据全部导入成功!");
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import java.util.regex.Pattern;
|
||||
@Slf4j
|
||||
public class ReflectHelper {
|
||||
|
||||
private Class cls;
|
||||
private Class<?> cls;
|
||||
|
||||
/**
|
||||
* 传过来的对象
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ public class HttpUtils {
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public static Map getAllRequestParam(final HttpServletRequest request) throws IOException {
|
||||
public static Map<String,String> getAllRequestParam(final HttpServletRequest request) throws IOException {
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream()));
|
||||
String str;
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.quartz.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -222,7 +223,7 @@ public class QuartzJobController {
|
||||
*/
|
||||
// @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
@PostMapping("/importExcel")
|
||||
public Result<T> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
public Result<JSONObject> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
// 错误信息
|
||||
|
||||
+1
-2
@@ -22,7 +22,6 @@ import com.jero.modules.system.service.ISysUserDepartService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
@@ -338,7 +337,7 @@ public class SysDepartController {
|
||||
// @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
@PostMapping("/importExcel")
|
||||
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
|
||||
public Result<T> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
public Result<JSONObject> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
List<String> errorMessageList = new ArrayList<>();
|
||||
List<SysDepart> listSysDeparts = null;
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -468,7 +469,7 @@ public class SysDictController {
|
||||
|
||||
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<T> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
public Result<JSONObject> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
|
||||
+1
-1
@@ -526,7 +526,7 @@ public class SysUserController {
|
||||
@RequiresPermissions("sys:user:import")
|
||||
// @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
@PostMapping("/importExcel")
|
||||
public Result<T> importExcel(HttpServletRequest request, HttpServletResponse response)throws IOException {
|
||||
public Result<JSONObject> importExcel(HttpServletRequest request, HttpServletResponse response)throws IOException {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
// 错误信息
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ public class ${entityName}Controller extends JeroController<${entityName}, I${en
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
|
||||
+34
-5
@@ -69,9 +69,11 @@
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#if query_field_no gt 1> <a-range-picker format="YYYY-MM-DD" :placeholder="['请选择开始日期', '请选择结束日期']" v-model="queryParam.${po.fieldName}Range" @ok="${po.fieldName}OnOk"/>
|
||||
<#assign date_flag=true>
|
||||
<#if query_field_no gt 1> </#if><a-range-picker format="YYYY-MM-DD" :placeholder="['请选择开始日期', '请选择结束日期']" v-model="queryParam.${po.fieldName}Range" @change="${po.fieldName}Change"/>
|
||||
<#elseif po.classType=='datetime'>
|
||||
<#if query_field_no gt 1> <a-range-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :placeholder="['请选择开始时间', '请选择结束时间']" v-model="queryParam.${po.fieldName}Range" @ok="${po.fieldName}OnOk"/>
|
||||
<#assign date_flag=true>
|
||||
<#if query_field_no gt 1> </#if><a-range-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :placeholder="['请选择开始时间', '请选择结束时间']" v-model="queryParam.${po.fieldName}Range" @change="${po.fieldName}Change"/>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入最小值" class="query-group-cust" v-model="queryParam.${po.fieldName}_begin"></a-input>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-split-cust"></span>
|
||||
@@ -227,6 +229,9 @@ import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
<#if list_need_pca>
|
||||
import Area from '@/components/_util/Area'
|
||||
</#if>
|
||||
<#if date_flag>
|
||||
import { filterObj } from '@/utils/util'
|
||||
</#if>
|
||||
|
||||
export default {
|
||||
name: '${entityName}List',
|
||||
@@ -404,12 +409,36 @@ export default {
|
||||
},
|
||||
<#list columns as po>
|
||||
<#if po.classType=='datetime' || po.classType=='date'>
|
||||
${po.fieldName}OnOk () {
|
||||
this.queryParam.${po.fieldName}_begin = this.queryParam.${po.fieldName}Range[0]
|
||||
this.queryParam.${po.fieldName}_end = this.queryParam.${po.fieldName}Range[1]
|
||||
// 范围查询需要处理查询参数
|
||||
${po.fieldName}Change (value, valueString) {
|
||||
if (valueString && valueString.length > 0) {
|
||||
this.queryParam.${po.fieldName}_begin = valueString[0]
|
||||
this.queryParam.${po.fieldName}_end = valueString[1]
|
||||
}
|
||||
},
|
||||
</#if>
|
||||
</#list>
|
||||
<#if date_flag>
|
||||
getQueryParams () {
|
||||
// 获取查询条件
|
||||
const sqp = {}
|
||||
if (this.superQueryParams) {
|
||||
sqp.superQueryParams = encodeURI(this.superQueryParams)
|
||||
sqp.superQueryMatchType = this.superQueryMatchType
|
||||
}
|
||||
const param = JSON.parse(JSON.stringify(Object.assign(sqp, this.queryParam, this.isorter, this.filters)))
|
||||
param.field = this.getQueryField()
|
||||
param.pageNo = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
<#list columns as po>
|
||||
<#if po.classType=='datetime' || po.classType=='date'>
|
||||
// 范围查询需要吧range的属性去掉
|
||||
delete param.${po.fieldName}Range
|
||||
</#if>
|
||||
</#list>
|
||||
return filterObj(param)
|
||||
},
|
||||
</#if>
|
||||
getSuperFieldList () {
|
||||
<#include "/common/utils.ftl">
|
||||
const fieldList = []
|
||||
|
||||
Reference in New Issue
Block a user