1.一级口门审批
parent
2f155e0957
commit
414f481fce
|
|
@ -84,4 +84,13 @@ public class VehicleMessageQueryExe {
|
|||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
return vehicleMessageRepository.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
public int countByUserId(Long userId) {
|
||||
return vehicleMessageRepository.countByUserId(userId);
|
||||
}
|
||||
}
|
||||
|
|
@ -85,10 +85,15 @@ public class VehicleMessageServiceImpl implements VehicleMessageServiceI {
|
|||
VehicleMessageCO vehicleMessageCO = vehicleMessageQueryExe.infoByLicenceNo(licenceNo);
|
||||
return vehicleMessageCO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
return vehicleMessageQueryExe.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countByUserId(Long userId) {
|
||||
return vehicleMessageQueryExe.countByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public interface VehicleMessageServiceI {
|
|||
|
||||
|
||||
VehicleMessageCO infoByLicenceNo(String licenceNo );
|
||||
|
||||
|
||||
/**
|
||||
* 根据车牌号查询启用状态的数据数量
|
||||
* @param licenceNo 车牌号
|
||||
|
|
@ -43,4 +43,11 @@ public interface VehicleMessageServiceI {
|
|||
*/
|
||||
int countEnabledByLicenceNo(String licenceNo);
|
||||
|
||||
/**
|
||||
* 根据用户ID获取该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
int countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* 更新员工消息状态命令
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeMessageUpdateStatusCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "员工消息ID", name = "id", required = true)
|
||||
@NotNull(message = "员工消息ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "状态:0-停用 1-启用", name = "status", required = true)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
package com.zcloud.primeport.dto.clientobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -6,15 +6,15 @@ import lombok.Data;
|
|||
* 车辆状态数据传输对象
|
||||
*/
|
||||
@Data
|
||||
public class VehicleStatusDTO {
|
||||
|
||||
public class VehicleStatusCO {
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String licenceNo;
|
||||
|
||||
|
||||
/**
|
||||
* 启用状态车辆数量
|
||||
*/
|
||||
private int enabledCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.primeport.domain.gateway;
|
||||
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.VehicleAddCheckResultDTO;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
|
|
@ -41,7 +42,10 @@ public interface VehicleMessageGateway {
|
|||
|
||||
/**
|
||||
* 根据用户ID获取这个用户有多少车辆
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量
|
||||
*/
|
||||
Integer countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,5 +72,10 @@ public class VehicleMessageGatewayImpl implements VehicleMessageGateway {
|
|||
return vehicleMessageRepository.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByUserId(Long userId) {
|
||||
return vehicleMessageRepository.countByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,11 @@ public interface VehicleMessageRepository extends BaseRepository<VehicleMessageD
|
|||
*/
|
||||
int countEnabledByLicenceNo(String licenceNo);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
int countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -83,4 +83,13 @@ public class VehicleMessageRepositoryImpl extends BaseRepositoryImpl<VehicleMess
|
|||
return vehicleMessageMapper.selectCount(queryWrapper).intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countByUserId(Long userId) {
|
||||
QueryWrapper<VehicleMessageDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("employee_vehicle_user_id", userId);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
queryWrapper.eq("is_status", 1);
|
||||
return vehicleMessageMapper.selectCount(queryWrapper).intValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue