修改一版
parent
320b4902b2
commit
18baad014b
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=123.56.181.144,14333\\MSSQLExpress14;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;",
|
"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;",
|
||||||
"hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;"
|
"hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;"
|
||||||
//"RemoteTest": "Server=123.56.181.144,14333\\MSSQLExpress14;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;"
|
//"RemoteTest": "Server=123.56.181.144,14333\\MSSQLExpress14;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;"
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -153,6 +153,23 @@ namespace IRaCIS.Application.ViewModels
|
||||||
return Rows.Sum(x => x.PlatformFeeSum);
|
return Rows.Sum(x => x.PlatformFeeSum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public decimal SumPaymentCNY
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Rows.Sum(x => x.PaymentCNY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public decimal SumTaxCNY
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Rows.Sum(x => x.TaxCNY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Remuneration
|
public class Remuneration
|
||||||
|
|
|
@ -1207,17 +1207,31 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
public Stream ExportLaborPayment(List<Guid> paymentIds)
|
public Stream ExportLaborPayment(List<Guid> paymentIds)
|
||||||
{
|
{
|
||||||
|
#region 创建文件夹
|
||||||
if (!System.IO.Directory.Exists("./file"))
|
if (!System.IO.Directory.Exists("./file"))
|
||||||
{
|
{
|
||||||
System.IO.Directory.CreateDirectory("./file");
|
System.IO.Directory.CreateDirectory("./file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!System.IO.Directory.Exists("./file/第三方"))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory("./file/第三方");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!System.IO.Directory.Exists("./file/劳务费"))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory("./file/劳务费");
|
||||||
|
}
|
||||||
|
|
||||||
if (!System.IO.Directory.Exists("./Zip"))
|
if (!System.IO.Directory.Exists("./Zip"))
|
||||||
{
|
{
|
||||||
System.IO.Directory.CreateDirectory("./Zip");
|
System.IO.Directory.CreateDirectory("./Zip");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
List<LaborPayment> laborPaymentList = GetLaborPaymentList(paymentIds);
|
List<LaborPayment> laborPaymentList = GetLaborPaymentList(paymentIds);
|
||||||
|
|
||||||
//报酬
|
//报酬
|
||||||
|
@ -1227,12 +1241,24 @@ namespace IRaCIS.Application.Services
|
||||||
var cloudPaymentList = laborPaymentList.Where(x => x.PaymentMethod == PaymentMethod.CloudPayment).ToList();
|
var cloudPaymentList = laborPaymentList.Where(x => x.PaymentMethod == PaymentMethod.CloudPayment).ToList();
|
||||||
|
|
||||||
|
|
||||||
DirectoryInfo folder = new DirectoryInfo("./file");
|
|
||||||
|
var deletepaths =new List<string>(){
|
||||||
|
"./file/劳务费","./file/第三方" ,"./file"
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var item in deletepaths)
|
||||||
|
{
|
||||||
|
DirectoryInfo folder = new DirectoryInfo(item);
|
||||||
|
|
||||||
foreach (FileInfo file in folder.GetFiles())
|
foreach (FileInfo file in folder.GetFiles())
|
||||||
{
|
{
|
||||||
file.Delete();
|
file.Delete();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FileInfo fi2 = new FileInfo("./Zip/Payroll.zip");
|
FileInfo fi2 = new FileInfo("./Zip/Payroll.zip");
|
||||||
fi2.Delete();
|
fi2.Delete();
|
||||||
|
@ -1269,10 +1295,10 @@ namespace IRaCIS.Application.Services
|
||||||
};
|
};
|
||||||
remunerationInfo.Rows.Add(remunerationSingle);
|
remunerationInfo.Rows.Add(remunerationSingle);
|
||||||
|
|
||||||
var path = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\paystub(报酬).xlsx");
|
var path = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\paystub(劳务费).xlsx");
|
||||||
|
|
||||||
// 导入excel
|
// 导入excel
|
||||||
MiniExcel.SaveAsByTemplate($"./file/{item.ChineseName}_paystub_{item.YearMonth}(报酬).xlsx", path, remunerationSingle);
|
MiniExcel.SaveAsByTemplate($"./file/劳务费/{item.ChineseName}_paystub_{item.YearMonth}(劳务费).xlsx", path, remunerationSingle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1295,18 +1321,18 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
};
|
};
|
||||||
cloudPaymentInfo.Rows.Add(cloudPaymentSingle);
|
cloudPaymentInfo.Rows.Add(cloudPaymentSingle);
|
||||||
var path = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\paystub(云支付).xlsx");
|
var path = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\paystub(第三方).xlsx");
|
||||||
MiniExcel.SaveAsByTemplate($"./file/{item.ChineseName}_paystub_{item.YearMonth}(云支付).xlsx", path, cloudPaymentSingle);
|
MiniExcel.SaveAsByTemplate($"./file/第三方/{item.ChineseName}_paystub_{item.YearMonth}(第三方).xlsx", path, cloudPaymentSingle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var remunerationPath = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\Payroll Summary_(报酬).xlsx");
|
var remunerationPath = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\Payroll Summary_(劳务费).xlsx");
|
||||||
MiniExcel.SaveAsByTemplate($"./file/Payroll Summary_{remunerationInfo.YearMonth}(报酬).xlsx", remunerationPath, remunerationInfo);
|
MiniExcel.SaveAsByTemplate($"./file/劳务费/Payroll Summary_{remunerationInfo.YearMonth}(劳务费).xlsx", remunerationPath, remunerationInfo);
|
||||||
|
|
||||||
|
|
||||||
var cloudPaymentPath = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\Payroll Summary_(云支付).xlsx");
|
var cloudPaymentPath = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\Payroll Summary_(第三方).xlsx");
|
||||||
MiniExcel.SaveAsByTemplate($"./file/Payroll Summary_{cloudPaymentInfo.YearMonth}(云支付).xlsx", cloudPaymentPath, cloudPaymentInfo);
|
MiniExcel.SaveAsByTemplate($"./file/第三方/Payroll Summary_{cloudPaymentInfo.YearMonth}(第三方).xlsx", cloudPaymentPath, cloudPaymentInfo);
|
||||||
|
|
||||||
ZipFile.CreateFromDirectory("./file", "Zip/Payroll.zip");
|
ZipFile.CreateFromDirectory("./file", "Zip/Payroll.zip");
|
||||||
|
|
||||||
|
@ -1314,10 +1340,15 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var item in deletepaths)
|
||||||
|
{
|
||||||
|
DirectoryInfo folder = new DirectoryInfo(item);
|
||||||
|
|
||||||
foreach (FileInfo file in folder.GetFiles())
|
foreach (FileInfo file in folder.GetFiles())
|
||||||
{
|
{
|
||||||
file.Delete();
|
file.Delete();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
|
|
Loading…
Reference in New Issue