static WorkerAttendanceUploader() { QueryString = $"SELECT S.record_id, S.project_id, S.worker_id, S.device_id, S.record_time, S.type FROM zhgd_person.d_card_record S INNER JOIN zhgd_lw.f_worker W ON S.worker_id = W.worker_id INNER JOIN zhgd_lw.f_group G ON W.group_id = G.group_id INNER JOIN zhgd_lw.f_cooperator C ON G.cooperator_id = C.cooperator_id WHERE S.record_time BETWEEN '2021-04-17 00:00:00' AND '2021-04-17 23:59:59' AND C.project_id = { HjApiCaller.Project_id };"; var resultSet = DBHelperMySQL.TryQuery(QueryString); cache = resultSet.Tables[0]; }
static TeamInfoUploader() { QueryString = $"SELECT S.group_id, S.cooperator_id, P.project_id, P.credit_code, P.unit_name, S.`name`, P.remark FROM f_group S INNER JOIN f_cooperator P ON S.cooperator_id = P.cooperator_id WHERE P.project_id = { HjApiCaller.Project_id };"; var resultSet = DBHelperMySQL.TryQuery(QueryString); cache = resultSet.Tables[0]; }
static ProjectWorkerUploader() { QueryString = $"SELECT S.worker_id, S.company_id, S.project_id, S.cooperator_id, S.group_id, S.person_id, S.`name`, S.sex, S.birthday, S.id_card, S.profession_id, S.role_id, S.nation, S.address, S.mobile, S.entry_time FROM f_worker S INNER JOIN f_group G ON S.group_id = G.group_id INNER JOIN f_cooperator C ON G.cooperator_id = C.cooperator_id WHERE S.STATUS IN ( 1, 2 ) AND C.project_id = { HjApiCaller.Project_id };"; var resultSet = DBHelperMySQL.TryQuery(QueryString); cache = resultSet.Tables[0]; }
static ProjectSubContractorUploader() { // 只查询总包和劳务分包数据 QueryString = $"SELECT cooperator_id, company_id, project_id, unit_name, unit_type, credit_code, unit_person, contacts_mobile, remark FROM f_cooperator S WHERE S.project_id = { HjApiCaller.Project_id } AND S.unit_type IN (1,2,3,4,5,6,9,12,13) AND S.`status` = 1;"; var resultSet = DBHelperMySQL.TryQuery(QueryString); cache = resultSet.Tables[0]; }