14 changed files with 862 additions and 29 deletions
@ -0,0 +1,107 @@
|
||||
package com.logpm.basicdata.excel; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 货区零担导出 Excel实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BasicdatavisualizationKCSheetOne implements Serializable { |
||||
|
||||
/** |
||||
* 入库批次 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("入库批次") |
||||
private String incomingBatch; |
||||
/** |
||||
* 入库时间 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("入库时间") |
||||
private String warehousingTime; |
||||
|
||||
/** |
||||
* 客户名称 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("客户名称") |
||||
private String marketName; |
||||
|
||||
/** |
||||
* 订单自编号 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("订单自编号") |
||||
private String orderCode; |
||||
|
||||
/** |
||||
* 服务类型 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("服务类型") |
||||
private String typeService; |
||||
|
||||
/** |
||||
* 货物名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货物名称") |
||||
private String descriptionGoods; |
||||
|
||||
/** |
||||
* 货物编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货物编码") |
||||
private String cargoNumber; |
||||
|
||||
/** |
||||
* 服务号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("服务号") |
||||
private String serviceNumber; |
||||
/** |
||||
* 托盘码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("托盘码") |
||||
private String trayCode; |
||||
/** |
||||
* 库位号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("库位号") |
||||
private String positionCode; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数量") |
||||
private String num; |
||||
/** |
||||
* 上架时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上架时间") |
||||
private String upTime; |
||||
/** |
||||
* 上架人 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上架人") |
||||
private String upUser; |
||||
} |
@ -0,0 +1,135 @@
|
||||
package com.logpm.basicdata.excel; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 货区导出 Excel实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BasicdatavisualizationKCSheetThree implements Serializable { |
||||
/** |
||||
* 订单自编号 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("订单自编号") |
||||
private String orderCode; |
||||
/** |
||||
* 包条码 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("包条码") |
||||
private String orderPackageCode; |
||||
|
||||
/** |
||||
* 商场名称 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("商场名称") |
||||
private String mallName; |
||||
/** |
||||
* 客户名称 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("客户名称") |
||||
private String customerName; |
||||
|
||||
/** |
||||
* 物料编码 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("物料编码") |
||||
private String materialCode; |
||||
|
||||
/** |
||||
* 物料名称 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("物料名称") |
||||
private String materialName; |
||||
|
||||
/** |
||||
* 托盘码 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("托盘码") |
||||
private String trayCode; |
||||
|
||||
/** |
||||
* 库位号 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("库位号") |
||||
private String positionInfo; |
||||
|
||||
|
||||
/** |
||||
* 一级品类 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("一级品类") |
||||
private String firsts; |
||||
|
||||
/** |
||||
* 一级品类编码 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("一级品类编码") |
||||
private String firstsCode; |
||||
|
||||
|
||||
/** |
||||
* 二级品类 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("二级品类") |
||||
private String second; |
||||
|
||||
/** |
||||
* 二级品类编码 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("二级品类编码") |
||||
private String secondCode; |
||||
|
||||
|
||||
/** |
||||
* 三级品类 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("三级品类") |
||||
private String thirdProduct; |
||||
|
||||
/** |
||||
* 三级品类编码 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("三级品类编码") |
||||
private String thirdCode; |
||||
|
||||
/** |
||||
* 上架时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上架时间") |
||||
private String createTime; |
||||
|
||||
/** |
||||
* 上架人 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上架人") |
||||
private String createUser; |
||||
|
||||
} |
@ -0,0 +1,64 @@
|
||||
package com.logpm.basicdata.excel; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 货区导出 Excel实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BasicdatavisualizationKCSheetTwo implements Serializable { |
||||
|
||||
/** |
||||
* 库位号 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("库位号") |
||||
private String positionInfo; |
||||
|
||||
/** |
||||
* 客户名称 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("客户名称") |
||||
private String marketName; |
||||
|
||||
/** |
||||
* 物料编码 |
||||
*/ |
||||
@ColumnWidth(40) |
||||
@ExcelProperty("物料编码") |
||||
private String cargoNumber; |
||||
|
||||
/** |
||||
* 货物名称 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("货物名称") |
||||
private String descriptionGoods; |
||||
|
||||
/** |
||||
* 服务号 |
||||
*/ |
||||
@ColumnWidth(30) |
||||
@ExcelProperty("服务号") |
||||
private String serviceNumber; |
||||
|
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数量") |
||||
private String num; |
||||
} |
@ -0,0 +1,26 @@
|
||||
//package com.logpm.warehouse.annotation;
|
||||
//
|
||||
//import java.lang.annotation.*;
|
||||
//
|
||||
///**
|
||||
// * 自定义注解防止表单重复提交
|
||||
// *
|
||||
// * @author lmy
|
||||
// *
|
||||
// */
|
||||
//@Inherited
|
||||
//@Target(ElementType.METHOD)
|
||||
//@Retention(RetentionPolicy.RUNTIME)
|
||||
//@Documented
|
||||
//public @interface RepeatSubmit
|
||||
//{
|
||||
// /**
|
||||
// * 间隔时间(ms),小于此时间视为重复提交
|
||||
// */
|
||||
// public long interval() default 5000;
|
||||
//
|
||||
// /**
|
||||
// * 提示消息
|
||||
// */
|
||||
// public String message() default "不允许重复提交,请稍候再试";
|
||||
//}
|
@ -0,0 +1,50 @@
|
||||
//package com.logpm.warehouse.config.interceptor;
|
||||
//
|
||||
//
|
||||
//import com.logpm.warehouse.annotation.RepeatSubmit;
|
||||
//import org.springblade.core.tool.api.R;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import org.springframework.web.method.HandlerMethod;
|
||||
//import org.springframework.web.servlet.HandlerInterceptor;
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import java.lang.reflect.Method;
|
||||
//
|
||||
///**
|
||||
// * 防止重复提交拦截器
|
||||
// *
|
||||
// * @author lmy
|
||||
// */
|
||||
//@Component
|
||||
//public abstract class RepeatSubmitInterceptor implements HandlerInterceptor {
|
||||
// public RepeatSubmitInterceptor() {
|
||||
// }
|
||||
// @Override
|
||||
// public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
|
||||
// {
|
||||
// if (handler instanceof HandlerMethod)
|
||||
// {
|
||||
// HandlerMethod handlerMethod = (HandlerMethod) handler;
|
||||
// Method method = handlerMethod.getMethod();
|
||||
// RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
|
||||
// if (annotation != null)
|
||||
// {
|
||||
// if (this.isRepeatSubmit(request, annotation))
|
||||
// {
|
||||
// R r = R.fail(annotation.message());
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 验证是否重复提交由子类实现具体的防重复提交的规则
|
||||
// *
|
||||
// * @param request
|
||||
// * @return
|
||||
// * @throws Exception
|
||||
// */
|
||||
// public abstract boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation);
|
||||
//}
|
@ -0,0 +1,108 @@
|
||||
//package com.logpm.warehouse.config.interceptor.impl;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import com.logpm.warehouse.annotation.RepeatSubmit;
|
||||
//
|
||||
//import com.logpm.warehouse.filter.RepeatedlyRequestWrapper;
|
||||
//import org.springblade.common.utils.HttpHelper;
|
||||
//import com.logpm.warehouse.config.interceptor.RepeatSubmitInterceptor;
|
||||
//
|
||||
//import org.apache.commons.lang.StringUtils;
|
||||
//
|
||||
//import org.springblade.core.redis.cache.BladeRedis;
|
||||
//import org.springblade.core.secure.BladeUser;
|
||||
//import org.springblade.core.secure.utils.AuthUtil;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * 判断请求url和数据是否和上一次相同,
|
||||
// * 如果和上次相同,则是重复提交表单。 有效时间为10秒内。
|
||||
// *
|
||||
// * @author xhm
|
||||
// */
|
||||
//@Component
|
||||
//public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
|
||||
//{
|
||||
// public final String REPEAT_PARAMS = "repeatParams";
|
||||
//
|
||||
// public final String REPEAT_TIME = "repeatTime";
|
||||
//
|
||||
//
|
||||
// @Autowired
|
||||
// private BladeRedis redisCache;
|
||||
//
|
||||
// @SuppressWarnings("unchecked")
|
||||
// @Override
|
||||
// public boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation)
|
||||
// {
|
||||
// String nowParams = "";
|
||||
// if (request instanceof RepeatedlyRequestWrapper)
|
||||
// {
|
||||
// RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
|
||||
// nowParams = HttpHelper.getBodyString(repeatedlyRequest);
|
||||
// }
|
||||
//
|
||||
// // body参数为空,获取Parameter的数据
|
||||
// if (StringUtils.isEmpty(nowParams))
|
||||
// {
|
||||
// nowParams = JSONObject.toJSONString(request.getParameterMap());
|
||||
// }
|
||||
// Map<String, Object> nowDataMap = new HashMap<String, Object>();
|
||||
// nowDataMap.put(REPEAT_PARAMS, nowParams);
|
||||
// nowDataMap.put(REPEAT_TIME, System.currentTimeMillis());
|
||||
//
|
||||
// // 请求地址(作为存放cache的key值)
|
||||
// String url = request.getRequestURI();
|
||||
// //获取用户id
|
||||
// BladeUser user = AuthUtil.getUser();
|
||||
// // 唯一标识(指定key + url + 消息头)
|
||||
// String cacheRepeatKey = url+user.getUserId() ;
|
||||
//
|
||||
// Object sessionObj = redisCache.get(cacheRepeatKey);
|
||||
// if (sessionObj != null)
|
||||
// {
|
||||
// Map<String, Object> sessionMap = (Map<String, Object>) sessionObj;
|
||||
// if (sessionMap.containsKey(url))
|
||||
// {
|
||||
// Map<String, Object> preDataMap = (Map<String, Object>) sessionMap.get(url);
|
||||
// if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap, annotation.interval()))
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// Map<String, Object> cacheMap = new HashMap<String, Object>();
|
||||
// cacheMap.put(url, nowDataMap);
|
||||
// redisCache.setEx(cacheRepeatKey, cacheMap, annotation.interval());
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 判断参数是否相同
|
||||
// */
|
||||
// private boolean compareParams(Map<String, Object> nowMap, Map<String, Object> preMap)
|
||||
// {
|
||||
// String nowParams = (String) nowMap.get(REPEAT_PARAMS);
|
||||
// String preParams = (String) preMap.get(REPEAT_PARAMS);
|
||||
// return nowParams.equals(preParams);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 判断两次间隔时间
|
||||
// */
|
||||
// private boolean compareTime(Map<String, Object> nowMap, Map<String, Object> preMap, long interval)
|
||||
// {
|
||||
// long time1 = (Long) nowMap.get(REPEAT_TIME);
|
||||
// long time2 = (Long) preMap.get(REPEAT_TIME);
|
||||
// if ((time1 - time2) < interval)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//}
|
@ -0,0 +1,76 @@
|
||||
//package com.logpm.warehouse.filter;
|
||||
//
|
||||
//import org.springblade.common.utils.HttpHelper;
|
||||
//
|
||||
//import javax.servlet.ReadListener;
|
||||
//import javax.servlet.ServletInputStream;
|
||||
//import javax.servlet.ServletResponse;
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletRequestWrapper;
|
||||
//import java.io.BufferedReader;
|
||||
//import java.io.ByteArrayInputStream;
|
||||
//import java.io.IOException;
|
||||
//import java.io.InputStreamReader;
|
||||
//
|
||||
///**
|
||||
// * 构建可重复读取inputStream的request
|
||||
// *
|
||||
// * @author lmy
|
||||
// */
|
||||
//public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper
|
||||
//{
|
||||
// private final byte[] body;
|
||||
//
|
||||
// public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException
|
||||
// {
|
||||
// super(request);
|
||||
// request.setCharacterEncoding("UTF-8");
|
||||
// response.setCharacterEncoding("UTF-8");
|
||||
//
|
||||
// body = HttpHelper.getBodyString(request).getBytes("UTF-8");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public BufferedReader getReader() throws IOException
|
||||
// {
|
||||
// return new BufferedReader(new InputStreamReader(getInputStream()));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ServletInputStream getInputStream() throws IOException
|
||||
// {
|
||||
// final ByteArrayInputStream bais = new ByteArrayInputStream(body);
|
||||
// return new ServletInputStream()
|
||||
// {
|
||||
// @Override
|
||||
// public int read() throws IOException
|
||||
// {
|
||||
// return bais.read();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int available() throws IOException
|
||||
// {
|
||||
// return body.length;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isFinished()
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isReady()
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setReadListener(ReadListener readListener)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//}
|
Loading…
Reference in new issue