安灯修改
This commit is contained in:
parent
5bb10f90cd
commit
659ea3da3d
@ -8,7 +8,8 @@
|
||||
},
|
||||
"dbConfigs": [
|
||||
{
|
||||
"Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308",
|
||||
//"Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308",
|
||||
"Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306",
|
||||
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
|
||||
@ -25,7 +25,7 @@ namespace ZR.Model.Dto
|
||||
/// <summary>
|
||||
/// 故障字典数组
|
||||
/// </summary>
|
||||
public string FaultDicts { get; set; }
|
||||
public string FaultDict { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 故障内容
|
||||
|
||||
@ -37,8 +37,8 @@ namespace ZR.Service.MES.dev
|
||||
.AndIF(!string.IsNullOrEmpty(parm.TaskName), it => it.TaskName.Contains(parm.TaskName))
|
||||
.AndIF(parm.TimeRange != null && (parm.TimeRange[0] > new DateTime(1990, 1, 1)), it => it.CreatedTime >= parm.TimeRange[0])
|
||||
.AndIF(parm.TimeRange != null && (parm.TimeRange[1] > new DateTime(1990, 1, 1)), it => it.CreatedTime <= parm.TimeRange[1])
|
||||
.AndIF(parm.Type>-1,it=>it.Type==parm.Type)
|
||||
.AndIF(parm.Status>-1,it=>it.Status == parm.Status)
|
||||
.AndIF(parm.Type > -1, it => it.Type == parm.Type)
|
||||
.AndIF(parm.Status > -1, it => it.Status == parm.Status)
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
@ -105,10 +105,10 @@ namespace ZR.Service.MES.dev
|
||||
{
|
||||
var response = Update(w => w.Id == parm.Id, it => new DeviceTaskExecute()
|
||||
{
|
||||
|
||||
|
||||
Status = parm.Status,
|
||||
|
||||
|
||||
|
||||
|
||||
UpdatedBy = parm.UpdatedBy,
|
||||
UpdatedTime = parm.UpdatedTime,
|
||||
});
|
||||
@ -259,33 +259,30 @@ namespace ZR.Service.MES.dev
|
||||
List<DeviceRouteInspectionPlan> DeviceRouteInspectionPlan_month_list = Context.Queryable<DeviceRouteInspectionPlan>().Where(it => it.ExcuteCycleType == 3).Where(it => it.Status == 1).ToList();
|
||||
|
||||
Console.WriteLine("每月类型处理" + DeviceRouteInspectionPlan_month_list.Count);
|
||||
if (DeviceRouteInspectionPlan_week_list != null && DeviceRouteInspectionPlan_week_list.Count > 0)
|
||||
if (DeviceRouteInspectionPlan_month_list != null && DeviceRouteInspectionPlan_month_list.Count > 0)
|
||||
{
|
||||
foreach (var item in DeviceRouteInspectionPlan_week_list)
|
||||
foreach (var item in DeviceRouteInspectionPlan_month_list)
|
||||
{
|
||||
|
||||
string[] cycle_period = item.WeekList.Split(",");
|
||||
for (int i = 0; i < cycle_period.Length; i++)
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
try
|
||||
if (CurrentTime.Day == Convert.ToInt32(item.MonthDayList))
|
||||
{
|
||||
if (CurrentTime.Day == Convert.ToInt32(item.MonthDayList))
|
||||
{
|
||||
deviceRouteInspectionPlan_execute_List.Add((DeviceRouteInspectionPlan)item); break;
|
||||
}
|
||||
deviceRouteInspectionPlan_execute_List.Add((DeviceRouteInspectionPlan)item); break;
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
Console.WriteLine("An error occurred: " + ex.Message);
|
||||
continue;
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
Console.WriteLine("An error occurred: " + ex.Message);
|
||||
continue;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,8 +435,8 @@ namespace ZR.Service.MES.dev
|
||||
string PlanName = Context.Queryable<DeviceRouteInspectionPlan>().Where(it => it.Id == query.FkPlanId).First()?.Name;
|
||||
string DeviceName = Context.Queryable<DeviceAccount>().Where(it => it.Id == query.FkDeviceId).First()?.DeviceName;
|
||||
string InspectName = Context.Queryable<DeviceInspect>().Where(it => it.Id == query.FkInspectId).First()?.Name;
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (DeviceFormConfig config in configlist)
|
||||
{
|
||||
|
||||
@ -589,18 +586,19 @@ namespace ZR.Service.MES.dev
|
||||
insertData.Id = SnowFlakeSingle.Instance.NextId().ToString();
|
||||
insertData.PlanType = query.PlanType;
|
||||
insertData.FkPlanId = query.FkPlanId;
|
||||
if(query.PlanType==1)
|
||||
if (query.PlanType == 1)
|
||||
{
|
||||
insertData.PlanName = Context.Queryable<DeviceRouteInspectionPlan>().Where(it => it.Id == query.FkPlanId).First()?.Name;
|
||||
}else if(query.PlanType==2)
|
||||
}
|
||||
else if (query.PlanType == 2)
|
||||
{
|
||||
insertData.PlanName = Context.Queryable<DevicePointInspectionPlan>().Where(it => it.Id == query.FkPlanId).First()?.Name;
|
||||
}
|
||||
|
||||
|
||||
insertData.FkDeviceId = query.FkDeviceId;
|
||||
insertData.DeviceName=Context.Queryable<DeviceAccount>().Where(it => it.Id == query.FkDeviceId).First().DeviceName;
|
||||
insertData.DeviceName = Context.Queryable<DeviceAccount>().Where(it => it.Id == query.FkDeviceId).First().DeviceName;
|
||||
insertData.FkInspectId = query.FkInspectId;
|
||||
insertData.InspectName= Context.Queryable<DeviceInspect>().Where(it => it.Id == query.FkInspectId).First().Name;
|
||||
insertData.InspectName = Context.Queryable<DeviceInspect>().Where(it => it.Id == query.FkInspectId).First().Name;
|
||||
insertData.FormType = config_type[i];
|
||||
insertData.FormTitle = all_config_list.Where(it => it.Type == config_type[i]).Select(it => it.Title).First();
|
||||
|
||||
@ -641,7 +639,7 @@ namespace ZR.Service.MES.dev
|
||||
{
|
||||
result.Person = result.UpdatedBy;
|
||||
DeviceTaskExecuteResult item = result.Adapt<DeviceTaskExecuteResult>();
|
||||
|
||||
|
||||
return Context.Updateable(item).IgnoreColumns(true).EnableDiffLogEvent("更新结果表单").ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user