Browse Source

红旗未结核对新增字段

FoShanPG
44673626 3 years ago
parent
commit
909fdc2bda
  1. 3
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs
  2. 1
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs
  4. 1
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
  5. 344
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
  6. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs

3
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs

@ -245,6 +245,9 @@ namespace Win.Sfs.SettleAccount.Entities.Wms
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { set; get; }

1
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs

@ -304,6 +304,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <returns></returns>
[HttpPost]
[Route("listversion")]
[Authorize(SettleAccountPermissions.VWKanBan.Default)]
public async Task<PagedResultDto<VWKanBanVersionDto>> GetVersionListAsync(VWKanBanVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs

@ -145,6 +145,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
//不用传version 单号能保证唯一
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
//input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "State", Logic = EnumFilterLogic.And, Value = input.State.ToString() });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);

1
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs

@ -145,6 +145,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
//不用传version 单号能保证唯一
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
//input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "State", Logic = EnumFilterLogic.And, Value = input.State.ToString() });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);

344
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs

@ -196,9 +196,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
// " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp3.MaterialCode = TEMP2.MaterialCode";
#endregion
//temp3.HQHKanBan 订货看板编号 temp3.ExternalKanbanNumber 外部单号
string str = "SELECT\n" +
" temp3.HQHKanBan 订货看板编号,\n" +
" temp3.ExternalKanbanNumber 外部单号,\n" +
" temp3.Factory 工厂,temp3.StorageLocationDesc 存储地点描述,\n" +
" '' 外部单号,\n" +
" temp3.MaterialCode Sap编码,\n" +
" temp3.hqMaterialCode 客户物料号,\n" +
" temp3.EstimateTypeDesc 物料组,\n" +
@ -208,7 +211,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" isnull( temp3.Qty, 0 ) * isnull( temp3.Qty, 0 ) 结算金额,\n" +
" temp3.系统未结数量,\n" +
" temp3.UnHQQty 红旗未结数量,\n" +
" ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 差异 \n" +
" ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 数量差异 \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
@ -219,7 +222,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" h.HQHKanBan,\n" +
" h.Qty,\n" +
" h.Price,\n" +
" h.ExternalKanbanNumber,\n" +
" h.Factory,h.StorageLocationDesc,\n" +
" m.MaterialCode,\n" +
" h.MaterialCode hqMaterialCode,\n" +
" m.CustomerPartCode,\n" +
@ -232,8 +235,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ( Qty ) Qty,\n" +
" HQHKanBan,\n" +
" MaterialCode,\n" +
" ExternalKanbanNumber,\n" +
" Price \n" +
" Price,Factory,StorageLocationDesc \n" +
" FROM\n" +
" Set_UnHQSettleAccount \n" +
" WHERE\n" +
@ -241,8 +243,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode,\n" +
" ExternalKanbanNumber,\n" +
" Price \n" +
" Price,Factory,StorageLocationDesc \n" +
" ) AS h\n" +
" LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
" ) AS unhq\n" +
@ -393,126 +394,126 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//var sql10 = "SELECT DISTINCT\n" +
//" t1.* \n" +
//"FROM\n" +
//" (\n" +
//" SELECT\n" +
//" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
//" a.KanbanNumber AS KanbanNumber,\n" +
//" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
//" HQHKanBan,\n" +
//" b2.MaterialCode \n" +
//" FROM\n" +
//" Set_UnHQSettleAccount a\n" +
//" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
//" WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan <> 'BJ' \n" +
//" ) t1\n" +
//" LEFT JOIN (\n" +
//" SELECT\n" +
//" HQHKanBan,\n" +
//" MaterialCode \n" +
//" FROM\n" +
//" Set_UnHQSettleAccount a \n" +
//" WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan <> 'BJ' \n" +
//" GROUP BY\n" +
//" HQHKanBan,\n" +
//" MaterialCode \n" +
//" HAVING\n" +
//" COUNT ( * ) > 1 \n" +
//" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
//" AND t1.MaterialCode = t2.MaterialCode \n" +
//"WHERE\n" +
//" t2.HQHKanBan IS NULL";
var sql10 = "SELECT DISTINCT\n" +
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"WHERE\n" +
" t2.HQHKanBan IS NULL";
//var list11 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql10, version));
var list11 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql10, version));
//var sql11 = "SELECT DISTINCT\n" +
//" t1.* \n" +
//"FROM\n" +
//" (\n" +
//" SELECT\n" +
//" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
//" a.KanbanNumber AS KanbanNumber,\n" +
//" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
//" HQHKanBan,\n" +
//" b2.MaterialCode \n" +
//" FROM\n" +
//" Set_UnHQSettleAccount a\n" +
//" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
//" WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan <> 'BJ' \n" +
//" ) t1\n" +
//" INNER JOIN (\n" +
//" SELECT\n" +
//" HQHKanBan,\n" +
//" MaterialCode \n" +
//" FROM\n" +
//" Set_UnHQSettleAccount a \n" +
//" WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan <> 'BJ' \n" +
//" GROUP BY\n" +
//" HQHKanBan,\n" +
//" MaterialCode \n" +
//" HAVING\n" +
//" COUNT ( * ) > 1 \n" +
//" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
//" AND t1.MaterialCode = t2.MaterialCode \n" +
//"ORDER BY\n" +
//" t1.HQHKanBan,\n" +
//" t1.MaterialCode";
//var list12 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql11, version));
//var sql12 = "SELECT\n" +
//" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
//" a.KanbanNumber AS KanbanNumber,\n" +
//" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
//" HQHKanBan,\n" +
//" b2.MaterialCode \n" +
//"FROM\n" +
//" Set_UnHQSettleAccount a\n" +
//" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
//"WHERE\n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan = 'BJ'";
var sql11 = "SELECT DISTINCT\n" +
" t1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" ) t1\n" +
" INNER JOIN (\n" +
" SELECT\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount a \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan <> 'BJ' \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" MaterialCode \n" +
" HAVING\n" +
" COUNT ( * ) > 1 \n" +
" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
" AND t1.MaterialCode = t2.MaterialCode \n" +
"ORDER BY\n" +
" t1.HQHKanBan,\n" +
" t1.MaterialCode";
var list12 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql11, version));
var sql12 = "SELECT\n" +
" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
" b2.MaterialCode \n" +
"FROM\n" +
" Set_UnHQSettleAccount a\n" +
" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
"WHERE\n" +
" Version = '{0}' \n" +
" AND HQHKanBan = 'BJ'";
//var list13 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql12, version));
var list13 = DbConnection.Query<CompareFactoryExtend1>(string.Format(sql12, version));
//List<CompareFactoryExtend1> _lscopy = new List<CompareFactoryExtend1>();
List<CompareFactoryExtend1> _lscopy = new List<CompareFactoryExtend1>();
//foreach (var itm in list11)
//{
// var first = _lscopy.FirstOrDefault(p => p.HQHKanBan == itm.HQHKanBan && p.MaterialCode == itm.MaterialCode);
// if (first != null)
// {
// //first.KanbanNumber += "," + itm.KanbanNumber;
// //first.AcceptanceDate += "," + itm.AcceptanceDate;
// first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
// }
// else
// {
// _lscopy.Add(itm);
// }
//}
//foreach (var itm in list12)
//{
// _lscopy.Add(itm);
//}
//foreach (var itm in list13)
//{
// _lscopy.Add(itm);
//}
foreach (var itm in list11)
{
var first = _lscopy.FirstOrDefault(p => p.HQHKanBan == itm.HQHKanBan && p.MaterialCode == itm.MaterialCode);
if (first != null)
{
first.HQHKanBan += "," + itm.HQHKanBan;
//first.AcceptanceDate += "," + itm.AcceptanceDate;
first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
}
else
{
_lscopy.Add(itm);
}
}
foreach (var itm in list12)
{
_lscopy.Add(itm);
}
foreach (var itm in list13)
{
_lscopy.Add(itm);
}
//List<CompareFactoryExtend> _ls = new List<CompareFactoryExtend>();
@ -553,23 +554,23 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
_list = _query.ToList();
//foreach (var itm1 in _list)
//{
// //var itm = _ls.FirstOrDefault(p => p.Kanban == itm1.订货看板编号 && p.MaterialCode == itm1.Sap编码);
// //if (itm != null)
// //{
// // itm1.交货单号 = itm.WmsBillNum;
// // itm1.交货时间 = itm.WmsDate;
// //}
// var itmcopy = _lscopy.FirstOrDefault(p => p.HQHKanBan == itm1.订货看板编号 && p.MaterialCode == itm1.Sap编码);
// if (itmcopy != null)
// {
// //itm1.看板编号 = itmcopy.KanbanNumber;
// //itm1.验收单日期 = itmcopy.AcceptanceDate;
// itm1.外部单号 = itmcopy.ExternalKanbanNumber;
// }
//}
foreach (var itm1 in _list)
{
//var itm = _ls.FirstOrDefault(p => p.Kanban == itm1.订货看板编号 && p.MaterialCode == itm1.Sap编码);
//if (itm != null)
//{
// itm1.交货单号 = itm.WmsBillNum;
// itm1.交货时间 = itm.WmsDate;
//}
var itmcopy = _lscopy.FirstOrDefault(p => p.HQHKanBan == itm1. && p.MaterialCode == itm1.Sap编码);
if (itmcopy != null)
{
itm1. = itmcopy.HQHKanBan;
//itm1.验收单日期 = itmcopy.AcceptanceDate;
itm1. = itmcopy.ExternalKanbanNumber;
}
}
return _list;
@ -639,12 +640,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp.零件中文名称,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" temp.发货数量,\n" +
" isnull( TEMP2.Price, 0 )*isnull(temp.发货数量, 0 ) 发货总金额,\n" +
" isnull( TEMP2.Price, 0 )*isnull(temp.发货数量, 0 ) 系统未结总金额,\n" +
" temp.结算数量,\n" +
" temp.退货数量,\n" +
" temp3.Factory AS 工厂,temp3.ExternalKanbanNumber 外部单号,temp3.StorageLocationDesc 存储地点描述,\n" +
" ISNULL( temp.系统未结数量, 0 ) 系统未结数量,\n" +
" isnull( temp3.Qty, 0 ) AS 红旗未结数量,\n" +
" ( ISNULL( temp.系统未结数量, 0 ) - ISNULL( temp3.Qty, 0 ) ) 差异 \n" +
" ( ISNULL( temp.系统未结数量, 0 ) - ISNULL( temp3.Qty, 0 ) ) 数量差异 \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
@ -740,7 +742,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) UNION2 \n" +
" ) AS temp\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp.Sap编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount WHERE Version ='{2}' GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp.[订货看板编号] = temp3.HQHKanBan \n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode,ExternalKanbanNumber,Factory,StorageLocationDesc FROM Set_UnHQSettleAccount WHERE Version ='{2}' GROUP BY HQHKanBan, MaterialCode,ExternalKanbanNumber,Factory,StorageLocationDesc ) temp3 ON temp.[订货看板编号] = temp3.HQHKanBan \n" +
" AND temp.[客户物料号] = temp3.MaterialCode";
@ -871,15 +873,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string { set; get; }
[ExporterHeader(DisplayName = "交货时间")]
public string { set; get; }
[ExporterHeader(DisplayName = "收货仓库", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "订货看板编号")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "工厂")]
public string { set; get; }
[ExporterHeader(DisplayName = "存储地点描述")]
public string { set; get; }
[ExporterHeader(DisplayName = "外部单号")]
public string { set; get; }
@ -896,30 +898,32 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "物料组")]
public string { set; get; }
[ExporterHeader(DisplayName = "验收单日期",IsIgnore =true)]
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; }
[ExporterHeader(DisplayName = "红旗未结数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "差异")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "数量差异")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "工厂", IsIgnore = true)]
public string { set; get; }
@ -932,16 +936,20 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class HQSettledUnFactoryDetailDiff
{
[ExporterHeader(DisplayName = "收货仓库", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述", IsIgnore = true)]
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; }
@ -954,30 +962,22 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "物料组")]
public string { set; get; }
[ExporterHeader(DisplayName = "验收单日期", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "发货定价", IsIgnore = true)]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算单价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货数量",IsIgnore =true)]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算金额")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "退货数量",IsIgnore = true)]
public decimal 退 { set; get; }
[ExporterHeader(DisplayName = "系统未结数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "红旗未结数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "差异")]
[ExporterHeader(DisplayName = "数量差异")]
public decimal { set; get; }

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs

@ -204,7 +204,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode\n" +
" LEFT JOIN set_backQty AS tt ON a.Kanban = tt.Code \n" +
" AND a.MaterialCode = tt.MaterialCode \n" +
" AND c.MaterialCode = tt.MaterialCode \n" +
" WHERE\n" +
" B.Kanban IS NULL \n" +
" AND B.MaterialCode IS NULL \n" +
@ -239,7 +239,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode\n" +
" LEFT JOIN set_backQty AS tt ON a.Kanban = tt.Code \n" +
" AND a.MaterialCode = tt.MaterialCode \n" +
" AND c.MaterialCode = tt.MaterialCode \n" +
" WHERE\n" +
" a.WMSDeliveryQty> B.Qty AND (a.WMSDeliveryQty-tt.Qty)!=B.Qty \n" +
" ) TEMP1\n" +

Loading…
Cancel
Save