| | |
| | | import com.dayu.recharge.databinding.ActivityMyBinding; |
| | | import com.dayu.recharge.dbBean.AdminDataBean; |
| | | import com.dayu.recharge.net.SocketNet; |
| | | import com.dayu.recharge.utils.DeviceNumberUtils; |
| | | import com.dayu.recharge.utils.ExcelUtil; |
| | | import com.dayu.recharge.utils.ToastUtil; |
| | | import com.dayu.recharge.utils.WSHelper; |
| | |
| | | } |
| | | |
| | | private void initView() { |
| | | myBinding.cardReplacement.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent(MyActivity.this, ReplacementActivity.class)); |
| | | } |
| | | }); |
| | | myBinding.myAdmin.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | // PassWordDialog passWordDialog = new PassWordDialog(MyActivity.this, new Intent(MyActivity.this, AdminSetupActivity.class)); |
| | | // passWordDialog.show(); |
| | | startActivity(new Intent(MyActivity.this, AdminSetupActivity.class)); |
| | | PassWordDialog passWordDialog = new PassWordDialog(MyActivity.this, new Intent(MyActivity.this, AdminSetupActivity.class)); |
| | | passWordDialog.show(); |
| | | // startActivity(new Intent(MyActivity.this, AdminSetupActivity.class)); |
| | | } |
| | | }); |
| | | myBinding.myPsw.setOnClickListener(new View.OnClickListener() { |
| | |
| | | myBinding.sysIp.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(MyActivity.this, SysIpActivity.class); |
| | | startActivity(intent); |
| | | PassWordDialog passWordDialog = new PassWordDialog(MyActivity.this, new Intent(MyActivity.this, SysIpActivity.class)); |
| | | passWordDialog.show(); |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | List listData = new ArrayList(); |
| | | try { |
| | | // if (isRechargeList) { |
| | | // listData = SqLite_DB_Utile.getInit(MyActivity.this).selector(RechargeBean.class).where("date", ">=", beginTime).and("date", "<=", endTime).findAll(); |
| | | // } else { |
| | | // listData = SqLite_DB_Utile.getInit(MyActivity.this).selector(UserCardBean.class).where("date", ">=", beginTime).and("date", "<=", endTime).findAll(); |
| | | // } |
| | | if (isRechargeList) { |
| | | listData = baseDao.rechargeDao().findByTime(beginTime, endTime); |
| | | } else { |
| | | listData = baseDao.userCardDao().findByTime(beginTime, endTime); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | return; |
| | | } |
| | | if (isRechargeList) { |
| | | title = new String[]{"村号", "用户名", "户号", "充值日期", "充值金额(元)", "剩余金额(元)"}; |
| | | title = new String[]{"设备序列号", "用户名", "身份证号", "充值日期", "充值金额(元)", "剩余金额(元)"}; |
| | | fileName = file.toString() + "/" + ExcelUtil.outRechargePathName; |
| | | } else { |
| | | title = new String[]{"村号", "用户名", "户号", "注册日期", "电话", "水权内水量", "亩数", "状态"}; |
| | | title = new String[]{"设备序列号", "用户名", "身份证号", "注册日期", "电话"}; |
| | | fileName = file.toString() + "/" + ExcelUtil.outUserPathName; |
| | | } |
| | | ExcelUtil.initExcel(fileName, title); |
| | |
| | | } else { |
| | | msgData.append("未连接数据中心"); |
| | | } |
| | | String initCode = WSHelper.getInstance(this).get("initCode", ""); |
| | | |
| | | String initCode = DeviceNumberUtils.getDeviceNumber(); |
| | | if (TextUtils.isEmpty(initCode)) { |
| | | msgData.append(",设备未注册"); |
| | | } else { |