import request from '../../../utils/request'

//班前会议列表
export function getRequest(params,url) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post(url, params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getRequestOrderPage(params,url) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post(url, params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//通过班长获取组员
export function getTeamUsers(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FM/FMTeam/TeamOrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}

//一般作业活动记录保存
export function saveJobEventRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOJobEventRecord/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//人员列表
export function getUserLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FM/User/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getRenewalTrain(params) {
  return new Promise((resolve, reject) => {
    request.post("/SE/RenewalTrain/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getAnalyzeDetail(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOFireJob/GetAnalyzeDetail", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}

export function getWorkLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/HM/OperationLink/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getFireType(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FireType/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getSafeUser(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOFireJob/GetSafeUser", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//人员列表
export function getPersonLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FM/Person/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {debugger
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getRelatedUserLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/OG/RelatedUser/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//部门列表
export function getDepartmentLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FM/Department/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//部门列表
export function getRiskArea(params) {
  return new Promise((resolve, reject) => {
    request.post("/SK/RiskArea/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getSKEnterpriseLibrary(params) {
  return new Promise((resolve, reject) => {
    request.post("/SK/SKEnterpriseLibrary/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getRelatedUserType(params) {
  return new Promise((resolve, reject) => {
    request.post("/OG/RelatedUserType/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//工作票选人不分页
export function getAllLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FM/User/OrderEntities", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//作业名称带出作业前中后
export function getDetailLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOCrucialLicenseJob/GetAnalyzeDetail", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//作业名称
export function getStepLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOCrucialLicenseJob/GetNameList", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//相关方
export function getRelatedLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/OG/Related/OrderPaged", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//证件名称
export function getCertificateLists(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOCrucialLicenseJob/GetAnalyzePersonCertificate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}

//工作票保存
export function saveJobRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOCrucialLicenseJob/FullUpdateNew", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function saveJobOutsourceRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOCrucialLicenseJobOutsource/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//关键许可作业活动记录保存
export function saveJobActivityRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOJobActivityRecord/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//技术交底表保存
export function saveTechRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOTechDisclosureFrom/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}

//作业方案讨论记录保存
export function savePreOperSchRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOPreOperSch/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
//一般作业活动记录签到
export function getJobEventRecordSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOJobEventRecord/PersonalAgree", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//工作票签到
export function getJobRecordSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOCrucialLicenseJob/IdentityUpdateNew", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getCancleJob(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOCrucialLicenseJob/FullDelete", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getCancleJobOutsource(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOCrucialLicenseJobOutsource/FullDelete", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//技术交底表签到
export function getTechRecordSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOTechDisclosureFrom/PersonalAgree", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//作业方案讨论记录签到
export function getOperSchRecordSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOPreOperSch/PersonalAgree", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//关键许可作业活动记录签到
export function getJobActivityRecordSign(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOJobActivityRecord/PersonalAgree", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
//关键许可作业活动记录完工验收
export function getJobActivityRecordFinish(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOJobActivityRecord/FinishAgree", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getJobActivityRecordReject(params) {
	params.IgnoreDataRule = true;
	return new Promise((resolve, reject) => {
		request.post("/FO/FOJobActivityRecord/FinishReject", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}
export function getUser(params) {
  return new Promise((resolve, reject) => {
    request.post("/FM/User/Get", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getLeaderWellRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/LeaderWellRecord/Get", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getFOFireJob(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOFireJob/GetEdit", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getTechDisclosure(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/TechDisclosureFromTech/Get", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getTechDisclosureSafe(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/TechDisclosureFromSafe/Get", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result.Data);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function fullFOLeaderWellRecord(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOLeaderWellRecord/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function fullFOFireJob(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOFireJob/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function fullFOTechDisclosure(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOTechDisclosureFromTech/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function fullFOTechDisclosureSafe(params) {
  return new Promise((resolve, reject) => {
    request.post("/FO/FOTechDisclosureFromSafe/FullUpdate", params).then((result) => {
      if (result.IsSuccessful) {
        resolve(result);
      }
    }).catch((error)=>{
      reject(error);
    })
  })
}
export function getClassLists(params) {
	return new Promise((resolve, reject) => {
		request.post("/FM/Class/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error);
		})
	})
}