| | |
| | | applicationId "com.dayu.recharge" |
| | | minSdk 23 |
| | | targetSdk 26 |
| | | versionCode 256 |
| | | versionName "2.5.6" |
| | | versionCode 260 |
| | | versionName "2.6.0" |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | |
| | | ndk { |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="请输入账号" |
| | | android:maxLines="1" |
| | | android:singleLine="true" |
| | | android:text="zuoxiao" /> |
| | | </LinearLayout> |
| | | <LinearLayout |
| | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | |
| | | import com.dayu.baselibrary.utils.TipUtil; |
| | | import com.dayu.baselibrary.utils.ToastUtil; |
| | | import com.dayu.qiheonlinelibrary.bean.LoginResult; |
| | | import com.dayu.qiheonlinelibrary.bean.PricePlanResult; |
| | |
| | | |
| | | public String electriclePriceStr;//电价 |
| | | |
| | | public String adminId;//登录的账号id |
| | | |
| | | public static QHOnLineApplication getInstance(Application context) { |
| | | if (qhAloneApplication == null) { |
| | | qhAloneApplication = new QHOnLineApplication(); |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("loginType", "account"); |
| | | |
| | | ApiManager.getInstance().requestPostLoading(context, "api/login/getPubKey", String.class, null, new SubscriberListener<BaseResponse<String>>() { |
| | | ApiManager.getInstance().requestPostLoading(context, "http://120.46.45.35:20081/api/login/getPubKey", String.class, null, new SubscriberListener<BaseResponse<String>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<String> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | getToken(context, name, pw, t.getData()); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | String dateString = sdf.format(new Date()); |
| | | data.put("password", RSAUtile.encryptByPublicKey(pw + "@TIME@" + dateString, pubKey)); |
| | | data.put("username", name); |
| | | ApiManager.getInstance().requestPostLoading(application, "api/login/login/getToken", String.class, data, new SubscriberListener<BaseResponse<String>>() { |
| | | ApiManager.getInstance().requestPostLoading(application, "http://120.46.45.35:20081/api/login/login/getToken", String.class, data, new SubscriberListener<BaseResponse<String>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<String> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | tokenStr = t.getData(); |
| | | login(context, name, pw, pubKey); |
| | | } |
| | | } else { |
| | | ToastUtil.show(t.getMsg()); |
| | | } |
| | |
| | | String dateString = sdf.format(new Date()); |
| | | data.put("password", RSAUtile.encryptByPublicKey(pw + "@TIME@" + dateString, pubKey)); |
| | | data.put("username", name); |
| | | ApiManager.getInstance().requestPostLoading(application, "api/login/login", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(application, "http://120.46.45.35:20081/api/login/login", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<LoginResult> t) { |
| | | if (t.isSuccess()) { |
| | | try { |
| | | if (t.getData() != null && t.getData().getOtherData() != null) { |
| | | |
| | | LoginResult.OtherData otherData = t.getData().getOtherData(); |
| | | String tenantAdnm = otherData.getTenantAdnm(); |
| | | List<String> adnmList = otherData.getAdnmList(); |
| | |
| | | adcd = t.getData().getOtherData().getAdcdList().get(0); |
| | | arerNumber = t.getData().getOtherData().getAdcdList().get(0).substring(4); |
| | | } |
| | | } |
| | | adminId = t.getData().getUserId(); |
| | | context.startActivity(new Intent(context, com.dayu.qiheonlinelibrary.activity.HomeActivity.class)); |
| | | ((Activity) context).finish(); |
| | | } else { |
| | | TipUtil.show((Activity) context, "登录失败,请重试"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } else { |
| | | ToastUtil.show(t.getMsg()); |
| | | } |
| | |
| | | public void getPricePlanVo(Context context) { |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("priceMethod", 2); |
| | | |
| | | ApiManager.getInstance().requestPost(context, "api/sjgg/water/waterPricePlan/pageWaterPricePlanVo", PricePlanResult.class, data, new SubscriberListener<BaseResponse<PricePlanResult>>() { |
| | | ApiManager.getInstance().requestPostHideLoading(context, "water/waterPricePlan/pageWaterPricePlanVo", PricePlanResult.class, data, new SubscriberListener<BaseResponse<PricePlanResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<PricePlanResult> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | planId = t.getData().getRecords().get(0).getPlanId(); |
| | | electriclePriceStr = t.getData().getRecords().get(0).getElectricityPrice(); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | |
| | | import com.dayu.baselibrary.activity.BaseActivity; |
| | | import com.dayu.baselibrary.utils.BaseCommon; |
| | | import com.dayu.baselibrary.utils.DeviceUtils; |
| | | import com.dayu.baselibrary.utils.TipUtil; |
| | |
| | | import com.dayu.qiheonlinelibrary.bean.CardInfoListResult; |
| | | import com.dayu.qiheonlinelibrary.bean.UserListResult; |
| | | import com.dayu.qiheonlinelibrary.databinding.ActivityCardSearchQhlBinding; |
| | | import com.dayu.qiheonlinelibrary.dbBean.UserCardBean; |
| | | import com.dayu.qiheonlinelibrary.net.ApiManager; |
| | | import com.dayu.qiheonlinelibrary.net.BaseResponse; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.SubscriberListener; |
| | |
| | | ConfirmDialog confirmDialog; |
| | | CardInfoListResult.Records mRecord; |
| | | |
| | | UserCardBean userCardBean; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | |
| | | setContentView(binding.getRoot()); |
| | | pearsontId = this.getIntent().getStringExtra("pearsontId"); |
| | | type = this.getIntent().getIntExtra("type", 0); |
| | | userCardBean = (UserCardBean) this.getIntent().getSerializableExtra("dbUserCard"); |
| | | initView(); |
| | | selectUser(true); |
| | | } |
| | |
| | | data.put("peasantId", pearsontId); |
| | | data.put("current", page); |
| | | data.put("pageSize", size); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/info/getIccardPeasantVoList", CardInfoListResult.class, data, new SubscriberListener<BaseResponse<CardInfoListResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/info/getIccardPeasantVoList", CardInfoListResult.class, data, new SubscriberListener<BaseResponse<CardInfoListResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<CardInfoListResult> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData().getTotal() == records.size()) { |
| | | if (t.getData() != null) { |
| | | if (t.getData().getTotal() == records.size() || size > t.getData().getTotal()) { |
| | | myRefreshLayout.finishLoadMoreWithNoMoreData(); |
| | | } else { |
| | | records.addAll(t.getData().getRecords()); |
| | | } |
| | | records.addAll(t.getData().getRecords()); |
| | | adapter.notifyDataSetChanged(); |
| | | myRefreshLayout.finishLoadMore(); |
| | | if (isRefresh) { |
| | | myRefreshLayout.finishRefresh(); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | TipUtil.show(CardSearchActivity.this, t.getMsg()); |
| | | } |
| | | } |
| | | }); |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("iccardInfoId", iccardInfoId); |
| | | data.put("equipCode", DeviceUtils.getSN()); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/reportLossCard", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/reportLossCard", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<UserListResult> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | if (type == BaseCommon.LOSS_CARD) { |
| | | TipUtil.show(CardSearchActivity.this, "挂失成功", () -> { |
| | | CardSearchActivity.this.finish(); |
| | | if (UserSearchActivity.userSearchActivity != null) { |
| | | UserSearchActivity.userSearchActivity.finish(); |
| | | UserSearchActivity.userSearchActivity = null; |
| | | } |
| | | }); |
| | | } else if (type == BaseCommon.REPLACE_NO_CARD) { |
| | | startNFCActivit(iccardInfoId); |
| | | } else if (type == BaseCommon.REPLACE_HAS_CARD) { |
| | | startNFCActivit(iccardInfoId); |
| | | startManagerActivity(iccardInfoId, mRecord.getIccardNum()); |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | ToastUtil.show(t.getMsg()); |
| | | } |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("iccardInfoId", iccardInfoId); |
| | | data.put("equipCode", DeviceUtils.getSN()); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/releaseLossCard", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/releaseLossCard", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<UserListResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | Intent intent = new Intent(CardSearchActivity.this, NFCWreatActivity.class); |
| | | intent.putExtra("iccardInfoId", iccardInfoId); |
| | | intent.putExtra("replaceType", type); |
| | | intent.putExtra("userCardBean", userCardBean); |
| | | startActivity(intent); |
| | | CardSearchActivity.this.finish(); |
| | | } |
| | |
| | | import android.os.Bundle; |
| | | import android.view.LayoutInflater; |
| | | |
| | | import com.dayu.baselibrary.tools.HexUtil; |
| | | import com.dayu.baselibrary.utils.BaseCommon; |
| | | import com.dayu.baselibrary.utils.TipUtil; |
| | | import com.dayu.qiheonlinelibrary.QHOnLineApplication; |
| | | import com.dayu.qiheonlinelibrary.bean.CardInfoResult; |
| | | import com.dayu.qiheonlinelibrary.card.ManagerToUserCard; |
| | | import com.dayu.qiheonlinelibrary.databinding.ActivityManagerReadQhlBinding; |
| | | import com.dayu.qiheonlinelibrary.dbBean.UserCardBean; |
| | | import com.dayu.qiheonlinelibrary.net.ApiManager; |
| | | import com.dayu.qiheonlinelibrary.net.BaseResponse; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.SubscriberListener; |
| | |
| | | * author: zuo |
| | | * Date: 2024-08-12 |
| | | * Time: 20:10 |
| | | * 备注: |
| | | * 备注: 读取管理卡,从控制器读卡后在此界面读卡 |
| | | */ |
| | | public class ManagerReadActivity extends BaseNfcActivity { |
| | | |
| | |
| | | |
| | | CardInfoResult cardInfoResult; |
| | | ManagerToUserCard managerToUserCard; |
| | | |
| | | UserCardBean userCardBean = new UserCardBean(); |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | managerToUserCard = NfcReadHelper.getInstence(intent, this).getManagerToUserCardData(); |
| | | if (managerToUserCard != null) { |
| | | if (QHOnLineApplication.getInstance().arerNumber.equalsIgnoreCase(String.valueOf(managerToUserCard.getArerNumber()))) { |
| | | getUserInfoAndCardInfo(managerToUserCard.getOldCardNumber()); |
| | | String oldCardNumber = managerToUserCard.getOldCardNumber(); |
| | | oldCardNumber = HexUtil.spaceHex(oldCardNumber); |
| | | oldCardNumber = HexUtil.HighLowHex(oldCardNumber); |
| | | getUserInfoAndCardInfo(oldCardNumber); |
| | | } else { |
| | | TipUtil.show(this, "不是本区域卡!"); |
| | | } |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | //ic卡信息id |
| | | data.put("iccardNum", iccardCode); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<CardInfoResult> t) { |
| | | String state = ""; |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | cardInfoResult = t.getData(); |
| | | userCardBean.setUserName(cardInfoResult.getPeasantName()); |
| | | userCardBean.setUserID(cardInfoResult.getPeasantIdNumber()); |
| | | userCardBean.setPhone(cardInfoResult.getPeasantPhone()); |
| | | userCardBean.setPersonId(cardInfoResult.getPeasantId()); |
| | | userCardBean.setAddressCode(cardInfoResult.getAdcd()); |
| | | userCardBean.setAddressName(cardInfoResult.getAdcdName()); |
| | | isReadSuccess = true; |
| | | TipUtil.show(ManagerReadActivity.this, "读卡成功,下一步将写卡!", () -> { |
| | | Intent intent = new Intent(ManagerReadActivity.this, NFCWreatActivity.class); |
| | | intent.putExtra("iccardInfoId", cardInfoResult.getIccardInfoId()); |
| | | intent.putExtra("replaceType", BaseCommon.REPLACE_HAS_CARD); |
| | | intent.putExtra("userCardBean", userCardBean); |
| | | startActivity(intent); |
| | | ManagerReadActivity.this.finish(); |
| | | }); |
| | | } else { |
| | | TipUtil.show(ManagerReadActivity.this, "未查询到该卡信息,请检查。"); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | |
| | | import com.dayu.baselibrary.tools.HexUtil; |
| | | import com.dayu.baselibrary.utils.BaseCommon; |
| | | import com.dayu.baselibrary.utils.TipUtil; |
| | | import com.dayu.baselibrary.view.ConfirmDialog; |
| | |
| | | } else { |
| | | TipUtil.show(this, "请在控制器端刷卡后在首页点击泵未关写卡后继续补卡!", () -> { |
| | | ManagerWriteActivity.this.finish(); |
| | | if (UserSearchActivity.userSearchActivity != null) { |
| | | UserSearchActivity.userSearchActivity.finish(); |
| | | UserSearchActivity.userSearchActivity = null; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | ManageCard manageCard = new ManageCard(); |
| | | manageCard.setArerNumber(Integer.valueOf(QHOnLineApplication.getInstance().arerNumber)); |
| | | oldCardNumber = HexUtil.spaceHex(oldCardNumber); |
| | | oldCardNumber = HexUtil.HighLowHex(oldCardNumber); |
| | | manageCard.setUserCard(oldCardNumber); |
| | | manageCard.setCardWriteState((byte) 0); |
| | | if (NFCWriteHelper.getInstence(intent, this).writeData(manageCard.toByte(baseDao), 1, 0)) { |
| | |
| | | List listData = new ArrayList(); |
| | | try { |
| | | if (isRechargeList) { |
| | | listData = asynchBaseDao.rechargeDao().ansyFindByTime(beginTime, endTime); |
| | | listData = asynchBaseDao.rechargeDao().ansyFindByTime(QHOnLineApplication.getInstance().adminId, beginTime, endTime); |
| | | } else { |
| | | listData = asynchBaseDao.userCardDao().findByTime(beginTime, endTime); |
| | | } |
| | |
| | | import com.dayu.baselibrary.utils.DeviceUtils; |
| | | import com.dayu.baselibrary.utils.MornyUtil; |
| | | import com.dayu.baselibrary.utils.TipUtil; |
| | | import com.dayu.baselibrary.utils.ToastUtil; |
| | | import com.dayu.baselibrary.view.ConfirmDialog; |
| | | import com.dayu.baselibrary.view.TitleBar; |
| | | import com.dayu.qiheonlinelibrary.QHOnLineApplication; |
| | |
| | | import com.dayu.qiheonlinelibrary.tools.WriteCardUtils; |
| | | import com.dayu.qiheonlinelibrary.utils.CardCommon; |
| | | import com.dayu.qiheonlinelibrary.utils.NFCWreatUtils; |
| | | import com.dayu.qiheonlinelibrary.utils.PrintUtils; |
| | | import com.dayu.qiheonlinelibrary.view.ReplacementPriceDialog; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | userCardBean = (UserCardBean) this.getIntent().getSerializableExtra("dbUserCard"); |
| | | isUser = true; |
| | | } |
| | | if (this.getIntent().hasExtra("userCardBean")) { |
| | | userCardBean = (UserCardBean) this.getIntent().getSerializableExtra("userCardBean"); |
| | | } |
| | | if (this.getIntent().hasExtra("cleanUserCard")) { |
| | | cleanUserCard = (CleanUserCard) this.getIntent().getSerializableExtra("cleanUserCard"); |
| | | binding.cardData.setText("制作删除全部用户卡"); |
| | |
| | | morny = this.getIntent().getStringExtra("morny"); |
| | | userName = this.getIntent().getStringExtra("userName"); |
| | | rechargeBean = (RechargeBean) this.getIntent().getSerializableExtra("rechargeBean"); |
| | | |
| | | // rechageWater = this.getIntent().getStringExtra("rechageWater"); |
| | | if (MornyUtil.changeY2F(rechargeBean.getDeductionMorny()) == 0) { |
| | | binding.cardData.setText("充值金额:" + morny + " 元"); |
| | | } else { |
| | | int realityMorny = MornyUtil.changeY2F(morny) - MornyUtil.changeY2F(rechargeBean.getDeductionMorny()); |
| | | binding.cardData.setText("充值金额:" + morny + " 元\n" + "补扣金额:" + rechargeBean.getDeductionMorny() + " 元\n实际到账金额:" + MornyUtil.changeF2Y(realityMorny) + " 元"); |
| | | } |
| | | } |
| | | if (this.getIntent().hasExtra("iccardInfoId")) { |
| | | iccardInfoId = this.getIntent().getStringExtra("iccardInfoId"); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 打印机相关信息 |
| | | * |
| | | * @param rechargeBean |
| | | */ |
| | | private void setPrinterData(RechargeBean rechargeBean) { |
| | | try { |
| | | StringBuffer data = new StringBuffer(); |
| | | if (rechargeBean != null) { |
| | | data.append("*****************************" + "\n"); |
| | | data.append("设备序列号:" + rechargeBean.getSerial() + "\n"); |
| | | data.append("姓 名:" + rechargeBean.getUserName() + "\n"); |
| | | data.append("卡 号:" + rechargeBean.getCardNumber() + "\n"); |
| | | data.append("用户编号:" + rechargeBean.getUserCode() + "\n"); |
| | | data.append("充值金额:" + rechargeBean.getMorny() + " 元" + "\n"); |
| | | data.append("卡内余额:" + rechargeBean.getBalance() + " 元" + "\n"); |
| | | data.append("充值电量:" + rechargeBean.getRechargeElectric() + " 度" + "\n"); |
| | | data.append("剩余电量:" + rechargeBean.getRechargeElectric() + " 度" + "\n"); |
| | | data.append("日 期:" + DateUtil.dateToStamp(rechargeBean.getRechargeDate(), DateUtil.type2) + "\n\n"); |
| | | data.append("*****************************"); |
| | | } |
| | | float size = 26; |
| | | |
| | | try { |
| | | AidlUtil.getInstance().printText(data.toString(), size, true, false); |
| | | AidlUtil.getInstance().print3Line(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } |
| | | |
| | | void startAnim() { |
| | | binding.avi.show(); |
| | | // or avi.smoothToShow(); |
| | |
| | | detail.putExtra("statu", statu); |
| | | detail.putExtra("userCard", userCard); |
| | | if (!TextUtils.isEmpty(morny)) { |
| | | detail.putExtra("morny", morny); |
| | | |
| | | detail.putExtra("rechargeBean", rechargeBean); |
| | | } else { |
| | | detail.putExtra("userCardBean", userCardBean); |
| | |
| | | data.put("iccardNum", iccardNum);//物理卡号 |
| | | data.put("iccardType", iccardType); |
| | | data.put("peasantId", peasantId); |
| | | data.put("adcd", QHOnLineApplication.getInstance().adcd); |
| | | //工本费 |
| | | data.put("rechargeCardMoney", rechargeMoney); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/openCard", OpenCardResult.class, data, new SubscriberListener<BaseResponse<OpenCardResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/openCard", OpenCardResult.class, data, new SubscriberListener<BaseResponse<OpenCardResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<OpenCardResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | data.put("writeCardStatus", writeCardStatus); |
| | | |
| | | |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/openCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/openCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<LoginResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | data.put("writeCardStatus", writeCardStatus); |
| | | data.put("writeCardStatus", writeCardStatus); |
| | | |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/rechargeCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/rechargeCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<LoginResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | // 打印相关 |
| | | setPrinterData(rechargeBean); |
| | | PrintUtils.printerData(rechargeBean); |
| | | startDetailActivity("终端写卡"); |
| | | } else { |
| | | ToastUtil.show(t.getMsg()); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 补卡逻辑 |
| | | */ |
| | |
| | | data.put("iccardInfoId", iccardInfoId); |
| | | //新卡的物理卡号 |
| | | data.put("iccardNum", cardNumber); |
| | | if (!TextUtils.isEmpty(iccardBalanceMoney)) { |
| | | //卡内剩余金额 |
| | | data.put("iccardBalanceMoney", iccardBalanceMoney); |
| | | } |
| | | if (!TextUtils.isEmpty(iccardBalanceElectric)) { |
| | | //卡内剩余电量 |
| | | data.put("iccardBalanceElectric", iccardBalanceElectric); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/reissueOpenCard", ReplaceCardResult.class, data, new SubscriberListener<BaseResponse<ReplaceCardResult>>() { |
| | | } |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/reissueOpenCard", ReplaceCardResult.class, data, new SubscriberListener<BaseResponse<ReplaceCardResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<ReplaceCardResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | userCard.setRechargeDate(Calendar.getInstance()); |
| | | userCard.setElectricPrice(Float.valueOf(QHOnLineApplication.getInstance().electriclePriceStr)); |
| | | if (WriteCardUtils.setUser(intent, userCard, NFCWreatActivity.this)) { |
| | | userCardBean.setCardNumber(cardNumber); |
| | | userCardBean.setUserCode(userCode); |
| | | userCardBean.setDate(System.currentTimeMillis()); |
| | | baseDao.userCardDao().insert(userCardBean); |
| | | confromReplaceCard(replaceCardResult.getIccardRechargeRecordId(), 0); |
| | | } else { |
| | | TipUtil.show(NFCWreatActivity.this, "写卡失败,请重试"); |
| | |
| | | // 打印相关 |
| | | // setPrinterData(rechargeBean); |
| | | // startDetailActivity(rechargeBean.getUserName(), "终端写卡"); |
| | | } else { |
| | | ToastUtil.show(t.getMsg()); |
| | | } |
| | | } |
| | | }); |
| | |
| | | private void confromReplaceCard(String iccardRechargeRecordId, int writeCardStatus) { |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("equipCode", DeviceUtils.getSN()); |
| | | // data.put("iccardRechargeRecordId", iccardRechargeRecordId); |
| | | data.put("iccardRechargeRecordId", iccardRechargeRecordId); |
| | | //写卡状态 0 写卡成功 1 待写卡 2 写卡失败 |
| | | data.put("writeCardStatus", writeCardStatus); |
| | | |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/reissueOpenCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/reissueOpenCardResult", LoginResult.class, data, new SubscriberListener<BaseResponse<LoginResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<LoginResult> t) { |
| | | if (t.isSuccess()) { |
| | | TipUtil.show(NFCWreatActivity.this, "补卡成功!", () -> { |
| | | if (UserSearchActivity.userSearchActivity != null) { |
| | | UserSearchActivity.userSearchActivity.finish(); |
| | | UserSearchActivity.userSearchActivity = null; |
| | | } |
| | | NFCWreatActivity.this.finish(); |
| | | }); |
| | | } |
| | |
| | | data.put("peasantIdNumber", peasantIdNumber); |
| | | data.put("current", 1); |
| | | data.put("pageSize", 10); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/base/peasant/pagePeasantVo", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "base/peasant/pagePeasantVo", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<UserListResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | data.put("peasantCode", ""); |
| | | data.put("peasantName", peasantName); |
| | | data.put("peasantPhone", peasantPhone); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/base/peasant/savePeasant", AddUserResult.class, data, new SubscriberListener<BaseResponse<AddUserResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "base/peasant/savePeasant", AddUserResult.class, data, new SubscriberListener<BaseResponse<AddUserResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<AddUserResult> t) { |
| | | if (t.isSuccess()) { |
| | |
| | | newcardListBinding.recyclerView.setLayoutManager(layoutManager); |
| | | newcardListBinding.recyclerView.setAdapter(adapter); |
| | | int totale = baseDao.userCardDao().getUserTotale(); |
| | | newcardListBinding.userTotal.setText("开户数:" + totale + ""); |
| | | newcardListBinding.userTotal.setText("开卡数:" + totale + ""); |
| | | } |
| | | |
| | | |
| | |
| | | break; |
| | | case CardCommon.MANAGE_CRAD://管理卡 |
| | | ManageCard manageCard = ManageCard.getBean(data); |
| | | if (manageCard != null) { |
| | | viweGone(false); |
| | | userCardStr = manageCard.getUserCard().toUpperCase(); |
| | | redCardBinding.readCardTypeTV.setText("当前为管理卡" + "\n\n" |
| | | + "原始卡号:" + userCardStr); |
| | | |
| | | } |
| | | break; |
| | | case CardCommon.CLEAN_CARD_TYPE: |
| | | viweGone(false); |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | //ic卡信息id |
| | | data.put("iccardNum", iccardCode); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<CardInfoResult> t) { |
| | | String state = ""; |
| | | if (t.isSuccess()) { |
| | | if (t.isSuccess() && t.getData() instanceof CardInfoResult) { |
| | | setUserData(t.getData()); |
| | | } else { |
| | | TipUtil.show(ReadCardAcitivy.this, "从获取平台卡信息失败!"); |
| | | } |
| | | } |
| | | }); |
| | |
| | | redCardBinding.redUserCode.setText(cardInfoResult.getIccardCode()); |
| | | redCardBinding.redBlance.setText(MornyUtil.changeF2Y(userCard.getBalance()) + "元"); |
| | | redCardBinding.redElectric.setText(MornyUtil.changeF2Y(userCard.getSurplusElecticity()) + "度"); |
| | | redCardBinding.redTotalMorny.setText(MornyUtil.changeF2Y(userCard.getTotalMorny()) + "元"); |
| | | redCardBinding.redTotalMorny.setText(cardInfoResult.getTotalRechargeMoney() + "元"); |
| | | redCardBinding.redPhone.setText(cardInfoResult.getPeasantPhone()); |
| | | redCardBinding.redCodeId.setText(cardInfoResult.getPeasantIdNumber()); |
| | | if (cardInfoResult.getIccardStatus() == 0) { |
| | |
| | | } |
| | | |
| | | |
| | | private void setUserData(String cardNumber, String userName, String lastRechargeTime, float iccardBalanceMoney, List<byte[]> data) { |
| | | String state = ""; |
| | | private void setUserData(String cardNumber, String userName, String lastRechargeTime, List<byte[]> data) { |
| | | if (cardType.equalsIgnoreCase(CardCommon.USER_CARD_TYPE_1)) { |
| | | state = "终端写卡"; |
| | | setCardState("终端写卡"); |
| | | binding.rechargeLL.setVisibility(View.VISIBLE); |
| | | binding.rechargeRegistBtn.setVisibility(View.VISIBLE); |
| | | binding.redStatu.setTextColor(this.getResources().getColor(R.color.black)); |
| | | } else if (cardType.equalsIgnoreCase(CardCommon.USER_CARD_TYPE_2)) { |
| | | setCardState("未刷卡关泵,当前不可充值"); |
| | | TipUtil.show(RechargeActivity.this, "未刷卡关泵,当前不可充值"); |
| | | } else if (cardType.equalsIgnoreCase(CardCommon.USER_CARD_TYPE_3)) { |
| | | setCardState("叠加充值"); |
| | | } else { |
| | |
| | | binding.rechargeReadLL.setVisibility(View.GONE); |
| | | binding.rechargeTextLL.setVisibility(View.VISIBLE); |
| | | binding.userName.setText(userName); |
| | | binding.redStatu.setText(state); |
| | | binding.redInitCode.setText(cardNumber); |
| | | binding.redRechargeDate.setText("本卡最后购水日期:\n\n" + lastRechargeTime); |
| | | binding.redUserCode.setText(cardInfoResult.getIccardCode()); |
| | | if (userCard != null) { |
| | | |
| | | binding.redRemainderBlance.setText(String.valueOf(iccardBalanceMoney) + " 元"); |
| | | binding.redRemainderBlance.setText(MornyUtil.changeF2Y(userCard.getBalance()) + " 元"); |
| | | binding.redBalanceElectric.setText("充值后剩余电量:" + MornyUtil.changeF2Y(userCard.getSurplusElecticity()) + " 度"); |
| | | } |
| | | |
| | | binding.redRechargeElectric.setText("电量单价:" + QHOnLineApplication.getInstance().electriclePriceStr + "元/度"); |
| | | |
| | | } else { |
| | |
| | | //充值补扣金额=充值金额+充值前读取的卡内余额-充值回调返回卡内余额 |
| | | int deductionMorny = MornyUtil.changeY2F(morny) + mOldUserCard.getBalance() - MornyUtil.changeY2F(balance); |
| | | |
| | | if (MornyUtil.changeY2F(morny) < deductionMorny) { |
| | | TipUtil.show(RechargeActivity.this, "当前充值金额小于补扣金额,补扣金额为" + MornyUtil.changeF2Y(deductionMorny) + "元,充值金额应大于补扣金额!"); |
| | | return; |
| | | } |
| | | |
| | | //添加充值信息 |
| | | rechargeBean = new RechargeBean(); |
| | |
| | | rechargeBean.setState(1); |
| | | rechargeBean.setOrderId(iccardRechargeRecordId); |
| | | rechargeBean.setDeductionMorny(MornyUtil.changeF2Y(deductionMorny)); |
| | | rechargeBean.setAdminId(QHOnLineApplication.getInstance().adminId); |
| | | |
| | | |
| | | userCard.setCardWriteState(0); |
| | | userCard.setCardState(1); |
| | |
| | | calendar.setTimeInMillis(time); |
| | | userCard.setBalance(MornyUtil.changeY2F(String.valueOf(balance))); |
| | | userCard.setSurplusElecticity(MornyUtil.changeY2F(String.valueOf(iccardBalanceElectric))); |
| | | String sumMorny = MornyUtil.sumPrice(Float.valueOf(MornyUtil.changeF2Y(userCard.getTotalMorny())), Float.valueOf(morny)); |
| | | userCard.setTotalMorny(MornyUtil.changeY2F(sumMorny)); |
| | | userCard.setTotalMorny(MornyUtil.changeY2F(String.valueOf(totalMorny))); |
| | | userCard.setRechargeDate(calendar); |
| | | userCard.setElectricPrice(Float.valueOf(QHOnLineApplication.getInstance().electriclePriceStr)); |
| | | if (deductionMorny == 0) { |
| | |
| | | data.put("iccardBalanceAmonunt", "0"); |
| | | //卡内剩余电量 |
| | | data.put("iccardBalanceElectric", MornyUtil.changeF2Y(userCard.getSurplusElecticity())); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/recharge/rechargeCard", RechargeResult.class, data, new SubscriberListener<BaseResponse<RechargeResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/recharge/rechargeCard", RechargeResult.class, data, new SubscriberListener<BaseResponse<RechargeResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<RechargeResult> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | RechargeResult rechargeResult = t.getData(); |
| | | startNfcActivity(morny, rechargeResult.getIccardBalanceMoney(), rechargeResult.getRechargeElectricAmount(), rechargeResult.getIccardBalanceElectric(), rechargeResult.getTotalRechargeMoney(), rechargeResult.getIccardRechargeRecordId()); |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, "充值失败请重试!"); |
| | | } |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, t.getMsg()); |
| | | } |
| | | } |
| | | }); |
| | |
| | | Map<String, Object> data = new HashMap<>(); |
| | | //ic卡信息id |
| | | data.put("iccardNum", iccardCode); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "iccard/peasant/getIccardInfoVoByCardCode", CardInfoResult.class, data, new SubscriberListener<BaseResponse<CardInfoResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<CardInfoResult> t) { |
| | | String state = ""; |
| | | if (t.isSuccess()) { |
| | | if (t.getData() != null) { |
| | | //ic卡状态 0 正常 1 已注销 2 已挂失 |
| | | if (t.getData().getIccardStatus() == 0) { |
| | | List<byte[]> data = NfcReadHelper.getInstence(intent, RechargeActivity.this).getOnesectorData(); |
| | | if (!data.isEmpty()) { |
| | | if (!TextUtils.isEmpty(cardNumber)) { |
| | | cardInfoResult = t.getData(); |
| | | setUserData(cardNumber, cardInfoResult.getPeasantName(), cardInfoResult.getLastRechargeTime(), cardInfoResult.getIccardBalanceMoney(), data); |
| | | setUserData(cardNumber, cardInfoResult.getPeasantName(), cardInfoResult.getLastRechargeTime(), data); |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, "读取卡片失败,请重新贴卡"); |
| | | } |
| | |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, "当前卡已挂失"); |
| | | } |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, "当前卡片错误,未能查到该卡信息!"); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, t.getMsg()); |
| | | } |
| | | } |
| | | }); |
| | |
| | | import com.dayu.qiheonlinelibrary.databinding.ActivityRechargeDetailQhlBinding; |
| | | import com.dayu.qiheonlinelibrary.dbBean.RechargeBean; |
| | | import com.dayu.qiheonlinelibrary.dbBean.UserCardBean; |
| | | import com.dayu.qiheonlinelibrary.utils.PrintUtils; |
| | | |
| | | |
| | | import java.util.Calendar; |
| | |
| | | setContentView(binding.getRoot()); |
| | | |
| | | try { |
| | | if (getIntent().hasExtra("userCard")) { |
| | | userCard = (UserCard) getIntent().getSerializableExtra("userCard"); |
| | | } |
| | | if (getIntent().hasExtra("statu")) { |
| | | statu = getIntent().getStringExtra("statu"); |
| | | if (getIntent().hasExtra("morny")) { |
| | | morny = getIntent().getStringExtra("morny"); |
| | | } |
| | | if (getIntent().hasExtra("rechargeBean")) { |
| | | rechargeBean = (RechargeBean) getIntent().getSerializableExtra("rechargeBean"); |
| | | } |
| | | if (getIntent().hasExtra("userCardBean")) { |
| | |
| | | } |
| | | |
| | | private void setUserData(String statu) { |
| | | int balance = userCard.getBalance(); |
| | | if (!TextUtils.isEmpty(morny)) { |
| | | |
| | | if (rechargeBean != null) { |
| | | binding.tip.setText("充值成功!"); |
| | | balance = userCard.getBalance(); |
| | | binding.redName.setText("姓名:" + rechargeBean.getUserName()); |
| | | binding.redRemainderMorny.setText("充值金额:" + morny + " 元"); |
| | | binding.redRechargeBalance.setText("剩余金额:" + MornyUtil.changeF2Y(balance) + " 元"); |
| | | binding.redRemainderMorny.setText("充值金额:" + rechargeBean.getMorny() + " 元"); |
| | | binding.redRechargeBalance.setText("剩余金额:" + rechargeBean.getBalance() + " 元"); |
| | | binding.redRechargeElectric.setText("充值电量:" + rechargeBean.getRechargeElectric() + " 度"); |
| | | binding.redSurplusElectric.setText("剩余电量:" + rechargeBean.getSurplusElectic() + " 度"); |
| | | binding.redInitCode.setText("卡号:" + rechargeBean.getCardNumber()); |
| | | binding.redUserCode.setText("用户编号:" + rechargeBean.getUserCode()); |
| | | if (MornyUtil.changeY2F(rechargeBean.getDeductionMorny()) > 0) { |
| | | binding.redDeductionMorny.setText("补扣金额:" + rechargeBean.getDeductionMorny()); |
| | | } else { |
| | | binding.redDeductionMorny.setVisibility(View.GONE); |
| | | } |
| | | binding.readBtn.setVisibility(View.VISIBLE); |
| | | binding.readBtn.setOnClickListener(v -> { |
| | | PrintUtils.printerData(rechargeBean); |
| | | }); |
| | | } else { |
| | | int balance = userCard.getBalance(); |
| | | binding.redName.setText("姓名:" + userCardBean.getUserName()); |
| | | binding.tip.setText("开卡成功!"); |
| | | binding.redInitCode.setText("卡号:" + userCardBean.getCardNumber()); |
| | |
| | | binding.redRechargeBalance.setVisibility(View.GONE); |
| | | binding.redRechargeElectric.setVisibility(View.GONE); |
| | | binding.redSurplusElectric.setVisibility(View.GONE); |
| | | binding.redDeductionMorny.setVisibility(View.GONE); |
| | | } |
| | | if (TextUtils.isEmpty(statu)) { |
| | | binding.redStatu.setVisibility(View.GONE); |
| | | } else { |
| | | binding.redStatu.setText("卡状态:" + statu); |
| | | } |
| | | if (userCard != null) { |
| | | Calendar calendar = userCard.getRechargeDate(); |
| | | if (calendar != null) { |
| | |
| | | |
| | | import static com.dayu.baselibrary.view.TitleBar.ClickType_RIGHT_TEXT; |
| | | |
| | | import android.content.Intent; |
| | | import android.os.Bundle; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | |
| | | import com.dayu.baselibrary.view.datepicker.CustomDatePicker; |
| | | import com.dayu.baselibrary.view.datepicker.DateFormatUtils; |
| | | |
| | | import com.dayu.qiheonlinelibrary.QHOnLineApplication; |
| | | import com.dayu.qiheonlinelibrary.adapter.RechargeAdapter; |
| | | import com.dayu.qiheonlinelibrary.databinding.ActivityRechargeListQhlBinding; |
| | | import com.dayu.qiheonlinelibrary.dbBean.RechargeBean; |
| | |
| | | getList(); |
| | | } |
| | | }); |
| | | adapter = new RechargeAdapter(this, rechargeList); |
| | | adapter = new RechargeAdapter(this, rechargeList, position -> { |
| | | Intent intent = new Intent(RechargeListActivity.this, RechargeDetailActivity.class); |
| | | intent.putExtra("rechargeBean", rechargeList.get(position)); |
| | | startActivity(intent); |
| | | }); |
| | | LinearLayoutManager layoutManager = new LinearLayoutManager(this); |
| | | rechargeListBinding.recyclerView.setLayoutManager(layoutManager); |
| | | rechargeListBinding.recyclerView.setAdapter(adapter); |
| | |
| | | // 在这里执行异步操作 |
| | | List<RechargeBean> beanList; |
| | | if (beginTime == 0 && endTime == 0) { |
| | | beanList = asynchBaseDao.rechargeDao().findAll(page * limit, limit); |
| | | beanList = asynchBaseDao.rechargeDao().findAll(QHOnLineApplication.qhAloneApplication.adminId, page * limit, limit); |
| | | } else { |
| | | beanList = asynchBaseDao.rechargeDao().ansyFindByTime(beginTime, endTime); |
| | | beanList = asynchBaseDao.rechargeDao().ansyFindByTime(QHOnLineApplication.qhAloneApplication.adminId, beginTime, endTime); |
| | | } |
| | | // 将结果发送给观察者 |
| | | emitter.onNext(beanList); |
| | |
| | | result -> { |
| | | // 在这里处理结果,这里是在主线程中 |
| | | // System.out.println("Result: " + result); |
| | | if (beginTime == 0 && endTime == 0) { |
| | | if (result.size() < limit) { |
| | | myRefreshLayout.finishLoadMoreWithNoMoreData(); |
| | | } |
| | | if (result != null && result.size() > 0) { |
| | | rechargeList.addAll(result); |
| | | } |
| | | } else { |
| | | rechargeList.addAll(result); |
| | | myRefreshLayout.finishLoadMoreWithNoMoreData(); |
| | | } |
| | | adapter.notifyDataSetChanged(); |
| | | getTotal(); |
| | | }, |
| | |
| | | import com.dayu.qiheonlinelibrary.adapter.UserSearchAdapter; |
| | | import com.dayu.qiheonlinelibrary.bean.UserListResult; |
| | | import com.dayu.qiheonlinelibrary.databinding.ActivityUserSearchQhlBinding; |
| | | import com.dayu.qiheonlinelibrary.dbBean.UserCardBean; |
| | | import com.dayu.qiheonlinelibrary.net.ApiManager; |
| | | import com.dayu.qiheonlinelibrary.net.BaseResponse; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.SubscriberListener; |
| | |
| | | * 备注:用户搜索 |
| | | */ |
| | | public class UserSearchActivity extends BaseActivity { |
| | | public static UserSearchActivity userSearchActivity; |
| | | |
| | | ActivityUserSearchQhlBinding binding; |
| | | UserSearchDialog userSearchDialog; |
| | | RefreshLayout myRefreshLayout; |
| | |
| | | |
| | | int type;//当前操作类型 |
| | | |
| | | UserCardBean userCardBean = new UserCardBean(); |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | userSearchActivity = this; |
| | | binding = ActivityUserSearchQhlBinding.inflate(LayoutInflater.from(this)); |
| | | setContentView(binding.getRoot()); |
| | | type = this.getIntent().getIntExtra("type", 0); |
| | |
| | | adapter = new UserSearchAdapter(this, records, new UserSearchAdapter.OnItemClickListener() { |
| | | @Override |
| | | public void onItemClick(int position) { |
| | | UserListResult.Records record = records.get(position); |
| | | userCardBean.setUserName(record.getPeasantName()); |
| | | userCardBean.setUserID(record.getPeasantIdNumber()); |
| | | userCardBean.setPhone(record.getPeasantPhone()); |
| | | userCardBean.setPersonId(record.getPeasantId()); |
| | | userCardBean.setAddressCode(record.getAdcd()); |
| | | userCardBean.setAddressName(record.getAdcdName()); |
| | | Intent intent = new Intent(UserSearchActivity.this, CardSearchActivity.class); |
| | | intent.putExtra("pearsontId", records.get(position).getPeasantId()); |
| | | intent.putExtra("pearsontId", record.getPeasantId()); |
| | | intent.putExtra("type", type); |
| | | intent.putExtra("dbUserCard", userCardBean); |
| | | UserSearchActivity.this.startActivity(intent); |
| | | UserSearchActivity.this.finish(); |
| | | } |
| | | }); |
| | | LinearLayoutManager layoutManager = new LinearLayoutManager(this); |
| | |
| | | data.put("peasantName", name); |
| | | data.put("current", page); |
| | | data.put("pageSize", size); |
| | | ApiManager.getInstance().requestPostLoading(this, "api/sjgg/base/peasant/pagePeasantVo", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | ApiManager.getInstance().requestPostLoading(this, "base/peasant/pagePeasantVo", UserListResult.class, data, new SubscriberListener<BaseResponse<UserListResult>>() { |
| | | @Override |
| | | public void onNext(BaseResponse<UserListResult> t) { |
| | | if (t.isSuccess()) { |
| | | if (t.getData().getTotal() == records.size()) { |
| | | if (t.getData().getTotal() == records.size() || size > t.getData().getTotal()) { |
| | | myRefreshLayout.finishLoadMoreWithNoMoreData(); |
| | | } else { |
| | | records.addAll(t.getData().getRecords()); |
| | | } |
| | | records.addAll(t.getData().getRecords()); |
| | | adapter.notifyDataSetChanged(); |
| | | myRefreshLayout.finishLoadMore(); |
| | | } |
| | |
| | | ((ViewHolder) holder).getBinding().userCode.setText(record.getIccardCode()); |
| | | ((ViewHolder) holder).getBinding().balance.setText(record.getIccardBalanceMoney() + "元"); |
| | | ((ViewHolder) holder).getBinding().totalMorny.setText(record.getTotalRechargeMoney() + "元"); |
| | | ((ViewHolder) holder).getBinding().balanceElectic.setText(record.getIccardBalanceElectric()); |
| | | ((ViewHolder) holder).getBinding().balanceElectic.setText(record.getIccardBalanceElectric()+" 度"); |
| | | ((ViewHolder) holder).getBinding().lastRechargeTime.setText("最后充值时间:" + record.getLastRechargeTime()); |
| | | if (record.getIccardStatus() == 0) { |
| | | ((ViewHolder) holder).getBinding().state.setText("正常"); |
| | |
| | | |
| | | List<RechargeBean> rechargeList; |
| | | Context mContext; |
| | | OnItemClickListener onItemClickListener; |
| | | |
| | | public RechargeAdapter(Context context, List<RechargeBean> rechargeList) { |
| | | public interface OnItemClickListener { |
| | | void onItemClick(int position); |
| | | } |
| | | |
| | | |
| | | public RechargeAdapter(Context context, List<RechargeBean> rechargeList, OnItemClickListener onItemClickListener) { |
| | | mContext = context; |
| | | this.rechargeList = rechargeList; |
| | | this.onItemClickListener = onItemClickListener; |
| | | } |
| | | |
| | | |
| | |
| | | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { |
| | | if (holder instanceof ViewHolder) { |
| | | if (rechargeList.size() > 0) { |
| | | ((ViewHolder) holder).getBinding().item.setOnClickListener(v -> onItemClickListener.onItemClick(position)); |
| | | ((ViewHolder) holder).getBinding().userName.setText("姓名:" + rechargeList.get(position).getUserName()); |
| | | ((ViewHolder) holder).getBinding().userNo.setText("卡号:" + rechargeList.get(position).getCardNumber()); |
| | | ((ViewHolder) holder).getBinding().morny.setText("充值金额:" + rechargeList.get(position).getMorny() + " 元"); |
| | | // ((ViewHolder) holder).getBinding().rachagerWater.setText("充值水量:" + rechargeList.get(position).getRechargeWater() + " 吨"); |
| | | ((ViewHolder) holder).getBinding().balance.setText("充值时余额:" + rechargeList.get(position).getBalance() + " 元"); |
| | | // ((ViewHolder) holder).getBinding().surplusWater.setText("剩余水量:" + rechargeList.get(position).getSurplusWater() + " 吨"); |
| | | ((ViewHolder) holder).getBinding().date.setText("日期:" + DateUtil.dateToStamp(rechargeList.get(position).getRechargeDate(), DateUtil.type1)); |
| | | } |
| | | } |
| | |
| | | * Time: 16:13 |
| | | * 备注: |
| | | */ |
| | | public class AddUserResult { |
| | | public class AddUserResult extends BaseResult{ |
| | | // {"state":1,"updatedTime":"2024-08-05 16:12:29","accountType":0,"planId":"","preRechargeMoney":0.00,"adcdName":"焦庙村委会","iccardBalanceMoney":"","updatedBy":"1816297106145103873","peasantType":"","compensateMoney":0.00,"createdTime":"2024-08-05 16:12:29","refunds":0.00,"peasantId":"1820372286394867713","priceType":"","createdBy":"1816297106145103873","adcd":"371425102301","peasantIdNumber":"130107199210160023","peasantCode":"37142510230100013","peasantName":"测试","peasantPhone":"15802220723","contractedLandArea":"","address":"","planName":""} |
| | | |
| | | |
| New file |
| | |
| | | package com.dayu.qiheonlinelibrary.bean; |
| | | |
| | | /** |
| | | * Created by Android Studio. |
| | | * author: zuo |
| | | * Date: 2024-08-14 |
| | | * Time: 15:29 |
| | | * 备注: |
| | | */ |
| | | public class BaseResult { |
| | | } |
| | |
| | | * Time: 14:43 |
| | | * 备注: |
| | | */ |
| | | public class CardInfoListResult { |
| | | public class CardInfoListResult extends BaseResult{ |
| | | |
| | | int total;//总数 |
| | | |
| | |
| | | * Time: 16:51 |
| | | * 备注:通过实体卡号查询到的信息 |
| | | */ |
| | | public class CardInfoResult { |
| | | public class CardInfoResult extends BaseResult { |
| | | //{"chargeMethod":"","iccardCancelTime":"","lastRechargeTime":"2024-08-06 15:21:59","thisSaleMoney":"","totalRechargeWaterAmount":0.00,"iccardBalanceAmonunt":0.00,"iccardInfoId":"1820721965431267330","iccardProtocolName":"","totalRechargeElectricAmount":0.00,"logicState":1,"username":"","state":1,"familySize":"","yearRechargeMoney":0.00,"thisSaleAmount":"","onlyRechargeMoney":"","identityCard":"","iccardBrand":"","iccardBalanceMoney":0.00,"openOperatorUsername":"","adName":"","rechargeWaterAmount":"","openOperatorUserId":"1816297106145103873","lastSwipeTime":"","address":"","yearCompensateMoney":0.00,"iccardProtocolOpenMoney":"","peasantId":"1820374742679953410","reissueTimes":0,"iccardProtocolReissueMoney":"","iccardProtocolId":"","yearRechargeWaterAmount":0.00,"iccardBalanceElectric":0.00,"iccardStatus":0,"phone":"","lastRechargeMoney":0.00,"iccardOpenTime":"2024-08-06 15:21:59","yearRechargeElectricAmount":0.00,"reissueRechargeRecordId":"","iccardPrice":1.50,"iccardNum":"3714251023011","accountType":0,"equipCode":"","rechargeWaterMoney":"","totalRechargeMoney":0.00,"executeWaterPrice":"","iccardType":1,"iccardCode":"4440DABA"} |
| | | |
| | | int iccardStatus;//ic卡状态 0 正常 1 已注销 2 已挂失 |
| | |
| | | |
| | | String iccardBalanceElectric;// 卡内剩余电量 |
| | | |
| | | String adcd; |
| | | |
| | | String adcdName; |
| | | |
| | | public String getAdcd() { |
| | | return adcd; |
| | | } |
| | | |
| | | public void setAdcd(String adcd) { |
| | | this.adcd = adcd; |
| | | } |
| | | |
| | | public String getAdcdName() { |
| | | return adcdName; |
| | | } |
| | | |
| | | public void setAdcdName(String adcdName) { |
| | | this.adcdName = adcdName; |
| | | } |
| | | |
| | | public String getIccardBalanceElectric() { |
| | | return iccardBalanceElectric; |
| | | } |
| | |
| | | * Time: 16:06 |
| | | * 备注: |
| | | */ |
| | | public class LoginResult { |
| | | public class LoginResult extends BaseResult{ |
| | | //{"code":"0","msg":"操作成功","data":{"chargeMethod":"","iccardCancelTime":"","lastRechargeTime":"2024-08-05 17:04:15","thisSaleMoney":"","totalRechargeWaterAmount":0.00,"iccardBalanceAmonunt":0.00,"iccardInfoId":"1820385315354320898","iccardProtocolName":"","totalRechargeElectricAmount":0.00,"logicState":1,"username":"","state":1,"familySize":"","yearRechargeMoney":0.00,"thisSaleAmount":"","onlyRechargeMoney":"","identityCard":"","iccardBrand":"","iccardBalanceMoney":0.00,"openOperatorUsername":"","adName":"","rechargeWaterAmount":"","openOperatorUserId":"1816297106145103873","lastSwipeTime":"","address":"","yearCompensateMoney":0.00,"iccardProtocolOpenMoney":"","peasantId":"1820374742679953410","reissueTimes":0,"iccardProtocolReissueMoney":"","iccardProtocolId":"","yearRechargeWaterAmount":0.00,"iccardBalanceElectric":0.00,"iccardStatus":0,"phone":"","lastRechargeMoney":0.00,"iccardOpenTime":"","yearRechargeElectricAmount":0.00,"reissueRechargeRecordId":"","iccardPrice":1.50,"iccardNum":"3714251023011","accountType":0,"equipCode":"","rechargeWaterMoney":"","totalRechargeMoney":0.00,"executeWaterPrice":"","iccardType":1,"iccardCode":"BADA4044"}} |
| | | |
| | | public String userId;//用户id |
| | | |
| | | OtherData otherData; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | } |
| | |
| | | * Time: 16:23 |
| | | * 备注: |
| | | */ |
| | | public class OpenCardResult { |
| | | public class OpenCardResult extends BaseResult{ |
| | | // {"code":"0","msg":"操作成功","data":{"iccardBalanceMoney":0,"lastSwipeTime":"","rechargeOperatorUsername":"","rechargeType":0,"iccardCode":"3714251023010002","rechargeCallbackType":"","iccardNum":"","lastRechargeTime":"","iccardBalanceAmonunt":0,"thisSaleAmount":"","remark":"待写卡,开卡交易中","username":"","rechargeRecordNum":"1821459146525384704","totalRechargeMoney":"","iccardType":"","reissueTimes":"","yearRechargeElectricAmount":"","rechargeWaterAmount":"","iccardRechargeRecordId":"1821459146567327745","rechargeOperatorUserId":"1816297106145103873","chargeMethod":"","yearRechargeMoney":"","rechargeElectricAmount":"","iccardProtocolName":"","equipCode":"","thisSaleMoney":"","iccardBalanceElectric":"","rechargeCardMoney":5,"peasantId":"1821458177314004994","totalRechargeElectricAmount":"","rechargeStatus":1,"writeCardStatus":1,"lastRechargeMoney":"","totalRechargeWaterAmount":"","executeWaterPrice":"","adName":"","yearCompensateMoney":"","iccardBrand":"","rechargeWaterMoney":"","yearRechargeWaterAmount":"","rechargeMoney":5,"iccardInfoId":"1821459146349223937","rechargeTime":"","iccardPrice":1.50016}} |
| | | |
| | | String iccardRechargeRecordId;//ic卡交易记录id |
| | |
| | | * Time: 16:00 |
| | | * 备注:水价管理列表 |
| | | */ |
| | | public class PricePlanResult { |
| | | public class PricePlanResult extends BaseResult{ |
| | | |
| | | // { |
| | | // "code": "0", |
| | |
| | | * Time: 11:08 |
| | | * 备注: |
| | | */ |
| | | public class RechargeResult { |
| | | public class RechargeResult extends BaseResult{ |
| | | //{"iccardBalanceMoney":2,"lastSwipeTime":"","rechargeOperatorUsername":"","rechargeType":1,"iccardCode":"4440DABA","rechargeCallbackType":"","iccardNum":"","lastRechargeTime":"","iccardBalanceAmonunt":6.25,"thisSaleAmount":"","remark":"待写卡,充值交易中","username":"","rechargeRecordNum":"1821020394581663744","totalRechargeMoney":0.00,"iccardType":"","reissueTimes":"","yearRechargeElectricAmount":0.00,"rechargeWaterAmount":6.25,"iccardRechargeRecordId":"1821020394594246658","rechargeOperatorUserId":"1816297106145103873","chargeMethod":"","yearRechargeMoney":0.00,"rechargeElectricAmount":1.33,"iccardProtocolName":"","equipCode":"","thisSaleMoney":"","iccardBalanceElectric":1.33,"rechargeCardMoney":"","peasantId":"1820374742679953410","totalRechargeElectricAmount":0.00,"rechargeStatus":1,"writeCardStatus":1,"lastRechargeMoney":"","totalRechargeWaterAmount":0.00,"executeWaterPrice":"","adName":"","yearCompensateMoney":"","iccardBrand":"","rechargeWaterMoney":2,"yearRechargeWaterAmount":0.00,"rechargeMoney":2,"iccardInfoId":"","rechargeTime":"","iccardPrice":1.50} |
| | | |
| | | String iccardBalanceMoney;//卡内剩余金额(元) |
| | |
| | | * Time: 16:29 |
| | | * 备注:补卡返回参数 |
| | | */ |
| | | public class ReplaceCardResult { |
| | | public class ReplaceCardResult extends BaseResult{ |
| | | //{"code":"0","msg":"操作成功","data":{"iccardBalanceMoney":5.00,"lastSwipeTime":"","rechargeOperatorUsername":"","rechargeType":0,"iccardCode":"3714251023010005","rechargeCallbackType":"","iccardNum":"","lastRechargeTime":"","iccardBalanceAmonunt":15.63,"thisSaleAmount":"","remark":"待写卡,补卡开卡交易中","username":"","rechargeRecordNum":"1821825921016406016","totalRechargeMoney":"","iccardType":"","reissueTimes":"","yearRechargeElectricAmount":"","rechargeWaterAmount":"","iccardRechargeRecordId":"1821825921020600321","rechargeOperatorUserId":"1816297106145103873","chargeMethod":"","yearRechargeMoney":"","rechargeElectricAmount":"","iccardProtocolName":"","equipCode":"","thisSaleMoney":"","iccardBalanceElectric":3.33,"rechargeCardMoney":4,"peasantId":"1821458177314004994","totalRechargeElectricAmount":"","rechargeStatus":1,"writeCardStatus":1,"lastRechargeMoney":"","totalRechargeWaterAmount":"","executeWaterPrice":"","adName":"","yearCompensateMoney":"","iccardBrand":"","rechargeWaterMoney":"","yearRechargeWaterAmount":"","rechargeMoney":4,"iccardInfoId":"1821825920739581954","rechargeTime":"","iccardPrice":1.50}} |
| | | |
| | | |
| | |
| | | * Time: 15:28 |
| | | * 备注: |
| | | */ |
| | | public class UserListResult { |
| | | public class UserListResult extends BaseResult{ |
| | | |
| | | int total;//总数 |
| | | |
| | |
| | | public static ManageCard getBean(List<byte[]> data) { |
| | | |
| | | if (data != null) { |
| | | try { |
| | | ManageCard manageCard = new ManageCard(); |
| | | byte[] zero = data.get(0); |
| | | byte[] arerNumberByte = new byte[4]; |
| | |
| | | manageCard.setUserCard(HexUtil.bytesToHex(passWordByte)); |
| | | manageCard.setCardWriteState(zero[13]); |
| | | return manageCard; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | |
| | | @Query("select * from RechargeBean where rechargeDate>=:beginTime and rechargeDate<=:endTime") |
| | | LiveData<List<RechargeBean>> findByTime(long beginTime, long endTime); |
| | | |
| | | @Query("select * from RechargeBean where rechargeDate>=:beginTime and rechargeDate<=:endTime") |
| | | List<RechargeBean> ansyFindByTime(long beginTime, long endTime); |
| | | @Query("select * from RechargeBean where rechargeDate>=:beginTime and rechargeDate<=:endTime and adminId =:adminId") |
| | | List<RechargeBean> ansyFindByTime(String adminId,long beginTime, long endTime); |
| | | |
| | | @Query("select * from RechargeBean order by rechargeDate desc LIMIT :limit OFFSET :offset") |
| | | List<RechargeBean> findAll(int offset,int limit); |
| | | @Query("select * from RechargeBean where adminId =:adminId order by rechargeDate desc LIMIT :limit OFFSET :offset") |
| | | List<RechargeBean> findAll(String adminId,int offset,int limit); |
| | | } |
| | |
| | | |
| | | private String deductionMorny;//补扣钱款 充值补扣金额=充值金额+充值前读取的卡内余额-充值回调返回卡内余额 |
| | | |
| | | private String adminId;//当前登录的用户id |
| | | |
| | | public String getAdminId() { |
| | | return adminId; |
| | | } |
| | | |
| | | public void setAdminId(String adminId) { |
| | | this.adminId = adminId; |
| | | } |
| | | |
| | | public String getDeductionMorny() { |
| | | return deductionMorny; |
| | |
| | | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.text.TextUtils; |
| | | |
| | | |
| | | import com.dayu.baselibrary.business.BusinessProvider; |
| | | import com.dayu.qiheonlinelibrary.bean.BaseResult; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.BaseProgressSubscriber; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.ProgressSubscriber; |
| | | import com.dayu.qiheonlinelibrary.net.subscribers.SubscriberListener; |
| | |
| | | response.setCode(tem.getCode()); |
| | | response.setMsg(tem.getMsg()); |
| | | if (tClass!= null) { |
| | | if (TextUtils.isEmpty(tem.getData().toString()) && BaseResult.class.isAssignableFrom(tClass)) { |
| | | response.setData(null); |
| | | return response; |
| | | } |
| | | if ( tem.getData() instanceof Map) { |
| | | try { |
| | | // response.setData(MyJsonParser.getBeanFromMap((Map<String, Object>) tem.getData(), tClass)); |
| | |
| | | } |
| | | } |
| | | return response; |
| | | }} |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | |
| | | * Description: |
| | | */ |
| | | public class Constants { |
| | | public static final String BASE_URL = "http://120.46.45.35:20081/"; |
| | | public static final String BASE_URL = "http://120.46.45.35:20081/api/sjggqhtest/"; |
| | | |
| | | /** |
| | | * 代表请求成功 |
| | |
| | | byte[] data = mfc.readBlock(bIndex + 0); |
| | | if (data != null && data.length > 0) { |
| | | String hex = HexUtil.bytesToHex(Arrays.copyOfRange(data, 0, 4)); |
| | | // hex = HexUtil.spaceHex(hex); |
| | | // hex = HexUtil.HighLowHex(hex); |
| | | hex = HexUtil.spaceHex(hex); |
| | | hex = HexUtil.HighLowHex(hex); |
| | | Log.i("NFCWreatActivity", "hex===" + hex); |
| | | return hex.toUpperCase(); |
| | | } |
| | |
| | | byte[] data = mfc.readBlock(bIndex + 0); |
| | | if (data != null && data.length > 0) { |
| | | String hex = HexUtil.bytesToHex(Arrays.copyOfRange(data, 0, 4)); |
| | | hex = HexUtil.spaceHex(hex); |
| | | hex = HexUtil.HighLowHex(hex); |
| | | strData.append(hex); |
| | | strData.append(","); |
| | | Log.i("NFCWreatActivity", "hex===" + hex); |
| New file |
| | |
| | | package com.dayu.qiheonlinelibrary.utils; |
| | | |
| | | import android.text.TextUtils; |
| | | |
| | | import com.dayu.baselibrary.utils.AidlUtil; |
| | | import com.dayu.baselibrary.utils.DateUtil; |
| | | import com.dayu.baselibrary.utils.MornyUtil; |
| | | import com.dayu.qiheonlinelibrary.dbBean.RechargeBean; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | /** |
| | | * Created by Android Studio. |
| | | * author: zuo |
| | | * Date: 2024-08-14 |
| | | * Time: 10:57 |
| | | * 备注: |
| | | */ |
| | | public class PrintUtils { |
| | | |
| | | /** |
| | | * 打印机相关信息 |
| | | * |
| | | * @param rechargeBean |
| | | */ |
| | | public static void printerData(RechargeBean rechargeBean) { |
| | | try { |
| | | StringBuffer data = new StringBuffer(); |
| | | if (rechargeBean != null) { |
| | | data.append("*****************************" + "\n"); |
| | | data.append("设备序列号:" + rechargeBean.getSerial() + "\n"); |
| | | data.append("姓 名:" + rechargeBean.getUserName() + "\n"); |
| | | data.append("卡 号:" + rechargeBean.getCardNumber() + "\n"); |
| | | data.append("用户编号:" + rechargeBean.getUserCode() + "\n"); |
| | | data.append("充值金额:" + rechargeBean.getMorny() + " 元" + "\n"); |
| | | if (MornyUtil.changeY2F(rechargeBean.getDeductionMorny()) > 0) { |
| | | data.append("补扣金额:" + rechargeBean.getDeductionMorny() + " 元" + "\n"); |
| | | } |
| | | data.append("充值后卡内余额:" + rechargeBean.getBalance() + " 元" + "\n"); |
| | | data.append("充值电量:" + rechargeBean.getRechargeElectric() + " 度" + "\n"); |
| | | data.append("充值后卡内电量:" + rechargeBean.getSurplusElectic() + " 度" + "\n"); |
| | | data.append("日 期:" + DateUtil.dateToStamp(rechargeBean.getRechargeDate(), DateUtil.type2) + "\n\n"); |
| | | data.append("*****************************"); |
| | | } |
| | | float size = 26; |
| | | try { |
| | | AidlUtil.getInstance().printText(data.toString(), size, true, false); |
| | | // AidlUtil.getInstance().print3Line(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | android:layout_marginTop="20dp" |
| | | android:padding="5dp" |
| | | android:text="制作用户电量单价卡" |
| | | android:visibility="gone" |
| | | android:visibility="visible" |
| | | android:textColor="@color/text_selecter_color" |
| | | android:textSize="@dimen/text_size" /> |
| | | </LinearLayout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_toStartOf="@+id/my_newCardOut" |
| | | android:text="开户记录" |
| | | android:text="开卡记录" |
| | | android:textColor="@color/text_selecter_color" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="@dimen/dimen_title_height" |
| | | android:background="@color/title_bar_bg" |
| | | app:centerText="开户记录" |
| | | app:centerText="开卡记录" |
| | | app:leftImage="@mipmap/icon_back" |
| | | app:rightText="筛选" /> |
| | | |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_above="@id/read_btn" |
| | | android:orientation="vertical" |
| | | android:layout_below="@id/titleBar" |
| | | android:padding="30dp"> |
| | | |
| | | <TextView |
| | |
| | | android:layout_marginTop="15dp" |
| | | android:text="当前卡号:" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_userCode" |
| | | android:layout_width="match_parent" |
| | |
| | | android:layout_marginTop="15dp" |
| | | android:text="充值金额:" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_deductionMorny" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:text="充值金额:" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_recharge_balance" |
| | | android:layout_width="match_parent" |
| | |
| | | android:layout_marginTop="15dp" |
| | | android:text="剩余金额:" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_remainder_blance" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:text="剩余金额:" |
| | | android:visibility="gone" |
| | | android:textSize="@dimen/text_size" /> |
| | | android:textSize="@dimen/text_size" |
| | | android:visibility="gone" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_rechargeElectric" |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:text="充值电量:" |
| | | android:visibility="visible" |
| | | android:textSize="@dimen/text_size" /> |
| | | android:textSize="@dimen/text_size" |
| | | android:visibility="visible" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_surplusElectric" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:text="剩余电量:" |
| | | android:visibility="visible" |
| | | android:textSize="@dimen/text_size" /> |
| | | android:textSize="@dimen/text_size" |
| | | android:visibility="visible" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_rechargeDate" |
| | | android:layout_width="match_parent" |
| | |
| | | android:textSize="@dimen/text_size" /> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | <TextView |
| | | android:id="@+id/read_btn" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="50dp" |
| | | android:layout_alignParentBottom="true" |
| | | android:background="@color/title_bg" |
| | | android:gravity="center" |
| | | android:text="再次打印凭条" |
| | | android:textColor="#000000" |
| | | android:textSize="@dimen/new_card_size" |
| | | android:visibility="invisible" /> |
| | | </RelativeLayout> |
| | |
| | | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="剩余金额:" |
| | | android:text="充值后剩余金额:" |
| | | android:textSize="@dimen/text_size" /> |
| | | |
| | | <TextView |
| | |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_remainder_water" |
| | | android:id="@+id/red_balance_electric" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:text="剩余水量:" |
| | | android:text="剩余电量:" |
| | | android:textSize="@dimen/text_size" |
| | | android:visibility="gone" /> |
| | | android:visibility="visible" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/red_rechargeDate" |
| | |
| | | android:layout_marginRight="20dp" |
| | | android:background="@drawable/editbg" |
| | | android:hint="请输入补卡工本费(元)" |
| | | android:inputType="numberDecimal" |
| | | android:paddingLeft="10dp" |
| | | android:textColor="#000000" /> |
| | | |
| | |
| | | android:gravity="center_horizontal" |
| | | android:orientation="horizontal" |
| | | android:padding="5dp"> |
| | | |
| | | |
| | | |
| | | |
| | | <TextView |
| | |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/item" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="15dp" |