Compare commits
No commits in common. "3c84472af5d1f4195c0258a579f91693fc3a6b43" and "4324babb91f24e04b01793760a342321e79f0793" have entirely different histories.
3c84472af5
...
4324babb91
|
|
@ -1,81 +0,0 @@
|
||||||
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.InspectionDeptServiceI;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
|
||||||
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-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Api(tags = "检查部门表")
|
|
||||||
@RequestMapping("/${application.gateway}/inspectionDept")
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptController {
|
|
||||||
private final InspectionDeptServiceI inspectionDeptService;
|
|
||||||
|
|
||||||
@ApiOperation("新增")
|
|
||||||
@PostMapping("/save")
|
|
||||||
public SingleResponse<InspectionDeptCO> add(@Validated @RequestBody InspectionDeptAddCmd cmd) {
|
|
||||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
|
||||||
return inspectionDeptService.add(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("分页")
|
|
||||||
@PostMapping("/list")
|
|
||||||
public PageResponse<InspectionDeptCO> page(@RequestBody InspectionDeptPageQry qry) {
|
|
||||||
return inspectionDeptService.listPage(qry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("所有数据")
|
|
||||||
@GetMapping("/listAll")
|
|
||||||
public MultiResponse<InspectionDeptCO> listAll() {
|
|
||||||
return MultiResponse.of(new ArrayList<InspectionDeptCO>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("详情")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public SingleResponse<InspectionDeptCO> getInfoById(@PathVariable("id") Long id) {
|
|
||||||
return SingleResponse.of(new InspectionDeptCO());
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("删除")
|
|
||||||
@DeleteMapping("/{id}")
|
|
||||||
public Response remove(@PathVariable("id") Long id) {
|
|
||||||
inspectionDeptService.remove(id);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("删除多个")
|
|
||||||
@DeleteMapping("/ids")
|
|
||||||
public Response removeBatch(@RequestParam Long[] ids) {
|
|
||||||
inspectionDeptService.removeBatch(ids);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("修改")
|
|
||||||
@PutMapping("/edit")
|
|
||||||
public SingleResponse edit(@Validated @RequestBody InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
|
||||||
inspectionDeptService.edit(inspectionDeptUpdateCmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
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.InspectionVehicleServiceI;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehiclePageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
|
||||||
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-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Api(tags = "检查部门对应车辆表")
|
|
||||||
@RequestMapping("/${application.gateway}/inspectionVehicle")
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleController {
|
|
||||||
private final InspectionVehicleServiceI inspectionVehicleService;
|
|
||||||
|
|
||||||
@ApiOperation("新增")
|
|
||||||
@PostMapping("/save")
|
|
||||||
public SingleResponse<InspectionVehicleCO> add(@Validated @RequestBody InspectionVehicleAddCmd cmd) {
|
|
||||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
|
||||||
return inspectionVehicleService.add(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("分页")
|
|
||||||
@PostMapping("/list")
|
|
||||||
public PageResponse<InspectionVehicleCO> page(@RequestBody InspectionVehiclePageQry qry) {
|
|
||||||
return inspectionVehicleService.listPage(qry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("所有数据")
|
|
||||||
@GetMapping("/listAll")
|
|
||||||
public MultiResponse<InspectionVehicleCO> listAll() {
|
|
||||||
return MultiResponse.of(new ArrayList<InspectionVehicleCO>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("详情")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public SingleResponse<InspectionVehicleCO> getInfoById(@PathVariable("id") Long id) {
|
|
||||||
return SingleResponse.of(new InspectionVehicleCO());
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("删除")
|
|
||||||
@DeleteMapping("/{id}")
|
|
||||||
public Response remove(@PathVariable("id") Long id) {
|
|
||||||
inspectionVehicleService.remove(id);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("删除多个")
|
|
||||||
@DeleteMapping("/ids")
|
|
||||||
public Response removeBatch(@RequestParam Long[] ids) {
|
|
||||||
inspectionVehicleService.removeBatch(ids);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("修改")
|
|
||||||
@PutMapping("/edit")
|
|
||||||
public SingleResponse edit(@Validated @RequestBody InspectionVehicleUpdateCmd inspectionVehicleUpdateCmd) {
|
|
||||||
inspectionVehicleService.edit(inspectionVehicleUpdateCmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
|
||||||
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-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptAddExe {
|
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(InspectionDeptAddCmd cmd) {
|
|
||||||
InspectionDeptE examTypeE = new InspectionDeptE();
|
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
|
||||||
boolean res = false;
|
|
||||||
try {
|
|
||||||
res = inspectionDeptGateway.add(examTypeE);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("保存失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptRemoveExe {
|
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(Long id) {
|
|
||||||
boolean res = inspectionDeptGateway.deletedInspectionDeptById(id);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("删除失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(Long[] ids) {
|
|
||||||
boolean res = inspectionDeptGateway.deletedInspectionDeptByIds(ids);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("删除失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
|
||||||
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-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptUpdateExe {
|
|
||||||
private final InspectionDeptGateway inspectionDeptGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void execute(InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
|
||||||
InspectionDeptE inspectionDeptE = new InspectionDeptE();
|
|
||||||
BeanUtils.copyProperties(inspectionDeptUpdateCmd, inspectionDeptE);
|
|
||||||
boolean res = inspectionDeptGateway.update(inspectionDeptE);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("修改失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
|
||||||
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-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleAddExe {
|
|
||||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(InspectionVehicleAddCmd cmd) {
|
|
||||||
InspectionVehicleE examTypeE = new InspectionVehicleE();
|
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
|
||||||
boolean res = false;
|
|
||||||
try {
|
|
||||||
res = inspectionVehicleGateway.add(examTypeE);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("保存失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleRemoveExe {
|
|
||||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(Long id) {
|
|
||||||
boolean res = inspectionVehicleGateway.deletedInspectionVehicleById(id);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("删除失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(Long[] ids) {
|
|
||||||
boolean res = inspectionVehicleGateway.deletedInspectionVehicleByIds(ids);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("删除失败");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
package com.zcloud.primeport.command;
|
|
||||||
|
|
||||||
import com.alibaba.cola.exception.BizException;
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
|
||||||
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-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleUpdateExe {
|
|
||||||
private final InspectionVehicleGateway inspectionVehicleGateway;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void execute(InspectionVehicleUpdateCmd inspectionVehicleUpdateCmd) {
|
|
||||||
InspectionVehicleE inspectionVehicleE = new InspectionVehicleE();
|
|
||||||
BeanUtils.copyProperties(inspectionVehicleUpdateCmd, inspectionVehicleE);
|
|
||||||
boolean res = inspectionVehicleGateway.update(inspectionVehicleE);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("修改失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.zcloud.primeport.command.convertor;
|
|
||||||
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Mapper(componentModel = "spring")
|
|
||||||
public interface InspectionDeptCoConvertor {
|
|
||||||
/**
|
|
||||||
* @param inspectionDeptDOs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<InspectionDeptCO> converDOsToCOs(List<InspectionDeptDO> inspectionDeptDOs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.zcloud.primeport.command.convertor;
|
|
||||||
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Mapper(componentModel = "spring")
|
|
||||||
public interface InspectionVehicleCoConvertor {
|
|
||||||
/**
|
|
||||||
* @param inspectionVehicleDOs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<InspectionVehicleCO> converDOsToCOs(List<InspectionVehicleDO> inspectionVehicleDOs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
package com.zcloud.primeport.command.query;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|
||||||
import com.zcloud.primeport.command.convertor.InspectionDeptCoConvertor;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionDeptRepository;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptQueryExe {
|
|
||||||
private final InspectionDeptRepository inspectionDeptRepository;
|
|
||||||
private final InspectionDeptCoConvertor inspectionDeptCoConvertor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页
|
|
||||||
*
|
|
||||||
* @param inspectionDeptPageQry
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public PageResponse<InspectionDeptCO> execute(InspectionDeptPageQry inspectionDeptPageQry) {
|
|
||||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(inspectionDeptPageQry);
|
|
||||||
PageResponse<InspectionDeptDO> pageResponse = inspectionDeptRepository.listPage(parmas);
|
|
||||||
List<InspectionDeptCO> examCenterCOS = inspectionDeptCoConvertor.converDOsToCOs(pageResponse.getData());
|
|
||||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
package com.zcloud.primeport.command.query;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|
||||||
import com.zcloud.primeport.command.convertor.InspectionVehicleCoConvertor;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehiclePageQry;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleQueryExe {
|
|
||||||
private final InspectionVehicleRepository inspectionVehicleRepository;
|
|
||||||
private final InspectionVehicleCoConvertor inspectionVehicleCoConvertor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页
|
|
||||||
*
|
|
||||||
* @param inspectionVehiclePageQry
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public PageResponse<InspectionVehicleCO> execute(InspectionVehiclePageQry inspectionVehiclePageQry) {
|
|
||||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(inspectionVehiclePageQry);
|
|
||||||
PageResponse<InspectionVehicleDO> pageResponse = inspectionVehicleRepository.listPage(parmas);
|
|
||||||
List<InspectionVehicleCO> examCenterCOS = inspectionVehicleCoConvertor.converDOsToCOs(pageResponse.getData());
|
|
||||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
package com.zcloud.primeport.service;
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.zcloud.primeport.api.InspectionDeptServiceI;
|
|
||||||
import com.zcloud.primeport.command.InspectionDeptAddExe;
|
|
||||||
import com.zcloud.primeport.command.InspectionDeptRemoveExe;
|
|
||||||
import com.zcloud.primeport.command.InspectionDeptUpdateExe;
|
|
||||||
import com.zcloud.primeport.command.query.InspectionDeptQueryExe;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptServiceImpl implements InspectionDeptServiceI {
|
|
||||||
private final InspectionDeptAddExe inspectionDeptAddExe;
|
|
||||||
private final InspectionDeptUpdateExe inspectionDeptUpdateExe;
|
|
||||||
private final InspectionDeptRemoveExe inspectionDeptRemoveExe;
|
|
||||||
private final InspectionDeptQueryExe inspectionDeptQueryExe;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResponse<InspectionDeptCO> listPage(InspectionDeptPageQry qry) {
|
|
||||||
|
|
||||||
return inspectionDeptQueryExe.execute(qry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SingleResponse add(InspectionDeptAddCmd cmd) {
|
|
||||||
|
|
||||||
inspectionDeptAddExe.execute(cmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void edit(InspectionDeptUpdateCmd inspectionDeptUpdateCmd) {
|
|
||||||
inspectionDeptUpdateExe.execute(inspectionDeptUpdateCmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void remove(Long id) {
|
|
||||||
inspectionDeptRemoveExe.execute(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeBatch(Long[] ids) {
|
|
||||||
inspectionDeptRemoveExe.execute(ids);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
package com.zcloud.primeport.service;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.zcloud.primeport.api.InspectionVehicleServiceI;
|
|
||||||
import com.zcloud.primeport.command.InspectionVehicleAddExe;
|
|
||||||
import com.zcloud.primeport.command.InspectionVehicleRemoveExe;
|
|
||||||
import com.zcloud.primeport.command.InspectionVehicleUpdateExe;
|
|
||||||
import com.zcloud.primeport.command.query.InspectionVehicleQueryExe;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehiclePageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-app
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleServiceImpl implements InspectionVehicleServiceI {
|
|
||||||
private final InspectionVehicleAddExe inspectionVehicleAddExe;
|
|
||||||
private final InspectionVehicleUpdateExe inspectionVehicleUpdateExe;
|
|
||||||
private final InspectionVehicleRemoveExe inspectionVehicleRemoveExe;
|
|
||||||
private final InspectionVehicleQueryExe inspectionVehicleQueryExe;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResponse<InspectionVehicleCO> listPage(InspectionVehiclePageQry qry) {
|
|
||||||
|
|
||||||
return inspectionVehicleQueryExe.execute(qry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SingleResponse add(InspectionVehicleAddCmd cmd) {
|
|
||||||
|
|
||||||
inspectionVehicleAddExe.execute(cmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void edit(InspectionVehicleUpdateCmd inspectionVehicleUpdateCmd) {
|
|
||||||
inspectionVehicleUpdateExe.execute(inspectionVehicleUpdateCmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void remove(Long id) {
|
|
||||||
inspectionVehicleRemoveExe.execute(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeBatch(Long[] ids) {
|
|
||||||
inspectionVehicleRemoveExe.execute(ids);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.zcloud.primeport.api;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptPageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionDeptUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionDeptCO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
public interface InspectionDeptServiceI {
|
|
||||||
PageResponse<InspectionDeptCO> listPage(InspectionDeptPageQry qry);
|
|
||||||
|
|
||||||
SingleResponse<InspectionDeptCO> add(InspectionDeptAddCmd cmd);
|
|
||||||
|
|
||||||
void edit(InspectionDeptUpdateCmd cmd);
|
|
||||||
|
|
||||||
void remove(Long id);
|
|
||||||
|
|
||||||
void removeBatch(Long[] ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.zcloud.primeport.api;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleAddCmd;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehiclePageQry;
|
|
||||||
import com.zcloud.primeport.dto.InspectionVehicleUpdateCmd;
|
|
||||||
import com.zcloud.primeport.dto.clientobject.InspectionVehicleCO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
public interface InspectionVehicleServiceI {
|
|
||||||
PageResponse<InspectionVehicleCO> listPage(InspectionVehiclePageQry qry);
|
|
||||||
|
|
||||||
SingleResponse<InspectionVehicleCO> add(InspectionVehicleAddCmd cmd);
|
|
||||||
|
|
||||||
void edit(InspectionVehicleUpdateCmd cmd);
|
|
||||||
|
|
||||||
void remove(Long id);
|
|
||||||
|
|
||||||
void removeBatch(Long[] ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
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.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptAddCmd extends Command {
|
|
||||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
|
||||||
@NotEmpty(message = "主键不能为空")
|
|
||||||
private Long id;
|
|
||||||
@ApiModelProperty(value = "名称", name = "name", required = true)
|
|
||||||
@NotEmpty(message = "名称不能为空")
|
|
||||||
private String name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class InspectionDeptPageQry extends PageQuery {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
|
||||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
|
||||||
* - `eq`: 等值查询,对应SQL的=操作符
|
|
||||||
* - `gt`: 大于比较查询
|
|
||||||
* - `lt`: 小于比较查询
|
|
||||||
* - `ge`: 大于等于比较查询
|
|
||||||
* - `le`: 小于等于比较查询
|
|
||||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
|
||||||
*/
|
|
||||||
private String likeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
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.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptUpdateCmd extends Command {
|
|
||||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
|
||||||
@NotEmpty(message = "主键不能为空")
|
|
||||||
private Long id;
|
|
||||||
@ApiModelProperty(value = "名称", name = "name", required = true)
|
|
||||||
@NotEmpty(message = "名称不能为空")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
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.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:19
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleAddCmd extends Command {
|
|
||||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
|
||||||
@NotEmpty(message = "主键不能为空")
|
|
||||||
private Long id;
|
|
||||||
@ApiModelProperty(value = "检查部门ID", name = "inspectionDeptId", required = true)
|
|
||||||
@NotEmpty(message = "检查部门ID不能为空")
|
|
||||||
private Long inspectionDeptId;
|
|
||||||
@ApiModelProperty(value = "车辆id", name = "vehicleMessageId", required = true)
|
|
||||||
@NotEmpty(message = "车辆id不能为空")
|
|
||||||
private Long vehicleMessageId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class InspectionVehiclePageQry extends PageQuery {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
|
||||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
|
||||||
* - `eq`: 等值查询,对应SQL的=操作符
|
|
||||||
* - `gt`: 大于比较查询
|
|
||||||
* - `lt`: 小于比较查询
|
|
||||||
* - `ge`: 大于等于比较查询
|
|
||||||
* - `le`: 小于等于比较查询
|
|
||||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
|
||||||
*/
|
|
||||||
private Long likeInspectionDeptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleUpdateCmd extends Command {
|
|
||||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
|
||||||
@NotEmpty(message = "主键不能为空")
|
|
||||||
private Long id;
|
|
||||||
@ApiModelProperty(value = "检查部门ID", name = "inspectionDeptId", required = true)
|
|
||||||
@NotEmpty(message = "检查部门ID不能为空")
|
|
||||||
private Long inspectionDeptId;
|
|
||||||
@ApiModelProperty(value = "车辆id", name = "vehicleMessageId", required = true)
|
|
||||||
@NotEmpty(message = "车辆id不能为空")
|
|
||||||
private Long vehicleMessageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.zcloud.primeport.dto.clientobject;
|
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.ClientObject;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class InspectionDeptCO extends ClientObject {
|
|
||||||
//主键
|
|
||||||
@ApiModelProperty(value = "主键")
|
|
||||||
private Long id;
|
|
||||||
//名称
|
|
||||||
@ApiModelProperty(value = "名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.zcloud.primeport.dto.clientobject;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.ClientObject;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-client
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class InspectionVehicleCO extends ClientObject {
|
|
||||||
//主键
|
|
||||||
@ApiModelProperty(value = "主键")
|
|
||||||
private Long id;
|
|
||||||
//检查部门ID
|
|
||||||
@ApiModelProperty(value = "检查部门ID")
|
|
||||||
private Long inspectionDeptId;
|
|
||||||
//车辆id
|
|
||||||
@ApiModelProperty(value = "车辆id")
|
|
||||||
private Long vehicleMessageId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.zcloud.primeport.domain.gateway;
|
|
||||||
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-domain
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
public interface InspectionDeptGateway {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
Boolean add(InspectionDeptE inspectionDeptE);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
Boolean update(InspectionDeptE inspectionDeptE);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
Boolean deletedInspectionDeptById(Long id);
|
|
||||||
|
|
||||||
Boolean deletedInspectionDeptByIds(Long[] id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
package com.zcloud.primeport.domain.gateway;
|
|
||||||
|
|
||||||
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-domain
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
public interface InspectionVehicleGateway {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
Boolean add(InspectionVehicleE inspectionVehicleE);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
Boolean update(InspectionVehicleE inspectionVehicleE);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
Boolean deletedInspectionVehicleById(Long id);
|
|
||||||
|
|
||||||
Boolean deletedInspectionVehicleByIds(Long[] id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.zcloud.primeport.domain.model;
|
|
||||||
|
|
||||||
import com.alibaba.cola.domain.Entity;
|
|
||||||
import com.jjb.saas.framework.domain.model.BaseE;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
|
||||||
/**
|
|
||||||
* web-domain
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
public class InspectionDeptE extends BaseE {
|
|
||||||
//主键
|
|
||||||
private Long id;
|
|
||||||
//名称
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.zcloud.primeport.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.cola.domain.Entity;
|
|
||||||
import com.jjb.saas.framework.domain.model.BaseE;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
/**
|
|
||||||
* web-domain
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
public class InspectionVehicleE extends BaseE {
|
|
||||||
//主键
|
|
||||||
private Long id;
|
|
||||||
//检查部门ID
|
|
||||||
private Long inspectionDeptId;
|
|
||||||
//车辆id
|
|
||||||
private Long vehicleMessageId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
package com.zcloud.primeport.gatewayimpl;
|
|
||||||
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionDeptGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionDeptE;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionDeptRepository;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionDeptGatewayImpl implements InspectionDeptGateway {
|
|
||||||
private final InspectionDeptRepository inspectionDeptRepository;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean add(InspectionDeptE inspectionDeptE) {
|
|
||||||
InspectionDeptDO d = new InspectionDeptDO();
|
|
||||||
BeanUtils.copyProperties(inspectionDeptE, d);
|
|
||||||
inspectionDeptRepository.save(d);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean update(InspectionDeptE inspectionDeptE) {
|
|
||||||
InspectionDeptDO d = new InspectionDeptDO();
|
|
||||||
BeanUtils.copyProperties(inspectionDeptE, d);
|
|
||||||
inspectionDeptRepository.updateById(d);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean deletedInspectionDeptById(Long id) {
|
|
||||||
return inspectionDeptRepository.removeById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean deletedInspectionDeptByIds(Long[] ids) {
|
|
||||||
return inspectionDeptRepository.removeByIds(Arrays.asList(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
package com.zcloud.primeport.gatewayimpl;
|
|
||||||
|
|
||||||
import com.zcloud.primeport.domain.gateway.InspectionVehicleGateway;
|
|
||||||
import com.zcloud.primeport.domain.model.InspectionVehicleE;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class InspectionVehicleGatewayImpl implements InspectionVehicleGateway {
|
|
||||||
private final InspectionVehicleRepository inspectionVehicleRepository;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean add(InspectionVehicleE inspectionVehicleE) {
|
|
||||||
InspectionVehicleDO d = new InspectionVehicleDO();
|
|
||||||
BeanUtils.copyProperties(inspectionVehicleE, d);
|
|
||||||
inspectionVehicleRepository.save(d);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean update(InspectionVehicleE inspectionVehicleE) {
|
|
||||||
InspectionVehicleDO d = new InspectionVehicleDO();
|
|
||||||
BeanUtils.copyProperties(inspectionVehicleE, d);
|
|
||||||
inspectionVehicleRepository.updateById(d);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean deletedInspectionVehicleById(Long id) {
|
|
||||||
return inspectionVehicleRepository.removeById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean deletedInspectionVehicleByIds(Long[] ids) {
|
|
||||||
return inspectionVehicleRepository.removeByIds(Arrays.asList(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.dataobject;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("inspection_dept")
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class InspectionDeptDO extends BaseDO {
|
|
||||||
//主键
|
|
||||||
@ApiModelProperty(value = "主键")
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
//名称
|
|
||||||
@ApiModelProperty(value = "名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.dataobject;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("inspection_vehicle")
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class InspectionVehicleDO extends BaseDO {
|
|
||||||
//主键
|
|
||||||
@ApiModelProperty(value = "主键")
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
//检查部门ID
|
|
||||||
@ApiModelProperty(value = "检查部门ID")
|
|
||||||
private Long inspectionDeptId;
|
|
||||||
//车辆id
|
|
||||||
@ApiModelProperty(value = "车辆id")
|
|
||||||
private Long vehicleMessageId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:07
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface InspectionDeptMapper extends BaseMapper<InspectionDeptDO> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface InspectionVehicleMapper extends BaseMapper<InspectionVehicleDO> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.repository;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
public interface InspectionDeptRepository extends BaseRepository<InspectionDeptDO> {
|
|
||||||
PageResponse<InspectionDeptDO> listPage(Map<String, Object> parmas);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.repository;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
public interface InspectionVehicleRepository extends BaseRepository<InspectionVehicleDO> {
|
|
||||||
PageResponse<InspectionVehicleDO> listPage(Map<String, Object> parmas);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.repository.impl;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
|
||||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|
||||||
import com.zcloud.gbscommon.utils.Query;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionDeptDO;
|
|
||||||
import com.zcloud.primeport.persistence.mapper.InspectionDeptMapper;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionDeptRepository;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:24:08
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class InspectionDeptRepositoryImpl extends BaseRepositoryImpl<InspectionDeptMapper, InspectionDeptDO> implements InspectionDeptRepository {
|
|
||||||
private final InspectionDeptMapper inspectionDeptMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResponse<InspectionDeptDO> listPage(Map<String, Object> parmas) {
|
|
||||||
IPage<InspectionDeptDO> iPage = new Query<InspectionDeptDO>().getPage(parmas);
|
|
||||||
QueryWrapper<InspectionDeptDO> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
|
||||||
queryWrapper.orderByDesc("create_time");
|
|
||||||
IPage<InspectionDeptDO> result = inspectionDeptMapper.selectPage(iPage, queryWrapper);
|
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.zcloud.primeport.persistence.repository.impl;
|
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
|
||||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|
||||||
import com.zcloud.gbscommon.utils.Query;
|
|
||||||
import com.zcloud.primeport.persistence.dataobject.InspectionVehicleDO;
|
|
||||||
import com.zcloud.primeport.persistence.mapper.InspectionVehicleMapper;
|
|
||||||
import com.zcloud.primeport.persistence.repository.InspectionVehicleRepository;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* web-infrastructure
|
|
||||||
*
|
|
||||||
* @Author guoyuepeng
|
|
||||||
* @Date 2025-11-20 15:25:20
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class InspectionVehicleRepositoryImpl extends BaseRepositoryImpl<InspectionVehicleMapper, InspectionVehicleDO> implements InspectionVehicleRepository {
|
|
||||||
private final InspectionVehicleMapper inspectionVehicleMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResponse<InspectionVehicleDO> listPage(Map<String, Object> parmas) {
|
|
||||||
IPage<InspectionVehicleDO> iPage = new Query<InspectionVehicleDO>().getPage(parmas);
|
|
||||||
QueryWrapper<InspectionVehicleDO> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
|
||||||
queryWrapper.orderByDesc("create_time");
|
|
||||||
IPage<InspectionVehicleDO> result = inspectionVehicleMapper.selectPage(iPage, queryWrapper);
|
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?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.InspectionDeptMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?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.InspectionVehicleMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue