1、Excel批量快递查询导出完成

2、修复使用select2下拉框,重置值不改变的问题
This commit is contained in:
bo.yang 2021-07-24 18:40:40 +08:00
parent 5aefc888e1
commit 67cfa2b1d6
7 changed files with 30 additions and 22 deletions

View File

@ -18,6 +18,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -85,7 +86,7 @@ public class ExpImportQueryController extends BaseController
/**
* 导出Excel批量快递查询列表
*/
@RequiresPermissions("bps:expImportQuery:export")
@RequiresPermissions("bps:expressInfo:export")
@Log(title = "详细快递信息导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportDetail")
@ResponseBody
@ -160,9 +161,6 @@ public class ExpImportQueryController extends BaseController
@GetMapping("/detail/{sid}")
public String detail(@PathVariable("sid") Long sid, ModelMap mmap)
{
/*ExpImportQuery expImportQuery = expImportQueryService.selectExpImportQueryById(sid);
mmap.put("expImportQuery", expImportQuery);*/
String queryId = expImportQueryService.selectExpImportQueryById(sid).getQueryId();
ExpressInfo expressInfo= new ExpressInfo();
expressInfo.setQueryId(queryId);
@ -190,12 +188,12 @@ public class ExpImportQueryController extends BaseController
ExpImportQuery expImportQuery=new ExpImportQuery();
try{
for( ExpressInfo expressInfo:expressInfoList){
ExpressInfo ei= expressInfoService.SelectExpressInfo(expressInfo);
ei.setQueryId(queryId);
ei.setQueryUserName(ShiroUtils.getSysUser().getUserName());
ei.setQueryType("excel");
ei.setQueryTime(queryTime);
expressInfoService.insertExpressInfo(ei);
ExpressInfo ei= expressInfoService.SelectExpressInfo(expressInfo);
ei.setQueryId(queryId);
ei.setQueryUserName(ShiroUtils.getSysUser().getUserName());
ei.setQueryType("excel");
ei.setQueryTime(queryTime);
expressInfoService.insertExpressInfo(ei);
}
expImportQuery.setQueryTime(queryTime);

View File

@ -20,7 +20,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export">
<a class="btn btn-warning" onclick="$.table.exportExcel()" >
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -41,7 +41,7 @@
$(function() {
var options = {
url: prefix + "/localList",
exportUrl: prefix + "/exportDetail",
exportUrl: ctx+ "bps/expImportQuery/exportDetail",
modalName: "快递信息",
columns: [{
checkbox: true

View File

@ -42,7 +42,7 @@
<a class="btn btn-info" onclick="$.table.importExcel()">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add">
<!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expImportQuery:edit">
@ -53,7 +53,7 @@
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expImportQuery:export">
<i class="fa fa-download"></i> 导出
</a>
</a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>

View File

@ -45,12 +45,12 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expressInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>-->
<a class="btn btn-info" onclick="$.table.importExcel()">
<!-- <a class="btn btn-info" onclick="$.table.importExcel()">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export">
<i class="fa fa-download"></i> 导出
</a>
</a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>

View File

@ -13,7 +13,7 @@
<ul>
<li>
<label>当前状态:</label>
<select name="lastResultState" th:with="type=${@dict.getType('express_stats')}">
<select name="lastResultState" th:with="type=${@dict.getType('express_stats')}" class="form-control">
<option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
@ -28,7 +28,7 @@
</li>
<li>
<label>快递公司:</label>
<select name="lastResultCom" th:with="type=${@dict.getType('express_company')}">
<select name="lastResultCom" th:with="type=${@dict.getType('express_company')}" class="form-control">
<option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
@ -39,7 +39,7 @@
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
@ -220,6 +220,11 @@
};
$.table.init(options);
});
function reset(){
$('.form-control').val(null).trigger('change');
$.form.reset();
}
</script>
</body>
</html>

View File

@ -14,7 +14,7 @@
<ul>
<li>
快递公司:
<select name="company" th:with="type=${@dict.getType('express_company')}">
<select name="company" th:with="type=${@dict.getType('express_company')}" class="form-control">
<option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
@ -45,7 +45,7 @@
</li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
<!-- <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i>&nbsp;订阅</a>
@ -181,6 +181,11 @@
});
};*/
function reset(){
$('.form-control').val(null).trigger('change');
$.form.reset();
}
</script>
</body>
</html>

View File

@ -7,7 +7,7 @@ ruoyi:
# 版权年份
copyrightYear: 2021
# 实例演示开关
demoEnabled: false
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: C:/bps-it/uploadPath
# 获取ip地址开关