Administrator 3 years ago
parent
commit
6ca94303dd
  1. 6
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs
  2. 33
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
  3. 6
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs

6
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs

@ -221,14 +221,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.MaterialCode 客户物料号,\n" +
" temp1.HQHKanBan 看板号 ,\n" +
" temp1.SettleQty 结算数量,\n" +
" temp2.Qty 发货数量,\n" +
" ( temp1.SettleQty - temp2.Qty ) 差异数量 \n" +
" ISNULL(temp2.Qty,0) 发货数量,\n" +
" ( ISNULL(temp1.SettleQty,0) - ISNULL(temp2.Qty,0) ) 差异数量 \n" +
"FROM\n" +
" ( SELECT SUM ( Qty ) SettleQty, HQHKanBan, MaterialCode FROM Set_HQ_F_Platform WHERE version = '{0}' GROUP BY HQHKanBan, MaterialCode ) temp1\n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_F_Kanban GROUP BY Kanban, MaterialCode ) temp2 ON temp1.HQHKanBan = temp2.Kanban \n" +
" AND temp1.MaterialCode = temp2.MaterialCode \n" +
"WHERE\n" +
" temp1.SettleQty!= temp2.Qty";
" temp1.SettleQty!= ISNULL(temp2.Qty,0)";
str = string.Format(str, version);
var _query = DbConnection.Query<HQFSettleQtyDiff>(str, null, null, true, 1200, null);

33
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

@ -135,31 +135,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
List<HQHSettleQtyDiff> _list = new List<HQHSettleQtyDiff>();
var str =
"SELECT temp1.MaterialCode 客户物料号,temp1.HQHKanBan 看板号 ,temp1.SettleQty 结算数量, temp2.Qty 发货数量,( temp1.SettleQty - temp2.Qty ) 差异数量 \n" +
"FROM\n" +
" (\n" +
"SELECT\n" +
" SUM( Qty ) SettleQty,\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" temp1.MaterialCode 客户物料号,\n" +
" temp1.HQHKanBan 看板号 ,\n" +
" temp1.SettleQty 结算数量,\n" +
" ISNULL(temp2.Qty,0) 发货数量,\n" +
" ( ISNULL(temp1.SettleQty,0) - ISNULL(temp2.Qty,0) ) 差异数量 \n" +
"FROM\n" +
" Set_HQ_H_Platform where version='{0}'\n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" ) temp1\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" SUM( Qty ) Qty,\n" +
" Kanban,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_HQ_H_Kanban \n" +
" GROUP BY\n" +
" Kanban,\n" +
" MaterialCode \n" +
" ) temp2 ON temp1.HQHKanBan = temp2.Kanban \n" +
" AND temp1.MaterialCode = temp2.MaterialCode where temp1.SettleQty!=temp2.Qty ";
" ( SELECT SUM ( Qty ) SettleQty, HQHKanBan, MaterialCode FROM Set_HQ_H_Platform WHERE version = '{0}' GROUP BY HQHKanBan, MaterialCode ) temp1\n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) temp2 ON temp1.HQHKanBan = temp2.Kanban \n" +
" AND temp1.MaterialCode = temp2.MaterialCode \n" +
"WHERE\n" +
" temp1.SettleQty!= ISNULL(temp2.Qty,0)";
str = string.Format(str, version);
var _query = DbConnection.Query<HQHSettleQtyDiff>(str, null, null, true, 1200, null);

6
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs

@ -133,14 +133,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.MaterialCode 客户物料号,\n" +
" temp1.HQMKanBan 看板号 ,\n" +
" temp1.SettleQty 结算数量,\n" +
" temp2.Qty 发货数量,\n" +
" ( temp1.SettleQty - temp2.Qty ) 差异数量 \n" +
" ISNULL(temp2.Qty,0) 发货数量,\n" +
" ( ISNULL(temp1.SettleQty,0) - ISNULL(temp2.Qty,0) ) 差异数量 \n" +
"FROM\n" +
" ( SELECT SUM ( Qty ) SettleQty, HQMKanBan, MaterialCode FROM Set_HQ_M_Platform WHERE version = '{0}' GROUP BY HQMKanBan, MaterialCode ) temp1\n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_M_Kanban GROUP BY Kanban, MaterialCode ) temp2 ON temp1.HQMKanBan = temp2.Kanban \n" +
" AND temp1.MaterialCode = temp2.MaterialCode \n" +
"WHERE\n" +
" temp1.SettleQty!= temp2.Qty";
" temp1.SettleQty!= ISNULL(temp2.Qty,0)";
str = string.Format(str, version);
var _query = DbConnection.Query<HQMSettleQtyDiff>(str, null, null, true, 1200, null);

Loading…
Cancel
Save