fixbug
This commit is contained in:
@@ -22,6 +22,13 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
|
|
||||||
product {
|
product {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class MainActivity extends SDBaseActivity {
|
|||||||
@BindView(R.id.qr_code_pb_cover)
|
@BindView(R.id.qr_code_pb_cover)
|
||||||
ContentLoadingProgressBar qrCodePbCover;
|
ContentLoadingProgressBar qrCodePbCover;
|
||||||
|
|
||||||
private String current_date;
|
private String current_date = TimeUtil.getCurrentDate();
|
||||||
|
|
||||||
private EggClickUtil eggClickUtil;
|
private EggClickUtil eggClickUtil;
|
||||||
private SDErrorDialog errorDialog;
|
private SDErrorDialog errorDialog;
|
||||||
@@ -77,7 +77,7 @@ public class MainActivity extends SDBaseActivity {
|
|||||||
// 应该是原来的保持屏幕常亮的代码
|
// 应该是原来的保持屏幕常亮的代码
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
order_view.setWebViewClient(new WebViewClient());
|
order_view.setWebViewClient(new WebViewClient());
|
||||||
current_date = TimeUtil.getCurrentDate();
|
// current_date = TimeUtil.getCurrentDate();
|
||||||
refreshWebView();
|
refreshWebView();
|
||||||
// 启动Service
|
// 启动Service
|
||||||
Intent socketService = new Intent(this, ClientService.class);
|
Intent socketService = new Intent(this, ClientService.class);
|
||||||
@@ -163,12 +163,12 @@ public class MainActivity extends SDBaseActivity {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.btn_last_day:
|
case R.id.btn_last_day:
|
||||||
current_date = TimeUtil.getSpecifiedDayAfter(current_date,1);
|
current_date = TimeUtil.getSpecifiedDayAfter(current_date,-1);
|
||||||
refreshWebView();
|
refreshWebView();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.btn_next_day:
|
case R.id.btn_next_day:
|
||||||
current_date = TimeUtil.getSpecifiedDayAfter(current_date,-1);
|
current_date = TimeUtil.getSpecifiedDayAfter(current_date,1);
|
||||||
refreshWebView();
|
refreshWebView();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ public class ClientHandler extends SimpleChannelInboundHandler<String> {
|
|||||||
if (IdleStateEvent.class.isAssignableFrom(evt.getClass())) {
|
if (IdleStateEvent.class.isAssignableFrom(evt.getClass())) {
|
||||||
IdleStateEvent event = (IdleStateEvent) evt;
|
IdleStateEvent event = (IdleStateEvent) evt;
|
||||||
if (event.state() == IdleState.ALL_IDLE) {
|
if (event.state() == IdleState.ALL_IDLE) {
|
||||||
ctx.writeAndFlush(getHbMessage());
|
Integer venueId = SDAppConfig.getInstance().getVenueId();
|
||||||
|
if (venueId != null && 0 != venueId){
|
||||||
|
ctx.writeAndFlush(getHbMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ public class SDSettingActivity extends SDBaseActivity {
|
|||||||
});
|
});
|
||||||
Integer venueId = SDAppConfig.getInstance().getVenueId();
|
Integer venueId = SDAppConfig.getInstance().getVenueId();
|
||||||
String deviceType = SDAppConfig.getInstance().getDeviceType();
|
String deviceType = SDAppConfig.getInstance().getDeviceType();
|
||||||
if (venueId!=null){
|
if (venueId != null && 0 != venueId){
|
||||||
int position = 0;
|
int position = 0;
|
||||||
for (VenueItem venueItem : resultList){
|
for (VenueItem venueItem : resultList){
|
||||||
if (venueId.equals(venueItem.getVenueId())){
|
if (venueId.equals(venueItem.getVenueId())){
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class TimeUtil {
|
|||||||
static final private SimpleDateFormat sFormat = new SimpleDateFormat("yyMMddHHmmssSSS");
|
static final private SimpleDateFormat sFormat = new SimpleDateFormat("yyMMddHHmmssSSS");
|
||||||
static final private SimpleDateFormat sLogFormat = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
|
static final private SimpleDateFormat sLogFormat = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
|
||||||
|
|
||||||
static final private SimpleDateFormat initOrderFormat = new SimpleDateFormat("YYYY-MM-dd");
|
static final private SimpleDateFormat initOrderFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
static public String getNowTimeStr() {
|
static public String getNowTimeStr() {
|
||||||
return sFormat.format(new Date());
|
return sFormat.format(new Date());
|
||||||
@@ -46,8 +46,7 @@ public class TimeUtil {
|
|||||||
}
|
}
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
c.setTime(specifiedDate);
|
c.setTime(specifiedDate);
|
||||||
int day = c.get(Calendar.DATE);
|
c.add(Calendar.DATE, num);
|
||||||
c.set(Calendar.DATE, day + num);
|
|
||||||
String dayAfter = initOrderFormat.format(c.getTime());
|
String dayAfter = initOrderFormat.format(c.getTime());
|
||||||
return dayAfter;
|
return dayAfter;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user