gaodandan 7 年之前
父節點
當前提交
b997e113ae

+ 44 - 45
src/main/java/com/chinaitop/depot/business/mapper/BusinessPlanMapper.java

@@ -1,46 +1,45 @@
1
-package com.chinaitop.depot.business.mapper;
2
-
3
-import com.chinaitop.depot.business.model.BusinessPlan;
4
-import com.chinaitop.depot.business.model.BusinessPlanExample;
5
-import com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO;
6
-
7
-import java.util.List;
8
-import java.util.Map;
9
-
10
-import org.apache.ibatis.annotations.Param;
11
-
12
-public interface BusinessPlanMapper {
13
-    int countByExample(BusinessPlanExample example);
14
-
15
-    int deleteByExample(BusinessPlanExample example);
16
-
17
-    int deleteByPrimaryKey(Integer id);
18
-
19
-    int insert(BusinessPlan record);
20
-
21
-    int insertSelective(BusinessPlan record);
22
-
23
-    List<BusinessPlan> selectByExample(BusinessPlanExample example);
24
-
25
-    BusinessPlan selectByPrimaryKey(Integer id);
26
-
27
-    int updateByExampleSelective(@Param("record") BusinessPlan record, @Param("example") BusinessPlanExample example);
28
-
29
-    int updateByExample(@Param("record") BusinessPlan record, @Param("example") BusinessPlanExample example);
30
-
31
-    int updateByPrimaryKeySelective(BusinessPlan record);
32
-
33
-    int updateByPrimaryKey(BusinessPlan record);
34
-    
35
-    
36
-    
37
-    //自增
38
-    List<BusinessPlanAuditVO> getApprovalList(Map<String, Object> paramMap);
39
-    List<BusinessPlanAuditVO> selectByExampleToVO(BusinessPlanExample example);
40
-
41
-    List<BusinessPlanAuditVO> getAcceptanceList(Map<String, Object> paramMap);
42
-    int addAcceptance(Map<String, String> paramMap);
43
-    int addAcceptanceDetail(Map<String, String> paramMap);
44
-
45
-	void updateByStatus(Integer id);
1
+package com.chinaitop.depot.business.mapper;
2
+
3
+import com.chinaitop.depot.business.model.BusinessPlan;
4
+import com.chinaitop.depot.business.model.BusinessPlanExample;
5
+import com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+import org.apache.ibatis.annotations.Param;
11
+
12
+public interface BusinessPlanMapper {
13
+    int countByExample(BusinessPlanExample example);
14
+
15
+    int deleteByExample(BusinessPlanExample example);
16
+
17
+    int deleteByPrimaryKey(Integer id);
18
+
19
+    int insert(BusinessPlan record);
20
+
21
+    int insertSelective(BusinessPlan record);
22
+
23
+    List<BusinessPlan> selectByExample(BusinessPlanExample example);
24
+
25
+    BusinessPlan selectByPrimaryKey(Integer id);
26
+
27
+    int updateByExampleSelective(@Param("record") BusinessPlan record, @Param("example") BusinessPlanExample example);
28
+
29
+    int updateByExample(@Param("record") BusinessPlan record, @Param("example") BusinessPlanExample example);
30
+
31
+    int updateByPrimaryKeySelective(BusinessPlan record);
32
+
33
+    int updateByPrimaryKey(BusinessPlan record);
34
+    
35
+    
36
+    //自增
37
+    List<BusinessPlanAuditVO> getApprovalList(Map<String, Object> paramMap);
38
+    List<BusinessPlanAuditVO> selectByExampleToVO(BusinessPlanExample example);
39
+
40
+    List<BusinessPlanAuditVO> getAcceptanceList(Map<String, Object> paramMap);
41
+    int addAcceptance(Map<String, String> paramMap);
42
+    int addAcceptanceDetail(Map<String, String> paramMap);
43
+
44
+	void updateByStatus(Integer id);
46 45
 }

+ 270 - 136
src/main/java/com/chinaitop/depot/business/mapper/BusinessPlanMapper.xml

@@ -1,5 +1,5 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.chinaitop.depot.business.mapper.BusinessPlanMapper">
4 4
   <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessPlan">
5 5
     <id column="id" jdbcType="INTEGER" property="id" />
@@ -8,6 +8,8 @@
8 8
     <result column="reference_number" jdbcType="VARCHAR" property="referenceNumber" />
9 9
     <result column="plan_desc" jdbcType="VARCHAR" property="planDesc" />
10 10
     <result column="execute_type" jdbcType="INTEGER" property="executeType" />
11
+    <result column="out_amount" jdbcType="VARCHAR" property="outAmount" />
12
+    <result column="in_amount" jdbcType="VARCHAR" property="inAmount" />
11 13
     <result column="total_amount" jdbcType="VARCHAR" property="totalAmount" />
12 14
     <result column="total_price" jdbcType="VARCHAR" property="totalPrice" />
13 15
     <result column="customer_plan_state" jdbcType="VARCHAR" property="customerPlanState" />
@@ -29,19 +31,20 @@
29 31
     <result column="province_remark" jdbcType="VARCHAR" property="provinceRemark" />
30 32
     <result column="enterprise_remark" jdbcType="VARCHAR" property="enterpriseRemark" />
31 33
     <result column="attribute_type" jdbcType="INTEGER" property="attributeType" />
32
-  </resultMap>
33
-  
34
-  <resultMap id="approvalResultMap" type="com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO" extends="BaseResultMap">
35
-    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
36
-    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
37
-    <result column="result" property="result" jdbcType="VARCHAR" />
38
-    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
39
-    <result column="auditId" property="auditId" jdbcType="INTEGER" />
40
-    <result column="applicationDate" property="applicationDate" jdbcType="VARCHAR" />
41
-    <result column="acceptanceType" property="acceptanceType" jdbcType="VARCHAR" />
42
-    <result column="house_id" property="houseId" jdbcType="INTEGER" />
43
-    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
44
-  </resultMap>
34
+  </resultMap>
35
+  
36
+  
37
+  <resultMap id="approvalResultMap" type="com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO" extends="BaseResultMap">
38
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
39
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
40
+    <result column="result" property="result" jdbcType="VARCHAR" />
41
+    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
42
+    <result column="auditId" property="auditId" jdbcType="INTEGER" />
43
+    <result column="applicationDate" property="applicationDate" jdbcType="VARCHAR" />
44
+    <result column="acceptanceType" property="acceptanceType" jdbcType="VARCHAR" />
45
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
46
+    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
47
+  </resultMap>
45 48
   
46 49
   <sql id="Example_Where_Clause">
47 50
     <where>
@@ -102,11 +105,11 @@
102 105
     </where>
103 106
   </sql>
104 107
   <sql id="Base_Column_List">
105
-    id, plan_number, plan_title, reference_number, plan_desc, execute_type, total_amount, 
106
-    total_price, customer_plan_state, plan_customer, audit_state, process_instance_id, 
107
-    process_definition_id, current_approve_path, agree_time, creater_id, creater, create_time, 
108
-    create_unit, org_id, in_application, total_quantity, report_date, send_date, province_remark, 
109
-    enterprise_remark, attribute_type
108
+    id, plan_number, plan_title, reference_number, plan_desc, execute_type, out_amount, 
109
+    in_amount, total_amount, total_price, customer_plan_state, plan_customer, audit_state, 
110
+    process_instance_id, process_definition_id, current_approve_path, agree_time, creater_id, 
111
+    creater, create_time, create_unit, org_id, in_application, total_quantity, report_date, 
112
+    send_date, province_remark, enterprise_remark, attribute_type
110 113
   </sql>
111 114
   <select id="selectByExample" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" resultMap="BaseResultMap">
112 115
     select
@@ -141,24 +144,24 @@
141 144
   <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessPlan">
142 145
     insert into business_plan (id, plan_number, plan_title, 
143 146
       reference_number, plan_desc, execute_type, 
144
-      total_amount, total_price, customer_plan_state, 
145
-      plan_customer, audit_state, process_instance_id, 
146
-      process_definition_id, current_approve_path, 
147
-      agree_time, creater_id, creater, 
148
-      create_time, create_unit, org_id, 
149
-      in_application, total_quantity, report_date, 
150
-      send_date, province_remark, enterprise_remark, 
151
-      attribute_type)
147
+      out_amount, in_amount, total_amount, 
148
+      total_price, customer_plan_state, plan_customer, 
149
+      audit_state, process_instance_id, process_definition_id, 
150
+      current_approve_path, agree_time, creater_id, 
151
+      creater, create_time, create_unit, 
152
+      org_id, in_application, total_quantity, 
153
+      report_date, send_date, province_remark, 
154
+      enterprise_remark, attribute_type)
152 155
     values (#{id,jdbcType=INTEGER}, #{planNumber,jdbcType=VARCHAR}, #{planTitle,jdbcType=VARCHAR}, 
153 156
       #{referenceNumber,jdbcType=VARCHAR}, #{planDesc,jdbcType=VARCHAR}, #{executeType,jdbcType=INTEGER}, 
154
-      #{totalAmount,jdbcType=VARCHAR}, #{totalPrice,jdbcType=VARCHAR}, #{customerPlanState,jdbcType=VARCHAR}, 
155
-      #{planCustomer,jdbcType=VARCHAR}, #{auditState,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, 
156
-      #{processDefinitionId,jdbcType=VARCHAR}, #{currentApprovePath,jdbcType=VARCHAR}, 
157
-      #{agreeTime,jdbcType=TIMESTAMP}, #{createrId,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR}, 
158
-      #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, 
159
-      #{inApplication,jdbcType=INTEGER}, #{totalQuantity,jdbcType=VARCHAR}, #{reportDate,jdbcType=TIMESTAMP}, 
160
-      #{sendDate,jdbcType=TIMESTAMP}, #{provinceRemark,jdbcType=VARCHAR}, #{enterpriseRemark,jdbcType=VARCHAR}, 
161
-      #{attributeType,jdbcType=INTEGER})
157
+      #{outAmount,jdbcType=VARCHAR}, #{inAmount,jdbcType=VARCHAR}, #{totalAmount,jdbcType=VARCHAR}, 
158
+      #{totalPrice,jdbcType=VARCHAR}, #{customerPlanState,jdbcType=VARCHAR}, #{planCustomer,jdbcType=VARCHAR}, 
159
+      #{auditState,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{processDefinitionId,jdbcType=VARCHAR}, 
160
+      #{currentApprovePath,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, #{createrId,jdbcType=INTEGER}, 
161
+      #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR}, 
162
+      #{orgId,jdbcType=INTEGER}, #{inApplication,jdbcType=INTEGER}, #{totalQuantity,jdbcType=VARCHAR}, 
163
+      #{reportDate,jdbcType=TIMESTAMP}, #{sendDate,jdbcType=TIMESTAMP}, #{provinceRemark,jdbcType=VARCHAR}, 
164
+      #{enterpriseRemark,jdbcType=VARCHAR}, #{attributeType,jdbcType=INTEGER})
162 165
   </insert>
163 166
   <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessPlan">
164 167
     insert into business_plan
@@ -181,6 +184,12 @@
181 184
       <if test="executeType != null">
182 185
         execute_type,
183 186
       </if>
187
+      <if test="outAmount != null">
188
+        out_amount,
189
+      </if>
190
+      <if test="inAmount != null">
191
+        in_amount,
192
+      </if>
184 193
       <if test="totalAmount != null">
185 194
         total_amount,
186 195
       </if>
@@ -264,6 +273,12 @@
264 273
       <if test="executeType != null">
265 274
         #{executeType,jdbcType=INTEGER},
266 275
       </if>
276
+      <if test="outAmount != null">
277
+        #{outAmount,jdbcType=VARCHAR},
278
+      </if>
279
+      <if test="inAmount != null">
280
+        #{inAmount,jdbcType=VARCHAR},
281
+      </if>
267 282
       <if test="totalAmount != null">
268 283
         #{totalAmount,jdbcType=VARCHAR},
269 284
       </if>
@@ -356,6 +371,12 @@
356 371
       <if test="record.executeType != null">
357 372
         execute_type = #{record.executeType,jdbcType=INTEGER},
358 373
       </if>
374
+      <if test="record.outAmount != null">
375
+        out_amount = #{record.outAmount,jdbcType=VARCHAR},
376
+      </if>
377
+      <if test="record.inAmount != null">
378
+        in_amount = #{record.inAmount,jdbcType=VARCHAR},
379
+      </if>
359 380
       <if test="record.totalAmount != null">
360 381
         total_amount = #{record.totalAmount,jdbcType=VARCHAR},
361 382
       </if>
@@ -432,6 +453,8 @@
432 453
       reference_number = #{record.referenceNumber,jdbcType=VARCHAR},
433 454
       plan_desc = #{record.planDesc,jdbcType=VARCHAR},
434 455
       execute_type = #{record.executeType,jdbcType=INTEGER},
456
+      out_amount = #{record.outAmount,jdbcType=VARCHAR},
457
+      in_amount = #{record.inAmount,jdbcType=VARCHAR},
435 458
       total_amount = #{record.totalAmount,jdbcType=VARCHAR},
436 459
       total_price = #{record.totalPrice,jdbcType=VARCHAR},
437 460
       customer_plan_state = #{record.customerPlanState,jdbcType=VARCHAR},
@@ -475,6 +498,12 @@
475 498
       <if test="executeType != null">
476 499
         execute_type = #{executeType,jdbcType=INTEGER},
477 500
       </if>
501
+      <if test="outAmount != null">
502
+        out_amount = #{outAmount,jdbcType=VARCHAR},
503
+      </if>
504
+      <if test="inAmount != null">
505
+        in_amount = #{inAmount,jdbcType=VARCHAR},
506
+      </if>
478 507
       <if test="totalAmount != null">
479 508
         total_amount = #{totalAmount,jdbcType=VARCHAR},
480 509
       </if>
@@ -548,6 +577,8 @@
548 577
       reference_number = #{referenceNumber,jdbcType=VARCHAR},
549 578
       plan_desc = #{planDesc,jdbcType=VARCHAR},
550 579
       execute_type = #{executeType,jdbcType=INTEGER},
580
+      out_amount = #{outAmount,jdbcType=VARCHAR},
581
+      in_amount = #{inAmount,jdbcType=VARCHAR},
551 582
       total_amount = #{totalAmount,jdbcType=VARCHAR},
552 583
       total_price = #{totalPrice,jdbcType=VARCHAR},
553 584
       customer_plan_state = #{customerPlanState,jdbcType=VARCHAR},
@@ -571,107 +602,210 @@
571 602
       attribute_type = #{attributeType,jdbcType=INTEGER}
572 603
     where id = #{id,jdbcType=INTEGER}
573 604
   </update>
574
-  
575
-  
576
-  <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
577
-    select
578
-        a.id id, a.plan_number plan_number, a.reference_number reference_number, a.execute_type execute_type,
579
-        a.total_amount total_amount, a.create_time create_time, 
580
-        a.process_instance_id process_instance_id,
581
-        a.process_definition_id process_definition_id,
582
-        b.id auditId,
583
-        b.result result, b.task_id task_id,b.task_name task_name
584
-    from business_plan a, business_approval b
585
-    <where>
586
-        a.process_instance_id = b.process_instance_id
587
-        and
588
-        a.audit_state != 0
589
-        <if test="operator != null">
590
-           and b.operator = #{operator}
591
-        </if>
592
-        <if test="result != null">
593
-           and b.result = #{result}
594
-        </if>
595
-        <if test="planNumber != null">
596
-           and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
597
-        </if>
598
-        <if test="attributeType != null">
599
-           and a.attribute_type = #{attributeType}
600
-        </if>
601
-        order by FIELD(b.result, '待审批', '同意', '驳回', '拒绝'), b.create_time desc
602
-    </where>
603
-  </select>
604 605
  
605
-  <select id="selectByExampleToVO" resultMap="approvalResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
606
-    select
607
-    <if test="distinct" >
608
-      distinct
609
-    </if>
610
-    <include refid="Base_Column_List" />
611
-    from business_plan
612
-    <if test="_parameter != null" >
613
-      <include refid="Example_Where_Clause" />
614
-    </if>
615
-    <if test="orderByClause != null" >
616
-      order by ${orderByClause}
617
-    </if>
618
-  </select>
619
-
620 606
   
621
-  <update id="updateByStatus" parameterType="java.lang.Integer">
622
-  	update business_plan set customer_plan_state=1 where id=#{id};
623
-  </update>
624
-
625
- <!-- 审批结束的(audit_state = 2),终止(in_application = 3),已上报的(customer_plan_state=50)的轮换计划(execute_type=3156)-->
626
-  <select id="getAcceptanceList" resultMap="approvalResultMap" parameterType="java.util.Map" >
627
-    SELECT
628
-      a.id id,a.plan_number plan_number,a.reference_number reference_number,
629
-      a.execute_type execute_type,
630
-      a.customer_plan_state customer_plan_state,
631
-      a.in_application in_application,
632
-      detail.grain_kind grain_kind,
633
-      detail.grain_attribute grain_attribute,
634
-      detail.grain_annual grain_annual,
635
-      detail.house_id house_id,
636
-      detail.warehouse_id warehouse_id,
637
-      a.create_time create_time,
638
-      a.process_instance_id process_instance_id,
639
-      a.process_definition_id process_definition_id,
640
-      a.plan_title plan_title,
641
-      acceptance.application_date applicationDate,
642
-      acceptance.acceptance_type acceptanceType
643
-    FROM
644
-      business_plan a
645
-    LEFT JOIN business_plan_acceptance acceptance ON acceptance.plan_id = a.id
646
-    LEFT JOIN business_store_ware_detail detail ON detail.zid = a.id
647
-    <where>
648
-      a.audit_state = 2 AND a.in_application = 3 AND a.execute_type=3156 AND customer_plan_state=50
649
-      <if test="planTitle != null">
650
-        and a.plan_title LIKE CONCAT(CONCAT('%', #{planTitle}), '%')
651
-      </if>
652
-      <if test="planNumber != null">
653
-        and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
654
-      </if>
655
-      order by a.create_time desc
656
-    </where>
657
-  </select>
658
-  <insert id="addAcceptance" useGeneratedKeys="true" keyProperty="id"  parameterType="java.util.Map">
659
-      INSERT INTO business_plan_acceptance (plan_id, application_date, acceptance_type) VALUES
660
-      ${sql}
661
-  </insert>
662
-  <insert id="addAcceptanceDetail" parameterType="java.util.Map">
663
-      INSERT INTO business_plan_acceptance_detail (acceptance_id, qualitycheck_id) VALUES
664
-      ${sqlDetail}
665
-  </insert>
666
-  <select id="getDataByZJId" resultMap="BaseResultMap" parameterType="java.util.Map" >
667
-    SELECT
668
-        quality.*,house.storehouse_name storehouseName,warehouse.warehouse_name wareHouseName, acceptance.id acceptanceId
669
-    FROM
670
-        business_plan_acceptance acceptance
671
-    INNER JOIN business_plan_acceptance_detail detail ON detail.acceptance_id = acceptance.id
672
-    INNER JOIN storage_qualitycheck quality ON quality.id = detail.qualitycheck_id
673
-    INNER JOIN basic_storehouse house ON house.storehouse_id = quality.house_id
674
-    INNER JOIN basic_warehouse warehouse ON warehouse.warehouse_id = quality.warehouse_id
675
-     where acceptance.plan_id = #{id,jdbcType=VARCHAR}
607
+  
608
+  
609
+  
610
+  <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
611
+
612
+    select
613
+
614
+        a.id id, a.plan_number plan_number, a.reference_number reference_number, a.execute_type execute_type,
615
+
616
+        a.total_amount total_amount, a.create_time create_time, 
617
+
618
+        a.process_instance_id process_instance_id,
619
+
620
+        a.process_definition_id process_definition_id,
621
+
622
+        b.id auditId,
623
+
624
+        b.result result, b.task_id task_id,b.task_name task_name
625
+
626
+    from business_plan a, business_approval b
627
+
628
+    <where>
629
+
630
+        a.process_instance_id = b.process_instance_id
631
+
632
+        and
633
+
634
+        a.audit_state != 0
635
+
636
+        <if test="operator != null">
637
+
638
+           and b.operator = #{operator}
639
+
640
+        </if>
641
+
642
+        <if test="result != null">
643
+
644
+           and b.result = #{result}
645
+
646
+        </if>
647
+
648
+        <if test="planNumber != null">
649
+
650
+           and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
651
+
652
+        </if>
653
+
654
+        <if test="attributeType != null">
655
+
656
+           and a.attribute_type = #{attributeType}
657
+
658
+        </if>
659
+
660
+        order by FIELD(b.result, '待审批', '同意', '驳回', '拒绝'), b.create_time desc
661
+
662
+    </where>
663
+
664
+  </select>
665
+
666
+ 
667
+
668
+  <select id="selectByExampleToVO" resultMap="approvalResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
669
+
670
+    select
671
+
672
+    <if test="distinct" >
673
+
674
+      distinct
675
+
676
+    </if>
677
+
678
+    <include refid="Base_Column_List" />
679
+
680
+    from business_plan
681
+
682
+    <if test="_parameter != null" >
683
+
684
+      <include refid="Example_Where_Clause" />
685
+
686
+    </if>
687
+
688
+    <if test="orderByClause != null" >
689
+
690
+      order by ${orderByClause}
691
+
692
+    </if>
693
+
694
+  </select>
695
+
696
+
697
+
698
+  
699
+
700
+  <update id="updateByStatus" parameterType="java.lang.Integer">
701
+
702
+  	update business_plan set customer_plan_state=1 where id=#{id};
703
+
704
+  </update>
705
+
706
+
707
+
708
+ <!-- 审批结束的(audit_state = 2),终止(in_application = 3),已上报的(customer_plan_state=50)的轮换计划(execute_type=3156)-->
709
+
710
+  <select id="getAcceptanceList" resultMap="approvalResultMap" parameterType="java.util.Map" >
711
+
712
+    SELECT
713
+
714
+      a.id id,a.plan_number plan_number,a.reference_number reference_number,
715
+
716
+      a.execute_type execute_type,
717
+
718
+      a.customer_plan_state customer_plan_state,
719
+
720
+      a.in_application in_application,
721
+
722
+      detail.grain_kind grain_kind,
723
+
724
+      detail.grain_attribute grain_attribute,
725
+
726
+      detail.grain_annual grain_annual,
727
+
728
+      detail.house_id house_id,
729
+
730
+      detail.warehouse_id warehouse_id,
731
+
732
+      a.create_time create_time,
733
+
734
+      a.process_instance_id process_instance_id,
735
+
736
+      a.process_definition_id process_definition_id,
737
+
738
+      a.plan_title plan_title,
739
+
740
+      acceptance.application_date applicationDate,
741
+
742
+      acceptance.acceptance_type acceptanceType
743
+
744
+    FROM
745
+
746
+      business_plan a
747
+
748
+    LEFT JOIN business_plan_acceptance acceptance ON acceptance.plan_id = a.id
749
+
750
+    LEFT JOIN business_store_ware_detail detail ON detail.zid = a.id
751
+
752
+    <where>
753
+
754
+      a.audit_state = 2 AND a.in_application = 3 AND a.execute_type=3156 AND customer_plan_state=50
755
+
756
+      <if test="planTitle != null">
757
+
758
+        and a.plan_title LIKE CONCAT(CONCAT('%', #{planTitle}), '%')
759
+
760
+      </if>
761
+
762
+      <if test="planNumber != null">
763
+
764
+        and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
765
+
766
+      </if>
767
+
768
+      order by a.create_time desc
769
+
770
+    </where>
771
+
772
+  </select>
773
+
774
+  <insert id="addAcceptance" useGeneratedKeys="true" keyProperty="id"  parameterType="java.util.Map">
775
+
776
+      INSERT INTO business_plan_acceptance (plan_id, application_date, acceptance_type) VALUES
777
+
778
+      ${sql}
779
+
780
+  </insert>
781
+
782
+  <insert id="addAcceptanceDetail" parameterType="java.util.Map">
783
+
784
+      INSERT INTO business_plan_acceptance_detail (acceptance_id, qualitycheck_id) VALUES
785
+
786
+      ${sqlDetail}
787
+
788
+  </insert>
789
+
790
+  <select id="getDataByZJId" resultMap="BaseResultMap" parameterType="java.util.Map" >
791
+
792
+    SELECT
793
+
794
+        quality.*,house.storehouse_name storehouseName,warehouse.warehouse_name wareHouseName, acceptance.id acceptanceId
795
+
796
+    FROM
797
+
798
+        business_plan_acceptance acceptance
799
+
800
+    INNER JOIN business_plan_acceptance_detail detail ON detail.acceptance_id = acceptance.id
801
+
802
+    INNER JOIN storage_qualitycheck quality ON quality.id = detail.qualitycheck_id
803
+
804
+    INNER JOIN basic_storehouse house ON house.storehouse_id = quality.house_id
805
+
806
+    INNER JOIN basic_warehouse warehouse ON warehouse.warehouse_id = quality.warehouse_id
807
+
808
+     where acceptance.plan_id = #{id,jdbcType=VARCHAR}
809
+
676 810
   </select>
677 811
 </mapper>

+ 54 - 54
src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.java

@@ -1,55 +1,55 @@
1
-package com.chinaitop.depot.business.mapper;
2
-
3
-import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample;
4
-import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
5
-import com.chinaitop.depot.business.model.BusinessStoreWareDetailExample;
6
-import com.chinaitop.depot.business.model.vo.BusinessDeliveryStorageNoticeAuditVO;
7
-
8
-import java.util.List;
9
-import java.util.Map;
10
-
11
-import org.apache.ibatis.annotations.Param;
12
-
13
-public interface BusinessStoreWareDetailMapper {
14
-    int countByExample(BusinessStoreWareDetailExample example);
15
-
16
-    int deleteByExample(BusinessStoreWareDetailExample example);
17
-
18
-    int deleteByPrimaryKey(Integer id);
19
-
20
-    int insert(BusinessStoreWareDetail record);
21
-
22
-    int insertSelective(BusinessStoreWareDetail record);
23
-
24
-    List<BusinessStoreWareDetail> selectByExample(BusinessStoreWareDetailExample example);
25
-
26
-    BusinessStoreWareDetail selectByPrimaryKey(Integer id);
27
-
28
-    int updateByExampleSelective(@Param("record") BusinessStoreWareDetail record, @Param("example") BusinessStoreWareDetailExample example);
29
-
30
-    int updateByExample(@Param("record") BusinessStoreWareDetail record, @Param("example") BusinessStoreWareDetailExample example);
31
-
32
-    int updateByPrimaryKeySelective(BusinessStoreWareDetail record);
33
-
34
-    int updateByPrimaryKey(BusinessStoreWareDetail record);
35
-    
36
-    
37
-    /**
38
-     * @param paramMap
39
-     * @return
40
-     */
41
-    List<BusinessDeliveryStorageNoticeAuditVO> getApprovalList(Map<String, Object> paramMap);
42
-
43
-    /**
44
-     * @param paramMap
45
-     */
46
-    void updateApplication(Map<String, Object> paramMap);
47
-
48
-    /**
49
-     * @param example
50
-     * @return
51
-     */
52
-    List<BusinessDeliveryStorageNoticeAuditVO> selectByExampleToVO(
53
-            BusinessDeliveryStorageNoticeExample example);
54
-    
1
+package com.chinaitop.depot.business.mapper;
2
+
3
+import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample;
4
+import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
5
+import com.chinaitop.depot.business.model.BusinessStoreWareDetailExample;
6
+import com.chinaitop.depot.business.model.vo.BusinessDeliveryStorageNoticeAuditVO;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+import org.apache.ibatis.annotations.Param;
12
+
13
+public interface BusinessStoreWareDetailMapper {
14
+    int countByExample(BusinessStoreWareDetailExample example);
15
+
16
+    int deleteByExample(BusinessStoreWareDetailExample example);
17
+
18
+    int deleteByPrimaryKey(Integer id);
19
+
20
+    int insert(BusinessStoreWareDetail record);
21
+
22
+    int insertSelective(BusinessStoreWareDetail record);
23
+
24
+    List<BusinessStoreWareDetail> selectByExample(BusinessStoreWareDetailExample example);
25
+
26
+    BusinessStoreWareDetail selectByPrimaryKey(Integer id);
27
+
28
+    int updateByExampleSelective(@Param("record") BusinessStoreWareDetail record, @Param("example") BusinessStoreWareDetailExample example);
29
+
30
+    int updateByExample(@Param("record") BusinessStoreWareDetail record, @Param("example") BusinessStoreWareDetailExample example);
31
+
32
+    int updateByPrimaryKeySelective(BusinessStoreWareDetail record);
33
+
34
+    int updateByPrimaryKey(BusinessStoreWareDetail record);
35
+    
36
+    
37
+    
38
+    /**
39
+     * @param paramMap
40
+     * @return
41
+     */
42
+    List<BusinessDeliveryStorageNoticeAuditVO> getApprovalList(Map<String, Object> paramMap);
43
+
44
+    /**
45
+     * @param paramMap
46
+     */
47
+    void updateApplication(Map<String, Object> paramMap);
48
+
49
+    /**
50
+     * @param example
51
+     * @return
52
+     */
53
+    List<BusinessDeliveryStorageNoticeAuditVO> selectByExampleToVO(
54
+            BusinessDeliveryStorageNoticeExample example);
55 55
 }

+ 447 - 434
src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.xml

@@ -1,435 +1,448 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.chinaitop.depot.business.mapper.BusinessStoreWareDetailMapper" >
4
-  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="zid" property="zid" jdbcType="INTEGER" />
7
-    <result column="type" property="type" jdbcType="VARCHAR" />
8
-    <result column="house_id" property="houseId" jdbcType="INTEGER" />
9
-    <result column="house_name" property="houseName" jdbcType="VARCHAR" />
10
-    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
11
-    <result column="warehouse_name" property="warehouseName" jdbcType="VARCHAR" />
12
-    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
13
-    <result column="org_id" property="orgId" jdbcType="INTEGER" />
14
-    <result column="grain_kind" property="grainKind" jdbcType="INTEGER" />
15
-    <result column="grain_detail_kind" property="grainDetailKind" jdbcType="INTEGER" />
16
-    <result column="grain_grade" property="grainGrade" jdbcType="INTEGER" />
17
-    <result column="grain_attribute" property="grainAttribute" jdbcType="INTEGER" />
18
-    <result column="grain_annual" property="grainAnnual" jdbcType="INTEGER" />
19
-    <result column="grain_producing_area" property="grainProducingArea" jdbcType="INTEGER" />
20
-    <result column="price" property="price" jdbcType="VARCHAR" />
21
-    <result column="count" property="count" jdbcType="VARCHAR" />
22
-    <result column="detail_total_price" property="detailTotalPrice" jdbcType="VARCHAR" />
23
-    <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
24
-  </resultMap>
25
-  <sql id="Example_Where_Clause" >
26
-    <where >
27
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
28
-        <if test="criteria.valid" >
29
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
30
-            <foreach collection="criteria.criteria" item="criterion" >
31
-              <choose >
32
-                <when test="criterion.noValue" >
33
-                  and ${criterion.condition}
34
-                </when>
35
-                <when test="criterion.singleValue" >
36
-                  and ${criterion.condition} #{criterion.value}
37
-                </when>
38
-                <when test="criterion.betweenValue" >
39
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
40
-                </when>
41
-                <when test="criterion.listValue" >
42
-                  and ${criterion.condition}
43
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
44
-                    #{listItem}
45
-                  </foreach>
46
-                </when>
47
-              </choose>
48
-            </foreach>
49
-          </trim>
50
-        </if>
51
-      </foreach>
52
-    </where>
53
-  </sql>
54
-  <sql id="Update_By_Example_Where_Clause" >
55
-    <where >
56
-      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
57
-        <if test="criteria.valid" >
58
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
59
-            <foreach collection="criteria.criteria" item="criterion" >
60
-              <choose >
61
-                <when test="criterion.noValue" >
62
-                  and ${criterion.condition}
63
-                </when>
64
-                <when test="criterion.singleValue" >
65
-                  and ${criterion.condition} #{criterion.value}
66
-                </when>
67
-                <when test="criterion.betweenValue" >
68
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
69
-                </when>
70
-                <when test="criterion.listValue" >
71
-                  and ${criterion.condition}
72
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
73
-                    #{listItem}
74
-                  </foreach>
75
-                </when>
76
-              </choose>
77
-            </foreach>
78
-          </trim>
79
-        </if>
80
-      </foreach>
81
-    </where>
82
-  </sql>
83
-  <sql id="Base_Column_List" >
84
-    id, zid, type, house_id, house_name, warehouse_id, warehouse_name, create_time, org_id, 
85
-    grain_kind, grain_detail_kind, grain_grade, grain_attribute, grain_annual, grain_producing_area, 
86
-    price, count, detail_total_price, input_time
87
-  </sql>
88
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
89
-    select
90
-    <if test="distinct" >
91
-      distinct
92
-    </if>
93
-    <include refid="Base_Column_List" />
94
-    from business_store_ware_detail
95
-    <if test="_parameter != null" >
96
-      <include refid="Example_Where_Clause" />
97
-    </if>
98
-    <if test="orderByClause != null" >
99
-      order by ${orderByClause}
100
-    </if>
101
-  </select>
102
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
103
-    select 
104
-    <include refid="Base_Column_List" />
105
-    from business_store_ware_detail
106
-    where id = #{id,jdbcType=INTEGER}
107
-  </select>
108
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
109
-    delete from business_store_ware_detail
110
-    where id = #{id,jdbcType=INTEGER}
111
-  </delete>
112
-  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
113
-    delete from business_store_ware_detail
114
-    <if test="_parameter != null" >
115
-      <include refid="Example_Where_Clause" />
116
-    </if>
117
-  </delete>
118
-  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
119
-    insert into business_store_ware_detail (id, zid, type, 
120
-      house_id, house_name, warehouse_id, 
121
-      warehouse_name, create_time, org_id, 
122
-      grain_kind, grain_detail_kind, grain_grade, 
123
-      grain_attribute, grain_annual, grain_producing_area, 
124
-      price, count, detail_total_price, 
125
-      input_time)
126
-    values (#{id,jdbcType=INTEGER}, #{zid,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
127
-      #{houseId,jdbcType=INTEGER}, #{houseName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=INTEGER}, 
128
-      #{warehouseName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
129
-      #{grainKind,jdbcType=INTEGER}, #{grainDetailKind,jdbcType=INTEGER}, #{grainGrade,jdbcType=INTEGER}, 
130
-      #{grainAttribute,jdbcType=INTEGER}, #{grainAnnual,jdbcType=INTEGER}, #{grainProducingArea,jdbcType=INTEGER}, 
131
-      #{price,jdbcType=VARCHAR}, #{count,jdbcType=VARCHAR}, #{detailTotalPrice,jdbcType=VARCHAR}, 
132
-      #{inputTime,jdbcType=TIMESTAMP})
133
-  </insert>
134
-  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
135
-    insert into business_store_ware_detail
136
-    <trim prefix="(" suffix=")" suffixOverrides="," >
137
-      <if test="id != null" >
138
-        id,
139
-      </if>
140
-      <if test="zid != null" >
141
-        zid,
142
-      </if>
143
-      <if test="type != null" >
144
-        type,
145
-      </if>
146
-      <if test="houseId != null" >
147
-        house_id,
148
-      </if>
149
-      <if test="houseName != null" >
150
-        house_name,
151
-      </if>
152
-      <if test="warehouseId != null" >
153
-        warehouse_id,
154
-      </if>
155
-      <if test="warehouseName != null" >
156
-        warehouse_name,
157
-      </if>
158
-      <if test="createTime != null" >
159
-        create_time,
160
-      </if>
161
-      <if test="orgId != null" >
162
-        org_id,
163
-      </if>
164
-      <if test="grainKind != null" >
165
-        grain_kind,
166
-      </if>
167
-      <if test="grainDetailKind != null" >
168
-        grain_detail_kind,
169
-      </if>
170
-      <if test="grainGrade != null" >
171
-        grain_grade,
172
-      </if>
173
-      <if test="grainAttribute != null" >
174
-        grain_attribute,
175
-      </if>
176
-      <if test="grainAnnual != null" >
177
-        grain_annual,
178
-      </if>
179
-      <if test="grainProducingArea != null" >
180
-        grain_producing_area,
181
-      </if>
182
-      <if test="price != null" >
183
-        price,
184
-      </if>
185
-      <if test="count != null" >
186
-        count,
187
-      </if>
188
-      <if test="detailTotalPrice != null" >
189
-        detail_total_price,
190
-      </if>
191
-      <if test="inputTime != null" >
192
-        input_time,
193
-      </if>
194
-    </trim>
195
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
196
-      <if test="id != null" >
197
-        #{id,jdbcType=INTEGER},
198
-      </if>
199
-      <if test="zid != null" >
200
-        #{zid,jdbcType=INTEGER},
201
-      </if>
202
-      <if test="type != null" >
203
-        #{type,jdbcType=VARCHAR},
204
-      </if>
205
-      <if test="houseId != null" >
206
-        #{houseId,jdbcType=INTEGER},
207
-      </if>
208
-      <if test="houseName != null" >
209
-        #{houseName,jdbcType=VARCHAR},
210
-      </if>
211
-      <if test="warehouseId != null" >
212
-        #{warehouseId,jdbcType=INTEGER},
213
-      </if>
214
-      <if test="warehouseName != null" >
215
-        #{warehouseName,jdbcType=VARCHAR},
216
-      </if>
217
-      <if test="createTime != null" >
218
-        #{createTime,jdbcType=TIMESTAMP},
219
-      </if>
220
-      <if test="orgId != null" >
221
-        #{orgId,jdbcType=INTEGER},
222
-      </if>
223
-      <if test="grainKind != null" >
224
-        #{grainKind,jdbcType=INTEGER},
225
-      </if>
226
-      <if test="grainDetailKind != null" >
227
-        #{grainDetailKind,jdbcType=INTEGER},
228
-      </if>
229
-      <if test="grainGrade != null" >
230
-        #{grainGrade,jdbcType=INTEGER},
231
-      </if>
232
-      <if test="grainAttribute != null" >
233
-        #{grainAttribute,jdbcType=INTEGER},
234
-      </if>
235
-      <if test="grainAnnual != null" >
236
-        #{grainAnnual,jdbcType=INTEGER},
237
-      </if>
238
-      <if test="grainProducingArea != null" >
239
-        #{grainProducingArea,jdbcType=INTEGER},
240
-      </if>
241
-      <if test="price != null" >
242
-        #{price,jdbcType=VARCHAR},
243
-      </if>
244
-      <if test="count != null" >
245
-        #{count,jdbcType=VARCHAR},
246
-      </if>
247
-      <if test="detailTotalPrice != null" >
248
-        #{detailTotalPrice,jdbcType=VARCHAR},
249
-      </if>
250
-      <if test="inputTime != null" >
251
-        #{inputTime,jdbcType=TIMESTAMP},
252
-      </if>
253
-    </trim>
254
-  </insert>
255
-  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" resultType="java.lang.Integer" >
256
-    select count(*) from business_store_ware_detail
257
-    <if test="_parameter != null" >
258
-      <include refid="Example_Where_Clause" />
259
-    </if>
260
-  </select>
261
-  <update id="updateByExampleSelective" parameterType="map" >
262
-    update business_store_ware_detail
263
-    <set >
264
-      <if test="record.id != null" >
265
-        id = #{record.id,jdbcType=INTEGER},
266
-      </if>
267
-      <if test="record.zid != null" >
268
-        zid = #{record.zid,jdbcType=INTEGER},
269
-      </if>
270
-      <if test="record.type != null" >
271
-        type = #{record.type,jdbcType=VARCHAR},
272
-      </if>
273
-      <if test="record.houseId != null" >
274
-        house_id = #{record.houseId,jdbcType=INTEGER},
275
-      </if>
276
-      <if test="record.houseName != null" >
277
-        house_name = #{record.houseName,jdbcType=VARCHAR},
278
-      </if>
279
-      <if test="record.warehouseId != null" >
280
-        warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
281
-      </if>
282
-      <if test="record.warehouseName != null" >
283
-        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
284
-      </if>
285
-      <if test="record.createTime != null" >
286
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
287
-      </if>
288
-      <if test="record.orgId != null" >
289
-        org_id = #{record.orgId,jdbcType=INTEGER},
290
-      </if>
291
-      <if test="record.grainKind != null" >
292
-        grain_kind = #{record.grainKind,jdbcType=INTEGER},
293
-      </if>
294
-      <if test="record.grainDetailKind != null" >
295
-        grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
296
-      </if>
297
-      <if test="record.grainGrade != null" >
298
-        grain_grade = #{record.grainGrade,jdbcType=INTEGER},
299
-      </if>
300
-      <if test="record.grainAttribute != null" >
301
-        grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
302
-      </if>
303
-      <if test="record.grainAnnual != null" >
304
-        grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
305
-      </if>
306
-      <if test="record.grainProducingArea != null" >
307
-        grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
308
-      </if>
309
-      <if test="record.price != null" >
310
-        price = #{record.price,jdbcType=VARCHAR},
311
-      </if>
312
-      <if test="record.count != null" >
313
-        count = #{record.count,jdbcType=VARCHAR},
314
-      </if>
315
-      <if test="record.detailTotalPrice != null" >
316
-        detail_total_price = #{record.detailTotalPrice,jdbcType=VARCHAR},
317
-      </if>
318
-      <if test="record.inputTime != null" >
319
-        input_time = #{record.inputTime,jdbcType=TIMESTAMP},
320
-      </if>
321
-    </set>
322
-    <if test="_parameter != null" >
323
-      <include refid="Update_By_Example_Where_Clause" />
324
-    </if>
325
-  </update>
326
-  <update id="updateByExample" parameterType="map" >
327
-    update business_store_ware_detail
328
-    set id = #{record.id,jdbcType=INTEGER},
329
-      zid = #{record.zid,jdbcType=INTEGER},
330
-      type = #{record.type,jdbcType=VARCHAR},
331
-      house_id = #{record.houseId,jdbcType=INTEGER},
332
-      house_name = #{record.houseName,jdbcType=VARCHAR},
333
-      warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
334
-      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
335
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
336
-      org_id = #{record.orgId,jdbcType=INTEGER},
337
-      grain_kind = #{record.grainKind,jdbcType=INTEGER},
338
-      grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
339
-      grain_grade = #{record.grainGrade,jdbcType=INTEGER},
340
-      grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
341
-      grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
342
-      grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
343
-      price = #{record.price,jdbcType=VARCHAR},
344
-      count = #{record.count,jdbcType=VARCHAR},
345
-      detail_total_price = #{record.detailTotalPrice,jdbcType=VARCHAR},
346
-      input_time = #{record.inputTime,jdbcType=TIMESTAMP}
347
-    <if test="_parameter != null" >
348
-      <include refid="Update_By_Example_Where_Clause" />
349
-    </if>
350
-  </update>
351
-  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
352
-    update business_store_ware_detail
353
-    <set >
354
-      <if test="zid != null" >
355
-        zid = #{zid,jdbcType=INTEGER},
356
-      </if>
357
-      <if test="type != null" >
358
-        type = #{type,jdbcType=VARCHAR},
359
-      </if>
360
-      <if test="houseId != null" >
361
-        house_id = #{houseId,jdbcType=INTEGER},
362
-      </if>
363
-      <if test="houseName != null" >
364
-        house_name = #{houseName,jdbcType=VARCHAR},
365
-      </if>
366
-      <if test="warehouseId != null" >
367
-        warehouse_id = #{warehouseId,jdbcType=INTEGER},
368
-      </if>
369
-      <if test="warehouseName != null" >
370
-        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
371
-      </if>
372
-      <if test="createTime != null" >
373
-        create_time = #{createTime,jdbcType=TIMESTAMP},
374
-      </if>
375
-      <if test="orgId != null" >
376
-        org_id = #{orgId,jdbcType=INTEGER},
377
-      </if>
378
-      <if test="grainKind != null" >
379
-        grain_kind = #{grainKind,jdbcType=INTEGER},
380
-      </if>
381
-      <if test="grainDetailKind != null" >
382
-        grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
383
-      </if>
384
-      <if test="grainGrade != null" >
385
-        grain_grade = #{grainGrade,jdbcType=INTEGER},
386
-      </if>
387
-      <if test="grainAttribute != null" >
388
-        grain_attribute = #{grainAttribute,jdbcType=INTEGER},
389
-      </if>
390
-      <if test="grainAnnual != null" >
391
-        grain_annual = #{grainAnnual,jdbcType=INTEGER},
392
-      </if>
393
-      <if test="grainProducingArea != null" >
394
-        grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
395
-      </if>
396
-      <if test="price != null" >
397
-        price = #{price,jdbcType=VARCHAR},
398
-      </if>
399
-      <if test="count != null" >
400
-        count = #{count,jdbcType=VARCHAR},
401
-      </if>
402
-      <if test="detailTotalPrice != null" >
403
-        detail_total_price = #{detailTotalPrice,jdbcType=VARCHAR},
404
-      </if>
405
-      <if test="inputTime != null" >
406
-        input_time = #{inputTime,jdbcType=TIMESTAMP},
407
-      </if>
408
-    </set>
409
-    where id = #{id,jdbcType=INTEGER}
410
-  </update>
411
-  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
412
-    update business_store_ware_detail
413
-    set zid = #{zid,jdbcType=INTEGER},
414
-      type = #{type,jdbcType=VARCHAR},
415
-      house_id = #{houseId,jdbcType=INTEGER},
416
-      house_name = #{houseName,jdbcType=VARCHAR},
417
-      warehouse_id = #{warehouseId,jdbcType=INTEGER},
418
-      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
419
-      create_time = #{createTime,jdbcType=TIMESTAMP},
420
-      org_id = #{orgId,jdbcType=INTEGER},
421
-      grain_kind = #{grainKind,jdbcType=INTEGER},
422
-      grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
423
-      grain_grade = #{grainGrade,jdbcType=INTEGER},
424
-      grain_attribute = #{grainAttribute,jdbcType=INTEGER},
425
-      grain_annual = #{grainAnnual,jdbcType=INTEGER},
426
-      grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
427
-      price = #{price,jdbcType=VARCHAR},
428
-      count = #{count,jdbcType=VARCHAR},
429
-      detail_total_price = #{detailTotalPrice,jdbcType=VARCHAR},
430
-      input_time = #{inputTime,jdbcType=TIMESTAMP}
431
-    where id = #{id,jdbcType=INTEGER}
432
-  </update>
433
-  
434
-  
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessStoreWareDetailMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="zid" property="zid" jdbcType="INTEGER" />
7
+    <result column="type" property="type" jdbcType="VARCHAR" />
8
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
9
+    <result column="house_name" property="houseName" jdbcType="VARCHAR" />
10
+    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
11
+    <result column="warehouse_name" property="warehouseName" jdbcType="VARCHAR" />
12
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
13
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
14
+    <result column="grain_kind" property="grainKind" jdbcType="INTEGER" />
15
+    <result column="grain_detail_kind" property="grainDetailKind" jdbcType="INTEGER" />
16
+    <result column="grain_grade" property="grainGrade" jdbcType="INTEGER" />
17
+    <result column="grain_attribute" property="grainAttribute" jdbcType="INTEGER" />
18
+    <result column="grain_annual" property="grainAnnual" jdbcType="INTEGER" />
19
+    <result column="grain_producing_area" property="grainProducingArea" jdbcType="INTEGER" />
20
+    <result column="price" property="price" jdbcType="VARCHAR" />
21
+    <result column="count" property="count" jdbcType="VARCHAR" />
22
+    <result column="detail_total_price" property="detailTotalPrice" jdbcType="VARCHAR" />
23
+    <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
24
+    <result column="state" property="state" jdbcType="INTEGER" />
25
+  </resultMap>
26
+  <sql id="Example_Where_Clause" >
27
+    <where >
28
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
29
+        <if test="criteria.valid" >
30
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
31
+            <foreach collection="criteria.criteria" item="criterion" >
32
+              <choose >
33
+                <when test="criterion.noValue" >
34
+                  and ${criterion.condition}
35
+                </when>
36
+                <when test="criterion.singleValue" >
37
+                  and ${criterion.condition} #{criterion.value}
38
+                </when>
39
+                <when test="criterion.betweenValue" >
40
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
41
+                </when>
42
+                <when test="criterion.listValue" >
43
+                  and ${criterion.condition}
44
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
45
+                    #{listItem}
46
+                  </foreach>
47
+                </when>
48
+              </choose>
49
+            </foreach>
50
+          </trim>
51
+        </if>
52
+      </foreach>
53
+    </where>
54
+  </sql>
55
+  <sql id="Update_By_Example_Where_Clause" >
56
+    <where >
57
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
58
+        <if test="criteria.valid" >
59
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
60
+            <foreach collection="criteria.criteria" item="criterion" >
61
+              <choose >
62
+                <when test="criterion.noValue" >
63
+                  and ${criterion.condition}
64
+                </when>
65
+                <when test="criterion.singleValue" >
66
+                  and ${criterion.condition} #{criterion.value}
67
+                </when>
68
+                <when test="criterion.betweenValue" >
69
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
70
+                </when>
71
+                <when test="criterion.listValue" >
72
+                  and ${criterion.condition}
73
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
74
+                    #{listItem}
75
+                  </foreach>
76
+                </when>
77
+              </choose>
78
+            </foreach>
79
+          </trim>
80
+        </if>
81
+      </foreach>
82
+    </where>
83
+  </sql>
84
+  <sql id="Base_Column_List" >
85
+    id, zid, type, house_id, house_name, warehouse_id, warehouse_name, create_time, org_id, 
86
+    grain_kind, grain_detail_kind, grain_grade, grain_attribute, grain_annual, grain_producing_area, 
87
+    price, count, detail_total_price, input_time, state
88
+  </sql>
89
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
90
+    select
91
+    <if test="distinct" >
92
+      distinct
93
+    </if>
94
+    <include refid="Base_Column_List" />
95
+    from business_store_ware_detail
96
+    <if test="_parameter != null" >
97
+      <include refid="Example_Where_Clause" />
98
+    </if>
99
+    <if test="orderByClause != null" >
100
+      order by ${orderByClause}
101
+    </if>
102
+  </select>
103
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
104
+    select 
105
+    <include refid="Base_Column_List" />
106
+    from business_store_ware_detail
107
+    where id = #{id,jdbcType=INTEGER}
108
+  </select>
109
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
110
+    delete from business_store_ware_detail
111
+    where id = #{id,jdbcType=INTEGER}
112
+  </delete>
113
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
114
+    delete from business_store_ware_detail
115
+    <if test="_parameter != null" >
116
+      <include refid="Example_Where_Clause" />
117
+    </if>
118
+  </delete>
119
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
120
+    insert into business_store_ware_detail (id, zid, type, 
121
+      house_id, house_name, warehouse_id, 
122
+      warehouse_name, create_time, org_id, 
123
+      grain_kind, grain_detail_kind, grain_grade, 
124
+      grain_attribute, grain_annual, grain_producing_area, 
125
+      price, count, detail_total_price, 
126
+      input_time, state)
127
+    values (#{id,jdbcType=INTEGER}, #{zid,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
128
+      #{houseId,jdbcType=INTEGER}, #{houseName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=INTEGER}, 
129
+      #{warehouseName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
130
+      #{grainKind,jdbcType=INTEGER}, #{grainDetailKind,jdbcType=INTEGER}, #{grainGrade,jdbcType=INTEGER}, 
131
+      #{grainAttribute,jdbcType=INTEGER}, #{grainAnnual,jdbcType=INTEGER}, #{grainProducingArea,jdbcType=INTEGER}, 
132
+      #{price,jdbcType=VARCHAR}, #{count,jdbcType=VARCHAR}, #{detailTotalPrice,jdbcType=VARCHAR}, 
133
+      #{inputTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER})
134
+  </insert>
135
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
136
+    insert into business_store_ware_detail
137
+    <trim prefix="(" suffix=")" suffixOverrides="," >
138
+      <if test="id != null" >
139
+        id,
140
+      </if>
141
+      <if test="zid != null" >
142
+        zid,
143
+      </if>
144
+      <if test="type != null" >
145
+        type,
146
+      </if>
147
+      <if test="houseId != null" >
148
+        house_id,
149
+      </if>
150
+      <if test="houseName != null" >
151
+        house_name,
152
+      </if>
153
+      <if test="warehouseId != null" >
154
+        warehouse_id,
155
+      </if>
156
+      <if test="warehouseName != null" >
157
+        warehouse_name,
158
+      </if>
159
+      <if test="createTime != null" >
160
+        create_time,
161
+      </if>
162
+      <if test="orgId != null" >
163
+        org_id,
164
+      </if>
165
+      <if test="grainKind != null" >
166
+        grain_kind,
167
+      </if>
168
+      <if test="grainDetailKind != null" >
169
+        grain_detail_kind,
170
+      </if>
171
+      <if test="grainGrade != null" >
172
+        grain_grade,
173
+      </if>
174
+      <if test="grainAttribute != null" >
175
+        grain_attribute,
176
+      </if>
177
+      <if test="grainAnnual != null" >
178
+        grain_annual,
179
+      </if>
180
+      <if test="grainProducingArea != null" >
181
+        grain_producing_area,
182
+      </if>
183
+      <if test="price != null" >
184
+        price,
185
+      </if>
186
+      <if test="count != null" >
187
+        count,
188
+      </if>
189
+      <if test="detailTotalPrice != null" >
190
+        detail_total_price,
191
+      </if>
192
+      <if test="inputTime != null" >
193
+        input_time,
194
+      </if>
195
+      <if test="state != null" >
196
+        state,
197
+      </if>
198
+    </trim>
199
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
200
+      <if test="id != null" >
201
+        #{id,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="zid != null" >
204
+        #{zid,jdbcType=INTEGER},
205
+      </if>
206
+      <if test="type != null" >
207
+        #{type,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="houseId != null" >
210
+        #{houseId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="houseName != null" >
213
+        #{houseName,jdbcType=VARCHAR},
214
+      </if>
215
+      <if test="warehouseId != null" >
216
+        #{warehouseId,jdbcType=INTEGER},
217
+      </if>
218
+      <if test="warehouseName != null" >
219
+        #{warehouseName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="createTime != null" >
222
+        #{createTime,jdbcType=TIMESTAMP},
223
+      </if>
224
+      <if test="orgId != null" >
225
+        #{orgId,jdbcType=INTEGER},
226
+      </if>
227
+      <if test="grainKind != null" >
228
+        #{grainKind,jdbcType=INTEGER},
229
+      </if>
230
+      <if test="grainDetailKind != null" >
231
+        #{grainDetailKind,jdbcType=INTEGER},
232
+      </if>
233
+      <if test="grainGrade != null" >
234
+        #{grainGrade,jdbcType=INTEGER},
235
+      </if>
236
+      <if test="grainAttribute != null" >
237
+        #{grainAttribute,jdbcType=INTEGER},
238
+      </if>
239
+      <if test="grainAnnual != null" >
240
+        #{grainAnnual,jdbcType=INTEGER},
241
+      </if>
242
+      <if test="grainProducingArea != null" >
243
+        #{grainProducingArea,jdbcType=INTEGER},
244
+      </if>
245
+      <if test="price != null" >
246
+        #{price,jdbcType=VARCHAR},
247
+      </if>
248
+      <if test="count != null" >
249
+        #{count,jdbcType=VARCHAR},
250
+      </if>
251
+      <if test="detailTotalPrice != null" >
252
+        #{detailTotalPrice,jdbcType=VARCHAR},
253
+      </if>
254
+      <if test="inputTime != null" >
255
+        #{inputTime,jdbcType=TIMESTAMP},
256
+      </if>
257
+      <if test="state != null" >
258
+        #{state,jdbcType=INTEGER},
259
+      </if>
260
+    </trim>
261
+  </insert>
262
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" resultType="java.lang.Integer" >
263
+    select count(*) from business_store_ware_detail
264
+    <if test="_parameter != null" >
265
+      <include refid="Example_Where_Clause" />
266
+    </if>
267
+  </select>
268
+  <update id="updateByExampleSelective" parameterType="map" >
269
+    update business_store_ware_detail
270
+    <set >
271
+      <if test="record.id != null" >
272
+        id = #{record.id,jdbcType=INTEGER},
273
+      </if>
274
+      <if test="record.zid != null" >
275
+        zid = #{record.zid,jdbcType=INTEGER},
276
+      </if>
277
+      <if test="record.type != null" >
278
+        type = #{record.type,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="record.houseId != null" >
281
+        house_id = #{record.houseId,jdbcType=INTEGER},
282
+      </if>
283
+      <if test="record.houseName != null" >
284
+        house_name = #{record.houseName,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="record.warehouseId != null" >
287
+        warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="record.warehouseName != null" >
290
+        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="record.createTime != null" >
293
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
294
+      </if>
295
+      <if test="record.orgId != null" >
296
+        org_id = #{record.orgId,jdbcType=INTEGER},
297
+      </if>
298
+      <if test="record.grainKind != null" >
299
+        grain_kind = #{record.grainKind,jdbcType=INTEGER},
300
+      </if>
301
+      <if test="record.grainDetailKind != null" >
302
+        grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
303
+      </if>
304
+      <if test="record.grainGrade != null" >
305
+        grain_grade = #{record.grainGrade,jdbcType=INTEGER},
306
+      </if>
307
+      <if test="record.grainAttribute != null" >
308
+        grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="record.grainAnnual != null" >
311
+        grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
312
+      </if>
313
+      <if test="record.grainProducingArea != null" >
314
+        grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="record.price != null" >
317
+        price = #{record.price,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="record.count != null" >
320
+        count = #{record.count,jdbcType=VARCHAR},
321
+      </if>
322
+      <if test="record.detailTotalPrice != null" >
323
+        detail_total_price = #{record.detailTotalPrice,jdbcType=VARCHAR},
324
+      </if>
325
+      <if test="record.inputTime != null" >
326
+        input_time = #{record.inputTime,jdbcType=TIMESTAMP},
327
+      </if>
328
+      <if test="record.state != null" >
329
+        state = #{record.state,jdbcType=INTEGER},
330
+      </if>
331
+    </set>
332
+    <if test="_parameter != null" >
333
+      <include refid="Update_By_Example_Where_Clause" />
334
+    </if>
335
+  </update>
336
+  <update id="updateByExample" parameterType="map" >
337
+    update business_store_ware_detail
338
+    set id = #{record.id,jdbcType=INTEGER},
339
+      zid = #{record.zid,jdbcType=INTEGER},
340
+      type = #{record.type,jdbcType=VARCHAR},
341
+      house_id = #{record.houseId,jdbcType=INTEGER},
342
+      house_name = #{record.houseName,jdbcType=VARCHAR},
343
+      warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
344
+      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
345
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
346
+      org_id = #{record.orgId,jdbcType=INTEGER},
347
+      grain_kind = #{record.grainKind,jdbcType=INTEGER},
348
+      grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
349
+      grain_grade = #{record.grainGrade,jdbcType=INTEGER},
350
+      grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
351
+      grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
352
+      grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
353
+      price = #{record.price,jdbcType=VARCHAR},
354
+      count = #{record.count,jdbcType=VARCHAR},
355
+      detail_total_price = #{record.detailTotalPrice,jdbcType=VARCHAR},
356
+      input_time = #{record.inputTime,jdbcType=TIMESTAMP},
357
+      state = #{record.state,jdbcType=INTEGER}
358
+    <if test="_parameter != null" >
359
+      <include refid="Update_By_Example_Where_Clause" />
360
+    </if>
361
+  </update>
362
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
363
+    update business_store_ware_detail
364
+    <set >
365
+      <if test="zid != null" >
366
+        zid = #{zid,jdbcType=INTEGER},
367
+      </if>
368
+      <if test="type != null" >
369
+        type = #{type,jdbcType=VARCHAR},
370
+      </if>
371
+      <if test="houseId != null" >
372
+        house_id = #{houseId,jdbcType=INTEGER},
373
+      </if>
374
+      <if test="houseName != null" >
375
+        house_name = #{houseName,jdbcType=VARCHAR},
376
+      </if>
377
+      <if test="warehouseId != null" >
378
+        warehouse_id = #{warehouseId,jdbcType=INTEGER},
379
+      </if>
380
+      <if test="warehouseName != null" >
381
+        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
382
+      </if>
383
+      <if test="createTime != null" >
384
+        create_time = #{createTime,jdbcType=TIMESTAMP},
385
+      </if>
386
+      <if test="orgId != null" >
387
+        org_id = #{orgId,jdbcType=INTEGER},
388
+      </if>
389
+      <if test="grainKind != null" >
390
+        grain_kind = #{grainKind,jdbcType=INTEGER},
391
+      </if>
392
+      <if test="grainDetailKind != null" >
393
+        grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
394
+      </if>
395
+      <if test="grainGrade != null" >
396
+        grain_grade = #{grainGrade,jdbcType=INTEGER},
397
+      </if>
398
+      <if test="grainAttribute != null" >
399
+        grain_attribute = #{grainAttribute,jdbcType=INTEGER},
400
+      </if>
401
+      <if test="grainAnnual != null" >
402
+        grain_annual = #{grainAnnual,jdbcType=INTEGER},
403
+      </if>
404
+      <if test="grainProducingArea != null" >
405
+        grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
406
+      </if>
407
+      <if test="price != null" >
408
+        price = #{price,jdbcType=VARCHAR},
409
+      </if>
410
+      <if test="count != null" >
411
+        count = #{count,jdbcType=VARCHAR},
412
+      </if>
413
+      <if test="detailTotalPrice != null" >
414
+        detail_total_price = #{detailTotalPrice,jdbcType=VARCHAR},
415
+      </if>
416
+      <if test="inputTime != null" >
417
+        input_time = #{inputTime,jdbcType=TIMESTAMP},
418
+      </if>
419
+      <if test="state != null" >
420
+        state = #{state,jdbcType=INTEGER},
421
+      </if>
422
+    </set>
423
+    where id = #{id,jdbcType=INTEGER}
424
+  </update>
425
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
426
+    update business_store_ware_detail
427
+    set zid = #{zid,jdbcType=INTEGER},
428
+      type = #{type,jdbcType=VARCHAR},
429
+      house_id = #{houseId,jdbcType=INTEGER},
430
+      house_name = #{houseName,jdbcType=VARCHAR},
431
+      warehouse_id = #{warehouseId,jdbcType=INTEGER},
432
+      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
433
+      create_time = #{createTime,jdbcType=TIMESTAMP},
434
+      org_id = #{orgId,jdbcType=INTEGER},
435
+      grain_kind = #{grainKind,jdbcType=INTEGER},
436
+      grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
437
+      grain_grade = #{grainGrade,jdbcType=INTEGER},
438
+      grain_attribute = #{grainAttribute,jdbcType=INTEGER},
439
+      grain_annual = #{grainAnnual,jdbcType=INTEGER},
440
+      grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
441
+      price = #{price,jdbcType=VARCHAR},
442
+      count = #{count,jdbcType=VARCHAR},
443
+      detail_total_price = #{detailTotalPrice,jdbcType=VARCHAR},
444
+      input_time = #{inputTime,jdbcType=TIMESTAMP},
445
+      state = #{state,jdbcType=INTEGER}
446
+    where id = #{id,jdbcType=INTEGER}
447
+  </update>
435 448
 </mapper>

文件差異過大導致無法顯示
+ 553 - 515
src/main/java/com/chinaitop/depot/business/model/BusinessPlan.java


文件差異過大導致無法顯示
+ 2148 - 2008
src/main/java/com/chinaitop/depot/business/model/BusinessPlanExample.java


+ 364 - 346
src/main/java/com/chinaitop/depot/business/model/BusinessStoreWareDetail.java

@@ -1,347 +1,365 @@
1
-package com.chinaitop.depot.business.model;
2
-
3
-import java.util.Date;
4
-
5
-public class BusinessStoreWareDetail {
6
-    private Integer id;
7
-
8
-    private Integer zid;
9
-
10
-    private String type;
11
-
12
-    private Integer houseId;
13
-
14
-    private String houseName;
15
-
16
-    private Integer warehouseId;
17
-
18
-    private String warehouseName;
19
-
20
-    private Date createTime;
21
-
22
-    private Integer orgId;
23
-
24
-    private Integer grainKind;
25
-
26
-    private Integer grainDetailKind;
27
-
28
-    private Integer grainGrade;
29
-
30
-    private Integer grainAttribute;
31
-
32
-    private Integer grainAnnual;
33
-
34
-    private Integer grainProducingArea;
35
-
36
-    private String price;
37
-
38
-    private String count;
39
-
40
-    private String detailTotalPrice;
41
-
42
-    private Date inputTime;
43
-
44
-    /**
45
-     * 计划合同通知单明细表
46
-     * @return id 计划合同通知单明细表
47
-     */
48
-    public Integer getId() {
49
-        return id;
50
-    }
51
-
52
-    /**
53
-     * 计划合同通知单明细表
54
-     * @param id 计划合同通知单明细表
55
-     */
56
-    public void setId(Integer id) {
57
-        this.id = id;
58
-    }
59
-
60
-    /**
61
-     * 出入库通知单表id
62
-     * @return zid 出入库通知单表id
63
-     */
64
-    public Integer getZid() {
65
-        return zid;
66
-    }
67
-
68
-    /**
69
-     * 出入库通知单表id
70
-     * @param zid 出入库通知单表id
71
-     */
72
-    public void setZid(Integer zid) {
73
-        this.zid = zid;
74
-    }
75
-
76
-    /**
77
-     * 类型 plan(计划) contract(合同) notice(通知单)
78
-     * @return type 类型 plan(计划) contract(合同) notice(通知单)
79
-     */
80
-    public String getType() {
81
-        return type;
82
-    }
83
-
84
-    /**
85
-     * 类型 plan(计划) contract(合同) notice(通知单)
86
-     * @param type 类型 plan(计划) contract(合同) notice(通知单)
87
-     */
88
-    public void setType(String type) {
89
-        this.type = type == null ? null : type.trim();
90
-    }
91
-
92
-    /**
93
-     * 仓房id
94
-     * @return house_id 仓房id
95
-     */
96
-    public Integer getHouseId() {
97
-        return houseId;
98
-    }
99
-
100
-    /**
101
-     * 仓房id
102
-     * @param houseId 仓房id
103
-     */
104
-    public void setHouseId(Integer houseId) {
105
-        this.houseId = houseId;
106
-    }
107
-
108
-    /**
109
-     * 仓房名称
110
-     * @return house_name 仓房名称
111
-     */
112
-    public String getHouseName() {
113
-        return houseName;
114
-    }
115
-
116
-    /**
117
-     * 仓房名称
118
-     * @param houseName 仓房名称
119
-     */
120
-    public void setHouseName(String houseName) {
121
-        this.houseName = houseName == null ? null : houseName.trim();
122
-    }
123
-
124
-    /**
125
-     * 货位id
126
-     * @return warehouse_id 货位id
127
-     */
128
-    public Integer getWarehouseId() {
129
-        return warehouseId;
130
-    }
131
-
132
-    /**
133
-     * 货位id
134
-     * @param warehouseId 货位id
135
-     */
136
-    public void setWarehouseId(Integer warehouseId) {
137
-        this.warehouseId = warehouseId;
138
-    }
139
-
140
-    /**
141
-     * 货位名称
142
-     * @return warehouse_name 货位名称
143
-     */
144
-    public String getWarehouseName() {
145
-        return warehouseName;
146
-    }
147
-
148
-    /**
149
-     * 货位名称
150
-     * @param warehouseName 货位名称
151
-     */
152
-    public void setWarehouseName(String warehouseName) {
153
-        this.warehouseName = warehouseName == null ? null : warehouseName.trim();
154
-    }
155
-
156
-    /**
157
-     * 创建时间
158
-     * @return create_time 创建时间
159
-     */
160
-    public Date getCreateTime() {
161
-        return createTime;
162
-    }
163
-
164
-    /**
165
-     * 创建时间
166
-     * @param createTime 创建时间
167
-     */
168
-    public void setCreateTime(Date createTime) {
169
-        this.createTime = createTime;
170
-    }
171
-
172
-    /**
173
-     * 承储库点
174
-     * @return org_id 承储库点
175
-     */
176
-    public Integer getOrgId() {
177
-        return orgId;
178
-    }
179
-
180
-    /**
181
-     * 承储库点
182
-     * @param orgId 承储库点
183
-     */
184
-    public void setOrgId(Integer orgId) {
185
-        this.orgId = orgId;
186
-    }
187
-
188
-    /**
189
-     * 粮油品种
190
-     * @return grain_kind 粮油品种
191
-     */
192
-    public Integer getGrainKind() {
193
-        return grainKind;
194
-    }
195
-
196
-    /**
197
-     * 粮油品种
198
-     * @param grainKind 粮油品种
199
-     */
200
-    public void setGrainKind(Integer grainKind) {
201
-        this.grainKind = grainKind;
202
-    }
203
-
204
-    /**
205
-     * 明细品种
206
-     * @return grain_detail_kind 明细品种
207
-     */
208
-    public Integer getGrainDetailKind() {
209
-        return grainDetailKind;
210
-    }
211
-
212
-    /**
213
-     * 明细品种
214
-     * @param grainDetailKind 明细品种
215
-     */
216
-    public void setGrainDetailKind(Integer grainDetailKind) {
217
-        this.grainDetailKind = grainDetailKind;
218
-    }
219
-
220
-    /**
221
-     * 粮油等级
222
-     * @return grain_grade 粮油等级
223
-     */
224
-    public Integer getGrainGrade() {
225
-        return grainGrade;
226
-    }
227
-
228
-    /**
229
-     * 粮油等级
230
-     * @param grainGrade 粮油等级
231
-     */
232
-    public void setGrainGrade(Integer grainGrade) {
233
-        this.grainGrade = grainGrade;
234
-    }
235
-
236
-    /**
237
-     * 粮油性质
238
-     * @return grain_attribute 粮油性质
239
-     */
240
-    public Integer getGrainAttribute() {
241
-        return grainAttribute;
242
-    }
243
-
244
-    /**
245
-     * 粮油性质
246
-     * @param grainAttribute 粮油性质
247
-     */
248
-    public void setGrainAttribute(Integer grainAttribute) {
249
-        this.grainAttribute = grainAttribute;
250
-    }
251
-
252
-    /**
253
-     * 生产年限
254
-     * @return grain_annual 生产年限
255
-     */
256
-    public Integer getGrainAnnual() {
257
-        return grainAnnual;
258
-    }
259
-
260
-    /**
261
-     * 生产年限
262
-     * @param grainAnnual 生产年限
263
-     */
264
-    public void setGrainAnnual(Integer grainAnnual) {
265
-        this.grainAnnual = grainAnnual;
266
-    }
267
-
268
-    /**
269
-     * 粮油产地
270
-     * @return grain_producing_area 粮油产地
271
-     */
272
-    public Integer getGrainProducingArea() {
273
-        return grainProducingArea;
274
-    }
275
-
276
-    /**
277
-     * 粮油产地
278
-     * @param grainProducingArea 粮油产地
279
-     */
280
-    public void setGrainProducingArea(Integer grainProducingArea) {
281
-        this.grainProducingArea = grainProducingArea;
282
-    }
283
-
284
-    /**
285
-     * 单价
286
-     * @return price 单价
287
-     */
288
-    public String getPrice() {
289
-        return price;
290
-    }
291
-
292
-    /**
293
-     * 单价
294
-     * @param price 单价
295
-     */
296
-    public void setPrice(String price) {
297
-        this.price = price == null ? null : price.trim();
298
-    }
299
-
300
-    /**
301
-     * 数量
302
-     * @return count 数量
303
-     */
304
-    public String getCount() {
305
-        return count;
306
-    }
307
-
308
-    /**
309
-     * 数量
310
-     * @param count 数量
311
-     */
312
-    public void setCount(String count) {
313
-        this.count = count == null ? null : count.trim();
314
-    }
315
-
316
-    /**
317
-     * 总价
318
-     * @return detail_total_price 总价
319
-     */
320
-    public String getDetailTotalPrice() {
321
-        return detailTotalPrice;
322
-    }
323
-
324
-    /**
325
-     * 总价
326
-     * @param detailTotalPrice 总价
327
-     */
328
-    public void setDetailTotalPrice(String detailTotalPrice) {
329
-        this.detailTotalPrice = detailTotalPrice == null ? null : detailTotalPrice.trim();
330
-    }
331
-
332
-    /**
333
-     * 入库时间
334
-     * @return input_time 入库时间
335
-     */
336
-    public Date getInputTime() {
337
-        return inputTime;
338
-    }
339
-
340
-    /**
341
-     * 入库时间
342
-     * @param inputTime 入库时间
343
-     */
344
-    public void setInputTime(Date inputTime) {
345
-        this.inputTime = inputTime;
346
-    }
1
+package com.chinaitop.depot.business.model;
2
+
3
+import java.util.Date;
4
+
5
+public class BusinessStoreWareDetail {
6
+    private Integer id;
7
+
8
+    private Integer zid;
9
+
10
+    private String type;
11
+
12
+    private Integer houseId;
13
+
14
+    private String houseName;
15
+
16
+    private Integer warehouseId;
17
+
18
+    private String warehouseName;
19
+
20
+    private Date createTime;
21
+
22
+    private Integer orgId;
23
+
24
+    private Integer grainKind;
25
+
26
+    private Integer grainDetailKind;
27
+
28
+    private Integer grainGrade;
29
+
30
+    private Integer grainAttribute;
31
+
32
+    private Integer grainAnnual;
33
+
34
+    private Integer grainProducingArea;
35
+
36
+    private String price;
37
+
38
+    private String count;
39
+
40
+    private String detailTotalPrice;
41
+
42
+    private Date inputTime;
43
+
44
+    private Integer state;
45
+
46
+    /**
47
+     * 计划合同通知单明细表
48
+     * @return id 计划合同通知单明细表
49
+     */
50
+    public Integer getId() {
51
+        return id;
52
+    }
53
+
54
+    /**
55
+     * 计划合同通知单明细表
56
+     * @param id 计划合同通知单明细表
57
+     */
58
+    public void setId(Integer id) {
59
+        this.id = id;
60
+    }
61
+
62
+    /**
63
+     * 出入库通知单表id
64
+     * @return zid 出入库通知单表id
65
+     */
66
+    public Integer getZid() {
67
+        return zid;
68
+    }
69
+
70
+    /**
71
+     * 出入库通知单表id
72
+     * @param zid 出入库通知单表id
73
+     */
74
+    public void setZid(Integer zid) {
75
+        this.zid = zid;
76
+    }
77
+
78
+    /**
79
+     * 类型 plan(计划) contract(合同) notice(通知单)
80
+     * @return type 类型 plan(计划) contract(合同) notice(通知单)
81
+     */
82
+    public String getType() {
83
+        return type;
84
+    }
85
+
86
+    /**
87
+     * 类型 plan(计划) contract(合同) notice(通知单)
88
+     * @param type 类型 plan(计划) contract(合同) notice(通知单)
89
+     */
90
+    public void setType(String type) {
91
+        this.type = type == null ? null : type.trim();
92
+    }
93
+
94
+    /**
95
+     * 仓房id
96
+     * @return house_id 仓房id
97
+     */
98
+    public Integer getHouseId() {
99
+        return houseId;
100
+    }
101
+
102
+    /**
103
+     * 仓房id
104
+     * @param houseId 仓房id
105
+     */
106
+    public void setHouseId(Integer houseId) {
107
+        this.houseId = houseId;
108
+    }
109
+
110
+    /**
111
+     * 仓房名称
112
+     * @return house_name 仓房名称
113
+     */
114
+    public String getHouseName() {
115
+        return houseName;
116
+    }
117
+
118
+    /**
119
+     * 仓房名称
120
+     * @param houseName 仓房名称
121
+     */
122
+    public void setHouseName(String houseName) {
123
+        this.houseName = houseName == null ? null : houseName.trim();
124
+    }
125
+
126
+    /**
127
+     * 货位id
128
+     * @return warehouse_id 货位id
129
+     */
130
+    public Integer getWarehouseId() {
131
+        return warehouseId;
132
+    }
133
+
134
+    /**
135
+     * 货位id
136
+     * @param warehouseId 货位id
137
+     */
138
+    public void setWarehouseId(Integer warehouseId) {
139
+        this.warehouseId = warehouseId;
140
+    }
141
+
142
+    /**
143
+     * 货位名称
144
+     * @return warehouse_name 货位名称
145
+     */
146
+    public String getWarehouseName() {
147
+        return warehouseName;
148
+    }
149
+
150
+    /**
151
+     * 货位名称
152
+     * @param warehouseName 货位名称
153
+     */
154
+    public void setWarehouseName(String warehouseName) {
155
+        this.warehouseName = warehouseName == null ? null : warehouseName.trim();
156
+    }
157
+
158
+    /**
159
+     * 创建时间
160
+     * @return create_time 创建时间
161
+     */
162
+    public Date getCreateTime() {
163
+        return createTime;
164
+    }
165
+
166
+    /**
167
+     * 创建时间
168
+     * @param createTime 创建时间
169
+     */
170
+    public void setCreateTime(Date createTime) {
171
+        this.createTime = createTime;
172
+    }
173
+
174
+    /**
175
+     * 承储库点
176
+     * @return org_id 承储库点
177
+     */
178
+    public Integer getOrgId() {
179
+        return orgId;
180
+    }
181
+
182
+    /**
183
+     * 承储库点
184
+     * @param orgId 承储库点
185
+     */
186
+    public void setOrgId(Integer orgId) {
187
+        this.orgId = orgId;
188
+    }
189
+
190
+    /**
191
+     * 粮油品种
192
+     * @return grain_kind 粮油品种
193
+     */
194
+    public Integer getGrainKind() {
195
+        return grainKind;
196
+    }
197
+
198
+    /**
199
+     * 粮油品种
200
+     * @param grainKind 粮油品种
201
+     */
202
+    public void setGrainKind(Integer grainKind) {
203
+        this.grainKind = grainKind;
204
+    }
205
+
206
+    /**
207
+     * 明细品种
208
+     * @return grain_detail_kind 明细品种
209
+     */
210
+    public Integer getGrainDetailKind() {
211
+        return grainDetailKind;
212
+    }
213
+
214
+    /**
215
+     * 明细品种
216
+     * @param grainDetailKind 明细品种
217
+     */
218
+    public void setGrainDetailKind(Integer grainDetailKind) {
219
+        this.grainDetailKind = grainDetailKind;
220
+    }
221
+
222
+    /**
223
+     * 粮油等级
224
+     * @return grain_grade 粮油等级
225
+     */
226
+    public Integer getGrainGrade() {
227
+        return grainGrade;
228
+    }
229
+
230
+    /**
231
+     * 粮油等级
232
+     * @param grainGrade 粮油等级
233
+     */
234
+    public void setGrainGrade(Integer grainGrade) {
235
+        this.grainGrade = grainGrade;
236
+    }
237
+
238
+    /**
239
+     * 粮油性质
240
+     * @return grain_attribute 粮油性质
241
+     */
242
+    public Integer getGrainAttribute() {
243
+        return grainAttribute;
244
+    }
245
+
246
+    /**
247
+     * 粮油性质
248
+     * @param grainAttribute 粮油性质
249
+     */
250
+    public void setGrainAttribute(Integer grainAttribute) {
251
+        this.grainAttribute = grainAttribute;
252
+    }
253
+
254
+    /**
255
+     * 生产年限
256
+     * @return grain_annual 生产年限
257
+     */
258
+    public Integer getGrainAnnual() {
259
+        return grainAnnual;
260
+    }
261
+
262
+    /**
263
+     * 生产年限
264
+     * @param grainAnnual 生产年限
265
+     */
266
+    public void setGrainAnnual(Integer grainAnnual) {
267
+        this.grainAnnual = grainAnnual;
268
+    }
269
+
270
+    /**
271
+     * 粮油产地
272
+     * @return grain_producing_area 粮油产地
273
+     */
274
+    public Integer getGrainProducingArea() {
275
+        return grainProducingArea;
276
+    }
277
+
278
+    /**
279
+     * 粮油产地
280
+     * @param grainProducingArea 粮油产地
281
+     */
282
+    public void setGrainProducingArea(Integer grainProducingArea) {
283
+        this.grainProducingArea = grainProducingArea;
284
+    }
285
+
286
+    /**
287
+     * 单价
288
+     * @return price 单价
289
+     */
290
+    public String getPrice() {
291
+        return price;
292
+    }
293
+
294
+    /**
295
+     * 单价
296
+     * @param price 单价
297
+     */
298
+    public void setPrice(String price) {
299
+        this.price = price == null ? null : price.trim();
300
+    }
301
+
302
+    /**
303
+     * 数量
304
+     * @return count 数量
305
+     */
306
+    public String getCount() {
307
+        return count;
308
+    }
309
+
310
+    /**
311
+     * 数量
312
+     * @param count 数量
313
+     */
314
+    public void setCount(String count) {
315
+        this.count = count == null ? null : count.trim();
316
+    }
317
+
318
+    /**
319
+     * 总价
320
+     * @return detail_total_price 总价
321
+     */
322
+    public String getDetailTotalPrice() {
323
+        return detailTotalPrice;
324
+    }
325
+
326
+    /**
327
+     * 总价
328
+     * @param detailTotalPrice 总价
329
+     */
330
+    public void setDetailTotalPrice(String detailTotalPrice) {
331
+        this.detailTotalPrice = detailTotalPrice == null ? null : detailTotalPrice.trim();
332
+    }
333
+
334
+    /**
335
+     * 入库时间
336
+     * @return input_time 入库时间
337
+     */
338
+    public Date getInputTime() {
339
+        return inputTime;
340
+    }
341
+
342
+    /**
343
+     * 入库时间
344
+     * @param inputTime 入库时间
345
+     */
346
+    public void setInputTime(Date inputTime) {
347
+        this.inputTime = inputTime;
348
+    }
349
+
350
+    /**
351
+     * 轮换计划(0:轮入,1:轮出)
352
+     * @return state 轮换计划(0:轮入,1:轮出)
353
+     */
354
+    public Integer getState() {
355
+        return state;
356
+    }
357
+
358
+    /**
359
+     * 轮换计划(0:轮入,1:轮出)
360
+     * @param state 轮换计划(0:轮入,1:轮出)
361
+     */
362
+    public void setState(Integer state) {
363
+        this.state = state;
364
+    }
347 365
 }

文件差異過大導致無法顯示
+ 1478 - 1418
src/main/java/com/chinaitop/depot/business/model/BusinessStoreWareDetailExample.java