YL2767 2 个月前
父节点
当前提交
39a0da15c6

+ 10
- 0
src/main/java/com/th/demo/model/ware/Distribution.java 查看文件

@@ -42,6 +42,8 @@ public class Distribution {
42 42
 
43 43
     private String tallyPeople;
44 44
 
45
+    private String transportName;
46
+
45 47
     public String getTallyPeople() {
46 48
         return tallyPeople;
47 49
     }
@@ -203,4 +205,12 @@ public class Distribution {
203 205
     public void setListDetail(List<DistributionDetail> listDetail) {
204 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 查看文件

@@ -88,6 +88,7 @@ public class OutRecord {
88 88
     private Double unitPrice;
89 89
 
90 90
     private String contractNo;
91
+    private String transportName;
91 92
 
92 93
     public Double getUnitPrice() {
93 94
         return unitPrice;
@@ -449,4 +450,12 @@ public class OutRecord {
449 450
     public void setContractNo(String contractNo) {
450 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 查看文件

@@ -34,13 +34,17 @@ public class TransportServiceImpl implements TransportService {
34 34
 
35 35
     @Override
36 36
     public String query(int page, int rows, String query, String userId, String belongId) {
37
-        PageHelper.startPage(page, rows);
38 37
         List<Transport> list = new ArrayList<Transport>();
39 38
 
40 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 48
         return result;
45 49
     }
46 50
 

+ 2
- 0
src/main/resource/mapper/ware/DistributionMapper.xml 查看文件

@@ -18,6 +18,7 @@
18 18
     <result column="cancel_time" property="cancelTime" jdbcType="TIMESTAMP" />
19 19
     <result column="cancel_flag" property="cancelFlag" jdbcType="VARCHAR" />
20 20
     <result column="belong_id" property="belongId" jdbcType="VARCHAR" />
21
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
21 22
 
22 23
     <result column="delivery_company" property="deliveryCompany" jdbcType="VARCHAR" />
23 24
     <result column="distribution_no" property="distributionNo" jdbcType="VARCHAR" />
@@ -234,6 +235,7 @@
234 235
       cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
235 236
       belong_id = #{belongId,jdbcType=VARCHAR},
236 237
       delivery_company = #{deliveryCompany,jdbcType=VARCHAR},
238
+      transport_name = #{transportName,jdbcType=VARCHAR},
237 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 240
 where substring(t.distribution_no,3,8) = DATE_FORMAT(NOW(), '%Y%m%d')) temp))
239 241
       ,tally_people    = #{tallyPeople,jdbcType=VARCHAR}

+ 4
- 2
src/main/resource/mapper/ware/OutRecordMapper.xml 查看文件

@@ -40,6 +40,7 @@
40 40
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
41 41
     <result column="verify_account_id" property="verifyAccountId" jdbcType="DOUBLE" />
42 42
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
43
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
43 44
 
44 45
     <result column="in_ware_days" property="inWareDays" jdbcType="INTEGER" />
45 46
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
@@ -92,6 +93,7 @@
92 93
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
93 94
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
94 95
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
96
+    <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
95 97
   </resultMap>
96 98
   <resultMap id="TotalResultMap" type="com.th.demo.model.ware.TotalRecord">
97 99
     <result column="total_amount" property="totalAmount" jdbcType="DOUBLE" />
@@ -398,7 +400,7 @@
398 400
 
399 401
   <select id="select" resultMap="BaseResultMap" >
400 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 404
        ,t.invoice_price
403 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 406
      where t.ware_name  like concat('%',#{param1,jdbcType=VARCHAR},'%')
@@ -458,7 +460,7 @@
458 460
   </select>
459 461
   <select id="selectExpt" resultMap="CleanResultMap" >
460 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 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 465
     ,t.invoice_price,t.distribution_id
464 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 查看文件

@@ -427,7 +427,8 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
427 427
 
428 428
 
429 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 432
     where t.ware_id = a.id
432 433
     and t.stack_id = b.id
433 434
     and t.material_id  = c.id

正在加载...
取消
保存