Merge remote-tracking branch 'origin/wuhuyancao' into wuhuyancao
已添加19个文件
已删除16个文件
已修改35个文件
| | |
| | | import android.widget.ImageView; |
| | | |
| | | import androidx.annotation.Nullable; |
| | | |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.bean.LoginBean; |
| | | import com.doumee.keyCabinet.utils.CrashHandler; |
| | | import com.bumptech.glide.Glide; |
| | | import com.doumee.keyCabinet.utils.TimeUtils; |
| | | import com.doumee.lib_coremodel.base.CoreConfig; |
| | | import com.doumee.lib_coremodel.http.other.OkHttpNetworkFetcher; |
| | | import com.doumee.lib_coremodel.util.SpUtil; |
| | | import com.doumee.keyCabinet.bean.ConfigBean; |
| | | import com.doumee.keyCabinet.bean.MemberBean; |
| | | import com.doumee.keyCabinet.utils.LanguageUtil; |
| | | import com.facebook.fresco.helper.Phoenix; |
| | |
| | | |
| | | import java.io.File; |
| | | import java.util.HashSet; |
| | | import java.util.Random; |
| | | import java.util.Set; |
| | | |
| | | import dagger.hilt.android.HiltAndroidApp; |
| | |
| | | return; |
| | | } |
| | | timerCallBack = callBack; |
| | | countTimer = new CountDownTimer(configBean.getBackHomeTime()*1000, 1*1000) { |
| | | countTimer = new CountDownTimer(60*1000, 1*1000) { |
| | | @Override |
| | | public void onTick(long millisUntilFinished) { |
| | | //Timber.tag("CountTimer==>").d(millisUntilFinished+""); |
| | |
| | | } |
| | | } |
| | | |
| | | private static ConfigBean configBean; |
| | | public static void saveConfigBean(ConfigBean bean){ |
| | | private static DevConfigBean configBean; |
| | | public static void saveConfigBean(DevConfigBean bean){ |
| | | configBean = bean; |
| | | } |
| | | |
| | | public static ConfigBean getConfigBean(){ |
| | | public static DevConfigBean getConfigBean(){ |
| | | if(configBean==null){ |
| | | configBean = new ConfigBean(); |
| | | configBean = new DevConfigBean(); |
| | | } |
| | | return configBean; |
| | | } |
| | | |
| | | private static MemberBean memberBean; |
| | | public static void saveMemberBean(MemberBean bean){ |
| | | memberBean = bean; |
| | | } |
| | | |
| | | public static MemberBean getMemberBean(){ |
| | | if(memberBean==null){ |
| | | memberBean = new MemberBean(); |
| | | } |
| | | return memberBean; |
| | | } |
| | | |
| | | private static UsbDevice customDevice; |
| | |
| | | customDevice = device; |
| | | } |
| | | |
| | | private static String cookie; |
| | | private static LoginBean loginBean; |
| | | |
| | | public static String getCookie() { |
| | | return cookie; |
| | | public static LoginBean getLoginBean() { |
| | | if(loginBean==null){ |
| | | loginBean = new LoginBean(); |
| | | } |
| | | return loginBean; |
| | | } |
| | | |
| | | public static void setCookie(String cookie) { |
| | | MApplication.cookie = cookie; |
| | | public static void setLoginBean(LoginBean cookie) { |
| | | MApplication.loginBean = cookie; |
| | | } |
| | | |
| | | private static Random random; |
| | | public static boolean nextBoolean(){ |
| | | if(random==null){ |
| | | random = new Random(); |
| | | } |
| | | return random.nextBoolean(); |
| | | } |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | //çæ¬å·") |
| | | private Integer versionCode; |
| | | private Integer versionNum; |
| | | //çæ¬åç§°") |
| | | private String versionName; |
| | | private String versionInfo; |
| | | //æ´æ°å
容") |
| | | private String updateContent; |
| | | //æ¯å¦å¿
é¡»æ´æ°(0:å¦ï¼1:æ¯)") |
| | | private String isNeedUpdate; |
| | | private String content; |
| | | //æ¯å¦å¿
é¡»æ´æ°( 0å¦ 1æ¯)") |
| | | private Integer isForce; |
| | | //æ´æ°å°å") |
| | | private String updateUrl; |
| | | private String fullFileUrl; |
| | | |
| | | public Integer getVersionCode() { |
| | | return versionCode; |
| | | public Integer getVersionNum() { |
| | | return versionNum; |
| | | } |
| | | |
| | | public void setVersionCode(Integer versionCode) { |
| | | this.versionCode = versionCode; |
| | | public void setVersionNum(Integer versionNum) { |
| | | this.versionNum = versionNum; |
| | | } |
| | | |
| | | public String getVersionName() { |
| | | return versionName; |
| | | public String getVersionInfo() { |
| | | return versionInfo; |
| | | } |
| | | |
| | | public void setVersionName(String versionName) { |
| | | this.versionName = versionName; |
| | | public void setVersionInfo(String versionInfo) { |
| | | this.versionInfo = versionInfo; |
| | | } |
| | | |
| | | public String getUpdateContent() { |
| | | return updateContent; |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setUpdateContent(String updateContent) { |
| | | this.updateContent = updateContent; |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public String getIsNeedUpdate() { |
| | | return isNeedUpdate; |
| | | public Integer getIsForce() { |
| | | return isForce; |
| | | } |
| | | |
| | | public void setIsNeedUpdate(String isNeedUpdate) { |
| | | this.isNeedUpdate = isNeedUpdate; |
| | | public void setIsForce(Integer isForce) { |
| | | this.isForce = isForce; |
| | | } |
| | | |
| | | public String getUpdateUrl() { |
| | | return updateUrl; |
| | | public String getFullFileUrl() { |
| | | return fullFileUrl; |
| | | } |
| | | |
| | | public void setUpdateUrl(String updateUrl) { |
| | | this.updateUrl = updateUrl; |
| | | public void setFullFileUrl(String fullFileUrl) { |
| | | this.fullFileUrl = fullFileUrl; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CabinetDetailBean implements Serializable { |
| | | //设å¤ç¼å· |
| | | private String code; |
| | | //设å¤ID |
| | | private String devId; |
| | | //ææ ¼æ»æ° |
| | | private Integer gridNum; |
| | | //设å¤ä¸»é® |
| | | private Integer id; |
| | | //设å¤åç§° |
| | | private String name; |
| | | //å¨ä½é¥åæ° |
| | | private Integer onlineKeyNum; |
| | | //ååºé¥åæ° |
| | | private Integer outKeyNum; |
| | | //æ
éæä½æ°é |
| | | private Integer errGridNum; |
| | | //ç»´ä¿®ä¿å
»é¥åæ° |
| | | private Integer serviceKeyNum; |
| | | //æªç»å®æä½æ°é |
| | | private Integer unBindGridNum; |
| | | |
| | | //ææ ¼ä¿¡æ¯ |
| | | private List<CabinetGridInfoVOListBean> cabinetGridInfoVOList; |
| | | |
| | | @Data |
| | | public static class CabinetGridInfoVOListBean implements Serializable { |
| | | //ç»å®ç¶æ 0æªç»å®ï¼1å·²ç»å® |
| | | private Integer bindStatus; |
| | | //æ¿å· |
| | | private String boardCode; |
| | | //车çå· |
| | | private int carCode; |
| | | //ééå· |
| | | private String channelCode; |
| | | //ç¼ç |
| | | private String code; |
| | | //ä¸»é® |
| | | private Integer id; |
| | | //é¥åç¼ç |
| | | private Integer keyId; |
| | | //é¥åç¶æ 0æªç»å® 1å¨ä½ 2ååº 3ç»´ä¿®ä¿å
» |
| | | private Integer keyStatus; |
| | | //æä½è¿è¡ç¶æ 0æ£å¸¸ 1æ
é |
| | | private Integer workingStatus; |
| | | |
| | | public Integer getBindStatus() { |
| | | return bindStatus; |
| | | } |
| | | |
| | | public void setBindStatus(Integer bindStatus) { |
| | | this.bindStatus = bindStatus; |
| | | } |
| | | |
| | | public String getBoardCode() { |
| | | return boardCode; |
| | | } |
| | | |
| | | public void setBoardCode(String boardCode) { |
| | | this.boardCode = boardCode; |
| | | } |
| | | |
| | | public int getCarCode() { |
| | | return carCode; |
| | | } |
| | | |
| | | public void setCarCode(int carCode) { |
| | | this.carCode = carCode; |
| | | } |
| | | |
| | | public String getChannelCode() { |
| | | return channelCode; |
| | | } |
| | | |
| | | public void setChannelCode(String channelCode) { |
| | | this.channelCode = channelCode; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getKeyId() { |
| | | return keyId; |
| | | } |
| | | |
| | | public void setKeyId(Integer keyId) { |
| | | this.keyId = keyId; |
| | | } |
| | | |
| | | public Integer getKeyStatus() { |
| | | return keyStatus; |
| | | } |
| | | |
| | | public void setKeyStatus(Integer keyStatus) { |
| | | this.keyStatus = keyStatus; |
| | | } |
| | | |
| | | public Integer getWorkingStatus() { |
| | | return workingStatus; |
| | | } |
| | | |
| | | public void setWorkingStatus(Integer workingStatus) { |
| | | this.workingStatus = workingStatus; |
| | | } |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getDevId() { |
| | | return devId; |
| | | } |
| | | |
| | | public void setDevId(String devId) { |
| | | this.devId = devId; |
| | | } |
| | | |
| | | public Integer getGridNum() { |
| | | return gridNum; |
| | | } |
| | | |
| | | public void setGridNum(Integer gridNum) { |
| | | this.gridNum = gridNum; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getOnlineKeyNum() { |
| | | return onlineKeyNum; |
| | | } |
| | | |
| | | public void setOnlineKeyNum(Integer onlineKeyNum) { |
| | | this.onlineKeyNum = onlineKeyNum; |
| | | } |
| | | |
| | | public Integer getOutKeyNum() { |
| | | return outKeyNum; |
| | | } |
| | | |
| | | public void setOutKeyNum(Integer outKeyNum) { |
| | | this.outKeyNum = outKeyNum; |
| | | } |
| | | |
| | | public Integer getErrGridNum() { |
| | | return errGridNum; |
| | | } |
| | | |
| | | public void setErrGridNum(Integer errGridNum) { |
| | | this.errGridNum = errGridNum; |
| | | } |
| | | |
| | | public Integer getServiceKeyNum() { |
| | | return serviceKeyNum; |
| | | } |
| | | |
| | | public void setServiceKeyNum(Integer serviceKeyNum) { |
| | | this.serviceKeyNum = serviceKeyNum; |
| | | } |
| | | |
| | | public Integer getUnBindGridNum() { |
| | | return unBindGridNum; |
| | | } |
| | | |
| | | public void setUnBindGridNum(Integer unBindGridNum) { |
| | | this.unBindGridNum = unBindGridNum; |
| | | } |
| | | |
| | | public List<CabinetGridInfoVOListBean> getCabinetGridInfoVOList() { |
| | | return cabinetGridInfoVOList; |
| | | } |
| | | |
| | | public void setCabinetGridInfoVOList(List<CabinetGridInfoVOListBean> cabinetGridInfoVOList) { |
| | | this.cabinetGridInfoVOList = cabinetGridInfoVOList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | import java.util.List; |
| | | |
| | | //äººè¸ |
| | | public class CabinetFaceBean { |
| | | //éªè¯äººäººè¸å表 |
| | | private List<FaceUserBean> autoFaceList; |
| | | //叿ºäººè¸å表 |
| | | private List<FaceUserBean> driverFaceList; |
| | | |
| | | public List<FaceUserBean> getAutoFaceList() { |
| | | return autoFaceList; |
| | | } |
| | | |
| | | public void setAutoFaceList(List<FaceUserBean> autoFaceList) { |
| | | this.autoFaceList = autoFaceList; |
| | | } |
| | | |
| | | public List<FaceUserBean> getDriverFaceList() { |
| | | return driverFaceList; |
| | | } |
| | | |
| | | public void setDriverFaceList(List<FaceUserBean> driverFaceList) { |
| | | this.driverFaceList = driverFaceList; |
| | | } |
| | | } |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | public class DevConfigBean implements Serializable { |
| | | private String venueId; |
| | | private String shopId; |
| | | //æç¯å®¹é |
| | | private int capacity; |
| | | //æç¯ç±»å(0:IC 1:ID) |
| | | private String category; |
| | | //å½åæç¯æ°é |
| | | private int curNum; |
| | | //è½®æå¾å°å |
| | | private List<String> bannerList; |
| | | //设å¤ç¼å· |
| | | private String code; |
| | | //设å¤ID |
| | | private String devId; |
| | | //æ¯å¦åééªè¯ 0å¦ 1æ¯ |
| | | private int doubleAuth; |
| | | //ä¸»é® |
| | | private Integer id; |
| | | //夿³¨ |
| | | private String info; |
| | | //设å¤åç§° |
| | | private String name; |
| | | private String language; |
| | | //æ¼é |
| | | private BigDecimal money; |
| | | |
| | | //æç¯åç±»ç¶æ 0-ç¦ç¨ï¼1-å¯ç¨ |
| | | private String status; |
| | | |
| | | public String getVenueId() { |
| | | return venueId; |
| | | public List<String> getBannerList() { |
| | | return bannerList; |
| | | } |
| | | |
| | | public void setVenueId(String venueId) { |
| | | this.venueId = venueId; |
| | | public void setBannerList(List<String> bannerList) { |
| | | this.bannerList = bannerList; |
| | | } |
| | | |
| | | public String getShopId() { |
| | | return shopId; |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setShopId(String shopId) { |
| | | this.shopId = shopId; |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public int getCapacity() { |
| | | return capacity; |
| | | public String getDevId() { |
| | | return devId; |
| | | } |
| | | |
| | | public void setCapacity(int capacity) { |
| | | this.capacity = capacity; |
| | | public void setDevId(String devId) { |
| | | this.devId = devId; |
| | | } |
| | | |
| | | public String getCategory() { |
| | | return category; |
| | | public int getDoubleAuth() { |
| | | return doubleAuth; |
| | | } |
| | | |
| | | public void setCategory(String category) { |
| | | this.category = category; |
| | | public void setDoubleAuth(int doubleAuth) { |
| | | this.doubleAuth = doubleAuth; |
| | | } |
| | | |
| | | public int getCurNum() { |
| | | return curNum; |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setCurNum(int curNum) { |
| | | this.curNum = curNum; |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | |
| | | public String getName() { |
| | |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getLanguage() { |
| | | return language; |
| | | } |
| | | |
| | | public void setLanguage(String language) { |
| | | this.language = language; |
| | | } |
| | | |
| | | public BigDecimal getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(BigDecimal money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | import java.util.List; |
| | | |
| | | //äººè¸ |
| | | public class FaceUserBean { |
| | | private String id; |
| | | private String name; |
| | | private String faceUrl; |
| | | //0ï¼ä¼åï¼1ï¼å¦å |
| | | private String type; |
| | | private String editTime; |
| | | private String faceImg; |
| | | private String memberId; |
| | | private String memberName; |
| | | |
| | | //0:管çåï¼1ï¼ç¨æ· |
| | | private String groupId; |
| | | |
| | | private boolean checked; |
| | | |
| | | public FaceUserBean() { |
| | | |
| | | public String getFaceImg() { |
| | | return faceImg; |
| | | } |
| | | |
| | | public FaceUserBean(String id, String name, String type, String faceUrl) { |
| | | this.id = id; |
| | | this.name = name; |
| | | this.faceUrl = faceUrl; |
| | | this.type = type; |
| | | public void setFaceImg(String faceImg) { |
| | | this.faceImg = faceImg; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | public String getMemberId() { |
| | | return memberId; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | public void setMemberId(String memberId) { |
| | | this.memberId = memberId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | public String getGroupId() { |
| | | return groupId; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | public void setGroupId(String groupId) { |
| | | this.groupId = groupId; |
| | | } |
| | | |
| | | public String getFaceUrl() { |
| | | return faceUrl; |
| | | public String getMemberName() { |
| | | return memberName; |
| | | } |
| | | |
| | | public void setFaceUrl(String faceUrl) { |
| | | this.faceUrl = faceUrl; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getEditTime() { |
| | | return editTime; |
| | | } |
| | | |
| | | public void setEditTime(String editTime) { |
| | | this.editTime = editTime; |
| | | public void setMemberName(String memberName) { |
| | | this.memberName = memberName; |
| | | } |
| | | |
| | | public boolean isChecked() { |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | public class KeyCabinetBean { |
| | | import androidx.databinding.ObservableField; |
| | | |
| | | import com.doumee.lib_coremodel.util.luban.Luban; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | |
| | | public class KeyCabinetBean implements Serializable { |
| | | //ç»å®ç¶æ 0æªç»å®ï¼1å·²ç»å® |
| | | private int bindStatus; |
| | | //æ¿å· |
| | | private String boardCode; |
| | | //é¥åæç¼ç |
| | | private int cabinetId; |
| | | //é¥åæåç§° |
| | | private String cabinetName; |
| | | //车çå· |
| | | private String carCode; |
| | | //车è¾ä¸»é® |
| | | private int carId; |
| | | //ééå· |
| | | private String channelCode; |
| | | //ç¼ç |
| | | private String code; |
| | | //ä¸»é® |
| | | private int id; |
| | | //夿³¨ |
| | | private String info; |
| | | //é¥åç¼ç |
| | | private String keyCode; |
| | | //é¥åç¼ç |
| | | private int keyId; |
| | | //é¥åç¶æ 0æªç»å® 1å¨ä½ 2ååº 3ç»´ä¿®ä¿å
» |
| | | private int keyStatus; |
| | | //åºåå· |
| | | private String serialNo; |
| | | //ç¶æ 0å¯ç¨ï¼1ç¦ç¨ |
| | | private int status; |
| | | //è¿è¡ç¶æ 0æ£å¸¸ 1æ
é |
| | | private int workingStatus; |
| | | |
| | | private ObservableField<Boolean> isSelected = new ObservableField<>(false); |
| | | private ObservableField<Integer> text1Color = new ObservableField<>(0xff111111); |
| | | private ObservableField<Integer> text2Color = new ObservableField<>(0xff279baa); |
| | | |
| | | public int getBindStatus() { |
| | | return bindStatus; |
| | | } |
| | | |
| | | public void setBindStatus(int bindStatus) { |
| | | this.bindStatus = bindStatus; |
| | | } |
| | | |
| | | public String getBoardCode() { |
| | | return boardCode; |
| | | } |
| | | |
| | | public void setBoardCode(String boardCode) { |
| | | this.boardCode = boardCode; |
| | | } |
| | | |
| | | public int getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(int cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public String getCabinetName() { |
| | | return cabinetName; |
| | | } |
| | | |
| | | public void setCabinetName(String cabinetName) { |
| | | this.cabinetName = cabinetName; |
| | | } |
| | | |
| | | public String getCarCode() { |
| | | return carCode; |
| | | } |
| | | |
| | | public void setCarCode(String carCode) { |
| | | this.carCode = carCode; |
| | | } |
| | | |
| | | public int getCarId() { |
| | | return carId; |
| | | } |
| | | |
| | | public void setCarId(int carId) { |
| | | this.carId = carId; |
| | | } |
| | | |
| | | public String getChannelCode() { |
| | | return channelCode; |
| | | } |
| | | |
| | | public void setChannelCode(String channelCode) { |
| | | this.channelCode = channelCode; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | |
| | | public String getKeyCode() { |
| | | return keyCode; |
| | | } |
| | | |
| | | public void setKeyCode(String keyCode) { |
| | | this.keyCode = keyCode; |
| | | } |
| | | |
| | | public int getKeyId() { |
| | | return keyId; |
| | | } |
| | | |
| | | public void setKeyId(int keyId) { |
| | | this.keyId = keyId; |
| | | } |
| | | |
| | | public int getKeyStatus() { |
| | | return keyStatus; |
| | | } |
| | | |
| | | public void setKeyStatus(int keyStatus) { |
| | | this.keyStatus = keyStatus; |
| | | } |
| | | |
| | | public String getSerialNo() { |
| | | return serialNo; |
| | | } |
| | | |
| | | public void setSerialNo(String serialNo) { |
| | | this.serialNo = serialNo; |
| | | } |
| | | |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public int getWorkingStatus() { |
| | | return workingStatus; |
| | | } |
| | | |
| | | public void setWorkingStatus(int workingStatus) { |
| | | this.workingStatus = workingStatus; |
| | | } |
| | | |
| | | public ObservableField<Boolean> getIsSelected() { |
| | | return isSelected; |
| | | } |
| | | |
| | | public ObservableField<Integer> getText1Color() { |
| | | return text1Color; |
| | | } |
| | | |
| | | public ObservableField<Integer> getText2Color() { |
| | | return text2Color; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.bean; |
| | | |
| | | //å½åç»å½ä¿¡æ¯ |
| | | public class LoginBean { |
| | | private Integer autoMemberId; |
| | | private Integer memberId; |
| | | |
| | | //ç¨æ·éªè¯æ¹å¼ 0å·è¸ 1å·å¡ |
| | | private int authType; |
| | | |
| | | //0ï¼åï¼1ï¼è¿ |
| | | private int flag ; |
| | | |
| | | public Integer getAutoMemberId() { |
| | | return autoMemberId; |
| | | } |
| | | |
| | | public void setAutoMemberId(Integer autoMemberId) { |
| | | this.autoMemberId = autoMemberId; |
| | | } |
| | | |
| | | public Integer getMemberId() { |
| | | return memberId; |
| | | } |
| | | |
| | | public void setMemberId(Integer memberId) { |
| | | this.memberId = memberId; |
| | | } |
| | | |
| | | public int getAuthType() { |
| | | return authType; |
| | | } |
| | | |
| | | public void setAuthType(int authType) { |
| | | this.authType = authType; |
| | | } |
| | | |
| | | public int getFlag() { |
| | | return flag; |
| | | } |
| | | |
| | | public void setFlag(int flag) { |
| | | this.flag = flag; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.event; |
| | | |
| | | public class HeartEvent { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.event; |
| | | |
| | | /** |
| | | * é¨çå¬è¿å |
| | | */ |
| | | public class KeyDoorEvent { |
| | | //é¨ä¿¡æ¯ |
| | | private String result; |
| | | |
| | | public KeyDoorEvent(String result) { |
| | | this.result = result; |
| | | } |
| | | |
| | | public String getResult() { |
| | | return result; |
| | | } |
| | | |
| | | public void setResult(String result) { |
| | | this.result = result; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.event; |
| | | |
| | | /** |
| | | * é¥åçå¬è¿å |
| | | */ |
| | | public class KeyResultEvent { |
| | | //é¥åä¿¡æ¯ |
| | | private String result; |
| | | |
| | | public KeyResultEvent(String result) { |
| | | this.result = result; |
| | | } |
| | | |
| | | public String getResult() { |
| | | return result; |
| | | } |
| | | |
| | | public void setResult(String result) { |
| | | this.result = result; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.event; |
| | | |
| | | /** |
| | | * é¥åç¶æå¼å§çå¬ |
| | | */ |
| | | public class KeyStatusListener { |
| | | //0ï¼å¼å§ï¼1ï¼ç»æ |
| | | private int status; |
| | | |
| | | public KeyStatusListener(int status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.event; |
| | | |
| | | public class OpenGridEvent { |
| | | //ééå· |
| | | private String channelCode; |
| | | //æ¿å· |
| | | private String boardCode; |
| | | |
| | | public OpenGridEvent(String channelCode, String boardCode) { |
| | | this.channelCode = channelCode; |
| | | this.boardCode = boardCode; |
| | | } |
| | | |
| | | public String getChannelCode() { |
| | | return channelCode; |
| | | } |
| | | |
| | | public void setChannelCode(String channelCode) { |
| | | this.channelCode = channelCode; |
| | | } |
| | | |
| | | public String getBoardCode() { |
| | | return boardCode; |
| | | } |
| | | |
| | | public void setBoardCode(String boardCode) { |
| | | this.boardCode = boardCode; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import com.doumee.keyCabinet.bean.AndroidVersionBean; |
| | | import com.doumee.keyCabinet.bean.CabinetDetailBean; |
| | | import com.doumee.keyCabinet.bean.CabinetFaceBean; |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.bean.GetBillListBean; |
| | | import com.doumee.keyCabinet.bean.OrderGetPriceBean; |
| | | import com.doumee.keyCabinet.bean.RecyclerBraceletBean; |
| | | import com.doumee.keyCabinet.bean.KeyCabinetBean; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.PayResponseBean; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.reactivex.Observable; |
| | | import okhttp3.RequestBody; |
| | | import retrofit2.Response; |
| | | import retrofit2.http.Body; |
| | | import retrofit2.http.GET; |
| | | import retrofit2.http.Header; |
| | | import retrofit2.http.POST; |
| | | import retrofit2.http.Query; |
| | | |
| | | public interface Apis { |
| | | //String HTTP = "http://47.97.231.28:8068/zhcg-interface4/"; |
| | | String HTTP = "http://192.168.0.112:8086/"; |
| | | //String HTTP = "https://mytj.dmtt.run/zhcg-interface2/"; |
| | | //String HTTP = "https://dmtt.doumee.com/zhcg-interface/"; |
| | | //String HTTP = "https://dmtt.doumee.com/saaszhcg-interface/"; |
| | | //String HTTP = "https://swimticket.sx.net.cn/zhcg-interface/"; |
| | | String HEAT_HTTP = "do?c=220301"; |
| | | /** |
| | | * æ¥è¯¢çæ¬ä¿¡æ¯ |
| | | */ |
| | | @POST("do?c=330115") |
| | | Observable<BaseResponse<AndroidVersionBean>> getVersion(@Header("language") String language,@Header("Cookie") String cookie, @Header("shopId") String shopId, @Header("gymId") String gymId, @Body RequestBody requestBody); |
| | | @GET("/visitsAdmin/cloudService/web/cabinet/getLastVersion") |
| | | Observable<BaseResponse<AndroidVersionBean>> getVersion(); |
| | | |
| | | /** |
| | | *设å¤ç»å½ |
| | | * è·åé¥åæåºæ¬ä¿¡æ¯ |
| | | * @param code |
| | | * @return |
| | | */ |
| | | @POST("do?c=220300") |
| | | Observable<Response<BaseResponse<DevConfigBean>>> devLogin(@Header("isCheckShop") int isCheckShop,@Body RequestBody requestBody); |
| | | @GET("/visitsAdmin/cloudService/web/cabinet/getCabinetInfoForDriver") |
| | | Observable<BaseResponse<DevConfigBean>> getCabinetInfoForDriver(@Query("code")String code); |
| | | |
| | | /** |
| | | * å¿è·³ |
| | | */ |
| | | @POST("do?c=220301") |
| | | Observable<BaseResponse<DevConfigBean>> heart(@Header("language") String language,@Header("Cookie") String cookie, @Header("shopId") String shopId, @Header("gymId") String gymId,@Body RequestBody requestBody); |
| | | @GET("/visitsAdmin/cloudService/web/cabinet/updateRunStatusById") |
| | | Observable<BaseResponse> heart(@Query("id")Integer id); |
| | | |
| | | /** |
| | | * ä¸ä¼ æ¥éä¿¡æ¯ |
| | | */ |
| | | @POST("do?c=360313") |
| | | Observable<BaseResponse> upErrInfo(@Header("language") String language,@Header("Cookie") String cookie, @Header("shopId") String shopId, @Header("gymId") String gymId, @Body RequestBody requestBody); |
| | | Observable<BaseResponse> upErrInfo(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * 人è¸å表 |
| | | */ |
| | | @POST("do?c=360311") |
| | | Observable<BaseResponse<FaceUserBean>> allFaceList(@Header("language") String language, @Header("Cookie") String cookie, @Header("shopId") String shopId, @Header("gymId") String gymId, @Body RequestBody requestBody); |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/getCabinetFaceVO") |
| | | Observable<BaseResponse<CabinetFaceBean>> allFaceList(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * è·åå¯æä½ææ ¼ - 叿º |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/getMemberIdByCode") |
| | | Observable<BaseResponse<Integer>> getMemberIdByCode(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * è·åå¯æä½ææ ¼ - 叿º |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/getDriverGrid") |
| | | Observable<BaseResponse<List<KeyCabinetBean>>> getDriverGrid(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * å¼å¯ææ ¼ - 叿º |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/openGridDriver") |
| | | Observable<BaseResponse> openGridDriver(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * å
³éææ ¼ - 叿º |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/closeGrid") |
| | | Observable<BaseResponse> closeGrid(@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * è·åé¥åæè¯¦æ
- 管çå |
| | | */ |
| | | @GET("/visitsAdmin/cloudService/web/cabinet/getCabinetDetail") |
| | | Observable<BaseResponse<List<CabinetDetailBean>>> getCabinetDetail(@Header("dm_user_token") String token,@Query("cabinetId")Integer cabinetId); |
| | | |
| | | /** |
| | | * æ¹éå¼é¨ - 管çå |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/batchOpenGridAdmin") |
| | | Observable<BaseResponse> batchOpenGridAdmin(@Header("dm_user_token") String token,@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * æ è®°ææ ¼æ£å¸¸ - 管çå |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/cancelFault") |
| | | Observable<BaseResponse> cancelFault(@Header("dm_user_token") String token,@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * æ è®°ææ ¼æ
é - 管çå |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/markFault") |
| | | Observable<BaseResponse> markFault(@Header("dm_user_token") String token,@Body RequestBody requestBody); |
| | | |
| | | /** |
| | | * æ è®°ç»´ä¿®ä¿å
» - 管çå |
| | | */ |
| | | @POST("/visitsAdmin/cloudService/web/cabinet/markRepair") |
| | | Observable<BaseResponse> markRepair(@Header("dm_user_token") String token,@Body RequestBody requestBody); |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æå¡ç«¯å®æåï¼è¿åç»å®¢æ·ç«¯çåºæ¬ç±» |
| | |
| | | public class BaseResponse<T> implements Serializable { |
| | | // é误ç |
| | | //é误ç ") |
| | | protected String errorCode; |
| | | protected Integer code; |
| | | |
| | | |
| | | // é误æè¿° |
| | | //"é误æè¿°") |
| | | protected String errorMsg; |
| | | protected String message; |
| | | |
| | | public String getErrorCode() { |
| | | return errorCode; |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setErrorCode(String errorCode) { |
| | | this.errorCode = errorCode; |
| | | public void setCode(Integer code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getErrorMsg() { |
| | | return errorMsg; |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setErrorMsg(String errorMsg) { |
| | | this.errorMsg = errorMsg; |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | private T record; |
| | | private T data; |
| | | |
| | | private List<T> recordList; |
| | | private Integer totalCount; |
| | | |
| | | |
| | | public T getRecord() { |
| | | return record; |
| | | public T getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setRecord(T record) { |
| | | this.record = record; |
| | | public void setData(T data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public List<T> getRecordList() { |
| | | return recordList; |
| | | } |
| | | |
| | | public void setRecordList(List<T> recordList) { |
| | | this.recordList = recordList; |
| | | } |
| | | |
| | | public Integer getTotalCount() { |
| | | return totalCount; |
| | | } |
| | | |
| | | public void setTotalCount(Integer totalCount) { |
| | | this.totalCount = totalCount; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class BatchOpenGridAdminParam { |
| | | //é¥åæä¸»é® |
| | | private Integer cabinetId; |
| | | //ææ ¼ä¸»é®å表 |
| | | private List<Integer> gridIdList; |
| | | |
| | | public Integer getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(Integer cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public List<Integer> getGridIdList() { |
| | | return gridIdList; |
| | | } |
| | | |
| | | public void setGridIdList(List<Integer> gridIdList) { |
| | | this.gridIdList = gridIdList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class CancelFaultParam { |
| | | //é¥åæä¸»é® |
| | | private Integer cabinetId; |
| | | //ææ ¼ä¸»é®å表 |
| | | private List<Integer> gridIdList; |
| | | |
| | | public Integer getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(Integer cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public List<Integer> getGridIdList() { |
| | | return gridIdList; |
| | | } |
| | | |
| | | public void setGridIdList(List<Integer> gridIdList) { |
| | | this.gridIdList = gridIdList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | public class CloseGridParam { |
| | | //éªè¯æ¹å¼ 0å·è¸ 1å·å¡ 2管çåæä½ |
| | | private Integer authType; |
| | | //é¥åæä¸»é® |
| | | private Integer cabinetId; |
| | | //ææ ¼ä¸»é® |
| | | private Integer gridId; |
| | | //é¥åç¶æï¼1å¨ä½ 2ååº |
| | | private Integer keyStatus; |
| | | //ç¨æ·ä¸»é® |
| | | private Integer memberId; |
| | | |
| | | public CloseGridParam(Integer authType, Integer cabinetId, Integer gridId, Integer keyStatus, Integer memberId) { |
| | | this.authType = authType; |
| | | this.cabinetId = cabinetId; |
| | | this.gridId = gridId; |
| | | this.keyStatus = keyStatus; |
| | | this.memberId = memberId; |
| | | } |
| | | } |
| | |
| | | |
| | | public class DevLoginParam { |
| | | //ãå¿
ä¼ ã设å¤ç¼ç ",required = true) |
| | | private String devCode; |
| | | //ç±»å(0:è´ç¥¨æºï¼1:è¯¾æ¶æº) |
| | | private String type="2"; |
| | | private String code; |
| | | private Integer id; |
| | | |
| | | public String getDevCode() { |
| | | return devCode; |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setDevCode(String devCode) { |
| | | this.devCode = devCode; |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | |
| | | //è·åå¯æä½ææ ¼ - 叿º |
| | | public class GetDriverGridParam implements Serializable { |
| | | //éªè¯äººä¸»é® |
| | | private int autoMemberId; |
| | | //é¥åæä¸»é® |
| | | private int cabinetId; |
| | | //ç¨æ·ä¸»é® |
| | | private int memberId; |
| | | //0=å 1=è¿ |
| | | private int type; |
| | | |
| | | public int getAutoMemberId() { |
| | | return autoMemberId; |
| | | } |
| | | |
| | | public void setAutoMemberId(int autoMemberId) { |
| | | this.autoMemberId = autoMemberId; |
| | | } |
| | | |
| | | public int getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(int cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public int getMemberId() { |
| | | return memberId; |
| | | } |
| | | |
| | | public void setMemberId(int memberId) { |
| | | this.memberId = memberId; |
| | | } |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | public class GetMemberIdByCodeParam { |
| | | private String code; |
| | | |
| | | public GetMemberIdByCodeParam(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class MarkFaultParam { |
| | | //é¥åæä¸»é® |
| | | private Integer cabinetId; |
| | | //ææ ¼ä¸»é®å表 |
| | | private List<Integer> gridIdList; |
| | | |
| | | public Integer getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(Integer cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public List<Integer> getGridIdList() { |
| | | return gridIdList; |
| | | } |
| | | |
| | | public void setGridIdList(List<Integer> gridIdList) { |
| | | this.gridIdList = gridIdList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class MarkRepairParam { |
| | | //é¥åæä¸»é® |
| | | private Integer cabinetId; |
| | | //ææ ¼ä¸»é®å表 |
| | | private List<Integer> gridIdList; |
| | | |
| | | public Integer getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(Integer cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public List<Integer> getGridIdList() { |
| | | return gridIdList; |
| | | } |
| | | |
| | | public void setGridIdList(List<Integer> gridIdList) { |
| | | this.gridIdList = gridIdList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.http.param; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | //å¼å¯ææ ¼ - 叿º |
| | | public class OpenGridDriverParam implements Serializable { |
| | | //éªè¯æ¹å¼ 0å·è¸ 1å·å¡ |
| | | private int authType; |
| | | //ç¨æ·id |
| | | private int memberId; |
| | | //é¥åæä¸»é® |
| | | private int cabinetId; |
| | | //ææ ¼ä¸»é® |
| | | private int gridId; |
| | | |
| | | public int getAuthType() { |
| | | return authType; |
| | | } |
| | | |
| | | public void setAuthType(int authType) { |
| | | this.authType = authType; |
| | | } |
| | | |
| | | public int getMemberId() { |
| | | return memberId; |
| | | } |
| | | |
| | | public void setMemberId(int memberId) { |
| | | this.memberId = memberId; |
| | | } |
| | | |
| | | public int getCabinetId() { |
| | | return cabinetId; |
| | | } |
| | | |
| | | public void setCabinetId(int cabinetId) { |
| | | this.cabinetId = cabinetId; |
| | | } |
| | | |
| | | public int getGridId() { |
| | | return gridId; |
| | | } |
| | | |
| | | public void setGridId(int gridId) { |
| | | this.gridId = gridId; |
| | | } |
| | | } |
| | |
| | | mFaceUserAdapter.notifyDataSetChanged(); |
| | | } |
| | | }); |
| | | getVM().getDatas(""); |
| | | getVM().getDatas(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | // ä½¿ç¨ Glide å è½½å¾ç并转æ¢ä¸º Bitmap |
| | | Glide.with(this) |
| | | .asBitmap() |
| | | .load(bean.getFaceUrl()) |
| | | .load(bean.getFaceImg()) |
| | | .addListener(new RequestListener<Bitmap>() { |
| | | @Override |
| | | public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Bitmap> target, boolean isFirstResource) { |
| | | //å 载失败 |
| | | Timber.d("====>å¾çä¸è½½å¤±è´¥%s",bean.getName()); |
| | | Timber.d("====>å¾çä¸è½½å¤±è´¥%s",bean.getMemberName()); |
| | | failCount++; |
| | | if(failStr.length()>0){ |
| | | failStr.append(","); |
| | | } |
| | | failStr.append(bean.getName()); |
| | | failStr.append(bean.getMemberName()); |
| | | finishCount++; |
| | | loadListener.onLoad(finishCount, mSelectCount, finishCount * 1.0f / mSelectCount); |
| | | if (finishCount == mSelectCount) { |
| | |
| | | //æäººè¸ |
| | | // å¤æè´¨éæ£æµï¼é对模ç³åº¦ã鮿¡ãè§åº¦ |
| | | if (ret == 128) { |
| | | Timber.d("====>å¾çç¹å¾æ½åæå: %s", bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½åæå: %s", bean.getMemberName()); |
| | | //æå
¥æ°æ®åº |
| | | User user = FaceApi.getInstance().getByUserId(bean.getType(), bean.getId()); |
| | | User user = FaceApi.getInstance().getByUserId(bean.getGroupId(), bean.getMemberId()); |
| | | boolean isSave = false; |
| | | if (user == null) { |
| | | //æ°å¢ |
| | | isSave = FaceApi.getInstance().registerUserIntoDBmanager(bean.getType(), |
| | | bean.getId(), bean.getName(), bean.getFaceUrl(), JSON.toJSONString(bean), secondFeature); |
| | | isSave = FaceApi.getInstance().registerUserIntoDBmanager(bean.getGroupId(), |
| | | bean.getMemberId(), bean.getMemberName(), bean.getFaceImg(), JSON.toJSONString(bean), secondFeature); |
| | | } else { |
| | | //æ´æ° |
| | | user.setUserName(bean.getName()); |
| | | user.setImageName(bean.getFaceUrl()); |
| | | user.setUserName(bean.getMemberName()); |
| | | user.setImageName(bean.getFaceImg()); |
| | | user.setFeature(secondFeature); |
| | | isSave = FaceApi.getInstance().userUpdateOnly(user); |
| | | } |
| | | |
| | | if (isSave) { |
| | | //ä¿åæå |
| | | Timber.d("====>å½å
¥æå%s",bean.getName()); |
| | | Timber.d("====>å½å
¥æå%s",bean.getMemberName()); |
| | | fail = false; |
| | | } else { |
| | | Timber.d("====>å½å
¥å¤±è´¥%s",bean.getName()); |
| | | Timber.d("====>å½å
¥å¤±è´¥%s",bean.getMemberName()); |
| | | } |
| | | } else { |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getMemberName()); |
| | | } |
| | | } else { |
| | | // ä¸ä¼ å¾çæ 人è¸éè |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getMemberName()); |
| | | } |
| | | |
| | | } |
| | |
| | | if(failStr.length()>0){ |
| | | failStr.append(","); |
| | | } |
| | | failStr.append(bean.getName()); |
| | | failStr.append(bean.getMemberName()); |
| | | }else { |
| | | bean.setChecked(false); |
| | | } |
| | |
| | | //æäººè¸ |
| | | // å¤æè´¨éæ£æµï¼é对模ç³åº¦ã鮿¡ãè§åº¦ |
| | | if (ret == 128) { |
| | | Timber.d("====>å¾çç¹å¾æ½åæå: %s", bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½åæå: %s", bean.getMemberName()); |
| | | //æå
¥æ°æ®åº |
| | | User user = FaceApi.getInstance().getByUserId(bean.getType(), bean.getId()); |
| | | boolean isSave = false; |
| | | if (user == null) { |
| | | //æ°å¢ |
| | | isSave = FaceApi.getInstance().registerUserIntoDBmanager(bean.getType(), |
| | | bean.getId(), bean.getName(), bean.getFaceUrl(), JSON.toJSONString(bean), secondFeature); |
| | | bean.getId(), bean.getMemberName(), bean.getFaceUrl(), JSON.toJSONString(bean), secondFeature); |
| | | } else { |
| | | //æ´æ° |
| | | user.setUserName(bean.getName()); |
| | | user.setUserName(bean.getMemberName()); |
| | | user.setImageName(bean.getFaceUrl()); |
| | | user.setFeature(secondFeature); |
| | | isSave = FaceApi.getInstance().userUpdateOnly(user); |
| | |
| | | |
| | | if (isSave) { |
| | | //ä¿åæå |
| | | Timber.d("====>å½å
¥æå%s",bean.getName()); |
| | | Timber.d("====>å½å
¥æå%s",bean.getMemberName()); |
| | | fail = false; |
| | | } else { |
| | | Timber.d("====>å½å
¥å¤±è´¥%s",bean.getName()); |
| | | Timber.d("====>å½å
¥å¤±è´¥%s",bean.getMemberName()); |
| | | } |
| | | } else { |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getMemberName()); |
| | | } |
| | | } else { |
| | | // ä¸ä¼ å¾çæ 人è¸éè |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getName()); |
| | | Timber.d("====>å¾çç¹å¾æ½å失败%s",bean.getMemberName()); |
| | | } |
| | | } else { |
| | | Timber.d("====>å¾çä¸è½½å¤±è´¥%s",bean.getName()); |
| | | Timber.d("====>å¾çä¸è½½å¤±è´¥%s",bean.getMemberName()); |
| | | } |
| | | bean.setChecked(false); |
| | | if(fail){ |
| | |
| | | if(failStr.length()>0){ |
| | | failStr.append(","); |
| | | } |
| | | failStr.append(bean.getName()); |
| | | failStr.append(bean.getMemberName()); |
| | | } |
| | | finishCount++; |
| | | loadListener.onLoad(finishCount, mSelectCount, finishCount * 1.0f / mSelectCount); |
| | |
| | | }else { |
| | | List<FaceUserBean> beans = new ArrayList<>(); |
| | | for(FaceUserBean d:mUserInfoList){ |
| | | if(s.toString().trim().contains(d.getName())){ |
| | | if(s.toString().trim().contains(d.getMemberName())){ |
| | | beans.add(d); |
| | | } |
| | | } |
| | |
| | | import androidx.lifecycle.MutableLiveData; |
| | | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.bean.CabinetFaceBean; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.event.ReLoginEvent; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.DevLoginParam; |
| | | import com.doumee.keyCabinet.http.param.FaceUserParam; |
| | | import com.doumee.keyCabinet.http.param.RequestBaseObject; |
| | | import com.doumee.keyCabinet.utils.LMobileInfo; |
| | | import com.doumee.keyCabinet.utils.ParamsUtil; |
| | | import com.doumee.lib_coremodel.base.BaseModel; |
| | | import com.doumee.lib_coremodel.base.DataViewModel; |
| | | import com.doumee.lib_coremodel.http.rxJava.SimpleObserver; |
| | | import com.doumee.lib_coremodel.http.utils.RxUtils; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class AddFaceVM extends DataViewModel { |
| | |
| | | doAction(type); |
| | | } |
| | | |
| | | public void getDatas(String name){ |
| | | if (true) { |
| | | return; |
| | | } |
| | | RequestBaseObject<FaceUserParam> request = new RequestBaseObject<>(); |
| | | FaceUserParam param = new FaceUserParam(); |
| | | param.setLastTime(""); |
| | | param.setName(name); |
| | | param.setType("0"); |
| | | request.setParam(param); |
| | | public void getDatas(){ |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setCode(LMobileInfo.getDeviceUniqueId()); |
| | | showLoading(true); |
| | | getRetrofitService(Apis.class).allFaceList(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(), ParamsUtil.encodeRequestBody(request)) |
| | | getRetrofitService(Apis.class).allFaceList(ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<FaceUserBean>>(rxJavaGcManager) { |
| | | .subscribe(new SimpleObserver<BaseResponse<CabinetFaceBean>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<FaceUserBean> response) { |
| | | if("000000".equals(response.getErrorCode())){ |
| | | public void onNext(@NonNull BaseResponse<CabinetFaceBean> response) { |
| | | if(200==response.getCode()){ |
| | | //æ¥è¯¢æ°æ® |
| | | if(response.getRecordList()!=null&&response.getRecordList().size()>0){ |
| | | datasLD.setValue(response.getRecordList()); |
| | | if(response.getData()!=null){ |
| | | CabinetFaceBean faceBean = response.getData(); |
| | | List<FaceUserBean> datas = new ArrayList<>(); |
| | | if(faceBean!=null&&faceBean.getAutoFaceList()!=null){ |
| | | for(FaceUserBean bean:faceBean.getAutoFaceList()){ |
| | | bean.setGroupId("1"); |
| | | } |
| | | }else if("00016".equals(response.getErrorCode())||"00068".equals(response.getErrorCode())) { |
| | | EventBus.getDefault().post(new ReLoginEvent()); |
| | | toast(response.getErrorMsg()); |
| | | datas.addAll(faceBean.getAutoFaceList()); |
| | | } |
| | | if(faceBean!=null&&faceBean.getDriverFaceList()!=null){ |
| | | for(FaceUserBean bean:faceBean.getDriverFaceList()){ |
| | | bean.setGroupId("0"); |
| | | } |
| | | datas.addAll(faceBean.getDriverFaceList()); |
| | | } |
| | | datasLD.setValue(datas); |
| | | } |
| | | }else { |
| | | toast(response.getErrorMsg()); |
| | | toast(response.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | getVM().getDatas(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | protected void doRegister(int type, ActionEventData data) { |
| | | switch (type){ |
| | |
| | | import android.view.View; |
| | | |
| | | import com.baidu.idl.main.facesdk.model.BDFaceSDKCommon; |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.R; |
| | | import com.doumee.keyCabinet.base.MyBaseActivity; |
| | | import com.doumee.keyCabinet.databinding.FaceActivityBinding; |
| | | import com.doumee.keyCabinet.event.TimeClockEvent; |
| | | import com.doumee.keyCabinet.ui.keyCabinet.KeyCabinetActivity; |
| | | import com.doumee.keyCabinet.utils.BraceletLogUtils; |
| | | import com.doumee.keyCabinet.utils.face.FaceUtils; |
| | | import com.doumee.keyCabinet.utils.face.model.SingleBaseConfig; |
| | |
| | | private GlMantleSurfacView glMantleSurfacView; |
| | | private BDFaceImageConfig bdFaceImageConfig; |
| | | private BDFaceCheckConfig bdFaceCheckConfig; |
| | | //0ï¼åï¼1ï¼è¿ |
| | | private int flag ; |
| | | private int status; |
| | | |
| | | @Override |
| | | public int getLayoutId() { |
| | |
| | | normalConfig(); |
| | | getDB().setModel(getVM()); |
| | | mContext = this; |
| | | FaceSDKManager.getInstance().initDataBases(this); |
| | | initFaceCheck(); |
| | | flag = MApplication.getLoginBean().getFlag(); |
| | | statusFsm(flag==0?0:2); |
| | | //todo wmf è§£å¼ |
| | | /*FaceSDKManager.getInstance().initDataBases(this); |
| | | initFaceCheck();*/ |
| | | initView(); |
| | | } |
| | | |
| | |
| | | //getPermission(); |
| | | } |
| | | |
| | | @Override |
| | | protected void timeChange(String djs) { |
| | | getDB().tvDjs.setText(djs); |
| | | } |
| | | |
| | | private void statusFsm(int toStatus){ |
| | | status = toStatus; |
| | | switch (status){ |
| | | case 0: |
| | | //å-管çå人è¸éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("管çå身份éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_viewfinder); |
| | | getDB().tvTip.setText("è¯·ä¿ææ£è¸å¨åæ¯æ¡ä¸ï¼å¹¶æ ¹æ®æç¤ºå®æè¯å«"); |
| | | getDB().clRemind.setVisibility(View.VISIBLE); |
| | | getDB().btSk.setVisibility(View.VISIBLE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clSjSk.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 1: |
| | | //å-管çåå·å¡éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("管çå身份éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_shuaka2); |
| | | getDB().tvTip.setText("请å°ICå¡è´´è¿å·å¡åºï¼åç1-2ç§"); |
| | | getDB().clRemind.setVisibility(View.GONE); |
| | | getDB().btSk.setVisibility(View.GONE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clSjSk.setVisibility(View.VISIBLE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 5: |
| | | //å-叿ºéªè¯æ¹å¼éæ©é¡µ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("叿ºèº«ä»½éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_face); |
| | | getDB().tvTip.setText("è¯·ä¿ææ£è¸å¨åæ¯æ¡ä¸ï¼å¹¶æ ¹æ®æç¤ºå®æè¯å«"); |
| | | getDB().clRemind.setVisibility(View.VISIBLE); |
| | | getDB().btSk.setVisibility(View.GONE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.VISIBLE); |
| | | getDB().clSjSk.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 2: |
| | | //å-叿ºäººè¸éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("叿ºèº«ä»½éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_viewfinder); |
| | | getDB().tvTip.setText("è¯·ä¿ææ£è¸å¨åæ¯æ¡ä¸ï¼å¹¶æ ¹æ®æç¤ºå®æè¯å«"); |
| | | getDB().clRemind.setVisibility(View.VISIBLE); |
| | | getDB().btSk.setVisibility(View.VISIBLE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clSjSk.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 3: |
| | | //å-叿ºå·å¡éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("叿ºèº«ä»½éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_shuaka2); |
| | | getDB().tvTip.setText("请å°ICå¡è´´è¿å·å¡åºï¼åç1-2ç§"); |
| | | getDB().clRemind.setVisibility(View.GONE); |
| | | getDB().btSk.setVisibility(View.GONE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clSjSk.setVisibility(View.VISIBLE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 4: |
| | | //å-叿ºé
ç²¾æ£æµ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("é
ç²¾æ£æµ"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_jiujingjiance); |
| | | getDB().tvTip.setText("请æ¿èµ·é
ç²¾æ£æµä»ªå¹æ°"); |
| | | getDB().clRemind.setVisibility(View.GONE); |
| | | getDB().btSk.setVisibility(View.GONE); |
| | | |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clSjSk.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 6: |
| | | //å-叿ºé
ç²¾æ£æµå¤±è´¥ |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 7: |
| | | //è¿-叿ºäººè¸éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("叿ºèº«ä»½éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_viewfinder); |
| | | getDB().tvTip.setText("è¯·ä¿ææ£è¸å¨åæ¯æ¡ä¸ï¼å¹¶æ ¹æ®æç¤ºå®æè¯å«"); |
| | | getDB().clRemind.setVisibility(View.VISIBLE); |
| | | getDB().btSk.setVisibility(View.VISIBLE); |
| | | |
| | | getDB().clSjSk.setVisibility(View.GONE); |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | case 8: |
| | | //è¿-叿ºå·å¡éªè¯ |
| | | getDB().clLogin.setVisibility(View.VISIBLE); |
| | | getDB().tvTitle.setText("叿ºèº«ä»½éªè¯"); |
| | | getDB().vSl.setBackgroundResource(R.mipmap.ic_shuaka2); |
| | | getDB().tvTip.setText("请å°ICå¡è´´è¿å·å¡åºï¼åç1-2ç§"); |
| | | getDB().clRemind.setVisibility(View.GONE); |
| | | getDB().btSk.setVisibility(View.GONE); |
| | | |
| | | getDB().clSjSk.setVisibility(View.VISIBLE); |
| | | getDB().clSjRl.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private Bitmap bitmap; |
| | | private byte[] secondFeature = new byte[512]; |
| | | @Override |
| | | protected void doRegister(int type, ActionEventData data) { |
| | | switch (type){ |
| | | case 1: |
| | | //忢å°å·å¡ |
| | | if("0".equals(flag)){ |
| | | if(status==0){ |
| | | statusFsm(1); |
| | | }else if(status==2){ |
| | | statusFsm(3); |
| | | } |
| | | }else { |
| | | statusFsm(8); |
| | | } |
| | | break; |
| | | case 2: |
| | | //忢叿ºå·å¡ |
| | | statusFsm(3); |
| | | break; |
| | | case 3: |
| | | //忢叿ºäººè¸ |
| | | statusFsm(2); |
| | | break; |
| | | case 4: |
| | | //忢å°äººè¸ |
| | | if("0".equals(flag)){ |
| | | if(status==1){ |
| | | statusFsm(5); |
| | | }else if(status==3){ |
| | | statusFsm(6); |
| | | } |
| | | }else { |
| | | startActivity(KeyCabinetActivity.class); |
| | | finish(); |
| | | } |
| | | |
| | | //todo wmf |
| | | //statusFsm("0".equals(flag)?); |
| | | break; |
| | | case 5: |
| | | startActivity(KeyCabinetActivity.class); |
| | | finish(); |
| | | break; |
| | | default: |
| | |
| | | @Override |
| | | protected void onResume() { |
| | | super.onResume(); |
| | | startTestOpenDebugRegisterFunction(); |
| | | //todo wmf è§£å¼ |
| | | //startTestOpenDebugRegisterFunction(); |
| | | } |
| | | |
| | | private void startTestOpenDebugRegisterFunction() { |
| | |
| | | //CameraPreviewManager.getInstance().destroy(); |
| | | faceDetectCallBack = null; |
| | | glMantleSurfacView = null; |
| | | FaceSDKManager.getInstance().destroy(); |
| | | //todo wmf è§£å¼ |
| | | //FaceSDKManager.getInstance().destroy(); |
| | | } |
| | | |
| | | private int resultCount = 0; |
| | |
| | | } else { |
| | | //ä¼å
ä¼å |
| | | if("0".equals(user.getGroupId())){ |
| | | |
| | | 11 |
| | | }else { |
| | | if (isCompareCheck) { |
| | | getDB().clFail.setVisibility(View.VISIBLE); |
| | |
| | | super.onPause(); |
| | | isPause = false; |
| | | isTimePause = true; |
| | | CameraPreviewManager.getInstance().stopPreview(); |
| | | //todo wmf è§£å¼ |
| | | //CameraPreviewManager.getInstance().stopPreview(); |
| | | } |
| | | } |
| | |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.hilt.lifecycle.ViewModelInject; |
| | | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.bean.CabinetFaceBean; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.DevLoginParam; |
| | | import com.doumee.keyCabinet.http.param.GetMemberIdByCodeParam; |
| | | import com.doumee.keyCabinet.ui.main.MainActivity; |
| | | import com.doumee.keyCabinet.utils.LMobileInfo; |
| | | import com.doumee.keyCabinet.utils.ParamsUtil; |
| | | import com.doumee.lib_coremodel.base.BaseModel; |
| | | import com.doumee.lib_coremodel.base.DataViewModel; |
| | | import com.doumee.lib_coremodel.http.rxJava.SimpleObserver; |
| | | import com.doumee.lib_coremodel.http.utils.RxUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class FaceVM extends DataViewModel { |
| | | @ViewModelInject |
| | |
| | | protected void clickByTypeCommand(int type) { |
| | | doAction(type); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param code icå¡ |
| | | * @param type //0ï¼ç®¡çåï¼1ï¼å¸æº |
| | | */ |
| | | public void getMemberIdByCode(String code,String type){ |
| | | GetMemberIdByCodeParam param = new GetMemberIdByCodeParam(code); |
| | | showLoading(true); |
| | | getRetrofitService(Apis.class).getMemberIdByCode(ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<Integer>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<Integer> response) { |
| | | if(200==response.getCode()){ |
| | | //æ¥è¯¢æ°æ® |
| | | if(response.getData()!=null){ |
| | | if("0".equals(type)){ |
| | | MApplication.getLoginBean().setAutoMemberId(response.getData()); |
| | | doAction(); |
| | | }else { |
| | | MApplication.getLoginBean().setAutoMemberId(response.getData()); |
| | | MApplication.getLoginBean().setAuthType(1); |
| | | doAction(); |
| | | } |
| | | } |
| | | }else { |
| | | toast(response.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError(@NonNull Throwable e) { |
| | | toast(e.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void onComplete() { |
| | | hideLoading(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | holder.getBinding().checkBtn.setChecked(false); |
| | | } |
| | | FrescoUtils.displayImageFresco(item.getFaceUrl(),holder.getBinding().circleUser); |
| | | FrescoUtils.displayImageFresco(item.getFaceImg(),holder.getBinding().circleUser); |
| | | holder.getBinding().rlRoot.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.R; |
| | | import com.doumee.keyCabinet.base.MyBaseActivity; |
| | | import com.doumee.keyCabinet.bean.ConfigBean; |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.ui.main.MainActivity; |
| | | import com.doumee.keyCabinet.utils.LanguageUtil; |
| | |
| | | public void handleMessage(@NonNull Message msg) { |
| | | switch (msg.what) { |
| | | case 1: |
| | | if(MApplication.getConfigBean().getShopId()==null){ |
| | | /*if(MApplication.getConfigBean().getShopId()==null){ |
| | | if(isHavePermission){ |
| | | handler.sendEmptyMessageDelayed(2,20000); |
| | | getVM().devLogin(); |
| | | } |
| | | } |
| | | }*/ |
| | | break; |
| | | case 2: |
| | | getVM().resetReq(); |
| | |
| | | |
| | | @Override |
| | | public void initData(@Nullable Bundle savedInstanceState) { |
| | | getVM().getDevLD().observe(this, new Observer<DevConfigBean>() { |
| | | @Override |
| | | public void onChanged(DevConfigBean devConfigBean) { |
| | | if(devConfigBean!=null){ |
| | | ConfigBean configBean = new ConfigBean(); |
| | | configBean.setShopId(devConfigBean.getShopId()); |
| | | configBean.setCapacity(devConfigBean.getCapacity()); |
| | | configBean.setMoney(devConfigBean.getMoney()); |
| | | configBean.setCategory(devConfigBean.getCategory()); |
| | | configBean.setCurNum(devConfigBean.getCurNum()); |
| | | configBean.setName(devConfigBean.getName()); |
| | | configBean.setGymId(devConfigBean.getVenueId()); |
| | | configBean.setLanguage(devConfigBean.getLanguage()); |
| | | String language = devConfigBean.getLanguage(); |
| | | if(!TextUtils.isEmpty(language)){ |
| | | //转å°å |
| | | language = language.toLowerCase(); |
| | | if("zh".equals(language)){ |
| | | MApplication.nLan = 0; |
| | | }else { |
| | | MApplication.nLan = 1; |
| | | } |
| | | } |
| | | SpUtil.saveString("language",language); |
| | | LanguageUtil.changeAppLanguage(GuideActivity.this,language); |
| | | MApplication.saveConfigBean(configBean); |
| | | |
| | | startActivity(MainActivity.class); |
| | | finish(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private boolean isHavePermission = false; |
| | |
| | | import com.doumee.keyCabinet.http.param.DevLoginParam; |
| | | import com.doumee.lib_coremodel.base.BaseModel; |
| | | import com.doumee.lib_coremodel.base.DataViewModel; |
| | | import com.doumee.lib_coremodel.http.rxJava.SimpleObserver; |
| | | import com.doumee.lib_coremodel.http.utils.RxUtils; |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.R; |
| | | import com.doumee.keyCabinet.bean.ConfigBean; |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | |
| | | doAction(1); |
| | | } |
| | | public void devLogin(){ |
| | | if (true) { |
| | | return; |
| | | } |
| | | if(isReq){ |
| | | return; |
| | | } |
| | | isReq = true; |
| | | //æ¸
é¤ç»å½ä¿¡æ¯ |
| | | MApplication.setCookie(""); |
| | | MApplication.saveConfigBean(new ConfigBean()); |
| | | RequestBaseObject<DevLoginParam> request = new RequestBaseObject<>(); |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | request.setParam(param); |
| | | getRetrofitService(Apis.class).devLogin(0, |
| | | ParamsUtil.encodeRequestBody(request)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<Response<BaseResponse<DevConfigBean>>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull Response<BaseResponse<DevConfigBean>> base) { |
| | | Headers headers = base.headers();//æä»¬éè¿Responseçheaders对象è·åå°ååºå¤´ä¿¡æ¯ã |
| | | List<String> values = headers.values("Set-Cookie");//éè¿âSet-Cookieâåæ®µè·åå°æå¡å¨è¿åçCookieä¿¡æ¯ |
| | | if(values!=null&&values.size()>0){ |
| | | MApplication.setCookie(values.get(0)); |
| | | } |
| | | BaseResponse<DevConfigBean> response = base.body(); |
| | | if(response==null){ |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_1)); |
| | | doAction(1); |
| | | return; |
| | | } |
| | | if("000000".equals(response.getErrorCode())){ |
| | | if(response.getRecord()!=null){ |
| | | if("0".equals(response.getRecord().getStatus())){ |
| | | jyVisibility.set(View.VISIBLE); |
| | | doAction(1); |
| | | return; |
| | | }else { |
| | | jyVisibility.set(View.GONE); |
| | | } |
| | | devLD.setValue(response.getRecord()); |
| | | }else { |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_1)); |
| | | doAction(1); |
| | | } |
| | | }else if("33010101".equals(response.getErrorCode())) { |
| | | doAction(1); |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_2)+ |
| | | MApplication.mContext.getString(R.string.symbol_colon)+param.getDevCode()); |
| | | }else { |
| | | toast(response.getErrorMsg()); |
| | | doAction(1); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError(@NonNull Throwable e) { |
| | | toast(e.getMessage()); |
| | | doAction(1); |
| | | } |
| | | |
| | | @Override |
| | | public void onComplete() { |
| | | isReq = false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public MutableLiveData<DevConfigBean> getDevLD() { |
| | |
| | | package com.doumee.keyCabinet.ui.keyCabinet; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.appcompat.app.AppCompatActivity; |
| | | import androidx.lifecycle.Observer; |
| | | |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.text.SpannableString; |
| | | import android.text.Spanned; |
| | | import android.text.style.TextAppearanceSpan; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.R; |
| | | import com.doumee.keyCabinet.base.MyBaseActivity; |
| | | import com.doumee.keyCabinet.bean.KeyCabinetBean; |
| | | import com.doumee.keyCabinet.databinding.KeyCabinetActivityBinding; |
| | | import com.doumee.keyCabinet.event.KeyDoorEvent; |
| | | import com.doumee.keyCabinet.event.KeyResultEvent; |
| | | import com.doumee.keyCabinet.event.KeyStatusListener; |
| | | import com.doumee.keyCabinet.event.OpenGridEvent; |
| | | import com.doumee.keyCabinet.ui.face.adapter.ErrRcvAdapter; |
| | | import com.doumee.keyCabinet.ui.keyCabinet.adapter.CabinetRcvAdapter; |
| | | import com.doumee.lib_coremodel.base.BaseActivity; |
| | | import com.doumee.lib_coremodel.bean.event.ActionEventData; |
| | | import com.doumee.lib_coremodel.util.RecyclerHelp; |
| | | import com.doumee.lib_coremodel.util.SpUtil; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import dagger.hilt.android.AndroidEntryPoint; |
| | | |
| | | @AndroidEntryPoint |
| | | public class KeyCabinetActivity extends MyBaseActivity<KeyCabinetVM, KeyCabinetActivityBinding> { |
| | | private CabinetRcvAdapter adapter; |
| | | private KeyCabinetBean selectBean; |
| | | //0=å 1=è¿ |
| | | private int flag; |
| | | |
| | | //ç¶æï¼0ï¼å¾
å¼é¨ï¼1ï¼å¾
å
³é¨ |
| | | private int status; |
| | | |
| | | private int ysDownCount = 10; |
| | | private Handler handler = new Handler(){ |
| | | @Override |
| | | public void handleMessage(@NonNull Message msg) { |
| | | switch (msg.what){ |
| | | case 0: |
| | | if (ysDownCount==4) { |
| | | //é¢åé¥ååè®¡æ¶ |
| | | doRegister(7,null); |
| | | ysDownCount--; |
| | | handler.sendEmptyMessageDelayed(0,1000); |
| | | }else if (ysDownCount==0) { |
| | | //é¢åé¥ååè®¡æ¶ |
| | | doRegister(MApplication.nextBoolean()?5:6,null); |
| | | }else { |
| | | ysDownCount--; |
| | | handler.sendEmptyMessageDelayed(0,1000); |
| | | } |
| | | break; |
| | | case 1: |
| | | |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | @Override |
| | | public int getLayoutId() { |
| | |
| | | |
| | | @Override |
| | | public void initView(@Nullable Bundle savedInstanceState) { |
| | | isAddCountTimer = false; |
| | | normalConfig(); |
| | | getDB().setModel(getVM()); |
| | | |
| | | flag = MApplication.getLoginBean().getFlag(); |
| | | adapter = new CabinetRcvAdapter(this, R.layout.cabinet_rcv_item, new CabinetRcvAdapter.OnItemClick() { |
| | | @Override |
| | | public void onItemClick(KeyCabinetBean item) { |
| | | |
| | | selectBean = item; |
| | | } |
| | | }); |
| | | RecyclerHelp.bindVG(this,getDB().rcvKm,3,30); |
| | |
| | | |
| | | @Override |
| | | public void initData(@Nullable Bundle savedInstanceState) { |
| | | getVM().getDatasLD().observe(this, new Observer<List<KeyCabinetBean>>() { |
| | | @Override |
| | | public void onChanged(List<KeyCabinetBean> beans) { |
| | | if(beans.size()>0){ |
| | | beans.get(0).getIsSelected().set(true); |
| | | beans.get(0).getText1Color().set(0xffffffff); |
| | | beans.get(0).getText2Color().set(0xffffffff); |
| | | selectBean = beans.get(0); |
| | | changeBtBg(); |
| | | adapter.refreshData(beans); |
| | | getVM().emptyVisibility.set(View.GONE); |
| | | }else { |
| | | getVM().emptyVisibility.set(View.VISIBLE); |
| | | } |
| | | } |
| | | }); |
| | | getVM().getDatas(); |
| | | } |
| | | |
| | | @Override |
| | | protected void timeChange(String djs) { |
| | | getDB().tvDjs.setText(djs); |
| | | } |
| | | |
| | | @Override |
| | | protected void doRegister(int type, ActionEventData data) { |
| | | switch (type){ |
| | | case 1: |
| | | if(selectBean==null){ |
| | | Toast.makeText(mContext, "è¯·éæ©æé¨", Toast.LENGTH_SHORT).show(); |
| | | return; |
| | | } |
| | | //å¼å¯æé¨ |
| | | getVM().openGridDriver(selectBean); |
| | | EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(),selectBean.getBoardCode())); |
| | | break; |
| | | case 2: |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | if(status==0) { |
| | | //éæ°å¼é¨ |
| | | EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode())); |
| | | } |
| | | break; |
| | | case 3: |
| | | //å¼å¯å¤±è´¥ |
| | | getDB().btTip.setText("éæ°å¼é¨"); |
| | | getDB().imgJg1.setImageResource(R.mipmap.ic_jjfail); |
| | | getDB().tvJg1.setText("å¼é¨å¤±è´¥ï¼è¯·è系管çå"); |
| | | getDB().tvJg2.setText(getErrPhoneText(),TextView.BufferType.SPANNABLE); |
| | | getDB().btTip.setVisibility(View.VISIBLE); |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 4: |
| | | //å¼å¯æå |
| | | status=1; |
| | | if("0".equals(flag)) { |
| | | getDB().imgTip2.setImageResource(R.mipmap.ic_notclose_key); |
| | | getDB().tvTip22.setText("请é¢åé¥ååå
³éæé¨"); |
| | | }else { |
| | | getDB().imgTip2.setImageResource(R.mipmap.ic_notclose); |
| | | getDB().tvTip22.setText("请å½è¿é¥ååå
³éæé¨"); |
| | | } |
| | | getDB().tvTip21.setText(getTipText(selectBean.getCabinetName(),"æé¨æå¼æå"), TextView.BufferType.SPANNABLE); |
| | | getDB().clTip2.setVisibility(View.VISIBLE); |
| | | EventBus.getDefault().post(new KeyStatusListener(0)); |
| | | ysDownCount = 8; |
| | | handler.sendEmptyMessageDelayed(0,1000); |
| | | break; |
| | | case 7: |
| | | //æéå
³æé¨ |
| | | getDB().imgTip2.setImageResource(R.mipmap.ic_notclose); |
| | | getDB().tvTip22.setText("请å
³éæé¨"); |
| | | getDB().tvTip21.setText(getTipText(selectBean.getCabinetName(),"æé¨æªå
³é"), TextView.BufferType.SPANNABLE); |
| | | getDB().clTip2.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 5: |
| | | //å
³é¨-é¥åé¢åæå |
| | | status = 0; |
| | | getDB().clTip2.setVisibility(View.GONE); |
| | | getDB().imgJg1.setImageResource(R.mipmap.ic_success); |
| | | getDB().tvJg1.setText(getTipText(selectBean.getCarCode(),"é¥åé¢åæå"), TextView.BufferType.SPANNABLE); |
| | | getDB().tvJg2.setText("æé¨å·²å
³é"); |
| | | getDB().btTip.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 6: |
| | | //å
³é¨-é¥åé¢å失败 |
| | | status = 0; |
| | | getDB().btTip.setText("éæ°å¼é¨"); |
| | | getDB().imgJg1.setImageResource(R.mipmap.ic_jjfail); |
| | | getDB().tvJg1.setText(getTipText(selectBean.getCarCode(),"é¥åæªé¢å"), TextView.BufferType.SPANNABLE); |
| | | getDB().tvJg2.setText("æé¨å·²å
³é"); |
| | | getDB().btTip.setVisibility(View.VISIBLE); |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 8: |
| | | //å
³é¨-é¥åå½è¿æå |
| | | status = 0; |
| | | getDB().clTip2.setVisibility(View.GONE); |
| | | getDB().imgJg1.setImageResource(R.mipmap.ic_success); |
| | | getDB().tvJg1.setText(getTipText(selectBean.getCarCode(),"é¥åå½è¿æå"), TextView.BufferType.SPANNABLE); |
| | | getDB().tvJg2.setText("æé¨å·²å
³é"); |
| | | getDB().btTip.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | case 9: |
| | | //å
³é¨-é¥åå½è¿å¤±è´¥ |
| | | status = 0; |
| | | getDB().btTip.setText("éæ°å½è¿"); |
| | | getDB().imgJg1.setImageResource(R.mipmap.ic_jjfail); |
| | | getDB().tvJg1.setText("æªè¯å«å°é¥å"); |
| | | getDB().tvJg2.setText(getErrPhoneText(), TextView.BufferType.SPANNABLE); |
| | | getDB().btTip.setVisibility(View.VISIBLE); |
| | | getDB().clTip1.setVisibility(View.VISIBLE); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private SpannableString getTipText(String name,String msg){ |
| | | String text = name+msg; |
| | | SpannableString styledText = new SpannableString(text); |
| | | styledText.setSpan(new TextAppearanceSpan(this, R.style.style_tip1), 0, name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | styledText.setSpan(new TextAppearanceSpan(this,R.style.style_tip2), name.length()+1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | return styledText; |
| | | } |
| | | |
| | | private SpannableString getErrPhoneText(){ |
| | | String phone = "15899098765"; |
| | | String text = "妿é®é¢è¯·è系管çå"+phone; |
| | | SpannableString styledText = new SpannableString(text); |
| | | styledText.setSpan(new TextAppearanceSpan(this, R.style.style_tip2), 0, text.length()-phone.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | styledText.setSpan(new TextAppearanceSpan(this,R.style.style_tip1), text.length()-phone.length()+1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | return styledText; |
| | | } |
| | | |
| | | private void changeBtBg(){ |
| | | if(selectBean!=null){ |
| | | getDB().tvKm.setBackgroundResource(R.drawable.shape_r25_blue_bg); |
| | | }else { |
| | | getDB().tvKm.setBackgroundResource(R.drawable.shape_mb_bt_faile); |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | | public void KeyDoorEvent(KeyDoorEvent e){ |
| | | if(!isFinishing()){ |
| | | if("0".equals(e.getResult())){ |
| | | //å¼é¨æå |
| | | doRegister(4,null); |
| | | }else { |
| | | //失败 |
| | | doRegister(3,null); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | | public void KeyResultEvent(KeyResultEvent e){ |
| | | if(!isFinishing()){ |
| | | if("0".equals(e.getResult())){ |
| | | //æå |
| | | if("0".equals(flag)){ |
| | | //é¥åæ¿èµ°äº |
| | | //doRegister(5,null); |
| | | }else { |
| | | //é¥åæ¾å
¥äº |
| | | |
| | | } |
| | | }else { |
| | | //失败 |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | protected void onDestroy() { |
| | | super.onDestroy(); |
| | | handler.removeCallbacksAndMessages(null); |
| | | handler = null; |
| | | } |
| | | } |
| | |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.hilt.lifecycle.ViewModelInject; |
| | | import androidx.lifecycle.MutableLiveData; |
| | | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.bean.KeyCabinetBean; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.GetDriverGridParam; |
| | | import com.doumee.keyCabinet.http.param.OpenGridDriverParam; |
| | | import com.doumee.keyCabinet.utils.ParamsUtil; |
| | | import com.doumee.lib_coremodel.base.BaseModel; |
| | | import com.doumee.lib_coremodel.base.DataViewModel; |
| | | import com.doumee.lib_coremodel.http.rxJava.SimpleObserver; |
| | | import com.doumee.lib_coremodel.http.utils.RxUtils; |
| | | |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | public class KeyCabinetVM extends DataViewModel { |
| | | private MutableLiveData<List<KeyCabinetBean>> datasLD = new MutableLiveData<>(); |
| | | |
| | | @ViewModelInject |
| | | public KeyCabinetVM(@NonNull Application application, BaseModel model) { |
| | | super(application, model); |
| | | } |
| | | |
| | | @Override |
| | | protected void clickByTypeCommand(int type) { |
| | | doAction(type); |
| | | } |
| | | |
| | | public void getDatas(){ |
| | | /*List<KeyCabinetBean> list = new ArrayList<>(); |
| | | KeyCabinetBean b1 = new KeyCabinetBean(); |
| | | b1.setCabinetName("A01"); |
| | | b1.setCarCode("èA18829"); |
| | | list.add(b1); |
| | | KeyCabinetBean b2 = new KeyCabinetBean(); |
| | | b2.setCabinetName("A02"); |
| | | b2.setCarCode("èA18820"); |
| | | list.add(b2); |
| | | datasLD.setValue(list);*/ |
| | | |
| | | GetDriverGridParam param = new GetDriverGridParam(); |
| | | param.setType(MApplication.getLoginBean().getFlag()); |
| | | param.setCabinetId(MApplication.getConfigBean().getId()); |
| | | param.setMemberId(MApplication.getLoginBean().getMemberId()); |
| | | param.setAutoMemberId(MApplication.getLoginBean().getAutoMemberId()); |
| | | showLoading(true); |
| | | getRetrofitService(Apis.class).getDriverGrid(ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<List<KeyCabinetBean>>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<List<KeyCabinetBean>> response) { |
| | | if(200==response.getCode()){ |
| | | //æ¥è¯¢æ°æ® |
| | | if(response.getData()!=null&&response.getData().size()>0){ |
| | | datasLD.setValue(response.getData()); |
| | | } |
| | | }else { |
| | | toast(response.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError(@NonNull Throwable e) { |
| | | toast(e.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void onComplete() { |
| | | hideLoading(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public void openGridDriver(KeyCabinetBean selectBean){ |
| | | OpenGridDriverParam param = new OpenGridDriverParam(); |
| | | param.setCabinetId(selectBean.getCabinetId()); |
| | | param.setGridId(selectBean.getId()); |
| | | param.setMemberId(MApplication.getLoginBean().getMemberId()); |
| | | param.setAuthType(MApplication.getLoginBean().getAuthType()); |
| | | showLoading(true); |
| | | getRetrofitService(Apis.class).openGridDriver(ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse response) { |
| | | if(200==response.getCode()){ |
| | | //å¼é¨ |
| | | doAction(2); |
| | | }else { |
| | | toast(response.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError(@NonNull Throwable e) { |
| | | toast(e.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void onComplete() { |
| | | hideLoading(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public MutableLiveData<List<KeyCabinetBean>> getDatasLD() { |
| | | return datasLD; |
| | | } |
| | | } |
| | |
| | | public ManageCabinetVM(@NonNull Application application, BaseModel model) { |
| | | super(application, model); |
| | | } |
| | | |
| | | @Override |
| | | protected void clickByTypeCommand(int type) { |
| | | doAction(type); |
| | | } |
| | | } |
| | |
| | | public ManageLoginVM(@NonNull Application application, BaseModel model) { |
| | | super(application, model); |
| | | } |
| | | |
| | | @Override |
| | | protected void clickByTypeCommand(int type) { |
| | | doAction(type); |
| | | } |
| | | } |
| | |
| | | void onItemClick(KeyCabinetBean item); |
| | | } |
| | | private OnItemClick onItemClick; |
| | | private KeyCabinetBean selectBean; |
| | | |
| | | public CabinetRcvAdapter(Context context, int layoutId, OnItemClick onItemClick) { |
| | | super(context, layoutId); |
| | | this.onItemClick = onItemClick; |
| | |
| | | @Override |
| | | public void bindViewDatas(BindingHolder<CabinetRcvItemBinding> holder, KeyCabinetBean item, int position) { |
| | | holder.getBinding().setData(item); |
| | | holder.getBinding().clRoot.setOnLongClickListener(new View.OnLongClickListener() { |
| | | if(selectBean==null&&item.getIsSelected().get()){ |
| | | selectBean = item; |
| | | } |
| | | holder.getBinding().clRoot.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public boolean onLongClick(View v) { |
| | | public void onClick(View v) { |
| | | if(onItemClick!=null){ |
| | | onItemClick.onItemClick(item); |
| | | } |
| | | return true; |
| | | if(selectBean==null){ |
| | | selectBean = item; |
| | | }else { |
| | | selectBean.getIsSelected().set(false); |
| | | selectBean.getText1Color().set(0xff111111); |
| | | selectBean.getText2Color().set(0xff279baa); |
| | | selectBean = item; |
| | | } |
| | | item.getIsSelected().set(true); |
| | | selectBean.getText1Color().set(0xffffffff); |
| | | selectBean.getText2Color().set(0xffffffff); |
| | | } |
| | | }); |
| | | } |
| | |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.text.SpannableString; |
| | | import android.text.Spanned; |
| | | import android.text.TextUtils; |
| | | import android.text.style.TextAppearanceSpan; |
| | | import android.util.DisplayMetrics; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | |
| | | import android.view.ViewGroup; |
| | | import android.widget.PopupWindow; |
| | | import android.widget.RelativeLayout; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import androidx.annotation.NonNull; |
| | |
| | | import com.doumee.keyCabinet.BuildConfig; |
| | | import com.doumee.keyCabinet.base.BannerPicResponsePara; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.bean.LoginBean; |
| | | import com.doumee.keyCabinet.databinding.MainActivityBinding; |
| | | import com.doumee.keyCabinet.event.GetFacesEvent; |
| | | import com.doumee.keyCabinet.event.HeartEvent; |
| | | import com.doumee.keyCabinet.event.KeyDoorEvent; |
| | | import com.doumee.keyCabinet.event.KeyResultEvent; |
| | | import com.doumee.keyCabinet.event.KeyStatusListener; |
| | | import com.doumee.keyCabinet.event.OpenGridEvent; |
| | | import com.doumee.keyCabinet.event.ReLoginEvent; |
| | | import com.doumee.keyCabinet.event.TimeClockEvent; |
| | | import com.doumee.keyCabinet.ui.face.ActivationActivity; |
| | | import com.doumee.keyCabinet.ui.face.FaceActivity; |
| | | import com.doumee.keyCabinet.ui.guide.GuideActivity; |
| | | import com.doumee.keyCabinet.ui.keyCabinet.ChangeUrlActivity; |
| | | import com.doumee.keyCabinet.ui.keyCabinet.KeyCabinetActivity; |
| | | import com.doumee.keyCabinet.ui.keyCabinet.ManageLoginActivity; |
| | | import com.doumee.keyCabinet.ui.service.FaceUpdateService; |
| | | import com.doumee.keyCabinet.ui.service.HeartbeatService; |
| | |
| | | import com.example.datalibrary.view.PreviewTexture; |
| | | import com.yanzhenjie.permission.runtime.Permission; |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.greenrobot.eventbus.Logger; |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.Timer; |
| | | import java.util.TimerTask; |
| | | import java.util.concurrent.Executors; |
| | |
| | | if(!isFinishing()){ |
| | | switch (msg.what) { |
| | | case 0: |
| | | initM(); |
| | | //initM(); |
| | | TimeUtils.updateTimeUi(getVM().dayObs, getVM().timeObs); |
| | | handler.sendEmptyMessageDelayed(0, 1000); |
| | | EventBus.getDefault().post(new TimeClockEvent()); |
| | | if (isDBLoad && isNeedUpdateFace && !isUpdatingFace) { |
| | | /*if (isDBLoad && isNeedUpdateFace && !isUpdatingFace) { |
| | | isNeedUpdateFace = false; |
| | | getVM().getFaceLD(); |
| | | } |
| | | getVM().upBraceletLog(); |
| | | getVM().upBraceletLog();*/ |
| | | case 2: |
| | | getVM().resetReq(); |
| | | break; |
| | |
| | | |
| | | @Override |
| | | public void initView(@Nullable Bundle savedInstanceState) { |
| | | //isToGuild = true; |
| | | isAddCountTimer = false; |
| | | SpUtil.initWH(this); |
| | | normalConfig(); |
| | | getDB().setModel(getVM()); |
| | | //initRGBCheck(); |
| | | handler.sendEmptyMessageDelayed(0, 1000); |
| | | //å¯å¨å¿è·³ |
| | | Intent intent = new Intent(MainActivity.this, HeartbeatService.class); |
| | | startService(intent); |
| | | //å¯å¨æ´æ°äººè¸ |
| | | Intent intent2 = new Intent(MainActivity.this, FaceUpdateService.class); |
| | | startService(intent2); |
| | | //getPermission(); |
| | | //getDB().tvName.setText(String.format(getString(R.string.main_name),MApplication.getConfigBean().getName(), LMobileInfo.getDeviceUniqueId())); |
| | | getPermission(); |
| | | Timber.tag("====>").d(LMobileInfo.getDeviceUniqueId()); |
| | | } |
| | | |
| | | private void initM(){ |
| | |
| | | } |
| | | } |
| | | }); |
| | | getDB().tv1.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | //管çåç»å½ |
| | | if(lastDownTime1!=null){ |
| | | if(System.currentTimeMillis()-lastDownTime1>1000){ |
| | | downCount1=0; |
| | | } |
| | | } |
| | | lastDownTime1 = System.currentTimeMillis(); |
| | | downCount1++; |
| | | System.out.println(); |
| | | Timber.tag("==>").d(""+downCount1); |
| | | if(downCount1>4) { |
| | | downCount1=0; |
| | | lastDownTime1=null; |
| | | startActivity(ManageLoginActivity.class); |
| | | } |
| | | } |
| | | }); |
| | | getDB().tvId.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | //æ´æ¹url |
| | | if(lastDownTime2!=null){ |
| | | if(System.currentTimeMillis()-lastDownTime2>1000){ |
| | | downCount2=0; |
| | | } |
| | | } |
| | | lastDownTime2 = System.currentTimeMillis(); |
| | | downCount2++; |
| | | if(downCount2>4) { |
| | | downCount2=0; |
| | | lastDownTime2=null; |
| | | startActivity(ChangeUrlActivity.class); |
| | | } |
| | | } |
| | | }); |
| | | upErrInfo(); |
| | | getVM().devHeart(); |
| | | BraceletLogUtils.saveLog("appæå¼"); |
| | |
| | | @Override |
| | | protected void doRegister(int type, ActionEventData data) { |
| | | switch (type){ |
| | | case 1: |
| | | { |
| | | //管çåç»å½ |
| | | if(lastDownTime1!=null){ |
| | | if(System.currentTimeMillis()-lastDownTime1>1000){ |
| | | downCount1=0; |
| | | } |
| | | } |
| | | lastDownTime1 = System.currentTimeMillis(); |
| | | downCount1++; |
| | | if(downCount1>4) { |
| | | downCount1=0; |
| | | lastDownTime1=null; |
| | | startActivity(ManageLoginActivity.class); |
| | | } |
| | | } |
| | | break; |
| | | case 2: |
| | | case 3: |
| | | Bundle b = new Bundle(); |
| | | b.putString("flag",type==2?"0":"1"); |
| | | startActivity(FaceActivity.class,b); |
| | | /*tipDownCount = 10; |
| | | isShowTip = true; |
| | | getDB().tvDjs.setText(tipDownCount+"s"); |
| | | getDB().tvTip21.setText(getTipText("AC101"), TextView.BufferType.SPANNABLE); |
| | | getDB().clTip.setVisibility(View.VISIBLE);*/ |
| | | //æ ¡éªæ¯å¦ç»å½ |
| | | if(MApplication.getConfigBean().getId()==null){ |
| | | Toast.makeText(mContext, "è®¾å¤æªæ·»å ï¼æ æ³æä½", Toast.LENGTH_SHORT).show(); |
| | | getVM().devLogin(); |
| | | return; |
| | | } |
| | | MApplication.getLoginBean().setFlag(type==2?0:1); |
| | | startActivity(FaceActivity.class); |
| | | //startActivity(KeyCabinetActivity.class,b); |
| | | break; |
| | | case 4: |
| | | { |
| | | //æ´æ¹url |
| | | if(lastDownTime2!=null){ |
| | | if(System.currentTimeMillis()-lastDownTime2>1000){ |
| | | downCount2=0; |
| | | } |
| | | } |
| | | lastDownTime2 = System.currentTimeMillis(); |
| | | downCount2++; |
| | | if(downCount2>4) { |
| | | downCount2=0; |
| | | lastDownTime2=null; |
| | | startActivity(ChangeUrlActivity.class); |
| | | } |
| | | } |
| | | isShowTip = false; |
| | | getDB().clTip.setVisibility(View.GONE); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | protected void onResume() { |
| | | super.onResume(); |
| | | showTime = System.currentTimeMillis(); |
| | | MApplication.saveMemberBean(new MemberBean()); |
| | | MApplication.setLoginBean(new LoginBean()); |
| | | if(!isFaceOk) { |
| | | //initLicense(); |
| | | } |
| | |
| | | //ç»æ |
| | | isUpdatingFace = false; |
| | | //System.out.println("==UpdatingFace==>æ´æ°ç»æï¼"); |
| | | FaceUserBean bean = selectBeans.get(selectBeans.size()-1); |
| | | if(!TextUtils.isEmpty(bean.getEditTime())){ |
| | | Date date = StringUtil.StrToDate(bean.getEditTime()); |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.setTime(date); |
| | | cal.add(Calendar.SECOND,1); |
| | | SpUtil.saveString("LastTime",StringUtil.DateToStr(cal.getTime())); |
| | | } |
| | | // æ¸
é¤å
åç¼å |
| | | Glide.get(MainActivity.this).clearMemory(); |
| | | } |
| | |
| | | private int repeatCount = 0; |
| | | private void updateFace(FaceUserBean bean){ |
| | | Timber.d("==UpdatingFace==>宿æ°é "+finishCount); |
| | | if (TextUtils.isEmpty(bean.getFaceUrl())||bean.getFaceUrl().endsWith("null")) { |
| | | if (TextUtils.isEmpty(bean.getFaceImg())||bean.getFaceImg().endsWith("null")) { |
| | | finishCount++; |
| | | faceHandler.sendEmptyMessage(0); |
| | | return; |
| | |
| | | //System.out.println("==UpdatingFace==>å¼å§ï¼" + bean.getName()); |
| | | Glide.with(this) |
| | | .asBitmap() |
| | | .load(bean.getFaceUrl()) |
| | | .load(bean.getFaceImg()) |
| | | .addListener(new RequestListener<Bitmap>() { |
| | | @Override |
| | | public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Bitmap> target, boolean isFirstResource) { |
| | |
| | | if (ret == 128) { |
| | | Timber.d("==UpdatingFace==>å¾çç¹å¾æ½åæå: %s", JSON.toJSONString(bean)); |
| | | User user = new User(); |
| | | user.setUserId(bean.getId()); |
| | | user.setGroupId(bean.getType()); |
| | | user.setUserName(bean.getName()); |
| | | user.setImageName(bean.getFaceUrl()); |
| | | user.setUserId(bean.getMemberId()); |
| | | user.setGroupId(bean.getGroupId()); |
| | | user.setUserName(bean.getMemberName()); |
| | | user.setImageName(bean.getFaceImg()); |
| | | user.setUserInfo(GsonTools.changeGsonToJson(bean)); |
| | | user.setFeature(secondFeature); |
| | | insertOrUpdate(user); |
| | |
| | | } |
| | | } |
| | | |
| | | private int tipDownCount = 10; |
| | | private boolean isShowTip; |
| | | @Subscribe |
| | | public void TimeClockEvent(TimeClockEvent e){ |
| | | |
| | | if(isShowTip){ |
| | | if(tipDownCount==0){ |
| | | isShowTip = false; |
| | | getDB().clTip.setVisibility(View.GONE); |
| | | }else { |
| | | tipDownCount--; |
| | | getDB().tvDjs.setText(tipDownCount+"s"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * çå¬å¼é¨ |
| | | * @param e |
| | | */ |
| | | @Subscribe |
| | | public void OpenGridEvent(OpenGridEvent e){ |
| | | if(!isFinishing()){ |
| | | EventBus.getDefault().post(new KeyDoorEvent(MApplication.nextBoolean()?"0":"1")); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * çå¬é¥å |
| | | * @param e |
| | | */ |
| | | @Subscribe |
| | | public void KeyStatusListener(KeyStatusListener e){ |
| | | if(!isFinishing()){ |
| | | if(e.getStatus()==0){ |
| | | //å¼å§ |
| | | Random random = new Random(); |
| | | EventBus.getDefault().post(new KeyResultEvent(random.nextBoolean()?"0":"1")); |
| | | }else { |
| | | //ç»æ |
| | | } |
| | | } |
| | | } |
| | | |
| | | private SpannableString getTipText(String name){ |
| | | String text = name+"æé¨æªå
³é"; |
| | | SpannableString styledText = new SpannableString(text); |
| | | styledText.setSpan(new TextAppearanceSpan(this, R.style.style_tip1), |
| | | 0, name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | styledText.setSpan(new TextAppearanceSpan(this,R.style.style_tip2), name.length()+1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | return styledText; |
| | | } |
| | | |
| | | @Override |
| | | protected void onRestart() { |
| | |
| | | getVM().devHeart(); |
| | | } |
| | | |
| | | |
| | | @Subscribe |
| | | public void HeartEvent(HeartEvent e){ |
| | | if(!isFinishing()){ |
| | | getVM().devHeart(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.R; |
| | | import com.doumee.keyCabinet.bean.ConfigBean; |
| | | import com.doumee.keyCabinet.bean.CabinetFaceBean; |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.bean.FaceUserBean; |
| | | import com.doumee.keyCabinet.bean.RecyclerBraceletBean; |
| | | import com.doumee.keyCabinet.event.DevConfigEvent; |
| | | import com.doumee.keyCabinet.event.ReLoginEvent; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.DevErrInfoParam; |
| | | import com.doumee.keyCabinet.http.param.DevLoginParam; |
| | | import com.doumee.keyCabinet.http.param.FaceUserParam; |
| | | import com.doumee.keyCabinet.http.param.RecyclerSHParam; |
| | | import com.doumee.keyCabinet.http.param.RequestBaseObject; |
| | | import com.doumee.keyCabinet.ui.guide.GuideActivity; |
| | | import com.doumee.keyCabinet.utils.BraceletLogUtils; |
| | |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import okhttp3.Headers; |
| | |
| | | } |
| | | |
| | | public void devLogin(){ |
| | | if (true) { |
| | | return; |
| | | } |
| | | //æ¸
é¤ç»å½ä¿¡æ¯ |
| | | if(isReq){ |
| | | return; |
| | | } |
| | | isReq = true; |
| | | MApplication.setCookie(""); |
| | | MApplication.saveConfigBean(new ConfigBean()); |
| | | RequestBaseObject<DevLoginParam> request = new RequestBaseObject<>(); |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | request.setParam(param); |
| | | getRetrofitService(Apis.class).devLogin(0, |
| | | ParamsUtil.encodeRequestBody(request)) |
| | | MApplication.saveConfigBean(new DevConfigBean()); |
| | | getRetrofitService(Apis.class).getCabinetInfoForDriver(LMobileInfo.getDeviceUniqueId()) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<Response<BaseResponse<DevConfigBean>>>(rxJavaGcManager) { |
| | | .subscribe(new SimpleObserver<BaseResponse<DevConfigBean>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull Response<BaseResponse<DevConfigBean>> base) { |
| | | Headers headers = base.headers();//æä»¬éè¿Responseçheaders对象è·åå°ååºå¤´ä¿¡æ¯ã |
| | | List<String> values = headers.values("Set-Cookie");//éè¿âSet-Cookieâåæ®µè·åå°æå¡å¨è¿åçCookieä¿¡æ¯ |
| | | if(values!=null&&values.size()>0){ |
| | | MApplication.setCookie(values.get(0)); |
| | | } |
| | | BaseResponse<DevConfigBean> response = base.body(); |
| | | if(response==null){ |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_1)); |
| | | } |
| | | if("000000".equals(response.getErrorCode())){ |
| | | if(response.getRecord()!=null){ |
| | | if("0".equals(response.getRecord().getStatus())){ |
| | | startActivity(GuideActivity.class); |
| | | finish(); |
| | | return; |
| | | } |
| | | DevConfigBean devConfigBean = response.getRecord(); |
| | | ConfigBean configBean = new ConfigBean(); |
| | | configBean.setShopId(devConfigBean.getShopId()); |
| | | configBean.setCapacity(devConfigBean.getCapacity()); |
| | | configBean.setMoney(devConfigBean.getMoney()); |
| | | configBean.setCategory(devConfigBean.getCategory()); |
| | | configBean.setCurNum(devConfigBean.getCurNum()); |
| | | configBean.setName(devConfigBean.getName()); |
| | | configBean.setGymId(devConfigBean.getVenueId()); |
| | | configBean.setLanguage(devConfigBean.getLanguage()); |
| | | String language = devConfigBean.getLanguage(); |
| | | if(!TextUtils.isEmpty(language)){ |
| | | //转å°å |
| | | language = language.toLowerCase(); |
| | | if("zh".equals(language)){ |
| | | MApplication.nLan = 0; |
| | | }else { |
| | | MApplication.nLan = 1; |
| | | } |
| | | } |
| | | SpUtil.saveString("language",language); |
| | | LanguageUtil.changeAppLanguage(MApplication.mContext,language); |
| | | MApplication.saveConfigBean(configBean); |
| | | public void onNext(@NonNull BaseResponse<DevConfigBean> response) { |
| | | if(200==response.getCode()){ |
| | | if(response.getData()!=null){ |
| | | MApplication.saveConfigBean(response.getData()); |
| | | }else { |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_1)); |
| | | } |
| | | }else if("33010101".equals(response.getErrorCode())) { |
| | | toast(MApplication.mContext.getString(R.string.guide_toast_2)+ |
| | | MApplication.mContext.getString(R.string.symbol_colon)+param.getDevCode()); |
| | | }else { |
| | | toast(response.getErrorMsg()); |
| | | toast(response.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public void devHeart(){ |
| | | if (true) { |
| | | if (MApplication.getConfigBean().getId()==null) { |
| | | return; |
| | | } |
| | | RequestBaseObject<DevLoginParam> request = new RequestBaseObject<>(); |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | request.setParam(param); |
| | | getRetrofitService(Apis.class).heart(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(),ParamsUtil.encodeRequestBody(request)) |
| | | getRetrofitService(Apis.class).heart(MApplication.getConfigBean().getId()) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<DevConfigBean>>(rxJavaGcManager) { |
| | | .subscribe(new SimpleObserver<BaseResponse>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<DevConfigBean> response) { |
| | | if(response!=null&&"000000".equals(response.getErrorCode())){ |
| | | if(response.getRecord()!=null){ |
| | | EventBus.getDefault().post(new DevConfigEvent(response.getRecord())); |
| | | } |
| | | }else if("00016".equals(response.getErrorCode())||"00068".equals(response.getErrorCode())) { |
| | | EventBus.getDefault().post(new ReLoginEvent()); |
| | | }else { |
| | | public void onNext(@NonNull BaseResponse response) { |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError(@NonNull Throwable e) { |
| | | System.out.println(e.getMessage()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (true) { |
| | | return; |
| | | } |
| | | RequestBaseObject<FaceUserParam> request = new RequestBaseObject<>(); |
| | | FaceUserParam param = new FaceUserParam(); |
| | | param.setLastTime(SpUtil.getString("LastTime")); |
| | | param.setType("0"); |
| | | request.setParam(param); |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setCode(LMobileInfo.getDeviceUniqueId()); |
| | | //showLoading(true); |
| | | getRetrofitService(Apis.class).allFaceList(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(), ParamsUtil.encodeRequestBody(request)) |
| | | getRetrofitService(Apis.class).allFaceList( ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<FaceUserBean>>(rxJavaGcManager) { |
| | | .subscribe(new SimpleObserver<BaseResponse<CabinetFaceBean>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<FaceUserBean> response) { |
| | | if("000000".equals(response.getErrorCode())){ |
| | | public void onNext(@NonNull BaseResponse<CabinetFaceBean> response) { |
| | | if(200==response.getCode()){ |
| | | //æ¥è¯¢æ°æ® |
| | | if(response.getRecordList()!=null&&response.getRecordList().size()>0){ |
| | | faceLD.setValue(response.getRecordList()); |
| | | if(response.getData()!=null){ |
| | | CabinetFaceBean faceBean = response.getData(); |
| | | List<FaceUserBean> datas = new ArrayList<>(); |
| | | if(faceBean!=null&&faceBean.getAutoFaceList()!=null){ |
| | | for(FaceUserBean bean:faceBean.getAutoFaceList()){ |
| | | bean.setGroupId("1"); |
| | | } |
| | | }else if("00016".equals(response.getErrorCode())||"00068".equals(response.getErrorCode())) { |
| | | EventBus.getDefault().post(new ReLoginEvent()); |
| | | datas.addAll(faceBean.getAutoFaceList()); |
| | | } |
| | | if(faceBean!=null&&faceBean.getDriverFaceList()!=null){ |
| | | for(FaceUserBean bean:faceBean.getDriverFaceList()){ |
| | | bean.setGroupId("0"); |
| | | } |
| | | datas.addAll(faceBean.getDriverFaceList()); |
| | | } |
| | | faceLD.setValue(datas); |
| | | } |
| | | }else { |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | param.setErrInfo(bean.getValue()); |
| | | request.setParam(param); |
| | | getRetrofitService(Apis.class).upErrInfo(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(), ParamsUtil.encodeRequestBody(request)) |
| | | getRetrofitService(Apis.class).upErrInfo(ParamsUtil.encodeRequestBody(request)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse response) { |
| | | if("000000".equals(response.getErrorCode())){ |
| | | if(200==response.getCode()){ |
| | | SpUtil.remoreString(bean.getKey()); |
| | | }else if("00016".equals(response.getErrorCode())||"00068".equals(response.getErrorCode())) { |
| | | EventBus.getDefault().post(new ReLoginEvent()); |
| | | }else { |
| | | } |
| | | } |
| | |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | param.setErrInfo(text); |
| | | request.setParam(param); |
| | | getRetrofitService(Apis.class).upErrInfo(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(), ParamsUtil.encodeRequestBody(request)) |
| | | getRetrofitService(Apis.class).upErrInfo(ParamsUtil.encodeRequestBody(request)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse response) { |
| | | if("000000".equals(response.getErrorCode())){ |
| | | if(200==response.getCode()){ |
| | | |
| | | } |
| | | } |
| | |
| | | import com.doumee.keyCabinet.MApplication; |
| | | import com.doumee.keyCabinet.bean.DevConfigBean; |
| | | import com.doumee.keyCabinet.event.DevConfigEvent; |
| | | import com.doumee.keyCabinet.event.HeartEvent; |
| | | import com.doumee.keyCabinet.http.Apis; |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.DevLoginParam; |
| | |
| | | } |
| | | |
| | | private void sendPost() throws JSONException { |
| | | String url = SpUtil.getString("base_url",Apis.HTTP)+Apis.HEAT_HTTP; |
| | | RequestBaseObject<DevLoginParam> request = new RequestBaseObject<>(); |
| | | DevLoginParam param = new DevLoginParam(); |
| | | param.setDevCode(LMobileInfo.getDeviceUniqueId()); |
| | | request.setParam(param); |
| | | Gson gson = new Gson(); |
| | | String post = gson.toJson(request); |
| | | if(MApplication.getConfigBean().getShopId()==null|| |
| | | MApplication.getConfigBean().getGymId()==null){ |
| | | if(countTimer!=null){ |
| | | countTimer.start(); |
| | | } |
| | | return; |
| | | } |
| | | Map<String, String> headMap = new HashMap<>(); |
| | | headMap.put("shopId", MApplication.getConfigBean().getShopId()); |
| | | headMap.put("gymId",MApplication.getConfigBean().getGymId()); |
| | | headMap.put("Cookie",MApplication.getCookie()); |
| | | if(countTimer!=null){ |
| | | countTimer.start(); |
| | | } |
| | | OkHttpClientUtil.asynPost(url, post, headMap, new OkHttpClientUtil.IOkHttpClientCallBack() { |
| | | @Override |
| | | public void onSuccessful(String retBody) { |
| | | LogUtils.d("http==>",retBody); |
| | | Timber.tag("CountTimer==>").d("å¿è·³ onSuccessful"); |
| | | BaseResponse<DevConfigBean> resp = GsonTools.changeGsonToBean(retBody, |
| | | new TypeToken<BaseResponse<DevConfigBean>>() {}.getType()); |
| | | if(resp!=null&&resp.getRecord()!=null){ |
| | | EventBus.getDefault().post(new DevConfigEvent(resp.getRecord())); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onError() { |
| | | Timber.tag("CountTimer==>").d("å¿è·³ æ¥é"); |
| | | } |
| | | }); |
| | | EventBus.getDefault().post(new HeartEvent()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); |
| | | public static RequestBody encodeRequestBody(RequestBaseObject request){ |
| | | public static RequestBody encodeRequestBody(Object request){ |
| | | RequestBody body = RequestBody.create(JSON, ParamsUtil.encodeAndZip(request)); |
| | | return body; |
| | | } |
| | | |
| | | public static String encodeAndZip(RequestBaseObject paramsMap) { |
| | | public static String encodeAndZip(Object paramsMap) { |
| | | Gson gson = new Gson(); |
| | | String json = gson.toJson(paramsMap); |
| | | return json; |
| | |
| | | import com.doumee.keyCabinet.http.param.BaseResponse; |
| | | import com.doumee.keyCabinet.http.param.DevAppVersionParam; |
| | | import com.doumee.keyCabinet.http.param.RequestBaseObject; |
| | | import com.doumee.keyCabinet.utils.ParamsUtil; |
| | | |
| | | public class UpdateUtil { |
| | | public static String newVerName = ""; |
| | |
| | | } |
| | | |
| | | private void getUpgradeInfo() { |
| | | if (true) { |
| | | return; |
| | | } |
| | | RequestBaseObject<DevAppVersionParam> request = new RequestBaseObject<>(); |
| | | DevAppVersionParam param = new DevAppVersionParam(); |
| | | param.setVersionCode(BuildConfig.VERSION_CODE); |
| | | param.setType("2"); |
| | | request.setParam(param); |
| | | activity.getVM().getRetrofitService(Apis.class).getVersion(MApplication.getConfigBean().getLanguage(),MApplication.getCookie(),MApplication.getConfigBean().getShopId(), |
| | | MApplication.getConfigBean().getGymId(), ParamsUtil.encodeRequestBody(request)) |
| | | activity.getVM().getRetrofitService(Apis.class).getVersion() |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<AndroidVersionBean>>(activity.getVM().rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<AndroidVersionBean> response) { |
| | | if ("000000".equals(response.getErrorCode())) { |
| | | if (response.getRecord()!=null) { |
| | | if (200==response.getCode()) { |
| | | if (response.getData()!=null) { |
| | | AndroidVersionBean data = response.getData(); |
| | | if(data!=null&&data.getVersionNum()!=null&&data.getVersionNum()>BuildConfig.VERSION_CODE){ |
| | | versionCallBack.isNeedUpdate(true); |
| | | AndroidVersionBean data = response.getRecord(); |
| | | upgradeurl=data.getUpdateUrl(); |
| | | updatelog=data.getUpdateContent(); |
| | | newVerName = response.getRecord().getVersionName(); |
| | | upgradeurl=data.getFullFileUrl(); |
| | | updatelog=data.getContent(); |
| | | newVerName = response.getData().getVersionInfo(); |
| | | doNewVersionUpdate(true); |
| | | return; |
| | | }else { |
| | | versionCallBack.isNeedUpdate(false); |
| | | } |
| | | }else { |
| | | versionCallBack.isNeedUpdate(false); |
| | | } |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="9dp" |
| | | android:background="@drawable/shape_r6_cabinet_unsel_bg"> |
| | | android:background="@{data.isSelected?@drawable/shape_r6_cabinet_sel_bg:@drawable/shape_r6_cabinet_unsel_bg}"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="A02" |
| | | android:textColor="#ff111111" |
| | | android:text="@{data.cabinetName}" |
| | | android:textColor="@{data.text1Color}" |
| | | android:textSize="24sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | |
| | | android:id="@+id/tv2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="èA18812" |
| | | android:textColor="#ff279baa" |
| | | android:text="@{data.carCode}" |
| | | android:textColor="@{data.text2Color}" |
| | | android:textSize="24sp" |
| | | app:layout_constraintTop_toBottomOf="@+id/tv1" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_remind" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@+id/tv_tip" |
| | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_sk" |
| | | android:id="@+id/bt_sk" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="75dp" |
| | | android:layout_marginLeft="30dp" |
| | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_sj_sk" |
| | | android:layout_width="match_parent" |
| | |
| | | </LinearLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_tip1" |
| | | android:layout_width="match_parent" |
| | |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="36dp" |
| | | android:background="@color/white" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | |
| | | android:layout_toRightOf="@id/circle_user" |
| | | android:layout_marginLeft="15dp" |
| | | android:textSize="18sp" |
| | | android:text="@{data.name}" |
| | | android:text="@{data.memberName}" |
| | | android:textColor="@color/white" |
| | | /> |
| | | |
| | |
| | | android:layout_toRightOf="@id/circle_user" |
| | | android:layout_marginLeft="15dp" |
| | | android:textSize="14sp" |
| | | android:text='@{"0".equals(data.type)?@string/face_hy:@string/face_xy}' |
| | | android:text='@{"1".equals(data.groupId)?@string/face_hy:@string/face_xy}' |
| | | android:textColor="@color/white" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_below="@+id/text_user_name"/> |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/text_user_ctime" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="@{data.editTime}" |
| | | android:textColor="@color/white" |
| | | android:visibility="visible" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_alignBottom="@+id/circle_user" |
| | | android:layout_marginRight="12dp"/> |
| | | </RelativeLayout> |
| | | |
| | | </RelativeLayout> |
| | |
| | | android:layout_marginRight="30dp"/> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_km" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="36dp" |
| | | android:visibility="visible"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rcv_km" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@+id/tv_km" |
| | | android:layout_marginBottom="30dp" |
| | | android:paddingLeft="30dp" |
| | | android:paddingRight="30dp"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/im_empty" |
| | | android:layout_width="300dp" |
| | | android:layout_height="300dp" |
| | | android:src="@mipmap/default_nodata" |
| | | app:layout_constraintTop_toTopOf="@+id/rcv_km" |
| | | app:layout_constraintBottom_toBottomOf="@+id/rcv_km" |
| | | app:layout_constraintStart_toStartOf="@+id/rcv_km" |
| | | app:layout_constraintEnd_toEndOf="@+id/rcv_km" |
| | | android:visibility="@{model.emptyVisibility}"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_km" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="75dp" |
| | | android:text="å¼é¨" |
| | | android:textColor="@color/white" |
| | | android:textSize="24sp" |
| | | android:textStyle="bold" |
| | | android:gravity="center" |
| | | android:background="@drawable/shape_mb_bt_faile" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:commandType="@{1}" |
| | | app:onClickCommand="@{model.myTypeCommand}" |
| | | android:layout_marginBottom="30dp"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_tip1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="36dp" |
| | | android:visibility="gone"> |
| | | android:visibility="gone" |
| | | android:background="@color/white"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_jg1" |
| | |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/bt_tip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="75dp" |
| | | android:text="éæ°æ£æµ" |
| | |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:commandType="@{5}" |
| | | app:commandType="@{2}" |
| | | app:onClickCommand="@{model.myTypeCommand}" |
| | | android:layout_marginBottom="30dp"/> |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="36dp" |
| | | android:visibility="gone"> |
| | | android:visibility="gone" |
| | | android:background="@color/white"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_tip2" |
| | |
| | | android:layout_marginTop="22dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_km" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="36dp" |
| | | android:visibility="visible"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rcv_km" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@+id/tv_km_1" |
| | | android:layout_marginBottom="30dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_km_1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="75dp" |
| | | android:text="å¼é¨" |
| | | android:textColor="@color/white" |
| | | android:textSize="24sp" |
| | | android:textStyle="bold" |
| | | android:gravity="center" |
| | | android:background="@drawable/shape_r25_blue_bg" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:commandType="@{6}" |
| | | app:onClickCommand="@{model.myTypeCommand}" |
| | | android:layout_marginBottom="30dp"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | |
| | | android:textStyle="bold" |
| | | android:layout_marginLeft="56dp" |
| | | android:layout_marginRight="56dp" |
| | | app:commandType="@{1}" |
| | | app:onClickCommand="@{model.myTypeCommand}"/> |
| | | /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_time" |
| | |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginBottom="22dp" |
| | | app:commandType="@{4}" |
| | | app:onClickCommand="@{model.myTypeCommand}"/> |
| | | /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_version" |
| | |
| | | |
| | | </RelativeLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_tip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:visibility="gone"> |
| | | |
| | | <View |
| | | android:id="@+id/viewBack" |
| | | android:layout_width="0dp" |
| | | android:layout_height="60dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="22dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="@+id/tv_back" |
| | | android:layout_marginRight="-22dp" |
| | | android:background="@drawable/shape_r20_back" |
| | | app:commandType="@{4}" |
| | | app:onClickCommand="@{model.myTypeCommand}"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/im_back" |
| | | android:layout_width="14dp" |
| | | android:layout_height="22dp" |
| | | android:src="@mipmap/ic_back" |
| | | app:layout_constraintTop_toTopOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintStart_toStartOf="@+id/viewBack" |
| | | android:layout_marginLeft="22dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_back" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="è¿å" |
| | | android:textStyle="bold" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="26sp" |
| | | android:layout_marginLeft="6dp" |
| | | app:layout_constraintTop_toTopOf="@+id/viewBack" |
| | | app:layout_constraintBottom_toBottomOf="@+id/viewBack" |
| | | app:layout_constraintLeft_toRightOf="@+id/im_back"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_djs" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="10s" |
| | | android:textColor="#ff279baa" |
| | | android:textSize="24sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="33dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginRight="30dp"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_tip2" |
| | | android:layout_width="300dp" |
| | | android:layout_height="205dp" |
| | | android:src="@mipmap/ic_notclose_key" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/viewBack" |
| | | android:layout_marginTop="67dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_tip2_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="æé¨æªå
³é" |
| | | android:textColor="#ff111111" |
| | | android:textSize="33sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintTop_toBottomOf="@+id/img_tip2" |
| | | android:layout_marginTop="18dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_tip2_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="请å
³éæé¨ååè¿é¥å" |
| | | android:textColor="#ff666666" |
| | | android:textSize="24sp" |
| | | app:layout_constraintTop_toBottomOf="@+id/tv_tip2_1" |
| | | android:layout_marginTop="22dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </layout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:visibility="visible"> |
| | | android:visibility="gone"> |
| | | |
| | | <pl.droidsonroids.gif.GifImageView |
| | | android:id="@+id/img_progress" |
| | |
| | | app:layout_constraintLeft_toRightOf="@+id/layout_not_update" |
| | | app:layout_constraintRight_toRightOf="parent" |
| | | android:layout_marginLeft="15dp" |
| | | app:commandType="@{4}" |
| | | app:onClickCommand="@{model.myTypeCommand}" |
| | | android:layout_marginRight="30dp"/> |
| | | |
| | | |
| | |
| | | <string name="close">å
³é</string> |
| | | <string name="back_home">è¿åé¦é¡µ</string> |
| | | <string name="deleted">å é¤</string> |
| | | <string name="time_djs">%1$ds åè¿åé¦é¡µ</string> |
| | | <string name="time_djs">%1$ds</string> |
| | | <string name="week7">ææå¤©</string> |
| | | <string name="week1">ææä¸</string> |
| | | <string name="week2">ææäº</string> |
| | |
| | | <string name="main_tip4">模åå è½½æåï¼æ¬¢è¿ä½¿ç¨</string> |
| | | <string name="main_tip5">模åå 载失败ï¼è¯·å°è¯éå¯åºç¨</string> |
| | | <string name="face_hy">ä¼å</string> |
| | | <string name="face_xy">å¦å</string> |
| | | <string name="face_xy">管çå</string> |
| | | <string name="guide_2">è®¾å¤æªç»å½</string> |
| | | <string name="face_login">人è¸è¯å«ä¸</string> |
| | | <string name="face_tip1">请æ£è§åæ¹ï¼ä¸è¦é®æ¡è¸é¨</string> |
| | |
| | | <item name="android:background">@android:color/transparent</item> |
| | | <item name="android:windowBackground">@android:color/transparent</item> |
| | | </style> |
| | | <style name="style_tip1"> |
| | | <item name="android:textColor">#FF279BAA</item> |
| | | </style> |
| | | <style name="style_tip2"> |
| | | <item name="android:textColor">#FF111111</item> |
| | | </style> |
| | | </resources> |