|
@@ -60,6 +60,8 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
private IDriverInfoService driverInfoService;
|
|
|
@Autowired
|
|
|
private IDriverCarInfoService driverCarInfoService;
|
|
|
+ @Autowired
|
|
|
+ private IHyCargoOwnerPayeeInfoService hyCargoOwnerPayeeInfoService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -87,9 +89,14 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
String sdate3 = f.format(calendar1.getTime());
|
|
|
//获取当前日期的前十天
|
|
|
Calendar calendar2 = Calendar.getInstance();
|
|
|
- calendar1.add(Calendar.DATE, -10);
|
|
|
+ calendar2.add(Calendar.DATE, -10);
|
|
|
Date date10 = calendar2.getTime();
|
|
|
String sdate10 = f.format(calendar2.getTime());
|
|
|
+ //获取当前日期的前三十天
|
|
|
+ Calendar calendar3 = Calendar.getInstance();
|
|
|
+ calendar3.add(Calendar.DATE, -30);
|
|
|
+ Date date30 = calendar3.getTime();
|
|
|
+ String sdate30 = f.format(calendar3.getTime());
|
|
|
|
|
|
//查询任务
|
|
|
List<PublishTaskInfo> publishTaskInfos = this.selectList(new EntityWrapper<PublishTaskInfo>().eq("delete_flag", "0"));
|
|
@@ -124,6 +131,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
cargoOwnerInfo.setBackStageStatus(StatusEnum.IDENTITY_OVERDUE.getName());
|
|
|
cargoOwnerInfo.setBackStageStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
}
|
|
|
+ //身份证到期前30天
|
|
|
+ int result30 = cargoOwnerInfo.getCardValidityDate().compareTo(sdate30);
|
|
|
+ if (result30 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(cargoOwnerInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(cargoOwnerInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的身份证即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
+ newsInfo.setNewsContent("您的身份证即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//身份证到期前10天
|
|
|
int result10 = cargoOwnerInfo.getCardValidityDate().compareTo(sdate10);
|
|
|
if (result10 == 0) {
|
|
@@ -186,6 +206,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
cargoOwnerCompInfo.setBackStageStatusKey(StatusEnum.CAUTHORIZATION_OVERDUE.getFlag());
|
|
|
cargoOwnerCompInfoService.updateById(cargoOwnerCompInfo);
|
|
|
}
|
|
|
+ //授权书到期前30天
|
|
|
+ int result30 = cargoOwnerCompInfo.getAuthorizationDeadline().compareTo(sdate30);
|
|
|
+ if (result30 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(cargoOwnerCompInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(cargoOwnerCompInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的" + cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
+ newsInfo.setNewsContent("您的" + cargoOwnerCompInfo.getCompany() + "的授权书即将到期,请尽快到个人中心中更新,逾期将影响运费垫付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//授权书到期前10天
|
|
|
int result10 = cargoOwnerCompInfo.getAuthorizationDeadline().compareTo(sdate10);
|
|
|
if (result10 == 0) {
|
|
@@ -233,6 +266,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
driverInfo.setEscalationStatusKey(StatusEnum.EXPIRED.getFlag());
|
|
|
driverInfoService.updateById(driverInfo);
|
|
|
}
|
|
|
+ //身份证到期前30天
|
|
|
+ int result130 = driverInfo.getCardValidityDate().compareTo(sdate30);
|
|
|
+ if (result130 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(driverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(driverInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的身份证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的身份证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//身份证到期前10天
|
|
|
int result110 = driverInfo.getCardValidityDate().compareTo(sdate10);
|
|
|
if (result110 == 0) {
|
|
@@ -271,7 +317,21 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
driverInfo.setEscalationStatus(StatusEnum.EXPIRED.getName());
|
|
|
driverInfo.setEscalationStatusKey(StatusEnum.EXPIRED.getFlag());
|
|
|
driverInfoService.updateById(driverInfo);
|
|
|
- }//驾驶证到期前10天
|
|
|
+ }
|
|
|
+ //驾驶证到期前30天
|
|
|
+ int result230 = driverInfo.getDriverLicenseValidityDate().compareTo(sdate30);
|
|
|
+ if (result230 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(driverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(driverInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的驾驶证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的驾驶证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
+ //驾驶证到期前10天
|
|
|
int result210 = driverInfo.getDriverLicenseValidityDate().compareTo(sdate10);
|
|
|
if (result210 == 0) {
|
|
|
//发送系统消息
|
|
@@ -309,6 +369,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
driverInfo.setEscalationStatusKey(StatusEnum.EXPIRED.getFlag());
|
|
|
driverInfoService.updateById(driverInfo);
|
|
|
}
|
|
|
+ //从业资格证到期前30天
|
|
|
+ int result530 = driverInfo.getQualificationCertificateValidityDate().compareTo(date30);
|
|
|
+ if (result530 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(driverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(driverInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的从业资格证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的从业资格证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//从业资格证到期前10天
|
|
|
int result510 = driverInfo.getQualificationCertificateValidityDate().compareTo(date10);
|
|
|
if (result510 == 0) {
|
|
@@ -352,6 +425,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
}
|
|
|
+ //行驶证到期前30天
|
|
|
+ int result330 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date30);
|
|
|
+ if (result330 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//行驶证到期前10天
|
|
|
int result310 = hyDriverCarInfo.getDrivingLicenseValidityDate().compareTo(date10);
|
|
|
if (result310 == 0) {
|
|
@@ -387,6 +473,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
}
|
|
|
+ //挂车行驶证到期前30天
|
|
|
+ int result430 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date30);
|
|
|
+ if (result430 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//挂车行驶证到期前10天
|
|
|
int result410 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date10);
|
|
|
if (result410 == 0) {
|
|
@@ -422,6 +521,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
}
|
|
|
+ //道路运输证到期前30天
|
|
|
+ int result630 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date30);
|
|
|
+ if (result630 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的道路运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//道路运输证到期前10天
|
|
|
int result610 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date10);
|
|
|
if (result610 == 0) {
|
|
@@ -457,6 +569,19 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
|
|
|
driverCarInfoService.updateById(hyDriverCarInfo);
|
|
|
}
|
|
|
+ //挂车运输证到期前30天
|
|
|
+ int result730 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date30);
|
|
|
+ if (result730 == 0) {
|
|
|
+ //发送系统消息
|
|
|
+ NewsInfo newsInfo = new NewsInfo();
|
|
|
+ newsInfo.setReCommonId(hyDriverInfo.getCommonId());
|
|
|
+ newsInfo.setBussId(hyDriverCarInfo.getId());
|
|
|
+ newsInfo.setNewsTitle("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
|
|
|
+ newsInfo.setNewsTypeKey("1");
|
|
|
+ newsInfo.setNewsType("系统消息");
|
|
|
+ newsInfoService.addNewsInfo(newsInfo);
|
|
|
+ }
|
|
|
//挂车运输证到期前10天
|
|
|
int result710 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date10);
|
|
|
if (result710 == 0) {
|
|
@@ -1014,6 +1139,12 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
|
|
|
if (!"5".equals(hyCargoOwnerInfo.getAuthenticationStatusKey())) {
|
|
|
throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
|
|
|
}
|
|
|
+ //查询货主是否有银行卡
|
|
|
+ HyCargoOwnerPayeeInfo hyCargoOwnerPayeeInfo = hyCargoOwnerPayeeInfoService.selectOne(new EntityWrapper<HyCargoOwnerPayeeInfo>()
|
|
|
+ .eq("common_id", publishTaskInfo.getCommonId()).eq("delete_flag", "0"));
|
|
|
+ if (hyCargoOwnerPayeeInfo == null) {
|
|
|
+ throw new YException(YExceptionEnum.PAYEE_CARD_ADD);
|
|
|
+ }
|
|
|
} else if (publishTaskInfo.getCompId() != null && publishTaskInfo.getCompId() != "") {
|
|
|
//货主认证公司是否具有发布权限
|
|
|
HyCompanyInfo hyCompanyInfo = companyInfoService.selectOne(new EntityWrapper<HyCompanyInfo>()
|