Files
zszq-trs/YLErpDAL/Modules/EodModule/CompanySpecial/DongZhengService.cs
T
2024-05-09 14:06:26 +08:00

37 lines
1.1 KiB
C#

using YLErp.Modules.EodModule.SettlementModule;
namespace YLErp.Modules.EodModule.CompanySpecial
{
public class DongZhengService
{
public static void EodExecute(EodSettlementContextV2 context)
{
try
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}
var dateStr = context.SettleDate.ToString("yyyyMMdd");
var targetPath = Path.Combine("F:");
if (!Directory.Exists(targetPath))
{
targetPath = Path.Combine("D:\\list\\wait", dateStr);
}
else
{
targetPath = Path.Combine("F:\\list\\wait", dateStr);
}
if (Directory.Exists(targetPath))
{
Directory.Delete(targetPath, true);
}
}
catch (Exception ex)
{
LogFactory.GetLogger("DongZhengService").Error(ex);
}
}
}
}