|
@@ -899,7 +899,7 @@ namespace OASystem.API.Controllers
|
|
|
AirType = tcl.ShippingSpaceTypeId
|
|
|
})
|
|
|
.ToList();
|
|
|
- if (DeleClientList.Count<1)
|
|
|
+ if (DeleClientList.Count < 1)
|
|
|
{
|
|
|
return Ok(JsonView(false, "暂无团组成员,请先填写团组成员!!!"));
|
|
|
}
|
|
@@ -947,14 +947,14 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
//计算费用总和
|
|
|
decimal airPrice = client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW;
|
|
|
- decimal AllPrice = airPrice + _EnterExitCosts.CityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
|
|
|
- dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
|
|
|
+ decimal AllPrice = airPrice + _EnterExitCosts.CityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
|
|
|
+ dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
|
|
|
_EnterExitCosts.Service;
|
|
|
WordAllPrice += AllPrice;
|
|
|
|
|
|
UsersTop += firstName + "出访费用为¥" + AllPrice.ToString("#0.00") + "元、";
|
|
|
|
|
|
- TeableBookmarkArr.Add("jp",(client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW).ToString("#0.00") + " 元"); //机票金额
|
|
|
+ TeableBookmarkArr.Add("jp", (client.AirType == 460 ? _EnterExitCosts.AirJJ : _EnterExitCosts.AirGW).ToString("#0.00") + " 元"); //机票金额
|
|
|
TeableBookmarkArr.Add("cs", _EnterExitCosts.CityTranffic.ToString("#0.00") + " 元"); //城市交通费用
|
|
|
TeableBookmarkArr.Add("zs", dac1.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //住宿费
|
|
|
string zsinfo = string.Empty;
|
|
@@ -997,7 +997,7 @@ namespace OASystem.API.Controllers
|
|
|
SetCells(ChildTable, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
|
|
|
SetCells(ChildTable, doc, rowIndex, 4, "CNY" + item.SubTotal * days + "\r\n");
|
|
|
rowIndex++;
|
|
|
- zsinfo += item.Place + " " + days + "晚 " + item.Cost + item.Currency + "/晚" + " 汇率" + (item.SubTotal /item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
+ zsinfo += item.Place + " " + days + "晚 " + item.Cost + item.Currency + "/晚" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1030,9 +1030,9 @@ namespace OASystem.API.Controllers
|
|
|
SetCells(ChildTable1, doc, rowIndex, 1, days + "天");
|
|
|
SetCells(ChildTable1, doc, rowIndex, 2, item.Cost + item.Currency + "/天");
|
|
|
SetCells(ChildTable1, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
|
|
|
- SetCells(ChildTable1, doc, rowIndex, 4, "CNY" +item.SubTotal * days);
|
|
|
+ SetCells(ChildTable1, doc, rowIndex, 4, "CNY" + item.SubTotal * days);
|
|
|
rowIndex++;
|
|
|
- hsinfo += item.Place + " " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" +item.SubTotal * days + "\r\n";
|
|
|
+ hsinfo += item.Place + " " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1127,7 +1127,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
//文件名
|
|
|
string zipFileName = _DelegationInfo.TeamName + "-收款账单.zip";
|
|
|
- string zipPath = $"ForeignReceivables/File/{_DelegationInfo.TeamName}-收款账单{DateTime.Now.ToString("yyyyMMddHHmmss")}.zip";
|
|
|
+ string zipPath = $"ForeignReceivables/File/{_DelegationInfo.TeamName}-收款账单{DateTime.Now.ToString("yyyyMMddHHmmss")}.zip";
|
|
|
try
|
|
|
{
|
|
|
using (var zip = ZipFile.Open(AppSettingsHelper.Get("WordBasePath") + zipPath, ZipArchiveMode.Create))
|
|
@@ -1603,7 +1603,8 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
DateTime dtTemp;
|
|
|
bool b = DateTime.TryParse(item_rst.visitDate, out dtTemp);
|
|
|
- if (b) {
|
|
|
+ if (b)
|
|
|
+ {
|
|
|
item_rst.visitDate = dtTemp.ToString("yyyy-MM-dd");
|
|
|
}
|
|
|
|
|
@@ -1768,7 +1769,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
- return Ok(JsonView(true, "操作成功!",new { ConpanyData = conpanyDatas }));
|
|
|
+ return Ok(JsonView(true, "操作成功!", new { ConpanyData = conpanyDatas }));
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -1818,7 +1819,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
}
|
|
|
|
|
|
tree_Fin_DailyFeePaymentResult dailyResult = PayRequest_DailyByDateRange(dto.Status, checkedView.DailyPaymentIds, dto.beginDt, dto.endDt);
|
|
|
- tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange( dto.Status,checkedView.GroupIds, dto.beginDt, dto.endDt);
|
|
|
+ tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange(dto.Status, checkedView.GroupIds, dto.beginDt, dto.endDt);
|
|
|
|
|
|
return Ok(JsonView(true, "获取成功", new { daily = dailyResult, group = groupResult }));
|
|
|
}
|
|
@@ -1875,7 +1876,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
/// <param name="beginDt"></param>
|
|
|
/// <param name="endDt"></param>
|
|
|
/// <returns></returns>
|
|
|
- private tree_Group_DailyFeePaymentResult PayRequest_GroupPaymentByDateRange(int status,List<int> _groupIds, string beginDt, string endDt)
|
|
|
+ private tree_Group_DailyFeePaymentResult PayRequest_GroupPaymentByDateRange(int status, List<int> _groupIds, string beginDt, string endDt)
|
|
|
{
|
|
|
tree_Group_DailyFeePaymentResult _DailyFeePaymentResult = new tree_Group_DailyFeePaymentResult();
|
|
|
List<tree_Group_DailyFeePaymentPageListView> dataList = new List<tree_Group_DailyFeePaymentPageListView>();
|
|
@@ -1919,7 +1920,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
var ExtraCostDatas = _sqlSugar.Queryable<Fin_GroupExtraCost>().Where(it => it.IsDel == 0 && groupIds.Contains(it.DiId)).ToList();
|
|
|
#endregion
|
|
|
//Expense company
|
|
|
- foreach ( var groupInfo in _groupDatas)
|
|
|
+ foreach (var groupInfo in _groupDatas)
|
|
|
{
|
|
|
List<Group_DailyFeePaymentContentInfolView> childList = new List<Group_DailyFeePaymentContentInfolView>();
|
|
|
|
|
@@ -1941,7 +1942,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
{
|
|
|
if (payInfo.OrbitalPrivateTransfer == 0) //公转
|
|
|
{
|
|
|
- priName = $"【{orbitalPrivateTransfer}】【导游: {opData.ServiceGuide} 】{opData.Area}" ;
|
|
|
+ priName = $"【{orbitalPrivateTransfer}】【导游: {opData.ServiceGuide} 】{opData.Area}";
|
|
|
}
|
|
|
else if (payInfo.OrbitalPrivateTransfer == 1) //私转
|
|
|
{
|
|
@@ -2072,7 +2073,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
{
|
|
|
item.IsChecked = _dailyIds.Contains(item.Id);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (dic_setData.ContainsKey(item.PriceTypeId))
|
|
|
{
|
|
|
item.priceTypeStr = dic_setData[item.PriceTypeId];
|
|
@@ -2152,7 +2153,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- PaymentRequestCheckedView requestCheckedView =new PaymentRequestCheckedView();
|
|
|
+ PaymentRequestCheckedView requestCheckedView = new PaymentRequestCheckedView();
|
|
|
List<int> groupIds = new List<int>();
|
|
|
List<int> dailyPaymentIds = new List<int>();
|
|
|
|
|
@@ -2186,15 +2187,15 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
if (dto.Type == 1)
|
|
|
{
|
|
|
TimeSpan ts = DateTime.Now.AddDays(180) - DateTime.Now; //设置redis 过期时间 半年(180)
|
|
|
- var status = await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>("paymentRequestCheckedData", JsonConvert.SerializeObject(requestCheckedView),ts);
|
|
|
+ var status = await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>("paymentRequestCheckedData", JsonConvert.SerializeObject(requestCheckedView), ts);
|
|
|
if (status)
|
|
|
{
|
|
|
return Ok(JsonView(true, "操作成功!"));
|
|
|
}
|
|
|
}
|
|
|
- else if(dto.Type == 2)
|
|
|
+ else if (dto.Type == 2)
|
|
|
{
|
|
|
- var status = await RedisRepository.RedisFactory.CreateRedisRepository().KeyDeleteAsync("paymentRequestCheckedData" );
|
|
|
+ var status = await RedisRepository.RedisFactory.CreateRedisRepository().KeyDeleteAsync("paymentRequestCheckedData");
|
|
|
if (status)
|
|
|
{
|
|
|
return Ok(JsonView(true, "操作成功!"));
|
|
@@ -2286,7 +2287,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> PostPayRequestPayChange(PayRequestPayChangeDto dto)
|
|
|
+ public async Task<IActionResult> PostPayRequestPayChange(PayRequestPayChangeDto dto)
|
|
|
{
|
|
|
if (dto.UserId < 1)
|
|
|
{
|
|
@@ -2426,7 +2427,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
checkedView = JsonConvert.DeserializeObject<PaymentRequestCheckedView>(checkedStr.ToString());
|
|
|
}
|
|
|
|
|
|
- if (checkedView == null )
|
|
|
+ if (checkedView == null)
|
|
|
{
|
|
|
return Ok(JsonView(false, "没有选中的数据!"));
|
|
|
}
|
|
@@ -2778,6 +2779,37 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 超支费用
|
|
|
+ /// 详情查询
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> PostGroupExtraCost_Detail(Fin_GroupExtraCostDto_Detail dto)
|
|
|
+ {
|
|
|
+ if (dto.Id < 1) {
|
|
|
+ return Ok(JsonView(false, "查询失败"));
|
|
|
+ }
|
|
|
+
|
|
|
+ string sql = string.Format(@" Select
|
|
|
+ f.Id,f.DiId,
|
|
|
+ f.PriceName,f.Price,f.PriceCurrency,c.Payee,c.OrbitalPrivateTransfer,c.PayDId,
|
|
|
+ c.CTDId,f.PriceType,f.PriceDetailType,f.Coefficient,f.Remark
|
|
|
+ From Fin_GroupExtraCost f
|
|
|
+ Inner Join Grp_CreditCardPayment c On f.Id = c.CId
|
|
|
+ Left Join Sys_Users u On f.CreateUserId = u.Id
|
|
|
+ Where f.IsDel=0 And c.CTable = 1015
|
|
|
+ And f.Id = {0} ", dto.Id);
|
|
|
+ Fin_GroupExtraCostDetailView detailView = await _sqlSugar.SqlQueryable<Fin_GroupExtraCostDetailView>(sql).FirstAsync();
|
|
|
+ if (detailView == null) {
|
|
|
+ return Ok(JsonView(false, "查询失败"));
|
|
|
+ }
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功", detailView));
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 超支费用
|
|
|
/// 列表查询
|
|
@@ -2822,7 +2854,8 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
{
|
|
|
DateTime dtTemp_CreateTime;
|
|
|
bool b_ct = DateTime.TryParse(item.CreateTime, out dtTemp_CreateTime);
|
|
|
- if (b_ct) {
|
|
|
+ if (b_ct)
|
|
|
+ {
|
|
|
item.CreateTime = dtTemp_CreateTime.ToString("yyyy-MM-dd HH:mm");
|
|
|
}
|
|
|
|
|
@@ -2882,7 +2915,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
|
|
|
}
|
|
|
|
|
|
|
|
|
- return Ok(JsonView(false, "查询成功"));
|
|
|
+ return Ok(JsonView(false, "查询失败"));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|