|
@@ -23,8 +23,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fhs.trans.service.impl.TransService;
|
|
import com.fhs.trans.service.impl.TransService;
|
|
|
|
+import com.google.common.collect.Maps;
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
import org.apache.commons.compress.utils.Lists;
|
|
import org.apache.commons.compress.utils.Lists;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -59,6 +61,7 @@ import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecord
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
import java.util.concurrent.locks.ReentrantLock;
|
|
import java.util.concurrent.locks.ReentrantLock;
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
@@ -201,7 +204,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, "11", "13", "14","15"));
|
|
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10","11", "13", "14","15"));
|
|
if(count>0){
|
|
if(count>0){
|
|
throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber());
|
|
throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber());
|
|
}
|
|
}
|
|
@@ -259,7 +262,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,bizAppointmentRecordEditParam.getLicenseNumber()).
|
|
eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber()).
|
|
- notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
|
|
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10","11", "13", "14","15"));
|
|
if(count>0){
|
|
if(count>0){
|
|
throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber());
|
|
throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber());
|
|
}
|
|
}
|
|
@@ -551,6 +554,24 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<Map<String, Object>> gerVehicleTotal(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
|
|
|
|
+ String beginTime = null;
|
|
|
|
+ String endTime = null;
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getBeginTime())){
|
|
|
|
+ beginTime = bizAppointmentRecordPageParam.getBeginTime()+" 00:00:00";
|
|
|
|
+ }else{
|
|
|
|
+ //beginTime = DateUtil.format(DateUtil.date(),"yyyy-MM-dd");
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getEndTime())){
|
|
|
|
+ endTime = bizAppointmentRecordPageParam.getEndTime()+" 23:59:59";
|
|
|
|
+ }else{
|
|
|
|
+ //endTime = DateUtil.format(DateUtil.date(),"yyyy-MM-dd");
|
|
|
|
+ }
|
|
|
|
+ List<Map<String, Object>> list = this.getBaseMapper().gerVehicleTotal(beginTime, endTime);
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
public BizAppointmentRecord setBizAppointmentRecord(BizAppointmentRecord bizAppointmentRecord){
|
|
public BizAppointmentRecord setBizAppointmentRecord(BizAppointmentRecord bizAppointmentRecord){
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
bizAppointmentRecord.setIsFlag("1");
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOrderId())){
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOrderId())){
|