|
@@ -10725,6 +10725,7 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EnterExitCostDraftMobileFeeTips(EnterExitCostDraftMobileFeeTipsDto dto)
|
|
|
{
|
|
|
+ int portType = dto.PortType;
|
|
|
if (!_portTypeData.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
|
|
|
|
var tipsData = new List<int>() { 1, 2, 3 };
|
|
@@ -10736,23 +10737,30 @@ FROM
|
|
|
}
|
|
|
else if (dto.TipsType == 2)
|
|
|
{
|
|
|
- //if (dto.DraftId < 1) return Ok(JsonView(false,MsgTips.Id));
|
|
|
+ if (portType == 2)
|
|
|
+ {
|
|
|
+ if (dto.DraftId < 1) return Ok(JsonView(false, MsgTips.Id));
|
|
|
+ }
|
|
|
|
|
|
var cityIds = await _sqlSugar.Queryable<Grp_DayAndCostDraft>()
|
|
|
.Where(x => x.IsDel == 0 && x.ParentId == dto.DraftId)
|
|
|
.Select(x => x.NationalTravelFeeId)
|
|
|
.Distinct()
|
|
|
.ToListAsync();
|
|
|
-
|
|
|
- //if (!cityIds.Any()) return Ok(JsonView(false, "请先录入出入境费用明细!"));
|
|
|
-
|
|
|
+ if (portType == 2)
|
|
|
+ {
|
|
|
+ if (!cityIds.Any()) return Ok(JsonView(false, "请先录入出入境费用明细!"));
|
|
|
+ }
|
|
|
var countrys = await _sqlSugar.Queryable<Grp_NationalTravelFee>()
|
|
|
.Where(x => x.IsDel == 0 && cityIds.Contains(x.Id))
|
|
|
.Select(x => x.Country)
|
|
|
.Distinct()
|
|
|
.ToArrayAsync();
|
|
|
- //if (!countrys.Any()) return Ok(JsonView(false, "请先录入出入境费用明细!"));
|
|
|
|
|
|
+ if (portType == 2)
|
|
|
+ {
|
|
|
+ if (!countrys.Any()) return Ok(JsonView(false, "请先录入出入境费用明细!"));
|
|
|
+ }
|
|
|
(decimal totalAmt, string remark) = await _visaFeeInfoRep.EnterExitCostDraftVisaTips(countrys);
|
|
|
|
|
|
return Ok(JsonView(true, "查询成功!", new
|