Bläddra i källkod

出库记录库龄

LiuCheng 1 vecka sedan
förälder
incheckning
01bb98f5c6

+ 10
- 0
src/main/java/com/th/demo/model/ware/OutRecord.java Visa fil

@@ -90,6 +90,8 @@ public class OutRecord {
90 90
     private String contractNo;
91 91
     private String transportName;
92 92
 
93
+    private String inwareDay;
94
+
93 95
     public Double getUnitPrice() {
94 96
         return unitPrice;
95 97
     }
@@ -458,4 +460,12 @@ public class OutRecord {
458 460
     public void setTransportName(String transportName) {
459 461
         this.transportName = transportName;
460 462
     }
463
+
464
+    public String getInwareDay() {
465
+        return inwareDay;
466
+    }
467
+
468
+    public void setInwareDay(String inwareDay) {
469
+        this.inwareDay = inwareDay;
470
+    }
461 471
 }

+ 2
- 1
src/main/resource/mapper/ware/OutRecordMapper.xml Visa fil

@@ -94,6 +94,7 @@
94 94
     <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
95 95
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
96 96
     <result column="transport_name" property="transportName" jdbcType="VARCHAR" />
97
+    <result column="inware_day" property="inwareDay" jdbcType="VARCHAR" />
97 98
   </resultMap>
98 99
   <resultMap id="TotalResultMap" type="com.th.demo.model.ware.TotalRecord">
99 100
     <result column="total_amount" property="totalAmount" jdbcType="DOUBLE" />
@@ -462,7 +463,7 @@
462 463
     select
463 464
     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
464 465
     ,(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
465
-    ,t.invoice_price,t.distribution_id
466
+    ,t.invoice_price,t.distribution_id,TIMESTAMPDIFF(DAY, DATE_FORMAT(d.add_time,'%Y-%m-%d %H:%i:%s'), DATE_FORMAT(t.add_time ,'%Y-%m-%d %H:%i:%s')) as inware_day
466 467
     from t_ware_out_record t LEFT JOIN sys_user f on t.add_id = f.id
467 468
     ,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
468 469
     LEFT JOIN t_maint_customer e on d.fk_compony_name = e.id

Loading…
Avbryt
Spara