Browse Source

企业卡状态

master
dimengzhe 1 year ago
parent
commit
2821335fef
  1. 46
      src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java

46
src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java

@ -79,7 +79,7 @@ public class EmpAppletVo {
return time; return time;
} }
public boolean isShowBtn() { /* public boolean isShowBtn() {
if(states.equals("5")){ if(states.equals("5")){
if(isReservation.equals("1")){ if(isReservation.equals("1")){
this.state="已完成"; this.state="已完成";
@ -87,8 +87,8 @@ public class EmpAppletVo {
} }
} }
return showBtn; return showBtn;
} }*/
public String getState() { /*public String getState() {
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
if(StringUtils.isNotBlank(dateEnd)){ if(StringUtils.isNotBlank(dateEnd)){
int i=DateUtil.parse(sdf.format(DateUtil.parse(dateEnd))).compareTo(DateUtil.parse(sdf.format(DateUtil.date()))); 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; 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() { // public String getState() {
// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
// if(StringUtils.isNotBlank(dateEnd)){ // if(StringUtils.isNotBlank(dateEnd)){

Loading…
Cancel
Save