diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
index 7c46ed9e..b3610de3 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
@@ -551,7 +551,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
- var _taskid = await _service.ExportEnqueueAsync("H平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSettledDetailDiffExportService), customConditionList, (rs) =>
+ var _taskid = await _service.ExportEnqueueAsync("H平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
index 53f61f23..13bccfe4 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
@@ -384,23 +384,25 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
Version = version;
TaskId = taskId;
}
-
-
// 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
[ImporterHeader(Name = "行号")]
public string PoLine { set; get; }
+
+ [ImporterHeader(Name = "订货看板编号")]
+ //KENN号
+ public string Kanban { set; get; }
+
[ImporterHeader(Name = "组件组物料", IsIgnore = true)]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
- [ImporterHeader(Name = "条码号")]
- //KENN号
- public string Kanban { set; get; }
-
- [ImporterHeader(Name = "物料号")]
+ //[ImporterHeader(Name = "订货看板编号")]
+ ////KENN号
+ //public string OrderBillNum { set; get; }
+ [ImporterHeader(Name = "Sap编码")]
//物料号
public string MaterialCode { set; get; }
- [ImporterHeader(Name = "物料描述")]
+ [ImporterHeader(Name = "零件中文名称")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
@@ -414,7 +416,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string InPut { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { get; set; }
- [ImporterHeader(Name = "客户物料")]
+ [ImporterHeader(Name = "发货零件号")]
///
/// 扩展字段1
///
@@ -422,7 +424,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
/// 扩展字段2
///
- [ImporterHeader(Name = "订单日期")]
+ [ImporterHeader(Name = "收货仓库")]
public string Extend2 { set; get; }
///
/// 扩展字段3
@@ -431,14 +433,26 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string Version { set; get; }
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
-
- [ImporterHeader(Name = "单据", IsIgnore = true)]
+ [ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
-
- [ImporterHeader(Name = "任务", IsIgnore = true)]
+ [ImporterHeader(Name = "任务描述", IsIgnore = true)]
public Guid TaskId { set; get; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
///
@@ -605,21 +619,24 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
- // 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
[ImporterHeader(Name = "行号")]
public string PoLine { set; get; }
+
+ [ImporterHeader(Name = "订货看板编号")]
+ //KENN号
+ public string Kanban { set; get; }
+
[ImporterHeader(Name = "组件组物料", IsIgnore = true)]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
- [ImporterHeader(Name = "条码号")]
- //KENN号
- public string Kanban { set; get; }
-
- [ImporterHeader(Name = "物料号")]
+ //[ImporterHeader(Name = "订货看板编号")]
+ ////KENN号
+ //public string OrderBillNum { set; get; }
+ [ImporterHeader(Name = "Sap编码")]
//物料号
public string MaterialCode { set; get; }
- [ImporterHeader(Name = "物料描述")]
+ [ImporterHeader(Name = "零件中文名称")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
@@ -633,7 +650,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string InPut { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { get; set; }
- [ImporterHeader(Name = "客户物料")]
+ [ImporterHeader(Name = "发货零件号")]
///
/// 扩展字段1
///
@@ -641,7 +658,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
/// 扩展字段2
///
- [ImporterHeader(Name = "订单日期")]
+ [ImporterHeader(Name = "收货仓库")]
public string Extend2 { set; get; }
///
/// 扩展字段3
@@ -650,14 +667,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string Version { set; get; }
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
-
- [ImporterHeader(Name = "单据", IsIgnore = true)]
+ [ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
-
- [ImporterHeader(Name = "任务", IsIgnore = true)]
+ [ImporterHeader(Name = "任务描述", IsIgnore = true)]
public Guid TaskId { set; get; }
+
}
///
@@ -687,6 +703,53 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
public class WmsHQHSharePartOutPutDetial : FullAuditedAggregateRootBase
{
+
+ //[ExporterHeader(DisplayName = "交货单号")]
+ //public string 交货单号 { set; get; }
+ //[ExporterHeader(DisplayName = "交货时间")]
+ //public string 交货时间 { set; get; }
+ //[ExporterHeader(DisplayName = "手工或自动")]
+ //public string 手工或自动 { set; get; }
+ //[ExporterHeader(DisplayName = "收货仓库")]
+ //public string 收货仓库 { set; get; }
+ //[ExporterHeader(DisplayName = "收货仓库描述")]
+ //public string 收货仓库描述 { set; get; }
+ //[ExporterHeader(DisplayName = "订货看板编号")]
+ //public string 订货看板编号 { set; get; }
+ //[ExporterHeader(DisplayName = "订货零件号")]
+ //public string 订货零件号 { set; get; }
+ //[ExporterHeader(DisplayName = "发货零件号")]
+ //public string 发货零件号 { set; get; }
+ //[ExporterHeader(DisplayName = "零件中文名称")]
+ //public string 零件中文名称 { set; get; }
+ //[ExporterHeader(DisplayName = "Sap编码")]
+ //public string Sap编码 { set; get; }
+ //[ExporterHeader(DisplayName = "物料组(车型)")]
+ //public string 物料组 { set; get; }
+ //[ExporterHeader(DisplayName = "发货数量")]
+ //public decimal 发货数量 { set; get; }
+ //[ExporterHeader(DisplayName = "发货状态")]
+ //public string 发货状态 { set; get; }
+ //[ExporterHeader(DisplayName = "结算验收单号")]
+ //public string 结算验收单号 { set; get; }
+ //[ExporterHeader(DisplayName = "结算数量")]
+ //public decimal 结算数量 { set; get; }
+ //[ExporterHeader(DisplayName = "结算单价")]
+ //public decimal 结算单价 { set; get; }
+ //[ExporterHeader(DisplayName = "结算金额")]
+ //public decimal 结算金额 { set; get; }
+ //[ExporterHeader(DisplayName = "发货定价")]
+ //public decimal 发货定价 { set; get; }
+ //[ExporterHeader(DisplayName = "发货总金额")]
+ //public decimal 发货总金额 { set; get; }
+ //[ExporterHeader(DisplayName = "数量差异")]
+ //public decimal 数量差异 { set; get; }
+ //[ExporterHeader(DisplayName = "单价差异")]
+ //public decimal 单价差异 { set; get; }
+ //[ExporterHeader(DisplayName = "差异总金额")]
+ //public decimal 差异总金额 { set; get; }
+
+
public WmsHQHSharePartOutPutDetial()
{
}
@@ -716,17 +779,17 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
//交货单号
- [ImporterHeader(Name = "组件组物料")]
+ [ImporterHeader(Name = "组件组物料",IsIgnore =true)]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
- [ImporterHeader(Name = "看板号")]
+ [ImporterHeader(Name = "订货看板编号")]
//KENN号
public string OrderBillNum { set; get; }
- [ImporterHeader(Name = "SAP编码")]
+ [ImporterHeader(Name = "Sap编码")]
//物料号
public string MaterialCode { set; get; }
- [ImporterHeader(Name = "物料描述")]
+ [ImporterHeader(Name = "零件中文名称")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
@@ -740,7 +803,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string InPut { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { get; set; }
- [ImporterHeader(Name = "物料代码")]
+ [ImporterHeader(Name = "发货零件号")]
///
/// 扩展字段1
///
@@ -748,17 +811,18 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
/// 扩展字段2
///
- [ImporterHeader(Name = "扩展字段2", IsIgnore = true)]
+ [ImporterHeader(Name = "收货仓库")]
public string Extend2 { set; get; }
///
/// 扩展字段3
///
[ImporterHeader(Name = "版本号", IsIgnore = true)]
public string Version { set; get; }
- [ImporterHeader(Name = "开票数量")]
+ [ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
+ [ImporterHeader(Name = "任务描述", IsIgnore = true)]
public Guid TaskId { set; get; }
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs
index 51f4abae..b4ae1f7d 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFSettledDetailDapperRepository.cs
@@ -213,8 +213,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
-
-
public virtual List GetDiffQtyList(string version)
{
List _list = new List();
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 59405dce..dcd4643f 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
@@ -25,14 +25,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
List _list = new List();
- string condition = " where 1=1 ";
+ string condition = " ";
-
- ////if (!string.IsNullOrEmpty(materialCode))
- ////{
-
- //// condition += string.Format(" and d.MaterialCode in ({0}) ", materialCode);
- ////}
if (!string.IsNullOrEmpty(begin))
{
condition += string.Format(" and b.LastModificationTime>='{0}' ", begin);
@@ -41,28 +35,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
condition += string.Format(" and b.LastModificationTime<='{0}' ", end);
}
- //if (!string.IsNullOrEmpty(cp7begin))
- //{
- // condition += string.Format(" and B.cp7>='{0}' ", cp7begin);
- //}
- //if (!string.IsNullOrEmpty(cp7end))
- //{
- // condition += string.Format(" and B.cp7<='{0}' ", cp7end);
- //}
- ////if (!string.IsNullOrEmpty(kennCode))
- ////{
- //// condition += string.Format(" and B.kenncode='{0}' ", kennCode);
- ////}
- ////if (!string.IsNullOrEmpty(chassisNumber))
- ////{
- //// condition += string.Format(" and B.chassisNumber='{0}' ", chassisNumber);
- ////}
- ////if (!string.IsNullOrEmpty(materialGroup))
- ////{
- //// condition += string.Format(" B.chassisNumber='{0}' ", materialGroup);
- ////}
string str =
"SELECT\n" +
+ " temp1.行号, \n"+
" isnull(temp1.交货单号,'') 交货单号,\n" +
" temp1.交货时间,\n" +
" isnull(temp1.手工或自动,'') 手工或自动,\n" +
@@ -88,6 +63,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
+ " b.poLine AS 行号,\n" +
" b.WmsBillNum AS 交货单号,\n" +
" b.LastModificationTime AS 交货时间,\n" +
" b.IsAuto AS 手工或自动,\n" +
@@ -135,31 +111,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
List _list = new List();
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" +
- " 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\n" +
+" temp1.MaterialCode 客户物料号,\n" +
+" temp1.HQHKanBan 看板号,\n" +
+" temp1.SettleQty 结算数量,\n" +
+" ISNULL( temp2.Qty, 0 ) 发货数量,(\n" +
+" temp1.SettleQty - ISNULL( temp2.Qty, 0 )) 差异数量 \n" +
+"FROM\n" +
+" ( 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(str, null, null, true, 1200, null);
@@ -174,7 +137,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
List _list = new List();
- string condition = " where 1=1 ";
+ string condition = " ";
@@ -242,10 +205,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
return _list;
}
-
-
-
-
}
public class HQHSharePartSettledDetailDiff
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
index 0688ad35..fb67fc45 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
@@ -51,13 +51,12 @@ namespace SettleAccount.Job.Services.Report
var warehouseDesc = p_list.Where(p => p.Name == "WarehouseDesc").FirstOrDefault().Value;
var _ls = _dapperRepository.GetInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup);
var _lst = _dapperRepository.GetDiffQtyList(version);
-
foreach (var itm in _lst)
{
var _first = _ls.FirstOrDefault(p => p.订货看板编号 == itm.看板号 && p.订货零件号 == itm.客户物料号);
if (_first != null)
{
- _first.发货数量 = _first.结算数量 + itm.差异数量;
+ _first.结算数量 = _first.发货数量 + itm.差异数量;
_first.数量差异 = itm.差异数量;
}
}
@@ -69,8 +68,6 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.订货看板编号)).ToList();
}
}
-
-
if (!string.IsNullOrEmpty(warehouseDesc))
{
var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
index 3e9dffb6..aa0d7a38 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
@@ -43,11 +43,7 @@ namespace SettleAccount.Job.Services
public string ExportFile(Guid id, List exportName, List p_list)
{
-
-
var _filename = exportName.FirstOrDefault();
-
-
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var materialCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value;
var begin = p_list.Where(p => p.Name == "BeginTime").FirstOrDefault().Value;
@@ -129,8 +125,6 @@ namespace SettleAccount.Job.Services
_ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList();
}
}
-
-
if (!string.IsNullOrEmpty(kenncode))
{
var _groupList = kenncode.Split("\n").ToList();
@@ -163,7 +157,6 @@ namespace SettleAccount.Job.Services
_ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
}
}
-
_ls = _ls.OrderBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ThenBy(p => p.SapMaterialCode).ToList();
}