New Branch
This commit is contained in:
parent
0ef342010f
commit
c6d239fea2
|
|
@ -1,23 +1,31 @@
|
|||
package com.ruoyi.bps.controller;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpressInfo;
|
||||
import com.ruoyi.bps.mapper.ExpressInfoMapper;
|
||||
import com.ruoyi.bps.service.IExpImportQueryService;
|
||||
import com.ruoyi.bps.service.IExpressInfoService;
|
||||
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.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ExceptionUtil;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.bps.domain.ExpImportQuery;
|
||||
import com.ruoyi.bps.service.IExpImportQueryService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Excel批量快递查询Controller
|
||||
|
|
@ -34,6 +42,12 @@ public class ExpImportQueryController extends BaseController
|
|||
@Autowired
|
||||
private IExpImportQueryService expImportQueryService;
|
||||
|
||||
@Autowired
|
||||
private IExpressInfoService expressInfoService;
|
||||
|
||||
@Autowired
|
||||
private ExpressInfoMapper expressInfoMapper;
|
||||
|
||||
@RequiresPermissions("bps:expImportQuery:view")
|
||||
@GetMapping()
|
||||
public String expImportQuery()
|
||||
|
|
@ -68,6 +82,21 @@ public class ExpImportQueryController extends BaseController
|
|||
return util.exportExcel(list, "Excel批量快递查询数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出Excel批量快递查询列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:export")
|
||||
@Log(title = "详细快递信息导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportDetail")
|
||||
@ResponseBody
|
||||
public AjaxResult exportDetail(ExpressInfo expressInfo)
|
||||
{
|
||||
List<ExpressInfo> list = expressInfoService.selectLocalExpressInfoList(expressInfo);
|
||||
ExcelUtil<ExpressInfo> util = new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
return util.exportExcel(list, "Excel批量快递查询数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增Excel批量快递查询
|
||||
*/
|
||||
|
|
@ -123,4 +152,65 @@ public class ExpImportQueryController extends BaseController
|
|||
{
|
||||
return toAjax(expImportQueryService.deleteExpImportQueryByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 快递查询明细信息
|
||||
*/
|
||||
@RequiresPermissions("bps:expImportQuery:detail")
|
||||
@GetMapping("/detail/{sid}")
|
||||
public String detail(@PathVariable("sid") Long sid, ModelMap mmap)
|
||||
{
|
||||
String queryId = expImportQueryService.selectExpImportQueryById(sid).getQueryId();
|
||||
ExpressInfo expressInfo= new ExpressInfo();
|
||||
expressInfo.setQueryId(queryId);
|
||||
mmap.put("expressInfo",expressInfo);
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping ( "/importTemplate" )
|
||||
@ResponseBody
|
||||
public AjaxResult importTemplate ( ) {
|
||||
ExcelUtil <ExpressInfo> util = new ExcelUtil<>(ExpressInfo.class);
|
||||
return util.importTemplateExcel ( "快递查询导入模板" );
|
||||
}
|
||||
|
||||
@PostMapping("/importData")
|
||||
@ResponseBody
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
String queryTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss");
|
||||
String queryId= LocalDateTime.now().toString();
|
||||
ExcelUtil<ExpressInfo> util= new ExcelUtil<ExpressInfo>(ExpressInfo.class);
|
||||
List<ExpressInfo> expressInfoList=util.importExcel(file.getInputStream());
|
||||
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);
|
||||
}
|
||||
|
||||
expImportQuery.setQueryTime(queryTime);
|
||||
expImportQuery.setQueryLoginName(ShiroUtils.getLoginName());
|
||||
expImportQuery.setQueryUserName(ShiroUtils.getSysUser().getUserName());
|
||||
expImportQuery.setFinishTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
expImportQuery.setQueryIp(ShiroUtils.getIp());
|
||||
expImportQuery.setStatus("success");
|
||||
expImportQuery.setQueryQty(String.valueOf(expressInfoList.size()));
|
||||
expImportQuery.setQueryId(queryId);
|
||||
expImportQueryService.insertExpImportQuery(expImportQuery);
|
||||
|
||||
return AjaxResult.success("导入查询成功!");
|
||||
}catch (Exception e){
|
||||
expImportQuery.setStatus("fail");
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,20 @@ public class ExpressInfoController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*/
|
||||
@RequiresPermissions("bps:expressInfo:list")
|
||||
@PostMapping("/localList")
|
||||
@ResponseBody
|
||||
public TableDataInfo localList(ExpressInfo expressInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExpressInfo> list = expressInfoService.selectLocalExpressInfoList(expressInfo);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出快递信息列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,13 +18,17 @@ public class ExpImportQuery extends BaseEntity
|
|||
/** sid */
|
||||
private Long sid;
|
||||
|
||||
/** 查询ID */
|
||||
@Excel(name = "查询ID")
|
||||
private String queryId;
|
||||
|
||||
/** 查询时间 */
|
||||
@Excel(name = "查询时间")
|
||||
private String queryTime;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private String queryUserId;
|
||||
private String queryLoginName;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
|
|
@ -46,90 +50,94 @@ public class ExpImportQuery extends BaseEntity
|
|||
@Excel(name = "运单总量")
|
||||
private String queryQty;
|
||||
|
||||
public void setSid(Long sid)
|
||||
{
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public Long getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Long sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Long getSid()
|
||||
{
|
||||
return sid;
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
public void setQueryTime(String queryTime)
|
||||
{
|
||||
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
public String getQueryTime() {
|
||||
return queryTime;
|
||||
}
|
||||
|
||||
public void setQueryTime(String queryTime) {
|
||||
this.queryTime = queryTime;
|
||||
}
|
||||
|
||||
public String getQueryTime()
|
||||
{
|
||||
return queryTime;
|
||||
}
|
||||
public void setQueryUserId(String queryUserId)
|
||||
{
|
||||
this.queryUserId = queryUserId;
|
||||
public String getQueryLoginName() {
|
||||
return queryLoginName;
|
||||
}
|
||||
|
||||
public String getQueryUserId()
|
||||
{
|
||||
return queryUserId;
|
||||
public void setQueryLoginName(String queryLoginName) {
|
||||
this.queryLoginName = queryLoginName;
|
||||
}
|
||||
public void setQueryUserName(String queryUserName)
|
||||
{
|
||||
|
||||
public String getQueryUserName() {
|
||||
return queryUserName;
|
||||
}
|
||||
|
||||
public void setQueryUserName(String queryUserName) {
|
||||
this.queryUserName = queryUserName;
|
||||
}
|
||||
|
||||
public String getQueryUserName()
|
||||
{
|
||||
return queryUserName;
|
||||
public String getQueryIp() {
|
||||
return queryIp;
|
||||
}
|
||||
public void setQueryIp(String queryIp)
|
||||
{
|
||||
|
||||
public void setQueryIp(String queryIp) {
|
||||
this.queryIp = queryIp;
|
||||
}
|
||||
|
||||
public String getQueryIp()
|
||||
{
|
||||
return queryIp;
|
||||
public String getFinishTime() {
|
||||
return finishTime;
|
||||
}
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
|
||||
public void setFinishTime(String finishTime) {
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setQueryQty(String queryQty)
|
||||
{
|
||||
this.queryQty = queryQty;
|
||||
public String getQueryQty() {
|
||||
return queryQty;
|
||||
}
|
||||
|
||||
public String getQueryQty()
|
||||
{
|
||||
return queryQty;
|
||||
public void setQueryQty(String queryQty) {
|
||||
this.queryQty = queryQty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sid", getSid())
|
||||
.append("queryTime", getQueryTime())
|
||||
.append("queryUserId", getQueryUserId())
|
||||
.append("queryUserName", getQueryUserName())
|
||||
.append("queryIp", getQueryIp())
|
||||
.append("finishTime", getFinishTime())
|
||||
.append("status", getStatus())
|
||||
.append("queryQty", getQueryQty())
|
||||
.toString();
|
||||
return "ExpImportQuery{" +
|
||||
"sid=" + sid +
|
||||
", queryId='" + queryId + '\'' +
|
||||
", queryTime='" + queryTime + '\'' +
|
||||
", queryLoginName='" + queryLoginName + '\'' +
|
||||
", queryUserName='" + queryUserName + '\'' +
|
||||
", queryIp='" + queryIp + '\'' +
|
||||
", finishTime='" + finishTime + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", queryQty='" + queryQty + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,122 +86,122 @@ public class ExpressInfo extends BaseEntity
|
|||
|
||||
/** 查询人*/
|
||||
@Excel(name = "查询人",type= Excel.Type.EXPORT)
|
||||
private String queryUser;
|
||||
private String queryUserName;
|
||||
|
||||
/** 查询ID*/
|
||||
private String queryId;
|
||||
|
||||
public void setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
public void setNu(String nu)
|
||||
{
|
||||
this.nu = nu;
|
||||
}
|
||||
|
||||
public String getNu()
|
||||
{
|
||||
return nu;
|
||||
}
|
||||
public void setIscheck(String ischeck)
|
||||
{
|
||||
this.ischeck = ischeck;
|
||||
}
|
||||
|
||||
public String getIscheck()
|
||||
{
|
||||
return ischeck;
|
||||
}
|
||||
public void setCom(String com)
|
||||
{
|
||||
this.com = com;
|
||||
}
|
||||
|
||||
public String getCom()
|
||||
{
|
||||
return com;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setData(String data)
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
public void setState(String state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setCondition(String condition)
|
||||
{
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public String getCondition()
|
||||
{
|
||||
return condition;
|
||||
}
|
||||
public void setRouteInfo(String routeInfo)
|
||||
{
|
||||
this.routeInfo = routeInfo;
|
||||
}
|
||||
|
||||
public String getRouteInfo()
|
||||
{
|
||||
return routeInfo;
|
||||
}
|
||||
public void setReturnCode(String returnCode)
|
||||
{
|
||||
this.returnCode = returnCode;
|
||||
}
|
||||
|
||||
public String getReturnCode()
|
||||
{
|
||||
return returnCode;
|
||||
}
|
||||
public void setResult(String result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
/** 查询类型*/
|
||||
private String queryType;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getDeliveryNum() {
|
||||
return deliveryNum;
|
||||
}
|
||||
|
||||
public void setDeliveryNum(String deliveryNum) {
|
||||
this.deliveryNum = deliveryNum;
|
||||
}
|
||||
|
||||
public String getNu() {
|
||||
return nu;
|
||||
}
|
||||
|
||||
public void setNu(String nu) {
|
||||
this.nu = nu;
|
||||
}
|
||||
|
||||
public String getIscheck() {
|
||||
return ischeck;
|
||||
}
|
||||
|
||||
public void setIscheck(String ischeck) {
|
||||
this.ischeck = ischeck;
|
||||
}
|
||||
|
||||
public String getCom() {
|
||||
return com;
|
||||
}
|
||||
|
||||
public void setCom(String com) {
|
||||
this.com = com;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public void setCondition(String condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public String getRouteInfo() {
|
||||
return routeInfo;
|
||||
}
|
||||
|
||||
public void setRouteInfo(String routeInfo) {
|
||||
this.routeInfo = routeInfo;
|
||||
}
|
||||
|
||||
public String getReturnCode() {
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
public void setReturnCode(String returnCode) {
|
||||
this.returnCode = returnCode;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getCollectTime() {
|
||||
return collectTime;
|
||||
}
|
||||
|
|
@ -234,20 +234,28 @@ public class ExpressInfo extends BaseEntity
|
|||
this.queryTime = queryTime;
|
||||
}
|
||||
|
||||
public String getQueryUser() {
|
||||
return queryUser;
|
||||
public String getQueryUserName() {
|
||||
return queryUserName;
|
||||
}
|
||||
|
||||
public void setQueryUser(String queryUser) {
|
||||
this.queryUser = queryUser;
|
||||
public void setQueryUserName(String queryUserName) {
|
||||
this.queryUserName = queryUserName;
|
||||
}
|
||||
|
||||
public String getDeliveryNum() {
|
||||
return deliveryNum;
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
|
||||
public void setDeliveryNum(String deliveryNum) {
|
||||
this.deliveryNum = deliveryNum;
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
public String getQueryType() {
|
||||
return queryType;
|
||||
}
|
||||
|
||||
public void setQueryType(String queryType) {
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -270,7 +278,9 @@ public class ExpressInfo extends BaseEntity
|
|||
", singedTime='" + singedTime + '\'' +
|
||||
", lastUpdateTime='" + lastUpdateTime + '\'' +
|
||||
", queryTime='" + queryTime + '\'' +
|
||||
", queryUser='" + queryUser + '\'' +
|
||||
", queryUserName='" + queryUserName + '\'' +
|
||||
", queryId='" + queryId + '\'' +
|
||||
", queryType='" + queryType + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,19 @@ public interface IExpressInfoService
|
|||
public ExpressInfo selectExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
public List<ExpressInfo> selectLocalExpressInfoList(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
public List<ExpressInfo> selectExpressInfoList(ExpressInfo expressInfo);
|
||||
|
||||
/**
|
||||
|
|
@ -59,4 +67,12 @@ public interface IExpressInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteExpressInfoById(String message);
|
||||
|
||||
/**
|
||||
* 查询快递信息
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息
|
||||
*/
|
||||
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,17 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
return expressInfoMapper.selectExpressInfoById(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询本地快递信息列表
|
||||
*
|
||||
* @param expressInfo 快递信息
|
||||
* @return 快递信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<ExpressInfo> selectLocalExpressInfoList(ExpressInfo expressInfo) {
|
||||
return expressInfoMapper.selectExpressInfoList(expressInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询快递信息列表
|
||||
*
|
||||
|
|
@ -107,7 +118,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
//return expressInfoMapper.selectExpressInfoList(expressInfo);
|
||||
}
|
||||
|
||||
private ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){
|
||||
@Override
|
||||
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){
|
||||
String nu=expressInfo.getNu(); //快递单号
|
||||
String com=expressInfo.getCom(); //快递公司
|
||||
String phone=expressInfo.getPhone(); //收、寄件人电话号码
|
||||
|
|
@ -176,10 +188,10 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
String collectTime= queryTrackResp.getData().get(queryTrackResp.getData().size()-1).getTime();
|
||||
|
||||
//获取查询时间
|
||||
String queryTime= DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss");
|
||||
String queryTime= StringUtils.isNotEmpty(expressInfo.getQueryTime())?expressInfo.getQueryTime():DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
//获取查询人(登录用户)
|
||||
String queryUser= ShiroUtils.getLoginName();
|
||||
String queryUserName= ShiroUtils.getLoginName();
|
||||
|
||||
//将快递信息中的Context转化为字符
|
||||
String dataStr="";
|
||||
|
|
@ -190,6 +202,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
dataStr+="\r\n";
|
||||
}
|
||||
}
|
||||
String a= queryTrackResp.getCondition();
|
||||
ExpressInfo callbackExpressInfo=new ExpressInfo();
|
||||
callbackExpressInfo.setMessage(queryTrackResp.getMessage());
|
||||
callbackExpressInfo.setNu(queryTrackResp.getNu());
|
||||
|
|
@ -207,7 +220,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
callbackExpressInfo.setCollectTime(collectTime);
|
||||
callbackExpressInfo.setLastUpdateTime(lastUpdateTime);
|
||||
callbackExpressInfo.setQueryTime(queryTime);
|
||||
callbackExpressInfo.setQueryUser(queryUser);
|
||||
callbackExpressInfo.setQueryUserName(queryUserName);
|
||||
callbackExpressInfo.setDeliveryNum(expressInfo.getDeliveryNum());
|
||||
|
||||
return callbackExpressInfo;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<resultMap type="ExpImportQuery" id="ExpImportQueryResult">
|
||||
<result property="sid" column="sid" />
|
||||
<result property="queryId" column="queryId" />
|
||||
<result property="queryTime" column="queryTime" />
|
||||
<result property="queryUserId" column="queryUserId" />
|
||||
<result property="queryLoginName" column="queryLoginName" />
|
||||
<result property="queryUserName" column="queryUserName" />
|
||||
<result property="queryIp" column="queryIp" />
|
||||
<result property="finishTime" column="finishTime" />
|
||||
|
|
@ -16,14 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectExpImportQueryVo">
|
||||
select sid, queryTime, queryUserId, queryUserName, queryIp, finishTime, status, queryQty from exp_import_query
|
||||
select sid, queryId, queryTime, queryLoginName, queryUserName, queryIp, finishTime, status, queryQty from exp_import_query
|
||||
</sql>
|
||||
|
||||
<select id="selectExpImportQueryList" parameterType="ExpImportQuery" resultMap="ExpImportQueryResult">
|
||||
<include refid="selectExpImportQueryVo"/>
|
||||
<where>
|
||||
<if test="queryTime != null and queryTime != ''"> and queryTime like concat('%', #{queryTime}, '%')</if>
|
||||
<if test="queryUserId != null and queryUserId != ''"> and queryUserId = #{queryUserId}</if>
|
||||
<if test="queryLoginName != null and queryLoginName != ''"> and queryLoginName = #{queryLoginName}</if>
|
||||
<if test="queryUserName != null and queryUserName != ''"> and queryUserName = #{queryUserName}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
|
|
@ -38,7 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into exp_import_query
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="queryTime != null">queryTime,</if>
|
||||
<if test="queryUserId != null">queryUserId,</if>
|
||||
<if test="queryId != null">queryId,</if>
|
||||
<if test="queryLoginName != null">queryLoginName,</if>
|
||||
<if test="queryUserName != null">queryUserName,</if>
|
||||
<if test="queryIp != null">queryIp,</if>
|
||||
<if test="finishTime != null">finishTime,</if>
|
||||
|
|
@ -47,7 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="queryTime != null">#{queryTime},</if>
|
||||
<if test="queryUserId != null">#{queryUserId},</if>
|
||||
<if test="queryId != null">#{queryId},</if>
|
||||
<if test="queryLoginName != null">#{queryLoginName},</if>
|
||||
<if test="queryUserName != null">#{queryUserName},</if>
|
||||
<if test="queryIp != null">#{queryIp},</if>
|
||||
<if test="finishTime != null">#{finishTime},</if>
|
||||
|
|
@ -60,7 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update exp_import_query
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="queryTime != null">queryTime = #{queryTime},</if>
|
||||
<if test="queryUserId != null">queryUserId = #{queryUserId},</if>
|
||||
<if test="queryId != null">queryId = #{queryId},</if>
|
||||
<if test="queryLoginName != null">queryLoginName = #{queryLoginName},</if>
|
||||
<if test="queryUserName != null">queryUserName = #{queryUserName},</if>
|
||||
<if test="queryIp != null">queryIp = #{queryIp},</if>
|
||||
<if test="finishTime != null">finishTime = #{finishTime},</if>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="returnCode" column="returnCode" />
|
||||
<result property="result" column="result" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="collectTime" column="collectTime" />
|
||||
<result property="singedTime" column="singedTime" />
|
||||
<result property="lastUpdateTime" column="lastUpdateTime" />
|
||||
<result property="queryTime" column="queryTime" />
|
||||
<result property="queryUserName" column="queryUserName" />
|
||||
<result property="queryId" column="queryId" />
|
||||
<result property="queryType" column="queryType" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExpressInfoVo">
|
||||
select message, nu, ischeck, com, status, data, state, condition, routeInfo, returnCode, result, phone from expressInfo
|
||||
select message, nu, ischeck, com, status, `data`, `state`, `condition`, routeInfo, returnCode, `result`, phone,
|
||||
collectTime, singedTime, lastUpdateTime, queryTime, queryUserName, queryId, queryType
|
||||
from expressInfo
|
||||
</sql>
|
||||
|
||||
<select id="selectExpressInfoList" parameterType="ExpressInfo" resultMap="ExpressInfoResult">
|
||||
|
|
@ -29,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="nu != null and nu != ''"> and nu = #{nu}</if>
|
||||
<if test="com != null and com != ''"> and com = #{com}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="queryId != null and queryId != ''"> and queryId = #{queryId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -36,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectExpressInfoVo"/>
|
||||
where message = #{message}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertExpressInfo" parameterType="ExpressInfo">
|
||||
insert into expressInfo
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -45,14 +55,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="ischeck != null">ischeck,</if>
|
||||
<if test="com != null">com,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="data != null">data,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="condition != null">condition,</if>
|
||||
<if test="data != null">`data`,</if>
|
||||
<if test="state != null">`state`,</if>
|
||||
<if test="condition != null">`condition`,</if>
|
||||
<if test="routeInfo != null">routeInfo,</if>
|
||||
<if test="returnCode != null">returnCode,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="result != null">`result`,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
</trim>
|
||||
<if test="collectTime != null">collectTime,</if>
|
||||
<if test="singedTime != null">singedTime,</if>
|
||||
<if test="lastUpdateTime != null">lastUpdateTime,</if>
|
||||
<if test="queryTime != null">queryTime,</if>
|
||||
<if test="queryUserName != null">queryUserName,</if>
|
||||
<if test="queryId != null">queryId,</if>
|
||||
<if test="queryType != null">queryType,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="message != null">#{message},</if>
|
||||
<if test="nu != null">#{nu},</if>
|
||||
|
|
@ -66,6 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="returnCode != null">#{returnCode},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="collectTime != null">#{collectTime},</if>
|
||||
<if test="singedTime != null">#{singedTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="queryTime != null">#{queryTime},</if>
|
||||
<if test="queryUserName != null">#{queryUserName},</if>
|
||||
<if test="queryId != null">#{queryId},</if>
|
||||
<if test="queryType != null">#{queryType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -76,13 +100,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="ischeck != null">ischeck = #{ischeck},</if>
|
||||
<if test="com != null">com = #{com},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="data != null">data = #{data},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="condition != null">condition = #{condition},</if>
|
||||
<if test="data != null">`data` = #{data},</if>
|
||||
<if test="state != null">`state` = #{state},</if>
|
||||
<if test="condition != null">`condition` = #{condition},</if>
|
||||
<if test="routeInfo != null">routeInfo = #{routeInfo},</if>
|
||||
<if test="returnCode != null">returnCode = #{returnCode},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="result != null">`result` = #{result},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="collectTime != null">collectTime = #{collectTime},</if>
|
||||
<if test="singedTime != null">singedTime = #{singedTime},</if>
|
||||
<if test="lastUpdateTime != null">lastUpdateTime = #{lastUpdateTime},</if>
|
||||
<if test="queryTime != null">queryTime = #{queryTime},</if>
|
||||
<if test="queryUserName != null">queryUserName = #{queryUserName},</if>
|
||||
<if test="queryId != null">queryId = #{queryId},</if>
|
||||
<if test="queryType != null">queryType = #{queryType},</if>
|
||||
</trim>
|
||||
where message = #{message}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-expImportQuery-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询时间:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -15,7 +21,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryUserId" class="form-control" type="text">
|
||||
<input name="queryLoginName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="queryUserId" th:field="*{queryUserId}" class="form-control" type="text">
|
||||
<input name="queryLoginName" th:field="*{queryLoginName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<label>用户ID:</label>
|
||||
<input type="text" name="queryUserId"/>
|
||||
<input type="text" name="queryLoginName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
|
|
@ -39,7 +39,10 @@
|
|||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add">
|
||||
<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">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expImportQuery:edit">
|
||||
|
|
@ -50,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>
|
||||
|
|
@ -61,6 +64,7 @@
|
|||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('bps:expImportQuery:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('bps:expImportQuery:remove')}]];
|
||||
var detailFlag = [[${@permission.hasPermi('bps:expImportQuery:detail')}]];
|
||||
var statusDatas = [[${@dict.getType('sys_common_status')}]];
|
||||
var prefix = ctx + "bps/expImportQuery";
|
||||
|
||||
|
|
@ -70,7 +74,10 @@
|
|||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
detailUrl: prefix + "/detail/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
importUrl: prefix + "/importData",
|
||||
importTemplateUrl: prefix + "/importTemplate",
|
||||
modalName: "Excel批量快递查询",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
|
@ -80,12 +87,16 @@
|
|||
title: 'sid',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'queryId',
|
||||
title: '查询ID'
|
||||
},
|
||||
{
|
||||
field: 'queryTime',
|
||||
title: '查询时间'
|
||||
},
|
||||
{
|
||||
field: 'queryUserId',
|
||||
field: 'queryLoginName',
|
||||
title: '用户ID'
|
||||
},
|
||||
{
|
||||
|
|
@ -116,6 +127,7 @@
|
|||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.sid + '\')"><i class="fa fa-edit"></i>详细</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
|
|
@ -125,5 +137,20 @@
|
|||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 导入区域 -->
|
||||
<script id="importTpl" type="text/template">
|
||||
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||
<div class="col-xs-offset-1">
|
||||
<input type="file" id="file" name="file"/>
|
||||
<div class="mt10 pt5">
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>
|
||||
<span class="pull-left mt10" style="color: red; ">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -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>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
title: '查询时间'
|
||||
},
|
||||
{
|
||||
field: 'queryUser',
|
||||
field: 'queryUserName',
|
||||
title: '查询人'
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -220,6 +220,11 @@
|
|||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function reset(){
|
||||
$('.form-control').val(null).trigger('change');
|
||||
$.form.reset();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i> 订阅</a>
|
||||
|
|
@ -181,6 +181,11 @@
|
|||
});
|
||||
|
||||
};*/
|
||||
function reset(){
|
||||
$('.form-control').val(null).trigger('change');
|
||||
$.form.reset();
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue