设备开机停机 率
This commit is contained in:
parent
ca741525e9
commit
4c3c24f6e7
@ -41,7 +41,7 @@ namespace DOAN.WebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("devicePoweronRate")]
|
||||
public IActionResult DevicePoweronRate(DeviceReportDto param)
|
||||
public IActionResult DevicePoweronRate([FromQuery] DeviceReportDto param)
|
||||
{
|
||||
var response = _ReportService.DevicePoweronRate(param);
|
||||
return SUCCESS(response);
|
||||
@ -52,7 +52,7 @@ namespace DOAN.WebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("deviceDowntimeRate")]
|
||||
public IActionResult DeviceDowntimeRate(DeviceReportDto param)
|
||||
public IActionResult DeviceDowntimeRate([FromQuery] DeviceReportDto param)
|
||||
{
|
||||
var response = _ReportService.DeviceDowntimeRate(param);
|
||||
return SUCCESS(response);
|
||||
@ -63,7 +63,7 @@ namespace DOAN.WebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("productionCompletionRate")]
|
||||
public IActionResult ProductionCompletionRate(string groupName)
|
||||
public IActionResult ProductionCompletionRate([FromQuery] string groupName)
|
||||
{
|
||||
var response = _ReportService.ProductionCompletionRate(groupName, DateTime.Today);
|
||||
return SUCCESS(response);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"dbConfigs": [
|
||||
{
|
||||
// "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308",
|
||||
//"Conn": "Data Source=118.25.48.201;User ID=root;Password=123456;Initial Catalog=gxassembly;Port=3306;AllowLoadLocalInfile=true",
|
||||
//"Conn": "Data Source=47.101.40.214;User ID=root;Password=Rizo123456@;Initial Catalog=gxassembly;Port=3306;AllowLoadLocalInfile=true",
|
||||
"Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306;AllowLoadLocalInfile=true",
|
||||
// "Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306",
|
||||
//"Conn": "Data Source=192.168.50.163;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306",
|
||||
|
||||
@ -13,7 +13,7 @@ namespace DOAN.Model.MES
|
||||
|
||||
public class DeviceReportDto //: PagerInfo
|
||||
{
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime EndTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ namespace DOAN.Service.MES.report
|
||||
.LeftJoin<GroupShift>((a, b) => a.FkShift == b.Id)
|
||||
.LeftJoin<ProWorkorder>((a, b, c) => a.GroupCode == c.GroupCode
|
||||
&& c.WorkorderDate.Value.ToString("yyyy-MM-dd") == a.ScheduleDate.Value.ToString("yyyy-MM-dd"))
|
||||
.Where((a, b, c) => a.ScheduleDate.Value>= param.StartDate && a.ScheduleDate.Value <= param.EndDate)
|
||||
.Where((a, b, c) => a.ScheduleDate.Value>= param.StartTime && a.ScheduleDate.Value <= param.EndTime)
|
||||
.Select((a, b, c) =>
|
||||
new
|
||||
{
|
||||
@ -94,8 +94,8 @@ namespace DOAN.Service.MES.report
|
||||
|
||||
list = Context.Queryable<BaseWorkRoute>()
|
||||
.LeftJoin<ProWorkorder>((a, b) => a.Code == b.LineCode
|
||||
&& b.WorkorderDate.Value>= param.StartDate
|
||||
&& b.WorkorderDate.Value<= param.EndDate)
|
||||
&& b.WorkorderDate.Value>= param.StartTime
|
||||
&& b.WorkorderDate.Value<= param.EndTime)
|
||||
.OrderBy((a,b)=>a.Id)
|
||||
.Select((a, b) =>
|
||||
new DeviceDowntimeRateModel
|
||||
@ -116,8 +116,8 @@ namespace DOAN.Service.MES.report
|
||||
.Where(t=>t.FaultDict== "设备异常"
|
||||
&& t.StartTime.HasValue
|
||||
&& t.EndTime.HasValue
|
||||
&& t.EndTime.Value>= param.StartDate
|
||||
&& t.EndTime.Value<= param.EndDate)
|
||||
&& t.EndTime.Value>= param.StartTime
|
||||
&& t.EndTime.Value<= param.EndTime)
|
||||
.Select(it => new
|
||||
{
|
||||
it.LineCode,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user