dev
dengyu 3 weeks ago
parent 7897401cae
commit d39581ceaf

@ -202,7 +202,7 @@ public class CM_CurrentStateRes: BaseFieldRes
public string Remark { get; set; }
public string PortLoad { get; set; }
/// <summary>
/// Desc:始发港代码
/// </summary>

@ -181,6 +181,7 @@ namespace DS.WMS.ContainerManagement.Info.Method
IsHeavy=c.IsHeavy,
Portid = c.Portid,
Port = c.Port,
PortCode = c.PortCode,
Depot = c.Depot,
Vessel = c.Vessel,
Voyno = c.Voyno,
@ -195,6 +196,15 @@ namespace DS.WMS.ContainerManagement.Info.Method
CreateTime= c.CreateTime,
ProductionDate= b.ProductionDate,
CtnFlowStateId = c.CtnFlowStateId,
PortLoad= c.PortLoad,
PortLoadid= c.PortLoadid,
PortLoadCode= c.PortLoadCode,
PortDelivery= c.PortDelivery,
PortDeliveryid= c.PortDeliveryid,
PortDeliveryCode= c.PortDeliveryCode,
PortDischarge= c.PortDischarge,
PortDischargeCode= c.PortDischargeCode,
PortDischargeid= c.PortDischargeid,
});
return query1;

@ -1108,10 +1108,9 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
newchange.Pid = req.Id;
Type type = newchange.GetType();
var XXDM = "";
var XXCM = "";
var Vessel = "";
var Voyno = "";
var XXDM = "";//箱型代码 GP RH
var XXCM = "";//箱型尺码 20 40
foreach (var in )
{
@ -1119,6 +1118,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
continue;
var field = type.GetProperty(.FieldTitle);
if (field != null && dt.Columns.Contains(.ColumnTitle))
{
var _value = row[.ColumnTitle];
@ -1152,6 +1152,34 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
}
}
else
if (field.PropertyType.GetGenericArguments()[0] == typeof(bool) || field.PropertyType.GetGenericArguments()[0] == typeof(bool?))
{
if (_value != null)
{
if (field != null && .FieldTitle == "IsHeavy")
{
if (_value == null || string.IsNullOrWhiteSpace(_value.ToString()))
{
field.SetValue(newchange, null);
}
else
if (_value.ToString() == "重" || _value.ToString() == "1" || _value.ToString().ToUpper() == "TRUE")
{
field.SetValue(newchange, true);
}
else
if (_value.ToString() == "空" || _value.ToString() == "0" || _value.ToString().ToUpper() == "FALSE")
{
field.SetValue(newchange, false);
}
else
{
field.SetValue(newchange, null);
}
}
}
}
else
{
field.SetValue(newchange, _value);
}
@ -1191,24 +1219,13 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
}
}
//else
//if (field == null && 字段.FieldTitle == "Vessel")
//{
// Vessel = row[字段.ColumnTitle].ToString();
//}
//else
//if (field == null && 字段.FieldTitle == "Voyno")
//{
// Voyno = row[字段.ColumnTitle].ToString();
//}
else
{
continue;
//throw new ArgumentException("Field not found", fieldName);
}
}
@ -1216,10 +1233,6 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
newchange.Ctnall= XXCM+ XXDM ;
}
//if (Vessel != "" && Voyno != "")
//{
// newchange.VesselVoyno = Vessel +" : "+ Voyno;
//}
newchange.IsOnlineId= CM_IsOnlineEnum.线;
changelist.Add(newchange);

Loading…
Cancel
Save