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

//隐患上报

// safeCheckShow  手动隐患上报指定责任单位
export function GetBS006(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetBS006", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}
// 审批详情
export function getLoadAuditData(params) {
	return new Promise((resolve, reject) => {
		request.post("/PF/Approve/GetApproveInfo", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取隐患内容
export function GetSubmitContent(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetSubmitContent", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//检查记录 隐患上报  手动隐患上报 指定责任单位
export function FullUpdateBS006(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


//隐患整改通知
export function GetNoticePerson(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetNoticePerson", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//隐患整改通知
export function FullUpdateNoticePerson(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/FullUpdateNoticePerson", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//隐患整改通知 确认   2、整改落实人 确认
export function GetDetailCheck(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitNoticePerson/GetDetailCheck", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


export function UserCheckAndSend(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/UserCheckAndSend", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

export function CheckerCheck(params) {
	return new Promise((resolve, reject) => {
		// /BS/BSRiskSubmit / CheckerCheck => 'BS/BSRiskSubmit/UpdateActualDealRecord',
		// 2 UpdateActualDealRecord
			request.post("/BS/BSRiskSubmit/CheckerCheckToActual", params).then((result) => {
				if (result.IsSuccessful) {
					resolve(result.Data);
				}
			}).catch((error) => {
				reject(error)
			})
	})
}


//获取 指定整改落实人 数据
export function GetBS049(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/RiskSubmitContent/Get", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//指定 整改落实人
export function UpdateActualDeal(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/UpdateActualDeal", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


// 整改落实人确认
export function UpdateActualDealRecord(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/UpdateActualDealRecord", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取整改单信息
export function GetBS044(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/RiskSubmitContentDeal/Get", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//整改提交
export function UpdateDealBS044(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/UpdateDeal", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}



//隐患整改验收 数据获取
export function GetBS044Check(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/RiskSubmitContentDeal/Get", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//隐患整改验收 验收
export function CheckDealBS044Check(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/CheckDeal", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

// 隐患整改通知
export function OrderPagedNoticePerson(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitNoticePerson/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


// 隐患整改记录 列表数据
export function ContentDetailOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/ContentDetailOrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}



//隐患上报审批
export function GetNotice(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitNotice/GetNotice", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


//隐患上报（驳回）
export function GetBack(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetBack", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


//获取 退回信息
export function GetRejectModel(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheckDetailReject/GetRejectModel", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//退回操作
export function Reject(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSSafeCheckDetailReject/Reject", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取检查项目
export function CheckProjectOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/CheckProject/OrderPaged", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}
//获取检查项目分类  
export function CheckProjectCategoryOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckProjectCategory/OrderPagedObjType", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}


//新版隐患上报
export function FullUpdateUserNew(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/FullUpdateUserNew", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上报完善
export function RiskSubmitContentGet(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/RiskSubmitContent/Get", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上报完善-检查内容
export function CheckContentsOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckContents/OrderPagedObject", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上报完善-检查问题
export function QuestionOrderPaged(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/OrderPagedQuestion", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}
//手动上报完善-选择责任部门
export function GetDpartMentMasterInfo(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetDpartMentMasterInfo", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上报完善-提交
export function FullUpdateNew(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/FullUpdateNew", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//整改责任人 指定落实人 获取信息
export function NoticePersonGet(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitNoticePerson/GetNoticePeson", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//整改责任人 指定落实人 修改
export function NoticePersonFullUpdate(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitNoticePerson/FullUpdate", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上报完善 获取信息
export function GetInfoAdapt(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmitContent/GetInfoAdapt", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取检查内容
export function OrderPagedObjectMain(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckMain/OrderPagedObjectMain", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//指定整改责任单位
export function DesignationDealUser(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/DesignationDealUser", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//获取新问题
export function GetNewQuestion(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckMain/Get", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//保存新问题
export function UpdateMoreNewQuestion(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSCheckMain/UpdateMore", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//新问题 获取整改结束日期
export function GetDealyDaysByLevel(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/GetDealyDaysByLevel", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上新问题-提交
export function FullUpdateRiskAndMain(params) {
	return new Promise((resolve, reject) => {
		request.post("/BS/BSRiskSubmit/FullUpdateRiskAndMain", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}

//手动上新问题-取消
export function RiskDel(params) {
	return new Promise((resolve, reject) => {
		request.get("/BS/BSRiskSubmit/RiskDel", params).then((result) => {
			if (result.IsSuccessful) {
				resolve(result.Data);
			}
		}).catch((error) => {
			reject(error)
		})
	})
}