Browse Source

增加在库时间

YL2767 3 days ago
parent
commit
8032bae072

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

75
 
75
 
76
     private Double invoicePrice;
76
     private Double invoicePrice;
77
     private String contractNo;
77
     private String contractNo;
78
+    private String inwareDay;
79
+
80
+    public String getInwareDay() {
81
+        return inwareDay;
82
+    }
83
+
84
+    public void setInwareDay(String inwareDay) {
85
+        this.inwareDay = inwareDay;
86
+    }
78
 
87
 
79
     public String getContractNo() {
88
     public String getContractNo() {
80
         return contractNo;
89
         return contractNo;

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

33
 
33
 
34
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
34
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
35
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
35
     <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
36
+    <result column="inware_day" property="inwareDay" jdbcType="VARCHAR" />
36
 
37
 
37
 
38
 
38
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
39
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
427
 
428
 
428
 
429
 
429
   <select id="selectStore" resultMap="BaseResultMap" >
430
   <select id="selectStore" resultMap="BaseResultMap" >
430
-    select e.name as fk_compony_id,t.*
431
+    select e.name as fk_compony_id,DATEDIFF(now(), t.add_time) + IF(TIME(now()) > TIME(t.add_time), 1, 0) as inware_day,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
432
     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
432
     where t.ware_id = a.id
433
     where t.ware_id = a.id
433
     and t.stack_id = b.id
434
     and t.stack_id = b.id
496
 
497
 
497
 
498
 
498
   <select id="selectForCustomer" resultMap="BaseResultMap" >
499
   <select id="selectForCustomer" resultMap="BaseResultMap" >
499
-    select e.name as fk_compony_id,t.*
500
+    select e.name as fk_compony_id,t.*,DATEDIFF(now(), t.add_time) + IF(TIME(now()) > TIME(t.add_time), 1, 0) as inware_day
500
     from t_ware_store t left join t_maint_customer e
501
     from t_ware_store t left join t_maint_customer e
501
 		on t.fk_compony_id = e.id
502
 		on t.fk_compony_id = e.id
502
 		, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d
503
 		, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d

Loading…
Cancel
Save