|
|
@@ -11,6 +11,7 @@ import android.support.v7.widget.DividerItemDecoration;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.Editable;
|
|
|
+import android.text.InputType;
|
|
|
import android.text.TextWatcher;
|
|
|
import android.util.Base64;
|
|
|
import android.util.Log;
|
|
|
@@ -134,6 +135,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
private RecyclerView rv_datapassqty;
|
|
|
private SelectAdapterQty selectAdapterQty;
|
|
|
private ArrayList<StorageRechargeAloneBean> passFeededListQty;
|
|
|
+ private String inputceqty;
|
|
|
+
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_breakdownrepair;
|
|
|
@@ -709,6 +712,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 不良数量
|
|
|
+ */
|
|
|
public void getqty(){
|
|
|
passFeededListQty = new ArrayList<>();
|
|
|
selectAdapterQty = new SelectAdapterQty(passFeededListQty);
|
|
|
@@ -725,6 +731,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("3");
|
|
|
list.add("4");
|
|
|
list.add("5");
|
|
|
+ list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
JSONObject object_1 = new JSONObject();
|
|
|
@@ -759,110 +766,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
|
|
|
|
|
|
- public void getNewSNData(String va_code){
|
|
|
-
|
|
|
- if (tv_dc_emcode.getText().toString().trim().isEmpty()){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- JSONArray jsonArray = new JSONArray();
|
|
|
- JSONObject object_1 = new JSONObject();
|
|
|
- String alonedataone = null;
|
|
|
- String alonedatatwo = null;
|
|
|
- String alonedatathree = null;
|
|
|
- String Qtycetwo = null;
|
|
|
- String ce_work_codetrim = tv_gonema_code.getText().toString().trim();
|
|
|
- String at_stationtrim = at_station.getText().toString().trim();
|
|
|
- ArrayList<StorageRechargeAloneBean> selectedItemone = myAdapterone.getSelectedItem();
|
|
|
- if (selectedItemone.size()==0){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
|
|
|
- object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
- }else {
|
|
|
- for (int i=0;i<selectedItemone.size();i++){
|
|
|
- if (selectedItemone.get(i).getAlonedata().equals("其他")){
|
|
|
- alonedataone=selectedItemone.get(i).getInputce();
|
|
|
- if (StringUtil.isEmpty(alonedataone)){
|
|
|
- object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
- }}else {
|
|
|
- alonedataone = selectedItemone.get(i).getAlonedata();
|
|
|
- object_1.put("SR_BADNAME",alonedataone);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- ArrayList<StorageRechargeAloneBean> selectedItemtwo = myAdaptertwo.getSelectedItem();
|
|
|
- if (selectedItemone.size()==0){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
|
|
|
- object_1.put("SR_BADLOCATIONREMARK",null);//不良位号
|
|
|
- }else {
|
|
|
- if (selectedItemone.get(0).getAlonedata().equals("其他")){
|
|
|
- alonedatatwo=selectedItemtwo.get(0).getInputce();
|
|
|
- if (StringUtil.isEmpty(alonedatatwo)){
|
|
|
- object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
|
|
|
- }
|
|
|
- }else {
|
|
|
- if (StringUtil.isEmpty(selectedItemtwo.get(0).getQtyce())){
|
|
|
- Qtycetwo="0";
|
|
|
- }else {
|
|
|
- Qtycetwo=selectedItemtwo.get(0).getQtyce();
|
|
|
- }
|
|
|
- alonedatatwo = selectedItemtwo.get(0).getAlonedata()+""+Qtycetwo;
|
|
|
- object_1.put("SR_LOCATION", alonedatatwo);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- ArrayList<StorageRechargeAloneBean> selectedItemthree = myAdapterthree.getSelectedItem();
|
|
|
- if (selectedItemone.size()==0){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
|
|
|
- object_1.put("SR_BADREASONREMARK",null);//原因
|
|
|
- }else {
|
|
|
- if (selectedItemone.get(0).getAlonedata().equals("其他")){
|
|
|
- alonedatathree=selectedItemthree.get(0).getInputce();
|
|
|
- if (StringUtil.isEmpty(alonedatathree)){
|
|
|
- object_1.put("SR_BADREASONREMARK", null);//原因
|
|
|
- }
|
|
|
-
|
|
|
- }else {
|
|
|
- alonedatathree = selectedItemthree.get(0).getAlonedata();
|
|
|
- object_1.put("SR_REASON", alonedatathree);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- object_1.put("SR_ID", "");
|
|
|
- object_1.put("SR_MAKECODE", ce_work_codetrim);//工单号
|
|
|
- object_1.put("SR_SOURCECODE", at_stationtrim);//资源
|
|
|
- object_1.put("SR_PASSQTY", "0");//通过数量
|
|
|
- object_1.put("SR_NGQTY", "1");//NG数量
|
|
|
- object_1.put("SR_TYPE", "性能维修");//种类(数据采集/、外观维修/性能维修)
|
|
|
- object_1.put("SR_SN", va_code);//SN号
|
|
|
- object_1.put("SR_REMARK", "");//备注/其他
|
|
|
- object_1.put("SR_INMAN", "");//录入人
|
|
|
- object_1.put("SR_INDATE", "");//录入时间
|
|
|
- object_1.put("SR_EMCODE", tv_dc_emcode.getText().toString().trim());//人员编号
|
|
|
- jsonArray.add(object_1);
|
|
|
- progressDialog.show();
|
|
|
- VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
- .url(GloableParams.ASTATIONTHE_SELECT_COLLECTDATA)
|
|
|
- .method(Request.Method.POST)
|
|
|
- .addParam("datainto", jsonArray.toJSONString())
|
|
|
- .build(), new HttpCallback() {
|
|
|
- @Override
|
|
|
- public void onSuccess(int flag, Object o) throws Exception {
|
|
|
- progressDialog.dismiss();
|
|
|
- CommonUtil.toastYESRepeat(mActivity, "条码号请求成功");
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onFail(int flag, String failStr) throws Exception {
|
|
|
- progressDialog.dismiss();
|
|
|
- CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
String ec_passqtytrim;
|
|
|
String number ="";
|
|
|
public void getNewSaveData(){
|
|
|
@@ -882,13 +785,19 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
String at_stationtrim = at_station.getText().toString().trim();
|
|
|
ArrayList<StorageRechargeAloneBean> selectedItemone = myAdapterone.getSelectedItem();
|
|
|
if (selectedItemone.size()==0){
|
|
|
- object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
+// object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
|
|
|
+ return;
|
|
|
}else {
|
|
|
for (int i=0;i<selectedItemone.size();i++){
|
|
|
if (selectedItemone.get(i).getAlonedata().equals("其他")){
|
|
|
alonedataone=selectedItemone.get(i).getInputce();
|
|
|
if (StringUtil.isEmpty(alonedataone)){
|
|
|
- object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
+// object_1.put("SR_BADNAMEREMARK",null);//不良现象
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请填写不良现象");
|
|
|
+ return;
|
|
|
+ }else {
|
|
|
+ object_1.put("SR_BADNAME",alonedataone);
|
|
|
}}else {
|
|
|
alonedataone = selectedItemone.get(i).getAlonedata();
|
|
|
object_1.put("SR_BADNAME",alonedataone);
|
|
|
@@ -898,20 +807,24 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
ArrayList<StorageRechargeAloneBean> selectedItemtwo = myAdaptertwo.getSelectedItem();
|
|
|
if (selectedItemtwo.size() == 0){
|
|
|
-// CommonUtil.toastNoRepeat(mActivity, "请选择不良位号");//不良位号
|
|
|
- object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择不良位号");//不良位号
|
|
|
+ return;
|
|
|
+// object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
|
|
|
}else {
|
|
|
for (int i=0;i<selectedItemtwo.size();i++){
|
|
|
String alonedata = selectedItemtwo.get(i).getAlonedata();
|
|
|
if (alonedata.equals("其他")){
|
|
|
alonedatatwo=selectedItemtwo.get(i).getInputce();
|
|
|
if (StringUtil.isEmpty(alonedatatwo)){
|
|
|
- object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
|
|
|
+// object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请填写不良位号");
|
|
|
+ return;
|
|
|
}else {
|
|
|
if (alonedatatwo.equals("0")){
|
|
|
CommonUtil.toastNoRepeat(mActivity, "不良位号不可为0");
|
|
|
return;
|
|
|
}
|
|
|
+ object_1.put("SR_LOCATION", alonedatatwo);
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
@@ -933,16 +846,20 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
ArrayList<StorageRechargeAloneBean> selectedItemthree = myAdapterthree.getSelectedItem();
|
|
|
if (selectedItemthree.size()==0){
|
|
|
- object_1.put("SR_BADREASONREMARK", null);//原因
|
|
|
+// object_1.put("SR_BADREASONREMARK", null);//原因
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择不良原因");
|
|
|
+ return;
|
|
|
}else {
|
|
|
for (int i=0;i<selectedItemthree.size();i++){
|
|
|
String alonedata = selectedItemthree.get(i).getAlonedata();
|
|
|
if (alonedata.equals("其他")){
|
|
|
alonedatathree=selectedItemthree.get(i).getInputce();
|
|
|
if (StringUtil.isEmpty(alonedatathree)){
|
|
|
- object_1.put("SR_BADREASONREMARK", null);//原因
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请填写不良原因");
|
|
|
+ return;
|
|
|
}
|
|
|
-
|
|
|
+// object_1.put("SR_BADREASONREMARK", alonedatathree);//原因
|
|
|
+ object_1.put("SR_REASON", alonedatathree);//原因
|
|
|
}else {
|
|
|
alonedatathree = selectedItemthree.get(0).getAlonedata();
|
|
|
object_1.put("SR_REASON", alonedatathree);
|
|
|
@@ -958,6 +875,15 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}else {
|
|
|
for (int i=0;i<selectAdapterQtySelectedItem.size();i++){
|
|
|
ec_passqtytrim = selectAdapterQtySelectedItem.get(i).getAlonedata();
|
|
|
+ if (ec_passqtytrim.equals("其他")){
|
|
|
+ inputceqty = selectAdapterQtySelectedItem.get(i).getInputce();
|
|
|
+ if (StringUtil.isEmpty(inputceqty)){
|
|
|
+ ec_passqtytrim="1";
|
|
|
+ }else {
|
|
|
+ ec_passqtytrim=inputceqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1027,6 +953,10 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 不良现象
|
|
|
+ */
|
|
|
public void recycleDataone(){
|
|
|
mFeededListone = new ArrayList<>();
|
|
|
myAdapterone = new SelectAdapterone(mFeededListone);
|
|
|
@@ -1043,11 +973,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("电压低");
|
|
|
list.add("电流高");
|
|
|
list.add("电流低");
|
|
|
- list.add("波纹大");
|
|
|
- list.add("波纹小");
|
|
|
+ list.add("纹波大");
|
|
|
list.add("起机慢");
|
|
|
- list.add("AC短路");
|
|
|
- list.add("DC短路");
|
|
|
+ list.add("短路");
|
|
|
list.add("OCP不保护");
|
|
|
list.add("电压跳变");
|
|
|
list.add("拐点不良");
|
|
|
@@ -1055,6 +983,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("绝缘电阻");
|
|
|
list.add("误测");
|
|
|
list.add("能效不良");
|
|
|
+ list.add("DC短路");
|
|
|
+ list.add("纹波小");
|
|
|
list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
@@ -1089,6 +1019,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
rv_one.setAdapter(myAdapterone);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 不良位号
|
|
|
+ */
|
|
|
public void recycleDatatwo(){
|
|
|
mFeededListtwo = new ArrayList<>();
|
|
|
myAdaptertwo = new SelectAdaptertwo(mFeededListtwo);
|
|
|
@@ -1110,6 +1043,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("F");
|
|
|
list.add("R");
|
|
|
list.add("LF");
|
|
|
+ list.add("LED");
|
|
|
+ list.add("RT");
|
|
|
+ list.add("EC");
|
|
|
+ list.add("USB");
|
|
|
+ list.add("DC线");
|
|
|
list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
@@ -1145,8 +1083,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 不良原因
|
|
|
+ */
|
|
|
public void recycleDatathree(){
|
|
|
mFeededListthree = new ArrayList<>();
|
|
|
myAdapterthree = new SelectAdapterthree(mFeededListthree);
|
|
|
@@ -1162,8 +1101,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("空焊");
|
|
|
list.add("连锡");
|
|
|
list.add("少件");
|
|
|
- list.add("返向");
|
|
|
- list.add("解除不良");
|
|
|
+ list.add("反向");
|
|
|
+ list.add("接触不良");
|
|
|
list.add("线路断");
|
|
|
list.add("铜皮起翘");
|
|
|
list.add("误测");
|
|
|
@@ -2134,7 +2073,17 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
//设置条目状态
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setTextSize(15);
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
|
|
|
- ((SelectAdapterQty.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
+ ((SelectAdapterQty.ListItemViewHolder) holder).ce_other.setInputType(InputType.TYPE_CLASS_NUMBER);
|
|
|
+ if (mList.get(i).getAlonedata().equals("其他")){
|
|
|
+ (( SelectAdapterQty.ListItemViewHolder) holder).ce_other.setVisibility(View.VISIBLE);
|
|
|
+ }else {
|
|
|
+ (( SelectAdapterQty.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// ((ListItemViewHolder) holder).checkBox.setChecked();
|
|
|
//checkBox的监听
|
|
|
((SelectAdapterQty.ListItemViewHolder) holder).checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|