Compare commits
6 Commits
c2b52adacc
...
429446edb7
| Author | SHA1 | Date |
|---|---|---|
|
|
429446edb7 | |
|
|
679297530d | |
|
|
414f481fce | |
|
|
2f155e0957 | |
|
|
6ad47732ee | |
|
|
80755ced13 |
|
|
@ -0,0 +1,86 @@
|
|||
package com.zcloud.primeport.web;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.primeport.api.EmployeeMessageServiceI;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessagePageQry;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
/**
|
||||
* web-adapter
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Api(tags = "用户的进入一级口门的信息")
|
||||
@RequestMapping("/${application.gateway}/employeeMessage")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageController {
|
||||
private final EmployeeMessageServiceI employeeMessageService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<EmployeeMessageCO> add(@Validated @RequestBody EmployeeMessageAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
return employeeMessageService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<EmployeeMessageCO> page(@RequestBody EmployeeMessagePageQry qry) {
|
||||
return employeeMessageService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<EmployeeMessageCO> listAll() {
|
||||
return MultiResponse.of(new ArrayList<EmployeeMessageCO>());
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<EmployeeMessageCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(employeeMessageService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
employeeMessageService.remove(id);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
employeeMessageService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody EmployeeMessageUpdateCmd employeeMessageUpdateCmd) {
|
||||
employeeMessageService.edit(employeeMessageUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("更新状态")
|
||||
@PutMapping("/updateStatus")
|
||||
public SingleResponse updateStatus(@Validated @RequestBody EmployeeMessageUpdateStatusCmd cmd) {
|
||||
employeeMessageService.updateStatus(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
|
@ -89,5 +89,7 @@ public class VehicleMessageController {
|
|||
return SingleResponse.of(infoById);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.primeport.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageAddExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(EmployeeMessageAddCmd cmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
BeanUtils.copyProperties(cmd, employeeMessageE);
|
||||
boolean res = false;
|
||||
try {
|
||||
res = employeeMessageGateway.add(employeeMessageE);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageRemoveExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = employeeMessageGateway.deletedEmployeeMessageById(id);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = employeeMessageGateway.deletedEmployeeMessageByIds(ids);
|
||||
if(!res){
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.zcloud.primeport.command;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageUpdateExe {
|
||||
private final EmployeeMessageGateway employeeMessageGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(EmployeeMessageUpdateCmd employeeMessageUpdateCmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
BeanUtils.copyProperties(employeeMessageUpdateCmd, employeeMessageE);
|
||||
boolean res = employeeMessageGateway.update(employeeMessageE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(EmployeeMessageUpdateStatusCmd cmd) {
|
||||
EmployeeMessageE employeeMessageE = new EmployeeMessageE();
|
||||
employeeMessageE.setId(cmd.getId());
|
||||
employeeMessageE.setStatus(cmd.getStatus());
|
||||
boolean res = employeeMessageGateway.updateStatus(employeeMessageE);
|
||||
if (!res) {
|
||||
throw new BizException("状态更新失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,9 +7,11 @@ import com.zcloud.primeport.domain.gateway.VehicleBlackGateway;
|
|||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditLogE;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.VehicleAddCheckResultDTO;
|
||||
import com.zcloud.primeport.dto.VehicleMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessageForCorpAddCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.val;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -17,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
|
|
@ -32,6 +35,10 @@ public class VehicleMessageAddExe {
|
|||
public boolean execute(VehicleMessageAddCmd cmd) {
|
||||
VehicleMessageE examTypeE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
|
||||
// 检查是否可以添加车辆
|
||||
|
||||
|
||||
boolean res = false;
|
||||
try {
|
||||
VehicleMessageE add = vehicleMessageGateway.add(examTypeE);
|
||||
|
|
@ -55,8 +62,13 @@ public class VehicleMessageAddExe {
|
|||
* 1.判断是否重复
|
||||
* 2.判断是否在黑名单中
|
||||
*/
|
||||
VehicleMessageE infoByLicenceNo = vehicleMessageGateway.getInfoByLicenceNo(examTypeE.getLicenceNo());
|
||||
if (infoByLicenceNo != null){
|
||||
// VehicleMessageE infoByLicenceNo = vehicleMessageGateway.getInfoByLicenceNo(examTypeE.getLicenceNo());
|
||||
// if (infoByLicenceNo != null){
|
||||
// throw new BizException("车辆已存在");
|
||||
// }
|
||||
|
||||
Integer licenceNoCount = vehicleMessageGateway.countEnabledByLicenceNo(examTypeE.getLicenceNo());
|
||||
if (licenceNoCount > 0){
|
||||
throw new BizException("车辆已存在");
|
||||
}
|
||||
VehicleMessageE add = vehicleMessageGateway.add(examTypeE);
|
||||
|
|
@ -76,4 +88,3 @@ public class VehicleMessageAddExe {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,10 @@ import com.zcloud.primeport.domain.model.VehicleMessageE;
|
|||
import com.zcloud.primeport.dto.VehicleMessageStatusCmd;
|
||||
import com.zcloud.primeport.dto.VehicleMessageUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.val;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
|
|
@ -43,19 +40,20 @@ public class VehicleMessageUpdateExe {
|
|||
public void executeFormCorp(VehicleMessageUpdateCmd vehicleMessageUpdateCmd) {
|
||||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(vehicleMessageUpdateCmd, vehicleMessageE);
|
||||
vehicleMessageE.updateFromCorp(vehicleMessageE); //车辆状态变成不通过
|
||||
VehicleMessageE infoById = vehicleMessageGateway.getInfoById(vehicleMessageUpdateCmd.getId());
|
||||
if (infoById == null){
|
||||
throw new BizException("车辆信息不存在");
|
||||
}
|
||||
if (infoById.getIsAudit() != 2){
|
||||
throw new BizException("车辆信息正在审核");
|
||||
}
|
||||
vehicleMessageE.updateFromCorp(vehicleMessageE); //修改车辆时候,初始化车辆信息
|
||||
|
||||
// VehicleMessageE infoById = vehicleMessageGateway.getInfoById(vehicleMessageUpdateCmd.getId());
|
||||
// if (infoById == null){
|
||||
// throw new BizException("车辆信息不存在");
|
||||
// }
|
||||
// if (infoById.getIsAudit() != 2){
|
||||
// throw new BizException("车辆信息正在审核");
|
||||
// }
|
||||
boolean res = vehicleMessageGateway.update(vehicleMessageE); //修改车辆信息
|
||||
if (!Tools.isEmpty(vehicleMessageUpdateCmd.getApprovalUserId())){ //新增一个审批记录
|
||||
VehicleAuditLogE vehicleAuditLogE = new VehicleAuditLogE();
|
||||
BeanUtils.copyProperties(vehicleMessageUpdateCmd, vehicleAuditLogE);
|
||||
vehicleAuditLogE.addForVehicleLog(vehicleAuditLogE,vehicleMessageUpdateCmd.getId(),2); // 添加审批信息
|
||||
// vehicleAuditLogE.addForVehicleLog(vehicleAuditLogE,vehicleMessageUpdateCmd.getId(),2); // 添加审批信息
|
||||
res = vehicleAuditLogGateway.add(vehicleAuditLogE); // 添加审批信息
|
||||
}
|
||||
if (!res) {
|
||||
|
|
@ -69,10 +67,26 @@ public class VehicleMessageUpdateExe {
|
|||
VehicleMessageE vehicleMessageE = new VehicleMessageE();
|
||||
BeanUtils.copyProperties(statusCmd, vehicleMessageE);
|
||||
vehicleMessageE.updateFromCorp(vehicleMessageE);
|
||||
boolean res = vehicleMessageGateway.update(vehicleMessageE);
|
||||
boolean res = false;
|
||||
if (statusCmd.getIsStatus() == 0){ //
|
||||
val licenceNo = vehicleMessageGateway.countEnabledByLicenceNo(vehicleMessageE.getLicenceNo());
|
||||
if (licenceNo > 0){
|
||||
throw new BizException("车辆已存在");
|
||||
}
|
||||
val countByUserId = vehicleMessageGateway.countByUserId(vehicleMessageE.getEmployeeVehicleUserId());
|
||||
if (countByUserId >= 2){
|
||||
throw new BizException("你已经添加两个车辆了.请先停用后在启用.");
|
||||
}
|
||||
res = vehicleMessageGateway.update(vehicleMessageE);
|
||||
}else if (statusCmd.getIsStatus() == 1){
|
||||
res = vehicleMessageGateway.update(vehicleMessageE); //如果是车辆停工,就直接修改车辆状态
|
||||
}else {
|
||||
throw new BizException("车辆状态错误");
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.zcloud.primeport.command.convertor;
|
||||
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface EmployeeMessageCoConvertor {
|
||||
/**
|
||||
* @param employeeMessageDOs
|
||||
* @return
|
||||
*/
|
||||
List<EmployeeMessageCO> converDOsToCOs(List<EmployeeMessageDO> employeeMessageDOs);
|
||||
|
||||
EmployeeMessageCO converDOToCO(EmployeeMessageDO employeeMessageDO);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.zcloud.primeport.command.query;
|
||||
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.zcloud.primeport.command.convertor.EmployeeMessageCoConvertor;
|
||||
import com.zcloud.primeport.dto.EmployeeMessagePageQry;
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import com.zcloud.primeport.persistence.repository.EmployeeMessageRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageQueryExe {
|
||||
private final EmployeeMessageRepository employeeMessageRepository;
|
||||
private final EmployeeMessageCoConvertor employeeMessageCoConvertor;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmployeeMessageCO queryById(Long id) {
|
||||
return employeeMessageCoConvertor.converDOToCO(employeeMessageRepository.getById(id));
|
||||
}
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param employeeMessagePageQry
|
||||
* @return
|
||||
*/
|
||||
public PageResponse<EmployeeMessageCO> execute(EmployeeMessagePageQry employeeMessagePageQry) {
|
||||
Map<String,Object> params = PageQueryHelper.toHashMap(employeeMessagePageQry);
|
||||
PageResponse<EmployeeMessageDO> pageResponse = employeeMessageRepository.listPage(params);
|
||||
List<EmployeeMessageCO> examCenterCOS = employeeMessageCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -75,5 +75,40 @@ public class VehicleMessageQueryExe {
|
|||
VehicleMessageCO vehicleMessageCO = vehicleMessageCoConvertor.converDOsToCOs(info);
|
||||
return vehicleMessageCO;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车牌号查询启用状态的数据数量
|
||||
* @param licenceNo 车牌号
|
||||
* @return 启用状态的数据数量,如果没有则返回0
|
||||
*/
|
||||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
return vehicleMessageRepository.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
public int countByUserId(Long userId) {
|
||||
return vehicleMessageRepository.countByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可以添加数量
|
||||
* @param licenceNo
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public Boolean isJudgmentAdd(String licenceNo, Long userId){
|
||||
boolean res = false;
|
||||
if (countEnabledByLicenceNo(licenceNo) > 0) {
|
||||
throw new RuntimeException("车牌号已存在");
|
||||
}
|
||||
if (countByUserId(userId) >= 2) {
|
||||
throw new RuntimeException("你已经启用两台处理,请先禁用一个");
|
||||
}
|
||||
res = true;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
package com.zcloud.primeport.service;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.primeport.api.EmployeeMessageServiceI;
|
||||
import com.zcloud.primeport.command.EmployeeMessageAddExe;
|
||||
import com.zcloud.primeport.command.EmployeeMessageRemoveExe;
|
||||
import com.zcloud.primeport.command.EmployeeMessageUpdateExe;
|
||||
import com.zcloud.primeport.command.query.EmployeeMessageQueryExe;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessagePageQry;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageServiceImpl implements EmployeeMessageServiceI {
|
||||
private final EmployeeMessageAddExe employeeMessageAddExe;
|
||||
private final EmployeeMessageUpdateExe employeeMessageUpdateExe;
|
||||
private final EmployeeMessageRemoveExe employeeMessageRemoveExe;
|
||||
private final EmployeeMessageQueryExe employeeMessageQueryExe;
|
||||
|
||||
@Override
|
||||
public EmployeeMessageCO queryById(Long id){
|
||||
return employeeMessageQueryExe.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<EmployeeMessageCO> listPage(EmployeeMessagePageQry qry){
|
||||
|
||||
return employeeMessageQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(EmployeeMessageAddCmd cmd) {
|
||||
|
||||
employeeMessageAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(EmployeeMessageUpdateCmd employeeMessageUpdateCmd) {
|
||||
employeeMessageUpdateExe.execute(employeeMessageUpdateCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(EmployeeMessageUpdateStatusCmd cmd) {
|
||||
employeeMessageUpdateExe.execute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
employeeMessageRemoveExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
employeeMessageRemoveExe.execute(ids);
|
||||
}
|
||||
}
|
||||
|
|
@ -86,5 +86,14 @@ public class VehicleMessageServiceImpl implements VehicleMessageServiceI {
|
|||
return vehicleMessageCO;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
return vehicleMessageQueryExe.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countByUserId(Long userId) {
|
||||
return vehicleMessageQueryExe.countByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.zcloud.primeport.api;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageAddCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessagePageQry;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateCmd;
|
||||
import com.zcloud.primeport.dto.EmployeeMessageUpdateStatusCmd;
|
||||
import com.zcloud.primeport.dto.clientobject.EmployeeMessageCO;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
public interface EmployeeMessageServiceI {
|
||||
EmployeeMessageCO queryById(Long id);
|
||||
|
||||
PageResponse<EmployeeMessageCO> listPage(EmployeeMessagePageQry qry);
|
||||
|
||||
SingleResponse<EmployeeMessageCO> add(EmployeeMessageAddCmd cmd);
|
||||
|
||||
void edit(EmployeeMessageUpdateCmd cmd);
|
||||
|
||||
void updateStatus(EmployeeMessageUpdateStatusCmd cmd);
|
||||
|
||||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
}
|
||||
|
|
@ -36,6 +36,18 @@ public interface VehicleMessageServiceI {
|
|||
|
||||
VehicleMessageCO infoByLicenceNo(String licenceNo );
|
||||
|
||||
/**
|
||||
* 根据车牌号查询启用状态的数据数量
|
||||
* @param licenceNo 车牌号
|
||||
* @return 启用状态的数据数量,如果没有则返回0
|
||||
*/
|
||||
int countEnabledByLicenceNo(String licenceNo);
|
||||
|
||||
/**
|
||||
* 根据用户ID获取该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
int countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageAddCmd extends Command {
|
||||
@ApiModelProperty(value = "用户ID", name = "userId", required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "是否有进入一级口门的权限(0-无权限;1有权限)", name = "isPermission", required = true)
|
||||
@NotNull(message = "是否有进入一级口门的权限(0-无权限;1有权限)不能为空")
|
||||
private Integer isPermission;
|
||||
|
||||
@ApiModelProperty(value = "是否有人脸权限", name = "isUserFace", required = true)
|
||||
@NotNull(message = "是否有人脸权限不能为空")
|
||||
private Integer isUserFace;
|
||||
|
||||
@ApiModelProperty(value = "可以进入的口门信息", name = "mkmjScope", required = true)
|
||||
@NotEmpty(message = "可以进入的口门信息不能为空")
|
||||
private String mkmjScope;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeMessagePageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private Long likeUserId;
|
||||
|
||||
private Long eqDepartmentId;
|
||||
|
||||
private String likeName;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.primeport.dto;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "id", name = "id", required = true)
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户ID", name = "userId", required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
@ApiModelProperty(value = "是否有进入一级口门的权限(0-无权限;1有权限)", name = "isPermission", required = true)
|
||||
@NotNull(message = "是否有进入一级口门的权限(0-无权限;1有权限)不能为空")
|
||||
private Integer isPermission;
|
||||
@ApiModelProperty(value = "是否有人脸权限", name = "isUserFace", required = true)
|
||||
@NotNull(message = "是否有人脸权限不能为空")
|
||||
private Integer isUserFace;
|
||||
@ApiModelProperty(value = "可以进入的口门信息", name = "mkmjScope", required = true)
|
||||
@NotEmpty(message = "可以进入的口门信息不能为空")
|
||||
private String mkmjScope;
|
||||
}
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -23,9 +23,6 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
public class MkmjApprovalUserAddCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "审批人类型", name = "userType", required = true)
|
||||
@NotNull(message = "审批人类型")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "审批人部门ID", name = "deptName", required = true)
|
||||
@NotEmpty(message = "审批人部门ID不能为空")
|
||||
|
|
@ -51,5 +48,16 @@ public class MkmjApprovalUserAddCmd extends Command {
|
|||
@ApiModelProperty(value = "企业id", name = "corpId", required = true)
|
||||
@NotNull(message = "企业id不能为空")
|
||||
private Long corpId;
|
||||
@ApiModelProperty( name = "isPersonnelPermission")
|
||||
@NotEmpty(message = "人员审核权限")
|
||||
Integer isPersonnelPermission;
|
||||
@ApiModelProperty( name = "isVehiclePermission")
|
||||
@NotEmpty(message = "车辆审核权限")
|
||||
Integer isVehiclePermission;
|
||||
@ApiModelProperty( name = "isTemporaryPermission")
|
||||
@NotEmpty(message = "临时审核权限")
|
||||
Integer isTemporaryPermission;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ public class MkmjApprovalUserPageQry extends PageQuery {
|
|||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeDeptName;
|
||||
/**
|
||||
* 查询类型 (口门门禁车辆审核人1; 临时访客审核人2)
|
||||
*/
|
||||
private String eqUserType;
|
||||
|
||||
|
||||
public String likeUserName;
|
||||
|
||||
public String likeName;
|
||||
|
|
@ -37,5 +33,4 @@ public class MkmjApprovalUserPageQry extends PageQuery {
|
|||
public String eqDeptId;
|
||||
|
||||
public String eqCorpId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -23,9 +23,6 @@ public class MkmjApprovalUserUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "主键ID", name = "id", required = true)
|
||||
@NotEmpty(message = "主键ID不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "审批人类型", name = "userType", required = true)
|
||||
@NotEmpty(message = "审批人类型")
|
||||
private Integer userType;
|
||||
@ApiModelProperty(value = "审批人部门ID", name = "deptName", required = true)
|
||||
@NotEmpty(message = "审批人部门ID不能为空")
|
||||
private String deptName;
|
||||
|
|
@ -53,6 +50,11 @@ public class MkmjApprovalUserUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "删除标识", name = "deleteEnum", required = true)
|
||||
@NotEmpty(message = "删除标识不能为空")
|
||||
private String deleteEnum;
|
||||
@ApiModelProperty(name = "isPersonnelPermission")
|
||||
private Integer isPersonnelPermission;
|
||||
@ApiModelProperty(name = "isVehiclePermission")
|
||||
private Integer isVehiclePermission;
|
||||
@ApiModelProperty(name = "isTemporaryPermission")
|
||||
private Integer isTemporaryPermission;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ public class VehicleMessageForCorpAddCmd extends Command {
|
|||
private Long corpId;
|
||||
@ApiModelProperty(value = "附件地址", name = "attachmentUrl", required = true)
|
||||
private String attachmentUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 审批信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ public class VehicleMessageStatusCmd extends Command {
|
|||
@ApiModelProperty(value = "id", name = "id", required = true)
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "进出港权限(1:有 2:无)", name = "mkmjPermission", required = true)
|
||||
@NotNull(message = "进出港权限(1:有 2:无)不能为空")
|
||||
@Min(value = 1, message = "进出港权限错误")
|
||||
@Max(value = 2, message = "进出港权限错误")
|
||||
private Integer mkmjPermission;
|
||||
@ApiModelProperty(value = "进出港权限(1:有 2:无)", name = "isStatus", required = true)
|
||||
@NotNull(message = "车辆状态(0未启用,1启用)")
|
||||
@Min(value = 0, message = "车辆状态错误")
|
||||
@Max(value = 2, message = "车辆状态错误")
|
||||
private Integer isStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.zcloud.primeport.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.sql.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeMessageCO extends ClientObject {
|
||||
//id
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
//用户ID
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
//是否有进入一级口门的权限(0-无权限;1有权限)
|
||||
@ApiModelProperty(value = "是否有进入一级口门的权限(0-无权限;1有权限)")
|
||||
private Integer isPermission;
|
||||
//是否有人脸权限
|
||||
@ApiModelProperty(value = "是否有人脸权限")
|
||||
private Integer isUserFace;
|
||||
//可以进入的口门信息
|
||||
@ApiModelProperty(value = "可以进入的口门信息")
|
||||
private String mkmjScope;
|
||||
//状态:0-停用 1-启用
|
||||
@ApiModelProperty(value = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
//删除标识
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
* 姓名
|
||||
* 岗位
|
||||
* 手机号
|
||||
* 车辆数 其他接口的获取车辆数接口
|
||||
* 门禁权限 (就是是否有进入一级口门的权限(0-无权限;1有权限))
|
||||
* 是否录入人脸 (是否有人脸权限)
|
||||
*/
|
||||
|
||||
// 部门
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String department;
|
||||
|
||||
// 姓名
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
// 岗位
|
||||
@ApiModelProperty(value = "岗位")
|
||||
private String post;
|
||||
|
||||
// 手机号
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
// 车辆数
|
||||
@ApiModelProperty(value = "车辆数")
|
||||
private Integer vehicleCount;
|
||||
}
|
||||
|
|
@ -17,9 +17,6 @@ public class MkmjApprovalUserCO extends ClientObject {
|
|||
//主键ID
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
//审批类型(口门门禁车辆审核人1;临时访客审核人2)
|
||||
@ApiModelProperty(value = "审批类型(口门门禁车辆审核人1;临时访客审核人2)")
|
||||
private Integer userType;
|
||||
//审批人部门ID
|
||||
@ApiModelProperty(value = "审批人部门ID")
|
||||
private String deptName;
|
||||
|
|
@ -47,6 +44,14 @@ public class MkmjApprovalUserCO extends ClientObject {
|
|||
//删除标识
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
//人员审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "人员审核权限(0-无权限,1-有权限)")
|
||||
private Integer isPersonnelPermission;
|
||||
//车辆审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "车辆审核权限(0-无权限,1-有权限)")
|
||||
private Integer isVehiclePermission;
|
||||
//临时审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "临时审核权限(0-无权限,1-有权限)")
|
||||
private Integer isTemporaryPermission;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.zcloud.primeport.dto.clientobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 车辆状态数据传输对象
|
||||
*/
|
||||
@Data
|
||||
public class VehicleStatusCO {
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String licenceNo;
|
||||
|
||||
/**
|
||||
* 启用状态车辆数量
|
||||
*/
|
||||
private int enabledCount;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.zcloud.primeport.domain.gateway;
|
||||
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
public interface EmployeeMessageGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(EmployeeMessageE employeeMessageE) ;
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(EmployeeMessageE employeeMessageE);
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
*/
|
||||
Boolean updateStatus(EmployeeMessageE employeeMessageE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedEmployeeMessageById(Long id);
|
||||
Boolean deletedEmployeeMessageByIds(Long[] id);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -37,5 +38,13 @@ public interface VehicleMessageGateway {
|
|||
*/
|
||||
VehicleMessageE getInfoByLicenceNo(String licenceNo);
|
||||
|
||||
}
|
||||
Integer countEnabledByLicenceNo(String licenceNo);
|
||||
|
||||
/**
|
||||
* 根据用户ID获取这个用户有多少车辆
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量
|
||||
*/
|
||||
Integer countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.zcloud.primeport.domain.model;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import lombok.Data;
|
||||
/**
|
||||
* web-domain
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeMessageE extends BaseE {
|
||||
//用户ID
|
||||
private Long userId;
|
||||
//是否有进入一级口门的权限(0-无权限;1有权限)
|
||||
private Integer isPermission;
|
||||
//是否有人脸权限
|
||||
private Integer isUserFace;
|
||||
//可以进入的口门信息
|
||||
private String mkmjScope;
|
||||
//状态:0-停用 1-启用
|
||||
private Integer status;
|
||||
}
|
||||
|
|
@ -31,9 +31,12 @@ public class MkmjApprovalUserE extends BaseE {
|
|||
private Long corpId;
|
||||
//删除标识
|
||||
private String deleteEnum;
|
||||
//审批人类型
|
||||
private Integer userType;
|
||||
//人员审核权限(0-无权限,1-有权限)
|
||||
private Integer isPersonnelPermission;
|
||||
//车辆审核权限(0-无权限,1-有权限)
|
||||
private Integer isVehiclePermission;
|
||||
//临时审核权限(0-无权限,1-有权限)
|
||||
private Integer isTemporaryPermission;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.zcloud.primeport.domain.gateway.EmployeeMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.EmployeeMessageE;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import com.zcloud.primeport.persistence.repository.EmployeeMessageRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class EmployeeMessageGatewayImpl implements EmployeeMessageGateway {
|
||||
private final EmployeeMessageRepository employeeMessageRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(EmployeeMessageE employeeMessageE) {
|
||||
EmployeeMessageDO d = new EmployeeMessageDO();
|
||||
BeanUtils.copyProperties(employeeMessageE, d);
|
||||
employeeMessageRepository.save(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(EmployeeMessageE employeeMessageE) {
|
||||
EmployeeMessageDO d = new EmployeeMessageDO();
|
||||
BeanUtils.copyProperties(employeeMessageE, d);
|
||||
employeeMessageRepository.updateById(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateStatus(EmployeeMessageE employeeMessageE) {
|
||||
EmployeeMessageDO d = new EmployeeMessageDO();
|
||||
d.setId(employeeMessageE.getId());
|
||||
d.setStatus(employeeMessageE.getStatus());
|
||||
employeeMessageRepository.updateById(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedEmployeeMessageById(Long id) {
|
||||
return employeeMessageRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedEmployeeMessageByIds(Long[] ids) {
|
||||
return employeeMessageRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ public class MkmjApprovalUserGatewayImpl implements MkmjApprovalUserGateway {
|
|||
public Boolean deletedMkmjApprovalUserById(Long id) {
|
||||
MkmjApprovalUserDO d = new MkmjApprovalUserDO();
|
||||
d.setDeleteEnum("TRUE");
|
||||
d.setId( id);
|
||||
d.setId(id);
|
||||
return mkmjApprovalUserRepository.updateById(d);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.zcloud.primeport.gatewayimpl;
|
|||
|
||||
import com.zcloud.primeport.domain.gateway.VehicleMessageGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleMessageE;
|
||||
import com.zcloud.primeport.dto.VehicleAddCheckResultDTO;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleMessageRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -67,5 +68,17 @@ public class VehicleMessageGatewayImpl implements VehicleMessageGateway {
|
|||
BeanUtils.copyProperties(repositoryOne, vehicleMessageE);
|
||||
return vehicleMessageE;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countEnabledByLicenceNo(String licenceNo) {
|
||||
return vehicleMessageRepository.countEnabledByLicenceNo(licenceNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByUserId(Long userId) {
|
||||
return vehicleMessageRepository.countByUserId(userId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
@TableName("employee_message")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
public class EmployeeMessageDO extends BaseDO {
|
||||
//用户ID
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
//是否有进入一级口门的权限(0-无权限;1有权限)
|
||||
@ApiModelProperty(value = "是否有进入一级口门的权限(0-无权限;1有权限)")
|
||||
private Integer isPermission;
|
||||
//是否有人脸权限
|
||||
@ApiModelProperty(value = "是否有人脸权限")
|
||||
private Integer isUserFace;
|
||||
//可以进入的口门信息
|
||||
@ApiModelProperty(value = "可以进入的口门信息")
|
||||
private String mkmjScope;
|
||||
//状态:0-停用 1-启用
|
||||
@ApiModelProperty(value = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
// 部门
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String department;
|
||||
|
||||
// 姓名
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
// 岗位
|
||||
@ApiModelProperty(value = "岗位")
|
||||
private String post;
|
||||
|
||||
// 手机号
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
// 车辆数
|
||||
@ApiModelProperty(value = "车辆数")
|
||||
private Integer vehicleCount;
|
||||
|
||||
// public EmployeeMessageDO(String ) {
|
||||
// this. = ;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -25,9 +25,6 @@ public class MkmjApprovalUserDO extends BaseDO {
|
|||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
//审批人类型
|
||||
@ApiModelProperty(value = "审批人类型")
|
||||
private Integer userType;
|
||||
//审批人部门ID
|
||||
@ApiModelProperty(value = "审批人部门ID")
|
||||
private String deptName;
|
||||
|
|
@ -52,6 +49,15 @@ public class MkmjApprovalUserDO extends BaseDO {
|
|||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpId;
|
||||
//人员审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "人员审核权限(0-无权限,1-有权限)")
|
||||
private Integer isPersonnelPermission;
|
||||
//车辆审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "车辆审核权限(0-无权限,1-有权限)")
|
||||
private Integer isVehiclePermission;
|
||||
//临时审核权限(0-无权限,1-有权限)
|
||||
@ApiModelProperty(value = "临时审核权限(0-无权限,1-有权限)")
|
||||
private Integer isTemporaryPermission;
|
||||
//删除标识
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
|
|
@ -59,4 +65,3 @@ public class MkmjApprovalUserDO extends BaseDO {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,153 @@
|
|||
package com.zcloud.primeport.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* User视图DO类
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Data
|
||||
@TableName("user")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserViewDO extends BaseDO {
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "企业ID")
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "主企业标识")
|
||||
private String mainCorpFlag;
|
||||
|
||||
@ApiModelProperty(value = "用户类型")
|
||||
private String userType;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private Long departmentId;
|
||||
|
||||
@ApiModelProperty(value = "岗位ID")
|
||||
private Long postId;
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "人员类型")
|
||||
private String personnelType;
|
||||
|
||||
@ApiModelProperty(value = "人员类型名称")
|
||||
private String personnelTypeName;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty(value = "民族名称")
|
||||
private String nationName;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String userIdCard;
|
||||
|
||||
@ApiModelProperty(value = "头像URL")
|
||||
private String userAvatarUrl;
|
||||
|
||||
@ApiModelProperty(value = "当前地址")
|
||||
private String currentAddress;
|
||||
|
||||
@ApiModelProperty(value = "定位地址")
|
||||
private String locationAddress;
|
||||
|
||||
@ApiModelProperty(value = "职级")
|
||||
private String rankLevel;
|
||||
|
||||
@ApiModelProperty(value = "职级名称")
|
||||
private String rankLevelName;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "创建人ID")
|
||||
private Long createId;
|
||||
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新人ID")
|
||||
private Long updateId;
|
||||
|
||||
@ApiModelProperty(value = "更新人姓名")
|
||||
private String updateName;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "删除标识")
|
||||
private String deleteEnum;
|
||||
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "环境")
|
||||
private String env;
|
||||
|
||||
@ApiModelProperty(value = "部门负责人标识")
|
||||
private String departmentLeaderFlag;
|
||||
|
||||
@ApiModelProperty(value = "副职领导标识")
|
||||
private String deputyLeaderFlag;
|
||||
|
||||
@ApiModelProperty(value = "文化程度")
|
||||
private String culturalLevel;
|
||||
|
||||
@ApiModelProperty(value = "文化程度名称")
|
||||
private String culturalLevelName;
|
||||
|
||||
@ApiModelProperty(value = "婚姻状况")
|
||||
private String maritalStatus;
|
||||
|
||||
@ApiModelProperty(value = "婚姻状况名称")
|
||||
private String maritalStatusName;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌")
|
||||
private String politicalAffiliation;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌名称")
|
||||
private String politicalAffiliationName;
|
||||
|
||||
@ApiModelProperty(value = "在职标识")
|
||||
private String employmentFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* 自定义EmployeeMessageMapper接口,用于复杂查询
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Mapper
|
||||
public interface EmployeeMessageCustomMapper extends BaseMapper<EmployeeMessageDO> {
|
||||
|
||||
/**
|
||||
* 通过user视图和employee_message表关联查询分页数据
|
||||
* @param page 分页参数
|
||||
* @param params 查询参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
IPage<EmployeeMessageDO> selectPageFromUserView(IPage<EmployeeMessageDO> page, @Param("params") Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Mapper
|
||||
public interface EmployeeMessageMapper extends BaseMapper<EmployeeMessageDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.primeport.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.primeport.persistence.dataobject.UserViewDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* User视图Mapper接口
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:14
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserViewMapper extends BaseMapper<UserViewDO> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.primeport.persistence.repository;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
public interface EmployeeMessageRepository extends BaseRepository<EmployeeMessageDO> {
|
||||
PageResponse<EmployeeMessageDO> listPage(Map<String,Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -28,5 +28,19 @@ public interface VehicleMessageRepository extends BaseRepository<VehicleMessageD
|
|||
VehicleMessageDO getByLicenceNo(String licenceNo);
|
||||
|
||||
PageResponse<VehicleCountFromViolationsDO> listPageFromViolations(Map<String,Object> parmas);
|
||||
|
||||
/**
|
||||
* 根据车牌号查询启用状态的数据数量
|
||||
* @param licenceNo 车牌号
|
||||
* @return 启用状态的数据数量,如果没有则返回0
|
||||
*/
|
||||
int countEnabledByLicenceNo(String licenceNo);
|
||||
|
||||
}
|
||||
/**
|
||||
* 根据用户ID查询该用户的车辆数量
|
||||
* @param userId 用户ID
|
||||
* @return 车辆数量,如果没有则返回0
|
||||
*/
|
||||
int countByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.primeport.persistence.repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleMessageDO;
|
||||
import com.zcloud.primeport.persistence.mapper.VehicleMessageMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 车辆状态仓储类
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class VehicleStatusRepository {
|
||||
|
||||
private final VehicleMessageMapper vehicleMessageMapper;
|
||||
|
||||
/**
|
||||
* 根据车牌号统计启用状态的车辆数量
|
||||
* @param licenceNo 车牌号
|
||||
* @return 启用状态的车辆数量
|
||||
*/
|
||||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
QueryWrapper<VehicleMessageDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("licence_no", licenceNo);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
// 假设 isAudit 值为 2(审核通过)时表示启用状态
|
||||
queryWrapper.eq("is_audit", 2);
|
||||
return vehicleMessageMapper.selectCount(queryWrapper).intValue();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.primeport.persistence.repository.impl;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO;
|
||||
import com.zcloud.primeport.persistence.mapper.EmployeeMessageCustomMapper;
|
||||
import com.zcloud.primeport.persistence.mapper.EmployeeMessageMapper;
|
||||
import com.zcloud.primeport.persistence.repository.EmployeeMessageRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author guoyuepeng
|
||||
* @Date 2025-12-18 14:32:15
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EmployeeMessageRepositoryImpl extends BaseRepositoryImpl<EmployeeMessageMapper, EmployeeMessageDO> implements EmployeeMessageRepository {
|
||||
private final EmployeeMessageMapper employeeMessageMapper;
|
||||
private final EmployeeMessageCustomMapper employeeMessageCustomMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<EmployeeMessageDO> listPage(Map<String,Object> params) {
|
||||
IPage<EmployeeMessageDO> iPage = new Query<EmployeeMessageDO>().getPage(params);
|
||||
// 使用自定义Mapper通过user视图和employee_message表关联查询
|
||||
IPage<EmployeeMessageDO> result = employeeMessageCustomMapper.selectPageFromUserView(iPage, params);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ public class MkmjApprovalUserRepositoryImpl extends BaseRepositoryImpl<MkmjAppro
|
|||
IPage<MkmjApprovalUserDO> iPage = new Query<MkmjApprovalUserDO>().getPage(parmas);
|
||||
QueryWrapper<MkmjApprovalUserDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("dept_id");
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<MkmjApprovalUserDO> result = mkmjApprovalUserMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
|
|
|
|||
|
|
@ -73,6 +73,23 @@ public class VehicleMessageRepositoryImpl extends BaseRepositoryImpl<VehicleMess
|
|||
return PageHelper.pageToResponse(iPage, iPage.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countEnabledByLicenceNo(String licenceNo) {
|
||||
QueryWrapper<VehicleMessageDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("licence_no", licenceNo);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
// 假设 isAudit 值为 2(审核通过)时表示启用状态
|
||||
queryWrapper.eq("is_status", 1);
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.EmployeeMessageCustomMapper">
|
||||
|
||||
<!-- 通过user视图和employee_message表关联查询分页数据 -->
|
||||
<select id="selectPageFromUserView" resultType="com.zcloud.primeport.persistence.dataobject.EmployeeMessageDO">
|
||||
SELECT
|
||||
u.id,
|
||||
u.user_id AS userId,
|
||||
u.username,
|
||||
u.name,
|
||||
u.department_id AS department, <!-- 映射部门ID到department字段 -->
|
||||
u.post_id AS post, <!-- 映射岗位ID到post字段 -->
|
||||
u.phone AS phoneNumber, <!-- 映射电话号码到phoneNumber字段 -->
|
||||
u.corpinfo_id AS corpinfoId,
|
||||
u.main_corp_flag AS mainCorpFlag,
|
||||
u.user_type AS userType,
|
||||
u.department_id AS departmentId,
|
||||
u.post_id AS postId,
|
||||
u.role_id AS roleId,
|
||||
u.email,
|
||||
u.personnel_type A
|
||||
u.phone,S personnelType,
|
||||
u.personnel_type_name AS personnelTypeName,
|
||||
u.nation,
|
||||
u.nation_name AS nationName,
|
||||
u.user_id_card AS userIdCard,
|
||||
u.user_avatar_url AS userAvatarUrl,
|
||||
u.current_address AS currentAddress,
|
||||
u.location_address AS locationAddress,
|
||||
u.rank_level AS rankLevel,
|
||||
u.rank_level_name AS rankLevelName,
|
||||
u.sort,
|
||||
u.version,
|
||||
u.create_id AS createId,
|
||||
u.create_name AS createName,
|
||||
u.create_time AS createTime,
|
||||
u.update_id AS updateId,
|
||||
u.update_name AS updateName,
|
||||
u.update_time AS updateTime,
|
||||
u.remarks,
|
||||
u.delete_enum AS deleteEnum,
|
||||
u.tenant_id AS tenantId,
|
||||
u.org_id AS orgId,
|
||||
u.env,
|
||||
u.department_leader_flag AS departmentLeaderFlag,
|
||||
u.deputy_leader_flag AS deputyLeaderFlag,
|
||||
u.cultural_level AS culturalLevel,
|
||||
u.cultural_level_name AS culturalLevelName,
|
||||
u.marital_status AS maritalStatus,
|
||||
u.marital_status_name AS maritalStatusName,
|
||||
u.political_affiliation AS politicalAffiliation,
|
||||
u.political_affiliation_name AS politicalAffiliationName,
|
||||
u.employment_flag AS employmentFlag,
|
||||
em.is_permission AS isPermission,
|
||||
em.is_user_face AS isUserFace,
|
||||
em.mkmj_scope AS mkmjScope,
|
||||
em.is_permission AS accessPermission, <!-- 将isPermission映射到accessPermission字段 -->
|
||||
em.is_user_face AS faceRegistered <!-- 将isUserFace映射到faceRegistered字段 -->
|
||||
FROM user u
|
||||
LEFT JOIN employee_message em ON u.id = em.user_id
|
||||
WHERE u.delete_enum = 'FALSE'
|
||||
<if test="params.likeName != null and params.likeName != ''">
|
||||
AND u.name LIKE CONCAT('%', #{params.likeName}, '%')
|
||||
</if>
|
||||
<if test="params.eqDepartmentId != null">
|
||||
AND u.department_id = #{params.eqDepartmentId}
|
||||
</if>
|
||||
<if test="params.eqCorpinfoId != null">
|
||||
AND u.corpinfo_id = #{params.eqCorpinfoId}
|
||||
</if>
|
||||
ORDER BY u.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.primeport.persistence.mapper.EmployeeMessageMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : GBS数据库
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80038 (8.0.38)
|
||||
Source Host : 192.168.20.100:33080
|
||||
Source Schema : zcloud-gbs-primeport
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80038 (8.0.38)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 18/12/2025 15:08:25
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for employee_message
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `employee_message`;
|
||||
CREATE TABLE `employee_message` (
|
||||
`id` bigint NOT NULL COMMENT 'id',
|
||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户ID',
|
||||
`is_permission` int NULL DEFAULT NULL COMMENT '是否有进入一级口门的权限(0-无权限;1有权限)',
|
||||
`is_user_face` int NULL DEFAULT NULL COMMENT '是否有人脸权限',
|
||||
`mkmj_scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '可以进入的口门信息',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态:0-停用 1-启用',
|
||||
`delete_enum` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'FALSE' COMMENT '删除标识',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`create_id` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`update_id` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
`env` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'PROD' COMMENT '环境标识',
|
||||
`create_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人姓名',
|
||||
`update_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人姓名',
|
||||
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户ID',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织ID',
|
||||
`version` int NULL DEFAULT 0 COMMENT '版本号',
|
||||
`remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户的进入一级口门的信息' ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : GBS数据库
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80038 (8.0.38)
|
||||
Source Host : 192.168.20.100:33080
|
||||
Source Schema : zcloud-gbs-primeport
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80038 (8.0.38)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 18/12/2025 13:52:24
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for mkmj_approval_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mkmj_approval_user`;
|
||||
CREATE TABLE `mkmj_approval_user` (
|
||||
`id` bigint NOT NULL COMMENT '主键ID',
|
||||
`dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批人部门ID',
|
||||
`dept_id` bigint NULL DEFAULT NULL COMMENT '审批人部门',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批人姓名',
|
||||
`user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审批人',
|
||||
`user_id` bigint NULL DEFAULT NULL COMMENT '审批人名字',
|
||||
`corp_id` bigint NULL DEFAULT NULL COMMENT '企业id',
|
||||
`is_personnel_permission` tinyint NULL DEFAULT NULL COMMENT '人员审核权限(0-无权限,1-有权限)',
|
||||
`is_vehicle_permission` tinyint NULL DEFAULT NULL COMMENT '车辆审核权限(0-无权限,1-有权限)',
|
||||
`is_temporary_permission` tinyint NULL DEFAULT NULL COMMENT '临时审核权限(0-无权限,1-有权限)',
|
||||
`delete_enum` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'FALSE' COMMENT '删除标识',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`create_id` bigint NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`update_id` bigint NULL DEFAULT NULL COMMENT '更新人ID',
|
||||
`env` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'PROD' COMMENT '环境标识',
|
||||
`create_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人姓名',
|
||||
`update_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人姓名',
|
||||
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户ID',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织ID',
|
||||
`version` int NULL DEFAULT 0 COMMENT '版本号',
|
||||
`remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '一级口门门禁审批人' ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
SELECT
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`id` AS `id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`user_id` AS `user_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`username` AS `username`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`name` AS `name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`corpinfo_id` AS `corpinfo_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`main_corp_flag` AS `main_corp_flag`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`user_type` AS `user_type`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`department_id` AS `department_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`post_id` AS `post_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`role_id` AS `role_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`email` AS `email`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`phone` AS `phone`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`personnel_type` AS `personnel_type`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`personnel_type_name` AS `personnel_type_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`nation` AS `nation`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`nation_name` AS `nation_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`user_id_card` AS `user_id_card`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`user_avatar_url` AS `user_avatar_url`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`current_address` AS `current_address`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`location_address` AS `location_address`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`rank_level` AS `rank_level`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`rank_level_name` AS `rank_level_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`sort` AS `sort`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`version` AS `version`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`create_id` AS `create_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`create_name` AS `create_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`create_time` AS `create_time`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`update_id` AS `update_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`update_name` AS `update_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`update_time` AS `update_time`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`remarks` AS `remarks`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`delete_enum` AS `delete_enum`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`tenant_id` AS `tenant_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`org_id` AS `org_id`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`env` AS `env`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`department_leader_flag` AS `department_leader_flag`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`deputy_leader_flag` AS `deputy_leader_flag`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`cultural_level` AS `cultural_level`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`cultural_level_name` AS `cultural_level_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`marital_status` AS `marital_status`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`marital_status_name` AS `marital_status_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`political_affiliation` AS `political_affiliation`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`political_affiliation_name` AS `political_affiliation_name`,
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`employment_flag` AS `employment_flag`
|
||||
FROM
|
||||
`jjb-saas-zcloud-basic-info`.`user`
|
||||
WHERE
|
||||
(
|
||||
`jjb-saas-zcloud-basic-info`.`user`.`delete_enum` = 'FALSE')
|
||||
Loading…
Reference in New Issue