7 changed files with 1170 additions and 1 deletions
@ -0,0 +1,30 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IQRS:IHttpApi |
||||
|
{ |
||||
|
#region QRS023 電動起子扭力紀錄表
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取電動起子扭力紀錄表
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ESTorque/ESTorqueByQuery")] |
||||
|
ITask<List<Estorque>> GetEstorquebyQueryAll(string wipNo,string sapNo,string sDate, string eDate, int page = 0, int limit = 10); |
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,157 @@ |
|||||
|
@{ |
||||
|
ViewData["Title"] = "電動起子扭力紀錄表"; |
||||
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
<div class="layui-card"> |
||||
|
<div class="layui-card-header"> |
||||
|
<div class="layui-form"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"><i class="fa fa-file-text-o fa-fw"></i> 電動起子扭力紀錄表</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-card-body"> |
||||
|
<div class="layui-form"> |
||||
|
<div class="layui-row"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-col-sm3"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">工單號碼:</label> |
||||
|
<div class="layui-input-inline" style="width:140px"> |
||||
|
<input id="wipNo" name="wipNo" autocomplete="off" class="layui-input"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-sm3"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">SAP編號</label> |
||||
|
<div class="layui-input-inline" style="width:140px"> |
||||
|
<input id="sapNo" name="sapNo" autocomplete="off" class="layui-input"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-row"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-col-sm4"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">日期:</label> |
||||
|
<div class="layui-input-inline" style="width:90px"> |
||||
|
<input id="dateStr" name="dateStr" autocomplete="off" class="layui-input" readonly=""> |
||||
|
</div> |
||||
|
<div class="layui-form-mid">~</div> |
||||
|
<div class="layui-input-inline" style="width:90px"> |
||||
|
<input id="dateEnd" name="dateEnd" autocomplete="off" class="layui-input" readonly=""> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-sm1"> |
||||
|
<div class="layui-inline layui-show-xs-block"> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="querysubmit"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-card-body"> |
||||
|
<div class="layui-inline"> |
||||
|
<button type="button" id="btnExcel" class="layui-btn layui-btn-normal layui-btn-sm"><i class="fa fa-file-excel-o"></i>導出Excel</button> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="query" lay-filter="query"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
layui.use(['form', 'layer', 'laydate', 'table'], function () { |
||||
|
form = layui.form; |
||||
|
laydate = layui.laydate; |
||||
|
laydate.render({ |
||||
|
elem: '#dateStr' |
||||
|
, trigger: 'click' |
||||
|
, format: 'yyyy/MM/dd' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
laydate.render({ |
||||
|
elem: '#dateEnd' |
||||
|
, trigger: 'click' |
||||
|
, format: 'yyyy/MM/dd' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
}); |
||||
|
|
||||
|
//监听表单提交事件 |
||||
|
hg.form.onsubmit('querysubmit', function (data) { |
||||
|
hg.msghide("重新載入資料.."); |
||||
|
|
||||
|
table && table.reload(data); |
||||
|
}); |
||||
|
|
||||
|
var tableCols = [[ |
||||
|
{ |
||||
|
field: 'createDate', |
||||
|
title: '日期', |
||||
|
width:150, |
||||
|
sort: true, |
||||
|
templet: '<div>{{ layui.util.toDateString(d.createDate, "yyyy-MM-dd") }}</div>' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'wipNo', |
||||
|
width: 150, |
||||
|
title: '工單號碼', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'sapNo', |
||||
|
title: 'SAP編號', |
||||
|
width: 150 |
||||
|
}, |
||||
|
{ |
||||
|
field: 'setupValue', |
||||
|
title: '設定值', |
||||
|
width: 250, |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'torqueValue', |
||||
|
title: '受校器讀值', |
||||
|
width: 250, |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'userName', |
||||
|
width: 150, |
||||
|
title: '自校人員' |
||||
|
} |
||||
|
]]; |
||||
|
wipNo = $("#wipNo").val(); |
||||
|
sapNo = $("#sapNo").val(); |
||||
|
sdate1 = $("#dateStr").val(); |
||||
|
edate1 = $("#dateEnd").val(); |
||||
|
var table = hg.table.datatable('query', '電動起子扭力紀錄表', '/QRS/QRS023Query', { wipNo: wipNo, sapNo: sapNo, dateStr: sdate1, dateEnd: edate1}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
|
||||
|
|
||||
|
$('#btnExcel').click(function () { |
||||
|
wipNo = $("#wipNo").val(); |
||||
|
sapNo = $("#sapNo").val(); |
||||
|
sdate1 = $("#dateStr").val(); |
||||
|
edate1 = $("#dateEnd").val(); |
||||
|
window.open('/QRS/QRS023_Excel?wipNo=' + wipNo + '&sapNo=' + sapNo + '&dateStr='+sdate1 + '&dateEnd=' + edate1); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,711 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> |
||||
|
<AutoRefresh>0</AutoRefresh> |
||||
|
<DataSources> |
||||
|
<DataSource Name="Accessory"> |
||||
|
<ConnectionProperties> |
||||
|
<DataProvider>System.Data.DataSet</DataProvider> |
||||
|
<ConnectString>/* Local Connection */</ConnectString> |
||||
|
</ConnectionProperties> |
||||
|
<rd:DataSourceID>e0dcb4ed-57fb-41b0-a865-d53383fc0026</rd:DataSourceID> |
||||
|
</DataSource> |
||||
|
</DataSources> |
||||
|
<DataSets> |
||||
|
<DataSet Name="DataSet3"> |
||||
|
<Query> |
||||
|
<DataSourceName>Accessory</DataSourceName> |
||||
|
<CommandText>/* Local Query */</CommandText> |
||||
|
</Query> |
||||
|
<Fields> |
||||
|
<Field Name="FormatDate"> |
||||
|
<DataField>FormatDate</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
<Field Name="WipNo"> |
||||
|
<DataField>WipNo</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
<Field Name="SapNo"> |
||||
|
<DataField>SapNo</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
<Field Name="SetupValue"> |
||||
|
<DataField>SetupValue</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
<Field Name="TorqueValue"> |
||||
|
<DataField>TorqueValue</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
<Field Name="UserName"> |
||||
|
<DataField>UserName</DataField> |
||||
|
<rd:TypeName>System.String</rd:TypeName> |
||||
|
</Field> |
||||
|
</Fields> |
||||
|
<rd:DataSetInfo> |
||||
|
<rd:DataSetName>Accessory</rd:DataSetName> |
||||
|
<rd:TableName>FQC010VIiew</rd:TableName> |
||||
|
<rd:ObjectDataSourceType>Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType> |
||||
|
</rd:DataSetInfo> |
||||
|
</DataSet> |
||||
|
</DataSets> |
||||
|
<ReportSections> |
||||
|
<ReportSection> |
||||
|
<Body> |
||||
|
<ReportItems> |
||||
|
<Rectangle Name="Rectangle1"> |
||||
|
<ReportItems> |
||||
|
<Tablix Name="Tablix6"> |
||||
|
<TablixBody> |
||||
|
<TablixColumns> |
||||
|
<TablixColumn> |
||||
|
<Width>4.15136cm</Width> |
||||
|
</TablixColumn> |
||||
|
<TablixColumn> |
||||
|
<Width>4.39242cm</Width> |
||||
|
</TablixColumn> |
||||
|
<TablixColumn> |
||||
|
<Width>3.25644cm</Width> |
||||
|
</TablixColumn> |
||||
|
<TablixColumn> |
||||
|
<Width>2.5cm</Width> |
||||
|
</TablixColumn> |
||||
|
<TablixColumn> |
||||
|
<Width>4.00498cm</Width> |
||||
|
</TablixColumn> |
||||
|
<TablixColumn> |
||||
|
<Width>2.5cm</Width> |
||||
|
</TablixColumn> |
||||
|
</TablixColumns> |
||||
|
<TablixRows> |
||||
|
<TablixRow> |
||||
|
<Height>0.6cm</Height> |
||||
|
<TablixCells> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox47"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>日期</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox47</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox49"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>工單號碼</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox49</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox51"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>SAP編號</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox51</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox1"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>設定值</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox1</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox53"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>受校器讀值</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox53</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="Textbox5"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>自校人員</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox5</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<BackgroundColor>LightGreen</BackgroundColor> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
</TablixCells> |
||||
|
</TablixRow> |
||||
|
<TablixRow> |
||||
|
<Height>0.6cm</Height> |
||||
|
<TablixCells> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="FormatDate"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!FormatDate.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>FormatDate</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="WipNo"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!WipNo.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>WipNo</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="SapNo"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!SapNo.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>SapNo</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="SetupValue1"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!SetupValue.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>SetupValue1</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="TorqueValue"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!TorqueValue.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>TorqueValue</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
<rd:Selected>true</rd:Selected> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
<TablixCell> |
||||
|
<CellContents> |
||||
|
<Textbox Name="UserName"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>=Fields!UserName.Value</Value> |
||||
|
<Style> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>UserName</rd:DefaultName> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>Solid</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</CellContents> |
||||
|
</TablixCell> |
||||
|
</TablixCells> |
||||
|
</TablixRow> |
||||
|
</TablixRows> |
||||
|
</TablixBody> |
||||
|
<TablixColumnHierarchy> |
||||
|
<TablixMembers> |
||||
|
<TablixMember /> |
||||
|
<TablixMember /> |
||||
|
<TablixMember /> |
||||
|
<TablixMember /> |
||||
|
<TablixMember /> |
||||
|
<TablixMember /> |
||||
|
</TablixMembers> |
||||
|
</TablixColumnHierarchy> |
||||
|
<TablixRowHierarchy> |
||||
|
<TablixMembers> |
||||
|
<TablixMember> |
||||
|
<KeepWithGroup>After</KeepWithGroup> |
||||
|
</TablixMember> |
||||
|
<TablixMember> |
||||
|
<Group Name="詳細資料1" /> |
||||
|
</TablixMember> |
||||
|
</TablixMembers> |
||||
|
</TablixRowHierarchy> |
||||
|
<DataSetName>DataSet3</DataSetName> |
||||
|
<Top>2.02244cm</Top> |
||||
|
<Left>0.23571cm</Left> |
||||
|
<Height>1.2cm</Height> |
||||
|
<Width>20.8052cm</Width> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>None</Style> |
||||
|
</Border> |
||||
|
</Style> |
||||
|
</Tablix> |
||||
|
<Textbox Name="Textbox44"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value xml:space="preserve"> </Value> |
||||
|
<Style> |
||||
|
<FontFamily>微軟正黑體</FontFamily> |
||||
|
<FontSize>20pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
<TextRun> |
||||
|
<Value>電動起子扭力紀錄表</Value> |
||||
|
<Style> |
||||
|
<FontSize>20pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox44</rd:DefaultName> |
||||
|
<Left>5.6424cm</Left> |
||||
|
<Height>1.24355cm</Height> |
||||
|
<Width>9.71299cm</Width> |
||||
|
<ZIndex>1</ZIndex> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>None</Style> |
||||
|
</Border> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
<Textbox Name="Textbox46"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>允收標準:依照SOP定義kgf</Value> |
||||
|
<Style> |
||||
|
<FontFamily>微軟正黑體</FontFamily> |
||||
|
<FontSize>14pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox45</rd:DefaultName> |
||||
|
<Top>1.02975cm</Top> |
||||
|
<Left>14.2776cm</Left> |
||||
|
<Height>0.8163cm</Height> |
||||
|
<Width>6.76331cm</Width> |
||||
|
<ZIndex>2</ZIndex> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>None</Style> |
||||
|
</Border> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
<Textbox Name="Textbox77"> |
||||
|
<CanGrow>true</CanGrow> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Paragraphs> |
||||
|
<Paragraph> |
||||
|
<TextRuns> |
||||
|
<TextRun> |
||||
|
<Value>QO4-109 Rev.A3</Value> |
||||
|
<Style> |
||||
|
<FontFamily>微軟正黑體</FontFamily> |
||||
|
<FontSize>12pt</FontSize> |
||||
|
</Style> |
||||
|
</TextRun> |
||||
|
</TextRuns> |
||||
|
<Style> |
||||
|
<TextAlign>Center</TextAlign> |
||||
|
</Style> |
||||
|
</Paragraph> |
||||
|
</Paragraphs> |
||||
|
<rd:DefaultName>Textbox76</rd:DefaultName> |
||||
|
<Top>3.88544cm</Top> |
||||
|
<Left>15.08393cm</Left> |
||||
|
<Height>1.00557cm</Height> |
||||
|
<Width>5.63822cm</Width> |
||||
|
<ZIndex>3</ZIndex> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>None</Style> |
||||
|
</Border> |
||||
|
<VerticalAlign>Middle</VerticalAlign> |
||||
|
<PaddingLeft>2pt</PaddingLeft> |
||||
|
<PaddingRight>2pt</PaddingRight> |
||||
|
<PaddingTop>2pt</PaddingTop> |
||||
|
<PaddingBottom>2pt</PaddingBottom> |
||||
|
</Style> |
||||
|
</Textbox> |
||||
|
</ReportItems> |
||||
|
<KeepTogether>true</KeepTogether> |
||||
|
<Top>0.34078cm</Top> |
||||
|
<Height>5.98259cm</Height> |
||||
|
<Width>21.18781cm</Width> |
||||
|
<Style> |
||||
|
<Border> |
||||
|
<Style>None</Style> |
||||
|
</Border> |
||||
|
</Style> |
||||
|
</Rectangle> |
||||
|
</ReportItems> |
||||
|
<Height>2.61732in</Height> |
||||
|
<Style /> |
||||
|
</Body> |
||||
|
<Width>8.39198in</Width> |
||||
|
<Page> |
||||
|
<PageHeight>21cm</PageHeight> |
||||
|
<PageWidth>29.7cm</PageWidth> |
||||
|
<LeftMargin>0cm</LeftMargin> |
||||
|
<RightMargin>0cm</RightMargin> |
||||
|
<TopMargin>0cm</TopMargin> |
||||
|
<BottomMargin>0cm</BottomMargin> |
||||
|
<ColumnSpacing>0.13cm</ColumnSpacing> |
||||
|
<Style /> |
||||
|
</Page> |
||||
|
</ReportSection> |
||||
|
</ReportSections> |
||||
|
<ReportParameters> |
||||
|
<ReportParameter Name="show"> |
||||
|
<DataType>Boolean</DataType> |
||||
|
<DefaultValue> |
||||
|
<Values> |
||||
|
<Value>true</Value> |
||||
|
</Values> |
||||
|
</DefaultValue> |
||||
|
<Prompt>ReportParameter1</Prompt> |
||||
|
<ValidValues> |
||||
|
<ParameterValues> |
||||
|
<ParameterValue> |
||||
|
<Value>true</Value> |
||||
|
</ParameterValue> |
||||
|
</ParameterValues> |
||||
|
</ValidValues> |
||||
|
</ReportParameter> |
||||
|
</ReportParameters> |
||||
|
<ReportParametersLayout> |
||||
|
<GridLayoutDefinition> |
||||
|
<NumberOfColumns>4</NumberOfColumns> |
||||
|
<NumberOfRows>2</NumberOfRows> |
||||
|
<CellDefinitions> |
||||
|
<CellDefinition> |
||||
|
<ColumnIndex>0</ColumnIndex> |
||||
|
<RowIndex>0</RowIndex> |
||||
|
<ParameterName>show</ParameterName> |
||||
|
</CellDefinition> |
||||
|
</CellDefinitions> |
||||
|
</GridLayoutDefinition> |
||||
|
</ReportParametersLayout> |
||||
|
<rd:ReportUnitType>Cm</rd:ReportUnitType> |
||||
|
<rd:ReportID>3d6db279-309d-4d29-9940-23cf8e69bde0</rd:ReportID> |
||||
|
</Report> |
@ -0,0 +1,102 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Controllers.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 燒機記錄資料表
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class ESTorqueController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
public ESTorqueController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
// GET: api/BurnInfoe
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<Estorque>>> GetESTorques() |
||||
|
{ |
||||
|
return await _context.Estorques.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Estorque 查詢
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipNo"></param>
|
||||
|
/// <param name="sapNo"></param>
|
||||
|
/// <param name="sdate"></param>
|
||||
|
/// <param name="edate"></param>
|
||||
|
/// <param name="page"></param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("ESTorqueByQuery")] |
||||
|
public async Task<ActionResult<IEnumerable<Estorque>>> GetESTorqueByQuery( string wipNo, string sapNo, string sdate, string edate, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
|
||||
|
// var q = await _context.Estorques.ToListAsync();
|
||||
|
|
||||
|
IQueryable<Estorque> q = from e in _context.Estorques |
||||
|
join u in _context.UserInfoes on e.DataUser equals u.UserNo into userGroup |
||||
|
from user in userGroup.DefaultIfEmpty() |
||||
|
select new Estorque |
||||
|
{ |
||||
|
WipNo = e.WipNo, |
||||
|
SapNo = e.SapNo, |
||||
|
SetupValue = e.SetupValue, |
||||
|
TorqueValue = e.TorqueValue, |
||||
|
DataUser = e.DataUser, |
||||
|
CreateDate = e.CreateDate, |
||||
|
Route = e.Route, |
||||
|
FactorityNo = e.FactorityNo, |
||||
|
UserName = user.UserName, |
||||
|
FormatDate = e.CreateDate.ToString("yyyy-MM-dd") |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
if (!string.IsNullOrWhiteSpace(wipNo)) |
||||
|
q = q.Where(w => w.WipNo == wipNo); |
||||
|
|
||||
|
if (!string.IsNullOrWhiteSpace(sapNo)) |
||||
|
q = q.Where(w => w.SapNo == sapNo); |
||||
|
|
||||
|
DateTime dateValue; |
||||
|
if (sdate != "*") |
||||
|
{ |
||||
|
|
||||
|
if (DateTime.TryParse(sdate, out dateValue)) |
||||
|
{ |
||||
|
q = q.Where(w => w.CreateDate >= DateTime.Parse(sdate + " 00:00:00")); |
||||
|
} |
||||
|
} |
||||
|
if (edate != "*") |
||||
|
{ |
||||
|
if (DateTime.TryParse(edate, out dateValue)) |
||||
|
{ |
||||
|
q = q.Where(w => w.CreateDate <= DateTime.Parse(edate + " 23:59:59")); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
return await q.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 燒機記錄資料表
|
||||
|
/// </summary>
|
||||
|
[Table("ES_TORQUE", Schema = "JHAMES")] |
||||
|
public partial class Estorque |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
[Column("WIP_NO")] |
||||
|
[Display(Name = "工單號碼")] |
||||
|
[DataMember] |
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SAP編號
|
||||
|
/// </summary>
|
||||
|
[Column("SAP_NO")] |
||||
|
[Display(Name = "SAP編號")] |
||||
|
[DataMember] |
||||
|
public string SapNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 設定值
|
||||
|
/// </summary>
|
||||
|
[Column("SETUP_VALUE")] |
||||
|
[Display(Name = "設定值")] |
||||
|
[DataMember] |
||||
|
public string SetupValue { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 受校器讀值
|
||||
|
/// </summary>
|
||||
|
[Column("TORQUE_VALUE")] |
||||
|
[Display(Name = "受校器讀值")] |
||||
|
[DataMember] |
||||
|
public string TorqueValue { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 受校器讀值
|
||||
|
/// </summary>
|
||||
|
[Column("DATA_USER")] |
||||
|
[Display(Name = "自校人員")] |
||||
|
[DataMember] |
||||
|
public string DataUser { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 委外廠
|
||||
|
/// </summary>
|
||||
|
[Column("FACTORITY_NO")] |
||||
|
[Display(Name = "委外廠")] |
||||
|
[DataMember] |
||||
|
public string FactorityNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 途程ID
|
||||
|
/// </summary>
|
||||
|
[Column("ROUTE")] |
||||
|
[Display(Name = "途程ID")] |
||||
|
[DataMember] |
||||
|
public string Route { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// UserName
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
[DataMember] |
||||
|
public string UserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// CREATE_DATE format yyyy-MM-dd
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
[DataMember] |
||||
|
public string FormatDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue