| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using TencentCloud.Iecp.V20210914.Models; |
| | | using TencentCloud.Monitor.V20180724.Models; |
| | | |
| | | namespace cylsg.Application.CyOS |
| | | { |
| | |
| | | _oAServices = oAServices; |
| | | _eZCoreNetRedisService = netRedisService; |
| | | } |
| | | [HttpGet] |
| | | [AllowAnonymous] |
| | | public async Task<OA_DriverRecord> testc() |
| | | { |
| | | OA_DriverRecord data = null; |
| | | //[HttpGet] |
| | | //[AllowAnonymous] |
| | | //public async Task<bool > TestCreat() |
| | | //{ |
| | | // OaWorkPlan pram = new OaWorkPlan() |
| | | // { |
| | | |
| | | data = await _client.Queryable<OA_DriverRecord>().Where(x => |
| | | x.Id == new Guid("BE15D584-DFE3-438D-863B-705DB1AB14ED") |
| | | ).Includes(x=>x.Attachments).FirstAsync(); |
| | | |
| | | data.Attachments?.Add(new OA_attachment |
| | | { |
| | | PlanAttachment = "1111", |
| | | AttachmentType = 4, |
| | | Operator= "sdasd" |
| | | }); |
| | | data.CarConditionAttachments = null; |
| | | await _client.UpdateNav(data).Include(x => x.CarConditionAttachments,new UpdateNavOptions |
| | | { |
| | | OneToManyInsertOrUpdate=true, |
| | | |
| | | }).ExecuteCommandAsync(); |
| | | // EvaluationContent = "", |
| | | // PlanDataType = 17, |
| | | // PlanType = 3, |
| | | // MemberId = _oAServices.firmId, |
| | | // SentStaffId = Guid.Empty, |
| | | // ReciveStaffId = Guid.Empty, |
| | | // DepartId = 0, |
| | | // PlanStartTime = DateTime.Now, |
| | | // RewardContent = "", |
| | | // LastUpdateTime = DateTime.Now, |
| | | // Operator = "", |
| | | // PlanTitle = "", |
| | | // PlanRunTime = DateTime.Now, |
| | | // PlanRemark = "", |
| | | // PlanPeople = "测试测试", |
| | | // PlanComplany = "", |
| | | // PlanStatus = PlanStatusType.unApproval, |
| | | // ApprovalStaffId = Guid.Empty, |
| | | // ApprovalStatus = PlanStatusType.unApproval, |
| | | // EvaluationStatus = BaoxiaoStausType.Unknown, |
| | | // FirmAccountId = 0, |
| | | // HoubufapiaoStatus = HoubufapiaoStatusType.Unknown, |
| | | // PlanMoney = 200, |
| | | // PlanContent = "测试批量", |
| | | // RewardResult = "10", |
| | | |
| | | return await _client.Queryable<OA_DriverRecord>().Where(x => x.Id == new Guid("BE15D584-DFE3-438D-863B-705DB1AB14ED")).Includes(x => x.Attachments).Includes(x => x.CarConditionAttachments).FirstAsync(); |
| | | // ApprovalTime = DateTime.Now, |
| | | // ApprovalContent = "", |
| | | // EvaluationStaffId = Guid.Empty, |
| | | // EvaluationTime = DateTime.Now, |
| | | // RewardMoney = 0, |
| | | // RewardType = 1, |
| | | // Keyid = null, |
| | | // WorkPlanAttachments = new List<OaWorkPlanAttachment>() |
| | | // { |
| | | // new OaWorkPlanAttachment |
| | | // { |
| | | // AttachmentType=1, |
| | | // CreateTime=DateTime.Now, |
| | | // Operator="123213", |
| | | // PlanAttachment="hhttp://1.jpg" |
| | | // }, |
| | | // new OaWorkPlanAttachment |
| | | // { |
| | | // AttachmentType=1, |
| | | // CreateTime=DateTime.Now, |
| | | // Operator="123213", |
| | | // PlanAttachment="hhttp://2.jpg" |
| | | // } |
| | | // , |
| | | // new OaWorkPlanAttachment |
| | | // { |
| | | // AttachmentType=4, |
| | | // CreateTime=DateTime.Now, |
| | | // Operator="123213", |
| | | // PlanAttachment="hhttp://2.jpg" |
| | | // } |
| | | // } |
| | | |
| | | |
| | | } |
| | | // }; |
| | | // return await _client.InsertNav(pram).Include(x => x.WorkPlanAttachments).ExecuteCommandAsync(); |
| | | |
| | | |
| | | |
| | | //} |
| | | |
| | | ///// <summary> |
| | | ///// |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[HttpGet] |
| | | //[AllowAnonymous] |
| | | //public async Task<OA_DriverRecord> TestUpdata() |
| | | //{ |
| | | |
| | | |
| | | |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 获取预约配送信息 |
| | |
| | | var car = await _client.Queryable<OA_CarManage>().Where(x => x.StaffID == Param.DriverId && x.MemberID == _oAServices.firmId).FirstAsync(); |
| | | data.CarId = car == null ? 0 : car.Keyid; |
| | | |
| | | foreach (var item in data.DeliverPlans) |
| | | { |
| | | item.DriverId = Param.DriverId; |
| | | item.CarId = car == null ? 0 : car.Keyid; |
| | | item.Updater = Permissions.MemberId; |
| | | item.LastUpdateTime = DateTime.Now; |
| | | item.DeliverTime = Param.DeliverTime; |
| | | //foreach (var item in data.DeliverPlans) |
| | | //{ |
| | | // item.DriverId = Param.DriverId; |
| | | // item.CarId = car == null ? 0 : car.Keyid; |
| | | // item.Updater = Permissions.MemberId; |
| | | // item.LastUpdateTime = DateTime.Now; |
| | | // item.DeliverTime = Param.DeliverTime; |
| | | |
| | | } |
| | | //} |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | data.Attachments = Param.Attachments; |
| | | |
| | | return await _client.UpdateNav(data).Include(x => x.Attachments, new UpdateNavOptions() |
| | | { |
| | | OneToManyInsertOrUpdate = true, |
| | | }).Include(x => x.DeliverPlans, new UpdateNavOptions() |
| | | { |
| | | OneToManyInsertOrUpdate = true, |
| | | }).ExecuteCommandAsync(); |
| | | return await _client.UpdateNav(data).Include(x => x.Attachments).ExecuteCommandAsync(); |
| | | |
| | | |
| | | |