|
@@ -46,6 +46,7 @@ namespace OASystem.API.Controllers
|
|
|
private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
|
|
|
private readonly DelegationEnDataRepository _delegationEnDataRep;
|
|
|
private readonly DelegationVisaRepository _delegationVisaRep;
|
|
|
+ private readonly MessageRepository _message;
|
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
|
private string url;
|
|
|
private string path;
|
|
@@ -55,7 +56,7 @@ namespace OASystem.API.Controllers
|
|
|
public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
|
InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
|
|
|
- , DelegationVisaRepository delegationVisaRep)
|
|
|
+ , DelegationVisaRepository delegationVisaRep, MessageRepository message)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_grpScheduleRep = grpScheduleRep;
|
|
@@ -74,6 +75,7 @@ namespace OASystem.API.Controllers
|
|
|
_delegationEnDataRep = delegationEnDataRep;
|
|
|
_enterExitCostRep = enterExitCostRep;
|
|
|
_delegationVisaRep = delegationVisaRep;
|
|
|
+ _message = message;
|
|
|
}
|
|
|
|
|
|
#region 流程管控
|
|
@@ -610,6 +612,75 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// IOS获取团组签证拍照上传进度05(修改签证状态/通知)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<ActionResult> PostIOSVisaProgressChangeStatus(IOS_VisaChangeStatusDto dto)
|
|
|
+ {
|
|
|
+ if (dto == null)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "请求错误:"));
|
|
|
+ }
|
|
|
+
|
|
|
+ string msg = "参数错误";
|
|
|
+ if (dto.diId > 0 && dto.visaStatus > 0 && dto.visaStatus < 4)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //_delegationVisaRep.BeginTran();
|
|
|
+
|
|
|
+ var updCount = await _delegationVisaRep._sqlSugar.Updateable<Grp_VisaProgressCustomer>()
|
|
|
+ .SetColumns(it => it.WorkStatus == dto.visaStatus)
|
|
|
+ .Where(s => s.Id == dto.visaProgressCustomerId)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+ if (updCount > 0 && dto.publishCode == 1) {
|
|
|
+
|
|
|
+ _delegationVisaRep.ChangeDataBase(DBEnum.OA2014DB); //切换到新OA后删除
|
|
|
+ GroupInfoDto grpDto = new GroupInfoDto() { Id = dto.diId };
|
|
|
+ var groupData = await _groupRepository.GetGroupInfo(grpDto);
|
|
|
+ _delegationVisaRep.ChangeDataBase(DBEnum.OA2023DB); //切换到新OA后删除
|
|
|
+ if (groupData.Code != 0)
|
|
|
+ {
|
|
|
+ _delegationVisaRep.RollbackTran();
|
|
|
+ }
|
|
|
+
|
|
|
+ string title = string.Format(@"[签证进度更新]");
|
|
|
+ string content = string.Format(@"测试文本");
|
|
|
+
|
|
|
+ bool rst = await _message.AddMsg(new MessageDto()
|
|
|
+ {
|
|
|
+ Type = 5,
|
|
|
+ IssuerId = dto.publisher,
|
|
|
+ Title = dto.title,
|
|
|
+ Content = content,
|
|
|
+ ReleaseTime = DateTime.Now,
|
|
|
+ UIdList = new List<int> {
|
|
|
+ 234
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (rst) {
|
|
|
+ return Ok(JsonView(true, "发送通知成功"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //_delegationVisaRep.CommitTran();
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ //_delegationVisaRep.RollbackTran();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return Ok(JsonView(true, msg));
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 团组任务分配
|