|
@@ -2163,9 +2163,7 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostPayRequestInit()
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- var conpanyDatas = _sqlSugar.Queryable<Sys_Company>()
|
|
|
+ var conpanyDatas = _sqlSugar.Queryable<Sys_Company>()
|
|
|
.Where(it => it.IsDel == 0)
|
|
|
.Select(it => new
|
|
|
{
|
|
@@ -2175,12 +2173,7 @@ namespace OASystem.API.Controllers
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
- return Ok(JsonView(true, "操作成功!", new { ConpanyData = conpanyDatas }));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
- }
|
|
|
+ return Ok(JsonView(true, "操作成功!", new { ConpanyData = conpanyDatas }));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -3142,7 +3135,18 @@ namespace OASystem.API.Controllers
|
|
|
dto.PageId = 51;
|
|
|
return Ok(JsonView(false, "请传入有效的PageId参数!"));
|
|
|
}
|
|
|
- if (dto.ConpanyId < 1 || dto.ConpanyId > 4)
|
|
|
+
|
|
|
+ var conpanyDatas = _sqlSugar.Queryable<Sys_Company>()
|
|
|
+ .Where(it => it.IsDel == 0)
|
|
|
+ .Select(it => new
|
|
|
+ {
|
|
|
+ Id = it.Id,
|
|
|
+ ConpamyName = it.CompanyName
|
|
|
+
|
|
|
+ }).ToList();
|
|
|
+
|
|
|
+ var conpanyIds = conpanyDatas.Select(x => x.Id).ToList();
|
|
|
+ if (!conpanyIds.Contains(dto.ConpanyId))
|
|
|
{
|
|
|
return Ok(JsonView(false, "请传入有效的ConpanyId参数!"));
|
|
|
}
|
|
@@ -3184,39 +3188,42 @@ namespace OASystem.API.Controllers
|
|
|
dailyResult.childList = new List<Fin_DailyFeePaymentContentInfolView>();
|
|
|
}
|
|
|
|
|
|
- List<tree_Group_DailyFeePaymentPageListView> _GroupData = new List<tree_Group_DailyFeePaymentPageListView>();
|
|
|
- List<tree_Fin_DailyFeePaymentPageListView> _DailyData = new List<tree_Fin_DailyFeePaymentPageListView>();
|
|
|
-
|
|
|
- //1 成都泛美商务有限公司
|
|
|
- if (dto.ConpanyId == 1)
|
|
|
- {
|
|
|
- if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 1).ToList();
|
|
|
- if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 1).ToList();
|
|
|
-
|
|
|
- }
|
|
|
- //2 四川泛美交流有限公司
|
|
|
- else if (dto.ConpanyId == 2)
|
|
|
- {
|
|
|
- if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 2).ToList();
|
|
|
- if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 2).ToList();
|
|
|
-
|
|
|
- }
|
|
|
- //3 成都纽茵教育科技有限公司
|
|
|
- else if (dto.ConpanyId == 3)
|
|
|
- {
|
|
|
- if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 3).ToList();
|
|
|
- if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 3).ToList();
|
|
|
-
|
|
|
- }
|
|
|
- //4 成都鸿企中元科技有限公司
|
|
|
- else if (dto.ConpanyId == 4)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "暂未开放该类型!"));
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "参数ConpanyId不可使用!"));
|
|
|
- }
|
|
|
+ var _GroupData = new List<tree_Group_DailyFeePaymentPageListView>();
|
|
|
+ var _DailyData = new List<tree_Fin_DailyFeePaymentPageListView>();
|
|
|
+
|
|
|
+ if (groupResult.dataList.Any()) _GroupData = groupResult.dataList.Where(it => it.CompanyId == dto.ConpanyId).ToList();
|
|
|
+ if (dailyResult.dataList.Any()) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == dto.ConpanyId).ToList();
|
|
|
+
|
|
|
+ ////1 成都泛美商务有限公司
|
|
|
+ //if (dto.ConpanyId == 1)
|
|
|
+ //{
|
|
|
+ // if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 1).ToList();
|
|
|
+ // if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 1).ToList();
|
|
|
+
|
|
|
+ //}
|
|
|
+ ////2 四川泛美交流有限公司
|
|
|
+ //else if (dto.ConpanyId == 2)
|
|
|
+ //{
|
|
|
+ // if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 2).ToList();
|
|
|
+ // if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 2).ToList();
|
|
|
+
|
|
|
+ //}
|
|
|
+ ////3 成都纽茵教育科技有限公司
|
|
|
+ //else if (dto.ConpanyId == 3)
|
|
|
+ //{
|
|
|
+ // if (groupResult.dataList != null && groupResult.dataList.Count > 0) _GroupData = groupResult.dataList.Where(it => it.CompanyId == 3).ToList();
|
|
|
+ // if (dailyResult.dataList != null && dailyResult.dataList.Count > 0) _DailyData = dailyResult.dataList.Where(it => it.CompanyId == 3).ToList();
|
|
|
+
|
|
|
+ //}
|
|
|
+ ////4 成都鸿企中元科技有限公司
|
|
|
+ //else if (dto.ConpanyId == 4)
|
|
|
+ //{
|
|
|
+ // return Ok(JsonView(false, "暂未开放该类型!"));
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // return Ok(JsonView(false, "参数ConpanyId不可使用!"));
|
|
|
+ //}
|
|
|
|
|
|
string _requestPaymentDt = DateTime.Now.ToString("yyyy-MM-dd"),//申请付款日期
|
|
|
_appliedAmount = "", //申请付款金额
|