Pārlūkot izejas kodu

报表管理-orderRecord+deptId

‘‘ 3 gadi atpakaļ
vecāks
revīzija
d02cb8bef0
26 mainītis faili ar 1338 papildinājumiem un 0 dzēšanām
  1. 7 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/order/domain/DmOrderRecord.java
  2. 3 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/order/service/dto/DmOrderRecordDto.java
  3. 71 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmEvaluate.java
  4. 64 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmHaveDinner.java
  5. 48 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmStatement.java
  6. 46 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmEvaluateRepository.java
  7. 197 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmHaveDinnerRepository.java
  8. 44 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmStatementRepository.java
  9. 63 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmEvaluateController.java
  10. 70 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmHaveDinnerController.java
  11. 53 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmStatementController.java
  12. 45 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmEvaluateService.java
  13. 46 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmHaveDinnerService.java
  14. 42 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmStatementService.java
  15. 38 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmEvaluateDto.java
  16. 14 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmEvaluateQueryCriteria.java
  17. 31 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmHaveDinnerDto.java
  18. 14 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmHaveDinnerQueryCriteria.java
  19. 23 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmStatementDto.java
  20. 14 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmStatementQueryCriteria.java
  21. 91 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmEvaluateServiceImpl.java
  22. 191 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmHaveDinnerServiceImpl.java
  23. 88 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmStatementServiceImpl.java
  24. 12 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmEvaluateMapper.java
  25. 11 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmHaveDinnerMapper.java
  26. 12 0
      eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmStatementMapper.java

+ 7 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/order/domain/DmOrderRecord.java

@@ -19,6 +19,8 @@ import lombok.Data;
 import cn.hutool.core.bean.BeanUtil;
 import io.swagger.annotations.ApiModelProperty;
 import cn.hutool.core.bean.copier.CopyOptions;
+import me.zhengjie.modules.system.domain.Dept;
+
 import javax.persistence.*;
 import javax.validation.constraints.*;
 import java.sql.Timestamp;
@@ -48,6 +50,11 @@ public class DmOrderRecord implements Serializable {
     @ApiModelProperty(value = "实付金额")
     private String money;
 
+    @OneToOne
+    @JoinColumn(name = "dept_id")
+    @ApiModelProperty(value = "用户部门")
+    private Dept dept;
+
     @Column(name = "user_name")
     @ApiModelProperty(value = "用户姓名")
     private String userName;

+ 3 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/order/service/dto/DmOrderRecordDto.java

@@ -20,6 +20,7 @@ import java.sql.Timestamp;
 import java.io.Serializable;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.alibaba.fastjson.serializer.ToStringSerializer;
+import me.zhengjie.modules.system.domain.Dept;
 
 /**
 * @website https://el-admin.vip
@@ -40,6 +41,8 @@ public class DmOrderRecordDto implements Serializable {
     /** 实付金额 */
     private String money;
 
+    private Dept dept;
+
     /** 用户姓名 */
     private String userName;
 

+ 71 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmEvaluate.java

@@ -0,0 +1,71 @@
+package me.zhengjie.modules.dm.statement.domain;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+
+@Entity
+@Data
+@Table(name="dm_evaluate")
+@NoArgsConstructor
+@AllArgsConstructor
+public class DmEvaluate implements Serializable {
+    @Id
+    @Column(name = "id")
+    @ApiModelProperty(value = "id")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)//设置自增
+    private Integer id;
+
+    @Column(name = "total_point")
+    @ApiModelProperty(value = "综合评分")
+    private String totalPoint;
+
+    @Column(name = "pj_time")
+    @ApiModelProperty(value = "统计时段")
+    private Timestamp pjTime;
+
+    @Column(name = "wd_point")
+    @ApiModelProperty(value = "味道")
+    private Integer wdPoint;
+
+    @Column(name = "pz_point")
+    @ApiModelProperty(value = "品种")
+    private Integer pzPoint;
+
+    @Column(name = "fl_point")
+    @ApiModelProperty(value = "分量")
+    private Integer flPoint;
+
+    @Column(name = "fwtd_point")
+    @ApiModelProperty(value = "服务态度")
+    private Integer fwtdPoint;
+
+    @Column(name = "hjws_point")
+    @ApiModelProperty(value = "环境卫生")
+    private Integer hjwsPoint;
+
+    @Column(name = "zhfw_point")
+    @ApiModelProperty(value = "综合服务")
+    private Integer zhfwPoint;
+
+    @Column(name = "cxgj_point")
+    @ApiModelProperty(value = "持续改进")
+    private Integer cxgjPoint;
+
+    public void copy(DmEvaluate source){
+        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+    }
+
+    @PrePersist
+    public void prePersist() {
+        this.pjTime = new Timestamp(new Date().getTime());
+    }
+}

+ 64 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmHaveDinner.java

@@ -0,0 +1,64 @@
+package me.zhengjie.modules.dm.statement.domain;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+
+@Entity
+@Data
+@Table(name="dm_have_dinner")
+@NoArgsConstructor
+@AllArgsConstructor
+public class DmHaveDinner implements Serializable {
+    @Id
+    @Column(name = "id")
+    @ApiModelProperty(value = "id")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)//设置自增
+    private Integer id;
+
+    @Column(name = "zg_name")
+    @ApiModelProperty(value = "菜品受欢迎前三-菜品名称")
+    private String zgName;
+
+    @Column(name = "zg_num")
+    @ApiModelProperty(value = "菜品受欢迎前三-购买次数")
+    private String zgNum;
+
+    @Column(name = "zd_name")
+    @ApiModelProperty(value = "最不受欢迎菜品")
+    private String zdName;
+
+    @Column(name = "zd_num")
+    @ApiModelProperty(value = "最不受欢迎菜品-购买次数")
+    private String zdNum;
+
+    @Column(name = "money")
+    @ApiModelProperty(value = "最不受欢迎菜品-总消费")
+    private String money;
+
+    @Column(name = "time")
+    @ApiModelProperty(value = "统计时段")
+    private Timestamp time;
+
+    @Column(name = "week_time")
+    @ApiModelProperty(value = "周-统计时段")
+    private String weekTime;
+
+
+    public void copy(DmHaveDinner source){
+        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+    }
+
+    @PrePersist
+    public void prePersist() {
+        this.time = new Timestamp(new Date().getTime());
+    }
+}

+ 48 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/domain/DmStatement.java

@@ -0,0 +1,48 @@
+package me.zhengjie.modules.dm.statement.domain;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.Date;
+
+@Entity
+@Data
+@Table(name="dm_statement")
+public class DmStatement implements Serializable {
+    @Id
+    @Column(name = "id")
+    @ApiModelProperty(value = "id")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)//设置自增
+    private Integer id;
+
+    @Column(name = "name")
+    @ApiModelProperty(value = "组织名称")
+    private String name;
+
+    @Column(name = "money")
+    @ApiModelProperty(value = "消费金额")
+    private String money;
+
+    @Column(name = "avg_money")
+    @ApiModelProperty(value = "人均消费")
+    private String avgMoney;
+
+    @Column(name = "order_time")
+    @ApiModelProperty(value = "统计时段")
+    private Timestamp orderTime;
+
+
+    public void copy(DmStatement source){
+        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+    }
+
+    @PrePersist
+    public void prePersist() {
+        this.orderTime = new Timestamp(new Date().getTime());
+    }
+}

+ 46 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmEvaluateRepository.java

@@ -0,0 +1,46 @@
+package me.zhengjie.modules.dm.statement.repository;
+
+import me.zhengjie.modules.dm.service.domain.DmServicePj;
+import me.zhengjie.modules.dm.statement.domain.DmEvaluate;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+
+import java.sql.Timestamp;
+
+public interface DmEvaluateRepository extends JpaRepository<DmEvaluate,Integer>, JpaSpecificationExecutor<DmEvaluate> {
+    /**
+     * 年整体评价报表
+     * @param
+     * @param pageable
+     * @return
+     */
+    @Query(nativeQuery =true,value = "SELECT id,wd_point,pz_point,fl_point,fwtd_point,hjws_point,zhfw_point,cxgj_point,total_point, CONCAT( pj_time, '-01-01 00:00:00' ) pj_time from ( " +
+            "SELECT @id \\:= @id+1 as id,AVG(wd_point) wd_point,AVG(pz_point) pz_point,AVG(fl_point) fl_point,AVG(fwtd_point) fwtd_point,AVG(hjws_point) hjws_point,AVG(zhfw_point) zhfw_point,AVG(cxgj_point) cxgj_point,AVG(total_point) total_point," +
+            " DATE_FORMAT(pj_time,'%Y') pj_time FROM (SELECT @id \\:=0) r,dm_service_pj WHERE if(:stateDate != '' and :endDate !='',pj_time between :endDate and :stateDate,1=1) GROUP BY  DATE_FORMAT(pj_time,'%Y')  "+
+            ") a ",
+            countQuery =  "SELECT count (*) from ( " +
+                    "SELECT 0 as id,AVG(wd_point) wd_point,AVG(pz_point) pz_point,AVG(fl_point) fl_point,AVG(fwtd_point) fwtd_point,AVG(hjws_point) hjws_point,AVG(zhfw_point) zhfw_point,AVG(cxgj_point) cxgj_point,AVG(total_point) total_point," +
+                    " DATE_FORMAT(pj_time,'%Y') pj_time FROM dm_service_pj WHERE if(:stateDate != '' and :endDate !='',pj_time between :endDate and :stateDate,1=1) GROUP BY  DATE_FORMAT(pj_time,'%Y')  "+
+                    ") a ")
+    Page<DmEvaluate> selectYearServicePj (@Param("stateDate") String stateDate, @Param("endDate") String endDate, Pageable pageable);
+
+    /**
+     * 月整体评价报表
+     * @param
+     * @param pageable
+     * @return
+     */
+    @Query(nativeQuery =true,value = " SELECT id,wd_point,pz_point,fl_point,fwtd_point,hjws_point,zhfw_point,cxgj_point,total_point, CONCAT( pj_time, '-01 00:00:00' ) pj_time  from ( " +
+            " SELECT @id \\:= @id+1 as id,AVG(wd_point) wd_point,AVG(pz_point) pz_point,AVG(fl_point) fl_point,AVG(fwtd_point) fwtd_point,AVG(hjws_point) hjws_point,AVG(zhfw_point) zhfw_point,AVG(cxgj_point) cxgj_point,AVG(total_point) total_point," +
+            " DATE_FORMAT(pj_time,'%Y-%m') pj_time FROM (SELECT @id \\:=0) r,dm_service_pj WHERE if(:stateDate != '' and :endDate !='',pj_time between :stateDate and :endDate,1=1) GROUP BY DATE_FORMAT(pj_time,'%Y-%m')  "+
+            ") a ",
+            countQuery =  "SELECT count (*) from ( " +
+                    "SELECT 0 as id,AVG(wd_point) wd_point,AVG(pz_point) pz_point,AVG(fl_point) fl_point,AVG(fwtd_point) fwtd_point,AVG(hjws_point) hjws_point,AVG(zhfw_point) zhfw_point,AVG(cxgj_point) cxgj_point,AVG(total_point) total_point," +
+                    " DATE_FORMAT(pj_time,'%Y-%m') pj_time FROM dm_service_pj WHERE if(:stateDate != '' and :endDate !='',pj_time between :endDate and :stateDate,1=1) GROUP BY  DATE_FORMAT(pj_time,'%Y-%m')  "+
+                    ") a ")
+    Page<DmEvaluate> selectMonthServicePj (@Param("stateDate") String stateDate, @Param("endDate") String endDate, Pageable pageable);
+}

+ 197 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmHaveDinnerRepository.java

@@ -0,0 +1,197 @@
+package me.zhengjie.modules.dm.statement.repository;
+
+import me.zhengjie.modules.dm.statement.domain.DmHaveDinner;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.*;
+import org.springframework.transaction.annotation.Transactional;
+
+public interface DmHaveDinnerRepository extends JpaRepository<DmHaveDinner,Integer>, JpaSpecificationExecutor<DmHaveDinner> {
+    /**
+     * todo 是否存在视图
+     */
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zgmonth`",nativeQuery = true)
+    void dropByZgMonth();
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zdmonth`",nativeQuery = true)
+    void dropByZdMonth();
+
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zgyear`",nativeQuery = true)
+    void dropByZgYear();
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zdyear`",nativeQuery = true)
+    void dropByZdYear();
+
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zgday`",nativeQuery = true)
+    void dropByZgDay();
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zdday`",nativeQuery = true)
+    void dropByZdDay();
+
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zgweek`",nativeQuery = true)
+    void dropByZgWeek();
+    @Transactional
+    @Modifying
+    @Query(value = "DROP VIEW if \\exists `zdweek`",nativeQuery = true)
+    void dropByZdWeek();
+
+    /**
+     * todo 创建视图
+     */
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zgmonth as " +
+            "SELECT  i.name as zg_name,SUM(i.num) as zg_num,DATE_FORMAT(order_time,'%Y-%m') time  FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zg_name` " +
+            "ORDER BY time DESC,SUM(num) DESC ",nativeQuery = true)
+    void addZgMonth(String stateDate,String endDate);
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zdmonth as " +
+            "SELECT i.name as zd_name,SUM(i.num) as zd_num,SUM(i.money) as money,DATE_FORMAT(order_time,'%Y-%m') time FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zd_name` " +
+            "ORDER BY time DESC,SUM(num) ASC ",nativeQuery = true)
+    void addZdMonth(String stateDate,String endDate);
+
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zgyear as " +
+            "SELECT  i.name as zg_name,SUM(i.num) as zg_num,DATE_FORMAT(order_time,'%Y') time  FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zg_name` " +
+            "ORDER BY time DESC,SUM(num) DESC ",nativeQuery = true)
+    void addZgYear(String stateDate,String endDate);
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zdyear as " +
+            "SELECT i.name as zd_name,SUM(i.num) as zd_num,SUM(i.money) as money,DATE_FORMAT(order_time,'%Y') time FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zd_name` " +
+            "ORDER BY time DESC,SUM(num) ASC ",nativeQuery = true)
+    void addZdYear(String stateDate,String endDate);
+
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zgday as " +
+            "SELECT  i.name as zg_name,SUM(i.num) as zg_num,DATE_FORMAT(order_time,'%Y-%m-%d') time  FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zg_name` " +
+            "ORDER BY time DESC,SUM(num) DESC ",nativeQuery = true)
+    void addZgDay(String stateDate,String endDate);
+//    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zdday as " +
+            "SELECT i.name as zd_name,SUM(i.num) as zd_num,SUM(i.money) as money,DATE_FORMAT(order_time,'%Y-%m-%d') time FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY time,`zd_name` " +
+            "ORDER BY time DESC,SUM(num) ASC ",nativeQuery = true)
+    void addZdDay(String stateDate,String endDate);
+
+    @Modifying
+    @Query(value = "CREATE VIEW  zgweek as " +
+            "SELECT  i.name as zg_name,SUM(i.num) as zg_num,DATE_FORMAT(order_time,'%Y-%u') week_time  FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY DATE_FORMAT(order_time,'%u'),`zg_name` " +
+            "ORDER BY DATE_FORMAT(order_time,'%u') DESC,SUM(num) DESC ",nativeQuery = true)
+    void addZgWeek(String stateDate,String endDate);
+    //    @Transactional
+    @Modifying
+    @Query(value = "CREATE VIEW  zdweek as " +
+            "SELECT i.name as zd_name,SUM(i.num) as zd_num,SUM(i.money) as money,DATE_FORMAT(order_time,'%Y-%u') week_time FROM `dm_order_item` i " +
+            "LEFT JOIN `dm_order_record` r ON  i.bh = r.bh " +
+            "WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) " +
+            "GROUP BY DATE_FORMAT(order_time,'%u'),`zd_name` " +
+            "ORDER BY DATE_FORMAT(order_time,'%u') DESC,SUM(num) ASC ",nativeQuery = true)
+    void addZdWeek(String stateDate,String endDate);
+
+    /**
+     * todo 页面数据
+     */
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, '-01 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zg_name,zg_num,time,null as money,null as zd_name,0 as zd_num,null as week_time from zgmonth a " +
+            "WHERE 3> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zgmonth b WHERE a.time = b.time and a.zg_num < b.zg_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zg_name,zg_num,time from (SELECT @id :=0) r,zgmonth a " +
+                    "WHERE 3> (SELECT COUNT(*) from zgmonth b WHERE a.time = b.time and a.zg_num < b.zg_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZgMonth(Pageable pageable);
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, '-01 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,null as zg_name,0 as zg_num,time,money,zd_name,zd_num,null as week_time from zdmonth a " +
+            "WHERE 1> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zdmonth b WHERE a.time = b.time and a.zd_num > b.zd_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zd_name,zd_num,time from (SELECT @id :=0) r,zdmonth a " +
+                    "WHERE 1> (SELECT COUNT(*) from zdmonth b WHERE a.time = b.time and a.zd_num > b.zd_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZdMonth(Pageable pageable);
+
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, '-01-01 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zg_name,zg_num,time,null as money,null as zd_name,0 as zd_num,null as week_time from zgyear a " +
+            "WHERE 3> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zgyear b WHERE a.time = b.time and a.zg_num < b.zg_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zg_name,zg_num,time from (SELECT @id :=0) r,zgyear a " +
+                    "WHERE 3> (SELECT COUNT(*) from zgyear b WHERE a.time = b.time and a.zg_num < b.zg_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZgYear(Pageable pageable);
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, '-01-01 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zd_name,zd_num,time,money,null as zg_name,0 as zg_num,null as week_time from zdyear a " +
+            "WHERE 1> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zdyear b WHERE a.time = b.time and a.zd_num > b.zd_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zd_name,zd_num,time from (SELECT @id :=0) r,zdyear a " +
+                    "WHERE 1> (SELECT COUNT(*) from zdyear b WHERE a.time = b.time and a.zd_num > b.zd_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZdYear(Pageable pageable);
+
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, ' 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zg_name,zg_num,time,null as money,null as zd_name,0 as zd_num,null as week_time from zgday a " +
+            "WHERE 3> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zgday b WHERE a.time = b.time and a.zg_num < b.zg_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zg_name,zg_num,time from (SELECT @id :=0) r,zgday a " +
+                    "WHERE 3> (SELECT COUNT(*) from zgday b WHERE a.time = b.time and a.zg_num < b.zg_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZgDay(Pageable pageable);
+    @Query(value = "SELECT id,zg_name,zg_num,CONCAT( time, ' 00:00:00' ) time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zd_name,zd_num,time,money,null as zg_name,0 as zg_num,null as week_time from zdday a " +
+            "WHERE 1> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zdday b WHERE a.time = b.time and a.zd_num > b.zd_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zd_name,zd_num,time from (SELECT @id :=0) r,zdday a " +
+                    "WHERE 1> (SELECT COUNT(*) from zdday b WHERE a.time = b.time and a.zd_num > b.zd_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZdDay(Pageable pageable);
+
+    @Query(value = "SELECT id,zg_name,zg_num,time,money,zd_name,zd_num,week_time FROM("+
+            "SELECT @id \\:= @id+1 as id,zg_name,zg_num,null as time,null as money,null as zd_name,0 as zd_num,week_time from zgweek a " +
+            "WHERE 3> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zgweek b WHERE a.week_time = b.week_time and a.zg_num < b.zg_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zg_name,zg_num,time from (SELECT @id :=0) r,zgweek a " +
+                    "WHERE 3> (SELECT COUNT(*) from zgweek b WHERE a.time = b.time and a.zg_num < b.zg_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZgWeek(Pageable pageable);
+    @Query(value = "SELECT id,zg_name,zg_num, time,money,zd_name,zd_num,week_time FROM("+//CONCAT( time, '-00 00:00:00' )
+            "SELECT @id \\:= @id+1 as id,zd_name,zd_num,null as time,money,null as zg_name,0 as zg_num,week_time from zdweek a " +
+            "WHERE 1> (SELECT COUNT(*) from (SELECT @id \\:=0) r,zdweek b WHERE a.week_time = b.week_time and a.zd_num > b.zd_num))a ",
+            countQuery="select count(*) from(" +
+                    "SELECT @id := @id+1 as id,zd_name,zd_num,time from (SELECT @id :=0) r,zdweek a " +
+                    "WHERE 1> (SELECT COUNT(*) from zdweek b WHERE a.time = b.time and a.zd_num > b.zd_num)" +
+                    ")a ",nativeQuery = true)
+    Page<DmHaveDinner> selectByZdWeek(Pageable pageable);
+}

+ 44 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/repository/DmStatementRepository.java

@@ -0,0 +1,44 @@
+package me.zhengjie.modules.dm.statement.repository;
+
+import me.zhengjie.modules.dm.order.domain.DmOrderRecord;
+import me.zhengjie.modules.dm.statement.domain.DmStatement;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+
+public interface DmStatementRepository extends JpaRepository<DmStatement, Integer>, JpaSpecificationExecutor<DmStatement> {
+    /**
+     * 年部门消费
+     * @param
+     * @param pageable
+     * @return
+     */
+    @Query(nativeQuery =true,value = " SELECT id,name,money,avg_money,CONCAT(order_time,'-01-01 00:00:00') order_time from ( " +
+            " SELECT @id \\:= @id+1 as id,b.name,SUM(money) money,AVG(money) avg_money, DATE_FORMAT( order_time, '%Y' ) order_time FROM (SELECT @id \\:=0) r,dm_order_record a  LEFT JOIN sys_dept b ON a.dept_id=b.dept_id " +
+            " WHERE  if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) GROUP BY DATE_FORMAT(order_time,'%Y'),b.name" +
+            ") a ",
+            countQuery =  "SELECT count (*) from ( " +
+                    "SELECT 0 as id,b.name,SUM(money),AVG(money) avg_money,DATE_FORMAT( order_time, '%Y' ) order_time FROM dm_order_record a LEFT JOIN sys_dept b ON a.dept_id = b.dept_id " +
+                    " WHERE if(:stateDate != '' and :endDate !='',DATE_FORMAT(order_time,'%Y') between :stateDate and :endDate,1=1) GROUP BY DATE_FORMAT(order_time,'%Y'),b.name" +
+                    ") a ")
+    Page<DmStatement> selectYearStatement (@Param("stateDate") String stateDate, @Param("endDate") String endDate, Pageable pageable);
+    /**
+     * 月部门消费
+     * @param
+     * @param pageable
+     * @return
+     */
+    @Query(nativeQuery =true,value = " SELECT id,name,money,avg_money,CONCAT(order_time,'-01 00:00:00') order_time from ( " +
+            " SELECT @id \\:= @id+1 as id,b.name,SUM(money) money,AVG(money) avg_money, DATE_FORMAT( order_time, '%Y-%m' ) order_time FROM (SELECT @id \\:=0) r,dm_order_record a  LEFT JOIN sys_dept b ON a.dept_id=b.dept_id " +
+            " WHERE  if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) GROUP BY DATE_FORMAT(order_time,'%Y-%m'),b.name" +
+            ") a ",
+            countQuery =  "SELECT count (*) from ( " +
+                    "SELECT 0 as id,b.name,SUM(money),AVG(money) avg_money,DATE_FORMAT( order_time, '%Y-%m' ) order_time FROM dm_order_record a LEFT JOIN sys_dept b ON a.dept_id=b.dept_id " +
+                    " WHERE if(:stateDate != '' and :endDate !='',order_time between :stateDate and :endDate,1=1) GROUP BY DATE_FORMAT(order_time,'%Y-%m'),b.name" +
+                    ") a ")
+    Page<DmStatement> selectMonthStatement (@Param("stateDate") String stateDate, @Param("endDate") String endDate, Pageable pageable);
+}

+ 63 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmEvaluateController.java

@@ -0,0 +1,63 @@
+package me.zhengjie.modules.dm.statement.rest;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.dm.order.service.dto.DmOrderRecordQueryCriteria;
+import me.zhengjie.modules.dm.serveEvaluate.service.dto.DmServeEvaluateQueryCriteria;
+import me.zhengjie.modules.dm.service.service.dto.DmServicePjQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.DmEvaluateService;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import org.springframework.data.domain.Pageable;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.text.ParseException;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "statement管理")
+@RequestMapping("/api/dmEvaluate")
+public class DmEvaluateController {
+    private final DmEvaluateService dmEvaluateService;
+
+
+    @Log("查询整体评价")
+    @ApiOperation("查询整体评价")
+    @GetMapping(value = "/selectEvaluate")
+//    @PreAuthorize("@el.check('dmEvaluate:list')")
+    public ResponseEntity<Object> selectEvaluate(String stateDate, String endDate, String type, Pageable pageable) throws ParseException {
+        return new ResponseEntity<>(dmEvaluateService.selectServicePj(stateDate,endDate,type,pageable), HttpStatus.OK);
+    }
+
+    @Log("导出数据")
+    @ApiOperation("导出数据")
+    @GetMapping(value = "/download")
+    @PreAuthorize("@el.check('dmEvaluate:list')")
+    public void download(HttpServletResponse response, String stateDate, String endDate, String type, Pageable pageable) throws IOException {
+//        dmEvaluateService.download(dmEvaluateService.queryAll(criteria), response);
+        Map<String,Object> map = dmEvaluateService.selectServicePj(stateDate,endDate,type,pageable);
+        List<DmEvaluateDto> all = (List<DmEvaluateDto>)map.get("content");
+        dmEvaluateService.download(all, response);
+    }
+
+//    @GetMapping
+//    @Log("查询dmEvaluate")
+//    @ApiOperation("查询dmEvaluate")
+//    @PreAuthorize("@el.check('dmEvaluate:list')")
+//    public ResponseEntity<Object> query(DmEvaluateQueryCriteria criteria, Pageable pageable){
+//        return new ResponseEntity<>(dmEvaluateService.queryAll(criteria,pageable),HttpStatus.OK);
+//    }
+}

+ 70 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmHaveDinnerController.java

@@ -0,0 +1,70 @@
+package me.zhengjie.modules.dm.statement.rest;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.dm.statement.service.DmHaveDinnerService;
+import me.zhengjie.modules.dm.statement.service.dto.DmHaveDinnerDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmHaveDinnerQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Transactional
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "haveDinner管理")
+@RequestMapping("/api/dmHaveDinner")
+public class DmHaveDinnerController {
+    private final DmHaveDinnerService dmHaveDinnerService;
+
+    @Log("导出数据")
+    @ApiOperation("导出数据")
+    @GetMapping(value = "/download")
+    @PreAuthorize("@el.check('dmHaveDinner:list')")
+    public void download(HttpServletResponse response, String stateDate, String endDate, String type, Pageable pageable) throws IOException {
+        Map<String,Object> map = dmHaveDinnerService.selectZgHaveDinner(stateDate,endDate,type,pageable);
+        List<DmHaveDinnerDto> all = (List<DmHaveDinnerDto>)map.get("content");
+        if (type.equals("week")){
+            dmHaveDinnerService.downWeekload(all, response);
+        }else {
+            dmHaveDinnerService.download(all, response);
+        }
+    }
+
+
+    @GetMapping(value = "/dmZgHaveDinner")
+    @Log("用餐报表")
+    @ApiOperation("用餐报表")
+//    @PreAuthorize("@el.check('dmHaveDinner:list')")
+    public ResponseEntity<Object> selectZgHaveDinner(String stateDate, String endDate, String type, Pageable pageable){
+        Map<String,Object> map = new HashMap<>();
+        map.put("one",dmHaveDinnerService.selectZgHaveDinner(stateDate,endDate,type,pageable));
+        return new ResponseEntity<>(map, HttpStatus.OK);
+    }
+
+    @GetMapping(value = "/dmZdHaveDinner")
+    @Log("用餐报表")
+    @ApiOperation("用餐报表")
+    public ResponseEntity<Object> selectZdHaveDinner(String stateDate, String endDate, String type, Pageable pageable){
+        Map<String,Object> map = new HashMap<>();
+        map.put("two",dmHaveDinnerService.selectZdHaveDinner(stateDate,endDate,type,pageable));
+        return new ResponseEntity<>(map, HttpStatus.OK);
+    }
+
+}

+ 53 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/rest/DmStatementController.java

@@ -0,0 +1,53 @@
+package me.zhengjie.modules.dm.statement.rest;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.dm.order.repository.DmOrderRecordRepository;
+import me.zhengjie.modules.dm.order.service.DmOrderRecordService;
+import me.zhengjie.modules.dm.order.service.dto.DmOrderRecordQueryCriteria;
+import me.zhengjie.modules.dm.statement.repository.DmStatementRepository;
+import me.zhengjie.modules.dm.statement.service.DmStatementService;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "statement管理")
+@RequestMapping("/api/dmStatement")
+public class DmStatementController {
+    private final DmStatementService dmStatementService;
+    private final DmOrderRecordService dmOrderRecordService;
+
+    @Log("导出数据")
+    @ApiOperation("导出数据")
+    @GetMapping(value = "/download")
+    @PreAuthorize("@el.check('dmStatement:list')")
+    public void download(HttpServletResponse response,  String stateDate, String endDate, String type, Pageable pageable) throws IOException {
+        Map<String,Object>  map = dmStatementService.selectOrderRecord(stateDate,endDate,type,pageable);
+        List<DmStatementDto> all = (List<DmStatementDto>)map.get("content");
+        dmStatementService.download(all, response);
+    }
+
+
+    @GetMapping(value = "/selectStatement")
+    @Log("查询部门消费")
+    @ApiOperation("查询部门消费")
+//    @PreAuthorize("@el.check('dmStatement:list')")
+    public ResponseEntity<Object> selectStatement(String stateDate, String endDate, String type, Pageable pageable){
+        return new ResponseEntity<>(dmStatementService.selectOrderRecord(stateDate,endDate,type,pageable), HttpStatus.OK);
+    }
+}

+ 45 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmEvaluateService.java

@@ -0,0 +1,45 @@
+package me.zhengjie.modules.dm.statement.service;
+
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateQueryCriteria;
+import org.springframework.data.domain.Pageable;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.List;
+import java.util.Map;
+
+public interface DmEvaluateService {
+    /**
+     * 查询数据分页
+     * @param criteria 条件
+     * @param pageable 分页参数
+     * @return Map<String,Object>
+     */
+    Map<String,Object> queryAll(DmEvaluateQueryCriteria criteria, Pageable pageable);
+
+    /**
+     * 查询所有数据不分页
+     * @param criteria 条件参数
+     * @return List<DmServicePjDto>
+     */
+    List<DmEvaluateDto> queryAll(DmEvaluateQueryCriteria criteria);
+
+    /**
+     * 整体评价
+     * @param
+     * @param stateDate
+     * @param pageable
+     * @return
+     */
+    Map<String,Object> selectServicePj (String stateDate, String endDate, String type, Pageable pageable);
+
+    /**
+     * 导出数据
+     * @param all 待导出的数据
+     * @param response /
+     * @throws IOException /
+     */
+    void download(List<DmEvaluateDto> all, HttpServletResponse response) throws IOException;
+}

+ 46 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmHaveDinnerService.java

@@ -0,0 +1,46 @@
+package me.zhengjie.modules.dm.statement.service;
+
+import me.zhengjie.modules.dm.statement.service.dto.DmHaveDinnerDto;
+import org.springframework.data.domain.Pageable;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+public interface DmHaveDinnerService {
+    /**
+     * 用餐报表
+     * @param stateDate
+     * @param endDate
+     * @param type
+     * @param pageable
+     * @return
+     */
+    Map<String,Object> selectZgHaveDinner(String stateDate, String endDate, String type, Pageable pageable);
+
+    /**
+     * 用餐报表
+     * @param stateDate
+     * @param endDate
+     * @param type
+     * @param pageable
+     * @return
+     */
+    Map<String,Object> selectZdHaveDinner(String stateDate, String endDate, String type, Pageable pageable);
+
+    /**
+     * 导出数据
+     * @param all 待导出的数据
+     * @param response /
+     * @throws IOException /
+     */
+    void download(List<DmHaveDinnerDto> all, HttpServletResponse response) throws IOException;
+    /**
+     * 导出数据
+     * @param all 待导出的数据
+     * @param response /
+     * @throws IOException /
+     */
+    void downWeekload(List<DmHaveDinnerDto> all, HttpServletResponse response) throws IOException;
+}

+ 42 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/DmStatementService.java

@@ -0,0 +1,42 @@
+package me.zhengjie.modules.dm.statement.service;
+
+
+import me.zhengjie.modules.dm.order.service.dto.DmOrderRecordDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementQueryCriteria;
+import org.springframework.data.domain.Pageable;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.*;
+
+public interface DmStatementService {
+
+
+    /**
+     * 部门消费
+     * @param stateDate
+     * @param endDate
+     * @param type
+     * @param pageable
+     * @return
+     */
+    Map<String,Object> selectOrderRecord(String stateDate, String endDate, String type, Pageable pageable);
+
+    /**
+     * 导出数据
+     * @param all 待导出的数据
+     * @param response /
+     * @throws IOException /
+     */
+    void download(List<DmStatementDto> all, HttpServletResponse response) throws IOException;
+
+    /**
+     * 查询所有数据不分页
+     * @param criteria 条件参数
+     * @return List<DmServicePjDto>
+     */
+    List<DmStatementDto> queryAll(DmStatementQueryCriteria criteria);
+}

+ 38 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmEvaluateDto.java

@@ -0,0 +1,38 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Data
+public class DmEvaluateDto implements Serializable {
+    private Integer id;
+
+    /** 综合评分 */
+    private String totalPoint;
+
+    /** 评价时间 */
+    private Timestamp pjTime;
+
+    /** 味道 */
+    private Integer wdPoint;
+
+    /** 品种 */
+    private Integer pzPoint;
+
+    /** 分量 */
+    private Integer flPoint;
+
+    /** 服务态度 */
+    private Integer fwtdPoint;
+
+    /** 环境卫生 */
+    private Integer hjwsPoint;
+
+    /** 综合服务 */
+    private Integer zhfwPoint;
+
+    /** 持续改进 */
+    private Integer cxgjPoint;
+}

+ 14 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmEvaluateQueryCriteria.java

@@ -0,0 +1,14 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+import me.zhengjie.annotation.Query;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+@Data
+public class DmEvaluateQueryCriteria {
+    /** BETWEEN */
+    @Query(type = Query.Type.BETWEEN)
+    private List<Timestamp> pjTime;
+}

+ 31 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmHaveDinnerDto.java

@@ -0,0 +1,31 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Data
+public class DmHaveDinnerDto implements Serializable {
+    private Integer id;
+
+    //菜品受欢迎前三-菜品名称
+    private String zgName;
+
+    //菜品受欢迎前三-购买次数
+    private String zgNum;
+
+    //最不受欢迎菜品
+    private String zdName;
+
+    //最不受欢迎菜品-购买次数
+    private String zdNum;
+
+    //最不受欢迎菜品-总消费
+    private String money;
+
+    //统计时段
+    private Timestamp time;
+
+    private String weekTime;
+}

+ 14 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmHaveDinnerQueryCriteria.java

@@ -0,0 +1,14 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+import me.zhengjie.annotation.Query;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+@Data
+public class DmHaveDinnerQueryCriteria {
+    /** BETWEEN */
+    @Query(type = Query.Type.BETWEEN)
+    private List<Timestamp> time;
+}

+ 23 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmStatementDto.java

@@ -0,0 +1,23 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Data
+public class DmStatementDto implements Serializable {
+    private Integer id;
+
+    //组织名称
+    private String name;
+
+    //消费金额
+    private String money;
+
+    //人均消费
+    private String avgMoney;
+
+    //统计时段
+    private Timestamp orderTime;
+}

+ 14 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/dto/DmStatementQueryCriteria.java

@@ -0,0 +1,14 @@
+package me.zhengjie.modules.dm.statement.service.dto;
+
+import lombok.Data;
+import me.zhengjie.annotation.Query;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+@Data
+public class DmStatementQueryCriteria {
+    /** BETWEEN */
+    @Query(type = Query.Type.BETWEEN)
+    private List<Timestamp> orderTime;
+}

+ 91 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmEvaluateServiceImpl.java

@@ -0,0 +1,91 @@
+package me.zhengjie.modules.dm.statement.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.dm.statement.domain.DmEvaluate;
+import me.zhengjie.modules.dm.statement.repository.DmEvaluateRepository;
+import me.zhengjie.modules.dm.statement.service.DmEvaluateService;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.mapstruct.DmEvaluateMapper;
+import me.zhengjie.utils.FileUtil;
+import me.zhengjie.utils.PageUtil;
+import me.zhengjie.utils.QueryHelp;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+@RequiredArgsConstructor
+public class DmEvaluateServiceImpl implements DmEvaluateService {
+    private final DmEvaluateRepository dmEvaluateRepository;
+    private final DmEvaluateMapper dmEvaluateMapper;
+
+    @Override
+    public Map<String, Object> queryAll(DmEvaluateQueryCriteria criteria, Pageable pageable) {
+        Page<DmEvaluate> page = dmEvaluateRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
+        return PageUtil.toPage(page.map(dmEvaluateMapper::toDto));
+    }
+
+    @Override
+    public List<DmEvaluateDto> queryAll(DmEvaluateQueryCriteria criteria) {
+        return dmEvaluateMapper.toDto(dmEvaluateRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
+    }
+
+    @Override
+    public Map<String, Object> selectServicePj(String stateDate, String endDate, String type, Pageable pageable) {
+        Page<DmEvaluate> page=null;
+        Date cal = new Date();
+        Calendar calendar = Calendar.getInstance();
+        SimpleDateFormat year = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//yyyy-MM-dd hh:mm:ss
+        SimpleDateFormat year1 = new SimpleDateFormat("yyyy");
+        if (type.equals("year")){
+            if (stateDate==null && endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-2);
+                page = dmEvaluateRepository.selectYearServicePj(year.format(cal),year1.format(calendar.getTime()),pageable);
+            }else {
+                page = dmEvaluateRepository.selectYearServicePj(stateDate,endDate,pageable);
+            }
+        }else if (type.equals("month")){
+            if (stateDate==null && endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-1);
+                page = dmEvaluateRepository.selectMonthServicePj(year.format(calendar.getTime()),year.format(cal),pageable);
+            }else {
+                page = dmEvaluateRepository.selectMonthServicePj(stateDate,endDate,pageable);
+            }
+        }else {
+            calendar.setTime(cal);
+            calendar.add(Calendar.YEAR,-1);
+            page = dmEvaluateRepository.selectMonthServicePj(year.format(calendar.getTime()),year.format(cal),pageable);
+        }
+        return PageUtil.toPage(page.map(dmEvaluateMapper::toDto));
+    }
+
+    @Override
+    public void download(List<DmEvaluateDto> all, HttpServletResponse response) throws IOException {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (DmEvaluateDto dmEvaluate : all) {
+            Map<String,Object> map = new LinkedHashMap<>();
+            map.put("味道", dmEvaluate.getWdPoint());
+            map.put("品种", dmEvaluate.getPzPoint());
+            map.put("分量", dmEvaluate.getFlPoint());
+            map.put("服务态度", dmEvaluate.getFwtdPoint());
+            map.put("环境卫生", dmEvaluate.getHjwsPoint());
+            map.put("综合服务", dmEvaluate.getZhfwPoint());
+            map.put("持续改进", dmEvaluate.getCxgjPoint());
+            map.put("综合评分", dmEvaluate.getTotalPoint());
+            map.put("统计时段", dmEvaluate.getPjTime());
+            list.add(map);
+        }
+        FileUtil.downloadExcel(list, response);
+    }
+}

+ 191 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmHaveDinnerServiceImpl.java

@@ -0,0 +1,191 @@
+package me.zhengjie.modules.dm.statement.service.impl;
+
+import com.zaxxer.hikari.HikariDataSource;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.dm.statement.domain.DmHaveDinner;
+import me.zhengjie.modules.dm.statement.repository.DmHaveDinnerRepository;
+import me.zhengjie.modules.dm.statement.service.DmHaveDinnerService;
+import me.zhengjie.modules.dm.statement.service.dto.DmHaveDinnerDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import me.zhengjie.modules.dm.statement.service.mapstruct.DmHaveDinnerMapper;
+import me.zhengjie.utils.FileUtil;
+import me.zhengjie.utils.PageUtil;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Transactional
+@Service
+@RequiredArgsConstructor
+public class DmHaveDinnerServiceImpl implements DmHaveDinnerService {
+    private static HikariDataSource JDBCUtils;
+    private final DmHaveDinnerMapper dmHaveDinnerMapper;
+    private final DmHaveDinnerRepository dmHaveDinnerRepository;
+
+    @Override
+    public Map<String, Object> selectZgHaveDinner(String stateDate, String endDate, String type, Pageable pageable) {
+        Page<DmHaveDinner> page = null;
+        Date cal = new Date();
+        Calendar calendar = Calendar.getInstance();
+        SimpleDateFormat year = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//yyyy-MM-dd hh:mm:ss
+        SimpleDateFormat year1 = new SimpleDateFormat("yyyy");
+        if (type==null){
+            calendar.setTime(cal);
+            calendar.add(Calendar.YEAR,-1);
+            dmHaveDinnerRepository.dropByZgYear();
+            dmHaveDinnerRepository.addZgYear(year.format(calendar.getTime()),year.format(cal));
+            page = dmHaveDinnerRepository.selectByZgMonth(pageable);
+        }
+        if (type.equals("year")){
+            if (stateDate==null && endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-2);
+                dmHaveDinnerRepository.dropByZgYear();
+                dmHaveDinnerRepository.addZgYear(year.format(cal),year1.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZgYear(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZgYear();
+                dmHaveDinnerRepository.addZgYear(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZgYear(pageable);
+            }
+        }else if (type.equals("month")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-1);
+                dmHaveDinnerRepository.dropByZgMonth();
+                dmHaveDinnerRepository.addZgMonth(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZgMonth(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZgMonth();
+                dmHaveDinnerRepository.addZgMonth(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZgMonth(pageable);
+            }
+        }else if (type.equals("day")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.DAY_OF_MONTH, -90);
+                dmHaveDinnerRepository.dropByZgDay();
+                dmHaveDinnerRepository.addZgDay(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZgDay(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZgDay();
+                dmHaveDinnerRepository.addZgDay(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZgDay(pageable);
+            }
+        }else if (type.equals("week")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.WEEK_OF_YEAR,-15);
+                dmHaveDinnerRepository.dropByZgWeek();
+                dmHaveDinnerRepository.addZgWeek(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZgWeek(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZgWeek();
+                dmHaveDinnerRepository.addZgWeek(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZgWeek(pageable);
+            }
+        }
+        return PageUtil.toPage(page.map(dmHaveDinnerMapper::toDto));
+    }
+
+    @Override
+    public Map<String, Object> selectZdHaveDinner(String stateDate, String endDate, String type, Pageable pageable) {
+        Page<DmHaveDinner> page = null;
+        Date cal = new Date();
+        Calendar calendar = Calendar.getInstance();
+        SimpleDateFormat year = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//yyyy-MM-dd hh:mm:ss
+        SimpleDateFormat year1 = new SimpleDateFormat("yyyy");
+        if (type.equals("year")){
+            if (stateDate==null && endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-2);
+                dmHaveDinnerRepository.dropByZdYear();
+                dmHaveDinnerRepository.addZdYear(year.format(cal),year1.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZdYear(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZdYear();
+                dmHaveDinnerRepository.addZdYear(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZdYear(pageable);
+            }
+        }else if (type.equals("month")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-1);
+                dmHaveDinnerRepository.dropByZdMonth();
+                dmHaveDinnerRepository.addZdMonth(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZdMonth(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZdMonth();
+                dmHaveDinnerRepository.addZdMonth(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZdMonth(pageable);
+            }
+        }else if (type.equals("day")){
+            if (stateDate==null || endDate ==null){
+//                Calendar calendar1 = new GregorianCalendar();
+                calendar.setTime(cal);
+                calendar.add(Calendar.DAY_OF_MONTH, -90);
+                dmHaveDinnerRepository.dropByZdDay();
+                dmHaveDinnerRepository.addZdDay(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZdDay(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZdDay();
+                dmHaveDinnerRepository.addZdDay(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZdDay(pageable);
+            }
+        }else if (type.equals("week")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.WEEK_OF_YEAR,-15);
+                dmHaveDinnerRepository.dropByZdWeek();
+                dmHaveDinnerRepository.addZdWeek(year.format(cal),year.format(calendar.getTime()));
+                page = dmHaveDinnerRepository.selectByZdWeek(pageable);
+            }else {
+                dmHaveDinnerRepository.dropByZdWeek();
+                dmHaveDinnerRepository.addZdWeek(stateDate,endDate);
+                page = dmHaveDinnerRepository.selectByZdWeek(pageable);
+            }
+        }
+
+        return PageUtil.toPage(page.map(dmHaveDinnerMapper::toDto));
+    }
+
+    @Override
+    public void download(List<DmHaveDinnerDto> all, HttpServletResponse response) throws IOException {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (DmHaveDinnerDto dmHaveDinnerDto : all) {
+            Map<String,Object> map = new LinkedHashMap<>();
+            map.put("菜品受欢迎前三-菜品名称", dmHaveDinnerDto.getZgName());
+            map.put("菜品受欢迎前三-购买次数", dmHaveDinnerDto.getZgNum());
+            map.put("最不受欢迎菜品", dmHaveDinnerDto.getZdName());
+            map.put("最不受欢迎菜品-购买次数", dmHaveDinnerDto.getZdNum());
+            map.put("最不受欢迎菜品-总消费", dmHaveDinnerDto.getMoney());
+            map.put("统计时段", dmHaveDinnerDto.getTime());
+            list.add(map);
+        }
+        FileUtil.downloadExcel(list, response);
+    }
+    @Override
+    public void downWeekload(List<DmHaveDinnerDto> all, HttpServletResponse response) throws IOException {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (DmHaveDinnerDto dmHaveDinnerDto : all) {
+            Map<String,Object> map = new LinkedHashMap<>();
+            map.put("菜品受欢迎前三-菜品名称", dmHaveDinnerDto.getZgName());
+            map.put("菜品受欢迎前三-购买次数", dmHaveDinnerDto.getZgNum());
+            map.put("最不受欢迎菜品", dmHaveDinnerDto.getZdName());
+            map.put("最不受欢迎菜品-购买次数", dmHaveDinnerDto.getZdNum());
+            map.put("最不受欢迎菜品-总消费", dmHaveDinnerDto.getMoney());
+            map.put("统计时段", dmHaveDinnerDto.getWeekTime());
+            list.add(map);
+        }
+        FileUtil.downloadExcel(list, response);
+    }
+}

+ 88 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/impl/DmStatementServiceImpl.java

@@ -0,0 +1,88 @@
+package me.zhengjie.modules.dm.statement.service.impl;
+
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.dm.order.domain.DmOrderRecord;
+import me.zhengjie.modules.dm.order.repository.DmOrderRecordRepository;
+import me.zhengjie.modules.dm.order.service.dto.DmOrderRecordDto;
+import me.zhengjie.modules.dm.order.service.mapstruct.DmOrderRecordMapper;
+import me.zhengjie.modules.dm.service.domain.DmServicePj;
+import me.zhengjie.modules.dm.service.repository.DmServicePjRepository;
+import me.zhengjie.modules.dm.service.service.mapstruct.DmServicePjMapper;
+import me.zhengjie.modules.dm.statement.domain.DmStatement;
+import me.zhengjie.modules.dm.statement.repository.DmStatementRepository;
+import me.zhengjie.modules.dm.statement.service.DmStatementService;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementQueryCriteria;
+import me.zhengjie.modules.dm.statement.service.mapstruct.DmStatementMapper;
+import me.zhengjie.utils.FileUtil;
+import me.zhengjie.utils.PageUtil;
+import me.zhengjie.utils.QueryHelp;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.stereotype.Service;
+
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+@RequiredArgsConstructor
+public class DmStatementServiceImpl implements DmStatementService {
+    private final DmStatementRepository dmStatementRepository;
+    private final DmStatementMapper dmStatementMapper;
+
+    @Override
+    public Map<String, Object> selectOrderRecord(String stateDate, String endDate, String type, Pageable pageable) {
+        Page<DmStatement> page=null;
+        Date cal = new Date();
+        Calendar calendar = Calendar.getInstance();
+        SimpleDateFormat year = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//yyyy-MM-dd hh:mm:ss
+        SimpleDateFormat year1 = new SimpleDateFormat("yyyy");
+        if (type.equals("year")){
+            if (stateDate==null && endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-2);
+                page = dmStatementRepository.selectYearStatement(year1.format(calendar.getTime()),year.format(cal),pageable);
+            }else {
+                page = dmStatementRepository.selectYearStatement(stateDate,endDate,pageable);
+            }
+        }else if (type.equals("month")){
+            if (stateDate==null || endDate ==null){
+                calendar.setTime(cal);
+                calendar.add(Calendar.YEAR,-1);
+                page = dmStatementRepository.selectMonthStatement(year.format(calendar.getTime()),year.format(cal),pageable);
+            }else {
+                page = dmStatementRepository.selectMonthStatement(stateDate,endDate,pageable);
+            }
+        }else {
+            calendar.setTime(cal);
+            calendar.add(Calendar.YEAR,-1);
+            page= dmStatementRepository.selectMonthStatement(year.format(calendar.getTime()),year.format(cal),pageable);
+        }
+        return PageUtil.toPage(page.map(dmStatementMapper::toDto));
+    }
+
+    @Override
+    public void download(List<DmStatementDto> all, HttpServletResponse response) throws IOException {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (DmStatementDto dmStatementDto : all) {
+            Map<String,Object> map = new LinkedHashMap<>();
+            map.put("组织名称", dmStatementDto.getName());
+            map.put("消费金额", dmStatementDto.getMoney());
+            map.put("人均消费", dmStatementDto.getAvgMoney());
+            map.put("统计时段", dmStatementDto.getOrderTime());
+            list.add(map);
+        }
+        FileUtil.downloadExcel(list, response);
+    }
+
+    @Override
+    public List<DmStatementDto> queryAll(DmStatementQueryCriteria criteria) {
+        return dmStatementMapper.toDto(dmStatementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
+    }
+}

+ 12 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmEvaluateMapper.java

@@ -0,0 +1,12 @@
+package me.zhengjie.modules.dm.statement.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.dm.statement.domain.DmEvaluate;
+import me.zhengjie.modules.dm.statement.service.dto.DmEvaluateDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface DmEvaluateMapper extends BaseMapper<DmEvaluateDto, DmEvaluate> {
+
+}

+ 11 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmHaveDinnerMapper.java

@@ -0,0 +1,11 @@
+package me.zhengjie.modules.dm.statement.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.dm.statement.domain.DmHaveDinner;
+import me.zhengjie.modules.dm.statement.service.dto.DmHaveDinnerDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface DmHaveDinnerMapper extends BaseMapper<DmHaveDinnerDto, DmHaveDinner> {
+}

+ 12 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/statement/service/mapstruct/DmStatementMapper.java

@@ -0,0 +1,12 @@
+package me.zhengjie.modules.dm.statement.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.dm.statement.domain.DmStatement;
+import me.zhengjie.modules.dm.statement.service.dto.DmStatementDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface DmStatementMapper extends BaseMapper<DmStatementDto, DmStatement> {
+
+}