diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
index 6d63246a..7fe03c8e 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
@@ -11,6 +11,17 @@ using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
+ public class CompareExtend
+ {
+ public string WmsBillNum { set; get; }
+ public string MaterialCode { set; get; }
+ public string Kanban { set; get; }
+
+ public string WmsDate { set; get; }
+
+ }
+
+
///
/// 红旗H平台输出报表
///
@@ -130,6 +141,36 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode";
var _sql = string.Format(str, version, condition);
+
+
+ var sql2 = "SELECT\n" +
+ " a.WmsBillNum,\n" +
+ " a.MaterialCode,\n" +
+ " a.Kanban ,\n" +
+ " a.A.LastModificationTime WmsDate \n" +
+ "FROM\n" +
+ " Set_HQ_H_Kanban A\n" +
+ " INNER JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT(*)> 1 ) B ON A.Kanban = B.Kanban \n" +
+ " AND A.MaterialCode = B.MaterialCode";
+
+
+ var listCompare= DbConnection.Query(sql2);
+
+ List _ls = new List();
+ foreach (var itm in listCompare.ToList())
+ {
+ var first = _ls.FirstOrDefault(p => p.Kanban == itm.Kanban && p.MaterialCode == itm.MaterialCode);
+ if (first != null)
+ {
+ first.WmsBillNum += itm.WmsBillNum;
+ first.WmsDate += itm.WmsDate;
+ }
+
+
+ }
+
+
+
var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
_list = _query.ToList();
return _list;