From 01f39fcb06b8713901975153d0a893e86eca6a88 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 07 七月 2025 19:42:26 +0800 Subject: [PATCH] 33.订单历史管理里面增加单据类型选项按钮、单据类型选项按钮 34.单据管理里面增加单据状态选项按钮 35.入库订单全部都入好了,单据状态还是作业中,现在作业中的单据是可以删除的,我不小心把这个单据删除了,怎么恢复? 36.每个界面点下一页都没反应,点第二页是有变化的,之后点任何页面都没反应 37.订单明细点开后的界面改大一点 38.新增出库订单的时候可以输入客户信息(客户名称、收件人、地址、电话等),现在拣货完成后连发给谁都不知道 39.大屏播种界面对应的数量和开单数量不一致 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/HttpUtils.java | 79 ++++++++++++++++++++++++++------------- 1 files changed, 53 insertions(+), 26 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/HttpUtils.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/HttpUtils.java index bbb8864..0639cde 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/HttpUtils.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/HttpUtils.java @@ -1,26 +1,53 @@ -package com.zy.asrs.wms.utils; - -import com.alibaba.fastjson.JSON; -import com.zy.asrs.framework.common.R; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * Created by vincent on 1/29/2024 - */ -public class HttpUtils { - - public static void responseError(HttpServletResponse response, Integer code, String message, String error) { - response.setContentType("application/json;charset=UTF-8"); - try { - PrintWriter out = response.getWriter(); - out.write(JSON.toJSONString(R.parse(code + "-" + message))); - out.flush(); - } catch (IOException e) { - e.printStackTrace(); - } - } - -} +package com.zy.asrs.wms.utils; + +import com.alibaba.fastjson.JSON; +import com.zy.asrs.framework.common.R; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; + +/** + * Created by vincent on 1/29/2024 + */ +public class HttpUtils { + + public static void responseError(HttpServletResponse response, Integer code, String message, String error) { + response.setContentType("application/json;charset=UTF-8"); + try { + PrintWriter out = response.getWriter(); + out.write(JSON.toJSONString(R.parse(code + "-" + message))); + out.flush(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static String getClientIpAddress(HttpServletRequest request) { + String ip = request.getHeader("X-Forwarded-For"); + + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_CLIENT_IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("HTTP_X_FORWARDED_FOR"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + + // 瀵逛簬閫氳繃澶氫釜浠g悊鐨勬儏鍐碉紝绗竴涓狪P涓哄鎴风鐪熷疄IP锛屽涓狪P鎸夌収','鍒嗗壊 + if (ip != null && ip.contains(",")) { + ip = ip.split(",")[0].trim(); + } + return ip; + } + +} -- Gitblit v1.9.1