增加Excel导入查询(详细页面待完成)
This commit is contained in:
parent
0ef342010f
commit
69815d7e44
|
|
@ -1,23 +1,29 @@
|
||||||
package com.ruoyi.bps.controller;
|
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.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.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import java.time.LocalDateTime;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import java.util.ArrayList;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import java.util.List;
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel批量快递查询Controller
|
* Excel批量快递查询Controller
|
||||||
|
|
@ -34,6 +40,9 @@ public class ExpImportQueryController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private IExpImportQueryService expImportQueryService;
|
private IExpImportQueryService expImportQueryService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExpressInfoService expressInfoService;
|
||||||
|
|
||||||
@RequiresPermissions("bps:expImportQuery:view")
|
@RequiresPermissions("bps:expImportQuery:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String expImportQuery()
|
public String expImportQuery()
|
||||||
|
|
@ -123,4 +132,63 @@ public class ExpImportQueryController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(expImportQueryService.deleteExpImportQueryByIds(ids));
|
return toAjax(expImportQueryService.deleteExpImportQueryByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快递查询明细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("bps:expImportQuery:detail")
|
||||||
|
@GetMapping("/detail/{queryId}")
|
||||||
|
public String detail(@PathVariable("queryId") String queryId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
/*ExpSubsPushResp expSubsPushResp = expSubsPushRespService.selectExpSubsPushRespById(sid);
|
||||||
|
mmap.put("expSubsPushResp", expSubsPushResp);*/
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,17 @@ public class ExpImportQuery extends BaseEntity
|
||||||
/** sid */
|
/** sid */
|
||||||
private Long sid;
|
private Long sid;
|
||||||
|
|
||||||
|
/** 查询ID */
|
||||||
|
@Excel(name = "查询ID")
|
||||||
|
private String queryId;
|
||||||
|
|
||||||
/** 查询时间 */
|
/** 查询时间 */
|
||||||
@Excel(name = "查询时间")
|
@Excel(name = "查询时间")
|
||||||
private String queryTime;
|
private String queryTime;
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
@Excel(name = "用户ID")
|
@Excel(name = "用户ID")
|
||||||
private String queryUserId;
|
private String queryLoginName;
|
||||||
|
|
||||||
/** 用户名 */
|
/** 用户名 */
|
||||||
@Excel(name = "用户名")
|
@Excel(name = "用户名")
|
||||||
|
|
@ -46,90 +50,94 @@ public class ExpImportQuery extends BaseEntity
|
||||||
@Excel(name = "运单总量")
|
@Excel(name = "运单总量")
|
||||||
private String queryQty;
|
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;
|
this.sid = sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getSid()
|
public String getQueryId() {
|
||||||
{
|
return queryId;
|
||||||
return sid;
|
|
||||||
}
|
}
|
||||||
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;
|
this.queryTime = queryTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryTime()
|
public String getQueryLoginName() {
|
||||||
{
|
return queryLoginName;
|
||||||
return queryTime;
|
|
||||||
}
|
|
||||||
public void setQueryUserId(String queryUserId)
|
|
||||||
{
|
|
||||||
this.queryUserId = queryUserId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryUserId()
|
public void setQueryLoginName(String queryLoginName) {
|
||||||
{
|
this.queryLoginName = queryLoginName;
|
||||||
return queryUserId;
|
|
||||||
}
|
}
|
||||||
public void setQueryUserName(String queryUserName)
|
|
||||||
{
|
public String getQueryUserName() {
|
||||||
|
return queryUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryUserName(String queryUserName) {
|
||||||
this.queryUserName = queryUserName;
|
this.queryUserName = queryUserName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryUserName()
|
public String getQueryIp() {
|
||||||
{
|
return queryIp;
|
||||||
return queryUserName;
|
|
||||||
}
|
}
|
||||||
public void setQueryIp(String queryIp)
|
|
||||||
{
|
public void setQueryIp(String queryIp) {
|
||||||
this.queryIp = queryIp;
|
this.queryIp = queryIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryIp()
|
public String getFinishTime() {
|
||||||
{
|
return finishTime;
|
||||||
return queryIp;
|
|
||||||
}
|
}
|
||||||
public void setFinishTime(String finishTime)
|
|
||||||
{
|
public void setFinishTime(String finishTime) {
|
||||||
this.finishTime = finishTime;
|
this.finishTime = finishTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFinishTime()
|
public String getStatus() {
|
||||||
{
|
return status;
|
||||||
return finishTime;
|
|
||||||
}
|
}
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
public void setStatus(String status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus()
|
public String getQueryQty() {
|
||||||
{
|
return queryQty;
|
||||||
return status;
|
|
||||||
}
|
|
||||||
public void setQueryQty(String queryQty)
|
|
||||||
{
|
|
||||||
this.queryQty = queryQty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryQty()
|
public void setQueryQty(String queryQty) {
|
||||||
{
|
this.queryQty = queryQty;
|
||||||
return queryQty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return "ExpImportQuery{" +
|
||||||
.append("sid", getSid())
|
"sid=" + sid +
|
||||||
.append("queryTime", getQueryTime())
|
", queryId='" + queryId + '\'' +
|
||||||
.append("queryUserId", getQueryUserId())
|
", queryTime='" + queryTime + '\'' +
|
||||||
.append("queryUserName", getQueryUserName())
|
", queryLoginName='" + queryLoginName + '\'' +
|
||||||
.append("queryIp", getQueryIp())
|
", queryUserName='" + queryUserName + '\'' +
|
||||||
.append("finishTime", getFinishTime())
|
", queryIp='" + queryIp + '\'' +
|
||||||
.append("status", getStatus())
|
", finishTime='" + finishTime + '\'' +
|
||||||
.append("queryQty", getQueryQty())
|
", status='" + status + '\'' +
|
||||||
.toString();
|
", queryQty='" + queryQty + '\'' +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,13 @@ public class ExpressInfo extends BaseEntity
|
||||||
|
|
||||||
/** 查询人*/
|
/** 查询人*/
|
||||||
@Excel(name = "查询人",type= Excel.Type.EXPORT)
|
@Excel(name = "查询人",type= Excel.Type.EXPORT)
|
||||||
private String queryUser;
|
private String queryUserName;
|
||||||
|
|
||||||
|
/** 查询ID*/
|
||||||
|
private String queryID;
|
||||||
|
|
||||||
|
/** 查询类型*/
|
||||||
|
private String queryType;
|
||||||
|
|
||||||
|
|
||||||
public void setMessage(String message)
|
public void setMessage(String message)
|
||||||
|
|
@ -234,12 +240,12 @@ public class ExpressInfo extends BaseEntity
|
||||||
this.queryTime = queryTime;
|
this.queryTime = queryTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQueryUser() {
|
public String getQueryUserName() {
|
||||||
return queryUser;
|
return queryUserName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQueryUser(String queryUser) {
|
public void setQueryUserName(String queryUserName) {
|
||||||
this.queryUser = queryUser;
|
this.queryUserName = queryUserName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeliveryNum() {
|
public String getDeliveryNum() {
|
||||||
|
|
@ -250,6 +256,22 @@ public class ExpressInfo extends BaseEntity
|
||||||
this.deliveryNum = deliveryNum;
|
this.deliveryNum = deliveryNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQueryID() {
|
||||||
|
return queryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryID(String queryID) {
|
||||||
|
this.queryID = queryID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQueryType() {
|
||||||
|
return queryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryType(String queryType) {
|
||||||
|
this.queryType = queryType;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ExpressInfo{" +
|
return "ExpressInfo{" +
|
||||||
|
|
@ -270,7 +292,9 @@ public class ExpressInfo extends BaseEntity
|
||||||
", singedTime='" + singedTime + '\'' +
|
", singedTime='" + singedTime + '\'' +
|
||||||
", lastUpdateTime='" + lastUpdateTime + '\'' +
|
", lastUpdateTime='" + lastUpdateTime + '\'' +
|
||||||
", queryTime='" + queryTime + '\'' +
|
", queryTime='" + queryTime + '\'' +
|
||||||
", queryUser='" + queryUser + '\'' +
|
", queryUserName='" + queryUserName + '\'' +
|
||||||
|
", queryID='" + queryID + '\'' +
|
||||||
|
", queryType='" + queryType + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,12 @@ public interface IExpressInfoService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteExpressInfoById(String message);
|
public int deleteExpressInfoById(String message);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询快递信息
|
||||||
|
*
|
||||||
|
* @param expressInfo 快递信息
|
||||||
|
* @return 快递信息
|
||||||
|
*/
|
||||||
|
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||||
//return expressInfoMapper.selectExpressInfoList(expressInfo);
|
//return expressInfoMapper.selectExpressInfoList(expressInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){
|
@Override
|
||||||
|
public ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){
|
||||||
String nu=expressInfo.getNu(); //快递单号
|
String nu=expressInfo.getNu(); //快递单号
|
||||||
String com=expressInfo.getCom(); //快递公司
|
String com=expressInfo.getCom(); //快递公司
|
||||||
String phone=expressInfo.getPhone(); //收、寄件人电话号码
|
String phone=expressInfo.getPhone(); //收、寄件人电话号码
|
||||||
|
|
@ -176,10 +177,10 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||||
String collectTime= queryTrackResp.getData().get(queryTrackResp.getData().size()-1).getTime();
|
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转化为字符
|
//将快递信息中的Context转化为字符
|
||||||
String dataStr="";
|
String dataStr="";
|
||||||
|
|
@ -190,6 +191,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||||
dataStr+="\r\n";
|
dataStr+="\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String a= queryTrackResp.getCondition();
|
||||||
ExpressInfo callbackExpressInfo=new ExpressInfo();
|
ExpressInfo callbackExpressInfo=new ExpressInfo();
|
||||||
callbackExpressInfo.setMessage(queryTrackResp.getMessage());
|
callbackExpressInfo.setMessage(queryTrackResp.getMessage());
|
||||||
callbackExpressInfo.setNu(queryTrackResp.getNu());
|
callbackExpressInfo.setNu(queryTrackResp.getNu());
|
||||||
|
|
@ -207,7 +209,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||||
callbackExpressInfo.setCollectTime(collectTime);
|
callbackExpressInfo.setCollectTime(collectTime);
|
||||||
callbackExpressInfo.setLastUpdateTime(lastUpdateTime);
|
callbackExpressInfo.setLastUpdateTime(lastUpdateTime);
|
||||||
callbackExpressInfo.setQueryTime(queryTime);
|
callbackExpressInfo.setQueryTime(queryTime);
|
||||||
callbackExpressInfo.setQueryUser(queryUser);
|
callbackExpressInfo.setQueryUserName(queryUserName);
|
||||||
callbackExpressInfo.setDeliveryNum(expressInfo.getDeliveryNum());
|
callbackExpressInfo.setDeliveryNum(expressInfo.getDeliveryNum());
|
||||||
|
|
||||||
return callbackExpressInfo;
|
return callbackExpressInfo;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<resultMap type="ExpImportQuery" id="ExpImportQueryResult">
|
<resultMap type="ExpImportQuery" id="ExpImportQueryResult">
|
||||||
<result property="sid" column="sid" />
|
<result property="sid" column="sid" />
|
||||||
|
<result property="queryId" column="queryId" />
|
||||||
<result property="queryTime" column="queryTime" />
|
<result property="queryTime" column="queryTime" />
|
||||||
<result property="queryUserId" column="queryUserId" />
|
<result property="queryLoginName" column="queryLoginName" />
|
||||||
<result property="queryUserName" column="queryUserName" />
|
<result property="queryUserName" column="queryUserName" />
|
||||||
<result property="queryIp" column="queryIp" />
|
<result property="queryIp" column="queryIp" />
|
||||||
<result property="finishTime" column="finishTime" />
|
<result property="finishTime" column="finishTime" />
|
||||||
|
|
@ -16,14 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectExpImportQueryVo">
|
<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>
|
</sql>
|
||||||
|
|
||||||
<select id="selectExpImportQueryList" parameterType="ExpImportQuery" resultMap="ExpImportQueryResult">
|
<select id="selectExpImportQueryList" parameterType="ExpImportQuery" resultMap="ExpImportQueryResult">
|
||||||
<include refid="selectExpImportQueryVo"/>
|
<include refid="selectExpImportQueryVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="queryTime != null and queryTime != ''"> and queryTime like concat('%', #{queryTime}, '%')</if>
|
<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="queryUserName != null and queryUserName != ''"> and queryUserName = #{queryUserName}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
@ -38,7 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
insert into exp_import_query
|
insert into exp_import_query
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="queryTime != null">queryTime,</if>
|
<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="queryUserName != null">queryUserName,</if>
|
||||||
<if test="queryIp != null">queryIp,</if>
|
<if test="queryIp != null">queryIp,</if>
|
||||||
<if test="finishTime != null">finishTime,</if>
|
<if test="finishTime != null">finishTime,</if>
|
||||||
|
|
@ -47,7 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="queryTime != null">#{queryTime},</if>
|
<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="queryUserName != null">#{queryUserName},</if>
|
||||||
<if test="queryIp != null">#{queryIp},</if>
|
<if test="queryIp != null">#{queryIp},</if>
|
||||||
<if test="finishTime != null">#{finishTime},</if>
|
<if test="finishTime != null">#{finishTime},</if>
|
||||||
|
|
@ -60,7 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update exp_import_query
|
update exp_import_query
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="queryTime != null">queryTime = #{queryTime},</if>
|
<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="queryUserName != null">queryUserName = #{queryUserName},</if>
|
||||||
<if test="queryIp != null">queryIp = #{queryIp},</if>
|
<if test="queryIp != null">queryIp = #{queryIp},</if>
|
||||||
<if test="finishTime != null">finishTime = #{finishTime},</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="returnCode" column="returnCode" />
|
||||||
<result property="result" column="result" />
|
<result property="result" column="result" />
|
||||||
<result property="phone" column="phone" />
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectExpressInfoVo">
|
<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>
|
</sql>
|
||||||
|
|
||||||
<select id="selectExpressInfoList" parameterType="ExpressInfo" resultMap="ExpressInfoResult">
|
<select id="selectExpressInfoList" parameterType="ExpressInfo" resultMap="ExpressInfoResult">
|
||||||
|
|
@ -45,13 +54,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="ischeck != null">ischeck,</if>
|
<if test="ischeck != null">ischeck,</if>
|
||||||
<if test="com != null">com,</if>
|
<if test="com != null">com,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="data != null">data,</if>
|
<if test="data != null">`data`,</if>
|
||||||
<if test="state != null">state,</if>
|
<if test="state != null">`state`,</if>
|
||||||
<if test="condition != null">condition,</if>
|
<if test="condition != null">`condition`,</if>
|
||||||
<if test="routeInfo != null">routeInfo,</if>
|
<if test="routeInfo != null">routeInfo,</if>
|
||||||
<if test="returnCode != null">returnCode,</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>
|
<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>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="message != null">#{message},</if>
|
<if test="message != null">#{message},</if>
|
||||||
|
|
@ -66,6 +82,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="returnCode != null">#{returnCode},</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>
|
<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>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -76,13 +99,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="ischeck != null">ischeck = #{ischeck},</if>
|
<if test="ischeck != null">ischeck = #{ischeck},</if>
|
||||||
<if test="com != null">com = #{com},</if>
|
<if test="com != null">com = #{com},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="data != null">data = #{data},</if>
|
<if test="data != null">`data` = #{data},</if>
|
||||||
<if test="state != null">state = #{state},</if>
|
<if test="state != null">`state` = #{state},</if>
|
||||||
<if test="condition != null">condition = #{condition},</if>
|
<if test="condition != null">`condition` = #{condition},</if>
|
||||||
<if test="routeInfo != null">routeInfo = #{routeInfo},</if>
|
<if test="routeInfo != null">routeInfo = #{routeInfo},</if>
|
||||||
<if test="returnCode != null">returnCode = #{returnCode},</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="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>
|
</trim>
|
||||||
where message = #{message}
|
where message = #{message}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-expImportQuery-add">
|
<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">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">查询时间:</label>
|
<label class="col-sm-3 control-label">查询时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -15,7 +21,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">用户ID:</label>
|
<label class="col-sm-3 control-label">用户ID:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="queryUserId" class="form-control" type="text">
|
<input name="queryLoginName" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
222
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">用户ID:</label>
|
<label class="col-sm-3 control-label">用户ID:</label>
|
||||||
<div class="col-sm-8">
|
<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>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>用户ID:</label>
|
<label>用户ID:</label>
|
||||||
<input type="text" name="queryUserId"/>
|
<input type="text" name="queryLoginName"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>用户名:</label>
|
<label>用户名:</label>
|
||||||
|
|
@ -39,6 +39,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group-sm" id="toolbar" role="group">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<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> 添加
|
<i class="fa fa-plus"></i> 添加
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -61,6 +64,7 @@
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var editFlag = [[${@permission.hasPermi('bps:expImportQuery:edit')}]];
|
var editFlag = [[${@permission.hasPermi('bps:expImportQuery:edit')}]];
|
||||||
var removeFlag = [[${@permission.hasPermi('bps:expImportQuery:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('bps:expImportQuery:remove')}]];
|
||||||
|
var detailFlag = [[${@permission.hasPermi('bps:expImportQuery:detail')}]];
|
||||||
var statusDatas = [[${@dict.getType('sys_common_status')}]];
|
var statusDatas = [[${@dict.getType('sys_common_status')}]];
|
||||||
var prefix = ctx + "bps/expImportQuery";
|
var prefix = ctx + "bps/expImportQuery";
|
||||||
|
|
||||||
|
|
@ -70,7 +74,10 @@
|
||||||
createUrl: prefix + "/add",
|
createUrl: prefix + "/add",
|
||||||
updateUrl: prefix + "/edit/{id}",
|
updateUrl: prefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
|
detailUrl: prefix + "/detail/{queryId}",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
modalName: "Excel批量快递查询",
|
modalName: "Excel批量快递查询",
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
|
|
@ -80,12 +87,16 @@
|
||||||
title: 'sid',
|
title: 'sid',
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'queryId',
|
||||||
|
title: '查询ID'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'queryTime',
|
field: 'queryTime',
|
||||||
title: '查询时间'
|
title: '查询时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'queryUserId',
|
field: 'queryLoginName',
|
||||||
title: '用户ID'
|
title: '用户ID'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -116,6 +127,7 @@
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + 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-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>');
|
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('');
|
return actions.join('');
|
||||||
|
|
@ -125,5 +137,20 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
</script>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
title: '查询时间'
|
title: '查询时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'queryUser',
|
field: 'queryUserName',
|
||||||
title: '查询人'
|
title: '查询人'
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue