瀏覽代碼

退款信息修改,班结统计的方式,退款审核2021-10-15

2297027248@qq.com 3 年之前
父節點
當前提交
cae886350f
共有 90 個文件被更改,包括 2841 次插入797 次删除
  1. 414 353
      .idea/workspace.xml
  2. 2 2
      yijia-admin/src/main/resources/application-druid.yml
  3. 2 2
      yijia-admin/src/main/resources/logback.xml
  4. 2 2
      yijia-admin/target/classes/application-druid.yml
  5. 4 4
      yijia-admin/target/classes/application.yml
  6. 2 2
      yijia-admin/target/classes/logback.xml
  7. 1 1
      yijia-admin/target/maven-archiver/pom.properties
  8. 二進制
      yijia-admin/target/yijia-admin.jar
  9. 二進制
      yijia-admin/target/yijia-admin.jar.original
  10. 17 6
      yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java
  11. 二進制
      yijia-common/target/classes/com/yijia/common/core/domain/entity/SysDept.class
  12. 1 1
      yijia-common/target/maven-archiver/pom.properties
  13. 二進制
      yijia-common/target/yijia-common-1.0.1.jar
  14. 1 1
      yijia-coupon/target/maven-archiver/pom.properties
  15. 二進制
      yijia-coupon/target/yijia-coupon-1.0.1.jar
  16. 48 12
      yijia-customer/src/main/java/com/yijia/customer/controller/CardExcelImportController.java
  17. 52 3
      yijia-customer/src/main/java/com/yijia/customer/domain/CardExcelImport.java
  18. 48 0
      yijia-customer/src/main/java/com/yijia/customer/domain/CardListImport.java
  19. 26 1
      yijia-customer/src/main/java/com/yijia/customer/mapper/CardExcelImportMapper.java
  20. 26 2
      yijia-customer/src/main/java/com/yijia/customer/service/ICardExcelImportService.java
  21. 232 18
      yijia-customer/src/main/java/com/yijia/customer/service/impl/CardExcelImportServiceImpl.java
  22. 41 3
      yijia-customer/src/main/resources/mapper/customer/CardExcelImportMapper.xml
  23. 4 4
      yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml
  24. 二進制
      yijia-customer/target/classes/com/yijia/customer/controller/CardExcelImportController.class
  25. 二進制
      yijia-customer/target/classes/com/yijia/customer/domain/CardExcelImport.class
  26. 二進制
      yijia-customer/target/classes/com/yijia/customer/mapper/CardExcelImportMapper.class
  27. 二進制
      yijia-customer/target/classes/com/yijia/customer/service/ICardExcelImportService.class
  28. 二進制
      yijia-customer/target/classes/com/yijia/customer/service/impl/CardExcelImportServiceImpl.class
  29. 41 3
      yijia-customer/target/classes/mapper/customer/CardExcelImportMapper.xml
  30. 4 4
      yijia-customer/target/classes/mapper/customer/CustomerManageMapper.xml
  31. 1 1
      yijia-customer/target/maven-archiver/pom.properties
  32. 1 0
      yijia-customer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  33. 1 0
      yijia-customer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  34. 二進制
      yijia-customer/target/yijia-customer-1.0.1.jar
  35. 1 1
      yijia-framework/target/maven-archiver/pom.properties
  36. 二進制
      yijia-framework/target/yijia-framework-1.0.1.jar
  37. 1 1
      yijia-generator/target/maven-archiver/pom.properties
  38. 二進制
      yijia-generator/target/yijia-generator-1.0.1.jar
  39. 2 2
      yijia-integral/pom.xml
  40. 5 6
      yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRuleDetail.java
  41. 7 16
      yijia-integral/src/main/java/com/yijia/integral/service/impl/IntegralRuleServiceImpl.java
  42. 1 0
      yijia-integral/src/main/resources/mapper/integral/CustomerPointsRecordMapper.xml
  43. 二進制
      yijia-integral/target/classes/com/yijia/integral/domain/IntegralRuleDetail.class
  44. 二進制
      yijia-integral/target/classes/com/yijia/integral/service/impl/IntegralRuleServiceImpl.class
  45. 1 0
      yijia-integral/target/classes/mapper/integral/CustomerPointsRecordMapper.xml
  46. 1 1
      yijia-integral/target/maven-archiver/pom.properties
  47. 二進制
      yijia-integral/target/yijia-integral-1.0.1.jar
  48. 2 6
      yijia-integral/yijia-integral.iml
  49. 36 10
      yijia-label/src/main/resources/mapper/label/CustomerLabelDemoMapper.xml
  50. 36 10
      yijia-label/target/classes/mapper/label/CustomerLabelDemoMapper.xml
  51. 1 1
      yijia-label/target/maven-archiver/pom.properties
  52. 二進制
      yijia-label/target/yijia-label-1.0.1.jar
  53. 15 18
      yijia-market/src/main/java/com/yijia/markert/controller/MarkertPlanController.java
  54. 二進制
      yijia-market/target/classes/com/yijia/markert/controller/MarkertPlanController.class
  55. 1 1
      yijia-market/target/maven-archiver/pom.properties
  56. 二進制
      yijia-market/target/yijia-market-1.0.1.jar
  57. 1 1
      yijia-quartz/target/maven-archiver/pom.properties
  58. 二進制
      yijia-quartz/target/yijia-quartz-1.0.1.jar
  59. 4 3
      yijia-station/pom.xml
  60. 245 118
      yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java
  61. 440 131
      yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java
  62. 47 0
      yijia-station/src/main/java/com/yijia/station/controller/SysAppUserInfoController.java
  63. 96 6
      yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java
  64. 38 4
      yijia-station/src/main/java/com/yijia/station/domain/StationClassStructure.java
  65. 17 6
      yijia-station/src/main/java/com/yijia/station/domain/StationClassesSummary.java
  66. 225 0
      yijia-station/src/main/java/com/yijia/station/domain/SysAppUserInfo.java
  67. 33 0
      yijia-station/src/main/java/com/yijia/station/mapper/SysAppUserInfoMapper.java
  68. 6 1
      yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java
  69. 30 0
      yijia-station/src/main/java/com/yijia/station/service/ISysAppUserInfoService.java
  70. 194 4
      yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java
  71. 45 0
      yijia-station/src/main/java/com/yijia/station/service/impl/SysAppUserInfoImpl.java
  72. 92 3
      yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml
  73. 33 9
      yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml
  74. 6 2
      yijia-station/src/main/resources/mapper/station/StationClassesSummaryMapper.xml
  75. 86 0
      yijia-station/src/main/resources/mapper/station/SysAppUserInfoMapper.xml
  76. 二進制
      yijia-station/target/classes/com/yijia/station/controller/PayOrderController.class
  77. 二進制
      yijia-station/target/classes/com/yijia/station/controller/StationClassStructureController.class
  78. 二進制
      yijia-station/target/classes/com/yijia/station/domain/PayOrder.class
  79. 二進制
      yijia-station/target/classes/com/yijia/station/service/IPayOrderService.class
  80. 二進制
      yijia-station/target/classes/com/yijia/station/service/impl/PayOrderServiceImpl.class
  81. 92 3
      yijia-station/target/classes/mapper/station/PayOrderMapper.xml
  82. 1 1
      yijia-station/target/maven-archiver/pom.properties
  83. 5 0
      yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  84. 5 0
      yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  85. 二進制
      yijia-station/target/yijia-station-1.0.1.jar
  86. 4 0
      yijia-station/yijia-station.iml
  87. 7 3
      yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml
  88. 7 3
      yijia-system/target/classes/mapper/system/SysDeptMapper.xml
  89. 1 1
      yijia-system/target/maven-archiver/pom.properties
  90. 二進制
      yijia-system/target/yijia-system-1.0.1.jar

文件差異過大導致無法顯示
+ 414 - 353
.idea/workspace.xml


+ 2 - 2
yijia-admin/src/main/resources/application-druid.yml

@@ -7,8 +7,8 @@ spring:
             # 主库数据源
             master:
                 #url: jdbc:mysql://47.105.116.204:3306/jiaduoduo_db_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                #url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                #url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: develop
                 password: 1234.Abcd
                 #url: jdbc:mysql://localhost:3306/jiaduoduo_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8

+ 2 - 2
yijia-admin/src/main/resources/logback.xml

@@ -2,9 +2,9 @@
 <configuration>
     <!-- 日志存放路径 -->
    <!--<property name="log.path" value="/home/testDemo/logs" />-->
-    <property name="log.path" value="/home/devnote/deBugJar/logs" />
+   <property name="log.path" value="/home/devnote/deBugJar/logs" />
     <!--<property name="log.path" value="/home/devnote/demoJar/logs" />-->
-   <!-- <property name="log.path" value="/home/prodJar/logs" />-->
+    <!--<property name="log.path" value="/home/prodJar/logs" />-->
 
      <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />

+ 2 - 2
yijia-admin/target/classes/application-druid.yml

@@ -6,9 +6,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://47.105.116.204:3306/jiaduoduo_db_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                #url: jdbc:mysql://47.105.116.204:3306/jiaduoduo_db_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 #url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                #url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: develop
                 password: 1234.Abcd
                 #url: jdbc:mysql://localhost:3306/jiaduoduo_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8

+ 4 - 4
yijia-admin/target/classes/application.yml

@@ -10,11 +10,11 @@ yijia:
   demoEnabled: true
   # 文件路径
   #正式服务器
-  profile: /home/uploadfile/images
-  imageurl: http://image.huijy.net:8088/images
-  #测试服务器
   #profile: /home/uploadfile/images
-  #imageurl: http://upload.huijy.net:8088/images
+  #imageurl: http://image.huijy.net:8088/images
+  #测试服务器
+  profile: /home/uploadfile/images
+  imageurl: http://upload.huijy.net:8088/images
   #本地测试服务
   # profile: D:/img
   #图片地址

+ 2 - 2
yijia-admin/target/classes/logback.xml

@@ -2,9 +2,9 @@
 <configuration>
     <!-- 日志存放路径 -->
    <!--<property name="log.path" value="/home/testDemo/logs" />-->
-    <!--<property name="log.path" value="/home/devnote/deBugJar/logs" />-->
+   <property name="log.path" value="/home/devnote/deBugJar/logs" />
     <!--<property name="log.path" value="/home/devnote/demoJar/logs" />-->
-    <property name="log.path" value="/home/prodJar/logs" />
+    <!--<property name="log.path" value="/home/prodJar/logs" />-->
 
      <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />

+ 1 - 1
yijia-admin/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:33 CST 2021
+#Mon Oct 11 10:34:23 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-admin

二進制
yijia-admin/target/yijia-admin.jar


二進制
yijia-admin/target/yijia-admin.jar.original


+ 17 - 6
yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java

@@ -1,14 +1,15 @@
 package com.yijia.common.core.domain.entity;
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
+import com.yijia.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
 import javax.validation.constraints.Email;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.yijia.common.core.domain.BaseEntity;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 部门表 sys_dept
@@ -252,6 +253,16 @@ public class SysDept extends BaseEntity
     /**云闪付密钥*/
     private String  yunKey;
 
+    /*退款的审核状态*/
+    private String  refundExaminStatus;
+
+    public String getRefundExaminStatus() {
+        return refundExaminStatus;
+    }
+
+    public void setRefundExaminStatus(String refundExaminStatus) {
+        this.refundExaminStatus = refundExaminStatus;
+    }
 
     public BigDecimal getBalance() {
         return balance;

二進制
yijia-common/target/classes/com/yijia/common/core/domain/entity/SysDept.class


+ 1 - 1
yijia-common/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:18 CST 2021
+#Mon Oct 11 10:34:11 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-common

二進制
yijia-common/target/yijia-common-1.0.1.jar


+ 1 - 1
yijia-coupon/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:27 CST 2021
+#Mon Oct 11 10:34:16 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-coupon

二進制
yijia-coupon/target/yijia-coupon-1.0.1.jar


+ 48 - 12
yijia-customer/src/main/java/com/yijia/customer/controller/CardExcelImportController.java

@@ -4,23 +4,19 @@ package com.yijia.customer.controller;
 import com.yijia.common.annotation.Log;
 import com.yijia.common.core.controller.BaseController;
 import com.yijia.common.core.domain.AjaxResult;
-import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
 import com.yijia.common.core.page.TableDataInfo;
 import com.yijia.common.enums.BusinessType;
 import com.yijia.common.utils.SecurityUtils;
 import com.yijia.common.utils.poi.ExcelUtil;
 import com.yijia.customer.domain.CardExcelImport;
-import com.yijia.customer.domain.CustomerCardUseRecord;
+import com.yijia.customer.domain.CardListImport;
 import com.yijia.customer.service.ICardExcelImportService;
-import com.yijia.customer.service.ICustomerCardUseRecordService;
 import com.yijia.system.service.ISysDeptService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
-
 import java.util.List;
 
 /**
@@ -62,6 +58,9 @@ public class CardExcelImportController extends BaseController
     @GetMapping("/list")
     public TableDataInfo selectCardExcelImportList(CardExcelImport  cardExcelImport)
     {
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        cardExcelImport.setStationId(Integer.parseInt(loginUser.getUser().getDeptId()+""));
+        cardExcelImport.setDelFlag("0");
         startPage();
         List<CardExcelImport> recordList = cardExcelImportService.selectCardExcelImportList(cardExcelImport);
         return getDataTable(recordList);
@@ -90,7 +89,7 @@ public class CardExcelImportController extends BaseController
         ExcelUtil<CardExcelImport> util = new ExcelUtil<CardExcelImport>(CardExcelImport.class);
         List<CardExcelImport> studentList = util.importExcel(file.getInputStream());
         LoginUser loginUser = SecurityUtils.getLoginUser();
-        String message = cardExcelImportService.importData(studentList,loginUser.getUser().getDeptId());
+        String message = cardExcelImportService.importData(studentList,loginUser.getUser().getDeptId(),loginUser.getUser().getUserId());
         return AjaxResult.success(message);
     }
 
@@ -105,9 +104,28 @@ public class CardExcelImportController extends BaseController
 
         LoginUser loginUser = SecurityUtils.getLoginUser();
 
-        String message = cardExcelImportService.importData(cardExcelImports,loginUser.getUser().getDeptId() );
+        String message = cardExcelImportService.importData(cardExcelImports,loginUser.getUser().getDeptId(),loginUser.getUser().getUserId() );
         return AjaxResult.success(message);
     }
+
+
+    /**
+     * 批量修改信息
+     */
+    @PostMapping("/updateCardList")
+    @ResponseBody
+    public AjaxResult updateCardList( @RequestBody CardListImport cardListImport)
+    {
+
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        String message= null;
+        try {
+            message = cardExcelImportService.updatListData(cardListImport,loginUser.getUser().getDeptId());
+        } catch (Exception e) {
+            return  AjaxResult.error(message);
+        }
+        return  AjaxResult.success(message);
+    }
     /**
      * 新增导入的信息
      *
@@ -129,8 +147,19 @@ public class CardExcelImportController extends BaseController
      */
     @Log(title = "修改导入信息", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult updateCardExcelImport(CardExcelImport cardExcelImport)
+    public AjaxResult updateCardExcelImport( @RequestBody CardExcelImport cardExcelImport)
     {
+        CardExcelImport cardExcelImport1=new CardExcelImport();
+        cardExcelImport1.setPhoneNumber(cardExcelImport.getPhoneNumber());
+        cardExcelImport1.setImportFlag("0");
+        cardExcelImport1.setDelFlag("0");
+        List<CardExcelImport> cardExcelImportList=cardExcelImportService.selectCardExcelImportList(cardExcelImport1);
+        if(cardExcelImportList.size()>0){
+            if(!cardExcelImport.getExcelId().equals(cardExcelImportList.get(0).getExcelId())){
+                return AjaxResult.error("手机号重复");
+            }
+        }
+
         return toAjax( cardExcelImportService.updateCardExcelImport(cardExcelImport));
     }
 
@@ -140,11 +169,18 @@ public class CardExcelImportController extends BaseController
      * @param ids 需要删除的客户电子会员卡充值消费记录ID
      * @return 结果
      */
-    @Log(title = "批量删除导入的信息", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult deleteCardExcelImportByIds(Long[] ids)
+    @PostMapping("/deleteIds")
+    @ResponseBody
+    public AjaxResult deleteCardExcelImportByIds(@RequestBody Long[] ids)
     {
-        return toAjax( cardExcelImportService.deleteCardExcelImportByIds(ids));
+        int i=0;
+        try {
+           i= cardExcelImportService.updateCardExcelImportDelFlag(ids);
+        } catch (Exception e) {
+            return AjaxResult.error("删除失败");
+        }
+
+        return toAjax(i);
     }
 
 

+ 52 - 3
yijia-customer/src/main/java/com/yijia/customer/domain/CardExcelImport.java

@@ -1,11 +1,13 @@
 package com.yijia.customer.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yijia.common.annotation.Excel;
 import com.yijia.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 public class CardExcelImport extends BaseEntity
@@ -14,7 +16,7 @@ public class CardExcelImport extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 导入excel的id */
-    private Long excelId;
+    private Integer excelId;
 
     /** 剩余可用余额 */
     @Excel(name = "可用的余额")
@@ -54,6 +56,53 @@ public class CardExcelImport extends BaseEntity
     @Excel(name = "发放方式的id")
     private String couponIssueId;
 
+    /** 导入状态*/
+
+    private String importFlag;
+
+    /** 删除标志*/
+
+    private String delFlag;
+
+    /** 导入状态*/
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date importExcelDate;
+
+    /** 删除标志*/
+    private Long importExcelUser;
+
+    public Date getImportExcelDate() {
+        return importExcelDate;
+    }
+
+    public void setImportExcelDate(Date importExcelDate) {
+        this.importExcelDate = importExcelDate;
+    }
+
+    public Long getImportExcelUser() {
+        return importExcelUser;
+    }
+
+    public void setImportExcelUser(Long importExcelUser) {
+        this.importExcelUser = importExcelUser;
+    }
+
+    public String getImportFlag() {
+        return importFlag;
+    }
+
+    public void setImportFlag(String importFlag) {
+        this.importFlag = importFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
     public Integer getLabelId() {
         return labelId;
     }
@@ -86,11 +135,11 @@ public class CardExcelImport extends BaseEntity
         this.stationName = stationName;
     }
 
-    public Long getExcelId() {
+    public Integer getExcelId() {
         return excelId;
     }
 
-    public void setExcelId(Long excelId) {
+    public void setExcelId(Integer excelId) {
         this.excelId = excelId;
     }
 

+ 48 - 0
yijia-customer/src/main/java/com/yijia/customer/domain/CardListImport.java

@@ -0,0 +1,48 @@
+package com.yijia.customer.domain;
+
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+
+import java.util.List;
+
+public class CardListImport extends BaseEntity
+
+{
+
+
+    /** 剩余可用余额 */
+    @Excel(name = "类型")
+    private String type;
+
+    /** 剩余积分的值*/
+    @Excel(name = "信息手机号")
+    private List<String> phoneArr;
+
+    /** 用户手机号*/
+    @Excel(name = "传入的id信息")
+    private String id;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public List<String> getPhoneArr() {
+        return phoneArr;
+    }
+
+    public void setPhoneArr(List<String> phoneArr) {
+        this.phoneArr = phoneArr;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+}

+ 26 - 1
yijia-customer/src/main/java/com/yijia/customer/mapper/CardExcelImportMapper.java

@@ -1,7 +1,6 @@
 package com.yijia.customer.mapper;
 
 import com.yijia.customer.domain.CardExcelImport;
-import com.yijia.customer.domain.CustomerCardUseRecord;
 
 import java.util.List;
 
@@ -73,6 +72,32 @@ public interface CardExcelImportMapper
     public int deleteCardExcelImportByIds(Long[] ids);
 
 
+    /**
+     * 修改信息
+     *
+     * @param cardExcelImport 需要删除的数据ID
+     * @return 结果
+     */
+    public int updateCardExcelGrade(CardExcelImport cardExcelImport);
+
+
+
+    /**
+     * 修改信息
+     *
+     * @param cardExcelImport 需要删除的数据ID
+     * @return 结果
+     */
+    public int updateCardExcelLabel(CardExcelImport cardExcelImport);
+
+
+    /**
+     * 修改信息
+     *
+     * @param cardExcelImport 需要删除的数据ID
+     * @return 结果
+     */
+    public int updateCardExcelCoupon(CardExcelImport cardExcelImport);
 
 
 

+ 26 - 2
yijia-customer/src/main/java/com/yijia/customer/service/ICardExcelImportService.java

@@ -1,7 +1,7 @@
 package com.yijia.customer.service;
 
 import com.yijia.customer.domain.CardExcelImport;
-import com.yijia.customer.domain.CustomerCardUseRecord;
+import com.yijia.customer.domain.CardListImport;
 
 import java.util.List;
 
@@ -48,6 +48,15 @@ public interface ICardExcelImportService
      */
     public int insertCardExcelImport(CardExcelImport cardExcelImport);
 
+
+    /**
+     * 逻辑批量删除
+     *
+     * @param ids 删除信息
+     * @return 新增结果
+     */
+    public int updateCardExcelImportDelFlag(Long[] ids ) throws  Exception;
+
     /**
      * 修改导入的excel信息
      *
@@ -79,7 +88,22 @@ public interface ICardExcelImportService
      * @param dataManagementList 数据列表
      * @return 结果
      */
-    public String importData(List<CardExcelImport> dataManagementList,Long deptId);
+    public String importData(List<CardExcelImport> dataManagementList,Long deptId,Long userId);
+
+
+    public String updatListData(CardListImport cardListImport, Long deptId) throws  Exception;
+
+
+
+
+    //批量置空
+    public int updateCardExcelGrade(CardExcelImport cardExcelImport);
+
+    public int updateCardExcelLabel(CardExcelImport cardExcelImport);
+
+    public int updateCardExcelCoupon(CardExcelImport cardExcelImport);
+
+
 
 
 

+ 232 - 18
yijia-customer/src/main/java/com/yijia/customer/service/impl/CardExcelImportServiceImpl.java

@@ -1,24 +1,23 @@
 package com.yijia.customer.service.impl;
 
-import com.yijia.customer.mapper.CustomerGradeSettingMapper;
-import com.yijia.label.mapper.LabelRuleMapper;
-import com.yijia.label.domain.LabelRule;
-import com.yijia.coupon.domain.CouponIssue;
 import com.yijia.common.exception.CustomException;
-import com.yijia.common.utils.DateUtils;
 import com.yijia.common.utils.StringUtils;
-import com.yijia.coupon.mapper.CouponIssueMapper;
 import com.yijia.coupon.domain.CouponIssue;
+import com.yijia.coupon.mapper.CouponIssueMapper;
 import com.yijia.customer.domain.CardExcelImport;
-import com.yijia.customer.domain.CustomerCardUseRecord;
+import com.yijia.customer.domain.CardListImport;
+import com.yijia.customer.domain.CustomerGradeSetting;
 import com.yijia.customer.mapper.CardExcelImportMapper;
-import com.yijia.customer.mapper.CustomerCardUseRecordMapper;
+import com.yijia.customer.mapper.CustomerGradeSettingMapper;
 import com.yijia.customer.service.ICardExcelImportService;
-import com.yijia.customer.service.ICustomerCardUseRecordService;
+import com.yijia.label.domain.LabelRule;
+import com.yijia.label.mapper.LabelRuleMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
-
+import java.sql.SQLException;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -129,7 +128,7 @@ public class CardExcelImportServiceImpl implements ICardExcelImportService
 
 
     @Override
-    public String importData(List<CardExcelImport> dataManagementList,Long deptId)
+    public String importData(List<CardExcelImport> dataManagementList,Long deptId,Long userId)
     {
         if (StringUtils.isNull(dataManagementList) || dataManagementList.size() == 0)
         {
@@ -140,7 +139,11 @@ public class CardExcelImportServiceImpl implements ICardExcelImportService
 
         StringBuilder successMsg = new StringBuilder();
         StringBuilder failureMsg = new StringBuilder();
-        List<CardExcelImport> existList = selectCardExcelImportList(null);
+        CardExcelImport excelImport=new CardExcelImport();
+        excelImport.setStationId(Integer.parseInt(deptId+""));
+        excelImport.setDelFlag("0");
+        excelImport.setImportFlag("0");
+        List<CardExcelImport> existList = selectCardExcelImportList(excelImport);
         for (CardExcelImport importData : dataManagementList){
 
             try {
@@ -153,7 +156,7 @@ public class CardExcelImportServiceImpl implements ICardExcelImportService
                 for (CardExcelImport entry : existList) {
                     if (entry.getPhoneNumber().equals(importData.getPhoneNumber())) {
                         userFlag = true;
-                        erroMessage="已导入  ";
+                        erroMessage="  的手机号数据已存在";
                         break;
                     }
                 }
@@ -176,26 +179,28 @@ public class CardExcelImportServiceImpl implements ICardExcelImportService
                         erroMessage=erroMessage+"   客户等级不存在";
                     }
                 }
-                importData.setStationId(importData.getStationId());
+                importData.setStationId(Integer.parseInt(deptId+""));
+                importData.setImportExcelDate(new Date());
+                importData.setImportExcelUser(userId);
                 if (!userFlag&&!issue&&!label&&!grade) {
                     insertCardExcelImport(importData);
                     successNum++;
-                    successMsg.append("<br/>" + successNum + "、数据 " + importData.getPhoneNumber() + " 导入成功");
+                    successMsg.append("<br/>" + successNum + "、 " + importData.getPhoneNumber() + " 导入成功");
                 }  else  {
                     failureNum++;
-                    failureMsg.append("<br/>" + failureNum + "、数据 " + importData.getPhoneNumber() + erroMessage);
+                    failureMsg.append("<br/>" + failureNum + "、 " + importData.getPhoneNumber() + erroMessage);
                 }
             }catch (Exception e)
             {
                 failureNum++;
-                String msg = "<br/>" + failureNum + "、账号 " + importData.getPhoneNumber() + " 导入失败:";
+                String msg = "<br/>" + failureNum + "、 " + importData.getPhoneNumber() + " 导入失败:";
                 failureMsg.append(msg + e.getMessage());
 
             }
         }
         if (failureNum > 0)
         {
-            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            failureMsg.insert(0, "很抱歉,部分导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
             return failureMsg.toString();
         }
         else
@@ -204,6 +209,215 @@ public class CardExcelImportServiceImpl implements ICardExcelImportService
         }
         return successMsg.toString();
     }
+    @Transactional
+    @Override
+    public String updatListData(CardListImport cardListImport,Long deptId) throws  Exception
+    {
+
+        int i=0;
+        if(cardListImport.getType()==null||cardListImport.getType()==""){
+            throw new SQLException("回滚事务");
+        }
+
+        if("0".equals(cardListImport.getType())){
+
+                if (cardListImport.getPhoneArr() == null || cardListImport.getPhoneArr().size() == 0) {
+                    throw new SQLException("回滚事务");
+                } else {
+                    if(cardListImport.getId()==null||"".equals(cardListImport.getId())) {
+
+                        for (String phone : cardListImport.getPhoneArr()) {
+                            CardExcelImport cardExcelImport = new CardExcelImport();
+                            cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                            cardExcelImport.setPhoneNumber(phone);
+                            cardExcelImport.setImportFlag("0");
+                            cardExcelImport.setDelFlag("0");
+                            List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                            if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                                throw new SQLException("回滚事务");
+                            }
+                            CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                            if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                                i = cardExcelImportMapper.updateCardExcelGrade(cardExcelImport1);
+                            }
+                            if (i <= 0) {
+                                throw new SQLException("回滚事务");
+                            }
+                        }
+                        }
+                    else{
+                            CustomerGradeSetting customerGradeSetting = customerGradeSettingMapper.selectCustomerGradeSettingById(Long.parseLong(cardListImport.getId()));
+                            if (customerGradeSetting == null) {
+                                throw new SQLException("回滚事务");
+                            }
+                            for (String phone : cardListImport.getPhoneArr()) {
+                                CardExcelImport cardExcelImport = new CardExcelImport();
+                                cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                                cardExcelImport.setPhoneNumber(phone);
+                                cardExcelImport.setImportFlag("0");
+                                cardExcelImport.setDelFlag("0");
+                                List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                                if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                                    return "当前手机号不存在";
+                                }
+                                CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                                cardExcelImport1.setMemberGrade(cardListImport.getId());
+                                if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                                    i = cardExcelImportMapper.updateCardExcelGrade(cardExcelImport1);
+                                } else {
+                                    i = cardExcelImportMapper.updateCardExcelImport(cardExcelImport1);
+                                }
+                                if (i <= 0) {
+                                    throw new SQLException("回滚事务");
+                                }
+                            }
+                        }
+                    }
+
+
+        }
+
+        if("1".equals(cardListImport.getType())){
+            if(cardListImport.getPhoneArr()==null||cardListImport.getPhoneArr().size()==0){
+                throw new SQLException("回滚事务");
+            }else {
+                if (cardListImport.getId() == null || "".equals(cardListImport.getId())) {
+                    for (String phone : cardListImport.getPhoneArr()) {
+                        CardExcelImport cardExcelImport = new CardExcelImport();
+                        cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                        cardExcelImport.setPhoneNumber(phone);
+                        cardExcelImport.setImportFlag("0");
+                        cardExcelImport.setDelFlag("0");
+                        List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                        if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                        CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                        if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                            i = cardExcelImportMapper.updateCardExcelLabel(cardExcelImport1);
+                        }
+                        if (i <= 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                    }
+                } else {
+                    LabelRule labelRule = labelRuleMapper.selectLabelRuleById(Integer.parseInt(cardListImport.getId()));
+                    if (labelRule == null) {
+                        throw new SQLException("回滚事务");
+                    }
+                    for (String phone : cardListImport.getPhoneArr()) {
+                        CardExcelImport cardExcelImport = new CardExcelImport();
+                        cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                        cardExcelImport.setPhoneNumber(phone);
+                        cardExcelImport.setImportFlag("0");
+                        cardExcelImport.setDelFlag("0");
+                        List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                        if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                        CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                        cardExcelImport1.setLabelId(Integer.parseInt(cardListImport.getId() + ""));
+                        if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                            i = cardExcelImportMapper.updateCardExcelLabel(cardExcelImport1);
+                        } else {
+                            i = cardExcelImportMapper.updateCardExcelImport(cardExcelImport1);
+                        }
+                        if (i <= 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                    }
+                }
+            }
+
+        }
+
+        if("2".equals(cardListImport.getType())){
+            if(cardListImport.getPhoneArr()==null||cardListImport.getPhoneArr().size()==0){
+                throw new SQLException("回滚事务");
+            }else {
+                if (cardListImport.getId() == null || "".equals(cardListImport.getId())) {
+                    for (String phone : cardListImport.getPhoneArr()) {
+                        CardExcelImport cardExcelImport = new CardExcelImport();
+                        cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                        cardExcelImport.setPhoneNumber(phone);
+                        cardExcelImport.setImportFlag("0");
+                        cardExcelImport.setDelFlag("0");
+                        List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                        if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                        CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                        if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                            i = cardExcelImportMapper.updateCardExcelCoupon(cardExcelImport1);
+                        } else {
+                            i = cardExcelImportMapper.updateCardExcelImport(cardExcelImport1);
+                        }
+                        if (i <= 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                    }
+                } else {
+                    CouponIssue couponIssue = couponIssueMapper.selectCouponIssueById(cardListImport.getId());
+                    if (couponIssue == null) {
+                        throw new SQLException("回滚事务");
+                    }
+                    for (String phone : cardListImport.getPhoneArr()) {
+                        CardExcelImport cardExcelImport = new CardExcelImport();
+                        cardExcelImport.setStationId(Integer.parseInt(deptId + ""));
+                        cardExcelImport.setPhoneNumber(phone);
+                        cardExcelImport.setImportFlag("0");
+                        cardExcelImport.setDelFlag("0");
+                        List<CardExcelImport> cardExcelImports = cardExcelImportMapper.selectCardExcelImportList(cardExcelImport);
+                        if (cardExcelImports == null || cardExcelImports.size() == 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                        CardExcelImport cardExcelImport1 = cardExcelImports.get(0);
+                        cardExcelImport1.setCouponIssueId(cardListImport.getId());
+                        if (cardListImport.getId() == null || cardListImport.getId() == null) {
+                            i = cardExcelImportMapper.updateCardExcelCoupon(cardExcelImport1);
+                        } else {
+                            i = cardExcelImportMapper.updateCardExcelImport(cardExcelImport1);
+                        }
+                        if (i <= 0) {
+                            throw new SQLException("回滚事务");
+                        }
+                    }
+                }
+            }
+
+        }
+        return "成功";
+
+    }
+
+    @Transactional
+    @Override
+    public int updateCardExcelImportDelFlag(Long [] ids) throws Exception
+    {
+        int i=0;
+         for(Long id:ids){
+             CardExcelImport cardExcelImport=new CardExcelImport();
+             cardExcelImport.setExcelId(Integer.parseInt(id+""));
+             cardExcelImport.setDelFlag("1");
+            i= updateCardExcelImport(cardExcelImport);
+            if(i==0){
+                throw  new SQLException("逻辑删除失败");
+            }
+         }
 
+        return 1;
+    }
+    @Override
+    public int updateCardExcelGrade(CardExcelImport cardExcelImport){
+        return cardExcelImportMapper.updateCardExcelGrade(cardExcelImport);
+    }
+    @Override
+    public int updateCardExcelLabel(CardExcelImport cardExcelImport){
+        return cardExcelImportMapper.updateCardExcelLabel(cardExcelImport);
+    }
+    @Override
+    public int updateCardExcelCoupon(CardExcelImport cardExcelImport){
+        return cardExcelImportMapper.updateCardExcelCoupon(cardExcelImport);
+    }
 
 }

+ 41 - 3
yijia-customer/src/main/resources/mapper/customer/CardExcelImportMapper.xml

@@ -15,12 +15,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationName"    column="dept_name"    />
         <result property="labelId"    column="label_id"    />
         <result property="couponIssueId"    column="coupon_issue_id"    />
+        <result property="importExcelDate"    column="import_excel_date"    />
+        <result property="importExcelUser"    column="import_excel_user"    />
     </resultMap>
 
     <sql id="selectCardExcelImportVo">
           SELECT a.excel_id,a.station_id,a.phone_number,
         a.member_grade,a.integral,a.card_type,a.balance,b.dept_name,
-				a.label_id,a.coupon_issue_id
+				a.label_id,a.coupon_issue_id,a.import_excel_date,a.import_excel_user
         from  card_excel_import a
         left  join sys_dept b  on a.station_id=b.dept_id
     </sql>
@@ -36,9 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null  and memberGrade != ''"> and a.member_grade = #{memberGrade}</if>
             <if test="labelId != null  and labelId != ''"> and a.label_id = #{labelId}</if>
             <if test="couponIssueId != null  and couponIssueId != ''"> and a.coupon_issue_id = #{couponIssueId}</if>
-            <if test="stationIdList != null ">
+            <if test="importFlag != null  and importFlag != ''"> and a.import_flag = #{importFlag}</if>
+            <if test="delFlag != null  and delFlag != ''"> and a.del_flag = #{delFlag}</if>
+            <if test="importExcelUser != null  and importExcelUser != ''"> and a.import_excel_user = #{importExcelUser}</if>
+            <if test="stationList != null ">
                 and a.station_id in
-                <foreach item="item" index="index" collection="stationIdList"
+                <foreach item="item" index="index" collection="stationList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
@@ -71,6 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">member_grade,</if>
             <if test="labelId != null">label_id,</if>
             <if test="couponIssueId != null">coupon_issue_id,</if>
+            <if test="importFlag != null">import_flag,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="importExcelDate != null">import_excel_date,</if>
+            <if test="importExcelUser != null">import_excel_user,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="balance != null">#{balance},</if>
@@ -81,6 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">#{memberGrade},</if>
             <if test="labelId != null">#{labelId},</if>
             <if test="couponIssueId != null">#{couponIssueId},</if>
+            <if test="importFlag != null">#{importFlag},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="importExcelDate != null">#{importExcelDate},</if>
+            <if test="importExcelUser != null">#{importExcelUser},</if>
          </trim>
     </insert>
 
@@ -95,6 +108,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">member_grade = #{memberGrade},</if>
             <if test="labelId != null">label_id = #{labelId},</if>
             <if test="couponIssueId != null">coupon_issue_id = #{couponIssueId},</if>
+            <if test="importFlag != null">import_flag = #{importFlag},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+
+
+    <update id="updateCardExcelGrade" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+           member_grade = null,
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+    <update id="updateCardExcelLabel" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+            label_id = null,
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+    <update id="updateCardExcelCoupon" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+            coupon_issue_id = null,
         </trim>
         where excel_id = #{excelId}
     </update>

+ 4 - 4
yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -32,9 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerManageVo">
-        select id, member_id, customer_name, commend_man, phone_number, car_number, balance,
-        integral, special_car_type, regtime, station_id, mina_user_id, oil_name, grade,
-         liters, amt, union_id ,d.dept_name as station_name
+        select m.id, m.member_id, m.customer_name, m.commend_man, m.phone_number, m.car_number, m.balance,
+        m.integral, m.special_car_type, m.regtime, m.station_id, m.mina_user_id, m.oil_name, m.grade,
+         m.liters, m.amt, m.union_id ,d.dept_name as station_name
          from customer_manage m join  sys_dept d on m.station_id = d.dept_id
     </sql>
 
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="commendMan != null  and commendMan != ''"> and commend_man = #{commendMan}</if>
             <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number like concat('%', #{phoneNumber}, '%')</if>
             <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
-            <if test="balance != null "> and balance = #{balance}</if>
+            <if test="balance != null "> and m.balance = #{balance}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="specialCarType != null  and specialCarType != ''"> and special_car_type = #{specialCarType}</if>
             <if test="regtime != null "> and regtime = #{regtime}</if>

二進制
yijia-customer/target/classes/com/yijia/customer/controller/CardExcelImportController.class


二進制
yijia-customer/target/classes/com/yijia/customer/domain/CardExcelImport.class


二進制
yijia-customer/target/classes/com/yijia/customer/mapper/CardExcelImportMapper.class


二進制
yijia-customer/target/classes/com/yijia/customer/service/ICardExcelImportService.class


二進制
yijia-customer/target/classes/com/yijia/customer/service/impl/CardExcelImportServiceImpl.class


+ 41 - 3
yijia-customer/target/classes/mapper/customer/CardExcelImportMapper.xml

@@ -15,12 +15,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationName"    column="dept_name"    />
         <result property="labelId"    column="label_id"    />
         <result property="couponIssueId"    column="coupon_issue_id"    />
+        <result property="importExcelDate"    column="import_excel_date"    />
+        <result property="importExcelUser"    column="import_excel_user"    />
     </resultMap>
 
     <sql id="selectCardExcelImportVo">
           SELECT a.excel_id,a.station_id,a.phone_number,
         a.member_grade,a.integral,a.card_type,a.balance,b.dept_name,
-				a.label_id,a.coupon_issue_id
+				a.label_id,a.coupon_issue_id,a.import_excel_date,a.import_excel_user
         from  card_excel_import a
         left  join sys_dept b  on a.station_id=b.dept_id
     </sql>
@@ -36,9 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null  and memberGrade != ''"> and a.member_grade = #{memberGrade}</if>
             <if test="labelId != null  and labelId != ''"> and a.label_id = #{labelId}</if>
             <if test="couponIssueId != null  and couponIssueId != ''"> and a.coupon_issue_id = #{couponIssueId}</if>
-            <if test="stationIdList != null ">
+            <if test="importFlag != null  and importFlag != ''"> and a.import_flag = #{importFlag}</if>
+            <if test="delFlag != null  and delFlag != ''"> and a.del_flag = #{delFlag}</if>
+            <if test="importExcelUser != null  and importExcelUser != ''"> and a.import_excel_user = #{importExcelUser}</if>
+            <if test="stationList != null ">
                 and a.station_id in
-                <foreach item="item" index="index" collection="stationIdList"
+                <foreach item="item" index="index" collection="stationList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
@@ -71,6 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">member_grade,</if>
             <if test="labelId != null">label_id,</if>
             <if test="couponIssueId != null">coupon_issue_id,</if>
+            <if test="importFlag != null">import_flag,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="importExcelDate != null">import_excel_date,</if>
+            <if test="importExcelUser != null">import_excel_user,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="balance != null">#{balance},</if>
@@ -81,6 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">#{memberGrade},</if>
             <if test="labelId != null">#{labelId},</if>
             <if test="couponIssueId != null">#{couponIssueId},</if>
+            <if test="importFlag != null">#{importFlag},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="importExcelDate != null">#{importExcelDate},</if>
+            <if test="importExcelUser != null">#{importExcelUser},</if>
          </trim>
     </insert>
 
@@ -95,6 +108,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">member_grade = #{memberGrade},</if>
             <if test="labelId != null">label_id = #{labelId},</if>
             <if test="couponIssueId != null">coupon_issue_id = #{couponIssueId},</if>
+            <if test="importFlag != null">import_flag = #{importFlag},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+
+
+    <update id="updateCardExcelGrade" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+           member_grade = null,
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+    <update id="updateCardExcelLabel" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+            label_id = null,
+        </trim>
+        where excel_id = #{excelId}
+    </update>
+    <update id="updateCardExcelCoupon" parameterType="CardExcelImport">
+        update card_excel_import
+        <trim prefix="SET" suffixOverrides=",">
+            coupon_issue_id = null,
         </trim>
         where excel_id = #{excelId}
     </update>

+ 4 - 4
yijia-customer/target/classes/mapper/customer/CustomerManageMapper.xml

@@ -32,9 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerManageVo">
-        select id, member_id, customer_name, commend_man, phone_number, car_number, balance,
-        integral, special_car_type, regtime, station_id, mina_user_id, oil_name, grade,
-         liters, amt, union_id ,d.dept_name as station_name
+        select m.id, m.member_id, m.customer_name, m.commend_man, m.phone_number, m.car_number, m.balance,
+        m.integral, m.special_car_type, m.regtime, m.station_id, m.mina_user_id, m.oil_name, m.grade,
+         m.liters, m.amt, m.union_id ,d.dept_name as station_name
          from customer_manage m join  sys_dept d on m.station_id = d.dept_id
     </sql>
 
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="commendMan != null  and commendMan != ''"> and commend_man = #{commendMan}</if>
             <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number like concat('%', #{phoneNumber}, '%')</if>
             <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
-            <if test="balance != null "> and balance = #{balance}</if>
+            <if test="balance != null "> and m.balance = #{balance}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="specialCarType != null  and specialCarType != ''"> and special_car_type = #{specialCarType}</if>
             <if test="regtime != null "> and regtime = #{regtime}</if>

+ 1 - 1
yijia-customer/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:29 CST 2021
+#Mon Oct 11 10:34:18 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-customer

+ 1 - 0
yijia-customer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -9,6 +9,7 @@ com\yijia\customer\controller\CustomerManageController.class
 com\yijia\customer\controller\CustomerCardSettingDetailController.class
 com\yijia\customer\controller\CustomerCardRecordRechargeController.class
 com\yijia\customer\service\ICustomerElectronicCardService.class
+com\yijia\customer\domain\CardListImport.class
 com\yijia\customer\domain\CustomerCardSettingDetail.class
 com\yijia\customer\mapper\CustomerGradeSettingMapper.class
 com\yijia\customer\service\ICustomerCardRecordRechargeService.class

+ 1 - 0
yijia-customer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -2,6 +2,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\map
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\mapper\CustomerManageMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\domain\CustomerCardRecordRecharge.java
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\service\impl\CustomerCardRecordRechargeServiceImpl.java
+D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\domain\CardListImport.java
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\mapper\CustomerCardRecordConsumptionMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\mapper\CustomerElectronicCardMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-customer\src\main\java\com\yijia\customer\domain\CardExcelImport.java

二進制
yijia-customer/target/yijia-customer-1.0.1.jar


+ 1 - 1
yijia-framework/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:22 CST 2021
+#Mon Oct 11 10:34:14 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-framework

二進制
yijia-framework/target/yijia-framework-1.0.1.jar


+ 1 - 1
yijia-generator/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:24 CST 2021
+#Mon Oct 11 10:34:16 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-generator

二進制
yijia-generator/target/yijia-generator-1.0.1.jar


+ 2 - 2
yijia-integral/pom.xml

@@ -23,10 +23,10 @@
             <groupId>com.yijia</groupId>
             <artifactId>yijia-system</artifactId>
         </dependency>
-        <dependency>
+        <!--<dependency>
             <groupId>com.yijia</groupId>
             <artifactId>yijia-station</artifactId>
-        </dependency>
+        </dependency>-->
         <dependency>
             <groupId>com.yijia</groupId>
             <artifactId>yijia-customer</artifactId>

+ 5 - 6
yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRuleDetail.java

@@ -1,14 +1,13 @@
 package com.yijia.integral.domain;
 
-import java.math.BigDecimal;
-import java.util.List;
-
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
 import com.yijia.customer.domain.CustomerGradeSetting;
-import com.yijia.station.domain.StationOilPrice;
 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;
+
+import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 【请填写功能名称】对象 integral_rule_detail

+ 7 - 16
yijia-integral/src/main/java/com/yijia/integral/service/impl/IntegralRuleServiceImpl.java

@@ -1,31 +1,22 @@
 package com.yijia.integral.service.impl;
 
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.yijia.common.core.domain.entity.SysDictData;
 import com.yijia.common.core.domain.model.LoginUser;
 import com.yijia.common.utils.SecurityUtils;
-import com.yijia.customer.domain.CustomerCardSetting;
 import com.yijia.customer.domain.CustomerGradeSetting;
-import com.yijia.customer.mapper.CustomerCardSettingMapper;
 import com.yijia.customer.mapper.CustomerGradeSettingMapper;
+import com.yijia.integral.domain.IntegralRule;
 import com.yijia.integral.domain.IntegralRuleDetail;
 import com.yijia.integral.domain.IntegralShopPic;
 import com.yijia.integral.mapper.IntegralRuleDetailMapper;
-import com.yijia.integral.mapper.IntegralShopPicMapper;
-import com.yijia.station.domain.StationOilPrice;
-import com.yijia.station.mapper.StationOilPriceMapper;
-import com.yijia.station.service.impl.StationOilPriceServiceImpl;
+import com.yijia.integral.mapper.IntegralRuleMapper;
+import com.yijia.integral.service.IIntegralRuleService;
 import com.yijia.system.mapper.SysDictDataMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.yijia.integral.mapper.IntegralRuleMapper;
-import com.yijia.integral.domain.IntegralRule;
-import com.yijia.integral.service.IIntegralRuleService;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 积分规则Service业务层处理

+ 1 - 0
yijia-integral/src/main/resources/mapper/integral/CustomerPointsRecordMapper.xml

@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="recordType != null  and recordType != ''"> and record_type = #{recordType}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="orderNo != null "> and order_no = #{orderNo}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"

二進制
yijia-integral/target/classes/com/yijia/integral/domain/IntegralRuleDetail.class


二進制
yijia-integral/target/classes/com/yijia/integral/service/impl/IntegralRuleServiceImpl.class


+ 1 - 0
yijia-integral/target/classes/mapper/integral/CustomerPointsRecordMapper.xml

@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="recordType != null  and recordType != ''"> and record_type = #{recordType}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="orderNo != null "> and order_no = #{orderNo}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"

+ 1 - 1
yijia-integral/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:31 CST 2021
+#Mon Oct 11 10:34:19 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-integral

二進制
yijia-integral/target/yijia-integral-1.0.1.jar


+ 2 - 6
yijia-integral/yijia-integral.iml

@@ -59,6 +59,7 @@
     <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
     <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
     <orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
     <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
     <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
@@ -86,15 +87,10 @@
     <orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.19" level="project" />
     <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
     <orderEntry type="module" module-name="yijia-system" />
-    <orderEntry type="module" module-name="yijia-station" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.5" level="project" />
-    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="module" module-name="yijia-customer" />
     <orderEntry type="module" module-name="yijia-quartz" />
     <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.2" level="project" />
     <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.15" level="project" />
-    <orderEntry type="module" module-name="yijia-customer" />
     <orderEntry type="module" module-name="yijia-coupon" />
     <orderEntry type="module" module-name="yijia-label" />
   </component>

+ 36 - 10
yijia-label/src/main/resources/mapper/label/CustomerLabelDemoMapper.xml

@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="secondCustomerLabelDemoList" parameterType="CustomerLabelDemo" resultMap="CustomerLabelDemoResult">
-        SELECT  zh.*,r.label_name,r.id as label_id from (
+        SELECT  zh.*,r.label_name,r.id as label_id from (select * from (
         SELECT consumer_id,sum(order_liters) order_liters,sum(amt) as amt,count(1) count_num,p.station_id,max(created_date) as create_date,
         a.mobile_phone as phone,blog_nick_name as customer_name
         from pay_order p
@@ -125,13 +125,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where `status` = "1"
         <if test="stationId != null "> and p.station_id = #{stationId}</if>
         <if test="oilName != null "> and oil_name = #{oilName} </if>
-        <if test="secondBeginDate != null and beginDate != ''"><!-- 开始时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+        <if test="secondEndCountNum != 0 and secondEndAmt!=0 and secondEndLiters!=0 ">
+            <if test="secondBeginDate != null and secondBeginDate != ''"><!-- 开始时间检索 -->
+                and  date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="secondEndDate != null and secondEndDate != ''"><!-- 结束时间检索 -->
+                AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s')
+            </if>
         </if>
-        <if test="secondEndDate != null and secondEndDate != ''"><!-- 结束时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s')
+        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name ) ff  where 1=1
+        <if test="secondEndCountNum == 0  and  (secondStartCountNum=='' or secondStartCountNum==null  )  and secondEndAmt !=0 and secondEndLiters!=0">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+               and  (date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
         </if>
-        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name
+        <if test="secondEndAmt==0 and (secondStartAmt==null or secondStartAmt=='')  and secondEndCountNum != 0 and secondEndLiters!=0">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+                and (date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
+
+        </if>
+        <if test="secondEndLiters==0 and (secondStartLiters==null or secondStartLiters=='') and secondEndAmt!=0 and secondEndCountNum != 0 ">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+                and (ff.date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
+        </if>
+
         ORDER BY create_date desc) zh
         left join customer_label l on zh.station_id = l.station_id and zh.phone = l.phone and l.del_flag ="0"
         left join label_rule r on r.id = l.label_id
@@ -139,7 +161,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="labelId != null "> and l.label_id = #{labelId}</if>
         <if test="stationId != null "> and zh.station_id = #{stationId}</if>
         <if test="secondStartCountNum != null "> and zh.count_num > #{secondStartCountNum}</if>
-        <if test="secondEndCountNum != null "> and  zh.count_num &lt;=#{secondEndCountNum} </if>
+        <if test="secondEndCountNum != null  and secondEndCountNum !=0"> and  zh.count_num &lt;=#{secondEndCountNum} </if>
+        <if test="!(secondEndAmt==0 and (secondStartAmt==null or secondStartAmt=='') ) ">
         <if test="secondAmtFlag != null and secondAmtFlag=='2'.toString() ">
             <choose>
                 <when test="secondStartAmt != null and secondEndAmt != null">
@@ -170,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </otherwise>
             </choose>
         </if>
+        </if>
+        <if test="!(secondEndLiters==0 and (secondStartLiters==null or secondStartLiters=='') ) ">
         <if test="secondLitersFlag != null and secondLitersFlag=='2'.toString() ">
             <choose>
                 <when test="secondStartLiters != null and secondEndLiters != null">
@@ -200,8 +225,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </otherwise>
             </choose>
         </if>
+        </if>
         and zh.phone in (
-        SELECT zq.phone from (
+        SELECT zq.phone from (select * from (
         SELECT consumer_id,sum(order_liters) order_liters,count(1) count_num,sum(amt) as amt,p.station_id,max(created_date) created_date,
         a.mobile_phone as phone,blog_nick_name as customer_name
         from pay_order p
@@ -210,12 +236,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="stationId != null "> and p.station_id = #{stationId}</if>
         <if test="oilName != null "> and oil_name = #{oilName} </if>
         <if test="beginDate != null and beginDate != ''"><!-- 开始时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginDate},'%Y-%m-%d %H:%i:%s')
+            and date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginDate},'%Y-%m-%d %H:%i:%s')
         </if>
         <if test="endDate != null and endDate != ''"><!-- 结束时间检索 -->
             AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endDate},'%Y-%m-%d %H:%i:%s')
         </if>
-        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name
+        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name) ffmm
         ORDER BY created_date desc) zq
         left join customer_label l on zq.station_id = l.station_id and zq.phone = l.phone and l.del_flag ="0"
         left join label_rule r on r.id = l.label_id

+ 36 - 10
yijia-label/target/classes/mapper/label/CustomerLabelDemoMapper.xml

@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="secondCustomerLabelDemoList" parameterType="CustomerLabelDemo" resultMap="CustomerLabelDemoResult">
-        SELECT  zh.*,r.label_name,r.id as label_id from (
+        SELECT  zh.*,r.label_name,r.id as label_id from (select * from (
         SELECT consumer_id,sum(order_liters) order_liters,sum(amt) as amt,count(1) count_num,p.station_id,max(created_date) as create_date,
         a.mobile_phone as phone,blog_nick_name as customer_name
         from pay_order p
@@ -125,13 +125,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where `status` = "1"
         <if test="stationId != null "> and p.station_id = #{stationId}</if>
         <if test="oilName != null "> and oil_name = #{oilName} </if>
-        <if test="secondBeginDate != null and beginDate != ''"><!-- 开始时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+        <if test="secondEndCountNum != 0 and secondEndAmt!=0 and secondEndLiters!=0 ">
+            <if test="secondBeginDate != null and secondBeginDate != ''"><!-- 开始时间检索 -->
+                and  date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="secondEndDate != null and secondEndDate != ''"><!-- 结束时间检索 -->
+                AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s')
+            </if>
         </if>
-        <if test="secondEndDate != null and secondEndDate != ''"><!-- 结束时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s')
+        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name ) ff  where 1=1
+        <if test="secondEndCountNum == 0  and  (secondStartCountNum=='' or secondStartCountNum==null  )  and secondEndAmt !=0 and secondEndLiters!=0">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+               and  (date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
         </if>
-        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name
+        <if test="secondEndAmt==0 and (secondStartAmt==null or secondStartAmt=='')  and secondEndCountNum != 0 and secondEndLiters!=0">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+                and (date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
+
+        </if>
+        <if test="secondEndLiters==0 and (secondStartLiters==null or secondStartLiters=='') and secondEndAmt!=0 and secondEndCountNum != 0 ">
+            <if test="secondBeginDate != null  and secondEndDate!=null "><!-- 开始时间检索 -->
+                and (ff.date_format(create_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{secondBeginDate},'%Y-%m-%d %H:%i:%s')
+                or   date_format(create_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{secondEndDate},'%Y-%m-%d %H:%i:%s'))
+            </if>
+        </if>
+
         ORDER BY create_date desc) zh
         left join customer_label l on zh.station_id = l.station_id and zh.phone = l.phone and l.del_flag ="0"
         left join label_rule r on r.id = l.label_id
@@ -139,7 +161,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="labelId != null "> and l.label_id = #{labelId}</if>
         <if test="stationId != null "> and zh.station_id = #{stationId}</if>
         <if test="secondStartCountNum != null "> and zh.count_num > #{secondStartCountNum}</if>
-        <if test="secondEndCountNum != null "> and  zh.count_num &lt;=#{secondEndCountNum} </if>
+        <if test="secondEndCountNum != null  and secondEndCountNum !=0"> and  zh.count_num &lt;=#{secondEndCountNum} </if>
+        <if test="!(secondEndAmt==0 and (secondStartAmt==null or secondStartAmt=='') ) ">
         <if test="secondAmtFlag != null and secondAmtFlag=='2'.toString() ">
             <choose>
                 <when test="secondStartAmt != null and secondEndAmt != null">
@@ -170,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </otherwise>
             </choose>
         </if>
+        </if>
+        <if test="!(secondEndLiters==0 and (secondStartLiters==null or secondStartLiters=='') ) ">
         <if test="secondLitersFlag != null and secondLitersFlag=='2'.toString() ">
             <choose>
                 <when test="secondStartLiters != null and secondEndLiters != null">
@@ -200,8 +225,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </otherwise>
             </choose>
         </if>
+        </if>
         and zh.phone in (
-        SELECT zq.phone from (
+        SELECT zq.phone from (select * from (
         SELECT consumer_id,sum(order_liters) order_liters,count(1) count_num,sum(amt) as amt,p.station_id,max(created_date) created_date,
         a.mobile_phone as phone,blog_nick_name as customer_name
         from pay_order p
@@ -210,12 +236,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="stationId != null "> and p.station_id = #{stationId}</if>
         <if test="oilName != null "> and oil_name = #{oilName} </if>
         <if test="beginDate != null and beginDate != ''"><!-- 开始时间检索 -->
-            AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginDate},'%Y-%m-%d %H:%i:%s')
+            and date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginDate},'%Y-%m-%d %H:%i:%s')
         </if>
         <if test="endDate != null and endDate != ''"><!-- 结束时间检索 -->
             AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endDate},'%Y-%m-%d %H:%i:%s')
         </if>
-        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name
+        group by consumer_id,p.station_id,a.mobile_phone,blog_nick_name) ffmm
         ORDER BY created_date desc) zq
         left join customer_label l on zq.station_id = l.station_id and zq.phone = l.phone and l.del_flag ="0"
         left join label_rule r on r.id = l.label_id

+ 1 - 1
yijia-label/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:28 CST 2021
+#Mon Oct 11 10:34:17 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-label

二進制
yijia-label/target/yijia-label-1.0.1.jar


+ 15 - 18
yijia-market/src/main/java/com/yijia/markert/controller/MarkertPlanController.java

@@ -1,33 +1,24 @@
 package com.yijia.markert.controller;
 
-import java.util.ArrayList;
-import java.util.List;
-
+import com.yijia.common.annotation.Log;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.core.page.TableDataInfo;
+import com.yijia.common.enums.BusinessType;
 import com.yijia.common.utils.DateUtils;
 import com.yijia.common.utils.SecurityUtils;
-
-import com.yijia.common.utils.StringUtils;
 import com.yijia.common.utils.poi.ExcelUtil;
 import com.yijia.markert.domain.MarkertPlan;
 import com.yijia.markert.service.IMarkertPlanService;
 import com.yijia.system.service.ISysDeptService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-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;
-import com.yijia.common.enums.BusinessType;
-import com.yijia.common.core.page.TableDataInfo;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 营销方案Controller
@@ -105,6 +96,12 @@ public class MarkertPlanController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody MarkertPlan markertPlan)
     {
+        if(markertPlan.getId()!=null||"".equals(markertPlan.getId())){
+            MarkertPlan markertPlan1=new MarkertPlan();
+            markertPlan1.setStatus("1");
+            markertPlan1.setId(markertPlan.getId());
+            markertPlanService.updateMarkertPlan(markertPlan1);
+        }
         LoginUser currentUser = SecurityUtils.getLoginUser();
         markertPlan.setStationId(currentUser.getUser().getDeptId());
         markertPlan.setCreateBy(currentUser.getUser().getUserId()+"");

二進制
yijia-market/target/classes/com/yijia/markert/controller/MarkertPlanController.class


+ 1 - 1
yijia-market/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:30 CST 2021
+#Mon Oct 11 10:34:21 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-market

二進制
yijia-market/target/yijia-market-1.0.1.jar


+ 1 - 1
yijia-quartz/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:23 CST 2021
+#Mon Oct 11 10:34:15 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-quartz

二進制
yijia-quartz/target/yijia-quartz-1.0.1.jar


+ 4 - 3
yijia-station/pom.xml

@@ -35,13 +35,14 @@
             <groupId>com.yijia</groupId>
             <artifactId>yijia-quartz</artifactId>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
+            <groupId>com.yijia</groupId>
+            <artifactId>yijia-system</artifactId>
         </dependency>
         <dependency>
             <groupId>com.yijia</groupId>
-            <artifactId>yijia-system</artifactId>
+            <artifactId>yijia-integral</artifactId>
         </dependency>
     </dependencies>
 

+ 245 - 118
yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java

@@ -1,51 +1,38 @@
 package com.yijia.station.controller;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.parser.Feature;
+import com.yijia.common.annotation.Log;
 import com.yijia.common.config.YiJiaConfig;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.core.page.TableDataInfo;
+import com.yijia.common.enums.BusinessType;
 import com.yijia.common.exception.CustomException;
 import com.yijia.common.utils.SecurityUtils;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.station.domain.PayOrder;
 import com.yijia.station.domain.StationBalanceChange;
+import com.yijia.station.service.IPayOrderService;
 import com.yijia.station.service.IStationBalanceChangeService;
 import com.yijia.station.service.IStationDeviceManageService;
 import com.yijia.station.utils.FeiEPrinterUtil;
-import com.yijia.system.domain.SysRespon;
 import com.yijia.system.service.ISysDeptService;
-import com.yijia.system.service.ISysUserService;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
 import org.springframework.beans.factory.annotation.Autowired;
-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;
-import com.yijia.common.enums.BusinessType;
-import com.yijia.station.domain.PayOrder;
-import com.yijia.station.service.IPayOrderService;
-import com.yijia.common.utils.poi.ExcelUtil;
-import com.yijia.common.core.page.TableDataInfo;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * 订单支付Controller
@@ -69,6 +56,8 @@ public class PayOrderController extends BaseController
     @Autowired
     private IStationBalanceChangeService stationBalanceChangeService;
 
+
+
     /**
      * 查询订单支付列表
      */
@@ -184,7 +173,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
             payOrder.setStationId(null);
         }
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         payOrder.setOrderType("1");
         PayOrder order = payOrderService.selectAllDaySources(payOrder);
         return AjaxResult.success(order);
@@ -238,7 +227,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
             payOrder.setStationId(null);
         }
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         payOrder.setOrderType("1");
         List<PayOrder> orderList = payOrderService.selectAllOilTypeSources(payOrder);
         return getTable(orderList);
@@ -278,7 +267,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
             payOrder.setStationId(null);
         }
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         payOrder.setOrderType("1");
         List<PayOrder> orderList = payOrderService.dayAllOilTypeSources(payOrder);
         return getTable(orderList);
@@ -315,7 +304,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
             payOrder.setStationId(null);
         }
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         payOrder.setOrderType("1");
         PayOrder order = payOrderService.selectAllOverViewData(payOrder);
         return AjaxResult.success(order);
@@ -353,7 +342,7 @@ public class PayOrderController extends BaseController
         }
         //默认当前登陆人的ID 5冯总油站
         startPage();
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.selectAllDayReport(payOrder);
         return getDataTable(orderList);
@@ -416,13 +405,16 @@ public class PayOrderController extends BaseController
         int i=0;
         PayOrder payOrder=new PayOrder();
         PayOrder payOrder1=payOrderService.selectPayOrderById(orderId);
+        if(payOrder1.getStatus().equals("3")){
+            return AjaxResult.error("已经被线上退款,不能重复退款");
+        }
         if(payOrder1.getStatus().equals("2")){
             return AjaxResult.error("已经被退款,不能重复退款");
         }
         LoginUser currentUser = SecurityUtils.getLoginUser();
 
         StationBalanceChange stationBalanceChange=new StationBalanceChange();
-        stationBalanceChange.setAmt(payOrder1.getAmt());
+        stationBalanceChange.setAmt(payOrder1.getSellAmt());
         stationBalanceChange.setStationId(payOrder1.getStationId());
         stationBalanceChange.setType("+");
         stationBalanceChange.setCreateBy(currentUser.getUser().getUserId()+"");
@@ -431,7 +423,7 @@ public class PayOrderController extends BaseController
         SysDept dept1=deptService.selectDeptById(deptId);
         SysDept dept=new SysDept();
         Float Balance1= Float.parseFloat(dept1.getBalance().toString());
-        Float value=Float.parseFloat(payOrder1.getAmt().toString());
+        Float value=Float.parseFloat(payOrder1.getSellAmt().toString());
         stationBalanceChange.setNowAmt(dept1.getBalance());
         dept.setDeptId(deptId);
         dept.setBalance(BigDecimal.valueOf(Balance1+value));
@@ -439,11 +431,12 @@ public class PayOrderController extends BaseController
         if(i!=0) {
             payOrder.setOrderId(orderId);
             payOrder.setStatus("2");//设置为已退款
+            payOrder.setRefundDate(new Date());
+            payOrder.setRefundUser(currentUser.getUser().getUserId());
             stationBalanceChangeService.insertStationBalanceChange(stationBalanceChange);
             i = payOrderService.updatePayOrder(payOrder);
 
         }
-
         if(i==0){
             return AjaxResult.error();
         }
@@ -452,96 +445,227 @@ public class PayOrderController extends BaseController
 
 
     /**
-     * 订单退款
+     * 线上订单退款
      */
+
     @PostMapping(value = "/sxfRefund")
     public AjaxResult sxfRefund(@RequestBody PayOrder payOrder)
     {
-
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
         try {
-            sendSxfRefund(payOrder);
+          payOrderService.sxfRefund(payOrder);
         } catch (Exception e) {
-            e.printStackTrace();
+            return AjaxResult.error(e.getMessage());
         }
         return AjaxResult.success(1);
     }
 
-    public SysRespon sendSxfRefund(PayOrder payOrder) throws Exception {
+    /**
+     * 不需要审核直接进行退款
+     */
+    @PostMapping(value = "/directRefund")
+    public AjaxResult directRefund(@RequestBody PayOrder payOrder)
+    {
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        payOrder.setExaminUser(currentUser.getUser().getUserId());
+        payOrder.setExaminDate( new Date());
+        payOrder.setExaminStatus("2");
+        payOrder.setRefundUser(currentUser.getUser().getUserId());
+        payOrder.setRefundDate( new Date());
+        try {
+            payOrderService.sxfRefund(payOrder);
+            i=payOrderService.updatePayOrder(payOrder);
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(i);
+    }
 
-        SysRespon respon=new SysRespon();
-        SysDept dept=deptService.selectDeptById(payOrder.getStationId());
-        Random random=new Random();
-        String result1 = "";
-        for (int i = 0; i < 6; i++) {
-            result1 += random.nextInt(10);
-        }
-        String ordNo = System.nanoTime() + result1;
-        JSONObject reqData = new JSONObject();
-        reqData.put("mno",dept.getMno() );
-        reqData.put("ordNo",ordNo );
-        reqData.put("origOrderNo",payOrder.getOrderNo() );
-        reqData.put("amt",payOrder.getAmt() );
-        reqData.put("origUuid","");
-        reqData.put("origSxfUuid","" );
-        String req= SXFPaySign.getSXFPay(reqData);
-        ///logger.debug("参数信息:"+req);
-        System.out.println("req:" + req);
-        //此处不要改变reqData里面值的顺序用LinkedHashMap
-        HashMap reqMap = JSON.parseObject(req, LinkedHashMap.class, Feature.OrderedField);
-        //组装加密串
-        String signContent = RSASignature.getOrderContent(reqMap);
-        System.out.println("拼接后的参数:" + signContent);
-        //logger.debug("拼接后的参数:"+signContent);
-        //sign
-        String sign = RSASignature.encryptBASE64(RSASignature.sign(signContent, SXFPaySign.privateKey));
-        System.out.println("============签名:" + sign);
-        reqMap.put("sign", sign);
-        String reqStr = JSON.toJSONString(reqMap);
-        System.out.println("请求参数:" + reqMap);
-        System.out.println("请求参数:" + reqStr);
-        //调用第三方接口地址
-        String url = "https://openapi.suixingpay.com/merchant/order/refund";//生产地址
-        String resultJson = HttpUtils.connectPostUrl(url, reqStr);
-        System.out.println("返回信息:" + resultJson);
-        //不要对reqData排序 所以用LinkedHashMap
-        HashMap<String, Object> result = JSON.parseObject(resultJson, LinkedHashMap.class, Feature.OrderedField);
-        if ("0000".equals(result.get("code"))) {
-            //验签
-            String signResult = result.get("sign").toString();
-            result.remove("sign");
-            String resultStr = RSASignature.getOrderContent(result);
-            System.out.println("resultStr: " + resultStr);
-            //sign
-            String resultSign = RSASignature.encryptBASE64(RSASignature.sign(signContent, SXFPaySign.privateKey));
-            System.out.println("resultSign: " + resultSign);
-            //组装加密串
-            if (RSASignature.doCheck(resultStr, signResult, SXFPaySign.sxfPublic)) {
-                System.out.println("===================验签成功==============");
-                //
-                if(result.containsKey("respData")){
-                    HashMap<String, Object> result2 = JSON.parseObject(result.get("respData")+"", LinkedHashMap.class, Feature.OrderedField);
-                    if("0000".equals(result2.get("bizCode"))){
-                        respon.setResponCode("0000");
-                        System.out.println(result2.get("retUrl"));
-                        String url1=result2.get("retUrl")+"";
-                        respon.setResponMessage(result2.get("retUrl")+"");
-                        return respon;
-                    }else {
-                        respon.setResponCode(result2.get("bizCode") + "");
-                        respon.setResponMessage(result2.get("bizMsg") + "");
-                    }
-                    //判断 bizCode bizCode =="0000" 则业务成功
-                }else {
-                    respon.setResponCode("0004");
-                    respon.setResponMessage(result.get("msg") + "");
+
+    /**
+     * 根据上级集团的信息判断当前的用户是否进行审核
+     *
+     */
+    @PostMapping(value = "/applyExaminRefund")
+    public AjaxResult applyExaminRefund(@RequestBody PayOrder payOrder)
+    {
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+         SysDept dept= currentUser.getUser().getDept();
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        if("dzk".equals(payOrder.getPayType())){
+            return AjaxResult.error("电子卡的订单不能进行退款");
+        }
+        if(dept.getParentId()==100||dept.getParentId()==0||dept.getParentId()==3){
+            //集团的账号没有申请退款的权利
+              return   AjaxResult.error("集团账号没有申请退款的权限");
+        }else{
+            SysDept dept1=deptService.selectDeptById(dept.getParentId());
+            //当前不需要进行审批时
+            if("0".equals(dept1.getRefundExaminStatus())){
+
+                if(!"1".equals(payOrder.getStatus())){
+                    return AjaxResult.error("当前订单不能进行退款");
                 }
-            }else {
-                respon.setResponCode("0002");
-                respon.setResponMessage("RSA验证失败");
+                int i=0;
+                //payOrder.setExaminUser(currentUser.getUser().getUserId());
+                //payOrder.setExaminDate( new Date());
+                payOrder.setExaminStatus("1");
+                payOrder.setRefundUser(currentUser.getUser().getUserId());
+                payOrder.setRefundDate( new Date());
+                try {
+                    //payOrderService.sxfRefund(payOrder);
+                    i=payOrderService.updatePayOrder(payOrder);
+                } catch (Exception e) {
+                    return AjaxResult.error(e.getMessage());
+                }
+                return AjaxResult.success(i);
+
             }
+            //当前进行需要进行审批时,进行申请
+            else {
+                if(!"1".equals(payOrder.getStatus())){
+                    return AjaxResult.error("当前订单不能进行退款");
+                }
+                int i=0;
+                payOrder.setRefundUser(currentUser.getUser().getUserId());
+                payOrder.setRefundDate( new Date());
+                payOrder.setExaminStatus("1");
+                i=payOrderService.updatePayOrder(payOrder);
+                return AjaxResult.success(i);
+            }
+        }
+    }
+    /**
+     * 订单申请退款,重新申请退款
+     */
+    /*@PostMapping(value = "/applyRefund")
+    public AjaxResult applyRefund(@RequestBody PayOrder payOrder)
+    {
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        if(!("0".equals(payOrder.getExaminStatus())||payOrder.getExaminStatus()==null||"3".equals(payOrder.getExaminStatus()))){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        payOrder.setRefundUser(currentUser.getUser().getUserId());
+        payOrder.setRefundDate( new Date());
+        payOrder.setExaminStatus("1");
+        i=payOrderService.updatePayOrder(payOrder);
+        return AjaxResult.success(i);
+    }*/
+
+    /**
+     * 重新申请退款
+     */
+    /*@PostMapping(value = "/reapplyRefund")
+    public AjaxResult reapplyRefund(@RequestBody PayOrder payOrder)
+    {
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        if(!("3".equals(payOrder.getExaminStatus()))){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        payOrder.setRefundUser(currentUser.getUser().getUserId());
+        payOrder.setRefundDate( new Date());
+        payOrder.setExaminStatus("1");
+        i=payOrderService.updatePayOrder(payOrder);
+        return AjaxResult.success(i);
+    }*/
+
+    /**
+     * 撤回申请
+     */
+    @PostMapping(value = "/recallApplyRefund")
+    public AjaxResult recallApplyRefund(@RequestBody PayOrder payOrder)
+    {
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能撤回申请");
+        }
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        payOrder.setRefundUser(currentUser.getUser().getUserId());
+        payOrder.setRefundDate( new Date());
+        payOrder.setExaminStatus("0");
+        i=payOrderService.updatePayOrder(payOrder);
+        return AjaxResult.success(i);
+    }
+    /**
+     * 审核通过
+     */
+    @PostMapping(value = "/examinRefundSuccess")
+    public AjaxResult examinRefundSuccess(@RequestBody PayOrder payOrder)
+    {
+
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        if(!("1".equals(payOrder.getExaminStatus())||"4".equals(payOrder.getExaminStatus()))){
+            return AjaxResult.error("当前订单不能进行退款");
         }
-        return respon;
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+       /* if("0".equals(currentUser.getUser().getDept().getRefundExaminStatus())){
+            return AjaxResult.error("当前集团未设置审核权限");
+        }*/
+        payOrder.setExaminUser(currentUser.getUser().getUserId());
+        payOrder.setExaminDate( new Date());
+        payOrder.setExaminStatus("2");
+
+        try {
+            payOrderService.sxfRefund(payOrder);
+            payOrder.setRefundSuccessDate(new Date());
+            i=payOrderService.updatePayOrder(payOrder);
+        } catch (Exception e) {
+            //设置为退款失败的状态
+            payOrder.setExaminStatus("4");
+            payOrderService.updatePayOrder(payOrder);
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(i);
     }
+
+    /**
+     * 审核驳回
+     */
+    @PostMapping(value = "/examinRefundBack")
+    public AjaxResult examinRefundBack(@RequestBody PayOrder payOrder)
+    {
+        if(!"1".equals(payOrder.getStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        if(!"1".equals(payOrder.getExaminStatus())){
+            return AjaxResult.error("当前订单不能进行退款");
+        }
+        int i=0;
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        if("0".equals(currentUser.getUser().getDept().getRefundExaminStatus())){
+            return AjaxResult.error("当前集团未设置审核权限");
+        }
+        payOrder.setExaminUser(currentUser.getUser().getUserId());
+        payOrder.setExaminDate( new Date());
+        payOrder.setExaminStatus("3");
+        try {
+            i=payOrderService.updatePayOrder(payOrder);
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+        return AjaxResult.success(i);
+    }
+
+
     /**
      * 恢复正常付款状态
      */
@@ -551,12 +675,15 @@ public class PayOrderController extends BaseController
         int i=0;
         PayOrder payOrder=new PayOrder();
         PayOrder payOrder1=payOrderService.selectPayOrderById(orderId);
+        if(payOrder1.getStatus().equals("3")){
+            return AjaxResult.error("已经被线上退款,不能回退");
+        }
         if(payOrder1.getStatus().equals("1")){
             return AjaxResult.error("已经支付成功,不能重新回退");
         }
         StationBalanceChange stationBalanceChange=new StationBalanceChange();
         LoginUser currentUser = SecurityUtils.getLoginUser();
-        stationBalanceChange.setAmt(payOrder1.getAmt());
+        stationBalanceChange.setAmt(payOrder1.getSellAmt());
         stationBalanceChange.setStationId(payOrder1.getStationId());
         stationBalanceChange.setType("-");
         stationBalanceChange.setCreateBy(currentUser.getUser().getUserId()+"");
@@ -564,7 +691,7 @@ public class PayOrderController extends BaseController
         SysDept dept1=deptService.selectDeptById(deptId);
         SysDept dept=new SysDept();
         Float Balance1= Float.parseFloat(dept1.getBalance().toString());
-        Float value=Float.parseFloat(payOrder1.getAmt().toString());
+        Float value=Float.parseFloat(payOrder1.getSellAmt().toString());
         stationBalanceChange.setNowAmt(dept1.getBalance());
         dept.setDeptId(deptId);
         dept.setBalance(BigDecimal.valueOf(Balance1-value));
@@ -769,7 +896,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationId(null);
         }
         startPage();
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         List<PayOrder> payOrderList = payOrderService.LNGDeptList(payOrder);
         return getDataTable(payOrderList);
     }
@@ -799,7 +926,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
             payOrder.setStationId(null);
         }
-        payOrder.setStatus("1");
+        //payOrder.setStatus("1");
         List<PayOrder> payOrderList = payOrderService.selectLNGPayOrderExport(payOrder);
         AjaxResult ss = exportExcel(payOrderList, "导出订单信息");
         return ss;

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

@@ -1,25 +1,22 @@
 package com.yijia.station.controller;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-
-import com.yijia.common.annotation.Excel;
+import com.yijia.common.annotation.Log;
 import com.yijia.common.config.YiJiaConfig;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.core.page.TableDataInfo;
+import com.yijia.common.enums.BusinessType;
 import com.yijia.common.exception.CustomException;
 import com.yijia.common.utils.SecurityUtils;
-import com.yijia.station.domain.*;
-import com.yijia.station.mapper.PayOrderMapper;
-import com.yijia.station.service.*;
+import com.yijia.station.domain.PayOrder;
+import com.yijia.station.domain.StationClassStructure;
+import com.yijia.station.domain.StationClassesSummary;
+import com.yijia.station.service.IPayOrderService;
+import com.yijia.station.service.IStationClassStructureService;
+import com.yijia.station.service.IStationClassesSummaryService;
+import com.yijia.station.service.IStationDeviceManageService;
 import com.yijia.station.utils.FeiEPrinterUtil;
 import com.yijia.system.service.ISysDeptService;
 import com.yijia.system.service.ISysUserService;
@@ -28,22 +25,19 @@ import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-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;
-import com.yijia.common.enums.BusinessType;
-import com.yijia.common.utils.poi.ExcelUtil;
-import com.yijia.common.core.page.TableDataInfo;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * 班结管理Controller
@@ -89,6 +83,7 @@ public class StationClassStructureController extends BaseController
     {
         List<StationClassStructure> list = new ArrayList<>();
         if(stationClassStructure!=null &&stationClassStructure.getStationId()!=null ){
+            stationClassStructure.setStatus("1");
             list = stationClassStructureService.listPersonnelStructure(stationClassStructure);
         }
         return getTable(list);
@@ -99,6 +94,7 @@ public class StationClassStructureController extends BaseController
     {
         List<StationClassStructure> list = new ArrayList<>();
         if(stationClassStructure!=null &&stationClassStructure.getStationId()!=null ){
+            stationClassStructure.setStatus("1");
             list = stationClassStructureService.listOilStructure(stationClassStructure);
         }
         return getTable(list);
@@ -107,15 +103,35 @@ public class StationClassStructureController extends BaseController
     public TableDataInfo listPersonnelPayStructure(StationClassStructure stationClassStructure)
     {
         List<StationClassStructure> list = new ArrayList<>();
+        List<StationClassStructure> list1 = new ArrayList<>();
+        List<StationClassStructure> lastlist = new ArrayList<>();
         if(stationClassStructure!=null &&stationClassStructure.getStationId()!=null ){
+            stationClassStructure.setStatus("1");
             list = stationClassStructureService.listPersonnelPayStructure(stationClassStructure);
+            StationClassStructure stationClassStructure1=stationClassStructure;
+            stationClassStructure1.setStatus("3");
+            list1 = stationClassStructureService.listPersonnelPayStructure(stationClassStructure1);
+            if(list1.size()>0){
+                for(StationClassStructure structure:list){
+                    for(StationClassStructure structure1:list1){
+                        if(structure.getOilPersonnel().equals(structure1.getOilPersonnel())){
+                            structure.setRefundAmt(structure1.getRefundAmt());
+                        }
+                    }
+                    lastlist.add(structure);
+                }
+            }else {
+                lastlist=list;
+            }
+
         }
-        return getTable(list);
+        return getTable(lastlist);
     }
 
     @GetMapping("/listClass")
     public AjaxResult listClass(StationClassStructure stationClassStructure)
     {
+        stationClassStructure.setStatus("1");
         return AjaxResult.success(stationClassStructureService.listClass(stationClassStructure));
     }
     /**
@@ -510,125 +526,351 @@ public class StationClassStructureController extends BaseController
             //获取上次班结时间
             PayOrder order=new PayOrder();
             order.setStationId(stationId);
-            order.setStatus("1");
+            //order.setStatus("1");
             beginTime= dateFormat.format(sss.getClassStructureDate());
             order.setBeginTime(beginTime);
             order.setEndTime( dateFormat.format(date));
             List<PayOrder> list = payOrderService.selectPayOrderList(order);
-            for(PayOrder payOrder:list){
-                StationClassStructure stationclass =new StationClassStructure();
-                stationclass.setStationId(payOrder.getStationId());
-                stationclass.setStationName(payOrder.getStationName());
-                stationclass.setClassStartDate(dfe.parse(beginTime));
-                stationclass.setClassStructureMan(username);
-                stationclass.setClassStructureNo(no);
-                stationclass.setClassStructureDate(date);
-                stationclass.setOrderNo(payOrder.getOrderNo());
-                stationclass.setOilGun(payOrder.getOilGun());
-                stationclass.setOilName(payOrder.getOilName());
-                if(payOrder.getOilPirce()!=null){
-                    stationclass.setOilPirce(payOrder.getOilPirce());
-                }
-                if(payOrder.getOilType()!=null){
-                    stationclass.setOilType(payOrder.getOilType());
-                }
-                stationclass.setConsumerId(payOrder.getConsumerId());
-                stationclass.setConsumer(payOrder.getConsumer());
-                stationclass.setAmt(payOrder.getAmt());
-                if(payOrder.getReceivableAmt()!=null){
-                    stationclass.setReceivableAmt(payOrder.getReceivableAmt());
-                }else{
-                    stationclass.setReceivableAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getReceivedAmt()!=null){
-                    stationclass.setReceivedAmt(payOrder.getReceivedAmt());
-                }else{
-                    stationclass.setReceivedAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getDiscountAmt()!=null){
-                    stationclass.setDiscountAmt(payOrder.getDiscountAmt());
-                }else{
-                    stationclass.setDiscountAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getDiscountCouponAmt()!=null){
-                    stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
-                }else{
-                    stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getWxAmt()!=null){
-                    stationclass.setWxAmt(payOrder.getWxAmt());
-                }else{
-                    stationclass.setWxAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getZfbAmt()!=null){
-                    stationclass.setZfbAmt(payOrder.getZfbAmt());
-                }else{
-                    stationclass.setZfbAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getPosAmt()!=null){
-                    stationclass.setPosAmt(payOrder.getPosAmt());
-                }else{
-                    stationclass.setPosAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getXjAmt()!=null){
-                    stationclass.setXjAmt(payOrder.getXjAmt());
-                }else{
-                    stationclass.setXjAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getDidiAppAmt()!=null){
-                    stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
-                }else{
-                    stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getTyAppAmt()!=null){
-                    stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
-                }else{
-                    stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getOtherAmt()!=null){
-                    stationclass.setOtherAmt(payOrder.getOtherAmt());
-                }else{
-                    stationclass.setOtherAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getDzkAmt()!=null){
-                    stationclass.setDzkAmt(payOrder.getDzkAmt());
-                }else{
-                    stationclass.setDzkAmt(BigDecimal.valueOf(0));
-                }
-                if(payOrder.getMemberAmt()!=null){
-                    stationclass.setMemberAmt(payOrder.getMemberAmt());
-                }else{
-                    stationclass.setMemberAmt(BigDecimal.valueOf(0));
-                }
-                stationclass.setOrderLiters(payOrder.getOrderLiters());
-                stationclass.setPayWay(payOrder.getPayWay());
-                stationclass.setPayType(payOrder.getPayType());
-                stationclass.setPayDate(payOrder.getPayDate());
-                stationclass.setOilPersonnel(payOrder.getOilPersonnel());
-                stationclass.setOilPersonnelId(payOrder.getOilPersonnelId());
-                stationclass.setOrderType(payOrder.getOrderType());
-                if(payOrder.getPrintCount()!=null){
-                    stationclass.setPrintNum(payOrder.getPrintCount());
-                }else{
-                    stationclass.setPrintNum(Long.valueOf("0"));
+            //调用同一个参数和方法时要重新生成
+            PayOrder order1=new PayOrder();
+            order1.setStationId(stationId);
+            order1.setBeginTime(beginTime);
+            order1.setEndTime( dateFormat.format(date));
+            order1.setStatus("3");
+            order1.setRefundSuccessStatus("1");
+            List<PayOrder> list1 = payOrderService.selectPayOrderList(order1);
+            if(list1.size()>0&&list1!=null) {
+                for (PayOrder payOrder : list1) {
+                    StationClassStructure stationclass = new StationClassStructure();
+                    stationclass.setStationId(payOrder.getStationId());
+                    stationclass.setStationName(payOrder.getStationName());
+                    stationclass.setClassStartDate(dfe.parse(beginTime));
+                    stationclass.setClassStructureMan(username);
+                    stationclass.setClassStructureNo(no);
+                    stationclass.setClassStructureDate(date);
+                    stationclass.setOrderNo(payOrder.getOrderNo());
+                    stationclass.setOilGun(payOrder.getOilGun());
+                    stationclass.setOilName(payOrder.getOilName());
+                    if (payOrder.getOilPirce() != null) {
+                        stationclass.setOilPirce(payOrder.getOilPirce());
+                    }
+                    if (payOrder.getOilType() != null) {
+                        stationclass.setOilType(payOrder.getOilType());
+                    }
+                    stationclass.setConsumerId(payOrder.getConsumerId());
+                    stationclass.setConsumer(payOrder.getConsumer());
+                    stationclass.setAmt(payOrder.getAmt());
+                    if (payOrder.getReceivableAmt() != null) {
+                        stationclass.setReceivableAmt(payOrder.getReceivableAmt());
+                    } else {
+                        stationclass.setReceivableAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getReceivedAmt() != null) {
+                        stationclass.setReceivedAmt(payOrder.getReceivedAmt());
+                    } else {
+                        stationclass.setReceivedAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDiscountAmt() != null) {
+                        stationclass.setDiscountAmt(payOrder.getDiscountAmt());
+                    } else {
+                        stationclass.setDiscountAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDiscountCouponAmt() != null) {
+                        stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
+                    } else {
+                        stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getWxAmt() != null) {
+                        stationclass.setWxAmt(payOrder.getWxAmt());
+                    } else {
+                        stationclass.setWxAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getZfbAmt() != null) {
+                        stationclass.setZfbAmt(payOrder.getZfbAmt());
+                    } else {
+                        stationclass.setZfbAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getPosAmt() != null) {
+                        stationclass.setPosAmt(payOrder.getPosAmt());
+                    } else {
+                        stationclass.setPosAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getXjAmt() != null) {
+                        stationclass.setXjAmt(payOrder.getXjAmt());
+                    } else {
+                        stationclass.setXjAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDidiAppAmt() != null) {
+                        stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
+                    } else {
+                        stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getTyAppAmt() != null) {
+                        stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
+                    } else {
+                        stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getOtherAmt() != null) {
+                        stationclass.setOtherAmt(payOrder.getOtherAmt());
+                    } else {
+                        stationclass.setOtherAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDzkAmt() != null) {
+                        stationclass.setDzkAmt(payOrder.getDzkAmt());
+                    } else {
+                        stationclass.setDzkAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getMemberAmt() != null) {
+                        stationclass.setMemberAmt(payOrder.getMemberAmt());
+                    } else {
+                        stationclass.setMemberAmt(BigDecimal.valueOf(0));
+                    }
+                    stationclass.setOrderLiters(payOrder.getOrderLiters());
+                    stationclass.setPayWay(payOrder.getPayWay());
+                    stationclass.setPayType(payOrder.getPayType());
+                    stationclass.setPayDate(payOrder.getPayDate());
+                    stationclass.setOilPersonnel(payOrder.getOilPersonnel());
+                    stationclass.setOilPersonnelId(payOrder.getOilPersonnelId());
+                    stationclass.setOrderType(payOrder.getOrderType());
+                    stationclass.setStatus("3");
+                    if (payOrder.getPrintCount() != null) {
+                        stationclass.setPrintNum(payOrder.getPrintCount());
+                    } else {
+                        stationclass.setPrintNum(Long.valueOf("0"));
+                    }
+
+                    i = stationClassStructureService.insertStationClassStructure(stationclass);
                 }
+            }
+            if(list.size()>0&&list!=null) {
+                for (PayOrder payOrder : list) {
+                    StationClassStructure stationclass = new StationClassStructure();
+                    stationclass.setStationId(payOrder.getStationId());
+                    stationclass.setStationName(payOrder.getStationName());
+                    stationclass.setClassStartDate(dfe.parse(beginTime));
+                    stationclass.setClassStructureMan(username);
+                    stationclass.setClassStructureNo(no);
+                    stationclass.setClassStructureDate(date);
+                    stationclass.setOrderNo(payOrder.getOrderNo());
+                    stationclass.setOilGun(payOrder.getOilGun());
+                    stationclass.setOilName(payOrder.getOilName());
+                    if (payOrder.getOilPirce() != null) {
+                        stationclass.setOilPirce(payOrder.getOilPirce());
+                    }
+                    if (payOrder.getOilType() != null) {
+                        stationclass.setOilType(payOrder.getOilType());
+                    }
+                    stationclass.setConsumerId(payOrder.getConsumerId());
+                    stationclass.setConsumer(payOrder.getConsumer());
+                    stationclass.setAmt(payOrder.getAmt());
+                    if (payOrder.getReceivableAmt() != null) {
+                        stationclass.setReceivableAmt(payOrder.getReceivableAmt());
+                    } else {
+                        stationclass.setReceivableAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getReceivedAmt() != null) {
+                        stationclass.setReceivedAmt(payOrder.getReceivedAmt());
+                    } else {
+                        stationclass.setReceivedAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDiscountAmt() != null) {
+                        stationclass.setDiscountAmt(payOrder.getDiscountAmt());
+                    } else {
+                        stationclass.setDiscountAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDiscountCouponAmt() != null) {
+                        stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
+                    } else {
+                        stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getWxAmt() != null) {
+                        stationclass.setWxAmt(payOrder.getWxAmt());
+                    } else {
+                        stationclass.setWxAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getZfbAmt() != null) {
+                        stationclass.setZfbAmt(payOrder.getZfbAmt());
+                    } else {
+                        stationclass.setZfbAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getPosAmt() != null) {
+                        stationclass.setPosAmt(payOrder.getPosAmt());
+                    } else {
+                        stationclass.setPosAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getXjAmt() != null) {
+                        stationclass.setXjAmt(payOrder.getXjAmt());
+                    } else {
+                        stationclass.setXjAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDidiAppAmt() != null) {
+                        stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
+                    } else {
+                        stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getTyAppAmt() != null) {
+                        stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
+                    } else {
+                        stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getOtherAmt() != null) {
+                        stationclass.setOtherAmt(payOrder.getOtherAmt());
+                    } else {
+                        stationclass.setOtherAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getDzkAmt() != null) {
+                        stationclass.setDzkAmt(payOrder.getDzkAmt());
+                    } else {
+                        stationclass.setDzkAmt(BigDecimal.valueOf(0));
+                    }
+                    if (payOrder.getMemberAmt() != null) {
+                        stationclass.setMemberAmt(payOrder.getMemberAmt());
+                    } else {
+                        stationclass.setMemberAmt(BigDecimal.valueOf(0));
+                    }
+                    stationclass.setOrderLiters(payOrder.getOrderLiters());
+                    stationclass.setPayWay(payOrder.getPayWay());
+                    stationclass.setPayType(payOrder.getPayType());
+                    stationclass.setPayDate(payOrder.getPayDate());
+                    stationclass.setOilPersonnel(payOrder.getOilPersonnel());
+                    stationclass.setOilPersonnelId(payOrder.getOilPersonnelId());
+                    stationclass.setOrderType(payOrder.getOrderType());
+                    if (payOrder.getPrintCount() != null) {
+                        stationclass.setPrintNum(payOrder.getPrintCount());
+                    } else {
+                        stationclass.setPrintNum(Long.valueOf("0"));
+                    }
 
-                i= stationClassStructureService.insertStationClassStructure(stationclass);
+                    i = stationClassStructureService.insertStationClassStructure(stationclass);
+                }
             }
         }else{
             //初次班结 班结时间默认为当前时间,班结人username
             PayOrder p =new  PayOrder();
             p.setStationId(stationId);
-            p.setStatus("1");
+            //p.setStatus("1");
             PayOrder orders= payOrderService.getPayOrderInfoMin(p);
             if(orders!=null){
                 //根据班结时间查询订单
                 PayOrder order=new PayOrder();
                 beginTime= dateFormat.format(orders.getCreatedDate());
                 order.setStationId(stationId);
-                order.setStatus("1");
+                //order.setStatus("1");
                 order.setEndTime(dateFormat.format(date));
                 List<PayOrder> list = payOrderService.selectPayOrderList(order);
+                //调用同一个参数和方法时要重新生成
+                PayOrder order1=new PayOrder();
+                order1.setStationId(stationId);
+                order1.setBeginTime(beginTime);
+                order1.setEndTime( dateFormat.format(date));
+                order1.setStatus("3");
+                order1.setRefundSuccessStatus("1");
+                List<PayOrder> list1 = payOrderService.selectPayOrderList(order1);
+
+                if(list1 !=null && list1.size()>0) {
+                    for (PayOrder payOrder : list1) {
+                        StationClassStructure stationclass = new StationClassStructure();
+                        stationclass.setStationId(payOrder.getStationId());
+                        stationclass.setStationName(payOrder.getStationName());
+                        stationclass.setClassStartDate(dfe.parse(beginTime));
+                        stationclass.setClassStructureMan(username);
+                        stationclass.setClassStructureNo(no);
+                        stationclass.setClassStructureDate(date);
+                        stationclass.setOrderNo(payOrder.getOrderNo());
+                        stationclass.setOilGun(payOrder.getOilGun());
+                        stationclass.setOilName(payOrder.getOilName());
+                        if (payOrder.getOilPirce() != null) {
+                            stationclass.setOilPirce(payOrder.getOilPirce());
+                        }
+                        if (payOrder.getOilType() != null) {
+                            stationclass.setOilType(payOrder.getOilType());
+                        }
+                        stationclass.setConsumerId(payOrder.getConsumerId());
+                        stationclass.setConsumer(payOrder.getConsumer());
+                        stationclass.setAmt(payOrder.getAmt());
+                        if (payOrder.getReceivableAmt() != null) {
+                            stationclass.setReceivableAmt(payOrder.getReceivableAmt());
+                        } else {
+                            stationclass.setReceivableAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getReceivedAmt() != null) {
+                            stationclass.setReceivedAmt(payOrder.getReceivedAmt());
+                        } else {
+                            stationclass.setReceivedAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getDiscountAmt() != null) {
+                            stationclass.setDiscountAmt(payOrder.getDiscountAmt());
+                        } else {
+                            stationclass.setDiscountAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getDiscountCouponAmt() != null) {
+                            stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
+                        } else {
+                            stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getWxAmt() != null) {
+                            stationclass.setWxAmt(payOrder.getWxAmt());
+                        } else {
+                            stationclass.setWxAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getZfbAmt() != null) {
+                            stationclass.setZfbAmt(payOrder.getZfbAmt());
+                        } else {
+                            stationclass.setZfbAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getPosAmt() != null) {
+                            stationclass.setPosAmt(payOrder.getPosAmt());
+                        } else {
+                            stationclass.setPosAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getXjAmt() != null) {
+                            stationclass.setXjAmt(payOrder.getXjAmt());
+                        } else {
+                            stationclass.setXjAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getDidiAppAmt() != null) {
+                            stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
+                        } else {
+                            stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getTyAppAmt() != null) {
+                            stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
+                        } else {
+                            stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getOtherAmt() != null) {
+                            stationclass.setOtherAmt(payOrder.getOtherAmt());
+                        } else {
+                            stationclass.setOtherAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getDzkAmt() != null) {
+                            stationclass.setDzkAmt(payOrder.getDzkAmt());
+                        } else {
+                            stationclass.setDzkAmt(BigDecimal.valueOf(0));
+                        }
+                        if (payOrder.getMemberAmt() != null) {
+                            stationclass.setMemberAmt(payOrder.getMemberAmt());
+                        } else {
+                            stationclass.setMemberAmt(BigDecimal.valueOf(0));
+                        }
+                        stationclass.setOrderLiters(payOrder.getOrderLiters());
+                        stationclass.setPayWay(payOrder.getPayWay());
+                        stationclass.setPayType(payOrder.getPayType());
+                        stationclass.setPayDate(payOrder.getPayDate());
+                        stationclass.setOilPersonnel(payOrder.getOilPersonnel());
+                        stationclass.setOilPersonnelId(payOrder.getOilPersonnelId());
+                        stationclass.setOrderType(payOrder.getOrderType());
+                        stationclass.setStatus("3");
+                        if (payOrder.getPrintCount() != null) {
+                            stationclass.setPrintNum(payOrder.getPrintCount());
+                        } else {
+                            stationclass.setPrintNum(Long.valueOf("0"));
+                        }
+
+                        i = stationClassStructureService.insertStationClassStructure(stationclass);
+                    }
+                }
+
                 if(list !=null && list.size()>0){
                     for(PayOrder payOrder:list){
                         StationClassStructure stationclass =new StationClassStructure();
@@ -737,8 +979,16 @@ public class StationClassStructureController extends BaseController
         scs.setClassStructureNo(no);
         scs.setStationId(stationId);
         scs.setOrderType("1"); //油品
+        scs.setStatus("1");
         //汇总班结数据将汇总的数据插入到汇总数据中
         StationClassStructure stationclass = stationClassStructureService.selectSummyClassStructure(scs);
+        StationClassStructure scs1 =new StationClassStructure();
+        scs1.setClassStructureNo(no);
+        scs1.setStationId(stationId);
+        scs1.setOrderType("1"); //油品
+        scs1.setStatus("3");
+
+        StationClassStructure stationclass1 = stationClassStructureService.selectSummyClassStructure(scs1);
         if(stationclass!=null){
             StationClassesSummary stationClassesSummary =new StationClassesSummary();
             stationClassesSummary.setClassesNo(stationclass.getClassStructureNo());
@@ -790,6 +1040,14 @@ public class StationClassStructureController extends BaseController
             }else{
                 stationClassesSummary.setPrintNum(Long.valueOf("0"));
             }
+            if(stationclass !=null){
+                if(stationclass1.getAmt()!=null){
+                    stationClassesSummary.setRefundAmt(stationclass1.getAmt());
+                }else {
+                    stationClassesSummary.setRefundAmt(BigDecimal.valueOf(0));
+                }
+            }
+
             stationClassesSummary.setClassesMan(stationclass.getClassStructureMan());
             i=stationClassesSummaryService.insertStationClassesSummary(stationClassesSummary);
             //班结成功,打印小票
@@ -801,17 +1059,39 @@ public class StationClassStructureController extends BaseController
                 classStructure.setClassStructureNo(no);
                 classStructure.setStationId(stationId);
                 classStructure.setOrderType("1");// 油品
+                classStructure.setStatus("1");// 油品
                 List<StationClassStructure>  list= stationClassStructureService.listOilStructure(classStructure);
+
                 //支付方式汇总数据
                 List<StationClassStructure>  paylist= stationClassStructureService.listPayStructure(classStructure);
+                StationClassStructure classStructure1= new StationClassStructure();
+                classStructure1.setClassStructureNo(no);
+                classStructure1.setStationId(stationId);
+                classStructure1.setOrderType("1");// 油品
+                classStructure1.setStatus("3");// 查询退款订单信息
+                List<StationClassStructure>  refundlist= stationClassStructureService.listOilStructure(classStructure1);
                 //汇总非油品
                 StationClassStructure selectNoOil =new StationClassStructure();
                 selectNoOil.setClassStructureNo(no);
                 selectNoOil.setStationId(stationId);
                 selectNoOil.setOrderType("2");// 非油品
                 StationClassStructure search = stationClassStructureService.selectSummyClassStructure(selectNoOil);
+
                 //查询出小票数据
                 String content;
+                BigDecimal refundAmt =  new BigDecimal(0);
+                if(refundlist!=null && refundlist.size()>0  ){
+                    for(StationClassStructure str : refundlist){
+                        //实收金额
+                        if( str.getAmt()==null){
+                            str.setAmt(BigDecimal.valueOf(0));
+                        }else{
+                            refundAmt=refundAmt.add(str.getAmt());
+
+                        }
+
+                    }
+                }
                 content = "<CB>班结小票</CB><BR>";
                 content += "--------------------------------<BR>";
                 if(list!=null && list.size()>0 && paylist !=null && paylist.size()>0 ){
@@ -829,6 +1109,7 @@ public class StationClassStructureController extends BaseController
                     BigDecimal coupon = new BigDecimal(0);
                     BigDecimal ysAmt =  new BigDecimal(0);
                     BigDecimal dzAmt =  new BigDecimal(0);
+
                     int num = 0;
                     int pageNum=0;
                     for(StationClassStructure str : list){
@@ -869,6 +1150,7 @@ public class StationClassStructureController extends BaseController
                         }else{
                             dzAmt = dzAmt.add(str.getReceivedAmt());
                         }
+
                         //优惠金额
                         if( str.getDiscountAmt()==null){
                             str.setDiscountAmt(BigDecimal.valueOf(0));
@@ -921,6 +1203,7 @@ public class StationClassStructureController extends BaseController
                     content += "优惠总额: "+coupon+" 元<BR>";
                     content += "实际支付: "+sumAmt+" 元<BR>";
                     content += "到款金额: "+dzAmt+"元<BR>";
+                    content += "退款金额: "+refundAmt+"元<BR>";
                     content += "--------------------------------<BR>";
                     if(search!=null){
                         if( search.getAmt()==null){
@@ -983,6 +1266,15 @@ public class StationClassStructureController extends BaseController
                 List<StationClassStructure>  list= stationClassStructureService.listOilStructure(classStructure);
                 //支付方式汇总数据
                 List<StationClassStructure>  paylist= stationClassStructureService.listPayStructure(classStructure);
+
+                StationClassStructure classStructure1= new StationClassStructure();
+                classStructure1.setClassStructureNo(stationClassStructure.getClassStructureNo());
+                classStructure1.setStationId(dept.getDeptId());
+                classStructure1.setOrderType("1");// 油品
+                classStructure1.setStatus("3");// 查询退款订单信息
+                List<StationClassStructure>  refundlist= stationClassStructureService.listOilStructure(classStructure1);
+
+
                 //汇总非油品
                 StationClassStructure selectNoOil =new StationClassStructure();
                 selectNoOil.setClassStructureNo(stationClassStructure.getClassStructureNo());
@@ -991,6 +1283,21 @@ public class StationClassStructureController extends BaseController
                 StationClassStructure search = stationClassStructureService.selectSummyClassStructure(selectNoOil);
                 //查询出小票数据
                 String content;
+                //退款金额的合计信息
+                BigDecimal refundAmt =  new BigDecimal(0);
+                if(refundlist!=null && refundlist.size()>0  ){
+                    for(StationClassStructure str : refundlist){
+                        //实收金额
+                        if( str.getAmt()==null){
+                            str.setAmt(BigDecimal.valueOf(0));
+
+                        }else{
+                            refundAmt=refundAmt.add(str.getAmt());
+
+                        }
+
+                    }
+                }
                 content = "<CB>班结小票</CB><BR>";
                 content += "--------------------------------<BR>";
                 if(list!=null && list.size()>0 && paylist !=null && paylist.size()>0 ){
@@ -1100,6 +1407,7 @@ public class StationClassStructureController extends BaseController
                     content += "优惠总额: "+coupon+" 元<BR>";
                     content += "实际支付: "+sumAmt+" 元<BR>";
                     content += "到款金额: "+dzAmt+"元<BR>";
+                    content += "退款金额: "+refundAmt+"元<BR>";
                     content += "--------------------------------<BR>";
                     if(search!=null){
                         if( search.getAmt()==null){
@@ -1295,6 +1603,7 @@ public class StationClassStructureController extends BaseController
                 classStructure.setZfbAmt(order.getZfbAmt());
                 classStructure.setXjAmt(order.getXjAmt());
                 classStructure.setMemberAmt(order.getMemberAmt());
+                classStructure.setDzkAmt(order.getDzkAmt());
                 classStructure.setOrderLiters(order.getOrderLiters());
                 classStructure.setOrderNo(order.getOrderNo());
                 list.add(classStructure);

+ 47 - 0
yijia-station/src/main/java/com/yijia/station/controller/SysAppUserInfoController.java

@@ -0,0 +1,47 @@
+package com.yijia.station.controller;
+
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
+import com.yijia.common.core.page.TableDataInfo;
+import com.yijia.station.domain.SysAppUserInfo;
+import com.yijia.station.service.ISysAppUserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/station/appUserInfo")
+public class SysAppUserInfoController extends BaseController {
+
+    @Autowired
+    private ISysAppUserInfoService sysAppUserInfoService;
+
+
+    /**
+     * 查询订单支付列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(SysAppUserInfo sysAppUserInfo)
+    {
+
+        List<SysAppUserInfo>   sysAppUserInfoList = sysAppUserInfoService.selectSysAppUserInfoList(sysAppUserInfo);
+        return getDataTable(sysAppUserInfoList);
+    }
+    /**
+     * 关联用户查询订单支付列表
+     */
+    @GetMapping("/selectById")
+    public AjaxResult selectAppUserInfo(@PathVariable("orderId") Long orderId)
+    {
+
+        return AjaxResult.success(sysAppUserInfoService.selectSysAppUserInfoById(orderId));
+    }
+
+
+
+
+}

+ 96 - 6
yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java

@@ -1,14 +1,14 @@
 package com.yijia.station.domain;
 
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
 import com.fasterxml.jackson.annotation.JsonFormat;
-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;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 /**
  * 订单支付对象 pay_order
@@ -187,6 +187,29 @@ public class PayOrder extends BaseEntity
 
     private List<String> stationIdList;
 
+    /** 退款成功时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    //@Excel(name = "退款成功的时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date refundSuccessDate;
+
+    //根据标志确定当前是否是查询班结内退款的订单信息
+    private String refundSuccessStatus;
+
+    public String getRefundSuccessStatus() {
+        return refundSuccessStatus;
+    }
+
+    public void setRefundSuccessStatus(String refundSuccessStatus) {
+        this.refundSuccessStatus = refundSuccessStatus;
+    }
+
+    public Date getRefundSuccessDate() {
+        return refundSuccessDate;
+    }
+
+    public void setRefundSuccessDate(Date refundSuccessDate) {
+        this.refundSuccessDate = refundSuccessDate;
+    }
 
     public List<String> getStationIdList() {
         return stationIdList;
@@ -206,11 +229,78 @@ public class PayOrder extends BaseEntity
     private Integer zfbNum;
     //现金支付数量
     private Integer xjNum;
+    //电子卡支付数量
+    private Integer dzkNum;
 
 
     private Integer countNum;
 
 
+    //退款人员id
+    private Long refundUser;
+    //退款人员id
+    private Long examinUser;
+
+    //审批状态
+    private String examinStatus;
+
+    /** 退款时间*/
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date refundDate;
+
+
+    /** 审核时间*/
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date examinDate;
+
+    public Integer getDzkNum() {
+        return dzkNum;
+    }
+
+    public void setDzkNum(Integer dzkNum) {
+        this.dzkNum = dzkNum;
+    }
+
+    public Long getExaminUser() {
+        return examinUser;
+    }
+
+    public void setExaminUser(Long examinUser) {
+        this.examinUser = examinUser;
+    }
+
+    public String getExaminStatus() {
+        return examinStatus;
+    }
+
+    public void setExaminStatus(String examinStatus) {
+        this.examinStatus = examinStatus;
+    }
+
+    public Date getExaminDate() {
+        return examinDate;
+    }
+
+    public void setExaminDate(Date examinDate) {
+        this.examinDate = examinDate;
+    }
+
+    public Long getRefundUser() {
+        return refundUser;
+    }
+
+    public void setRefundUser(Long refundUser) {
+        this.refundUser = refundUser;
+    }
+
+    public Date getRefundDate() {
+        return refundDate;
+    }
+
+    public void setRefundDate(Date refundDate) {
+        this.refundDate = refundDate;
+    }
+
     public String getOilPersonnelId() {
         return oilPersonnelId;
     }

+ 38 - 4
yijia-station/src/main/java/com/yijia/station/domain/StationClassStructure.java

@@ -1,12 +1,13 @@
 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;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.yijia.common.annotation.Excel;
 import com.yijia.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  * 班结管理对象 station_class_structure
@@ -220,6 +221,9 @@ public class StationClassStructure extends BaseEntity
     @Excel(name = "客户等级")
     private String customerGrade;
     private String oilPersonnelId;
+    /** 退款金额 */
+    @Excel(name = "退款金额")
+    private BigDecimal refundAmt;
 
 
     /**
@@ -233,6 +237,36 @@ public class StationClassStructure extends BaseEntity
     //现金支付数量
     private Integer xjNum;
 
+    //电子卡支付数量
+    private Integer dzkNum;
+
+
+    //支付状态,0支付成功,1支付失败
+    private String status;
+
+    public BigDecimal getRefundAmt() {
+        return refundAmt;
+    }
+
+    public void setRefundAmt(BigDecimal refundAmt) {
+        this.refundAmt = refundAmt;
+    }
+
+    public Integer getDzkNum() {
+        return dzkNum;
+    }
+
+    public void setDzkNum(Integer dzkNum) {
+        this.dzkNum = dzkNum;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
 
     public String getOilPersonnelId() {
         return oilPersonnelId;

+ 17 - 6
yijia-station/src/main/java/com/yijia/station/domain/StationClassesSummary.java

@@ -1,14 +1,14 @@
 package com.yijia.station.domain;
 
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
 import com.fasterxml.jackson.annotation.JsonFormat;
-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;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 /**
  * 班结汇总对象 station_classes_summary
@@ -91,6 +91,17 @@ public class StationClassesSummary extends BaseEntity
     private String likeClassesNo;
     private String likeClassesMan;
 
+    private BigDecimal refundAmt;
+
+
+    public BigDecimal getRefundAmt() {
+        return refundAmt;
+    }
+
+    public void setRefundAmt(BigDecimal refundAmt) {
+        this.refundAmt = refundAmt;
+    }
+
     public String getLikeClassesNo() {
         return likeClassesNo;
     }

+ 225 - 0
yijia-station/src/main/java/com/yijia/station/domain/SysAppUserInfo.java

@@ -0,0 +1,225 @@
+package com.yijia.station.domain;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+public class SysAppUserInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 岗位序号 */
+    @Excel(name = "用户的id信息")
+    private Long userId;
+
+    /** 岗位编码 */
+    @Excel(name = "注册类型:1-微信公众号;2-微信小程序")
+    private String userType;
+
+    /** 岗位名称 */
+    @Excel(name = "小程序的openid")
+    private String minaOpenid;
+
+    /** 岗位排序 */
+    @Excel(name = "公众号的openid")
+    private String blogOpenid;
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "注册者手机号码")
+    private String mobilePhone;
+
+
+    /** 岗位名称 */
+    @Excel(name = "昵称")
+    private String blogNickName;
+    /** 岗位名称 */
+    @Excel(name = "注册者性别:M-男  W:女")
+    private String sexFlag;
+
+    /** 注册时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date registeDate;
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "公众号用户token信息")
+    private String blogToken;
+
+
+    /** 岗位名称 */
+    @Excel(name = "小程序用户token信息")
+    private String minaToken;
+
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "用户头像")
+    private String blogProfilePhoto;
+
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date updateDate;
+
+
+    /** 岗位名称 */
+    @Excel(name = "微信UnionID")
+    private String unionId;
+
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "油站ID")
+    private Long stationId;
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "支付宝ID")
+    private Long aliId;
+
+    public String getBlogNickName() {
+        return blogNickName;
+    }
+
+    public void setBlogNickName(String blogNickName) {
+        this.blogNickName = blogNickName;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserType() {
+        return userType;
+    }
+
+    public void setUserType(String userType) {
+        this.userType = userType;
+    }
+
+    public String getMinaOpenid() {
+        return minaOpenid;
+    }
+
+    public void setMinaOpenid(String minaOpenid) {
+        this.minaOpenid = minaOpenid;
+    }
+
+    public String getBlogOpenid() {
+        return blogOpenid;
+    }
+
+    public void setBlogOpenid(String blogOpenid) {
+        this.blogOpenid = blogOpenid;
+    }
+
+    public String getMobilePhone() {
+        return mobilePhone;
+    }
+
+    public void setMobilePhone(String mobilePhone) {
+        this.mobilePhone = mobilePhone;
+    }
+
+    public String getSexFlag() {
+        return sexFlag;
+    }
+
+    public void setSexFlag(String sexFlag) {
+        this.sexFlag = sexFlag;
+    }
+
+    public Date getRegisteDate() {
+        return registeDate;
+    }
+
+    public void setRegisteDate(Date registeDate) {
+        this.registeDate = registeDate;
+    }
+
+    public String getBlogToken() {
+        return blogToken;
+    }
+
+    public void setBlogToken(String blogToken) {
+        this.blogToken = blogToken;
+    }
+
+    public String getMinaToken() {
+        return minaToken;
+    }
+
+    public void setMinaToken(String minaToken) {
+        this.minaToken = minaToken;
+    }
+
+    public String getBlogProfilePhoto() {
+        return blogProfilePhoto;
+    }
+
+    public void setBlogProfilePhoto(String blogProfilePhoto) {
+        this.blogProfilePhoto = blogProfilePhoto;
+    }
+
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+
+    public String getUnionId() {
+        return unionId;
+    }
+
+    public void setUnionId(String unionId) {
+        this.unionId = unionId;
+    }
+
+    public Long getStationId() {
+        return stationId;
+    }
+
+    public void setStationId(Long stationId) {
+        this.stationId = stationId;
+    }
+
+    public Long getAliId() {
+        return aliId;
+    }
+
+    public void setAliId(Long aliId) {
+        this.aliId = aliId;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("userId", getUserId())
+                .append("userType", getUserType())
+                .append("minaOpenid", getMinaOpenid())
+                .append("blogOpenid", getBlogOpenid())
+                .append("mobilePhone", getMobilePhone())
+                .append("blogNickName", getBlogNickName())
+                .append("sexFlag", getSexFlag())
+                .append("registeDate", getRegisteDate())
+                .append("blogToken", getBlogToken())
+                .append("minaToken", getMinaToken())
+                .append("blogProfilePhoto", getBlogProfilePhoto())
+                .append("updateDate", getUpdateDate())
+                .append("unionId", getUnionId())
+                .append("stationId", getStationId())
+                .append("aliId", getAliId())
+                .toString();
+    }
+
+}

+ 33 - 0
yijia-station/src/main/java/com/yijia/station/mapper/SysAppUserInfoMapper.java

@@ -0,0 +1,33 @@
+package com.yijia.station.mapper;
+
+import com.yijia.station.domain.SysAppUserInfo;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 参数配置 数据层
+ * 
+ * @author yijia
+ */
+@Mapper
+public interface SysAppUserInfoMapper
+{
+    /**
+     * 通过id查询user
+     * 
+     * @param userId 用户参数信息
+     * @return 用户信息
+     */
+    public SysAppUserInfo selectSysAppUserInfoById(Long userId);
+
+    /**
+     * 查询用户信息
+     * 
+     * @param sysAppUserInfo 查询用户信息
+     * @return 参数配置集合
+     */
+    public List<SysAppUserInfo> selectSysAppUserInfoList(SysAppUserInfo sysAppUserInfo);
+
+
+}

+ 6 - 1
yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java

@@ -1,8 +1,11 @@
 package com.yijia.station.service;
 
-import java.util.List;
+import com.yijia.common.core.domain.AjaxResult;
 import com.yijia.station.domain.PayOrder;
 
+import java.util.List;
+
+
 /**
  * 订单支付Service接口
  *
@@ -195,4 +198,6 @@ public interface IPayOrderService
      * 关联用户查询订单支付列表
      */
     public List<PayOrder> selectUserPayOrderList(PayOrder payOrder);
+
+    public AjaxResult sxfRefund(PayOrder payOrder) throws  Exception;
 }

+ 30 - 0
yijia-station/src/main/java/com/yijia/station/service/ISysAppUserInfoService.java

@@ -0,0 +1,30 @@
+package com.yijia.station.service;
+
+import com.yijia.station.domain.SysAppUserInfo;
+
+import java.util.List;
+
+/**
+ * 代理机构Service接口
+ *
+ * @author yijia
+ * @date 2021-07-01
+ */
+public interface ISysAppUserInfoService
+{
+    /**
+     * 通过id查询user
+     *
+     * @param userId 用户参数信息
+     * @return 用户信息
+     */
+    public SysAppUserInfo selectSysAppUserInfoById(Long userId);
+
+    /**
+     * 查询用户信息
+     *
+     * @param sysAppUserInfo 查询用户信息
+     * @return 参数配置集合
+     */
+    public List<SysAppUserInfo> selectSysAppUserInfoList(SysAppUserInfo sysAppUserInfo);
+}

+ 194 - 4
yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java

@@ -1,11 +1,34 @@
 package com.yijia.station.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.yijia.station.mapper.PayOrderMapper;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.parser.Feature;
+import com.yijia.common.core.domain.AjaxResult;
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.customer.domain.CustomerGradeSetting;
+import com.yijia.customer.domain.CustomerManage;
+import com.yijia.customer.service.ICustomerGradeSettingService;
+import com.yijia.customer.service.ICustomerManageService;
+import com.yijia.integral.domain.CustomerPoints;
+import com.yijia.integral.domain.CustomerPointsRecord;
+import com.yijia.integral.service.ICustomerPointsRecordService;
+import com.yijia.integral.service.ICustomerPointsService;
+import com.yijia.station.controller.HttpUtils;
+import com.yijia.station.controller.RSASignature;
+import com.yijia.station.controller.SXFPaySign;
 import com.yijia.station.domain.PayOrder;
+import com.yijia.station.domain.SysAppUserInfo;
+import com.yijia.station.mapper.PayOrderMapper;
+import com.yijia.station.mapper.SysAppUserInfoMapper;
 import com.yijia.station.service.IPayOrderService;
+import com.yijia.system.domain.SysRespon;
+import com.yijia.system.service.ISysDeptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.sql.SQLException;
+import java.util.*;
 
 /**
  * 订单支付Service业务层处理
@@ -16,6 +39,25 @@ import com.yijia.station.service.IPayOrderService;
 @Service
 public class PayOrderServiceImpl implements IPayOrderService
 {
+
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @Autowired
+    private ICustomerPointsRecordService customerPointsRecordService  ;
+
+    @Autowired
+    private ICustomerPointsService customerPointsService  ;
+
+    @Autowired
+    private ICustomerManageService customerManageService;
+
+    @Autowired
+    private ICustomerGradeSettingService customerGradeSettingService;
+
+    @Autowired
+    private SysAppUserInfoMapper sysAppUserInfoService;
     @Autowired
     private PayOrderMapper payOrderMapper;
 
@@ -279,4 +321,152 @@ public class PayOrderServiceImpl implements IPayOrderService
         return payOrderMapper.selectUserPayOrderList(payOrder);
     }
 
+
+
+
+
+    public SysRespon sendSxfRefund(PayOrder payOrder) throws Exception {
+
+        SysRespon respon=new SysRespon();
+        SysDept dept=deptService.selectDeptById(payOrder.getStationId());
+        Random random=new Random();
+        String result1 = "";
+        for (int i = 0; i < 6; i++) {
+            result1 += random.nextInt(10);
+        }
+        String ordNo = System.nanoTime() + result1;
+        JSONObject reqData = new JSONObject();
+        reqData.put("mno",dept.getMno() );
+        reqData.put("ordNo",ordNo );
+        reqData.put("origOrderNo",payOrder.getOrderNo() );
+        reqData.put("amt",payOrder.getAmt() );
+        String req= SXFPaySign.getSXFPay(reqData);
+        ///logger.debug("参数信息:"+req);
+        System.out.println("req:" + req);
+        //此处不要改变reqData里面值的顺序用LinkedHashMap
+        HashMap reqMap = JSON.parseObject(req, LinkedHashMap.class, Feature.OrderedField);
+        //组装加密串
+        String signContent = RSASignature.getOrderContent(reqMap);
+        System.out.println("拼接后的参数:" + signContent);
+        //logger.debug("拼接后的参数:"+signContent);
+        //sign
+        String sign = RSASignature.encryptBASE64(RSASignature.sign(signContent, SXFPaySign.privateKey));
+        System.out.println("============签名:" + sign);
+        reqMap.put("sign", sign);
+        String reqStr = JSON.toJSONString(reqMap);
+        System.out.println("请求参数:" + reqMap);
+        System.out.println("请求参数:" + reqStr);
+        //调用第三方接口地址
+        String url = "https://openapi.suixingpay.com/order/refund";//生产地址
+        String resultJson = HttpUtils.connectPostUrl(url, reqStr);
+        System.out.println("返回信息:" + resultJson);
+        //不要对reqData排序 所以用LinkedHashMap
+        HashMap<String, Object> result = JSON.parseObject(resultJson, LinkedHashMap.class, Feature.OrderedField);
+        if ("0000".equals(result.get("code"))) {
+            //验签
+            String signResult = result.get("sign").toString();
+            result.remove("sign");
+            String resultStr = RSASignature.getOrderContent(result);
+            System.out.println("resultStr: " + resultStr);
+            //sign
+            String resultSign = RSASignature.encryptBASE64(RSASignature.sign(signContent, SXFPaySign.privateKey));
+            System.out.println("resultSign: " + resultSign);
+            //组装加密串
+            if (RSASignature.doCheck(resultStr, signResult, SXFPaySign.sxfPublic)) {
+                System.out.println("===================验签成功==============");
+                //
+                if(result.containsKey("respData")){
+                    HashMap<String, Object> result2 = JSON.parseObject(result.get("respData")+"", LinkedHashMap.class, Feature.OrderedField);
+                    if("0000".equals(result2.get("bizCode"))){
+                        respon.setResponCode("0000");
+                        respon.setResponMessage(result2.get("bizMsg")+"");
+                        return respon;
+                    }else {
+                        respon.setResponCode(result2.get("bizCode") + "");
+                        respon.setResponMessage(result2.get("bizMsg") + "");
+                    }
+                    //判断 bizCode bizCode =="0000" 则业务成功
+                }else {
+                    respon.setResponCode("0004");
+                    respon.setResponMessage(result.get("msg") + "");
+                }
+            }else {
+                respon.setResponCode("0002");
+                respon.setResponMessage("RSA验证失败");
+            }
+        }else {
+            respon.setResponMessage(result.get("msg")+"");
+            respon.setResponCode(result.get("code")+"");
+        }
+        return respon;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public AjaxResult sxfRefund( PayOrder payOrder) throws  Exception
+    {
+        int i=0;
+            CustomerPointsRecord customerPointsRecord=new CustomerPointsRecord();
+            customerPointsRecord.setOrderNo(payOrder.getOrderNo());
+            List<CustomerPointsRecord> customerPointsRecordList= customerPointsRecordService.selectCustomerPointsRecordList(customerPointsRecord);
+            if(customerPointsRecordList==null||customerPointsRecordList.size()>0){
+
+                CustomerPoints customerPoints=new CustomerPoints();
+                customerPoints.setUnionId(customerPointsRecordList.get(0).getUnionId());
+                //通过订单信息获取人员的积分信息
+                List<CustomerPoints> customerPointsList=customerPointsService.selectCustomerPointsList(customerPoints);
+                if(customerPointsList.size()>0){
+                    CustomerPoints customerPoints1=customerPointsList.get(0);
+                    customerPoints1.setPoints(customerPoints1.getPoints()-customerPointsRecordList.get(0).getIntegral());
+                    customerPoints1.setCreateTime(new Date());
+                   i= customerPointsService.updateCustomerPoints(customerPoints1);
+                   if(i==0){
+                       throw  new SQLException("积分更新失败");
+                   }
+                    customerPointsRecord=customerPointsRecordList.get(0);
+                    customerPointsRecord.setRecordType("-");
+                   i=  customerPointsRecordService.insertCustomerPointsRecord(customerPointsRecord);
+                    if(i==0){
+                        throw  new SQLException("积分记录更新失败");
+                    }
+                }
+
+            }
+            CustomerGradeSetting customerGradeSetting=new CustomerGradeSetting();
+            customerGradeSetting.setStationId(payOrder.getStationId());
+            customerGradeSetting.setOilName(payOrder.getOilName());
+            List<CustomerGradeSetting> customerGradeSettingList=customerGradeSettingService.selectCustomerGradeSettingList(customerGradeSetting);
+            if(customerGradeSettingList.size()>0){
+                SysAppUserInfo sysAppUserInfo=sysAppUserInfoService.selectSysAppUserInfoById(payOrder.getConsumerId());
+                CustomerManage customerManage=new CustomerManage();
+                customerManage.setUnionId(sysAppUserInfo.getUnionId());
+                customerManage.setStationId(payOrder.getStationId());
+                customerManage.setOilName(payOrder.getOilName());
+                List<CustomerManage> customerManageList=customerManageService.selectCustomerManageList(customerManage);
+                if(customerManageList.size()>0){
+                    CustomerManage customerManage1=new CustomerManage();
+                    customerManage1.setId(customerManageList.get(0).getId());
+                    customerManage1.setLiters(customerManageList.get(0).getLiters().subtract(payOrder.getOrderLiters()));
+                    customerManage1.setAmt(customerManageList.get(0).getAmt().subtract(payOrder.getAmt()));
+                   i=  customerManageService.updateCustomerManage(customerManage1);
+                    if(i==0){
+                        throw  new SQLException("客户消费信息");
+                    }
+                }
+
+
+            }
+            payOrder.setStatus("3");
+            i= payOrderMapper.updatePayOrder(payOrder);
+            if(i==0){
+             throw  new SQLException("订单更新失败");
+            }
+            SysRespon respon= sendSxfRefund(payOrder);
+            if(!"0000".equals(respon.getResponCode())){
+                throw  new SQLException(respon.getResponMessage());
+            }
+        return AjaxResult.success(1);
+    }
+
+
 }

+ 45 - 0
yijia-station/src/main/java/com/yijia/station/service/impl/SysAppUserInfoImpl.java

@@ -0,0 +1,45 @@
+package com.yijia.station.service.impl;
+
+import com.yijia.station.domain.SysAppUserInfo;
+import com.yijia.station.mapper.SysAppUserInfoMapper;
+import com.yijia.station.service.ISysAppUserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 代理机构Service业务层处理
+ *
+ * @author yijia
+ * @date 2021-07-01
+ */
+@Service
+public class SysAppUserInfoImpl implements ISysAppUserInfoService
+{
+    @Autowired
+    private SysAppUserInfoMapper sysAppUserInfoMapper;
+
+    /**
+     * 通过id查询user
+     *
+     * @param userId 用户参数信息
+     * @return 用户信息
+     */
+
+    public SysAppUserInfo selectSysAppUserInfoById(Long userId){
+        return sysAppUserInfoMapper.selectSysAppUserInfoById(userId);
+    };
+
+    /**
+     * 查询用户信息
+     *
+     * @param sysAppUserInfo 查询用户信息
+     * @return 参数配置集合
+     */
+
+    public List<SysAppUserInfo> selectSysAppUserInfoList(SysAppUserInfo sysAppUserInfo){
+        return sysAppUserInfoMapper.selectSysAppUserInfoList(sysAppUserInfo);
+    };
+
+}

+ 92 - 3
yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -57,6 +57,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="driverOilPrice"    column="driver_oil_price"  />
         <result property="countNum"    column="count_num"  />
         <result property="driverDiscountAmt"    column="driver_discount_amt"  />
+        <result property="refundUser"    column="refund_user"  />
+        <result property="refundDate"    column="refund_date"  />
+        <result property="examinUser"    column="examin_user"  />
+        <result property="examinDate"    column="examin_date"  />
+        <result property="examinStatus"    column="examin_status"  />
+        <result property="refundSuccessDate"    column="refund_success_date"  />
+        <result property="dzkNum"    column="dzk_num"  />
     </resultMap>
 
 
@@ -65,7 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,oil_personnel_id,
           discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
            other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,
-            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt
+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt,
+            examin_user,examin_date,refund_user,refund_date,examin_status,refund_success_date
             from pay_order p join sys_dept d on p.station_id =d.dept_id
     </sql>
 
@@ -75,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer like concat('%', #{consumer}, '%')</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -110,15 +119,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''">
+            <if test="examinStatus == '-1'">
+                and examin_status !=0 and examin_status !=null
+            </if>
+             <if test="examinStatus != '-1'">
+                 and examin_status = #{examinStatus}
+              </if>
+
+             </if>
             <if test="likeConsumer != null  and likeConsumer != ''"> and consumer  like concat('%',#{likeConsumer}, '%')</if>
             <if test="likeCarNo != null  and likeCarNo != ''"> and car_no  like concat('%',#{likeCarNo}, '%') </if>
             <if test="likeCustomerPhone != null  and likeCustomerPhone != ''"> and customer_phone  like concat('%',#{likeCustomerPhone}, '%') </if>
+            <if test="refundSuccessStatus == '1'.toString()  ">
+                <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                    AND date_format(refund_success_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+                </if>
+                <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                    AND date_format(refund_success_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+                </if>
+            </if>
+            <if test="refundSuccessStatus != '1'.toString() ">
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
                 AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
             </if>
+            </if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -138,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -170,6 +203,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -198,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -231,6 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -259,6 +303,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and (p.status = #{status} or p.status=2)</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -292,6 +337,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -321,6 +371,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and (p.status = #{status} or p.status=2)</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -353,6 +404,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -383,6 +439,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -438,7 +495,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,
         discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
         other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,oil_personnel_id,
-        pay_date, created_date, order_type, car_no,customer_grade,sell_amt,sell_discount_amt,d.mobile_phone as customer_phone
+        pay_date, created_date, order_type, car_no,customer_grade,sell_amt,sell_discount_amt,d.mobile_phone as customer_phone,
+        examin_user,examin_date,refund_user,refund_date,examin_status
         from pay_order p join app_user_info d on p.consumer_id =d.user_id
         where order_id = #{orderId}
     </select>
@@ -448,6 +506,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -471,6 +530,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -496,6 +556,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -521,6 +582,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -547,6 +609,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -573,6 +636,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -597,6 +661,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -621,6 +686,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -667,6 +733,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null "> and a.status = #{status}</if>
+            <if test="status == null  or status == ''"> and a.status != 0</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
             <if test="stationIdList != null ">
                 and a.station_id in
@@ -710,6 +777,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null "> and (a.status = #{status} or a.status=2)</if>
+            <if test="status == null  or status == ''"> and a.status != 0</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
             <if test="stationIdList != null ">
                 and a.station_id in
@@ -819,11 +887,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <!--初始化数据班结数据,根据员工/支付方式汇总 -->
     <select id="selectPersonnelPayStructure" parameterType="Long" resultMap="PayOrderResult">
-        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
+        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,
+        sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,
+        SUM(xj_amt) xj_amt,sum(member_amt) member_amt,sum(dzk_amt) dzk_amt,count(dzk_amt) dzk_num
         from  pay_order a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status !=0 </if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -887,6 +958,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">car_no,</if>
             <if test="customerPhone != null">customer_phone,</if>
             <if test="customerGrade != null">customer_grade,</if>
+            <if test="refundUser != null">refund_user,</if>
+            <if test="refundDate != null">refund_date,</if>
+            <if test="examinUser != null">examin_user,</if>
+            <if test="examinDate != null">examin_date,</if>
+            <if test="examinStatus != null">examin_status,</if>
+            <if test="refundSuccessDate != null">refund_success_date,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
@@ -926,6 +1003,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">#{carNo},</if>
             <if test="customerPhone != null">#{customerPhone},</if>
             <if test="customerGrade != null">#{customerGrade},</if>
+            <if test="refundUser != null">#{refundUser},</if>
+            <if test="refundDate != null">#{refundDate},</if>
+            <if test="examinUser != null">#{examinUser},</if>
+            <if test="examinDate != null">#{examinDate},</if>
+            <if test="examinStatus != null">#{examinStatus},</if>
+            <if test="refundSuccessDate != null">#{refundSuccessDate},</if>
          </trim>
     </insert>
 
@@ -969,6 +1052,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">car_no = #{carNo},</if>
             <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
             <if test="customerGrade != null">customer_grade = #{customerGrade},</if>
+            <if test="refundUser != null">refund_user = #{refundUser},</if>
+            <if test="refundDate != null">refund_date = #{refundDate},</if>
+            <if test="examinUser != null">examin_user = #{examinUser},</if>
+            <if test="examinDate != null">examin_date = #{examinDate},</if>
+            <if test="examinStatus != null">examin_status = #{examinStatus},</if>
+            <if test="refundSuccessDate != null">refund_success_date = #{refundSuccessDate},</if>
         </trim>
         where order_id = #{orderId}
     </update>

+ 33 - 9
yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -52,6 +52,9 @@
         <result property="wxNum"    column="wx_num"    />
         <result property="zfbNum"    column="zfb_num"    />
         <result property="xjNum"    column="xj_num"    />
+        <result property="status"    column="status"    />
+        <result property="dzkNum"    column="dzk_num"    />
+        <result property="refundAmt"    column="refund_amt"    />
     </resultMap>
 
     <sql id="selectStationClassStructureVo">
@@ -60,7 +63,7 @@
         print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils,
          receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt,
          pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, car_no,
-         customer_phone, customer_grade
+         customer_phone, customer_grade,status
           from station_class_structure s join sys_dept d on s.station_id = d.dept_id
     </sql>
 
@@ -108,6 +111,7 @@
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
         order by  id desc
     </select>
@@ -119,6 +123,7 @@
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         GROUP BY a.oil_personnel
     </select>
@@ -129,6 +134,7 @@
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man
     </select>
@@ -142,6 +148,7 @@
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         )
     </select>
@@ -157,6 +164,7 @@
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="likeClassStructureNo != null  and likeClassStructureNo != ''">  and class_structure_no like concat( #{likeClassStructureNo}, '%') </if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
     </select>
     <!--根据班次号汇总班结数据-->
@@ -170,6 +178,7 @@
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null  and status != ''"> and s.status = #{status}</if>
         </where>
         GROUP BY class_structure_no,class_start_date,station_id,d.dept_name,class_structure_date,class_structure_man
     </select>
@@ -185,25 +194,29 @@
     <select id="listPersonnelPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         SELECT   oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
         sum(discount_amt) discount_amt,
-        SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,
+        SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,sum(dzk_amt)  dzk_amt,
         SUM(xj_amt) xj_amt,sum(member_amt) member_amt,
-        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num
+        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num,sum(e.dzk_num)  dzk_num,sum(e.refund_amt) refund_amt
         from (
-        SELECT station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,
+        SELECT station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,status,dzk_amt,
         (SELECT COUNT(b.order_no) from station_class_structure b where 1=1 and a.id = b.id and b.pay_type="xj" ) xj_num,
         (SELECT COUNT(c.order_no) from station_class_structure c where 1=1 and a.id = c.id and c.pay_type="zfb" ) zfb_num,
-        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num,
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="dzk" ) dzk_num,
+        (SELECT sum(d.amt) from station_class_structure d where 1=1 and a.id = d.id and d.status="3") refund_amt
         from station_class_structure  a
         <where>
             <if test="stationId != null and stationId != ''"> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and a.status = #{status}</if>
         </where>
         ) e
         <where>
             <if test="stationId != null and stationId != ''"> and e.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and e.class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and e.order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and e.status = #{status}</if>
         </where>
         GROUP BY e.oil_personnel
     </select>
@@ -227,6 +240,7 @@
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         GROUP BY pay_type,dict_label
     </select>
@@ -238,6 +252,7 @@
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
+            <if test="status != null and status != ''"> and a.status = #{status}</if>
         </where>
         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man) c
     </select>
@@ -246,24 +261,28 @@
     <select id="listPersonnelPayStructureSum" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         SELECT GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
         sum(discount_amt) discount_amt,
-        SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,
+        SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,sum(dzk_amt) dzk_amt,
         SUM(xj_amt) xj_amt,sum(member_amt) member_amt,
-        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num
-        from (SELECT  station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,
+        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num,sum(e.dzk_num) dzk_num,sum(refund_amt) redund_amt
+        from (SELECT  station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,dzk,
         (SELECT COUNT(b.order_no) from station_class_structure b where 1=1 and a.id = b.id and b.pay_type="xj" ) xj_num,
         (SELECT COUNT(c.order_no) from station_class_structure c where 1=1 and a.id = c.id and c.pay_type="zfb" ) zfb_num,
-        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num,
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="dzk" ) dzk_num,
+        (SELECT sum(d.amt) from station_class_structure d where 1=1 and a.id = d.id and d.status="3") refund_amt
         from station_class_structure  a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and a.status = #{status}</if>
         </where>
         ) e
         <where>
             <if test="stationId != null "> and e.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and e.class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and e.order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and e.status = #{status}</if>
         </where>
     </select>
 
@@ -275,6 +294,7 @@
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         GROUP BY a.oil_personnel ) b
     </select>
@@ -321,6 +341,7 @@
             <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
         order by  id desc
     </select>
@@ -370,6 +391,7 @@
             <if test="carNo != null">car_no,</if>
             <if test="customerPhone != null">customer_phone,</if>
             <if test="customerGrade != null">customer_grade,</if>
+            <if test="status != null">status,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
@@ -414,6 +436,7 @@
             <if test="carNo != null">#{carNo},</if>
             <if test="customerPhone != null">#{customerPhone},</if>
             <if test="customerGrade != null">#{customerGrade},</if>
+            <if test="status != null">#{status},</if>
         </trim>
     </insert>
 
@@ -462,6 +485,7 @@
             <if test="carNo != null">car_no = #{carNo},</if>
             <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
             <if test="customerGrade != null">customer_grade = #{customerGrade},</if>
+            <if test="status != null">status = #{status},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 2
yijia-station/src/main/resources/mapper/station/StationClassesSummaryMapper.xml

@@ -21,15 +21,16 @@
         <result property="zfbAmt"    column="zfb_amt"    />
         <result property="dzkAmt"    column="dzk_amt"    />
         <result property="classesMan"    column="classes_man"    />
+        <result property="refundAmt"    column="refund_amt"    />
     </resultMap>
 
     <sql id="selectStationClassesSummaryVo">
-        select id, classes_no, start_date, end_date, station_id, station_name, order_num, print_num, sale_liters, sale_amt, amt, discount_amt, wx_amt, zfb_amt, dzk_amt, classes_man from station_classes_summary
+        select id, classes_no, start_date, end_date, station_id, station_name, order_num, print_num, sale_liters, sale_amt, amt, discount_amt, wx_amt, zfb_amt, dzk_amt, classes_man,refund_amt from station_classes_summary
     </sql>
 
     <select id="selectStationClassesSummaryList" parameterType="StationClassesSummary" resultMap="StationClassesSummaryResult">
         select a.id, a.classes_no, a.start_date, a.end_date, a.station_id, (b.dept_name) station_name , a.order_num, a.print_num, a.sale_liters,
-         a.sale_amt, a.amt, a.discount_amt, a.wx_amt, zfb_amt, a.dzk_amt, a.classes_man from station_classes_summary a
+         a.sale_amt, a.amt, a.discount_amt, a.wx_amt, zfb_amt, a.dzk_amt, a.classes_man,a.refund_amt from station_classes_summary a
          left  join sys_dept b on a.station_id=b.dept_id
         <where>
             <if test="classesNo != null  and classesNo != ''"> and a.classes_no like concat('%', #{classesNo}, '%')</if>
@@ -133,6 +134,7 @@
             <if test="zfbAmt != null">zfb_amt,</if>
             <if test="dzkAmt != null">dzk_amt,</if>
             <if test="classesMan != null">classes_man,</if>
+            <if test="refundAmt != null">refund_amt,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="classesNo != null">#{classesNo},</if>
@@ -150,6 +152,7 @@
             <if test="zfbAmt != null">#{zfbAmt},</if>
             <if test="dzkAmt != null">#{dzkAmt},</if>
             <if test="classesMan != null">#{classesMan},</if>
+            <if test="refundAmt != null">#{refundAmt},</if>
         </trim>
     </insert>
 
@@ -171,6 +174,7 @@
             <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
             <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
             <if test="classesMan != null">classes_man = #{classesMan},</if>
+            <if test="refundAmt != null">refund_amt = #{refundAmt},</if>
         </trim>
         where id = #{id}
     </update>

+ 86 - 0
yijia-station/src/main/resources/mapper/station/SysAppUserInfoMapper.xml

@@ -0,0 +1,86 @@
+<?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.station.mapper.SysAppUserInfoMapper">
+    
+    <resultMap type="SysAppUserInfo" id="SysAppUserInfoResult">
+    	<id     property="userId"      column="user_id"      />
+        <result property="userType"    column="user_type"    />
+        <result property="minaOpenid"     column="mina_openid"     />
+        <result property="blogOpenid"   column="blog_openid"   />
+        <result property="mobilePhone"    column="mobile_phone"    />
+        <result property="sexFlag"      column="sex_flag"      />
+        <result property="registeDate"    column="registe_date"    />
+        <result property="blogToken"      column="blog_token"      />
+        <result property="minaToken"    column="mina_token"    />
+        <result property="blogNickName"    column="blog_nick_name"    />
+        <result property="blogProfilePhoto"    column="blog_profile_photo"    />
+        <result property="updateDate"    column="update_date"    />
+        <result property="unionId"    column="union_id"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="aliId"    column="ali_id"    />
+    </resultMap>
+    
+    <sql id="selectSysAppUserInfoVo">
+        SELECT user_id,user_type,blog_openid,mina_openid,mobile_phone,blog_nick_name,
+     sex_flag,registe_date,blog_token,mina_token,blog_profile_photo,update_date,
+     union_id,station_id,ali_id
+     from app_user_info
+    </sql>
+    
+
+    
+    <select id="selectSysAppUserInfoList" parameterType="SysAppUserInfo" resultMap="SysAppUserInfoResult">
+        <include refid="selectSysAppUserInfoVo"/>
+        <where>
+			<if test="userType != null and userType != ''">
+				AND user_type =#{userType}
+			</if>
+			<if test="minaOpenid != null and minaOpenid != ''">
+				AND mina_openid = #{minaOpenid}
+			</if>
+            <if test="blogOpenid != null and blogOpenid != ''">
+                AND blog_openid = #{blogOpenid}
+            </if>
+            <if test="sexFlag != null and sexFlag != ''">
+                AND sex_flag = #{sexFlag}
+            </if>
+            <if test="registeDate != null and registeDate != ''">
+                AND registe_date = #{registeDate}
+            </if>
+            <if test="blogToken != null and blogToken != ''">
+                AND blog_token = #{blogToken}
+            </if>
+            <if test="minaOpenid != null and minaOpenid != ''">
+                AND mina_openid = #{minaOpenid}
+            </if>
+            <if test="blogNickName != null and blogNickName != ''">
+                AND blog_nick_name = #{blogNickName}
+            </if>
+            <if test="blogProfilePhoto != null and blogProfilePhoto != ''">
+                AND blog_profile_photo = #{blogProfilePhoto}
+            </if>
+            <if test="updateDate != null and updateDate != ''">
+                AND update_date = #{updateDate}
+            </if>
+
+            <if test="unionId != null and unionId != ''">
+                AND union_id = #{unionId}
+            </if>
+
+            <if test="stationId != null and stationId != ''">
+                AND station_id = #{stationId}
+            </if>
+
+            <if test="aliId != null and aliId != ''">
+                AND ali_id = #{aliId}
+            </if>
+		</where>
+    </select>
+
+    <select id="selectSysAppUserInfoById" parameterType="Long" resultMap="SysAppUserInfoResult">
+        <include refid="selectSysAppUserInfoVo"/>
+        where user_id = #{userId}
+    </select>
+</mapper>

二進制
yijia-station/target/classes/com/yijia/station/controller/PayOrderController.class


二進制
yijia-station/target/classes/com/yijia/station/controller/StationClassStructureController.class


二進制
yijia-station/target/classes/com/yijia/station/domain/PayOrder.class


二進制
yijia-station/target/classes/com/yijia/station/service/IPayOrderService.class


二進制
yijia-station/target/classes/com/yijia/station/service/impl/PayOrderServiceImpl.class


+ 92 - 3
yijia-station/target/classes/mapper/station/PayOrderMapper.xml

@@ -57,6 +57,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="driverOilPrice"    column="driver_oil_price"  />
         <result property="countNum"    column="count_num"  />
         <result property="driverDiscountAmt"    column="driver_discount_amt"  />
+        <result property="refundUser"    column="refund_user"  />
+        <result property="refundDate"    column="refund_date"  />
+        <result property="examinUser"    column="examin_user"  />
+        <result property="examinDate"    column="examin_date"  />
+        <result property="examinStatus"    column="examin_status"  />
+        <result property="refundSuccessDate"    column="refund_success_date"  />
+        <result property="dzkNum"    column="dzk_num"  />
     </resultMap>
 
 
@@ -65,7 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,oil_personnel_id,
           discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
            other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,
-            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt
+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt,
+            examin_user,examin_date,refund_user,refund_date,examin_status,refund_success_date
             from pay_order p join sys_dept d on p.station_id =d.dept_id
     </sql>
 
@@ -75,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer like concat('%', #{consumer}, '%')</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -110,15 +119,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''">
+            <if test="examinStatus == '-1'">
+                and examin_status !=0 and examin_status !=null
+            </if>
+             <if test="examinStatus != '-1'">
+                 and examin_status = #{examinStatus}
+              </if>
+
+             </if>
             <if test="likeConsumer != null  and likeConsumer != ''"> and consumer  like concat('%',#{likeConsumer}, '%')</if>
             <if test="likeCarNo != null  and likeCarNo != ''"> and car_no  like concat('%',#{likeCarNo}, '%') </if>
             <if test="likeCustomerPhone != null  and likeCustomerPhone != ''"> and customer_phone  like concat('%',#{likeCustomerPhone}, '%') </if>
+            <if test="refundSuccessStatus == '1'.toString()  ">
+                <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                    AND date_format(refund_success_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+                </if>
+                <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                    AND date_format(refund_success_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+                </if>
+            </if>
+            <if test="refundSuccessStatus != '1'.toString() ">
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
                 AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
             </if>
+            </if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -138,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -170,6 +203,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -198,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -231,6 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -259,6 +303,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and (p.status = #{status} or p.status=2)</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -292,6 +337,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -321,6 +371,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and (p.status = #{status} or p.status=2)</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -353,6 +404,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="refundUser != null  and refundUser != ''"> and refund_user = #{refundUser}</if>
+            <if test="refundDate != null  and refundDate != ''"> and refund_date = #{refundDate}</if>
+            <if test="examinUser != null  and examinUser != ''"> and examin_user = #{examinUser}</if>
+            <if test="examinDate != null  and examinDate != ''"> and examin_date = #{examinDate}</if>
+            <if test="examinStatus != null  and examinStatus != ''"> and examin_status = #{examinStatus}</if>
             <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
             <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
@@ -383,6 +439,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
             <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="status == null  or status == ''"> and p.status != 0</if>
             <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -438,7 +495,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,
         discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
         other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,oil_personnel_id,
-        pay_date, created_date, order_type, car_no,customer_grade,sell_amt,sell_discount_amt,d.mobile_phone as customer_phone
+        pay_date, created_date, order_type, car_no,customer_grade,sell_amt,sell_discount_amt,d.mobile_phone as customer_phone,
+        examin_user,examin_date,refund_user,refund_date,examin_status
         from pay_order p join app_user_info d on p.consumer_id =d.user_id
         where order_id = #{orderId}
     </select>
@@ -448,6 +506,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -471,6 +530,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -496,6 +556,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -521,6 +582,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -547,6 +609,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -573,6 +636,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -597,6 +661,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -621,6 +686,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and (status = #{status} or status=2)</if>
+            <if test="status == null  or status == ''"> and status != 0</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -667,6 +733,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null "> and a.status = #{status}</if>
+            <if test="status == null  or status == ''"> and a.status != 0</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
             <if test="stationIdList != null ">
                 and a.station_id in
@@ -710,6 +777,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null "> and (a.status = #{status} or a.status=2)</if>
+            <if test="status == null  or status == ''"> and a.status != 0</if>
             <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
             <if test="stationIdList != null ">
                 and a.station_id in
@@ -819,11 +887,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <!--初始化数据班结数据,根据员工/支付方式汇总 -->
     <select id="selectPersonnelPayStructure" parameterType="Long" resultMap="PayOrderResult">
-        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
+        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,
+        sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,
+        SUM(xj_amt) xj_amt,sum(member_amt) member_amt,sum(dzk_amt) dzk_amt,count(dzk_amt) dzk_num
         from  pay_order a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status == null  or status == ''"> and status !=0 </if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -887,6 +958,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">car_no,</if>
             <if test="customerPhone != null">customer_phone,</if>
             <if test="customerGrade != null">customer_grade,</if>
+            <if test="refundUser != null">refund_user,</if>
+            <if test="refundDate != null">refund_date,</if>
+            <if test="examinUser != null">examin_user,</if>
+            <if test="examinDate != null">examin_date,</if>
+            <if test="examinStatus != null">examin_status,</if>
+            <if test="refundSuccessDate != null">refund_success_date,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
@@ -926,6 +1003,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">#{carNo},</if>
             <if test="customerPhone != null">#{customerPhone},</if>
             <if test="customerGrade != null">#{customerGrade},</if>
+            <if test="refundUser != null">#{refundUser},</if>
+            <if test="refundDate != null">#{refundDate},</if>
+            <if test="examinUser != null">#{examinUser},</if>
+            <if test="examinDate != null">#{examinDate},</if>
+            <if test="examinStatus != null">#{examinStatus},</if>
+            <if test="refundSuccessDate != null">#{refundSuccessDate},</if>
          </trim>
     </insert>
 
@@ -969,6 +1052,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">car_no = #{carNo},</if>
             <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
             <if test="customerGrade != null">customer_grade = #{customerGrade},</if>
+            <if test="refundUser != null">refund_user = #{refundUser},</if>
+            <if test="refundDate != null">refund_date = #{refundDate},</if>
+            <if test="examinUser != null">examin_user = #{examinUser},</if>
+            <if test="examinDate != null">examin_date = #{examinDate},</if>
+            <if test="examinStatus != null">examin_status = #{examinStatus},</if>
+            <if test="refundSuccessDate != null">refund_success_date = #{refundSuccessDate},</if>
         </trim>
         where order_id = #{orderId}
     </update>

+ 1 - 1
yijia-station/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:26 CST 2021
+#Mon Oct 11 10:34:20 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-station

+ 5 - 0
yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -36,11 +36,13 @@ com\yijia\station\service\IStationOilPriceService.class
 com\yijia\station\mapper\StationClassesSummaryMapper.class
 com\yijia\station\domain\SysDeptDemo.class
 com\yijia\station\domain\StationOilPriceAdjust.class
+com\yijia\station\mapper\SysAppUserInfoMapper.class
 com\yijia\station\controller\StationInfoController.class
 com\yijia\station\domain\StationOilGun.class
 com\yijia\station\service\impl\StationOilPriceServiceImpl.class
 com\yijia\station\mapper\StationDeviceManageMapper.class
 com\yijia\station\mapper\StationSettlementPriceMapper.class
+com\yijia\station\controller\SysAppUserInfoController.class
 com\yijia\station\service\IStationNoticeService.class
 com\yijia\station\service\impl\StationOilPriceAdjustServiceImpl.class
 com\yijia\station\controller\RSAEncrypt.class
@@ -67,6 +69,7 @@ com\yijia\station\service\IStationOilPriceAdjustService.class
 com\yijia\station\mapper\PayOrderMapper.class
 com\yijia\station\mapper\StationClassStructureMapper.class
 com\yijia\station\service\IStationClassStructureService.class
+com\yijia\station\domain\SysAppUserInfo.class
 com\yijia\station\controller\StationClassStructureController.class
 com\yijia\station\service\IStationOilGunService.class
 com\yijia\station\domain\StationClassStructure.class
@@ -81,10 +84,12 @@ com\yijia\station\service\impl\StationClassStructureServiceImpl.class
 com\yijia\station\domain\StationDeviceManage.class
 com\yijia\station\service\impl\StationPersonnelServiceImpl.class
 com\yijia\station\service\IStationDeviceManageService.class
+com\yijia\station\service\ISysAppUserInfoService.class
 com\yijia\station\domain\StationInfo.class
 com\yijia\station\service\IStationPayService.class
 com\yijia\station\domain\StationPay.class
 com\yijia\station\controller\SXFPaySign.class
 com\yijia\station\mapper\StationSettlementPriceAdjustMapper.class
+com\yijia\station\service\impl\SysAppUserInfoImpl.class
 com\yijia\station\controller\StationPayController.class
 com\yijia\station\domain\StationOilPrice.class

+ 5 - 0
yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -3,6 +3,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\contr
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\StationClassStructure.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\StationSettlementPriceServiceImpl.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\NoOilOrderController.java
+D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\SysAppUserInfoMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\StationOilPriceMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\StationOilPriceAdjustController.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\StationSettlementPrice.java
@@ -14,6 +15,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\contr
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\StationNoticeMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilPriceAdjustServiceImpl.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\RSAEncrypt.java
+D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\SysAppUserInfo.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\PayOrder.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\StationPersonnelMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IPayOrderService.java
@@ -25,6 +27,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domai
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceService.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationSettlementPriceService.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\StationSettlementPriceController.java
+D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\SysAppUserInfoImpl.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationClassStructureService.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceAdjustService.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\StationInfo.java
@@ -53,6 +56,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domai
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\StationSettlementPriceAdjust.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\StationSettlementPriceAdjustMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationBalanceChangeService.java
+D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\SysAppUserInfoController.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\mapper\StationPicMapper.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\StationClassStructureServiceImpl.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\IStationNoticeService.java
@@ -80,6 +84,7 @@ D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\contr
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\StationPayController.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\controller\ApiResponseBean.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\StationPayServiceImpl.java
+D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\ISysAppUserInfoService.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\DeptInfoDemo.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\domain\StationOilPriceAdjust.java
 D:\java项目\SAAS-AFTEREND2\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilGunServiceImpl.java

二進制
yijia-station/target/yijia-station-1.0.1.jar


+ 4 - 0
yijia-station/yijia-station.iml

@@ -93,5 +93,9 @@
     <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.15" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
     <orderEntry type="module" module-name="yijia-system" />
+    <orderEntry type="module" module-name="yijia-integral" />
+    <orderEntry type="module" module-name="yijia-customer" />
+    <orderEntry type="module" module-name="yijia-coupon" />
+    <orderEntry type="module" module-name="yijia-label" />
   </component>
 </module>

+ 7 - 3
yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="mnoArray"    column="mno_array" />
 		<result property="mnoProportion"    column="mno_proportion" />
 		<result property="mnoStatus"    column="mno_status" />
+		<result property="refundExaminStatus"    column="refund_examin_status" />
 	</resultMap>
 
 	<sql id="selectDeptVo">
@@ -70,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         d.station_latitude, d.mno, discount_setting,card_enabled_flag,d.app_id, d.app_secret,gzh_app_id,gzh_app_secret,ali_app_id,gzh_app_secret,
         ali_app_id,ali_public_key,ali_private_key,ali_encrypt_key,image1,image2,image3,image4,image5,ws_print_flag,print_setting,notice,integral_print_flag,
         d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type,d.balance,d.is_lng_flag,d.city,coupon_enabled_flag,
-        d.merchant_no,d.terminal_id,d.yun_key,d.mno_array,mno_proportion,mno_status
+        d.merchant_no,d.terminal_id,d.yun_key,d.mno_array,mno_proportion,mno_status,refund_examin_status
         from sys_dept d
     </sql>
 
@@ -240,7 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询集团及共享信息-->
 	<select id="selectShareGroup" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag,d.refund_examin_status
         from sys_dept d
 		where d.del_flag = '0'
 		<if test="integralRuleFlag != null">
@@ -285,7 +286,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询所有不共享的站点-->
 	<select id="selectNotShareDept" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag,d.refund_examin_status
 		from sys_dept d
 		where d.del_flag = "0"
 		and d.parent_id in (
@@ -357,6 +358,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		    <if test="mnoArray != null">mno_array,</if>
 		    <if test="mnoProportion != null">mno_proportion,</if>
 		    <if test="mnoStatus != null">mno_status,</if>
+		    <if test="refundExaminStatus != null">refund_examin_status,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -411,6 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		     <if test="mnoArray != null">#{mnoArray},</if>
 		<if test="mnoProportion != null">#{mnoProportion},</if>
 		<if test="mnoStatus != null">#{mnoStatus},</if>
+		<if test="refundExaminStatus != null">#{refundExaminStatus},</if>
  			sysdate()
  		)
 	</insert>
@@ -469,6 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="mnoArray != null">mno_array= #{mnoArray},</if>
 			<if test="mnoProportion != null">mno_proportion= #{mnoProportion},</if>
 			<if test="mnoStatus != null">mno_status= #{mnoStatus},</if>
+			<if test="refundExaminStatus != null">refund_examin_status= #{refundExaminStatus},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}

+ 7 - 3
yijia-system/target/classes/mapper/system/SysDeptMapper.xml

@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="mnoArray"    column="mno_array" />
 		<result property="mnoProportion"    column="mno_proportion" />
 		<result property="mnoStatus"    column="mno_status" />
+		<result property="refundExaminStatus"    column="refund_examin_status" />
 	</resultMap>
 
 	<sql id="selectDeptVo">
@@ -70,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         d.station_latitude, d.mno, discount_setting,card_enabled_flag,d.app_id, d.app_secret,gzh_app_id,gzh_app_secret,ali_app_id,gzh_app_secret,
         ali_app_id,ali_public_key,ali_private_key,ali_encrypt_key,image1,image2,image3,image4,image5,ws_print_flag,print_setting,notice,integral_print_flag,
         d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type,d.balance,d.is_lng_flag,d.city,coupon_enabled_flag,
-        d.merchant_no,d.terminal_id,d.yun_key,d.mno_array,mno_proportion,mno_status
+        d.merchant_no,d.terminal_id,d.yun_key,d.mno_array,mno_proportion,mno_status,refund_examin_status
         from sys_dept d
     </sql>
 
@@ -240,7 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询集团及共享信息-->
 	<select id="selectShareGroup" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag,d.refund_examin_status
         from sys_dept d
 		where d.del_flag = '0'
 		<if test="integralRuleFlag != null">
@@ -285,7 +286,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询所有不共享的站点-->
 	<select id="selectNotShareDept" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag,d.refund_examin_status
 		from sys_dept d
 		where d.del_flag = "0"
 		and d.parent_id in (
@@ -357,6 +358,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		    <if test="mnoArray != null">mno_array,</if>
 		    <if test="mnoProportion != null">mno_proportion,</if>
 		    <if test="mnoStatus != null">mno_status,</if>
+		    <if test="refundExaminStatus != null">refund_examin_status,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -411,6 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		     <if test="mnoArray != null">#{mnoArray},</if>
 		<if test="mnoProportion != null">#{mnoProportion},</if>
 		<if test="mnoStatus != null">#{mnoStatus},</if>
+		<if test="refundExaminStatus != null">#{refundExaminStatus},</if>
  			sysdate()
  		)
 	</insert>
@@ -469,6 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="mnoArray != null">mno_array= #{mnoArray},</if>
 			<if test="mnoProportion != null">mno_proportion= #{mnoProportion},</if>
 			<if test="mnoStatus != null">mno_status= #{mnoStatus},</if>
+			<if test="refundExaminStatus != null">refund_examin_status= #{refundExaminStatus},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}

+ 1 - 1
yijia-system/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Fri Sep 24 09:53:20 CST 2021
+#Mon Oct 11 10:34:12 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-system

二進制
yijia-system/target/yijia-system-1.0.1.jar


部分文件因文件數量過多而無法顯示