Commit 5ee98a6d2a0ac373a685bac198df13d23dd26a57
1 parent
a1cd3fdd
调整
Showing
4 changed files
with
58 additions
and
2 deletions
trash-garbage/src/main/java/com/trash/garbage/mapper/GarOrderMapper.java
| @@ -7,9 +7,11 @@ import com.trash.garbage.pojo.vo.GarOrderDisposalVo; | @@ -7,9 +7,11 @@ import com.trash.garbage.pojo.vo.GarOrderDisposalVo; | ||
| 7 | import com.trash.garbage.pojo.vo.GarOrderDriverVo; | 7 | import com.trash.garbage.pojo.vo.GarOrderDriverVo; |
| 8 | import com.trash.garbage.pojo.vo.OrderDetailTransportVo; | 8 | import com.trash.garbage.pojo.vo.OrderDetailTransportVo; |
| 9 | import com.trash.garbage.pojo.vo.ScanDriverDetailVo; | 9 | import com.trash.garbage.pojo.vo.ScanDriverDetailVo; |
| 10 | +import org.apache.ibatis.annotations.MapKey; | ||
| 10 | import org.apache.ibatis.annotations.Param; | 11 | import org.apache.ibatis.annotations.Param; |
| 11 | 12 | ||
| 12 | import java.util.List; | 13 | import java.util.List; |
| 14 | +import java.util.Map; | ||
| 13 | 15 | ||
| 14 | /** | 16 | /** |
| 15 | * @author 20412 | 17 | * @author 20412 |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrderMatchAsk.java
| @@ -218,6 +218,49 @@ public class GarOrderMatchAsk implements Serializable { | @@ -218,6 +218,49 @@ public class GarOrderMatchAsk implements Serializable { | ||
| 218 | */ | 218 | */ |
| 219 | private String unloadingLonLat; | 219 | private String unloadingLonLat; |
| 220 | 220 | ||
| 221 | + /** | ||
| 222 | + * 总趟次数 | ||
| 223 | + */ | ||
| 224 | + @TableField(exist = false) | ||
| 225 | + private Integer totalTrips; | ||
| 226 | + | ||
| 227 | + /** | ||
| 228 | + * 已完成趟次数 | ||
| 229 | + */ | ||
| 230 | + @TableField(exist = false) | ||
| 231 | + private Integer finishedTrips; | ||
| 232 | + | ||
| 233 | + /** | ||
| 234 | + * 待完成趟次数 | ||
| 235 | + */ | ||
| 236 | + @TableField(exist = false) | ||
| 237 | + private Integer pendingTrips; | ||
| 238 | + | ||
| 239 | + // 添加 getter 和 setter 方法 | ||
| 240 | + public Integer getTotalTrips() { | ||
| 241 | + return totalTrips; | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + public void setTotalTrips(Integer totalTrips) { | ||
| 245 | + this.totalTrips = totalTrips; | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + public Integer getFinishedTrips() { | ||
| 249 | + return finishedTrips; | ||
| 250 | + } | ||
| 251 | + | ||
| 252 | + public void setFinishedTrips(Integer finishedTrips) { | ||
| 253 | + this.finishedTrips = finishedTrips; | ||
| 254 | + } | ||
| 255 | + | ||
| 256 | + public Integer getPendingTrips() { | ||
| 257 | + return pendingTrips; | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + public void setPendingTrips(Integer pendingTrips) { | ||
| 261 | + this.pendingTrips = pendingTrips; | ||
| 262 | + } | ||
| 263 | + | ||
| 221 | 264 | ||
| 222 | 265 | ||
| 223 | public Date getUpdateTime() { | 266 | public Date getUpdateTime() { |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| @@ -206,6 +206,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -206,6 +206,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 206 | LambdaQueryWrapper<GarOrderImage> qwi = new LambdaQueryWrapper<>(); | 206 | LambdaQueryWrapper<GarOrderImage> qwi = new LambdaQueryWrapper<>(); |
| 207 | qwi.eq(GarOrderImage::getGarOrderId, orderId) | 207 | qwi.eq(GarOrderImage::getGarOrderId, orderId) |
| 208 | .eq(GarOrderImage::getGarCreateBy, user.getGarUserId()); | 208 | .eq(GarOrderImage::getGarCreateBy, user.getGarUserId()); |
| 209 | + | ||
| 209 | OrderDetailVo vo = new OrderDetailVo(); | 210 | OrderDetailVo vo = new OrderDetailVo(); |
| 210 | GarOrderDriverVo orderVo = baseMapper.queryOrderByTelWithType(user.getGarUserTel(), orderId, GlobalStatus.GarOrderStatus.CANCEL_FLAG_NO.getValue()); | 211 | GarOrderDriverVo orderVo = baseMapper.queryOrderByTelWithType(user.getGarUserTel(), orderId, GlobalStatus.GarOrderStatus.CANCEL_FLAG_NO.getValue()); |
| 211 | vo.setHandleFlag(true); | 212 | vo.setHandleFlag(true); |
| @@ -217,6 +218,8 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -217,6 +218,8 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 217 | .eq(GarOrderImage::getGarOrderId, orderId) | 218 | .eq(GarOrderImage::getGarOrderId, orderId) |
| 218 | .eq(GarOrderImage::getGarOrderImageType, GlobalStatus.GarOrderStatus.IMAGE_TYPE_CURRENT.getValue())); | 219 | .eq(GarOrderImage::getGarOrderImageType, GlobalStatus.GarOrderStatus.IMAGE_TYPE_CURRENT.getValue())); |
| 219 | imageAll.addAll(garOrderImageService.list(qwi)); | 220 | imageAll.addAll(garOrderImageService.list(qwi)); |
| 221 | + | ||
| 222 | + | ||
| 220 | imageAll.addAll(currentImageList); | 223 | imageAll.addAll(currentImageList); |
| 221 | for (GarOrderImage image : imageAll) { | 224 | for (GarOrderImage image : imageAll) { |
| 222 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_CURRENT.getValue().equals(image.getGarOrderImageType())) { | 225 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_CURRENT.getValue().equals(image.getGarOrderImageType())) { |
| @@ -226,7 +229,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -226,7 +229,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 226 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_ON.getValue().equals(image.getGarOrderImageType())) { | 229 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_ON.getValue().equals(image.getGarOrderImageType())) { |
| 227 | SimpleDateFormat date = new SimpleDateFormat("HHmmss"); | 230 | SimpleDateFormat date = new SimpleDateFormat("HHmmss"); |
| 228 | String imageDate = date.format(image.getGarCreateTime()); | 231 | String imageDate = date.format(image.getGarCreateTime()); |
| 229 | - vo.getPutOnImages().add(image.getGarOrderImageUrl()+imageDate); | 232 | + String garCreateBy = image.getGarCreateBy(); |
| 233 | + GarUser byId = garUserService.getById(garCreateBy); | ||
| 234 | + String garUserName = byId.getGarUserName(); | ||
| 235 | + vo.getPutOnImages().add(image.getGarOrderImageUrl() + imageDate + "name" + garUserName); | ||
| 230 | } | 236 | } |
| 231 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_DOWN.getValue().equals(image.getGarOrderImageType())) { | 237 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_DOWN.getValue().equals(image.getGarOrderImageType())) { |
| 232 | vo.getPutDownImages().add(image.getGarOrderImageUrl()); | 238 | vo.getPutDownImages().add(image.getGarOrderImageUrl()); |
| @@ -292,7 +298,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -292,7 +298,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 292 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_ON.getValue().equals(image.getGarOrderImageType())) { | 298 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_ON.getValue().equals(image.getGarOrderImageType())) { |
| 293 | SimpleDateFormat date = new SimpleDateFormat("HHmmss"); | 299 | SimpleDateFormat date = new SimpleDateFormat("HHmmss"); |
| 294 | String imageDate = date.format(image.getGarCreateTime()); | 300 | String imageDate = date.format(image.getGarCreateTime()); |
| 295 | - vo.getPutOnImages().add(image.getGarOrderImageUrl() + imageDate); | 301 | + String garCreateBy = image.getGarCreateBy(); |
| 302 | + GarUser byId = garUserService.getById(garCreateBy); | ||
| 303 | + String garUserName = byId.getGarUserName(); | ||
| 304 | + vo.getPutOnImages().add(image.getGarOrderImageUrl() + imageDate + "name" + garUserName); | ||
| 296 | } | 305 | } |
| 297 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_DOWN.getValue().equals(image.getGarOrderImageType())) { | 306 | if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_DOWN.getValue().equals(image.getGarOrderImageType())) { |
| 298 | vo.getPutDownImages().add(image.getGarOrderImageUrl()); | 307 | vo.getPutDownImages().add(image.getGarOrderImageUrl()); |
trash-garbage/src/main/resources/mapper/GarOrderMatchAskMapper.xml
| @@ -91,6 +91,8 @@ | @@ -91,6 +91,8 @@ | ||
| 91 | <if test="garOrderPhone != null and garOrderPhone != ''"> and gar_order_phone = #{garOrderPhone}</if> | 91 | <if test="garOrderPhone != null and garOrderPhone != ''"> and gar_order_phone = #{garOrderPhone}</if> |
| 92 | <if test="garOrderName != null and garOrderName != ''"> and gar_order_name like concat('%', #{garOrderName}, '%')</if> | 92 | <if test="garOrderName != null and garOrderName != ''"> and gar_order_name like concat('%', #{garOrderName}, '%')</if> |
| 93 | </where> | 93 | </where> |
| 94 | + <!-- 添加按创建时间倒序排序 --> | ||
| 95 | + order by gar_create_time desc | ||
| 94 | </select> | 96 | </select> |
| 95 | 97 | ||
| 96 | <select id="selectGarOrderMatchAskById" parameterType="String" resultMap="GarOrderMatchAskResult"> | 98 | <select id="selectGarOrderMatchAskById" parameterType="String" resultMap="GarOrderMatchAskResult"> |