/// <summary> /// 审批通过 /// </summary> /// <param name="id"></param> /// <param name="state"></param> /// <param name="reason"></param> /// <returns></returns> public int BUHeadApprove(Guid id, int state, string reason) { var res = UploadOrderDao.BUHeadApprove(id, state, reason); var upload = UploadOrderDao.LoadPreUploadOrder(id); var nowDate = DateTime.Now; nowDate = nowDate.AddHours(-168); groupMemberDao.UpdateServPauseDetail(upload.HTCode, upload.IsReopen == 1 ? 4 : 3); var userId = upload.ApplierMUDID; if (upload.IsTransfer == 1) { userId = upload.TransferUserMUDID; } var orderList = orderDao.LoadFailOrder(nowDate, userId); if (orderList.Count < 1) { var group = groupMemberDao.FindByUser(userId); if (group != null) { if (group.State == 0 && group.State1 == 0 && group.State2 == 0) { groupMemberDao.DelByState3(userId); } else { groupMemberDao.UpdateState3(userId); } } } return(res); }