YL2767 2 months ago
parent
commit
39a0da15c6

+ 10
- 0
src/main/java/com/th/demo/model/ware/Distribution.java View File

42
 
42
 
43
     private String tallyPeople;
43
     private String tallyPeople;
44
 
44
 
45
+    private String transportName;
46
+
45
     public String getTallyPeople() {
47
     public String getTallyPeople() {
46
         return tallyPeople;
48
         return tallyPeople;
47
     }
49
     }
203
     public void setListDetail(List<DistributionDetail> listDetail) {
205
     public void setListDetail(List<DistributionDetail> listDetail) {
204
         this.listDetail = listDetail;
206
         this.listDetail = listDetail;
205
     }
207
     }
208
+
209
+    public String getTransportName() {
210
+        return transportName;
211
+    }
212
+
213
+    public void setTransportName(String transportName) {
214
+        this.transportName = transportName;
215
+    }
206
 }
216
 }

+ 9
- 0
src/main/java/com/th/demo/model/ware/OutRecord.java View File

88
     private Double unitPrice;
88
     private Double unitPrice;
89
 
89
 
90
     private String contractNo;
90
     private String contractNo;
91
+    private String transportName;
91
 
92
 
92
     public Double getUnitPrice() {
93
     public Double getUnitPrice() {
93
         return unitPrice;
94
         return unitPrice;
449
     public void setContractNo(String contractNo) {
450
     public void setContractNo(String contractNo) {
450
         this.contractNo = contractNo;
451
         this.contractNo = contractNo;
451
     }
452
     }
453
+
454
+    public String getTransportName() {
455
+        return transportName;
456
+    }
457
+
458
+    public void setTransportName(String transportName) {
459
+        this.transportName = transportName;
460
+    }
452
 }
461
 }

+ 7
- 3
src/main/java/com/th/demo/service/impl/maint/TransportServiceImpl.java View File

34
 
34
 
35
     @Override
35
     @Override
36
     public String query(int page, int rows, String query, String userId, String belongId) {
36
     public String query(int page, int rows, String query, String userId, String belongId) {
37
-        PageHelper.startPage(page, rows);
38
         List<Transport> list = new ArrayList<Transport>();
37
         List<Transport> list = new ArrayList<Transport>();
39
 
38
 
40
         list = transportMapper.selectByName(query, belongId);
39
         list = transportMapper.selectByName(query, belongId);
40
+        if(page ==-1 && rows==-1){
41
+            result = JSONTools.toString(list);
42
+        }else {
43
+            PageHelper.startPage(page, rows);
44
+            PageInfo<Transport> pageInfo = new PageInfo<>(list);
45
+            result = JSONTools.toString(pageInfo);
46
+        }
41
 
47
 
42
-        PageInfo<Transport> pageInfo = new PageInfo<>(list);
43
-        result = JSONTools.toString(pageInfo);
44
         return result;
48
         return result;
45
     }
49
     }
46
 
50
 

+ 2
- 0
src/main/resource/mapper/ware/DistributionMapper.xml View File

18
     <result column="cancel_time" property="cancelTime" jdbcType="TIMESTAMP" />
18
     <result column="cancel_time" property="cancelTime" jdbcType="TIMESTAMP" />
19
     <result column="cancel_flag" property="cancelFlag" jdbcType="VARCHAR" />
19
     <result column="cancel_flag" property="cancelFlag" jdbcType="VARCHAR" />
20
     <result column="belong_id" property="belongId" jdbcType="VARCHAR" />
20
     <result column="belong_id" property="belongId" jdbcType="VARCHAR" />
21
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
21
 
22
 
22
     <result column="delivery_company" property="deliveryCompany" jdbcType="VARCHAR" />
23
     <result column="delivery_company" property="deliveryCompany" jdbcType="VARCHAR" />
23
     <result column="distribution_no" property="distributionNo" jdbcType="VARCHAR" />
24
     <result column="distribution_no" property="distributionNo" jdbcType="VARCHAR" />
234
       cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
235
       cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
235
       belong_id = #{belongId,jdbcType=VARCHAR},
236
       belong_id = #{belongId,jdbcType=VARCHAR},
236
       delivery_company = #{deliveryCompany,jdbcType=VARCHAR},
237
       delivery_company = #{deliveryCompany,jdbcType=VARCHAR},
238
+      transport_name = #{transportName,jdbcType=VARCHAR},
237
       distribution_no =ifnull(distribution_no,(select dis_no from (select concat('BS',DATE_FORMAT(NOW(), '%Y%m%d'),IFNULL(lpad(max(substring(t.distribution_no,11,3)+1),3,'0'),'001')) as dis_no from t_ware_distribution t
239
       distribution_no =ifnull(distribution_no,(select dis_no from (select concat('BS',DATE_FORMAT(NOW(), '%Y%m%d'),IFNULL(lpad(max(substring(t.distribution_no,11,3)+1),3,'0'),'001')) as dis_no from t_ware_distribution t
238
 where substring(t.distribution_no,3,8) = DATE_FORMAT(NOW(), '%Y%m%d')) temp))
240
 where substring(t.distribution_no,3,8) = DATE_FORMAT(NOW(), '%Y%m%d')) temp))
239
       ,tally_people    = #{tallyPeople,jdbcType=VARCHAR}
241
       ,tally_people    = #{tallyPeople,jdbcType=VARCHAR}

+ 4
- 2
src/main/resource/mapper/ware/OutRecordMapper.xml View File

40
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
40
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
41
     <result column="verify_account_id" property="verifyAccountId" jdbcType="DOUBLE" />
41
     <result column="verify_account_id" property="verifyAccountId" jdbcType="DOUBLE" />
42
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
42
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
43
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
43
 
44
 
44
     <result column="in_ware_days" property="inWareDays" jdbcType="INTEGER" />
45
     <result column="in_ware_days" property="inWareDays" jdbcType="INTEGER" />
45
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
46
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
92
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
93
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
93
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
94
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
94
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
95
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
96
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
95
   </resultMap>
97
   </resultMap>
96
   <resultMap id="TotalResultMap" type="com.th.demo.model.ware.TotalRecord">
98
   <resultMap id="TotalResultMap" type="com.th.demo.model.ware.TotalRecord">
97
     <result column="total_amount" property="totalAmount" jdbcType="DOUBLE" />
99
     <result column="total_amount" property="totalAmount" jdbcType="DOUBLE" />
398
 
400
 
399
   <select id="select" resultMap="BaseResultMap" >
401
   <select id="select" resultMap="BaseResultMap" >
400
     select
402
     select
401
-       e.name as fk_compony_name,p.tally_people as tally_people,t.*,c.ord_no,DATE_FORMAT(d.add_time, '%Y-%m-%d %H:%i:%s') as in_time,(select tt.user_desc as in_user from sys_user tt where tt.id = d.add_id) as in_user,d.car_no as in_car_no
403
+       e.name as fk_compony_name,p.tally_people as tally_people,p.transport_name as transport_name,t.*,c.ord_no,DATE_FORMAT(d.add_time, '%Y-%m-%d %H:%i:%s') as in_time,(select tt.user_desc as in_user from sys_user tt where tt.id = d.add_id) as in_user,d.car_no as in_car_no
402
        ,t.invoice_price
404
        ,t.invoice_price
403
     from t_ware_out_record t ,t_ware_distribution p,(select t.plate_no,max(t.ord_no) ord_no from t_ware_store t group by t.plate_no) c,t_ware_in_record d LEFT JOIN t_maint_customer e on d.fk_compony_name = e.id
405
     from t_ware_out_record t ,t_ware_distribution p,(select t.plate_no,max(t.ord_no) ord_no from t_ware_store t group by t.plate_no) c,t_ware_in_record d LEFT JOIN t_maint_customer e on d.fk_compony_name = e.id
404
      where t.ware_name  like concat('%',#{param1,jdbcType=VARCHAR},'%')
406
      where t.ware_name  like concat('%',#{param1,jdbcType=VARCHAR},'%')
458
   </select>
460
   </select>
459
   <select id="selectExpt" resultMap="CleanResultMap" >
461
   <select id="selectExpt" resultMap="CleanResultMap" >
460
     select
462
     select
461
-    e.name as fk_compony_name,p.tally_people as tally_people,p.truck_no as out_car_no,f.user_desc as add_id,t.*,c.ord_no,DATE_FORMAT(d.add_time, '%Y-%m-%d %H:%i:%s') as in_time
463
+    e.name as fk_compony_name,p.tally_people as tally_people,p.transport_name as transport_name,p.truck_no as out_car_no,f.user_desc as add_id,t.*,c.ord_no,DATE_FORMAT(d.add_time, '%Y-%m-%d %H:%i:%s') as in_time
462
     ,(select tt.user_desc as in_user from sys_user tt where tt.id = d.add_id) as in_user,d.car_no as in_car_no
464
     ,(select tt.user_desc as in_user from sys_user tt where tt.id = d.add_id) as in_user,d.car_no as in_car_no
463
     ,t.invoice_price,t.distribution_id
465
     ,t.invoice_price,t.distribution_id
464
     from t_ware_out_record t LEFT JOIN sys_user f on t.add_id = f.id
466
     from t_ware_out_record t LEFT JOIN sys_user f on t.add_id = f.id

+ 2
- 1
src/main/resource/mapper/ware/StoreMapper.xml View File

427
 
427
 
428
 
428
 
429
   <select id="selectStore" resultMap="BaseResultMap" >
429
   <select id="selectStore" resultMap="BaseResultMap" >
430
-    select e.name as fk_compony_id,t.* from t_ware_store t, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d,t_maint_customer e
430
+    select e.name as fk_compony_id,t.*
431
+    from t_ware_store t, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d,t_maint_customer e
431
     where t.ware_id = a.id
432
     where t.ware_id = a.id
432
     and t.stack_id = b.id
433
     and t.stack_id = b.id
433
     and t.material_id  = c.id
434
     and t.material_id  = c.id

Loading…
Cancel
Save