|
@@ -239,15 +239,28 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
bizAppointmentRecord.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordAddParam.getOrderId()).getDeliveryTimeId());
|
|
bizAppointmentRecord.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordAddParam.getOrderId()).getDeliveryTimeId());
|
|
bizAppointmentRecord.setAppointmentType("1");
|
|
bizAppointmentRecord.setAppointmentType("1");
|
|
- if (ObjectUtil.isNotNull(bizConfig)) {
|
|
|
|
- if (StringUtils.equals(bizConfig.getAuditSwitch(), "1")) {
|
|
|
|
- //开启审核,设置待审核状态
|
|
|
|
- bizAppointmentRecord.setStatus("1");
|
|
|
|
- } else {
|
|
|
|
- //未开启审核,设置排队中状态
|
|
|
|
- //bizAppointmentRecord.setStatus("3");
|
|
|
|
- //未开启审核,设置待入场状态,可直接过门禁
|
|
|
|
- bizAppointmentRecord.setStatus("4");
|
|
|
|
|
|
+ //查询是否有充电结束的预约记录
|
|
|
|
+ BizAppointmentRecord appointmentRecord = this.getOne(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
|
+ eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
|
|
+ eq(BizAppointmentRecord::getAppointmentType, "4").
|
|
|
|
+ eq(BizAppointmentRecord::getStatus, "18").
|
|
|
|
+ last("limit 1"));
|
|
|
|
+ if(ObjectUtil.isNotNull(appointmentRecord)){
|
|
|
|
+ //存在充电结束的充电预约
|
|
|
|
+ bizAppointmentRecord.setStatus("5");
|
|
|
|
+ appointmentRecord.setStatus("19");
|
|
|
|
+ this.updateById(appointmentRecord);
|
|
|
|
+ }else{
|
|
|
|
+ if (ObjectUtil.isNotNull(bizConfig)) {
|
|
|
|
+ if (StringUtils.equals(bizConfig.getAuditSwitch(), "1")) {
|
|
|
|
+ //开启审核,设置待审核状态
|
|
|
|
+ bizAppointmentRecord.setStatus("1");
|
|
|
|
+ } else {
|
|
|
|
+ //未开启审核,设置排队中状态
|
|
|
|
+ //bizAppointmentRecord.setStatus("3");
|
|
|
|
+ //未开启审核,设置待入场状态,可直接过门禁
|
|
|
|
+ bizAppointmentRecord.setStatus("4");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverId())){
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverId())){
|
|
@@ -384,7 +397,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
- notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14", "15"));
|
|
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14", "15","18","19"));
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
throw new CommonException("车牌号:{}已经添加过预约!", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
throw new CommonException("车牌号:{}已经添加过预约!", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
}
|
|
}
|
|
@@ -812,7 +825,25 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
//订单预约
|
|
//订单预约
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "5")){
|
|
|
|
+ //管桩预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "2")){
|
|
|
|
+ //临时预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"6")){
|
|
|
|
+ //其他预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"4")){
|
|
|
|
+ //充电预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"3")){
|
|
|
|
+ //起卸预约
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -828,9 +859,19 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "5")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "5")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "2")){
|
|
|
|
+ //临时预约
|
|
bizAppointmentRecord.setIsFlag("5");
|
|
bizAppointmentRecord.setIsFlag("5");
|
|
}
|
|
}
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"6")){
|
|
|
|
+ //其他预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"3")){
|
|
|
|
+ //起卸预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
bizAppointmentRecord.setIsFlag("5");
|
|
bizAppointmentRecord.setIsFlag("5");
|
|
}
|
|
}
|
|
@@ -844,9 +885,18 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "7")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "7")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "2")){
|
|
bizAppointmentRecord.setIsFlag("7");
|
|
bizAppointmentRecord.setIsFlag("7");
|
|
}
|
|
}
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "6")){
|
|
|
|
+ //其他预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "3")){
|
|
|
|
+ //起卸预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
} else if (StringUtils.equals(bizAppointmentRecord.getStatus(), "8")) {
|
|
} else if (StringUtils.equals(bizAppointmentRecord.getStatus(), "8")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
@@ -866,11 +916,35 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "9")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getStatus(), "9")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "1")) {
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "2")){
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(), "5")){
|
|
|
|
+ //临时预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"6")){
|
|
|
|
+ //其他预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"4")){
|
|
|
|
+ //充电预约
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"3")){
|
|
|
|
+ //起卸预约
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- bizAppointmentRecord.setIsFlag("9");
|
|
|
|
|
|
+ if(StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"4")){
|
|
|
|
+ //充电预约
|
|
|
|
+ if(StringUtils.equals(bizAppointmentRecord.getStatus(),"5")){
|
|
|
|
+ bizAppointmentRecord.setIsFlag("1");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ bizAppointmentRecord.setIsFlag("9");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1152,14 +1226,19 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
//获取流程配置判断预约是否需要审核
|
|
//获取流程配置判断预约是否需要审核
|
|
BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
|
|
BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
- if (ObjectUtil.isNotNull(bizConfig)) {
|
|
|
|
- if (StringUtils.equals(bizConfig.getTemporaryAuditSwitch(), "1")) {
|
|
|
|
- //开启审核,设置待审核状态
|
|
|
|
- bizAppointmentRecord.setStatus("1");
|
|
|
|
- } else {
|
|
|
|
- //未开启审核,设置待入场状态
|
|
|
|
- bizAppointmentRecord.setStatus("4");
|
|
|
|
- }
|
|
|
|
|
|
+ //查询车辆是否存在充电结束的预约记录
|
|
|
|
+ BizAppointmentRecord appointmentRecord = this.getOne(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
|
+ eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
|
|
+ eq(BizAppointmentRecord::getAppointmentType, "4").
|
|
|
|
+ eq(BizAppointmentRecord::getStatus, "18").
|
|
|
|
+ last("limit 1"));
|
|
|
|
+ if(ObjectUtil.isNotNull(appointmentRecord)){
|
|
|
|
+ //存在充电结束的充电预约
|
|
|
|
+ bizAppointmentRecord.setStatus("5");
|
|
|
|
+ appointmentRecord.setStatus("19");
|
|
|
|
+ this.updateById(appointmentRecord);
|
|
|
|
+ }else{
|
|
|
|
+ bizAppointmentRecord.setStatus("4");
|
|
}
|
|
}
|
|
bizAppointmentRecord.setAppointmentType("3");
|
|
bizAppointmentRecord.setAppointmentType("3");
|
|
this.save(bizAppointmentRecord);
|
|
this.save(bizAppointmentRecord);
|
|
@@ -1196,7 +1275,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
eq(BizAppointmentRecord::getLicenseNumber, bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
- notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14", "15"));
|
|
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14", "15","18","19"));
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
throw new CommonException("车牌号:{}已经添加过预约!", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
throw new CommonException("车牌号:{}已经添加过预约!", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
}
|
|
}
|
|
@@ -1205,10 +1284,10 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("bar.delete_flag", "NOT_DELETE");
|
|
queryWrapper.eq("bar.delete_flag", "NOT_DELETE");
|
|
queryWrapper.isNull("br.unload_weight");
|
|
queryWrapper.isNull("br.unload_weight");
|
|
- queryWrapper.eq("bo.order_type", "1");
|
|
|
|
|
|
+ queryWrapper.eq("bla.order_type", "1");
|
|
queryWrapper.eq("bar.`status`", "10");
|
|
queryWrapper.eq("bar.`status`", "10");
|
|
queryWrapper.eq("bar.license_number", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
queryWrapper.eq("bar.license_number", bizAppointmentRecordAddParam.getLicenseNumber());
|
|
- List<BizAppointmentRecord> recordList = this.getBaseMapper().getRecordList(queryWrapper);
|
|
|
|
|
|
+ List<BizAppointmentRecord> recordList = this.getBaseMapper().getLoadList(queryWrapper);
|
|
if (ObjectUtil.isNotEmpty(recordList)) {
|
|
if (ObjectUtil.isNotEmpty(recordList)) {
|
|
throw new CommonException("请先填写回签信息,再进行预约!");
|
|
throw new CommonException("请先填写回签信息,再进行预约!");
|
|
}
|
|
}
|
|
@@ -1754,7 +1833,12 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
@Override
|
|
@Override
|
|
public void bizOtherAppointmentComplete(BizAppointmentRecordIdParam bizAppointmentRecordIdParam) {
|
|
public void bizOtherAppointmentComplete(BizAppointmentRecordIdParam bizAppointmentRecordIdParam) {
|
|
BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());
|
|
BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());
|
|
- bizAppointmentRecord.setStatus("7");
|
|
|
|
|
|
+ if(StringUtils.equals(bizAppointmentRecord.getIsWeigh(),"1")){
|
|
|
|
+ bizAppointmentRecord.setStatus("7");
|
|
|
|
+ }else{
|
|
|
|
+ bizAppointmentRecord.setStatus("9");
|
|
|
|
+ }
|
|
|
|
+
|
|
this.updateById(bizAppointmentRecord);
|
|
this.updateById(bizAppointmentRecord);
|
|
}
|
|
}
|
|
|
|
|