Commit 9aeb7a18 authored by hezhen's avatar hezhen

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents f6dd399c 3335f12b
...@@ -7,4 +7,5 @@ target/ ...@@ -7,4 +7,5 @@ target/
.settings/ .settings/
.classpath .classpath
ace-modules/ace-tool/src/main/resources/application-dev.yml ace-modules/ace-tool/src/main/resources/application-dev.yml
src/main/test/** src/main/test/**
\ No newline at end of file logs/**
...@@ -14,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -14,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.vehicle.entity.SysRegion; import com.xxfc.platform.vehicle.entity.SysRegion;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import javafx.print.Collation; import javafx.print.Collation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanMap; import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.beanutils.BeanUtilsBean; import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -38,6 +39,7 @@ import java.util.stream.Collectors; ...@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
* @author Administrator * @author Administrator
*/ */
@Service @Service
@Slf4j
public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail> { public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail> {
@Autowired @Autowired
...@@ -74,7 +76,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail ...@@ -74,7 +76,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
List<Integer> citysCode = pageInfo.getList().parallelStream().map(AppUserManageVo::getCityCode).collect(Collectors.toList()); List<Integer> citysCode = pageInfo.getList().parallelStream().map(AppUserManageVo::getCityCode).collect(Collectors.toList());
HashSet<Integer> set = new HashSet<>(); HashSet<Integer> set = new HashSet<>();
set.addAll(citysCode); set.addAll(citysCode);
ObjectRestResponse<List<SysRegion>> orr = vehicleFeign.getSysRegionByIds(set); ObjectRestResponse<List<SysRegion>> orr = vehicleFeign.getSysRegion(set);
List<SysRegion> sysRegions = orr.getData(); List<SysRegion> sysRegions = orr.getData();
if (CollectionUtils.isNotEmpty(sysRegions)) { if (CollectionUtils.isNotEmpty(sysRegions)) {
HashMap<Long, String> map = new HashMap<>(); HashMap<Long, String> map = new HashMap<>();
...@@ -82,7 +84,9 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail ...@@ -82,7 +84,9 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
map.put(sysRegion.getId(),sysRegion.getName()); map.put(sysRegion.getId(),sysRegion.getName());
} }
for (AppUserManageVo appUserManageVo : pageInfo.getList()) { for (AppUserManageVo appUserManageVo : pageInfo.getList()) {
appUserManageVo.setCityName(map.get(appUserManageVo.getCityCode())); Long cityCode = Long.valueOf(appUserManageVo.getCityCode());
String crtyName = map.get(cityCode);
appUserManageVo.setCityName(crtyName);
} }
} }
return pageInfo; return pageInfo;
......
...@@ -65,7 +65,6 @@ public class MemberLevelController extends BaseController<UserMemberLevelBiz, Ba ...@@ -65,7 +65,6 @@ public class MemberLevelController extends BaseController<UserMemberLevelBiz, Ba
} }
@DeleteMapping("/manage/delMembershipGrade/{id}") @DeleteMapping("/manage/delMembershipGrade/{id}")
public ObjectRestResponse delMembershipGrade(@PathVariable Integer id){ public ObjectRestResponse delMembershipGrade(@PathVariable Integer id){
BaseUserMemberLevel baseUserMemberLevel = new BaseUserMemberLevel(); BaseUserMemberLevel baseUserMemberLevel = new BaseUserMemberLevel();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -370,8 +370,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -370,8 +370,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
} }
} }
public DailyOrderStatistics getTotalOrder() { public boolean getTotalOrder() {
return mapper.getTotalOrder();
mapper.getTotalOrder();
return false;
} }
// @Scheduled(cron = "0 0 2 * * ? ") // @Scheduled(cron = "0 0 2 * * ? ")
......
...@@ -24,7 +24,7 @@ public class BaseOrderStatisticsJobHandler extends IJobHandler { ...@@ -24,7 +24,7 @@ public class BaseOrderStatisticsJobHandler extends IJobHandler {
@Override @Override
public ReturnT<String> execute(String s) throws Exception { public ReturnT<String> execute(String s) throws Exception {
try { try {
DailyOrderStatistics dailyOrderStatistics= baseOrderBiz.getTotalOrder(); baseOrderBiz.getTotalOrder();
ReturnT returnT = new ReturnT(){{ ReturnT returnT = new ReturnT(){{
setCode(100); setCode(100);
......
...@@ -41,6 +41,7 @@ public class CertificationController { ...@@ -41,6 +41,7 @@ public class CertificationController {
private UserFeign userFeign; private UserFeign userFeign;
@Qualifier("applicationTaskExecutor") @Qualifier("applicationTaskExecutor")
@Autowired @Autowired
private TaskExecutor executor; private TaskExecutor executor;
...@@ -102,12 +103,13 @@ public class CertificationController { ...@@ -102,12 +103,13 @@ public class CertificationController {
if (type!=null&&type==0){ if (type!=null&&type==0){
ObjectRestResponse<Integer> result = certificationService.certificate(idInformation); ObjectRestResponse<Integer> result = certificationService.certificate(idInformation);
if (result.getRel()) { if (result.getRel()) {
executor.execute(new Runnable() { Thread thread = new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
setIntegral(appUserDTO.getUserid(),result.getData()); setIntegral(appUserDTO.getUserid(),result.getData());
} }
}); });
thread.start();
} }
return result ; return result ;
} }
......
...@@ -36,8 +36,6 @@ public class TrafficViolationsService { ...@@ -36,8 +36,6 @@ public class TrafficViolationsService {
@Autowired @Autowired
private LicensePlateTypeBiz licensePlateTypeBiz; private LicensePlateTypeBiz licensePlateTypeBiz;
@Autowired
private TaskExecutor taskExecutor;
@Value("${ALIYUN.CODE}") @Value("${ALIYUN.CODE}")
private String CODE; private String CODE;
...@@ -191,12 +189,15 @@ public class TrafficViolationsService { ...@@ -191,12 +189,15 @@ public class TrafficViolationsService {
licensePlateTypes = saveLicensePlateType(); licensePlateTypes = saveLicensePlateType();
List<LicensePlateType> finalLicensePlateTypes = licensePlateTypes; List<LicensePlateType> finalLicensePlateTypes = licensePlateTypes;
taskExecutor.execute(new Runnable() {
Thread thread = new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
insertLicensePlateType(finalLicensePlateTypes); insertLicensePlateType(finalLicensePlateTypes);
} }
}); } );
thread.start();
} }
return licensePlateTypes; return licensePlateTypes;
} }
......
...@@ -86,4 +86,8 @@ public class VehicleDepartureLog { ...@@ -86,4 +86,8 @@ public class VehicleDepartureLog {
* 预约记录id * 预约记录id
*/ */
Integer bookRecordId; Integer bookRecordId;
private String illegalPic;
private Integer illegalAmount;
} }
...@@ -87,11 +87,11 @@ public interface VehicleFeign { ...@@ -87,11 +87,11 @@ public interface VehicleFeign {
RestResponse getSysRegionById(@PathVariable(value = "id") Integer id); RestResponse getSysRegionById(@PathVariable(value = "id") Integer id);
/** /**
* 多个城市code获取城市代码 * 多个城市code获取城市代码
* @param ids * @param idSet
* @return * @return
*/ */
@PostMapping("/sysRegion/getSysRegionByIds") @PostMapping("/sysRegion/getSysRegion")
ObjectRestResponse<List<SysRegion>> getSysRegionByIds(@RequestBody Set<Integer> ids); ObjectRestResponse<List<SysRegion>> getSysRegion(Set<Integer> idSet);
/** /**
* 获取公司所在的城市 * 获取公司所在的城市
......
...@@ -53,4 +53,5 @@ public class VehicleBookRecordQueryVo { ...@@ -53,4 +53,5 @@ public class VehicleBookRecordQueryVo {
private String[] companyIds; private String[] companyIds;
private String upkeepIds; private String upkeepIds;
private Integer userCompany;
} }
\ No newline at end of file
...@@ -28,4 +28,8 @@ public class VehicleBookRecordVo extends VehicleBookRecord { ...@@ -28,4 +28,8 @@ public class VehicleBookRecordVo extends VehicleBookRecord {
private VehicleDepartureLogVo vehicleDepartureLogVo; private VehicleDepartureLogVo vehicleDepartureLogVo;
private String numberPlate; private String numberPlate;
private Integer liftStatus;
private Integer retStatus;
} }
...@@ -38,11 +38,7 @@ import tk.mybatis.mapper.entity.Example; ...@@ -38,11 +38,7 @@ import tk.mybatis.mapper.entity.Example;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -332,6 +328,9 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany ...@@ -332,6 +328,9 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
*/ */
public Set<Integer> getCity(String zoneList, String companyList) { public Set<Integer> getCity(String zoneList, String companyList) {
List<Integer> list = vehicleBiz.dataCompany(zoneList, companyList); List<Integer> list = vehicleBiz.dataCompany(zoneList, companyList);
if (CollectionUtils.isEmpty(list)) {
return new HashSet<>();
}
Example exa =new Example(BranchCompany.class); Example exa =new Example(BranchCompany.class);
Example.Criteria criteria = exa.createCriteria(); Example.Criteria criteria = exa.createCriteria();
criteria.andIn("id",list); criteria.andIn("id",list);
......
...@@ -382,8 +382,16 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -382,8 +382,16 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
return vehicleBookRecord; return vehicleBookRecord;
} }
/**
* 需要审核
* @param userId
* @param bookVehicleVo
* @param userName
* @return
* @throws Exception
*/
@Transactional @Transactional
public VehicleBookRecord applyVehicle(Integer userId, BookVehicleVO bookVehicleVo, String userName) throws Exception{ public VehicleBookRecord applyForVehicle(Integer userId, BookVehicleVO bookVehicleVo, String userName) throws Exception{
log.info("预定车辆参数:userId = {}, bookVehicleVo = {},username = {}", userId, bookVehicleVo, userName); log.info("预定车辆参数:userId = {}, bookVehicleVo = {},username = {}", userId, bookVehicleVo, userName);
//检查车辆信息是否合法 //检查车辆信息是否合法
checkIfVehicleExists(bookVehicleVo.getVehicleId()); checkIfVehicleExists(bookVehicleVo.getVehicleId());
...@@ -396,7 +404,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -396,7 +404,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
//转换日期范围为列表,并检查是否合法 //转换日期范围为列表,并检查是否合法
fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay); fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay);
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月 if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new CustomIllegalParamException(" you can only within 2 month"); throw new CustomIllegalParamException(" 只可以预约两个月内的车辆");
} }
//检查车辆是否可以预定 //检查车辆是否可以预定
for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){ for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){
...@@ -412,7 +420,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -412,7 +420,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
vehicleBookRecord = new VehicleBookRecord(); vehicleBookRecord = new VehicleBookRecord();
vehicleBookRecord.setVehicleId(bookVehicleVo.getVehicleId()); vehicleBookRecord.setVehicleId(bookVehicleVo.getVehicleId());
vehicleBookRecord.setBookType(bookVehicleVo.getBookType()); vehicleBookRecord.setBookType(bookVehicleVo.getBookType());
vehicleBookRecord.setStatus(VehicleBookRecordStatus.APPROVE.getCode()); vehicleBookRecord.setStatus(VehicleBookRecordStatus.APPLY.getCode());
vehicleBookRecord.setBookUser(userId); vehicleBookRecord.setBookUser(userId);
vehicleBookRecord.setBookUserName(userName); vehicleBookRecord.setBookUserName(userName);
vehicleBookRecord.setBookStartDate(startDay.toDate()); vehicleBookRecord.setBookStartDate(startDay.toDate());
...@@ -467,6 +475,98 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -467,6 +475,98 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
return vehicleBookRecord; return vehicleBookRecord;
} }
/**
* 不需要审核
* @param userId
* @param bookVehicleVo
* @param userName
* @return
* @throws Exception
*/
@Transactional
public VehicleBookRecord applyVehicle(Integer userId, BookVehicleVO bookVehicleVo, String userName) throws Exception{
log.info("预定车辆参数:userId = {}, bookVehicleVo = {},username = {}", userId, bookVehicleVo, userName);
//检查车辆信息是否合法
checkIfVehicleExists(bookVehicleVo.getVehicleId());
//提取日期和相应的预定目标日期
Map<String,List<String>> yearMonthAndDate = Maps.newHashMap();
DateTime startDay =DateTime.parse(bookVehicleVo.getBookStartDate(),DATE_TIME_FORMATTER);
DateTime endDay =DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER);
//转换日期范围为列表,并检查是否合法
fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay);
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new CustomIllegalParamException(" 只可以预约两个月内的车辆");
}
//检查车辆是否可以预定
for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){
Boolean rsEach = applyVehicle4EmployeePerMonth(bookVehicleVo.getVehicleId(),entry.getValue(),entry.getKey());
if(Boolean.FALSE.equals(rsEach)){
throw new BaseException(ResultCode.FAILED_CODE);
}
}
//加入预定申请记录
VehicleBookRecord vehicleBookRecord = null;
if(bookVehicleVo.getVehicleBookRecordId() == null) {
vehicleBookRecord = new VehicleBookRecord();
vehicleBookRecord.setVehicleId(bookVehicleVo.getVehicleId());
vehicleBookRecord.setBookType(bookVehicleVo.getBookType());
vehicleBookRecord.setStatus(VehicleBookRecordStatus.APPROVE.getCode());
vehicleBookRecord.setBookUser(userId);
vehicleBookRecord.setBookUserName(userName);
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecord.setLiftAddr(bookVehicleVo.getLiftAddr());
vehicleBookRecord.setRemark(bookVehicleVo.getRemark());
vehicleBookRecord.setDestination(bookVehicleVo.getDestination());
vehicleBookRecord.setLiftCompany(bookVehicleVo.getLiftCompany());
vehicleBookRecord.setRetCompany(bookVehicleVo.getRetCompany());
vehicleBookRecord.setVehicleUsername(bookVehicleVo.getVehicleUsername());
vehicleBookRecord.setVehicleUserPhone(bookVehicleVo.getVehicleUserPhone());
vehicleBookRecord.setUpkeepIds(bookVehicleVo.getUpkeepIds());
vehicleBookRecordBiz.save(vehicleBookRecord);
} else {
vehicleBookRecord = vehicleBookRecordBiz.selectById(bookVehicleVo.getVehicleBookRecordId());
vehicleBookRecord.setBookStartDate(startDay.toDate());
vehicleBookRecord.setBookEndDate(endDay.toDate());
vehicleBookRecordBiz.updateSelectiveByIdRe(vehicleBookRecord);
}
// //添加预定时间记录
VehicleBookRecord newValue = vehicleBookRecordBiz.selectOne(vehicleBookRecord);
Map<String, Integer> map = vehicleBookHourInfoBiz.getPredictableHours(bookVehicleVo.getBookStartDate(), bookVehicleVo.getBookEndDate());
for(Map.Entry<String, Integer> entry : map.entrySet()) {
VehicleBookHourInfoDto vehicleBookHourInfoDto = new VehicleBookHourInfoDto();
vehicleBookHourInfoDto.setVehicleId(bookVehicleVo.getVehicleId());
vehicleBookHourInfoDto.setYearMonthDay(entry.getKey());
vehicleBookHourInfoDto.setBookedHour(entry.getValue());
vehicleBookHourInfoDto.setBookRecordId(newValue.getId());
vehicleBookHourInfoBiz.save(vehicleBookHourInfoDto);
}
//修改相关车辆预定记录
Boolean hasSuc = bookedVehicle(bookVehicleVo);
if(!hasSuc){
throw new BaseException(ResultCode.FAILED_CODE);
}
//添加随车物品
List<Map<String,Object>> params = Lists.newArrayList();
if(MapUtils.isNotEmpty(bookVehicleVo.getSelectedAccItem())){
for(Map.Entry<Integer,Integer> idAndAmount : bookVehicleVo.getSelectedAccItem().entrySet()){
Map<String,Object> row = Maps.newHashMap();
row.put("id",idAndAmount.getKey());
row.put("amount",idAndAmount.getValue());
row.put("bookRecordId",vehicleBookRecord.getId());
params.add(row);
}
bookRecordAccItemMapper.batchAdd(params);
}
return vehicleBookRecord;
}
@Transactional @Transactional
...@@ -647,7 +747,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -647,7 +747,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
//转换日期范围为列表,并检查是否合法 //转换日期范围为列表,并检查是否合法
fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay); fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay);
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月 if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new CustomIllegalParamException(" you can only within 2 month"); throw new CustomIllegalParamException(" 只可以预约两个月内的车辆");
} }
Boolean rs = Boolean.TRUE; Boolean rs = Boolean.TRUE;
for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){ for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){
...@@ -726,7 +826,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -726,7 +826,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
for( DateTime curDate = startDay;curDate.compareTo(endDay)<=0;curDate=curDate.plusDays(1)){ for( DateTime curDate = startDay;curDate.compareTo(endDay)<=0;curDate=curDate.plusDays(1)){
String curDateStr = curDate.toString(DEFAULT_DATE_TIME_FORMATTER); String curDateStr = curDate.toString(DEFAULT_DATE_TIME_FORMATTER);
if(curDateStr.compareTo(DateTime.now().toString(DEFAULT_DATE_TIME_FORMATTER))<0){ if(curDateStr.compareTo(DateTime.now().toString(DEFAULT_DATE_TIME_FORMATTER))<0){
throw new CustomIllegalParamException("you can only unbook from today"); throw new CustomIllegalParamException("只可以取消当前时间之后的车辆");
} }
String curYearMonth = curDate.toString(YEARMONTH_DATE_TIME_FORMATTER); String curYearMonth = curDate.toString(YEARMONTH_DATE_TIME_FORMATTER);
if(!yearMonthAndDate.containsKey(curYearMonth)){ if(!yearMonthAndDate.containsKey(curYearMonth)){
...@@ -737,7 +837,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -737,7 +837,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
} }
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月 if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new CustomIllegalParamException(" you can only within 2 month"); throw new CustomIllegalParamException(" 只可以预约两个月内的车辆");
} }
} }
...@@ -756,7 +856,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -756,7 +856,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay); fillDateList4DatePeriod(yearMonthAndDate,startDay,endDay);
if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月 if(yearMonthAndDate.size()>3){//连续的日期最多夸3个月
throw new CustomIllegalParamException(" you can only within 2 month"); throw new CustomIllegalParamException(" 只可以预约两个月内的车辆");
} }
Boolean rs = Boolean.TRUE; Boolean rs = Boolean.TRUE;
for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){ for(Map.Entry<String,List<String>> entry:yearMonthAndDate.entrySet()){
...@@ -777,7 +877,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -777,7 +877,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
params.put("yearMonth",yearMonth); params.put("yearMonth",yearMonth);
//加入更新条件 //加入更新条件
if(CollectionUtils.isEmpty(unbookDates)){ if(CollectionUtils.isEmpty(unbookDates)){
throw new CustomIllegalParamException(" there are no day to unbook "); throw new CustomIllegalParamException(" 车辆不可预定");
} }
Map<String,List<String>> yearMonthAndDate = new HashMap<>(); Map<String,List<String>> yearMonthAndDate = new HashMap<>();
yearMonthAndDate.put(yearMonth,unbookDates); yearMonthAndDate.put(yearMonth,unbookDates);
...@@ -804,7 +904,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -804,7 +904,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
public void fillBookedDateSearchParam(Map<String, Object> params, public void fillBookedDateSearchParam(Map<String, Object> params,
Map<String,List<String>> yearMonthAndDate,Map<String,List<String>> yearMonthAndDateNotBooked){ Map<String,List<String>> yearMonthAndDate,Map<String,List<String>> yearMonthAndDateNotBooked){
if(MapUtils.isEmpty(yearMonthAndDate)&&MapUtils.isEmpty(yearMonthAndDateNotBooked)){//没有预定信息查询条件 if(MapUtils.isEmpty(yearMonthAndDate)&&MapUtils.isEmpty(yearMonthAndDateNotBooked)){//没有预定信息查询条件
throw new CustomIllegalParamException(" at least apply one book info condition."); throw new CustomIllegalParamException("没有预订信息!");
} }
Map<String,Map<String,Integer>> yearMonthAndParam = new HashMap<>(); Map<String,Map<String,Integer>> yearMonthAndParam = new HashMap<>();
...@@ -849,7 +949,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -849,7 +949,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
} }
for (String dateStr:entry.getValue()) {//已预定作为条件,该位与1作与运算必定为1 for (String dateStr:entry.getValue()) {//已预定作为条件,该位与1作与运算必定为1
if(bookedYearMonth.contains(dateStr)){ if(bookedYearMonth.contains(dateStr)){
throw new CustomIllegalParamException(" 同一天既作为未预定查询条件又作为已预定查询条件"); throw new CustomIllegalParamException("同一天既作为未预定查询条件又作为已预定查询条件");
} }
DateTime dateTime = DateTime.parse(dateStr, DEFAULT_DATE_TIME_FORMATTER); DateTime dateTime = DateTime.parse(dateStr, DEFAULT_DATE_TIME_FORMATTER);
//仅对应位为1的整形值 //仅对应位为1的整形值
......
...@@ -122,6 +122,9 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic ...@@ -122,6 +122,9 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
} }
vehicleBookRecordQueryVo.setCompanyIds(companyId.split(",")); vehicleBookRecordQueryVo.setCompanyIds(companyId.split(","));
} }
} else {
vehicleBookRecordQueryVo.setZoneIds((vehicleBookRecordQueryVo.getZoneId() + "").split(","));
vehicleBookRecordQueryVo.setCompanyIds((vehicleBookRecordQueryVo.getLiftCompany() + "").split(","));
} }
List<VehicleBookRecordVo> list = mapper.getBookRecord(vehicleBookRecordQueryVo); List<VehicleBookRecordVo> list = mapper.getBookRecord(vehicleBookRecordQueryVo);
PageHelper.startPage(pageNo,pageSize); PageHelper.startPage(pageNo,pageSize);
...@@ -137,6 +140,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic ...@@ -137,6 +140,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
if(userDTO == null) { if(userDTO == null) {
return RestResponse.codeAndMessage(235, "token失效"); return RestResponse.codeAndMessage(235, "token失效");
} }
vehicleBookRecordQueryVo.setUserCompany(userDTO.getCompanyId());
if(vehicleBookRecordQueryVo.getZoneId() == null) { //默认查出所有权限内的数据 if(vehicleBookRecordQueryVo.getZoneId() == null) { //默认查出所有权限内的数据
if(DATA_ALL_FALSE.equals(userDTO.getDataAll())) { //不能获取全部数据 if(DATA_ALL_FALSE.equals(userDTO.getDataAll())) { //不能获取全部数据
String zoneId = null; String zoneId = null;
...@@ -162,6 +166,9 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic ...@@ -162,6 +166,9 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
} }
vehicleBookRecordQueryVo.setCompanyIds(companyId.split(",")); vehicleBookRecordQueryVo.setCompanyIds(companyId.split(","));
} }
} else {
vehicleBookRecordQueryVo.setZoneIds((vehicleBookRecordQueryVo.getZoneId() + ",").split(","));
vehicleBookRecordQueryVo.setCompanyIds((vehicleBookRecordQueryVo.getLiftCompany() + ",").split(","));
} }
List<VehicleBookRecordVo> list = mapper.getBookRecordInfo(vehicleBookRecordQueryVo); List<VehicleBookRecordVo> list = mapper.getBookRecordInfo(vehicleBookRecordQueryVo);
PageHelper.startPage(pageNo,pageSize); PageHelper.startPage(pageNo,pageSize);
......
package com.xxfc.platform.vehicle.biz; package com.xxfc.platform.vehicle.biz;
import com.github.pagehelper.Page; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
...@@ -26,15 +27,12 @@ import java.util.List; ...@@ -26,15 +27,12 @@ import java.util.List;
@Service @Service
public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper, VehicleDepartureLog> { public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper, VehicleDepartureLog> {
@Autowired
VehicleDepartureLogMapper vehicleDepartureLogMapper;
@Autowired @Autowired
VehicleMapper vehicleMapper; VehicleMapper vehicleMapper;
public PageInfo<VehicleDepartureLogVo> page(String numberPlate, String time, Integer page, Integer limit) { public PageInfo<VehicleDepartureLogVo> page(String numberPlate, String time, Integer page, Integer limit) {
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
return new PageInfo<>(vehicleDepartureLogMapper.selectVoAll(numberPlate, time)); return new PageInfo<>(mapper.selectVoAll(numberPlate, time));
} }
public PageInfo<VehicleDepartureLogVo> pageNotAllData(String numberPlate, String time, Integer page, Integer limit, List<Integer> companyList) { public PageInfo<VehicleDepartureLogVo> pageNotAllData(String numberPlate, String time, Integer page, Integer limit, List<Integer> companyList) {
...@@ -42,12 +40,12 @@ public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper, ...@@ -42,12 +40,12 @@ public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper,
if (companyList == null || companyList.size() == 0) { if (companyList == null || companyList.size() == 0) {
companyList = Arrays.asList(-1); companyList = Arrays.asList(-1);
} }
return new PageInfo<>(vehicleDepartureLogMapper.selectVoAllNotAllData(numberPlate, time, companyList)); return new PageInfo<>(mapper.selectVoAllNotAllData(numberPlate, time, companyList));
} }
public PageInfo<VehicleDepartureLogVo> findByVehicle(String vehicleId, Integer page, Integer limit) { public PageInfo<VehicleDepartureLogVo> findByVehicle(String vehicleId, Integer page, Integer limit) {
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
return new PageInfo<>(vehicleDepartureLogMapper.selectByVehicleId(vehicleId)); return new PageInfo<>(mapper.selectByVehicleId(vehicleId));
} }
public VehicleDepartureStatisticDataVo statistic(String numberPlate) { public VehicleDepartureStatisticDataVo statistic(String numberPlate) {
...@@ -61,28 +59,32 @@ public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper, ...@@ -61,28 +59,32 @@ public class VehicleDepartureService extends BaseBiz<VehicleDepartureLogMapper,
// 出行次数 // 出行次数
VehicleDepartureLog departureLog = new VehicleDepartureLog(); VehicleDepartureLog departureLog = new VehicleDepartureLog();
departureLog.setVehicleId(vehicle.getId()); departureLog.setVehicleId(vehicle.getId());
statisticData.setDepartureCount(vehicleDepartureLogMapper.selectCount(departureLog)); statisticData.setDepartureCount(mapper.selectCount(departureLog));
// 出行天数 // 出行天数
statisticData.setDepartureDay(vehicleDepartureLogMapper.selectDayByVehicleId(vehicle.getId())); statisticData.setDepartureDay(mapper.selectDayByVehicleId(vehicle.getId()));
// 出行公里数 // 出行公里数
statisticData.setDepartureMileage(vehicleDepartureLogMapper.selectMileageByVehicleId(vehicle.getId())); statisticData.setDepartureMileage(mapper.selectMileageByVehicleId(vehicle.getId()));
return statisticData; return statisticData;
} }
@Transactional @Transactional
public ObjectRestResponse save(VehicleDepartureLog vehicleDepartureLog) { public ObjectRestResponse save(VehicleDepartureLog vehicleDepartureLog) {
Integer id = vehicleDepartureLog.getId(); Integer id = vehicleDepartureLog.getId();
if (id == null || id == 0) { if (id == null || id == 0) {
vehicleDepartureLog.setCreateTime(new Date()); vehicleDepartureLog.setCreateTime(new Date());
vehicleDepartureLog.setState(0); vehicleDepartureLog.setState(0);
insertSelective(vehicleDepartureLog); insertSelective(vehicleDepartureLog);
} else { } else {
vehicleDepartureLog.setUpdateTime(new Date()); vehicleDepartureLog.setUpdateTime(new Date());
updateSelectiveById(vehicleDepartureLog); VehicleDepartureLog oldValue = mapper.selectByPrimaryKey(vehicleDepartureLog);
} if(oldValue != null) {
BeanUtil.copyProperties(oldValue, vehicleDepartureLog, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
oldValue.setUpdateTime(new Date());
updateSelectiveById(oldValue);
}
}
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
......
...@@ -12,11 +12,13 @@ import com.xxfc.platform.vehicle.common.RestResponse; ...@@ -12,11 +12,13 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.ResCode.ResCode; import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.entity.SysRegion; import com.xxfc.platform.vehicle.entity.SysRegion;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.assertj.core.util.Arrays; import org.assertj.core.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls; import tk.mybatis.mapper.weekend.WeekendSqls;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -29,35 +31,37 @@ public class SysRegionController extends BaseController<SysRegionBiz> { ...@@ -29,35 +31,37 @@ public class SysRegionController extends BaseController<SysRegionBiz> {
/** /**
* 父类id获取子类对象 * 父类id获取子类对象
*
* @param id * @param id
* @return * @return
*/ */
@IgnoreUserToken @IgnoreUserToken
@RequestMapping(value ="/sons/{id}",method = RequestMethod.GET) @RequestMapping(value = "/sons/{id}", method = RequestMethod.GET)
public RestResponse<List<SysRegion>> getSonRegion(@PathVariable Long id){ public RestResponse<List<SysRegion>> getSonRegion(@PathVariable Long id) {
return RestResponse.data(baseBiz.getSonRegion(id)); return RestResponse.data(baseBiz.getSonRegion(id));
} }
/** /**
* 通过属性获取省 * 通过属性获取省
*
* @param type * @param type
* @return * @return
*/ */
@IgnoreUserToken @IgnoreUserToken
@RequestMapping(value ="/getSonRegionByType/{type}",method = RequestMethod.GET) @RequestMapping(value = "/getSonRegionByType/{type}", method = RequestMethod.GET)
public RestResponse<List<SysRegion>> getSysRegionByType(@PathVariable Integer type){ public RestResponse<List<SysRegion>> getSysRegionByType(@PathVariable Integer type) {
return RestResponse.data(baseBiz.getSysRegionByType(type)); return RestResponse.data(baseBiz.getSysRegionByType(type));
} }
@RequestMapping(value ="",method = RequestMethod.GET) @RequestMapping(value = "", method = RequestMethod.GET)
public RestResponse<List<SysRegion>> getRegion(@RequestParam String idListJson){ public RestResponse<List<SysRegion>> getRegion(@RequestParam String idListJson) {
try { try {
List<Long> ids = JSON.parseArray(idListJson,Long.class); List<Long> ids = JSON.parseArray(idListJson, Long.class);
return RestResponse.data(baseBiz.getRegionsByCodes(ids)); return RestResponse.data(baseBiz.getRegionsByCodes(ids));
} catch (JSONException ex) { } catch (JSONException ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode()); return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
} catch (CustomIllegalParamException ex){ } catch (CustomIllegalParamException ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode()); return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
} }
} }
...@@ -65,46 +69,52 @@ public class SysRegionController extends BaseController<SysRegionBiz> { ...@@ -65,46 +69,52 @@ public class SysRegionController extends BaseController<SysRegionBiz> {
/** /**
* 根据多个id查找省份 * 根据多个id查找省份
*
* @param ids * @param ids
* @return * @return
*/ */
@GetMapping("/getSysRegionByIds/{ids}") @GetMapping("/getSysRegionByIds/{ids}")
public RestResponse getSysRegionByIds(@PathVariable String ids){ public RestResponse getSysRegionByIds(@PathVariable String ids) {
Example exam = Example.builder(SysRegion.class) Example exam = Example.builder(SysRegion.class)
.where(WeekendSqls.<SysRegion>custom() .where(WeekendSqls.<SysRegion>custom()
.andIn(SysRegion::getId, Arrays.asList(ids.split(",")))).build(); .andIn(SysRegion::getId, Arrays.asList(ids.split(",")))).build();
return RestResponse.suc( baseBiz.selectByExample(exam)); return RestResponse.suc(baseBiz.selectByExample(exam));
} }
/** /**
* 根据一个id获取城市 * 根据一个id获取城市
*
* @param id * @param id
* @return * @return
*/ */
@GetMapping("/getSysRegionById/{id}") @GetMapping("/getSysRegionById/{id}")
public RestResponse getSysRegionById(@PathVariable Integer id){ public RestResponse getSysRegionById(@PathVariable Integer id) {
Example exam = Example.builder(SysRegion.class) Example exam = Example.builder(SysRegion.class)
.where(WeekendSqls.<SysRegion>custom() .where(WeekendSqls.<SysRegion>custom()
.andEqualTo(SysRegion::getId,id)).build(); .andEqualTo(SysRegion::getId, id)).build();
List<SysRegion> sysRegions = baseBiz.selectByExample(exam); List<SysRegion> sysRegions = baseBiz.selectByExample(exam);
if (sysRegions==null||sysRegions.size()!=1) { if (sysRegions == null || sysRegions.size() != 1) {
RestResponse.suc(); RestResponse.suc();
} }
return RestResponse.suc( sysRegions.get(0)); return RestResponse.suc(sysRegions.get(0));
} }
/** /**
* 根据一个id获取城市 * 根据一个id获取城市
* @param ids *
* @param idSet
* @return * @return
*/ */
@PostMapping("/getSysRegionByIds") @PostMapping("/getSysRegion")
public ObjectRestResponse<List<SysRegion>> getSysRegionByIds(@RequestBody Set<Integer> ids){ public ObjectRestResponse<List<SysRegion>> getSysRegion(@RequestBody Set<Integer> idSet) {
Example exam = Example.builder(SysRegion.class) if (CollectionUtils.isEmpty(idSet)){
.where(WeekendSqls.<SysRegion>custom() return ObjectRestResponse.succ();
.andIn(SysRegion::getId,ids) }
).build(); Example exam = new Example(SysRegion.class);
Example.Criteria criteria = exam.createCriteria();
criteria.andIn("id",idSet);
List<SysRegion> sysRegions = baseBiz.selectByExample(exam); List<SysRegion> sysRegions = baseBiz.selectByExample(exam);
return ObjectRestResponse.succ(sysRegions); return ObjectRestResponse.succ(sysRegions);
......
...@@ -199,7 +199,7 @@ public class VehicleController extends BaseController<VehicleBiz> { ...@@ -199,7 +199,7 @@ public class VehicleController extends BaseController<VehicleBiz> {
} }
/** /**
* 申请预定车辆 * 申请预定车辆 不需要审核
* *
* @param bookVehicleVo * @param bookVehicleVo
* @return * @return
...@@ -213,6 +213,21 @@ public class VehicleController extends BaseController<VehicleBiz> { ...@@ -213,6 +213,21 @@ public class VehicleController extends BaseController<VehicleBiz> {
return RestResponse.suc(); return RestResponse.suc();
} }
/**
* 申请预定车辆 需要审核
*
* @param bookVehicleVo
* @return
*/
@RequestMapping(value = "/apply/book/vehicle", method = RequestMethod.POST)
@ApiOperation(value = "申请预定车辆信息")
public RestResponse<Integer> applyForVehicle(@RequestBody BookVehicleVO bookVehicleVo) throws Exception {
Integer operatorId = Integer.parseInt(BaseContextHandler.getUserID());
String userName = BaseContextHandler.getName();
baseBiz.applyForVehicle(operatorId, bookVehicleVo, userName);
return RestResponse.suc();
}
/** /**
* 批准预定车辆预定 * 批准预定车辆预定
* *
...@@ -446,13 +461,13 @@ public class VehicleController extends BaseController<VehicleBiz> { ...@@ -446,13 +461,13 @@ public class VehicleController extends BaseController<VehicleBiz> {
} }
@GetMapping(value = "/app/unauth/getBookRecord") @GetMapping(value = "/app/unauth/getBookRecord")
@ApiOperation(value = "获取排班记录") @ApiOperation(value = "获取预定记录")
public RestResponse<PageDataVO> getRecord(VehicleBookRecordQueryVo vehicleBookRecordQueryVo) { public RestResponse<PageDataVO> getRecord(VehicleBookRecordQueryVo vehicleBookRecordQueryVo) {
return vehicleBookRecordBiz.getBookRecord(vehicleBookRecordQueryVo); return vehicleBookRecordBiz.getBookRecord(vehicleBookRecordQueryVo);
} }
@GetMapping(value = "/app/unauth/getBookRecordInfo") @GetMapping(value = "/app/unauth/getBookRecordInfo")
@ApiOperation(value = "获取排班记录信息") @ApiOperation(value = "获取预定记录信息")
public RestResponse<PageDataVO> getBookRecordInfo(VehicleBookRecordQueryVo vehicleBookRecordQueryVo) { public RestResponse<PageDataVO> getBookRecordInfo(VehicleBookRecordQueryVo vehicleBookRecordQueryVo) {
return vehicleBookRecordBiz.getBookRecordInfo(vehicleBookRecordQueryVo); return vehicleBookRecordBiz.getBookRecordInfo(vehicleBookRecordQueryVo);
} }
......
...@@ -34,9 +34,8 @@ public class CityController extends BaseController<VehicleBiz> { ...@@ -34,9 +34,8 @@ public class CityController extends BaseController<VehicleBiz> {
*/ */
@GetMapping("/corporationCity") @GetMapping("/corporationCity")
public ObjectRestResponse<Set<Integer>> corporationCity( public ObjectRestResponse<Set<Integer>> corporationCity(
@RequestParam("zoneList") String zoneList, @RequestParam(value = "zoneList",defaultValue = "") String zoneList,
@RequestParam("companyList") String companyList) { @RequestParam(value = "companyList",defaultValue = "") String companyList) {
return ObjectRestResponse.succ(branchCompanyBiz.getCity(zoneList,companyList)); return ObjectRestResponse.succ(branchCompanyBiz.getCity(zoneList,companyList));
} }
} }
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
<select id="getBookRecordInfo" resultMap="searchBookRecord" parameterType="com.xxfc.platform.vehicle.pojo.VehicleBookRecordQueryVo"> <select id="getBookRecordInfo" resultMap="searchBookRecord" parameterType="com.xxfc.platform.vehicle.pojo.VehicleBookRecordQueryVo">
select v3.number_plate, bc3.name parkCompanyName,bc4.name subordinateBranchName, conv(v2.booked_date,10,2) book_date, conv(v4.booked_hour,10,2) startHour,conv(v5.booked_hour,10,2) endHour, bc1.`name` lift_company_name, bc2.`name` ret_company_name, v3.number_plate,v1.* select (CASE v1.lift_company WHEN #{userCompany} THEN 1 ELSE 0 end) liftStatus,(CASE v1.ret_company WHEN #{userCompany} THEN 1 ELSE 0 end) retStatus,bc3.name parkCompanyName,bc4.name subordinateBranchName, conv(v2.booked_date,10,2) book_date, conv(v4.booked_hour,10,2) startHour,conv(v5.booked_hour,10,2) endHour, bc1.`name` lift_company_name, bc2.`name` ret_company_name, v3.number_plate,v1.*
from vehicle_book_record v1 from vehicle_book_record v1
LEFT JOIN vehicle_book_info v2 on v1.vehicle_id = v2.vehicle and v2.year_month = CONCAT(YEAR(v1.book_start_date),"-",IF(MONTH(v1.book_start_date) > 10,MONTH(v1.book_start_date),CONCAT("0",MONTH(v1.book_start_date)))) LEFT JOIN vehicle_book_info v2 on v1.vehicle_id = v2.vehicle and v2.year_month = CONCAT(YEAR(v1.book_start_date),"-",IF(MONTH(v1.book_start_date) > 10,MONTH(v1.book_start_date),CONCAT("0",MONTH(v1.book_start_date))))
LEFT JOIN vehicle_book_hour_info v4 on v4.book_record_id = v1.id and YEAR(v4.year_month_day) = YEAR(v1.book_start_date) AND MONTH(v4.year_month_day) = MONTH(v1.book_start_date) AND DAY(v4.year_month_day) =DAY(v1.book_start_date) LEFT JOIN vehicle_book_hour_info v4 on v4.book_record_id = v1.id and YEAR(v4.year_month_day) = YEAR(v1.book_start_date) AND MONTH(v4.year_month_day) = MONTH(v1.book_start_date) AND DAY(v4.year_month_day) =DAY(v1.book_start_date)
...@@ -442,7 +442,6 @@ ...@@ -442,7 +442,6 @@
<foreach collection="companyIds" item="id" open="(" separator="," close=")"> <foreach collection="companyIds" item="id" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</if> </if>
<if test="zoneIds != null"> <if test="zoneIds != null">
and bc1.zone_id in and bc1.zone_id in
......
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
</select> </select>
<select id="selectByBookRecordId" parameterType="java.lang.Integer" resultType="com.xxfc.platform.vehicle.pojo.VehicleDepartureLogVo"> <select id="selectByBookRecordId" parameterType="java.lang.Integer" resultType="com.xxfc.platform.vehicle.pojo.VehicleDepartureLogVo">
select vehicle_departure_log.*,vehicle.number_plate select vehicle_departure_log.*
from vehicle_departure_log from vehicle_departure_log
left join vehicle on vehicle_departure_log.vehicle_id = vehicle.id
where vehicle_departure_log.book_record_id = #{id} where vehicle_departure_log.book_record_id = #{id}
order by create_time desc order by create_time desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment