Просмотр исходного кода

Merge branch 'master' of http://192.168.1.43:3000/git/sass-lab-distributed-java

zhuchangxue лет назад: 3
Родитель
Сommit
8f26bc9600

+ 6 - 4
zd-common/zd-common-core/src/main/java/com/zd/common/core/config/JacksonObjectMapper.java

@@ -17,6 +17,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatter;
+import java.util.TimeZone;
 
 
 import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
 import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
 
 
@@ -39,16 +40,17 @@ public class JacksonObjectMapper extends ObjectMapper {
 
 
         // 设置Date类型格式化
         // 设置Date类型格式化
         this.setDateFormat(new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT));
         this.setDateFormat(new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT));
+        this.setTimeZone(TimeZone.getDefault());
 
 
         SimpleModule simpleModule = new SimpleModule()
         SimpleModule simpleModule = new SimpleModule()
+                // 将大数字类型自动转换为String类型,防止前端精度丢失(也可以直接使用@JsonFormat(shape = JsonFormat.Shape.STRING)注解)
+                .addSerializer(BigInteger.class, ToStringSerializer.instance)
+                .addSerializer(Long.class, ToStringSerializer.instance)
                 // 反序列化(设置LocalDateTime等日期时间类型格式化)
                 // 反序列化(设置LocalDateTime等日期时间类型格式化)
                 .addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)))
                 .addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)))
                 .addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)))
                 .addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)))
                 .addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)))
                 .addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)))
-                // 将大数字类型自动转换为String类型,防止前端精度丢失(也可以直接使用@JsonFormat(shape = JsonFormat.Shape.STRING)注解)
-                .addSerializer(BigInteger.class, ToStringSerializer.instance)
-                .addSerializer(Long.class, ToStringSerializer.instance)
-                // 序列化
+//                // 序列化
                 .addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)))
                 .addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)))
                 .addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)))
                 .addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)))
                 .addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
                 .addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));

+ 2 - 2
zd-modules/zd-bottle-parent/zd-bottle-api/src/main/java/com/zd/bottle/domain/UsegasApply.java

@@ -46,11 +46,11 @@ public class UsegasApply extends BaseBean {
     @NotNull(message = "联系方式不能为空!")
     @NotNull(message = "联系方式不能为空!")
     private String phone;
     private String phone;
 
 
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
     @ApiModelProperty("期限开始")
     @ApiModelProperty("期限开始")
     private Date startTime;
     private Date startTime;
 
 
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
     @ApiModelProperty("期限结束")
     @ApiModelProperty("期限结束")
     @NotNull(message = "使用期限不能为空!")
     @NotNull(message = "使用期限不能为空!")
     private Date endTime;
     private Date endTime;

+ 0 - 3
zd-modules/zd-bottle-parent/zd-bottle/src/main/java/com/zd/bottle/ZdBottleApplication.java

@@ -9,8 +9,6 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 
-import java.util.TimeZone;
-
 /**
 /**
  * Application
  * Application
  *
  *
@@ -25,7 +23,6 @@ import java.util.TimeZone;
 @Slf4j
 @Slf4j
 public class ZdBottleApplication {
 public class ZdBottleApplication {
     public static void main(String[] args) {
     public static void main(String[] args) {
-        TimeZone.setDefault(TimeZone.getTimeZone("CTT"));
         SpringApplication.run(ZdBottleApplication.class, args);
         SpringApplication.run(ZdBottleApplication.class, args);
         log.info("(♥◠‿◠)ノ゙  气瓶模块启动成功   ლ(´ڡ`ლ)゙");
         log.info("(♥◠‿◠)ノ゙  气瓶模块启动成功   ლ(´ڡ`ლ)゙");
     }
     }

+ 6 - 12
zd-modules/zd-bottle-parent/zd-bottle/src/main/java/com/zd/bottle/controller/UseRecordController.java

@@ -20,7 +20,6 @@ import com.zd.common.response.ResultData;
 import com.zd.common.security.annotation.PreAuthorize;
 import com.zd.common.security.annotation.PreAuthorize;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
-import org.apache.hadoop.security.SecurityUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
@@ -28,7 +27,6 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
@@ -47,14 +45,15 @@ public class UseRecordController extends BaseController<UseRecord> {
     @Resource
     @Resource
     private UseRecordService useRecordService;
     private UseRecordService useRecordService;
 
 
+    private static final String ORDER_BY_DESC="descending";
+
     /**
     /**
      * 查询使用记录列表(学生端)
      * 查询使用记录列表(学生端)
      */
      */
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORD + PerFun.LIST)
     @GetMapping("/list")
     @GetMapping("/list")
     @ApiOperation(value = "查询使用记录列表")
     @ApiOperation(value = "查询使用记录列表")
     public TableDataInfo<UseRecordVo> list(UseRecord useRecord) {
     public TableDataInfo<UseRecordVo> list(UseRecord useRecord) {
-        startPage("use_time","descending");
+        startPage("use_time",ORDER_BY_DESC);
         useRecord.setUserId(SecurityUtils.getUserId());
         useRecord.setUserId(SecurityUtils.getUserId());
         List<UseRecord> records =useRecordService.getList(useRecord);
         List<UseRecord> records =useRecordService.getList(useRecord);
         TableDataInfo<UseRecord> dataTable = getDataTable(records);
         TableDataInfo<UseRecord> dataTable = getDataTable(records);
@@ -75,7 +74,7 @@ public class UseRecordController extends BaseController<UseRecord> {
     @GetMapping("/listByAdmin")
     @GetMapping("/listByAdmin")
     @ApiOperation(value = "查询使用记录列表")
     @ApiOperation(value = "查询使用记录列表")
     public TableDataInfo<UseRecordVo> listByAdmin(UseRecord useRecord) {
     public TableDataInfo<UseRecordVo> listByAdmin(UseRecord useRecord) {
-        startPage("use_time","descending");
+        startPage("use_time",ORDER_BY_DESC);
         List<UseRecord> records =useRecordService.getList(useRecord);
         List<UseRecord> records =useRecordService.getList(useRecord);
         TableDataInfo<UseRecord> dataTable = getDataTable(records);
         TableDataInfo<UseRecord> dataTable = getDataTable(records);
         TableDataInfo<UseRecordVo> info = new TableDataInfo<>();
         TableDataInfo<UseRecordVo> info = new TableDataInfo<>();
@@ -101,7 +100,6 @@ public class UseRecordController extends BaseController<UseRecord> {
     /**
     /**
      * 导出使用记录列表(学生端)
      * 导出使用记录列表(学生端)
      */
      */
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORD + PerFun.EXPORT)
     @ApiOperation(value = "导出使用记录列表")
     @ApiOperation(value = "导出使用记录列表")
     @Log(title = "使用记录", businessType = BusinessType.EXPORT)
     @Log(title = "使用记录", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @PostMapping("/export")
@@ -151,7 +149,6 @@ public class UseRecordController extends BaseController<UseRecord> {
     /**
     /**
      * 管理端端获取使用记录详细信息(学生端)
      * 管理端端获取使用记录详细信息(学生端)
      */
      */
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORD + PerFun.QUERY)
     @ApiOperation(value = "管理端端获取使用记录详细信息")
     @ApiOperation(value = "管理端端获取使用记录详细信息")
     @GetMapping(value = "/bottle/{id}")
     @GetMapping(value = "/bottle/{id}")
     public ResultData<WebUseRecordVo> getBottleInfo(@PathVariable("id") Long id) {
     public ResultData<WebUseRecordVo> getBottleInfo(@PathVariable("id") Long id) {
@@ -240,7 +237,6 @@ public class UseRecordController extends BaseController<UseRecord> {
      * 4:气瓶正在使用中
      * 4:气瓶正在使用中
      */
      */
     @ApiOperation(value = "领用气瓶-学生端")
     @ApiOperation(value = "领用气瓶-学生端")
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORDADMIN + PerFun.ADD)
     @Log(title = "领用气瓶-学生端", businessType = BusinessType.INSERT)
     @Log(title = "领用气瓶-学生端", businessType = BusinessType.INSERT)
     @PostMapping("/student")
     @PostMapping("/student")
     public ResultData<Integer> addStudent(@RequestBody UseRecordDto recordDto) {
     public ResultData<Integer> addStudent(@RequestBody UseRecordDto recordDto) {
@@ -251,7 +247,6 @@ public class UseRecordController extends BaseController<UseRecord> {
      * 归还登记-学生端
      * 归还登记-学生端
      */
      */
     @ApiOperation(value = "归还登记-学生端")
     @ApiOperation(value = "归还登记-学生端")
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORDADMIN + PerFun.EDIT)
     @Log(title = "归还登记-学生端", businessType = BusinessType.UPDATE)
     @Log(title = "归还登记-学生端", businessType = BusinessType.UPDATE)
     @PostMapping("/editStudent")
     @PostMapping("/editStudent")
     public ResultData<Boolean> editStudent(@RequestBody UseRecord useRecord) {
     public ResultData<Boolean> editStudent(@RequestBody UseRecord useRecord) {
@@ -261,11 +256,10 @@ public class UseRecordController extends BaseController<UseRecord> {
     /***
     /***
      * 查询使用记录(学生端)
      * 查询使用记录(学生端)
      */
      */
-    @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORD + PerFun.LISTDETAIL)
     @ApiOperation(value = "查询使用记录")
     @ApiOperation(value = "查询使用记录")
     @GetMapping(value = "/getUseDetails")
     @GetMapping(value = "/getUseDetails")
     public TableDataInfo<UseRecord> getUseDetails(UseRecord useRecord) {
     public TableDataInfo<UseRecord> getUseDetails(UseRecord useRecord) {
-        startPage("create_time","descending");
+        startPage("create_time",ORDER_BY_DESC);
         useRecord.setUserId(SecurityUtils.getUserId());
         useRecord.setUserId(SecurityUtils.getUserId());
         List<UseRecord> records =useRecordService.getList(useRecord);
         List<UseRecord> records =useRecordService.getList(useRecord);
         return getDataTable(records);
         return getDataTable(records);
@@ -279,7 +273,7 @@ public class UseRecordController extends BaseController<UseRecord> {
     @ApiOperation(value = "查询使用记录")
     @ApiOperation(value = "查询使用记录")
     @GetMapping(value = "/getUseDetailsByAdmin")
     @GetMapping(value = "/getUseDetailsByAdmin")
     public TableDataInfo<UseRecord> getUseDetailsByAdmin(UseRecord useRecord) {
     public TableDataInfo<UseRecord> getUseDetailsByAdmin(UseRecord useRecord) {
-        startPage("create_time","descending");
+        startPage("create_time",ORDER_BY_DESC);
         List<UseRecord> records =useRecordService.getList(useRecord);
         List<UseRecord> records =useRecordService.getList(useRecord);
         return getDataTable(records);
         return getDataTable(records);
     }
     }

+ 13 - 17
zd-modules/zd-bottle-parent/zd-bottle/src/main/java/com/zd/bottle/service/impl/AlarmRecordServiceImpl.java

@@ -74,7 +74,7 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
     @Resource
     @Resource
     private RfidTagService tagService;
     private RfidTagService tagService;
 
 
-    private static final String MSG_MATCH="==================>{},{}";
+    private static final String MSG_MATCH = "==================>{},{}";
 
 
     @Override
     @Override
     public void getRecordInfo(List<AlarmRecordVo> recordVos) {
     public void getRecordInfo(List<AlarmRecordVo> recordVos) {
@@ -97,13 +97,9 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
     public List<AlarmRecord> getList(AlarmRecord alarmRecord) {
     public List<AlarmRecord> getList(AlarmRecord alarmRecord) {
         LambdaQueryWrapper<AlarmRecord> queryWrapper = Wrappers.lambdaQuery(AlarmRecord.class);
         LambdaQueryWrapper<AlarmRecord> queryWrapper = Wrappers.lambdaQuery(AlarmRecord.class);
         String startTime = alarmRecord.getStartTime();
         String startTime = alarmRecord.getStartTime();
-        if (StringUtils.hasLength(startTime)){
-            queryWrapper.apply("DATE_FORMAT(alarm_time,'%Y-%m-%d') >="+alarmRecord.getStartTime());
-        }
         String endTime = alarmRecord.getEndTime();
         String endTime = alarmRecord.getEndTime();
-        if (StringUtils.hasLength(endTime)){
-            queryWrapper.apply("DATE_FORMAT(alarm_time,'%Y-%m-%d') <="+alarmRecord.getEndTime());
-        }
+        queryWrapper.apply(StringUtils.hasLength(startTime), "DATE_FORMAT(alarm_time,'%Y-%m-%d') >=date_format('" + startTime + "','%Y-%m-%d')")
+                .apply(StringUtils.hasLength(startTime), "DATE_FORMAT(alarm_time,'%Y-%m-%d') <=date_format('" + endTime + "','%Y-%m-%d')");
         return list(queryWrapper);
         return list(queryWrapper);
     }
     }
 
 
@@ -113,14 +109,14 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
         String electronicTag = tag.getEpc();
         String electronicTag = tag.getEpc();
         RemoteLabHardware hardware = tag.getRemoteLabHardware();
         RemoteLabHardware hardware = tag.getRemoteLabHardware();
         LambdaQueryWrapper<RfidTag> queryWrapper = Wrappers.lambdaQuery(RfidTag.class);
         LambdaQueryWrapper<RfidTag> queryWrapper = Wrappers.lambdaQuery(RfidTag.class);
-        queryWrapper.eq(RfidTag::getAuthCode,electronicTag);
+        queryWrapper.eq(RfidTag::getAuthCode, electronicTag);
         RfidTag rfidTag = tagService.getOne(queryWrapper);
         RfidTag rfidTag = tagService.getOne(queryWrapper);
-        if (rfidTag==null){
-            log.info(MSG_MATCH,electronicTag,"标签未录入");
+        if (rfidTag == null) {
+            log.info(MSG_MATCH, electronicTag, "标签未录入");
             return false;
             return false;
         }
         }
         LambdaQueryWrapper<BottleStorage> wrapper = Wrappers.lambdaQuery(BottleStorage.class);
         LambdaQueryWrapper<BottleStorage> wrapper = Wrappers.lambdaQuery(BottleStorage.class);
-        wrapper.eq(BottleStorage::getElectronicTag,rfidTag.getId());
+        wrapper.eq(BottleStorage::getElectronicTag, rfidTag.getId());
         BottleStorage bottleStorage = storageService.getOne(wrapper);
         BottleStorage bottleStorage = storageService.getOne(wrapper);
         if (bottleStorage != null) {
         if (bottleStorage != null) {
             Long id = bottleStorage.getId();
             Long id = bottleStorage.getId();
@@ -132,7 +128,7 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
             // 发送报警消息
             // 发送报警消息
             sendAlarm(bottleStorage);
             sendAlarm(bottleStorage);
             redisService.setCacheObject(key, electronicTag, 300L, TimeUnit.SECONDS);
             redisService.setCacheObject(key, electronicTag, 300L, TimeUnit.SECONDS);
-            AlarmRecord alarmRecord=new AlarmRecord();
+            AlarmRecord alarmRecord = new AlarmRecord();
             alarmRecord.setElectronicTag(electronicTag)
             alarmRecord.setElectronicTag(electronicTag)
                     .setAlarmTime(Calendar.getInstance().getTime())
                     .setAlarmTime(Calendar.getInstance().getTime())
                     .setMasterId(id)
                     .setMasterId(id)
@@ -140,9 +136,9 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
                     .setProductType(1)
                     .setProductType(1)
                     .setDeptId(bottleStorage.getDeptId());
                     .setDeptId(bottleStorage.getDeptId());
             return save(alarmRecord);
             return save(alarmRecord);
-        }else {
-            if (hardware!=null){
-                log.info(MSG_MATCH,electronicTag,"标签未绑定气瓶");
+        } else {
+            if (hardware != null) {
+                log.info(MSG_MATCH, electronicTag, "标签未绑定气瓶");
             }
             }
             return false;
             return false;
         }
         }
@@ -204,8 +200,8 @@ public class AlarmRecordServiceImpl extends ServiceImpl<AlarmRecordMapper, Alarm
         alarmEntrty.setTo(phones.toArray(new String[]{}));
         alarmEntrty.setTo(phones.toArray(new String[]{}));
         alarmEntrty.setText(subjectName + airName + "气瓶被违规带离,请尽快确认");
         alarmEntrty.setText(subjectName + airName + "气瓶被违规带离,请尽快确认");
         AjaxResult result = remoteAlarmService.send(alarmEntrty);
         AjaxResult result = remoteAlarmService.send(alarmEntrty);
-        if (!result.get(AjaxResult.CODE_TAG).equals(HttpStatus.SUCCESS)){
-            log.error("电话报警异常:发送实验室【{}】,实验室ID【{}】,接收用户手机号【{}】",subjectName,storage.getSubjectId(), phones);
+        if (!result.get(AjaxResult.CODE_TAG).equals(HttpStatus.SUCCESS)) {
+            log.error("电话报警异常:发送实验室【{}】,实验室ID【{}】,接收用户手机号【{}】", subjectName, storage.getSubjectId(), phones);
         }
         }
     }
     }
 
 

+ 5 - 9
zd-modules/zd-bottle-parent/zd-bottle/src/main/java/com/zd/bottle/service/impl/BottleStorageErrorServiceImpl.java

@@ -42,13 +42,9 @@ public class BottleStorageErrorServiceImpl extends ServiceImpl<BottleStorageErro
     public List<BottleStorageError> list(BottleStorageError bottleStorageError) {
     public List<BottleStorageError> list(BottleStorageError bottleStorageError) {
         LambdaQueryWrapper<BottleStorageError> queryWrapper = Wrappers.lambdaQuery(BottleStorageError.class);
         LambdaQueryWrapper<BottleStorageError> queryWrapper = Wrappers.lambdaQuery(BottleStorageError.class);
         String startTime = bottleStorageError.getStartTime();
         String startTime = bottleStorageError.getStartTime();
-        if (StringUtils.hasLength(startTime)) {
-            queryWrapper.apply(StringUtils.hasLength(startTime), "DATE_FORMAT(create_time,'%Y-%m-%d') >=date_format('" + startTime + "','%Y-%m-%d')");
-        }
         String endTime = bottleStorageError.getEndTime();
         String endTime = bottleStorageError.getEndTime();
-        if (StringUtils.hasLength(endTime)) {
-            queryWrapper.apply(StringUtils.hasLength(endTime), "DATE_FORMAT(create_time,'%Y-%m-%d') <=date_format('" + endTime + "','%Y-%m-%d')");
-        }
+        queryWrapper.apply(StringUtils.hasLength(startTime), "DATE_FORMAT(create_time,'%Y-%m-%d') >=date_format('" + startTime + "','%Y-%m-%d')")
+                .apply(StringUtils.hasLength(endTime), "DATE_FORMAT(create_time,'%Y-%m-%d') <=date_format('" + endTime + "','%Y-%m-%d')");
         String searchValue = bottleStorageError.getSearchValue();
         String searchValue = bottleStorageError.getSearchValue();
         if (StringUtils.hasLength(searchValue)) {
         if (StringUtils.hasLength(searchValue)) {
             queryWrapper.like(BottleStorageError::getCreateBy, searchValue)
             queryWrapper.like(BottleStorageError::getCreateBy, searchValue)
@@ -57,10 +53,10 @@ public class BottleStorageErrorServiceImpl extends ServiceImpl<BottleStorageErro
         }
         }
 
 
         List<Long> ids = bottleStorageError.getIds();
         List<Long> ids = bottleStorageError.getIds();
-        if (ids!=null && !ids.isEmpty()){
-            queryWrapper.in(BottleStorageError::getId,ids);
+        if (ids != null && !ids.isEmpty()) {
+            queryWrapper.in(BottleStorageError::getId, ids);
         }
         }
-        queryWrapper.orderByDesc(true,BottleStorageError::getCreateTime);
+        queryWrapper.orderByDesc(true, BottleStorageError::getCreateTime);
         return list(queryWrapper);
         return list(queryWrapper);
     }
     }
 
 

+ 3 - 3
zd-modules/zd-bottle-parent/zd-bottle/src/main/java/com/zd/bottle/service/impl/UseRecordServiceImpl.java

@@ -85,7 +85,7 @@ public class UseRecordServiceImpl extends ServiceImpl<UseRecordMapper, UseRecord
         String endTime = useRecord.getEndTime();
         String endTime = useRecord.getEndTime();
 
 
         queryWrapper.apply(StringUtils.hasLength(startTime), "DATE_FORMAT(use_time,'%Y-%m-%d') >=date_format('" + startTime + "','%Y-%m-%d')")
         queryWrapper.apply(StringUtils.hasLength(startTime), "DATE_FORMAT(use_time,'%Y-%m-%d') >=date_format('" + startTime + "','%Y-%m-%d')")
-                .apply(StringUtils.hasLength(endTime), "DATE_FORMAT(use_time,'%Y-%m-%d') >=date_format('" + endTime + "','%Y-%m-%d')");
+                .apply(StringUtils.hasLength(endTime), "DATE_FORMAT(use_time,'%Y-%m-%d') <=date_format('" + endTime + "','%Y-%m-%d')");
         String searchValue = useRecord.getSearchValue();
         String searchValue = useRecord.getSearchValue();
         if (StringUtils.hasLength(searchValue)) {
         if (StringUtils.hasLength(searchValue)) {
             queryWrapper.like(UseRecord::getContacts, searchValue)
             queryWrapper.like(UseRecord::getContacts, searchValue)
@@ -154,8 +154,8 @@ public class UseRecordServiceImpl extends ServiceImpl<UseRecordMapper, UseRecord
 
 
     /***
     /***
      * 查询气瓶是否归还
      * 查询气瓶是否归还
-     * @param storageId
-     * @return
+     * @param storageId storageId
+     * @return List
      */
      */
     @Override
     @Override
     public List<UseRecord> getListNotReturn(Long storageId) {
     public List<UseRecord> getListNotReturn(Long storageId) {