|
@@ -56,6 +56,7 @@ FROM
|
|
|
LEFT JOIN Sys_Users u ON o.CreateUserId = u.Id
|
|
|
{0}
|
|
|
ORDER BY
|
|
|
+ o.[Date] desc ,
|
|
|
o.CreateTime desc
|
|
|
", sqlWhere);
|
|
|
var OfficialActivities = await _sqlSugar.SqlQueryable<OfficialActivitiesView>(sql).ToListAsync();
|
|
@@ -118,7 +119,8 @@ ORDER BY
|
|
|
{
|
|
|
result = new JsonView() { Code = StatusCodes.Status200OK, Msg = "暂无数据!" };
|
|
|
if (dto.PageSize == 0 && dto.PageIndex == 0) { result.Data = OfficialActivities; }
|
|
|
- else {
|
|
|
+ else
|
|
|
+ {
|
|
|
ListViewBase<OfficialActivitiesView> rst = new ListViewBase<OfficialActivitiesView>();
|
|
|
rst.DataList = OfficialActivities;
|
|
|
rst.DataCount = 0;
|
|
@@ -162,12 +164,12 @@ FROM
|
|
|
{0}", sqlWhere);
|
|
|
var oa = await _sqlSugar.SqlQueryable<OfficialActivitiesView>(sql).FirstAsync();
|
|
|
|
|
|
- var array1 = _sqlSugar.Queryable<Grp_OfficialDutyLinkTranslator>()
|
|
|
+ var array1 = _sqlSugar.Queryable<Grp_OfficialDutyLinkTranslator>()
|
|
|
.Where(x => x.IsDel == 0 && x.OfficialDutyId == dto.Id)
|
|
|
.Select(x => x.TranslatorId)
|
|
|
.ToArray();
|
|
|
|
|
|
- if (array1.Any())
|
|
|
+ if (array1.Any())
|
|
|
{
|
|
|
oa.TranslatorIdItem = array1;
|
|
|
|
|
@@ -180,7 +182,7 @@ FROM
|
|
|
|
|
|
oa.TranslatorInfo = _mapper.Map<TranslatorView>(translatorInfo);
|
|
|
|
|
|
- if(oa.TranslatorInfo != null)
|
|
|
+ if (oa.TranslatorInfo != null)
|
|
|
oa.TranslatorInfo.CurrencyName = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.Id == oa.TranslatorInfo.Currency).First()?.Name ?? "";
|
|
|
}
|
|
|
|
|
@@ -357,10 +359,10 @@ FROM
|
|
|
else
|
|
|
{
|
|
|
var ifNullUp = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
|
|
|
- .FirstAsync(a => a.Country == res_InvitationData.Country
|
|
|
- && a.City == res_InvitationData.City
|
|
|
- && a.UnitName == res_InvitationData.UnitName
|
|
|
- && a.IsDel == 0
|
|
|
+ .FirstAsync(a => a.Country == res_InvitationData.Country
|
|
|
+ && a.City == res_InvitationData.City
|
|
|
+ && a.UnitName == res_InvitationData.UnitName
|
|
|
+ && a.IsDel == 0
|
|
|
&& a.Address == res_InvitationData.Address);
|
|
|
if (ifNullUp != null)
|
|
|
{
|
|
@@ -368,7 +370,7 @@ FROM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (res_InvitationData.Id == 0 )
|
|
|
+ if (res_InvitationData.Id == 0)
|
|
|
{
|
|
|
DataID = await _sqlSugar.Insertable(res_InvitationData).ExecuteReturnIdentityAsync();
|
|
|
}
|
|
@@ -392,7 +394,7 @@ FROM
|
|
|
})
|
|
|
.ExecuteCommandAsync();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//公务出访
|
|
|
bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Res_OfficialActivities
|
|
|
{
|
|
@@ -511,13 +513,13 @@ FROM
|
|
|
else
|
|
|
{
|
|
|
_sqlSugar.RollbackTran();
|
|
|
- result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
|
|
|
+ result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public async Task<Result> PostReqReqSampleTips(string country, string Area,string client)
|
|
|
+ public async Task<Result> PostReqReqSampleTips(string country, string Area, string client)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(country)) return new Result() { Code = -1, Msg = "国家为空!" };
|
|
|
|
|
@@ -534,7 +536,7 @@ FROM
|
|
|
|
|
|
//ReqReqSampleTipsView
|
|
|
var _views = await _sqlSugar.SqlQueryable<ReqReqSampleTipsView>(sql).ToListAsync();
|
|
|
- if (_views.Count > 0 )
|
|
|
+ if (_views.Count > 0)
|
|
|
{
|
|
|
return new Result() { Code = 0, Msg = "操作成功!", Data = _views };
|
|
|
}
|