From 2821335fefb28c778b2a7db5a3d6c19180b2f5f0 Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Tue, 2 Jan 2024 16:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=8D=A1=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yxt/yyth/api/empcard/EmpAppletVo.java | 46 +++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java b/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java index 374f537..1c80fe5 100644 --- a/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java +++ b/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java @@ -79,7 +79,7 @@ public class EmpAppletVo { return time; } - public boolean isShowBtn() { + /* public boolean isShowBtn() { if(states.equals("5")){ if(isReservation.equals("1")){ this.state="已完成"; @@ -87,8 +87,8 @@ public class EmpAppletVo { } } return showBtn; - } - public String getState() { + }*/ + /*public String getState() { SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); if(StringUtils.isNotBlank(dateEnd)){ int i=DateUtil.parse(sdf.format(DateUtil.parse(dateEnd))).compareTo(DateUtil.parse(sdf.format(DateUtil.date()))); @@ -112,7 +112,45 @@ public class EmpAppletVo { } } return state; - } + }*/ + public String getState() { + SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); + if(StringUtils.isNotBlank(dateEnd)){ + int i=DateUtil.parse(sdf.format(DateUtil.parse(dateEnd))).compareTo(DateUtil.parse(sdf.format(DateUtil.date()))); + if( String.valueOf(i).equals("-1")){ + state="已过期"; + showBtn=false; + } else{ + state="待提货"; + if(states.equals("5")){ + if(isReservation.equals("0")){ + this.state="已预约"; + this.notRese=false; + }else{ + this.state="已完成"; + showBtn=false; + } + }else if(states.equals("4")){ + if(isReservation.equals("0")){ + this.state="已预约"; + }else{ + this.state="待提货"; + } + } + } + }else{ + state="待提货"; + if(states.equals("5")){ + if(isReservation.equals("0")){ + this.state="已预约"; + }else{ + this.state="已完成"; + showBtn=false; + } + } + } + return state; + } // public String getState() { // SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); // if(StringUtils.isNotBlank(dateEnd)){