Browse Source

修改油站设置油站信息,油品价格查询

zangguocen 4 years ago
parent
commit
d415e0075a
17 changed files with 1246 additions and 99 deletions
  1. 16 6
      yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java
  2. 1 7
      yijia-admin/src/main/java/com/yijia/web/controller/system/SysDictDataController.java
  3. 14 14
      yijia-common/src/main/java/com/yijia/common/core/domain/AjaxResult.java
  4. 229 0
      yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java
  5. 221 0
      yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardUseRecord.java
  6. 61 0
      yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardUseRecordMapper.java
  7. 61 0
      yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardUseRecordService.java
  8. 95 0
      yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardUseRecordServiceImpl.java
  9. 121 0
      yijia-customer/src/main/resources/mapper/customer/CustomerCardUseRecordMapper.xml
  10. 39 39
      yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java
  11. 3 9
      yijia-station/src/main/resources/mapper/station/StationDeviceManageMapper.xml
  12. 7 8
      yijia-station/src/main/resources/mapper/station/StationOilPriceAdjustMapper.xml
  13. 0 3
      yijia-station/src/main/resources/mapper/station/StationOilPriceMapper.xml
  14. 10 12
      yijia-station/src/main/resources/mapper/station/StationPersonnelMapper.xml
  15. 358 0
      yijia-system/src/main/java/com/yijia/system/domain/SysDeptDemo.java
  16. 2 0
      yijia-system/src/main/java/com/yijia/system/service/impl/SysDeptServiceImpl.java
  17. 8 1
      yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 16 - 6
yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java

@@ -6,6 +6,8 @@ import java.util.List;
 
 import com.yijia.common.core.domain.TreeSelect;
 import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.utils.bean.BeanUtils;
+import com.yijia.system.domain.SysDeptDemo;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -43,7 +45,6 @@ public class SysDeptController extends BaseController
     /**
      * 获取部门列表
      */
-    @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list")
     public AjaxResult list(SysDept dept)
     {
@@ -51,7 +52,6 @@ public class SysDeptController extends BaseController
         return AjaxResult.success(depts);
     }
 
-    @PreAuthorize("@ss.hasPermi('system:dept:listTree')")
     @GetMapping("/listTree")
     public AjaxResult listTree(SysDept dept)
     {
@@ -62,7 +62,6 @@ public class SysDeptController extends BaseController
     /**
      * 查询部门列表(排除节点)
      */
-    @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list/exclude/{deptId}")
     public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
     {
@@ -83,7 +82,6 @@ public class SysDeptController extends BaseController
     /**
      * 根据部门编号获取详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:dept:query')")
     @GetMapping(value = "/{deptId}")
     public AjaxResult getInfo(@PathVariable Long deptId)
     {
@@ -93,9 +91,21 @@ public class SysDeptController extends BaseController
     @GetMapping(value = "/getGroupInfo")
     public AjaxResult getGroupInfo(SysDept dept)
     {
+        SysDept sysDepts =new SysDept();
         LoginUser currentUser = SecurityUtils.getLoginUser();
-        dept.setDeptId(currentUser.getUser().getDeptId());
-        return AjaxResult.success(deptService.getGroupInfo(dept));
+        SysDept  sysDept=deptService.selectDeptById(currentUser.getUser().getDeptId());
+        if(sysDept.getJiBie()!=null && sysDept.getJiBie()==1){
+            dept.setDeptId(currentUser.getUser().getDeptId());
+            sysDepts=deptService.getGroupInfo(dept);
+        }else if(sysDept.getJiBie()!=null && sysDept.getJiBie()==2){
+            dept.setParentId(currentUser.getUser().getDeptId());
+            sysDepts=deptService.getGroupInfo(dept);
+        }else{
+            sysDepts=new SysDept();
+        }
+//        SysDeptDemo sysDeptDemo =new SysDeptDemo();
+//        BeanUtils.copyProperties(sysDeptDemo, sysDepts);
+        return AjaxResult.success(sysDepts);
     }
 
 

+ 1 - 7
yijia-admin/src/main/java/com/yijia/web/controller/system/SysDictDataController.java

@@ -25,7 +25,7 @@ import com.yijia.system.service.ISysDictTypeService;
 
 /**
  * 数据字典信息
- * 
+ *
  * @author yijia
  */
 @RestController
@@ -38,7 +38,6 @@ public class SysDictDataController extends BaseController
     @Autowired
     private ISysDictTypeService dictTypeService;
 
-    @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
     public TableDataInfo list(SysDictData dictData)
     {
@@ -48,7 +47,6 @@ public class SysDictDataController extends BaseController
     }
 
     @Log(title = "字典数据", businessType = BusinessType.EXPORT)
-    @PreAuthorize("@ss.hasPermi('system:dict:export')")
     @GetMapping("/export")
     public AjaxResult export(SysDictData dictData)
     {
@@ -60,7 +58,6 @@ public class SysDictDataController extends BaseController
     /**
      * 查询字典数据详细
      */
-    @PreAuthorize("@ss.hasPermi('system:dict:query')")
     @GetMapping(value = "/{dictCode}")
     public AjaxResult getInfo(@PathVariable Long dictCode)
     {
@@ -79,7 +76,6 @@ public class SysDictDataController extends BaseController
     /**
      * 新增字典类型
      */
-    @PreAuthorize("@ss.hasPermi('system:dict:add')")
     @Log(title = "字典数据", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysDictData dict)
@@ -91,7 +87,6 @@ public class SysDictDataController extends BaseController
     /**
      * 修改保存字典类型
      */
-    @PreAuthorize("@ss.hasPermi('system:dict:edit')")
     @Log(title = "字典数据", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysDictData dict)
@@ -103,7 +98,6 @@ public class SysDictDataController extends BaseController
     /**
      * 删除字典类型
      */
-    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
     @Log(title = "字典类型", businessType = BusinessType.DELETE)
     @DeleteMapping("/{dictCodes}")
     public AjaxResult remove(@PathVariable Long[] dictCodes)

+ 14 - 14
yijia-common/src/main/java/com/yijia/common/core/domain/AjaxResult.java

@@ -6,7 +6,7 @@ import com.yijia.common.utils.StringUtils;
 
 /**
  * 操作消息提醒
- * 
+ *
  * @author yijia
  */
 public class AjaxResult extends HashMap<String, Object>
@@ -31,7 +31,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 初始化一个新创建的 AjaxResult 对象
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      */
@@ -43,7 +43,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 初始化一个新创建的 AjaxResult 对象
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      * @param data 数据对象
@@ -52,15 +52,15 @@ public class AjaxResult extends HashMap<String, Object>
     {
         super.put(CODE_TAG, code);
         super.put(MSG_TAG, msg);
-        if (StringUtils.isNotNull(data))
-        {
+//        if (StringUtils.isNotNull(data))
+//        {
             super.put(DATA_TAG, data);
-        }
+//        }
     }
 
     /**
      * 返回成功消息
-     * 
+     *
      * @return 成功消息
      */
     public static AjaxResult success()
@@ -70,7 +70,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回成功数据
-     * 
+     *
      * @return 成功消息
      */
     public static AjaxResult success(Object data)
@@ -80,7 +80,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回成功消息
-     * 
+     *
      * @param msg 返回内容
      * @return 成功消息
      */
@@ -91,7 +91,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回成功消息
-     * 
+     *
      * @param msg 返回内容
      * @param data 数据对象
      * @return 成功消息
@@ -103,7 +103,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @return
      */
     public static AjaxResult error()
@@ -113,7 +113,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param msg 返回内容
      * @return 警告消息
      */
@@ -124,7 +124,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param msg 返回内容
      * @param data 数据对象
      * @return 警告消息
@@ -136,7 +136,7 @@ public class AjaxResult extends HashMap<String, Object>
 
     /**
      * 返回错误消息
-     * 
+     *
      * @param code 状态码
      * @param msg 返回内容
      * @return 警告消息

+ 229 - 0
yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java

@@ -84,6 +84,216 @@ public class SysDept extends BaseEntity
     private List<String> deptIdList;
 
     private Long orDeptId;
+    /** 该油站的优惠方案:0,不执行优惠方案;1,满减;2,立减;3,直降; */
+    private String discountSetting;
+    /** 是否开启电子卡功能:0,否;1,是 */
+    private String cardEnabledFlag;
+    /** 公众号APpID*/
+    private String gzhAppId;
+    /** 公众号密钥*/
+    private String gzhAppSecret;
+    /** 支付宝appid*/
+    private String aliAppId;
+    /** 支付宝公钥*/
+    private String aliPublicKey;
+    /** 支付宝私钥*/
+    private String aliPrivateKey;
+    /** 支付宝解密key*/
+    private String aliEncryptKey;
+    /** 照片1*/
+    private String image1;
+    /** 照片2*/
+    private String image2;
+    /** 照片3*/
+    private String image3;
+    /** 照片4*/
+    private String image4;
+    /** 照片5*/
+    private String image5;
+    /**班结是否打印(1,是 2 否)*/
+    private String wsPrintFlag;
+    /**打印小票(1 客户联 2 商户联 3商户联和客户联)*/
+    private String printSetting;
+    /**公告*/
+    private String notice;
+    /**积分是否打印(1,是 2 否)*/
+    private String integralPrintFlag;
+    /**积分是否启用(1.启用,2 关闭)*/
+    private String integralFlag;
+    /**积分规则是否共享*/
+    private String  integralRuleFlag;
+    /**电子卡规则是否共享*/
+    private String  cardRuleFlag;
+    /**优惠劵是否共享*/
+    private String  couponFlag;
+
+    public String getCouponFlag() {
+        return couponFlag;
+    }
+
+    public void setCouponFlag(String couponFlag) {
+        this.couponFlag = couponFlag;
+    }
+
+    public String getIntegralRuleFlag() {
+        return integralRuleFlag;
+    }
+
+    public void setIntegralRuleFlag(String integralRuleFlag) {
+        this.integralRuleFlag = integralRuleFlag;
+    }
+
+    public String getCardRuleFlag() {
+        return cardRuleFlag;
+    }
+
+    public void setCardRuleFlag(String cardRuleFlag) {
+        this.cardRuleFlag = cardRuleFlag;
+    }
+
+    public String getDiscountSetting() {
+        return discountSetting;
+    }
+
+    public void setDiscountSetting(String discountSetting) {
+        this.discountSetting = discountSetting;
+    }
+
+    public String getCardEnabledFlag() {
+        return cardEnabledFlag;
+    }
+
+    public void setCardEnabledFlag(String cardEnabledFlag) {
+        this.cardEnabledFlag = cardEnabledFlag;
+    }
+
+    public String getGzhAppId() {
+        return gzhAppId;
+    }
+
+    public void setGzhAppId(String gzhAppId) {
+        this.gzhAppId = gzhAppId;
+    }
+
+    public String getGzhAppSecret() {
+        return gzhAppSecret;
+    }
+
+    public void setGzhAppSecret(String gzhAppSecret) {
+        this.gzhAppSecret = gzhAppSecret;
+    }
+
+    public String getAliAppId() {
+        return aliAppId;
+    }
+
+    public void setAliAppId(String aliAppId) {
+        this.aliAppId = aliAppId;
+    }
+
+    public String getAliPublicKey() {
+        return aliPublicKey;
+    }
+
+    public void setAliPublicKey(String aliPublicKey) {
+        this.aliPublicKey = aliPublicKey;
+    }
+
+    public String getAliPrivateKey() {
+        return aliPrivateKey;
+    }
+
+    public void setAliPrivateKey(String aliPrivateKey) {
+        this.aliPrivateKey = aliPrivateKey;
+    }
+
+    public String getAliEncryptKey() {
+        return aliEncryptKey;
+    }
+
+    public void setAliEncryptKey(String aliEncryptKey) {
+        this.aliEncryptKey = aliEncryptKey;
+    }
+
+    public String getImage1() {
+        return image1;
+    }
+
+    public void setImage1(String image1) {
+        this.image1 = image1;
+    }
+
+    public String getImage2() {
+        return image2;
+    }
+
+    public void setImage2(String image2) {
+        this.image2 = image2;
+    }
+
+    public String getImage3() {
+        return image3;
+    }
+
+    public void setImage3(String image3) {
+        this.image3 = image3;
+    }
+
+    public String getImage4() {
+        return image4;
+    }
+
+    public void setImage4(String image4) {
+        this.image4 = image4;
+    }
+
+    public String getImage5() {
+        return image5;
+    }
+
+    public void setImage5(String image5) {
+        this.image5 = image5;
+    }
+
+    public String getWsPrintFlag() {
+        return wsPrintFlag;
+    }
+
+    public void setWsPrintFlag(String wsPrintFlag) {
+        this.wsPrintFlag = wsPrintFlag;
+    }
+
+    public String getPrintSetting() {
+        return printSetting;
+    }
+
+    public void setPrintSetting(String printSetting) {
+        this.printSetting = printSetting;
+    }
+
+    public String getNotice() {
+        return notice;
+    }
+
+    public void setNotice(String notice) {
+        this.notice = notice;
+    }
+
+    public String getIntegralPrintFlag() {
+        return integralPrintFlag;
+    }
+
+    public void setIntegralPrintFlag(String integralPrintFlag) {
+        this.integralPrintFlag = integralPrintFlag;
+    }
+
+    public String getIntegralFlag() {
+        return integralFlag;
+    }
+
+    public void setIntegralFlag(String integralFlag) {
+        this.integralFlag = integralFlag;
+    }
 
     public Long getOrDeptId() {
         return orDeptId;
@@ -316,6 +526,25 @@ public class SysDept extends BaseEntity
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
+            .append("discountSetting", getDiscountSetting())
+            .append("cardEnabledFlag", getCardEnabledFlag())
+            .append("gzhAppId", getGzhAppId())
+            .append("gzhAppSecret", getGzhAppSecret())
+            .append("aliAppId", getAliAppId())
+            .append("aliPublicKey", getAliPublicKey())
+            .append("aliPrivateKey", getAliPrivateKey())
+            .append("aliEncryptKey", getAliEncryptKey())
+            .append("image1", getImage1())
+            .append("image2", getImage2())
+            .append("image3", getImage3())
+            .append("image4", getImage4())
+            .append("image5", getImage5())
+            .append("wsPrintFlag", getWsPrintFlag())
+            .append("printSetting", getUpdateTime())
+            .append("notice", getUpdateTime())
+            .append("integralPrintFlag", getUpdateTime())
+            .append("integralFlag", getUpdateTime())
             .toString();
     }
+
 }

+ 221 - 0
yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardUseRecord.java

@@ -0,0 +1,221 @@
+package com.yijia.customer.domain;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+
+/**
+ * 客户电子会员卡充值消费记录对象 customer_card_use_record
+ * 
+ * @author yijia
+ * @date 2021-05-18
+ */
+public class CustomerCardUseRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 充值消费单号 */
+    @Excel(name = "充值消费单号")
+    private String orderNo;
+
+    /** 微信用户唯一标识 */
+    @Excel(name = "微信用户唯一标识")
+    private String unionId;
+
+    /** 会员号ID */
+    @Excel(name = "会员号ID")
+    private String customerNo;
+
+    /** 客户名 */
+    @Excel(name = "客户名")
+    private String customerName;
+
+    /** 电子会员卡消费充值类型:+,充值;-,消费; */
+    @Excel(name = "电子会员卡消费充值类型:+,充值;-,消费;")
+    private String usageType;
+
+    /** 电子会员卡充值消费类型:1.微信;2.POS机 */
+    @Excel(name = "电子会员卡充值消费类型:1.微信;2.POS机")
+    private String payType;
+
+    /** 油类:2.柴油;1.汽油; */
+    @Excel(name = "油类:2.柴油;1.汽油;")
+    private String cardOilsType;
+
+    /** 充值,消费金额 */
+    @Excel(name = "充值,消费金额")
+    private BigDecimal amt;
+
+    /** 赠送金额 */
+    @Excel(name = "赠送金额")
+    private BigDecimal presentAmt;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Integer stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 是否充值或者消费成功:0,未成功;1,成功 */
+    @Excel(name = "是否充值或者消费成功:0,未成功;1,成功")
+    private String status;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setOrderNo(String orderNo) 
+    {
+        this.orderNo = orderNo;
+    }
+
+    public String getOrderNo() 
+    {
+        return orderNo;
+    }
+    public void setUnionId(String unionId) 
+    {
+        this.unionId = unionId;
+    }
+
+    public String getUnionId() 
+    {
+        return unionId;
+    }
+    public void setCustomerNo(String customerNo) 
+    {
+        this.customerNo = customerNo;
+    }
+
+    public String getCustomerNo() 
+    {
+        return customerNo;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setUsageType(String usageType) 
+    {
+        this.usageType = usageType;
+    }
+
+    public String getUsageType() 
+    {
+        return usageType;
+    }
+    public void setPayType(String payType) 
+    {
+        this.payType = payType;
+    }
+
+    public String getPayType() 
+    {
+        return payType;
+    }
+    public void setCardOilsType(String cardOilsType) 
+    {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getCardOilsType() 
+    {
+        return cardOilsType;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+    public void setPresentAmt(BigDecimal presentAmt) 
+    {
+        this.presentAmt = presentAmt;
+    }
+
+    public BigDecimal getPresentAmt() 
+    {
+        return presentAmt;
+    }
+    public void setBalance(BigDecimal balance) 
+    {
+        this.balance = balance;
+    }
+
+    public BigDecimal getBalance() 
+    {
+        return balance;
+    }
+    public void setStationId(Integer stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Integer getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("orderNo", getOrderNo())
+            .append("unionId", getUnionId())
+            .append("customerNo", getCustomerNo())
+            .append("customerName", getCustomerName())
+            .append("usageType", getUsageType())
+            .append("payType", getPayType())
+            .append("cardOilsType", getCardOilsType())
+            .append("amt", getAmt())
+            .append("presentAmt", getPresentAmt())
+            .append("balance", getBalance())
+            .append("createTime", getCreateTime())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("status", getStatus())
+            .toString();
+    }
+}

+ 61 - 0
yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardUseRecordMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardUseRecord;
+
+/**
+ * 客户电子会员卡充值消费记录Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-05-18
+ */
+public interface CustomerCardUseRecordMapper 
+{
+    /**
+     * 查询客户电子会员卡充值消费记录
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 客户电子会员卡充值消费记录
+     */
+    public CustomerCardUseRecord selectCustomerCardUseRecordById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值消费记录列表
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 客户电子会员卡充值消费记录集合
+     */
+    public List<CustomerCardUseRecord> selectCustomerCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 新增客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    public int insertCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 修改客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    public int updateCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 删除客户电子会员卡充值消费记录
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardUseRecordById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡充值消费记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerCardUseRecordByIds(Long[] ids);
+}

+ 61 - 0
yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardUseRecordService.java

@@ -0,0 +1,61 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardUseRecord;
+
+/**
+ * 客户电子会员卡充值消费记录Service接口
+ * 
+ * @author yijia
+ * @date 2021-05-18
+ */
+public interface ICustomerCardUseRecordService 
+{
+    /**
+     * 查询客户电子会员卡充值消费记录
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 客户电子会员卡充值消费记录
+     */
+    public CustomerCardUseRecord selectCustomerCardUseRecordById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值消费记录列表
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 客户电子会员卡充值消费记录集合
+     */
+    public List<CustomerCardUseRecord> selectCustomerCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 新增客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    public int insertCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 修改客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    public int updateCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
+    /**
+     * 批量删除客户电子会员卡充值消费记录
+     * 
+     * @param ids 需要删除的客户电子会员卡充值消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardUseRecordByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡充值消费记录信息
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardUseRecordById(Long id);
+}

+ 95 - 0
yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardUseRecordServiceImpl.java

@@ -0,0 +1,95 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerCardUseRecordMapper;
+import com.yijia.customer.domain.CustomerCardUseRecord;
+import com.yijia.customer.service.ICustomerCardUseRecordService;
+
+/**
+ * 客户电子会员卡充值消费记录Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-05-18
+ */
+@Service
+public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordService 
+{
+    @Autowired
+    private CustomerCardUseRecordMapper customerCardUseRecordMapper;
+
+    /**
+     * 查询客户电子会员卡充值消费记录
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 客户电子会员卡充值消费记录
+     */
+    @Override
+    public CustomerCardUseRecord selectCustomerCardUseRecordById(Long id)
+    {
+        return customerCardUseRecordMapper.selectCustomerCardUseRecordById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡充值消费记录列表
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 客户电子会员卡充值消费记录
+     */
+    @Override
+    public List<CustomerCardUseRecord> selectCustomerCardUseRecordList(CustomerCardUseRecord customerCardUseRecord)
+    {
+        return customerCardUseRecordMapper.selectCustomerCardUseRecordList(customerCardUseRecord);
+    }
+
+    /**
+     * 新增客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord)
+    {
+        customerCardUseRecord.setCreateTime(DateUtils.getNowDate());
+        return customerCardUseRecordMapper.insertCustomerCardUseRecord(customerCardUseRecord);
+    }
+
+    /**
+     * 修改客户电子会员卡充值消费记录
+     * 
+     * @param customerCardUseRecord 客户电子会员卡充值消费记录
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerCardUseRecord(CustomerCardUseRecord customerCardUseRecord)
+    {
+        return customerCardUseRecordMapper.updateCustomerCardUseRecord(customerCardUseRecord);
+    }
+
+    /**
+     * 批量删除客户电子会员卡充值消费记录
+     * 
+     * @param ids 需要删除的客户电子会员卡充值消费记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardUseRecordByIds(Long[] ids)
+    {
+        return customerCardUseRecordMapper.deleteCustomerCardUseRecordByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡充值消费记录信息
+     * 
+     * @param id 客户电子会员卡充值消费记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardUseRecordById(Long id)
+    {
+        return customerCardUseRecordMapper.deleteCustomerCardUseRecordById(id);
+    }
+}

+ 121 - 0
yijia-customer/src/main/resources/mapper/customer/CustomerCardUseRecordMapper.xml

@@ -0,0 +1,121 @@
+<?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">
+<mapper namespace="com.yijia.customer.mapper.CustomerCardUseRecordMapper">
+    
+    <resultMap type="CustomerCardUseRecord" id="CustomerCardUseRecordResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="unionId"    column="union_id"    />
+        <result property="customerNo"    column="customer_no"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="usageType"    column="usage_type"    />
+        <result property="payType"    column="pay_type"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="amt"    column="amt"    />
+        <result property="presentAmt"    column="present_amt"    />
+        <result property="balance"    column="balance"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectCustomerCardUseRecordVo">
+        select id, order_no, union_id, customer_no, customer_name, usage_type, pay_type, card_oils_type, amt, present_amt, balance, create_time, station_id, station_name, status from customer_card_use_record
+    </sql>
+
+    <select id="selectCustomerCardUseRecordList" parameterType="CustomerCardUseRecord" resultMap="CustomerCardUseRecordResult">
+        <include refid="selectCustomerCardUseRecordVo"/>
+        <where>  
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
+            <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="usageType != null  and usageType != ''"> and usage_type = #{usageType}</if>
+            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
+            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if>
+            <if test="amt != null "> and amt = #{amt}</if>
+            <if test="presentAmt != null "> and present_amt = #{presentAmt}</if>
+            <if test="balance != null "> and balance = #{balance}</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="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectCustomerCardUseRecordById" parameterType="Long" resultMap="CustomerCardUseRecordResult">
+        <include refid="selectCustomerCardUseRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerCardUseRecord" parameterType="CustomerCardUseRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into customer_card_use_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">order_no,</if>
+            <if test="unionId != null">union_id,</if>
+            <if test="customerNo != null">customer_no,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="usageType != null">usage_type,</if>
+            <if test="payType != null">pay_type,</if>
+            <if test="cardOilsType != null">card_oils_type,</if>
+            <if test="amt != null">amt,</if>
+            <if test="presentAmt != null">present_amt,</if>
+            <if test="balance != null">balance,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
+            <if test="status != null">status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">#{orderNo},</if>
+            <if test="unionId != null">#{unionId},</if>
+            <if test="customerNo != null">#{customerNo},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="usageType != null">#{usageType},</if>
+            <if test="payType != null">#{payType},</if>
+            <if test="cardOilsType != null">#{cardOilsType},</if>
+            <if test="amt != null">#{amt},</if>
+            <if test="presentAmt != null">#{presentAmt},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
+            <if test="status != null">#{status},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerCardUseRecord" parameterType="CustomerCardUseRecord">
+        update customer_card_use_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null">order_no = #{orderNo},</if>
+            <if test="unionId != null">union_id = #{unionId},</if>
+            <if test="customerNo != null">customer_no = #{customerNo},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="usageType != null">usage_type = #{usageType},</if>
+            <if test="payType != null">pay_type = #{payType},</if>
+            <if test="cardOilsType != null">card_oils_type = #{cardOilsType},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="presentAmt != null">present_amt = #{presentAmt},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
+            <if test="status != null">status = #{status},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerCardUseRecordById" parameterType="Long">
+        delete from customer_card_use_record where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerCardUseRecordByIds" parameterType="String">
+        delete from customer_card_use_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 39 - 39
yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java

@@ -996,48 +996,48 @@ public class StationClassStructureController extends BaseController
     //初始化数据 根据员工汇总
     @GetMapping("/selectPersonnelStructure")
     public TableDataInfo selectPersonnelStructure(StationClassStructure stationClassStructure)
-    {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        List<StationClassStructure> list = new ArrayList<>();
-        //根据油站查询出上次班结时间,
-        stationClassStructure.setStationId(currentUser.getUser().getDeptId());
-        StationClassStructure  structure=  stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        if(structure!=null){
-            PayOrder payOrder =new PayOrder();
-            payOrder.setStationId(structure.getStationId());
-            payOrder.setStatus("1");
-            payOrder.setBeginTime(sdf.format(structure.getClassStructureDate()));
-            List<PayOrder> payOrderList =  payOrderService.selectPersonnelStructure(payOrder);
-            for(PayOrder order:payOrderList){
-                StationClassStructure classStructure =new StationClassStructure();
-                classStructure.setOilPersonnel(order.getOilPersonnel());
-                classStructure.setOilGun(order.getOilGun());
-                classStructure.setAmt(order.getAmt());
-                classStructure.setOrderLiters(order.getOrderLiters());
-                classStructure.setOrderNo(order.getOrderNo());
-                list.add(classStructure);
-            }
-        }else{
-            //根据上次班结时间,和油站去订单表中查询数据,并按照人员汇总数据
-            PayOrder payOrder =new PayOrder();
-            payOrder.setStatus("1");
-            payOrder.setStationId(stationClassStructure.getStationId());
-            List<PayOrder> payOrderList=  payOrderService.selectPersonnelStructure(payOrder);
-            for(PayOrder order:payOrderList){
-                StationClassStructure classStructure =new StationClassStructure();
-                classStructure.setOilPersonnel(order.getOilPersonnel());
-                classStructure.setOilGun(order.getOilGun());
-                classStructure.setAmt(order.getAmt());
-                classStructure.setOrderLiters(order.getOrderLiters());
-                classStructure.setOrderNo(order.getOrderNo());
-                list.add(classStructure);
-            }
+{
+    LoginUser currentUser = SecurityUtils.getLoginUser();
+    List<StationClassStructure> list = new ArrayList<>();
+    //根据油站查询出上次班结时间,
+    stationClassStructure.setStationId(currentUser.getUser().getDeptId());
+    StationClassStructure  structure=  stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
+    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    if(structure!=null){
+        PayOrder payOrder =new PayOrder();
+        payOrder.setStationId(structure.getStationId());
+        payOrder.setStatus("1");
+        payOrder.setBeginTime(sdf.format(structure.getClassStructureDate()));
+        List<PayOrder> payOrderList =  payOrderService.selectPersonnelStructure(payOrder);
+        for(PayOrder order:payOrderList){
+            StationClassStructure classStructure =new StationClassStructure();
+            classStructure.setOilPersonnel(order.getOilPersonnel());
+            classStructure.setOilGun(order.getOilGun());
+            classStructure.setAmt(order.getAmt());
+            classStructure.setOrderLiters(order.getOrderLiters());
+            classStructure.setOrderNo(order.getOrderNo());
+            list.add(classStructure);
+        }
+    }else{
+        //根据上次班结时间,和油站去订单表中查询数据,并按照人员汇总数据
+        PayOrder payOrder =new PayOrder();
+        payOrder.setStatus("1");
+        payOrder.setStationId(stationClassStructure.getStationId());
+        List<PayOrder> payOrderList=  payOrderService.selectPersonnelStructure(payOrder);
+        for(PayOrder order:payOrderList){
+            StationClassStructure classStructure =new StationClassStructure();
+            classStructure.setOilPersonnel(order.getOilPersonnel());
+            classStructure.setOilGun(order.getOilGun());
+            classStructure.setAmt(order.getAmt());
+            classStructure.setOrderLiters(order.getOrderLiters());
+            classStructure.setOrderNo(order.getOrderNo());
+            list.add(classStructure);
         }
-
-        return getTable(list);
     }
 
+    return getTable(list);
+}
+
     /**
      * 初始化数据班结数据,根据油品汇总
      * @param stationClassStructure

+ 3 - 9
yijia-station/src/main/resources/mapper/station/StationDeviceManageMapper.xml

@@ -13,14 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deviceType"    column="device_type"    />
         <result property="deviceSerialNum"    column="device_serial_num"    />
         <result property="gunNo"    column="gun_no"    />
-        <result property="deviceStatus"    column="device_status"    />
         <result property="deviceFactory"    column="device_factory"    />
         <result property="posFanoutExchange"    column="pos_fanout_exchange"    />
         <result property="posQueue"    column="pos_queue"    />
     </resultMap>
 
     <sql id="selectStationDeviceManageVo">
-        select device_id, device_no, device_name, station_id, station_name, device_type, device_serial_num, gun_no,pos_fanout_exchange, pos_queue,device_status, device_factory from station_device_manage
+        select device_id, device_no, device_name, station_id, station_name, device_type, device_serial_num, gun_no,
+        pos_fanout_exchange, pos_queue, device_factory
+        from station_device_manage m join sys_dept d on m.
     </sql>
 
     <select id="selectStationDeviceManageList" parameterType="StationDeviceManage" resultMap="StationDeviceManageResult">
@@ -33,7 +34,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deviceType != null  and deviceType != ''"> and device_type = #{deviceType}</if>
             <if test="deviceSerialNum != null  and deviceSerialNum != ''"> and device_serial_num = #{deviceSerialNum}</if>
             <if test="gunNo != null  and gunNo != ''"> and gun_no = #{gunNo}</if>
-            <if test="deviceStatus != null  and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
             <if test="deviceFactory != null  and deviceFactory != ''"> and device_factory = #{deviceFactory}</if>
             <if test="posFanoutExchange != null  and posFanoutExchange != ''"> and pos_fanout_exchange = #{posFanoutExchange}</if>
             <if test="posQueue != null  and posQueue != ''"> and pos_queue = #{posQueue}</if>
@@ -59,11 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deviceNo != null">device_no,</if>
             <if test="deviceName != null">device_name,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="deviceType != null">device_type,</if>
             <if test="deviceSerialNum != null">device_serial_num,</if>
             <if test="gunNo != null">gun_no,</if>
-            <if test="deviceStatus != null">device_status,</if>
             <if test="deviceFactory != null">device_factory,</if>
             <if test="posFanoutExchange != null">pos_fanout_exchange,</if>
             <if test="posQueue != null">pos_queue,</if>
@@ -72,11 +70,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deviceNo != null">#{deviceNo},</if>
             <if test="deviceName != null">#{deviceName},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="deviceType != null">#{deviceType},</if>
             <if test="deviceSerialNum != null">#{deviceSerialNum},</if>
             <if test="gunNo != null">#{gunNo},</if>
-            <if test="deviceStatus != null">#{deviceStatus},</if>
             <if test="deviceFactory != null">#{deviceFactory},</if>
             <if test="posFanoutExchange != null">#{posFanoutExchange},</if>
             <if test="posQueue != null">#{posQueue},</if>
@@ -89,11 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deviceNo != null">device_no = #{deviceNo},</if>
             <if test="deviceName != null">device_name = #{deviceName},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="deviceType != null">device_type = #{deviceType},</if>
             <if test="deviceSerialNum != null">device_serial_num = #{deviceSerialNum},</if>
             <if test="gunNo != null">gun_no = #{gunNo},</if>
-            <if test="deviceStatus != null">device_status = #{deviceStatus},</if>
             <if test="deviceFactory != null">device_factory = #{deviceFactory},</if>
             <if test="posFanoutExchange != null">pos_fanout_exchange= #{posFanoutExchange},</if>
             <if test="posQueue != null">pos_queue=#{posQueue},</if>

+ 7 - 8
yijia-station/src/main/resources/mapper/station/StationOilPriceAdjustMapper.xml

@@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <select id="selectStationOilPriceAdjustList" parameterType="StationOilPriceAdjust" resultMap="StationOilPriceAdjustResult">
-        select a.adjust_price_id, a.oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator,
-        a.oil_price_id,a.status
-        from station_oil_price_adjust a join sys_dept  d on a.station_id =d.dept_id
+        select a.adjust_price_id, p.oil_name as oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator, a.oil_price_id,a.status
+        from station_oil_price_adjust a
+        join sys_dept  d on a.station_id =d.dept_id
+        join station_oil_price p on p.oil_price_id =a.oil_price_id
         <where>
-            <if test="oilName != null  and oilName != ''"> and a.oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilName != null  and oilName != ''"> and p.oil_name like concat('%', #{oilName}, '%')</if>
             <if test="oilAdjustPrice != null  and oilAdjustPrice != ''"> and a.oil_adjust_price = #{oilAdjustPrice}</if>
             <if test="takeEffectStatus != null  and takeEffectStatus != ''"> and a.take_effect_status = #{takeEffectStatus}</if>
             <if test="takeEffectDate != null "> and a.take_effect_date = #{takeEffectDate}</if>
@@ -46,16 +47,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectStationOilPriceAdjustById" parameterType="Long" resultMap="StationOilPriceAdjustResult">
-         select a.adjust_price_id, a.oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator,
+        select a.adjust_price_id, p.oil_name as oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator,
         a.oil_price_id,a.status
         from station_oil_price_adjust a join sys_dept  d on a.station_id =d.dept_id
+         join station_oil_price p on p.oil_price_id =a.oil_price_id
         where a.adjust_price_id = #{adjustPriceId}
     </select>
 
     <insert id="insertStationOilPriceAdjust" parameterType="StationOilPriceAdjust" useGeneratedKeys="true" keyProperty="adjustPriceId">
         insert into station_oil_price_adjust
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="oilName != null">oil_name,</if>
             <if test="oilAdjustPrice != null">oil_adjust_price,</if>
             <if test="takeEffectStatus != null">take_effect_status,</if>
             <if test="takeEffectDate != null">take_effect_date,</if>
@@ -66,7 +67,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null "> status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="oilName != null">#{oilName},</if>
             <if test="oilAdjustPrice != null">#{oilAdjustPrice},</if>
             <if test="takeEffectStatus != null">#{takeEffectStatus},</if>
             <if test="takeEffectDate != null">#{takeEffectDate},</if>
@@ -81,7 +81,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateStationOilPriceAdjust" parameterType="StationOilPriceAdjust">
         update station_oil_price_adjust
         <trim prefix="SET" suffixOverrides=",">
-            <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="oilAdjustPrice != null">oil_adjust_price = #{oilAdjustPrice},</if>
             <if test="takeEffectStatus != null">take_effect_status = #{takeEffectStatus},</if>
             <if test="takeEffectDate != null">take_effect_date = #{takeEffectDate},</if>

+ 0 - 3
yijia-station/src/main/resources/mapper/station/StationOilPriceMapper.xml

@@ -82,14 +82,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <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>
          </trim>
     </insert>
@@ -100,7 +98,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
         </trim>
         where oil_price_id = #{oilPriceId}

+ 10 - 12
yijia-station/src/main/resources/mapper/station/StationPersonnelMapper.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.station.mapper.StationPersonnelMapper">
-    
+
     <resultMap type="StationPersonnel" id="StationPersonnelResult">
         <result property="personnelId"    column="personnel_id"    />
         <result property="personnelName"    column="personnel_name"    />
@@ -15,16 +15,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectStationPersonnelVo">
-        select personnel_id, personnel_name, gun_no, station_id, station_name, qr_code, personnel_phone from station_personnel
+     	select personnel_id, personnel_name, gun_no, station_id, d.dept_name as station_name, qr_code, personnel_phone
+        from station_personnel p join  sys_dept d on  p.station_id = d.dept_id
     </sql>
 
     <select id="selectStationPersonnelList" parameterType="StationPersonnel" resultMap="StationPersonnelResult">
         <include refid="selectStationPersonnelVo"/>
-        <where>  
+        <where>
             <if test="personnelName != null  and personnelName != ''"> and personnel_name like concat('%', #{personnelName}, '%')</if>
             <if test="gunNo != null  and gunNo != ''"> and gun_no = #{gunNo}</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="dept_name != null  and dept_name != ''"> and dept_name like concat('%', #{stationName}, '%')</if>
             <if test="qrCode != null  and qrCode != ''"> and qr_code = #{qrCode}</if>
             <if test="personnelPhone != null  and personnelPhone != ''"> and personnel_phone = #{personnelPhone}</if>
             <if test="stationIdList != null ">
@@ -37,12 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by personnel_id desc
     </select>
-    
+
     <select id="selectStationPersonnelById" parameterType="Long" resultMap="StationPersonnelResult">
         <include refid="selectStationPersonnelVo"/>
         where personnel_id = #{personnelId}
     </select>
-        
+
     <insert id="insertStationPersonnel" parameterType="StationPersonnel">
         insert into station_personnel
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -50,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="personnelName != null">personnel_name,</if>
             <if test="gunNo != null">gun_no,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="qrCode != null">qr_code,</if>
             <if test="personnelPhone != null">personnel_phone,</if>
          </trim>
@@ -59,7 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="personnelName != null">#{personnelName},</if>
             <if test="gunNo != null">#{gunNo},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="qrCode != null">#{qrCode},</if>
             <if test="personnelPhone != null">#{personnelPhone},</if>
          </trim>
@@ -71,7 +70,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="personnelName != null">personnel_name = #{personnelName},</if>
             <if test="gunNo != null">gun_no = #{gunNo},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="qrCode != null">qr_code = #{qrCode},</if>
             <if test="personnelPhone != null">personnel_phone = #{personnelPhone},</if>
         </trim>
@@ -83,10 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationPersonnelByIds" parameterType="String">
-        delete from station_personnel where personnel_id in 
+        delete from station_personnel where personnel_id in
         <foreach item="personnelId" collection="array" open="(" separator="," close=")">
             #{personnelId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 358 - 0
yijia-system/src/main/java/com/yijia/system/domain/SysDeptDemo.java

@@ -0,0 +1,358 @@
+package com.yijia.system.domain;
+
+import com.yijia.common.core.domain.BaseEntity;
+import com.yijia.common.core.domain.entity.SysDept;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SysDeptDemo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 部门ID */
+    private Long deptId;
+
+    /** 父部门ID */
+    private Long parentId;
+
+    /** 祖级列表 */
+    private String ancestors;
+
+    /** 部门名称 */
+    private String deptName;
+
+    /** 显示顺序 */
+    private String orderNum;
+
+    /** 负责人 */
+    private String leader;
+
+    /** 联系电话 */
+    private String phone;
+
+    /** 邮箱 */
+    private String email;
+
+    /** 部门状态:0正常,1停用 */
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 父部门名称 */
+    private String parentName;
+
+    /** 集团级别 */
+    private Integer jiBie;
+
+    /** 油站地址 */
+    private String deptAddress;
+
+    /** 油枪数量 */
+    private Long oilGunNum;
+
+    /** 油站照片 */
+    private String stationPic;
+
+    /** 子部门 */
+    private List<SysDept> children = new ArrayList<SysDept>();
+
+    private List<String> deptIdList;
+
+    private Long orDeptId;
+    /** 该油站的优惠方案:0,不执行优惠方案;1,满减;2,立减;3,直降; */
+    private String discountSetting;
+    /** 是否开启电子卡功能:0,否;1,是 */
+    private String cardEnabledFlag;
+    /** 照片1*/
+    private String image1;
+    /** 照片2*/
+    private String image2;
+    /** 照片3*/
+    private String image3;
+    /** 照片4*/
+    private String image4;
+    /** 照片5*/
+    private String image5;
+    /**班结是否打印(1,是 2 否)*/
+    private String wsPrintFlag;
+    /**打印小票(1 客户联 2 商户联 3商户联和客户联)*/
+    private String printSetting;
+    /**公告*/
+    private String notice;
+    /**积分是否打印(1,是 2 否)*/
+    private String integralPrintFlag;
+    /**积分是否启用(1.启用,2 关闭)*/
+    private String integralFlag;
+    /**积分规则是否共享*/
+    private String  integralRuleFlag;
+    /**电子卡规则是否共享*/
+    private String  cardRuleFlag;
+    /**优惠劵是否共享*/
+    private String  couponFlag;
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public String getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(String orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public String getLeader() {
+        return leader;
+    }
+
+    public void setLeader(String leader) {
+        this.leader = leader;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getParentName() {
+        return parentName;
+    }
+
+    public void setParentName(String parentName) {
+        this.parentName = parentName;
+    }
+
+    public Integer getJiBie() {
+        return jiBie;
+    }
+
+    public void setJiBie(Integer jiBie) {
+        this.jiBie = jiBie;
+    }
+
+    public String getDeptAddress() {
+        return deptAddress;
+    }
+
+    public void setDeptAddress(String deptAddress) {
+        this.deptAddress = deptAddress;
+    }
+
+    public Long getOilGunNum() {
+        return oilGunNum;
+    }
+
+    public void setOilGunNum(Long oilGunNum) {
+        this.oilGunNum = oilGunNum;
+    }
+
+    public String getStationPic() {
+        return stationPic;
+    }
+
+    public void setStationPic(String stationPic) {
+        this.stationPic = stationPic;
+    }
+
+    public List<SysDept> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysDept> children) {
+        this.children = children;
+    }
+
+    public List<String> getDeptIdList() {
+        return deptIdList;
+    }
+
+    public void setDeptIdList(List<String> deptIdList) {
+        this.deptIdList = deptIdList;
+    }
+
+    public Long getOrDeptId() {
+        return orDeptId;
+    }
+
+    public void setOrDeptId(Long orDeptId) {
+        this.orDeptId = orDeptId;
+    }
+
+    public String getDiscountSetting() {
+        return discountSetting;
+    }
+
+    public void setDiscountSetting(String discountSetting) {
+        this.discountSetting = discountSetting;
+    }
+
+    public String getCardEnabledFlag() {
+        return cardEnabledFlag;
+    }
+
+    public void setCardEnabledFlag(String cardEnabledFlag) {
+        this.cardEnabledFlag = cardEnabledFlag;
+    }
+
+    public String getImage1() {
+        return image1;
+    }
+
+    public void setImage1(String image1) {
+        this.image1 = image1;
+    }
+
+    public String getImage2() {
+        return image2;
+    }
+
+    public void setImage2(String image2) {
+        this.image2 = image2;
+    }
+
+    public String getImage3() {
+        return image3;
+    }
+
+    public void setImage3(String image3) {
+        this.image3 = image3;
+    }
+
+    public String getImage4() {
+        return image4;
+    }
+
+    public void setImage4(String image4) {
+        this.image4 = image4;
+    }
+
+    public String getImage5() {
+        return image5;
+    }
+
+    public void setImage5(String image5) {
+        this.image5 = image5;
+    }
+
+    public String getWsPrintFlag() {
+        return wsPrintFlag;
+    }
+
+    public void setWsPrintFlag(String wsPrintFlag) {
+        this.wsPrintFlag = wsPrintFlag;
+    }
+
+    public String getPrintSetting() {
+        return printSetting;
+    }
+
+    public void setPrintSetting(String printSetting) {
+        this.printSetting = printSetting;
+    }
+
+    public String getNotice() {
+        return notice;
+    }
+
+    public void setNotice(String notice) {
+        this.notice = notice;
+    }
+
+    public String getIntegralPrintFlag() {
+        return integralPrintFlag;
+    }
+
+    public void setIntegralPrintFlag(String integralPrintFlag) {
+        this.integralPrintFlag = integralPrintFlag;
+    }
+
+    public String getIntegralFlag() {
+        return integralFlag;
+    }
+
+    public void setIntegralFlag(String integralFlag) {
+        this.integralFlag = integralFlag;
+    }
+
+    public String getIntegralRuleFlag() {
+        return integralRuleFlag;
+    }
+
+    public void setIntegralRuleFlag(String integralRuleFlag) {
+        this.integralRuleFlag = integralRuleFlag;
+    }
+
+    public String getCardRuleFlag() {
+        return cardRuleFlag;
+    }
+
+    public void setCardRuleFlag(String cardRuleFlag) {
+        this.cardRuleFlag = cardRuleFlag;
+    }
+
+    public String getCouponFlag() {
+        return couponFlag;
+    }
+
+    public void setCouponFlag(String couponFlag) {
+        this.couponFlag = couponFlag;
+    }
+}

+ 2 - 0
yijia-system/src/main/java/com/yijia/system/service/impl/SysDeptServiceImpl.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.stream.Collectors;
+
+import com.yijia.system.domain.SysDeptDemo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.yijia.common.annotation.DataScope;

+ 8 - 1
yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -154,7 +154,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	<select id="getGroupInfo" resultMap="SysDeptResult">
 		<include refid="selectDeptVo"/>
-		where dept_id = #{deptId} and ji_bie = "1"
+		<where>
+			<if test="deptId != null ">
+				AND dept_id = #{deptId}
+			</if>
+			<if test="parentId != null ">
+				AND parent_id = #{parentId}
+			</if>
+		</where>
 	</select>
 
     <insert id="insertDept" parameterType="SysDept">