Commit a838eb45ac22daee2a62accc66595d7acaf1f01b
Merge remote-tracking branch 'origin/lingang' into lingang
Showing
3 changed files
with
17 additions
and
20 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/RemindDriverKeyLocalController.java
| @@ -16,6 +16,7 @@ import io.swagger.annotations.Api; | @@ -16,6 +16,7 @@ import io.swagger.annotations.Api; | ||
| 16 | import io.swagger.annotations.ApiOperation; | 16 | import io.swagger.annotations.ApiOperation; |
| 17 | import lombok.extern.slf4j.Slf4j; | 17 | import lombok.extern.slf4j.Slf4j; |
| 18 | import org.apache.commons.collections4.CollectionUtils; | 18 | import org.apache.commons.collections4.CollectionUtils; |
| 19 | +import org.apache.commons.lang3.StringUtils; | ||
| 19 | import org.apache.commons.lang3.time.DateUtils; | 20 | import org.apache.commons.lang3.time.DateUtils; |
| 20 | import org.springframework.beans.factory.annotation.Autowired; | 21 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | import org.springframework.validation.BindingResult; | 22 | import org.springframework.validation.BindingResult; |
| @@ -58,6 +59,7 @@ public class RemindDriverKeyLocalController extends BaseController { | @@ -58,6 +59,7 @@ public class RemindDriverKeyLocalController extends BaseController { | ||
| 58 | scheduling.setStartScheduleDate(request.getDate()); | 59 | scheduling.setStartScheduleDate(request.getDate()); |
| 59 | scheduling.setEndScheduleDate(DateUtils.addDays(request.getDate(), 1)); | 60 | scheduling.setEndScheduleDate(DateUtils.addDays(request.getDate(), 1)); |
| 60 | 61 | ||
| 62 | + | ||
| 61 | OrderEntity orderEntity = new OrderEntity(); | 63 | OrderEntity orderEntity = new OrderEntity(); |
| 62 | orderEntity.setOrder("ascending"); | 64 | orderEntity.setOrder("ascending"); |
| 63 | orderEntity.setProp("fcsjT"); | 65 | orderEntity.setProp("fcsjT"); |
| @@ -77,7 +79,7 @@ public class RemindDriverKeyLocalController extends BaseController { | @@ -77,7 +79,7 @@ public class RemindDriverKeyLocalController extends BaseController { | ||
| 77 | } | 79 | } |
| 78 | } | 80 | } |
| 79 | RemindDriverReportVo reportVo = new RemindDriverReportVo(); | 81 | RemindDriverReportVo reportVo = new RemindDriverReportVo(); |
| 80 | - reportVo.setCount(size); | 82 | + reportVo.setCount(linggangSchedulings.stream().filter(ls-> StringUtils.equalsAnyIgnoreCase(ls.getBcType(),"out")).count()); |
| 81 | 83 | ||
| 82 | if (CollectionUtils.isNotEmpty(linggangKeyWorkLocations)) { | 84 | if (CollectionUtils.isNotEmpty(linggangKeyWorkLocations)) { |
| 83 | List<RemindKeyInfoLocalVo> remindKeyInfoLocalVoList = new ArrayList<>(); | 85 | List<RemindKeyInfoLocalVo> remindKeyInfoLocalVoList = new ArrayList<>(); |
| @@ -95,6 +97,9 @@ public class RemindDriverKeyLocalController extends BaseController { | @@ -95,6 +97,9 @@ public class RemindDriverKeyLocalController extends BaseController { | ||
| 95 | Optional<LinggangKeyWorkLocation> finalOptional = optional; | 97 | Optional<LinggangKeyWorkLocation> finalOptional = optional; |
| 96 | Optional<Equipment> equipmentOptional = equipments.stream().filter(e -> Objects.equals(e.getDeviceId(), finalOptional.get().getDevice())).findFirst(); | 98 | Optional<Equipment> equipmentOptional = equipments.stream().filter(e -> Objects.equals(e.getDeviceId(), finalOptional.get().getDevice())).findFirst(); |
| 97 | equipmentOptional.ifPresent(equipment -> localVo.setEquipmentName(equipment.getName())); | 99 | equipmentOptional.ifPresent(equipment -> localVo.setEquipmentName(equipment.getName())); |
| 100 | + if(i == 0){ | ||
| 101 | + | ||
| 102 | + } | ||
| 98 | } | 103 | } |
| 99 | 104 | ||
| 100 | if (i + 1 < size) { | 105 | if (i + 1 < size) { |
| @@ -109,6 +114,9 @@ public class RemindDriverKeyLocalController extends BaseController { | @@ -109,6 +114,9 @@ public class RemindDriverKeyLocalController extends BaseController { | ||
| 109 | } | 114 | } |
| 110 | } | 115 | } |
| 111 | } | 116 | } |
| 117 | + if(i == 0){ | ||
| 118 | + reportVo.setCurrentKeyLocaltion(localVo.getEquipmentName()); | ||
| 119 | + } | ||
| 112 | remindKeyInfoLocalVoList.add(localVo); | 120 | remindKeyInfoLocalVoList.add(localVo); |
| 113 | } | 121 | } |
| 114 | reportVo.setRemindKeyInfoLocalVoList(remindKeyInfoLocalVoList); | 122 | reportVo.setRemindKeyInfoLocalVoList(remindKeyInfoLocalVoList); |
Bsth-admin/src/main/java/com/ruoyi/domain/dss/scheling/vo/RemindDriverReportVo.java
| @@ -25,7 +25,10 @@ public class RemindDriverReportVo implements Serializable { | @@ -25,7 +25,10 @@ public class RemindDriverReportVo implements Serializable { | ||
| 25 | private static final long serialVersionUID = 2852709680924849711L; | 25 | private static final long serialVersionUID = 2852709680924849711L; |
| 26 | 26 | ||
| 27 | @ApiModelProperty(value = "当天有多少个班次") | 27 | @ApiModelProperty(value = "当天有多少个班次") |
| 28 | - private Integer count; | 28 | + private Long count; |
| 29 | + @ApiModelProperty(value = "最近班车钥匙所在位置") | ||
| 30 | + private String currentKeyLocaltion; | ||
| 31 | + | ||
| 29 | @ApiModelProperty(value = "钥匙地址提醒信息") | 32 | @ApiModelProperty(value = "钥匙地址提醒信息") |
| 30 | private List<RemindKeyInfoLocalVo> remindKeyInfoLocalVoList; | 33 | private List<RemindKeyInfoLocalVo> remindKeyInfoLocalVoList; |
| 31 | } | 34 | } |
Bsth-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | -import javax.validation.constraints.NotBlank; | ||
| 4 | -import javax.validation.constraints.Size; | ||
| 5 | -import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 6 | -import org.apache.commons.lang3.builder.ToStringStyle; | 3 | +import com.alibaba.fastjson2.JSON; |
| 7 | import com.ruoyi.common.core.domain.BaseEntity; | 4 | import com.ruoyi.common.core.domain.BaseEntity; |
| 8 | import com.ruoyi.common.xss.Xss; | 5 | import com.ruoyi.common.xss.Xss; |
| 9 | 6 | ||
| 7 | +import javax.validation.constraints.NotBlank; | ||
| 8 | +import javax.validation.constraints.Size; | ||
| 10 | import java.util.Date; | 9 | import java.util.Date; |
| 11 | 10 | ||
| 12 | /** | 11 | /** |
| @@ -109,19 +108,6 @@ public class SysNotice extends BaseEntity | @@ -109,19 +108,6 @@ public class SysNotice extends BaseEntity | ||
| 109 | 108 | ||
| 110 | @Override | 109 | @Override |
| 111 | public String toString() { | 110 | public String toString() { |
| 112 | - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 113 | - .append("noticeId", getNoticeId()) | ||
| 114 | - .append("noticeTitle", getNoticeTitle()) | ||
| 115 | - .append("noticeType", getNoticeType()) | ||
| 116 | - .append("noticeContent", getNoticeContent()) | ||
| 117 | - .append("status", getStatus()) | ||
| 118 | - .append("createBy", getCreateBy()) | ||
| 119 | - .append("createTime", getCreateTime()) | ||
| 120 | - .append("updateBy", getUpdateBy()) | ||
| 121 | - .append("updateTime", getUpdateTime()) | ||
| 122 | - .append("remark", getRemark()) | ||
| 123 | - .append("jobCode", getJobCode()) | ||
| 124 | - .append("planTime", getPlanTime()) | ||
| 125 | - .toString(); | 111 | + return JSON.toJSONString(this); |
| 126 | } | 112 | } |
| 127 | } | 113 | } |