jl-jjsp-service/securityControl-modules/securityControl-proteam/target/classes/mapper/QueryManageMapper.xml

564 lines
42 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sercurityControl.proteam.mapper.QueryManageMapper">
<select id="getBidSafetyInforList" resultType="com.sercurityControl.proteam.domain.query.BidSafetyInfor">
select id,single_project_code as singleProjectCode,bidding_section_id as biddingSectionId,bidding_section_name as biddingSectionName,safety_code as safetyCode,
bidding_section_code as biddingSectionCode,safety_project_status as safetyProjectStatus,province_code as provinceCode,build_unit_code as buildUnitCode,
build_unit_con_person as buildUnitConPerson,build_unit_mobile as buildUnitMobile,across_area as acrossArea,tower_no as towerNo,actual_commencement_date as actualCommencementDate,
actual_finish_time as actualFinishTime,current_drp_rate as currentDrpRate,current_work_stage as currentWorkStage,tower_found_com_num as towerFoundComNum,tower_assem_num as towerAssemNum,
line_com_num as lineComNum,remark,huv_flag as huvFlag,creater_id as createrId,prj_code as prjCode,delete_flag as deleteFlag
from jj_bid_info
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_name,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0
)
</if>
</select>
<select id="getConstructionBallList" resultType="com.sercurityControl.proteam.domain.query.ConstructionBall">
select id,camera_name as cameraName,camera_no as cameraNo,puid,province_code as provinceCode,creater_id as createrId,create_time as createTime,
updater_id as updaterId,updater_time as updateTime,delete_flag deleteFlag
from jj_ball
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(camera_no,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getConstructionSectionList" resultType="com.sercurityControl.proteam.domain.query.ConstructionSection">
select id,constr_transformer_capacity as constrTransformerCapacity,line_quantity as lineQuantity,main_transformer_quantity as mainTransformerQuantity,status,
construction_status as constructionStatus,sub_flag as subFlag,plan_start_date as planStartDate,
actual_start_date as actualStartDate,plan_fin_date as planFinDate,actual_fin_date as actualFinDate,prj_code as prjCode,plan_compl_date as planComplDate,
actual_compl_date as actualComplDate,creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,
single_project_code as singleProjectCode,bidding_section_code as biddingSectionCode,bidding_section_name as biddingSectionName ,province_code as provinceCode,
build_unit_code as buildUnitCode,bidding_section_type as biddingSectionType,construction_line_length as constructionLineLength
from jj_bidding_project
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="planStartDate!=null and planStartDate!='' and planStartDateTemp!=null and planStartDateTemp!=''">
AND DATE_FORMAT(plan_start_date,'%Y-%m-%d') BETWEEN #{planStartDate} and #{planStartDateTemp}
</if>
<if test="actualStartDate!=null and actualStartDate!='' and actualStartDateTemp!=null and actualStartDateTemp!=''">
AND DATE_FORMAT(actual_start_date,'%Y-%m-%d') BETWEEN #{actualStartDate} and #{actualStartDateTemp}
</if>
</select>
<select id="getTeamMeetingPersonList" resultType="com.sercurityControl.proteam.domain.query.TeamMeetingPerson">
select id,registration_date as registrationDate,validity_period as validityPeriod,province_code as provinceCode,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,
work_code as workCode,personnel_id as personnelId,tool_box_talk_id as toolBoxTalkId,real_name as realName,
id_card as idCard,position_code as positionCode,safety_guardian_flag as safetyGuardianFlag,position_flag as positionFlag,work_division as workDivision
from jj_class_meeting_people
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(tool_box_talk_id,#{keyWord}) > 0 OR
INSTR(real_name,#{keyWord}) > 0 OR
INSTR(id_card,#{keyWord}) > 0 OR
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getMeetingInforList" resultType="com.sercurityControl.proteam.domain.query.MeetingInfor">
select class_id as classId,work_gx as workGx,work_type as workType,work_manage as workManage,team_id as teamId,work_manage_phone as workManagePhone,
work_manage_num as workManageNum,work_content as workContent,work_site as workSite,main_risk as mainRisk,team_name as teamName
from jj_class_metting_info
<where>
<if test="keyWord!=null and keyWord!=''">
(INSTR(class_id,#{keyWord}) > 0 OR
INSTR(team_id,#{keyWord}) > 0)
</if>
</where>
</select>
<select id="getConstructionDayPlanList" resultType="com.sercurityControl.proteam.domain.query.ConstructionDayPlan">
select id,creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,batch_no as batchNo,task_daily_id as taskDailyId,ticket_id as ticketId,risk_precaution_id as riskPrecautionId,work_site_id as workSiteId,build_unit_code as buildUnitCode,
exec_status as execStatus,tool_box_talk_id as toolBoxTalkId,sub_section_project_id as subSectionProjectId,sub_section_project_name as subSectionProjectName,
sub_entry_project_id as subEntryProjectId,sub_entry_project_name as subEntryProjectName,cancel_reason as cancelReason,work_overnight_flag as workOvernightFlag,audit_hierarchy as auditHierarchy,
single_project_code as singleProjectCode,plan_status as planStatus,bidding_section_code as biddingSectionCode,bidding_section_name as biddingSectionName,team_id as teamId,
additional_plan_flag as additionalPlanFlag,province_code as provinceCode
from jj_day_plan
<where>
<if test="keyWord!=null and keyWord!=''">
(INSTR(id,#{keyWord}) > 0 OR
INSTR(ticket_id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</where>
</select>
<select id="getGtList" resultType="com.sercurityControl.proteam.domain.query.Gt">
select id,topography as topography,stent_flag as stentFlag,borrowed_flag as borrowedFlag,span,tower_cuircuit_number as towerCuircuitNumber,
circuit_quantity as circuitQuantity,longitude,latitude,east_coordinate as eastCoordinate,north_coordinate as northCoordinate,single_project_code as singleProjectCode,
center_pile_elevation as centerPileElevation,rotation_degree as rotationDegree,geology,tower_leg_baseform_first towerLegBaseformFirst,tower_leg_baseform_second towerLegBaseformSecond,
tower_leg_baseform_third towerLegBaseformThird,tower_leg_baseform_fourth towerLegBaseformFourth,tower_leg_max_depth_first towerLegMaxDepthFirst,tower_leg_max_depth_second towerLegMaxDepthSecond,
tower_leg_max_depth_third towerLegMaxDepthThird,bidding_section_code biddingSectionCode,tower_leg_max_depth_fourth towerLegMaxDepthFourth,tower_type towerType,
tension_tower_flag tensionTowerFlag,tower_structure towerStructure,creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag as deleteFlag,province_code provinceCode,general_design_flag generalDesignFlag,tower_type_no towerTypeNo,upstream_tower_no upstreamTowerNo,
dismantle_flag dismantleFlag,cover4g_flag cover4gFlag,tower_sequence_no towerSequenceNo,remark,representative_span representativeSpan,tension_section_length tensionSectionLength,
county,town,tower_no towerNo,village,run_tower_code runTowerCode,ground_thing_name groundThingName,design_change_no designChangeNo,section_divide_point_flag sectionDividePointFlag,
section_adjust_num sectionAdjustNum,tower_weight towerWeight,slope,construction_dept_id constructionDeptId,supervision_dept_id supervisionDeptId,module_no moduleNo,
devise_dept_id deviseDeptId,owner_dept_id ownerDeptId,uhv_flag uhvFlag,address,custom_flag customFlag,nominal_height nominalHeight,tower_full_height towerFullHeight,major_crossing_flag majorCrossingFlag
from jj_gt
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getInforList" resultType="com.sercurityControl.proteam.domain.query.Infor">
select id,replenish_content_1 replenishContent1,replenish_content_2 replenishContent2,replenish_content_3 replenishContent3,
replenish_content_4 replenishContent4,replenish_content_5 replenishContent5,replenish_content_6 replenishContent6,
replenish_content_7 replenishContent7,delete_flag deleteFlag,create_time as createTime,update_time as updateTime,
ref_id as refId,ref_id2 as refId2, sort_no sortNo,ext_type extType,content_type contentType
from jj_info
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getPersonEngineeringList" resultType="com.sercurityControl.proteam.domain.query.PrjEnginneringExperience">
select id,unit_code unitCode,personnel_id personnelId,project_department_id projectDepartmentId,position_code positionCode,
position_name positionName,entry_date entryDate,exit_date exitDate,province_code provinceCode,depart_type departType,
working_team_id workingTeamId,job_code jobCode,job_name jobName,specialty,manage_unit manageUnit,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag
from jj_prj_enginnering_experience
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(unit_code,#{keyWord}) > 0 OR
INSTR(personnel_id,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getProjectInforList" resultType="com.sercurityControl.proteam.domain.query.Project">
select id,non_constr_department_impl nonConstrDepartmentImpl,fea_line_length feaLineLength,feas_trans_capacity feasTransCapacity,
construction_line_length constructionLineLength,constr_transformer_capacity constrTransformerCapacity,production_line_length productionLineLength,
prod_trans_capacity prodTransCapacity,line_quantity lineQuantity,main_transformer_quantity mainTransformerQuantity,fea_dinvest feaDinvest,
prj_code prjCode,fea_sinvest feaSinvest,appr_file_no apprFileNo,project_approval_document_no projectApprovalDocumentNo,location_province locationProvince,
location_province_name locationProvinceName,location_municipality locationMunicipality,location_municipality_name locationMunicipalityName,
location_area locationArea,location_area_name locationAreaName,constr_address constrAddress,prj_name prjName,prj_manage_mode prjManageMode,
construction_status constructionStatus,planned_commencement_date plannedCommencementDate,actual_commencement_date actualCommissioningDate,
planned_commissioning_date plannedCommissioningDate,actual_commissioning_date actualCommissioningDate,plan_compl_date planComplDate,
actual_compl_date actualComplDate,prj_source prjSource,g_delete_flag gdeleteFlag,province_code provinceCode,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,settlement_id settlementId,
initial_design_approval_no initialDesignApprovalNo,initial_design_approval_date initialDesignApprovalDate,initial_desg_estim_dynamic_inv initialDesgEstimDynamicInv,
initial_desg_estim_static_inv initialDesgEstimStaticInv,initial_desg_approval_filename initialDesgApprovalFilename,build_unit_code buildUnitCode,
estimate_status estimateStatus,constr_instln_bgt_prep_method constrInstlnBgtPrepMethod,constr_instln_bgt_rev_date constrInstlnBgtRevDate,
constr_instln_bgt_dynamic_inv constrInstlnBgtDynamicInv,constr_instln_bgt_static_inv constrInstlnBgtStaticInv,constr_instln_review_filename constrInstlnReviewFilename,
constr_and_instln_maj_chg_num constrAndInstlnMajChgNum,constr_and_instln_maj_chg_amt constrAndInstlnMajChgAmt,db_flag dbFlag,constr_instln_budget_status constrInstlnBudgetStatus,
voltage_level voltageLevel,full_caliber_bgt_prep_method fullCaliberBgtPrepMethod,full_cal_bgt_rev_compl_date fullCalBgtRevComplDate,full_caliber_bgt_dynamic_inv fullCaliberBgtDynamicInv,
full_caliber_bgt_static_inv fullCaliberBgtStaticInv,overall_review_filename overallReviewFilename,overall_major_change_item_num overallMajorChangeItemNum,
overall_major_change_amount overallMajorChangeAmount,overall_budget_status overallBudgetStatus,settlement_plan_compl_date settlementPlanComplDate,
settlement_actual_compl_date settlementPlanComplDate,project_type projectType,settlement_dynamic_inv settlementDynamicInv,settlement_static_inv settlementStatus,
finance_receive_date financeReceiveDate,settlement_status settlementStatus,e_delete_flag edeleteFlag,approve_unit approveUnit,constr_nature constrNature,construction_category constructionCategory
from jj_project
<where>
<if test="keyWord!=null and keyWord!=''">
INSTR(id,#{keyWord}) > 0
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="plannedCommencementDate!=null and plannedCommencementDate!='' and plannedCommencementDateTemp!=null and plannedCommencementDateTemp!=''">
AND DATE_FORMAT(planned_commencement_date,'%Y-%m-%d') BETWEEN #{plannedCommencementDate} and #{plannedCommencementDateTemp}
</if>
<if test="actualCommencementDate!=null and actualCommencementDate!='' and actualCommencementDateTemp!=null and actualCommencementDateTemp!=''">
AND DATE_FORMAT(actual_commencement_date,'%Y-%m-%d') BETWEEN #{actualCommencementDate} and #{actualCommencementDateTemp}
</if>
</where>
</select>
<select id="getRiskInforList" resultType="com.sercurityControl.proteam.domain.query.Risk">
select id,risk_no riskNo,professional,part_subentry partSubentry,work_type workType,work_procedure workProcedure,risk_leve riskLevel,
min_constr_headcount minConstrHeadcount,risk_assessment_value riskAssessmentValue,consequence_due_to_risk consequenceDueToRisk,
risk_control_key_facto riskControlKeyFacto,merge,remark,huv_flag huvFlag,province_code provinceCode,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag
from jj_risk
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(risk_no,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getRiskPrecautionList" resultType="com.sercurityControl.proteam.domain.query.RiskPrecaution">
select id,part_subentry partSubentry,work_type workType,work_procedure workProcedure,assessment_risk_level assessmentRiskLevel,
re_assessment_risk_level reAssessmentRiskLevel,min_constr_headcount minConstrHeadcount,risk_assessment_value riskAssessmentValue,
work_content workContent,working_condition workingCondition,voltage_drp_flag voltageDrpFlag,source_risk_precaution_id sourceRiskPrecautionId,
merge,risk_status riskStatus,publish_state publishState,planned_start_date plannedStartDate,execute_time executeTime,end_time endTime,
huv_flag huvFlag,build_unit_code buildUnitCode,province_code provinceCode,risk_no riskNo,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,working_condition_flag workingConditionFlag,
constr_meth_id constrMethId,single_project_code singleProjectCode,bidding_section_code biddingSectionCode,work_site_id workSiteId,
work_site_name workSiteName,work_site_type workSiteType,professional
from jj_risk_precaution
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="plannedStartDate!=null and plannedStartDate!='' and plannedStartDateTemp!=null and plannedStartDateTemp!=''">
AND DATE_FORMAT(planned_start_date,'%Y-%m-%d') BETWEEN #{plannedStartDate} and #{plannedStartDateTemp}
</if>
<if test="endTime!=null and endTime!='' and endTimeTemp!=null and endTimeTemp!=''">
AND DATE_FORMAT(end_time,'%Y-%m-%d') BETWEEN #{endTime} and #{endTimeTemp}
</if>
</select>
<select id="getSingleProjectInforList" resultType="com.sercurityControl.proteam.domain.query.SingleInfor">
select id,single_project_id singleProjectId,single_project_name singleProjectName,single_project_code singleProjectCode,safety_code safetyCode,
safety_project_status safetyProjectStatus,prj_local prjLocal,province_code provinceCode,build_unit_code buildUnitCode,build_unit_con_person buildUnitConPerson,
build_unit_mobile buildUnitMobile,across_area acrossArea,tower_no towerNo,actual_commencement_date actualCommencementDate,actual_finish_time actualFinishTime,
current_drp_rate currentDrpRate,current_work_stage currentWorkStage,tower_found_com_num towerFoundComNum,tower_assem_num towerAssemNum,
line_com_num lineComNum,remark,last_suspend_time lastSuspendTime,last_resume_time lastResumeTime,huv_flag huvFlag,prj_type prjType,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,
single_project_type singleProjectType,prj_code prjCode,prj_name prjName
from jj_single_info
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_id,#{keyWord}) > 0 OR
INSTR(single_project_name,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getSingleProjectList" resultType="com.sercurityControl.proteam.domain.query.SingleProject">
select id,single_project_type singleProjectType,jgjsver_special_project_expense jgjsverSpecialProjectExpense,jgjsver_auxiliary_facilities_cost jgjsverAuxiliaryFacilitiesCost,
jgjsver_cost_file_name jgjsverCostFileName,jgjsver_project_type jgjsverProjectType,jgjsver_software_type jgjsverSoftwareType,jgjsver_status jgjsverStatus,
single_project_prer_type singleProjectPrerType,single_project_details_type singleProjectDetailsType,constr_nature constrNature,construction_line_length constructionLineLength,
constr_transformer_capacity constrTransformerCapacity,production_line_length productionLineLength,prod_trans_capacity prodTransCapacity,fea_line_length feaLineLength,
feas_trans_capacity feasTransCapacity,prj_code prjCode,line_quantity lineQuantity,main_transformer_quantity mainTransformerQuantity,fea_dinvest feaDinvest,
fea_sinvest feaSinvest,apply_flag applyFlag,integrate_intosys_flag integrateIntosysFlag,status,planned_commencement_date plannedCommencementDate,
actual_commencement_date actualCommencementDate,planned_commissioning_date plannedCommissioningDate,single_project_code singleProjectCode,actual_commissioning_date actualCommissioningDate,
plan_compl_date planComplDate,actual_completion_date actualCompletionDate,construction_status constructionStatus,constr_address constrAddress,
location_province locationProvince,location_province_name locationProvinceName,location_municipality locationMunicipality,location_municipality_name locationMunicipalityName,
location_area locationArea,single_project_name singleProjectName,location_area_name locationAreaName,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,
gspfver_stage gspfverStage,gspfver_version gspfverVersion,
gspfver_dynamic_investment gspfverDynamicInvestment,gspfver_static_investment gspfverStaticInvestment,province_code provinceCode,gspfver_construction_cost gspfverConstructionCost,
gspfver_installation_cost gspfverInstallationCost,gspfver_cost_of_equip_procurement gspfverCostOfEquipProcurement,gspfver_other_expenses gspfverOtherExpenses,gspfver_basic_contingency gspfverBasicContingency,
gspfver_special_project_expense gspfverSpecialProjectExpense,gspfver_auxiliary_facilities_cost gspfverAuxiliaryFacilitiesCost,gspfver_cost_file_name gspfverCostFileName,gspfver_project_type gspfverProjectType,
gspfver_software_type gspfverSoftwareType,province_name provinceName,gspfver_status gspfverStatus,sgtssver_stage sgtssverStage,sgtssver_version sgtssverVersion,sgtssver_dynamic_investment sgtssverDynamicInvestment,
sgtssver_static_investment sgtssverStaticInvestment,sgtssver_construction_cost sgtssverConstructionCost,sgtssver_installation_cost sgtssverInstallationCost,sgtssver_cost_of_equip_procurement sgtssverCostOfEquipProcurement,
sgtssver_other_expenses sgtssverOtherExpenses,sgtssver_basic_contingency sgtssverBasicContingency,build_unit_code buildUnitCode,sgtssver_special_project_expense sgtssverSpecialProjectExpense,
sgtssver_auxiliary_facilities_cost sgtssverAuxiliaryFacilitiesCost,sgtssver_cost_file_name sgtssverCostFileName,sgtssver_project_type sgtssverProjectType,sgtssver_software_type sgtssverSoftwareType,
sgtssver_status sgtssverStatus,sgtpfver_stag sgtpfverStag,sgtpfver_version sgtpfverVersion,sgtpfver_dynamic_investment sgtpfverDynamicInvestment,sgtpfver_static_investment sgtpfverStaticInvestment,
build_unit_name buildUnitName,sgtpfver_construction_cost sgtpfverConstructionCost,sgtpfver_installation_cost sgtpfverInstallationCost,sgtpfver_cost_of_equip_procurement sgtpfverCostOfEquipProcurement,
sgtpfver_other_expenses sgtpfverOtherExpenses,sgtpfver_basic_contingency sgtpfverBasicContingency,sgtpfver_special_project_expense sgtpfverSpecialProjectExpense,
sgtpfver_auxiliary_facilities_cost sgtpfverAuxiliaryFacilitiesCost,sgtpfver_cost_file_name sgtpfverCostFileName,sgtpfver_project_type sgtpfverProjectType,sgtpfver_software_type sgtpfverSoftwareType,
voltage_level voltageLevel,sgtpfver_status sgtpfverStatus,jgjsver_stage jgjsverStage,jgjsver_version jgjsverVersion,jgjsver_dynamic_investment jgjsverDynamicInvestment,
jgjsver_static_investment jgjsverStaticInvestment,jgjsver_construction_cost jgjsverConstructionCost,jgjsver_installation_cost jgjsverInstallationCost,jgjsver_cost_of_equip_procurement jgjsverCostOfEquipProcurement,
jgjsver_other_expenses jgjsverOtherExpenses,jgjsver_basic_contingency jgjsverBasicContingency
from jj_single_project
where 1=1
<if test="keyWord!=null and keyWord!=''">
And(
INSTR(id,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="plannedCommencementDate!=null and plannedCommencementDate!='' and plannedCommencementDateTemp!=null and plannedCommencementDateTemp!=''">
AND DATE_FORMAT(planned_commencement_date,'%Y-%m-%d') BETWEEN #{plannedCommencementDate} and #{plannedCommencementDateTemp}
</if>
<if test="actualCommencementDate!=null and actualCommencementDate!='' and actualCommencementDateTemp!=null and actualCommencementDateTemp!=''">
AND DATE_FORMAT(actual_commencement_date,'%Y-%m-%d') BETWEEN #{actualCommencementDate} and #{actualCommencementDateTemp}
</if>
</select>
<select id="getTicketPeopleList" resultType="com.sercurityControl.proteam.domain.query.TicketPeople">
select id,work_division workDivision,province_code provinceCode,chosed_flag chosedFlag,position_flag positionFlag,
ticket_id ticketId,tool_box_talk_id toolBoxTalkId,personnel_id personnelId,id_card idCard,real_name realName,
mobile,work_code workCode,position_code positionCode,creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,delete_flag deleteFlag
from jj_ticket_people
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(ticket_id,#{keyWord}) > 0 OR
INSTR(tool_box_talk_id,#{keyWord}) > 0 OR
INSTR(real_name,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getWeeksPlanList" resultType="com.sercurityControl.proteam.domain.query.WeeksPlan">
select id,current_signal_flag currentSignalFlag,additional_plan_flag additionalPlanFlag,single_project_type singleProjectType,
audit_hierarchy auditHierarchy,plan_status planStatus,excute_flag excuteFlag,team_update_flag teamUpdateFlag,electricity_risk_level electricityRiskLevel,
build_unit_code buildUnitCode,province_code provinceCode,risk_precaution_id riskPrecautionId,huv_flag huvFlag,
creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,
sub_section_project_id subSectionProjectId,sub_section_project_name subSectionProjectName,ticket_id ticketId,
bidding_section_code biddingSectionCode,re_assessment_risk_level reAssessmentRiskLevel,single_project_code singleProjectCode,
bidding_section_name biddingSectionName,planned_start_date plannedStartDate,planned_end_date plannedEndDate,team_id teamId,work_site_id workSiteId
from jj_weeks_plan
<where>
<if test="keyWord!=null and keyWord!=''">
(INSTR(id,#{keyWord}) > 0 OR
INSTR(ticket_id,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="plannedStartDate!=null and plannedStartDate!='' and plannedStartDateTemp!=null and plannedStartDateTemp!=''">
AND DATE_FORMAT(planned_start_date,'%Y-%m-%d') BETWEEN #{plannedStartDate} and #{plannedStartDateTemp}
</if>
<if test="plannedEndDate!=null and plannedEndDate!='' and plannedEndDateTemp!=null and plannedEndDateTemp!=''">
AND DATE_FORMAT(planned_end_date,'%Y-%m-%d') BETWEEN #{plannedEndDate} and #{plannedEndDateTemp}
</if>
</where>
</select>
<select id="getUnitList" resultType="com.sercurityControl.proteam.domain.query.Unit">
select id,legal_repr_mobile legalReprMobile,contact_phone contactPhone,unit_type unitType,unit_nature unitNature,
sys_type sysType,sys_categ sysCateg,unit_sign unitSign,establishment_date establishmentDate,register_capital registerCapital,
website,isc_unit_id iscUnitId,province,city,county,address,main_business mainBusiness,data_source dataSource,
huv_flag huvFlag,province_code provinceCode,build_unit_code buildUnitCode,safety_sgc_unit_id safetySgcUnitId,
creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,delete_flag deleteFlag,
legal_id_card legalIdCard,business_file_id businessFileId,unit_name unitName,unit_abbr_name unitAbbrName,
unit_code unitCode,main_code mainCode,unified_social_credit_id unifiedSocialCreditId,legal_repr legalRepr
from jj_unit
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(business_file_id,#{keyWord}) > 0 OR
INSTR(unified_social_credit_id,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getUserInforList" resultType="com.sercurityControl.proteam.domain.query.UserInfor">
select id,nation,birth_place birthPlace,unit_id unitId,dept_id deptId,head_file_id headFileId,data_source dataSource,
huv_flag huvFlag,province_code provinceCode,build_unit_code buildUnitCode,real_name realName,
creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,delete_flag deleteFlag,dept_name deptName,
personnel_id personnelId,access_date accessDate,access_state accessState,access_start_date accessStartDate,
access_end_date accessEndDate,gender,professionalskill_name professionalskillName,professionalskill_level professionalskillLevel,
tech_qual_level techQualLevel,id_card idCard,isc_account iscAccount,safety_personnel_id safetyPersonnelId,mobile,education,politics_status politicsStatus
from jj_user
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(real_name,#{keyWord}) > 0 OR
INSTR(id_card,#{keyWord}) > 0 OR
INSTR(mobile,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
</select>
<select id="getTeamList" resultType="com.sercurityControl.proteam.domain.query.Team">
select id,constr_unit_id constrUnitId,huv_flag huvFlag,
creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,delete_flag deleteFlag,
working_team_name workingTeamName,
working_team_type workingTeamType,working_team_attribute workingTeamAttribute,team_status teamStatus,
province_code provinceCode,build_unit_code buildUnitCode,single_project_code singleProjectCode,bidding_section_code biddingSectionCode
from jj_team
where 1=1
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0
)
</if>
</select>
<select id="getTeamPeopleList" resultType="com.sercurityControl.proteam.domain.query.TeamPeople">
select id,province_code provinceCode,
creater_id createrId,updater_id updaterId,create_time createTime,update_time updateTime,delete_flag deleteFlag,
team_id teamId,personnel_id personnelId,unit_code unitCode,
person_type personType,real_name realName,work_code workCode,position_code positionCode,id_card idCard
from jj_team_people
where 1=1
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(team_id,#{keyWord}) > 0 OR
INSTR(personnel_id,#{keyWord}) > 0 OR
INSTR(id_card,#{keyWord}) > 0
)
</if>
</select>
<select id="getTicketList" resultType="com.sercurityControl.proteam.domain.query.Ticket">
select id,team_id teamId,working_team_name workingTeamName,construction_headcount constructionHeadcount,planned_start_date plannedStartDate,
planned_end_date plannedEndDate,start_time startTime,end_time endTime,assessment_risk_level assessmentRiskLevel,re_assessment_risk_level reAssessmentRiskLevel,
ticket_type ticketType,current_construction_status currentConstructionStatus,audit_hierarchy auditHierarchy,
issue_date issueDate,build_unit_code buildUnitCode,province_code provinceCode,remark,huv_flag huvFlag,ticket_no ticketNo,
creater_id as createrId,create_time as createTime,updater_id as updaterId,update_time as updateTime,delete_flag deleteFlag,
voltage_level voltageLevel,ticket_name ticketName,bidding_section_code biddingSectionCode,bidding_section_name biddingSectionName,
single_project_type singleProjectType,single_project_code singleProjectCode,single_project_name singleProjectName,
CASE ticket_status
WHEN '01' THEN '撤回'
WHEN '02' THEN '驳回'
WHEN '03' THEN '提交审核中'
WHEN '04' THEN '待执行'
WHEN '05' THEN '执行中'
WHEN '06' THEN '已结束'
WHEN '07' THEN '作废'
WHEN '08' THEN '删除'
ELSE '其他' END AS ticketStatus
from jj_ticket
where 1=1
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(id,#{keyWord}) > 0 OR
INSTR(team_id,#{keyWord}) > 0 OR
INSTR(bidding_section_code,#{keyWord}) > 0 OR
INSTR(single_project_code,#{keyWord}) > 0
)
</if>
<if test="createTime!=null and createTime!='' and createTimeTemp!=null and createTimeTemp!=''">
AND DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{createTime} and #{createTimeTemp}
</if>
<if test="updateTime!=null and updateTime!='' and updateTimeTemp!=null and updateTimeTemp!=''">
AND DATE_FORMAT(update_time,'%Y-%m-%d') BETWEEN #{updateTime} and #{updateTimeTemp}
</if>
<if test="plannedStartDate!=null and plannedStartDate!='' and plannedStartDateTemp!=null and plannedStartDateTemp!=''">
AND DATE_FORMAT(planned_start_date,'%Y-%m-%d') BETWEEN #{plannedStartDate} and #{plannedStartDateTemp}
</if>
<if test="plannedEndDate!=null and plannedEndDate!='' and plannedEndDateTemp!=null and plannedEndDateTemp!=''">
AND DATE_FORMAT(planned_end_date,'%Y-%m-%d') BETWEEN #{plannedEndDate} and #{plannedEndDateTemp}
</if>
<if test="ticketStatus!=''">
AND ticket_status = #{ticketStatus}
</if>
</select>
</mapper>