This commit is contained in:
chi
2023-04-28 16:13:40 +09:00
parent 79ea4ddfff
commit 354c6a5e1b
13 changed files with 459 additions and 283 deletions

View File

@@ -745,15 +745,15 @@ ORDER BY pdate DESC, idx DESC</CommandText>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT 'NR' AS source, idx, pdate, state, sid, pumname, pumscale, pumqty, pumprice, pumamt, supply, project, bigo, wdate, dbo.getUserName(request) AS request, indate, inqty,
dbo.getUserName(receive) AS receive, sc, po, orderno
dbo.getUserName(receive) AS receive, sc, po, orderno, (CASE [state] WHEN 'PO' THEN 1 WHEN 'PR' THEN 2 ELSE 3 END) AS sortkey
FROM Purchase
WHERE (state IN ('PO', 'PR')) AND (pdate &gt;= @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
WHERE (state IN ('PO', 'PR', 'Approving')) AND (pdate &gt;= @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
UNION
SELECT 'CR' AS Expr1, idx, pdate, state, sid, pumname, pumscale, pumqty, pumprice, pumamt, supply, project, bigo, wdate, dbo.getUserName(request) AS request, indate, inqty,
dbo.getUserName(receive) AS receive, sc, po, orderno
dbo.getUserName(receive) AS receive, sc, po, orderno, (CASE [state] WHEN 'PO' THEN 1 WHEN 'PR' THEN 2 ELSE 3 END) AS sortkey
FROM EETGW_PurchaseCR
WHERE (state IN ('PO', 'PR')) AND (pdate &gt;= @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
ORDER BY state, wdate DESC</CommandText>
WHERE (state IN ('PO', 'PR', 'Approving')) AND (pdate &gt;= @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
ORDER BY sortkey, wdate DESC</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="pdate" ColumnName="pdate" DataSourceName="EE.dbo.Purchase" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="" DataSourceName="" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" Scale="0" Size="10" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
@@ -784,24 +784,25 @@ ORDER BY state, wdate DESC</CommandText>
<Mapping SourceColumn="sc" DataSetColumn="sc" />
<Mapping SourceColumn="po" DataSetColumn="po" />
<Mapping SourceColumn="orderno" DataSetColumn="orderno" />
<Mapping SourceColumn="sortkey" DataSetColumn="sortkey" />
</Mappings>
<Sources>
<DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Purchase" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByTodayIn" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetByTodayIn" GeneratorSourceName="FillByTodayIn" GetMethodModifier="Public" GetMethodName="GetByTodayIn" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetByTodayIn" UserSourceName="FillByTodayIn">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT 'NR' AS source, idx, pdate, state, sid, pumname, pumscale, pumqty, pumprice, pumamt, supply, project, bigo, wdate, dbo.getUserName(request) AS request, indate, inqty,
dbo.getUserName(receive) AS receive, sc, po, orderno
dbo.getUserName(receive) AS receive, sc, po, orderno, (CASE [state] WHEN 'PO' THEN 1 WHEN 'PR' THEN 2 ELSE 3 END) AS sortkey
FROM Purchase
WHERE (state = 'Received') AND (indate = @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
UNION
SELECT 'CR' AS Expr1, idx, pdate, state, sid, pumname, pumscale, pumqty, pumprice, pumamt, supply, project, bigo, wdate, dbo.getUserName(request) AS request, indate, inqty,
dbo.getUserName(receive) AS receive, sc, po, orderno
dbo.getUserName(receive) AS receive, sc, po, orderno, (CASE [state] WHEN 'PO' THEN 1 WHEN 'PR' THEN 2 ELSE 3 END) AS sortkey
FROM EETGW_PurchaseCR
WHERE (state = 'Received') AND (indate = @pdate) AND (ISNULL(isdel, 0) = 0) AND (gcode = @gcode)
ORDER BY source DESC, request, wdate DESC</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="pdate" ColumnName="indate" DataSourceName="EE.dbo.Purchase" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="indate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="" DataSourceName="" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" Scale="0" Size="10" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" Scale="0" Size="0" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" Scale="0" Size="0" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -1004,7 +1005,7 @@ ORDER BY source DESC, request, wdate DESC</CommandText>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="inqty" msprop:Generator_ColumnVarNameInTable="columninqty" msprop:Generator_ColumnPropNameInRow="inqty" msprop:Generator_ColumnPropNameInTable="inqtyColumn" msprop:Generator_UserColumnName="inqty" type="xs:int" minOccurs="0" />
<xs:element name="inqty" msprop:nullValue="0" msprop:Generator_ColumnPropNameInRow="inqty" msprop:Generator_ColumnVarNameInTable="columninqty" msprop:Generator_ColumnPropNameInTable="inqtyColumn" msprop:Generator_UserColumnName="inqty" type="xs:int" minOccurs="0" />
<xs:element name="bigo2" msdata:ReadOnly="true" msdata:Expression="iif(project = '', bigo , iif( bigo = '', project, project + '/' + bigo ))" msprop:Generator_ColumnVarNameInTable="columnbigo2" msprop:Generator_ColumnPropNameInRow="bigo2" msprop:Generator_ColumnPropNameInTable="bigo2Column" msprop:Generator_UserColumnName="bigo2" type="xs:string" minOccurs="0" />
<xs:element name="pumpriceD" msprop:nullValue="0" msprop:Generator_ColumnPropNameInRow="pumpriceD" msprop:Generator_ColumnVarNameInTable="columnpumpriceD" msprop:Generator_ColumnPropNameInTable="pumpriceDColumn" msprop:Generator_UserColumnName="pumpriceD" type="xs:decimal" minOccurs="0" />
<xs:element name="inremark" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="inremark" msprop:Generator_ColumnVarNameInTable="columninremark" msprop:Generator_ColumnPropNameInTable="inremarkColumn" msprop:Generator_UserColumnName="inremark" minOccurs="0">
@@ -1237,14 +1238,14 @@ ORDER BY source DESC, request, wdate DESC</CommandText>
<xs:element name="Ipkolist" msprop:Generator_TableClassName="IpkolistDataTable" msprop:Generator_TableVarName="tableIpkolist" msprop:Generator_TablePropName="Ipkolist" msprop:Generator_RowDeletingName="IpkolistRowDeleting" msprop:Generator_RowChangingName="IpkolistRowChanging" msprop:Generator_RowEvHandlerName="IpkolistRowChangeEventHandler" msprop:Generator_RowDeletedName="IpkolistRowDeleted" msprop:Generator_UserTableName="Ipkolist" msprop:Generator_RowChangedName="IpkolistRowChanged" msprop:Generator_RowEvArgName="IpkolistRowChangeEvent" msprop:Generator_RowClassName="IpkolistRow">
<xs:complexType>
<xs:sequence>
<xs:element name="source" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsource" msprop:Generator_ColumnPropNameInRow="source" msprop:Generator_ColumnPropNameInTable="sourceColumn" msprop:Generator_UserColumnName="source">
<xs:element name="source" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsource" msprop:Generator_ColumnPropNameInRow="source" msprop:Generator_ColumnPropNameInTable="sourceColumn" msprop:Generator_UserColumnName="source" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="idx" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnidx" msprop:Generator_ColumnPropNameInRow="idx" msprop:Generator_ColumnPropNameInTable="idxColumn" msprop:Generator_UserColumnName="idx" type="xs:int" />
<xs:element name="idx" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnidx" msprop:Generator_ColumnPropNameInRow="idx" msprop:Generator_ColumnPropNameInTable="idxColumn" msprop:Generator_UserColumnName="idx" type="xs:int" minOccurs="0" />
<xs:element name="pdate" msdata:ReadOnly="true" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="pdate" msprop:Generator_ColumnVarNameInTable="columnpdate" msprop:Generator_ColumnPropNameInTable="pdateColumn" msprop:Generator_UserColumnName="pdate" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
@@ -1301,7 +1302,7 @@ ORDER BY source DESC, request, wdate DESC</CommandText>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="inqty" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columninqty" msprop:Generator_ColumnPropNameInRow="inqty" msprop:Generator_ColumnPropNameInTable="inqtyColumn" msprop:Generator_UserColumnName="inqty" type="xs:int" minOccurs="0" />
<xs:element name="inqty" msdata:ReadOnly="true" msprop:nullValue="0" msprop:Generator_ColumnPropNameInRow="inqty" msprop:Generator_ColumnVarNameInTable="columninqty" msprop:Generator_ColumnPropNameInTable="inqtyColumn" msprop:Generator_UserColumnName="inqty" type="xs:int" minOccurs="0" />
<xs:element name="receive" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnreceive" msprop:Generator_ColumnPropNameInRow="receive" msprop:Generator_ColumnPropNameInTable="receiveColumn" msprop:Generator_UserColumnName="receive" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
@@ -1330,6 +1331,7 @@ ORDER BY source DESC, request, wdate DESC</CommandText>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="sortkey" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsortkey" msprop:Generator_ColumnPropNameInRow="sortkey" msprop:Generator_ColumnPropNameInTable="sortkeyColumn" msprop:Generator_UserColumnName="sortkey" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>