/// <summary> /// 插入精炼出站物重记录 /// </summary> /// <param name="record"></param> /// <param name="type"></param> private void InsertRefineOutWeightRecord(CRANE_ACTION_RECORD_X record) { WST_WEIGHT_RECORD wRecord = new WST_WEIGHT_RECORD() { CRA = record.CRA_ID.CRA_NUM, CREAT_TIME = DateTime.Now, DEVICE = Wst.OBJ_ID.NUM, DEVICE_TYPE = 2, WST = Wst.NUM, IO_TYPE = 3, GROSS_WEIGHT = record.WEIGHT, TARE_WEIGHT = record.WEIGHT, END_TIME = record.OPERATION_TIME, TYPE = 4, FLAG = 0, }; wRecord.NET_WEIGHT = wRecord.GROSS_WEIGHT - wRecord.TARE_WEIGHT; CalculateWeightService.Instance.Insert_WST_WEIGHT_RECORD(wRecord); }
/// <summary> /// 插入铁水物重记录 /// </summary> /// <param name="record"></param> /// <param name="type"></param> private void InsertHmlWeightRecord(CRANE_ACTION_RECORD_X record) { WST_WEIGHT_RECORD wRecord = new WST_WEIGHT_RECORD() { CRA = record.CRA_ID.CRA_NUM, CREAT_TIME = DateTime.Now, DEVICE = Wst.OBJ_ID.NUM, DEVICE_TYPE = 1, WST = Wst.NUM, IO_TYPE = 1, GROSS_WEIGHT = record.WEIGHT, TARE_WEIGHT = (int)Convert.ToDouble(record.FIELD1), START_TIME = Convert.ToDateTime(record.FIELD2), END_TIME = record.OPERATION_TIME, TYPE = 2, FLAG = 0, CON_NUM = null, FIELD2 = null, NET_WEIGHT = record.WEIGHT - (int)Convert.ToDouble(record.FIELD1) }; CalculateWeightService.Instance.Insert_WST_WEIGHT_RECORD(wRecord); }
/// <summary> /// 插入记录 /// </summary> /// <param name="record"></param> public void Insert_WST_WEIGHT_RECORD(WST_WEIGHT_RECORD record) { OracleDataHelper.AddEntity(record); }