Browse Source

日常代码提交

FoShanPG
44673626 3 years ago
parent
commit
df89bc8253
  1. 70
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
  2. 16
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
  3. 69
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

70
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs

@ -86,7 +86,8 @@ namespace Win.Sfs.SettleAccount.Entities
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public int State { set; get; }
public ExporterStatus State { set; get; }
@ -136,7 +137,8 @@ namespace Win.Sfs.SettleAccount.Entities
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public int State { set; get; }
public ExporterStatus State { set; get; }
[ExporterHeader(DisplayName = "客户物料")]
[ImporterHeader(Name = "客户物料")]
@ -216,14 +218,15 @@ namespace Win.Sfs.SettleAccount.Entities
[ImporterHeader(Name = "BillNum", IsIgnore = true)]
[ExporterHeader(DisplayName = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
[ExporterHeader(DisplayName = "状态")]
[ValueMapping("未处理", 0)]
[ValueMapping("申请出库", 1)]
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public int State { set; get; }
public ExporterStatus State { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
@ -272,7 +275,8 @@ namespace Win.Sfs.SettleAccount.Entities
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public int State { set; get; }
public ExporterStatus State { set; get; }
[ExporterHeader(DisplayName = "物料代码")]
/// <summary>
@ -365,7 +369,8 @@ namespace Win.Sfs.SettleAccount.Entities
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public int State { set; get; }
public ExporterStatus State { set; get; }
[ImporterHeader(Name = "物料代码")]
[ExporterHeader(DisplayName = "物料代码")]
@ -450,13 +455,14 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
[ValueMapping("0", "未处理")]
[ValueMapping("1", "申请出库")]
[ValueMapping("2", "确认出库")]
[ValueMapping("3", "不能出库")]
[ValueMapping("4", "取消出库")]
[ExporterHeader(DisplayName = "状态")]
public int State { set; get; }
[ValueMapping("未处理", 0)]
[ValueMapping("申请出库", 1)]
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public ExporterStatus State { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
@ -508,25 +514,16 @@ namespace Win.Sfs.SettleAccount.Entities
[ImporterHeader(Name = "BillNum", IsIgnore = true)]
[ExporterHeader(DisplayName = "BillNum", IsIgnore = true)]
public string BillNum { set; get; }
//[ValueMapping("未处理", "0")]
//[ValueMapping("申请出库", "1")]
//[ValueMapping("确认出库", "2")]
//[ValueMapping("不能出库", "3")]
//[ValueMapping("取消出库", "4")]
//[ValueMapping("0","未处理")]
//[ValueMapping("1","申请出库")]
//[ValueMapping("2","确认出库")]
//[ValueMapping("3","不能出库")]
//[ValueMapping("4","取消出库")]
[ValueMapping("未处理", ExporterStatus.Normal)]
[ValueMapping("申请出库", ExporterStatus.PupilsAway)]
[ValueMapping("确认出库", ExporterStatus.Suspension)]
[ValueMapping("不能出库", ExporterStatus.WorkStudy)]
[ValueMapping("取消出库", ExporterStatus.PostPractice)]
[ExporterHeader(DisplayName = "状态")]
public int State { set; get; }
[ValueMapping("未处理", 0)]
[ValueMapping("申请出库", 1)]
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public ExporterStatus State { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
@ -587,12 +584,13 @@ namespace Win.Sfs.SettleAccount.Entities
public string InPut { set; get; }
[ExporterHeader(DisplayName = "状态")]
//[ValueMapping("未处理", 0)]
//[ValueMapping("申请出库", 1)]
//[ValueMapping("确认出库", 2)]
//[ValueMapping("不能出库", 3)]
//[ValueMapping("取消出库", 4)]
public int State { set; get; }
[ValueMapping("未处理", 0)]
[ValueMapping("申请出库", 1)]
[ValueMapping("确认出库", 2)]
[ValueMapping("不能出库", 3)]
[ValueMapping("取消出库", 4)]
public ExporterStatus State { set; get; }
[ImporterHeader(Name = "结算物料号")]
[ExporterHeader(DisplayName = "结算物料号")]

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

@ -189,10 +189,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ( ISNULL( a.WMSDeliveryQty, 0 ) - ISNULL( b.Qty, 0 ) - isnull( tt.qty, 0 ) ) AS DiffQty \n" +
" FROM\n" +
" ( SELECT SUM ( WMSDeliveryQty ) WMSDeliveryQty, MaterialCode, Kanban FROM Set_WMSKanBanSettle GROUP BY MaterialCode, Kanban ) A\n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_KanBanSettle {1} GROUP BY Kanban, MaterialCode ) B ON A.Kanban = B.Kanban \n" +
" LEFT JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_KanBanSettle {0} GROUP BY Kanban, MaterialCode ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode\n" +
" LEFT JOIN ( SELECT * FROM set_backQty WHERE Version = '{0}' ) AS tt ON a.Kanban = tt.Code \n" +
" LEFT JOIN ( SELECT * FROM set_backQty ) AS tt ON a.Kanban = tt.Code \n" +
" AND a.MaterialCode = tt.MaterialCode \n" +
" WHERE\n" +
" B.Kanban IS NULL \n" +
@ -224,10 +224,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ( ISNULL( a.WMSDeliveryQty, 0 ) - ISNULL( b.Qty, 0 ) - isnull( tt.qty, 0 ) ) AS DiffQty \n" +
" FROM\n" +
" ( SELECT SUM ( WMSDeliveryQty ) WMSDeliveryQty, MaterialCode, Kanban FROM Set_WMSKanBanSettle GROUP BY MaterialCode, Kanban ) A\n" +
" INNER JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_KanBanSettle {1} GROUP BY Kanban, MaterialCode ) B ON A.Kanban = B.Kanban \n" +
" INNER JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_KanBanSettle {0} GROUP BY Kanban, MaterialCode ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode\n" +
" LEFT JOIN ( SELECT * FROM set_backQty WHERE Version = '{0}' ) AS tt ON a.Kanban = tt.Code \n" +
" LEFT JOIN ( SELECT * FROM set_backQty ) AS tt ON a.Kanban = tt.Code \n" +
" AND a.MaterialCode = tt.MaterialCode \n" +
" WHERE\n" +
" a.WMSDeliveryQty> B.Qty \n" +
@ -237,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
sql = string.Format(sql, version, contion);
sql = string.Format(sql,contion);
//发运数据中,查出看板号+物料号相同的重复数据
@ -385,7 +385,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 and a.MaterialCode = b.MaterialCode and a.version='" + version + "'\n" +
" left join set_backQty as tt on a.Kanban = tt.Code and a.MaterialCode = b.MaterialCode \n" +
" WHERE\n" +
" B.Kanban IS NULL \n" +
" AND B.MaterialCode IS NULL {0}\n" +
@ -456,7 +456,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" INNER JOIN ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_KanBanSettle {1} GROUP BY Kanban, MaterialCode ) B ON A.Kanban = B.Kanban\n" +
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode\n" +
" LEFT JOIN ( SELECT * FROM set_backQty WHERE Version = '{2}' ) AS tt ON a.Kanban = tt.Code \n" +
" LEFT JOIN ( SELECT * FROM set_backQty ) AS tt ON a.Kanban = tt.Code \n" +
" AND a.MaterialCode = b.MaterialCode \n" +
" WHERE\n" +
" a.WMSDeliveryQty> B.Qty {0}\n" +
@ -465,7 +465,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
sql = string.Format(sql, str, contion,version);
sql = string.Format(sql, str, contion);
var _query = DbConnection.Query<KanbanUnSettled>(sql, null, null, true, 1200, null);
var _list = _query.ToList();
return _list;

69
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -836,10 +836,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <param name="begintime"></param>
/// <param name="endtime"></param>
/// <returns></returns>
public virtual List<SettleSparePartExport> GetReverseWithCodeSettleSparePartReportList(string purchaseOrderNo, string version, string sapCode, string matialCode,
public virtual List<UnSettleSparePartExport> GetReverseWithCodeSettleSparePartReportList(string purchaseOrderNo, string version, string sapCode, string matialCode,
string begintime, string endtime)
{
List<SettleSparePartExport> _list = new List<SettleSparePartExport>();
List<UnSettleSparePartExport> _list = new List<UnSettleSparePartExport>();
string condition = "";
@ -863,11 +863,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.SAP编码,\n" +
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.货数量,\n" +
" temp1.货数量,\n" +
" temp1.收货数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp1.收货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp1.收货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价 \n" +
" FROM\n" +
" (\n" +
@ -879,7 +879,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.CustomerPartCode AS 物料代码,\n" +
" c.MaterialDesc AS 物料描述,\n" +
" c.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 货数量,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 货数量,\n" +
" ISNULL( b.ReceiptQty, 0 ) AS 收货数量,\n" +
" ( ISNULL( a.ReceiptQty, 0 ) - ISNULL( b.ReceiptQty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
@ -906,11 +906,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.SAP编码,\n" +
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.货数量,\n" +
" temp1.货数量,\n" +
" temp1.收货数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp1.收货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp1.收货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价 \n" +
" FROM\n" +
" (\n" +
@ -922,7 +922,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.CustomerPartCode AS 物料代码,\n" +
" c.MaterialDesc AS 物料描述,\n" +
" c.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 货数量,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 货数量,\n" +
" ISNULL( b.ReceiptQty, 0 ) AS 收货数量,\n" +
" ( ISNULL( b.ReceiptQty, 0 ) - ISNULL( a.ReceiptQty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
@ -1105,7 +1105,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var _query = DbConnection.Query<SettleSparePartExport>(_sql, null, null, true, 1200, null);
var _query = DbConnection.Query<UnSettleSparePartExport>(_sql, null, null, true, 1200, null);
_list = _query.ToList();
foreach (var itm1 in _list)
@ -1243,4 +1243,55 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal { set; get; }
}
/// <summary>
/// 大众备件未结
/// </summary>
public class UnSettleSparePartExport
{
public UnSettleSparePartExport()
{
}
[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 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 string 退 { set; get; }
[ExporterHeader(DisplayName = "实际交货数量")]
public string { set; get; }
[ExporterHeader(DisplayName = "定价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
public decimal { set; get; }
}
}

Loading…
Cancel
Save