From 6dfd2599d2e52507e018fd4c6b35d38873e48cfb Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期四, 17 三月 2022 15:52:51 +0800
Subject: [PATCH] 最新版本
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java | 6
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/pc/StatisticController.java | 13 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTask2ServiceImpl.java | 26 +++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask2.java | 132 ++++++++++++++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTask2Controller.java | 77 +++++++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerReceiveController.java | 3
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/OrderDealScheduleImpl.java | 61 +++++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTask2Service.java | 14 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java | 1
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderDetail.java | 1
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/util/MQTT.java | 14
xboot-admin/src/main/resources/application.yml | 4
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java | 2
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/EventLog.java | 1
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java | 2
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java | 4
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java | 18 ++
xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java | 32 ++--
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTask2Mapper.java | 14 +
xboot-modules/xboot-your/src/main/resources/mapper/OrderTask2Mapper.xml | 5
xboot-modules/xboot-generator/src/main/java/cn/exrick/xboot/generator/XbootMPGenerator.java | 4
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java | 13 -
22 files changed, 404 insertions(+), 43 deletions(-)
diff --git a/xboot-admin/src/main/resources/application.yml b/xboot-admin/src/main/resources/application.yml
index 1080fec..d569c7c 100644
--- a/xboot-admin/src/main/resources/application.yml
+++ b/xboot-admin/src/main/resources/application.yml
@@ -154,7 +154,7 @@
# 姣�1绉掑唴锛堝崟浣嶆绉掞級
timeout: 1000
# 鎬婚檺鍒�200涓姹傦紙鍗曚綅涓級
- limit: 200
+ limit: 2000
# IP闄愭祦
iplimit:
# 寮�鍚�
@@ -162,7 +162,7 @@
# 姣�1绉掑唴锛堝崟浣嶆绉掞級
timeout: 1000
# 姣忎釜ip闄愬埗20涓姹傦紙鍗曚綅涓級
- limit: 20
+ limit: 200
# 鍚庡彴token浜や簰鏂瑰紡
token:
# 榛樿涓簍rue锛宼oken灏嗗瓨鍏edis锛屽苟鍏锋湁鍗曠偣鐧诲綍鍔熻兘 璁句负false浣跨敤JWT浜や簰
diff --git a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java
index e177184..b2c6603 100644
--- a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java
+++ b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java
@@ -157,8 +157,8 @@
User u = securityUtil.getCurrUser();
// 娓呴櫎鎸佷箙涓婁笅鏂囩幆澧� 閬垮厤鍚庨潰璇彞瀵艰嚧鎸佷箙鍖�
- entityManager.clear();
- u.setPassword(null);
+// entityManager.clear();
+// u.setPassword(null);
return new ResultUtil<User>().setData(u);
}
@@ -276,10 +276,10 @@
public Result<List<User>> getByCondition(@PathVariable String departmentId) {
List<User> list = userService.findByDepartmentId(departmentId);
- entityManager.clear();
- list.forEach(u -> {
- u.setPassword(null);
- });
+// entityManager.clear();
+// list.forEach(u -> {
+// u.setPassword(null);
+// });
return new ResultUtil<List<User>>().setData(list);
}
@@ -288,10 +288,10 @@
public Result<List<User>> searchByName(@PathVariable String username) throws UnsupportedEncodingException {
List<User> list = userService.findByUsernameLikeAndStatus(URLDecoder.decode(username, "utf-8"), CommonConstant.STATUS_NORMAL);
- entityManager.clear();
- list.forEach(u -> {
- u.setPassword(null);
- });
+// entityManager.clear();
+// list.forEach(u -> {
+// u.setPassword(null);
+// });
return new ResultUtil<List<User>>().setData(list);
}
@@ -301,10 +301,10 @@
List<User> list = userService.getAll();
// 娓呴櫎鎸佷箙涓婁笅鏂囩幆澧� 閬垮厤鍚庨潰璇彞瀵艰嚧鎸佷箙鍖�
- entityManager.clear();
- for (User u : list) {
- u.setPassword(null);
- }
+// entityManager.clear();
+// for (User u : list) {
+// u.setPassword(null);
+// }
return new ResultUtil<List<User>>().setData(list);
}
@@ -536,9 +536,9 @@
List<User> list = userService.findByType2(type);
// 娓呴櫎鎸佷箙涓婁笅鏂囩幆澧� 閬垮厤鍚庨潰璇彞瀵艰嚧鎸佷箙鍖�
List<User> list1 = new ArrayList<User>();
- entityManager.clear();
+ //entityManager.clear();
for (User u : list) {
- u.setPassword(null);
+ //u.setPassword(null);
if (u.getType()==0){
list1.add(u);
}
diff --git a/xboot-modules/xboot-generator/src/main/java/cn/exrick/xboot/generator/XbootMPGenerator.java b/xboot-modules/xboot-generator/src/main/java/cn/exrick/xboot/generator/XbootMPGenerator.java
index 0eb8dcc..0575311 100644
--- a/xboot-modules/xboot-generator/src/main/java/cn/exrick/xboot/generator/XbootMPGenerator.java
+++ b/xboot-modules/xboot-generator/src/main/java/cn/exrick/xboot/generator/XbootMPGenerator.java
@@ -33,13 +33,13 @@
* 瀹炰綋绫诲悕
* 寤鸿浠呴渶淇敼
*/
- private static final String CLASS_NAME = "AreaMap";
+ private static final String CLASS_NAME = "OrderTask2";
/**
* 绫昏鏄庢弿杩�
* 寤鸿浠呴渶淇敼
*/
- private static final String DESCRIPTION = "鍖哄煙鍧愭爣";
+ private static final String DESCRIPTION = "璁㈠崟浠诲姟鍘嗗彶琛�";
/**
* 浣滆�呭悕
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerReceiveController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerReceiveController.java
index 5ae43c0..d9f02ab 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerReceiveController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerReceiveController.java
@@ -61,6 +61,9 @@
@ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�")
public Result<CustomerReceive> saveOrUpdate(CustomerReceive customerReceive) {
+ if(StrUtil.isEmpty(customerReceive.getCustomerId())){
+ return ResultUtil.error("鍟嗘埛id涓虹┖锛岃閲嶆柊鐧婚檰鎴栬仈绯荤鐞嗗憳");
+ }
if (iCustomerReceiveService.saveOrUpdate(customerReceive)) {
return new ResultUtil<CustomerReceive>().setData(customerReceive);
}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
index d7453ef..569d7af 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
@@ -84,6 +84,12 @@
@RequestMapping(value = "/updateMileage", method = RequestMethod.POST)
@ApiOperation(value = "娣诲姞琛岃溅璁板綍")
public Result<DrivingRecord> updateMileage(String carId,int mileage,String userId,String inDate) {
+ if(StrUtil.isEmpty(userId)){
+ return ResultUtil.error("鍙傛暟涓嶅畬鏁�");
+ }
+ if(StrUtil.isEmpty(carId)){
+ return ResultUtil.error("鍙傛暟涓嶅畬鏁�");
+ }
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
QueryWrapper<DrivingRecord> wrapper = new QueryWrapper<>();
wrapper.eq("driving_date",format);
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
index d8b960e..26ef18c 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
@@ -174,6 +174,15 @@
@ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�")
public Result<Fingerprint> saveOrUpdate(Fingerprint fingerprint) {
if(StrUtil.isNotEmpty(fingerprint.getUserId())){
+
+ QueryWrapper<Fingerprint> wrapper = new QueryWrapper<Fingerprint>();
+ wrapper.eq("code",fingerprint.getCode());
+ wrapper.isNotNull("user_id");
+ Fingerprint one = iFingerprintService.getOne(wrapper);
+ if(one!=null){
+ return ResultUtil.error("code閲嶅浜嗭紝璇烽噸鏂拌幏鍙�");
+ }
+
User user = userService.get(fingerprint.getUserId());
fingerprint.setUsername(user.getUsername());
fingerprint.setPassword(user.getDescription());
@@ -182,6 +191,15 @@
if(StrUtil.isNotEmpty(fingerprint.getCustomerId())){
Customer byId = iCustomerService.getById(fingerprint.getCustomerId());
fingerprint.setAreaId(byId.getAreaId());
+
+ QueryWrapper<Fingerprint> wrapper = new QueryWrapper<Fingerprint>();
+ wrapper.eq("code",fingerprint.getCode());
+ wrapper.eq("area_id",byId.getAreaId());
+ wrapper.isNotNull("customer_id");
+ Fingerprint one = iFingerprintService.getOne(wrapper);
+ if(one!=null){
+ return ResultUtil.error("code閲嶅浜嗭紝璇烽噸鏂拌幏鍙�");
+ }
}
if(StrUtil.isNotEmpty(fingerprint.getCustomerReceiveId())){
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTask2Controller.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTask2Controller.java
new file mode 100644
index 0000000..5be2972
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTask2Controller.java
@@ -0,0 +1,77 @@
+package cn.exrick.xboot.your.controller;
+
+import cn.exrick.xboot.core.common.utils.PageUtil;
+import cn.exrick.xboot.core.common.utils.ResultUtil;
+import cn.exrick.xboot.core.common.vo.PageVo;
+import cn.exrick.xboot.core.common.vo.Result;
+import cn.exrick.xboot.your.entity.OrderTask2;
+import cn.exrick.xboot.your.service.IOrderTask2Service;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @author whj
+ */
+@Slf4j
+@RestController
+@Api(tags = "璁㈠崟浠诲姟鍘嗗彶琛ㄧ鐞嗘帴鍙�")
+@RequestMapping("/xboot/orderTask2")
+@Transactional
+public class OrderTask2Controller {
+
+ @Autowired
+ private IOrderTask2Service iOrderTask2Service;
+
+ @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
+ @ApiOperation(value = "閫氳繃id鑾峰彇")
+ public Result<OrderTask2> get(@PathVariable String id) {
+
+ OrderTask2 orderTask2 = iOrderTask2Service.getById(id);
+ return new ResultUtil<OrderTask2>().setData(orderTask2);
+ }
+
+ @RequestMapping(value = "/getAll", method = RequestMethod.GET)
+ @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁")
+ public Result<List<OrderTask2>> getAll() {
+
+ List<OrderTask2> list = iOrderTask2Service.list();
+ return new ResultUtil<List<OrderTask2>>().setData(list);
+ }
+
+ @RequestMapping(value = "/getByPage", method = RequestMethod.GET)
+ @ApiOperation(value = "鍒嗛〉鑾峰彇")
+ public Result<IPage<OrderTask2>> getByPage(PageVo page) {
+
+ IPage<OrderTask2> data = iOrderTask2Service.page(PageUtil.initMpPage(page));
+ return new ResultUtil<IPage<OrderTask2>>().setData(data);
+ }
+
+ @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST)
+ @ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�")
+ public Result<OrderTask2> saveOrUpdate(OrderTask2 orderTask2) {
+
+ if (iOrderTask2Service.saveOrUpdate(orderTask2)) {
+ return new ResultUtil<OrderTask2>().setData(orderTask2);
+ }
+ return new ResultUtil<OrderTask2>().setErrorMsg("鎿嶄綔澶辫触");
+ }
+
+ @RequestMapping(value = "/delByIds", method = RequestMethod.POST)
+ @ApiOperation(value = "鎵归噺閫氳繃id鍒犻櫎")
+ public Result<Object> delAllByIds(@RequestParam String[] ids) {
+
+ for (String id : ids) {
+ iOrderTask2Service.removeById(id);
+ }
+ return ResultUtil.success("鎵归噺閫氳繃id鍒犻櫎鏁版嵁鎴愬姛");
+ }
+}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
index 72b5a32..205ef46 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
@@ -75,7 +75,7 @@
String targetAttrs = jsonObject1.get("targetAttrs").toString();
JSONObject jsonObject2 = JSONUtil.parseObj(targetAttrs);
String deviceName = jsonObject2.get("deviceName").toString();
- System.out.println(deviceName);
+ //System.out.println(deviceName);
QueryWrapper<Car> wrapper = new QueryWrapper<Car>();
wrapper.eq("car_no",deviceName.substring(0,deviceName.length()-1));
@@ -150,7 +150,7 @@
}
} catch (Exception e) {
- System.out.println(e.toString());
+ //System.out.println(e.toString());
}
}
}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/pc/StatisticController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/pc/StatisticController.java
index f171853..fda9a15 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/pc/StatisticController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/pc/StatisticController.java
@@ -89,10 +89,15 @@
@RequestMapping(value = "/getTodayTask", method = RequestMethod.GET)
@ApiOperation(value = "鑾峰彇浠婃棩閰嶉�佷换鍔�")
- public Result<Object> getTodayTask() {
- QueryWrapper<OrderTask> wrapper2 = new QueryWrapper<OrderTask>();
- String format = DateUtil.format(new Date(), "yyyy-MM-dd");
- wrapper2.eq("a.send_date",format);
+ public Result<Object> getTodayTask(String sendTime) {
+ //QueryWrapper<OrderTask> wrapper2 = new QueryWrapper<OrderTask>();
+ String format = "";
+ if(StrUtil.isNotEmpty(sendTime)){
+ format = sendTime;
+ }else{
+ format = DateUtil.format(new Date(), "yyyy-MM-dd");
+ }
+ //wrapper2.eq("a.send_date",format);
//wrapper2.orderByAsc("a.seq");
List<OrderTask> list = iOrderTaskService.list3(format);
return new ResultUtil<Object>().setData(list);
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
index 676b95d..2fb7607 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
@@ -213,7 +213,7 @@
public Object likes(String customerId){
OrderTask order = getOrder(customerId);
if(order==null){
- ResultUtil.error("浠婃棩鏃犺鍗�");
+ return ResultUtil.error("浠婃棩鏃犺鍗�");
}
order.setLikes(1);
iOrderTaskService.saveOrUpdate(order);
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java
index 3e04ee8..3c299a1 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java
@@ -33,7 +33,7 @@
//3:涓嶇郴瀹夊叏甯�
//4:鎶界儫
//5:杞﹀帰寮傚父寮�鍚�
- //6:瓒呴��
+ //7:瓒呴��
@ApiModelProperty(value = "鍏蜂綋绫诲瀷濡備笅")
private int type;
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/EventLog.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/EventLog.java
index 0474675..6ff315e 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/EventLog.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/EventLog.java
@@ -40,6 +40,7 @@
//4:鎶界儫
//5:杞﹀帰寮傚父寮�鍚�
//6:閰嶉�佸畬鎴�
+ //7锛氳秴閫�
@ApiModelProperty(value = "浜嬩欢绫诲瀷")
private int type;
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderDetail.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderDetail.java
index 5f867b5..47b04f0 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderDetail.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderDetail.java
@@ -26,6 +26,7 @@
@ApiModel(value = "璁㈠崟璇︽儏琛�")
public class OrderDetail extends XbootBaseEntity {
+ //鍙瓨鏀�7澶╁唴鐨勬暟鎹�
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "璁㈠崟id")
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java
index 08568d8..7cc4f69 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java
@@ -29,6 +29,7 @@
@ApiModel(value = "璁㈠崟浠诲姟琛�")
public class OrderTask extends XbootBaseEntity {
+ //瀛樻斁7澶╁唴鐨勬暟鎹�
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "璁㈠崟鍙�")
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask2.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask2.java
new file mode 100644
index 0000000..857837b
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask2.java
@@ -0,0 +1,132 @@
+package cn.exrick.xboot.your.entity;
+
+import cn.exrick.xboot.core.base.XbootBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Exrick
+ */
+@Data
+@Entity
+@DynamicInsert
+@DynamicUpdate
+@Table(name = "t_order_task2")
+@TableName("t_order_task2")
+@ApiModel(value = "璁㈠崟浠诲姟鍘嗗彶琛�")
+public class OrderTask2 extends XbootBaseEntity {
+ //鍙瓨鏀鹃厤閫佸畬鐨勮鍗�
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "璁㈠崟鍙�")
+ private String code;
+
+ @ApiModelProperty(value = "瀹㈡埛id")
+ private String customerId;
+
+ @ApiModelProperty(value = "杞﹁締id")
+ private String carId;
+
+ @ApiModelProperty(value = "鐗囧尯id")
+ private String areaId;
+
+ @ApiModelProperty(value = "鍒嗘id")
+ private String areaSectionId;
+
+ @ApiModelProperty(value = "閰嶉�佷汉id")
+ private String userId;
+
+ @ApiModelProperty(value = "璁㈠崟椤哄簭")
+ private int seq;
+
+ @ApiModelProperty(value = "鍖呮暟")
+ private int num;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "璁㈠崟鏃�")
+ private Date orderDate;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "灏佸寘鏃�")
+ private Date endDate;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "閰嶉�佹棩")
+ private Date sendDate;
+
+ @ApiModelProperty(value = "閫佽揪鐓х墖")
+ private String img;
+
+ @ApiModelProperty(value = "鏄惁杩涜瑁呰溅锛�0锛氬惁 1:鏄級")
+ private int isPut;
+
+ @ApiModelProperty(value = "鏄惁椹跺嚭鏈堝彴锛�0锛氬惁 1:鏄級")
+ private int isOut;
+
+ @ApiModelProperty(value = "0閰嶉�佷腑锛�1宸查�佽揪锛�3寮傚父绛炬敹")
+ private int status;
+
+ @ApiModelProperty(value = "鏃犳硶閫佽揪鐨勫師鍥�")
+ private String remarks;
+
+ @ApiModelProperty(value = "鍟嗘埛璇勪环 1鏄� 2鏄� 3鏄� 4鏄� 5鏄�")
+ private int level;
+
+ @ApiModelProperty(value = "绛炬敹璇勪环")
+ private String evaluate;
+
+ @ApiModelProperty(value = "鏀惰揣浜篿d")
+ private String customerReceiveId;
+
+ @ApiModelProperty(value = "鏄惁鐐硅禐 0锛氬惁 1锛氭槸")
+ private int likes;
+
+ @ApiModelProperty(value = "鑰楁椂 姣")
+ private int time;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "鍟嗘埛鍚嶇О")
+ private String customerName;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "鍟嗘埛")
+ private Customer customer;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "杞︾墝鍙�")
+ private String carNo;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "鍖哄煙鍚嶇О")
+ private String areaName;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "鍒嗘鍚嶇О")
+ private String areaSectionName;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "璁㈠崟璇︽儏")
+ private List<OrderDetail> orderDetails;
+}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTask2Mapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTask2Mapper.java
new file mode 100644
index 0000000..52f1dbb
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTask2Mapper.java
@@ -0,0 +1,14 @@
+package cn.exrick.xboot.your.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.exrick.xboot.your.entity.OrderTask2;
+
+import java.util.List;
+
+/**
+ * 璁㈠崟浠诲姟鍘嗗彶琛ㄦ暟鎹鐞嗗眰
+ * @author whj
+ */
+public interface OrderTask2Mapper extends BaseMapper<OrderTask2> {
+
+}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/OrderDealScheduleImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/OrderDealScheduleImpl.java
new file mode 100644
index 0000000..eb31242
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/OrderDealScheduleImpl.java
@@ -0,0 +1,61 @@
+package cn.exrick.xboot.your.schedulings;
+import cn.exrick.xboot.your.entity.*;
+import cn.exrick.xboot.your.service.*;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+//鍒犻櫎鍘嗗彶鏁版嵁
+@Component
+public class OrderDealScheduleImpl {
+
+ @Autowired
+ private IOrderTaskOriginalService iOrderTaskOriginalService;
+
+ @Autowired
+ private IOrderDetailOriginalService iOrderDetailOriginalService;
+
+ @Autowired
+ private IOrderTaskService iOrderTaskService;
+
+ @Autowired
+ private IOrderDetailService iOrderDetailService;
+
+ @Scheduled(cron="0 0 21 * * ?")//姣忔櫄涓嬪崍9鐐规墽琛�
+ //@Scheduled(cron="0 * * * * ?")//娴嬭瘯
+ public void execute(){
+ String day = getDay(-8);
+ QueryWrapper<OrderTask> wrapper = new QueryWrapper<>();
+ wrapper.lt("send_Date",day);
+ iOrderTaskService.remove(wrapper);
+
+ QueryWrapper<OrderDetail> wrapper2 = new QueryWrapper<>();
+ wrapper2.lt("create_time",day+" 00:00:00");
+ iOrderDetailService.remove(wrapper2);
+
+ String day2 = getDay(-31);
+ QueryWrapper<OrderTaskOriginal> wrapper3 = new QueryWrapper<>();
+ wrapper3.lt("create_time",day2+" 00:00:00");
+ iOrderTaskOriginalService.remove(wrapper3);
+
+ QueryWrapper<OrderDetailOriginal> wrapper4 = new QueryWrapper<>();
+ wrapper4.lt("create_time",day2+" 00:00:00");
+ iOrderDetailOriginalService.remove(wrapper4);
+ }
+
+ private String getDay(int day){
+ Date dNow = new Date(); //褰撳墠鏃堕棿
+ Calendar calendar = Calendar.getInstance(); //寰楀埌鏃ュ巻
+ calendar.setTime(dNow);//鎶婂綋鍓嶆椂闂磋祴缁欐棩鍘�
+ calendar.add(Calendar.DAY_OF_MONTH, day); //璁剧疆涓哄墠n澶�
+ Date dBefore = calendar.getTime(); //寰楀埌鍓嶄竴澶╃殑鏃堕棿
+ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); //璁剧疆鏃堕棿鏍煎紡
+ String defaultStartDate = sdf.format(dBefore);
+ return defaultStartDate;
+ }
+}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java
index 1156308..c1d17a5 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/StatisticPcScheduleImpl.java
@@ -1,6 +1,5 @@
package cn.exrick.xboot.your.schedulings;
import cn.exrick.xboot.core.common.redis.RedisTemplateHelper;
-import cn.exrick.xboot.core.entity.User;
import cn.exrick.xboot.core.service.MessageService;
import cn.exrick.xboot.core.service.UserService;
import cn.exrick.xboot.your.entity.*;
@@ -11,9 +10,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
-import java.io.IOException;
import java.util.Date;
-import java.util.List;
//澶у睆棣栭〉缁熻
@Component
public class StatisticPcScheduleImpl {
@@ -47,9 +44,6 @@
@Autowired
private IRemoteCallService iRemoteCallService;
-
- @Autowired
- private IEquipmentService iEquipmentService;
@Autowired
private IEventLogService eventLogService;
@@ -87,14 +81,17 @@
redisTemplate.set(HEAD+"likeRate",(i*100)/count+"");//浜掑姩鐜�
}
+ String format = DateUtil.format(new Date(), "yyyy-MM-dd");
- redisTemplate.set(HEAD+"outCar",iEquipmentService.countByTypeAndStatus(0)+"");//鍑哄彂杞﹁締
+ QueryWrapper<DrivingRecord> wp = new QueryWrapper<>();
+ wp.between("create_time",format+" 00:00:00",format+" 23:59:59");
+ redisTemplate.set(HEAD+"outCar",iDrivingRecordService.count(wp)+"");//鍑哄彂杞﹁締
+
QueryWrapper<EventLog> wrapper2=new QueryWrapper<>();
wrapper2.eq("type",5);
redisTemplate.set(HEAD+"open",eventLogService.count(wrapper2)+"");//鍗遍櫓寮�鍚�
QueryWrapper<Customer> wrapper = new QueryWrapper<>();
- String format = DateUtil.format(new Date(), "yyyy-MM-dd");
wrapper.between("create_time",format+" 00:00:00",format+" 23:59:59");
redisTemplate.set(HEAD+"addCustomer",iCustomerService.count(wrapper)+"");//浠婃棩鏂板鍟嗘埛
}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTask2Service.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTask2Service.java
new file mode 100644
index 0000000..a480095
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTask2Service.java
@@ -0,0 +1,14 @@
+package cn.exrick.xboot.your.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.exrick.xboot.your.entity.OrderTask2;
+
+import java.util.List;
+
+/**
+ * 璁㈠崟浠诲姟鍘嗗彶琛ㄦ帴鍙�
+ * @author whj
+ */
+public interface IOrderTask2Service extends IService<OrderTask2> {
+
+}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTask2ServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTask2ServiceImpl.java
new file mode 100644
index 0000000..0b46d3f
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTask2ServiceImpl.java
@@ -0,0 +1,26 @@
+package cn.exrick.xboot.your.serviceimpl;
+
+import cn.exrick.xboot.your.mapper.OrderTask2Mapper;
+import cn.exrick.xboot.your.entity.OrderTask2;
+import cn.exrick.xboot.your.service.IOrderTask2Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 璁㈠崟浠诲姟鍘嗗彶琛ㄦ帴鍙e疄鐜�
+ * @author whj
+ */
+@Slf4j
+@Service
+@Transactional
+public class IOrderTask2ServiceImpl extends ServiceImpl<OrderTask2Mapper, OrderTask2> implements IOrderTask2Service {
+
+ @Autowired
+ private OrderTask2Mapper orderTask2Mapper;
+}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/util/MQTT.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/util/MQTT.java
index 3738147..09a0001 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/util/MQTT.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/util/MQTT.java
@@ -58,9 +58,9 @@
// 璁剧疆鍥炶皟鍑芥暟
client.setCallback(new MqttCallback() {
public void connectionLost(Throwable cause) {
- System.out.println("connectionLost");
+ //System.out.println("connectionLost");
String topicInfo = haiKangPost.getTopicInfo();
- System.out.println("閲嶈繛-璁㈤槄淇℃伅锛�"+topicInfo);
+ //System.out.println("閲嶈繛-璁㈤槄淇℃伅锛�"+topicInfo);
JSONObject jsonObject = JSONUtil.parseObj(topicInfo);
if(jsonObject.get("data")!=null){
String data = jsonObject.get("data").toString();
@@ -73,7 +73,7 @@
}
public void deliveryComplete(IMqttDeliveryToken token) {
- System.out.println("deliveryComplete---------"+ token.isComplete());
+ //System.out.println("deliveryComplete---------"+ token.isComplete());
}
@@ -96,9 +96,9 @@
JSONObject jsonObject1 = JSONUtil.parseObj(s1);
String data = jsonObject1.get("data").toString();
JSONObject jsonObject2 = JSONUtil.parseObj(data);
- System.out.println(jsonObject2.get("alarmId"));//鎶ヨid
- System.out.println(jsonObject2.get("vehicleIndexCode"));//杞﹁締code
- System.out.println(jsonObject2.get("eventType"));//鎶ヨ绫诲瀷
+ //System.out.println(jsonObject2.get("alarmId"));//鎶ヨid
+ //System.out.println(jsonObject2.get("vehicleIndexCode"));//杞﹁締code
+ //System.out.println(jsonObject2.get("eventType"));//鎶ヨ绫诲瀷
//鏈郴瀹夊叏甯︼細132376
//鎶界儫锛�132375
//鎺ユ墦鐢佃瘽锛�132374
@@ -122,7 +122,7 @@
alarm.setType(4);
alarm.setValue("鎶界儫");
}else if(eventType.equals("132405")){
- alarm.setType(6);
+ alarm.setType(7);
alarm.setValue("瓒呴��");
}else{
return;
diff --git a/xboot-modules/xboot-your/src/main/resources/mapper/OrderTask2Mapper.xml b/xboot-modules/xboot-your/src/main/resources/mapper/OrderTask2Mapper.xml
new file mode 100644
index 0000000..ba0a32b
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/resources/mapper/OrderTask2Mapper.xml
@@ -0,0 +1,5 @@
+<?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="cn.exrick.xboot.your.mapper.OrderTask2Mapper">
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.1