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 Remark { get; set; }
public string PortLoad { get; set; }
/// <summary> /// <summary>
/// Desc:始发港代码 /// Desc:始发港代码
/// </summary> /// </summary>

@ -181,6 +181,7 @@ namespace DS.WMS.ContainerManagement.Info.Method
IsHeavy=c.IsHeavy, IsHeavy=c.IsHeavy,
Portid = c.Portid, Portid = c.Portid,
Port = c.Port, Port = c.Port,
PortCode = c.PortCode,
Depot = c.Depot, Depot = c.Depot,
Vessel = c.Vessel, Vessel = c.Vessel,
Voyno = c.Voyno, Voyno = c.Voyno,
@ -195,6 +196,15 @@ namespace DS.WMS.ContainerManagement.Info.Method
CreateTime= c.CreateTime, CreateTime= c.CreateTime,
ProductionDate= b.ProductionDate, ProductionDate= b.ProductionDate,
CtnFlowStateId = c.CtnFlowStateId, 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; return query1;

@ -1108,10 +1108,9 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
newchange.Pid = req.Id; newchange.Pid = req.Id;
Type type = newchange.GetType(); Type type = newchange.GetType();
var XXDM = ""; var XXDM = "";//箱型代码 GP RH
var XXCM = "";
var Vessel = ""; var XXCM = "";//箱型尺码 20 40
var Voyno = "";
foreach (var in ) foreach (var in )
{ {
@ -1119,6 +1118,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
continue; continue;
var field = type.GetProperty(.FieldTitle); var field = type.GetProperty(.FieldTitle);
if (field != null && dt.Columns.Contains(.ColumnTitle)) if (field != null && dt.Columns.Contains(.ColumnTitle))
{ {
var _value = row[.ColumnTitle]; var _value = row[.ColumnTitle];
@ -1152,6 +1152,34 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
} }
} }
else 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); field.SetValue(newchange, _value);
} }
@ -1172,7 +1200,7 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
{ {
XXCM = row[.ColumnTitle].ToString(); XXCM = row[.ColumnTitle].ToString();
} }
else else
if (field == null && .FieldTitle == "CtnFlowState") if (field == null && .FieldTitle == "CtnFlowState")
{ {
//XXCM = row[字段.ColumnTitle].ToString(); //XXCM = row[字段.ColumnTitle].ToString();
@ -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 else
{ {
continue; 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 ; newchange.Ctnall= XXCM+ XXDM ;
} }
//if (Vessel != "" && Voyno != "")
//{
// newchange.VesselVoyno = Vessel +" : "+ Voyno;
//}
newchange.IsOnlineId= CM_IsOnlineEnum.线; newchange.IsOnlineId= CM_IsOnlineEnum.线;
changelist.Add(newchange); changelist.Add(newchange);

Loading…
Cancel
Save