From e8f0b3422d307c686b3a81269f9e9e4fb34a846e Mon Sep 17 00:00:00 2001
From: wjli <591616088@qq.com>
Date: 星期五, 12 四月 2024 10:49:46 +0800
Subject: [PATCH] 指纹登陆返回客户端加密信息

---
 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java |   76 +++++++++++++++++++++++++++++++++++---
 1 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java
index e8906e3..eff8933 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java
@@ -1,16 +1,16 @@
 package cn.exrick.xboot.your.mapper;
 
 import cn.exrick.xboot.your.entity.AddOil;
+import cn.exrick.xboot.your.entity.OrderStatusCount;
+import cn.exrick.xboot.your.entity.Suggest;
+import cn.exrick.xboot.your.vo.Month;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import cn.exrick.xboot.your.entity.OrderTask;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Result;
-import org.apache.ibatis.annotations.Results;
-import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.*;
 import org.apache.ibatis.type.JdbcType;
 
 import java.util.List;
@@ -19,12 +19,76 @@
  * 璁㈠崟琛ㄦ暟鎹鐞嗗眰
  * @author whj
  */
+//@Repository
 public interface OrderTaskMapper extends BaseMapper<OrderTask> {
 
     @Select("SELECT sum(num) FROM t_order_task where area_id=#{arg0} and DATE_FORMAT(send_date,'%Y-%m-%d')=#{arg1}")
     Integer sum(String areaId, String format);
 
-    @Select("SELECT a.*,b.name as temp FROM t_order_task a LEFT JOIN t_customer b ON a.customer_id=b.id ${ew.customSqlSegment} ")
-    @Results({@Result(column="temp", property="customerName", jdbcType = JdbcType.VARCHAR)})
+    @Select("SELECT a.*,b.name as temp,b.linker as temp2 FROM t_order_task a LEFT JOIN t_customer b ON a.customer_id=b.id ${ew.customSqlSegment} ")
+    @Results({@Result(column="temp", property="customerName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="temp2", property="code", jdbcType = JdbcType.VARCHAR)})
     List<OrderTask> list2(@Param(Constants.WRAPPER) QueryWrapper<OrderTask> wrapper2);
+
+    @Select("SELECT sum(num) FROM t_order_task")
+    int sumNum();
+
+    @Select("SELECT count(id) FROM t_order_task where status=#{arg0}")
+    int sumStatus(int type);
+
+    @Select("SELECT count(id) FROM t_order_task where likes=1")
+    int countLike();
+
+    @Select("select b.car_no as carNo1,c.name as name1,d.name as name2,count(a.area_section_id) as num1,sum(case when a.status=0 then 1 else 0 end) as num2 ,sum(case when a.status=1 then 1 else 0 end) as num3 from t_order_task a LEFT JOIN t_car b on a.car_id=b.id LEFT JOIN t_area c on a.area_id=c.id LEFT JOIN t_area_ection d on a.area_section_id=d.id where DATE_FORMAT(a.send_date,'%Y-%m-%d')=#{date} GROUP BY a.area_section_id,b.car_no,c.name,d.name order by c.name asc")
+    @Results({@Result(column="carNo1", property="carNo", jdbcType = JdbcType.VARCHAR),
+            @Result(column="name1", property="areaName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="name2", property="areaSectionName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="num1", property="num", jdbcType = JdbcType.INTEGER),
+            @Result(column="num2", property="level", jdbcType = JdbcType.INTEGER),
+            @Result(column="num3", property="seq", jdbcType = JdbcType.INTEGER)})
+    List<OrderTask> list3(String date);
+
+    @Select("select sum(time) as time2,send_date from t_order_task where date_sub(curdate(), interval 1 month) <= date(send_date) and area_section_id=#{arg0} GROUP BY send_date")
+    @Results({@Result(column="time2", property="time", jdbcType = JdbcType.INTEGER)})
+    List<OrderTask> sumTime(String id);
+
+    @Select("select \n" +
+            "sum(case month(t.send_date) when '1' then t.num else 0 end) as january,\n" +
+            "sum(case month(t.send_date) when '2' then t.num else 0 end) as february,\n" +
+            "sum(case month(t.send_date) when '3' then t.num else 0 end) as march,\n" +
+            "sum(case month(t.send_date) when '4' then t.num else 0 end) as april,\n" +
+            "sum(case month(t.send_date) when '5' then t.num else 0 end) as may,\n" +
+            "sum(case month(t.send_date) when '6' then t.num else 0 end) as june,\n" +
+            "sum(case month(t.send_date) when '7' then t.num else 0 end) as july,\n" +
+            "sum(case month(t.send_date) when '8' then t.num else 0 end) as august,\n" +
+            "sum(case month(t.send_date) when '9' then t.num else 0 end) as september,\n" +
+            "sum(case month(t.send_date) when '10' then t.num else 0 end) as october,\n" +
+            "sum(case month(t.send_date) when '11' then t.num else 0 end) as november,\n" +
+            "sum(case month(t.send_date) when '12' then t.num else 0 end) as december\n" +
+            "from t_order_task t\n" +
+            "where year(t.send_date)=#{year}")
+    Month getSendNum(@Param("year")int year);
+
+    @Select("select b.name as name1,avg(a.time) as num1,min(a.time) as num2,max(a.time) as num3 from t_order_task a LEFT JOIN t_customer b on a.customer_id=b.id where date_sub(curdate(), interval 1 month) <= date(a.send_date) and a.status=1 and a.area_id=#{arg0} and a.area_section_id=#{arg1} GROUP BY b.name")
+    @Results({
+            @Result(column="name1", property="customerName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="num1", property="time", jdbcType = JdbcType.INTEGER),
+            @Result(column="num2", property="num", jdbcType = JdbcType.INTEGER),
+            @Result(column="num3", property="level", jdbcType = JdbcType.INTEGER)})
+    List<OrderTask> groupByTime(String areaId, String selectId);
+
+    @Select("SELECT a.*,b.name as temp,c.name as temp2,b.lng as temp3,b.lat as temp4 FROM t_order_task a LEFT JOIN t_customer b ON a.customer_id=b.id LEFT JOIN t_customer_receive c ON a.customer_receive_id=c.id ${ew.customSqlSegment} ")
+    @Results({@Result(column="temp", property="customerName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="temp2", property="code", jdbcType = JdbcType.VARCHAR),
+            @Result(column="temp3", property="areaName", jdbcType = JdbcType.VARCHAR),
+            @Result(column="temp4", property="areaSectionName", jdbcType = JdbcType.VARCHAR)})
+    List<OrderTask> list4(@Param(Constants.WRAPPER) QueryWrapper<OrderTask> wrapper2);
+
+    @Select("SELECT o.*,c.name as customerName FROM t_order_task o LEFT JOIN t_customer c ON o.customer_id=c.id")
+    IPage<OrderTask> page2(Page initMpPage);
+
+    @Select("SELECT o.*,c.name as customerName FROM t_order_task o LEFT JOIN t_customer c ON o.customer_id=c.id ${ew.customSqlSegment}")
+    IPage<OrderTask> page3(Page initMpPage,@Param(Constants.WRAPPER) QueryWrapper<OrderTask> wrapper);
+
+    List<OrderStatusCount> countStatus( OrderStatusCount orderStatusCount);
 }
\ No newline at end of file

--
Gitblit v1.9.1