package com.wd.workoffice.ui.activity.bat.work;

import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.DeviceBean;
import com.wd.workoffice.bean.SendApplyDetailBean;
import com.wd.workoffice.ui.adapter.SendApplyDetailAdapter;

import java.util.List;
import java.util.Map;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 設備详情
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class DeviceDetailActivity extends WorkToolBarActivity {
    @BindView(R.id.tv_type)
    TextView tvType;
    @BindView(R.id.tv_big_clazz)
    TextView tvBigClazz;
    @BindView(R.id.tv_small_clazz)
    TextView tvSmallClazz;
    @BindView(R.id.tv_desc)
    TextView tvDesc;
    @BindView(R.id.tv_money_card)
    TextView tvMoneyCard;
    @BindView(R.id.tv_spec)
    TextView tvSpec;
    @BindView(R.id.tv_order)
    TextView tvOrder;
    @BindView(R.id.tv_make_time)
    TextView tvMakeTime;
    @BindView(R.id.tv_install_time)
    TextView tvInstallTime;
    @BindView(R.id.tv_valid_time)
    TextView tvValidTime;
    @BindView(R.id.tv_check_time)
    TextView tvCheckTime;
    @BindView(R.id.tv_check_month)
    TextView tvCheckMonth;
    @BindView(R.id.tv_code)
    TextView tvCode;
    private DeviceBean.RecordsBean info;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
    }


    @Override
    protected void initData() {
        info = JSON.parseObject(getIntent().getStringExtra("info"), DeviceBean.RecordsBean.class);
        tvCode.setText(info.getAssetCode());
        tvType.setText(String.valueOf(info.getAssetCode()));
        tvBigClazz.setText(String.valueOf(info.getEquipmentCategory()));
        tvSmallClazz.setText(info.getEquipmentSubcategory());
        tvDesc.setText(info.getDescription());
        tvMoneyCard.setText(info.getCardCode());
        tvSpec.setText(info.getSpecification());
        tvOrder.setText(info.getSerialCode());
        tvMakeTime.setText(info.getManufactureDate());
        tvInstallTime.setText(info.getInstallDate());
        tvValidTime.setText(info.getEffectiveDate());
        tvCheckTime.setText(info.getVerificationDate());
        tvCheckMonth.setText(info.getVerificationCycle()+"");
    }


    @Override
    protected void initEvent() {
    }

    @Override
    protected int layoutId() {
        return R.layout.activity_device_detail;
    }


}
