|
|
@@ -83,9 +83,9 @@
|
|
83
|
83
|
</where>
|
|
84
|
84
|
</sql>
|
|
85
|
85
|
<sql id="Base_Column_List" >
|
|
86
|
|
- id, operation_supervisor, position, contact_phone, fumigation_start, fumigation_end,
|
|
87
|
|
- stow_way, east, south, west, north, processing_instructions, enterprise_opinion,
|
|
88
|
|
- organs_opinion, creater, create_time, out_person, out_forrecord_time, org_id, delete_state,
|
|
|
86
|
+ id, operation_supervisor, position, contact_phone, fumigation_start, fumigation_end,
|
|
|
87
|
+ stow_way, east, south, west, north, processing_instructions, enterprise_opinion,
|
|
|
88
|
+ organs_opinion, creater, create_time, out_person, out_forrecord_time, org_id, delete_state,
|
|
89
|
89
|
updatetime
|
|
90
|
90
|
</sql>
|
|
91
|
91
|
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationForrecordExample" >
|
|
|
@@ -103,7 +103,7 @@
|
|
103
|
103
|
</if>
|
|
104
|
104
|
</select>
|
|
105
|
105
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
106
|
|
- select
|
|
|
106
|
+ select
|
|
107
|
107
|
<include refid="Base_Column_List" />
|
|
108
|
108
|
from t_fumigation_forrecord
|
|
109
|
109
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -119,20 +119,20 @@
|
|
119
|
119
|
</if>
|
|
120
|
120
|
</delete>
|
|
121
|
121
|
<insert id="insert" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationForrecord" >
|
|
122
|
|
- insert into t_fumigation_forrecord (id, operation_supervisor, position,
|
|
123
|
|
- contact_phone, fumigation_start, fumigation_end,
|
|
124
|
|
- stow_way, east, south,
|
|
125
|
|
- west, north, processing_instructions,
|
|
126
|
|
- enterprise_opinion, organs_opinion, creater,
|
|
127
|
|
- create_time, out_person, out_forrecord_time,
|
|
|
122
|
+ insert into t_fumigation_forrecord (id, operation_supervisor, position,
|
|
|
123
|
+ contact_phone, fumigation_start, fumigation_end,
|
|
|
124
|
+ stow_way, east, south,
|
|
|
125
|
+ west, north, processing_instructions,
|
|
|
126
|
+ enterprise_opinion, organs_opinion, creater,
|
|
|
127
|
+ create_time, out_person, out_forrecord_time,
|
|
128
|
128
|
org_id, delete_state, updatetime
|
|
129
|
129
|
)
|
|
130
|
|
- values (#{id,jdbcType=VARCHAR}, #{operationSupervisor,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
|
|
131
|
|
- #{contactPhone,jdbcType=VARCHAR}, #{fumigationStart,jdbcType=TIMESTAMP}, #{fumigationEnd,jdbcType=TIMESTAMP},
|
|
132
|
|
- #{stowWay,jdbcType=VARCHAR}, #{east,jdbcType=VARCHAR}, #{south,jdbcType=VARCHAR},
|
|
133
|
|
- #{west,jdbcType=VARCHAR}, #{north,jdbcType=VARCHAR}, #{processingInstructions,jdbcType=VARCHAR},
|
|
134
|
|
- #{enterpriseOpinion,jdbcType=VARCHAR}, #{organsOpinion,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER},
|
|
135
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{outPerson,jdbcType=VARCHAR}, #{outForrecordTime,jdbcType=TIMESTAMP},
|
|
|
130
|
+ values (#{id,jdbcType=VARCHAR}, #{operationSupervisor,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
|
|
|
131
|
+ #{contactPhone,jdbcType=VARCHAR}, #{fumigationStart,jdbcType=TIMESTAMP}, #{fumigationEnd,jdbcType=TIMESTAMP},
|
|
|
132
|
+ #{stowWay,jdbcType=VARCHAR}, #{east,jdbcType=VARCHAR}, #{south,jdbcType=VARCHAR},
|
|
|
133
|
+ #{west,jdbcType=VARCHAR}, #{north,jdbcType=VARCHAR}, #{processingInstructions,jdbcType=VARCHAR},
|
|
|
134
|
+ #{enterpriseOpinion,jdbcType=VARCHAR}, #{organsOpinion,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER},
|
|
|
135
|
+ #{createTime,jdbcType=TIMESTAMP}, #{outPerson,jdbcType=VARCHAR}, #{outForrecordTime,jdbcType=TIMESTAMP},
|
|
136
|
136
|
#{orgId,jdbcType=INTEGER}, #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}
|
|
137
|
137
|
)
|
|
138
|
138
|
</insert>
|
|
|
@@ -547,6 +547,106 @@
|
|
547
|
547
|
forrecord.id
|
|
548
|
548
|
</select>
|
|
549
|
549
|
|
|
|
550
|
+ <select id="getFroRecordByIds" resultType="java.util.Map" parameterType="java.lang.String" >
|
|
|
551
|
+ SELECT
|
|
|
552
|
+ forrecord.id,
|
|
|
553
|
+ forrecord.create_time createTime,
|
|
|
554
|
+ forrecord.operation_supervisor operationSupervisor,
|
|
|
555
|
+ forrecord.position position,
|
|
|
556
|
+ forrecord.contact_phone contactPhone,
|
|
|
557
|
+ forrecord.fumigation_start fumigationStart,
|
|
|
558
|
+ forrecord.fumigation_end fumigationEnd,
|
|
|
559
|
+ forrecord.stow_way stowWay,
|
|
|
560
|
+ forrecord.east east,
|
|
|
561
|
+ forrecord.south south,
|
|
|
562
|
+ forrecord.west west,
|
|
|
563
|
+ forrecord.north north,
|
|
|
564
|
+ forrecord.processing_instructions processingInstructions,
|
|
|
565
|
+ forrecord.enterprise_opinion enterpriseOpinion,
|
|
|
566
|
+ forrecord.organs_opinion organsOpinion,
|
|
|
567
|
+ users.real_name creater,
|
|
|
568
|
+ users.mobile createrPhone,
|
|
|
569
|
+ forrecord.org_id orgId,
|
|
|
570
|
+ forrecord.out_person outPerson,
|
|
|
571
|
+ forrecord.out_forrecord_time outForrecordTime,
|
|
|
572
|
+ forrecord.delete_state deleteState,
|
|
|
573
|
+ forrecord.updatetime updatetime
|
|
|
574
|
+ FROM
|
|
|
575
|
+ t_fumigation_forrecord forrecord
|
|
|
576
|
+ LEFT JOIN user_info users ON users.user_id = forrecord.creater
|
|
|
577
|
+ WHERE
|
|
|
578
|
+ forrecord.id = #{forRecordId,jdbcType=VARCHAR}
|
|
|
579
|
+ </select>
|
|
|
580
|
+ <select id="getpersonnelByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
|
|
|
581
|
+ SELECT
|
|
|
582
|
+ personnel.id,
|
|
|
583
|
+ personnel.forrecord_id forrecordId,
|
|
|
584
|
+ personnel.personnel_name personnelName,
|
|
|
585
|
+ personnel.professional_qualification professionalQualification,
|
|
|
586
|
+ personnel.physical_condition physicalCondition,
|
|
|
587
|
+ personnel.work_task workTask,
|
|
|
588
|
+ personnel.outside outside,
|
|
|
589
|
+ personnel.create_time createTime,
|
|
|
590
|
+ personnel.org_id orgId,
|
|
|
591
|
+ personnel.delete_state deleteState,
|
|
|
592
|
+ personnel.updatetime
|
|
|
593
|
+ FROM
|
|
|
594
|
+ t_fumigation_personnel personnel
|
|
|
595
|
+ WHERE
|
|
|
596
|
+ personnel.forrecord_id = #{forRecordId,jdbcType=VARCHAR}
|
|
|
597
|
+ </select>
|
|
|
598
|
+ <select id="getplanByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
|
|
|
599
|
+ SELECT
|
|
|
600
|
+ plan.id, plan.for_record_id forRecordId, plan.house_id houseId, plan.keeper, lspzenum.enumName grainKind,
|
|
|
601
|
+ plan.grain_count grainCount, plan.harvest_years harvestYears, plan.put_storage_years putStorageYears,
|
|
|
602
|
+ plan.fumigation_num fumigationNum, ones.enumName oneMethods, plan.one_dose oneDose, plan.one_date oneDate,
|
|
|
603
|
+ twos.enumName twoMethods, plan.two_dose twoDose, plan.two_date twoDate, threes.enumName threeMethods,
|
|
|
604
|
+ plan.three_dose threeDose, plan.three_date threeDate, fours.enumName fourMethods, plan.four_dose fourDose,
|
|
|
605
|
+ plan.four_date fourDate, plan.deliquescence, plan.bag_buried bagBuried, plan.test_tube testTube,
|
|
|
606
|
+ plan.applying_pesticide applyingPesticide, plan.fixed_decorate fixedDecorate, plan.mobile_decorate mobileDecorate,
|
|
|
607
|
+ plan.fixed, plan.mobile, plan.single_control singleControl, plan.double_control doubleControl, fumtype.enumName fumigationType,
|
|
|
608
|
+ plan.fumigation_number fumigationNumber, plan.fumigation_command fumigationCommand, plan.fumigation_operation fumigationOperation,
|
|
|
609
|
+ plan.fumiagtion_protective fumiagtionProtective, plan.fumiagtion_period_time fumiagtionPeriodTime, plan.fumiagtion_chief fumiagtionChief,
|
|
|
610
|
+ plan.expected, plan.points_work pointsWork, plan.note, plan.state, creater.enumName creater, plan.create_time createTime,
|
|
|
611
|
+ plan.plan_formulation planFormulation, plan.reported, plan.pesticide_qualification pesticideQualification, plan.qualification,
|
|
|
612
|
+ plan.approve_people approvePeople, plan.approve_department approveDepartment, plan.approve_note approveNote,
|
|
|
613
|
+ plan.approve_time approveTime, plan.grain_moisture grainMoisture, plan.delete_state deleteState, plan.org_id orgId,
|
|
|
614
|
+ plan.updatetime,infos.company_org_code tyshxydm
|
|
|
615
|
+ FROM
|
|
|
616
|
+ t_fumigation_plan plan
|
|
|
617
|
+ LEFT JOIN basic_enum lspzenum on lspzenum.enumId = plan.grain_kind
|
|
|
618
|
+ LEFT JOIN basic_enum fumtype on fumtype.enumId = plan.fumigation_type
|
|
|
619
|
+ LEFT JOIN basic_enum ones on ones.enumId = plan.one_methods
|
|
|
620
|
+ LEFT JOIN basic_enum twos on twos.enumId = plan.two_methods
|
|
|
621
|
+ LEFT JOIN basic_enum threes on threes.enumId = plan.three_methods
|
|
|
622
|
+ LEFT JOIN basic_enum fours on fours.enumId = plan.four_methods
|
|
|
623
|
+ LEFT JOIN basic_enum creater on creater.enumId = plan.creater
|
|
|
624
|
+ LEFT JOIN org_info infos on infos.org_id = plan.org_id
|
|
|
625
|
+ WHERE
|
|
|
626
|
+ plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
|
|
|
627
|
+ </select>
|
|
|
628
|
+ <select id="getpesticideByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
|
|
|
629
|
+ SELECT
|
|
|
630
|
+ pesticide.id, pesticide.fumigation_id fumigationId, pests.enumName majorInsectPests,pesticide.insect_density insectDensity,
|
|
|
631
|
+ pesticide.occurrence_place occurrencePlace, pesticide.insect_product_time insectProductTime, pesticide.drug_resistance drugResistance,
|
|
|
632
|
+ yjmc.enumName drugName, yjlx.enumName reagentType, pesticide.validity, pesticide.get_number getNumber,
|
|
|
633
|
+ pesticide.get_person getPerson, pesticide.get_time getTime, pesticide.drug_purity drugPurity, pesticide.use_drug_type useDrugType,
|
|
|
634
|
+ pesticide.plann_drug_start_time plannDrugStartTime, pesticide.plann_drug_use_up_time plannDrugUseUpTime, pesticide.plann_drug_count plannDrugCount,
|
|
|
635
|
+ pesticide.seal_type sealType, pesticide.setting_concentration setting_concentration, pesticide.concentration_check_type concentrationCheckType,
|
|
|
636
|
+ pesticide.bulk_gas_type bulkGasType, pesticide.drug_user_number drugUserNumber, pesticide.pesticide_operator pesticideOperator,
|
|
|
637
|
+ pesticide.creater, pesticide.create_time createTime, pesticide.state, pesticide.approve_people approvePeople,
|
|
|
638
|
+ pesticide.approve_department approveDepartment, pesticide.approve_note approveNote, pesticide.approve_time approveTime, pesticide.org_id orgId,
|
|
|
639
|
+ pesticide.delete_state deleteState, pesticide.updatetime
|
|
|
640
|
+ FROM
|
|
|
641
|
+ t_fumigation_pesticide pesticide
|
|
|
642
|
+ LEFT JOIN t_fumigation_plan plan ON plan.id = pesticide.fumigation_id
|
|
|
643
|
+ LEFT JOIN basic_enum pests on pests.enumId = pesticide.major_insect_pests
|
|
|
644
|
+ LEFT JOIN basic_enum yjmc on yjmc.enumId = pesticide.drug_name
|
|
|
645
|
+ LEFT JOIN basic_enum yjlx on yjlx.enumId = pesticide.reagent_type
|
|
|
646
|
+ WHERE
|
|
|
647
|
+ plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
|
|
|
648
|
+ </select>
|
|
|
649
|
+
|
|
550
|
650
|
<select id="getFumigationDateByIds" resultType="java.util.Map" parameterType="java.util.Map" >
|
|
551
|
651
|
SELECT
|
|
552
|
652
|
plan.id planId,
|
|
|
@@ -579,4 +679,13 @@
|
|
579
|
679
|
#{planId}
|
|
580
|
680
|
</foreach>
|
|
581
|
681
|
</select>
|
|
|
682
|
+
|
|
|
683
|
+ <select id="getLYXZ" resultType="java.lang.String" parameterType="java.lang.String" >
|
|
|
684
|
+ SELECT
|
|
|
685
|
+ enums.enumName
|
|
|
686
|
+ FROM
|
|
|
687
|
+ basic_enum enums
|
|
|
688
|
+ WHERE
|
|
|
689
|
+ enums.enumId = #{enumIds,jdbcType=VARCHAR}
|
|
|
690
|
+ </select>
|
|
582
|
691
|
</mapper>
|