فهرست منبع

优化数据信息。

MS-QJVSRANLTYEO\Administrator 4 سال پیش
والد
کامیت
86faf1476d

+ 40 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java

@@ -165,6 +165,46 @@ public class PayOrderController extends BaseController
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
+
+    /**
+     * 获取97号汽油数据
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:listQydata20')")
+    @GetMapping("/listQydata20")
+    public TableDataInfo listQydata20(PayOrder payOrder)
+    {
+        payOrder.setOilName("-20#");
+        List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
+        return getTable(orderList);
+    }
+    /**
+     * 获取97号汽油数据
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:listQydata0')")
+    @GetMapping("/listQydata0")
+    public TableDataInfo listQydata0(PayOrder payOrder)
+    {
+        payOrder.setOilName("0#");
+        List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
+        return getTable(orderList);
+    }
+    /**
+     * 获取97号汽油数据
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:listQydata10')")
+    @GetMapping("/listQydata10")
+    public TableDataInfo listQydata10(PayOrder payOrder)
+    {
+        payOrder.setOilName("-10#");
+        List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
+        return getTable(orderList);
+    }
     /**
      * 获取x轴数据
      * @param payOrder

+ 5 - 5
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java

@@ -136,7 +136,7 @@ public class StationClassStructureController extends BaseController
     public AjaxResult add(@RequestBody StationClassStructure stationClassStructure) throws ParseException {
         //获取当前班结油站
         // Long stationId=stationClassStructure.getStationId();
-        Long stationId= Long.valueOf("1");
+        Long stationId= Long.valueOf("5");
         String stationName=stationClassStructure.getStationName();
         String username = stationClassStructure.getClassStructureMan();
         //根据油站查询出油站是否班结过,班结过就需要查询上次班结的时间
@@ -476,7 +476,7 @@ public class StationClassStructureController extends BaseController
     @GetMapping("/getAgeClassStructure")
     public AjaxResult getAgeClassStructure(StationClassStructure stationClassStructure)
     {
-        stationClassStructure.setStationId(Long.valueOf("1"));
+        stationClassStructure.setStationId(Long.valueOf("5"));
         return AjaxResult.success(stationClassStructureService.selectStationClassStructureMax(stationClassStructure));
     }
     //初始化数据 根据员工汇总
@@ -485,7 +485,7 @@ public class StationClassStructureController extends BaseController
     public TableDataInfo selectPersonnelStructure(StationClassStructure stationClassStructure)
     {
         //根据油站查询出上次班结时间,
-        stationClassStructure.setStationId(Long.valueOf("1"));
+        stationClassStructure.setStationId(Long.valueOf("5"));
         StationClassStructure  structure=  stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
         List<StationClassStructure> list = new ArrayList<>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -532,7 +532,7 @@ public class StationClassStructureController extends BaseController
     public TableDataInfo selectOilStructure(StationClassStructure stationClassStructure)
     {
         //根据油站查询出上次班结时间,
-        stationClassStructure.setStationId(Long.valueOf("1"));
+        stationClassStructure.setStationId(Long.valueOf("5"));
         StationClassStructure  structure=  stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
         List<StationClassStructure> list = new ArrayList<>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -580,7 +580,7 @@ public class StationClassStructureController extends BaseController
     public TableDataInfo selectPersonnelPayStructure(StationClassStructure stationClassStructure)
     {
         //根据油站查询出上次班结时间,
-        stationClassStructure.setStationId(Long.valueOf("1"));
+        stationClassStructure.setStationId(Long.valueOf("5"));
         StationClassStructure  structure=  stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
         List<StationClassStructure> list = new ArrayList<>();
         //根据上次班结时间,和油站去订单表中查询数据,并按照人员汇总数据

+ 2 - 3
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -95,10 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
-            <if test="likeConsumer != null  and likeConsumer != ''"> and customer  like concat('%',#{likeConsumer}, '%')</if>
+            <if test="likeConsumer != null  and likeConsumer != ''"> and consumer  like concat('%',#{likeConsumer}, '%')</if>
             <if test="likeCarNo != null  and likeCarNo != ''"> and car_no  like concat('%',#{likeCarNo}, '%') </if>
             <if test="likeCustomerPhone != null  and likeCustomerPhone != ''"> and customer_phone  like concat('%',#{likeCustomerPhone}, '%') </if>
-            <if test="likeCustomerPhone != null  and likeCustomerPhone != ''"> and customer_phone  like concat('%',#{likeCustomerPhone}, '%') </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>
@@ -250,7 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
             </if>
         </where>
-        GROUP BY a.oil_personnel,a.oil_gun
+        GROUP BY a.oil_personnel
     </select>
     <!--初始化数据班结数据,根据油品汇总 -->
     <select id="selectOilStructure" parameterType="Long" resultMap="PayOrderResult">

+ 5 - 6
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -106,24 +106,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="listPersonnelStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        SELECT a.oil_personnel,GROUP_CONCAT(DISTINCT b.gun_no) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
-        from station_class_structure a JOIN station_personnel b on a.oil_personnel =b.personnel_name
-        and a.station_id = b.station_id
+        SELECT a.oil_personnel,GROUP_CONCAT(DISTINCT a.oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
+        from station_class_structure a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
         </where>
-        GROUP BY a.oil_personnel,b.gun_no
+        GROUP BY a.oil_personnel
     </select>
 
     <select id="listOilStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-       	SELECT  a.oil_name,GROUP_CONCAT(DISTINCT oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
+       	SELECT a.station_id, a.oil_name,GROUP_CONCAT(DISTINCT oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(a.receivable_amt),2) as receivable_amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no,a.class_start_date,a.class_structure_date,a.class_structure_man
         from station_class_structure a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
         </where>
-        GROUP BY a.oil_name
+        GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man
     </select>
     <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_structure_date, class_structure_man, oils

+ 16 - 2
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationDeviceManageMapper.xml

@@ -89,10 +89,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationDeviceManageByIds" parameterType="String">
-        delete from station_device_manage where device_id in 
+        delete from station_device_manage where device_id in
         <foreach item="deviceId" collection="array" open="(" separator="," close=")">
             #{deviceId}
         </foreach>
     </delete>
-    
+
+    <!--根据油站Id获取打印机编号 -->
+    <select id="getPrinterSnByStationId" parameterType="map" resultType="map">
+        select * from station_device_manage where device_id =(
+            SELECT max(device_id) from  station_device_manage
+            <where>
+                <if test="stationId != null and stationId !=''">
+                    AND station_id = #{stationId}
+                </if>
+                <if test="deviceType != null and deviceType !=''">
+                    AND device_type = #{deviceType}
+                </if>
+            </where>
+        );
+    </select>
 </mapper>