2 Commits

Autor SHA1 Nachricht Datum
  YL2767 c9cd14858a Merge remote-tracking branch 'master/master' vor 3 Tagen
  YL2767 8032bae072 增加在库时间 vor 3 Tagen

+ 9
- 0
src/main/java/com/th/demo/model/ware/Store.java Datei anzeigen

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 Datei anzeigen

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
497
 
498
 
498
 
499
 
499
   <select id="selectForCustomer" resultMap="BaseResultMap" >
500
   <select id="selectForCustomer" resultMap="BaseResultMap" >
500
-    select e.name as fk_compony_id,t.*
501
+    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
501
     from t_ware_store t left join t_maint_customer e
502
     from t_ware_store t left join t_maint_customer e
502
 		on t.fk_compony_id = e.id
503
 		on t.fk_compony_id = e.id
503
 		, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d
504
 		, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d

Laden…
Abbrechen
Speichern