Parcourir la source

增加LNG司机价格,直降-折扣

zangguocen il y a 3 ans
Parent
commit
8bc9b1052f

+ 25 - 4
yijia-station/src/main/java/com/yijia/station/controller/StationInfoController.java

@@ -1,11 +1,13 @@
 package com.yijia.station.controller;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
 import com.yijia.common.utils.SecurityUtils;
+import com.yijia.station.domain.DeptInfoDemo;
 import com.yijia.system.service.ISysDeptService;
 import com.yijia.system.service.ISysUserService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,7 +31,7 @@ import com.yijia.common.core.page.TableDataInfo;
 
 /**
  * 油站信息Controller
- * 
+ *
  * @author yijia
  * @date 2020-12-08
  */
@@ -38,8 +40,6 @@ import com.yijia.common.core.page.TableDataInfo;
 public class StationInfoController extends BaseController
 {
     @Autowired
-    private ISysUserService sysUserService;
-    @Autowired
     private ISysDeptService sysDeptService;
     /**
      * 查询油站信息列表
@@ -73,7 +73,16 @@ public class StationInfoController extends BaseController
             sysDept.setDeptId(null);
         }
         sysDept.setJiBie(Integer.valueOf("2"));
-        List<SysDept> deptList = sysDeptService.selectDeptList(sysDept);
+        List<SysDept> depts = sysDeptService.selectDeptList(sysDept);
+        List<DeptInfoDemo> deptList=new ArrayList<>();
+        if(depts!=null && depts.size()>0){
+            for(SysDept deptInfo :depts){
+                DeptInfoDemo deptDemo =new DeptInfoDemo();
+                deptDemo.setDeptId(deptInfo.getDeptId());
+                deptDemo.setDeptName(deptInfo.getDeptName());
+                deptList.add(deptDemo);
+            }
+        }
         return getTable(deptList);
     }
 
@@ -96,4 +105,16 @@ public class StationInfoController extends BaseController
         return toAjax(sysDeptService.updateDept(sysDept));
     }
 
+
+    /**
+     * 查询异业劵的所有站点
+     * 默认异业集团id是3
+     */
+    @GetMapping("/selectStationDifferent")
+    public TableDataInfo selectStationDifferent(SysDept dept){
+        dept.setParentId(Long.valueOf("3"));
+        startPage();
+        List<SysDept> deptList = sysDeptService.selectDeptList(dept);
+        return getDataTable(deptList);
+    }
 }

+ 1 - 0
yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceController.java

@@ -72,6 +72,7 @@ public class StationSettlementPriceController extends BaseController
                         settlementPrice.setSettlementType("1");
                         settlementPrice.setSettlementPrice("0");
                         settlementPrice.setDriverPrice("100");
+                        settlementPrice.setDriverPriceType("2");
                         settlementPrice.setStationId(settlementPrice.getDeptId());
                         stationSettlementPriceService.insertStationSettlementPrice(settlementPrice);
                     }

+ 11 - 0
yijia-station/src/main/java/com/yijia/station/domain/StationSettlementPrice.java

@@ -33,11 +33,21 @@ public class StationSettlementPrice extends BaseEntity
     /** 司机价 */
     @Excel(name = "司机价")
     private String driverPrice;
+    /**司机价类型**/
+    private String driverPriceType;
 
     private String stationName;
     private String balance;
     private Long deptId;
 
+    public String getDriverPriceType() {
+        return driverPriceType;
+    }
+
+    public void setDriverPriceType(String driverPriceType) {
+        this.driverPriceType = driverPriceType;
+    }
+
     public String getBalance() {
         return balance;
     }
@@ -115,6 +125,7 @@ public class StationSettlementPrice extends BaseEntity
             .append("settlementType", getSettlementType())
             .append("settlementPrice", getSettlementPrice())
             .append("driverPrice", getDriverPrice())
+            .append("driverPriceType", getDriverPriceType())
             .append("createTime", getCreateTime())
             .append("createBy", getCreateBy())
             .append("updateTime", getUpdateTime())

+ 6 - 1
yijia-station/src/main/resources/mapper/station/StationSettlementPriceMapper.xml

@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="settlementType"    column="settlement_type"    />
         <result property="settlementPrice"    column="settlement_price"    />
         <result property="driverPrice"    column="driver_price"    />
+        <result property="driverPriceType"    column="driver_price_type"    />
         <result property="createTime"    column="create_time"    />
         <result property="createBy"    column="create_by"    />
         <result property="updateTime"    column="update_time"    />
@@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectStationSettlementPriceVo">
         select id, station_id, settlement_type, settlement_price, driver_price,p.create_by,p.create_time,
-        p.update_by,p.update_time,d.dept_name as station_name,balance,dept_id
+        p.update_by,p.update_time,d.dept_name as station_name,balance,dept_id,driver_price_type
         from sys_dept d  left join station_settlement_price p on d.dept_id = p.station_id    </sql>
 
     <select id="selectStationSettlementPriceList" parameterType="StationSettlementPrice" resultMap="StationSettlementPriceResult">
@@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="settlementType != null  and settlementType != ''"> and settlement_type = #{settlementType}</if>
             <if test="settlementPrice != null  and settlementPrice != ''"> and settlement_price = #{settlementPrice}</if>
             <if test="driverPrice != null  and driverPrice != ''"> and driver_price = #{driverPrice}</if>
+            <if test="driverPriceType != null  and driverPriceType != ''"> and driver_price_type = #{driverPriceType}</if>
             <if test="stationIdList != null ">
                 and d.dept_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -55,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="settlementType != null">settlement_type,</if>
             <if test="settlementPrice != null">settlement_price,</if>
             <if test="driverPrice != null">driver_price,</if>
+            <if test="driverPriceType != null">driver_price_type,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
             <if test="updateTime != null">update_time,</if>
@@ -66,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="settlementType != null">#{settlementType},</if>
             <if test="settlementPrice != null">#{settlementPrice},</if>
             <if test="driverPrice != null">#{driverPrice},</if>
+            <if test="driverPriceType != null">#{driverPriceType},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
@@ -80,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="settlementType != null">settlement_type = #{settlementType},</if>
             <if test="settlementPrice != null">settlement_price = #{settlementPrice},</if>
             <if test="driverPrice != null">driver_price = #{driverPrice},</if>
+            <if test="driverPriceType != null">driver_price_type = #{driverPriceType},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>