| @ -0,0 +1,103 @@ | |||||
| package com.qhclh.ytzh.bean; | |||||
| import java.math.BigDecimal; | |||||
| /** | |||||
| * Created by 青花瓷 on 2017/12/7. | |||||
| */ | |||||
| public class DailyDetailsBean { | |||||
| private long House_ID; | |||||
| private String House_Name; | |||||
| private int Days; | |||||
| private int DieNumber; | |||||
| private int Obsolete; | |||||
| private BigDecimal WaterIntake; | |||||
| private BigDecimal Weight; | |||||
| private String mingxi; | |||||
| public String getMingxi() { | |||||
| return mingxi; | |||||
| } | |||||
| public void setMingxi(String mingxi) { | |||||
| this.mingxi = mingxi; | |||||
| } | |||||
| public DailyDetailsBean(long house_ID, String house_Name, int days, int dieNumber, int obsolete, BigDecimal waterIntake, BigDecimal weight, String mingxi) { | |||||
| House_ID = house_ID; | |||||
| House_Name = house_Name; | |||||
| Days = days; | |||||
| DieNumber = dieNumber; | |||||
| Obsolete = obsolete; | |||||
| WaterIntake = waterIntake; | |||||
| Weight = weight; | |||||
| this.mingxi = mingxi; | |||||
| } | |||||
| public DailyDetailsBean(long house_ID, String house_Name, int days, int dieNumber, int obsolete, BigDecimal waterIntake, BigDecimal weight) { | |||||
| House_ID = house_ID; | |||||
| House_Name = house_Name; | |||||
| Days = days; | |||||
| DieNumber = dieNumber; | |||||
| Obsolete = obsolete; | |||||
| WaterIntake = waterIntake; | |||||
| Weight = weight; | |||||
| } | |||||
| public long getHouse_ID() { | |||||
| return House_ID; | |||||
| } | |||||
| public void setHouse_ID(long house_ID) { | |||||
| House_ID = house_ID; | |||||
| } | |||||
| public String getHouse_Name() { | |||||
| return House_Name; | |||||
| } | |||||
| public void setHouse_Name(String house_Name) { | |||||
| House_Name = house_Name; | |||||
| } | |||||
| public int getDays() { | |||||
| return Days; | |||||
| } | |||||
| public void setDays(int days) { | |||||
| Days = days; | |||||
| } | |||||
| public int getDieNumber() { | |||||
| return DieNumber; | |||||
| } | |||||
| public void setDieNumber(int dieNumber) { | |||||
| DieNumber = dieNumber; | |||||
| } | |||||
| public int getObsolete() { | |||||
| return Obsolete; | |||||
| } | |||||
| public void setObsolete(int obsolete) { | |||||
| Obsolete = obsolete; | |||||
| } | |||||
| public BigDecimal getWaterIntake() { | |||||
| return WaterIntake; | |||||
| } | |||||
| public void setWaterIntake(BigDecimal waterIntake) { | |||||
| WaterIntake = waterIntake; | |||||
| } | |||||
| public BigDecimal getWeight() { | |||||
| return Weight; | |||||
| } | |||||
| public void setWeight(BigDecimal weight) { | |||||
| Weight = weight; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,86 @@ | |||||
| package com.qhclh.ytzh.work.productiondailyw; | |||||
| import android.content.Context; | |||||
| import android.view.LayoutInflater; | |||||
| import android.view.View; | |||||
| import android.view.ViewGroup; | |||||
| import android.widget.BaseAdapter; | |||||
| import android.widget.EditText; | |||||
| import android.widget.TextView; | |||||
| import com.qhclh.ytzh.R; | |||||
| import com.qhclh.ytzh.bean.DailyDetailsBean; | |||||
| import java.util.List; | |||||
| /** | |||||
| * Created by 青花瓷 on 2017/12/7. | |||||
| */ | |||||
| public class DailyDetailsAdapter extends BaseAdapter { | |||||
| private Context context; | |||||
| private List<DailyDetailsBean> list; | |||||
| private LayoutInflater layoutInflater; | |||||
| public DailyDetailsAdapter(Context context, List<DailyDetailsBean> list) { | |||||
| this.context = context; | |||||
| this.list = list; | |||||
| layoutInflater = LayoutInflater.from(context); | |||||
| } | |||||
| @Override | |||||
| public int getCount() { | |||||
| return list.size(); | |||||
| } | |||||
| @Override | |||||
| public Object getItem(int i) { | |||||
| return list.get(i); | |||||
| } | |||||
| @Override | |||||
| public long getItemId(int i) { | |||||
| return list.get(i).getHouse_ID(); | |||||
| } | |||||
| @Override | |||||
| public View getView(int i, View view, ViewGroup viewGroup) { | |||||
| ViewHolder viewHolder; | |||||
| DailyDetailsBean message = list.get(i); | |||||
| if (view == null){ | |||||
| view = layoutInflater.inflate(R.layout.item_dailydetail,viewGroup,false); | |||||
| viewHolder = new ViewHolder(); | |||||
| viewHolder.dailyd_title = view.findViewById(R.id.dailyd_title); | |||||
| viewHolder.dailyd_buildinghome = view.findViewById(R.id.dailyd_buildinghome); | |||||
| viewHolder.dailyd_dayage = view.findViewById(R.id.dailyd_dayage); | |||||
| viewHolder.dailyd_death = view.findViewById(R.id.dailyd_death); | |||||
| viewHolder.dailyd_eliminate = view.findViewById(R.id.dailyd_eliminate); | |||||
| viewHolder.dailyd_water = view.findViewById(R.id.dailyd_water); | |||||
| viewHolder.dailyd_weight = view.findViewById(R.id.dailyd_weight); | |||||
| view.setTag(viewHolder); | |||||
| }else { | |||||
| viewHolder = (ViewHolder) view.getTag(); | |||||
| } | |||||
| viewHolder.dailyd_title.setText(message.getMingxi()+""); | |||||
| viewHolder.dailyd_buildinghome.setText(message.getHouse_Name()+""); | |||||
| viewHolder.dailyd_dayage.setText(message.getDays()+""); | |||||
| viewHolder.dailyd_death.setText(message.getDieNumber()+""); | |||||
| viewHolder.dailyd_eliminate.setText(message.getObsolete()+""); | |||||
| viewHolder.dailyd_water.setText(message.getWaterIntake()+""); | |||||
| viewHolder.dailyd_weight.setText(message.getWeight()+""); | |||||
| return view; | |||||
| } | |||||
| private class ViewHolder{ | |||||
| private TextView dailyd_title; | |||||
| private TextView dailyd_buildinghome; | |||||
| private EditText dailyd_dayage; | |||||
| private EditText dailyd_death; | |||||
| private EditText dailyd_eliminate; | |||||
| private EditText dailyd_water; | |||||
| private EditText dailyd_weight; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,90 @@ | |||||
| package com.qhclh.ytzh.work.productiondailyw; | |||||
| import android.support.v7.widget.Toolbar; | |||||
| import android.view.Menu; | |||||
| import android.view.MenuItem; | |||||
| import android.view.View; | |||||
| import android.widget.AdapterView; | |||||
| import android.widget.ArrayAdapter; | |||||
| import android.widget.ListView; | |||||
| import android.widget.Spinner; | |||||
| import com.qhclh.ytzh.R; | |||||
| import com.qhclh.ytzh.base.BaseActivity; | |||||
| import com.qhclh.ytzh.bean.DailyDetailsBean; | |||||
| import com.qhclh.ytzh.home.RpcUrl; | |||||
| import com.qhclh.ytzh.tasks.ViewOnClickTask; | |||||
| import org.forks.jsonrpc.JsonRpcResult; | |||||
| import org.forks.jsonrpc.RpcFacade; | |||||
| import org.forks.jsonrpc.RpcObject; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | |||||
| import java.util.List; | |||||
| import butterknife.BindView; | |||||
| /** | |||||
| * Created by 青花瓷 on 2017/12/7. | |||||
| */ | |||||
| ///< 重新写 生产日报 | |||||
| public class WdailyActivity extends BaseActivity { | |||||
| @BindView(R.id.toolbar) | |||||
| Toolbar mToolbar; | |||||
| @BindView(R.id.wdaily_lv) | |||||
| ListView wdaily_lv; | |||||
| private List<DailyDetailsBean> list; | |||||
| private DailyDetailsAdapter adapter; | |||||
| @Override | |||||
| protected int setLayoutId() { | |||||
| return R.layout.act_wproductiondaily; | |||||
| } | |||||
| @Override | |||||
| protected void initView() { | |||||
| initToolbar(mToolbar, "生产日报", new View.OnClickListener() { | |||||
| @Override | |||||
| public void onClick(View view) { | |||||
| finish(); | |||||
| } | |||||
| }); | |||||
| } | |||||
| @Override | |||||
| protected void initData() { | |||||
| list=new ArrayList<>(); | |||||
| for (int i=0;i<5;i++){ | |||||
| list.add(new DailyDetailsBean(i,"aaa1"+i,i+1,i+2,i+3,new BigDecimal(i+4),new BigDecimal(i+5),"单据明细"+i)); | |||||
| } | |||||
| adapter = new DailyDetailsAdapter(this,list); | |||||
| wdaily_lv.setAdapter(adapter); | |||||
| } | |||||
| @Override | |||||
| protected void initOper() { | |||||
| } | |||||
| @Override | |||||
| protected void onResume() { | |||||
| super.onResume(); | |||||
| } | |||||
| @Override | |||||
| public boolean onCreateOptionsMenu(Menu menu) { | |||||
| getMenuInflater().inflate(R.menu.commit, menu); | |||||
| return true; | |||||
| } | |||||
| @Override | |||||
| public boolean onOptionsItemSelected(MenuItem item) { | |||||
| switch (item.getItemId()) { | |||||
| case R.id.commit_dailys: | |||||
| break; | |||||
| } | |||||
| return super.onOptionsItemSelected(item); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,20 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="match_parent" | |||||
| android:background="@color/greyf4f4f4" | |||||
| android:orientation="vertical"> | |||||
| <include layout="@layout/include_tool_bar" /> | |||||
| <ListView | |||||
| android:id="@+id/wdaily_lv" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="match_parent" | |||||
| android:background="@color/white" | |||||
| android:scrollbars="none"> | |||||
| </ListView> | |||||
| </LinearLayout> | |||||
| @ -0,0 +1,190 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/greyf4f4f4" | |||||
| android:orientation="vertical"> | |||||
| <TextView | |||||
| android:id="@+id/dailyd_title" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:textSize="@dimen/text_size_16" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/buildinghomes1" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <TextView | |||||
| android:id="@+id/dailyd_buildinghome" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/dayage1" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <EditText | |||||
| android:id="@+id/dailyd_dayage" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10" | |||||
| android:visibility="gone"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/survival" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <TextView | |||||
| android:id="@+id/production_info_survival" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/death1" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <EditText | |||||
| android:id="@+id/dailyd_death" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/eliminate" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <EditText | |||||
| android:id="@+id/dailyd_eliminate" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/water" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <EditText | |||||
| android:id="@+id/dailyd_water" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| <LinearLayout | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:background="@color/white" | |||||
| android:orientation="horizontal" | |||||
| android:padding="@dimen/dp_10"> | |||||
| <TextView | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | |||||
| android:text="@string/weight1" | |||||
| android:textColor="@color/grey888888" | |||||
| android:textSize="@dimen/text_size_18" /> | |||||
| <EditText | |||||
| android:id="@+id/dailyd_weight" | |||||
| android:layout_width="match_parent" | |||||
| android:layout_height="wrap_content" | |||||
| android:layout_marginLeft="@dimen/dp_5" | |||||
| android:textColor="@color/black303030" | |||||
| android:textSize="@dimen/text_size_20" /> | |||||
| </LinearLayout> | |||||
| <include layout="@layout/include_line" /> | |||||
| </LinearLayout> | |||||
| @ -0,0 +1,8 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | |||||
| xmlns:app="http://schemas.android.com/apk/res-auto"> | |||||
| <item android:id="@+id/commit_dailys" | |||||
| android:title="@string/commit" | |||||
| android:orderInCategory="70" | |||||
| app:showAsAction="always" /> | |||||
| </menu> | |||||