package com.fgkj.fbo;
|
|
import com.fgkj.dto.Com;
|
|
import java.util.Date;
|
|
public class IdcDataInf {
|
|
public static final int DevType_Idc = 0x13;
|
|
public int m_STDAH; //���������
|
public int m_EachBattSum; //��ظ�����
|
public int m_HourRate; //Сʱ�ʡ�
|
public int m_BattGroup;
|
public float m_MonomerVol;
|
public float m_MonomerType;
|
public float m_SumVolLL;
|
public float m_MonomerVolLL;
|
public int m_MonomerLLCount;
|
public int m_TestCap;
|
public int m_TestType;
|
public String m_TestTimeLong;
|
public String m_MasterCorp;
|
public String m_Filiale;
|
public String m_Subarea;
|
public String m_BureauNO;
|
public String m_BattGroupName;
|
|
public String m_BattProducer;
|
public Date m_BattProducedTime;
|
public Date m_BattFirstUsedTime;
|
public String m_VictorMan;
|
public Date m_TestTime;
|
public String m_ContactPhone;
|
public String m_StopType;
|
public String m_TestDevice;
|
public String m_Remark;
|
|
private int StrToInt(String str)
|
{
|
return Integer.parseInt(str);
|
}
|
|
public void setDataInf(byte[] inf_data)
|
{
|
int IDCtype = 0;
|
String tmpstr = new String(inf_data);
|
//System.out.println(tmpstr);
|
for (int i=0; i<17; i++)
|
{
|
int j = tmpstr.indexOf(",");
|
if(i == 6) //--------�������
|
{
|
String text = tmpstr.substring(0,j).trim();
|
if(text != "")
|
m_STDAH = StrToInt(text);
|
else m_STDAH = 1000;
|
}
|
if(i == 7) //--------�����ѹ
|
{
|
String text = tmpstr.substring(0,j).trim();
|
if(text != "")
|
m_MonomerVol = StrToInt(text);
|
else m_MonomerVol = 2;
|
}
|
if(i == 8) //--------Сʱ��
|
{
|
String text = tmpstr.substring(0,j).trim();
|
if(text != "")
|
m_HourRate = StrToInt(text);
|
else m_HourRate = 10;
|
}
|
if(i == 11) //--------�������
|
{
|
String text = tmpstr.substring(0,j).trim();
|
if(text != "")
|
m_BattGroup = StrToInt(text);
|
}
|
if(i == 12) //--------��������
|
{
|
String text = tmpstr.substring(0,j).trim();
|
if(text != "") m_EachBattSum = StrToInt(text);
|
else m_EachBattSum = 24;
|
if(IDCtype == 0)
|
{
|
if(m_EachBattSum > 250) m_EachBattSum = 24;
|
}
|
else if(m_EachBattSum > 24) m_EachBattSum = 24;
|
}
|
if (i == 0) m_Filiale = tmpstr.substring(0,j).trim(); //�ֹ�˾
|
if (i == 1) m_Subarea = tmpstr.substring(0,j).trim(); //����
|
if (i == 2) m_BattGroupName = tmpstr.substring(0,j).trim(); //���������
|
if (i == 3)
|
{
|
String testtime = tmpstr.substring(0,j).trim();
|
if(testtime.contains(" ")) {
|
testtime.replace(" ", " ");
|
}
|
|
m_TestTime = IdcTestTime.getDateFromStr(testtime); //����ʱ��
|
}
|
if (i == 4) m_BattProducer = tmpstr.substring(0,j).trim(); //���Ʒ��
|
//if (i == 5) m_BattType = tmpstr.SubString(1,j).Trim(); //����ͺ�
|
if (i == 9) m_VictorMan = tmpstr.substring(0,j).trim(); //ά����Ա
|
//System.out.println(tmpstr);
|
if (i == 10) m_ContactPhone = tmpstr.substring(0,j).trim(); //��ϵ�绰
|
if (i == 13) m_BureauNO = tmpstr.substring(0,j).trim(); //��վ���
|
if (i == 14)
|
{
|
if(tmpstr.substring(0,j).trim() != "") //�����������
|
m_BattProducedTime = Com.get_DT_FromStr(tmpstr.substring(0,j).trim(), Com.DTF_YMD);
|
}
|
if (i == 15)
|
{
|
if(tmpstr.substring(0,j).trim() != "") //���Ͷ��ʹ������
|
m_BattFirstUsedTime = Com.get_DT_FromStr(tmpstr.substring(0,j).trim(), Com.DTF_YMD);
|
}
|
if (i == 16)
|
{
|
m_Remark = tmpstr.substring(0,j).trim();//��ע
|
}
|
|
if(i>10)
|
tmpstr += " , ";
|
tmpstr = tmpstr.substring(j+1, tmpstr.length()).trim();
|
}
|
}
|
}
|