Parcourir la source

3月2日提交代码-liubolan

Liu.bolan il y a 4 ans
Parent
commit
f39f232a77
43 fichiers modifiés avec 1097 ajouts et 331 suppressions
  1. 1 0
      app/build.gradle
  2. 1 0
      app/src/main/AndroidManifest.xml
  3. 26 0
      app/src/main/java/mtp/polymer/com/CheckPassword.java
  4. 10 1
      app/src/main/java/mtp/polymer/com/EntryActivity_BAK.java
  5. 19 6
      app/src/main/java/mtp/polymer/com/PickerView/view/OptionsPickerView.java
  6. 3 0
      app/src/main/java/mtp/polymer/com/PolApplication.java
  7. 96 0
      app/src/main/java/mtp/polymer/com/PrivacyPolicyActivity.kt
  8. 3 1
      app/src/main/java/mtp/polymer/com/StartActivity.java
  9. 3 0
      app/src/main/java/mtp/polymer/com/global/views/MangeNumberEditText2.java
  10. 9 3
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/GoodsFragment.kt
  11. 27 26
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/GoodsViewModel.kt
  12. 14 14
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/CouponNoUseViewHolder.kt
  13. 103 103
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/CouponViewHolder.kt
  14. 1 1
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/FillOrderActivity.kt
  15. 1 1
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsBuyActivity.kt
  16. 5 5
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsBuyViewHolder.kt
  17. 4 3
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsDetailsActivity.kt
  18. 10 4
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsDetailsViewModel.kt
  19. 65 8
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/home/HomeFragment.kt
  20. 67 0
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/home/HomeViewModel.kt
  21. 28 0
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/HnSettingActivity.kt
  22. 73 73
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/coupon/MainCouponUsedViewHolder.kt
  23. 1 1
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/coupon/MainCouponViewHolder.kt
  24. 22 1
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/document/MainParcelsActivity.kt
  25. 6 6
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/document/ParcelDetailsActivity.kt
  26. 4 6
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/idle/MainIdleActivity.kt
  27. 2 2
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/idle/MainIdleBuyViewHolder.kt
  28. 1 1
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/order/MainOrderFinishViewHolder.kt
  29. 40 15
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/order/MainOrderPaymentViewHolder.kt
  30. 11 3
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/message/MessageFragment.kt
  31. 35 3
      app/src/main/java/mtp/polymer/com/information_management/hnstocks/message/MessageViewModel.kt
  32. 166 3
      app/src/main/java/mtp/polymer/com/main/MainActivity.java
  33. 27 5
      app/src/main/java/mtp/polymer/com/main/my/glod/AcessGlodActivity.java
  34. 7 3
      app/src/main/java/mtp/polymer/com/main/my/glod/fragments/AccessCheckFragment.java
  35. 38 10
      app/src/main/java/mtp/polymer/com/main/my/glod/fragments/AccessOutGlodFragment.java
  36. 12 5
      app/src/main/java/mtp/polymer/com/main/my/modifys/ModifyAccount.java
  37. 1 0
      app/src/main/java/mtp/polymer/com/main/my/sign/fragment/SignQueryActivity.java
  38. 16 0
      app/src/main/res/drawable/hn_main_cercle_red_bg.xml
  39. 10 0
      app/src/main/res/layout/entry.xml
  40. 11 2
      app/src/main/res/layout/modify_account.xml
  41. 15 1
      businesslayer/src/main/java/mtp/polymer/com/businesslayer/constant/BaseGlobalData.java
  42. 9 0
      businesslayer/src/main/java/mtp/polymer/com/businesslayer/godatas/AdressUrlData.java
  43. 94 15
      businesslayer/src/main/java/mtp/polymer/com/businesslayer/models/queryCommon/qryPositionBase/HnHomeBannerData.java

+ 1 - 0
app/build.gradle

@@ -186,4 +186,5 @@ dependencies {
     compile 'org.jsoup:jsoup:1.10.1'
     implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
     api 'tech.linjiang:suitlines:1.1.0'
+    implementation 'q.rorbin:badgeview:1.1.3'
 }

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -856,6 +856,7 @@
         <activity android:name=".information_management.hnstocks.goods.goodsdetails.MarketSelectActivity"/>
         <activity android:name=".information_management.hnstocks.goods.goodsdetails.MarketDetailsActivity"/>
         <activity android:name=".information_management.hnstocks.goods.goodsdetails.MarketListActivity"/>
+        <activity android:name=".PrivacyPolicyActivity"/>
         <!--            android:theme="@android:style/Theme.Translucent.NoTitleBar" />-->
 
         <!-- 配置APP ID -->

+ 26 - 0
app/src/main/java/mtp/polymer/com/CheckPassword.java

@@ -0,0 +1,26 @@
+package mtp.polymer.com;
+
+public class CheckPassword {
+    //数字
+    public static final String REG_NUMBER = ".*\\d+.*";
+    //小写字母
+    public static final String REG_UPPERCASE = ".*[A-Z]+.*";
+    //大写字母
+    public static final String REG_LOWERCASE = ".*[a-z]+.*";
+    //特殊符号
+    public static final String REG_SYMBOL = ".*[~!@#$%^&*()_+|<>,.?/:;'\\[\\]{}\"]+.*";
+
+    public static boolean checkPasswordRule(String password) {
+        //密码为空或者长度小于8位则返回false
+        if (password == null || password.length() < 8) return false;
+        int i = 0;
+        if (password.matches(REG_NUMBER)) i++;
+        if (password.matches(REG_LOWERCASE)) i++;
+        if (password.matches(REG_UPPERCASE)) i++;
+        if (password.matches(REG_SYMBOL)) i++;
+
+        if (i < 3) return false;
+
+        return true;
+    }
+}

+ 10 - 1
app/src/main/java/mtp/polymer/com/EntryActivity_BAK.java

@@ -189,6 +189,7 @@ public class EntryActivity_BAK extends MyAppCompatActivity implements View.OnCli
     private boolean loginState = true; //true:实盘  false:模拟盘
     private boolean show = false;
     private int isChangeAccount = 0;
+    private TextView privacy_policy;
 
     private int loginMode = 0;  // 1: 账号密码登录 2:三方登录 3:手机登录
     private boolean isDelState = true;  //是否被注销 true:被注销  false:正常状态
@@ -378,6 +379,7 @@ public class EntryActivity_BAK extends MyAppCompatActivity implements View.OnCli
         phone_login = findViewById(R.id.phone_login);
         version_code = findViewById(R.id.version_code);
         forgot_password = findViewById(R.id.forgot_password);
+        privacy_policy = findViewById(R.id.privacy_policy);
 //        if (Config.SZSTATE) {
 //            forgot_password.setVisibility(View.VISIBLE);
 //        } else {
@@ -434,7 +436,14 @@ public class EntryActivity_BAK extends MyAppCompatActivity implements View.OnCli
 //        } else {
 //            p_load.setBackgroundColor(getResources().getColor(R.color.manager_yellow_bg));
 //        }
-
+        privacy_policy.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Intent intent = new Intent();
+                intent.setClass(EntryActivity_BAK.this,PrivacyPolicyActivity.class);
+                ActivityUtils.startActivity(intent);
+            }
+        });
         setAuthLogin();
     }
 

+ 19 - 6
app/src/main/java/mtp/polymer/com/PickerView/view/OptionsPickerView.java

@@ -26,6 +26,7 @@ public class OptionsPickerView<T> extends BasePickerView implements View.OnClick
 
     private static final String TAG_SUBMIT = "submit";
     private static final String TAG_CANCEL = "cancel";
+    private static final String TAG_ALL = "all";
 
 
     public OptionsPickerView(PickerOptions pickerOptions) {
@@ -53,8 +54,10 @@ public class OptionsPickerView<T> extends BasePickerView implements View.OnClick
 
             btnSubmit.setTag(TAG_SUBMIT);
             btnCancel.setTag(TAG_CANCEL);
+            btnAll.setTag(TAG_ALL);
             btnSubmit.setOnClickListener(this);
             btnCancel.setOnClickListener(this);
+            btnAll.setOnClickListener(this);
 
             //设置文字
             btnSubmit.setText(TextUtils.isEmpty(mPickerOptions.textContentConfirm) ? context.getResources().getString(R.string.pickerview_submit) : mPickerOptions.textContentConfirm);
@@ -175,12 +178,14 @@ public class OptionsPickerView<T> extends BasePickerView implements View.OnClick
     public void onClick(View v) {
         String tag = (String) v.getTag();
         if (tag.equals(TAG_SUBMIT)) {
-            returnData();
+            returnData("1");
         } else if (tag.equals(TAG_CANCEL)) {
             if (mPickerOptions.cancelListener != null) {
                 mPickerOptions.cancelListener.onClick(v);
             }
-        } else {
+        } else if (tag.equals(TAG_ALL)) {
+            returnData("2");
+        }else {
             if (mPickerOptions.allListener != null) {
                 mPickerOptions.allListener.onClick(v);
             }
@@ -189,11 +194,19 @@ public class OptionsPickerView<T> extends BasePickerView implements View.OnClick
     }
 
     //抽离接口回调的方法
-    public void returnData() {
-        if (mPickerOptions.optionsSelectListener != null) {
-            int[] optionsCurrentItems = wheelOptions.getCurrentItems();
-            mPickerOptions.optionsSelectListener.onOptionsSelect(optionsCurrentItems[0], optionsCurrentItems[1], optionsCurrentItems[2], clickView);
+    public void returnData(String type) {
+        if (type.equals("1")){
+            if (mPickerOptions.optionsSelectListener != null) {
+                int[] optionsCurrentItems = wheelOptions.getCurrentItems();
+                mPickerOptions.optionsSelectListener.onOptionsSelect(optionsCurrentItems[0], optionsCurrentItems[1], optionsCurrentItems[2], clickView);
+            }
+        }else if (type.equals("2")){
+            if (mPickerOptions.optionsSelectListener != null) {
+                int[] optionsCurrentItems = wheelOptions.getCurrentItems();
+                mPickerOptions.optionsSelectListener.onOptionsSelect(-1, -1, -1, clickView);
+            }
         }
+
     }
 
 

+ 3 - 0
app/src/main/java/mtp/polymer/com/PolApplication.java

@@ -1629,6 +1629,9 @@ public class PolApplication extends LoadDexApplication {
             case 3430:
                 return getString(R.string.ERR_RECKON_FEEDIVDE_MONEY_RET_ERROR_3430);
 
+            case 29001:
+                return "原密码错误";
+
             case 3431:
                 return getString(R.string.ERR_RECKON_EXPORT_TO_HIS_FAIL_3431);
 

+ 96 - 0
app/src/main/java/mtp/polymer/com/PrivacyPolicyActivity.kt

@@ -0,0 +1,96 @@
+package mtp.polymer.com
+
+import android.os.Bundle
+import mtp.polymer.com.autowidget.*
+import org.jetbrains.anko.*
+
+class PrivacyPolicyActivity : MyAppCompatActivity() {
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.hn_setting_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "隐私政策"
+                }
+            }
+
+            scrollView {
+                verticalLayout {
+                    textView {
+                        textColorInt = R.color.p_global_black_color
+                        textSizeAuto = 31
+                        text = "在此特别提醒您(用户)在注册成为用户之前,请认真阅读本《用户协议》(以下简称“协议”),确保您充分理解本协议中各条款。请您审慎阅读并选择接受或不接受本协议。您的注册、登录、使用等行为将视为对本协议的接受,并同意接受本协议各项条款的约束。本协议约定海南海商报业旅游保科技有限公司(以下简称“旅游保”)与用户之间关于“海商旅游保”软件服务(以下简称“服务“)的权利义务。“用户”是指注册、登录、使用本服务的个人。本协议可由旅游保随时更新,更新后的协议条款一旦公布即代替原来的协议条款,恕不再另行通知,用户可在本APP中查阅最新版协议条款。在修改协议条款后,如果用户不接受修改后的条款,请立即停止使用旅游保提供的服务,用户继续使用服务将被视为接受修改后的协议。\n" +
+                                " \n" +
+                                "一、账号注册\n" +
+                                "1、用户在使用本服务前需要注册一个“旅游保”账号。“旅游保”账号应当使用手机号码绑定注册,请用户使用尚未与“旅游保”账号绑定的手机号码,以及未被服务根据本协议封禁的手机号码注册“旅游保”账号。服务可以根据用户需求或产品需要对账号注册和绑定的方式进行变更,而无须事先通知用户。\n" +
+                                "2、用户注册时应当授权旅游保使用其个人信息方可成功注册“旅游保”账号。故用户完成注册即表明用户同意服务提取、公开及使用用户的信息。\n" +
+                                "3、鉴于“旅游保”账号的绑定注册方式,您同意服务在注册时将允许您的手机号码及手机设备识别码等信息用于注册。\n" +
+                                "4、在用户注册及使用本服务时,旅游保需要搜集能识别用户身份的个人信息以便服务可以在必要时联系用户,或为用户提供更好的使用体验。旅游保搜集的信息包括但不限于用户的姓名、地址;旅游保同意对这些信息的使用将受限于第三条用户个人隐私信息保护的约束。\n" +
+                                " \n" +
+                                "二、用户个人隐私信息保护\n" +
+                                "1、如果旅游保发现或收到他人举报或投诉用户违反本协议约定的,旅游保有权不经通知随时对相关内容,包括但不限于用户资料、发贴记录进行审查、删除,并视情节轻重对违规账号处以包括但不限于警告、账号封禁 、设备封禁 、功能封禁 的处罚,且通知用户处理结果。\n" +
+                                "2、因违反用户协议被封禁的用户,可以自行与旅游保联系。其中,被实施功能封禁的用户会在封禁期届满后自动恢复被封禁功能。被封禁用户可提交申诉,旅游保将对申诉进行审查,并自行合理判断决定是否变更处罚措施。\n" +
+                                "3、用户理解并同意,旅游保有权依合理判断对违反有关法律法规或本协议规定的行为进行处罚,对违法违规的任何用户采取适当的法律行动,并依据法律法规保存有关信息向有关部门报告等,用户应承担由此而产生的一切法律责任。\n" +
+                                "4、用户理解并同意,因用户违反本协议约定,导致或产生的任何第三方主张的任何索赔、要求或损失,包括合理的律师费,用户应当赔偿旅游保与合作公司、关联公司,并使之免受损害。\n" +
+                                " \n" +
+                                "三、用户发布内容规范\n" +
+                                "1、本条所述内容是指用户使用服务的过程中所制作、上载、复制、发布、传播的任何内容,包括但不限于账号头像、名称、用户说明等注册信息及认证资料,或文字、语音、图片、视频、图文等发送、回复或自动回复消息和相关链接页面,以及其他使用账号或本服务所产生的内容。\n" +
+                                "2、用户不得利用“旅游保”账号或本服务制作、上载、复制、发布、传播如下法律、法规和政策禁止的内容:\n" +
+                                "(1) 反对宪法所确定的基本原则的;\n" +
+                                "(2) 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;\n" +
+                                "(3) 损害国家荣誉和利益的;\n" +
+                                "(4) 煽动民族仇恨、民族歧视,破坏民族团结的;\n" +
+                                "(5) 破坏国家宗教政策,宣扬邪教和封建迷信的;\n" +
+                                "(6) 散布谣言,扰乱社会秩序,破坏社会稳定的;\n" +
+                                "(7) 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;\n" +
+                                "(8) 侮辱或者诽谤他人,侵害他人合法权益的;\n" +
+                                "(9) 含有法律、行政法规禁止的其他内容的信息。\n" +
+                                "3、用户不得利用“旅游保”账号或本服务制作、上载、复制、发布、传播如下干扰“服务”正常运营,以及侵犯其他用户或第三方合法权益的内容:\n" +
+                                "(1) 含有任何性或性暗示的;\n" +
+                                "(2) 含有辱骂、恐吓、威胁内容的;\n" +
+                                "(3) 含有骚扰、垃圾广告、恶意信息、诱骗信息的;\n" +
+                                "(4) 涉及他人隐私、个人信息或资料的;\n" +
+                                "(5) 侵害他人名誉权、肖像权、知识产权、商业秘密等合法权利的;\n" +
+                                "(6) 含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益内容的信息。\n" +
+                                " \n" +
+                                "四、使用规则\n" +
+                                "1、用户在本服务中或通过本服务所传送、发布的任何内容并不反映或代表,也不得被视为反映或代表旅游保的观点、立场或政策,旅游保对此不承担任何责任。\n" +
+                                "2、用户不得利用“旅游保”账号或本服务进行如下行为:\n" +
+                                "(1) 提交、发布虚假信息,或盗用他人头像或资料,冒充、利用他人名义的;\n" +
+                                "(2) 强制、诱导其他用户关注、点击链接页面或分享信息的;\n" +
+                                "(3) 虚构事实、隐瞒真相以误导、欺骗他人的;\n" +
+                                "(4) 利用技术手段批量建立虚假账号的;\n" +
+                                "(5) 利用“旅游保”账号或本服务从事任何违法犯罪活动的;\n" +
+                                "(6) 制作、发布与以上行为相关的方法、工具,或对此类方法、工具进行运营或传播,无论这些行为是否为商业目的;\n" +
+                                "(7) 其他违反法律法规规定、侵犯其他用户合法权益、干扰“旅游保”正常运营或服务未明示授权的行为。\n" +
+                                "3、用户须对利用“旅游保”账号或本服务传送信息的真实性、合法性、无害性、准确性、有效性等全权负责,与用户所传播的信息相关的任何法律责任由用户自行承担,与旅游保无关。\n" +
+                                "如因此给旅游保或第三方造成损害的,用户应当依法予以赔偿。\n" +
+                                "4、旅游保提供的服务中可能包括广告,用户同意在使用过程中显示旅游保和第三方供应商、合作伙伴提供的广告。除法律法规明确规定外,用户应自行对依该广告信息进行的交易负责,\n" +
+                                "对用户因依该广告信息进行的交易或前述广告商提供的内容而遭受的损失或损害,旅游保不承担任何责任。\n" +
+                                " \n" +
+                                "五、其他\n" +
+                                "1、旅游保郑重提醒用户注意本协议中免除旅游保责任和限制用户权利的条款,请用户仔细阅读,自主考虑风险。未成年人应在法定监护人的陪同下阅读本协议。\n" +
+                                "2、本协议的效力、解释及纠纷的解决,适用于中华人民共和国法律。若用户和旅游保之间发生任何纠纷或争议,首先应友好协商解决,协商不成的,用户同意将纠纷或争议提交旅游保住所地有管辖权的人民法院管辖。\n" +
+                                "3、本协议的任何条款无论因何种原因无效或不具可执行性,其余条款仍有效,对双方具有约束力。\n" +
+                                "\n" +
+                                "本《协议》版权由旅游保所有,旅游保保留一切对本《协议》解释的权利。"
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(25)
+                        marginStart = autoSize(32)
+                        marginEnd = autoSize(32)
+                        bottomMargin = autoSize(100)
+                    }
+
+                    view {
+
+                    }.lparams(matchParent, autoSize(100))
+                }.lparams(matchParent, matchParent)
+
+            }.lparams(matchParent, matchParent)
+        }
+    }
+
+}

+ 3 - 1
app/src/main/java/mtp/polymer/com/StartActivity.java

@@ -108,7 +108,8 @@ public class StartActivity extends MyAppCompatActivity {
     private void getBaseUrl(){
 
         OkHttpUtils.get()
-                .url("http://gosearch.lvyoubao.net:8280/cfg?key=mtp_20")
+//                .url("http://gosearch.lvyoubao.net:8280/cfg?key=mtp_20")
+                .url("http://192.168.31.171:8080/cfg?key=test_171")
                 .build()
                 .execute(new StringCallback() {
 
@@ -123,6 +124,7 @@ public class StartActivity extends MyAppCompatActivity {
                         Gson gson = new Gson();
                         AdressUrlData rsp = gson.fromJson(response,AdressUrlData.class);
                         SPUtils.getInstance().put("newsUrl",rsp.getData().getNewsUrl());
+                        SPUtils.getInstance().put("hsbyoutmoneytime",rsp.getData().getHsbyBankSignZone());
                         GlobalDataCollention.getInstance().setAdressUrlData(rsp.getData());
                     }
                 });

+ 3 - 0
app/src/main/java/mtp/polymer/com/global/views/MangeNumberEditText2.java

@@ -284,6 +284,9 @@ public class MangeNumberEditText2 extends FrameLayout implements View.OnClickLis
             return;
         }*/
 
+        if (text.isEmpty()){
+            p_number.setText("0");
+        }
         if (Utils.isNumeric(text)) {
             if (text.equals("")) {
                 if (p_number.getHint() != null) {

+ 9 - 3
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/GoodsFragment.kt

@@ -108,7 +108,7 @@ class GoodsFragment : MyFragment(){
 class GoodsUI(private val baseFragment: MyFragment, private val viewModule: GoodsViewModel,select : Int) {
 
     //    private val tabsArray: List<String> by lazy { arrayListOf("热卖商品","新品抢购","特卖商城") }
-    private val tabsArray: List<String> by lazy { arrayListOf("热卖商品","新品抢购","竞价商品") }
+    private val tabsArray: List<String> by lazy { arrayListOf("热卖商品"/*,"新品抢购"*/,"竞价商品") }
 
     fun refrash(){
         viewModule.homeList.value = viewModule.homeList.value
@@ -133,11 +133,11 @@ class GoodsUI(private val baseFragment: MyFragment, private val viewModule: Good
                     return goodsMarketListViewUI.root.apply {
                         container.addView(this, ViewGroup.LayoutParams(matchParent, matchParent))
                     }
-                } else if (position == 1) {
+                } /*else if (position == 1) {
                     return goodsListViewUI.root.apply {
                         container.addView(this, ViewGroup.LayoutParams(matchParent, matchParent))
                     }
-                } else if (position == 2) {
+                }*/ else if (position == 1) {
                     return sellListViewUI.root.apply {
                         container.addView(this, ViewGroup.LayoutParams(matchParent, matchParent))
                     }
@@ -438,6 +438,11 @@ class GoodsSellListViewUI(private val baseFragment: MyFragment, private val view
                 background = resources.getDrawable(R.color.p_global_write_color)
                 onThrottleFirstClick {
                     val pvOptions = OptionsPickerBuilder(context, OnOptionsSelectListener { options1, options2, options3, v ->
+
+                        if (options1 == -1){
+                            viewModule.getHomeList(viewModule.getmarketId("1"))
+                            return@OnOptionsSelectListener
+                        }
                         //返回的分别是三个级别的选中位置
                         opt1tx = if (options1Items.size > 0)
                             options1Items.get(options1).autoId
@@ -460,6 +465,7 @@ class GoodsSellListViewUI(private val baseFragment: MyFragment, private val view
                         val tx = opt1tx + opt2tx
 //                        ToastUtils.showLong(options2Items.get(options1).get(options2))
                         viewModule.getHomeByCityList(viewModule.getmarketId("1"),opt1tx ?: "",opt2tx ?: "")
+
                     })
 
                             .setTitleText("城市选择")

+ 27 - 26
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/GoodsViewModel.kt

@@ -149,32 +149,33 @@ class GoodsViewModel : ViewModel() {
 
 
     fun getPreGoodsList(marketid: String){//获取预售商品列表
-        val touristMarketId = GlobalDataCollention.getInstance().hsbyMarketsDataArrayList.find { it.trademode == "71" }
-        OkHttpUtils.get()
-                .url(AddressConfig.AUTH_GO_URL + "/HSBY/QueryHsbyPreGoodses?")
-                .addParams("marketIDs", touristCheckString(doTourist = {
-                    if(touristMarketId == null) "71201" else touristMarketId.marketid
-                }, unTourist = {
-                    marketid
-                }))
-                .addHeader("Authorization", SPUtils.getInstance().getString("token"))
-                .build()
-                .execute(object : StringCallback() {
-                    override fun onResponse(response: String?, id: Int) {
-                        val gson = Gson()
-                        val allData = gson.fromJson(response, HomeSellResultData::class.java)
-                        if (allData.code == 200) {
-                            loadingDialogStatus.value = TaskUiModel.success()
-                            preList.value = allData.getData()
-                        } else {
-                            loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
-                        }
-                    }
-
-                    override fun onError(call: Call?, e: Exception?, id: Int) {
-                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
-                    }
-                })
+        // 客户需要暂时去掉预售列表
+//        val touristMarketId = GlobalDataCollention.getInstance().hsbyMarketsDataArrayList.find { it.trademode == "71" }
+//        OkHttpUtils.get()
+//                .url(AddressConfig.AUTH_GO_URL + "/HSBY/QueryHsbyPreGoodses?")
+//                .addParams("marketIDs", touristCheckString(doTourist = {
+//                    if(touristMarketId == null) "71201" else touristMarketId.marketid
+//                }, unTourist = {
+//                    marketid
+//                }))
+//                .addHeader("Authorization", SPUtils.getInstance().getString("token"))
+//                .build()
+//                .execute(object : StringCallback() {
+//                    override fun onResponse(response: String?, id: Int) {
+//                        val gson = Gson()
+//                        val allData = gson.fromJson(response, HomeSellResultData::class.java)
+//                        if (allData.code == 200) {
+//                            loadingDialogStatus.value = TaskUiModel.success()
+//                            preList.value = allData.getData()
+//                        } else {
+//                            loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
+//                        }
+//                    }
+//
+//                    override fun onError(call: Call?, e: Exception?, id: Int) {
+//                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
+//                    }
+//                })
     }
 
 

+ 14 - 14
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/CouponNoUseViewHolder.kt

@@ -26,18 +26,18 @@ class CouponNoUseViewHolder(private val activity: MyAppCompatActivity, private v
             onThrottleFirstClick {
 
             }
-            data.bindOptional(context){
-                if (it?.noUseWhyInfoType == "1"){
-                    if (it.couponcategroy == "1"){
-                        backgroundResource = R.mipmap.my_conpos_bg
-                    }else{
-                        backgroundResource = R.mipmap.main_coupons_red
-                    }
-                }else{
-                    backgroundResource = R.mipmap.main_coupons_nouse
-                }
-            }
-
+//            data.bindOptional(context){
+//                if (it?.noUseWhyInfoType == "1"){
+//                    if (it.couponcategroy == "1"){
+//                        backgroundResource = R.mipmap.my_conpos_bg
+//                    }else{
+//                        backgroundResource = R.mipmap.main_coupons_red
+//                    }
+//                }else{
+//                    backgroundResource = R.mipmap.main_coupons_nouse
+//                }
+//            }
+            backgroundResource = R.mipmap.main_coupons_nouse
             verticalLayout {
                 linearLayout {
                     view {  }.lparams(0, autoSize(1),1f)
@@ -46,8 +46,8 @@ class CouponNoUseViewHolder(private val activity: MyAppCompatActivity, private v
                             if (it?.couponcategroy == "1"){//现金券
                                 text = "¥" + it.couponvalue
                             }else if (it?.couponcategroy == "2" || it?.couponcategroy == "3"){//折扣券
-                                val discount = Utils.getDisCount(NumberUtils().cvt(it?.couponvalue?.toDouble()?.times(100)?.toInt().toString(),true))
-                                text = it.couponvalue?.toDouble()?.times(10).toString() + "折"
+                                val discount = Utils.getDisCount(NumberUtils().cvt(it.couponvalue?.toDouble()?.times(100)?.toInt().toString(),true))
+                                text = Utils.doubleDistortion(it.couponvalue?.toDouble()?.times(10).toString()) + "折"
                             }
                         }
                         textColorInt = R.color.p_global_write_color

+ 103 - 103
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/CouponViewHolder.kt

@@ -23,73 +23,73 @@ class CouponViewHolder(private val activity: MyAppCompatActivity, private val vi
 
     @SuppressLint("SetTextI18n")
     override fun _FrameLayout.createContentView() {
-         linearLayout {
-             onThrottleFirstClick {
-
-                 if (viewModel.isSelectCouponId.value == data.value?.couponholdid){
-                     viewModel.isSelectCouponId.postValue("0")
-                     val data = CouponData.Data()
-                     viewModel.optimalCouponsData.postValue(data)
-                 }else{
-                     viewModel.isSelectCouponId.postValue(data.value?.couponholdid)
-                     viewModel.optimalCouponsData.postValue(data.value)
-                 }
-                 viewModel.selectDialog.postValue(viewModel.selectDialog.value?.plus(1))
-                 viewModel.isSelectCoupous.postValue(true)
-             }
-             data.bindOptional(context){
-                 if (it?.couponcategroy == "1"){
-                     backgroundResource = R.mipmap.my_conpos_bg
-                 }else{
-                     backgroundResource = R.mipmap.main_coupons_red
-                 }
-             }
-
-             verticalLayout {
-
-                 linearLayout {
-                     view {  }.lparams(0, autoSize(1),1f)
-                     textView {
-                         data.bindOptional(context){
+        linearLayout {
+            onThrottleFirstClick {
+
+                if (viewModel.isSelectCouponId.value == data.value?.couponholdid){
+                    viewModel.isSelectCouponId.postValue("0")
+                    val data = CouponData.Data()
+                    viewModel.optimalCouponsData.postValue(data)
+                }else{
+                    viewModel.isSelectCouponId.postValue(data.value?.couponholdid)
+                    viewModel.optimalCouponsData.postValue(data.value)
+                }
+                viewModel.selectDialog.postValue(viewModel.selectDialog.value?.plus(1))
+                viewModel.isSelectCoupous.postValue(true)
+            }
+            data.bindOptional(context){
+                if (it?.couponcategroy == "1"){
+                    backgroundResource = R.mipmap.my_conpos_bg
+                }else{
+                    backgroundResource = R.mipmap.main_coupons_red
+                }
+            }
+
+            verticalLayout {
+
+                linearLayout {
+                    view {  }.lparams(0, autoSize(1),1f)
+                    textView {
+                        data.bindOptional(context){
                             if (it?.couponcategroy == "1"){//现金券
                                 text = "¥" + it.couponvalue
                             }else if (it?.couponcategroy == "2" || it?.couponcategroy == "3"){//折扣券
                                 val discount = Utils.getDisCount(NumberUtils().cvt(it?.couponvalue?.toDouble()?.times(100)?.toInt().toString(),true))
-                                text = it.couponvalue?.toDouble()?.times(10).toString() + "折"
+                                text = Utils.doubleDistortion(it.couponvalue?.toDouble()?.times(10).toString()) + "折"
                             }
-                         }
-                         textColorInt = R.color.p_global_write_color
-                         textSizeAuto = 36
-                         typeface = Typeface.defaultFromStyle(Typeface.BOLD)
-                     }.lparams(wrapContent, wrapContent)
-                     view {  }.lparams(0, autoSize(1),1f)
-                 }.lparams(matchParent, wrapContent){
-                     topMargin = autoSize(45)
-                 }
-
-                 linearLayout {
-                     view {  }.lparams(0, autoSize(1),1f)
-                     textView {
-                         data.bindOptional(context){
+                        }
+                        textColorInt = R.color.p_global_write_color
+                        textSizeAuto = 36
+                        typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                    }.lparams(wrapContent, wrapContent)
+                    view {  }.lparams(0, autoSize(1),1f)
+                }.lparams(matchParent, wrapContent){
+                    topMargin = autoSize(45)
+                }
+
+                linearLayout {
+                    view {  }.lparams(0, autoSize(1),1f)
+                    textView {
+                        data.bindOptional(context){
 //                             if (it?.conditionvalue == "0"){
 //                                 text = "无门槛"
 //                             }else{
 //
 //                             }
-                             text = "满" +  it?.conditionvalue  + "可用"
-                         }
-                         textColorInt = R.color.p_global_write_color
-                         textSizeAuto = 28
-                     }.lparams(wrapContent, wrapContent)
-                     view {  }.lparams(0, autoSize(1),1f)
-                 }.lparams(matchParent, wrapContent){
-                     topMargin = autoSize(20)
-                 }
-             }.lparams(0, autoSize(216),1f)
-
-             linearLayout {
-
-                 verticalLayout {
+                            text = "满" +  it?.conditionvalue  + "可用"
+                        }
+                        textColorInt = R.color.p_global_write_color
+                        textSizeAuto = 28
+                    }.lparams(wrapContent, wrapContent)
+                    view {  }.lparams(0, autoSize(1),1f)
+                }.lparams(matchParent, wrapContent){
+                    topMargin = autoSize(20)
+                }
+            }.lparams(0, autoSize(216),1f)
+
+            linearLayout {
+
+                verticalLayout {
                     textView {
                         data.bindOptional(context){
                             text = it?.couponname
@@ -103,52 +103,52 @@ class CouponViewHolder(private val activity: MyAppCompatActivity, private val vi
                         topMargin = 66
                     }
 
-                     textView {
-                         data.bindOptional(context){
-                             text = TimeUtils.covnDate4(it?.startdate) + "-" + TimeUtils.covnDate4(it?.enddate)
-                         }
-                         textColorInt = R.color.p_global_black_color
-                         textSizeAuto = 28
-                         maxLines = 1
-                         ellipsize = TextUtils.TruncateAt.END
-                     }.lparams(wrapContent, wrapContent){
-                         marginStart = autoSize(32)
-                         topMargin = autoSize(10)
-                     }
-
-
-
-                 }.lparams(0, matchParent,3f)
-
-                 imageView {
-                     viewModel.isSelectCouponId.bindOptional(context){
-                         if (it == data.value?.couponholdid){
-                             imageResource = R.mipmap.s_select
-                         }else{
-                             imageResource = R.mipmap.s_unselect
-                         }
-                     }
-                     data.bindOptional(context){
-
-                         if (viewModel.isSelectCouponId.value == it?.couponholdid){
-                             imageResource = R.mipmap.s_select
-                         }else{
-                             imageResource = R.mipmap.s_unselect
-                         }
-                     }
-                 }.lparams(autoSize(48), autoSize(48)){
-                     topMargin = autoSize(80)
-                     marginEnd = autoSize(32)
-                 }
-
-             }.lparams(0, autoSize(216),3f)
-
-
-         }.lparams(matchParent, autoSize(216)){
-             marginStart = autoSize(32)
-             marginEnd = autoSize(32)
-             bottomMargin = autoSize(24)
-         }
+                    textView {
+                        data.bindOptional(context){
+                            text = TimeUtils.covnDate4(it?.startdate) + "-" + TimeUtils.covnDate4(it?.enddate)
+                        }
+                        textColorInt = R.color.p_global_black_color
+                        textSizeAuto = 28
+                        maxLines = 1
+                        ellipsize = TextUtils.TruncateAt.END
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                        topMargin = autoSize(10)
+                    }
+
+
+
+                }.lparams(0, matchParent,3f)
+
+                imageView {
+                    viewModel.isSelectCouponId.bindOptional(context){
+                        if (it == data.value?.couponholdid){
+                            imageResource = R.mipmap.s_select
+                        }else{
+                            imageResource = R.mipmap.s_unselect
+                        }
+                    }
+                    data.bindOptional(context){
+
+                        if (viewModel.isSelectCouponId.value == it?.couponholdid){
+                            imageResource = R.mipmap.s_select
+                        }else{
+                            imageResource = R.mipmap.s_unselect
+                        }
+                    }
+                }.lparams(autoSize(48), autoSize(48)){
+                    topMargin = autoSize(80)
+                    marginEnd = autoSize(32)
+                }
+
+            }.lparams(0, autoSize(216),3f)
+
+
+        }.lparams(matchParent, autoSize(216)){
+            marginStart = autoSize(32)
+            marginEnd = autoSize(32)
+            bottomMargin = autoSize(24)
+        }
     }
 
 }

+ 1 - 1
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/FillOrderActivity.kt

@@ -821,7 +821,7 @@ class FillOrderActivity : MyAppCompatActivity() {
                             setHasIndicator(true)
                             setDefaultNormalColor(Color.parseColor("#000000"))
                             setDefaultSelectedColor(Color.parseColor("#3d8bff"))
-                            setTabTextSize(ConvertUtils.sp2px(16f))
+                            setTabTextSize(autoSize(31))
                         }.lparams(matchParent, autoSize(100)) {
                             topMargin = autoSize(20)
                         }

+ 1 - 1
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsBuyActivity.kt

@@ -59,7 +59,7 @@ class GoodsBuyActivity : MyAppCompatActivity() {
     private lateinit var recyclerView: RecyclerView
     private var isFirst = true
 
-    private val homeItemAdapter: BaseAdapter<GoodsBuyData.Data, GoodsBuyViewHolder> = BaseAdapter { _, _ -> GoodsBuyViewHolder(this, viewModel, "", data.lotsize.toDouble()) }
+    private val homeItemAdapter: BaseAdapter<GoodsBuyData.Data, GoodsBuyViewHolder> = BaseAdapter { _, _ -> GoodsBuyViewHolder(this, viewModel, "", data.lotsize) }
 
     private var ispick = 0//0是挂,1是摘
 

+ 5 - 5
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsBuyViewHolder.kt

@@ -14,7 +14,7 @@ import mtp.polymer.com.lifecycle.bindOptional
 import org.jetbrains.anko.*
 import org.jetbrains.anko.sdk25.coroutines.textChangedListener
 
-class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val viewModel: GoodsDetailsViewModel, private val type : String,private val lotsize : Double) : BaseViewHolder<GoodsBuyData.Data>(activity){
+class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val viewModel: GoodsDetailsViewModel, private val type : String,private val lotsize : String) : BaseViewHolder<GoodsBuyData.Data>(activity){
     override val itemSize : IntArray  = intArrayOf(matchParent, wrapContent)
 
     override fun _FrameLayout.createContentView() {
@@ -83,7 +83,7 @@ class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val
                             if (amountText.text.toString().toInt() == 1) {
                                 ToastUtils.showLong("数量不能小于1")
                             } else {
-                                amountText.setText(amountText.text.toString().toInt().minus(lotsize).toInt().toString())
+                                amountText.setText(amountText.text.toString().toInt().minus(lotsize.toDouble()).toInt().toString())
                                 viewModel.goodsBuySetSelect(data.value?.orderid ?: "", amountText.text.toString(), true, data.value?.orderprice ?: "")
                             }
                         }
@@ -101,7 +101,7 @@ class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val
                     amountText = this
                     gravity = Gravity.CENTER
                     data.bindOptional(context){
-                        setText(it?.enableqty)
+                        setText(lotsize)//梁晨让改的 bug 错误 #93423
                     }
                     textChangedListener {
                         afterTextChanged {
@@ -110,7 +110,7 @@ class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val
                                      setText(data.value?.enableqty)
                                      viewModel.goodsBuySetSelect(data.value?.orderid ?: "", data.value?.enableqty ?: "", true, data.value?.orderprice ?: "")
                                      ToastUtils.showLong("数量超出限制")
-                                 } else{
+                                 } else {
                                      if (viewModel.isFirstIn.value == false){
                                          viewModel.goodsBuySetSelect(data.value?.orderid ?: "", amountText.text.toString(), true, data.value?.orderprice ?: "")
                                      }
@@ -133,7 +133,7 @@ class GoodsBuyViewHolder(private val activity: MyAppCompatActivity, private val
                     onThrottleFirstClick {
                         if (isSelect) {
                             if (amountText.text.toString().toInt() < data.value?.enableqty?.toInt() ?: 0) {
-                                amountText.setText(amountText.text.toString().toInt().plus(lotsize).toInt().toString())
+                                amountText.setText(amountText.text.toString().toInt().plus(lotsize.toDouble()).toInt().toString())
                                 viewModel.goodsBuySetSelect(data.value?.orderid ?: "", amountText.text.toString(), true, data.value?.orderprice ?: "")
                             } else {
                                 ToastUtils.showLong("数量超出限制")

+ 4 - 3
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsDetailsActivity.kt

@@ -132,7 +132,7 @@ class GoodsDetailsActivity : MyAppCompatActivity() {
         loadingDialog?.bindTaskStatus(this, viewModel.loadingDialogStatus)
         frameLayout {
             scrollView {
-                viewModel.getHistoryData(goodsCode = goodsCode, type = "11", context = context)
+
                 verticalLayout {
                     background = resources.getDrawable(R.color.p_global_write_color)
 
@@ -271,7 +271,7 @@ class GoodsDetailsActivity : MyAppCompatActivity() {
                             colors[1] = Color.parseColor("#feffff")
                             setDefaultOneLineColor(*colors)
                             setShowYGrid(true)
-                            setXySize(14f)
+                            setXySize(10f)
                             setHintColor(Color.parseColor("#47b99a"))
                             setXyColor(Color.parseColor("#47b99a"))
 
@@ -360,6 +360,7 @@ class GoodsDetailsActivity : MyAppCompatActivity() {
                                 xAxis.setGranularity(1f)
 //                                val limit = LimitLine(0f, "Lower Limit")
 //                                xAxis.addLimitLine(limit)
+                                xAxis.textSize = 20f
                                 xAxis.setValueFormatter(object : IAxisValueFormatter {
                                     override fun getFormattedValue(p0: Float, p1: AxisBase?): String {
 //
@@ -372,7 +373,7 @@ class GoodsDetailsActivity : MyAppCompatActivity() {
 
                                         val sdf = SimpleDateFormat("MM-dd")//25001000000002
                                         LogUtils.eTag("咳咳咳咳咳咳",p0.toLong().toString() + "===" + sdf.format( Date(Long.parseLong(p0.toLong().toString()))))
-                                        return sdf.format( Date(Long.parseLong(p0.toLong().toString())))
+                                        return sdf.format(Date(Long.parseLong(p0.toLong().toString())))
 //                                        return p0.toLong().toString().substring(2, 4) + "-" + p0.toLong().toString().substring(4, 6)
                                     }
 

+ 10 - 4
app/src/main/java/mtp/polymer/com/information_management/hnstocks/goods/goodsdetails/GoodsDetailsViewModel.kt

@@ -136,6 +136,7 @@ class GoodsDetailsViewModel : ViewModel() {
                             loadingDialogStatus.value = TaskUiModel.success()
                             goodsDetail.value = allData.data
                             getBannerList(allData.data)
+                            getHistoryData(goodsCode = allData.data.goodscode, type = "11")
                         } else {
                             loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
                         }
@@ -349,6 +350,11 @@ class GoodsDetailsViewModel : ViewModel() {
                         }
                     }
                 }
+            }else if (it.holdstatus == "1"){
+                newData.available = "1"
+                newData.noUseWhyInfoType = "1"
+                newData.noUseWhyInfo = "未生效"
+                noUseList.add(newData)
             }
         }
 
@@ -742,7 +748,7 @@ class GoodsDetailsViewModel : ViewModel() {
 
     val historyList: MutableLiveData<List<HistoryData.DataList>> = MutableLiveData()
 
-    fun getHistoryData(goodsCode: String, type: String, context: Context) {
+    fun getHistoryData(goodsCode: String, type: String) {
         OkHttpUtils.get()
                 .url(AddressConfig.AUTH_GO_URL + "/Quote/QueryHistoryDatas")
                 .addParams("cycleType", type)
@@ -757,14 +763,14 @@ class GoodsDetailsViewModel : ViewModel() {
                         if (allData.code == 200) {
                             loadingDialogStatus.value = TaskUiModel.success()
                             historyList.value = allData.data
-                            setList(context, allData.data)
+                            setList(allData.data)
                         } else {
                             loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
                         }
                     }
 
                     override fun onError(call: Call?, e: Exception?, id: Int) {
-//                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
+                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
                     }
                 })
     }
@@ -777,7 +783,7 @@ class GoodsDetailsViewModel : ViewModel() {
 
     val newLineChartValue: MutableLiveData<List<Unit>> = MutableLiveData()
 
-    fun setList(context: Context, dataList: List<HistoryData.DataList>) {
+    fun setList(dataList: List<HistoryData.DataList>) {
         val lines = ArrayList<Unit>()
         val newList = arrayListOf<HistoryData.DataList>()
         newList.addAll(dataList)

+ 65 - 8
app/src/main/java/mtp/polymer/com/information_management/hnstocks/home/HomeFragment.kt

@@ -18,17 +18,19 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.LinearLayout
 import androidx.annotation.RequiresApi
-import com.blankj.utilcode.util.ActivityUtils
-import com.blankj.utilcode.util.LogUtils
-import com.blankj.utilcode.util.SPUtils
+import com.blankj.utilcode.util.*
 import com.qmuiteam.qmui.util.QMUIStatusBarHelper
 import com.youth.banner.BannerConfig
+import com.youth.banner.listener.OnBannerListener
 import mtp.polymer.com.*
 import mtp.polymer.com.autowidget.*
 import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.createWarningDialog
 import mtp.polymer.com.businesslayer.constant.GlobalDataCollention
 import mtp.polymer.com.businesslayer.message.MessageEvent
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HomeSellResultData
+import mtp.polymer.com.information_management.hnstocks.goods.goodsdetails.GoodsDetailsActivity
+import mtp.polymer.com.information_management.hnstocks.goods.goodsdetails.MarketDetailsActivity
 import mtp.polymer.com.information_management.hnstocks.main.FeedbackActivity
 import mtp.polymer.com.information_management.hnstocks.main.HnSettingActivity
 import mtp.polymer.com.information_management.hnstocks.main.MainCollectionActivity
@@ -77,7 +79,7 @@ class HomeFragment : MyFragment() {
         viewModule.getAllEnums()//第一次进app请求下全部枚举类型
         touristorCheck(unTourist = {
             viewModule.getHomeList(viewModule.getmarketId("1"))
-            viewModule.getPreGoodsList(viewModule.getmarketId("2"))
+//            viewModule.getPreGoodsList(viewModule.getmarketId("2"))
             viewModule.getHsbyMarketGoodses(viewModule.getmarketId("3"))
         }, doTourist = {
             viewModule.getHsbyMarkets()
@@ -129,15 +131,40 @@ class HomeUI(private val baseFragment: MyFragment, private val viewModule: HomeV
     private lateinit var titleLinearLayout: LinearLayout
     private lateinit var scrollview: NestedScrollView
 
+    fun showPrivacyPolicyDialog(){
+        baseFragment.createWarningDialog {
+            setTitle("温馨提示")
+            setMessage("请您务必审慎阅读《隐私政策》。如您同意,请点击同意并开始接受我们的服务")
+            addAction("暂不使用") { dialog, _ ->
+                SPUtils.getInstance().put("agreePrivacy",false)
+                AppUtils.exitApp()
+                dialog.dismiss()
+            }
+            addAction("前往阅读") { dialog, _ ->
+                val intent = Intent()
+                intent.setClass(baseContext,PrivacyPolicyActivity::class.java)
+                ActivityUtils.startActivity(intent)
+            }
+            addAction("同意") { dialog, _ ->
+                SPUtils.getInstance().put("agreePrivacy",true)
+                dialog.dismiss()
+            }
+        }.show()
+    }
+
+
     @RequiresApi(Build.VERSION_CODES.M)
     fun createContentView() = baseFragment.UI {
+        if (SPUtils.getInstance().getBoolean("agreePrivacy",false).not()){
+            showPrivacyPolicyDialog()
+        }
         viewModule.setBannerData()
         viewModule.getHsbyMarkets()
         viewModule.getAddresslist()//每次打开第一次进入app都要请求下地址信息
         viewModule.getAllEnums()//第一次进app请求下全部枚举类型
         touristorCheck(unTourist = {
             viewModule.getHomeList(viewModule.getmarketId("1"))
-            viewModule.getPreGoodsList(viewModule.getmarketId("2"))
+//            viewModule.getPreGoodsList(viewModule.getmarketId("2"))
             viewModule.getHsbyMarketGoodses(viewModule.getmarketId("3"))
         }, doTourist = {
             viewModule.getHsbyMarkets()
@@ -243,6 +270,36 @@ class HomeUI(private val baseFragment: MyFragment, private val viewModule: HomeV
                                         }
                                     })
 
+                                    setOnBannerListener(object : OnBannerListener{
+                                        override fun OnBannerClick(position: Int) {
+                                            val data = viewModule.imageBannerList.value?.get(position)
+                                            if (data?.urltype == "1"){//跳webview
+                                                LogUtils.eTag("dahskjdhajkshdjka", GlobalDataCollention.getInstance().adressUrlData.newsUrl)
+                                                val intent = Intent()
+                                                intent.putExtra("isHtml", "0")
+                                                intent.putExtra("url", data.url)
+                                                intent.putExtra("pdfName", "")
+                                                intent.putExtra("title", data.title)
+                                                intent.setClass(context, WebActivity::class.java)
+                                                ActivityUtils.startActivity(intent)
+                                            }else{//跳转详情
+                                                if (data?.trademode == "16"){//跳转2级市场详情
+                                                    val intent = Intent()
+                                                    intent.putExtra("goodsID",data.url)
+                                                    intent.setClass(context, GoodsDetailsActivity::class.java)
+                                                    ActivityUtils.startActivity(intent)
+                                                }else if (data?.trademode == "70"){
+                                                    viewModule.getHsbyMarketBannerGoodses(marketid = viewModule.getmarketId("3"),goodsId = data.url){
+                                                        val intent = Intent()
+                                                        intent.putExtra("orderid",this.orderid)
+                                                        intent.putExtra("goodsID",this.goodsid)
+                                                        intent.setClass(context, MarketDetailsActivity::class.java)
+                                                        ActivityUtils.startActivity(intent)
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    })
                                     setIndicatorGravity(BannerConfig.CENTER)
                                     isAutoPlay(true)
                                     setDelayTime(3000)
@@ -267,7 +324,7 @@ class HomeUI(private val baseFragment: MyFragment, private val viewModule: HomeV
                                 verticalLayout {
                                     onThrottleFirstClick {
                                         val mainActivity = baseFragment.activity as MainActivity
-                                        mainActivity.toMarket(1)
+                                        mainActivity.toMarket(0)
                                     }
                                     gravity = Gravity.CENTER_HORIZONTAL
                                     imageView {
@@ -275,7 +332,7 @@ class HomeUI(private val baseFragment: MyFragment, private val viewModule: HomeV
                                     }.lparams(autoSize(120), autoSize(120))
 
                                     textView {
-                                        text = "新品抢购"
+                                        text = "热卖商品"
                                         textColorInt = R.color.manager_background_bg
                                         textSizeAuto = 30
                                     }.lparams(wrapContent, wrapContent) {
@@ -289,7 +346,7 @@ class HomeUI(private val baseFragment: MyFragment, private val viewModule: HomeV
                                 verticalLayout {
                                     onThrottleFirstClick {
                                         val mainActivity = baseFragment.activity as MainActivity
-                                        mainActivity.toMarket(2)
+                                        mainActivity.toMarket(1)
                                     }
                                     gravity = Gravity.CENTER_HORIZONTAL
                                     imageView {

+ 67 - 0
app/src/main/java/mtp/polymer/com/information_management/hnstocks/home/HomeViewModel.kt

@@ -2,6 +2,7 @@ package mtp.polymer.com.information_management.hnstocks.home
 
 import android.arch.lifecycle.MutableLiveData
 import android.arch.lifecycle.ViewModel
+import android.content.Context
 import com.blankj.utilcode.util.SPUtils
 import com.gongbo.common.common
 import com.google.gson.Gson
@@ -18,6 +19,7 @@ import mtp.polymer.com.businesslayer.httpData.EnumdicitemData
 import mtp.polymer.com.businesslayer.models.login.goodsQueryBase.GoodsInfoData
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.*
 import mtp.polymer.com.businesslayer.resolver.market.MarketReqsManager
+import mtp.polymer.com.information_management.hnstocks.home.data.HomeMarketDetailData
 import mtp.polymer.com.information_management.hnstocks.home.data.UnReadData
 import mtp.polymer.com.tools.touristCheckString
 import mtp.polymer.com.tools.touristorCheck
@@ -253,6 +255,71 @@ class HomeViewModel : ViewModel() {
                 })
     }
 
+    /**
+     * 获取三级市场商品列表用于banner跳转
+     */
+    fun getHsbyMarketBannerGoodses(marketid: String,categoryID: String = "",goodsId : String = "",couponTypeID : String = "",data : (HomeSellResultData.dataList.() -> Unit)) {//获取三级市场商品列表
+        val params  = mutableMapOf<String,String>()
+        val touristMarketId = GlobalDataCollention.getInstance().hsbyMarketsDataArrayList.find { it.trademode == "70" }
+        params.put("marketIDs", touristCheckString(doTourist = {
+            if(touristMarketId == null) "70201" else touristMarketId.marketid
+        }, unTourist = {
+            marketid
+        }))
+
+        var url = "";
+        touristorCheck(doTourist = {
+            url = AddressConfig.AUTH_GO_URL + "/HSBY/QueryHsbyVisitorMarketGoodses?"
+            if (categoryID.isNotEmpty()){
+                params.put("categoryID",categoryID)
+            }
+            if (goodsId.isNotEmpty()){
+                params.put("goodsIDs",goodsId)
+            }
+        }, unTourist = {
+            url = AddressConfig.AUTH_GO_URL + "/HSBY/QueryHsbyMarketGoodses?"
+            params.put("accountID",GlobalDataCollention.getInstance().curr_accountInfoData.accountId.toString())
+            if (categoryID.isNotEmpty()){
+                params.put("categoryID",categoryID)
+            }
+            if (goodsId.isNotEmpty()){
+                params.put("goodsIDs",goodsId)
+            }
+            if (couponTypeID.isNotEmpty()){
+                params.put("couponTypeID",couponTypeID)
+            }
+
+        })
+
+        OkHttpUtils.get()
+                .url(url)
+                .params(params)
+                .addHeader("Authorization", SPUtils.getInstance().getString("token"))
+                .build()
+                .execute(object : StringCallback() {
+                    override fun onResponse(response: String?, id: Int) {
+                        LogUtils.d("dhasfhkajhlka", response)
+                        com.blankj.utilcode.util.LogUtils.eTag("DAKJHFKJAHSDA",params.toString())
+                        val gson = Gson()
+                        val allData = gson.fromJson(response, HomeSellResultData::class.java)
+                        if (allData.code == 200) {
+                            if (allData.data.size != 0){
+                                data.invoke(allData.data.get(0))
+                            }
+                        } else {
+                            loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
+                        }
+                    }
+
+                    override fun onError(call: Call?, e: Exception?, id: Int) {
+                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
+                        LogUtils.d("dhasfhkajhlka", e?.message)
+                    }
+                })
+    }
+
+
+
 
     fun getmarketId(type : String) : String{//获取商品列表时需要传入的marketid
         var marketid = ""

+ 28 - 0
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/HnSettingActivity.kt

@@ -286,6 +286,34 @@ class HnSettingActivity : MyAppCompatActivity() {
 
             linearLayout {
                 onThrottleFirstClick {
+                    //隐私政策
+                    val intentAbout = Intent()
+                    intentAbout.setClass(context, PrivacyPolicyActivity::class.java)
+                    startActivity(intentAbout)
+                }
+                background = resources.getDrawable(R.color.p_global_write_color)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "隐私政策"
+                    textColorInt = R.color.p_global_black_color
+                    textSizeAuto = 38
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = margerding
+                }
+
+                view { }.lparams(0, wrapContent, 1f)
+
+                imageView {
+                    imageResource = R.mipmap.hn_home_more
+                }.lparams(autoSize(25), autoSize(25)) {
+                    marginEnd = margerding
+                }
+            }.lparams(matchParent, autoSize(120)) {
+                topMargin = autoSize(15)
+            }
+
+            linearLayout {
+                onThrottleFirstClick {
                     //关于
                     val intentAbout = Intent()
                     intentAbout.setClass(context, Abouts::class.java)

+ 73 - 73
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/coupon/MainCouponUsedViewHolder.kt

@@ -23,50 +23,50 @@ class MainCouponUsedViewHolder(private val activity: MyAppCompatActivity, privat
 
     @SuppressLint("SetTextI18n")
     override fun _FrameLayout.createContentView() {
-         linearLayout {
-             onThrottleFirstClick {
+        linearLayout {
+            onThrottleFirstClick {
 
-             }
-             backgroundResource = R.mipmap.main_coupons_nouse
-             verticalLayout {
-                 linearLayout {
-                     view {  }.lparams(0, autoSize(1),1f)
-                     textView {
-                         data.bindOptional(context){
-                             if (it?.couponcategroy == "1"){//现金券
-                                 text = "¥" + it.couponvalue
-                             }else if (it?.couponcategroy == "2" || it?.couponcategroy == "3"){//折扣券
-                                 val discount = Utils.getDisCount(NumberUtils().cvt(it?.couponvalue?.toDouble()?.times(100)?.toInt().toString(),true))
-                                 text = it.couponvalue?.toDouble()?.times(10).toString() + "折"
-                             }
-                         }
-                         textColorInt = R.color.p_global_write_color
-                         textSizeAuto = 36
-                         typeface = Typeface.defaultFromStyle(Typeface.BOLD)
-                     }.lparams(wrapContent, wrapContent)
-                     view {  }.lparams(0, autoSize(1),1f)
-                 }.lparams(matchParent, wrapContent){
-                     topMargin = autoSize(45)
-                 }
+            }
+            backgroundResource = R.mipmap.main_coupons_nouse
+            verticalLayout {
+                linearLayout {
+                    view {  }.lparams(0, autoSize(1),1f)
+                    textView {
+                        data.bindOptional(context){
+                            if (it?.couponcategroy == "1"){//现金券
+                                text = "¥" + it.couponvalue
+                            }else if (it?.couponcategroy == "2" || it?.couponcategroy == "3"){//折扣券
+                                val discount = Utils.getDisCount(NumberUtils().cvt(it?.couponvalue?.toDouble()?.times(100)?.toInt().toString(),true))
+                                text = Utils.doubleDistortion(it.couponvalue?.toDouble()?.times(10).toString()) + "折"
+                            }
+                        }
+                        textColorInt = R.color.p_global_write_color
+                        textSizeAuto = 36
+                        typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                    }.lparams(wrapContent, wrapContent)
+                    view {  }.lparams(0, autoSize(1),1f)
+                }.lparams(matchParent, wrapContent){
+                    topMargin = autoSize(45)
+                }
 
-                 linearLayout {
-                     view {  }.lparams(0, autoSize(1),1f)
-                     textView {
-                         data.bindOptional(context){
-                             text = "满" +  it?.conditionvalue  + "可用"
-                         }
-                         textColorInt = R.color.p_global_write_color
-                         textSizeAuto = 28
-                     }.lparams(wrapContent, wrapContent)
-                     view {  }.lparams(0, autoSize(1),1f)
-                 }.lparams(matchParent, wrapContent){
-                     topMargin = autoSize(20)
-                 }
-             }.lparams(0, autoSize(216),1f)
+                linearLayout {
+                    view {  }.lparams(0, autoSize(1),1f)
+                    textView {
+                        data.bindOptional(context){
+                            text = "满" +  it?.conditionvalue  + "可用"
+                        }
+                        textColorInt = R.color.p_global_write_color
+                        textSizeAuto = 28
+                    }.lparams(wrapContent, wrapContent)
+                    view {  }.lparams(0, autoSize(1),1f)
+                }.lparams(matchParent, wrapContent){
+                    topMargin = autoSize(20)
+                }
+            }.lparams(0, autoSize(216),1f)
 
-             linearLayout {
+            linearLayout {
 
-                 verticalLayout {
+                verticalLayout {
                     textView {
                         data.bindOptional(context){
                             text = it?.couponname
@@ -80,29 +80,29 @@ class MainCouponUsedViewHolder(private val activity: MyAppCompatActivity, privat
                         topMargin = 66
                     }
 
-                     textView {
-                         text = "已使用"
+                    textView {
+                        text = "已使用"
 //                         data.bindOptional(context){
 //                             text = TimeUtils.covnDate2(it?.startdate) + "-" + TimeUtils.covnDate2(it?.enddate)
 //                         }
-                         textColorInt = R.color.p_global_black_color
-                         textSizeAuto = 28
-                         maxLines = 1
-                         ellipsize = TextUtils.TruncateAt.END
-                     }.lparams(wrapContent, wrapContent){
-                         marginStart = autoSize(32)
-                         topMargin = autoSize(10)
-                     }
+                        textColorInt = R.color.p_global_black_color
+                        textSizeAuto = 28
+                        maxLines = 1
+                        ellipsize = TextUtils.TruncateAt.END
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                        topMargin = autoSize(10)
+                    }
 
-                 }.lparams(0, matchParent,3f)
+                }.lparams(0, matchParent,3f)
 
-                 textView {
-                     visibility = View.GONE
-                     onThrottleFirstClick {
-                         val intent = Intent()
-                         activity.setResult(10010, intent)
-                         activity.finish()
-                     }
+                textView {
+                    visibility = View.GONE
+                    onThrottleFirstClick {
+                        val intent = Intent()
+                        activity.setResult(10010, intent)
+                        activity.finish()
+                    }
 //                     data.bindOptional(context){
 //                        if (it?.holdstatus == "1" || it?.holdstatus == "2"){
 //                            visibility = View.VISIBLE
@@ -110,24 +110,24 @@ class MainCouponUsedViewHolder(private val activity: MyAppCompatActivity, privat
 //                            visibility = View.GONE
 //                        }
 //                     }
-                     gravity = Gravity.CENTER
-                     text = "使用"
-                     textColorStr = "#df5958"
-                     textSizeAuto = 30
-                     backgroundResource = R.drawable.button_red_cercle_bg
-                 }.lparams(autoSize(160), autoSize(54)){
-                     topMargin = autoSize(140)
-                     marginEnd = autoSize(32)
-                 }
+                    gravity = Gravity.CENTER
+                    text = "使用"
+                    textColorStr = "#df5958"
+                    textSizeAuto = 30
+                    backgroundResource = R.drawable.button_red_cercle_bg
+                }.lparams(autoSize(160), autoSize(54)){
+                    topMargin = autoSize(140)
+                    marginEnd = autoSize(32)
+                }
 
-             }.lparams(0, autoSize(216),3f)
+            }.lparams(0, autoSize(216),3f)
 
 
-         }.lparams(matchParent, autoSize(216)){
-             marginStart = autoSize(32)
-             marginEnd = autoSize(32)
-             bottomMargin = autoSize(24)
-         }
+        }.lparams(matchParent, autoSize(216)){
+            marginStart = autoSize(32)
+            marginEnd = autoSize(32)
+            bottomMargin = autoSize(24)
+        }
     }
 
 }

+ 1 - 1
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/coupon/MainCouponViewHolder.kt

@@ -53,7 +53,7 @@ class MainCouponViewHolder(private val activity: MyAppCompatActivity, private va
                                 text = "¥" + it.couponvalue
                             } else if (it?.couponcategroy == "2" || it?.couponcategroy == "3") {//折扣券
                                 val discount = Utils.getDisCount(NumberUtils().cvt(it.couponvalue?.toDouble()?.times(100)?.toInt().toString(), true))
-                                text = it.couponvalue?.toDouble()?.times(10).toString() + "折"
+                                text = Utils.doubleDistortion(it.couponvalue?.toDouble()?.times(10).toString()) + "折"
                             }
                         }
                         textColorInt = R.color.p_global_write_color

+ 22 - 1
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/document/MainParcelsActivity.kt

@@ -18,7 +18,9 @@ import mtp.polymer.com.R
 import mtp.polymer.com.autowidget.*
 import mtp.polymer.com.autowidget.adapter.BaseAdapter
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
+import mtp.polymer.com.autowidget.utils.TaskUiModel
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
+import mtp.polymer.com.autowidget.utils.showLoading
 import mtp.polymer.com.lifecycle.bindOptional
 import mtp.polymer.com.lifecycle.getAppCompatActivity
 
@@ -178,7 +180,12 @@ class ParcelAllListViewUI(private val activity: MyAppCompatActivity, private val
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                bindTaskStatus(viewModule.loadingDialogStatus)
 //                bindTaskStatus(viewModule.status)
+                setRetryAction {
+                    viewModule.loadingDialogStatus.value = TaskUiModel.inFlight()
+                    viewModule.getAllOrderList()
+                }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)
@@ -227,7 +234,12 @@ class ParcelToSendListViewUI(private val activity: MyAppCompatActivity, private
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                bindTaskStatus(viewModule.loadingDialogStatus)
 //                bindTaskStatus(viewModule.status)
+                setRetryAction {
+                    viewModule.loadingDialogStatus.value = TaskUiModel.inFlight()
+                    viewModule.getAllOrderList()
+                }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)
@@ -276,7 +288,11 @@ class ParcelForGoodsListViewUI(private val activity: MyAppCompatActivity, privat
 
             statusLayout(contentBlock = {
                 statusLayout = this
-//                bindTaskStatus(viewModule.status)
+                bindTaskStatus(viewModule.loadingDialogStatus)
+                setRetryAction {
+                    viewModule.loadingDialogStatus.value = TaskUiModel.inFlight()
+                    viewModule.getAllOrderList()
+                }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)
@@ -324,7 +340,12 @@ class ParcelFinishListViewUI(private val activity: MyAppCompatActivity, private
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                bindTaskStatus(viewModule.loadingDialogStatus)
 //                bindTaskStatus(viewModule.status)
+                setRetryAction {
+                    viewModule.loadingDialogStatus.value = TaskUiModel.inFlight()
+                    viewModule.getAllOrderList()
+                }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)

+ 6 - 6
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/document/ParcelDetailsActivity.kt

@@ -259,7 +259,11 @@ class ParcelDetailsActivity : MyAppCompatActivity() {
                 ShadowDrawable.setShadowDrawable(this@verticalLayout
                         , Color.parseColor("#FFFFFF"), 16,
                         Color.parseColor("#99e9ebf7"), 10, 2, 2)
-
+                if (data.takeorderstatus == "1"){
+                    visibility = View.GONE
+                }else{
+                    visibility = View.VISIBLE
+                }
 
                 linearLayout {
                     gravity = Gravity.CENTER_VERTICAL
@@ -282,11 +286,7 @@ class ParcelDetailsActivity : MyAppCompatActivity() {
                 }
 
                 linearLayout {
-                    if (data.takeorderstatus == "1"){
-                        visibility = View.GONE
-                    }else{
-                        visibility = View.VISIBLE
-                    }
+
                     gravity = Gravity.CENTER_VERTICAL
 
                     textView {

+ 4 - 6
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/idle/MainIdleActivity.kt

@@ -587,7 +587,7 @@ class MainIdleActivity : MyAppCompatActivity() {
                             }
 
                             if (editText.text.toString().toDouble() < viewModel.selectData.value?.lotsize?.toDouble() ?: 0.0) {
-                                ToastUtils.showLong("购买数量应大于等于" + viewModel.selectData.value?.lotsize)
+                                ToastUtils.showLong("发布数量应大于等于" + viewModel.selectData.value?.lotsize)
                                 return@onThrottleFirstClick
                             }
 //                            if (viewModel.selectData.value?.buymaxqty?.toDouble() != 0.0) {
@@ -598,7 +598,7 @@ class MainIdleActivity : MyAppCompatActivity() {
 //                            }
 
                             if ((editText.text.toString().toDouble() % viewModel.selectData.value?.lotsize?.toDouble()!!) != 0.0) {
-                                ToastUtils.showLong("购买数量应为" + viewModel.selectData.value?.lotsize + "的整数倍")
+                                ToastUtils.showLong("发布数量应为" + viewModel.selectData.value?.lotsize + "的整数倍")
                                 return@onThrottleFirstClick
                             }
 
@@ -817,10 +817,8 @@ class MainIdleActivity : MyAppCompatActivity() {
                             ?: "")
                 }
             } else {
-                if (ispick == 0) {
-                    viewModel.loadingDialogStatus.value = TaskUiModel.success()
-                    PolApplication.getInstance().showToast(PolApplication.getInstance().getErrorString(messageEvent.getRetCode()))
-                }
+                viewModel.loadingDialogStatus.value = TaskUiModel.success()
+                PolApplication.getInstance().showToast(PolApplication.getInstance().getErrorString(messageEvent.getRetCode()))
             }
         } else if (FunCode.QUOTEDAYRESPONSE == messageEvent?.funCode) {
 //            viewModel.getPrice(data.goodsid)

+ 2 - 2
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/idle/MainIdleBuyViewHolder.kt

@@ -116,8 +116,8 @@ class MainIdleBuyViewHolder(private val activity: MyAppCompatActivity, private v
                 editText {
                     amountText = this
                     gravity = Gravity.CENTER
-                    data.bindOptional(context){
-                        setText(it?.enableqty)
+                    viewModel.selectData.bindOptional(context){
+                        setText(it?.lotsize)
                     }
                     setOnFocusChangeListener { view, b ->
                         hasFoucs = b

+ 1 - 1
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/order/MainOrderFinishViewHolder.kt

@@ -55,7 +55,7 @@ class MainOrderFinishViewHolder(private val activity: MyAppCompatActivity, priva
 //                        ActivityUtils.startActivity(intent)
                     }
                 } else{
-                    ToastUtils.showLong("该商品已退市")
+//                    ToastUtils.showLong("该商品已退市")
                 }
 
             }

+ 40 - 15
app/src/main/java/mtp/polymer/com/information_management/hnstocks/main/order/MainOrderPaymentViewHolder.kt

@@ -60,7 +60,7 @@ class MainOrderPaymentViewHolder(private val activity: MyAppCompatActivity, priv
                         ActivityUtils.startActivity(intent)
                     }
                 } else{
-                    ToastUtils.showLong("该商品已退市")
+//                    ToastUtils.showLong("该商品已退市")
                 }
 
             }
@@ -195,16 +195,6 @@ class MainOrderPaymentViewHolder(private val activity: MyAppCompatActivity, priv
 
                         view {  }.lparams(0, wrapContent,1f)
 
-                        textView {
-                            data.bindOptional(context){
-                                text = "金额 " + Utils.roundNum((it?.tradecharge?.toDouble()?.let { it1 -> it?.tradeamount?.toDouble()?.plus(it1) }!!), 2)
-                            }
-                            textSizeAuto = 26
-                            textColorInt = R.color.p_global_black_color
-                        }.lparams(wrapContent, wrapContent){
-                            marginEnd = margenPadding
-                        }
-
                     }.lparams(matchParent, autoSize(40)){
                         topMargin = autoSize(20)
                     }
@@ -213,6 +203,41 @@ class MainOrderPaymentViewHolder(private val activity: MyAppCompatActivity, priv
 
             linearLayout {
                 gravity = Gravity.CENTER_VERTICAL
+                view {  }.lparams(0, autoSize(1),1f)
+
+                textView {
+                    data.bindOptional(context){
+                        text = "总价 " + it?.currencysign  + Utils.roundNum(it?.tradeamount, 2)
+                    }
+                    textSizeAuto = 26
+                    textColorInt = R.color.p_global_black_color
+                }.lparams(wrapContent, wrapContent){
+                    marginEnd = margenPadding
+                }
+
+                textView {
+                    data.bindOptional(context){
+                        text = "优惠 " + it?.currencysign  + Utils.roundNum(it?.offamount, 2)
+                    }
+                    textSizeAuto = 26
+                    textColorInt = R.color.p_global_black_color
+                }.lparams(wrapContent, wrapContent){
+                    marginEnd = margenPadding
+                }
+
+                textView {
+                    data.bindOptional(context){
+                        text = "实付款 " + it?.currencysign  + Utils.roundNum(it?.payamount, 2)
+                    }
+                    textSizeAuto = 26
+                    textColorInt = R.color.p_global_black_color
+                }.lparams(wrapContent, wrapContent){
+                    marginEnd = margenPadding
+                }
+            }.lparams(matchParent, autoSize(40))
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
                 view {  }.lparams(0, wrapContent,1f)
                 textView {
 //                    data.bindOptional(context){
@@ -239,9 +264,9 @@ class MainOrderPaymentViewHolder(private val activity: MyAppCompatActivity, priv
                     gravity = Gravity.CENTER
                     backgroundResource = R.drawable.button_white_bg_1
                     text = "取消订单"
-                    textSizeAuto = 38
+                    textSizeAuto = 32
                     textColorStr = "#76c2dd"
-                }.lparams(autoSize(210), autoSize(70)){
+                }.lparams(autoSize(180), autoSize(60)){
                     marginEnd = margenPadding
                 }
 
@@ -260,9 +285,9 @@ class MainOrderPaymentViewHolder(private val activity: MyAppCompatActivity, priv
                     gravity = Gravity.CENTER
                     backgroundResource = R.drawable.button_white_bg
                     text = "去支付"
-                    textSizeAuto = 38
+                    textSizeAuto = 32
                     textColorStr = "#76c2dd"
-                }.lparams(autoSize(210), autoSize(70)){
+                }.lparams(autoSize(180), autoSize(60)){
                     marginEnd = margenPadding
                 }
 

+ 11 - 3
app/src/main/java/mtp/polymer/com/information_management/hnstocks/message/MessageFragment.kt

@@ -33,14 +33,12 @@ class MessageFragment : MyFragment() {
         getViewModel<MessageViewModel>()
     }
 
-    private val ui: MessageUI by lazy { MessageUI(this, viewModel) }
+    val ui: MessageUI by lazy { MessageUI(this, viewModel) }
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
         return ui.createContentView()
-
     }
 
-
     override fun onResume() {
         super.onResume()
         if (activity != null) {
@@ -55,6 +53,10 @@ class MessageFragment : MyFragment() {
 
     }
 
+    fun refrashList(){
+        ui.refrashAllList()
+    }
+
     fun resetRefrash() {
         if (activity != null) {
             val activity1 = (activity as MyAppCompatActivity)
@@ -117,6 +119,12 @@ class MessageUI(private val baseFragment: MyFragment, private val viewModel: Mes
         }else{
             viewModel.getMessage("1")
         }
+        viewModel.getAllMessage()
+    }
+    //用于通知有下达后的数据刷新
+    fun refrashAllList(){
+        viewModel.getMessage("1")
+        viewModel.getMessage("2")
     }
 
 

+ 35 - 3
app/src/main/java/mtp/polymer/com/information_management/hnstocks/message/MessageViewModel.kt

@@ -5,19 +5,17 @@ import android.arch.lifecycle.ViewModel
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.ToastUtils
 import com.google.gson.Gson
-import com.google.gson.JsonObject
 import com.mtp2.tcplibs.tools.LogUtils
 import com.zhy.http.okhttp.OkHttpUtils
 import com.zhy.http.okhttp.callback.StringCallback
 import mtp.polymer.com.AddressConfig
 import mtp.polymer.com.autowidget.utils.TaskUiModel
+import mtp.polymer.com.businesslayer.constant.GlobalDataCollention
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HnMessageData
 import mtp.polymer.com.global.Constent
-import mtp.polymer.com.information_management.hnstocks.home.data.HttpResult
 import mtp.polymer.com.tools.touristCheckString
 import okhttp3.Call
 import org.json.JSONObject
-import java.lang.Exception
 
 class MessageViewModel : ViewModel(){
 
@@ -28,6 +26,40 @@ class MessageViewModel : ViewModel(){
     val announcementNoReadAccount : MutableLiveData<Int> = MutableLiveData<Int>().apply { value = 0 }//通知总未读条目数
 
     val loadingDialogStatus: MutableLiveData<TaskUiModel> = MutableLiveData()//加载状态控制
+
+    fun getAllMessage(){
+        OkHttpUtils.get()
+                .url(AddressConfig.AUTH_GO_URL + "/Common/QueryNotice?")
+                .addParams("loginID",
+                        touristCheckString(doTourist = {
+                            "0"
+                        }, unTourist = {
+                            SPUtils.getInstance().getString(Constent.LOGINID)
+                        })
+                )
+                .addHeader("Authorization", SPUtils.getInstance().getString("token"))
+                .build()
+                .execute(object : StringCallback() {
+                    override fun onResponse(response: String?, id: Int) {
+                        LogUtils.e("dhasfhkajhlka",response)
+                        val gson = Gson()
+                        val allData = gson.fromJson(response, HnMessageData::class.java)
+                        if (allData.code == 200) {
+                            val hnmessageList = GlobalDataCollention.getInstance().hnmessageDataList
+                            hnmessageList.clear()
+                            hnmessageList.addAll(allData.getData())
+                        } else {
+                            loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = allData.msg))
+                        }
+                    }
+
+                    override fun onError(call: Call?, e: Exception?, id: Int) {
+                        loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = e?.message))
+                        LogUtils.d("dhasfhkajhlka", e?.message)
+                    }
+                })
+    }
+
     /**
      * 获取通知公告列表
      *

+ 166 - 3
app/src/main/java/mtp/polymer/com/main/MainActivity.java

@@ -16,6 +16,7 @@ import android.support.constraint.ConstraintLayout;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
+import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.TextView;
@@ -26,6 +27,7 @@ import com.blankj.utilcode.util.ActivityUtils;
 import com.blankj.utilcode.util.AppUtils;
 import com.blankj.utilcode.util.SPUtils;
 import com.blankj.utilcode.util.ZipUtils;
+import com.google.gson.Gson;
 import com.mtp2.tcplibs.tools.LogUtils;
 import com.zhy.http.okhttp.OkHttpUtils;
 import com.zhy.http.okhttp.callback.Callback;
@@ -34,8 +36,14 @@ import com.zhy.http.okhttp.callback.StringCallback;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
 import java.util.concurrent.TimeUnit;
 
+import io.reactivex.Observable;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.disposables.Disposable;
+import io.reactivex.schedulers.Schedulers;
 import mtp.polymer.com.ActivityManager;
 import mtp.polymer.com.AddressConfig;
 import mtp.polymer.com.EntryActivity_BAK;
@@ -54,6 +62,7 @@ import mtp.polymer.com.businesslayer.models.login.marketQueryBase.MarketsInfoDat
 import mtp.polymer.com.businesslayer.models.notices.NoticeData;
 import mtp.polymer.com.businesslayer.models.queryCommon.opeData.TradeSummaryData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.DeliveryHolder;
+import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HnMessageData;
 import mtp.polymer.com.futures.ManageFuturesFragment;
 import mtp.polymer.com.global.Config;
 import mtp.polymer.com.global.Constent;
@@ -91,6 +100,7 @@ import mtp.polymer.com.zy_module.zymarketings.ZYMarketingFragment;
 import okhttp3.Call;
 import okhttp3.OkHttpClient;
 import okhttp3.Response;
+import q.rorbin.badgeview.QBadgeView;
 
 import static mtp.polymer.com.tools.TouristorToolsKt.touristorCheck;
 
@@ -140,6 +150,8 @@ public class MainActivity extends MyAppCompatActivity implements View.OnClickLis
 
     private ConstraintLayout p_bottom; //底部栏
     private View p_line;  //底部栏上面的view
+    private Timer noticeTimer;  //公告的计时器
+    private QBadgeView qBadgeView ;
     //endregion
 
     //region 数据
@@ -164,7 +176,7 @@ public class MainActivity extends MyAppCompatActivity implements View.OnClickLis
         initListener();
         initQuery();
         getNetIp();
-
+        timeLoop();
     }
 
     private void getNetIp(){
@@ -225,6 +237,151 @@ public class MainActivity extends MyAppCompatActivity implements View.OnClickLis
         PolApplication.myAppCompatActivity = this;
     }
 
+    private static final int PERIOD = 10 * 1000;
+    private static final int DELAY = 100;
+    private Disposable mDisposable;
+    /**
+     * 定时循环任务
+     */
+    private void timeLoop() {
+        mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
+                .map((aLong -> aLong + 1))
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(aLong -> queryNotice());//getUnreadCount()执行的任务
+    }
+//关闭定时任务
+//if (mDisposable != null) mDisposable.dispose();
+
+    private void startQueryNotice(){
+        com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd","3");
+        if (noticeTimer != null) {
+            return;
+        }
+        noticeTimer = new Timer();
+        try {
+            int delay = PolApplication.getInstance().getNoticeRandom() * 1000;
+            int perId = PolApplication.getInstance().getNoticeRandom() * 1000;
+            noticeTimer.schedule(new TimerTask() {
+                @Override
+                public void run() {
+                    com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd","1");
+                    queryNotice();
+                }
+            },delay, perId);
+        } catch (Exception e ) {
+            com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd",e);
+            e.printStackTrace();
+            noticeTimer = null;
+        }
+    }
+
+    private void queryNotice(){
+        com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd","2");
+        String loginid = "0";
+        if (GlobalDataCollention.getInstance().isTouristor()){
+            return;
+        }
+        loginid = SPUtils.getInstance().getString(Constent.LOGINID);
+        ArrayList<HnMessageData.dataList> hnmessageList = GlobalDataCollention.getInstance().getHnmessageDataList();
+
+        if (hnmessageList.isEmpty()){
+            OkHttpUtils.get()
+                    .url(AddressConfig.AUTH_GO_URL + "/Common/QueryNotice?")
+                    .addParams("loginID",loginid)
+                    .addHeader("Authorization", SPUtils.getInstance().getString("token"))
+                    .build()
+                    .execute(new StringCallback() {
+                        @Override
+                        public void onError(Call call, Exception e, int id) {
+
+                        }
+
+                        @Override
+                        public void onResponse(String response, int id) {
+                            com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd",response);
+                            Gson gson = new Gson();
+                            HnMessageData data =  gson.fromJson(response,HnMessageData.class);
+                            ArrayList<HnMessageData.dataList> hnmessageList = GlobalDataCollention.getInstance().getHnmessageDataList();
+                            hnmessageList.clear();
+                            hnmessageList.addAll(data.getData());
+                            Message message = handlermessage.obtainMessage();
+                            message.what = 0;
+                            message.sendToTarget();
+                        }
+                    });
+        }else {
+            String lastID = hnmessageList.get(hnmessageList.size() - 1).getAutoid();
+            com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasdlastID",lastID);
+            OkHttpUtils.get()
+                    .url(AddressConfig.AUTH_GO_URL + "/Common/QueryNotice?")
+                    .addParams("loginID",loginid)
+                    .addHeader("Authorization", SPUtils.getInstance().getString("token"))
+                    .addParams("lastID",lastID)
+                    .build()
+                    .execute(new StringCallback() {
+                        @Override
+                        public void onError(Call call, Exception e, int id) {
+
+                        }
+
+                        @Override
+                        public void onResponse(String response, int id) {
+                            com.blankj.utilcode.util.LogUtils.eTag("dasjdklajdsklasd",response);
+                            Gson gson = new Gson();
+                            HnMessageData data =  gson.fromJson(response,HnMessageData.class);
+                            if (!data.getData().isEmpty()){
+                                //反正只是暂存的公告
+                                ArrayList<HnMessageData.dataList> hnmessageList = GlobalDataCollention.getInstance().getHnmessageDataList();
+                                hnmessageList.addAll(data.getData());
+                                refrashNotice();
+                                Message message = handlermessage.obtainMessage();
+                                message.what = 0;
+                                message.sendToTarget();
+                            }
+                        }
+                    });
+        }
+    }
+
+    Handler handlermessage = new Handler(Looper.myLooper()) {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case 0:
+                    showNoReadNotice();
+                    break;
+                default:
+                    break;
+            }
+            super.handleMessage(msg);
+        }
+    };
+
+    private void showNoReadNotice(){
+        ArrayList<HnMessageData.dataList> hnmessageList = GlobalDataCollention.getInstance().getHnmessageDataList();
+        Boolean hasUnRead = false;
+        for (int j=0;j<hnmessageList.size();j++){
+            if (!hnmessageList.get(j).getReaded()){
+                hasUnRead = true;
+            }
+        }
+        if (hasUnRead){
+            qBadgeView.setVisibility(View.VISIBLE);
+        }else {
+            qBadgeView.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        if (mDisposable != null) {
+            mDisposable.dispose();
+            mDisposable = null; //noticeTimer释放
+        }
+    }
+
     // endregion
 
     //region 功能函数
@@ -273,6 +430,9 @@ public class MainActivity extends MyAppCompatActivity implements View.OnClickLis
         p_optionquery = findViewById(R.id.p_optionquery);
         p_shoppssssing = findViewById(R.id.p_shoppssssing);
         p_open = findViewById(R.id.p_open);
+        qBadgeView = new QBadgeView(this);
+        qBadgeView.bindTarget(p_query).setBadgeBackground(getDrawable(R.drawable.hn_main_cercle_red_bg)).setBadgeGravity(Gravity.TOP | Gravity.END).setGravityOffset(80,0,false).setBadgeText("");
+        qBadgeView.setVisibility(View.GONE);
         if (Config.ZYSTATE) {
             p_warehouse_receipt.setText(R.string.p_marketing);
             // 中远显示期权单据,改字为定货
@@ -1228,7 +1388,10 @@ public class MainActivity extends MyAppCompatActivity implements View.OnClickLis
         loadHnGoodsFragment(select);
     }
 
-    public void toNotice(){
-        loadHnMessageFragment();
+    public void refrashNotice(){
+
+        if (messageFragment != null) {
+            messageFragment.refrashList();
+        }
     }
 }

+ 27 - 5
app/src/main/java/mtp/polymer/com/main/my/glod/AcessGlodActivity.java

@@ -7,6 +7,8 @@ import android.support.v4.content.ContextCompat;
 import android.support.v4.view.ViewPager;
 import android.view.View;
 
+import com.blankj.utilcode.util.ToastUtils;
+
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -40,6 +42,8 @@ public class AcessGlodActivity extends MyAppCompatActivity implements View.OnCli
     private TabLayout glod_tab;
     private ViewPager glod_content;
 
+    private AccessCheckFragment accessCheckFragment;
+
     @Override
     protected void onCreate(Bundle arg0) {
         super.onCreate(arg0);
@@ -50,9 +54,9 @@ public class AcessGlodActivity extends MyAppCompatActivity implements View.OnCli
 
 
     private void initView() {
-
+        accessCheckFragment = new AccessCheckFragment();
         glod_headview = findViewById(R.id.glod_headview);
-        glod_headview.setTitleText(getString(R.string.p_out_in_money));
+        glod_headview.setTitleText("提现");
         glod_headview.setBackClickListener(this);
         glod_tab = findViewById(R.id.glod_tab);
         glod_content = findViewById(R.id.glod_content);
@@ -63,12 +67,12 @@ public class AcessGlodActivity extends MyAppCompatActivity implements View.OnCli
         tabFragments = new LinkedList<>();
 
 //        tabIndicators.add(getString(R.string.in_money));
-        tabIndicators.add(getString(R.string.out_money));
-        tabIndicators.add(getString(R.string.money_check));
+        tabIndicators.add("提现");
+        tabIndicators.add("提现查询");
 
 //        tabFragments.add(new AccessInGlodFragment());
         tabFragments.add(new AccessOutGlodFragment());
-        tabFragments.add(new AccessCheckFragment());
+        tabFragments.add(accessCheckFragment);
 
         glod_tab.setTabMode(TabLayout.MODE_FIXED);
         glod_tab.setTabTextColors(ContextCompat.getColor(this, R.color.p_global_tab_un_select_color),
@@ -80,6 +84,24 @@ public class AcessGlodActivity extends MyAppCompatActivity implements View.OnCli
         glod_content.setAdapter(new TransferContentPagerAdapter(getSupportFragmentManager(), tabFragments, tabIndicators, this));
         glod_tab.setupWithViewPager(glod_content);
         PolApplication.getInstance().setTabBaseLine(glod_tab);
+        glod_tab.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
+                if (tab.getPosition() == 1){
+                    accessCheckFragment.reloadData();
+                }
+            }
+
+            @Override
+            public void onTabUnselected(TabLayout.Tab tab) {
+
+            }
+
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+
+            }
+        });
 
         if (GlobalDataCollention.getInstance().getCusBankDatas().size() == 0) {
             queryCusbank();

+ 7 - 3
app/src/main/java/mtp/polymer/com/main/my/glod/fragments/AccessCheckFragment.java

@@ -114,15 +114,19 @@ public class AccessCheckFragment extends MyFragment implements OnClickListener {
                 }, mtp_start_datetime.getText().toString(), mtp_end_datetime.getText().toString());
                 break;
             case R.id.btn_mtp_check_access:
-                ((MyAppCompatActivity) getActivity()).showCanDialog();
-                flag = true;
-                requestData();
+                reloadData();
                 break;
             default:
                 break;
         }
     }
 
+    public void reloadData(){
+        ((MyAppCompatActivity) getActivity()).showCanDialog();
+        flag = true;
+        requestData();
+    }
+
 
     @Override
     public void onMessageEventThread(MessageEvent messageEvent) {

+ 38 - 10
app/src/main/java/mtp/polymer/com/main/my/glod/fragments/AccessOutGlodFragment.java

@@ -16,8 +16,12 @@ import android.widget.LinearLayout;
 import android.widget.LinearLayout.LayoutParams;
 import android.widget.TextView;
 
+import com.blankj.utilcode.util.SPUtils;
+import com.blankj.utilcode.util.TimeUtils;
+import com.blankj.utilcode.util.ToastUtils;
 import com.mtp2.tcplibs.encypts.aes.SHA256Encrypt;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -96,6 +100,8 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
     private double outMoney = 0;
     private boolean isShowTips = true;
     private TextView forgot_password;
+    private String startTime = "";
+    private String endTime = "";
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@@ -108,7 +114,7 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
     }
 
     private void initviews() {
-        mtp_in_glod_title.setText(getString(R.string.p_out_glod_number));
+        mtp_in_glod_title.setText("提现金额");
         mtp_in_glod_summary.setVisibility(View.GONE);
         mtp_out_glod_number.setVisibility(View.GONE);
         outtips.setVisibility(View.VISIBLE);
@@ -159,12 +165,16 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
 //                outtips.setText(getString(R.string.out_in_time_p) + signTime.getParamValue() + " - " + outTime.getParamValue());
 //            }
 //        }
-        ConfigInfoData signTime = GlobalDataCollention.getInstance().getConfigInfoDatas().get("012");
-        ConfigInfoData outTime = GlobalDataCollention.getInstance().getConfigInfoDatas().get("013");
-        // 当用户在“银行签到时间之外”发起出金申请后,系统需提示
-        if (signTime != null && outTime != null) {
-            outtips.setText(getString(R.string.out_in_time_p) + signTime.getParamValue() + " - " + outTime.getParamValue());
+        String time = SPUtils.getInstance().getString("hsbyoutmoneytime");
+        if (!time.equals("") && time != null){
+            String signTime = time.split("-")[0];
+            String outTime = time.split("-")[1];
+            // 当用户在“银行签到时间之外”发起出金申请后,系统需提示
+            if (signTime != null && outTime != null) {
+                outtips.setText("银行提现时间段" + SPUtils.getInstance().getString("hsbyoutmoneytime"));
+            }
         }
+
     }
 
     @Override
@@ -207,7 +217,11 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
      * 初始化数据
      */
     private void initData() {
-
+        String time = SPUtils.getInstance().getString("hsbyoutmoneytime");
+        if (!time.equals("") && time != null) {
+            startTime = time.split("-")[0];
+            endTime = time.split("-")[1];
+        }
         mtp_bank_account_name.setText(GlobalDataCollention.getInstance().getAccountInfoData().getCustomerName());
         costAccount.setText(GlobalDataCollention.getInstance().getCurr_accountInfoData().getAccountId() + "");
         showBankTips();
@@ -402,6 +416,19 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
                 }, 2000);
                 if (checkBank()) {
                     if (signBankDatas != null && signBankDatas.getBankAccountSignData() != null && signBankDatas.getBankAccountSignData().size() > 0) {
+                        if (!startTime.equals("")){
+                            if (Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HH:mm")).replace(":","")) < Long.valueOf(startTime.replace(":",""))){
+                                ToastUtils.showLong("不在服务时间");
+                                return;
+                            }
+                        }
+                       if (!endTime.equals("")){
+                           if (Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HH:mm")).replace(":","")) > Long.valueOf(endTime.replace(":",""))){
+                               ToastUtils.showLong("不在服务时间");
+                               return;
+                           }
+                       }
+
                         outMoney();
                     } else {
                         PolApplication.getInstance().showToast(getString(R.string.p_nosign_nosupport));
@@ -495,14 +522,15 @@ public class AccessOutGlodFragment extends MyFragment implements OnClickListener
             initSignData(bankAccountSignData);
             // 获取服务费收取方式
             initChargeType(bankAccountSignData.getCusBankID(), QueryStatements.QUERYBANK_CUSBANKCHARGE);
-        } else if ((!Config.ZYSTATE || !Config.ZJSTATE) && messageEvent.getFunCode() == FunCode.T2BBANKWITHDRAWRSP) {
+        } else if (messageEvent.getFunCode() == FunCode.T2BBANKWITHDRAWRSP) {
             ((MyAppCompatActivity) getActivity()).cancelCanDialog();
             isShowTips = false;
-            clearInfo();
+
             OutMoneyData MoneyData = GlobalDataCollention.getInstance().getOutMoneyData();
             int ret = messageEvent.getRetCode();
             if (ret == 0 && MoneyData.getStatus() == 0) {
-                outGlodControl.showDialog(ret, getString(R.string.p_outgold_success));
+                outGlodControl.showDialog(ret, "提现成功");
+                clearInfo();//出金成功后才清除信息 bug  #93492
                 getCanoutMoney();
             } else {
                 if (MoneyData.getNetAddr().equals("")) {

+ 12 - 5
app/src/main/java/mtp/polymer/com/main/my/modifys/ModifyAccount.java

@@ -12,12 +12,14 @@ import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.blankj.utilcode.util.ToastUtils;
 import com.mtp2.tcplibs.encypts.aes.SHA256Encrypt;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import mtp.polymer.com.ActivityManager;
+import mtp.polymer.com.CheckPassword;
 import mtp.polymer.com.MyAppCompatActivity;
 import mtp.polymer.com.PolApplication;
 import mtp.polymer.com.R;
@@ -108,7 +110,7 @@ public class ModifyAccount extends MyAppCompatActivity implements View.OnClickLi
         if (Config.show_news){
             setting_confirm_button.setBackgroundColor(getResources().getColor(R.color.dml_trade_sell_color));
         }else {
-            setting_confirm_button.setBackgroundColor(getResources().getColor(R.color.manager_yellow_bg));
+            setting_confirm_button.setBackgroundColor(getResources().getColor(R.color.dml_trade_sell_color));
         }
     }
 
@@ -119,14 +121,19 @@ public class ModifyAccount extends MyAppCompatActivity implements View.OnClickLi
         }
 
         int newps = setting_new_ps_input.getText().toString().trim().length();
-        if (!(newps >= 6 && newps <= 20)) {
-            showToast(R.string.mtp_new_password_hint1);
+
+        if (!CheckPassword.checkPasswordRule(setting_new_ps_input.getText().toString().trim())){
+            ToastUtils.showLong("密码格式错误");
+            return false;
+        }
+        if (!(newps >= 8 && newps <= 20)) {
+            showToast("请输入8-20位的新密码");
             return false;
         }
 
         int confirmps = setting_confirm_input.getText().toString().trim().length();
-        if (!(confirmps >= 6 && confirmps <= 20)) {
-            showToast(R.string.mtp_new_password_hint1);
+        if (!(confirmps >= 8 && confirmps <= 20)) {
+            showToast("请输入8-20位的新密码");
             return false;
         }
 

+ 1 - 0
app/src/main/java/mtp/polymer/com/main/my/sign/fragment/SignQueryActivity.java

@@ -115,6 +115,7 @@ public class SignQueryActivity extends MyAppCompatActivity implements OnClickLis
         }else{
             info_bank.setText("--");
         }
+//        info_bank.setText("中国银联");
         info_open.setText(bQueryData.getBankName() == null || bQueryData.getBankName().equals("null") ? "--" : bQueryData.getBankName());// 开户银行
         // 账户名称
         info_name.setText(bQueryData.getAccountNameDisp());

+ 16 - 0
app/src/main/res/drawable/hn_main_cercle_red_bg.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval"
+    android:useLevel="false">
+  <solid android:color="@color/mtp_chart_k_rsi6"></solid>
+  <size
+      android:width="15dp"
+      android:height="15dp"></size>
+  <padding
+      android:bottom="1dp"
+      android:left="2dp"
+      android:right="2dp"
+      android:top="1dp"></padding>
+
+</shape>
+

+ 10 - 0
app/src/main/res/layout/entry.xml

@@ -390,12 +390,22 @@
 
 
     <LinearLayout
+        android:gravity="center_vertical"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         android:layout_marginBottom="20dp"
         android:layout_width="match_parent"
         android:layout_height="40dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="《隐私政策》"
+            android:layout_marginStart="40dp"
+            android:textColor="@color/p_top_bg_color"
+            android:id="@+id/privacy_policy"/>
+
         <View
             android:layout_width="0dp"
             android:layout_height="match_parent"

+ 11 - 2
app/src/main/res/layout/modify_account.xml

@@ -38,7 +38,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginRight="15dp"
                     android:paddingLeft="20dip"
-                    android:text="@string/mtp_trade_account_number"
+                    android:text="登录账号"
                     android:textColor="@color/p_normal_summary_txt_color"
                     android:textSize="@dimen/param_settings_item_text_size" />
 
@@ -103,7 +103,7 @@
                     android:layout_marginRight="20dp"
                     android:layout_weight="0.99"
                     android:background="@drawable/manage_shape_login"
-                    android:hint="@string/mtp_new_password_hint1"
+                    android:hint="请输入8-20位的新密码"
                     android:textColorHint="@color/p_normal_summary_txt_color"
                     android:inputType="textPassword"
                     android:minEms="6"
@@ -142,6 +142,15 @@
             </TableRow>
         </TableLayout>
 
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/param_settings_item_text_size"
+            android:layout_marginStart="14dp"
+            android:layout_marginEnd="14dp"
+            android:textColor="@color/colorAccent"
+            android:text="请输入8-20位,包含大写字母、小写字母、数字、标点符号至少三项(不包含空格)的字符"/>
+
         <Button
             android:id="@+id/setting_confirm_button"
             android:layout_width="match_parent"

+ 15 - 1
businesslayer/src/main/java/mtp/polymer/com/businesslayer/constant/BaseGlobalData.java

@@ -115,6 +115,7 @@ import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HisAcoun
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HisTradeWrpositionDetailLogData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HisWrpositionDetailLogData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HistoryIntegralData;
+import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HnMessageData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HomeSellResultData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.HsbyMarketsData;
 import mtp.polymer.com.businesslayer.models.queryCommon.qryPositionBase.InforHisInnerHolderData;
@@ -442,6 +443,19 @@ public class BaseGlobalData {
 
     private ArrayList<EnumdicitemData.dataList> enumdicitemDataArrayList;
 
+    private ArrayList<HnMessageData.dataList> hnmessageDataList;//公告消息
+
+    public ArrayList<HnMessageData.dataList> getHnmessageDataList() {
+        if (hnmessageDataList == null){
+            hnmessageDataList = new ArrayList<>();
+        }
+        return hnmessageDataList;
+    }
+
+    public void setHnmessageDataList(ArrayList<HnMessageData.dataList> hnmessageDataList) {
+        this.hnmessageDataList = hnmessageDataList;
+    }
+
     public ArrayList<HsbyMarketsData.dataList> getHsbyMarketsDataArrayList() {
         if (hsbyMarketsDataArrayList == null){
             hsbyMarketsDataArrayList = new  ArrayList<>();
@@ -1069,7 +1083,7 @@ public class BaseGlobalData {
             }
         }
 
-      return this.noticeData.get(aarMaxIndex);
+        return this.noticeData.get(aarMaxIndex);
     }
 
     public void setNoticeData(List<NoticeData> noticeData) {

+ 9 - 0
businesslayer/src/main/java/mtp/polymer/com/businesslayer/godatas/AdressUrlData.java

@@ -23,6 +23,15 @@ public class AdressUrlData {
         private String tradePort;
         private String tradeUrl;
         private String uploadUrl;
+        private String hsbyBankSignZone;
+
+        public String getHsbyBankSignZone() {
+            return hsbyBankSignZone;
+        }
+
+        public void setHsbyBankSignZone(String hsbyBankSignZone) {
+            this.hsbyBankSignZone = hsbyBankSignZone;
+        }
 
         public String getCommSearchUrl() {
             return commSearchUrl;

+ 94 - 15
businesslayer/src/main/java/mtp/polymer/com/businesslayer/models/queryCommon/qryPositionBase/HnHomeBannerData.java

@@ -12,14 +12,29 @@ public class HnHomeBannerData {
     public ArrayList<dataList> data;
 
     public static class dataList {
-        private String configid;
-        private String imagetype;
-        private String title;
-        private String imagepath;
-        private String url;
-        private String sort;
-
+        private String areauserid;//所属机构ID
+        private String configid;//配置ID(SEQ_SZDZ2_IMAGECONFIG)
+        private String createdate;//创建时间
+        private String creatorid;//创建人
+        private String imagepath;//图片
+        private String imagetype;//类型 - 1:首页轮播(移动) 2:我的(移动)
+        private String isshow;//是否展示 - 0:不展示 1:展示
+        private String marketid;//市场ID
+        private String modifierid;//操作人
+        private String sort;//排序
+        private String title;//标题
+        private String trademode;//交易模式
+        private String updatedate;//修改时间
+        private String url;//链接(地址或商品ID)
+        private String urltype;//链接类型 - 1:直接地址 2:商品ID
+
+        public String getAreauserid() {
+            return areauserid;
+        }
 
+        public void setAreauserid(String areauserid) {
+            this.areauserid = areauserid;
+        }
 
         public String getConfigid() {
             return configid;
@@ -29,6 +44,30 @@ public class HnHomeBannerData {
             this.configid = configid;
         }
 
+        public String getCreatedate() {
+            return createdate;
+        }
+
+        public void setCreatedate(String createdate) {
+            this.createdate = createdate;
+        }
+
+        public String getCreatorid() {
+            return creatorid;
+        }
+
+        public void setCreatorid(String creatorid) {
+            this.creatorid = creatorid;
+        }
+
+        public String getImagepath() {
+            return imagepath;
+        }
+
+        public void setImagepath(String imagepath) {
+            this.imagepath = imagepath;
+        }
+
         public String getImagetype() {
             return imagetype;
         }
@@ -37,6 +76,38 @@ public class HnHomeBannerData {
             this.imagetype = imagetype;
         }
 
+        public String getIsshow() {
+            return isshow;
+        }
+
+        public void setIsshow(String isshow) {
+            this.isshow = isshow;
+        }
+
+        public String getMarketid() {
+            return marketid;
+        }
+
+        public void setMarketid(String marketid) {
+            this.marketid = marketid;
+        }
+
+        public String getModifierid() {
+            return modifierid;
+        }
+
+        public void setModifierid(String modifierid) {
+            this.modifierid = modifierid;
+        }
+
+        public String getSort() {
+            return sort;
+        }
+
+        public void setSort(String sort) {
+            this.sort = sort;
+        }
+
         public String getTitle() {
             return title;
         }
@@ -45,12 +116,20 @@ public class HnHomeBannerData {
             this.title = title;
         }
 
-        public String getImagepath() {
-            return imagepath;
+        public String getTrademode() {
+            return trademode;
         }
 
-        public void setImagepath(String imagepath) {
-            this.imagepath = imagepath;
+        public void setTrademode(String trademode) {
+            this.trademode = trademode;
+        }
+
+        public String getUpdatedate() {
+            return updatedate;
+        }
+
+        public void setUpdatedate(String updatedate) {
+            this.updatedate = updatedate;
         }
 
         public String getUrl() {
@@ -61,12 +140,12 @@ public class HnHomeBannerData {
             this.url = url;
         }
 
-        public String getSort() {
-            return sort;
+        public String getUrltype() {
+            return urltype;
         }
 
-        public void setSort(String sort) {
-            this.sort = sort;
+        public void setUrltype(String urltype) {
+            this.urltype = urltype;
         }
     }