Browse Source

提交内容 提交包含设备管理新需求代码,审批新需求代码

Bitliker 8 years ago
parent
commit
bd41a6a04e

+ 5 - 5
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Fri Jan 26 17:01:44 CST 2018
-debugName=177
-versionName=613
-debugCode=177
-versionCode=152
+#Fri Feb 02 16:15:26 CST 2018
+debugName=201
+versionName=616
+debugCode=201
+versionCode=155

+ 5 - 5
app_core/common/src/main/java/com/common/LogUtil.java

@@ -98,18 +98,18 @@ public class LogUtil {
 		if (responseInfo != null) {
 		if (responseInfo != null) {
 			if (responseInfo.length() >=4000) {
 			if (responseInfo.length() >=4000) {
 				Log.v(TAG, "sb.length = " + responseInfo.length());
 				Log.v(TAG, "sb.length = " + responseInfo.length());
-				int chunkCount = responseInfo.length() / 4000;     // integer division
+				int chunkCount = responseInfo.length() / 3000;     // integer division
 				for (int i = 0; i <= chunkCount; i++) {
 				for (int i = 0; i <= chunkCount; i++) {
-					int max = 4000 * (i + 1);
+					int max = 3000 * (i + 1);
 					if (max >= responseInfo.length()) {
 					if (max >= responseInfo.length()) {
-						Log.d(TAG, "【"+ i + "】" + responseInfo.substring(4000 * i));
+						Log.i(TAG, "【"+ i + "】" + responseInfo.substring(3000 * i));
 					} else {
 					} else {
-						Log.d(TAG, "【" + i+ "】" + responseInfo.substring(4000 * i, max));
+						Log.i(TAG, "【" + i+ "】" + responseInfo.substring(3000 * i, max));
 					}
 					}
 				}
 				}
 			} else {
 			} else {
 				Log.d(TAG, "sb.length = " + responseInfo.length());
 				Log.d(TAG, "sb.length = " + responseInfo.length());
-				Log.d(TAG, responseInfo.toString());
+				Log.i(TAG, responseInfo.toString());
 			}
 			}
 		}
 		}
 
 

+ 11 - 10
app_core/common/src/main/java/com/core/model/Approval.java

@@ -61,8 +61,9 @@ public class Approval {
         }
         }
         this.oldValues = oldValues;
         this.oldValues = oldValues;
     }
     }
+
     public String getDbFind() {
     public String getDbFind() {
-        return dbFind==null?"":dbFind;
+        return dbFind == null ? "" : dbFind;
     }
     }
 
 
     public void setDbFind(String dbFind) {
     public void setDbFind(String dbFind) {
@@ -209,16 +210,18 @@ public class Approval {
      * @return 输入类型:0字符输入  1.数字输入  2.日期输入选择  3.下拉选择  4.dbfind
      * @return 输入类型:0字符输入  1.数字输入  2.日期输入选择  3.下拉选择  4.dbfind
      */
      */
     public int inputType() {
     public int inputType() {
-        if (isNumber())
+       if (isNumber())
             return 1;
             return 1;
         else if (isDftypeEQ("DT", "D")) {
         else if (isDftypeEQ("DT", "D")) {
             return 2;
             return 2;
-        } else if (isDftypeEQ("C", "YN", "B")) {
+        } else if (isDftypeEQ("C")) {
             return 3;
             return 3;
         } else if (isDBFind()) {
         } else if (isDBFind()) {
             return 4;
             return 4;
+        } else if (isDftypeEQ("B", "YN")){
+            return 5;
         }
         }
-        return 0;
+            return 0;
     }
     }
 
 
     public boolean isSelect() {
     public boolean isSelect() {
@@ -247,16 +250,14 @@ public class Approval {
         } else if ("C".equals(dfType) || "YN".equals(dfType)) {
         } else if ("C".equals(dfType) || "YN".equals(dfType)) {
             if (values.equals("-1")) values = "是";
             if (values.equals("-1")) values = "是";
             else if (values.equals("0")) values = "否";
             else if (values.equals("0")) values = "否";
-            if(!StringUtil.isEmpty(oldValues)){
+            if (!StringUtil.isEmpty(oldValues)) {
                 if (oldValues.equals("-1")) oldValues = "是";
                 if (oldValues.equals("-1")) oldValues = "是";
                 else if (oldValues.equals("0")) oldValues = "否";
                 else if (oldValues.equals("0")) oldValues = "否";
             }
             }
-
-
         } else if ("B".equals(dfType)) {
         } else if ("B".equals(dfType)) {
             if (values.equals("1")) values = "是";
             if (values.equals("1")) values = "是";
             else values = "否";
             else values = "否";
-            if(!StringUtil.isEmpty(oldValues)){
+            if (!StringUtil.isEmpty(oldValues)) {
                 if (oldValues.equals("1")) oldValues = "是";
                 if (oldValues.equals("1")) oldValues = "是";
                 else oldValues = "否";
                 else oldValues = "否";
             }
             }
@@ -268,11 +269,11 @@ public class Approval {
     }
     }
 
 
     public boolean isDftypeEQ(String... str) {
     public boolean isDftypeEQ(String... str) {
-        return isEQ(getDfType(),str);
+        return isEQ(getDfType(), str);
     }
     }
 
 
     public boolean isDBFind() {
     public boolean isDBFind() {
-        return isEQ(getDbFind(),"T","AT","M","DF");
+        return isEQ(getDbFind(), "T", "AT", "M", "DF");
     }
     }
 
 
     public boolean isEQ(String key, String... str) {
     public boolean isEQ(String key, String... str) {

+ 31 - 9
app_core/common/src/main/res/layout/item_approval_rv.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              style="@style/approvalStyle"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:paddingLeft="@dimen/paddingApp">
+    style="@style/approvalStyle"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingLeft="@dimen/paddingApp">
 
 
     <TextView
     <TextView
         android:id="@+id/captionTV"
         android:id="@+id/captionTV"
@@ -11,7 +11,7 @@
         android:layout_width="0dp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="10dp"
         android:layout_marginRight="10dp"
-        android:layout_weight="1"/>
+        android:layout_weight="1" />
 
 
     <FrameLayout
     <FrameLayout
         android:id="@+id/valuesFl"
         android:id="@+id/valuesFl"
@@ -26,7 +26,7 @@
             android:layout_height="match_parent"
             android:layout_height="match_parent"
             android:background="@drawable/edit_hint_right_angle"
             android:background="@drawable/edit_hint_right_angle"
             android:hint="@string/common_input2"
             android:hint="@string/common_input2"
-            android:textColor="@color/text_main"/>
+            android:textColor="@color/text_main" />
 
 
         <WebView
         <WebView
             android:id="@+id/valueWeb"
             android:id="@+id/valueWeb"
@@ -34,7 +34,7 @@
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:gravity="center|left"
             android:gravity="center|left"
-            android:visibility="gone"/>
+            android:visibility="gone" />
 
 
         <LinearLayout
         <LinearLayout
             android:id="@+id/valueLL"
             android:id="@+id/valueLL"
@@ -48,15 +48,37 @@
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:gravity="center|left"
                 android:gravity="center|left"
                 android:textColor="@color/text_main"
                 android:textColor="@color/text_main"
-                android:visibility="gone"/>
+                android:visibility="gone" />
 
 
             <TextView
             <TextView
                 android:id="@+id/valueTv"
                 android:id="@+id/valueTv"
                 style="@style/approvalItemStyle"
                 style="@style/approvalItemStyle"
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:gravity="center|left"
                 android:gravity="center|left"
-                android:textColor="@color/text_main"/>
+                android:textColor="@color/text_main" />
         </LinearLayout>
         </LinearLayout>
 
 
+        <RadioGroup
+            android:id="@+id/valuesRG"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <RadioButton
+                android:id="@+id/yesRB"
+                android:button="@drawable/oa_checkbox"
+                android:layout_width="wrap_content"
+                android:layout_marginRight="@dimen/padding"
+                android:layout_height="wrap_content"
+                android:text="是" />
+
+            <RadioButton
+                android:id="@+id/notRB"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_width="wrap_content"
+                android:button="@drawable/oa_checkbox"
+                android:layout_height="wrap_content"
+                android:text="否" />
+        </RadioGroup>
     </FrameLayout>
     </FrameLayout>
 </LinearLayout>
 </LinearLayout>

+ 1 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/CompanyContactsActivity.java

@@ -406,7 +406,7 @@ public class CompanyContactsActivity extends BaseActivity {
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.act_staff_query_list);
         setContentView(R.layout.act_staff_query_list);
-        getSupportActionBar().setTitle(getStri\ng(R.string.contact_company));
+        getSupportActionBar().setTitle(getString(R.string.contact_company));
         ct = this;
         ct = this;
         manager = new DBManager(ct);
         manager = new DBManager(ct);
         mInflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         mInflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

+ 50 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/ApprovalAdapter.java

@@ -12,9 +12,12 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup;
 import android.webkit.WebView;
 import android.webkit.WebView;
+import android.widget.CompoundButton;
 import android.widget.EditText;
 import android.widget.EditText;
 import android.widget.FrameLayout;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.ImageView;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
 import com.afollestad.materialdialogs.MaterialDialog;
 import com.afollestad.materialdialogs.MaterialDialog;
@@ -369,6 +372,7 @@ public class ApprovalAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
     }
     }
 
 
     private void bindBaseRVView(final BaseRVViewHodler holder, final int position) {
     private void bindBaseRVView(final BaseRVViewHodler holder, final int position) {
+        holder.valuesRG.setVisibility(View.GONE);
         final Approval approval = approvals.get(position);
         final Approval approval = approvals.get(position);
         holder.captionTV.setText(approval.getCaption());
         holder.captionTV.setText(approval.getCaption());
         holder.oldValueTv.setVisibility(View.GONE);
         holder.oldValueTv.setVisibility(View.GONE);
@@ -415,6 +419,19 @@ public class ApprovalAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
                         }
                         }
                     });
                     });
                     break;
                     break;
+                case 5:
+                    setViewShowAble(false, holder.valueEt);
+                    setViewShowAble(true, holder.valuesRG);
+                    if (approval.getValues().equals("是") || approval.getValues().equals("0")) {
+                        holder.yesRB.setChecked(true);
+                        holder.notRB.setChecked(false);
+                    } else {
+                        holder.yesRB.setChecked(false);
+                        holder.notRB.setChecked(true);
+                    }
+                    holder.valuesRG.setTag(position);
+                    holder.valuesRG.setOnCheckedChangeListener(mOnCheckedChangeListener);
+                    break;
                 case 1:
                 case 1:
                     holder.valueEt.setInputType(InputType.TYPE_CLASS_NUMBER);
                     holder.valueEt.setInputType(InputType.TYPE_CLASS_NUMBER);
                     holder.valueEt.addTextChangedListener(new TextChangListener(holder, position));
                     holder.valueEt.addTextChangedListener(new TextChangListener(holder, position));
@@ -447,6 +464,34 @@ public class ApprovalAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
         }
         }
     }
     }
 
 
+    private RadioGroup.OnCheckedChangeListener mOnCheckedChangeListener = new RadioGroup.OnCheckedChangeListener() {
+        @Override
+        public void onCheckedChanged(RadioGroup group, int checkedId) {
+            if (group.getTag() != null && group.getTag() instanceof Integer) {
+                int position = (int) group.getTag();
+                if (ListUtils.getSize(approvals) > position) {
+                    Approval approval = approvals.get(position);
+                    if (approval.inputType() == 5) {
+                        LogUtil.i("checkedId"+approval.getValues());
+                        if (checkedId == R.id.yesRB) {
+                            if (!"是".equals(approval.getValues())){
+                                approval.setValues("是");
+//                                notifyItemChanged(position);
+                            }
+                            LogUtil.i("checkedId == R.id.yesRB ");
+                        } else {
+                            LogUtil.i("checkedId !!!!!!= R.id.yesRB ");
+                            if (!"否".equals(approval.getValues())){
+                                approval.setValues("否");
+//                                notifyItemChanged(position);
+                            }
+                        }
+
+                    }
+                }
+            }
+        }
+    };
 
 
     private CharSequence getOldValues(String oldValues, String values) {
     private CharSequence getOldValues(String oldValues, String values) {
         return Html.fromHtml("<font color='#f10813'>" + values + "</font>");
         return Html.fromHtml("<font color='#f10813'>" + values + "</font>");
@@ -612,6 +657,8 @@ public class ApprovalAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
     private class BaseRVViewHodler extends BaseViewHolder {
     private class BaseRVViewHodler extends BaseViewHolder {
         WebView valueWeb;
         WebView valueWeb;
         TextView oldValueTv;
         TextView oldValueTv;
+        RadioGroup valuesRG;
+        RadioButton yesRB, notRB;
 
 
         public BaseRVViewHodler(ViewGroup parent) {
         public BaseRVViewHodler(ViewGroup parent) {
             this(LayoutInflater.from(ct).inflate(R.layout.item_approval_rv, parent, false));
             this(LayoutInflater.from(ct).inflate(R.layout.item_approval_rv, parent, false));
@@ -620,6 +667,9 @@ public class ApprovalAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
         public BaseRVViewHodler(View itemView) {
         public BaseRVViewHodler(View itemView) {
             super(itemView);
             super(itemView);
             valueWeb = (WebView) itemView.findViewById(R.id.valueWeb);
             valueWeb = (WebView) itemView.findViewById(R.id.valueWeb);
+            valuesRG = itemView.findViewById(R.id.valuesRG);
+            yesRB = itemView.findViewById(R.id.yesRB);
+            notRB = itemView.findViewById(R.id.notRB);
             oldValueTv = (TextView) itemView.findViewById(R.id.oldValueTv);
             oldValueTv = (TextView) itemView.findViewById(R.id.oldValueTv);
             oldValueTv.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); //删除线
             oldValueTv.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); //删除线
             oldValueTv.getPaint().setAntiAlias(true);// 抗锯齿
             oldValueTv.getPaint().setAntiAlias(true);// 抗锯齿

+ 13 - 3
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/ApprovaPresenter.java

@@ -34,6 +34,7 @@ import com.uas.appworks.OA.erp.activity.form.DataFormFieldActivity;
 import com.core.widget.view.selectcalendar.bean.Data;
 import com.core.widget.view.selectcalendar.bean.Data;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
@@ -864,7 +865,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
             if (!isMain) {
             if (!isMain) {
                 String findTionName = JSONUtil.getText(config, "DG_FINDFUNCTIONNAME");
                 String findTionName = JSONUtil.getText(config, "DG_FINDFUNCTIONNAME");
                 String renderer = JSONUtil.getText(config, "DG_RENDERER");
                 String renderer = JSONUtil.getText(config, "DG_RENDERER");
-                if (!StringUtil.isEmpty(findTionName)) {
+                if (!StringUtil.isEmpty(findTionName) && findTionName.contains("|")) {
                     int hhitem = findTionName.indexOf('|');
                     int hhitem = findTionName.indexOf('|');
                     String gCaller = findTionName.substring(0, hhitem);
                     String gCaller = findTionName.substring(0, hhitem);
                     String coreKey = findTionName.substring(hhitem + 1, findTionName.length());
                     String coreKey = findTionName.substring(hhitem + 1, findTionName.length());
@@ -876,7 +877,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
                     renderer = getOperator(renderer, data);
                     renderer = getOperator(renderer, data);
                     double val = MathUtil.eval(renderer);
                     double val = MathUtil.eval(renderer);
                     if (val != Double.NEGATIVE_INFINITY && val != Double.POSITIVE_INFINITY) {
                     if (val != Double.NEGATIVE_INFINITY && val != Double.POSITIVE_INFINITY) {
-                        newValues = String.valueOf(val);
+                        newValues = getDecimalFormat(val);
                     }
                     }
                 }
                 }
             }
             }
@@ -967,7 +968,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
                 continue;//如果不是要输入的对象,同时显示值为空,需要隐藏去
                 continue;//如果不是要输入的对象,同时显示值为空,需要隐藏去
             }
             }
             //合并字段
             //合并字段
-            if (mergeAble && !approval.isDBFind()&&!approval.isNeerInput()) {
+            if (mergeAble && !approval.isDBFind() && !approval.isNeerInput()) {
                 String valueTagKey = JSONUtil.getText(config, "FD_LOGICTYPE", "DG_LOGICTYPE");//获取第二个值的key
                 String valueTagKey = JSONUtil.getText(config, "FD_LOGICTYPE", "DG_LOGICTYPE");//获取第二个值的key
                 if (!StringUtil.isEmpty(valueTagKey)) {
                 if (!StringUtil.isEmpty(valueTagKey)) {
                     String valueTag = JSONUtil.getText(data, valueTagKey);
                     String valueTag = JSONUtil.getText(data, valueTagKey);
@@ -1079,6 +1080,15 @@ public class ApprovaPresenter implements OnHttpResultListener {
         return approval;
         return approval;
     }
     }
 
 
+    private DecimalFormat column2DF;
+
+    private String getDecimalFormat(double val) throws Exception {
+        if (column2DF == null) {
+            column2DF = new DecimalFormat("######0.00");
+        }
+        return column2DF.format(val);
+    }
+
     /**
     /**
      * itemData.caption //处理人名称
      * itemData.caption //处理人名称
      * itemData.type //处理人编号
      * itemData.type //处理人编号

+ 5 - 3
app_modular/apputils/src/main/java/com/modular/apputils/activity/SelectNetAcitivty.java

@@ -177,7 +177,7 @@ public class SelectNetAcitivty extends OABaseActivity {
             caller = intent.getStringExtra("caller");
             caller = intent.getStringExtra("caller");
             gCaller = intent.getStringExtra("gCaller");
             gCaller = intent.getStringExtra("gCaller");
             corekey = intent.getStringExtra("corekey");
             corekey = intent.getStringExtra("corekey");
-            isDevice = intent.getBooleanExtra("isDevice",false);
+            isDevice = intent.getBooleanExtra("isDevice", false);
         }
         }
         String baseUrl = CommonUtil.getAppBaseUrl(this);
         String baseUrl = CommonUtil.getAppBaseUrl(this);
         String sessionId = CommonUtil.getSharedPreferences(this, "sessionId");
         String sessionId = CommonUtil.getSharedPreferences(this, "sessionId");
@@ -294,7 +294,7 @@ public class SelectNetAcitivty extends OABaseActivity {
 
 
 
 
     private void setData2Adapter(JSONArray data, JSONArray dbfinds) throws Exception {
     private void setData2Adapter(JSONArray data, JSONArray dbfinds) throws Exception {
-         Map<String, String> configMap = new LinkedHashMap<>();
+        Map<String, String> configMap = new LinkedHashMap<>();
         //获取配置
         //获取配置
         JSONObject config = null;
         JSONObject config = null;
         String fieldKeyLike = null;
         String fieldKeyLike = null;
@@ -364,7 +364,9 @@ public class SelectNetAcitivty extends OABaseActivity {
     private <T> String getShowName(Map<String, T> object) throws Exception {
     private <T> String getShowName(Map<String, T> object) throws Exception {
         StringBuilder builder = new StringBuilder();
         StringBuilder builder = new StringBuilder();
         for (Map.Entry<String, T> e : object.entrySet()) {
         for (Map.Entry<String, T> e : object.entrySet()) {
-            builder.append(e.getValue() + ",");
+            if (!TextUtils.isEmpty(e.getValue() + "")) {
+                builder.append(e.getValue() + ",");
+            }
         }
         }
         StringUtil.removieLast(builder);
         StringUtil.removieLast(builder);
         return builder.toString();
         return builder.toString();

+ 42 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java

@@ -129,7 +129,8 @@ public class DeviceDataFormAddActivity extends BaseActivity implements View.OnCl
                     if (!ListUtils.isEmpty(mDatas)) mDatas.clear();
                     if (!ListUtils.isEmpty(mDatas)) mDatas.clear();
                     if (!ListUtils.isEmpty(mDatasNet)) mDatasNet.clear();
                     if (!ListUtils.isEmpty(mDatasNet)) mDatasNet.clear();
                     if (StringUtil.isEmpty(result)) return;
                     if (StringUtil.isEmpty(result)) return;
-                    LogUtil.prinlnLongMsg("result:", result);
+
+
                     JSONArray forms = JSON.parseObject(result).getJSONObject("data").getJSONArray("formdetail");
                     JSONArray forms = JSON.parseObject(result).getJSONObject("data").getJSONArray("formdetail");
                     grids = JSON.parseObject(result).getJSONObject("data").getJSONArray("gridetail");
                     grids = JSON.parseObject(result).getJSONObject("data").getJSONArray("gridetail");
                     //主表分组
                     //主表分组
@@ -186,6 +187,30 @@ public class DeviceDataFormAddActivity extends BaseActivity implements View.OnCl
                                 if (data.getName().equals("设备编号")) {
                                 if (data.getName().equals("设备编号")) {
                                     data.setValue(noCode);
                                     data.setValue(noCode);
                                 }
                                 }
+                                if (data.getName().equals("申请人编号")) {
+                                    data.setValue(CommonUtil.getEmcode());
+                                }
+                                if (data.getName().equals("申请人名称")) {
+                                    data.setValue(CommonUtil.getName());
+                                }
+                                if (data.getType().equals("D")) {
+                                    data.setValue(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
+                                }
+
+                                if (data.getField().equals("dc_class")) {
+                                    JSONArray combostore = JSONUtil.getJSONArray(items, "COMBOSTORE");
+                                    if (!ListUtils.isEmpty(combostore)) {
+                                        JSONObject combo = combostore.getJSONObject(0);
+                                        if (combo != null) {
+                                            String dcValue = JSONUtil.getText(combo, "DLC_VALUE");
+                                            String dcDisplay = JSONUtil.getText(combo, "DLC_DISPLAY");
+                                            data.setDisplayValue(dcDisplay);
+                                            data.setValue(dcValue);
+                                        }
+                                    }
+                                }
+
+
                                 data.setGroupId(formGroupId);
                                 data.setGroupId(formGroupId);
                                 data.setGroup(items.getString("fd_group"));
                                 data.setGroup(items.getString("fd_group"));
                                 data.setIsDefault(items.getIntValue("mfd_isdefault"));
                                 data.setIsDefault(items.getIntValue("mfd_isdefault"));
@@ -621,6 +646,22 @@ public class DeviceDataFormAddActivity extends BaseActivity implements View.OnCl
         }
         }
     }
     }
 
 
+    private String getNameByCaller() {
+        LogUtil.i("caller=" + caller);
+        switch (caller) {
+            case "DeviceChange!Use":
+                return "使用转移";
+            case "DeviceChange!Scrap":
+                return "报废申请";
+            case "DeviceChange!Maintain":
+                return "保养维护";
+            case "DeviceChange!Inspect":
+                return "故障送检";
+            default:
+                return "";
+        }
+    }
+
     private void initIds() {
     private void initIds() {
         lv_datas = (ListViewInScroller) findViewById(R.id.lv_datas);
         lv_datas = (ListViewInScroller) findViewById(R.id.lv_datas);
         click_btn = (Button) findViewById(R.id.click_btn);
         click_btn = (Button) findViewById(R.id.click_btn);

+ 2 - 0
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/BusinessTravelActivity.java

@@ -43,6 +43,8 @@ public class BusinessTravelActivity extends BaseNetActivity implements OnSmartHt
         loadData();
         loadData();
     }
     }
 
 
+
+
     @Override
     @Override
     protected String getBaseUrl() {
     protected String getBaseUrl() {
         return CommonUtil.getAppBaseUrl(BaseConfig.getContext());
         return CommonUtil.getAppBaseUrl(BaseConfig.getContext());

+ 28 - 12
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/BusinessTravelAdapter.java

@@ -16,6 +16,7 @@ import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
 import com.common.data.StringUtil;
 import com.common.hmac.Md5Util;
 import com.common.hmac.Md5Util;
+import com.core.app.MyApplication;
 import com.core.utils.CommonUtil;
 import com.core.utils.CommonUtil;
 import com.core.utils.IntentUtils;
 import com.core.utils.IntentUtils;
 import com.modular.apputils.widget.TravelDirectionView;
 import com.modular.apputils.widget.TravelDirectionView;
@@ -149,7 +150,7 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.tripTv.setText(fromCity + "-" + toCity);
         holder.tripTv.setText(fromCity + "-" + toCity);
         holder.mTravelDirectionView.setData(model.getSeat(), model.getAllTime());
         holder.mTravelDirectionView.setData(model.getSeat(), model.getAllTime());
         //改签
         //改签
-        if (StringUtil.getText(holder.doneTv).equals(DONE_CANCEL)&&1==2) {
+        if (StringUtil.getText(holder.doneTv).equals(DONE_CANCEL) && 1 == 2) {
             holder.changeTv.setVisibility(View.VISIBLE);
             holder.changeTv.setVisibility(View.VISIBLE);
             holder.changeTv.setBackgroundResource(R.drawable.text_frame_radian_hint_bg);
             holder.changeTv.setBackgroundResource(R.drawable.text_frame_radian_hint_bg);
             holder.changeTv.setTextColor(ct.getResources().getColor(R.color.text_hine));
             holder.changeTv.setTextColor(ct.getResources().getColor(R.color.text_hine));
@@ -166,7 +167,7 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         holder.whenLongTv.setText(whenLongTv);
         holder.whenLongTv.setText(whenLongTv);
         holder.businessNameTv.setText(model.getBusinessName());
         holder.businessNameTv.setText(model.getBusinessName());
         holder.numberTv.setText(model.getNumber() + "人");
         holder.numberTv.setText(model.getNumber() + "人");
-        holder.roomsTv.setText(model.getNumber() +"1间");
+        holder.roomsTv.setText(model.getNumber() + "1间");
         holder.addressTv.setText(model.getAddress());
         holder.addressTv.setText(model.getAddress());
         holder.dateTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD));
         holder.dateTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD));
         holder.numberSubTv.setText(model.getNumber() + "人");
         holder.numberSubTv.setText(model.getNumber() + "人");
@@ -308,22 +309,39 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
     }
     }
 
 
 
 
-
     private void cancel(BusinessTravel model) {
     private void cancel(BusinessTravel model) {
         reserve(model);
         reserve(model);
     }
     }
 
 
     private void reserve(BusinessTravel model) {
     private void reserve(BusinessTravel model) {
         Map<String, Object> map = new HashMap<>();
         Map<String, Object> map = new HashMap<>();
-        map.put("traverorderno", model.getCode());
+        map.put("traverorderno", "RES56884");
         map.put("product", model.getTitleCode());
         map.put("product", model.getTitleCode());
         map.put("costname", "成本中心");
         map.put("costname", "成本中心");
-        map.put("proname", "UU互联差旅订票");
-        map.put("fpd_id", model.getId());
-        map.put("master", CommonUtil.getMaster());
-        map.put("baseUrl", CommonUtil.getAppBaseUrl(ct));
-        map.put("emCode", CommonUtil.getEmcode());
+        map.put("proname", "所属项目");
+
+        //飞机
+        Map<String, String> routeMap = new HashMap<>();
+        routeMap.put("from", model.getStarting());
+        routeMap.put("fromcode", model.getStarting());
+        routeMap.put("arrive", model.getDestination());
+        routeMap.put("arrivecode", model.getDestination());
+        routeMap.put("startdata", DateFormatUtil.long2Str(model.getStartTime(), DateFormatUtil.YMD));
+        routeMap.put("arrivedate", DateFormatUtil.long2Str(model.getEndTime(), DateFormatUtil.YMD));
+        routeMap.put("isCanModify", "0");
+        map.put("route", JSON.toJSONString(routeMap));
+
+        //个人中心
+        Map<String, String> custinfoMap = new HashMap<>();
+        custinfoMap.put("backUrl", CommonUtil.getAppBaseUrl(ct));
+        custinfoMap.put("isNeedPush", "1");
+        custinfoMap.put("cusCode", CommonUtil.getMaster());
+        custinfoMap.put("emCode", CommonUtil.getEmcode());
+        custinfoMap.put("outOrderno", String.valueOf(model.getId()));
+        map.put("custinfo", JSON.toJSONString(routeMap));
+
         String p = JSONUtil.map2JSON(map);
         String p = JSONUtil.map2JSON(map);
+        LogUtil.i("p="+p);
         turn2Web(p);
         turn2Web(p);
     }
     }
 
 
@@ -331,7 +349,7 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         LogUtil.i("点击了改签");
         LogUtil.i("点击了改签");
         Map<String, Object> map = new HashMap<>();
         Map<String, Object> map = new HashMap<>();
         map.put("traverorderno", model.getCode());
         map.put("traverorderno", model.getCode());
-        map.put("product","airgq");
+        map.put("product", "airgq");
         map.put("costname", "成本中心");
         map.put("costname", "成本中心");
         map.put("proname", "UU互联差旅订票");
         map.put("proname", "UU互联差旅订票");
         map.put("fpd_id", model.getId());
         map.put("fpd_id", model.getId());
@@ -340,7 +358,6 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         map.put("emCode", CommonUtil.getEmcode());
         map.put("emCode", CommonUtil.getEmcode());
         String p = JSONUtil.map2JSON(map);
         String p = JSONUtil.map2JSON(map);
         turn2Web(p);
         turn2Web(p);
-
     }
     }
 
 
     private void turn2Web(String p) {
     private void turn2Web(String p) {
@@ -364,5 +381,4 @@ public class BusinessTravelAdapter extends RecyclerView.Adapter<RecyclerView.Vie
         IntentUtils.linkCommonWeb(ct, urlBuilder.toString(), "行旅国际", "", "", false, false, false);
         IntentUtils.linkCommonWeb(ct, urlBuilder.toString(), "行旅国际", "", "", false, false, false);
     }
     }
 
 
-
 }
 }

+ 22 - 5
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/model/BusinessTravel.java

@@ -15,7 +15,7 @@ import com.common.data.TextUtil;
 
 
 public class BusinessTravel {
 public class BusinessTravel {
     public static final int TITLE = 1;
     public static final int TITLE = 1;
-    public static final int AIR = 2;//
+    public static final int AIR = 2;
     public static final int HOTEL = 3;
     public static final int HOTEL = 3;
     private boolean expand;
     private boolean expand;
     private int id;//明细id
     private int id;//明细id
@@ -25,22 +25,39 @@ public class BusinessTravel {
     private long endTime;
     private long endTime;
     private String allTime;
     private String allTime;
     private String code;//订单编号
     private String code;//订单编号
-    private String starting;//开始时间
-    private String destination;
     private String status;//状态
     private String status;//状态
     private String orderType;
     private String orderType;
     private String seat;
     private String seat;
     private String realFee;
     private String realFee;
     private String expecteFee;
     private String expecteFee;
     private String level;//级别
     private String level;//级别
-    private String city;
-    private String address;
     private String payType;
     private String payType;
     private String businessName;
     private String businessName;
     private String remark;
     private String remark;
     private String title;
     private String title;
     private String cttpid;
     private String cttpid;
 
 
+    private String city;
+    private String address;
+    private String starting;
+    private String destination;
+
+    private String airStarting;
+    private String airStartingCode;
+    private String airDestination;
+    private String airDestinationCode;
+    private String trainStarting;
+    private String trainStartingCode;
+    private String trainDestination;
+    private String trainDestinationCode;
+    private String hotelCity;
+    private String hotelCityCode;
+    private String flightCode;
+
+
+
+
+
     public BusinessTravel() {
     public BusinessTravel() {
     }
     }
 
 

+ 9 - 1
app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceQueryActivity.java

@@ -370,7 +370,15 @@ public class DeviceQueryActivity extends BaseMVPActivity<WorkPlatPresenter> impl
     private void initConditions() {
     private void initConditions() {
         if ("Device".equals(mCaller)) {
         if ("Device".equals(mCaller)) {
             SchemeConditionBean schemeConditionBean
             SchemeConditionBean schemeConditionBean
-                    = initCondition("设备类型", "de_type", "S");
+                    = initCondition("设备编号", "de_code", "S");
+            mConditionBeans.add(schemeConditionBean);
+            mfuzzyConditionBeans.add(schemeConditionBean);
+
+            schemeConditionBean = initCondition("设备名称", "de_name", "S");
+            mConditionBeans.add(schemeConditionBean);
+            mfuzzyConditionBeans.add(schemeConditionBean);
+
+            schemeConditionBean = initCondition("设备类型", "de_type", "S");
             mConditionBeans.add(schemeConditionBean);
             mConditionBeans.add(schemeConditionBean);
             mfuzzyConditionBeans.add(schemeConditionBean);
             mfuzzyConditionBeans.add(schemeConditionBean);