Przeglądaj źródła

优化后台功能

MS-QJVSRANLTYEO\Administrator 4 lat temu
rodzic
commit
1dc78e9197
17 zmienionych plików z 189 dodań i 281 usunięć
  1. 10 59
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java
  2. 29 1
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerGradeSetting.java
  3. 9 40
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerGradeSettingMapper.java
  4. 9 44
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerGradeSettingService.java
  5. 9 56
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerGradeSettingServiceImpl.java
  6. 19 68
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml
  7. 2 2
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java
  8. 20 2
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilGunController.java
  9. 18 2
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilPriceAdjustController.java
  10. 8 2
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilPriceController.java
  11. 24 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java
  12. 16 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationOilGun.java
  13. 2 2
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationOilPrice.java
  14. 1 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationOilGunService.java
  15. 6 1
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml
  16. 6 1
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationOilGunMapper.xml
  17. 1 0
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationOilPriceAdjustMapper.xml

+ 10 - 59
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java

@@ -1,13 +1,16 @@
 package com.yijia.customer.controller;
 
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-
-import com.alibaba.fastjson.JSONObject;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 import com.yijia.common.annotation.Log;
 import com.yijia.common.core.controller.BaseController;
 import com.yijia.common.core.domain.AjaxResult;
@@ -19,9 +22,9 @@ import com.yijia.common.core.page.TableDataInfo;
 
 /**
  * 客户优惠等级设置Controller
- *
+ * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-08
  */
 @RestController
 @RequestMapping("/customer/setting")
@@ -30,58 +33,6 @@ public class CustomerGradeSettingController extends BaseController
     @Autowired
     private ICustomerGradeSettingService customerGradeSettingService;
 
-    /*
-     * 查询成长规则列表
-     */
-    @RequestMapping("/getGrouthRuleList")
-    public TableDataInfo getGrouthRuleList(){
-        //分页
-        startPage();
-        List<Map<String, Object>> grouthRuleList = customerGradeSettingService.getGrouthRuleList();
-        return getDataTable(grouthRuleList);
-    }
-
-    /*
-     * 新增成长规则
-     * @param jsonObject
-     */
-    @RequestMapping("/addGrouthRule")
-    @Log(title = "客户等级成长规则新增", businessType = BusinessType.INSERT)
-    public AjaxResult addGrouthRule(@RequestBody  JSONObject jsonObject){
-        Map<String, Object> params = new HashMap();
-        params.put("grouthValueName", jsonObject.get("grouthValueName"));
-        params.put("grouthValueConsume", jsonObject.get("grouthValueConsume"));
-        params.put("grouthValue", jsonObject.get("grouthValue"));
-        return toAjax(customerGradeSettingService.insertGrouthRule(params));
-    }
-
-    /*
-     * 编辑成长规则
-     * @param jsonObject
-     */
-    @RequestMapping("/editGrouthRule")
-    @Log(title = "客户等级成长编辑", businessType = BusinessType.UPDATE)
-    public AjaxResult editGrouthRule(@RequestBody  JSONObject jsonObject){
-        Map<String, Object> params = new HashMap();
-        params.put("id", jsonObject.get("id"));
-        params.put("grouthValueName", jsonObject.get("grouthValueName"));
-        params.put("grouthValueConsume", jsonObject.get("grouthValueConsume"));
-        params.put("grouthValue", jsonObject.get("grouthValue"));
-        return toAjax(customerGradeSettingService.updateGrouthRule(params));
-    }
-
-    /*
-     * 删除成长规则
-     * @param id
-     */
-    @Log(title = "客户等级成长规则删除", businessType = BusinessType.DELETE)
-    @RequestMapping(value = "/delGrouthRule",method = RequestMethod.DELETE)
-    public AjaxResult delGrouthRule(Long[] id){
-        return toAjax(customerGradeSettingService.deleteGrouthRuleByIds(id));
-    }
-
-
-
     /**
      * 查询客户优惠等级设置列表
      */

+ 29 - 1
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerGradeSetting.java

@@ -11,7 +11,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 客户优惠等级设置对象 customer_grade_setting
  * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-08
  */
 public class CustomerGradeSetting extends BaseEntity
 {
@@ -56,6 +56,14 @@ public class CustomerGradeSetting extends BaseEntity
     @Excel(name = "柴油成长值")
     private String dieseloilGrowthValue;
 
+    /** 会员充值 */
+    @Excel(name = "会员充值")
+    private String memberRecharge;
+
+    /** 会员充值成长积分 */
+    @Excel(name = "会员充值成长积分")
+    private String memberGrowthValue;
+
     /** 成长值 */
     @Excel(name = "成长值")
     private String growthValue;
@@ -159,6 +167,24 @@ public class CustomerGradeSetting extends BaseEntity
     {
         return dieseloilGrowthValue;
     }
+    public void setMemberRecharge(String memberRecharge) 
+    {
+        this.memberRecharge = memberRecharge;
+    }
+
+    public String getMemberRecharge() 
+    {
+        return memberRecharge;
+    }
+    public void setMemberGrowthValue(String memberGrowthValue) 
+    {
+        this.memberGrowthValue = memberGrowthValue;
+    }
+
+    public String getMemberGrowthValue() 
+    {
+        return memberGrowthValue;
+    }
     public void setGrowthValue(String growthValue) 
     {
         this.growthValue = growthValue;
@@ -200,6 +226,8 @@ public class CustomerGradeSetting extends BaseEntity
             .append("gasoilGrowthValue", getGasoilGrowthValue())
             .append("dieseloilConsume", getDieseloilConsume())
             .append("dieseloilGrowthValue", getDieseloilGrowthValue())
+            .append("memberRecharge", getMemberRecharge())
+            .append("memberGrowthValue", getMemberGrowthValue())
             .append("growthValue", getGrowthValue())
             .append("date", getDate())
             .append("deductionGrowthValue", getDeductionGrowthValue())

+ 9 - 40
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerGradeSettingMapper.java

@@ -1,50 +1,19 @@
 package com.yijia.customer.mapper;
 
 import java.util.List;
-import java.util.Map;
-
 import com.yijia.customer.domain.CustomerGradeSetting;
 
 /**
  * 客户优惠等级设置Mapper接口
- *
+ * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-08
  */
-public interface CustomerGradeSettingMapper
+public interface CustomerGradeSettingMapper 
 {
-    /*
-     * 查询成长规则列表
-     * @return
-     */
-    public List<Map<String, Object>> getGrouthRuleList();
-
-    /*
-     * 跟新成长规则
-     * @return
-     */
-    public int insertGrouthRule(Map map);
-
-    /*
-     * 更新成长规则
-     * @return
-     */
-    public int updateGrouthRule(Map map);
-
-    /*
-     * 根据ID删除成长规则
-     * @return
-     */
-    public int deleteGrouthRuleById(String id);
-
-    /*
-     * 批量删除成长规则
-     * @return
-     */
-    public int deleteGrouthRuleByIds(Long[] ids);
     /**
      * 查询客户优惠等级设置
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 客户优惠等级设置
      */
@@ -52,7 +21,7 @@ public interface CustomerGradeSettingMapper
 
     /**
      * 查询客户优惠等级设置列表
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 客户优惠等级设置集合
      */
@@ -60,7 +29,7 @@ public interface CustomerGradeSettingMapper
 
     /**
      * 新增客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -68,7 +37,7 @@ public interface CustomerGradeSettingMapper
 
     /**
      * 修改客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -76,7 +45,7 @@ public interface CustomerGradeSettingMapper
 
     /**
      * 删除客户优惠等级设置
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 结果
      */
@@ -84,7 +53,7 @@ public interface CustomerGradeSettingMapper
 
     /**
      * 批量删除客户优惠等级设置
-     *
+     * 
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 9 - 44
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerGradeSettingService.java

@@ -1,54 +1,19 @@
 package com.yijia.customer.service;
 
 import java.util.List;
-import java.util.Map;
-
 import com.yijia.customer.domain.CustomerGradeSetting;
 
 /**
  * 客户优惠等级设置Service接口
- *
+ * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-08
  */
-public interface ICustomerGradeSettingService
+public interface ICustomerGradeSettingService 
 {
-
-    /*
-     * 查询成长规则列表
-     * @return
-     */
-    public List<Map<String, Object>>  getGrouthRuleList();
-
-    /*
-     * 跟新成长规则
-     * @return
-     */
-    public int insertGrouthRule(Map map);
-
-    /*
-     * 更新成长规则
-     * @return
-     */
-    public int updateGrouthRule(Map map);
-
-    /*
-     * 根据ID删除成长规则
-     * @return
-     */
-    public int deleteGrouthRuleById(String id);
-
-    /*
-     * 批量删除成长规则
-     * @return
-     */
-    public int deleteGrouthRuleByIds(Long[] ids);
-
-
-
     /**
      * 查询客户优惠等级设置
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 客户优惠等级设置
      */
@@ -56,7 +21,7 @@ public interface ICustomerGradeSettingService
 
     /**
      * 查询客户优惠等级设置列表
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 客户优惠等级设置集合
      */
@@ -64,7 +29,7 @@ public interface ICustomerGradeSettingService
 
     /**
      * 新增客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -72,7 +37,7 @@ public interface ICustomerGradeSettingService
 
     /**
      * 修改客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -80,7 +45,7 @@ public interface ICustomerGradeSettingService
 
     /**
      * 批量删除客户优惠等级设置
-     *
+     * 
      * @param ids 需要删除的客户优惠等级设置ID
      * @return 结果
      */
@@ -88,7 +53,7 @@ public interface ICustomerGradeSettingService
 
     /**
      * 删除客户优惠等级设置信息
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 结果
      */

+ 9 - 56
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerGradeSettingServiceImpl.java

@@ -1,8 +1,6 @@
 package com.yijia.customer.service.impl;
 
 import java.util.List;
-import java.util.Map;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.yijia.customer.mapper.CustomerGradeSettingMapper;
@@ -11,64 +9,19 @@ import com.yijia.customer.service.ICustomerGradeSettingService;
 
 /**
  * 客户优惠等级设置Service业务层处理
- *
+ * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-08
  */
 @Service
-public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingService
+public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingService 
 {
     @Autowired
     private CustomerGradeSettingMapper customerGradeSettingMapper;
 
-    /*
-     * 查询成长规则列表
-     * @return
-     */
-    @Override
-    public List<Map<String, Object>> getGrouthRuleList() {
-        return customerGradeSettingMapper.getGrouthRuleList();
-    }
-
-    /*
-     * 跟新成长规则
-     * @return
-     */
-    @Override
-    public int insertGrouthRule(Map map) {
-        return customerGradeSettingMapper.insertGrouthRule(map);
-    }
-
-    /*
-     * 更新成长规则
-     * @return
-     */
-    @Override
-    public int updateGrouthRule(Map map) {
-        return customerGradeSettingMapper.updateGrouthRule(map);
-    }
-
-    /*
-     * 根据ID删除成长规则
-     * @return
-     */
-    @Override
-    public int deleteGrouthRuleById(String id) {
-        return customerGradeSettingMapper.deleteGrouthRuleById(id);
-    }
-
-    /*
-     * 批量删除成长规则
-     * @return
-     */
-    @Override
-    public int deleteGrouthRuleByIds(Long[] ids) {
-        return customerGradeSettingMapper.deleteGrouthRuleByIds(ids);
-    }
-
     /**
      * 查询客户优惠等级设置
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 客户优惠等级设置
      */
@@ -80,7 +33,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
 
     /**
      * 查询客户优惠等级设置列表
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 客户优惠等级设置
      */
@@ -92,7 +45,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
 
     /**
      * 新增客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -104,7 +57,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
 
     /**
      * 修改客户优惠等级设置
-     *
+     * 
      * @param customerGradeSetting 客户优惠等级设置
      * @return 结果
      */
@@ -116,7 +69,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
 
     /**
      * 批量删除客户优惠等级设置
-     *
+     * 
      * @param ids 需要删除的客户优惠等级设置ID
      * @return 结果
      */
@@ -128,7 +81,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
 
     /**
      * 删除客户优惠等级设置信息
-     *
+     * 
      * @param id 客户优惠等级设置ID
      * @return 结果
      */

+ 19 - 68
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.customer.mapper.CustomerGradeSettingMapper">
-
+    
     <resultMap type="CustomerGradeSetting" id="CustomerGradeSettingResult">
         <result property="id"    column="id"    />
         <result property="grade"    column="grade"    />
@@ -15,75 +15,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="gasoilGrowthValue"    column="gasoil_growth_value"    />
         <result property="dieseloilConsume"    column="dieseloil_consume"    />
         <result property="dieseloilGrowthValue"    column="dieseloil_growth_value"    />
+        <result property="memberRecharge"    column="member_recharge"    />
+        <result property="memberGrowthValue"    column="member_growth_value"    />
         <result property="growthValue"    column="growth_value"    />
         <result property="date"    column="date"    />
         <result property="deductionGrowthValue"    column="deduction_growth_value"    />
     </resultMap>
 
     <sql id="selectCustomerGradeSettingVo">
-        select id, grade, discount_way, gasoil_discount_litre, dieseloil_discount_litre, grade_type, gasoil_consume, gasoil_growth_value, dieseloil_consume, dieseloil_growth_value, growth_value, date, deduction_growth_value from customer_grade_setting
+        select id, grade, discount_way, gasoil_discount_litre, dieseloil_discount_litre, grade_type, gasoil_consume, gasoil_growth_value, dieseloil_consume, dieseloil_growth_value, member_recharge, member_growth_value, growth_value, date, deduction_growth_value from customer_grade_setting
     </sql>
 
-    <!-- 查询成长规则列表-->
-    <select id="getGrouthRuleList" resultType="map">
-        SELECT
-            id,
-            grouth_value_name    AS grouthValueName,
-            grouth_value_consume AS grouthValueConsume,
-            grouth_value         AS grouthValue
-        FROM
-            customer_grouth_rule
-    </select>
-
-    <!--新增成长规则-->
-    <insert id="insertGrouthRule" parameterType="map">
-        insert into customer_grouth_rule
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="grouthValueName != null">grouth_value_name,</if>
-            <if test="grouthValueConsume != null">grouth_value_consume,</if>
-            <if test="grouthValue != null">grouth_value</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="grouthValueName != null">#{grouthValueName},</if>
-            <if test="grouthValueConsume != null">#{grouthValueConsume},</if>
-            <if test="grouthValue != null">#{grouthValue}</if>
-        </trim>
-    </insert>
-
-    <!-- 更新成长规则-->
-    <update id="updateGrouthRule" parameterType="map">
-        UPDATE customer_grouth_rule
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="grouthValueName != null">grouth_value_name = #{grouthValueName},</if>
-            <if test="grouthValueConsume != null">grouth_value_consume = #{grouthValueConsume},</if>
-            <if test="grouthValue != null">grouth_value = #{grouthValue}</if>
-        </trim>
-        WHERE id = #{id}
-    </update>
-
-    <!--删除一条成长规则-->
-    <delete id="deleteGrouthRuleById" parameterType="String">
-        DELETE
-        FROM
-            customer_grouth_rule
-        WHERE id = #{id}
-    </delete>
-
-    <!--批量删除成长规则-->
-    <delete id="deleteGrouthRuleByIds" parameterType="Long">
-        DELETE
-        FROM
-            customer_grouth_rule
-        WHERE id IN
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-
-
     <select id="selectCustomerGradeSettingList" parameterType="CustomerGradeSetting" resultMap="CustomerGradeSettingResult">
         <include refid="selectCustomerGradeSettingVo"/>
-        <where>
+        <where>  
             <if test="grade != null  and grade != ''"> and grade = #{grade}</if>
             <if test="discountWay != null  and discountWay != ''"> and discount_way = #{discountWay}</if>
             <if test="gasoilDiscountLitre != null  and gasoilDiscountLitre != ''"> and gasoil_discount_litre = #{gasoilDiscountLitre}</if>
@@ -93,21 +38,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gasoilGrowthValue != null  and gasoilGrowthValue != ''"> and gasoil_growth_value = #{gasoilGrowthValue}</if>
             <if test="dieseloilConsume != null  and dieseloilConsume != ''"> and dieseloil_consume = #{dieseloilConsume}</if>
             <if test="dieseloilGrowthValue != null  and dieseloilGrowthValue != ''"> and dieseloil_growth_value = #{dieseloilGrowthValue}</if>
+            <if test="memberRecharge != null  and memberRecharge != ''"> and member_recharge = #{memberRecharge}</if>
+            <if test="memberGrowthValue != null  and memberGrowthValue != ''"> and member_growth_value = #{memberGrowthValue}</if>
             <if test="growthValue != null  and growthValue != ''"> and growth_value = #{growthValue}</if>
             <if test="date != null "> and date = #{date}</if>
             <if test="deductionGrowthValue != null  and deductionGrowthValue != ''"> and deduction_growth_value = #{deductionGrowthValue}</if>
         </where>
     </select>
-
+    
     <select id="selectCustomerGradeSettingById" parameterType="Long" resultMap="CustomerGradeSettingResult">
         <include refid="selectCustomerGradeSettingVo"/>
         where id = #{id}
     </select>
-
-    <insert id="insertCustomerGradeSetting" parameterType="CustomerGradeSetting">
+        
+    <insert id="insertCustomerGradeSetting" parameterType="CustomerGradeSetting" useGeneratedKeys="true" keyProperty="id">
         insert into customer_grade_setting
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
             <if test="grade != null">grade,</if>
             <if test="discountWay != null">discount_way,</if>
             <if test="gasoilDiscountLitre != null">gasoil_discount_litre,</if>
@@ -117,12 +63,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gasoilGrowthValue != null">gasoil_growth_value,</if>
             <if test="dieseloilConsume != null">dieseloil_consume,</if>
             <if test="dieseloilGrowthValue != null">dieseloil_growth_value,</if>
+            <if test="memberRecharge != null">member_recharge,</if>
+            <if test="memberGrowthValue != null">member_growth_value,</if>
             <if test="growthValue != null">growth_value,</if>
             <if test="date != null">date,</if>
             <if test="deductionGrowthValue != null">deduction_growth_value,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
             <if test="grade != null">#{grade},</if>
             <if test="discountWay != null">#{discountWay},</if>
             <if test="gasoilDiscountLitre != null">#{gasoilDiscountLitre},</if>
@@ -132,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gasoilGrowthValue != null">#{gasoilGrowthValue},</if>
             <if test="dieseloilConsume != null">#{dieseloilConsume},</if>
             <if test="dieseloilGrowthValue != null">#{dieseloilGrowthValue},</if>
+            <if test="memberRecharge != null">#{memberRecharge},</if>
+            <if test="memberGrowthValue != null">#{memberGrowthValue},</if>
             <if test="growthValue != null">#{growthValue},</if>
             <if test="date != null">#{date},</if>
             <if test="deductionGrowthValue != null">#{deductionGrowthValue},</if>
@@ -150,6 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gasoilGrowthValue != null">gasoil_growth_value = #{gasoilGrowthValue},</if>
             <if test="dieseloilConsume != null">dieseloil_consume = #{dieseloilConsume},</if>
             <if test="dieseloilGrowthValue != null">dieseloil_growth_value = #{dieseloilGrowthValue},</if>
+            <if test="memberRecharge != null">member_recharge = #{memberRecharge},</if>
+            <if test="memberGrowthValue != null">member_growth_value = #{memberGrowthValue},</if>
             <if test="growthValue != null">growth_value = #{growthValue},</if>
             <if test="date != null">date = #{date},</if>
             <if test="deductionGrowthValue != null">deduction_growth_value = #{deductionGrowthValue},</if>
@@ -162,10 +113,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCustomerGradeSettingByIds" parameterType="String">
-        delete from customer_grade_setting where id in
+        delete from customer_grade_setting where id in 
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-
-</mapper>
+    
+</mapper>

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

@@ -93,8 +93,8 @@ public class PayOrderController extends BaseController
      * @param payOrder
      * @return
      */
-    @PreAuthorize("@ss.hasPermi('station:order:selectOverViewData')")
-    @GetMapping("/selectOverViewData")
+    @PreAuthorize("@ss.hasPermi('station:order:selectDayReport')")
+    @GetMapping("/selectDayReport")
     public TableDataInfo selectDayReport(PayOrder payOrder)
     {
        List<PayOrder>  orderList = payOrderService.selectDayReport(payOrder);

+ 20 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilGunController.java

@@ -1,5 +1,8 @@
 package com.yijia.station.controller;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +64,17 @@ public class StationOilGunController extends BaseController
     /**
      * 获取油枪管理详细信息
      */
+    @PreAuthorize("@ss.hasPermi('station:gun:selectGun')")
+    @GetMapping(value = "/selectGun")
+    public TableDataInfo selectGun(StationOilGun stationOilGun)
+    {
+        List<StationOilGun> list = stationOilGunService.selectStationOilGunList(stationOilGun);
+        return getTable(list);
+    }
+
+    /**
+     * 根据油站id查询油枪
+     */
     @PreAuthorize("@ss.hasPermi('station:gun:query')")
     @GetMapping(value = "/{oilGunId}")
     public AjaxResult getInfo(@PathVariable("oilGunId") Long oilGunId)
@@ -74,8 +88,12 @@ public class StationOilGunController extends BaseController
     @PreAuthorize("@ss.hasPermi('station:gun:add')")
     @Log(title = "油枪管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody StationOilGun stationOilGun)
-    {
+    public AjaxResult add(@RequestBody StationOilGun stationOilGun) throws ParseException {
+        Date date=new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String time = sdf.format(date);
+        Date  now = sdf.parse(time);
+        stationOilGun.setDate(now);
         return toAjax(stationOilGunService.insertStationOilGun(stationOilGun));
     }
 

+ 18 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilPriceAdjustController.java

@@ -1,6 +1,13 @@
 package com.yijia.station.controller;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysUser;
+import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.utils.SecurityUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -74,8 +81,17 @@ public class StationOilPriceAdjustController extends BaseController
     @PreAuthorize("@ss.hasPermi('station:adjust:add')")
     @Log(title = "油品调价信息", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody StationOilPriceAdjust stationOilPriceAdjust)
-    {
+    public AjaxResult add(@RequestBody StationOilPriceAdjust stationOilPriceAdjust) throws ParseException {
+        Date date=new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String time = sdf.format(date);
+        Date  now = sdf.parse(time);
+        stationOilPriceAdjust.setAdjustDate(now);
+        if(stationOilPriceAdjust.getTakeEffectStatus()!=null && stationOilPriceAdjust.getTakeEffectStatus().equals("1")){
+            stationOilPriceAdjust.setTakeEffectDate(now);
+        }
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        stationOilPriceAdjust.setOperator(currentUser.getUsername());
         return toAjax(stationOilPriceAdjustService.insertStationOilPriceAdjust(stationOilPriceAdjust));
     }
 

+ 8 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilPriceController.java

@@ -1,5 +1,7 @@
 package com.yijia.station.controller;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -77,8 +79,12 @@ public class StationOilPriceController extends BaseController
     @PreAuthorize("@ss.hasPermi('station:price:add')")
     @Log(title = "油品价格", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody StationOilPrice stationOilPrice)
-    {
+    public AjaxResult add(@RequestBody StationOilPrice stationOilPrice) throws ParseException {
+        Date date=new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String time = sdf.format(date);
+        Date  now = sdf.parse(time);
+        stationOilPrice.setDate(now);
         return toAjax(stationOilPriceService.insertStationOilPrice(stationOilPrice));
     }
 

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

@@ -154,6 +154,28 @@ public class PayOrder extends BaseEntity
     @Excel(name = "订单类型", readConverterExp = "1=.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分")
     private String orderType;
 
+    /** pos支付金额 */
+    @Excel(name = "汽油金额")
+    private Double qyAmt;
+    @Excel(name = "柴油金额")
+    private Double cyAmt;
+
+    public Double getQyAmt() {
+        return qyAmt;
+    }
+
+    public void setQyAmt(Double qyAmt) {
+        this.qyAmt = qyAmt;
+    }
+
+    public Double getCyAmt() {
+        return cyAmt;
+    }
+
+    public void setCyAmt(Double cyAmt) {
+        this.cyAmt = cyAmt;
+    }
+
     public void setOrderId(Long orderId)
     {
         this.orderId = orderId;
@@ -484,6 +506,8 @@ public class PayOrder extends BaseEntity
             .append("payDate", getPayDate())
             .append("createdDate", getCreatedDate())
             .append("orderType", getOrderType())
+            .append("cyAmt", getCyAmt())
+            .append("qyAmt", getQyAmt())
             .toString();
     }
 }

+ 16 - 1
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationOilGun.java

@@ -1,5 +1,6 @@
 package com.yijia.station.domain;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -11,7 +12,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 油枪管理对象 station_oil_gun
  * 
  * @author yijia
- * @date 2020-12-09
+ * @date 2021-01-10
  */
 public class StationOilGun extends BaseEntity
 {
@@ -28,6 +29,10 @@ public class StationOilGun extends BaseEntity
     @Excel(name = "油品名称")
     private String oilName;
 
+    /** 单价 */
+    @Excel(name = "单价")
+    private BigDecimal oilPrice;
+
     /** 油站id */
     @Excel(name = "油站id")
     private Long stationId;
@@ -72,6 +77,15 @@ public class StationOilGun extends BaseEntity
     {
         return oilName;
     }
+    public void setOilPrice(BigDecimal oilPrice) 
+    {
+        this.oilPrice = oilPrice;
+    }
+
+    public BigDecimal getOilPrice() 
+    {
+        return oilPrice;
+    }
     public void setStationId(Long stationId) 
     {
         this.stationId = stationId;
@@ -115,6 +129,7 @@ public class StationOilGun extends BaseEntity
             .append("oilGunId", getOilGunId())
             .append("oilGunNo", getOilGunNo())
             .append("oilName", getOilName())
+            .append("oilPrice", getOilPrice())
             .append("stationId", getStationId())
             .append("stationName", getStationName())
             .append("date", getDate())

+ 2 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationOilPrice.java

@@ -37,8 +37,8 @@ public class StationOilPrice extends BaseEntity
     private String stationNanme;
 
     /** 操作时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date date;
 
     public void setOilPriceId(Long oilPriceId) 

+ 1 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationOilGunService.java

@@ -58,4 +58,5 @@ public interface IStationOilGunService
      * @return 结果
      */
     public int deleteStationOilGunById(Long oilGunId);
+
 }

+ 6 - 1
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -39,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="payDate"    column="pay_date"    />
         <result property="createdDate"    column="created_date"    />
         <result property="orderType"    column="order_type"    />
+        <result property="cyAmt"    column="cy_amt"    />
+        <result property="qyAmt"    column="qy_amt"    />
     </resultMap>
 
     <sql id="selectPayOrderVo">
@@ -138,7 +140,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="selectDayReport" parameterType="Long" resultMap="PayOrderResult">
-        
+        SELECT date_format( b.pay_date, '%Y-%m-%d' ) as pay_date,sum(b.amt) as amt,sum(b.qyamt) as qy_amt, sum(b.cyamt) as cy_amt,sum(b.order_liters) as order_liters ,count(b.order_no) order_no ,sum(b.member_amt) as menber_amt
+        from (SELECT a.*,(SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=2) as qyamt , (SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=1) as cyamt
+        from pay_order a) b
+        GROUP BY  date_format( pay_date, '%Y-%m-%d' )
     </select>
     <insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
         insert into pay_order

+ 6 - 1
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationOilGunMapper.xml

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="oilGunId"    column="oil_gun_id"    />
         <result property="oilGunNo"    column="oil_gun_no"    />
         <result property="oilName"    column="oil_name"    />
+        <result property="oilPrice"    column="oil_price"    />
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
         <result property="date"    column="date"    />
@@ -15,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectStationOilGunVo">
-        select oil_gun_id, oil_gun_no, oil_name, station_id, station_name, date, status from station_oil_gun
+        select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status from station_oil_gun
     </sql>
 
     <select id="selectStationOilGunList" parameterType="StationOilGun" resultMap="StationOilGunResult">
@@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="oilGunNo != null  and oilGunNo != ''"> and oil_gun_no = #{oilGunNo}</if>
             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="date != null "> and date = #{date}</if>
@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="oilGunNo != null">oil_gun_no,</if>
             <if test="oilName != null">oil_name,</if>
+            <if test="oilPrice != null">oil_price,</if>
             <if test="stationId != null">station_id,</if>
             <if test="stationName != null">station_name,</if>
             <if test="date != null">date,</if>
@@ -48,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="oilGunNo != null">#{oilGunNo},</if>
             <if test="oilName != null">#{oilName},</if>
+            <if test="oilPrice != null">#{oilPrice},</if>
             <if test="stationId != null">#{stationId},</if>
             <if test="stationName != null">#{stationName},</if>
             <if test="date != null">#{date},</if>
@@ -60,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="oilGunNo != null">oil_gun_no = #{oilGunNo},</if>
             <if test="oilName != null">oil_name = #{oilName},</if>
+            <if test="oilPrice != null">oil_price = #{oilPrice},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
             <if test="stationName != null">station_name = #{stationName},</if>
             <if test="date != null">date = #{date},</if>

+ 1 - 0
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationOilPriceAdjustMapper.xml

@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
         </where>
+        order by  adjustDate desc
     </select>
     
     <select id="selectStationOilPriceAdjustById" parameterType="Long" resultMap="StationOilPriceAdjustResult">