소스 검색

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java
#	Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml
XF--LRQYEJOKYDS\Administrator 4 년 전
부모
커밋
5430fc138e

+ 40 - 40
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java

@@ -9,7 +9,7 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 订单支付对象 pay_order
- * 
+ *
  * @author yijia
  * @date 2020-12-31
  */
@@ -136,15 +136,15 @@ public class PayOrder extends BaseEntity
     @Excel(name = "支付方式:02公众号,03小程序")
     private String payWay;
 
-    /** 加油员 */
-    @Excel(name = "加油员")
-    private String oilPersonnel;
-
     /** 支付时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date payDate;
 
+    /** 加油员 */
+    @Excel(name = "加油员")
+    private String oilPersonnel;
+
     /** 创建时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@@ -154,102 +154,102 @@ public class PayOrder extends BaseEntity
     @Excel(name = "订单类型", readConverterExp = "1=.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分")
     private String orderType;
 
-    public void setOrderId(Long orderId) 
+    public void setOrderId(Long orderId)
     {
         this.orderId = orderId;
     }
 
-    public Long getOrderId() 
+    public Long getOrderId()
     {
         return orderId;
     }
-    public void setOrderNo(String orderNo) 
+    public void setOrderNo(String orderNo)
     {
         this.orderNo = orderNo;
     }
 
-    public String getOrderNo() 
+    public String getOrderNo()
     {
         return orderNo;
     }
-    public void setStationId(Long stationId) 
+    public void setStationId(Long stationId)
     {
         this.stationId = stationId;
     }
 
-    public Long getStationId() 
+    public Long getStationId()
     {
         return stationId;
     }
-    public void setStationName(String stationName) 
+    public void setStationName(String stationName)
     {
         this.stationName = stationName;
     }
 
-    public String getStationName() 
+    public String getStationName()
     {
         return stationName;
     }
-    public void setStatus(String status) 
+    public void setStatus(String status)
     {
         this.status = status;
     }
 
-    public String getStatus() 
+    public String getStatus()
     {
         return status;
     }
-    public void setConsumerId(Long consumerId) 
+    public void setConsumerId(Long consumerId)
     {
         this.consumerId = consumerId;
     }
 
-    public Long getConsumerId() 
+    public Long getConsumerId()
     {
         return consumerId;
     }
-    public void setConsumer(String consumer) 
+    public void setConsumer(String consumer)
     {
         this.consumer = consumer;
     }
 
-    public String getConsumer() 
+    public String getConsumer()
     {
         return consumer;
     }
-    public void setOilGun(String oilGun) 
+    public void setOilGun(String oilGun)
     {
         this.oilGun = oilGun;
     }
 
-    public String getOilGun() 
+    public String getOilGun()
     {
         return oilGun;
     }
-    public void setOilName(String oilName) 
+    public void setOilName(String oilName)
     {
         this.oilName = oilName;
     }
 
-    public String getOilName() 
+    public String getOilName()
     {
         return oilName;
     }
-    public void setOilPirce(String oilPirce) 
+    public void setOilPirce(String oilPirce)
     {
         this.oilPirce = oilPirce;
     }
 
-    public String getOilPirce() 
+    public String getOilPirce()
     {
         return oilPirce;
     }
-    public void setOilType(String oilType) 
+    public void setOilType(String oilType)
     {
         this.oilType = oilType;
     }
 
-    public String getOilType() 
+    public String getOilType()
     {
         return oilType;
     }
@@ -388,61 +388,61 @@ public class PayOrder extends BaseEntity
         this.printCount = printCount;
     }
 
-    public Long getPrintCount() 
+    public Long getPrintCount()
     {
         return printCount;
     }
-    public void setPayType(String payType) 
+    public void setPayType(String payType)
     {
         this.payType = payType;
     }
 
-    public String getPayType() 
+    public String getPayType()
     {
         return payType;
     }
-    public void setPayWay(String payWay) 
+    public void setPayWay(String payWay)
     {
         this.payWay = payWay;
     }
 
-    public String getPayWay() 
+    public String getPayWay()
     {
         return payWay;
     }
-    public void setOilPersonnel(String oilPersonnel) 
+    public void setOilPersonnel(String oilPersonnel)
     {
         this.oilPersonnel = oilPersonnel;
     }
 
-    public String getOilPersonnel() 
+    public String getOilPersonnel()
     {
         return oilPersonnel;
     }
-    public void setPayDate(Date payDate) 
+    public void setPayDate(Date payDate)
     {
         this.payDate = payDate;
     }
 
-    public Date getPayDate() 
+    public Date getPayDate()
     {
         return payDate;
     }
-    public void setCreatedDate(Date createdDate) 
+    public void setCreatedDate(Date createdDate)
     {
         this.createdDate = createdDate;
     }
 
-    public Date getCreatedDate() 
+    public Date getCreatedDate()
     {
         return createdDate;
     }
-    public void setOrderType(String orderType) 
+    public void setOrderType(String orderType)
     {
         this.orderType = orderType;
     }
 
-    public String getOrderType() 
+    public String getOrderType()
     {
         return orderType;
     }

+ 23 - 7
Yijia-SaaS/yijia-station/target/classes/mapper/station/PayOrderMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.PayOrderMapper">
 
     <resultMap type="PayOrder" id="PayOrderResult">
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="orderNo"    column="order_no"    />
         <result property="oilGun"    column="oil_gun"    />
         <result property="oilName"    column="oil_name"    />
+        <result property="oilPirce"    column="oil_pirce"    />
         <result property="consumerId"    column="consumer_id"    />
         <result property="consumer"    column="consumer"    />
         <result property="amt"    column="amt"    />
@@ -21,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="oilPersonnel"    column="oil_personnel"    />
         <result property="createdDate"    column="created_date"    />
         <result property="orderType"    column="order_type"    />
+        <result property="stationName"    column="station_name"    />
     </resultMap>
 
     <sql id="selectPayOrderVo">
-        select order_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type from pay_order
+        select order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name from pay_order
     </sql>
 
     <select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
@@ -41,9 +43,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderLiters != null  and orderLiters != ''"> and order_liters = #{orderLiters}</if>
             <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
             <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
-            <if test="payDate != null "> and pay_date = #{payDate}</if>
+
+            <if test="beginTime != null and beginTime != ''">
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="stationName != null  and stationName != ''">
+                AND station_name LIKE CONCAT('%', #{stationName}, '%')
+            </if>
             <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
-            <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
         ORDER BY created_date DESC
@@ -60,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null">order_no,</if>
             <if test="oilGun != null">oil_gun,</if>
             <if test="oilName != null">oil_name,</if>
+            <if test="oilPirce != null">oil_pirce,</if>
             <if test="consumerId != null">consumer_id,</if>
             <if test="consumer != null">consumer,</if>
             <if test="amt != null">amt,</if>
@@ -72,11 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilPersonnel != null">oil_personnel,</if>
             <if test="createdDate != null">created_date,</if>
             <if test="orderType != null">order_type,</if>
-         </trim>
+            <if test="stationName != null">station_name,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="oilGun != null">#{oilGun},</if>
             <if test="oilName != null">#{oilName},</if>
+            <if test="oilPirce != null">#{oilPirce},</if>
             <if test="consumerId != null">#{consumerId},</if>
             <if test="consumer != null">#{consumer},</if>
             <if test="amt != null">#{amt},</if>
@@ -89,7 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilPersonnel != null">#{oilPersonnel},</if>
             <if test="createdDate != null">#{createdDate},</if>
             <if test="orderType != null">#{orderType},</if>
-         </trim>
+            <if test="stationName != null">#{stationName},</if>
+        </trim>
     </insert>
 
     <update id="updatePayOrder" parameterType="PayOrder">
@@ -98,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="oilGun != null">oil_gun = #{oilGun},</if>
             <if test="oilName != null">oil_name = #{oilName},</if>
+            <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>
             <if test="consumerId != null">consumer_id = #{consumerId},</if>
             <if test="consumer != null">consumer = #{consumer},</if>
             <if test="amt != null">amt = #{amt},</if>
@@ -110,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilPersonnel != null">oil_personnel = #{oilPersonnel},</if>
             <if test="createdDate != null">created_date = #{createdDate},</if>
             <if test="orderType != null">order_type = #{orderType},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
         </trim>
         where order_id = #{orderId}
     </update>

+ 25 - 16
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -117,14 +117,22 @@
           <el-option label="请选择字典生成" value="" />
         </el-select>
       </el-form-item>
-
+      <el-form-item label="油站名称" prop="stationName">
+        <el-input
+          v-model="queryParams.stationName"
+          placeholder="请输入油站名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="创建时间" prop="createdDate">
         <el-date-picker style="width: 350px"
-          v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
-          type="datetimerange"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期">
+                        v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
+                        type="datetimerange"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -179,10 +187,12 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column v-if="false" label="订单id" align="center" prop="orderId" />
       <el-table-column label="订单号"  width="200" align="center" prop="orderNo" />
+      <el-table-column label="消费者" width="120" align="center" prop="consumer" />
       <el-table-column label="加油枪号" align="center" prop="oilGun" />
       <el-table-column label="油品名称" align="center" prop="oilName" />
+      <el-table-column label="油品价格" align="center" prop="oilPirce" />
+      <el-table-column label="油站名称" width="120" align="center" prop="stationName" />
       <el-table-column v-if="false" label="用户id(消费者)" align="center" prop="consumerId" />
-      <el-table-column label="消费者" width="120" align="center" prop="consumer" />
       <el-table-column label="金额" align="center" prop="amt" />
       <el-table-column label="加油升数" align="center" prop="orderLiters" />
       <el-table-column v-if="false" label="油站id" align="center" prop="stationId" />
@@ -190,19 +200,19 @@
       <el-table-column label="支付类型" align="center" prop="payType" :formatter="payTypeFotmat"/>
       <el-table-column label="支付方式" align="center" prop="payWay" :formatter="payWayFotmat"/>
       <el-table-column label="订单类型" align="center" prop="orderType" />
-      <el-table-column label="加油员" align="center" prop="oilPersonnel" />
+      <el-table-column label="加油员" width="120" align="center" prop="oilPersonnel" />
       <el-table-column label="创建时间" align="center" prop="createdDate" width="150">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createdDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="支付时间" align="center" prop="payDate" width="150">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
-        </template>
-      </el-table-column>
+      <!--      <el-table-column label="支付时间" align="center" prop="payDate" width="150">-->
+      <!--        <template slot-scope="scope">-->
+      <!--          <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
       <el-table-column label="订单类型" align="center" prop="orderType" v-if="false" />
-      <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!--          <el-button-->
           <!--            size="mini"-->
@@ -372,8 +382,7 @@
           orderLiters: null,
           payType: null,
           payWay: null,
-          // pay:[],
-          // cre:[],
+          stationName: null,
           payDate: null,
           payMaxDate: null,
           payMinDate: null,