|
@@ -191,7 +191,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
NewsInfo newsInfo = new NewsInfo();
|
|
NewsInfo newsInfo = new NewsInfo();
|
|
newsInfo.setReCommonId(cargoOwnerCompInfo.getCommonId());
|
|
newsInfo.setReCommonId(cargoOwnerCompInfo.getCommonId());
|
|
newsInfo.setBussId(cargoOwnerCompInfo.getId());
|
|
newsInfo.setBussId(cargoOwnerCompInfo.getId());
|
|
- newsInfo.setNewsContent("您的"+ cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
|
|
|
+ newsInfo.setNewsContent("您的" + cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
newsInfo.setNewsTypeKey("1");
|
|
newsInfo.setNewsTypeKey("1");
|
|
newsInfo.setNewsType("系统消息");
|
|
newsInfo.setNewsType("系统消息");
|
|
newsInfoService.addNewsInfo(newsInfo);
|
|
newsInfoService.addNewsInfo(newsInfo);
|
|
@@ -203,7 +203,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
NewsInfo newsInfo = new NewsInfo();
|
|
NewsInfo newsInfo = new NewsInfo();
|
|
newsInfo.setReCommonId(cargoOwnerCompInfo.getCommonId());
|
|
newsInfo.setReCommonId(cargoOwnerCompInfo.getCommonId());
|
|
newsInfo.setBussId(cargoOwnerCompInfo.getId());
|
|
newsInfo.setBussId(cargoOwnerCompInfo.getId());
|
|
- newsInfo.setNewsContent("您的"+ cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
|
|
|
+ newsInfo.setNewsContent("您的" + cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
newsInfo.setNewsTypeKey("1");
|
|
newsInfo.setNewsTypeKey("1");
|
|
newsInfo.setNewsType("系统消息");
|
|
newsInfo.setNewsType("系统消息");
|
|
newsInfoService.addNewsInfo(newsInfo);
|
|
newsInfoService.addNewsInfo(newsInfo);
|
|
@@ -322,142 +322,142 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- //查询车辆
|
|
|
|
- List<HyDriverCarInfo> hyDriverCarInfos = driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>().eq("delete_flag", "0"));
|
|
|
|
- if (!CollectionUtils.isEmpty(hyDriverCarInfos)) {
|
|
|
|
- hyDriverCarInfos.forEach(hyDriverCarInfo -> {
|
|
|
|
- //查询司机
|
|
|
|
- HyDriverInfo hyDriverInfo = driverInfoService.selectById(hyDriverCarInfo.getDriverId());
|
|
|
|
- //行驶证
|
|
|
|
- int result3 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date1);
|
|
|
|
- if (result3 < 0) {
|
|
|
|
- hyDriverCarInfo.setDrivingOverdueFlag("1");
|
|
|
|
- hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
- hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
- driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
- }
|
|
|
|
- //行驶证到期前10天
|
|
|
|
- int result310 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date10);
|
|
|
|
- if (result310 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //行驶证到期前3天
|
|
|
|
- int result33 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date3);
|
|
|
|
- if (result33 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //挂车行驶证
|
|
|
|
- int result4 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date1);
|
|
|
|
- if (result4 < 0) {
|
|
|
|
- hyDriverCarInfo.setTrailerOverdueFlag("1");
|
|
|
|
- hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
- hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
- driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
- }
|
|
|
|
- //挂车行驶证到期前10天
|
|
|
|
- int result410 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date10);
|
|
|
|
- if (result410 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //挂车行驶证到期前3天
|
|
|
|
- int result43 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date3);
|
|
|
|
- if (result43 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
|
|
+ //查询车辆
|
|
|
|
+ List<HyDriverCarInfo> hyDriverCarInfos = driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>().eq("delete_flag", "0"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(hyDriverCarInfos)) {
|
|
|
|
+ hyDriverCarInfos.forEach(hyDriverCarInfo -> {
|
|
|
|
+ //查询司机
|
|
|
|
+ HyDriverInfo hyDriverInfo = driverInfoService.selectById(hyDriverCarInfo.getDriverId());
|
|
|
|
+ //行驶证
|
|
|
|
+ int result3 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date1);
|
|
|
|
+ if (result3 < 0) {
|
|
|
|
+ hyDriverCarInfo.setDrivingOverdueFlag("1");
|
|
|
|
+ hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
+ hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
+ driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
+ }
|
|
|
|
+ //行驶证到期前10天
|
|
|
|
+ int result310 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date10);
|
|
|
|
+ if (result310 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //行驶证到期前3天
|
|
|
|
+ int result33 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date3);
|
|
|
|
+ if (result33 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车行驶证
|
|
|
|
+ int result4 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date1);
|
|
|
|
+ if (result4 < 0) {
|
|
|
|
+ hyDriverCarInfo.setTrailerOverdueFlag("1");
|
|
|
|
+ hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
+ hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
+ driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车行驶证到期前10天
|
|
|
|
+ int result410 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date10);
|
|
|
|
+ if (result410 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车行驶证到期前3天
|
|
|
|
+ int result43 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date3);
|
|
|
|
+ if (result43 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
|
|
- //道路运输证
|
|
|
|
- int result6 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date1);
|
|
|
|
- if (result6 < 0) {
|
|
|
|
- hyDriverCarInfo.setOperationOverdueFlag("1");
|
|
|
|
- hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
- hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
- driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
- }
|
|
|
|
- //道路运输证到期前10天
|
|
|
|
- int result610 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date10);
|
|
|
|
- if (result610 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //道路运输证到期前3天
|
|
|
|
- int result63 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date3);
|
|
|
|
- if (result63 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //挂车运输证
|
|
|
|
- int result7 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date1);
|
|
|
|
- if (result7 < 0) {
|
|
|
|
- hyDriverCarInfo.setTrailerOperationOverdueFlag("1");
|
|
|
|
- hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
- hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
- driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
- }
|
|
|
|
- //挂车运输证到期前10天
|
|
|
|
- int result710 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date10);
|
|
|
|
- if (result710 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- //挂车运输证到期前3天
|
|
|
|
- int result73 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date3);
|
|
|
|
- if (result73 == 0) {
|
|
|
|
- //发送系统消息
|
|
|
|
- NewsInfo newsInfo = new NewsInfo();
|
|
|
|
- newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
- newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
- newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
- newsInfo.setNewsTypeKey("1");
|
|
|
|
- newsInfo.setNewsType("系统消息");
|
|
|
|
- newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ //道路运输证
|
|
|
|
+ int result6 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date1);
|
|
|
|
+ if (result6 < 0) {
|
|
|
|
+ hyDriverCarInfo.setOperationOverdueFlag("1");
|
|
|
|
+ hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
+ hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
+ driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
+ }
|
|
|
|
+ //道路运输证到期前10天
|
|
|
|
+ int result610 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date10);
|
|
|
|
+ if (result610 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //道路运输证到期前3天
|
|
|
|
+ int result63 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date3);
|
|
|
|
+ if (result63 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车运输证
|
|
|
|
+ int result7 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date1);
|
|
|
|
+ if (result7 < 0) {
|
|
|
|
+ hyDriverCarInfo.setTrailerOperationOverdueFlag("1");
|
|
|
|
+ hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
|
+ hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
|
+ driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车运输证到期前10天
|
|
|
|
+ int result710 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date10);
|
|
|
|
+ if (result710 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ //挂车运输证到期前3天
|
|
|
|
+ int result73 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date3);
|
|
|
|
+ if (result73 == 0) {
|
|
|
|
+ //发送系统消息
|
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
|
+ newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -757,7 +757,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
// publishTaskInfo1.setCargoDistance(Math.floor(s));
|
|
// publishTaskInfo1.setCargoDistance(Math.floor(s));
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
- if (!CollectionUtils.isEmpty(dataList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(dataList)) {
|
|
dataList.sort(Comparator.comparing(PublishTaskInfo::getCargoDistance));
|
|
dataList.sort(Comparator.comparing(PublishTaskInfo::getCargoDistance));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -957,13 +957,14 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取数组不存在的6位数取件码
|
|
* 获取数组不存在的6位数取件码
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- private String getPickupCode(List<PublishTaskInfo> list){
|
|
|
|
|
|
+ private String getPickupCode(List<PublishTaskInfo> list) {
|
|
String sixstr = RandomUtil.getSixstr();
|
|
String sixstr = RandomUtil.getSixstr();
|
|
boolean contains = list.contains(sixstr);
|
|
boolean contains = list.contains(sixstr);
|
|
- if (contains || sixstr.length()!=6){
|
|
|
|
- sixstr =getPickupCode(list);
|
|
|
|
|
|
+ if (contains || sixstr.length() != 6) {
|
|
|
|
+ sixstr = getPickupCode(list);
|
|
}
|
|
}
|
|
return sixstr;
|
|
return sixstr;
|
|
}
|
|
}
|
|
@@ -978,25 +979,25 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String addTask(PublishTaskInfo publishTaskInfo) {
|
|
public String addTask(PublishTaskInfo publishTaskInfo) {
|
|
- if ("个人货主".equals(publishTaskInfo.getCargoOwner())){
|
|
|
|
|
|
+ if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
|
|
//查询货主身份是否具有发布权限
|
|
//查询货主身份是否具有发布权限
|
|
HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
|
|
HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
|
|
- .eq("common_id",publishTaskInfo.getCommonId()).eq("delete_flag","0"));
|
|
|
|
- if (!"5".equals(hyCargoOwnerInfo.getAuthenticationStatusKey())){
|
|
|
|
|
|
+ .eq("common_id", publishTaskInfo.getCommonId()).eq("delete_flag", "0"));
|
|
|
|
+ if (!"5".equals(hyCargoOwnerInfo.getAuthenticationStatusKey())) {
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
}
|
|
}
|
|
- }else if (publishTaskInfo.getCompId() != null && publishTaskInfo.getCompId() != ""){
|
|
|
|
|
|
+ } else if (publishTaskInfo.getCompId() != null && publishTaskInfo.getCompId() != "") {
|
|
//货主认证公司是否具有发布权限
|
|
//货主认证公司是否具有发布权限
|
|
HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(publishTaskInfo.getCompId());
|
|
HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(publishTaskInfo.getCompId());
|
|
- if (!"5".equals(hyCompanyInfo.getStatusKey())){
|
|
|
|
|
|
+ if (!"5".equals(hyCompanyInfo.getStatusKey())) {
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
//货主所属公司是否具有发布权限
|
|
//货主所属公司是否具有发布权限
|
|
HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>()
|
|
HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>()
|
|
- .eq("common_id",publishTaskInfo.getCommonId()).eq("company",publishTaskInfo.getCargoOwner())
|
|
|
|
- .eq("delete_flag","0"));
|
|
|
|
- if (!"9".equals(hyCargoOwnerCompInfo.getStatusKey())){
|
|
|
|
|
|
+ .eq("common_id", publishTaskInfo.getCommonId()).eq("company", publishTaskInfo.getCargoOwner())
|
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
|
+ if (!"9".equals(hyCargoOwnerCompInfo.getStatusKey())) {
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1058,7 +1059,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
.eq("common_id", publishTaskInfo.getCommonId()));
|
|
.eq("common_id", publishTaskInfo.getCommonId()));
|
|
if (hyCargoOwnerInfo != null) {
|
|
if (hyCargoOwnerInfo != null) {
|
|
publishTaskInfo.setCargoOwnerName(hyCargoOwnerInfo.getName());
|
|
publishTaskInfo.setCargoOwnerName(hyCargoOwnerInfo.getName());
|
|
- publishTaskInfo.setCargoOwnerCall("男".equals(hyCargoOwnerInfo.getSex()) ? hyCargoOwnerInfo.getCall()+"先生" : hyCargoOwnerInfo.getCall()+"女士");
|
|
|
|
|
|
+ publishTaskInfo.setCargoOwnerCall("男".equals(hyCargoOwnerInfo.getSex()) ? hyCargoOwnerInfo.getCall() + "先生" : hyCargoOwnerInfo.getCall() + "女士");
|
|
publishTaskInfo.setCargoOwnerPhone(hyCargoOwnerInfo.getPhone());
|
|
publishTaskInfo.setCargoOwnerPhone(hyCargoOwnerInfo.getPhone());
|
|
}
|
|
}
|
|
//查询货主头像
|
|
//查询货主头像
|
|
@@ -1135,12 +1136,13 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取数组不存在的6位数取件码
|
|
* 获取数组不存在的6位数取件码
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- private String getOrderNo(List<OrderInfo> list){
|
|
|
|
|
|
+ private String getOrderNo(List<OrderInfo> list) {
|
|
String sixstr = RandomUtil.getSixstr();
|
|
String sixstr = RandomUtil.getSixstr();
|
|
boolean contains = list.contains(sixstr);
|
|
boolean contains = list.contains(sixstr);
|
|
- if (contains || sixstr.length()!=6){
|
|
|
|
|
|
+ if (contains || sixstr.length() != 6) {
|
|
sixstr = getOrderNo(list);
|
|
sixstr = getOrderNo(list);
|
|
}
|
|
}
|
|
return sixstr;
|
|
return sixstr;
|
|
@@ -1156,13 +1158,13 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
public String addOrder(PublishTaskInfo publishTaskInfo) {
|
|
public String addOrder(PublishTaskInfo publishTaskInfo) {
|
|
//查询任务是否过期
|
|
//查询任务是否过期
|
|
PublishTaskInfo publishTaskInfo1 = this.selectById(publishTaskInfo.getId());
|
|
PublishTaskInfo publishTaskInfo1 = this.selectById(publishTaskInfo.getId());
|
|
- if (!"5".equals(publishTaskInfo1.getStatusKey())){
|
|
|
|
|
|
+ if (!"5".equals(publishTaskInfo1.getStatusKey())) {
|
|
throw new YException(YExceptionEnum.TASK_OVERDUE);
|
|
throw new YException(YExceptionEnum.TASK_OVERDUE);
|
|
}
|
|
}
|
|
//判断是否已抢过单
|
|
//判断是否已抢过单
|
|
List<OrderInfo> orderInfoList1 = orderInfoService.selectList(new EntityWrapper<OrderInfo>().eq("common_id", publishTaskInfo.getDriverCommonId())
|
|
List<OrderInfo> orderInfoList1 = orderInfoService.selectList(new EntityWrapper<OrderInfo>().eq("common_id", publishTaskInfo.getDriverCommonId())
|
|
- .eq("cargo_common_id", publishTaskInfo.getCommonId()).eq("delete_flag", "0").orderBy("create_date",false));
|
|
|
|
- if (!CollectionUtils.isEmpty(orderInfoList1)){
|
|
|
|
|
|
+ .eq("cargo_common_id", publishTaskInfo.getCommonId()).eq("delete_flag", "0").orderBy("create_date", false));
|
|
|
|
+ if (!CollectionUtils.isEmpty(orderInfoList1)) {
|
|
boolean order = "1".equals(orderInfoList1.get(0).getCargoOwnerStatusKey());
|
|
boolean order = "1".equals(orderInfoList1.get(0).getCargoOwnerStatusKey());
|
|
if (order) {
|
|
if (order) {
|
|
throw new YException(YExceptionEnum.ORDER_SNATCHED);
|
|
throw new YException(YExceptionEnum.ORDER_SNATCHED);
|
|
@@ -1179,24 +1181,24 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
orderInfo.setTaskId(publishTaskInfo.getId());
|
|
orderInfo.setTaskId(publishTaskInfo.getId());
|
|
//判断司机是否认证
|
|
//判断司机是否认证
|
|
HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id", publishTaskInfo.getDriverCommonId())
|
|
HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id", publishTaskInfo.getDriverCommonId())
|
|
- .eq("delete_flag", "0"));
|
|
|
|
|
|
+ .eq("authentication_status_key", "5").eq("delete_flag", "0"));
|
|
if (hyDriverInfo == null) {
|
|
if (hyDriverInfo == null) {
|
|
throw new YException(YExceptionEnum.DRIVER_IDENTITY_AUTHENTICATION);
|
|
throw new YException(YExceptionEnum.DRIVER_IDENTITY_AUTHENTICATION);
|
|
}
|
|
}
|
|
//司机证件过期
|
|
//司机证件过期
|
|
- if (StringUtils.isEmpty(hyDriverInfo.getOverdueFlag())) {
|
|
|
|
|
|
+ if ("1".equals(hyDriverInfo.getOverdueFlag()) || "1".equals(hyDriverInfo.getDriverOverdueFlag()) || "1".equals(hyDriverInfo.getQualificationOverdueFlag())) {
|
|
throw new YException(YExceptionEnum.CERTIFICATE_EXPIRED);
|
|
throw new YException(YExceptionEnum.CERTIFICATE_EXPIRED);
|
|
}
|
|
}
|
|
//查询货主身份是否删除
|
|
//查询货主身份是否删除
|
|
- HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id",publishTaskInfo.getCommonId())
|
|
|
|
|
|
+ HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id", publishTaskInfo.getCommonId())
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
if (hyCargoOwnerInfo == null) {
|
|
if (hyCargoOwnerInfo == null) {
|
|
throw new YException(YExceptionEnum.TASK_CANCELLED);
|
|
throw new YException(YExceptionEnum.TASK_CANCELLED);
|
|
}
|
|
}
|
|
//查询货主身份授权是否到期
|
|
//查询货主身份授权是否到期
|
|
- HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>().eq("common_id",publishTaskInfo.getCommonId())
|
|
|
|
|
|
+ HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>().eq("common_id", publishTaskInfo.getCommonId())
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
- if (hyCargoOwnerCompInfo != null){
|
|
|
|
|
|
+ if (hyCargoOwnerCompInfo != null) {
|
|
boolean cancelled = "11".equals(hyCargoOwnerCompInfo.getStatusKey()) || "17".equals(hyCargoOwnerCompInfo.getStatusKey());
|
|
boolean cancelled = "11".equals(hyCargoOwnerCompInfo.getStatusKey()) || "17".equals(hyCargoOwnerCompInfo.getStatusKey());
|
|
if (cancelled) {
|
|
if (cancelled) {
|
|
throw new YException(YExceptionEnum.TASK_CANCELLED);
|
|
throw new YException(YExceptionEnum.TASK_CANCELLED);
|